2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{ar as t,aX as n}from"./index-f6e54d8f.js";var e,r={},i={get exports(){return r},set exports(t){r=t}};function s(){return e||(e=1,i.exports=function(){var t=1e3,n=6e4,e=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",h="month",f="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],e=t%100;return"["+t+(n[(e-20)%10]||n[e]||n[0])+"]"}},v=function(t,n,e){var r=String(t);return!r||r.length>=n?t:""+Array(n+1-r.length).join(e)+t},y={s:v,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),r=Math.floor(e/60),i=e%60;return(n<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(n,e){if(n.date()<e.date())return-t(e,n);var r=12*(e.year()-n.year())+(e.month()-n.month()),i=n.clone().add(r,h),s=e-i<0,u=n.clone().add(r+(s?-1:1),h);return+(-(r+(e-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=m;var p=function(t){return t instanceof _},S=function t(n,e,r){var i;if(!n)return g;if("string"==typeof n){var s=n.toLowerCase();D[s]&&(i=s),e&&(D[s]=e,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;D[a]=n,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,n){if(p(t))return t.clone();var e="object"==typeof n?n:{};return e.date=t,e.args=arguments,new _(e)},O=y;O.l=S,O.i=p,O.w=function(t,n){return w(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function m(t){this.$L=S(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(O.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var r=n.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return e?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return O},v.isValid=function(){return!(this.$d.toString()===$)},v.isSame=function(t,n){var e=w(t);return this.startOf(n)<=e&&e<=this.endOf(n)},v.isAfter=function(t,n){return w(t)<this.startOf(n)},v.isBefore=function(t,n){return this.endOf(n)<w(t)},v.$g=function(t,n,e){return O.u(t)?this[n]:this.set(e,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,n){var e=this,r=!!O.u(n)||n,f=O.p(t),$=function(t,n){var i=O.w(e.$u?Date.UTC(e.$y,n,t):new Date(e.$y,n,t),e);return r?i:i.endOf(a)},l=function(t,n){return O.w(e.toDate()[t].apply(e.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(n)),e)},M=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(f){case c:return r?$(1,0):$(31,11);case h:return r?$(1,m):$(0,m+1);case o:var g=this.$locale().weekStart||0,D=(M<g?M+7:M)-g;return $(r?v-D:v+(6-D),m);case a:case d:return l(y+"Hours",0);case u:return l(y+"Minutes",1);case s:return l(y+"Seconds",2);case i:return l(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,n){var e,o=O.p(t),f="set"+(this.$u?"UTC":""),$=(e={},e[a]=f+"Date",e[d]=f+"Date",e[h]=f+"Month",e[c]=f+"FullYear",e[u]=f+"Hours",e[s]=f+"Minutes",e[i]=f+"Seconds",e[r]=f+"Milliseconds",e)[o],l=o===a?this.$D+(n-this.$W):n;if(o===h||o===c){var M=this.clone().set(d,1);M.$d[$](l),M.init(),this.$d=M.set(d,Math.min(this.$D,M.daysInMonth())).$d}else $&&this.$d[$](l);return this.init(),this},v.set=function(t,n){return this.clone().$set(t,n)},v.get=function(t){return this[O.p(t)]()},v.add=function(r,f){var d,$=this;r=Number(r);var l=O.p(f),M=function(t){var n=w($);return O.w(n.date(n.date()+Math.round(t*r)),$)};if(l===h)return this.set(h,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return M(1);if(l===o)return M(7);var m=(d={},d[s]=n,d[u]=e,d[i]=t,d)[l]||1,v=this.$d.getTime()+r*m;return O.w(v,this)},v.subtract=function(t,n){return this.add(-1*t,n)},v.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=e.weekdays,h=e.months,f=function(t,e,i,s){return t&&(t[e]||t(n,r))||i[e].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=e.meridiem||function(t,n,e){var r=t<12?"AM":"PM";return e?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:f(e.monthsShort,a,h,3),MMMM:f(h,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:f(e.weekdaysMin,this.$W,o,2),ddd:f(e.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(M,(function(t,n){return n||l[t]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,d,$){var l,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*n,y=this-m,g=O.m(this,m);return g=(l={},l[c]=g/12,l[h]=g,l[f]=g/3,l[o]=(y-v)/6048e5,l[a]=(y-v)/864e5,l[u]=y/e,l[s]=y/n,l[i]=y/t,l)[M]||y,$?g:O.a(g)},v.daysInMonth=function(){return this.endOf(h).$D},v.$locale=function(){return D[this.$L]},v.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),r=S(t,n,!0);return r&&(e.$L=r),e},v.clone=function(){return O.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),Y=_.prototype;return w.prototype=Y,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",h],["$y",c],["$D",d]].forEach((function(t){Y[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),w.extend=function(t,n){return t.$i||(t(n,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}()),r}const u=n(s());export{u as d,s as r};
|