2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
import{c as G,g as J}from"./_commonjsHelpers-725317a4.js";var R={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){return function(h,d){var H=d.prototype,C=H.format;H.format=function(l){var f=this,o=this.$locale();if(!this.isValid())return C.bind(this)(l);var c=this.$utils(),T=(l||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(g){switch(g){case"Q":return Math.ceil((f.$M+1)/3);case"Do":return o.ordinal(f.$D);case"gggg":return f.weekYear();case"GGGG":return f.isoWeekYear();case"wo":return o.ordinal(f.week(),"W");case"w":case"ww":return c.s(f.week(),g==="w"?1:2,"0");case"W":case"WW":return c.s(f.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return c.s(String(f.$H===0?24:f.$H),g==="k"?1:2,"0");case"X":return Math.floor(f.$d.getTime()/1e3);case"x":return f.$d.getTime();case"z":return"["+f.offsetName()+"]";case"zzz":return"["+f.offsetName("long")+"]";default:return g}});return C.bind(this)(T)}}})})(R);var st=R.exports;const ot=J(st);var K={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){var h=1e3,d=6e4,H=36e5,C="millisecond",l="second",f="minute",o="hour",c="day",T="week",g="month",v="quarter",D="year",M="date",e="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,y={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(i){var r=["th","st","nd","rd"],t=i%100;return"["+i+(r[(t-20)%10]||r[t]||r[0])+"]"}},w=function(i,r,t){var s=String(i);return!s||s.length>=r?i:""+Array(r+1-s.length).join(t)+i},W={s:w,z:function(i){var r=-i.utcOffset(),t=Math.abs(r),s=Math.floor(t/60),n=t%60;return(r<=0?"+":"-")+w(s,2,"0")+":"+w(n,2,"0")},m:function i(r,t){if(r.date()<t.date())return-i(t,r);var s=12*(t.year()-r.year())+(t.month()-r.month()),n=r.clone().add(s,g),u=t-n<0,a=r.clone().add(s+(u?-1:1),g);return+(-(s+(t-n)/(u?n-a:a-n))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:g,y:D,w:T,d:c,D:M,h:o,m:f,s:l,ms:C,Q:v}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},p="en",z={};z[p]=y;var U=function(i){return i instanceof I},k=function i(r,t,s){var n;if(!r)return p;if(typeof r=="string"){var u=r.toLowerCase();z[u]&&(n=u),t&&(z[u]=t,n=u);var a=r.split("-");if(!n&&a.length>1)return i(a[0])}else{var x=r.name;z[x]=r,n=x}return!s&&n&&(p=n),n||!s&&p},Y=function(i,r){if(U(i))return i.clone();var t=typeof r=="object"?r:{};return t.date=i,t.args=arguments,new I(t)},m=W;m.l=k,m.i=U,m.w=function(i,r){return Y(i,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var I=function(){function i(t){this.$L=k(t.locale,null,!0),this.parse(t)}var r=i.prototype;return r.parse=function(t){this.$d=function(s){var n=s.date,u=s.utc;if(n===null)return new Date(NaN);if(m.u(n))return new Date;if(n instanceof Date)return new Date(n);if(typeof n=="string"&&!/Z$/i.test(n)){var a=n.match($);if(a){var x=a[2]-1||0,_=(a[7]||"0").substring(0,3);return u?new Date(Date.UTC(a[1],x,a[3]||1,a[4]||0,a[5]||0,a[6]||0,_)):new Date(a[1],x,a[3]||1,a[4]||0,a[5]||0,a[6]||0,_)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},r.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()},r.$utils=function(){return m},r.isValid=function(){return this.$d.toString()!==e},r.isSame=function(t,s){var n=Y(t);return this.startOf(s)<=n&&n<=this.endOf(s)},r.isAfter=function(t,s){return Y(t)<this.startOf(s)},r.isBefore=function(t,s){return this.endOf(s)<Y(t)},r.$g=function(t,s,n){return m.u(t)?this[s]:this.set(n,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,s){var n=this,u=!!m.u(s)||s,a=m.p(t),x=function(V,Z){var j=m.w(n.$u?Date.UTC(n.$y,Z,V):new Date(n.$y,Z,V),n);return u?j:j.endOf(c)},_=function(V,Z){return m.w(n.toDate()[V].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(Z)),n)},L=this.$W,F=this.$M,E=this.$D,A="set"+(this.$u?"UTC":"");switch(a){case D:return u?x(1,0):x(31,11);case g:return u?x(1,F):x(0,F+1);case T:var B=this.$locale().weekStart||0,Q=(L<B?L+7:L)-B;return x(u?E-Q:E+(6-Q),F);case c:case M:return _(A+"Hours",0);case o:return _(A+"Minutes",1);case f:return _(A+"Seconds",2);case l:return _(A+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,s){var n,u=m.p(t),a="set"+(this.$u?"UTC":""),x=(n={},n[c]=a+"Date",n[M]=a+"Date",n[g]=a+"Month",n[D]=a+"FullYear",n[o]=a+"Hours",n[f]=a+"Minutes",n[l]=a+"Seconds",n[C]=a+"Milliseconds",n)[u],_=u===c?this.$D+(s-this.$W):s;if(u===g||u===D){var L=this.clone().set(M,1);L.$d[x](_),L.init(),this.$d=L.set(M,Math.min(this.$D,L.daysInMonth())).$d}else x&&this.$d[x](_);return this.init(),this},r.set=function(t,s){return this.clone().$set(t,s)},r.get=function(t){return this[m.p(t)]()},r.add=function(t,s){var n,u=this;t=Number(t);var a=m.p(s),x=function(F){var E=Y(u);return m.w(E.date(E.date()+Math.round(F*t)),u)};if(a===g)return this.set(g,this.$M+t);if(a===D)return this.set(D,this.$y+t);if(a===c)return x(1);if(a===T)return x(7);var _=(n={},n[f]=d,n[o]=H,n[l]=h,n)[a]||1,L=this.$d.getTime()+t*_;return m.w(L,this)},r.subtract=function(t,s){return this.add(-1*t,s)},r.format=function(t){var s=this,n=this.$locale();if(!this.isValid())return n.invalidDate||e;var u=t||"YYYY-MM-DDTHH:mm:ssZ",a=m.z(this),x=this.$H,_=this.$m,L=this.$M,F=n.weekdays,E=n.months,A=function(Z,j,X,P){return Z&&(Z[j]||Z(s,u))||X[j].slice(0,P)},B=function(Z){return m.s(x%12||12,Z,"0")},Q=n.meridiem||function(Z,j,X){var P=Z<12?"AM":"PM";return X?P.toLowerCase():P},V={YY:String(this.$y).slice(-2),YYYY:this.$y,M:L+1,MM:m.s(L+1,2,"0"),MMM:A(n.monthsShort,L,E,3),MMMM:A(E,L),D:this.$D,DD:m.s(this.$D,2,"0"),d:String(this.$W),dd:A(n.weekdaysMin,this.$W,F,2),ddd:A(n.weekdaysShort,this.$W,F,3),dddd:F[this.$W],H:String(x),HH:m.s(x,2,"0"),h:B(1),hh:B(2),a:Q(x,_,!0),A:Q(x,_,!1),m:String(_),mm:m.s(_,2,"0"),s:String(this.$s),ss:m.s(this.$s,2,"0"),SSS:m.s(this.$ms,3,"0"),Z:a};return u.replace(O,function(Z,j){return j||V[Z]||a.replace(":","")})},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,s,n){var u,a=m.p(s),x=Y(t),_=(x.utcOffset()-this.utcOffset())*d,L=this-x,F=m.m(this,x);return F=(u={},u[D]=F/12,u[g]=F,u[v]=F/3,u[T]=(L-_)/6048e5,u[c]=(L-_)/864e5,u[o]=L/H,u[f]=L/d,u[l]=L/h,u)[a]||L,n?F:m.a(F)},r.daysInMonth=function(){return this.endOf(g).$D},r.$locale=function(){return z[this.$L]},r.locale=function(t,s){if(!t)return this.$L;var n=this.clone(),u=k(t,s,!0);return u&&(n.$L=u),n},r.clone=function(){return m.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},i}(),q=I.prototype;return Y.prototype=q,[["$ms",C],["$s",l],["$m",f],["$H",o],["$W",c],["$M",g],["$y",D],["$D",M]].forEach(function(i){q[i[1]]=function(r){return this.$g(r,i[0],i[1])}}),Y.extend=function(i,r){return i.$i||(i(r,I,Y),i.$i=!0),Y},Y.locale=k,Y.isDayjs=U,Y.unix=function(i){return Y(1e3*i)},Y.en=z[p],Y.Ls=z,Y.p={},Y})})(K);var at=K.exports;const N=J(at);var tt={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){var h={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(d,H,C){var l=H.prototype,f=l.format;C.en.formats=h,l.format=function(o){o===void 0&&(o="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,T=function(g,v){return g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,M,e){var $=e&&e.toUpperCase();return M||v[e]||h[e]||v[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(O,y,w){return y||w.slice(1)})})}(o,c===void 0?{}:c);return f.call(this,T)}}})})(tt);var ut=tt.exports;const ft=J(ut);var et={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){return function(h,d,H){h=h||{};var C=d.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function f(c,T,g,v){return C.fromToBase(c,T,g,v)}H.en.relativeTime=l,C.fromToBase=function(c,T,g,v,D){for(var M,e,$,O=g.$locale().relativeTime||l,y=h.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],w=y.length,W=0;W<w;W+=1){var p=y[W];p.d&&(M=v?H(c).diff(g,p.d,!0):g.diff(c,p.d,!0));var z=(h.rounding||Math.round)(Math.abs(M));if($=M>0,z<=p.r||!p.r){z<=1&&W>0&&(p=y[W-1]);var U=O[p.l];D&&(z=D(""+z)),e=typeof U=="string"?U.replace("%d",z):U(z,T,p.l,$);break}}if(T)return e;var k=$?O.future:O.past;return typeof k=="function"?k(e):k.replace("%s",e)},C.to=function(c,T){return f(c,T,this,!0)},C.from=function(c,T){return f(c,T,this)};var o=function(c){return c.$u?H.utc():H()};C.toNow=function(c){return this.to(o(this),c)},C.fromNow=function(c){return this.from(o(this),c)}}})})(et);var ct=et.exports;const ht=J(ct);var nt={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){var h={year:0,month:1,day:2,hour:3,minute:4,second:5},d={};return function(H,C,l){var f,o=function(v,D,M){M===void 0&&(M={});var e=new Date(v),$=function(O,y){y===void 0&&(y={});var w=y.timeZoneName||"short",W=O+"|"+w,p=d[W];return p||(p=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:O,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:w}),d[W]=p),p}(D,M);return $.formatToParts(e)},c=function(v,D){for(var M=o(v,D),e=[],$=0;$<M.length;$+=1){var O=M[$],y=O.type,w=O.value,W=h[y];W>=0&&(e[W]=parseInt(w,10))}var p=e[3],z=p===24?0:p,U=e[0]+"-"+e[1]+"-"+e[2]+" "+z+":"+e[4]+":"+e[5]+":000",k=+v;return(l.utc(U).valueOf()-(k-=k%1e3))/6e4},T=C.prototype;T.tz=function(v,D){v===void 0&&(v=f);var M=this.utcOffset(),e=this.toDate(),$=e.toLocaleString("en-US",{timeZone:v}),O=Math.round((e-new Date($))/1e3/60),y=l($).$set("millisecond",this.$ms).utcOffset(15*-Math.round(e.getTimezoneOffset()/15)-O,!0);if(D){var w=y.utcOffset();y=y.add(M-w,"minute")}return y.$x.$timezone=v,y},T.offsetName=function(v){var D=this.$x.$timezone||l.tz.guess(),M=o(this.valueOf(),D,{timeZoneName:v}).find(function(e){return e.type.toLowerCase()==="timezonename"});return M&&M.value};var g=T.startOf;T.startOf=function(v,D){if(!this.$x||!this.$x.$timezone)return g.call(this,v,D);var M=l(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return g.call(M,v,D).tz(this.$x.$timezone,!0)},l.tz=function(v,D,M){var e=M&&D,$=M||D||f,O=c(+l(),$);if(typeof v!="string")return l(v).tz($);var y=function(z,U,k){var Y=z-60*U*1e3,m=c(Y,k);if(U===m)return[Y,U];var I=c(Y-=60*(m-U)*1e3,k);return m===I?[Y,m]:[z-60*Math.min(m,I)*1e3,Math.max(m,I)]}(l.utc(v,e).valueOf(),O,$),w=y[0],W=y[1],p=l(w).utcOffset(W);return p.$x.$timezone=$,p},l.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},l.tz.setDefault=function(v){f=v}}})})(nt);var dt=nt.exports;const lt=J(dt);var rt={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){return function(h,d,H){H.updateLocale=function(C,l){var f=H.Ls[C];if(f)return(l?Object.keys(l):[]).forEach(function(o){f[o]=l[o]}),f}}})})(rt);var mt=rt.exports;const $t=J(mt);var it={exports:{}};(function(S,b){(function(h,d){S.exports=d()})(G,function(){var h="minute",d=/[+-]\d\d(?::?\d\d)?/g,H=/([+-]|\d\d)/g;return function(C,l,f){var o=l.prototype;f.utc=function(e){var $={date:e,utc:!0,args:arguments};return new l($)},o.utc=function(e){var $=f(this.toDate(),{locale:this.$L,utc:!0});return e?$.add(this.utcOffset(),h):$},o.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var c=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),c.call(this,e)};var T=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else T.call(this)};var g=o.utcOffset;o.utcOffset=function(e,$){var O=this.$utils().u;if(O(e))return this.$u?0:O(this.$offset)?g.call(this):this.$offset;if(typeof e=="string"&&(e=function(p){p===void 0&&(p="");var z=p.match(d);if(!z)return null;var U=(""+z[0]).match(H)||["-",0,0],k=U[0],Y=60*+U[1]+ +U[2];return Y===0?0:k==="+"?Y:-Y}(e),e===null))return this;var y=Math.abs(e)<=16?60*e:e,w=this;if($)return w.$offset=y,w.$u=e===0,w;if(e!==0){var W=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(y+W,h)).$offset=y,w.$x.$localOffset=W}else w=this.utc();return w};var v=o.format;o.format=function(e){var $=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return v.call(this,$)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var D=o.toDate;o.toDate=function(e){return e==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():D.call(this)};var M=o.diff;o.diff=function(e,$,O){if(e&&this.$u===e.$u)return M.call(this,e,$,O);var y=this.local(),w=f(e).local();return M.call(y,w,$,O)}}})})(it);var vt=it.exports;const Mt=J(vt);N.extend(ht);N.extend(ft);N.extend(ot);N.extend(Mt);N.extend(lt);N.extend($t);N.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a min",mm:"%d min",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});const gt=S=>S?N.tz.guess():"UTC",pt=(S,b,h="day")=>N(S).diff(N(b),h,!0),Dt=(S,b,h=1)=>pt(S,b,"hour")<-h,yt=(S,b)=>{const h=new Date(S),d=new Date(b);return h.getFullYear()===d.getFullYear()&&h.getMonth()===d.getMonth()&&h.getDate()===d.getDate()},Yt=S=>{const b=N(S,{utc:!0}),h=!Dt(b,Date.now()),d=yt(b,Date.now()),H=gt(!1);return h?N().to(b):d?N(S).tz(H).format("h:mm A z"):b.format("MMMM D, YYYY")};export{Yt as g};
|
|
//# sourceMappingURL=time-cc3fd1f0.js.map
|