@malloydata/render 0.0.435 → 0.0.436
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/format/index.cjs +1 -0
- package/dist/format/index.mjs +7395 -0
- package/dist/module/component/render-numeric-field.d.ts +2 -2
- package/dist/module/component/tag-configs.d.ts +2 -36
- package/dist/module/format/cell-format.d.ts +74 -0
- package/dist/module/format/index.d.ts +3 -0
- package/dist/module/format/number-format.d.ts +56 -0
- package/dist/module/format/time-format.d.ts +23 -0
- package/dist/module/html/duration.d.ts +3 -5
- package/dist/module/index.mjs +38847 -38700
- package/dist/module/index.umd.js +439 -442
- package/dist/module/util.d.ts +3 -74
- package/femto-config.motly +5 -2
- package/package.json +18 -5
- package/vite.config.format.mts +28 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gt={exports:{}},nn;function Si(){return nn||(nn=1,function(t){var e={},r=function(s){s.version="0.11.2";function i(l){for(var c="",f=l.length-1;f>=0;)c+=l.charAt(f--);return c}function a(l,c){for(var f="";f.length<c;)f+=l;return f}function o(l,c){var f=""+l;return f.length>=c?f:a("0",c-f.length)+f}function u(l,c){var f=""+l;return f.length>=c?f:a(" ",c-f.length)+f}function y(l,c){var f=""+l;return f.length>=c?f:f+a(" ",c-f.length)}function T(l,c){var f=""+Math.round(l);return f.length>=c?f:a("0",c-f.length)+f}function E(l,c){var f=""+l;return f.length>=c?f:a("0",c-f.length)+f}var L=Math.pow(2,32);function M(l,c){if(l>L||l<-L)return T(l,c);var f=Math.round(l);return E(f,c)}function U(l,c){return c=c||0,l.length>=7+c&&(l.charCodeAt(c)|32)===103&&(l.charCodeAt(c+1)|32)===101&&(l.charCodeAt(c+2)|32)===110&&(l.charCodeAt(c+3)|32)===101&&(l.charCodeAt(c+4)|32)===114&&(l.charCodeAt(c+5)|32)===97&&(l.charCodeAt(c+6)|32)===108}var Y=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],K=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function ne(l){l[0]="General",l[1]="0",l[2]="0.00",l[3]="#,##0",l[4]="#,##0.00",l[9]="0%",l[10]="0.00%",l[11]="0.00E+00",l[12]="# ?/?",l[13]="# ??/??",l[14]="m/d/yy",l[15]="d-mmm-yy",l[16]="d-mmm",l[17]="mmm-yy",l[18]="h:mm AM/PM",l[19]="h:mm:ss AM/PM",l[20]="h:mm",l[21]="h:mm:ss",l[22]="m/d/yy h:mm",l[37]="#,##0 ;(#,##0)",l[38]="#,##0 ;[Red](#,##0)",l[39]="#,##0.00;(#,##0.00)",l[40]="#,##0.00;[Red](#,##0.00)",l[45]="mm:ss",l[46]="[h]:mm:ss",l[47]="mmss.0",l[48]="##0.0E+0",l[49]="@",l[56]='"上午/下午 "hh"時"mm"分"ss"秒 "'}var J={};ne(J);var X=[],N=0;for(N=5;N<=8;++N)X[N]=32+N;for(N=23;N<=26;++N)X[N]=0;for(N=27;N<=31;++N)X[N]=14;for(N=50;N<=58;++N)X[N]=14;for(N=59;N<=62;++N)X[N]=N-58;for(N=67;N<=68;++N)X[N]=N-58;for(N=72;N<=75;++N)X[N]=N-58;for(N=67;N<=68;++N)X[N]=N-57;for(N=76;N<=78;++N)X[N]=N-56;for(N=79;N<=81;++N)X[N]=N-34;var ee=[];ee[5]=ee[63]='"$"#,##0_);\\("$"#,##0\\)',ee[6]=ee[64]='"$"#,##0_);[Red]\\("$"#,##0\\)',ee[7]=ee[65]='"$"#,##0.00_);\\("$"#,##0.00\\)',ee[8]=ee[66]='"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',ee[41]='_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',ee[42]='_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',ee[43]='_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',ee[44]='_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)';function Ee(l,c,f){for(var x=l<0?-1:1,h=l*x,v=0,m=1,k=0,A=1,S=0,_=0,V=Math.floor(h);S<c&&(V=Math.floor(h),k=V*m+v,_=V*S+A,!(h-V<5e-8));)h=1/(h-V),v=m,m=k,A=S,S=_;if(_>c&&(S>c?(_=A,k=v):(_=S,k=m)),!f)return[0,x*k,_];var ge=Math.floor(x*k/_);return[ge,x*k-ge*_,_]}function Oe(l,c,f){if(l>2958465||l<0)return null;var x=l|0,h=Math.floor(86400*(l-x)),v=0,m=[],k={D:x,T:h,u:86400*(l-x)-h,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(k.u)<1e-6&&(k.u=0),c&&c.date1904&&(x+=1462),k.u>.9999&&(k.u=0,++h==86400&&(k.T=h=0,++x,++k.D)),x===60)m=f?[1317,10,29]:[1900,2,29],v=3;else if(x===0)m=f?[1317,8,29]:[1900,1,0],v=6;else{x>60&&--x;var A=new Date(1900,0,1);A.setDate(A.getDate()+x-1),m=[A.getFullYear(),A.getMonth()+1,A.getDate()],v=A.getDay(),x<60&&(v=(v+6)%7),f&&(v=wt(A,m))}return k.y=m[0],k.m=m[1],k.d=m[2],k.S=h%60,h=Math.floor(h/60),k.M=h%60,h=Math.floor(h/60),k.H=h,k.q=v,k}s.parse_date_code=Oe;var Ie=new Date(1899,11,31,0,0,0),Te=Ie.getTime(),oe=new Date(1900,2,1,0,0,0);function Ue(l,c){var f=l.getTime();return c?f-=1262304e5:l>=oe&&(f+=864e5),(f-(Te+(l.getTimezoneOffset()-Ie.getTimezoneOffset())*6e4))/864e5}function gt(l){return l.toString(10)}s._general_int=gt;var yt=function(){var c=/(?:\.0*|(\.\d*[1-9])0+)$/;function f(S){return S.indexOf(".")==-1?S:S.replace(c,"$1")}var x=/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,h=/(E[+-])(\d)$/;function v(S){return S.indexOf("E")==-1?S:S.replace(x,"$1E").replace(h,"$10$2")}function m(S){var _=S<0?12:11,V=f(S.toFixed(12));return V.length<=_||(V=S.toPrecision(10),V.length<=_)?V:S.toExponential(5)}function k(S){var _=f(S.toFixed(11));return _.length>(S<0?12:11)||_==="0"||_==="-0"?S.toPrecision(6):_}function A(S){var _=Math.floor(Math.log(Math.abs(S))*Math.LOG10E),V;return _>=-4&&_<=-1?V=S.toPrecision(10+_):Math.abs(_)<=9?V=m(S):_===10?V=S.toFixed(10).substr(0,12):V=k(S),f(v(V.toUpperCase()))}return A}();s._general_num=yt;function Ae(l,c){switch(typeof l){case"string":return l;case"boolean":return l?"TRUE":"FALSE";case"number":return(l|0)===l?l.toString(10):yt(l);case"undefined":return"";case"object":if(l==null)return"";if(l instanceof Date)return tn(14,Ue(l,c&&c.date1904),c)}throw new Error("unsupported value in General format: "+l)}s._general=Ae;function wt(l,c){c[0]-=581;var f=l.getDay();return l<60&&(f=(f+6)%7),f}function bt(l,c,f,x){var h="",v=0,m=0,k=f.y,A,S=0;switch(l){case 98:k=f.y+543;case 121:switch(c.length){case 1:case 2:A=k%100,S=2;break;default:A=k%1e4,S=4;break}break;case 109:switch(c.length){case 1:case 2:A=f.m,S=c.length;break;case 3:return K[f.m-1][1];case 5:return K[f.m-1][0];default:return K[f.m-1][2]}break;case 100:switch(c.length){case 1:case 2:A=f.d,S=c.length;break;case 3:return Y[f.q][0];default:return Y[f.q][1]}break;case 104:switch(c.length){case 1:case 2:A=1+(f.H+11)%12,S=c.length;break;default:throw"bad hour format: "+c}break;case 72:switch(c.length){case 1:case 2:A=f.H,S=c.length;break;default:throw"bad hour format: "+c}break;case 77:switch(c.length){case 1:case 2:A=f.M,S=c.length;break;default:throw"bad minute format: "+c}break;case 115:if(c!="s"&&c!="ss"&&c!=".0"&&c!=".00"&&c!=".000")throw"bad second format: "+c;return f.u===0&&(c=="s"||c=="ss")?o(f.S,c.length):(x>=2?m=x===3?1e3:100:m=x===1?10:1,v=Math.round(m*(f.S+f.u)),v>=60*m&&(v=0),c==="s"?v===0?"0":""+v/m:(h=o(v,2+x),c==="ss"?h.substr(0,2):"."+h.substr(2,c.length-1)));case 90:switch(c){case"[h]":case"[hh]":A=f.D*24+f.H;break;case"[m]":case"[mm]":A=(f.D*24+f.H)*60+f.M;break;case"[s]":case"[ss]":A=((f.D*24+f.H)*60+f.M)*60+Math.round(f.S+f.u);break;default:throw"bad abstime format: "+c}S=c.length===3?1:2;break;case 101:A=k,S=1;break}var _=S>0?o(A,S):"";return _}function he(l){var c=3;if(l.length<=c)return l;for(var f=l.length%c,x=l.substr(0,f);f!=l.length;f+=c)x+=(x.length>0?",":"")+l.substr(f,c);return x}var me=function(){var c=/%/g;function f(p,d,g){var $=d.replace(c,""),w=d.length-$.length;return me(p,$,g*Math.pow(10,2*w))+a("%",w)}function x(p,d,g){for(var $=d.length-1;d.charCodeAt($-1)===44;)--$;return me(p,d.substr(0,$),g/Math.pow(10,3*(d.length-$)))}function h(p,d){var g,$=p.indexOf("E")-p.indexOf(".")-1;if(p.match(/^#+0.0E\+0$/)){if(d==0)return"0.0E+0";if(d<0)return"-"+h(p,-d);var w=p.indexOf(".");w===-1&&(w=p.indexOf("E"));var b=Math.floor(Math.log(d)*Math.LOG10E)%w;if(b<0&&(b+=w),g=(d/Math.pow(10,b)).toPrecision($+1+(w+b)%w),g.indexOf("e")===-1){var F=Math.floor(Math.log(d)*Math.LOG10E);for(g.indexOf(".")===-1?g=g.charAt(0)+"."+g.substr(1)+"E+"+(F-g.length+b):g+="E+"+(F-b);g.substr(0,2)==="0.";)g=g.charAt(0)+g.substr(2,w)+"."+g.substr(2+w),g=g.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");g=g.replace(/\+-/,"-")}g=g.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(P,B,Q,R){return B+Q+R.substr(0,(w+b)%w)+"."+R.substr(b)+"E"})}else g=d.toExponential($);return p.match(/E\+00$/)&&g.match(/e[+-]\d$/)&&(g=g.substr(0,g.length-1)+"0"+g.charAt(g.length-1)),p.match(/E\-/)&&g.match(/e\+/)&&(g=g.replace(/e\+/,"e")),g.replace("e","E")}var v=/# (\?+)( ?)\/( ?)(\d+)/;function m(p,d,g){var $=parseInt(p[4],10),w=Math.round(d*$),b=Math.floor(w/$),F=w-b*$,P=$;return g+(b===0?"":""+b)+" "+(F===0?a(" ",p[1].length+1+p[4].length):u(F,p[1].length)+p[2]+"/"+p[3]+o(P,p[4].length))}function k(p,d,g){return g+(d===0?"":""+d)+a(" ",p[1].length+2+p[4].length)}var A=/^#*0*\.([0#]+)/,S=/\).*[0#]/,_=/\(###\) ###\\?-####/;function V(p){for(var d="",g,$=0;$!=p.length;++$)switch(g=p.charCodeAt($)){case 35:break;case 63:d+=" ";break;case 48:d+="0";break;default:d+=String.fromCharCode(g)}return d}function ge(p,d){var g=Math.pow(10,d);return""+Math.round(p*g)/g}function _e(p,d){var g=p-Math.floor(p),$=Math.pow(10,d);return d<(""+Math.round(g*$)).length?0:Math.round(g*$)}function Pt(p,d){return d<(""+Math.round((p-Math.floor(p))*Math.pow(10,d))).length?1:0}function ye(p){return p<2147483647&&p>-2147483648?""+(p>=0?p|0:p-1|0):""+Math.floor(p)}function z(p,d,g){if(p.charCodeAt(0)===40&&!d.match(S)){var $=d.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return g>=0?z("n",$,g):"("+z("n",$,-g)+")"}if(d.charCodeAt(d.length-1)===44)return x(p,d,g);if(d.indexOf("%")!==-1)return f(p,d,g);if(d.indexOf("E")!==-1)return h(d,g);if(d.charCodeAt(0)===36)return"$"+z(p,d.substr(d.charAt(1)==" "?2:1),g);var w,b,F,P,B=Math.abs(g),Q=g<0?"-":"";if(d.match(/^00+$/))return Q+M(B,d.length);if(d.match(/^[#?]+$/))return w=M(g,0),w==="0"&&(w=""),w.length>d.length?w:V(d.substr(0,d.length-w.length))+w;if(b=d.match(v))return m(b,B,Q);if(d.match(/^#+0+$/))return Q+M(B,d.length-d.indexOf("0"));if(b=d.match(A))return w=ge(g,b[1].length).replace(/^([^\.]+)$/,"$1."+V(b[1])).replace(/\.$/,"."+V(b[1])).replace(/\.(\d*)$/,function(ue,rt){return"."+rt+a("0",V(b[1]).length-rt.length)}),d.indexOf("0.")!==-1?w:w.replace(/^0\./,".");if(d=d.replace(/^#+([0.])/,"$1"),b=d.match(/^(0*)\.(#*)$/))return Q+ge(B,b[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,b[1].length?"0.":".");if(b=d.match(/^#{1,3},##0(\.?)$/))return Q+he(M(B,0));if(b=d.match(/^#,##0\.([#0]*0)$/))return g<0?"-"+z(p,d,-g):he(""+(Math.floor(g)+Pt(g,b[1].length)))+"."+o(_e(g,b[1].length),b[1].length);if(b=d.match(/^#,#*,#0/))return z(p,d.replace(/^#,#*,/,""),g);if(b=d.match(/^([0#]+)(\\?-([0#]+))+$/))return w=i(z(p,d.replace(/[\\-]/g,""),g)),F=0,i(i(d.replace(/\\/g,"")).replace(/[0#]/g,function(ue){return F<w.length?w.charAt(F++):ue==="0"?"0":""}));if(d.match(_))return w=z(p,"##########",g),"("+w.substr(0,3)+") "+w.substr(3,3)+"-"+w.substr(6);var R="";if(b=d.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return F=Math.min(b[4].length,7),P=Ee(B,Math.pow(10,F)-1,!1),w=""+Q,R=me("n",b[1],P[1]),R.charAt(R.length-1)==" "&&(R=R.substr(0,R.length-1)+"0"),w+=R+b[2]+"/"+b[3],R=y(P[2],F),R.length<b[4].length&&(R=V(b[4].substr(b[4].length-R.length))+R),w+=R,w;if(b=d.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return F=Math.min(Math.max(b[1].length,b[4].length),7),P=Ee(B,Math.pow(10,F)-1,!0),Q+(P[0]||(P[1]?"":"0"))+" "+(P[1]?u(P[1],F)+b[2]+"/"+b[3]+y(P[2],F):a(" ",2*F+1+b[2].length+b[3].length));if(b=d.match(/^[#0?]+$/))return w=M(g,0),d.length<=w.length?w:V(d.substr(0,d.length-w.length))+w;if(b=d.match(/^([#0?]+)\.([#0]+)$/)){w=""+g.toFixed(Math.min(b[2].length,10)).replace(/([^0])0+$/,"$1"),F=w.indexOf(".");var et=d.indexOf(".")-F,Yt=d.length-w.length-et;return V(d.substr(0,et)+w+d.substr(d.length-Yt))}if(b=d.match(/^00,000\.([#0]*0)$/))return F=_e(g,b[1].length),g<0?"-"+z(p,d,-g):he(ye(g)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(ue){return"00,"+(ue.length<3?o(0,3-ue.length):"")+ue})+"."+o(F,b[1].length);switch(d){case"###,##0.00":return z(p,"#,##0.00",g);case"###,###":case"##,###":case"#,###":var tt=he(M(B,0));return tt!=="0"?Q+tt:"";case"###,###.00":return z(p,"###,##0.00",g).replace(/^0\./,".");case"#,###.00":return z(p,"#,##0.00",g).replace(/^0\./,".")}throw new Error("unsupported format |"+d+"|")}function Xe(p,d,g){for(var $=d.length-1;d.charCodeAt($-1)===44;)--$;return me(p,d.substr(0,$),g/Math.pow(10,3*(d.length-$)))}function vt(p,d,g){var $=d.replace(c,""),w=d.length-$.length;return me(p,$,g*Math.pow(10,2*w))+a("%",w)}function Me(p,d){var g,$=p.indexOf("E")-p.indexOf(".")-1;if(p.match(/^#+0.0E\+0$/)){if(d==0)return"0.0E+0";if(d<0)return"-"+Me(p,-d);var w=p.indexOf(".");w===-1&&(w=p.indexOf("E"));var b=Math.floor(Math.log(d)*Math.LOG10E)%w;if(b<0&&(b+=w),g=(d/Math.pow(10,b)).toPrecision($+1+(w+b)%w),!g.match(/[Ee]/)){var F=Math.floor(Math.log(d)*Math.LOG10E);g.indexOf(".")===-1?g=g.charAt(0)+"."+g.substr(1)+"E+"+(F-g.length+b):g+="E+"+(F-b),g=g.replace(/\+-/,"-")}g=g.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(P,B,Q,R){return B+Q+R.substr(0,(w+b)%w)+"."+R.substr(b)+"E"})}else g=d.toExponential($);return p.match(/E\+00$/)&&g.match(/e[+-]\d$/)&&(g=g.substr(0,g.length-1)+"0"+g.charAt(g.length-1)),p.match(/E\-/)&&g.match(/e\+/)&&(g=g.replace(/e\+/,"e")),g.replace("e","E")}function I(p,d,g){if(p.charCodeAt(0)===40&&!d.match(S)){var $=d.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return g>=0?I("n",$,g):"("+I("n",$,-g)+")"}if(d.charCodeAt(d.length-1)===44)return Xe(p,d,g);if(d.indexOf("%")!==-1)return vt(p,d,g);if(d.indexOf("E")!==-1)return Me(d,g);if(d.charCodeAt(0)===36)return"$"+I(p,d.substr(d.charAt(1)==" "?2:1),g);var w,b,F,P,B=Math.abs(g),Q=g<0?"-":"";if(d.match(/^00+$/))return Q+o(B,d.length);if(d.match(/^[#?]+$/))return w=""+g,g===0&&(w=""),w.length>d.length?w:V(d.substr(0,d.length-w.length))+w;if(b=d.match(v))return k(b,B,Q);if(d.match(/^#+0+$/))return Q+o(B,d.length-d.indexOf("0"));if(b=d.match(A))return w=(""+g).replace(/^([^\.]+)$/,"$1."+V(b[1])).replace(/\.$/,"."+V(b[1])),w=w.replace(/\.(\d*)$/,function(ue,rt){return"."+rt+a("0",V(b[1]).length-rt.length)}),d.indexOf("0.")!==-1?w:w.replace(/^0\./,".");if(d=d.replace(/^#+([0.])/,"$1"),b=d.match(/^(0*)\.(#*)$/))return Q+(""+B).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,b[1].length?"0.":".");if(b=d.match(/^#{1,3},##0(\.?)$/))return Q+he(""+B);if(b=d.match(/^#,##0\.([#0]*0)$/))return g<0?"-"+I(p,d,-g):he(""+g)+"."+a("0",b[1].length);if(b=d.match(/^#,#*,#0/))return I(p,d.replace(/^#,#*,/,""),g);if(b=d.match(/^([0#]+)(\\?-([0#]+))+$/))return w=i(I(p,d.replace(/[\\-]/g,""),g)),F=0,i(i(d.replace(/\\/g,"")).replace(/[0#]/g,function(ue){return F<w.length?w.charAt(F++):ue==="0"?"0":""}));if(d.match(_))return w=I(p,"##########",g),"("+w.substr(0,3)+") "+w.substr(3,3)+"-"+w.substr(6);var R="";if(b=d.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return F=Math.min(b[4].length,7),P=Ee(B,Math.pow(10,F)-1,!1),w=""+Q,R=me("n",b[1],P[1]),R.charAt(R.length-1)==" "&&(R=R.substr(0,R.length-1)+"0"),w+=R+b[2]+"/"+b[3],R=y(P[2],F),R.length<b[4].length&&(R=V(b[4].substr(b[4].length-R.length))+R),w+=R,w;if(b=d.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return F=Math.min(Math.max(b[1].length,b[4].length),7),P=Ee(B,Math.pow(10,F)-1,!0),Q+(P[0]||(P[1]?"":"0"))+" "+(P[1]?u(P[1],F)+b[2]+"/"+b[3]+y(P[2],F):a(" ",2*F+1+b[2].length+b[3].length));if(b=d.match(/^[#0?]+$/))return w=""+g,d.length<=w.length?w:V(d.substr(0,d.length-w.length))+w;if(b=d.match(/^([#0]+)\.([#0]+)$/)){w=""+g.toFixed(Math.min(b[2].length,10)).replace(/([^0])0+$/,"$1"),F=w.indexOf(".");var et=d.indexOf(".")-F,Yt=d.length-w.length-et;return V(d.substr(0,et)+w+d.substr(d.length-Yt))}if(b=d.match(/^00,000\.([#0]*0)$/))return g<0?"-"+I(p,d,-g):he(""+g).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(ue){return"00,"+(ue.length<3?o(0,3-ue.length):"")+ue})+"."+o(0,b[1].length);switch(d){case"###,###":case"##,###":case"#,###":var tt=he(""+B);return tt!=="0"?Q+tt:"";default:if(d.match(/\.[0#?]*$/))return I(p,d.slice(0,d.lastIndexOf(".")),g)+V(d.slice(d.lastIndexOf(".")))}throw new Error("unsupported format |"+d+"|")}return function(d,g,$){return($|0)===$?I(d,g,$):z(d,g,$)}}();function pt(l){for(var c=[],f=!1,x=0,h=0;x<l.length;++x)switch(l.charCodeAt(x)){case 34:f=!f;break;case 95:case 42:case 92:++x;break;case 59:c[c.length]=l.substr(h,x-h),h=x+1}if(c[c.length]=l.substr(h),f===!0)throw new Error("Format |"+l+"| unterminated string ");return c}s._split=pt;var kt=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function St(l){for(var c=0,f="",x="";c<l.length;)switch(f=l.charAt(c)){case"G":U(l,c)&&(c+=6),c++;break;case'"':for(;l.charCodeAt(++c)!==34&&c<l.length;);++c;break;case"\\":c+=2;break;case"_":c+=2;break;case"@":++c;break;case"B":case"b":if(l.charAt(c+1)==="1"||l.charAt(c+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(l.substr(c,3).toUpperCase()==="A/P"||l.substr(c,5).toUpperCase()==="AM/PM"||l.substr(c,5).toUpperCase()==="上午/下午")return!0;++c;break;case"[":for(x=f;l.charAt(c++)!=="]"&&c<l.length;)x+=l.charAt(c);if(x.match(kt))return!0;break;case".":case"0":case"#":for(;c<l.length&&("0#?.,E+-%".indexOf(f=l.charAt(++c))>-1||f=="\\"&&l.charAt(c+1)=="-"&&"0#".indexOf(l.charAt(c+2))>-1););break;case"?":for(;l.charAt(++c)===f;);break;case"*":++c,(l.charAt(c)==" "||l.charAt(c)=="*")&&++c;break;case"(":case")":++c;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;c<l.length&&"0123456789".indexOf(l.charAt(++c))>-1;);break;case" ":++c;break;default:++c;break}return!1}s.is_date=St;function Tt(l,c,f,x){for(var h=[],v="",m=0,k="",A="t",S,_,V,ge="H";m<l.length;)switch(k=l.charAt(m)){case"G":if(!U(l,m))throw new Error("unrecognized character "+k+" in "+l);h[h.length]={t:"G",v:"General"},m+=7;break;case'"':for(v="";(V=l.charCodeAt(++m))!==34&&m<l.length;)v+=String.fromCharCode(V);h[h.length]={t:"t",v},++m;break;case"\\":var _e=l.charAt(++m),Pt=_e==="("||_e===")"?_e:"t";h[h.length]={t:Pt,v:_e},++m;break;case"_":h[h.length]={t:"t",v:" "},m+=2;break;case"@":h[h.length]={t:"T",v:c},++m;break;case"B":case"b":if(l.charAt(m+1)==="1"||l.charAt(m+1)==="2"){if(S==null&&(S=Oe(c,f,l.charAt(m+1)==="2"),S==null))return"";h[h.length]={t:"X",v:l.substr(m,2)},A=k,m+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":k=k.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(c<0||S==null&&(S=Oe(c,f),S==null))return"";for(v=k;++m<l.length&&l.charAt(m).toLowerCase()===k;)v+=k;k==="m"&&A.toLowerCase()==="h"&&(k="M"),k==="h"&&(k=ge),h[h.length]={t:k,v},A=k;break;case"A":case"a":case"上":var ye={t:k,v:k};if(S==null&&(S=Oe(c,f)),l.substr(m,3).toUpperCase()==="A/P"?(S!=null&&(ye.v=S.H>=12?"P":"A"),ye.t="T",ge="h",m+=3):l.substr(m,5).toUpperCase()==="AM/PM"?(S!=null&&(ye.v=S.H>=12?"PM":"AM"),ye.t="T",m+=5,ge="h"):l.substr(m,5).toUpperCase()==="上午/下午"?(S!=null&&(ye.v=S.H>=12?"下午":"上午"),ye.t="T",m+=5,ge="h"):(ye.t="t",++m),S==null&&ye.t==="T")return"";h[h.length]=ye,A=k;break;case"[":for(v=k;l.charAt(m++)!=="]"&&m<l.length;)v+=l.charAt(m);if(v.slice(-1)!=="]")throw'unterminated "[" block: |'+v+"|";if(v.match(kt)){if(S==null&&(S=Oe(c,f),S==null))return"";h[h.length]={t:"Z",v:v.toLowerCase()},A=v.charAt(1)}else v.indexOf("$")>-1&&(v=(v.match(/\$([^-\[\]]*)/)||[])[1]||"$",St(l)||(h[h.length]={t:"t",v}));break;case".":if(S!=null){for(v=k;++m<l.length&&(k=l.charAt(m))==="0";)v+=k;h[h.length]={t:"s",v};break}case"0":case"#":for(v=k;++m<l.length&&"0#?.,E+-%".indexOf(k=l.charAt(m))>-1;)v+=k;h[h.length]={t:"n",v};break;case"?":for(v=k;l.charAt(++m)===k;)v+=k;h[h.length]={t:k,v},A=k;break;case"*":++m,(l.charAt(m)==" "||l.charAt(m)=="*")&&++m;break;case"(":case")":h[h.length]={t:x===1?"t":k,v:k},++m;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(v=k;m<l.length&&"0123456789".indexOf(l.charAt(++m))>-1;)v+=l.charAt(m);h[h.length]={t:"D",v};break;case" ":h[h.length]={t:k,v:k},++m;break;case"$":h[h.length]={t:"t",v:"$"},++m;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(k)===-1)throw new Error("unrecognized character "+k+" in "+l);h[h.length]={t:"t",v:k},++m;break}var z=0,Xe=0,vt;for(m=h.length-1,A="t";m>=0;--m)switch(h[m].t){case"h":case"H":h[m].t=ge,A="h",z<1&&(z=1);break;case"s":(vt=h[m].v.match(/\.0+$/))&&(Xe=Math.max(Xe,vt[0].length-1)),z<3&&(z=3);case"d":case"y":case"M":case"e":A=h[m].t;break;case"m":A==="s"&&(h[m].t="M",z<2&&(z=2));break;case"X":break;case"Z":z<1&&h[m].v.match(/[Hh]/)&&(z=1),z<2&&h[m].v.match(/[Mm]/)&&(z=2),z<3&&h[m].v.match(/[Ss]/)&&(z=3)}switch(z){case 0:break;case 1:S.u>=.5&&(S.u=0,++S.S),S.S>=60&&(S.S=0,++S.M),S.M>=60&&(S.M=0,++S.H);break;case 2:S.u>=.5&&(S.u=0,++S.S),S.S>=60&&(S.S=0,++S.M);break}var Me="",I;for(m=0;m<h.length;++m)switch(h[m].t){case"t":case"T":case" ":case"D":break;case"X":h[m].v="",h[m].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":h[m].v=bt(h[m].t.charCodeAt(0),h[m].v,S,Xe),h[m].t="t";break;case"n":case"?":for(I=m+1;h[I]!=null&&((k=h[I].t)==="?"||k==="D"||(k===" "||k==="t")&&h[I+1]!=null&&(h[I+1].t==="?"||h[I+1].t==="t"&&h[I+1].v==="/")||h[m].t==="("&&(k===" "||k==="n"||k===")")||k==="t"&&(h[I].v==="/"||h[I].v===" "&&h[I+1]!=null&&h[I+1].t=="?"));)h[m].v+=h[I].v,h[I]={v:"",t:";"},++I;Me+=h[m].v,m=I-1;break;case"G":h[m].t="t",h[m].v=Ae(c,f);break}var p="",d,g;if(Me.length>0){Me.charCodeAt(0)==40?(d=c<0&&Me.charCodeAt(0)===45?-c:c,g=me("n",Me,d)):(d=c<0&&x>1?-c:c,g=me("n",Me,d),d<0&&h[0]&&h[0].t=="t"&&(g=g.substr(1),h[0].v="-"+h[0].v)),I=g.length-1;var $=h.length;for(m=0;m<h.length;++m)if(h[m]!=null&&h[m].t!="t"&&h[m].v.indexOf(".")>-1){$=m;break}var w=h.length;if($===h.length&&g.indexOf("E")===-1){for(m=h.length-1;m>=0;--m)h[m]==null||"n?".indexOf(h[m].t)===-1||(I>=h[m].v.length-1?(I-=h[m].v.length,h[m].v=g.substr(I+1,h[m].v.length)):I<0?h[m].v="":(h[m].v=g.substr(0,I+1),I=-1),h[m].t="t",w=m);I>=0&&w<h.length&&(h[w].v=g.substr(0,I+1)+h[w].v)}else if($!==h.length&&g.indexOf("E")===-1){for(I=g.indexOf(".")-1,m=$;m>=0;--m)if(!(h[m]==null||"n?".indexOf(h[m].t)===-1)){for(_=h[m].v.indexOf(".")>-1&&m===$?h[m].v.indexOf(".")-1:h[m].v.length-1,p=h[m].v.substr(_+1);_>=0;--_)I>=0&&(h[m].v.charAt(_)==="0"||h[m].v.charAt(_)==="#")&&(p=g.charAt(I--)+p);h[m].v=p,h[m].t="t",w=m}for(I>=0&&w<h.length&&(h[w].v=g.substr(0,I+1)+h[w].v),I=g.indexOf(".")+1,m=$;m<h.length;++m)if(!(h[m]==null||"n?(".indexOf(h[m].t)===-1&&m!==$)){for(_=h[m].v.indexOf(".")>-1&&m===$?h[m].v.indexOf(".")+1:0,p=h[m].v.substr(0,_);_<h[m].v.length;++_)I<g.length&&(p+=g.charAt(I++));h[m].v=p,h[m].t="t",w=m}}}for(m=0;m<h.length;++m)h[m]!=null&&"n?".indexOf(h[m].t)>-1&&(d=x>1&&c<0&&m>0&&h[m-1].v==="-"?-c:c,h[m].v=me(h[m].t,h[m].v,d),h[m].t="t");var b="";for(m=0;m!==h.length;++m)h[m]!=null&&(b+=h[m].v);return b}s._eval=Tt;var Ot=/\[[=<>]/,Mt=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function xt(l,c){if(c==null)return!1;var f=parseFloat(c[2]);switch(c[1]){case"=":if(l==f)return!0;break;case">":if(l>f)return!0;break;case"<":if(l<f)return!0;break;case"<>":if(l!=f)return!0;break;case">=":if(l>=f)return!0;break;case"<=":if(l<=f)return!0;break}return!1}function ki(l,c){var f=pt(l),x=f.length,h=f[x-1].indexOf("@");if(x<4&&h>-1&&--x,f.length>4)throw new Error("cannot find right format for |"+f.join("|")+"|");if(typeof c!="number")return[4,f.length===4||h>-1?f[f.length-1]:"@"];switch(f.length){case 1:f=h>-1?["General","General","General",f[0]]:[f[0],f[0],f[0],"@"];break;case 2:f=h>-1?[f[0],f[0],f[0],f[1]]:[f[0],f[1],f[0],"@"];break;case 3:f=h>-1?[f[0],f[1],f[0],f[2]]:[f[0],f[1],f[2],"@"];break}var v=c>0?f[0]:c<0?f[1]:f[2];if(f[0].indexOf("[")===-1&&f[1].indexOf("[")===-1)return[x,v];if(f[0].match(Ot)!=null||f[1].match(Ot)!=null){var m=f[0].match(Mt),k=f[1].match(Mt);return xt(c,m)?[x,f[0]]:xt(c,k)?[x,f[1]]:[x,f[m!=null&&k!=null?2:1]]}return[x,v]}function tn(l,c,f){f==null&&(f={});var x="";switch(typeof l){case"string":l=="m/d/yy"&&f.dateNF?x=f.dateNF:x=l;break;case"number":l==14&&f.dateNF?x=f.dateNF:x=(f.table!=null?f.table:J)[l],x==null&&(x=f.table&&f.table[X[l]]||J[X[l]]),x==null&&(x=ee[l]||"General");break}if(U(x,0))return Ae(c,f);c instanceof Date&&(c=Ue(c,f.date1904));var h=ki(x,c);if(U(h[1]))return Ae(c,f);if(c===!0)c="TRUE";else if(c===!1)c="FALSE";else if(c===""||c==null)return"";return Tt(h[1],c,f,h[0])}function rn(l,c){if(typeof c!="number"){c=+c||-1;for(var f=0;f<392;++f){if(J[f]==null){c<0&&(c=f);continue}if(J[f]==l){c=f;break}}c<0&&(c=391)}return J[c]=l,c}s.load=rn,s._table=J,s.get_table=function(){return J},s.load_table=function(c){for(var f=0;f!=392;++f)c[f]!==void 0&&rn(c[f],f)},s.init_table=ne,s.format=tn};r(e),typeof DO_NOT_EXPORT_SSF>"u"&&(t.exports=e)}(Gt)),Gt.exports}var Re=Si();class We extends Error{}class Ti extends We{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Oi extends We{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Mi extends We{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class He extends We{}class hs extends We{constructor(e){super(`Invalid unit ${e}`)}}class se extends We{}class Ne extends We{constructor(){super("Zone is an abstract class")}}const O="numeric",Se="short",ce="long",Lt={year:O,month:O,day:O},ms={year:O,month:Se,day:O},xi={year:O,month:Se,day:O,weekday:Se},gs={year:O,month:ce,day:O},ys={year:O,month:ce,day:O,weekday:ce},ws={hour:O,minute:O},bs={hour:O,minute:O,second:O},ps={hour:O,minute:O,second:O,timeZoneName:Se},ks={hour:O,minute:O,second:O,timeZoneName:ce},Ss={hour:O,minute:O,hourCycle:"h23"},Ts={hour:O,minute:O,second:O,hourCycle:"h23"},Os={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:Se},Ms={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:ce},xs={year:O,month:O,day:O,hour:O,minute:O},vs={year:O,month:O,day:O,hour:O,minute:O,second:O},Es={year:O,month:Se,day:O,hour:O,minute:O},Ns={year:O,month:Se,day:O,hour:O,minute:O,second:O},vi={year:O,month:Se,day:O,weekday:Se,hour:O,minute:O},$s={year:O,month:ce,day:O,hour:O,minute:O,timeZoneName:Se},Ds={year:O,month:ce,day:O,hour:O,minute:O,second:O,timeZoneName:Se},Cs={year:O,month:ce,day:O,weekday:ce,hour:O,minute:O,timeZoneName:ce},Is={year:O,month:ce,day:O,weekday:ce,hour:O,minute:O,second:O,timeZoneName:ce};class lt{get type(){throw new Ne}get name(){throw new Ne}get ianaName(){return this.name}get isUniversal(){throw new Ne}offsetName(e,r){throw new Ne}formatOffset(e,r){throw new Ne}offset(e){throw new Ne}equals(e){throw new Ne}get isValid(){throw new Ne}}let jt=null;class Ut extends lt{static get instance(){return jt===null&&(jt=new Ut),jt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return zs(e,r,n)}formatOffset(e,r){return ut(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ar=new Map;function Ei(t){let e=Ar.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ar.set(t,e)),e}const Ni={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function $i(t,e){const r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,i,a,o,u,y,T]=n;return[a,s,i,o,u,y,T]}function Di(t,e){const r=t.formatToParts(e),n=[];for(let s=0;s<r.length;s++){const{type:i,value:a}=r[s],o=Ni[i];i==="era"?n[o]=a:C(o)||(n[o]=parseInt(a,10))}return n}const Jt=new Map;class ve extends lt{static create(e){let r=Jt.get(e);return r===void 0&&Jt.set(e,r=new ve(e)),r}static resetCache(){Jt.clear(),Ar.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ve.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return zs(e,r,n,this.name)}formatOffset(e,r){return ut(this.offset(e),r)}offset(e){if(!this.valid)return NaN;const r=new Date(e);if(isNaN(r))return NaN;const n=Ei(this.name);let[s,i,a,o,u,y,T]=n.formatToParts?Di(n,r):$i(n,r);o==="BC"&&(s=-Math.abs(s)+1);const L=Zt({year:s,month:i,day:a,hour:u===24?0:u,minute:y,second:T,millisecond:0});let M=+r;const U=M%1e3;return M-=U>=0?U:1e3+U,(L-M)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sn={};function Ci(t,e={}){const r=JSON.stringify([t,e]);let n=sn[r];return n||(n=new Intl.ListFormat(t,e),sn[r]=n),n}const _r=new Map;function Fr(t,e={}){const r=JSON.stringify([t,e]);let n=_r.get(r);return n===void 0&&(n=new Intl.DateTimeFormat(t,e),_r.set(r,n)),n}const Lr=new Map;function Ii(t,e={}){const r=JSON.stringify([t,e]);let n=Lr.get(r);return n===void 0&&(n=new Intl.NumberFormat(t,e),Lr.set(r,n)),n}const Vr=new Map;function Ai(t,e={}){const{base:r,...n}=e,s=JSON.stringify([t,n]);let i=Vr.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(t,e),Vr.set(s,i)),i}let it=null;function _i(){return it||(it=new Intl.DateTimeFormat().resolvedOptions().locale,it)}const Rr=new Map;function As(t){let e=Rr.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Rr.set(t,e)),e}const Wr=new Map;function Fi(t){let e=Wr.get(t);if(!e){const r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={..._s,...e}),Wr.set(t,e)}return e}function Li(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const r=t.indexOf("-u-");if(r===-1)return[t];{let n,s;try{n=Fr(t).resolvedOptions(),s=t}catch{const u=t.substring(0,r);n=Fr(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=n;return[s,i,a]}}function Vi(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function Ri(t){const e=[];for(let r=1;r<=12;r++){const n=D.utc(2009,r,1);e.push(t(n))}return e}function Wi(t){const e=[];for(let r=1;r<=7;r++){const n=D.utc(2016,11,13+r);e.push(t(n))}return e}function Nt(t,e,r,n){const s=t.listingMode();return s==="error"?null:s==="en"?r(e):n(e)}function Ui(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||As(t.locale).numberingSystem==="latn"}class qi{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i,...a}=n;if(!r||Object.keys(a).length>0){const o={useGrouping:!1,...n};n.padTo>0&&(o.minimumIntegerDigits=n.padTo),this.inf=Ii(e,o)}}format(e){if(this.inf){const r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{const r=this.floor?Math.floor(e):jr(e,3);return te(r,this.padTo)}}}class Zi{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&ve.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=Fr(r,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class zi{constructor(e,r,n){this.opts={style:"long",...n},!r&&qs()&&(this.rtf=Ai(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):fa(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}}const _s={firstDay:1,minimalDays:4,weekend:[6,7]};class Z{static fromOpts(e){return Z.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,s,i=!1){const a=e||j.defaultLocale,o=a||(i?"en-US":_i()),u=r||j.defaultNumberingSystem,y=n||j.defaultOutputCalendar,T=qr(s)||j.defaultWeekSettings;return new Z(o,u,y,T,a)}static resetCache(){it=null,_r.clear(),Lr.clear(),Vr.clear(),Rr.clear(),Wr.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:s}={}){return Z.create(e,r,n,s)}constructor(e,r,n,s,i){const[a,o,u]=Li(e);this.locale=a,this.numberingSystem=r||o||null,this.outputCalendar=n||u||null,this.weekSettings=s,this.intl=Vi(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ui(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Z.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,qr(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return Nt(this,e,Ys,()=>{const n=this.intl==="ja"||this.intl.startsWith("ja-");r&=!n;const s=r?{month:e,day:"numeric"}:{month:e},i=r?"format":"standalone";if(!this.monthsCache[i][e]){const a=n?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[i][e]=Ri(a)}return this.monthsCache[i][e]})}weekdays(e,r=!1){return Nt(this,e,Js,()=>{const n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=r?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Wi(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Nt(this,void 0,()=>Bs,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[D.utc(2016,11,13,9),D.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Nt(this,e,Qs,()=>{const r={era:e};return this.eraCache[e]||(this.eraCache[e]=[D.utc(-40,1,1),D.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){const s=this.dtFormatter(e,r),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new qi(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new Zi(e,this.intl,r)}relFormatter(e={}){return new zi(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Ci(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||As(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Zs()?Fi(this.locale):_s}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Bt=null;class ae extends lt{static get utcInstance(){return Bt===null&&(Bt=new ae(0)),Bt}static instance(e){return e===0?ae.utcInstance:new ae(e)}static parseSpecifier(e){if(e){const r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new ae(zt(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ut(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ut(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return ut(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Hi extends lt{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function De(t,e){if(C(t)||t===null)return e;if(t instanceof lt)return t;if(Bi(t)){const r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Ut.instance:r==="utc"||r==="gmt"?ae.utcInstance:ae.parseSpecifier(r)||ve.create(t)}else return Ce(t)?ae.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Hi(t)}const Hr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},an={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Pi=Hr.hanidec.replace(/[\[|\]]/g,"").split("");function Yi(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);if(t[r].search(Hr.hanidec)!==-1)e+=Pi.indexOf(t[r]);else for(const s in an){const[i,a]=an[s];n>=i&&n<=a&&(e+=n-i)}}return parseInt(e,10)}else return e}const Ur=new Map;function Gi(){Ur.clear()}function we({numberingSystem:t},e=""){const r=t||"latn";let n=Ur.get(r);n===void 0&&(n=new Map,Ur.set(r,n));let s=n.get(e);return s===void 0&&(s=new RegExp(`${Hr[r]}${e}`),n.set(e,s)),s}let on=()=>Date.now(),un="system",cn=null,ln=null,fn=null,dn=60,hn,mn=null;class j{static get now(){return on}static set now(e){on=e}static set defaultZone(e){un=e}static get defaultZone(){return De(un,Ut.instance)}static get defaultLocale(){return cn}static set defaultLocale(e){cn=e}static get defaultNumberingSystem(){return ln}static set defaultNumberingSystem(e){ln=e}static get defaultOutputCalendar(){return fn}static set defaultOutputCalendar(e){fn=e}static get defaultWeekSettings(){return mn}static set defaultWeekSettings(e){mn=qr(e)}static get twoDigitCutoffYear(){return dn}static set twoDigitCutoffYear(e){dn=e%100}static get throwOnInvalid(){return hn}static set throwOnInvalid(e){hn=e}static resetCaches(){Z.resetCache(),ve.resetCache(),D.resetCache(),Gi()}}class ke{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Fs=[0,31,59,90,120,151,181,212,243,273,304,334],Ls=[0,31,60,91,121,152,182,213,244,274,305,335];function fe(t,e){return new ke("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Pr(t,e,r){const n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function Vs(t,e,r){return r+(ft(t)?Ls:Fs)[e-1]}function Rs(t,e){const r=ft(t)?Ls:Fs,n=r.findIndex(i=>i<e),s=e-r[n];return{month:n+1,day:s}}function Yr(t,e){return(t-e+7)%7+1}function Vt(t,e=4,r=1){const{year:n,month:s,day:i}=t,a=Vs(n,s,i),o=Yr(Pr(n,s,i),r);let u=Math.floor((a-o+14-e)/7),y;return u<1?(y=n-1,u=ct(y,e,r)):u>ct(n,e,r)?(y=n+1,u=1):y=n,{weekYear:y,weekNumber:u,weekday:o,...Ht(t)}}function gn(t,e=4,r=1){const{weekYear:n,weekNumber:s,weekday:i}=t,a=Yr(Pr(n,1,e),r),o=Pe(n);let u=s*7+i-a-7+e,y;u<1?(y=n-1,u+=Pe(y)):u>o?(y=n+1,u-=Pe(n)):y=n;const{month:T,day:E}=Rs(y,u);return{year:y,month:T,day:E,...Ht(t)}}function Qt(t){const{year:e,month:r,day:n}=t,s=Vs(e,r,n);return{year:e,ordinal:s,...Ht(t)}}function yn(t){const{year:e,ordinal:r}=t,{month:n,day:s}=Rs(e,r);return{year:e,month:n,day:s,...Ht(t)}}function wn(t,e){if(!C(t.localWeekday)||!C(t.localWeekNumber)||!C(t.localWeekYear)){if(!C(t.weekday)||!C(t.weekNumber)||!C(t.weekYear))throw new He("Cannot mix locale-based week fields with ISO-based week fields");return C(t.localWeekday)||(t.weekday=t.localWeekday),C(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),C(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ji(t,e=4,r=1){const n=qt(t.weekYear),s=de(t.weekNumber,1,ct(t.weekYear,e,r)),i=de(t.weekday,1,7);return n?s?i?!1:fe("weekday",t.weekday):fe("week",t.weekNumber):fe("weekYear",t.weekYear)}function Ji(t){const e=qt(t.year),r=de(t.ordinal,1,Pe(t.year));return e?r?!1:fe("ordinal",t.ordinal):fe("year",t.year)}function Ws(t){const e=qt(t.year),r=de(t.month,1,12),n=de(t.day,1,Rt(t.year,t.month));return e?r?n?!1:fe("day",t.day):fe("month",t.month):fe("year",t.year)}function Us(t){const{hour:e,minute:r,second:n,millisecond:s}=t,i=de(e,0,23)||e===24&&r===0&&n===0&&s===0,a=de(r,0,59),o=de(n,0,59),u=de(s,0,999);return i?a?o?u?!1:fe("millisecond",s):fe("second",n):fe("minute",r):fe("hour",e)}function C(t){return typeof t>"u"}function Ce(t){return typeof t=="number"}function qt(t){return typeof t=="number"&&t%1===0}function Bi(t){return typeof t=="string"}function Qi(t){return Object.prototype.toString.call(t)==="[object Date]"}function qs(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Zs(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ki(t){return Array.isArray(t)?t:[t]}function bn(t,e,r){if(t.length!==0)return t.reduce((n,s)=>{const i=[e(s),s];return n&&r(n[0],i[0])===n[0]?n:i},null)[1]}function Xi(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qr(t){if(t==null)return null;if(typeof t!="object")throw new se("Week settings must be an object");if(!de(t.firstDay,1,7)||!de(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!de(e,1,7)))throw new se("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function de(t,e,r){return qt(t)&&t>=e&&t<=r}function ea(t,e){return t-e*Math.floor(t/e)}function te(t,e=2){const r=t<0;let n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function $e(t){if(!(C(t)||t===null||t===""))return parseInt(t,10)}function Fe(t){if(!(C(t)||t===null||t===""))return parseFloat(t)}function Gr(t){if(!(C(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function jr(t,e,r="round"){const n=10**e;switch(r){case"expand":return t>0?Math.ceil(t*n)/n:Math.floor(t*n)/n;case"trunc":return Math.trunc(t*n)/n;case"round":return Math.round(t*n)/n;case"floor":return Math.floor(t*n)/n;case"ceil":return Math.ceil(t*n)/n;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function ft(t){return t%4===0&&(t%100!==0||t%400===0)}function Pe(t){return ft(t)?366:365}function Rt(t,e){const r=ea(e-1,12)+1,n=t+(e-r)/12;return r===2?ft(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Zt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function pn(t,e,r){return-Yr(Pr(t,1,e),r)+e-1}function ct(t,e=4,r=1){const n=pn(t,e,r),s=pn(t+1,e,r);return(Pe(t)-n+s)/7}function Zr(t){return t>99?t:t>j.twoDigitCutoffYear?1900+t:2e3+t}function zs(t,e,r,n=null){const s=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(r,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function zt(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);const n=parseInt(e,10)||0,s=r<0||Object.is(r,-0)?-n:n;return r*60+s}function Hs(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new se(`Invalid unit value ${t}`);return e}function Wt(t,e){const r={};for(const n in t)if(je(t,n)){const s=t[n];if(s==null)continue;r[e(n)]=Hs(s)}return r}function ut(t,e){const r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${te(r,2)}:${te(n,2)}`;case"narrow":return`${s}${r}${n>0?`:${n}`:""}`;case"techie":return`${s}${te(r,2)}${te(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ht(t){return Xi(t,["hour","minute","second","millisecond"])}const ta=["January","February","March","April","May","June","July","August","September","October","November","December"],Ps=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ra=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ys(t){switch(t){case"narrow":return[...ra];case"short":return[...Ps];case"long":return[...ta];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Gs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],js=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],na=["M","T","W","T","F","S","S"];function Js(t){switch(t){case"narrow":return[...na];case"short":return[...js];case"long":return[...Gs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Bs=["AM","PM"],sa=["Before Christ","Anno Domini"],ia=["BC","AD"],aa=["B","A"];function Qs(t){switch(t){case"narrow":return[...aa];case"short":return[...ia];case"long":return[...sa];default:return null}}function oa(t){return Bs[t.hour<12?0:1]}function ua(t,e){return Js(e)[t.weekday-1]}function ca(t,e){return Ys(e)[t.month-1]}function la(t,e){return Qs(e)[t.year<0?0:1]}function fa(t,e,r="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&i){const E=t==="days";switch(e){case 1:return E?"tomorrow":`next ${s[t][0]}`;case-1:return E?"yesterday":`last ${s[t][0]}`;case 0:return E?"today":`this ${s[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,y=s[t],T=n?u?y[1]:y[2]||y[1]:u?s[t][0]:t;return a?`${o} ${T} ago`:`in ${o} ${T}`}function kn(t,e){let r="";for(const n of t)n.literal?r+=n.val:r+=e(n.val);return r}const da={D:Lt,DD:ms,DDD:gs,DDDD:ys,t:ws,tt:bs,ttt:ps,tttt:ks,T:Ss,TT:Ts,TTT:Os,TTTT:Ms,f:xs,ff:Es,fff:$s,ffff:Cs,F:vs,FF:Ns,FFF:Ds,FFFF:Is};class ie{static create(e,r={}){return new ie(e,r)}static parseFormat(e){let r=null,n="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((n.length>0||s)&&i.push({literal:s||/^\s+$/.test(n),val:n===""?"'":n}),r=null,n="",s=!s):s||o===r?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,r=o)}return n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return da[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,n=void 0){if(this.opts.forceSimple)return te(e,r);const s={...this.opts};return r>0&&(s.padTo=r),n&&(s.signDisplay=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,r){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(M,U)=>this.loc.extract(e,M,U),a=M=>e.isOffsetFixed&&e.offset===0&&M.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,M.format):"",o=()=>n?oa(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(M,U)=>n?ca(e,M):i(U?{month:M}:{month:M,day:"numeric"},"month"),y=(M,U)=>n?ua(e,M):i(U?{weekday:M}:{weekday:M,month:"long",day:"numeric"},"weekday"),T=M=>{const U=ie.macroTokenToFormatOpts(M);return U?this.formatWithSystemDefault(e,U):M},E=M=>n?la(e,M):i({era:M},"era"),L=M=>{switch(M){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return y("short",!0);case"cccc":return y("long",!0);case"ccccc":return y("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return y("short",!1);case"EEEE":return y("long",!1);case"EEEEE":return y("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return E("short");case"GG":return E("long");case"GGGGG":return E("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return T(M)}};return kn(ie.parseFormat(r),L)}formatDurationFromString(e,r){const n=this.opts.signMode==="negativeLargestOnly"?-1:1,s=T=>{switch(T[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=(T,E)=>L=>{const M=s(L);if(M){const U=E.isNegativeDuration&&M!==E.largestUnit?n:1;let Y;return this.opts.signMode==="negativeLargestOnly"&&M!==E.largestUnit?Y="never":this.opts.signMode==="all"?Y="always":Y="auto",this.num(T.get(M)*U,L.length,Y)}else return L},a=ie.parseFormat(r),o=a.reduce((T,{literal:E,val:L})=>E?T:T.concat(L),[]),u=e.shiftTo(...o.map(s).filter(T=>T)),y={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return kn(a,i(u,y))}}const Ks=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Je(...t){const e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function Be(...t){return e=>t.reduce(([r,n,s],i)=>{const[a,o,u]=i(e,s);return[{...r,...a},o||n,u]},[{},null,1]).slice(0,2)}function Qe(t,...e){if(t==null)return[null,null];for(const[r,n]of e){const s=r.exec(t);if(s)return n(s)}return[null,null]}function Xs(...t){return(e,r)=>{const n={};let s;for(s=0;s<t.length;s++)n[t[s]]=$e(e[r+s]);return[n,null,r+s]}}const ei=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ha=`(?:${ei.source}?(?:\\[(${Ks.source})\\])?)?`,Jr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ti=RegExp(`${Jr.source}${ha}`),Br=RegExp(`(?:[Tt]${ti.source})?`),ma=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ga=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ya=/(\d{4})-?(\d{3})/,wa=Xs("weekYear","weekNumber","weekDay"),ba=Xs("year","ordinal"),pa=/(\d{4})-(\d\d)-(\d\d)/,ri=RegExp(`${Jr.source} ?(?:${ei.source}|(${Ks.source}))?`),ka=RegExp(`(?: ${ri.source})?`);function Ye(t,e,r){const n=t[e];return C(n)?r:$e(n)}function Sa(t,e){return[{year:Ye(t,e),month:Ye(t,e+1,1),day:Ye(t,e+2,1)},null,e+3]}function Ke(t,e){return[{hours:Ye(t,e,0),minutes:Ye(t,e+1,0),seconds:Ye(t,e+2,0),milliseconds:Gr(t[e+3])},null,e+4]}function dt(t,e){const r=!t[e]&&!t[e+1],n=zt(t[e+1],t[e+2]),s=r?null:ae.instance(n);return[{},s,e+3]}function ht(t,e){const r=t[e]?ve.create(t[e]):null;return[{},r,e+1]}const Ta=RegExp(`^T?${Jr.source}$`),Oa=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Ma(t){const[e,r,n,s,i,a,o,u,y]=t,T=e[0]==="-",E=u&&u[0]==="-",L=(M,U=!1)=>M!==void 0&&(U||M&&T)?-M:M;return[{years:L(Fe(r)),months:L(Fe(n)),weeks:L(Fe(s)),days:L(Fe(i)),hours:L(Fe(a)),minutes:L(Fe(o)),seconds:L(Fe(u),u==="-0"),milliseconds:L(Gr(y),E)}]}const xa={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Qr(t,e,r,n,s,i,a){const o={year:e.length===2?Zr($e(e)):$e(e),month:Ps.indexOf(r)+1,day:$e(n),hour:$e(s),minute:$e(i)};return a&&(o.second=$e(a)),t&&(o.weekday=t.length>3?Gs.indexOf(t)+1:js.indexOf(t)+1),o}const va=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ea(t){const[,e,r,n,s,i,a,o,u,y,T,E]=t,L=Qr(e,s,n,r,i,a,o);let M;return u?M=xa[u]:y?M=0:M=zt(T,E),[L,new ae(M)]}function Na(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const $a=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Da=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ca=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Sn(t){const[,e,r,n,s,i,a,o]=t;return[Qr(e,s,n,r,i,a,o),ae.utcInstance]}function Ia(t){const[,e,r,n,s,i,a,o]=t;return[Qr(e,o,r,n,s,i,a),ae.utcInstance]}const Aa=Je(ma,Br),_a=Je(ga,Br),Fa=Je(ya,Br),La=Je(ti),ni=Be(Sa,Ke,dt,ht),Va=Be(wa,Ke,dt,ht),Ra=Be(ba,Ke,dt,ht),Wa=Be(Ke,dt,ht);function Ua(t){return Qe(t,[Aa,ni],[_a,Va],[Fa,Ra],[La,Wa])}function qa(t){return Qe(Na(t),[va,Ea])}function Za(t){return Qe(t,[$a,Sn],[Da,Sn],[Ca,Ia])}function za(t){return Qe(t,[Oa,Ma])}const Ha=Be(Ke);function Pa(t){return Qe(t,[Ta,Ha])}const Ya=Je(pa,ka),Ga=Je(ri),ja=Be(Ke,dt,ht);function Ja(t){return Qe(t,[Ya,ni],[Ga,ja])}const Tn="Invalid Duration",si={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ba={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...si},le=146097/400,qe=146097/4800,Qa={years:{quarters:4,months:12,weeks:le/7,days:le,hours:le*24,minutes:le*24*60,seconds:le*24*60*60,milliseconds:le*24*60*60*1e3},quarters:{months:3,weeks:le/28,days:le/4,hours:le*24/4,minutes:le*24*60/4,seconds:le*24*60*60/4,milliseconds:le*24*60*60*1e3/4},months:{weeks:qe/7,days:qe,hours:qe*24,minutes:qe*24*60,seconds:qe*24*60*60,milliseconds:qe*24*60*60*1e3},...si},Ve=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ka=Ve.slice(0).reverse();function xe(t,e,r=!1){const n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new W(n)}function ii(t,e){let r=e.milliseconds??0;for(const n of Ka.slice(1))e[n]&&(r+=e[n]*t[n].milliseconds);return r}function On(t,e){const r=ii(t,e)<0?-1:1;Ve.reduceRight((n,s)=>{if(C(e[s]))return n;if(n){const i=e[n]*r,a=t[s][n],o=Math.floor(i/a);e[s]+=o*r,e[n]-=o*a*r}return s},null),Ve.reduce((n,s)=>{if(C(e[s]))return n;if(n){const i=e[n]%1;e[n]-=i,e[s]+=i*t[n][s]}return s},null)}function Mn(t){const e={};for(const[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}class W{constructor(e){const r=e.conversionAccuracy==="longterm"||!1;let n=r?Qa:Ba;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Z.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return W.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new se(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new W({values:Wt(e,W.normalizeUnit),loc:Z.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(Ce(e))return W.fromMillis(e);if(W.isDuration(e))return e;if(typeof e=="object")return W.fromObject(e);throw new se(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){const[n]=za(e);return n?W.fromObject(n,r):W.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){const[n]=Pa(e);return n?W.fromObject(n,r):W.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new se("need to specify a reason the Duration is invalid");const n=e instanceof ke?e:new ke(e,r);if(j.throwOnInvalid)throw new Mi(n);return new W({invalid:n})}static normalizeUnit(e){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new hs(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){const n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?ie.create(this.loc,n).formatDurationFromString(this,e):Tn}toHuman(e={}){if(!this.isValid)return Tn;const r=e.showZeros!==!1,n=Ve.map(s=>{const i=this.values[s];return C(i)||i===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=jr(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},D.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ii(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const r=W.fromDurationLike(e),n={};for(const s of Ve)(je(r.values,s)||je(this.values,s))&&(n[s]=r.get(s)+this.get(s));return xe(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const r=W.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;const r={};for(const n of Object.keys(this.values))r[n]=Hs(e(this.values[n],n));return xe(this,{values:r},!0)}get(e){return this[W.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const r={...this.values,...Wt(e,W.normalizeUnit)};return xe(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:s,conversionAccuracy:n};return xe(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return On(this.matrix,e),xe(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Mn(this.normalize().shiftToAll().toObject());return xe(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>W.normalizeUnit(a));const r={},n={},s=this.toObject();let i;for(const a of Ve)if(e.indexOf(a)>=0){i=a;let o=0;for(const y in n)o+=this.matrix[y][a]*n[y],n[y]=0;Ce(s[a])&&(o+=s[a]);const u=Math.trunc(o);r[a]=u,n[a]=(o*1e3-u*1e3)/1e3}else Ce(s[a])&&(n[a]=s[a]);for(const a in n)n[a]!==0&&(r[i]+=a===i?n[a]:n[a]/this.matrix[i][a]);return On(this.matrix,r),xe(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return xe(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Mn(this.values);return xe(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of Ve)if(!r(this.values[n],e.values[n]))return!1;return!0}}const Ze="Invalid Interval";function Xa(t,e){return!t||!t.isValid?G.invalid("missing or invalid start"):!e||!e.isValid?G.invalid("missing or invalid end"):e<t?G.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class G{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new se("need to specify a reason the Interval is invalid");const n=e instanceof ke?e:new ke(e,r);if(j.throwOnInvalid)throw new Oi(n);return new G({invalid:n})}static fromDateTimes(e,r){const n=nt(e),s=nt(r),i=Xa(n,s);return i??new G({start:n,end:s})}static after(e,r){const n=W.fromDurationLike(r),s=nt(e);return G.fromDateTimes(s,s.plus(n))}static before(e,r){const n=W.fromDurationLike(r),s=nt(e);return G.fromDateTimes(s.minus(n),s)}static fromISO(e,r){const[n,s]=(e||"").split("/",2);if(n&&s){let i,a;try{i=D.fromISO(n,r),a=i.isValid}catch{a=!1}let o,u;try{o=D.fromISO(s,r),u=o.isValid}catch{u=!1}if(a&&u)return G.fromDateTimes(i,o);if(a){const y=W.fromISO(s,r);if(y.isValid)return G.after(i,y)}else if(u){const y=W.fromISO(n,r);if(y.isValid)return G.before(o,y)}}return G.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;const n=this.start.startOf(e,r);let s;return r!=null&&r.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(e,r),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?G.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];const r=e.map(nt).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),n=[];let{s}=this,i=0;for(;s<this.e;){const a=r[i]||this.e,o=+a>+this.e?this.e:a;n.push(G.fromDateTimes(s,o)),s=o,i+=1}return n}splitBy(e){const r=W.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,s=1,i;const a=[];for(;n<this.e;){const o=this.start.plus(r.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(G.fromDateTimes(n,i)),n=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:G.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;const r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return G.fromDateTimes(r,n)}static merge(e){const[r,n]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,y)=>u.time-y.time);for(const u of o)n+=u.type==="s"?1:-1,n===1?r=u.time:(r&&+r!=+u.time&&s.push(G.fromDateTimes(r,u.time)),r=null);return G.merge(s)}difference(...e){return G.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ze}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Lt,r={}){return this.isValid?ie.create(this.s.loc.clone(r),e).formatInterval(this):Ze}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ze}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ze}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ze}toFormat(e,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:Ze}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):W.invalid(this.invalidReason)}mapEndpoints(e){return G.fromDateTimes(e(this.s),e(this.e))}}class $t{static hasDST(e=j.defaultZone){const r=D.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return ve.isValidZone(e)}static normalizeZone(e){return De(e,j.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||Z.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||Z.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||Z.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||Z.create(r,n,i)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||Z.create(r,n,i)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Z.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Z.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Z.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return Z.create(r,null,"gregory").eras(e)}static features(){return{relative:qs(),localeWeek:Zs()}}}function xn(t,e){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(W.fromMillis(n).as("days"))}function eo(t,e,r){const n=[["years",(u,y)=>y.year-u.year],["quarters",(u,y)=>y.quarter-u.quarter+(y.year-u.year)*4],["months",(u,y)=>y.month-u.month+(y.year-u.year)*12],["weeks",(u,y)=>{const T=xn(u,y);return(T-T%7)/7}],["days",xn]],s={},i=t;let a,o;for(const[u,y]of n)r.indexOf(u)>=0&&(a=u,s[u]=y(t,e),o=i.plus(s),o>e?(s[u]--,t=i.plus(s),t>e&&(o=t,s[u]--,t=i.plus(s))):t=o);return[t,s,o,a]}function to(t,e,r,n){let[s,i,a,o]=eo(t,e,r);const u=e-s,y=r.filter(E=>["hours","minutes","seconds","milliseconds"].indexOf(E)>=0);y.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const T=W.fromObject(i,n);return y.length>0?W.fromMillis(u,n).shiftTo(...y).plus(T):T}const ro="missing Intl.DateTimeFormat.formatToParts support";function q(t,e=r=>r){return{regex:t,deser:([r])=>e(Yi(r))}}const no=" ",ai=`[ ${no}]`,oi=new RegExp(ai,"g");function so(t){return t.replace(/\./g,"\\.?").replace(oi,ai)}function vn(t){return t.replace(/\./g,"").replace(oi," ").toLowerCase()}function be(t,e){return t===null?null:{regex:RegExp(t.map(so).join("|")),deser:([r])=>t.findIndex(n=>vn(r)===vn(n))+e}}function En(t,e){return{regex:t,deser:([,r,n])=>zt(r,n),groups:e}}function Dt(t){return{regex:t,deser:([e])=>e}}function io(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ao(t,e){const r=we(e),n=we(e,"{2}"),s=we(e,"{3}"),i=we(e,"{4}"),a=we(e,"{6}"),o=we(e,"{1,2}"),u=we(e,"{1,3}"),y=we(e,"{1,6}"),T=we(e,"{1,9}"),E=we(e,"{2,4}"),L=we(e,"{4,6}"),M=K=>({regex:RegExp(io(K.val)),deser:([ne])=>ne,literal:!0}),Y=(K=>{if(t.literal)return M(K);switch(K.val){case"G":return be(e.eras("short"),0);case"GG":return be(e.eras("long"),0);case"y":return q(y);case"yy":return q(E,Zr);case"yyyy":return q(i);case"yyyyy":return q(L);case"yyyyyy":return q(a);case"M":return q(o);case"MM":return q(n);case"MMM":return be(e.months("short",!0),1);case"MMMM":return be(e.months("long",!0),1);case"L":return q(o);case"LL":return q(n);case"LLL":return be(e.months("short",!1),1);case"LLLL":return be(e.months("long",!1),1);case"d":return q(o);case"dd":return q(n);case"o":return q(u);case"ooo":return q(s);case"HH":return q(n);case"H":return q(o);case"hh":return q(n);case"h":return q(o);case"mm":return q(n);case"m":return q(o);case"q":return q(o);case"qq":return q(n);case"s":return q(o);case"ss":return q(n);case"S":return q(u);case"SSS":return q(s);case"u":return Dt(T);case"uu":return Dt(o);case"uuu":return q(r);case"a":return be(e.meridiems(),0);case"kkkk":return q(i);case"kk":return q(E,Zr);case"W":return q(o);case"WW":return q(n);case"E":case"c":return q(r);case"EEE":return be(e.weekdays("short",!1),1);case"EEEE":return be(e.weekdays("long",!1),1);case"ccc":return be(e.weekdays("short",!0),1);case"cccc":return be(e.weekdays("long",!0),1);case"Z":case"ZZ":return En(new RegExp(`([+-]${o.source})(?::(${n.source}))?`),2);case"ZZZ":return En(new RegExp(`([+-]${o.source})(${n.source})?`),2);case"z":return Dt(/[a-z_+-/]{1,256}?/i);case" ":return Dt(/[^\S\n\r]/);default:return M(K)}})(t)||{invalidReason:ro};return Y.token=t,Y}const oo={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function uo(t,e,r){const{type:n,value:s}=t;if(n==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[n];let a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=r.hour12?"hour12":"hour24");let o=oo[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function co(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function lo(t,e,r){const n=t.match(e);if(n){const s={};let i=1;for(const a in r)if(je(r,a)){const o=r[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(n.slice(i,i+u))),i+=u}return[n,s]}else return[n,{}]}function fo(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,n;return C(t.z)||(r=ve.create(t.z)),C(t.Z)||(r||(r=new ae(t.Z)),n=t.Z),C(t.q)||(t.M=(t.q-1)*3+1),C(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),C(t.u)||(t.S=Gr(t.u)),[Object.keys(t).reduce((i,a)=>{const o=e(a);return o&&(i[o]=t[a]),i},{}),r,n]}let Kt=null;function ho(){return Kt||(Kt=D.fromMillis(1555555555555)),Kt}function mo(t,e){if(t.literal)return t;const r=ie.macroTokenToFormatOpts(t.val),n=fi(r,e);return n==null||n.includes(void 0)?t:n}function ui(t,e){return Array.prototype.concat(...t.map(r=>mo(r,e)))}class ci{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=ui(ie.parseFormat(r),e),this.units=this.tokens.map(n=>ao(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,s]=co(this.units);this.regex=RegExp(n,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[r,n]=lo(e,this.regex,this.handlers),[s,i,a]=n?fo(n):[null,null,void 0];if(je(n,"a")&&je(n,"H"))throw new He("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function li(t,e,r){return new ci(t,r).explainFromTokens(e)}function go(t,e,r){const{result:n,zone:s,specificOffset:i,invalidReason:a}=li(t,e,r);return[n,s,i,a]}function fi(t,e){if(!t)return null;const n=ie.create(e,t).dtFormatter(ho()),s=n.formatToParts(),i=n.resolvedOptions();return s.map(a=>uo(a,t,i))}const Xt="Invalid DateTime",Nn=864e13;function at(t){return new ke("unsupported zone",`the zone "${t.name}" is not supported`)}function er(t){return t.weekData===null&&(t.weekData=Vt(t.c)),t.weekData}function tr(t){return t.localWeekData===null&&(t.localWeekData=Vt(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Le(t,e){const r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new D({...r,...e,old:r})}function di(t,e,r){let n=t-e*60*1e3;const s=r.offset(n);if(e===s)return[n,e];n-=(s-e)*60*1e3;const i=r.offset(n);return s===i?[n,s]:[t-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Ct(t,e){t+=e*60*1e3;const r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function At(t,e,r){return di(Zt(t),e,r)}function $n(t,e){const r=t.o,n=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:n,month:s,day:Math.min(t.c.day,Rt(n,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=W.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Zt(i);let[u,y]=di(o,r,t.zone);return a!==0&&(u+=a,y=t.zone.offset(u)),{ts:u,o:y}}function ze(t,e,r,n,s,i){const{setZone:a,zone:o}=r;if(t&&Object.keys(t).length!==0||e){const u=e||o,y=D.fromObject(t,{...r,zone:u,specificOffset:i});return a?y:y.setZone(o)}else return D.invalid(new ke("unparsable",`the input "${s}" can't be parsed as ${n}`))}function It(t,e,r=!0){return t.isValid?ie.create(Z.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function rr(t,e,r){const n=t.c.year>9999||t.c.year<0;let s="";if(n&&t.c.year>=0&&(s+="+"),s+=te(t.c.year,n?6:4),r==="year")return s;if(e){if(s+="-",s+=te(t.c.month),r==="month")return s;s+="-"}else if(s+=te(t.c.month),r==="month")return s;return s+=te(t.c.day),s}function Dn(t,e,r,n,s,i,a){let o=!r||t.c.millisecond!==0||t.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=te(t.c.hour),a==="hour")break;if(e){if(u+=":",u+=te(t.c.minute),a==="minute")break;o&&(u+=":",u+=te(t.c.second))}else{if(u+=te(t.c.minute),a==="minute")break;o&&(u+=te(t.c.second))}if(a==="second")break;o&&(!n||t.c.millisecond!==0)&&(u+=".",u+=te(t.c.millisecond,3))}return s&&(t.isOffsetFixed&&t.offset===0&&!i?u+="Z":t.o<0?(u+="-",u+=te(Math.trunc(-t.o/60)),u+=":",u+=te(Math.trunc(-t.o%60))):(u+="+",u+=te(Math.trunc(t.o/60)),u+=":",u+=te(Math.trunc(t.o%60)))),i&&(u+="["+t.zone.ianaName+"]"),u}const hi={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},yo={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wo={ordinal:1,hour:0,minute:0,second:0,millisecond:0},_t=["year","month","day","hour","minute","second","millisecond"],bo=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],po=["year","ordinal","hour","minute","second","millisecond"];function Ft(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new hs(t);return e}function Cn(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ft(t)}}function ko(t){if(ot===void 0&&(ot=j.now()),t.type!=="iana")return t.offset(ot);const e=t.name;let r=zr.get(e);return r===void 0&&(r=t.offset(ot),zr.set(e,r)),r}function In(t,e){const r=De(e.zone,j.defaultZone);if(!r.isValid)return D.invalid(at(r));const n=Z.fromObject(e);let s,i;if(C(t.year))s=j.now();else{for(const u of _t)C(t[u])&&(t[u]=hi[u]);const a=Ws(t)||Us(t);if(a)return D.invalid(a);const o=ko(r);[s,i]=At(t,o,r)}return new D({ts:s,zone:r,loc:n,o:i})}function An(t,e,r){const n=C(r.round)?!0:r.round,s=C(r.rounding)?"trunc":r.rounding,i=(o,u)=>(o=jr(o,n||r.calendary?0:2,r.calendary?"round":s),e.loc.clone(r).relFormatter(r).format(o,u)),a=o=>r.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(r.unit)return i(a(r.unit),r.unit);for(const o of r.units){const u=a(o);if(Math.abs(u)>=1)return i(u,o)}return i(t>e?-0:0,r.units[r.units.length-1])}function _n(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}let ot;const zr=new Map;class D{constructor(e){const r=e.zone||j.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new ke("invalid input"):null)||(r.isValid?null:at(r));this.ts=C(e.ts)?j.now():e.ts;let s=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[s,i]=[e.old.c,e.old.o];else{const o=Ce(e.o)&&!e.old?e.o:r.offset(this.ts);s=Ct(this.ts,o),n=Number.isNaN(s.year)?new ke("invalid input"):null,s=n?null:s,i=n?null:o}this._zone=r,this.loc=e.loc||Z.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new D({})}static local(){const[e,r]=_n(arguments),[n,s,i,a,o,u,y]=r;return In({year:n,month:s,day:i,hour:a,minute:o,second:u,millisecond:y},e)}static utc(){const[e,r]=_n(arguments),[n,s,i,a,o,u,y]=r;return e.zone=ae.utcInstance,In({year:n,month:s,day:i,hour:a,minute:o,second:u,millisecond:y},e)}static fromJSDate(e,r={}){const n=Qi(e)?e.valueOf():NaN;if(Number.isNaN(n))return D.invalid("invalid input");const s=De(r.zone,j.defaultZone);return s.isValid?new D({ts:n,zone:s,loc:Z.fromObject(r)}):D.invalid(at(s))}static fromMillis(e,r={}){if(Ce(e))return e<-Nn||e>Nn?D.invalid("Timestamp out of range"):new D({ts:e,zone:De(r.zone,j.defaultZone),loc:Z.fromObject(r)});throw new se(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(Ce(e))return new D({ts:e*1e3,zone:De(r.zone,j.defaultZone),loc:Z.fromObject(r)});throw new se("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};const n=De(r.zone,j.defaultZone);if(!n.isValid)return D.invalid(at(n));const s=Z.fromObject(r),i=Wt(e,Cn),{minDaysInFirstWeek:a,startOfWeek:o}=wn(i,s),u=j.now(),y=C(r.specificOffset)?n.offset(u):r.specificOffset,T=!C(i.ordinal),E=!C(i.year),L=!C(i.month)||!C(i.day),M=E||L,U=i.weekYear||i.weekNumber;if((M||T)&&U)throw new He("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(L&&T)throw new He("Can't mix ordinal dates with month/day");const Y=U||i.weekday&&!M;let K,ne,J=Ct(u,y);Y?(K=bo,ne=yo,J=Vt(J,a,o)):T?(K=po,ne=wo,J=Qt(J)):(K=_t,ne=hi);let X=!1;for(const oe of K){const Ue=i[oe];C(Ue)?X?i[oe]=ne[oe]:i[oe]=J[oe]:X=!0}const N=Y?ji(i,a,o):T?Ji(i):Ws(i),ee=N||Us(i);if(ee)return D.invalid(ee);const Ee=Y?gn(i,a,o):T?yn(i):i,[Oe,Ie]=At(Ee,y,n),Te=new D({ts:Oe,zone:n,o:Ie,loc:s});return i.weekday&&M&&e.weekday!==Te.weekday?D.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Te.toISO()}`):Te.isValid?Te:D.invalid(Te.invalid)}static fromISO(e,r={}){const[n,s]=Ua(e);return ze(n,s,r,"ISO 8601",e)}static fromRFC2822(e,r={}){const[n,s]=qa(e);return ze(n,s,r,"RFC 2822",e)}static fromHTTP(e,r={}){const[n,s]=Za(e);return ze(n,s,r,"HTTP",r)}static fromFormat(e,r,n={}){if(C(e)||C(r))throw new se("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=n,a=Z.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,y,T]=go(a,e,r);return T?D.invalid(T):ze(o,u,n,`format ${r}`,e,y)}static fromString(e,r,n={}){return D.fromFormat(e,r,n)}static fromSQL(e,r={}){const[n,s]=Ja(e);return ze(n,s,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new se("need to specify a reason the DateTime is invalid");const n=e instanceof ke?e:new ke(e,r);if(j.throwOnInvalid)throw new Ti(n);return new D({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){const n=fi(e,Z.fromObject(r));return n?n.map(s=>s?s.val:null).join(""):null}static expandFormat(e,r={}){return ui(ie.parseFormat(e),Z.fromObject(r)).map(s=>s.val).join("")}static resetCache(){ot=void 0,zr.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?er(this).weekYear:NaN}get weekNumber(){return this.isValid?er(this).weekNumber:NaN}get weekday(){return this.isValid?er(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?tr(this).weekday:NaN}get localWeekNumber(){return this.isValid?tr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?tr(this).weekYear:NaN}get ordinal(){return this.isValid?Qt(this.c).ordinal:NaN}get monthShort(){return this.isValid?$t.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?$t.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?$t.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?$t.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,r=6e4,n=Zt(this.c),s=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-s*r),o=this.zone.offset(n-i*r);if(a===o)return[this];const u=n-a*r,y=n-o*r,T=Ct(u,a),E=Ct(y,o);return T.hour===E.hour&&T.minute===E.minute&&T.second===E.second&&T.millisecond===E.millisecond?[Le(this,{ts:u}),Le(this,{ts:y})]:[this]}get isInLeapYear(){return ft(this.year)}get daysInMonth(){return Rt(this.year,this.month)}get daysInYear(){return this.isValid?Pe(this.year):NaN}get weeksInWeekYear(){return this.isValid?ct(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ct(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:r,numberingSystem:n,calendar:s}=ie.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:s}}toUTC(e=0,r={}){return this.setZone(ae.instance(e),r)}toLocal(){return this.setZone(j.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=De(e,j.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(r||n){const i=e.offset(this.ts),a=this.toObject();[s]=At(a,i,e)}return Le(this,{ts:s,zone:e})}else return D.invalid(at(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){const s=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return Le(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const r=Wt(e,Cn),{minDaysInFirstWeek:n,startOfWeek:s}=wn(r,this.loc),i=!C(r.weekYear)||!C(r.weekNumber)||!C(r.weekday),a=!C(r.ordinal),o=!C(r.year),u=!C(r.month)||!C(r.day),y=o||u,T=r.weekYear||r.weekNumber;if((y||a)&&T)throw new He("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new He("Can't mix ordinal dates with month/day");let E;i?E=gn({...Vt(this.c,n,s),...r},n,s):C(r.ordinal)?(E={...this.toObject(),...r},C(r.day)&&(E.day=Math.min(Rt(E.year,E.month),E.day))):E=yn({...Qt(this.c),...r});const[L,M]=At(E,this.o,this.zone);return Le(this,{ts:L,o:M})}plus(e){if(!this.isValid)return this;const r=W.fromDurationLike(e);return Le(this,$n(this,r))}minus(e){if(!this.isValid)return this;const r=W.fromDurationLike(e).negate();return Le(this,$n(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;const n={},s=W.normalizeUnit(e);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(s==="weeks")if(r){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(n.weekNumber=this.weekNumber-1),n.weekday=i}else n.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?ie.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):Xt}toLocaleString(e=Lt,r={}){return this.isValid?ie.create(this.loc.clone(r),e).formatDateTime(this):Xt}toLocaleParts(e={}){return this.isValid?ie.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=Ft(a);const o=e==="extended";let u=rr(this,o,a);return _t.indexOf(a)>=3&&(u+="T"),u+=Dn(this,o,r,n,s,i,a),u}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?rr(this,e==="extended",Ft(r)):null}toISOWeekDate(){return It(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Ft(o),(s&&_t.indexOf(o)>=3?"T":"")+Dn(this,a==="extended",r,e,n,i,o)):null}toRFC2822(){return It(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return It(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(r||e)&&(n&&(s+=" "),r?s+="z":e&&(s+="ZZ")),It(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Xt}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",n={}){if(!this.isValid||!e.isValid)return W.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=Ki(r).map(W.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,y=to(o,u,i,s);return a?y.negate():y}diffNow(e="milliseconds",r={}){return this.diff(D.now(),e,r)}until(e){return this.isValid?G.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(r,n)<=s&&s<=i.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const r=e.base||D.fromObject({},{zone:this.zone}),n=e.padding?this<r?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),An(r,this.plus(n),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?An(e.base||D.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(D.isDateTime))throw new se("min requires all arguments be DateTimes");return bn(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(D.isDateTime))throw new se("max requires all arguments be DateTimes");return bn(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){const{locale:s=null,numberingSystem:i=null}=n,a=Z.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return li(a,e,r)}static fromStringExplain(e,r,n={}){return D.fromFormatExplain(e,r,n)}static buildFormatParser(e,r={}){const{locale:n=null,numberingSystem:s=null}=r,i=Z.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return new ci(i,e)}static fromFormatParser(e,r,n={}){if(C(e)||C(r))throw new se("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=n,a=Z.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(r.locale))throw new se(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${r.locale}`);const{result:o,zone:u,specificOffset:y,invalidReason:T}=r.explainFromTokens(e);return T?D.invalid(T):ze(o,u,n,`format ${r.format}`,e,y)}static get DATE_SHORT(){return Lt}static get DATE_MED(){return ms}static get DATE_MED_WITH_WEEKDAY(){return xi}static get DATE_FULL(){return gs}static get DATE_HUGE(){return ys}static get TIME_SIMPLE(){return ws}static get TIME_WITH_SECONDS(){return bs}static get TIME_WITH_SHORT_OFFSET(){return ps}static get TIME_WITH_LONG_OFFSET(){return ks}static get TIME_24_SIMPLE(){return Ss}static get TIME_24_WITH_SECONDS(){return Ts}static get TIME_24_WITH_SHORT_OFFSET(){return Os}static get TIME_24_WITH_LONG_OFFSET(){return Ms}static get DATETIME_SHORT(){return xs}static get DATETIME_SHORT_WITH_SECONDS(){return vs}static get DATETIME_MED(){return Es}static get DATETIME_MED_WITH_SECONDS(){return Ns}static get DATETIME_MED_WITH_WEEKDAY(){return vi}static get DATETIME_FULL(){return $s}static get DATETIME_FULL_WITH_SECONDS(){return Ds}static get DATETIME_HUGE(){return Cs}static get DATETIME_HUGE_WITH_SECONDS(){return Is}}function nt(t){if(D.isDateTime(t))return t;if(t&&t.valueOf&&Ce(t.valueOf()))return D.fromJSDate(t);if(t&&typeof t=="object")return D.fromObject(t);throw new se(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var re=(t=>(t.Nanoseconds="nanoseconds",t.Microseconds="microseconds",t.Milliseconds="milliseconds",t.Seconds="seconds",t.Minutes="minutes",t.Hours="hours",t.Days="days",t))(re||{});function So(t){return Object.values(re).includes(t)}function mi(t){const e=Math.abs(t),r=t<0?"-":"";let n,s="";if(e>=1e15)n=(e/1e15).toFixed(1),s="Q";else if(e>=1e12)n=(e/1e12).toFixed(1),s="T";else if(e>=1e9)n=(e/1e9).toFixed(1),s="B";else if(e>=1e6)n=(e/1e6).toFixed(1),s="M";else if(e>=1e3)n=(e/1e3).toFixed(1),s="K";else return t.toLocaleString("en-US");return n=n.replace(/\.0$/,""),`${r}${n}${s}`}const pe={k:{divisor:1e3,threshold:1e3},m:{divisor:1e6,threshold:1e6},b:{divisor:1e9,threshold:1e9},t:{divisor:1e12,threshold:1e12},q:{divisor:1e15,threshold:1e15}},To={letter:{k:"K",m:"M",b:"B",t:"T",q:"Q"},lower:{k:"k",m:"m",b:"b",t:"t",q:"q"},word:{k:" Thousand",m:" Million",b:" Billion",t:" Trillion",q:" Quadrillion"},short:{k:"K",m:" Mil",b:" Bil",t:" Tril",q:" Quad"},finance:{k:"M",m:"MM",b:"B",t:"T",q:"Q"},scientific:{k:"×10³",m:"×10⁶",b:"×10⁹",t:"×10¹²",q:"×10¹⁵"},none:{k:"",m:"",b:"",t:"",q:""}};function mt(t,e={}){const{scale:r="auto",decimals:n=2,suffix:s="lower"}=e,i=Math.min(Math.max(0,n),10),a=Math.abs(t),o=t<0?"-":"";let u=null,y=1;if(r==="auto")if(a>=pe.q.threshold)u="q",y=pe.q.divisor;else if(a>=pe.t.threshold)u="t",y=pe.t.divisor;else if(a>=pe.b.threshold)u="b",y=pe.b.divisor;else if(a>=pe.m.threshold)u="m",y=pe.m.divisor;else if(a>=pe.k.threshold)u="k",y=pe.k.divisor;else return t.toLocaleString("en-US");else u=r,y=pe[r].divisor;const T=a/y;if(s==="scientific"){const M=Math.floor(Math.log10(a)+1e-10),Y=(a/Math.pow(10,M)).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:i}),K={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","-":"⁻"},ne=String(M).split("").map(J=>K[J]||J).join("");return`${o}${Y}×10${ne}`}const E=T.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:i}),L=To[s][u];return`${o}${E}${L}`}const Oo={usd:"$",eur:"€",gbp:"£",euro:"€",pound:"£"};function Mo(t){const e=t.toLowerCase().trim();if(e==="auto")return{scale:"auto",decimals:2};if(e==="id")return{isId:!0};const r=e.match(/^(\d)([kmbtq])$/i);if(r){const s=parseInt(r[1],10),i=r[2].toLowerCase();return{decimals:s,scale:i}}const n=e.match(/^(\d)$/);return n?{decimals:parseInt(n[1],10)}:null}function xo(t){const e=t.toLowerCase().trim(),r=e.match(/^(euro|pound|usd|eur|gbp)/i);if(!r)return null;const n=r[1].toLowerCase(),s=Oo[n];if(!s)return null;const i=e.slice(r[1].length);if(i===".auto")return{currency:n,symbol:s,scale:"auto",decimals:2};const a=i.match(/^(\d)([kmbtq])$/i);if(a)return{currency:n,symbol:s,decimals:parseInt(a[1],10),scale:a[2].toLowerCase()};const o=i.match(/^(\d)$/);return o?{currency:n,symbol:s,decimals:parseInt(o[1],10)}:i===""?{currency:n,symbol:s}:null}function gi(t){if(!t)return;const e=t.toLowerCase().trim();if(["k","m","b","t","q"].includes(e))return e;if(e==="auto")return"auto"}var nr,Fn;function vo(){if(Fn)return nr;Fn=1;function t(e,r,n,s){var i=-1,a=e==null?0:e.length;for(s&&a&&(n=e[++i]);++i<a;)n=r(n,e[i],i,e);return n}return nr=t,nr}var sr,Ln;function Eo(){if(Ln)return sr;Ln=1;function t(e){return function(r){return e==null?void 0:e[r]}}return sr=t,sr}var ir,Vn;function No(){if(Vn)return ir;Vn=1;var t=Eo(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},r=t(e);return ir=r,ir}var ar,Rn;function $o(){if(Rn)return ar;Rn=1;var t=typeof Et=="object"&&Et&&Et.Object===Object&&Et;return ar=t,ar}var or,Wn;function Do(){if(Wn)return or;Wn=1;var t=$o(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return or=r,or}var ur,Un;function Kr(){if(Un)return ur;Un=1;var t=Do(),e=t.Symbol;return ur=e,ur}var cr,qn;function Co(){if(qn)return cr;qn=1;function t(e,r){for(var n=-1,s=e==null?0:e.length,i=Array(s);++n<s;)i[n]=r(e[n],n,e);return i}return cr=t,cr}var lr,Zn;function Io(){if(Zn)return lr;Zn=1;var t=Array.isArray;return lr=t,lr}var fr,zn;function Ao(){if(zn)return fr;zn=1;var t=Kr(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,s=t?t.toStringTag:void 0;function i(a){var o=r.call(a,s),u=a[s];try{a[s]=void 0;var y=!0}catch{}var T=n.call(a);return y&&(o?a[s]=u:delete a[s]),T}return fr=i,fr}var dr,Hn;function _o(){if(Hn)return dr;Hn=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return dr=r,dr}var hr,Pn;function Fo(){if(Pn)return hr;Pn=1;var t=Kr(),e=Ao(),r=_o(),n="[object Null]",s="[object Undefined]",i=t?t.toStringTag:void 0;function a(o){return o==null?o===void 0?s:n:i&&i in Object(o)?e(o):r(o)}return hr=a,hr}var mr,Yn;function Lo(){if(Yn)return mr;Yn=1;function t(e){return e!=null&&typeof e=="object"}return mr=t,mr}var gr,Gn;function Vo(){if(Gn)return gr;Gn=1;var t=Fo(),e=Lo(),r="[object Symbol]";function n(s){return typeof s=="symbol"||e(s)&&t(s)==r}return gr=n,gr}var yr,jn;function Ro(){if(jn)return yr;jn=1;var t=Kr(),e=Co(),r=Io(),n=Vo(),s=t?t.prototype:void 0,i=s?s.toString:void 0;function a(o){if(typeof o=="string")return o;if(r(o))return e(o,a)+"";if(n(o))return i?i.call(o):"";var u=o+"";return u=="0"&&1/o==-1/0?"-0":u}return yr=a,yr}var wr,Jn;function Xr(){if(Jn)return wr;Jn=1;var t=Ro();function e(r){return r==null?"":t(r)}return wr=e,wr}var br,Bn;function Wo(){if(Bn)return br;Bn=1;var t=No(),e=Xr(),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",a=n+s+i,o="["+a+"]",u=RegExp(o,"g");function y(T){return T=e(T),T&&T.replace(r,t).replace(u,"")}return br=y,br}var pr,Qn;function Uo(){if(Qn)return pr;Qn=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(r){return r.match(t)||[]}return pr=e,pr}var kr,Kn;function qo(){if(Kn)return kr;Kn=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(r){return t.test(r)}return kr=e,kr}var Sr,Xn;function Zo(){if(Xn)return Sr;Xn=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",s=e+r+n,i="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",o="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",y="\\u2000-\\u206f",T=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",E="A-Z\\xc0-\\xd6\\xd8-\\xde",L="\\ufe0e\\ufe0f",M=o+u+y+T,U="['’]",Y="["+M+"]",K="["+s+"]",ne="\\d+",J="["+i+"]",X="["+a+"]",N="[^"+t+M+ne+i+a+E+"]",ee="\\ud83c[\\udffb-\\udfff]",Ee="(?:"+K+"|"+ee+")",Oe="[^"+t+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Te="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="["+E+"]",Ue="\\u200d",gt="(?:"+X+"|"+N+")",yt="(?:"+oe+"|"+N+")",Ae="(?:"+U+"(?:d|ll|m|re|s|t|ve))?",wt="(?:"+U+"(?:D|LL|M|RE|S|T|VE))?",bt=Ee+"?",he="["+L+"]?",me="(?:"+Ue+"(?:"+[Oe,Ie,Te].join("|")+")"+he+bt+")*",pt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",St=he+bt+me,Tt="(?:"+[J,Ie,Te].join("|")+")"+St,Ot=RegExp([oe+"?"+X+"+"+Ae+"(?="+[Y,oe,"$"].join("|")+")",yt+"+"+wt+"(?="+[Y,oe+gt,"$"].join("|")+")",oe+"?"+gt+"+"+Ae,oe+"+"+wt,kt,pt,ne,Tt].join("|"),"g");function Mt(xt){return xt.match(Ot)||[]}return Sr=Mt,Sr}var Tr,es;function zo(){if(es)return Tr;es=1;var t=Uo(),e=qo(),r=Xr(),n=Zo();function s(i,a,o){return i=r(i),a=o?void 0:a,a===void 0?e(i)?n(i):t(i):i.match(a)||[]}return Tr=s,Tr}var Or,ts;function Ho(){if(ts)return Or;ts=1;var t=vo(),e=Wo(),r=zo(),n="['’]",s=RegExp(n,"g");function i(a){return function(o){return t(r(e(o).replace(s,"")),a,"")}}return Or=i,Or}var Mr,rs;function Po(){if(rs)return Mr;rs=1;function t(e,r,n){var s=-1,i=e.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var a=Array(i);++s<i;)a[s]=e[s+r];return a}return Mr=t,Mr}var xr,ns;function Yo(){if(ns)return xr;ns=1;var t=Po();function e(r,n,s){var i=r.length;return s=s===void 0?i:s,!n&&s>=i?r:t(r,n,s)}return xr=e,xr}var vr,ss;function yi(){if(ss)return vr;ss=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",s=e+r+n,i="\\ufe0e\\ufe0f",a="\\u200d",o=RegExp("["+a+t+s+i+"]");function u(y){return o.test(y)}return vr=u,vr}var Er,is;function Go(){if(is)return Er;is=1;function t(e){return e.split("")}return Er=t,Er}var Nr,as;function jo(){if(as)return Nr;as=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",s=e+r+n,i="\\ufe0e\\ufe0f",a="["+t+"]",o="["+s+"]",u="\\ud83c[\\udffb-\\udfff]",y="(?:"+o+"|"+u+")",T="[^"+t+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",M="\\u200d",U=y+"?",Y="["+i+"]?",K="(?:"+M+"(?:"+[T,E,L].join("|")+")"+Y+U+")*",ne=Y+U+K,J="(?:"+[T+o+"?",o,E,L,a].join("|")+")",X=RegExp(u+"(?="+u+")|"+J+ne,"g");function N(ee){return ee.match(X)||[]}return Nr=N,Nr}var $r,os;function Jo(){if(os)return $r;os=1;var t=Go(),e=yi(),r=jo();function n(s){return e(s)?r(s):t(s)}return $r=n,$r}var Dr,us;function Bo(){if(us)return Dr;us=1;var t=Yo(),e=yi(),r=Jo(),n=Xr();function s(i){return function(a){a=n(a);var o=e(a)?r(a):void 0,u=o?o[0]:a.charAt(0),y=o?t(o,1).join(""):a.slice(1);return u[i]()+y}}return Dr=s,Dr}var Cr,cs;function Qo(){if(cs)return Cr;cs=1;var t=Bo(),e=t("toUpperCase");return Cr=e,Cr}var Ir,ls;function Ko(){if(ls)return Ir;ls=1;var t=Ho(),e=Qo(),r=t(function(n,s,i){return n+(i?" ":"")+e(s)});return Ir=r,Ir}Ko();function H(t,e){return t.toString().padStart(e,"0")}function Xo(t,e,r){e||(e="second");const n=D.fromJSDate(t,{zone:r??"UTC"});switch(e){case"year":return`${H(n.year,4)}`;case"quarter":{const s=H(n.year,4),i=Math.floor(n.month/3)+1;return`${s}-Q${i}`}case"month":{const s=H(n.year,2),i=H(n.month,2);return`${s}-${i}`}case"week":{const s=H(n.year,2),i=H(n.month,2),a=H(n.day,2);return`${s}-${i}-${a}-WK`}case"day":{const s=H(n.year,2),i=H(n.month,2),a=H(n.day,2);return`${s}-${i}-${a}`}case"hour":{const s=H(n.year,2),i=H(n.month,2),a=H(n.day,2),o=H(n.hour,2);return`${s}-${i}-${a} ${o}`}case"minute":{const s=H(n.year,2),i=H(n.month,2),a=H(n.day,2),o=H(n.hour,2),u=H(n.minute,2);return`${s}-${i}-${a} ${o}:${u}`}case"second":{const s=H(n.year,2),i=H(n.month,2),a=H(n.day,2),o=H(n.hour,2),u=H(n.minute,2),y=H(n.second,2);return`${s}-${i}-${a} ${o}:${u}:${y}`}default:throw new Error("Unknown timeframe.")}}function eu(t){return["day","week","month","quarter","year"].includes(t)}function fs(t){return eu(t)||["hour","minute","second"].includes(t)}function ds(t,e,r={}){let n=e.toString();return r.terse?n=tu.get(e)??n:t===1&&(n=n.substring(0,n.length-1)),`${r.numFormat?Re.format(r.numFormat,t):t.toLocaleString()}${r.terse?"":" "}${n}`}const tu=new Map([[re.Nanoseconds,"ns"],[re.Microseconds,"µs"],[re.Milliseconds,"ms"],[re.Seconds,"s"],[re.Minutes,"m"],[re.Hours,"h"],[re.Days,"d"]]),ru=new Map([[re.Nanoseconds,1e3],[re.Microseconds,1e3],[re.Milliseconds,1e3],[re.Seconds,60],[re.Minutes,60],[re.Hours,24],[re.Days,Number.MAX_VALUE]]);function wi(t,e){const r=e.durationUnit&&So(e.durationUnit)?e.durationUnit:re.Seconds,n=e.numFormat,s=e.terse??!1;let i=t,a=0,o=[],u=!1;for(const[y,T]of ru)if(y===r&&(u=!0),!!u&&(a=i%T,i=Math.floor(i/=T),a>0&&(o=[ds(a,y,{numFormat:n,terse:s}),...o]),i===0))break;return o.length>0?o.slice(0,2).join(" "):ds(0,r,{numFormat:n,terse:s})}function st(t,e=2){return`${"0".repeat(e-1)}${t}`.slice(-e)}function bi(t,e={}){if(e.timezone){const E=e.timeframe&&fs(e.timeframe)?e.timeframe:"second";return Xo(t,E,e.timezone)}if(e.extractFormat)switch(e.extractFormat){case"month-day":return t.toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"});case"month":return t.toLocaleDateString("en-US",{month:"long",timeZone:"UTC"});case"quarter":return`Q${Math.floor(t.getUTCMonth()/3)+1}`;case"week":return t.toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"});case"day":return t.toLocaleDateString("en-US",{day:"numeric",timeZone:"UTC"})}const r=t.getUTCFullYear(),n=st(t.getUTCMonth()+1),s=st(t.getUTCDate()),i=st(t.getUTCHours()),a=st(t.getUTCMinutes()),o=st(t.getUTCSeconds()),u=`${i}:${a}:${o}`,y=`${r}-${n}-${s}`,T=e.timeframe;if(T&&fs(T))switch(T){case"second":return`${y} ${u}`;case"minute":return`${y} ${i}:${a}`;case"hour":return`${y} ${i}`;case"day":return`${y}`;case"week":return`${y}-WK`;case"month":return`${r}-${n}`;case"quarter":return`${r}-Q${Math.floor(t.getUTCMonth()/3)+1}`;case"year":return t.getUTCFullYear().toString()}return e.isDate?y:`${y} ${u}`}const en="∅";function nu(t){const e=t.text("currency"),r=e?xo(e):null;if(r)return{symbol:r.symbol,scale:r.scale,decimals:r.decimals,suffixFormat:"lower"};let n="$";switch(e){case"euro":n="€";break;case"pound":n="£";break;case"usd":default:n="$";break}const s=t.text("currency","scale"),i=gi(s),a=t.numeric("currency","decimals")??void 0,o=t.text("currency","suffix");let u="lower";return o?u=o:i&&(u="letter"),{symbol:n,scale:i,decimals:a,suffixFormat:u}}function su(t){const e=t.text("number"),r=e?Mo(e):null;if(r)return{scale:r.scale,decimals:r.decimals,isId:r.isId,isBig:!1,suffixFormat:"lower"};const n=t.text("number","scale"),s=gi(n);if(s){const i=t.numeric("number","decimals")??2,o=t.text("number","suffix")??"letter";return{scale:s,decimals:i,suffixFormat:o}}return e==="big"?{isBig:!0}:{formatString:e??void 0}}function iu(t,e={}){if(t.has("currency"))return{mode:"currency",currency:nu(t)};if(t.has("percent"))return{mode:"percent"};if(t.has("duration")){const r=t.text("duration"),n=t.has("duration","terse");return{mode:"duration",duration:{unit:r??re.Seconds,terse:n}}}if(t.has("number")){if(e.isTime){const r=t.text("number");if(r)return{mode:"dateFormat",formatString:r}}return{mode:"number",number:su(t)}}return{mode:"default"}}function pi(t,e={mode:"default"}){if(t==null)return en;if(typeof t=="string")return mu(t,e);switch(e.mode){case"currency":return lu(e.currency,t);case"percent":return Re.format("#,##0.00%",t);case"duration":return wi(t,{durationUnit:e.duration.unit,terse:e.duration.terse});case"number":return fu(e.number,t);default:return t.toLocaleString()}}function au(t,e={mode:"default"},r={}){if(t==null)return en;if(e.mode==="dateFormat")try{return Re.format(e.formatString,cu(t,r))}catch{const s=r.fieldName?` for field ${r.fieldName}`:"";console.warn(`Invalid date format "${e.formatString}"${s}, falling back to default formatting`)}return bi(t,r)}const ou=25569,uu=864e5;function cu(t,e){let r=t.getTime();if(e.timezone&&!e.isDate){const n=D.fromJSDate(t,{zone:e.timezone});n.isValid&&(r+=n.offset*6e4)}return r/uu+ou}function lu(t,e){if(t.scale){const r=mt(e,{scale:t.scale,decimals:t.decimals??2,suffix:t.suffixFormat});return`${t.symbol}${r}`}else{const r=t.decimals??2,n=r>0?`${t.symbol}#,##0.${"0".repeat(r)}`:`${t.symbol}#,##0`;return Re.format(n,e)}}function fu(t,e){return t.isId?String(e):t.scale?mt(e,{scale:t.scale,decimals:t.decimals??2,suffix:t.suffixFormat??"lower"}):t.decimals!==void 0&&!t.scale?Number(e.toFixed(t.decimals)).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:t.decimals}):t.isBig?mi(e):t.formatString?Re.format(t.formatString,e):Re.format("#",e)}function Ge(t){const e=t.startsWith("-"),n=(e?t.slice(1):t).replace(/\B(?=(\d{3})+(?!\d))/g,",");return e?`-${n}`:n}function du(t,e){if(t.scale){const n=Number(e),s=mt(n,{scale:t.scale,decimals:t.decimals??2,suffix:t.suffixFormat});return`${t.symbol}${s}`}const r=t.decimals??2;return r===0?`${t.symbol}${Ge(e)}`:`${t.symbol}${Ge(e)}.${"0".repeat(r)}`}function hu(t,e){return t.isId?e:t.scale?mt(Number(e),{scale:t.scale,decimals:t.decimals??2,suffix:t.suffixFormat??"lower"}):t.decimals!==void 0&&!t.scale?t.decimals===0?Ge(e):`${Ge(e)}.${"0".repeat(t.decimals)}`:t.isBig?mi(Number(e)):t.formatString?Re.format(t.formatString,Number(e)):Ge(e)}function mu(t,e){switch(e.mode){case"currency":return du(e.currency,t);case"percent":case"duration":return pi(Number(t),e);case"number":return hu(e.number,t);default:return Ge(t)}}exports.NULL_SYMBOL=en;exports.formatDateTime=au;exports.formatDuration=wi;exports.formatNumber=pi;exports.formatScaledNumber=mt;exports.renderTimeString=bi;exports.resolveCellFormat=iu;
|