react-timezone-range-picker 0.1.6 → 0.1.7
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/README.md +19 -1
- package/dist/AroundTimePanel/index.d.ts +1 -0
- package/dist/AroundTimePanel/index.d.ts.map +1 -1
- package/dist/Footer/index.d.ts +5 -1
- package/dist/Footer/index.d.ts.map +1 -1
- package/dist/RelativeTimePanel/timeOptions.d.ts +1 -0
- package/dist/RelativeTimePanel/timeOptions.d.ts.map +1 -1
- package/dist/StartEndTimePanel/index.d.ts +1 -0
- package/dist/StartEndTimePanel/index.d.ts.map +1 -1
- package/dist/TimezonePanel/index.d.ts +1 -0
- package/dist/TimezonePanel/index.d.ts.map +1 -1
- package/dist/TimezoneRangePicker/AdvancedPickerView.d.ts +1 -0
- package/dist/TimezoneRangePicker/AdvancedPickerView.d.ts.map +1 -1
- package/dist/TimezoneRangePicker/BasicPickerView.d.ts.map +1 -1
- package/dist/index.cjs.js +12 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1966 -1862
- package/dist/index.es.js.map +1 -1
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/util/dateTime.d.ts +6 -1
- package/dist/util/dateTime.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),E=require("@mantine/core"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),E=require("@mantine/core"),_t=require("@mantine/hooks"),Zt=require("@mantine/dates"),la=require("@mantine/form");var Yr={exports:{}},Rn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var vi;function Es(){if(vi)return Rn;vi=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:n,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Rn.Fragment=e,Rn.jsx=t,Rn.jsxs=t,Rn}var In={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,50 +14,50 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Ti;function Ms(){return Ti||(Ti=1,process.env.NODE_ENV!=="production"&&(function(){function n(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===ee?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case w:return"Fragment";case M:return"Profiler";case T:return"StrictMode";case Q:return"Suspense";case J:return"SuspenseList";case de:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case p:return"Portal";case k:return D.displayName||"Context";case x:return(D._context.displayName||"Context")+".Consumer";case $:var I=D.render;return D=D.displayName,D||(D=I.displayName||I.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case B:return I=D.displayName||null,I!==null?I:n(D.type)||"Memo";case z:I=D._payload,D=D._init;try{return n(D(I))}catch{}}return null}function e(D){return""+D}function t(D){try{e(D);var I=!1}catch{I=!0}if(I){I=console;var X=I.error,te=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return X.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",te),e(D)}}function r(D){if(D===w)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===z)return"<...>";try{var I=n(D);return I?"<"+I+">":"<...>"}catch{return"<...>"}}function o(){var D=S.A;return D===null?null:D.getOwner()}function i(){return Error("react-stack-top-frame")}function a(D){if(oe.call(D,"key")){var I=Object.getOwnPropertyDescriptor(D,"key").get;if(I&&I.isReactWarning)return!1}return D.key!==void 0}function s(D,I){function X(){dt||(dt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",I))}X.isReactWarning=!0,Object.defineProperty(D,"key",{get:X,configurable:!0})}function c(){var D=n(this.type);return ht[D]||(ht[D]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),D=this.props.ref,D!==void 0?D:null}function l(D,I,X,te,Pr,po){var ne=X.ref;return D={$$typeof:y,type:D,key:I,props:X,_owner:te},(ne!==void 0?ne:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:c}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Pr}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:po}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function d(D,I,X,te,Pr,po){var ne=I.children;if(ne!==void 0)if(te)if(ye(ne)){for(te=0;te<ne.length;te++)h(ne[te]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(ne);if(oe.call(I,"key")){ne=n(D);var on=Object.keys(I).filter(function(_s){return _s!=="key"});te=0<on.length?"{key: someKey, "+on.join(": ..., ")+": ...}":"{key: someKey}",bi[ne+te]||(on=0<on.length?"{"+on.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,te,ne,
|
|
22
|
+
<%s key={someKey} {...props} />`,te,ne,on,ne),bi[ne+te]=!0)}if(ne=null,X!==void 0&&(t(X),ne=""+X),a(I)&&(t(I.key),ne=""+I.key),"key"in I){X={};for(var wo in I)wo!=="key"&&(X[wo]=I[wo])}else X=I;return ne&&s(X,typeof D=="function"?D.displayName||D.name||"Unknown":D),l(D,ne,X,o(),Pr,po)}function h(D){f(D)?D._store&&(D._store.validated=1):typeof D=="object"&&D!==null&&D.$$typeof===z&&(D._payload.status==="fulfilled"?f(D._payload.value)&&D._payload.value._store&&(D._payload.value._store.validated=1):D._store&&(D._store.validated=1))}function f(D){return typeof D=="object"&&D!==null&&D.$$typeof===y}var g=A,y=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),ee=Symbol.for("react.client.reference"),S=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=Object.prototype.hasOwnProperty,ye=Array.isArray,We=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(D){return D()}};var dt,ht={},$r=g.react_stack_bottom_frame.bind(g,i)(),Nr=We(r(i)),bi={};In.Fragment=w,In.jsx=function(D,I,X){var te=1e4>S.recentlyCreatedOwnerStacks++;return d(D,I,X,!1,te?Error("react-stack-top-frame"):$r,te?We(r(D)):Nr)},In.jsxs=function(D,I,X){var te=1e4>S.recentlyCreatedOwnerStacks++;return d(D,I,X,!0,te?Error("react-stack-top-frame"):$r,te?We(r(D)):Nr)}})()),In}var Di;function xs(){return Di||(Di=1,process.env.NODE_ENV==="production"?Yr.exports=Es():Yr.exports=Ms()),Yr.exports}var v=xs();function Cs(n,e){var t=A.useRef(!1),r=A.useRef(),o=A.useRef(n),i=A.useCallback(function(){return t.current},[]),a=A.useCallback(function(){t.current=!1,r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t.current=!0,o.current()},e)},[e]),s=A.useCallback(function(){t.current=null,r.current&&clearTimeout(r.current)},[]);return A.useEffect(function(){o.current=n},[n]),A.useEffect(function(){return a(),s},[e]),[i,s,a]}function ua(n,e,t){t===void 0&&(t=[]);var r=Cs(n,e),o=r[0],i=r[1],a=r[2];return A.useEffect(a,t),[o,i]}function da(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(e=0;e<o;e++)n[e]&&(t=da(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function Qo(){for(var n,e,t=0,r="",o=arguments.length;t<o;t++)(n=arguments[t])&&(e=da(n))&&(r&&(r+=" "),r+=e);return r}const ks="_row_550mo_1",Ln={row:ks,"row-dark":"_row-dark_550mo_5","row-light":"_row-light_550mo_12","row-selected-dark":"_row-selected-dark_550mo_19","row-selected-light":"_row-selected-light_550mo_27"},to=()=>{const{colorScheme:n}=E.useMantineColorScheme(),e=E.useMantineTheme();return{colorScheme:n,theme:e}},_i=({name:n,longName:e,currentTime:t,utcOffset:r,selectedTimezone:o,isBrowserTimezone:i=!1,handleTimezoneMouseClick:a=void 0})=>{const{colorScheme:s}=to(),c=_t.useMediaQuery("(max-width: 48em)"),l=()=>{i||a({name:n,longName:e,utcOffset:r})};return v.jsxs(E.Flex,{direction:"column",className:Qo(Ln.row,i?void 0:s==="dark"?Ln["row-dark"]:Ln["row-light"],o?.name===n?s==="dark"?Ln["row-selected-dark"]:Ln["row-selected-light"]:void 0),onClick:l,children:[v.jsxs(E.Flex,{justify:"space-between",gap:8,wrap:c?"wrap":"nowrap",children:[v.jsx(E.Text,{size:"sm",children:n}),v.jsxs(E.Text,{size:"sm",children:[t," • UTC",r]})]}),v.jsx(E.Text,{size:"sm",c:c?"dimmed":void 0,children:e})]})};/**
|
|
23
23
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var
|
|
27
|
+
*/var Os={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
28
28
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const kn=(n,e,t,r)=>{const o=A.forwardRef(({color:i="currentColor",size:a=24,stroke:s=2,title:c,className:l,children:d,...h},f)=>A.createElement("svg",{ref:f,...Os[n],width:a,height:a,className:["tabler-icon",`tabler-icon-${e}`,l].join(" "),...n==="filled"?{fill:i}:{strokeWidth:s,stroke:i},...h},[c&&A.createElement("title",{key:"svg-title"},c),...r.map(([g,y])=>A.createElement(g,y)),...Array.isArray(d)?d:[d]]));return o.displayName=`${t}`,o};/**
|
|
33
33
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const js=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Fr=kn("outline","calendar","Calendar",js);/**
|
|
38
38
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const $s=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],bo=kn("outline","chevron-right","ChevronRight",$s);/**
|
|
43
43
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the MIT license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ns=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Sr=kn("outline","clock","Clock",Ns);/**
|
|
48
48
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the MIT license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ps=[["path",{d:"M4 6h16",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M9 18h6",key:"svg-2"}]],Ys=kn("outline","filter-2","Filter2",Ps);/**
|
|
53
53
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Rs=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],Is=kn("outline","world","World",Rs);/**
|
|
58
58
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the MIT license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const Ps=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],Rs=xn("filled","calendar-week-filled","CalendarWeekFilled",Ps),Ys=({searchText:n,setSearchText:e})=>b.jsx(E.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:b.jsx(js,{stroke:2}),value:n,onChange:t=>e(t.currentTarget.value)});class u extends Array{constructor(e,t){if(super(e),this.sign=t,Object.setPrototypeOf(this,u.prototype),e>u.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Math.floor,r=Number.isFinite;if(typeof e=="number"){if(e===0)return u.__zero();if(u.__isOneDigitInt(e))return 0>e?u.__oneDigit(-e,!0):u.__oneDigit(e,!1);if(!r(e)||t(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return u.__fromDouble(e)}if(typeof e=="string"){const o=u.__fromString(e);if(o===null)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return o}if(typeof e=="boolean")return e===!0?u.__oneDigit(1,!1):u.__zero();if(typeof e=="object"){if(e.constructor===u)return e;const o=u.__toPrimitive(e);return u.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){const e=["BigInt["];for(const t of this)e.push((t&&(t>>>0).toString(16))+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":(e&e-1)==0?u.__toStringBasePowerOfTwo(this,e):u.__toStringGeneric(this,e,!1)}valueOf(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}static toNumber(e){const t=e.length;if(t===0)return 0;if(t===1){const w=e.__unsignedDigit(0);return e.sign?-w:w}const r=e.__digit(t-1),o=u.__clz30(r),i=30*t-o;if(1024<i)return e.sign?-1/0:1/0;let a=i-1,s=r,c=t-1;const l=o+3;let d=l===32?0:s<<l;d>>>=12;const m=l-12;let f=12<=l?0:s<<20+l,g=20+l;for(0<m&&0<c&&(c--,s=e.__digit(c),d|=s>>>30-m,f=s<<m+2,g=m+2);0<g&&0<c;)c--,s=e.__digit(c),f|=30<=g?s<<g-30:s>>>30-g,g-=30;const y=u.__decideRounding(e,g,c,s);if((y===1||y===0&&(1&f)==1)&&(f=f+1>>>0,f===0&&(d++,d>>>20!=0&&(d=0,a++,1023<a))))return e.sign?-1/0:1/0;const p=e.sign?-2147483648:0;return a=a+1023<<20,u.__kBitConversionInts[u.__kBitConversionIntHigh]=p|a|d,u.__kBitConversionInts[u.__kBitConversionIntLow]=f,u.__kBitConversionDouble[0]}static unaryMinus(e){if(e.length===0)return e;const t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?u.__absoluteSubOne(e).__trim():u.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(t.length===0)return u.__oneDigit(1,!1);if(e.length===0)return e;if(e.length===1&&e.__digit(0)===1)return e.sign&&(1&t.__digit(0))==0?u.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");let r=t.__unsignedDigit(0);if(r===1)return e;if(r>=u.__kMaxLengthBits)throw new RangeError("BigInt too big");if(e.length===1&&e.__digit(0)===2){const a=1+(0|r/30),s=e.sign&&(1&r)!=0,c=new u(a,s);c.__initializeDigits();const l=1<<r%30;return c.__setDigit(a-1,l),c}let o=null,i=e;for((1&r)!=0&&(o=e),r>>=1;r!==0;r>>=1)i=u.multiply(i,i),(1&r)!=0&&(o===null?o=i:o=u.multiply(o,i));return o}static multiply(e,t){if(e.length===0)return e;if(t.length===0)return t;let r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;const o=new u(r,e.sign!==t.sign);o.__initializeDigits();for(let i=0;i<e.length;i++)u.__multiplyAccumulate(t,e.__digit(i),o,i);return o.__trim()}static divide(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>u.__absoluteCompare(e,t))return u.__zero();const r=e.sign!==t.sign,o=t.__unsignedDigit(0);let i;if(t.length===1&&32767>=o){if(o===1)return r===e.sign?e:u.unaryMinus(e);i=u.__absoluteDivSmall(e,o,null)}else i=u.__absoluteDivLarge(e,t,!0,!1);return i.sign=r,i.__trim()}static remainder(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>u.__absoluteCompare(e,t))return e;const r=t.__unsignedDigit(0);if(t.length===1&&32767>=r){if(r===1)return u.__zero();const i=u.__absoluteModSmall(e,r);return i===0?u.__zero():u.__oneDigit(i,e.sign)}const o=u.__absoluteDivLarge(e,t,!1,!0);return o.sign=e.sign,o.__trim()}static add(e,t){const r=e.sign;return r===t.sign?u.__absoluteAdd(e,t,r):0<=u.__absoluteCompare(e,t)?u.__absoluteSub(e,t,r):u.__absoluteSub(t,e,!r)}static subtract(e,t){const r=e.sign;return r===t.sign?0<=u.__absoluteCompare(e,t)?u.__absoluteSub(e,t,r):u.__absoluteSub(t,e,!r):u.__absoluteAdd(e,t,r)}static leftShift(e,t){return t.length===0||e.length===0?e:t.sign?u.__rightShiftByAbsolute(e,t):u.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return t.length===0||e.length===0?e:t.sign?u.__leftShiftByAbsolute(e,t):u.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>u.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=u.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<u.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=u.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e.__digit(r)!==t.__digit(r))return!1;return!0}static notEqual(e,t){return!u.equal(e,t)}static bitwiseAnd(e,t){var r=Math.max;if(!e.sign&&!t.sign)return u.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){const o=r(e.length,t.length)+1;let i=u.__absoluteSubOne(e,o);const a=u.__absoluteSubOne(t);return i=u.__absoluteOr(i,a,i),u.__absoluteAddOne(i,!0,i).__trim()}return e.sign&&([e,t]=[t,e]),u.__absoluteAndNot(e,u.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){var r=Math.max;if(!e.sign&&!t.sign)return u.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){const a=r(e.length,t.length),s=u.__absoluteSubOne(e,a),c=u.__absoluteSubOne(t);return u.__absoluteXor(s,c,s).__trim()}const o=r(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let i=u.__absoluteSubOne(t,o);return i=u.__absoluteXor(i,e,i),u.__absoluteAddOne(i,!0,i).__trim()}static bitwiseOr(e,t){var r=Math.max;const o=r(e.length,t.length);if(!e.sign&&!t.sign)return u.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let a=u.__absoluteSubOne(e,o);const s=u.__absoluteSubOne(t);return a=u.__absoluteAnd(a,s,a),u.__absoluteAddOne(a,!0,a).__trim()}e.sign&&([e,t]=[t,e]);let i=u.__absoluteSubOne(t,o);return i=u.__absoluteAndNot(i,e,i),u.__absoluteAddOne(i,!0,i).__trim()}static asIntN(e,t){var r=Math.floor;if(t.length===0)return t;if(e=r(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return u.__zero();if(e>=u.__kMaxLengthBits)return t;const o=0|(e+29)/30;if(t.length<o)return t;const i=t.__unsignedDigit(o-1),a=1<<(e-1)%30;if(t.length===o&&i<a)return t;if((i&a)!==a)return u.__truncateToNBits(e,t);if(!t.sign)return u.__truncateAndSubFromPowerOfTwo(e,t,!0);if((i&a-1)==0){for(let s=o-2;0<=s;s--)if(t.__digit(s)!==0)return u.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===o&&i===a?t:u.__truncateToNBits(e,t)}return u.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){var r=Math.floor;if(t.length===0)return t;if(e=r(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return u.__zero();if(t.sign){if(e>u.__kMaxLengthBits)throw new RangeError("BigInt too big");return u.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=u.__kMaxLengthBits)return t;const o=0|(e+29)/30;if(t.length<o)return t;const i=e%30;return t.length==o&&(i===0||!(t.__digit(o-1)>>>i))?t:u.__truncateToNBits(e,t)}static ADD(e,t){if(e=u.__toPrimitive(e),t=u.__toPrimitive(t),typeof e=="string")return typeof t!="string"&&(t=t.toString()),e+t;if(typeof t=="string")return e.toString()+t;if(e=u.__toNumeric(e),t=u.__toNumeric(t),u.__isBigInt(e)&&u.__isBigInt(t))return u.add(e,t);if(typeof e=="number"&&typeof t=="number")return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return u.__compare(e,t,0)}static LE(e,t){return u.__compare(e,t,1)}static GT(e,t){return u.__compare(e,t,2)}static GE(e,t){return u.__compare(e,t,3)}static EQ(e,t){for(;;){if(u.__isBigInt(e))return u.__isBigInt(t)?u.equal(e,t):u.EQ(t,e);if(typeof e=="number"){if(u.__isBigInt(t))return u.__equalToNumber(t,e);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="string"){if(u.__isBigInt(t))return e=u.__fromString(e),e!==null&&u.equal(e,t);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="boolean"){if(u.__isBigInt(t))return u.__equalToNumber(t,+e);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="symbol"){if(u.__isBigInt(t))return!1;if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="object"){if(typeof t=="object"&&t.constructor!==u)return e==t;e=u.__toPrimitive(e)}else return e==t}}static NE(e,t){return!u.EQ(e,t)}static DataViewGetBigInt64(e,t,r=!1){return u.asIntN(64,u.DataViewGetBigUint64(e,t,r))}static DataViewGetBigUint64(e,t,r=!1){const[o,i]=r?[4,0]:[0,4],a=e.getUint32(t+o,r),s=e.getUint32(t+i,r),c=new u(3,!1);return c.__setDigit(0,1073741823&s),c.__setDigit(1,(268435455&a)<<2|s>>>30),c.__setDigit(2,a>>>28),c.__trim()}static DataViewSetBigInt64(e,t,r,o=!1){u.DataViewSetBigUint64(e,t,r,o)}static DataViewSetBigUint64(e,t,r,o=!1){r=u.asUintN(64,r);let i=0,a=0;if(0<r.length&&(a=r.__digit(0),1<r.length)){const l=r.__digit(1);a|=l<<30,i=l>>>2,2<r.length&&(i|=r.__digit(2)<<28)}const[s,c]=o?[4,0]:[0,4];e.setUint32(t+s,i,o),e.setUint32(t+c,a,o)}static __zero(){return new u(0,!1)}static __oneDigit(e,t){const r=new u(1,t);return r.__setDigit(0,e),r}__copy(){const e=new u(this.length,this.sign);for(let t=0;t<this.length;t++)e[t]=this[t];return e}__trim(){let e=this.length,t=this[e-1];for(;t===0;)e--,t=this[e-1],this.pop();return e===0&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,r,o){if(0<t)return-1;let i;if(0>t)i=-t-1;else{if(r===0)return-1;r--,o=e.__digit(r),i=29}let a=1<<i;if((o&a)==0)return-1;if(a-=1,(o&a)!=0)return 1;for(;0<r;)if(r--,e.__digit(r)!==0)return 1;return 0}static __fromDouble(e){u.__kBitConversionDouble[0]=e;const t=2047&u.__kBitConversionInts[u.__kBitConversionIntHigh]>>>20,r=t-1023,o=(0|r/30)+1,i=new u(o,0>e);let a=1048575&u.__kBitConversionInts[u.__kBitConversionIntHigh]|1048576,s=u.__kBitConversionInts[u.__kBitConversionIntLow];const c=20,l=r%30;let d,m=0;if(l<20){const f=c-l;m=f+32,d=a>>>f,a=a<<32-f|s>>>f,s<<=32-f}else if(l===20)m=32,d=a,a=s,s=0;else{const f=l-c;m=32-f,d=a<<f|s>>>32-f,a=s<<f,s=0}i.__setDigit(o-1,d);for(let f=o-2;0<=f;f--)0<m?(m-=30,d=a>>>2,a=a<<30|s>>>2,s<<=30):d=0,i.__setDigit(f,d);return i.__trim()}static __isWhitespace(e){return 13>=e&&9<=e||(159>=e?e==32:131071>=e?e==160||e==5760:196607>=e?(e&=131071,10>=e||e==40||e==41||e==47||e==95||e==4096):e==65279)}static __fromString(e,t=0){let r=0;const o=e.length;let i=0;if(i===o)return u.__zero();let a=e.charCodeAt(i);for(;u.__isWhitespace(a);){if(++i===o)return u.__zero();a=e.charCodeAt(i)}if(a===43){if(++i===o)return null;a=e.charCodeAt(i),r=1}else if(a===45){if(++i===o)return null;a=e.charCodeAt(i),r=-1}if(t===0){if(t=10,a===48){if(++i===o)return u.__zero();if(a=e.charCodeAt(i),a===88||a===120){if(t=16,++i===o)return null;a=e.charCodeAt(i)}else if(a===79||a===111){if(t=8,++i===o)return null;a=e.charCodeAt(i)}else if(a===66||a===98){if(t=2,++i===o)return null;a=e.charCodeAt(i)}}}else if(t===16&&a===48){if(++i===o)return u.__zero();if(a=e.charCodeAt(i),a===88||a===120){if(++i===o)return null;a=e.charCodeAt(i)}}if(r!=0&&t!==10)return null;for(;a===48;){if(++i===o)return u.__zero();a=e.charCodeAt(i)}const s=o-i;let c=u.__kMaxBitsPerChar[t],l=u.__kBitsPerCharTableMultiplier-1;if(s>1073741824/c)return null;const d=c*s+l>>>u.__kBitsPerCharTableShift,m=new u(0|(d+29)/30,!1),f=10>t?t:10,g=10<t?t-10:0;if((t&t-1)==0){c>>=u.__kBitsPerCharTableShift;const y=[],p=[];let w=!1;do{let T=0,M=0;for(;;){let x;if(a-48>>>0<f)x=a-48;else if((32|a)-97>>>0<g)x=(32|a)-87;else{w=!0;break}if(M+=c,T=T<<c|x,++i===o){w=!0;break}if(a=e.charCodeAt(i),30<M+c)break}y.push(T),p.push(M)}while(!w);u.__fillFromParts(m,y,p)}else{m.__initializeDigits();let y=!1,p=0;do{let w=0,T=1;for(;;){let x;if(a-48>>>0<f)x=a-48;else if((32|a)-97>>>0<g)x=(32|a)-87;else{y=!0;break}const k=T*t;if(1073741823<k)break;if(T=k,w=w*t+x,p++,++i===o){y=!0;break}a=e.charCodeAt(i)}l=30*u.__kBitsPerCharTableMultiplier-1;const M=0|(c*p+l>>>u.__kBitsPerCharTableShift)/30;m.__inplaceMultiplyAdd(T,w,M)}while(!y)}if(i!==o){if(!u.__isWhitespace(a))return null;for(i++;i<o;i++)if(a=e.charCodeAt(i),!u.__isWhitespace(a))return null}return m.sign=r==-1,m.__trim()}static __fillFromParts(e,t,r){let o=0,i=0,a=0;for(let s=t.length-1;0<=s;s--){const c=t[s],l=r[s];i|=c<<a,a+=l,a===30?(e.__setDigit(o++,i),a=0,i=0):30<a&&(e.__setDigit(o++,1073741823&i),a-=30,i=c>>>l-a)}if(i!==0){if(o>=e.length)throw new Error("implementation bug");e.__setDigit(o++,i)}for(;o<e.length;o++)e.__setDigit(o,0)}static __toStringBasePowerOfTwo(e,t){const r=e.length;let o=t-1;o=(85&o>>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o);const i=o,a=t-1,s=e.__digit(r-1),c=u.__clz30(s);let l=0|(30*r-c+i-1)/i;if(e.sign&&l++,268435456<l)throw new Error("string too long");const d=Array(l);let m=l-1,f=0,g=0;for(let p=0;p<r-1;p++){const w=e.__digit(p),T=(f|w<<g)&a;d[m--]=u.__kConversionChars[T];const M=i-g;for(f=w>>>M,g=30-M;g>=i;)d[m--]=u.__kConversionChars[f&a],f>>>=i,g-=i}const y=(f|s<<g)&a;for(d[m--]=u.__kConversionChars[y],f=s>>>i-g;f!==0;)d[m--]=u.__kConversionChars[f&a],f>>>=i;if(e.sign&&(d[m--]="-"),m!=-1)throw new Error("implementation bug");return d.join("")}static __toStringGeneric(e,t,r){const o=e.length;if(o===0)return"";if(o===1){let p=e.__unsignedDigit(0).toString(t);return r===!1&&e.sign&&(p="-"+p),p}const i=30*o-u.__clz30(e.__digit(o-1)),a=u.__kMaxBitsPerChar[t],s=a-1;let c=i*u.__kBitsPerCharTableMultiplier;c+=s-1,c=0|c/s;const l=c+1>>1,d=u.exponentiate(u.__oneDigit(t,!1),u.__oneDigit(l,!1));let m,f;const g=d.__unsignedDigit(0);if(d.length===1&&32767>=g){m=new u(e.length,!1),m.__initializeDigits();let p=0;for(let w=2*e.length-1;0<=w;w--){const T=p<<15|e.__halfDigit(w);m.__setHalfDigit(w,0|T/g),p=0|T%g}f=p.toString(t)}else{const p=u.__absoluteDivLarge(e,d,!0,!0);m=p.quotient;const w=p.remainder.__trim();f=u.__toStringGeneric(w,t,!0)}m.__trim();let y=u.__toStringGeneric(m,t,!0);for(;f.length<l;)f="0"+f;return r===!1&&e.sign&&(y="-"+y),y+f}static __unequalSign(e){return e?-1:1}static __absoluteGreater(e){return e?-1:1}static __absoluteLess(e){return e?1:-1}static __compareToBigInt(e,t){const r=e.sign;if(r!==t.sign)return u.__unequalSign(r);const o=u.__absoluteCompare(e,t);return 0<o?u.__absoluteGreater(r):0>o?u.__absoluteLess(r):0}static __compareToNumber(e,t){if(u.__isOneDigitInt(t)){const r=e.sign,o=0>t;if(r!==o)return u.__unequalSign(r);if(e.length===0){if(o)throw new Error("implementation bug");return t===0?0:-1}if(1<e.length)return u.__absoluteGreater(r);const i=Math.abs(t),a=e.__unsignedDigit(0);return a>i?u.__absoluteGreater(r):a<i?u.__absoluteLess(r):0}return u.__compareToDouble(e,t)}static __compareToDouble(e,t){if(t!==t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;const r=e.sign;if(r!==0>t)return u.__unequalSign(r);if(t===0)throw new Error("implementation bug: should be handled elsewhere");if(e.length===0)return-1;u.__kBitConversionDouble[0]=t;const o=2047&u.__kBitConversionInts[u.__kBitConversionIntHigh]>>>20;if(o==2047)throw new Error("implementation bug: handled elsewhere");const i=o-1023;if(0>i)return u.__absoluteGreater(r);const a=e.length;let s=e.__digit(a-1);const c=u.__clz30(s),l=30*a-c,d=i+1;if(l<d)return u.__absoluteLess(r);if(l>d)return u.__absoluteGreater(r);let m=1048576|1048575&u.__kBitConversionInts[u.__kBitConversionIntHigh],f=u.__kBitConversionInts[u.__kBitConversionIntLow];const g=20,y=29-c;if(y!==(0|(l-1)%30))throw new Error("implementation bug");let p,w=0;if(20>y){const T=g-y;w=T+32,p=m>>>T,m=m<<32-T|f>>>T,f<<=32-T}else if(y===20)w=32,p=m,m=f,f=0;else{const T=y-g;w=32-T,p=m<<T|f>>>32-T,m=f<<T,f=0}if(s>>>=0,p>>>=0,s>p)return u.__absoluteGreater(r);if(s<p)return u.__absoluteLess(r);for(let T=a-2;0<=T;T--){0<w?(w-=30,p=m>>>2,m=m<<30|f>>>2,f<<=30):p=0;const M=e.__unsignedDigit(T);if(M>p)return u.__absoluteGreater(r);if(M<p)return u.__absoluteLess(r)}if(m!==0||f!==0){if(w===0)throw new Error("implementation bug");return u.__absoluteLess(r)}return 0}static __equalToNumber(e,t){var r=Math.abs;return u.__isOneDigitInt(t)?t===0?e.length===0:e.length===1&&e.sign===0>t&&e.__unsignedDigit(0)===r(t):u.__compareToDouble(e,t)===0}static __comparisonResultToBool(e,t){return t===0?0>e:t===1?0>=e:t===2?0<e:t===3?0<=e:void 0}static __compare(e,t,r){if(e=u.__toPrimitive(e),t=u.__toPrimitive(t),typeof e=="string"&&typeof t=="string")switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(u.__isBigInt(e)&&typeof t=="string")return t=u.__fromString(t),t!==null&&u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(typeof e=="string"&&u.__isBigInt(t))return e=u.__fromString(e),e!==null&&u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(e=u.__toNumeric(e),t=u.__toNumeric(t),u.__isBigInt(e)){if(u.__isBigInt(t))return u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(typeof t!="number")throw new Error("implementation bug");return u.__comparisonResultToBool(u.__compareToNumber(e,t),r)}if(typeof e!="number")throw new Error("implementation bug");if(u.__isBigInt(t))return u.__comparisonResultToBool(u.__compareToNumber(t,e),2^r);if(typeof t!="number")throw new Error("implementation bug");return r===0?e<t:r===1?e<=t:r===2?e>t:r===3?e>=t:void 0}__clzmsd(){return u.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,r){if(e.length<t.length)return u.__absoluteAdd(t,e,r);if(e.length===0)return e;if(t.length===0)return e.sign===r?e:u.unaryMinus(e);let o=e.length;(e.__clzmsd()===0||t.length===e.length&&t.__clzmsd()===0)&&o++;const i=new u(o,r);let a=0,s=0;for(;s<t.length;s++){const c=e.__digit(s)+t.__digit(s)+a;a=c>>>30,i.__setDigit(s,1073741823&c)}for(;s<e.length;s++){const c=e.__digit(s)+a;a=c>>>30,i.__setDigit(s,1073741823&c)}return s<i.length&&i.__setDigit(s,a),i.__trim()}static __absoluteSub(e,t,r){if(e.length===0)return e;if(t.length===0)return e.sign===r?e:u.unaryMinus(e);const o=new u(e.length,r);let i=0,a=0;for(;a<t.length;a++){const s=e.__digit(a)-t.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}for(;a<e.length;a++){const s=e.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}return o.__trim()}static __absoluteAddOne(e,t,r=null){const o=e.length;r===null?r=new u(o,t):r.sign=t;let i=1;for(let a=0;a<o;a++){const s=e.__digit(a)+i;i=s>>>30,r.__setDigit(a,1073741823&s)}return i!=0&&r.__setDigitGrow(o,1),r}static __absoluteSubOne(e,t){const r=e.length;t=t||r;const o=new u(t,!1);let i=1;for(let a=0;a<r;a++){const s=e.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}if(i!=0)throw new Error("implementation bug");for(let a=r;a<t;a++)o.__setDigit(a,0);return o}static __absoluteAnd(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=a;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)&t.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteAndNot(e,t,r=null){const o=e.length,i=t.length;let a=i;o<i&&(a=o);let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)&~t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteOr(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)|t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteXor(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)^t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteCompare(e,t){const r=e.length-t.length;if(r!=0)return r;let o=e.length-1;for(;0<=o&&e.__digit(o)===t.__digit(o);)o--;return 0>o?0:e.__unsignedDigit(o)>t.__unsignedDigit(o)?1:-1}static __multiplyAccumulate(e,t,r,o){if(t===0)return;const i=32767&t,a=t>>>15;let s=0,c=0;for(let l,d=0;d<e.length;d++,o++){l=r.__digit(o);const m=e.__digit(d),f=32767&m,g=m>>>15,y=u.__imul(f,i),p=u.__imul(f,a),w=u.__imul(g,i),T=u.__imul(g,a);l+=c+y+s,s=l>>>30,l&=1073741823,l+=((32767&p)<<15)+((32767&w)<<15),s+=l>>>30,c=T+(p>>>15)+(w>>>15),r.__setDigit(o,1073741823&l)}for(;s!=0||c!==0;o++){let l=r.__digit(o);l+=s+c,c=0,s=l>>>30,r.__setDigit(o,1073741823&l)}}static __internalMultiplyAdd(e,t,r,o,i){let a=r,s=0;for(let c=0;c<o;c++){const l=e.__digit(c),d=u.__imul(32767&l,t),m=u.__imul(l>>>15,t),f=d+((32767&m)<<15)+s+a;a=f>>>30,s=m>>>15,i.__setDigit(c,1073741823&f)}if(i.length>o)for(i.__setDigit(o++,a+s);o<i.length;)i.__setDigit(o++,0);else if(a+s!==0)throw new Error("implementation bug")}__inplaceMultiplyAdd(e,t,r){r>this.length&&(r=this.length);const o=32767&e,i=e>>>15;let a=0,s=t;for(let c=0;c<r;c++){const l=this.__digit(c),d=32767&l,m=l>>>15,f=u.__imul(d,o),g=u.__imul(d,i),y=u.__imul(m,o),p=u.__imul(m,i);let w=s+f+a;a=w>>>30,w&=1073741823,w+=((32767&g)<<15)+((32767&y)<<15),a+=w>>>30,s=p+(g>>>15)+(y>>>15),this.__setDigit(c,1073741823&w)}if(a!=0||s!==0)throw new Error("implementation bug")}static __absoluteDivSmall(e,t,r=null){r===null&&(r=new u(e.length,!1));let o=0;for(let i,a=2*e.length-1;0<=a;a-=2){i=(o<<15|e.__halfDigit(a))>>>0;const s=0|i/t;o=0|i%t,i=(o<<15|e.__halfDigit(a-1))>>>0;const c=0|i/t;o=0|i%t,r.__setDigit(a>>>1,s<<15|c)}return r}static __absoluteModSmall(e,t){let r=0;for(let o=2*e.length-1;0<=o;o--)r=0|((r<<15|e.__halfDigit(o))>>>0)%t;return r}static __absoluteDivLarge(e,t,r,o){const i=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-i;let c=null;r&&(c=new u(s+2>>>1,!1),c.__initializeDigits());const l=new u(i+2>>>1,!1);l.__initializeDigits();const d=u.__clz15(t.__halfDigit(i-1));0<d&&(t=u.__specialLeftShift(t,d,0));const m=u.__specialLeftShift(e,d,1),f=t.__halfDigit(i-1);let g=0;for(let y,p=s;0<=p;p--){y=32767;const w=m.__halfDigit(p+i);if(w!==f){const M=(w<<15|m.__halfDigit(p+i-1))>>>0;y=0|M/f;let x=0|M%f;const k=t.__halfDigit(i-2),$=m.__halfDigit(p+i-2);for(;u.__imul(y,k)>>>0>(x<<16|$)>>>0&&(y--,x+=f,!(32767<x)););}u.__internalMultiplyAdd(t,y,0,a,l);let T=m.__inplaceSub(l,p,i+1);T!==0&&(T=m.__inplaceAdd(t,p,i),m.__setHalfDigit(p+i,32767&m.__halfDigit(p+i)+T),y--),r&&(1&p?g=y<<15:c.__setDigit(p>>>1,g|y))}if(o)return m.__inplaceRightShift(d),r?{quotient:c,remainder:m}:m;if(r)return c;throw new Error("unreachable")}static __clz15(e){return u.__clz30(e)-15}__inplaceAdd(e,t,r){let o=0;for(let i=0;i<r;i++){const a=this.__halfDigit(t+i)+e.__halfDigit(i)+o;o=a>>>15,this.__setHalfDigit(t+i,32767&a)}return o}__inplaceSub(e,t,r){let o=0;if(1&t){t>>=1;let i=this.__digit(t),a=32767&i,s=0;for(;s<r-1>>>1;s++){const d=e.__digit(s),m=(i>>>15)-(32767&d)-o;o=1&m>>>15,this.__setDigit(t+s,(32767&m)<<15|32767&a),i=this.__digit(t+s+1),a=(32767&i)-(d>>>15)-o,o=1&a>>>15}const c=e.__digit(s),l=(i>>>15)-(32767&c)-o;if(o=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&a),t+s+1>=this.length)throw new RangeError("out of bounds");(1&r)==0&&(i=this.__digit(t+s+1),a=(32767&i)-(c>>>15)-o,o=1&a>>>15,this.__setDigit(t+e.length,1073709056&i|32767&a))}else{t>>=1;let i=0;for(;i<e.length-1;i++){const d=this.__digit(t+i),m=e.__digit(i),f=(32767&d)-(32767&m)-o;o=1&f>>>15;const g=(d>>>15)-(m>>>15)-o;o=1&g>>>15,this.__setDigit(t+i,(32767&g)<<15|32767&f)}const a=this.__digit(t+i),s=e.__digit(i),c=(32767&a)-(32767&s)-o;o=1&c>>>15;let l=0;(1&r)==0&&(l=(a>>>15)-(s>>>15)-o,o=1&l>>>15),this.__setDigit(t+i,(32767&l)<<15|32767&c)}return o}__inplaceRightShift(e){if(e===0)return;let t=this.__digit(0)>>>e;const r=this.length-1;for(let o=0;o<r;o++){const i=this.__digit(o+1);this.__setDigit(o,1073741823&i<<30-e|t),t=i>>>e}this.__setDigit(r,t)}static __specialLeftShift(e,t,r){const o=e.length,i=new u(o+r,!1);if(t===0){for(let s=0;s<o;s++)i.__setDigit(s,e.__digit(s));return 0<r&&i.__setDigit(o,0),i}let a=0;for(let s=0;s<o;s++){const c=e.__digit(s);i.__setDigit(s,1073741823&c<<t|a),a=c>>>30-t}return 0<r&&i.__setDigit(o,a),i}static __leftShiftByAbsolute(e,t){const r=u.__toShiftAmount(t);if(0>r)throw new RangeError("BigInt too big");const o=0|r/30,i=r%30,a=e.length,s=i!==0&&e.__digit(a-1)>>>30-i!=0,c=a+o+(s?1:0),l=new u(c,e.sign);if(i===0){let d=0;for(;d<o;d++)l.__setDigit(d,0);for(;d<c;d++)l.__setDigit(d,e.__digit(d-o))}else{let d=0;for(let m=0;m<o;m++)l.__setDigit(m,0);for(let m=0;m<a;m++){const f=e.__digit(m);l.__setDigit(m+o,1073741823&f<<i|d),d=f>>>30-i}if(s)l.__setDigit(a+o,d);else if(d!==0)throw new Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(e,t){const r=e.length,o=e.sign,i=u.__toShiftAmount(t);if(0>i)return u.__rightShiftByMaximum(o);const a=0|i/30,s=i%30;let c=r-a;if(0>=c)return u.__rightShiftByMaximum(o);let l=!1;if(o){if((e.__digit(a)&(1<<s)-1)!=0)l=!0;else for(let m=0;m<a;m++)if(e.__digit(m)!==0){l=!0;break}}l&&s===0&&~e.__digit(r-1)==0&&c++;let d=new u(c,o);if(s===0){d.__setDigit(c-1,0);for(let m=a;m<r;m++)d.__setDigit(m-a,e.__digit(m))}else{let m=e.__digit(a)>>>s;const f=r-a-1;for(let g=0;g<f;g++){const y=e.__digit(g+a+1);d.__setDigit(g,1073741823&y<<30-s|m),m=y>>>s}d.__setDigit(f,m)}return l&&(d=u.__absoluteAddOne(d,!0,d)),d.__trim()}static __rightShiftByMaximum(e){return e?u.__oneDigit(1,!0):u.__zero()}static __toShiftAmount(e){if(1<e.length)return-1;const t=e.__unsignedDigit(0);return t>u.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if(typeof e!="object"||e.constructor===u)return e;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"&&e[Symbol.toPrimitive]){const i=e[Symbol.toPrimitive](t);if(typeof i!="object")return i;throw new TypeError("Cannot convert object to primitive value")}const r=e.valueOf;if(r){const i=r.call(e);if(typeof i!="object")return i}const o=e.toString;if(o){const i=o.call(e);if(typeof i!="object")return i}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return u.__isBigInt(e)?e:+e}static __isBigInt(e){return typeof e=="object"&&e!==null&&e.constructor===u}static __truncateToNBits(e,t){const r=0|(e+29)/30,o=new u(r,t.sign),i=r-1;for(let s=0;s<i;s++)o.__setDigit(s,t.__digit(s));let a=t.__digit(i);if(e%30!=0){const s=32-e%30;a=a<<s>>>s}return o.__setDigit(i,a),o.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,r){var o=Math.min;const i=0|(e+29)/30,a=new u(i,r);let s=0;const c=i-1;let l=0;for(const g=o(c,t.length);s<g;s++){const y=0-t.__digit(s)-l;l=1&y>>>30,a.__setDigit(s,1073741823&y)}for(;s<c;s++)a.__setDigit(s,0|1073741823&-l);let d=c<t.length?t.__digit(c):0;const m=e%30;let f;if(m==0)f=0-d-l,f&=1073741823;else{const g=32-m;d=d<<g>>>g;const y=1<<32-g;f=y-d-l,f&=y-1}return a.__setDigit(c,f),a.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){const e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){const r=e>>>1,o=this.__digit(r),i=1&e?32767&o|t<<15:1073709056&o|32767&t;this.__setDigit(r,i)}static __digitPow(e,t){let r=1;for(;0<t;)1&t&&(r*=e),t>>>=1,e*=e;return r}static __detectBigEndian(){return u.__kBitConversionDouble[0]=-0,u.__kBitConversionInts[0]!==0}static __isOneDigitInt(e){return(1073741823&e)===e}}u.__kMaxLength=33554432,u.__kMaxLengthBits=u.__kMaxLength<<5,u.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],u.__kBitsPerCharTableShift=5,u.__kBitsPerCharTableMultiplier=1<<u.__kBitsPerCharTableShift,u.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],u.__kBitConversionBuffer=new ArrayBuffer(8),u.__kBitConversionDouble=new Float64Array(u.__kBitConversionBuffer),u.__kBitConversionInts=new Int32Array(u.__kBitConversionBuffer),u.__kBitConversionIntHigh=u.__detectBigEndian()?0:1,u.__kBitConversionIntLow=u.__detectBigEndian()?1:0,u.__clz30=Math.clz32?function(n){return Math.clz32(n)-2}:function(n){return n===0?30:0|29-(0|Math.log(n>>>0)/Math.LN2)},u.__imul=Math.imul||function(n,e){return 0|n*e};const Se=u.BigInt(0),tr=u.BigInt(1),Qo=u.BigInt(2),Is=u.BigInt(10),Ls=u.BigInt(24),As=u.BigInt(60),Us=u.BigInt(1e3),mr=u.BigInt(1e6),Qn=u.BigInt(1e9),ca=u.multiply(u.BigInt(3600),Qn),Fs=u.multiply(As,Qn),Yt=u.multiply(ca,Ls);function ft(n){return typeof n=="bigint"?u.BigInt(n.toString(10)):n}function la(n){return u.equal(u.remainder(n,Qo),Se)}function St(n){return u.lessThan(n,Se)?u.unaryMinus(n):n}function Fr(n,e){return u.lessThan(n,e)?-1:u.greaterThan(n,e)?1:0}function Sn(n,e){return{quotient:u.divide(n,e),remainder:u.remainder(n,e)}}var _i,Di;const O="slot-epochNanoSeconds",j="slot-iso-date",q="slot-iso-date-time",G="slot-time",D="slot-calendar",ua="slot-date-brand",da="slot-year-month-brand",ha="slot-month-day-brand",F="slot-time-zone",be="slot-years",Te="slot-months",Re="slot-weeks",_e="slot-days",De="slot-hours",Ee="slot-minutes",Me="slot-seconds",xe="slot-milliseconds",Ce="slot-microseconds",Ye="slot-nanoseconds",ma="date",fa="ym",ga="md",ya="time",pa="datetime",wa="instant",Bt="original",un="timezone-canonical",xo="timezone-original",zn="calendar-id",va="locale",Co="options",ba=new WeakMap,ko=Symbol.for("@@Temporal__GetSlots");(_i=globalThis)[ko]||(_i[ko]=function(n){return ba.get(n)});const to=globalThis[ko],Oo=Symbol.for("@@Temporal__CreateSlots");(Di=globalThis)[Oo]||(Di[Oo]=function(n){ba.set(n,Object.create(null))});const Mt=globalThis[Oo];function Ne(n,...e){if(!n||typeof n!="object")return!1;const t=to(n);return!!t&&e.every((r=>r in t))}function h(n,e){const t=to(n)?.[e];if(t===void 0)throw new TypeError(`Missing internal slot ${e}`);return t}function P(n,e,t){const r=to(n);if(r===void 0)throw new TypeError("Missing slots for the given container");if(r[e])throw new TypeError(`${e} already has set`);r[e]=t}const jo={};function xt(n,e){Object.defineProperty(n.prototype,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0});const t=Object.getOwnPropertyNames(n);for(let o=0;o<t.length;o++){const i=t[o],a=Object.getOwnPropertyDescriptor(n,i);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n,i,a))}const r=Object.getOwnPropertyNames(n.prototype);for(let o=0;o<r.length;o++){const i=r[o],a=Object.getOwnPropertyDescriptor(n.prototype,i);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n.prototype,i,a))}$o(e,n),$o(`${e}.prototype`,n.prototype)}function $o(n,e){const t=`%${n}%`;if(jo[t]!==void 0)throw new Error(`intrinsic ${n} already exists`);jo[t]=e}function ue(n){return jo[n]}function hn(n,e){let t=n;if(t===0)return{div:t,mod:t};const r=Math.sign(t);t=Math.abs(t);const o=Math.trunc(1+Math.log10(t));if(e>=o)return{div:0*r,mod:r*t};if(e===0)return{div:r*t,mod:0*r};const i=t.toPrecision(o);return{div:r*Number.parseInt(i.slice(0,o-e),10),mod:r*Number.parseInt(i.slice(o-e),10)}}function vo(n,e,t){let r=n,o=t;if(r===0)return o;const i=Math.sign(r)||Math.sign(o);r=Math.abs(r),o=Math.abs(o);const a=r.toPrecision(Math.trunc(1+Math.log10(r)));if(o===0)return i*Number.parseInt(a+"0".repeat(e),10);const s=a+o.toPrecision(Math.trunc(1+Math.log10(o))).padStart(e,"0");return i*Number.parseInt(s,10)}function no(n,e){const t=e==="negative";switch(n){case"ceil":return t?"zero":"infinity";case"floor":return t?"infinity":"zero";case"expand":return"infinity";case"trunc":return"zero";case"halfCeil":return t?"half-zero":"half-infinity";case"halfFloor":return t?"half-infinity":"half-zero";case"halfExpand":return"half-infinity";case"halfTrunc":return"half-zero";case"halfEven":return"half-even"}}function ro(n,e,t,r,o){return o==="zero"?n:o==="infinity"?e:t<0?n:t>0?e:o==="half-zero"?n:o==="half-infinity"?e:r?n:e}class Y{constructor(e){this.totalNs=ft(e),this.sec=u.toNumber(u.divide(this.totalNs,Qn)),this.subsec=u.toNumber(u.remainder(this.totalNs,Qn))}static validateNew(e,t){if(u.greaterThan(St(e),Y.MAX))throw new RangeError(`${t} of duration time units cannot exceed ${Y.MAX} s`);return new Y(e)}static fromEpochNsDiff(e,t){const r=u.subtract(ft(e),ft(t));return new Y(r)}static fromComponents(e,t,r,o,i,a){const s=u.add(u.add(u.add(u.add(u.add(u.BigInt(a),u.multiply(u.BigInt(i),Us)),u.multiply(u.BigInt(o),mr)),u.multiply(u.BigInt(r),Qn)),u.multiply(u.BigInt(t),Fs)),u.multiply(u.BigInt(e),ca));return Y.validateNew(s,"total")}abs(){return new Y(St(this.totalNs))}add(e){return Y.validateNew(u.add(this.totalNs,e.totalNs),"sum")}add24HourDays(e){return Y.validateNew(u.add(this.totalNs,u.multiply(u.BigInt(e),Yt)),"sum")}addToEpochNs(e){return u.add(ft(e),this.totalNs)}cmp(e){return Fr(this.totalNs,e.totalNs)}divmod(e){const{quotient:t,remainder:r}=Sn(this.totalNs,u.BigInt(e));return{quotient:u.toNumber(t),remainder:new Y(r)}}fdiv(e){const t=ft(e),r=u.BigInt(t);let{quotient:o,remainder:i}=Sn(this.totalNs,r);const a=[];let s;const c=(u.lessThan(this.totalNs,Se)?-1:1)*Math.sign(u.toNumber(t));for(;!u.equal(i,Se)&&a.length<50;)i=u.multiply(i,Is),{quotient:s,remainder:i}=Sn(i,r),a.push(Math.abs(u.toNumber(s)));return c*+(St(o).toString()+"."+a.join(""))}isZero(){return u.equal(this.totalNs,Se)}round(e,t){const r=ft(e);if(u.equal(r,tr))return this;const{quotient:o,remainder:i}=Sn(this.totalNs,r),a=u.lessThan(this.totalNs,Se)?"negative":"positive",s=u.multiply(St(o),r),c=u.add(s,r),l=Fr(St(u.multiply(i,Qo)),r),d=no(t,a),m=u.equal(St(this.totalNs),s)?s:ro(s,c,l,la(o),d),f=a==="positive"?m:u.unaryMinus(m);return Y.validateNew(f,"rounding")}sign(){return this.cmp(new Y(Se))}subtract(e){return Y.validateNew(u.subtract(this.totalNs,e.totalNs),"difference")}}Y.MAX=u.BigInt("9007199254740991999999999"),Y.ZERO=new Y(Se);const Ei=/[A-Za-z._][A-Za-z._0-9+-]*/,fr=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Ei.source})(?:\\/(?:${Ei.source}))*)`),Ta=/(?:[+-]\d{6}|\d{4})/,Sr=/(?:0[1-9]|1[0-2])/,No=/(?:0[1-9]|[12]\d|3[01])/,Ss=new RegExp(`(${Ta.source})(?:-(${Sr.source})-(${No.source})|(${Sr.source})(${No.source}))`),_a=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,Da=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Ea=new RegExp(`([zZ])|${Da.source}?`),pn=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,zs=new RegExp([`^${Ss.source}`,`(?:(?:[tT]|\\s+)${_a.source}(?:${Ea.source})?)?`,`(?:\\[!?(${fr.source})\\])?`,`((?:${pn.source})*)$`].join("")),Zs=new RegExp([`^[tT]?${_a.source}`,`(?:${Ea.source})?`,`(?:\\[!?${fr.source}\\])?`,`((?:${pn.source})*)$`].join("")),qs=new RegExp(`^(${Ta.source})-?(${Sr.source})(?:\\[!?${fr.source}\\])?((?:${pn.source})*)$`),Ws=new RegExp(`^(?:--)?(${Sr.source})-?(${No.source})(?:\\[!?${fr.source}\\])?((?:${pn.source})*)$`),bo=/(\d+)(?:[.,](\d{1,9}))?/,Hs=new RegExp(`(?:${bo.source}H)?(?:${bo.source}M)?(?:${bo.source}S)?`),Gs=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${Hs.source})?$`,"i"),It=864e5,zr=1e6*It,Vs=6e10,Ma=1e8*It,wn=it(Ma),nr=u.unaryMinus(wn),Qs=u.add(u.subtract(nr,Yt),tr),Xs=u.subtract(u.add(wn,Yt),tr),Ks=146097*It,Mi=-271821,xi=275760,Xn=Date.UTC(1847,0,1),Bs=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","ethiopic-amete-alem","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"],Js=new Set(["ACT","AET","AGT","ART","AST","BET","BST","CAT","CNT","CST","CTT","EAT","ECT","IET","IST","JST","MIT","NET","NST","PLT","PNT","PRT","PST","SST","VST"]);function V(n){return typeof n=="object"&&n!==null||typeof n=="function"}function oo(n){if(typeof n=="bigint")throw new TypeError("Cannot convert BigInt to number");return Number(n)}function io(n){if(typeof n=="symbol")throw new TypeError("Cannot convert a Symbol value to a String");return String(n)}function N(n){const e=oo(n);if(e===0)return 0;if(Number.isNaN(e)||e===1/0||e===-1/0)throw new RangeError("invalid number value");const t=Math.trunc(e);return t===0?0:t}function Ci(n,e){const t=N(n);if(t<=0)throw e!==void 0?new RangeError(`property '${e}' cannot be a a number less than one`):new RangeError("Cannot convert a number less than one to a positive integer");return t}function Be(n){const e=oo(n);if(Number.isNaN(e))throw new RangeError("not a number");if(e===1/0||e===-1/0)throw new RangeError("infinity is out of range");if(!(function(t){if(typeof t!="number"||Number.isNaN(t)||t===1/0||t===-1/0)return!1;const r=Math.abs(t);return Math.floor(r)===r})(e))throw new RangeError(`unsupported fractional value ${n}`);return e===0?0:e}function rr(n,e){return String(n).padStart(e,"0")}function re(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function Po(n,e){if(V(n)){const t=n?.toString();if(typeof t=="string"||typeof t=="number")return t;throw new TypeError("Cannot convert object to primitive value")}return n}const Ro=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],ec={era:io,eraYear:N,year:N,month:Ci,monthCode:function(n){const e=re(Po(n));if(e.length<3||e.length>4||e[0]!=="M"||"0123456789".indexOf(e[1])===-1||"0123456789".indexOf(e[2])===-1||e[1]+e[2]==="00"&&e[3]!=="L"||e[3]!=="L"&&e[3]!==void 0)throw new RangeError(`bad month code ${e}; must match M01-M99 or M00L-M99L`);return e},day:Ci,hour:N,minute:N,second:N,millisecond:N,microsecond:N,nanosecond:N,offset:function(n){const e=re(Po(n));return jn(e),e},timeZone:je},tc={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},vn=[["years","year","date"],["months","month","date"],["weeks","week","date"],["days","day","date"],["hours","hour","time"],["minutes","minute","time"],["seconds","second","time"],["milliseconds","millisecond","time"],["microseconds","microsecond","time"],["nanoseconds","nanosecond","time"]],ki=Object.fromEntries(vn.map((n=>[n[0],n[1]]))),nc=Object.fromEntries(vn.map((([n,e])=>[e,n]))),Kn=vn.map((([,n])=>n)),bn={day:zr,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},Zr=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],rc=Intl.DateTimeFormat,Oi=new Map;function xa(n){const e=cr(n);let t=Oi.get(e);return t===void 0&&(t=new rc("en-us",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Oi.set(e,t)),t}function se(n){return Ne(n,O)&&!Ne(n,F,D)}function W(n){return Ne(n,be,Te,_e,De,Ee,Me,xe,Ce,Ye)}function H(n){return Ne(n,ua)}function K(n){return Ne(n,G)}function Z(n){return Ne(n,q)}function ce(n){return Ne(n,da)}function Fe(n){return Ne(n,ha)}function R(n){return Ne(n,O,F,D)}function v(n,e){if(!e(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Cn(n){if(Ne(n,D)||Ne(n,F))throw new TypeError("with() does not support a calendar or timeZone property");if(K(n))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(n.calendar!==void 0)throw new TypeError("with() does not support a calendar property");if(n.timeZone!==void 0)throw new TypeError("with() does not support a timeZone property")}function gr(n,e){return e==="never"||e==="auto"&&n==="iso8601"?"":`[${e==="critical"?"!":""}u-ca=${n}]`}function ao(n){let e,t,r=!1;for(pn.lastIndex=0;t=pn.exec(n);){const{1:o,2:i,3:a}=t;if(i==="u-ca"){if(e===void 0)e=a,r=o==="!";else if(o==="!"||r)throw new RangeError(`Invalid annotations in ${n}: more than one u-ca present with critical flag`)}else if(o==="!")throw new RangeError(`Unrecognized annotation: !${i}=${a}`)}return e}function ut(n){const e=zs.exec(n);if(!e)throw new RangeError(`invalid RFC 9557 string: ${n}`);const t=ao(e[16]);let r=e[1];if(r==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);const o=+r,i=+(e[2]??e[4]??1),a=+(e[3]??e[5]??1),s=e[6]!==void 0,c=+(e[6]??0),l=+(e[7]??e[10]??0);let d=+(e[8]??e[11]??0);d===60&&(d=59);const m=(e[9]??e[12]??"")+"000000000",f=+m.slice(0,3),g=+m.slice(3,6),y=+m.slice(6,9);let p,w=!1;e[13]?(p=void 0,w=!0):e[14]&&(p=e[14]);const T=e[15];return ti(o,i,a,c,l,d,f,g,y),{year:o,month:i,day:a,time:s?{hour:c,minute:l,second:d,millisecond:f,microsecond:g,nanosecond:y}:"start-of-day",tzAnnotation:T,offset:p,z:w,calendar:t}}function Ca(n){const e=Zs.exec(n);let t,r,o,i,a,s,c;if(e){c=ao(e[10]),t=+(e[1]??0),r=+(e[2]??e[5]??0),o=+(e[3]??e[6]??0),o===60&&(o=59);const l=(e[4]??e[7]??"")+"000000000";if(i=+l.slice(0,3),a=+l.slice(3,6),s=+l.slice(6,9),e[8])throw new RangeError("Z designator not supported for PlainTime")}else{let l,d;if({time:l,z:d,calendar:c}=ut(n),l==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(d)throw new RangeError("Z designator not supported for PlainTime");({hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s}=l)}if(uo(t,r,o,i,a,s),/[tT ][0-9][0-9]/.test(n))return{hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s,calendar:c};try{const{month:l,day:d}=Ko(n);Gt(1972,l,d)}catch{try{const{year:l,month:d}=Xo(n);Gt(l,d,1)}catch{return{hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s,calendar:c}}}throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`)}function Xo(n){const e=qs.exec(n);let t,r,o,i;if(e){o=ao(e[3]);let a=e[1];if(a==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);if(t=+a,r=+e[2],i=1,o!==void 0&&o!=="iso8601")throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let a;if({year:t,month:r,calendar:o,day:i,z:a}=ut(n),a)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:t,month:r,calendar:o,referenceISODay:i}}function Ko(n){const e=Ws.exec(n);let t,r,o,i;if(e){if(o=ao(e[3]),t=+e[1],r=+e[2],o!==void 0&&o!=="iso8601")throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let a;if({month:t,day:r,calendar:o,year:i,z:a}=ut(n),a)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:t,day:r,calendar:o,referenceISOYear:i}}const ka=new RegExp(`^${fr.source}$`,"i"),Oa=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function ja(n){const e=ic.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${e}: ${n}`)}function Rt(n){return ka.test(n)||ja(n),Oa.test(n)?{offsetMinutes:jn(n)/6e10}:{tzName:n}}function Bn(n,e,t,r){let o=n,i=e,a=t;switch(r){case"reject":Gt(o,i,a);break;case"constrain":({year:o,month:i,day:a}=Ga(o,i,a))}return{year:o,month:i,day:a}}function so(n,e,t,r,o,i,a){let s=n,c=e,l=t,d=r,m=o,f=i;switch(a){case"reject":uo(s,c,l,d,m,f);break;case"constrain":s=ke(s,0,23),c=ke(c,0,59),l=ke(l,0,59),d=ke(d,0,999),m=ke(m,0,999),f=ke(f,0,999)}return{hour:s,minute:c,second:l,millisecond:d,microsecond:m,nanosecond:f}}function $a(n){if(!V(n))throw new TypeError("invalid duration-like");const e={years:void 0,months:void 0,weeks:void 0,days:void 0,hours:void 0,minutes:void 0,seconds:void 0,milliseconds:void 0,microseconds:void 0,nanoseconds:void 0};let t=!1;for(let r=0;r<Zr.length;r++){const o=Zr[r],i=n[o];i!==void 0&&(t=!0,e[o]=Be(i))}if(!t)throw new TypeError("invalid duration-like");return e}function fe({years:n,months:e,weeks:t,days:r},o,i,a){return{years:n,months:a??e,weeks:i??t,days:o??r}}function U(n,e){return{isoDate:n,time:e}}function L(n){return Tt(n,"overflow",["constrain","reject"],"constrain")}function Jn(n){return Tt(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Je(n,e){return Tt(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],e)}function Lr(n,e){return Tt(n,"offset",["prefer","use","ignore","reject"],e)}function yr(n){return Tt(n,"calendarName",["auto","always","never","critical"],"auto")}function kn(n){let e=n.roundingIncrement;if(e===void 0)return 1;const t=N(e);if(t<1||t>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${e}`);return t}function On(n,e,t){const r=t?e:e-1;if(n>r)throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);if(e%n!=0)throw new RangeError(`Rounding increment must divide evenly into ${e}`)}function pr(n){const e=n.fractionalSecondDigits;if(e===void 0)return"auto";if(typeof e!="number"){if(io(e)!=="auto")throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`);return"auto"}const t=Math.floor(e);if(!Number.isFinite(t)||t<0||t>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`);return t}function wr(n,e){switch(n){case"minute":return{precision:"minute",unit:"minute",increment:1};case"second":return{precision:0,unit:"second",increment:1};case"millisecond":return{precision:3,unit:"millisecond",increment:1};case"microsecond":return{precision:6,unit:"microsecond",increment:1};case"nanosecond":return{precision:9,unit:"nanosecond",increment:1}}switch(e){case"auto":return{precision:e,unit:"nanosecond",increment:1};case 0:return{precision:e,unit:"second",increment:1};case 1:case 2:case 3:return{precision:e,unit:"millisecond",increment:10**(3-e)};case 4:case 5:case 6:return{precision:e,unit:"microsecond",increment:10**(6-e)};case 7:case 8:case 9:return{precision:e,unit:"nanosecond",increment:10**(9-e)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`)}}const Et=Symbol("~required~");function Le(n,e,t,r,o=[]){let i=[];for(let l=0;l<vn.length;l++){const d=vn[l],m=d[1],f=d[2];t!=="datetime"&&t!==f||i.push(m)}i=i.concat(o);let a=r;a===Et?a=void 0:a!==void 0&&i.push(a);let s=[];s=s.concat(i);for(let l=0;l<i.length;l++){const d=i[l],m=nc[d];m!==void 0&&s.push(m)}let c=Tt(n,e,s,a);if(c===void 0&&r===Et)throw new RangeError(`${e} is required`);return c&&c in ki?ki[c]:c}function To(n){const e=n.relativeTo;if(e===void 0)return{};let t,r,o,i,a,s="option",c=!1;if(V(e)){if(R(e))return{zonedRelativeTo:e};if(H(e))return{plainRelativeTo:e};if(Z(e))return{plainRelativeTo:Oe(h(e,q).isoDate,h(e,D))};o=Dr(e);const l=qe(o,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:t,time:r}=br(o,l,"constrain")),{offset:a,timeZone:i}=l,a===void 0&&(s="wall")}else{let l,d,m,f,g;if({year:m,month:f,day:g,time:r,calendar:o,tzAnnotation:l,offset:a,z:d}=ut(re(e)),l)i=je(l),d?s="exact":a||(s="wall"),c=!0;else if(d)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");o||(o="iso8601"),o=Pe(o),t={year:m,month:f,day:g}}return i===void 0?{plainRelativeTo:Oe(t,o)}:{zonedRelativeTo:me(qr(t,r,s,s==="option"?jn(a):0,i,"compatible","reject",c),i,o)}}function gt(n){return h(n,be)!==0?"year":h(n,Te)!==0?"month":h(n,Re)!==0?"week":h(n,_e)!==0?"day":h(n,De)!==0?"hour":h(n,Ee)!==0?"minute":h(n,Me)!==0?"second":h(n,xe)!==0?"millisecond":h(n,Ce)!==0?"microsecond":"nanosecond"}function vt(n,e){return Kn.indexOf(n)>Kn.indexOf(e)?e:n}function tt(n){return n==="year"||n==="month"||n==="week"}function yt(n){return tt(n)||n==="day"?"date":"time"}function Ut(n){return ue("%calendarImpl%")(n)}function vr(n){return ue("%calendarImpl%")(h(n,D))}function $e(n,e,t="date"){const r=Object.create(null),o=Ut(n).isoToDate(e,{year:!0,monthCode:!0,day:!0});return r.monthCode=o.monthCode,t!=="month-day"&&t!=="date"||(r.day=o.day),t!=="year-month"&&t!=="date"||(r.year=o.year),r}function qe(n,e,t,r,o){const i=Ut(n).extraFields(t),a=t.concat(r,i),s=Object.create(null);let c=!1;a.sort();for(let l=0;l<a.length;l++){const d=a[l],m=e[d];if(m!==void 0)c=!0,s[d]=(0,ec[d])(m);else if(o!=="partial"){if(o.includes(d))throw new TypeError(`required property '${d}' missing or undefined`);s[d]=tc[d]}}if(o==="partial"&&!c)throw new TypeError("no supported properties found");return s}function Yo(n,e="complete"){const t=["hour","microsecond","millisecond","minute","nanosecond","second"];let r=!1;const o=Object.create(null);for(let i=0;i<t.length;i++){const a=t[i],s=n[a];s!==void 0?(o[a]=N(s),r=!0):e==="complete"&&(o[a]=0)}if(!r)throw new TypeError("invalid time-like");return o}function Zn(n,e){if(V(n)){if(H(n))return L(C(e)),Oe(h(n,j),h(n,D));if(R(n)){const c=Xe(h(n,F),h(n,O));return L(C(e)),Oe(c.isoDate,h(n,D))}if(Z(n))return L(C(e)),Oe(h(n,q).isoDate,h(n,D));const s=Dr(n);return Oe(Lt(s,qe(s,n,["year","month","monthCode","day"],[],[]),L(C(e))),s)}let{year:t,month:r,day:o,calendar:i,z:a}=ut(re(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return i||(i="iso8601"),i=Pe(i),L(C(e)),Oe({year:t,month:r,day:o},i)}function br(n,e,t){return U(Lt(n,e,t),so(e.hour,e.minute,e.second,e.millisecond,e.microsecond,e.nanosecond,t))}function qn(n,e){let t,r,o;if(V(n)){if(Z(n))return L(C(e)),He(h(n,q),h(n,D));if(R(n)){const s=Xe(h(n,F),h(n,O));return L(C(e)),He(s,h(n,D))}if(H(n))return L(C(e)),He(U(h(n,j),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),h(n,D));o=Dr(n);const i=qe(o,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=L(C(e));({isoDate:t,time:r}=br(o,i,a))}else{let i,a,s,c;if({year:a,month:s,day:c,time:r,calendar:o,z:i}=ut(re(n)),i)throw new RangeError("Z designator not supported for PlainDateTime");r==="start-of-day"&&(r={deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),ti(a,s,c,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),o||(o="iso8601"),o=Pe(o),L(C(e)),t={year:a,month:s,day:c}}return He(U(t,r),o)}function Qe(n){const e=ue("%Temporal.Duration%");if(W(n))return new e(h(n,be),h(n,Te),h(n,Re),h(n,_e),h(n,De),h(n,Ee),h(n,Me),h(n,xe),h(n,Ce),h(n,Ye));if(!V(n))return(function(o){const{years:i,months:a,weeks:s,days:c,hours:l,minutes:d,seconds:m,milliseconds:f,microseconds:g,nanoseconds:y}=(function(p){const w=Gs.exec(p);if(!w)throw new RangeError(`invalid duration: ${p}`);if(w.every(((Or,jr)=>jr<2||Or===void 0)))throw new RangeError(`invalid duration: ${p}`);const T=w[1]==="-"?-1:1,M=w[2]===void 0?0:N(w[2])*T,x=w[3]===void 0?0:N(w[3])*T,k=w[4]===void 0?0:N(w[4])*T,$=w[5]===void 0?0:N(w[5])*T,Q=w[6]===void 0?0:N(w[6])*T,J=w[7],B=w[8],z=w[9],de=w[10],ee=w[11];let S=0,oe=0,ye=0;if(J!==void 0){if(B??z??de??ee)throw new RangeError("only the smallest unit can be fractional");ye=3600*N((J+"000000000").slice(0,9))*T}else if(S=B===void 0?0:N(B)*T,z!==void 0){if(de??ee)throw new RangeError("only the smallest unit can be fractional");ye=60*N((z+"000000000").slice(0,9))*T}else oe=de===void 0?0:N(de)*T,ee!==void 0&&(ye=N((ee+"000000000").slice(0,9))*T);const We=ye%1e3,dt=Math.trunc(ye/1e3)%1e3,ht=Math.trunc(ye/1e6)%1e3;return oe+=Math.trunc(ye/1e9)%60,S+=Math.trunc(ye/6e10),ho(M,x,k,$,Q,S,oe,ht,dt,We),{years:M,months:x,weeks:k,days:$,hours:Q,minutes:S,seconds:oe,milliseconds:ht,microseconds:dt,nanoseconds:We}})(o);return new(ue("%Temporal.Duration%"))(i,a,s,c,l,d,m,f,g,y)})(re(n));const t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};let r=$a(n);for(let o=0;o<Zr.length;o++){const i=Zr[o],a=r[i];a!==void 0&&(t[i]=a)}return new e(t.years,t.months,t.weeks,t.days,t.hours,t.minutes,t.seconds,t.milliseconds,t.microseconds,t.nanoseconds)}function Wn(n){let e;if(V(n)){if(se(n)||R(n))return rt(h(n,O));e=Po(n)}else e=n;const{year:t,month:r,day:o,time:i,offset:a,z:s}=(function(p){const w=ut(p);if(!w.z&&!w.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return w})(re(e)),{hour:c=0,minute:l=0,second:d=0,millisecond:m=0,microsecond:f=0,nanosecond:g=0}=i==="start-of-day"?{}:i,y=sr(t,r,o,c,l,d,m,f,g-(s?0:jn(a)));return yn(y.isoDate),rt(le(y))}function ji(n,e){if(V(n)){if(Fe(n))return L(C(e)),mn(h(n,j),h(n,D));let s;return Ne(n,D)?s=h(n,D):(s=n.calendar,s===void 0&&(s="iso8601"),s=_r(s)),mn(Wr(s,qe(s,n,["year","month","monthCode","day"],[],[]),L(C(e))),s)}let{month:t,day:r,referenceISOYear:o,calendar:i}=Ko(re(n));if(i===void 0&&(i="iso8601"),i=Pe(i),L(C(e)),i==="iso8601")return mn({year:1972,month:t,day:r},i);let a={year:o,month:t,day:r};return Jt(a),a=Wr(i,$e(i,a,"month-day"),"constrain"),mn(a,i)}function $t(n,e){let t;if(V(n)){if(K(n))return L(C(e)),pt(h(n,G));if(Z(n))return L(C(e)),pt(h(n,q).time);if(R(n)){const l=Xe(h(n,F),h(n,O));return L(C(e)),pt(l.time)}const{hour:r,minute:o,second:i,millisecond:a,microsecond:s,nanosecond:c}=Yo(n);t=so(r,o,i,a,s,c,L(C(e)))}else t=Ca(re(n)),L(C(e));return pt(t)}function Na(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:h($t(n),G)}function Hn(n,e){if(V(n)){if(ce(n))return L(C(e)),gn(h(n,j),h(n,D));const s=Dr(n);return gn(or(s,qe(s,n,["year","month","monthCode"],[],[]),L(C(e))),s)}let{year:t,month:r,referenceISODay:o,calendar:i}=Xo(re(n));i===void 0&&(i="iso8601"),i=Pe(i),L(C(e));let a={year:t,month:r,day:o};return ni(a),a=or(i,$e(i,a,"year-month"),"constrain"),gn(a,i)}function qr(n,e,t,r,o,i,a,s){if(e==="start-of-day")return kt(o,n);const c=U(n,e);if(t==="wall"||a==="ignore")return ge(o,c,i);if(t==="exact"||a==="use"){const m=sr(n.year,n.month,n.day,e.hour,e.minute,e.second,e.millisecond,e.microsecond,e.nanosecond-r);yn(m.isoDate);const f=le(m);return ct(f),f}yn(n);const l=le(c),d=ir(o,c);for(let m=0;m<d.length;m++){const f=d[m],g=u.toNumber(u.subtract(l,f)),y=Nt(g,6e10,"halfExpand");if(g===r||s&&y===r)return f}if(a==="reject"){const m=Io(r),f=ar(c,"iso8601","auto");throw new RangeError(`Offset ${m} is invalid for ${f} in ${o}`)}return Sa(d,o,c,i)}function Gn(n,e){let t,r,o,i,a,s,c,l=!1,d="option";if(V(n)){if(R(n)){const p=C(e);return Jn(p),Lr(p,"reject"),L(p),me(h(n,O),h(n,F),h(n,D))}a=Dr(n);const f=qe(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:i,timeZone:o}=f),i===void 0&&(d="wall");const g=C(e);s=Jn(g),c=Lr(g,"reject");const y=L(g);({isoDate:t,time:r}=br(a,f,y))}else{let f,g,y,p,w;({year:y,month:p,day:w,time:r,tzAnnotation:f,offset:i,z:g,calendar:a}=(function(M){const x=ut(M);if(!x.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return x})(re(n))),o=je(f),g?d="exact":i||(d="wall"),a||(a="iso8601"),a=Pe(a),l=!0;const T=C(e);s=Jn(T),c=Lr(T,"reject"),L(T),t={year:y,month:p,day:w}}let m=0;return d==="option"&&(m=jn(i)),me(qr(t,r,d,m,o,s,c,l),o,a)}function Pa(n,e,t){Jt(e),Mt(n),P(n,j,e),P(n,D,t),P(n,ua,!0)}function Oe(n,e){const t=ue("%Temporal.PlainDate%"),r=Object.create(t.prototype);return Pa(r,n,e),r}function Ra(n,e,t){Vt(e),Mt(n),P(n,q,e),P(n,D,t)}function He(n,e){const t=ue("%Temporal.PlainDateTime%"),r=Object.create(t.prototype);return Ra(r,n,e),r}function Ya(n,e,t){Jt(e),Mt(n),P(n,j,e),P(n,D,t),P(n,ha,!0)}function mn(n,e){const t=ue("%Temporal.PlainMonthDay%"),r=Object.create(t.prototype);return Ya(r,n,e),r}function Ia(n,e){Mt(n),P(n,G,e)}function pt(n){const e=ue("%Temporal.PlainTime%"),t=Object.create(e.prototype);return Ia(t,n),t}function La(n,e,t){ni(e),Mt(n),P(n,j,e),P(n,D,t),P(n,da,!0)}function gn(n,e){const t=ue("%Temporal.PlainYearMonth%"),r=Object.create(t.prototype);return La(r,n,e),r}function Aa(n,e){ct(e),Mt(n),P(n,O,e)}function rt(n){const e=ue("%Temporal.Instant%"),t=Object.create(e.prototype);return Aa(t,n),t}function Ua(n,e,t,r){ct(e),Mt(n),P(n,O,e),P(n,F,t),P(n,D,r)}function me(n,e,t="iso8601"){const r=ue("%Temporal.ZonedDateTime%"),o=Object.create(r.prototype);return Ua(o,n,e,t),o}function $i(n){return Ro.filter((e=>n[e]!==void 0))}function Ht(n,e,t){const r=$i(t),o=Ut(n).fieldKeysToIgnore(r),i=Object.create(null),a=$i(e);for(let s=0;s<Ro.length;s++){let c;const l=Ro[s];a.includes(l)&&!o.includes(l)&&(c=e[l]),r.includes(l)&&(c=t[l]),c!==void 0&&(i[l]=c)}return i}function ze(n,e,t,r){const o=Ut(n).dateAdd(e,t,r);return Jt(o),o}function Tr(n,e,t,r){return Ut(n).dateUntil(e,t,r)}function _r(n){if(V(n)&&Ne(n,D))return h(n,D);const e=re(n);try{return Pe(e)}catch{}let t;try{({calendar:t}=ut(e))}catch{try{({calendar:t}=Ca(e))}catch{try{({calendar:t}=Xo(e))}catch{({calendar:t}=Ko(e))}}}return t||(t="iso8601"),Pe(t)}function Dr(n){if(Ne(n,D))return h(n,D);const{calendar:e}=n;return e===void 0?"iso8601":_r(e)}function st(n,e){return Pe(n)===Pe(e)}function Lt(n,e,t){const r=Ut(n);r.resolveFields(e,"date");const o=r.dateToISO(e,t);return Jt(o),o}function or(n,e,t){const r=Ut(n);r.resolveFields(e,"year-month"),e.day=1;const o=r.dateToISO(e,t);return ni(o),o}function Wr(n,e,t){const r=Ut(n);r.resolveFields(e,"month-day");const o=r.monthDayToISOReferenceDate(e,t);return Jt(o),o}function je(n){if(V(n)&&R(n))return h(n,F);const e=re(n);if(e==="UTC")return"UTC";const{tzName:t,offsetMinutes:r}=(function(i){const{tzAnnotation:a,offset:s,z:c}=(function(l){if(ka.test(l))return{tzAnnotation:l,offset:void 0,z:!1};try{const{tzAnnotation:d,offset:m,z:f}=ut(l);if(f||d||m)return{tzAnnotation:d,offset:m,z:f}}catch{}ja(l)})(i);return a?Rt(a):c?Rt("UTC"):s?Rt(s):void 0})(e);if(r!==void 0)return Bo(r);const o=Hr(t);if(!o)throw new RangeError(`Unrecognized time zone ${t}`);return o.identifier}function Fa(n,e){if(n===e)return!0;const t=Rt(n).offsetMinutes,r=Rt(e).offsetMinutes;if(t===void 0&&r===void 0){const o=Hr(e);if(!o)return!1;const i=Hr(n);return!!i&&i.primaryIdentifier===o.primaryIdentifier}return t===r}function wt(n,e){const t=Rt(n).offsetMinutes;return t!==void 0?6e10*t:Lo(n,e)}function Io(n){const e=n<0?"-":"+",t=Math.abs(n),r=Math.floor(t/36e11),o=Math.floor(t/6e10)%60,i=Math.floor(t/1e9)%60,a=t%1e9;return`${e}${co(r,o,i,a,i===0&&a===0?"minute":"auto")}`}function Xe(n,e){const t=wt(n,e);let{isoDate:{year:r,month:o,day:i},time:{hour:a,minute:s,second:c,millisecond:l,microsecond:d,nanosecond:m}}=qa(e);return sr(r,o,i,a,s,c,l,d,m+t)}function ge(n,e,t){return Sa(ir(n,e),n,e,t)}function Sa(n,e,t,r){const o=n.length;if(o===1)return n[0];if(o)switch(r){case"compatible":case"earlier":return n[0];case"later":return n[o-1];case"reject":throw new RangeError("multiple instants found")}if(r==="reject")throw new RangeError("multiple instants found");const i=le(t),a=u.subtract(i,Yt);ct(a);const s=wt(e,a),c=u.add(i,Yt);ct(c);const l=wt(e,c)-s;switch(r){case"earlier":{const d=Y.fromComponents(0,0,0,0,0,-l),m=Tn(t.time,d);return ir(e,U(Ae(t.isoDate.year,t.isoDate.month,t.isoDate.day+m.deltaDays),m))[0]}case"compatible":case"later":{const d=Y.fromComponents(0,0,0,0,0,l),m=Tn(t.time,d),f=ir(e,U(Ae(t.isoDate.year,t.isoDate.month,t.isoDate.day+m.deltaDays),m));return f[f.length-1]}}}function ir(n,e){if(n==="UTC")return yn(e.isoDate),[le(e)];const t=Rt(n).offsetMinutes;if(t!==void 0){const r=sr(e.isoDate.year,e.isoDate.month,e.isoDate.day,e.time.hour,e.time.minute-t,e.time.second,e.time.millisecond,e.time.microsecond,e.time.nanosecond);yn(r.isoDate);const o=le(r);return ct(o),[o]}return yn(e.isoDate),(function(r,o){let i=le(o),a=u.subtract(i,Yt);u.lessThan(a,nr)&&(a=i);let s=u.add(i,Yt);u.greaterThan(s,wn)&&(s=i);const c=Lo(r,a),l=Lo(r,s);return(c===l?[c]:[c,l]).map((m=>{const f=u.subtract(i,u.BigInt(m)),g=(function(y,p){const{epochMilliseconds:w,time:{millisecond:T,microsecond:M,nanosecond:x}}=qa(p),{year:k,month:$,day:Q,hour:J,minute:B,second:z}=Wa(y,w);return sr(k,$,Q,J,B,z,T,M,x)})(r,f);if(_n(o,g)===0)return ct(f),f})).filter((m=>m!==void 0))})(n,e)}function kt(n,e){const t=U(e,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=ir(n,t);if(r.length)return r[0];const o=le(t),i=u.subtract(o,Yt);return ct(i),ei(n,i)}function Er(n){let e;return e=n<0||n>9999?(n<0?"-":"+")+rr(Math.abs(n),6):rr(n,4),e}function Ze(n){return rr(n,2)}function za(n,e){let t;if(e==="auto"){if(n===0)return"";t=rr(n,9).replace(/0+$/,"")}else{if(e===0)return"";t=rr(n,9).slice(0,e)}return`.${t}`}function co(n,e,t,r,o){let i=`${Ze(n)}:${Ze(e)}`;return o==="minute"||(i+=`:${Ze(t)}`,i+=za(r,o)),i}function Ni(n,e,t){let r=e;r===void 0&&(r="UTC");const o=h(n,O),i=ar(Xe(r,o),"iso8601",t,"never");let a="Z";return e!==void 0&&(a=Za(wt(r,o))),`${i}${a}`}function Pr(n,e){const t=h(n,be),r=h(n,Te),o=h(n,Re),i=h(n,_e),a=h(n,De),s=h(n,Ee),c=Vr(n);let l="";t!==0&&(l+=`${Math.abs(t)}Y`),r!==0&&(l+=`${Math.abs(r)}M`),o!==0&&(l+=`${Math.abs(o)}W`),i!==0&&(l+=`${Math.abs(i)}D`);let d="";a!==0&&(d+=`${Math.abs(a)}H`),s!==0&&(d+=`${Math.abs(s)}M`);const m=Y.fromComponents(0,0,h(n,Me),h(n,xe),h(n,Ce),h(n,Ye));m.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(gt(n))&&e==="auto"||(d+=`${Math.abs(m.sec)}${za(Math.abs(m.subsec),e)}S`);let f=`${c<0?"-":""}P${l}`;return d&&(f=`${f}T${d}`),f}function Pi(n,e="auto"){const{year:t,month:r,day:o}=h(n,j);return`${Er(t)}-${Ze(r)}-${Ze(o)}${gr(h(n,D),e)}`}function Ri({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a){return co(n,e,t,1e6*r+1e3*o+i,a)}function ar(n,e,t,r="auto"){const{isoDate:{year:o,month:i,day:a},time:{hour:s,minute:c,second:l,millisecond:d,microsecond:m,nanosecond:f}}=n;return`${Er(o)}-${Ze(i)}-${Ze(a)}T${co(s,c,l,1e6*d+1e3*m+f,t)}${gr(e,r)}`}function Yi(n,e="auto"){const{year:t,month:r,day:o}=h(n,j);let i=`${Ze(r)}-${Ze(o)}`;const a=h(n,D);e!=="always"&&e!=="critical"&&a==="iso8601"||(i=`${Er(t)}-${i}`);const s=gr(a,e);return s&&(i+=s),i}function Ii(n,e="auto"){const{year:t,month:r,day:o}=h(n,j);let i=`${Er(t)}-${Ze(r)}`;const a=h(n,D);e!=="always"&&e!=="critical"&&a==="iso8601"||(i+=`-${Ze(o)}`);const s=gr(a,e);return s&&(i+=s),i}function Li(n,e,t="auto",r="auto",o="auto",i=void 0){let a=h(n,O);if(i){const{unit:d,increment:m,roundingMode:f}=i;a=So(a,m,d,f)}const s=h(n,F),c=wt(s,a);let l=ar(Xe(s,a),"iso8601",e,"never");return o!=="never"&&(l+=Za(c)),r!=="never"&&(l+=`[${r==="critical"?"!":""}${s}]`),l+=gr(h(n,D),t),l}function Ai(n){return Oa.test(n)}function jn(n){const e=ac.exec(n);if(!e)throw new RangeError(`invalid time zone offset: ${n}; must match ±HH:MM[:SS.SSSSSSSSS]`);return(e[1]==="-"?-1:1)*(1e9*(60*(60*+e[2]+ +(e[3]||0))+ +(e[4]||0))+ +((e[5]||0)+"000000000").slice(0,9))}let In;const oc=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function Hr(n){if(In===void 0){const i=Intl.supportedValuesOf?.("timeZone");if(i){In=new Map;for(let a=0;a<i.length;a++){const s=i[a];In.set(cr(s),s)}}else In=null}const e=cr(n);let t=In?.get(e);if(t)return{identifier:t,primaryIdentifier:t};try{t=xa(n).resolvedOptions().timeZone}catch{return}if(e==="antarctica/south_pole"&&(t="Antarctica/McMurdo"),Js.has(n))throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${t} instead`);const r=[...e].map(((i,a)=>a===0||oc[e[a-1]]?i.toUpperCase():i)).join("").split("/");if(r.length===1)return e==="gb-eire"?{identifier:"GB-Eire",primaryIdentifier:t}:{identifier:e.length<=3||/[-0-9]/.test(e)?e.toUpperCase():r[0],primaryIdentifier:t};if(r[0]==="Etc")return{identifier:`Etc/${["Zulu","Greenwich","Universal"].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:t};if(r[0]==="Us")return{identifier:`US/${r[1]}`,primaryIdentifier:t};const o=new Map([["Act","ACT"],["Lhi","LHI"],["Nsw","NSW"],["Dar_Es_Salaam","Dar_es_Salaam"],["Port_Of_Spain","Port_of_Spain"],["Port-Au-Prince","Port-au-Prince"],["Isle_Of_Man","Isle_of_Man"],["Comodrivadavia","ComodRivadavia"],["Knox_In","Knox_IN"],["Dumontdurville","DumontDUrville"],["Mcmurdo","McMurdo"],["Denoronha","DeNoronha"],["Easterisland","EasterIsland"],["Bajanorte","BajaNorte"],["Bajasur","BajaSur"]]);return r[1]=o.get(r[1])??r[1],r.length>2&&(r[2]=o.get(r[2])??r[2]),{identifier:r.join("/"),primaryIdentifier:t}}function qt(n,e){const{year:t,month:r,day:o,hour:i,minute:a,second:s}=Wa(n,e);let c=e%1e3;return c<0&&(c+=1e3),1e6*(Jo({isoDate:{year:t,month:r,day:o},time:{hour:i,minute:a,second:s,millisecond:c}})-e)}function Lo(n,e){return qt(n,Ke(e,"floor"))}function Bo(n){const e=n<0?"-":"+",t=Math.abs(n);return`${e}${co(Math.floor(t/60),t%60,0,0,"minute")}`}function Za(n){return Bo(Nt(n,Vs,"halfExpand")/6e10)}function Jo({isoDate:{year:n,month:e,day:t},time:{hour:r,minute:o,second:i,millisecond:a}}){const s=n%400,c=(n-s)/400,l=new Date;return l.setUTCHours(r,o,i,a),l.setUTCFullYear(s,e-1,t),l.getTime()+Ks*c}function le(n){const e=Jo(n),t=1e3*n.time.microsecond+n.time.nanosecond;return u.add(it(e),u.BigInt(t))}function qa(n){let e=Ke(n,"trunc"),t=u.toNumber(u.remainder(n,mr));t<0&&(t+=1e6,e-=1);const r=Math.floor(t/1e3)%1e3,o=t%1e3,i=new Date(e);return{epochMilliseconds:e,isoDate:{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate()},time:{hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds(),microsecond:r,nanosecond:o}}}function ei(n,e){if(n==="UTC")return null;const t=Ke(e,"floor");if(t<Xn)return ei(n,it(Xn));const r=Date.now(),o=Math.max(t,r)+366*It*3;let i=t,a=qt(n,i),s=i,c=a;for(;a===c&&i<o;){if(s=i+2*It*7,s>Ma)return null;c=qt(n,s),a===c&&(i=s)}return a===c?null:it(ts((l=>qt(n,l)),i,s,a,c))}function Ao(n,e){if(n==="UTC")return null;const t=Ke(e,"ceil"),r=Date.now(),o=r+366*It*3;if(t>o){const l=Ao(n,it(o));if(l===null||u.lessThan(l,it(r)))return l}if(n==="Africa/Casablanca"||n==="Africa/El_Aaiun"){const l=Date.UTC(2088,0,1);if(l<t)return Ao(n,it(l))}let i=t-1;if(i<Xn)return null;let a=qt(n,i),s=i,c=a;for(;a===c&&i>Xn;){if(s=i-2*It*7,s<Xn)return null;c=qt(n,s),a===c&&(i=s)}return a===c?null:it(ts((l=>qt(n,l)),s,i,c,a))}function Wa(n,e){return(function(t){const r=t.split(/[^\w]+/);if(r.length!==7)throw new RangeError(`expected 7 parts in "${t}`);const o=+r[0],i=+r[1];let a=+r[2];const s=r[3];if(s[0]==="b"||s[0]==="B")a=1-a;else if(s[0]!=="a"&&s[0]!=="A")throw new RangeError(`Unknown era ${s} in "${t}`);const c=r[4]==="24"?0:+r[4],l=+r[5],d=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(i)&&Number.isFinite(c)&&Number.isFinite(l)&&Number.isFinite(d)))throw new RangeError(`Invalid number in "${t}`);return{year:a,month:o,day:i,hour:c,minute:l,second:d}})(xa(n).format(e))}function Gr(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function Wt(n,e){return{standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]}[Gr(n)?"leapyear":"standard"][e-1]}function Vr(n){const e=[h(n,be),h(n,Te),h(n,Re),h(n,_e),h(n,De),h(n,Ee),h(n,Me),h(n,xe),h(n,Ce),h(n,Ye)];for(let t=0;t<e.length;t++){const r=e[t];if(r!==0)return r<0?-1:1}return 0}function lo(n){const e=["years","months","weeks","days"];for(let t=0;t<e.length;t++){const r=n[e[t]];if(r!==0)return r<0?-1:1}return 0}function Ha(n){const e=lo(n.date);return e!==0?e:n.time.sign()}function Zt(n,e){let t=n,r=e;if(!Number.isFinite(t)||!Number.isFinite(r))throw new RangeError("infinity is out of range");return r-=1,t+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:t,month:r}}function Ae(n,e,t){let r=n,o=e,i=t;if(!Number.isFinite(i))throw new RangeError("infinity is out of range");({year:r,month:o}=Zt(r,o));const a=146097;if(Math.abs(i)>a){const l=Math.trunc(i/a);r+=400*l,i-=l*a}let s=0,c=o>2?r:r-1;for(;s=Gr(c)?366:365,i<-s;)r-=1,c-=1,i+=s;for(c+=1;s=Gr(c)?366:365,i>s;)r+=1,c+=1,i-=s;for(;i<1;)({year:r,month:o}=Zt(r,o-1)),i+=Wt(r,o);for(;i>Wt(r,o);)i-=Wt(r,o),{year:r,month:o}=Zt(r,o+1);return{year:r,month:o,day:i}}function sr(n,e,t,r,o,i,a,s,c){const l=Ot(r,o,i,a,s,c);return U(Ae(n,e,t+l.deltaDays),l)}function Ot(n,e,t,r,o,i){let a,s=n,c=e,l=t,d=r,m=o,f=i;({div:a,mod:f}=hn(f,3)),m+=a,f<0&&(m-=1,f+=1e3),{div:a,mod:m}=hn(m,3),d+=a,m<0&&(d-=1,m+=1e3),l+=Math.trunc(d/1e3),d%=1e3,d<0&&(l-=1,d+=1e3),c+=Math.trunc(l/60),l%=60,l<0&&(c-=1,l+=60),s+=Math.trunc(c/60),c%=60,c<0&&(s-=1,c+=60);let g=Math.trunc(s/24);return s%=24,s<0&&(g-=1,s+=24),g+=0,s+=0,c+=0,l+=0,d+=0,m+=0,f+=0,{deltaDays:g,hour:s,minute:c,second:l,millisecond:d,microsecond:m,nanosecond:f}}function Ui(n,e){const t=fe(n,0);if(lo(t)===0)return n.days;const r=h(e,j),o=ze(h(e,D),r,t,"constrain"),i=Qt(r.year,r.month-1,r.day),a=Qt(o.year,o.month-1,o.day)-i;return n.days+a}function Ue(n){return new(ue("%Temporal.Duration%"))(-h(n,be),-h(n,Te),-h(n,Re),-h(n,_e),-h(n,De),-h(n,Ee),-h(n,Me),-h(n,xe),-h(n,Ce),-h(n,Ye))}function ke(n,e,t){return Math.min(t,Math.max(e,n))}function Ga(n,e,t){const r=ke(e,1,12);return{year:n,month:r,day:ke(t,1,Wt(n,r))}}function ae(n,e,t){if(n<e||n>t)throw new RangeError(`value out of range: ${e} <= ${n} <= ${t}`)}function Gt(n,e,t){ae(e,1,12),ae(t,1,Wt(n,e))}function Jt(n){Vt(U(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function uo(n,e,t,r,o,i){ae(n,0,23),ae(e,0,59),ae(t,0,59),ae(r,0,999),ae(o,0,999),ae(i,0,999)}function ti(n,e,t,r,o,i,a,s,c){Gt(n,e,t),uo(r,o,i,a,s,c)}function Vt(n){const e=le(n);(u.lessThan(e,Qs)||u.greaterThan(e,Xs))&&ct(e)}function Uo(n){le(n)}function ct(n){if(u.lessThan(n,nr)||u.greaterThan(n,wn))throw new RangeError("date/time value is outside of supported range")}function ni({year:n,month:e}){ae(n,Mi,xi),n===Mi?ae(e,4,12):n===xi&&ae(e,1,9)}function ho(n,e,t,r,o,i,a,s,c,l){let d=0;const m=[n,e,t,r,o,i,a,s,c,l];for(let T=0;T<m.length;T++){const M=m[T];if(M===1/0||M===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(M!==0){const x=M<0?-1:1;if(d!==0&&x!==d)throw new RangeError("mixed-sign values not allowed as duration fields");d=x}}if(Math.abs(n)>=2**32||Math.abs(e)>=2**32||Math.abs(t)>=2**32)throw new RangeError("years, months, and weeks must be < 2³²");const f=hn(s,3),g=hn(c,6),y=hn(l,9),p=hn(1e6*f.mod+1e3*g.mod+y.mod,9).div,w=86400*r+3600*o+60*i+a+f.div+g.div+y.div+p;if(!Number.isSafeInteger(w))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function dn(n){return{date:{years:h(n,be),months:h(n,Te),weeks:h(n,Re),days:h(n,_e)},time:Y.fromComponents(h(n,De),h(n,Ee),h(n,Me),h(n,xe),h(n,Ce),h(n,Ye))}}function ot(n){const e=Y.fromComponents(h(n,De),h(n,Ee),h(n,Me),h(n,xe),h(n,Ce),h(n,Ye)).add24HourDays(h(n,_e));return{date:{years:h(n,be),months:h(n,Te),weeks:h(n,Re),days:0},time:e}}function Va(n){const e=ot(n),t=Math.trunc(e.time.sec/86400);return ho(e.date.years,e.date.months,e.date.weeks,t,0,0,0,0,0,0),{...e.date,days:t}}function Ge(n,e){const t=n.time.sign();let r=n.time.abs().subsec,o=0,i=0,a=n.time.abs().sec,s=0,c=0,l=0;switch(e){case"year":case"month":case"week":case"day":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60,c=Math.trunc(s/60),s%=60,l=Math.trunc(c/24),c%=24;break;case"hour":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60,c=Math.trunc(s/60),s%=60;break;case"minute":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60;break;case"second":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3;break;case"millisecond":o=Math.trunc(r/1e3),r%=1e3,i=vo(a,3,Math.trunc(o/1e3)),o%=1e3,a=0;break;case"microsecond":o=vo(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=vo(a,9,r),a=0}return new(ue("%Temporal.Duration%"))(n.date.years,n.date.months,n.date.weeks,n.date.days+t*l,t*c,t*s,t*a,t*i,t*o,t*r)}function bt(n,e){return lo(n),e.sign(),{date:n,time:e}}function Qt(n,e,t){return Jo({isoDate:{year:n,month:e+1,day:t},time:{hour:0,minute:0,second:0,millisecond:0}})/It}function yn({year:n,month:e,day:t}){if(Math.abs(Qt(n,e-1,t))>1e8)throw new RangeError("date/time value is outside the supported range")}function ri(n,e){const t=e.hour-n.hour,r=e.minute-n.minute,o=e.second-n.second,i=e.millisecond-n.millisecond,a=e.microsecond-n.microsecond,s=e.nanosecond-n.nanosecond;return Y.fromComponents(t,r,o,i,a,s)}function oi(n,e,t,r,o){let i=Y.fromEpochNsDiff(e,n);return i=Qr(i,t,r,o),bt({years:0,months:0,weeks:0,days:0},i)}function Qa(n,e,t,r){Uo(n),Uo(e);let o=ri(n.time,e.time);const i=o.sign(),a=lt(n.isoDate,e.isoDate);let s=e.isoDate;a===i&&(s=Ae(s.year,s.month,s.day+i),o=o.add24HourDays(-i));const c=vt("day",r),l=Tr(t,n.isoDate,s,c);return r!==c&&(o=o.add24HourDays(l.days),l.days=0),bt(l,o)}function Xa(n,e,t,r,o){const i=u.subtract(e,n);if(u.equal(i,Se))return{date:{years:0,months:0,weeks:0,days:0},time:Y.ZERO};const a=u.lessThan(i,Se)?-1:1,s=Xe(t,n),c=Xe(t,e);let l,d=0,m=a===1?2:1,f=ri(s.time,c.time);for(f.sign()===-a&&d++;d<=m;d++){l=U(Ae(c.isoDate.year,c.isoDate.month,c.isoDate.day-d*a),s.time);const y=ge(t,l,"compatible");if(f=Y.fromEpochNsDiff(e,y),f.sign()!==-a)break}const g=vt("day",o);return bt(Tr(r,s.isoDate,l.isoDate,g),f)}function Ka(n,e,t,r,o,i,a,s,c){let l,d,m,f,g=e;switch(s){case"year":{const S=Nt(g.date.years,a,"trunc");l=S,d=S+a*n,m={years:l,months:0,weeks:0,days:0},f={...m,years:d};break}case"month":{const S=Nt(g.date.months,a,"trunc");l=S,d=S+a*n,m=fe(g.date,0,0,l),f=fe(g.date,0,0,d);break}case"week":{const S=fe(g.date,0,0),oe=ze(i,r.isoDate,S,"constrain"),ye=Tr(i,oe,Ae(oe.year,oe.month,oe.day+g.date.days),"week"),We=Nt(g.date.weeks+ye.weeks,a,"trunc");l=We,d=We+a*n,m=fe(g.date,0,l),f=fe(g.date,0,d);break}case"day":{const S=Nt(g.date.days,a,"trunc");l=S,d=S+a*n,m=fe(g.date,l),f=fe(g.date,d);break}}const y=ze(i,r.isoDate,m,"constrain"),p=ze(i,r.isoDate,f,"constrain");let w,T;const M=U(y,r.time),x=U(p,r.time);o?(w=ge(o,M,"compatible"),T=ge(o,x,"compatible")):(w=le(M),T=le(x));const k=Y.fromEpochNsDiff(t,w),$=Y.fromEpochNsDiff(T,w),Q=no(c,n<0?"negative":"positive"),J=k.add(k).abs().subtract($.abs()).sign(),B=Math.abs(l)/a%2==0,z=k.isZero()?Math.abs(l):k.cmp($)?ro(Math.abs(l),Math.abs(d),J,B,Q):Math.abs(d),de=new Y(u.add(u.multiply($.totalNs,u.BigInt(l)),u.multiply(k.totalNs,u.BigInt(a*n)))).fdiv($.totalNs),ee=z===Math.abs(d);return g={date:ee?f:m,time:Y.ZERO},{nudgeResult:{duration:g,nudgedEpochNs:ee?T:w,didExpandCalendarUnit:ee},total:de}}function mo(n,e,t,r,o,i,a,s,c){let l=n;const d=tt(s)||r&&s==="day",m=Ha(l)<0?-1:1;let f;return d?{nudgeResult:f}=Ka(m,l,e,t,r,o,a,s,c):f=r?(function(g,y,p,w,T,M,x,k){let $=y;const Q=ze(T,p.isoDate,$.date,"constrain"),J=U(Q,p.time),B=U(Ae(Q.year,Q.month,Q.day+g),p.time),z=ge(w,J,"compatible"),de=ge(w,B,"compatible"),ee=Y.fromEpochNsDiff(de,z);if(ee.sign()!==g)throw new RangeError("time zone returned inconsistent Instants");const S=u.BigInt(bn[x]*M);let oe=$.time.round(S,k);const ye=oe.subtract(ee),We=ye.sign()!==-g;let dt,ht;return We?(dt=g,oe=ye.round(S,k),ht=oe.addToEpochNs(de)):(dt=0,ht=oe.addToEpochNs(z)),{duration:bt(fe($.date,$.date.days+dt),oe),nudgedEpochNs:ht,didExpandCalendarUnit:We}})(m,l,t,r,o,a,s,c):(function(g,y,p,w,T,M){let x=g;const k=x.time.add24HourDays(x.date.days),$=k.round(u.BigInt(w*bn[T]),M),Q=$.subtract(k),{quotient:J}=k.divmod(zr),{quotient:B}=$.divmod(zr),z=Math.sign(B-J)===k.sign(),de=Q.addToEpochNs(y);let ee=0,S=$;return yt(p)==="date"&&(ee=B,S=$.add(Y.fromComponents(24*-B,0,0,0,0,0))),{duration:{date:fe(x.date,ee),time:S},nudgedEpochNs:de,didExpandCalendarUnit:z}})(l,e,i,a,s,c),l=f.duration,f.didExpandCalendarUnit&&s!=="week"&&(l=(function(g,y,p,w,T,M,x,k){let $=y;if(k===x)return $;const Q=Kn.indexOf(x);for(let J=Kn.indexOf(k)-1;J>=Q;J--){const B=Kn[J];if(B==="week"&&x!=="week")continue;let z;switch(B){case"year":z={years:$.date.years+g,months:0,weeks:0,days:0};break;case"month":{const S=$.date.months+g;z=fe($.date,0,0,S);break}case"week":{const S=$.date.weeks+g;z=fe($.date,0,S);break}}const de=U(ze(M,w.isoDate,z,"constrain"),w.time);let ee;if(ee=T?ge(T,de,"compatible"):le(de),Fr(p,ee)===-g)break;$={date:z,time:Y.ZERO}}return $})(m,l,f.nudgedEpochNs,t,r,o,i,vt(s,"day"))),l}function Fi(n,e,t,r,o,i){return tt(i)||r&&i==="day"?Ka(Ha(n)<0?-1:1,n,e,t,r,o,1,i,"trunc").total:er(n.time.add24HourDays(n.date.days),i)}function Ba(n,e,t,r,o,i,a){if(_n(n,e)==0)return{date:{years:0,months:0,weeks:0,days:0},time:Y.ZERO};Vt(n),Vt(e);const s=Qa(n,e,t,r);return i==="nanosecond"&&o===1?s:mo(s,le(e),n,null,t,r,o,i,a)}function Ja(n,e,t,r,o,i,a,s){if(yt(o)==="time")return oi(n,e,i,a,s);const c=Xa(n,e,t,r,o);return a==="nanosecond"&&i===1?c:mo(c,e,Xe(t,n),t,r,o,i,a,s)}function $n(n,e,t,r,o,i){const a=vn.reduce(((g,y)=>{const p=y[0],w=y[1],T=y[2];return t!=="datetime"&&T!==t||r.includes(w)||g.push(w,p),g}),[]);let s=Le(e,"largestUnit",t,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);const c=kn(e);let l=Je(e,"trunc");n==="since"&&(l=(function(g){switch(g){case"ceil":return"floor";case"floor":return"ceil";case"halfCeil":return"halfFloor";case"halfFloor":return"halfCeil";default:return g}})(l));const d=Le(e,"smallestUnit",t,o);if(r.includes(d))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${d}`);const m=vt(i,d);if(s==="auto"&&(s=m),vt(s,d)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${d}`);const f={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[d];return f!==void 0&&On(c,f,!1),{largestUnit:s,roundingIncrement:c,roundingMode:l,smallestUnit:d}}function Si(n,e,t,r){const o=Wn(t),i=$n(n,C(r),"time",[],"nanosecond","second");let a=Ge(oi(h(e,O),h(o,O),i.roundingIncrement,i.smallestUnit,i.roundingMode),i.largestUnit);return n==="since"&&(a=Ue(a)),a}function zi(n,e,t,r){const o=Zn(t),i=h(e,D),a=h(o,D);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=$n(n,C(r),"date",[],"day","day"),c=ue("%Temporal.Duration%"),l=h(e,j),d=h(o,j);if(lt(l,d)===0)return new c;let m={date:Tr(i,l,d,s.largestUnit),time:Y.ZERO};if(s.smallestUnit!=="day"||s.roundingIncrement!==1){const g=U(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});m=mo(m,le(U(d,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),g,null,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let f=Ge(m,"day");return n==="since"&&(f=Ue(f)),f}function Zi(n,e,t,r){const o=qn(t),i=h(e,D),a=h(o,D);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=$n(n,C(r),"datetime",[],"nanosecond","day"),c=ue("%Temporal.Duration%"),l=h(e,q),d=h(o,q);if(_n(l,d)===0)return new c;let m=Ge(Ba(l,d,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(m=Ue(m)),m}function qi(n,e,t,r){const o=$t(t),i=$n(n,C(r),"time",[],"nanosecond","hour");let a=ri(h(e,G),h(o,G));a=Qr(a,i.roundingIncrement,i.smallestUnit,i.roundingMode);let s=Ge(bt({years:0,months:0,weeks:0,days:0},a),i.largestUnit);return n==="since"&&(s=Ue(s)),s}function Wi(n,e,t,r){const o=Hn(t),i=h(e,D),a=h(o,D);if(!st(i,a))throw new RangeError(`cannot compute difference between months of ${i} and ${a} calendars`);const s=$n(n,C(r),"date",["week","day"],"month","year"),c=ue("%Temporal.Duration%");if(lt(h(e,j),h(o,j))==0)return new c;const l=$e(i,h(e,j),"year-month");l.day=1;const d=Lt(i,l,"constrain"),m=$e(i,h(o,j),"year-month");m.day=1;const f=Lt(i,m,"constrain");let g={date:fe(Tr(i,d,f,s.largestUnit),0,0),time:Y.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){const p=U(d,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});g=mo(g,le(U(f,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),p,null,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let y=Ge(g,"day");return n==="since"&&(y=Ue(y)),y}function Hi(n,e,t,r){const o=Gn(t),i=h(e,D),a=h(o,D);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=$n(n,C(r),"datetime",[],"nanosecond","hour"),c=h(e,O),l=h(o,O),d=ue("%Temporal.Duration%");let m;if(yt(s.largestUnit)!=="date")m=Ge(oi(c,l,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{const f=h(e,F);if(!Fa(f,h(o,F)))throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");if(u.equal(c,l))return new d;m=Ge(Ja(c,l,f,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(m=Ue(m)),m}function Tn({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a){let s=t,c=i;return s+=a.sec,c+=a.subsec,Ot(n,e,s,r,o,c)}function Fo(n,e){const t=e.addToEpochNs(n);return ct(t),t}function Vn(n,e,t,r,o="constrain"){if(lo(r.date)===0)return Fo(n,r.time);const i=Xe(e,n);return Fo(ge(e,U(ze(t,i.isoDate,r.date,o),i.time),"compatible"),r.time)}function Gi(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=vt(gt(e),gt(r));if(tt(o))throw new RangeError("For years, months, or weeks arithmetic, use date arithmetic relative to a starting point");const i=ot(e),a=ot(r);return Ge(bt({years:0,months:0,weeks:0,days:0},i.time.add(a.time)),o)}function Vi(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=gt(r);if(yt(o)==="date")throw new RangeError(`Duration field ${o} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);const i=ot(r);return rt(Fo(h(e,O),i.time))}function Qi(n,e,t,r){const o=h(e,D);let i=Qe(t);n==="subtract"&&(i=Ue(i));const a=Va(i),s=L(C(r));return Oe(ze(o,h(e,j),a,s),o)}function Xi(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=h(e,D),s=ot(o),c=h(e,q),l=Tn(c.time,s.time),d=fe(s.date,l.deltaDays);return ho(d.years,d.months,d.weeks,d.days,0,0,0,0,0,0),He(U(ze(a,c.isoDate,d,i),l),a)}function Ki(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=ot(r),{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=Tn(h(e,G),o.time);return pt(so(i,a,s,c,l,d,"reject"))}function Bi(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=Vr(o),s=h(e,D),c=$e(s,h(e,j),"year-month");c.day=1;let l=Lt(s,c,"constrain");if(a<0){const m=ze(s,l,{months:1},"constrain");l=Ae(m.year,m.month,m.day-1)}const d=Va(o);return Jt(l),gn(or(s,$e(s,ze(s,l,d,i),"year-month"),i),s)}function Ji(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=h(e,F),s=h(e,D),c=dn(o);return me(Vn(h(e,O),a,s,c,i),a,s)}function Nt(n,e,t){const r=Math.trunc(n/e),o=n%e,i=n<0?"negative":"positive",a=Math.abs(r),s=a+1,c=Ie(Math.abs(2*o)-e),l=a%2==0,d=no(t,i),m=o===0?a:ro(a,s,c,l,d);return e*(i==="positive"?m:-m)}function So(n,e,t,r){const o=bn[t]*e;return(function(i,a,s){const c=ft(i),l=ft(a),d=u.divide(c,l),m=u.remainder(c,l),f=no(s,"positive");let g,y;u.lessThan(c,Se)?(g=u.subtract(d,tr),y=d):(g=d,y=u.add(d,tr));const p=Fr(St(u.multiply(m,Qo)),l)*(u.lessThan(c,Se)?-1:1)+0,w=u.equal(m,Se)?d:ro(g,y,p,la(g),f);return u.multiply(w,l)})(n,u.BigInt(o),r)}function zo(n,e,t,r){Uo(n);const{year:o,month:i,day:a}=n.isoDate,s=Zo(n.time,e,t,r);return U(Ae(o,i,a+s.deltaDays),s)}function Zo({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a,s,c){let l;switch(s){case"day":case"hour":l=1e3*(1e3*(1e3*(60*(60*n+e)+t)+r)+o)+i;break;case"minute":l=1e3*(1e3*(1e3*(60*e+t)+r)+o)+i;break;case"second":l=1e3*(1e3*(1e3*t+r)+o)+i;break;case"millisecond":l=1e3*(1e3*r+o)+i;break;case"microsecond":l=1e3*o+i;break;case"nanosecond":l=i}const d=bn[s],m=Nt(l,d*a,c)/d;switch(s){case"day":return{deltaDays:m,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Ot(m,0,0,0,0,0);case"minute":return Ot(n,m,0,0,0,0);case"second":return Ot(n,e,m,0,0,0);case"millisecond":return Ot(n,e,t,m,0,0);case"microsecond":return Ot(n,e,t,r,m,0);case"nanosecond":return Ot(n,e,t,r,o,m);default:throw new Error(`Invalid unit ${s}`)}}function Qr(n,e,t,r){const o=bn[t];return n.round(u.BigInt(o*e),r)}function er(n,e){const t=bn[e];return n.fdiv(u.BigInt(t))}function lt(n,e){return n.year!==e.year?Ie(n.year-e.year):n.month!==e.month?Ie(n.month-e.month):n.day!==e.day?Ie(n.day-e.day):0}function qo(n,e){return n.hour!==e.hour?Ie(n.hour-e.hour):n.minute!==e.minute?Ie(n.minute-e.minute):n.second!==e.second?Ie(n.second-e.second):n.millisecond!==e.millisecond?Ie(n.millisecond-e.millisecond):n.microsecond!==e.microsecond?Ie(n.microsecond-e.microsecond):n.nanosecond!==e.nanosecond?Ie(n.nanosecond-e.nanosecond):0}function _n(n,e){const t=lt(n.isoDate,e.isoDate);return t!==0?t:qo(n.time,e.time)}function es(n){const e=Xr(n);return globalThis.BigInt!==void 0?globalThis.BigInt(e.toString(10)):e}function Ke(n,e){const t=ft(n),{quotient:r,remainder:o}=Sn(t,mr);let i=u.toNumber(r);return e==="floor"&&u.toNumber(o)<0&&(i-=1),e==="ceil"&&u.toNumber(o)>0&&(i+=1),i}function it(n){if(!Number.isInteger(n))throw new RangeError("epoch milliseconds must be an integer");return u.multiply(u.BigInt(n),mr)}function Xr(n){let e=n;if(typeof n=="object"){const t=n[Symbol.toPrimitive];t&&typeof t=="function"&&(e=t.call(n,"number"))}if(typeof e=="number")throw new TypeError("cannot convert number to bigint");return typeof e=="bigint"?u.BigInt(e.toString(10)):u.BigInt(e)}const Wo=(()=>{let n=u.BigInt(Date.now()%1e6);return()=>{const e=Date.now(),t=u.BigInt(e),r=u.add(it(e),n);return n=u.remainder(t,mr),u.greaterThan(r,wn)?wn:u.lessThan(r,nr)?nr:r}})();function Ln(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Ie(n){return n<0?-1:n>0?1:n}function C(n){if(n===void 0)return Object.create(null);if(V(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function Xt(n,e){const t=Object.create(null);return t[n]=e,t}function Tt(n,e,t,r){let o=n[e];if(o!==void 0){if(o=io(o),!t.includes(o))throw new RangeError(`${e} must be one of ${t.join(", ")}, not ${o}`);return o}if(r===Et)throw new RangeError(`${e} option is required`);return r}function Pe(n){const e=cr(n);if(!Bs.includes(cr(e)))throw new RangeError(`invalid calendar identifier ${e}`);switch(e){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return e}function cr(n){let e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);e+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return e}function Ft(n){throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n==="PlainMonthDay"?"Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))":`Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`)}const ic=new RegExp(`^${Da.source}$`),ac=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function ts(n,e,t,r=n(e),o=n(t)){let i=e,a=t,s=r,c=o;for(;a-i>1;){let l=Math.trunc((i+a)/2);const d=n(l);d===s?(i=l,s=d):d===c&&(a=l,c=d)}return a}function ns(n){return[...n]}function rs(n,e){if(n!=="gregory"&&n!=="iso8601")return;const t=Mr[n];let r=e.year;const{dayOfWeek:o,dayOfYear:i,daysInYear:a}=t.isoToDate(e,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=t.getFirstDayOfWeek(),c=t.getMinimalDaysInFirstWeek();let l=(o+7-s)%7,d=(o-i+7001-s)%7,m=Math.floor((i-1+d)/7);if(7-d>=c&&++m,m==0)m=(function(f,g,y,p){let w=(p-f-y+1)%7;w<0&&(w+=7);let T=Math.floor((y+w-1)/7);return 7-w>=g&&++T,T})(s,c,i+t.isoToDate(t.dateAdd(e,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,o),r--;else if(i>=a-5){let f=(l+a-i)%7;f<0&&(f+=7),6-f>=c&&i+7-l>a&&(m=1,r++)}return{week:m,year:r}}function ea(n,e,t,r,o){if(e!==o.year){if(n*(e-o.year)>0)return!0}else if(t!==o.month){if(n*(t-o.month)>0)return!0}else if(r!==o.day&&n*(r-o.day)>0)return!0;return!1}const Mr={};function Kt(n){if(!n.startsWith("M"))throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);const e=+n.slice(1);if(Number.isNaN(e))throw new RangeError(`Invalid month code: ${n}`);return e}function at(n,e=!1){return`M${`${n}`.padStart(2,"0")}${e?"L":""}`}function ii(n,e=void 0,t=12){let{month:r,monthCode:o}=n;if(o===void 0){if(r===void 0)throw new TypeError("Either month or monthCode are required");e==="reject"&&ae(r,1,t),e==="constrain"&&(r=ke(r,1,t)),o=at(r)}else{const i=Kt(o);if(o!==at(i))throw new RangeError(`Invalid month code: ${o}`);if(r!==void 0&&r!==i)throw new RangeError(`monthCode ${o} and month ${r} must match if both are present`);if(r=i,r<1||r>t)throw new RangeError(`Invalid monthCode: ${o}`)}return{...n,month:r,monthCode:o}}Mr.iso8601={resolveFields(n,e){if((e==="date"||e==="year-month")&&n.year===void 0)throw new TypeError("year is required");if((e==="date"||e==="month-day")&&n.day===void 0)throw new TypeError("day is required");Object.assign(n,ii(n))},dateToISO:(n,e)=>Bn(n.year,n.month,n.day,e),monthDayToISOReferenceDate(n,e){const{month:t,day:r}=Bn(n.year??1972,n.month,n.day,e);return{month:t,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(n){const e=new Set;for(let t=0;t<n.length;t++){const r=n[t];e.add(r),r==="month"?e.add("monthCode"):r==="monthCode"&&e.add("month")}return ns(e)},dateAdd(n,{years:e=0,months:t=0,weeks:r=0,days:o=0},i){let{year:a,month:s,day:c}=n;return a+=e,s+=t,{year:a,month:s}=Zt(a,s),{year:a,month:s,day:c}=Bn(a,s,c,i),c+=o+7*r,Ae(a,s,c)},dateUntil(n,e,t){const r=-lt(n,e);if(r===0)return{years:0,months:0,weeks:0,days:0};let o,i=0,a=0;if(t==="year"||t==="month"){let d=e.year-n.year;for(d!==0&&(d-=r);!ea(r,n.year+d,n.month,n.day,e);)i=d,d+=r;let m=r;for(o=Zt(n.year+i,n.month+m);!ea(r,o.year,o.month,n.day,e);)a=m,m+=r,o=Zt(o.year,o.month+r);t==="month"&&(a+=12*i,i=0)}o=Zt(n.year+i,n.month+a);const s=Ga(o.year,o.month,n.day);let c=0,l=Qt(e.year,e.month-1,e.day)-Qt(s.year,s.month-1,s.day);return t==="week"&&(c=Math.trunc(l/7),l%=7),{years:i,months:a,weeks:c,days:l}},isoToDate({year:n,month:e,day:t},r){const o={era:void 0,eraYear:void 0,year:n,month:e,day:t,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(o.monthCode=at(e)),r.dayOfWeek){const i=e+(e<3?10:-2),a=n-(e<3?1:0),s=Math.floor(a/100),c=a-100*s,l=(t+Math.floor(2.6*i-.2)+(c+Math.floor(c/4))+(Math.floor(s/4)-2*s))%7;o.dayOfWeek=l+(l<=0?7:0)}if(r.dayOfYear){let i=t;for(let a=e-1;a>0;a--)i+=Wt(n,a);o.dayOfYear=i}return r.weekOfYear&&(o.weekOfYear=rs("iso8601",{year:n,month:e,day:t})),r.daysInMonth&&(o.daysInMonth=Wt(n,e)),(r.daysInYear||r.inLeapYear)&&(o.inLeapYear=Gr(n),o.daysInYear=o.inLeapYear?366:365),o},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};class ie{constructor(e){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,e!==void 0){let t=0;for(const r of e.map.entries()){if(++t>ie.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(e){const t=this.map.get(e);return t&&(this.hits++,this.report()),this.calls++,t}set(e,t){this.map.set(e,t),this.misses++,this.report()}report(){}setObject(e){if(ie.objectMap.get(e))throw new RangeError("object already cached");ie.objectMap.set(e,this),this.report()}static getCacheForObject(e){let t=ie.objectMap.get(e);return t||(t=new ie,ie.objectMap.set(e,t)),t}}function os({isoYear:n,isoMonth:e,isoDay:t}){return`${Er(n)}-${Ze(e)}-${Ze(t)}T00:00Z`}function _o(n,e){return{years:n.year-e.year,months:n.month-e.month,days:n.day-e.day}}ie.objectMap=new WeakMap,ie.MAX_CACHE_ENTRIES=1e3;class en{constructor(){this.eras=[],this.hasEra=!1,this.erasBeginMidYear=!1}getFormatter(){return this.formatter===void 0&&(this.formatter=new Intl.DateTimeFormat(`en-US-u-ca-${this.id}`,{day:"numeric",month:"numeric",year:"numeric",era:"short",timeZone:"UTC"})),this.formatter}getCalendarParts(e){let t=this.getFormatter(),r=new Date(e);if(e==="-271821-04-19T00:00Z"){const o=t.resolvedOptions();t=new Intl.DateTimeFormat(o.locale,{...o,timeZone:"Etc/GMT+1"}),r=new Date("-271821-04-20T00:00Z")}try{return t.formatToParts(r)}catch{throw new RangeError(`Invalid ISO date: ${e}`)}}isoToCalendarDate(e,t){const{year:r,month:o,day:i}=e,a=JSON.stringify({func:"isoToCalendarDate",isoYear:r,isoMonth:o,isoDay:i,id:this.id}),s=t.get(a);if(s)return s;const c=os({isoYear:r,isoMonth:o,isoDay:i}),l=this.getCalendarParts(c),d={};for(let f=0;f<l.length;f++){const{type:g,value:y}=l[f];if(g!=="year"&&g!=="relatedYear"||(this.hasEra?d.eraYear=+y:d.year=+y),g==="month"){const p=/^([0-9]*)(.*?)$/.exec(y);if(!p||p.length!=3||!p[1]&&!p[2])throw new RangeError(`Unexpected month: ${y}`);if(d.month=p[1]?+p[1]:1,d.month<1)throw new RangeError(`Invalid month ${y} from ${c}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(d.month>13)throw new RangeError(`Invalid month ${y} from ${c}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);p[2]&&(d.monthExtra=p[2])}g==="day"&&(d.day=+y),this.hasEra&&g==="era"&&y!=null&&y!==""&&(d.era=y.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&d.eraYear===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){const f=this.eras.find((g=>d.era===g.genericName));f&&(d.era=f.code)}if(this.reviseIntlEra){const{era:f,eraYear:g}=this.reviseIntlEra(d,e);d.era=f,d.eraYear=g}this.checkIcuBugs&&this.checkIcuBugs(e);const m=this.adjustCalendarDate(d,t,"constrain",!0);if(m.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(e)}`);if(m.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(e)}`);if(m.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(e)}`);return t.set(a,m),["constrain","reject"].forEach((f=>{const g=JSON.stringify({func:"calendarToIsoDate",year:m.year,month:m.month,day:m.day,overflow:f,id:this.id});t.set(g,e)})),m}validateCalendarDate(e){const{month:t,year:r,day:o,eraYear:i,monthCode:a,monthExtra:s}=e;if(s!==void 0)throw new RangeError("Unexpected `monthExtra` value");if(r===void 0&&i===void 0)throw new TypeError("year or eraYear is required");if(t===void 0&&a===void 0)throw new TypeError("month or monthCode is required");if(o===void 0)throw new RangeError("Missing day");if(a!==void 0){if(typeof a!="string")throw new RangeError("monthCode must be a string, not "+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw new RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&e.era===void 0!=(e.eraYear===void 0))throw new TypeError("properties era and eraYear must be provided together")}adjustCalendarDate(e,t=void 0,r="constrain",o=!1){if(this.calendarType==="lunisolar")throw new RangeError("Override required for lunisolar calendars");let i=e;this.validateCalendarDate(i);const a=this.monthsInYear(i,t);let{month:s,monthCode:c}=i;return{month:s,monthCode:c}=ii(i,r,a),{...i,month:s,monthCode:c}}regulateMonthDayNaive(e,t,r){const o=this.monthsInYear(e,r);let{month:i,day:a}=e;return t==="reject"?(ae(i,1,o),ae(a,1,this.maximumMonthLength(e))):(i=ke(i,1,o),a=ke(a,1,this.maximumMonthLength({...e,month:i}))),{...e,month:i,day:a}}calendarToIsoDate(e,t="constrain",r){const o=e;let i=this.adjustCalendarDate(e,r,t,!1);i=this.regulateMonthDayNaive(i,t,r);const{year:a,month:s,day:c}=i,l=JSON.stringify({func:"calendarToIsoDate",year:a,month:s,day:c,overflow:t,id:this.id});let d,m=r.get(l);if(m||o.year!==void 0&&o.month!==void 0&&o.day!==void 0&&(o.year!==i.year||o.month!==i.month||o.day!==i.day)&&(d=JSON.stringify({func:"calendarToIsoDate",year:o.year,month:o.month,day:o.day,overflow:t,id:this.id}),m=r.get(d),m))return m;let f=this.estimateIsoDate({year:a,month:s,day:c});const g=M=>{let x=this.addDaysIso(f,M);if(i.day>this.minimumMonthLength(i)){let k=this.isoToCalendarDate(x,r);for(;k.month!==s||k.year!==a;){if(t==="reject")throw new RangeError(`day ${c} does not exist in month ${s} of year ${a}`);x=this.addDaysIso(x,-1),k=this.isoToCalendarDate(x,r)}}return x};let y=0,p=this.isoToCalendarDate(f,r),w=_o(i,p);if(w.years!==0||w.months!==0||w.days!==0){const M=365*w.years+30*w.months+w.days;f=this.addDaysIso(f,M),p=this.isoToCalendarDate(f,r),w=_o(i,p),w.years===0&&w.months===0?f=g(w.days):y=this.compareCalendarDates(i,p)}let T=8;for(;y;){f=this.addDaysIso(f,y*T);const M=p;p=this.isoToCalendarDate(f,r);const x=y;if(y=this.compareCalendarDates(i,p),y){if(w=_o(i,p),w.years===0&&w.months===0)f=g(w.days),y=0;else if(x&&y!==x)if(T>1)T/=2;else{if(t==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...o})}`);this.compareCalendarDates(p,M)>0&&(f=this.addDaysIso(f,-1)),y=0}}}if(r.set(l,f),d&&r.set(d,f),i.year===void 0||i.month===void 0||i.day===void 0||i.monthCode===void 0||this.hasEra&&(i.era===void 0||i.eraYear===void 0))throw new RangeError("Unexpected missing property");return f}compareCalendarDates(e,t){return e.year!==t.year?Ie(e.year-t.year):e.month!==t.month?Ie(e.month-t.month):e.day!==t.day?Ie(e.day-t.day):0}regulateDate(e,t="constrain",r){const o=this.calendarToIsoDate(e,t,r);return this.isoToCalendarDate(o,r)}addDaysIso(e,t){return Ae(e.year,e.month,e.day+t)}addDaysCalendar(e,t,r){const o=this.calendarToIsoDate(e,"constrain",r),i=this.addDaysIso(o,t);return this.isoToCalendarDate(i,r)}addMonthsCalendar(e,t,r,o){let i=e;const{day:a}=i;for(let s=0,c=Math.abs(t);s<c;s++){const{month:l}=i,d=i,m=t<0?-Math.max(a,this.daysInPreviousMonth(i,o)):this.daysInMonth(i,o),f=this.calendarToIsoDate(i,"constrain",o);let g=this.addDaysIso(f,m);if(i=this.isoToCalendarDate(g,o),t>0){const y=this.monthsInYear(d,o);for(;i.month-1!=l%y;)g=this.addDaysIso(g,-1),i=this.isoToCalendarDate(g,o)}i.day!==a&&(i=this.regulateDate({...i,day:a},"constrain",o))}if(r==="reject"&&i.day!==a)throw new RangeError(`Day ${a} does not exist in resulting calendar month`);return i}addCalendar(e,{years:t=0,months:r=0,weeks:o=0,days:i=0},a,s){const{year:c,day:l,monthCode:d}=e,m=this.adjustCalendarDate({year:c+t,monthCode:d,day:l},s),f=this.addMonthsCalendar(m,r,a,s),g=i+7*o;return this.addDaysCalendar(f,g,s)}untilCalendar(e,t,r,o){let i=0,a=0,s=0,c=0;switch(r){case"day":i=this.calendarDaysUntil(e,t,o);break;case"week":{const l=this.calendarDaysUntil(e,t,o);i=l%7,a=(l-i)/7;break}case"month":case"year":{const l=this.compareCalendarDates(t,e);if(!l)return{years:0,months:0,weeks:0,days:0};const d=t.year-e.year,m=t.day-e.day;if(r==="year"&&d){let y=0;t.monthCode>e.monthCode&&(y=1),t.monthCode<e.monthCode&&(y=-1),y||(y=Math.sign(m)),c=y*l<0?d-l:d}let f,g=c?this.addCalendar(e,{years:c},"constrain",o):e;do s+=l,f=g,g=this.addMonthsCalendar(f,l,"constrain",o),g.day!==e.day&&(g=this.regulateDate({...g,day:e.day},"constrain",o));while(this.compareCalendarDates(t,g)*l>=0);s-=l,i=this.calendarDaysUntil(f,t,o);break}}return{years:c,months:s,weeks:a,days:i}}daysInMonth(e,t){const{day:r}=e,o=this.maximumMonthLength(e),i=this.minimumMonthLength(e);if(i===o)return i;const a=r<=o-i?o:i,s=this.calendarToIsoDate(e,"constrain",t),c=this.addDaysIso(s,a),l=this.isoToCalendarDate(c,t),d=this.addDaysIso(c,-l.day);return this.isoToCalendarDate(d,t).day}daysInPreviousMonth(e,t){const{day:r,month:o,year:i}=e;let a={year:o>1?i:i-1,month:o,day:1};const s=o>1?o-1:this.monthsInYear(a,t);a={...a,month:s};const c=this.minimumMonthLength(a),l=this.maximumMonthLength(a);if(c===l)return l;const d=this.calendarToIsoDate(e,"constrain",t),m=this.addDaysIso(d,-r);return this.isoToCalendarDate(m,t).day}startOfCalendarYear(e){return{year:e.year,month:1,monthCode:"M01",day:1}}startOfCalendarMonth(e){return{year:e.year,month:e.month,day:1}}calendarDaysUntil(e,t,r){const o=this.calendarToIsoDate(e,"constrain",r),i=this.calendarToIsoDate(t,"constrain",r);return Qt(i.year,i.month-1,i.day)-Qt(o.year,o.month-1,o.day)}monthDaySearchStartYear(e,t){return 1972}monthDayFromFields(e,t,r){let o,i,a,s,c,{era:l,eraYear:d,year:m,month:f,monthCode:g,day:y}=e;if(f!==void 0&&m===void 0&&(!this.hasEra||l===void 0||d===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(g===void 0||m!==void 0||this.hasEra&&d!==void 0)&&({monthCode:g,day:y}=this.isoToCalendarDate(this.calendarToIsoDate(e,t,r),r));const p={year:this.monthDaySearchStartYear(g,y),month:12,day:31},w=this.isoToCalendarDate(p,r),T=w.monthCode>g||w.monthCode===g&&w.day>=y?w.year:w.year-1;for(let M=0;M<20;M++){const x=this.adjustCalendarDate({day:y,monthCode:g,year:T-M},r),k=this.calendarToIsoDate(x,"constrain",r),$=this.isoToCalendarDate(k,r);if({year:o,month:i,day:a}=k,$.monthCode===g&&$.day===y)return{month:i,day:a,year:o};if(t==="constrain"){const Q=this.maxLengthOfMonthCodeInAnyYear($.monthCode);if($.monthCode===g&&$.day===Q&&y>Q)return{month:i,day:a,year:o};(s===void 0||$.monthCode===s.monthCode&&$.day>s.day)&&(s=$,c=k)}}if(t==="constrain"&&c!==void 0)return c;throw new RangeError(`No recent ${this.id} year with monthCode ${g} and day ${y}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}}class sc extends en{constructor(){super(...arguments),this.id="hebrew",this.calendarType="lunisolar",this.months={Tishri:{leap:1,regular:1,monthCode:"M01",days:30},Heshvan:{leap:2,regular:2,monthCode:"M02",days:{min:29,max:30}},Kislev:{leap:3,regular:3,monthCode:"M03",days:{min:29,max:30}},Tevet:{leap:4,regular:4,monthCode:"M04",days:29},Shevat:{leap:5,regular:5,monthCode:"M05",days:30},Adar:{leap:void 0,regular:6,monthCode:"M06",days:29},"Adar I":{leap:6,regular:void 0,monthCode:"M05L",days:30},"Adar II":{leap:7,regular:void 0,monthCode:"M06",days:29},Nisan:{leap:8,regular:7,monthCode:"M07",days:30},Iyar:{leap:9,regular:8,monthCode:"M08",days:29},Sivan:{leap:10,regular:9,monthCode:"M09",days:30},Tamuz:{leap:11,regular:10,monthCode:"M10",days:29},Av:{leap:12,regular:11,monthCode:"M11",days:30},Elul:{leap:13,regular:12,monthCode:"M12",days:29}}}inLeapYear(e){const{year:t}=e;return(7*t+1)%19<7}monthsInYear(e){return this.inLeapYear(e)?13:12}minimumMonthLength(e){return this.minMaxMonthLength(e,"min")}maximumMonthLength(e){return this.minMaxMonthLength(e,"max")}minMaxMonthLength(e,t){const{month:r,year:o}=e,i=this.getMonthCode(o,r),a=Object.entries(this.months).find((c=>c[1].monthCode===i));if(a===void 0)throw new RangeError(`unmatched Hebrew month: ${r}`);const s=a[1].days;return typeof s=="number"?s:s[t]}maxLengthOfMonthCodeInAnyYear(e){return["M04","M06","M08","M10","M12"].includes(e)?29:30}estimateIsoDate(e){const{year:t}=e;return{year:t-3760,month:1,day:1}}getMonthCode(e,t){return this.inLeapYear({year:e})?t===6?at(5,!0):at(t<6?t:t-1):at(t)}adjustCalendarDate(e,t,r="constrain",o=!1){let{year:i,month:a,monthCode:s,day:c,monthExtra:l}=e;if(i===void 0)throw new TypeError("Missing property: year");if(o){if(l){const d=this.months[l];if(!d)throw new RangeError(`Unrecognized month from formatToParts: ${l}`);a=this.inLeapYear({year:i})?d.leap:d.regular}return s=this.getMonthCode(i,a),{year:i,month:a,day:c,monthCode:s}}if(this.validateCalendarDate(e),a===void 0)if(s.endsWith("L")){if(s!=="M05L")throw new RangeError(`Hebrew leap month must have monthCode M05L, not ${s}`);if(a=6,!this.inLeapYear({year:i})){if(r==="reject")throw new RangeError(`Hebrew monthCode M05L is invalid in year ${i} which is not a leap year`);a=6,s="M06"}}else{a=Kt(s),this.inLeapYear({year:i})&&a>=6&&a++;const d=this.monthsInYear({year:i});if(a<1||a>d)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(ae(a,1,this.monthsInYear({year:i})),ae(c,1,this.maximumMonthLength({year:i,month:a}))):(a=ke(a,1,this.monthsInYear({year:i})),c=ke(c,1,this.maximumMonthLength({year:i,month:a}))),s===void 0)s=this.getMonthCode(i,a);else if(this.getMonthCode(i,a)!==s)throw new RangeError(`monthCode ${s} doesn't correspond to month ${a} in Hebrew year ${i}`);return{...e,day:c,month:a,monthCode:s,year:i}}}class Nn extends en{constructor(){super(...arguments),this.calendarType="lunar",this.DAYS_PER_ISLAMIC_YEAR=354+11/30,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(e,t){const r={year:e.year,month:1,monthCode:"M01",day:1},o={year:e.year+1,month:1,monthCode:"M01",day:1};return this.calendarDaysUntil(r,o,t)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(e){const{year:t}=this.adjustCalendarDate(e);return{year:Math.floor(t*this.DAYS_PER_ISLAMIC_YEAR/this.DAYS_PER_ISO_YEAR)+622,month:1,day:1}}}class cc extends Nn{constructor(){super(...arguments),this.id="islamic"}}class lc extends Nn{constructor(){super(...arguments),this.id="islamic-umalqura"}}class uc extends Nn{constructor(){super(...arguments),this.id="islamic-tbla"}}class dc extends Nn{constructor(){super(...arguments),this.id="islamic-civil"}}class hc extends Nn{constructor(){super(...arguments),this.id="islamic-rgsa"}}class mc extends Nn{constructor(){super(...arguments),this.id="islamicc"}}class fc extends en{constructor(){super(...arguments),this.id="persian",this.calendarType="solar"}inLeapYear(e,t){return this.daysInMonth({year:e.year,month:12,day:1},t)===30}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===12?29:t<=6?31:30}maximumMonthLength(e){const{month:t}=e;return t===12?30:t<=6?31:30}maxLengthOfMonthCodeInAnyYear(e){return Kt(e)<=6?31:30}estimateIsoDate(e){const{year:t}=this.adjustCalendarDate(e);return{year:t+621,month:1,day:1}}}class gc extends en{constructor(){super(...arguments),this.id="indian",this.calendarType="solar",this.months={1:{length:30,month:3,day:22,leap:{length:31,month:3,day:21}},2:{length:31,month:4,day:21},3:{length:31,month:5,day:22},4:{length:31,month:6,day:22},5:{length:31,month:7,day:23},6:{length:31,month:8,day:23},7:{length:30,month:9,day:23},8:{length:30,month:10,day:23},9:{length:30,month:11,day:22},10:{length:30,month:12,day:22},11:{length:30,month:1,nextYear:!0,day:21},12:{length:30,month:2,nextYear:!0,day:20}},this.vulnerableToBceBug=new Date("0000-01-01T00:00Z").toLocaleDateString("en-US-u-ca-indian",{timeZone:"UTC"})!=="10/11/-79 Saka"}inLeapYear(e){return ai(e.year+78)}monthsInYear(){return 12}minimumMonthLength(e){return this.getMonthInfo(e).length}maximumMonthLength(e){return this.getMonthInfo(e).length}maxLengthOfMonthCodeInAnyYear(e){const t=Kt(e);let r=this.months[t];return r=r.leap??r,r.length}getMonthInfo(e){const{month:t}=e;let r=this.months[t];if(r===void 0)throw new RangeError(`Invalid month: ${t}`);return this.inLeapYear(e)&&r.leap&&(r=r.leap),r}estimateIsoDate(e){const t=this.adjustCalendarDate(e),r=this.getMonthInfo(t);return Ae(t.year+78+(r.nextYear?1:0),r.month,r.day+t.day-1)}checkIcuBugs(e){if(this.vulnerableToBceBug&&e.year<1)throw new RangeError(`calendar '${this.id}' is broken for ISO dates before 0001-01-01 (see https://bugs.chromium.org/p/v8/issues/detail?id=10529)`)}}function ai(n){return n%4==0&&(n%100!=0||n%400==0)}class is extends en{constructor(e,t){super(),this.calendarType="solar",this.id=e,this.isoEpoch=t}inLeapYear(e){const{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return ai(t)}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===2?this.inLeapYear(e)?29:28:[4,6,9,11].indexOf(t)>=0?30:31}maximumMonthLength(e){return this.minimumMonthLength(e)}maxLengthOfMonthCodeInAnyYear(e){return[31,29,31,30,31,30,31,31,30,31,30,31][Kt(e)-1]}estimateIsoDate(e){const t=this.adjustCalendarDate(e);return Bn(t.year+this.isoEpoch.year,t.month+this.isoEpoch.month,t.day+this.isoEpoch.day,"constrain")}}class as extends en{constructor(e,t){super(),this.hasEra=!0,this.calendarType="solar",this.id=e;const{eras:r,anchorEra:o}=(function(i){let a,s=i;if(s.length===0)throw new RangeError("Invalid era data: eras are required");if(s.length===1&&s[0].reverseOf)throw new RangeError("Invalid era data: anchor era cannot count years backwards");if(s.length===1&&!s[0].code)throw new RangeError("Invalid era data: at least one named era is required");if(s.filter((l=>l.reverseOf!=null)).length>1)throw new RangeError("Invalid era data: only one era can count years backwards");s.forEach((l=>{if(l.isAnchor||!l.anchorEpoch&&!l.reverseOf){if(a)throw new RangeError("Invalid era data: cannot have multiple anchor eras");a=l,l.anchorEpoch={year:l.hasYearZero?0:1}}else if(!l.code)throw new RangeError("If era name is blank, it must be the anchor era")})),s=s.filter((l=>l.code)),s.forEach((l=>{const{reverseOf:d}=l;if(d){const m=s.find((f=>f.code===d));if(m===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${d}`);l.reverseOf=m,l.anchorEpoch=m.anchorEpoch,l.isoEpoch=m.isoEpoch}l.anchorEpoch.month===void 0&&(l.anchorEpoch.month=1),l.anchorEpoch.day===void 0&&(l.anchorEpoch.day=1)})),s.sort(((l,d)=>{if(l.reverseOf)return 1;if(d.reverseOf)return-1;if(!l.isoEpoch||!d.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return d.isoEpoch.year-l.isoEpoch.year}));const c=s[s.length-1].reverseOf;if(c&&c!==s[s.length-2])throw new RangeError("Invalid era data: invalid reverse-sign era");return s.forEach(((l,d)=>{l.genericName="era"+(s.length-1-d)})),{eras:s,anchorEra:a||s[0]}})(t);this.anchorEra=o,this.eras=r}inLeapYear(e){const{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return ai(t)}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===2?this.inLeapYear(e)?29:28:[4,6,9,11].indexOf(t)>=0?30:31}maximumMonthLength(e){return this.minimumMonthLength(e)}maxLengthOfMonthCodeInAnyYear(e){return[31,29,31,30,31,30,31,31,30,31,30,31][Kt(e)-1]}completeEraYear(e){const t=(s,c,l)=>{const d=e[s];if(d!=null&&d!=c&&!(l||[]).includes(d)){const m=l?.[0];throw new RangeError(`Input ${s} ${d} doesn't match calculated value ${m?`${c} (also called ${m})`:c}`)}},r=s=>{let c;const l={...e,year:s},d=this.eras.find(((m,f)=>{if(f===this.eras.length-1){if(m.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${m.code}`);return c=m.anchorEpoch.year-s,!0}return c=s-m.anchorEpoch.year+(m.hasYearZero?0:1),!0}return this.compareCalendarDates(l,m.anchorEpoch)>=0&&(c=s-m.anchorEpoch.year+(m.hasYearZero?0:1),!0)}));if(!d)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:c,era:d.code,eraNames:d.names}};let{year:o,eraYear:i,era:a}=e;if(o!=null){const s=r(o);({eraYear:i,era:a}=s),t("era",a,s?.eraNames),t("eraYear",i)}else{if(i==null)throw new RangeError("Either year or eraYear and era are required");{if(a===void 0)throw new RangeError("era and eraYear must be provided together");const s=this.eras.find((({code:c,names:l=[]})=>c===a||l.includes(a)));if(!s)throw new RangeError(`Era ${a} (ISO year ${i}) was not matched by any era`);o=s.reverseOf?s.anchorEpoch.year-i:i+s.anchorEpoch.year-(s.hasYearZero?0:1),t("year",o),{eraYear:i,era:a}=r(o)}}return{...e,year:o,eraYear:i,era:a}}adjustCalendarDate(e,t,r="constrain"){let o=e;const{month:i,monthCode:a}=o;return i===void 0&&(o={...o,month:Kt(a)}),this.validateCalendarDate(o),o=this.completeEraYear(o),super.adjustCalendarDate(o,t,r)}estimateIsoDate(e){const t=this.adjustCalendarDate(e),{year:r,month:o,day:i}=t,{anchorEra:a}=this;return Bn(r+a.isoEpoch.year-(a.hasYearZero?0:1),o,i,"constrain")}}class si extends as{constructor(e,t){super(e,t)}isoToCalendarDate(e){const{year:t,month:r,day:o}=e,i=at(r),a=t-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:r,monthCode:i,day:o})}}const nt={inLeapYear(n){const{year:e}=n;return(e+1)%4==0},monthsInYear:()=>13,minimumMonthLength(n){const{month:e}=n;return e===13?this.inLeapYear(n)?6:5:30},maximumMonthLength(n){return this.minimumMonthLength(n)},maxLengthOfMonthCodeInAnyYear:n=>n==="M13"?6:30};class yc extends is{constructor(e,t){super(e,t),this.inLeapYear=nt.inLeapYear,this.monthsInYear=nt.monthsInYear,this.minimumMonthLength=nt.minimumMonthLength,this.maximumMonthLength=nt.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=nt.maxLengthOfMonthCodeInAnyYear}}class ss extends as{constructor(e,t){super(e,t),this.inLeapYear=nt.inLeapYear,this.monthsInYear=nt.monthsInYear,this.minimumMonthLength=nt.minimumMonthLength,this.maximumMonthLength=nt.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=nt.maxLengthOfMonthCodeInAnyYear}}class pc extends yc{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}}class wc extends ss{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}}class vc extends ss{constructor(){super("ethiopic",[{code:"ethioaa",names:["ethiopic-amete-alem","mundi"],isoEpoch:{year:-5492,month:7,day:17}},{code:"ethiopic",names:["incar"],isoEpoch:{year:8,month:8,day:27},anchorEpoch:{year:5501}}])}}class bc extends si{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}}class Tc extends is{constructor(){super("buddhist",{year:-543,month:1,day:1})}}class _c extends si{constructor(){super("gregory",[{code:"gregory",names:["ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"gregory-inverse",names:["be","bce"],reverseOf:"gregory"}])}reviseIntlEra(e){let{era:t,eraYear:r}=e;return t==="b"&&(t="gregory-inverse"),t==="a"&&(t="gregory"),{era:t,eraYear:r}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}}class Dc extends si{constructor(){super("japanese",[{code:"reiwa",isoEpoch:{year:2019,month:5,day:1},anchorEpoch:{year:2019,month:5,day:1}},{code:"heisei",isoEpoch:{year:1989,month:1,day:8},anchorEpoch:{year:1989,month:1,day:8}},{code:"showa",isoEpoch:{year:1926,month:12,day:25},anchorEpoch:{year:1926,month:12,day:25}},{code:"taisho",isoEpoch:{year:1912,month:7,day:30},anchorEpoch:{year:1912,month:7,day:30}},{code:"meiji",isoEpoch:{year:1868,month:9,day:8},anchorEpoch:{year:1868,month:9,day:8}},{code:"japanese",names:["japanese","gregory","ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"japanese-inverse",names:["japanese-inverse","gregory-inverse","bc","bce"],reverseOf:"japanese"}]),this.erasBeginMidYear=!0}reviseIntlEra(e,t){const{era:r,eraYear:o}=e,{year:i}=t;return this.eras.find((a=>a.code===r))?{era:r,eraYear:o}:i<1?{era:"japanese-inverse",eraYear:1-i}:{era:"japanese",eraYear:i}}}class cs extends en{constructor(){super(...arguments),this.calendarType="lunisolar"}inLeapYear(e,t){const r=this.getMonthList(e.year,t);return Object.entries(r).length===13}monthsInYear(e,t){return this.inLeapYear(e,t)?13:12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(e){return["M01L","M09L","M10L","M11L","M12L"].includes(e)?29:30}monthDaySearchStartYear(e,t){const r={M01L:[1651,1651],M02L:[1947,1765],M03L:[1966,1955],M04L:[1963,1944],M05L:[1971,1952],M06L:[1960,1941],M07L:[1968,1938],M08L:[1957,1718],M09L:[1832,1832],M10L:[1870,1870],M11L:[1814,1814],M12L:[1890,1890]}[e]??[1972,1972];return t<30?r[0]:r[1]}getMonthList(e,t){if(e===void 0)throw new TypeError("Missing year");const r=JSON.stringify({func:"getMonthList",calendarYear:e,id:this.id}),o=t.get(r);if(o)return o;const i=this.getFormatter(),a=(w,T)=>{const M=os({isoYear:w,isoMonth:2,isoDay:1}),x=new Date(M);x.setUTCDate(T+1);const k=i.formatToParts(x),$=k.find((z=>z.type==="month")).value,Q=+k.find((z=>z.type==="day")).value,J=k.find((z=>z.type==="relatedYear"));let B;if(J===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return B=+J.value,{calendarMonthString:$,calendarDay:Q,calendarYearToVerify:B}};let s=17,{calendarMonthString:c,calendarDay:l,calendarYearToVerify:d}=a(e,s);c!=="1"&&(s+=29,{calendarMonthString:c,calendarDay:l}=a(e,s)),s-=l-5;const m={};let f,g,y=1,p=!1;do({calendarMonthString:c,calendarDay:l,calendarYearToVerify:d}=a(e,s)),f&&(m[g].daysInMonth=f+30-l),d!==e?p=!0:(m[c]={monthIndex:y++},s+=30),f=l,g=c;while(!p);return m[g].daysInMonth=f+30-l,t.set(r,m),m}estimateIsoDate(e){const{year:t,month:r}=e;return{year:t,month:r>=12?12:r+1,day:1}}adjustCalendarDate(e,t,r="constrain",o=!1){let{year:i,month:a,monthExtra:s,day:c,monthCode:l}=e;if(i===void 0)throw new TypeError("Missing property: year");if(o){if(s&&s!=="bis")throw new RangeError(`Unexpected leap month suffix: ${s}`);const d=at(a,s!==void 0),m=`${a}${s||""}`,f=this.getMonthList(i,t)[m];if(f===void 0)throw new RangeError(`Unmatched month ${m} in Chinese year ${i}`);return a=f.monthIndex,{year:i,month:a,day:c,monthCode:d}}if(this.validateCalendarDate(e),a===void 0){const d=this.getMonthList(i,t);let m=l.replace(/^M|L$/g,(g=>g==="L"?"bis":""));m[0]==="0"&&(m=m.slice(1));let f=d[m];if(a=f&&f.monthIndex,a===void 0&&l.endsWith("L")&&l!="M13L"&&r==="constrain"){const g=+l.replace(/^M0?|L$/g,"");f=d[g],f&&(a=f.monthIndex,l=at(g))}if(a===void 0)throw new RangeError(`Unmatched month ${l} in Chinese year ${i}`)}else if(l===void 0){const d=this.getMonthList(i,t),m=Object.entries(d),f=m.length;r==="reject"?(ae(a,1,f),ae(c,1,this.maximumMonthLength())):(a=ke(a,1,f),c=ke(c,1,this.maximumMonthLength()));const g=m.find((y=>y[1].monthIndex===a));if(g===void 0)throw new RangeError(`Invalid month ${a} in Chinese year ${i}`);l=at(+g[0].replace("bis",""),g[0].indexOf("bis")!==-1)}else{const d=this.getMonthList(i,t);let m=l.replace(/^M|L$/g,(g=>g==="L"?"bis":""));m[0]==="0"&&(m=m.slice(1));const f=d[m];if(!f)throw new RangeError(`Unmatched monthCode ${l} in Chinese year ${i}`);if(a!==f.monthIndex)throw new RangeError(`monthCode ${l} doesn't correspond to month ${a} in Chinese year ${i}`)}return{...e,year:i,month:a,monthCode:l,day:c}}}class Ec extends cs{constructor(){super(...arguments),this.id="chinese"}}class Mc extends cs{constructor(){super(...arguments),this.id="dangi"}}class xc{constructor(e){this.helper=e}extraFields(e){return this.helper.hasEra&&e.includes("year")?["era","eraYear"]:[]}resolveFields(e){if(this.helper.calendarType!=="lunisolar"){const t=new ie;ii(e,void 0,this.helper.monthsInYear({year:e.year??1972},t))}}dateToISO(e,t){const r=new ie,o=this.helper.calendarToIsoDate(e,t,r);return r.setObject(o),o}monthDayToISOReferenceDate(e,t){const r=new ie,o=this.helper.monthDayFromFields(e,t,r);return r.setObject(o),o}fieldKeysToIgnore(e){const t=new Set;for(let r=0;r<e.length;r++){const o=e[r];switch(t.add(o),o){case"era":t.add("eraYear"),t.add("year");break;case"eraYear":t.add("era"),t.add("year");break;case"year":t.add("era"),t.add("eraYear");break;case"month":t.add("monthCode"),this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"));break;case"monthCode":t.add("month"),this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"));break;case"day":this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"))}}return ns(t)}dateAdd(e,{years:t,months:r,weeks:o,days:i},a){const s=ie.getCacheForObject(e),c=this.helper.isoToCalendarDate(e,s),l=this.helper.addCalendar(c,{years:t,months:r,weeks:o,days:i},a,s),d=this.helper.calendarToIsoDate(l,"constrain",s);return ie.getCacheForObject(d)||new ie(s).setObject(d),d}dateUntil(e,t,r){const o=ie.getCacheForObject(e),i=ie.getCacheForObject(t),a=this.helper.isoToCalendarDate(e,o),s=this.helper.isoToCalendarDate(t,i);return this.helper.untilCalendar(a,s,r,o)}isoToDate(e,t){const r=ie.getCacheForObject(e),o=this.helper.isoToCalendarDate(e,r);if(t.dayOfWeek&&(o.dayOfWeek=Mr.iso8601.isoToDate(e,{dayOfWeek:!0}).dayOfWeek),t.dayOfYear){const i=this.helper.startOfCalendarYear(o),a=this.helper.calendarDaysUntil(i,o,r);o.dayOfYear=a+1}if(t.weekOfYear&&(o.weekOfYear=rs(this.helper.id,e)),o.daysInWeek=7,t.daysInMonth&&(o.daysInMonth=this.helper.daysInMonth(o,r)),t.daysInYear){const i=this.helper.startOfCalendarYear(o),a=this.helper.addCalendar(i,{years:1},"constrain",r);o.daysInYear=this.helper.calendarDaysUntil(i,a,r)}return t.monthsInYear&&(o.monthsInYear=this.helper.monthsInYear(o,r)),t.inLeapYear&&(o.inLeapYear=this.helper.inLeapYear(o,r)),o}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}}for(const n of[sc,fc,vc,pc,wc,Ec,Mc,bc,gc,Tc,_c,Dc,cc,lc,uc,dc,hc,mc]){const e=new n;Mr[e.id]=new xc(e)}$o("calendarImpl",(function(n){return Mr[n]}));const lr=Intl.DateTimeFormat;function on(n,e){let t=h(n,e);return typeof t=="function"&&(t=new lr(h(n,va),t(h(n,Co))),(function(r,o,i){const a=to(r);if(a===void 0)throw new TypeError("Missing slots for the given container");if(a[o]===void 0)throw new TypeError(`tried to reset ${o} which was not set`);a[o]=i})(n,e,t)),t}function An(n){return Ne(n,Bt)}class ur{constructor(e=void 0,t=void 0){(function(r,o,i){const a=i!==void 0;let s;if(a){const m=["localeMatcher","calendar","numberingSystem","hour12","hourCycle","timeZone","weekday","era","year","month","day","dayPeriod","hour","minute","second","fractionalSecondDigits","timeZoneName","formatMatcher","dateStyle","timeStyle"];s=(function(g){if(g==null)throw new TypeError(`Expected object not ${g}`);return Object(g)})(i);const f=Object.create(null);for(let g=0;g<m.length;g++){const y=m[g];Object.prototype.hasOwnProperty.call(s,y)&&(f[y]=s[y])}s=f}else s=Object.create(null);const c=new lr(o,s),l=c.resolvedOptions();if(Mt(r),a){const m=Object.assign(Object.create(null),l);for(const f in m)Object.prototype.hasOwnProperty.call(s,f)||delete m[f];m.hour12=s.hour12,m.hourCycle=s.hourCycle,P(r,Co,m)}else P(r,Co,s);P(r,va,l.locale),P(r,Bt,c),P(r,un,l.timeZone),P(r,zn,l.calendar),P(r,ma,Yc),P(r,fa,Pc),P(r,ga,Rc),P(r,ya,Nc),P(r,pa,Ic),P(r,wa,Lc);const d=a?s.timeZone:void 0;if(d===void 0)P(r,xo,l.timeZone);else{const m=io(d);if(m.startsWith("−"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");P(r,xo,je(m))}})(this,e,t)}get format(){v(this,An);const e=kc.bind(this);return Object.defineProperties(e,{length:{value:1,enumerable:!1,writable:!1,configurable:!0},name:{value:"",enumerable:!1,writable:!1,configurable:!0}}),e}formatRange(e,t){return v(this,An),jc.call(this,e,t)}formatToParts(e,...t){return v(this,An),Oc.call(this,e,...t)}formatRangeToParts(e,t){return v(this,An),$c.call(this,e,t)}resolvedOptions(){return v(this,An),Cc.call(this)}}"formatToParts"in lr.prototype||delete ur.prototype.formatToParts,"formatRangeToParts"in lr.prototype||delete ur.prototype.formatRangeToParts;const Ve=function(n=void 0,e=void 0){return new ur(n,e)};function Cc(){const n=h(this,Bt).resolvedOptions();return n.timeZone=h(this,xo),n}function kc(n,...e){let t,r,o=Dn(n,this);return o.formatter?(t=o.formatter,r=[Ke(o.epochNs,"floor")]):(t=h(this,Bt),r=[n,...e]),t.format(...r)}function Oc(n,...e){let t,r,o=Dn(n,this);return o.formatter?(t=o.formatter,r=[Ke(o.epochNs,"floor")]):(t=h(this,Bt),r=[n,...e]),t.formatToParts(...r)}function jc(n,e){if(n===void 0||e===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");const t=Kr(n),r=Kr(e);let o,i=[t,r];if(_t(t)!==_t(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(_t(t)){if(!ls(t,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");const{epochNs:a,formatter:s}=Dn(t,this),{epochNs:c,formatter:l}=Dn(r,this);s&&(o=s,i=[Ke(a,"floor"),Ke(c,"floor")])}return o||(o=h(this,Bt)),o.formatRange(...i)}function $c(n,e){if(n===void 0||e===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");const t=Kr(n),r=Kr(e);let o,i=[t,r];if(_t(t)!==_t(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(_t(t)){if(!ls(t,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");const{epochNs:a,formatter:s}=Dn(t,this),{epochNs:c,formatter:l}=Dn(r,this);s&&(o=s,i=[Ke(a,"floor"),Ke(c,"floor")])}return o||(o=h(this,Bt)),o.formatRangeToParts(...i)}function xr(n={},e={}){const t=Object.assign({},n),r=["year","month","day","hour","minute","second","weekday","dayPeriod","timeZoneName","dateStyle","timeStyle"];for(let o=0;o<r.length;o++){const i=r[o];t[i]=i in e?e[i]:t[i],t[i]!==!1&&t[i]!==void 0||delete t[i]}return t}function Nc(n){const e=xr(n,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(e.timeStyle!=="long"&&e.timeStyle!=="full"||(delete e.timeStyle,Object.assign(e,{hour:"numeric",minute:"2-digit",second:"2-digit"})),!go(e)){if(Cr(n))throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);Object.assign(e,{hour:"numeric",minute:"numeric",second:"numeric"})}return e}function Pc(n){const e={short:{year:"2-digit",month:"numeric"},medium:{year:"numeric",month:"short"},long:{year:"numeric",month:"long"},full:{year:"numeric",month:"long"}},t=xr(n,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in t&&t.dateStyle){const r=t.dateStyle;delete t.dateStyle,Object.assign(t,e[r])}if(!("year"in t||"month"in t||"era"in t)){if(Cr(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric"})}return t}function Rc(n){const e={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},t=xr(n,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in t&&t.dateStyle){const r=t.dateStyle;delete t.dateStyle,Object.assign(t,e[r])}if(!("month"in t)&&!("day"in t)){if(Cr(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(t,{month:"numeric",day:"numeric"})}return t}function Yc(n){const e=xr(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!fo(e)){if(Cr(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric",day:"numeric"})}return e}function Ic(n){const e=xr(n,{timeZoneName:!1});if((e.timeStyle==="long"||e.timeStyle==="full")&&(delete e.timeStyle,Object.assign(e,{hour:"numeric",minute:"2-digit",second:"2-digit"}),e.dateStyle)&&(Object.assign(e,{short:{year:"numeric",month:"numeric",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{year:"numeric",month:"long",day:"numeric",weekday:"long"}}[e.dateStyle]),delete e.dateStyle),!go(e)&&!fo(e)){if(Cr(n))throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}return e}function Lc(n){let e=n;return go(e)||fo(e)||(e=Object.assign({},e,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),e}function fo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function go(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Cr(n){return fo(n)||go(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function _t(n){return H(n)||K(n)||Z(n)||R(n)||ce(n)||Fe(n)||se(n)}function Kr(n){return _t(n)?n:oo(n)}function ls(n,e){return!(!_t(n)||!_t(e)||K(n)&&!K(e)||H(n)&&!H(e)||Z(n)&&!Z(e)||R(n)&&!R(e)||ce(n)&&!ce(e)||Fe(n)&&!Fe(e)||se(n)&&!se(e))}function Dn(n,e){if(K(n)){const t={isoDate:{year:1970,month:1,day:1},time:h(n,G)};return{epochNs:ge(h(e,un),t,"compatible"),formatter:on(e,ya)}}if(ce(n)){const t=h(n,D),r=h(e,zn);if(t!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${t} in locale with calendar ${r}`);const o=U(h(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(h(e,un),o,"compatible"),formatter:on(e,fa)}}if(Fe(n)){const t=h(n,D),r=h(e,zn);if(t!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${t} in locale with calendar ${r}`);const o=U(h(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(h(e,un),o,"compatible"),formatter:on(e,ga)}}if(H(n)){const t=h(n,D),r=h(e,zn);if(t!=="iso8601"&&t!==r)throw new RangeError(`cannot format PlainDate with calendar ${t} in locale with calendar ${r}`);const o=U(h(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(h(e,un),o,"compatible"),formatter:on(e,ma)}}if(Z(n)){const t=h(n,D),r=h(e,zn);if(t!=="iso8601"&&t!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${t} in locale with calendar ${r}`);const o=h(n,q);return{epochNs:ge(h(e,un),o,"compatible"),formatter:on(e,pa)}}if(R(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return se(n)?{epochNs:h(n,O),formatter:on(e,wa)}:{}}function us(n){const e=Object.create(null);return e.years=h(n,be),e.months=h(n,Te),e.weeks=h(n,Re),e.days=h(n,_e),e.hours=h(n,De),e.minutes=h(n,Ee),e.seconds=h(n,Me),e.milliseconds=h(n,xe),e.microseconds=h(n,Ce),e.nanoseconds=h(n,Ye),e}ur.prototype.constructor=Ve,Object.defineProperty(Ve,"prototype",{value:ur.prototype,writable:!1,enumerable:!1,configurable:!1}),Ve.supportedLocalesOf=lr.supportedLocalesOf,xt(Ve,"Intl.DateTimeFormat");const{format:Ac,formatToParts:Uc}=Intl.DurationFormat?.prototype??Object.create(null);function ds(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);const e=us(Qe(n));return Ac.call(this,e)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=ds,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);const e=us(Qe(n));return Uc.call(this,e)});class ci{constructor(e){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");Aa(this,Xr(e))}get epochMilliseconds(){return v(this,se),Ke(h(this,O),"floor")}get epochNanoseconds(){return v(this,se),es(u.BigInt(h(this,O)))}add(e){return v(this,se),Vi("add",this,e)}subtract(e){return v(this,se),Vi("subtract",this,e)}until(e,t=void 0){return v(this,se),Si("until",this,e,t)}since(e,t=void 0){return v(this,se),Si("since",this,e,t)}round(e){if(v(this,se),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Xt("smallestUnit",e):C(e),r=kn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et);return On(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[i],!0),rt(So(h(this,O),r,i,o))}equals(e){v(this,se);const t=Wn(e),r=h(this,O),o=h(t,O);return u.equal(u.BigInt(r),u.BigInt(o))}toString(e=void 0){v(this,se);const t=C(e),r=pr(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let a=t.timeZone;a!==void 0&&(a=je(a));const{precision:s,unit:c,increment:l}=wr(i,r);return Ni(rt(So(h(this,O),l,c,o)),a,s)}toJSON(){return v(this,se),Ni(this,void 0,"auto")}toLocaleString(e=void 0,t=void 0){return v(this,se),new Ve(e,t).format(this)}valueOf(){Ft("Instant")}toZonedDateTimeISO(e){v(this,se);const t=je(e);return me(h(this,O),t,"iso8601")}static fromEpochMilliseconds(e){return rt(it(oo(e)))}static fromEpochNanoseconds(e){return rt(Xr(e))}static from(e){return Wn(e)}static compare(e,t){const r=Wn(e),o=Wn(t),i=h(r,O),a=h(o,O);return u.lessThan(i,a)?-1:u.greaterThan(i,a)?1:0}}xt(ci,"Temporal.Instant");class li{constructor(e,t,r,o="iso8601"){const i=N(e),a=N(t),s=N(r),c=Pe(o===void 0?"iso8601":re(o));Gt(i,a,s),Pa(this,{year:i,month:a,day:s},c)}get calendarId(){return v(this,H),h(this,D)}get era(){return pe(this,"era")}get eraYear(){return pe(this,"eraYear")}get year(){return pe(this,"year")}get month(){return pe(this,"month")}get monthCode(){return pe(this,"monthCode")}get day(){return pe(this,"day")}get dayOfWeek(){return pe(this,"dayOfWeek")}get dayOfYear(){return pe(this,"dayOfYear")}get weekOfYear(){return pe(this,"weekOfYear")?.week}get yearOfWeek(){return pe(this,"weekOfYear")?.year}get daysInWeek(){return pe(this,"daysInWeek")}get daysInMonth(){return pe(this,"daysInMonth")}get daysInYear(){return pe(this,"daysInYear")}get monthsInYear(){return pe(this,"monthsInYear")}get inLeapYear(){return pe(this,"inLeapYear")}with(e,t=void 0){if(v(this,H),!V(e))throw new TypeError("invalid argument");Cn(e);const r=h(this,D);let o=$e(r,h(this,j));return o=Ht(r,o,qe(r,e,["year","month","monthCode","day"],[],"partial")),Oe(Lt(r,o,L(C(t))),r)}withCalendar(e){v(this,H);const t=_r(e);return Oe(h(this,j),t)}add(e,t=void 0){return v(this,H),Qi("add",this,e,t)}subtract(e,t=void 0){return v(this,H),Qi("subtract",this,e,t)}until(e,t=void 0){return v(this,H),zi("until",this,e,t)}since(e,t=void 0){return v(this,H),zi("since",this,e,t)}equals(e){v(this,H);const t=Zn(e);return lt(h(this,j),h(t,j))===0&&st(h(this,D),h(t,D))}toString(e=void 0){return v(this,H),Pi(this,yr(C(e)))}toJSON(){return v(this,H),Pi(this)}toLocaleString(e=void 0,t=void 0){return v(this,H),new Ve(e,t).format(this)}valueOf(){Ft("PlainDate")}toPlainDateTime(e=void 0){v(this,H);const t=Na(e);return He(U(h(this,j),t),h(this,D))}toZonedDateTime(e){let t,r;if(v(this,H),V(e)){const a=e.timeZone;a===void 0?t=je(e):(t=je(a),r=e.plainTime)}else t=je(e);const o=h(this,j);let i;return r===void 0?i=kt(t,o):(r=$t(r),i=ge(t,U(o,h(r,G)),"compatible")),me(i,t,h(this,D))}toPlainYearMonth(){v(this,H);const e=h(this,D);return gn(or(e,$e(e,h(this,j)),"constrain"),e)}toPlainMonthDay(){v(this,H);const e=h(this,D);return mn(Wr(e,$e(e,h(this,j)),"constrain"),e)}static from(e,t=void 0){return Zn(e,t)}static compare(e,t){const r=Zn(e),o=Zn(t);return lt(h(r,j),h(o,j))}}function pe(n,e){v(n,H);const t=h(n,j);return vr(n).isoToDate(t,{[e]:!0})[e]}xt(li,"Temporal.PlainDate");class ui{constructor(e,t,r,o=0,i=0,a=0,s=0,c=0,l=0,d="iso8601"){const m=N(e),f=N(t),g=N(r),y=o===void 0?0:N(o),p=i===void 0?0:N(i),w=a===void 0?0:N(a),T=s===void 0?0:N(s),M=c===void 0?0:N(c),x=l===void 0?0:N(l),k=Pe(d===void 0?"iso8601":re(d));ti(m,f,g,y,p,w,T,M,x),Ra(this,{isoDate:{year:m,month:f,day:g},time:{hour:y,minute:p,second:w,millisecond:T,microsecond:M,nanosecond:x}},k)}get calendarId(){return v(this,Z),h(this,D)}get year(){return we(this,"year")}get month(){return we(this,"month")}get monthCode(){return we(this,"monthCode")}get day(){return we(this,"day")}get hour(){return an(this,"hour")}get minute(){return an(this,"minute")}get second(){return an(this,"second")}get millisecond(){return an(this,"millisecond")}get microsecond(){return an(this,"microsecond")}get nanosecond(){return an(this,"nanosecond")}get era(){return we(this,"era")}get eraYear(){return we(this,"eraYear")}get dayOfWeek(){return we(this,"dayOfWeek")}get dayOfYear(){return we(this,"dayOfYear")}get weekOfYear(){return we(this,"weekOfYear")?.week}get yearOfWeek(){return we(this,"weekOfYear")?.year}get daysInWeek(){return we(this,"daysInWeek")}get daysInYear(){return we(this,"daysInYear")}get daysInMonth(){return we(this,"daysInMonth")}get monthsInYear(){return we(this,"monthsInYear")}get inLeapYear(){return we(this,"inLeapYear")}with(e,t=void 0){if(v(this,Z),!V(e))throw new TypeError("invalid argument");Cn(e);const r=h(this,D),o=h(this,q);let i={...$e(r,o.isoDate),...o.time};return i=Ht(r,i,qe(r,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),He(br(r,i,L(C(t))),r)}withPlainTime(e=void 0){v(this,Z);const t=Na(e);return He(U(h(this,q).isoDate,t),h(this,D))}withCalendar(e){v(this,Z);const t=_r(e);return He(h(this,q),t)}add(e,t=void 0){return v(this,Z),Xi("add",this,e,t)}subtract(e,t=void 0){return v(this,Z),Xi("subtract",this,e,t)}until(e,t=void 0){return v(this,Z),Zi("until",this,e,t)}since(e,t=void 0){return v(this,Z),Zi("since",this,e,t)}round(e){if(v(this,Z),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Xt("smallestUnit",e):C(e),r=kn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];On(r,a,a===1);const s=h(this,q);return He(r===1&&i==="nanosecond"?s:zo(s,r,i,o),h(this,D))}equals(e){v(this,Z);const t=qn(e);return _n(h(this,q),h(t,q))===0&&st(h(this,D),h(t,D))}toString(e=void 0){v(this,Z);const t=C(e),r=yr(t),o=pr(t),i=Je(t,"trunc"),a=Le(t,"smallestUnit","time",void 0);if(a==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const{precision:s,unit:c,increment:l}=wr(a,o),d=zo(h(this,q),l,c,i);return Vt(d),ar(d,h(this,D),s,r)}toJSON(){return v(this,Z),ar(h(this,q),h(this,D),"auto")}toLocaleString(e=void 0,t=void 0){return v(this,Z),new Ve(e,t).format(this)}valueOf(){Ft("PlainDateTime")}toZonedDateTime(e,t=void 0){v(this,Z);const r=je(e),o=Jn(C(t));return me(ge(r,h(this,q),o),r,h(this,D))}toPlainDate(){return v(this,Z),Oe(h(this,q).isoDate,h(this,D))}toPlainTime(){return v(this,Z),pt(h(this,q).time)}static from(e,t=void 0){return qn(e,t)}static compare(e,t){const r=qn(e),o=qn(t);return _n(h(r,q),h(o,q))}}function we(n,e){v(n,Z);const t=h(n,q).isoDate;return vr(n).isoToDate(t,{[e]:!0})[e]}function an(n,e){return v(n,Z),h(n,q).time[e]}xt(ui,"Temporal.PlainDateTime");class En{constructor(e=0,t=0,r=0,o=0,i=0,a=0,s=0,c=0,l=0,d=0){const m=e===void 0?0:Be(e),f=t===void 0?0:Be(t),g=r===void 0?0:Be(r),y=o===void 0?0:Be(o),p=i===void 0?0:Be(i),w=a===void 0?0:Be(a),T=s===void 0?0:Be(s),M=c===void 0?0:Be(c),x=l===void 0?0:Be(l),k=d===void 0?0:Be(d);ho(m,f,g,y,p,w,T,M,x,k),Mt(this),P(this,be,m),P(this,Te,f),P(this,Re,g),P(this,_e,y),P(this,De,p),P(this,Ee,w),P(this,Me,T),P(this,xe,M),P(this,Ce,x),P(this,Ye,k)}get years(){return v(this,W),h(this,be)}get months(){return v(this,W),h(this,Te)}get weeks(){return v(this,W),h(this,Re)}get days(){return v(this,W),h(this,_e)}get hours(){return v(this,W),h(this,De)}get minutes(){return v(this,W),h(this,Ee)}get seconds(){return v(this,W),h(this,Me)}get milliseconds(){return v(this,W),h(this,xe)}get microseconds(){return v(this,W),h(this,Ce)}get nanoseconds(){return v(this,W),h(this,Ye)}get sign(){return v(this,W),Vr(this)}get blank(){return v(this,W),Vr(this)===0}with(e){v(this,W);const t=$a(e),{years:r=h(this,be),months:o=h(this,Te),weeks:i=h(this,Re),days:a=h(this,_e),hours:s=h(this,De),minutes:c=h(this,Ee),seconds:l=h(this,Me),milliseconds:d=h(this,xe),microseconds:m=h(this,Ce),nanoseconds:f=h(this,Ye)}=t;return new En(r,o,i,a,s,c,l,d,m,f)}negated(){return v(this,W),Ue(this)}abs(){return v(this,W),new En(Math.abs(h(this,be)),Math.abs(h(this,Te)),Math.abs(h(this,Re)),Math.abs(h(this,_e)),Math.abs(h(this,De)),Math.abs(h(this,Ee)),Math.abs(h(this,Me)),Math.abs(h(this,xe)),Math.abs(h(this,Ce)),Math.abs(h(this,Ye)))}add(e){return v(this,W),Gi("add",this,e)}subtract(e){return v(this,W),Gi("subtract",this,e)}round(e){if(v(this,W),e===void 0)throw new TypeError("options parameter is required");const t=gt(this),r=typeof e=="string"?Xt("smallestUnit",e):C(e);let o=Le(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:i,zonedRelativeTo:a}=To(r);const s=kn(r),c=Je(r,"halfExpand");let l=Le(r,"smallestUnit","datetime",void 0),d=!0;l||(d=!1,l="nanosecond");const m=vt(t,l);let f=!0;if(o||(f=!1,o=m),o==="auto"&&(o=m),!d&&!f)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(vt(o,l)!==o)throw new RangeError(`largestUnit ${o} cannot be smaller than smallestUnit ${l}`);const g={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[l];if(g!==void 0&&On(s,g,!1),s>1&&yt(l)==="date"&&o!==l)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let p=dn(this);const w=h(a,F),T=h(a,D),M=h(a,O);return p=Ja(M,Vn(M,w,T,p),w,T,o,s,l,c),yt(o)==="date"&&(o="hour"),Ge(p,o)}if(i){let p=ot(this);const w=Tn({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},p.time),T=h(i,j),M=h(i,D),x=ze(M,T,fe(p.date,w.deltaDays),"constrain");return p=Ba(U(T,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),U(x,w),M,o,s,l,c),Ge(p,o)}if(tt(t))throw new RangeError(`a starting point is required for ${t}s balancing`);if(tt(o))throw new RangeError(`a starting point is required for ${o}s balancing`);let y=ot(this);if(l==="day"){const{quotient:p,remainder:w}=y.time.divmod(zr);let T=y.date.days+p+er(w,"day");T=Nt(T,s,c),y=bt({years:0,months:0,weeks:0,days:T},Y.ZERO)}else y=bt({years:0,months:0,weeks:0,days:0},Qr(y.time,s,l,c));return Ge(y,o)}total(e){if(v(this,W),e===void 0)throw new TypeError("options argument is required");const t=typeof e=="string"?Xt("unit",e):C(e);let{plainRelativeTo:r,zonedRelativeTo:o}=To(t);const i=Le(t,"unit","datetime",Et);if(o){const s=dn(this),c=h(o,F),l=h(o,D),d=h(o,O);return(function(m,f,g,y,p){return yt(p)==="time"?er(Y.fromEpochNsDiff(f,m),p):Fi(Xa(m,f,g,y,p),f,Xe(g,m),g,y,p)})(d,Vn(d,c,l,s),c,l,i)}if(r){const s=ot(this);let c=Tn({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time);const l=h(r,j),d=h(r,D),m=ze(d,l,fe(s.date,c.deltaDays),"constrain");return(function(f,g,y,p){if(_n(f,g)==0)return 0;Vt(f),Vt(g);const w=Qa(f,g,y,p);return p==="nanosecond"?u.toNumber(w.time.totalNs):Fi(w,le(g),f,null,y,p)})(U(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),U(m,c),d,i)}const a=gt(this);if(tt(a))throw new RangeError(`a starting point is required for ${a}s total`);if(tt(i))throw new RangeError(`a starting point is required for ${i}s total`);return er(ot(this).time,i)}toString(e=void 0){v(this,W);const t=C(e),r=pr(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour"||i==="minute")throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');const{precision:a,unit:s,increment:c}=wr(i,r);if(s==="nanosecond"&&c===1)return Pr(this,a);const l=gt(this);let d=dn(this);const m=Qr(d.time,c,s,o);return d=bt(d.date,m),Pr(Ge(d,vt(l,"second")),a)}toJSON(){return v(this,W),Pr(this,"auto")}toLocaleString(e=void 0,t=void 0){if(v(this,W),typeof Intl.DurationFormat=="function"){const r=new Intl.DurationFormat(e,t);return ds.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),Pr(this,"auto")}valueOf(){Ft("Duration")}static from(e){return Qe(e)}static compare(e,t,r=void 0){const o=Qe(e),i=Qe(t),a=C(r),{plainRelativeTo:s,zonedRelativeTo:c}=To(a);if(h(o,be)===h(i,be)&&h(o,Te)===h(i,Te)&&h(o,Re)===h(i,Re)&&h(o,_e)===h(i,_e)&&h(o,De)===h(i,De)&&h(o,Ee)===h(i,Ee)&&h(o,Me)===h(i,Me)&&h(o,xe)===h(i,xe)&&h(o,Ce)===h(i,Ce)&&h(o,Ye)===h(i,Ye))return 0;const l=gt(o),d=gt(i),m=dn(o),f=dn(i);if(c&&(yt(l)==="date"||yt(d)==="date")){const T=h(c,F),M=h(c,D),x=h(c,O),k=Vn(x,T,M,m),$=Vn(x,T,M,f);return Ie(u.toNumber(u.subtract(k,$)))}let g=m.date.days,y=f.date.days;if(tt(l)||tt(d)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");g=Ui(m.date,s),y=Ui(f.date,s)}const p=m.time.add24HourDays(g),w=f.time.add24HourDays(y);return p.cmp(w)}}xt(En,"Temporal.Duration");class di{constructor(e,t,r="iso8601",o=1972){const i=N(e),a=N(t),s=Pe(r===void 0?"iso8601":re(r)),c=N(o);Gt(c,i,a),Ya(this,{year:c,month:i,day:a},s)}get monthCode(){return ta(this,"monthCode")}get day(){return ta(this,"day")}get calendarId(){return v(this,Fe),h(this,D)}with(e,t=void 0){if(v(this,Fe),!V(e))throw new TypeError("invalid argument");Cn(e);const r=h(this,D);let o=$e(r,h(this,j),"month-day");return o=Ht(r,o,qe(r,e,["year","month","monthCode","day"],[],"partial")),mn(Wr(r,o,L(C(t))),r)}equals(e){v(this,Fe);const t=ji(e);return lt(h(this,j),h(t,j))===0&&st(h(this,D),h(t,D))}toString(e=void 0){return v(this,Fe),Yi(this,yr(C(e)))}toJSON(){return v(this,Fe),Yi(this)}toLocaleString(e=void 0,t=void 0){return v(this,Fe),new Ve(e,t).format(this)}valueOf(){Ft("PlainMonthDay")}toPlainDate(e){if(v(this,Fe),!V(e))throw new TypeError("argument should be an object");const t=h(this,D);return Oe(Lt(t,Ht(t,$e(t,h(this,j),"month-day"),qe(t,e,["year"],[],[])),"constrain"),t)}static from(e,t=void 0){return ji(e,t)}}function ta(n,e){v(n,Fe);const t=h(n,j);return vr(n).isoToDate(t,{[e]:!0})[e]}function Do(n){return Xe(n,Wo())}xt(di,"Temporal.PlainMonthDay");const hs={instant:()=>rt(Wo()),plainDateTimeISO:(n=Ln())=>He(Do(je(n)),"iso8601"),plainDateISO:(n=Ln())=>Oe(Do(je(n)).isoDate,"iso8601"),plainTimeISO:(n=Ln())=>pt(Do(je(n)).time),timeZoneId:()=>Ln(),zonedDateTimeISO:(n=Ln())=>{const e=je(n);return me(Wo(),e,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(hs,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});class kr{constructor(e=0,t=0,r=0,o=0,i=0,a=0){const s=e===void 0?0:N(e),c=t===void 0?0:N(t),l=r===void 0?0:N(r),d=o===void 0?0:N(o),m=i===void 0?0:N(i),f=a===void 0?0:N(a);uo(s,c,l,d,m,f),Ia(this,{hour:s,minute:c,second:l,millisecond:d,microsecond:m,nanosecond:f})}get hour(){return v(this,K),h(this,G).hour}get minute(){return v(this,K),h(this,G).minute}get second(){return v(this,K),h(this,G).second}get millisecond(){return v(this,K),h(this,G).millisecond}get microsecond(){return v(this,K),h(this,G).microsecond}get nanosecond(){return v(this,K),h(this,G).nanosecond}with(e,t=void 0){if(v(this,K),!V(e))throw new TypeError("invalid argument");Cn(e);const r=Yo(e,"partial"),o=Yo(this);let{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=Object.assign(o,r);const m=L(C(t));return{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=so(i,a,s,c,l,d,m),new kr(i,a,s,c,l,d)}add(e){return v(this,K),Ki("add",this,e)}subtract(e){return v(this,K),Ki("subtract",this,e)}until(e,t=void 0){return v(this,K),qi("until",this,e,t)}since(e,t=void 0){return v(this,K),qi("since",this,e,t)}round(e){if(v(this,K),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Xt("smallestUnit",e):C(e),r=kn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et);return On(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i],!1),pt(Zo(h(this,G),r,i,o))}equals(e){v(this,K);const t=$t(e);return qo(h(this,G),h(t,G))===0}toString(e=void 0){v(this,K);const t=C(e),r=pr(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const{precision:a,unit:s,increment:c}=wr(i,r);return Ri(Zo(h(this,G),c,s,o),a)}toJSON(){return v(this,K),Ri(h(this,G),"auto")}toLocaleString(e=void 0,t=void 0){return v(this,K),new Ve(e,t).format(this)}valueOf(){Ft("PlainTime")}static from(e,t=void 0){return $t(e,t)}static compare(e,t){const r=$t(e),o=$t(t);return qo(h(r,G),h(o,G))}}xt(kr,"Temporal.PlainTime");class hi{constructor(e,t,r="iso8601",o=1){const i=N(e),a=N(t),s=Pe(r===void 0?"iso8601":re(r)),c=N(o);Gt(i,a,c),La(this,{year:i,month:a,day:c},s)}get year(){return mt(this,"year")}get month(){return mt(this,"month")}get monthCode(){return mt(this,"monthCode")}get calendarId(){return v(this,ce),h(this,D)}get era(){return mt(this,"era")}get eraYear(){return mt(this,"eraYear")}get daysInMonth(){return mt(this,"daysInMonth")}get daysInYear(){return mt(this,"daysInYear")}get monthsInYear(){return mt(this,"monthsInYear")}get inLeapYear(){return mt(this,"inLeapYear")}with(e,t=void 0){if(v(this,ce),!V(e))throw new TypeError("invalid argument");Cn(e);const r=h(this,D);let o=$e(r,h(this,j),"year-month");return o=Ht(r,o,qe(r,e,["year","month","monthCode"],[],"partial")),gn(or(r,o,L(C(t))),r)}add(e,t=void 0){return v(this,ce),Bi("add",this,e,t)}subtract(e,t=void 0){return v(this,ce),Bi("subtract",this,e,t)}until(e,t=void 0){return v(this,ce),Wi("until",this,e,t)}since(e,t=void 0){return v(this,ce),Wi("since",this,e,t)}equals(e){v(this,ce);const t=Hn(e);return lt(h(this,j),h(t,j))===0&&st(h(this,D),h(t,D))}toString(e=void 0){return v(this,ce),Ii(this,yr(C(e)))}toJSON(){return v(this,ce),Ii(this)}toLocaleString(e=void 0,t=void 0){return v(this,ce),new Ve(e,t).format(this)}valueOf(){Ft("PlainYearMonth")}toPlainDate(e){if(v(this,ce),!V(e))throw new TypeError("argument should be an object");const t=h(this,D);return Oe(Lt(t,Ht(t,$e(t,h(this,j),"year-month"),qe(t,e,["day"],[],[])),"constrain"),t)}static from(e,t=void 0){return Hn(e,t)}static compare(e,t){const r=Hn(e),o=Hn(t);return lt(h(r,j),h(o,j))}}function mt(n,e){v(n,ce);const t=h(n,j);return vr(n).isoToDate(t,{[e]:!0})[e]}xt(hi,"Temporal.PlainYearMonth");const Fc=Ve.prototype.resolvedOptions;class mi{constructor(e,t,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");const o=Xr(e);let i=re(t);const{tzName:a,offsetMinutes:s}=Rt(i);if(s===void 0){const c=Hr(a);if(!c)throw new RangeError(`unknown time zone ${a}`);i=c.identifier}else i=Bo(s);Ua(this,o,i,Pe(r===void 0?"iso8601":re(r)))}get calendarId(){return v(this,R),h(this,D)}get timeZoneId(){return v(this,R),h(this,F)}get year(){return ve(this,"year")}get month(){return ve(this,"month")}get monthCode(){return ve(this,"monthCode")}get day(){return ve(this,"day")}get hour(){return sn(this,"hour")}get minute(){return sn(this,"minute")}get second(){return sn(this,"second")}get millisecond(){return sn(this,"millisecond")}get microsecond(){return sn(this,"microsecond")}get nanosecond(){return sn(this,"nanosecond")}get era(){return ve(this,"era")}get eraYear(){return ve(this,"eraYear")}get epochMilliseconds(){return v(this,R),Ke(h(this,O),"floor")}get epochNanoseconds(){return v(this,R),es(h(this,O))}get dayOfWeek(){return ve(this,"dayOfWeek")}get dayOfYear(){return ve(this,"dayOfYear")}get weekOfYear(){return ve(this,"weekOfYear")?.week}get yearOfWeek(){return ve(this,"weekOfYear")?.year}get hoursInDay(){v(this,R);const e=h(this,F),t=et(this).isoDate,r=Ae(t.year,t.month,t.day+1),o=kt(e,t),i=kt(e,r);return er(Y.fromEpochNsDiff(i,o),"hour")}get daysInWeek(){return ve(this,"daysInWeek")}get daysInMonth(){return ve(this,"daysInMonth")}get daysInYear(){return ve(this,"daysInYear")}get monthsInYear(){return ve(this,"monthsInYear")}get inLeapYear(){return ve(this,"inLeapYear")}get offset(){return v(this,R),Io(wt(h(this,F),h(this,O)))}get offsetNanoseconds(){return v(this,R),wt(h(this,F),h(this,O))}with(e,t=void 0){if(v(this,R),!V(e))throw new TypeError("invalid zoned-date-time-like");Cn(e);const r=h(this,D),o=h(this,F),i=wt(o,h(this,O)),a=et(this);let s={...$e(r,a.isoDate),...a.time,offset:Io(i)};s=Ht(r,s,qe(r,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));const c=C(t),l=Jn(c),d=Lr(c,"prefer"),m=br(r,s,L(c)),f=jn(s.offset);return me(qr(m.isoDate,m.time,"option",f,o,l,d,!1),o,r)}withPlainTime(e=void 0){v(this,R);const t=h(this,F),r=h(this,D),o=et(this).isoDate;let i;return i=e===void 0?kt(t,o):ge(t,U(o,h($t(e),G)),"compatible"),me(i,t,r)}withTimeZone(e){v(this,R);const t=je(e);return me(h(this,O),t,h(this,D))}withCalendar(e){v(this,R);const t=_r(e);return me(h(this,O),h(this,F),t)}add(e,t=void 0){return v(this,R),Ji("add",this,e,t)}subtract(e,t=void 0){return v(this,R),Ji("subtract",this,e,t)}until(e,t=void 0){return v(this,R),Hi("until",this,e,t)}since(e,t=void 0){return v(this,R),Hi("since",this,e,t)}round(e){if(v(this,R),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Xt("smallestUnit",e):C(e),r=kn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];if(On(r,a,a===1),i==="nanosecond"&&r===1)return me(h(this,O),h(this,F),h(this,D));const s=h(this,F),c=h(this,O),l=et(this);let d;if(i==="day"){const m=l.isoDate,f=Ae(m.year,m.month,m.day+1),g=kt(s,m),y=kt(s,f),p=u.subtract(y,g);d=Y.fromEpochNsDiff(c,g).round(p,o).addToEpochNs(g)}else{const m=zo(l,r,i,o),f=wt(s,c);d=qr(m.isoDate,m.time,"option",f,s,"compatible","prefer",!1)}return me(d,s,h(this,D))}equals(e){v(this,R);const t=Gn(e),r=h(this,O),o=h(t,O);return!!u.equal(u.BigInt(r),u.BigInt(o))&&!!Fa(h(this,F),h(t,F))&&st(h(this,D),h(t,D))}toString(e=void 0){v(this,R);const t=C(e),r=yr(t),o=pr(t),i=(function(f){return Tt(f,"offset",["auto","never"],"auto")})(t),a=Je(t,"trunc"),s=Le(t,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const c=(function(f){return Tt(f,"timeZoneName",["auto","never","critical"],"auto")})(t),{precision:l,unit:d,increment:m}=wr(s,o);return Li(this,l,r,c,i,{unit:d,increment:m,roundingMode:a})}toLocaleString(e=void 0,t=void 0){v(this,R);const r=C(t),o=Object.create(null);if((function(c,l,d,m){if(l==null)return;const f=Reflect.ownKeys(l);for(let g=0;g<f.length;g++){const y=f[g];if(!d.some((p=>Object.is(p,y)))&&Object.prototype.propertyIsEnumerable.call(l,y)){const p=l[y];c[y]=p}}})(o,r,["timeZone"]),r.timeZone!==void 0)throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");if(o.year===void 0&&o.month===void 0&&o.day===void 0&&o.era===void 0&&o.weekday===void 0&&o.dateStyle===void 0&&o.hour===void 0&&o.minute===void 0&&o.second===void 0&&o.fractionalSecondDigits===void 0&&o.timeStyle===void 0&&o.dayPeriod===void 0&&o.timeZoneName===void 0&&(o.timeZoneName="short"),o.timeZone=h(this,F),Ai(o.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");const i=new Ve(e,o),a=Fc.call(i).calendar,s=h(this,D);if(s!=="iso8601"&&a!=="iso8601"&&!st(a,s))throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);return i.format(rt(h(this,O)))}toJSON(){return v(this,R),Li(this,"auto")}valueOf(){Ft("ZonedDateTime")}startOfDay(){v(this,R);const e=h(this,F);return me(kt(e,et(this).isoDate),e,h(this,D))}getTimeZoneTransition(e){v(this,R);const t=h(this,F);if(e===void 0)throw new TypeError("options parameter is required");const r=Tt(typeof e=="string"?Xt("direction",e):C(e),"direction",["next","previous"],Et);if(r===void 0)throw new TypeError("direction option is required");if(Ai(t)||t==="UTC")return null;const o=h(this,O),i=r==="next"?ei(t,o):Ao(t,o);return i===null?null:me(i,t,h(this,D))}toInstant(){return v(this,R),rt(h(this,O))}toPlainDate(){return v(this,R),Oe(et(this).isoDate,h(this,D))}toPlainTime(){return v(this,R),pt(et(this).time)}toPlainDateTime(){return v(this,R),He(et(this),h(this,D))}static from(e,t=void 0){return Gn(e,t)}static compare(e,t){const r=Gn(e),o=Gn(t),i=h(r,O),a=h(o,O);return u.lessThan(u.BigInt(i),u.BigInt(a))?-1:u.greaterThan(u.BigInt(i),u.BigInt(a))?1:0}}function et(n){return Xe(h(n,F),h(n,O))}function ve(n,e){v(n,R);const t=et(n).isoDate;return vr(n).isoToDate(t,{[e]:!0})[e]}function sn(n,e){return v(n,R),et(n).time[e]}xt(mi,"Temporal.ZonedDateTime");var At=Object.freeze({__proto__:null,Duration:En,Instant:ci,Now:hs,PlainDate:li,PlainDateTime:ui,PlainMonthDay:di,PlainTime:kr,PlainYearMonth:hi,ZonedDateTime:mi});const Sc=[ci,li,ui,En,di,kr,hi,mi];for(const n of Sc){const e=Object.getOwnPropertyDescriptor(n,"prototype");(e.configurable||e.enumerable||e.writable)&&(e.configurable=!1,e.enumerable=!1,e.writable=!1,Object.defineProperty(n,"prototype",e))}const Br="YYYY/MM/DD",Mn=n=>`${n.year.toString().padStart(4,"0")}/${n.month.toString().padStart(2,"0")}/${n.day.toString().padStart(2,"0")}`,fi=n=>`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}`,Un=n=>`${new Intl.DateTimeFormat("en-US",{month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n.year,n.month-1,n.day)))} ${n.day}`,ms=n=>`${n.hour%12||12}:${n.minute.toString().padStart(2,"0")} ${n.hour<12?"AM":"PM"}`,tn=n=>At.Now.instant().toZonedDateTimeISO(n||At.Now.timeZoneId()),Ho=n=>fi(tn(n.timezone.name).toPlainTime()),fs=n=>Mn(tn(n.timezone.name).toPlainDate()),zc=n=>Mn(tn().add({days:n}).toPlainDate()),Zc=n=>n&&tn(n).offset,Eo=(n,e="desktop")=>{const t=n.startDate?na(n.startDate):null,r=n.endDate?na(n.endDate):null,o=Zc(n.timezone.name);return!t||!r||!n.startTime||!n.endTime?"Select range":e==="mobile"?At.PlainDate.compare(t,r)===0?`${Un(t)} · ${n.startTime}`:`${Un(t)}–${Un(r)}`:e==="tablet"?`${Un(t)}, 00:00 → ${Un(r)}, 00:00${o?` (${o})`:""}`:`${Mn(t)} ${n.startTime} - ${Mn(r)} ${n.endTime}${o?` (${o})`:""}`},na=n=>At.PlainDate.from(n.replace(/\//g,"-")),fn=(n,e)=>At.PlainDateTime.from(`${n.replace(/\//g,"-")}T${e}`),qc=(n,e)=>({[`${e}s`]:n}),gs=(n,e,t,r,o)=>{const i=fn(n,e).add(qc(t*o,r));return{date:Mn(i.toPlainDate()),time:fi(i.toPlainTime())}},cn=(n,e,t,r)=>gs(n,e,t,r,-1),ln=(n,e,t,r)=>gs(n,e,t,r,1),dr=(n,e,t)=>fn(n,e).toZonedDateTime(t).toInstant().toString(),hr=(n,e)=>{const t=At.Instant.from(n).toZonedDateTimeISO(e);return{date:Mn(t.toPlainDate()),time:fi(t.toPlainTime())}},Wc=(n,e="en-US")=>new Intl.DateTimeFormat(e,{timeZone:n,timeZoneName:"long"}).formatToParts(new Date).find(t=>t.type==="timeZoneName")?.value||"",Hc=n=>{const e=n[0]==="-"?-1:1,[t,r]=n.slice(1).split(":").map(Number);return e*(t*60+r)},Gc=n=>{const e=tn(n),t=e.offset;return{name:n,longName:Wc(n),currentTime:ms(e),utcOffset:t,offsetMinutes:Hc(t)}},Vc=()=>{const n=Intl.supportedValuesOf;return["UTC",...n?n.call(Intl,"timeZone"):[Intl.DateTimeFormat().resolvedOptions().timeZone]].filter((t,r,o)=>o.indexOf(t)===r).map(t=>Gc(t)).sort((t,r)=>t.name==="UTC"?-1:r.name==="UTC"?1:t.offsetMinutes-r.offsetMinutes)},Rr={"timezone-panel-container":"_timezone-panel-container_tykz4_1","search-container":"_search-container_tykz4_6","timezone-scroll-area":"_timezone-scroll-area_tykz4_15","list-container":"_list-container_tykz4_21"},gi={"form-container":"_form-container_1xxf4_1"},ys=A.createContext(void 0),nn=()=>{const n=A.useContext(ys);if(!n)throw new Error("usePopoverContext must be used within a PopoverProvider");return n},Qc=({children:n})=>{const[e,t]=A.useState(!1),r=()=>{t(!1)};return b.jsx(ys.Provider,{value:{popoverOpened:e,setPopoverOpened:t,closePopover:r},children:n})},yi=()=>{const{theme:n}=eo(),{closePopover:e}=nn(),t=Dt.useMediaQuery("(max-width: 48em)"),r=Dt.useMediaQuery("(max-width: 64em)");return b.jsx(E.Flex,{justify:"flex-end",mt:12,pb:12,children:b.jsxs(E.Flex,{direction:t?"column":"row",gap:12,w:r?"100%":void 0,children:[b.jsx(E.Button,{size:"xs",variant:"subtle",color:n.primaryColor,onClick:e,fullWidth:r,children:"Cancel"}),b.jsx(E.Button,{type:"submit",size:"xs",color:n.primaryColor,fullWidth:r,children:"Apply"})]})})},ps=({tzRange:n})=>{const[e,t]=A.useState(n.timezone),[r,o]=A.useState([]),[i,a]=A.useState(""),s=Dt.useMediaQuery("(max-width: 64em)"),{closePopover:c}=nn(),l=A.useMemo(()=>Vc(),[]);A.useEffect(()=>{o(l)},[]),aa(()=>{if(i===""){o(l);return}o(l.filter(g=>g.name.toLowerCase().includes(i.toLocaleLowerCase())||g.longName.toLowerCase().includes(i.toLocaleLowerCase())||g.currentTime.toLowerCase().includes(i.toLocaleLowerCase())||g.utcOffset.toLowerCase().includes(i.toLocaleLowerCase())))},250,[i]);const d=g=>{t(g)},m=g=>{if(g.preventDefault(),!e?.name||!n.timezone.name||!n.startDate||!n.startTime||!n.endDate||!n.endTime)return;const y=dr(n.startDate,n.startTime,n.timezone.name),p=dr(n.endDate,n.endTime,n.timezone.name),w=hr(y,e.name),T=hr(p,e.name);n.onApply({startDate:w.date,startTime:w.time,endDate:T.date,endTime:T.time,timezone:e||{name:null,longName:null,utcOffset:null}}),s&&c()},f=g=>g?ms(tn(g)):"";return b.jsxs("form",{className:gi["form-container"],onSubmit:m,children:[b.jsxs(E.Flex,{direction:"column",className:Rr["timezone-panel-container"],children:[b.jsx(E.Box,{className:Rr["search-container"],children:b.jsx(Ys,{searchText:i,setSearchText:a})}),b.jsxs(E.Box,{className:Rr["timezone-scroll-area"],children:[b.jsx(E.Text,{fw:600,px:12,children:"My Location"}),b.jsx(E.Flex,{direction:"column",children:b.jsx(Ti,{isBrowserTimezone:!0,name:n.timezone?.name,longName:n.timezone?.longName,currentTime:f(n.timezone?.name),utcOffset:n.timezone?.utcOffset,selectedTimezone:e})}),b.jsx(E.Text,{fw:600,px:12,children:"Locations"}),b.jsx(E.Flex,{direction:"column",className:Rr["list-container"],children:r.map((g,y)=>b.jsx(Ti,{name:g.name,longName:g.longName,currentTime:g.currentTime,utcOffset:g.utcOffset,selectedTimezone:e,handleTimezoneMouseClick:d},y))})]})]}),b.jsx(E.Box,{px:12,children:b.jsx(yi,{})})]})};var ws=(n=>(n.ThirtySeconds="± 30 seconds",n.OneMinute="± 1 minute",n.FifteenMinutes="± 15 minutes",n.ThirtyMinutes="± 30 minutes",n.OneHour="± 1 hour",n.OneDay="± 1 day",n))(ws||{});const Xc=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],Kc=(n,e,t)=>{switch(t){case"± 30 seconds":const r=cn(n,e,30,"second"),o=ln(n,e,30,"second");return{startDate:r.date,startTime:r.time,endDate:o.date,endTime:o.time};case"± 1 minute":const i=cn(n,e,1,"minute"),a=ln(n,e,1,"minute");return{startDate:i.date,startTime:i.time,endDate:a.date,endTime:a.time};case"± 15 minutes":const s=cn(n,e,15,"minute"),c=ln(n,e,15,"minute");return{startDate:s.date,startTime:s.time,endDate:c.date,endTime:c.time};case"± 30 minutes":const l=cn(n,e,30,"minute"),d=ln(n,e,30,"minute");return{startDate:l.date,startTime:l.time,endDate:d.date,endTime:d.time};case"± 1 hour":const m=cn(n,e,1,"hour"),f=ln(n,e,1,"hour");return{startDate:m.date,startTime:m.time,endDate:f.date,endTime:f.time};case"± 1 day":const g=cn(n,e,1,"day"),y=ln(n,e,1,"day");return{startDate:g.date,startTime:g.time,endDate:y.date,endTime:y.time};default:return{startDate:n,startTime:e,endDate:n,endTime:e}}},Bc=({tzRange:n})=>{const e=Dt.useMediaQuery("(max-width: 64em)"),{closePopover:t}=nn(),r=n.timezone.utcOffset?`GMT${n.timezone.utcOffset}`:n.timezone?.longName,o=ia.useForm({initialValues:{date:n.startDate??fs(n),time:n.startTime??Ho(n),duration:ws.OneDay},validate:{date:a=>a?null:"Date is required",time:a=>a?null:"Time is required",duration:a=>a?null:"Duration is required"}}),i=a=>{if(!n.timezone.name)return;const s=dr(a.date,a.time,n.timezone.name),c=hr(s,n.timezone.name),{startDate:l,startTime:d,endDate:m,endTime:f}=Kc(c.date,c.time,a.duration);n.onApply({startDate:l,startTime:d,endDate:m,endTime:f,timezone:n.timezone}),e&&t()};return b.jsx(E.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:b.jsxs("form",{className:gi["form-container"],onSubmit:o.onSubmit(i),children:[b.jsxs(E.Box,{children:[b.jsx(E.Text,{fw:600,children:"Around a time"}),b.jsxs(E.Flex,{direction:"column",gap:8,mt:12,children:[b.jsx(zt.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...o.getInputProps("date"),popoverProps:{withinPortal:!1},valueFormat:Br,leftSection:b.jsx(Ar,{stroke:1.5})},o.key("date")),b.jsx(zt.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...o.getInputProps("time"),leftSection:b.jsx(Ur,{stroke:1.5}),rightSection:e?void 0:b.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:n.timezone?.longName}),rightSectionWidth:e?void 0:180,rightSectionProps:{style:{paddingRight:1}}},o.key("time")),e&&r?b.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:r}):null,b.jsx(E.Select,{label:"Duration",placeholder:"Pick value",data:Xc,...o.getInputProps("duration"),comboboxProps:{withinPortal:!1}},o.key("duration"))]})]}),b.jsx(yi,{})]})})},Fn={"sidebar-container":"_sidebar-container_1cvpv_1","sidebar-mobile-relative":"_sidebar-mobile-relative_1cvpv_11","sidebar-row":"_sidebar-row_1cvpv_17"};var he=(n=>(n.RELATIVE_TIME="Relative time",n.START_END_TIME="Start and end times",n.AROUND_TIME="Around a time",n.TIMEZONE="Time zone",n))(he||{});const Jr=n=>n.toPlainDateTime().toString({smallestUnit:"second"}),Jc=(n,e)=>({[e]:n}),Ct=(n,e,t,r)=>{const o=r.slice(0,-1),i=Jc(t,r),a=e==="Last";return{label:`${e} ${t} ${t===1?o:r}`,searchKey:`${a?"-":"+"}${t}${o[0]}`,startTime:Jr(a?n.subtract(i):n),endTime:Jr(a?n:n.add(i)),unit:r}},Mo=(n,e,t)=>{const r=n.add({days:t});return{label:e,searchKey:e.toLowerCase(),startTime:Jr(r.startOfDay()),endTime:Jr(r.startOfDay().add({days:1}).subtract({nanoseconds:1})),unit:"days"}},el=n=>{const e=tn(n);return[Mo(e,"Today",0),Mo(e,"Tomorrow",1),Mo(e,"Yesterday",-1),...[15,30].map(t=>Ct(e,"Last",t,"seconds")),...[15,30].map(t=>Ct(e,"Next",t,"seconds")),...[5,10,15,30,45].map(t=>Ct(e,"Last",t,"minutes")),...[5,10,15,30,45].map(t=>Ct(e,"Next",t,"minutes")),...[1,3,6,12].map(t=>Ct(e,"Last",t,"hours")),...[1,3,6,12].map(t=>Ct(e,"Next",t,"hours")),...[1,2,7,14,30].map(t=>Ct(e,"Last",t,"days")),...[1,2,7,14,30].map(t=>Ct(e,"Next",t,"days"))]},tl=(n,e)=>n==="seconds"?!e?.disableSeconds:n==="minutes"?!e?.disableMinutes:n==="hours"?!e?.disableHours:n==="days"?!e?.disableDays:!0,Go=(n,e)=>{const t=el(n).filter(r=>tl(r.unit,e));return t.map((r,o)=>({...r,lineBreak:o<t.length-1&&t[o+1].unit!==r.unit}))},jt={"relative-time-root":"_relative-time-root_emohw_1","relative-time-panel-container":"_relative-time-panel-container_emohw_9","time-row":"_time-row_emohw_16","time-row-dark":"_time-row-dark_emohw_20","time-row-light":"_time-row-light_emohw_26"},ra=({tzRange:n})=>{const[e,t]=A.useState([]),[r,o]=A.useState(""),{colorScheme:i}=eo(),{closePopover:a}=nn();A.useEffect(()=>{if(n.timezone.name!==null){const c=Go(n.timezone.name,n.options);t(c)}},[n.timezone,n.options]),aa(()=>{if(!n.timezone.name)return;const c=Go(n.timezone.name,n.options);if(r===""){t(c);return}const l=r.toLowerCase();t(c.filter(d=>d.searchKey.includes(l)||d.label.toLowerCase().includes(l)))},250,[r,n.timezone,n.options]);const s=c=>{const[l,d]=c.startTime.split("T"),[m,f]=c.endTime.split("T");n.onApply({startDate:l,startTime:d.slice(0,8),endDate:m,endTime:f.slice(0,8),timezone:n.timezone}),a()};return b.jsxs(E.Flex,{direction:"column",className:jt["relative-time-root"],children:[b.jsx(E.Box,{style:{width:"90%"},mx:"auto",children:b.jsx(E.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:r,onChange:c=>o(c.currentTarget.value)})}),b.jsx(E.Flex,{direction:"column",className:jt["relative-time-panel-container"],children:e.map(c=>b.jsxs(E.Flex,{align:"center",justify:"space-between",className:Vo(i==="dark"?jt["time-row-dark"]:jt["time-row-light"],jt["time-row"]),py:4,px:12,mb:c.lineBreak?8:0,onClick:()=>s(c),children:[b.jsx(E.Text,{size:"sm",children:c.label}),b.jsx(E.Text,{size:"xs",c:"#5f6368",children:c.searchKey})]},c.label))})]})},oa=({setSelectedPanel:n,tzRange:e,mobileOnlyRelative:t=!1})=>t?b.jsx(E.Box,{className:Fn["sidebar-mobile-relative"],children:b.jsx(ra,{tzRange:e})}):b.jsxs(E.Box,{className:Fn["sidebar-container"],flex:1,children:[b.jsx(ra,{tzRange:e}),b.jsxs(E.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[b.jsxs(E.Flex,{className:Fn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.START_END_TIME),children:[b.jsxs(E.Flex,{align:"center",children:[b.jsx(Rs,{stroke:1.5}),b.jsx(E.Text,{size:"sm",children:"Start and end times"})]}),b.jsx(wo,{stroke:1.5})]}),b.jsxs(E.Flex,{className:Fn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.AROUND_TIME),children:[b.jsxs(E.Flex,{align:"center",children:[b.jsx(Ur,{stroke:1.5}),b.jsx(E.Text,{size:"sm",children:"Around a time"})]}),b.jsx(wo,{stroke:1.5})]}),b.jsxs(E.Flex,{className:Fn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.TIMEZONE),children:[b.jsxs(E.Flex,{align:"center",children:[b.jsx(Ns,{stroke:1.5}),b.jsx(E.Text,{size:"sm",children:"Time zone"})]}),b.jsx(wo,{stroke:1.5})]})]})]}),nl=({tzRange:n})=>{const e=Dt.useMediaQuery("(max-width: 64em)"),{closePopover:t}=nn(),r=n.timezone.utcOffset?`GMT${n.timezone.utcOffset}`:n.timezone?.longName,o=ia.useForm({mode:"uncontrolled",initialValues:{startDate:n.startDate??fs(n),startTime:n.startTime??Ho(n),endDate:n.endDate??zc(30),endTime:n.endTime??Ho(n)},validate:{startDate:a=>a?null:"Start date is required",startTime:a=>a?null:"Start time is required",endDate:(a,s)=>{if(!a)return"End date is required";const c=fn(s.startDate,s.startTime),l=fn(a,s.endTime);return At.PlainDateTime.compare(l,c)>=0?null:"End time must be after start time"},endTime:(a,s)=>{if(!a)return"End time is required";const c=fn(s.startDate,s.startTime),l=fn(s.endDate,a);return At.PlainDateTime.compare(l,c)>=0?null:"End time must be after start time"}}}),i=a=>{if(!n.timezone.name)return;const s=dr(a.startDate,a.startTime,n.timezone.name),c=dr(a.endDate,a.endTime,n.timezone.name),l=hr(s,n.timezone.name),d=hr(c,n.timezone.name);n.onApply({startDate:l.date,startTime:l.time,endDate:d.date,endTime:d.time,timezone:n.timezone}),e&&t()};return b.jsx(E.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:b.jsxs("form",{className:gi["form-container"],onSubmit:o.onSubmit(i),children:[b.jsxs(E.Box,{children:[b.jsx(E.Text,{fw:600,children:"Start and end times"}),b.jsxs(E.Flex,{direction:"column",gap:8,mt:12,children:[b.jsx(zt.DatePickerInput,{label:"Start time",...o.getInputProps("startDate"),popoverProps:{withinPortal:!1},valueFormat:Br,leftSection:b.jsx(Ar,{stroke:1.5})},o.key("startDate")),b.jsx(zt.TimeInput,{withSeconds:!0,...o.getInputProps("startTime"),leftSection:b.jsx(Ur,{stroke:1.5}),rightSection:e?void 0:b.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic"},children:n.timezone?.longName}),rightSectionWidth:e?void 0:180,rightSectionProps:{style:{paddingRight:1}}},o.key("startTime")),e&&r?b.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:r}):null,b.jsx(zt.DatePickerInput,{label:"End time",...o.getInputProps("endDate"),popoverProps:{withinPortal:!1},valueFormat:Br,leftSection:b.jsx(Ar,{stroke:1.5})},o.key("endDate")),b.jsx(zt.TimeInput,{withSeconds:!0,...o.getInputProps("endTime"),leftSection:b.jsx(Ur,{stroke:1.5}),rightSection:e?void 0:b.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic"},children:n.timezone?.longName}),rightSectionWidth:e?void 0:180,rightSectionProps:{style:{paddingRight:1}}},o.key("endTime")),e&&r?b.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:r}):null]})]}),b.jsx(yi,{})]})})},Pt={"trigger-button":"_trigger-button_1rr9j_1","picker-shell":"_picker-shell_1rr9j_18","basic-view":"_basic-view_1rr9j_22","basic-quick-options":"_basic-quick-options_1rr9j_26","drawer-view":"_drawer-view_1rr9j_32","mobile-layout":"_mobile-layout_1rr9j_43","mobile-nav":"_mobile-nav_1rr9j_50","mobile-content":"_mobile-content_1rr9j_54"},rl=({tzRange:n})=>{const[e,t]=A.useState(he.START_END_TIME),r=Dt.useMediaQuery("(max-width: 64em)");A.useEffect(()=>{!r&&e===he.RELATIVE_TIME&&t(he.START_END_TIME)},[r,e]);const o=()=>{switch(e){case he.RELATIVE_TIME:return b.jsx(oa,{tzRange:n,setSelectedPanel:t,mobileOnlyRelative:!0});case he.START_END_TIME:return b.jsx(nl,{tzRange:n});case he.AROUND_TIME:return b.jsx(Bc,{tzRange:n});case he.TIMEZONE:return b.jsx(ps,{tzRange:n});default:return null}};return r?b.jsxs("div",{className:Pt["mobile-layout"],children:[b.jsx("div",{className:Pt["mobile-nav"],children:b.jsx(E.SegmentedControl,{fullWidth:!0,value:e,onChange:i=>t(i),data:[{label:"Quick",value:he.RELATIVE_TIME},{label:"Range",value:he.START_END_TIME},{label:"Around",value:he.AROUND_TIME},{label:"TZ",value:he.TIMEZONE}]})}),b.jsx("div",{className:Pt["mobile-content"],children:o()})]}):b.jsxs(E.Flex,{className:Pt["picker-shell"],children:[b.jsx(oa,{tzRange:n,setSelectedPanel:t}),o()]})},Yr=n=>n?.replace(/\//g,"-")??null,Ir=n=>n.replace(/-/g,"/"),ol=({tzRange:n,onAdvanced:e})=>{const[t,r]=A.useState([Yr(n.startDate),Yr(n.endDate)]),{colorScheme:o}=eo(),{closePopover:i}=nn();A.useEffect(()=>{r([Yr(n.startDate),Yr(n.endDate)])},[n.startDate,n.endDate]);const a=A.useMemo(()=>n.timezone.name?Go(n.timezone.name,{disableSeconds:!0,disableMinutes:!0,disableHours:!0}):[],[n.timezone.name]),s=([l,d])=>{r([l,d]),!(!l||!d)&&n.onApply({startDate:Ir(l),startTime:"00:00:00",endDate:Ir(d),endTime:"00:00:00",timezone:n.timezone})},c=(l,d)=>{const[m]=l.split("T"),[f]=d.split("T");n.onApply({startDate:Ir(m),startTime:"00:00:00",endDate:Ir(f),endTime:"00:00:00",timezone:n.timezone}),i()};return b.jsxs(E.Flex,{direction:"column",className:Pt["basic-view"],children:[b.jsx(zt.DatePickerInput,{type:"range",label:"Date range",value:t,onChange:s,valueFormat:Br,popoverProps:{withinPortal:!1},leftSection:b.jsx(Ar,{stroke:1.5})}),b.jsx(E.Text,{size:"sm",fw:600,mt:12,children:"Quick options"}),b.jsx(E.Flex,{direction:"column",className:Pt["basic-quick-options"],mt:4,children:a.map(l=>b.jsxs(E.Flex,{align:"center",justify:"space-between",className:Vo(jt["time-row"],o==="dark"?jt["time-row-dark"]:jt["time-row-light"]),py:4,px:8,onClick:()=>c(l.startTime,l.endTime),children:[b.jsx(E.Text,{size:"sm",children:l.label}),b.jsx(E.Text,{size:"xs",c:"dimmed",children:l.searchKey})]},l.label))}),b.jsx(E.Button,{variant:"subtle",size:"xs",fullWidth:!0,mt:8,onClick:i,children:"Cancel"}),b.jsx(E.Button,{variant:"subtle",size:"xs",fullWidth:!0,mt:4,onClick:e,children:"Advanced"})]})},il=n=>{const[e,t]=A.useState("basic"),{popoverOpened:r,setPopoverOpened:o}=nn(),i=Dt.useMediaQuery("(max-width: 48em)"),a=Dt.useMediaQuery("(max-width: 64em)"),s=()=>{o(f=>!f)},c=A.useMemo(()=>Eo(n,"desktop"),[n.startDate,n.startTime,n.endDate,n.endTime,n.timezone]),l=A.useMemo(()=>i?Eo(n,"mobile"):a?Eo(n,"tablet"):c,[c,i,a,n]),d=e==="basic"?b.jsx(ol,{tzRange:n,onAdvanced:()=>t("advanced")}):b.jsx(rl,{tzRange:n}),m=b.jsx(E.Button,{onClick:s,style:n.buttonStyle||{},className:Pt["trigger-button"],title:c,children:l});return a?b.jsxs(b.Fragment,{children:[m,b.jsx(E.Drawer,{opened:r,onClose:()=>o(!1),size:"100%",padding:0,title:"Select time range",styles:{content:{display:"flex",flexDirection:"column"},body:{flex:1,overflow:"hidden",padding:0}},children:b.jsx("div",{className:Pt["drawer-view"],children:d})})]}):b.jsxs(E.Popover,{position:"bottom",shadow:"md",opened:r,onChange:o,children:[b.jsx(E.Popover.Target,{children:m}),b.jsx(E.Popover.Dropdown,{style:{width:e==="basic"?260:700,height:e==="basic"?"auto":400,padding:0},children:d})]})},al=n=>b.jsx(Qc,{children:b.jsx(il,{...n})});exports.Panel=he;exports.TimezonePanel=ps;exports.TimezoneRangePicker=al;
|
|
62
|
+
*/const Ls=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],As=kn("filled","calendar-week-filled","CalendarWeekFilled",Ls),Us=({searchText:n,setSearchText:e})=>v.jsx(E.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:v.jsx(Ys,{stroke:2}),value:n,onChange:t=>e(t.currentTarget.value)});class u extends Array{constructor(e,t){if(super(e),this.sign=t,Object.setPrototypeOf(this,u.prototype),e>u.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Math.floor,r=Number.isFinite;if(typeof e=="number"){if(e===0)return u.__zero();if(u.__isOneDigitInt(e))return 0>e?u.__oneDigit(-e,!0):u.__oneDigit(e,!1);if(!r(e)||t(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return u.__fromDouble(e)}if(typeof e=="string"){const o=u.__fromString(e);if(o===null)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return o}if(typeof e=="boolean")return e===!0?u.__oneDigit(1,!1):u.__zero();if(typeof e=="object"){if(e.constructor===u)return e;const o=u.__toPrimitive(e);return u.BigInt(o)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){const e=["BigInt["];for(const t of this)e.push((t&&(t>>>0).toString(16))+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":(e&e-1)==0?u.__toStringBasePowerOfTwo(this,e):u.__toStringGeneric(this,e,!1)}valueOf(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}static toNumber(e){const t=e.length;if(t===0)return 0;if(t===1){const w=e.__unsignedDigit(0);return e.sign?-w:w}const r=e.__digit(t-1),o=u.__clz30(r),i=30*t-o;if(1024<i)return e.sign?-1/0:1/0;let a=i-1,s=r,c=t-1;const l=o+3;let d=l===32?0:s<<l;d>>>=12;const h=l-12;let f=12<=l?0:s<<20+l,g=20+l;for(0<h&&0<c&&(c--,s=e.__digit(c),d|=s>>>30-h,f=s<<h+2,g=h+2);0<g&&0<c;)c--,s=e.__digit(c),f|=30<=g?s<<g-30:s>>>30-g,g-=30;const y=u.__decideRounding(e,g,c,s);if((y===1||y===0&&(1&f)==1)&&(f=f+1>>>0,f===0&&(d++,d>>>20!=0&&(d=0,a++,1023<a))))return e.sign?-1/0:1/0;const p=e.sign?-2147483648:0;return a=a+1023<<20,u.__kBitConversionInts[u.__kBitConversionIntHigh]=p|a|d,u.__kBitConversionInts[u.__kBitConversionIntLow]=f,u.__kBitConversionDouble[0]}static unaryMinus(e){if(e.length===0)return e;const t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?u.__absoluteSubOne(e).__trim():u.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(t.length===0)return u.__oneDigit(1,!1);if(e.length===0)return e;if(e.length===1&&e.__digit(0)===1)return e.sign&&(1&t.__digit(0))==0?u.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");let r=t.__unsignedDigit(0);if(r===1)return e;if(r>=u.__kMaxLengthBits)throw new RangeError("BigInt too big");if(e.length===1&&e.__digit(0)===2){const a=1+(0|r/30),s=e.sign&&(1&r)!=0,c=new u(a,s);c.__initializeDigits();const l=1<<r%30;return c.__setDigit(a-1,l),c}let o=null,i=e;for((1&r)!=0&&(o=e),r>>=1;r!==0;r>>=1)i=u.multiply(i,i),(1&r)!=0&&(o===null?o=i:o=u.multiply(o,i));return o}static multiply(e,t){if(e.length===0)return e;if(t.length===0)return t;let r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;const o=new u(r,e.sign!==t.sign);o.__initializeDigits();for(let i=0;i<e.length;i++)u.__multiplyAccumulate(t,e.__digit(i),o,i);return o.__trim()}static divide(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>u.__absoluteCompare(e,t))return u.__zero();const r=e.sign!==t.sign,o=t.__unsignedDigit(0);let i;if(t.length===1&&32767>=o){if(o===1)return r===e.sign?e:u.unaryMinus(e);i=u.__absoluteDivSmall(e,o,null)}else i=u.__absoluteDivLarge(e,t,!0,!1);return i.sign=r,i.__trim()}static remainder(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>u.__absoluteCompare(e,t))return e;const r=t.__unsignedDigit(0);if(t.length===1&&32767>=r){if(r===1)return u.__zero();const i=u.__absoluteModSmall(e,r);return i===0?u.__zero():u.__oneDigit(i,e.sign)}const o=u.__absoluteDivLarge(e,t,!1,!0);return o.sign=e.sign,o.__trim()}static add(e,t){const r=e.sign;return r===t.sign?u.__absoluteAdd(e,t,r):0<=u.__absoluteCompare(e,t)?u.__absoluteSub(e,t,r):u.__absoluteSub(t,e,!r)}static subtract(e,t){const r=e.sign;return r===t.sign?0<=u.__absoluteCompare(e,t)?u.__absoluteSub(e,t,r):u.__absoluteSub(t,e,!r):u.__absoluteAdd(e,t,r)}static leftShift(e,t){return t.length===0||e.length===0?e:t.sign?u.__rightShiftByAbsolute(e,t):u.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return t.length===0||e.length===0?e:t.sign?u.__leftShiftByAbsolute(e,t):u.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>u.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=u.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<u.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=u.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e.__digit(r)!==t.__digit(r))return!1;return!0}static notEqual(e,t){return!u.equal(e,t)}static bitwiseAnd(e,t){var r=Math.max;if(!e.sign&&!t.sign)return u.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){const o=r(e.length,t.length)+1;let i=u.__absoluteSubOne(e,o);const a=u.__absoluteSubOne(t);return i=u.__absoluteOr(i,a,i),u.__absoluteAddOne(i,!0,i).__trim()}return e.sign&&([e,t]=[t,e]),u.__absoluteAndNot(e,u.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){var r=Math.max;if(!e.sign&&!t.sign)return u.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){const a=r(e.length,t.length),s=u.__absoluteSubOne(e,a),c=u.__absoluteSubOne(t);return u.__absoluteXor(s,c,s).__trim()}const o=r(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let i=u.__absoluteSubOne(t,o);return i=u.__absoluteXor(i,e,i),u.__absoluteAddOne(i,!0,i).__trim()}static bitwiseOr(e,t){var r=Math.max;const o=r(e.length,t.length);if(!e.sign&&!t.sign)return u.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let a=u.__absoluteSubOne(e,o);const s=u.__absoluteSubOne(t);return a=u.__absoluteAnd(a,s,a),u.__absoluteAddOne(a,!0,a).__trim()}e.sign&&([e,t]=[t,e]);let i=u.__absoluteSubOne(t,o);return i=u.__absoluteAndNot(i,e,i),u.__absoluteAddOne(i,!0,i).__trim()}static asIntN(e,t){var r=Math.floor;if(t.length===0)return t;if(e=r(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return u.__zero();if(e>=u.__kMaxLengthBits)return t;const o=0|(e+29)/30;if(t.length<o)return t;const i=t.__unsignedDigit(o-1),a=1<<(e-1)%30;if(t.length===o&&i<a)return t;if((i&a)!==a)return u.__truncateToNBits(e,t);if(!t.sign)return u.__truncateAndSubFromPowerOfTwo(e,t,!0);if((i&a-1)==0){for(let s=o-2;0<=s;s--)if(t.__digit(s)!==0)return u.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===o&&i===a?t:u.__truncateToNBits(e,t)}return u.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){var r=Math.floor;if(t.length===0)return t;if(e=r(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return u.__zero();if(t.sign){if(e>u.__kMaxLengthBits)throw new RangeError("BigInt too big");return u.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=u.__kMaxLengthBits)return t;const o=0|(e+29)/30;if(t.length<o)return t;const i=e%30;return t.length==o&&(i===0||!(t.__digit(o-1)>>>i))?t:u.__truncateToNBits(e,t)}static ADD(e,t){if(e=u.__toPrimitive(e),t=u.__toPrimitive(t),typeof e=="string")return typeof t!="string"&&(t=t.toString()),e+t;if(typeof t=="string")return e.toString()+t;if(e=u.__toNumeric(e),t=u.__toNumeric(t),u.__isBigInt(e)&&u.__isBigInt(t))return u.add(e,t);if(typeof e=="number"&&typeof t=="number")return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return u.__compare(e,t,0)}static LE(e,t){return u.__compare(e,t,1)}static GT(e,t){return u.__compare(e,t,2)}static GE(e,t){return u.__compare(e,t,3)}static EQ(e,t){for(;;){if(u.__isBigInt(e))return u.__isBigInt(t)?u.equal(e,t):u.EQ(t,e);if(typeof e=="number"){if(u.__isBigInt(t))return u.__equalToNumber(t,e);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="string"){if(u.__isBigInt(t))return e=u.__fromString(e),e!==null&&u.equal(e,t);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="boolean"){if(u.__isBigInt(t))return u.__equalToNumber(t,+e);if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="symbol"){if(u.__isBigInt(t))return!1;if(typeof t!="object")return e==t;t=u.__toPrimitive(t)}else if(typeof e=="object"){if(typeof t=="object"&&t.constructor!==u)return e==t;e=u.__toPrimitive(e)}else return e==t}}static NE(e,t){return!u.EQ(e,t)}static DataViewGetBigInt64(e,t,r=!1){return u.asIntN(64,u.DataViewGetBigUint64(e,t,r))}static DataViewGetBigUint64(e,t,r=!1){const[o,i]=r?[4,0]:[0,4],a=e.getUint32(t+o,r),s=e.getUint32(t+i,r),c=new u(3,!1);return c.__setDigit(0,1073741823&s),c.__setDigit(1,(268435455&a)<<2|s>>>30),c.__setDigit(2,a>>>28),c.__trim()}static DataViewSetBigInt64(e,t,r,o=!1){u.DataViewSetBigUint64(e,t,r,o)}static DataViewSetBigUint64(e,t,r,o=!1){r=u.asUintN(64,r);let i=0,a=0;if(0<r.length&&(a=r.__digit(0),1<r.length)){const l=r.__digit(1);a|=l<<30,i=l>>>2,2<r.length&&(i|=r.__digit(2)<<28)}const[s,c]=o?[4,0]:[0,4];e.setUint32(t+s,i,o),e.setUint32(t+c,a,o)}static __zero(){return new u(0,!1)}static __oneDigit(e,t){const r=new u(1,t);return r.__setDigit(0,e),r}__copy(){const e=new u(this.length,this.sign);for(let t=0;t<this.length;t++)e[t]=this[t];return e}__trim(){let e=this.length,t=this[e-1];for(;t===0;)e--,t=this[e-1],this.pop();return e===0&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,r,o){if(0<t)return-1;let i;if(0>t)i=-t-1;else{if(r===0)return-1;r--,o=e.__digit(r),i=29}let a=1<<i;if((o&a)==0)return-1;if(a-=1,(o&a)!=0)return 1;for(;0<r;)if(r--,e.__digit(r)!==0)return 1;return 0}static __fromDouble(e){u.__kBitConversionDouble[0]=e;const t=2047&u.__kBitConversionInts[u.__kBitConversionIntHigh]>>>20,r=t-1023,o=(0|r/30)+1,i=new u(o,0>e);let a=1048575&u.__kBitConversionInts[u.__kBitConversionIntHigh]|1048576,s=u.__kBitConversionInts[u.__kBitConversionIntLow];const c=20,l=r%30;let d,h=0;if(l<20){const f=c-l;h=f+32,d=a>>>f,a=a<<32-f|s>>>f,s<<=32-f}else if(l===20)h=32,d=a,a=s,s=0;else{const f=l-c;h=32-f,d=a<<f|s>>>32-f,a=s<<f,s=0}i.__setDigit(o-1,d);for(let f=o-2;0<=f;f--)0<h?(h-=30,d=a>>>2,a=a<<30|s>>>2,s<<=30):d=0,i.__setDigit(f,d);return i.__trim()}static __isWhitespace(e){return 13>=e&&9<=e||(159>=e?e==32:131071>=e?e==160||e==5760:196607>=e?(e&=131071,10>=e||e==40||e==41||e==47||e==95||e==4096):e==65279)}static __fromString(e,t=0){let r=0;const o=e.length;let i=0;if(i===o)return u.__zero();let a=e.charCodeAt(i);for(;u.__isWhitespace(a);){if(++i===o)return u.__zero();a=e.charCodeAt(i)}if(a===43){if(++i===o)return null;a=e.charCodeAt(i),r=1}else if(a===45){if(++i===o)return null;a=e.charCodeAt(i),r=-1}if(t===0){if(t=10,a===48){if(++i===o)return u.__zero();if(a=e.charCodeAt(i),a===88||a===120){if(t=16,++i===o)return null;a=e.charCodeAt(i)}else if(a===79||a===111){if(t=8,++i===o)return null;a=e.charCodeAt(i)}else if(a===66||a===98){if(t=2,++i===o)return null;a=e.charCodeAt(i)}}}else if(t===16&&a===48){if(++i===o)return u.__zero();if(a=e.charCodeAt(i),a===88||a===120){if(++i===o)return null;a=e.charCodeAt(i)}}if(r!=0&&t!==10)return null;for(;a===48;){if(++i===o)return u.__zero();a=e.charCodeAt(i)}const s=o-i;let c=u.__kMaxBitsPerChar[t],l=u.__kBitsPerCharTableMultiplier-1;if(s>1073741824/c)return null;const d=c*s+l>>>u.__kBitsPerCharTableShift,h=new u(0|(d+29)/30,!1),f=10>t?t:10,g=10<t?t-10:0;if((t&t-1)==0){c>>=u.__kBitsPerCharTableShift;const y=[],p=[];let w=!1;do{let T=0,M=0;for(;;){let x;if(a-48>>>0<f)x=a-48;else if((32|a)-97>>>0<g)x=(32|a)-87;else{w=!0;break}if(M+=c,T=T<<c|x,++i===o){w=!0;break}if(a=e.charCodeAt(i),30<M+c)break}y.push(T),p.push(M)}while(!w);u.__fillFromParts(h,y,p)}else{h.__initializeDigits();let y=!1,p=0;do{let w=0,T=1;for(;;){let x;if(a-48>>>0<f)x=a-48;else if((32|a)-97>>>0<g)x=(32|a)-87;else{y=!0;break}const k=T*t;if(1073741823<k)break;if(T=k,w=w*t+x,p++,++i===o){y=!0;break}a=e.charCodeAt(i)}l=30*u.__kBitsPerCharTableMultiplier-1;const M=0|(c*p+l>>>u.__kBitsPerCharTableShift)/30;h.__inplaceMultiplyAdd(T,w,M)}while(!y)}if(i!==o){if(!u.__isWhitespace(a))return null;for(i++;i<o;i++)if(a=e.charCodeAt(i),!u.__isWhitespace(a))return null}return h.sign=r==-1,h.__trim()}static __fillFromParts(e,t,r){let o=0,i=0,a=0;for(let s=t.length-1;0<=s;s--){const c=t[s],l=r[s];i|=c<<a,a+=l,a===30?(e.__setDigit(o++,i),a=0,i=0):30<a&&(e.__setDigit(o++,1073741823&i),a-=30,i=c>>>l-a)}if(i!==0){if(o>=e.length)throw new Error("implementation bug");e.__setDigit(o++,i)}for(;o<e.length;o++)e.__setDigit(o,0)}static __toStringBasePowerOfTwo(e,t){const r=e.length;let o=t-1;o=(85&o>>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o);const i=o,a=t-1,s=e.__digit(r-1),c=u.__clz30(s);let l=0|(30*r-c+i-1)/i;if(e.sign&&l++,268435456<l)throw new Error("string too long");const d=Array(l);let h=l-1,f=0,g=0;for(let p=0;p<r-1;p++){const w=e.__digit(p),T=(f|w<<g)&a;d[h--]=u.__kConversionChars[T];const M=i-g;for(f=w>>>M,g=30-M;g>=i;)d[h--]=u.__kConversionChars[f&a],f>>>=i,g-=i}const y=(f|s<<g)&a;for(d[h--]=u.__kConversionChars[y],f=s>>>i-g;f!==0;)d[h--]=u.__kConversionChars[f&a],f>>>=i;if(e.sign&&(d[h--]="-"),h!=-1)throw new Error("implementation bug");return d.join("")}static __toStringGeneric(e,t,r){const o=e.length;if(o===0)return"";if(o===1){let p=e.__unsignedDigit(0).toString(t);return r===!1&&e.sign&&(p="-"+p),p}const i=30*o-u.__clz30(e.__digit(o-1)),a=u.__kMaxBitsPerChar[t],s=a-1;let c=i*u.__kBitsPerCharTableMultiplier;c+=s-1,c=0|c/s;const l=c+1>>1,d=u.exponentiate(u.__oneDigit(t,!1),u.__oneDigit(l,!1));let h,f;const g=d.__unsignedDigit(0);if(d.length===1&&32767>=g){h=new u(e.length,!1),h.__initializeDigits();let p=0;for(let w=2*e.length-1;0<=w;w--){const T=p<<15|e.__halfDigit(w);h.__setHalfDigit(w,0|T/g),p=0|T%g}f=p.toString(t)}else{const p=u.__absoluteDivLarge(e,d,!0,!0);h=p.quotient;const w=p.remainder.__trim();f=u.__toStringGeneric(w,t,!0)}h.__trim();let y=u.__toStringGeneric(h,t,!0);for(;f.length<l;)f="0"+f;return r===!1&&e.sign&&(y="-"+y),y+f}static __unequalSign(e){return e?-1:1}static __absoluteGreater(e){return e?-1:1}static __absoluteLess(e){return e?1:-1}static __compareToBigInt(e,t){const r=e.sign;if(r!==t.sign)return u.__unequalSign(r);const o=u.__absoluteCompare(e,t);return 0<o?u.__absoluteGreater(r):0>o?u.__absoluteLess(r):0}static __compareToNumber(e,t){if(u.__isOneDigitInt(t)){const r=e.sign,o=0>t;if(r!==o)return u.__unequalSign(r);if(e.length===0){if(o)throw new Error("implementation bug");return t===0?0:-1}if(1<e.length)return u.__absoluteGreater(r);const i=Math.abs(t),a=e.__unsignedDigit(0);return a>i?u.__absoluteGreater(r):a<i?u.__absoluteLess(r):0}return u.__compareToDouble(e,t)}static __compareToDouble(e,t){if(t!==t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;const r=e.sign;if(r!==0>t)return u.__unequalSign(r);if(t===0)throw new Error("implementation bug: should be handled elsewhere");if(e.length===0)return-1;u.__kBitConversionDouble[0]=t;const o=2047&u.__kBitConversionInts[u.__kBitConversionIntHigh]>>>20;if(o==2047)throw new Error("implementation bug: handled elsewhere");const i=o-1023;if(0>i)return u.__absoluteGreater(r);const a=e.length;let s=e.__digit(a-1);const c=u.__clz30(s),l=30*a-c,d=i+1;if(l<d)return u.__absoluteLess(r);if(l>d)return u.__absoluteGreater(r);let h=1048576|1048575&u.__kBitConversionInts[u.__kBitConversionIntHigh],f=u.__kBitConversionInts[u.__kBitConversionIntLow];const g=20,y=29-c;if(y!==(0|(l-1)%30))throw new Error("implementation bug");let p,w=0;if(20>y){const T=g-y;w=T+32,p=h>>>T,h=h<<32-T|f>>>T,f<<=32-T}else if(y===20)w=32,p=h,h=f,f=0;else{const T=y-g;w=32-T,p=h<<T|f>>>32-T,h=f<<T,f=0}if(s>>>=0,p>>>=0,s>p)return u.__absoluteGreater(r);if(s<p)return u.__absoluteLess(r);for(let T=a-2;0<=T;T--){0<w?(w-=30,p=h>>>2,h=h<<30|f>>>2,f<<=30):p=0;const M=e.__unsignedDigit(T);if(M>p)return u.__absoluteGreater(r);if(M<p)return u.__absoluteLess(r)}if(h!==0||f!==0){if(w===0)throw new Error("implementation bug");return u.__absoluteLess(r)}return 0}static __equalToNumber(e,t){var r=Math.abs;return u.__isOneDigitInt(t)?t===0?e.length===0:e.length===1&&e.sign===0>t&&e.__unsignedDigit(0)===r(t):u.__compareToDouble(e,t)===0}static __comparisonResultToBool(e,t){return t===0?0>e:t===1?0>=e:t===2?0<e:t===3?0<=e:void 0}static __compare(e,t,r){if(e=u.__toPrimitive(e),t=u.__toPrimitive(t),typeof e=="string"&&typeof t=="string")switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(u.__isBigInt(e)&&typeof t=="string")return t=u.__fromString(t),t!==null&&u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(typeof e=="string"&&u.__isBigInt(t))return e=u.__fromString(e),e!==null&&u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(e=u.__toNumeric(e),t=u.__toNumeric(t),u.__isBigInt(e)){if(u.__isBigInt(t))return u.__comparisonResultToBool(u.__compareToBigInt(e,t),r);if(typeof t!="number")throw new Error("implementation bug");return u.__comparisonResultToBool(u.__compareToNumber(e,t),r)}if(typeof e!="number")throw new Error("implementation bug");if(u.__isBigInt(t))return u.__comparisonResultToBool(u.__compareToNumber(t,e),2^r);if(typeof t!="number")throw new Error("implementation bug");return r===0?e<t:r===1?e<=t:r===2?e>t:r===3?e>=t:void 0}__clzmsd(){return u.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,r){if(e.length<t.length)return u.__absoluteAdd(t,e,r);if(e.length===0)return e;if(t.length===0)return e.sign===r?e:u.unaryMinus(e);let o=e.length;(e.__clzmsd()===0||t.length===e.length&&t.__clzmsd()===0)&&o++;const i=new u(o,r);let a=0,s=0;for(;s<t.length;s++){const c=e.__digit(s)+t.__digit(s)+a;a=c>>>30,i.__setDigit(s,1073741823&c)}for(;s<e.length;s++){const c=e.__digit(s)+a;a=c>>>30,i.__setDigit(s,1073741823&c)}return s<i.length&&i.__setDigit(s,a),i.__trim()}static __absoluteSub(e,t,r){if(e.length===0)return e;if(t.length===0)return e.sign===r?e:u.unaryMinus(e);const o=new u(e.length,r);let i=0,a=0;for(;a<t.length;a++){const s=e.__digit(a)-t.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}for(;a<e.length;a++){const s=e.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}return o.__trim()}static __absoluteAddOne(e,t,r=null){const o=e.length;r===null?r=new u(o,t):r.sign=t;let i=1;for(let a=0;a<o;a++){const s=e.__digit(a)+i;i=s>>>30,r.__setDigit(a,1073741823&s)}return i!=0&&r.__setDigitGrow(o,1),r}static __absoluteSubOne(e,t){const r=e.length;t=t||r;const o=new u(t,!1);let i=1;for(let a=0;a<r;a++){const s=e.__digit(a)-i;i=1&s>>>30,o.__setDigit(a,1073741823&s)}if(i!=0)throw new Error("implementation bug");for(let a=r;a<t;a++)o.__setDigit(a,0);return o}static __absoluteAnd(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=a;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)&t.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteAndNot(e,t,r=null){const o=e.length,i=t.length;let a=i;o<i&&(a=o);let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)&~t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteOr(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)|t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteXor(e,t,r=null){let o=e.length,i=t.length,a=i;if(o<i){a=o;const l=e,d=o;e=t,o=i,t=l,i=d}let s=o;r===null?r=new u(s,!1):s=r.length;let c=0;for(;c<a;c++)r.__setDigit(c,e.__digit(c)^t.__digit(c));for(;c<o;c++)r.__setDigit(c,e.__digit(c));for(;c<s;c++)r.__setDigit(c,0);return r}static __absoluteCompare(e,t){const r=e.length-t.length;if(r!=0)return r;let o=e.length-1;for(;0<=o&&e.__digit(o)===t.__digit(o);)o--;return 0>o?0:e.__unsignedDigit(o)>t.__unsignedDigit(o)?1:-1}static __multiplyAccumulate(e,t,r,o){if(t===0)return;const i=32767&t,a=t>>>15;let s=0,c=0;for(let l,d=0;d<e.length;d++,o++){l=r.__digit(o);const h=e.__digit(d),f=32767&h,g=h>>>15,y=u.__imul(f,i),p=u.__imul(f,a),w=u.__imul(g,i),T=u.__imul(g,a);l+=c+y+s,s=l>>>30,l&=1073741823,l+=((32767&p)<<15)+((32767&w)<<15),s+=l>>>30,c=T+(p>>>15)+(w>>>15),r.__setDigit(o,1073741823&l)}for(;s!=0||c!==0;o++){let l=r.__digit(o);l+=s+c,c=0,s=l>>>30,r.__setDigit(o,1073741823&l)}}static __internalMultiplyAdd(e,t,r,o,i){let a=r,s=0;for(let c=0;c<o;c++){const l=e.__digit(c),d=u.__imul(32767&l,t),h=u.__imul(l>>>15,t),f=d+((32767&h)<<15)+s+a;a=f>>>30,s=h>>>15,i.__setDigit(c,1073741823&f)}if(i.length>o)for(i.__setDigit(o++,a+s);o<i.length;)i.__setDigit(o++,0);else if(a+s!==0)throw new Error("implementation bug")}__inplaceMultiplyAdd(e,t,r){r>this.length&&(r=this.length);const o=32767&e,i=e>>>15;let a=0,s=t;for(let c=0;c<r;c++){const l=this.__digit(c),d=32767&l,h=l>>>15,f=u.__imul(d,o),g=u.__imul(d,i),y=u.__imul(h,o),p=u.__imul(h,i);let w=s+f+a;a=w>>>30,w&=1073741823,w+=((32767&g)<<15)+((32767&y)<<15),a+=w>>>30,s=p+(g>>>15)+(y>>>15),this.__setDigit(c,1073741823&w)}if(a!=0||s!==0)throw new Error("implementation bug")}static __absoluteDivSmall(e,t,r=null){r===null&&(r=new u(e.length,!1));let o=0;for(let i,a=2*e.length-1;0<=a;a-=2){i=(o<<15|e.__halfDigit(a))>>>0;const s=0|i/t;o=0|i%t,i=(o<<15|e.__halfDigit(a-1))>>>0;const c=0|i/t;o=0|i%t,r.__setDigit(a>>>1,s<<15|c)}return r}static __absoluteModSmall(e,t){let r=0;for(let o=2*e.length-1;0<=o;o--)r=0|((r<<15|e.__halfDigit(o))>>>0)%t;return r}static __absoluteDivLarge(e,t,r,o){const i=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-i;let c=null;r&&(c=new u(s+2>>>1,!1),c.__initializeDigits());const l=new u(i+2>>>1,!1);l.__initializeDigits();const d=u.__clz15(t.__halfDigit(i-1));0<d&&(t=u.__specialLeftShift(t,d,0));const h=u.__specialLeftShift(e,d,1),f=t.__halfDigit(i-1);let g=0;for(let y,p=s;0<=p;p--){y=32767;const w=h.__halfDigit(p+i);if(w!==f){const M=(w<<15|h.__halfDigit(p+i-1))>>>0;y=0|M/f;let x=0|M%f;const k=t.__halfDigit(i-2),$=h.__halfDigit(p+i-2);for(;u.__imul(y,k)>>>0>(x<<16|$)>>>0&&(y--,x+=f,!(32767<x)););}u.__internalMultiplyAdd(t,y,0,a,l);let T=h.__inplaceSub(l,p,i+1);T!==0&&(T=h.__inplaceAdd(t,p,i),h.__setHalfDigit(p+i,32767&h.__halfDigit(p+i)+T),y--),r&&(1&p?g=y<<15:c.__setDigit(p>>>1,g|y))}if(o)return h.__inplaceRightShift(d),r?{quotient:c,remainder:h}:h;if(r)return c;throw new Error("unreachable")}static __clz15(e){return u.__clz30(e)-15}__inplaceAdd(e,t,r){let o=0;for(let i=0;i<r;i++){const a=this.__halfDigit(t+i)+e.__halfDigit(i)+o;o=a>>>15,this.__setHalfDigit(t+i,32767&a)}return o}__inplaceSub(e,t,r){let o=0;if(1&t){t>>=1;let i=this.__digit(t),a=32767&i,s=0;for(;s<r-1>>>1;s++){const d=e.__digit(s),h=(i>>>15)-(32767&d)-o;o=1&h>>>15,this.__setDigit(t+s,(32767&h)<<15|32767&a),i=this.__digit(t+s+1),a=(32767&i)-(d>>>15)-o,o=1&a>>>15}const c=e.__digit(s),l=(i>>>15)-(32767&c)-o;if(o=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&a),t+s+1>=this.length)throw new RangeError("out of bounds");(1&r)==0&&(i=this.__digit(t+s+1),a=(32767&i)-(c>>>15)-o,o=1&a>>>15,this.__setDigit(t+e.length,1073709056&i|32767&a))}else{t>>=1;let i=0;for(;i<e.length-1;i++){const d=this.__digit(t+i),h=e.__digit(i),f=(32767&d)-(32767&h)-o;o=1&f>>>15;const g=(d>>>15)-(h>>>15)-o;o=1&g>>>15,this.__setDigit(t+i,(32767&g)<<15|32767&f)}const a=this.__digit(t+i),s=e.__digit(i),c=(32767&a)-(32767&s)-o;o=1&c>>>15;let l=0;(1&r)==0&&(l=(a>>>15)-(s>>>15)-o,o=1&l>>>15),this.__setDigit(t+i,(32767&l)<<15|32767&c)}return o}__inplaceRightShift(e){if(e===0)return;let t=this.__digit(0)>>>e;const r=this.length-1;for(let o=0;o<r;o++){const i=this.__digit(o+1);this.__setDigit(o,1073741823&i<<30-e|t),t=i>>>e}this.__setDigit(r,t)}static __specialLeftShift(e,t,r){const o=e.length,i=new u(o+r,!1);if(t===0){for(let s=0;s<o;s++)i.__setDigit(s,e.__digit(s));return 0<r&&i.__setDigit(o,0),i}let a=0;for(let s=0;s<o;s++){const c=e.__digit(s);i.__setDigit(s,1073741823&c<<t|a),a=c>>>30-t}return 0<r&&i.__setDigit(o,a),i}static __leftShiftByAbsolute(e,t){const r=u.__toShiftAmount(t);if(0>r)throw new RangeError("BigInt too big");const o=0|r/30,i=r%30,a=e.length,s=i!==0&&e.__digit(a-1)>>>30-i!=0,c=a+o+(s?1:0),l=new u(c,e.sign);if(i===0){let d=0;for(;d<o;d++)l.__setDigit(d,0);for(;d<c;d++)l.__setDigit(d,e.__digit(d-o))}else{let d=0;for(let h=0;h<o;h++)l.__setDigit(h,0);for(let h=0;h<a;h++){const f=e.__digit(h);l.__setDigit(h+o,1073741823&f<<i|d),d=f>>>30-i}if(s)l.__setDigit(a+o,d);else if(d!==0)throw new Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(e,t){const r=e.length,o=e.sign,i=u.__toShiftAmount(t);if(0>i)return u.__rightShiftByMaximum(o);const a=0|i/30,s=i%30;let c=r-a;if(0>=c)return u.__rightShiftByMaximum(o);let l=!1;if(o){if((e.__digit(a)&(1<<s)-1)!=0)l=!0;else for(let h=0;h<a;h++)if(e.__digit(h)!==0){l=!0;break}}l&&s===0&&~e.__digit(r-1)==0&&c++;let d=new u(c,o);if(s===0){d.__setDigit(c-1,0);for(let h=a;h<r;h++)d.__setDigit(h-a,e.__digit(h))}else{let h=e.__digit(a)>>>s;const f=r-a-1;for(let g=0;g<f;g++){const y=e.__digit(g+a+1);d.__setDigit(g,1073741823&y<<30-s|h),h=y>>>s}d.__setDigit(f,h)}return l&&(d=u.__absoluteAddOne(d,!0,d)),d.__trim()}static __rightShiftByMaximum(e){return e?u.__oneDigit(1,!0):u.__zero()}static __toShiftAmount(e){if(1<e.length)return-1;const t=e.__unsignedDigit(0);return t>u.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if(typeof e!="object"||e.constructor===u)return e;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"&&e[Symbol.toPrimitive]){const i=e[Symbol.toPrimitive](t);if(typeof i!="object")return i;throw new TypeError("Cannot convert object to primitive value")}const r=e.valueOf;if(r){const i=r.call(e);if(typeof i!="object")return i}const o=e.toString;if(o){const i=o.call(e);if(typeof i!="object")return i}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return u.__isBigInt(e)?e:+e}static __isBigInt(e){return typeof e=="object"&&e!==null&&e.constructor===u}static __truncateToNBits(e,t){const r=0|(e+29)/30,o=new u(r,t.sign),i=r-1;for(let s=0;s<i;s++)o.__setDigit(s,t.__digit(s));let a=t.__digit(i);if(e%30!=0){const s=32-e%30;a=a<<s>>>s}return o.__setDigit(i,a),o.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,r){var o=Math.min;const i=0|(e+29)/30,a=new u(i,r);let s=0;const c=i-1;let l=0;for(const g=o(c,t.length);s<g;s++){const y=0-t.__digit(s)-l;l=1&y>>>30,a.__setDigit(s,1073741823&y)}for(;s<c;s++)a.__setDigit(s,0|1073741823&-l);let d=c<t.length?t.__digit(c):0;const h=e%30;let f;if(h==0)f=0-d-l,f&=1073741823;else{const g=32-h;d=d<<g>>>g;const y=1<<32-g;f=y-d-l,f&=y-1}return a.__setDigit(c,f),a.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){const e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){const r=e>>>1,o=this.__digit(r),i=1&e?32767&o|t<<15:1073709056&o|32767&t;this.__setDigit(r,i)}static __digitPow(e,t){let r=1;for(;0<t;)1&t&&(r*=e),t>>>=1,e*=e;return r}static __detectBigEndian(){return u.__kBitConversionDouble[0]=-0,u.__kBitConversionInts[0]!==0}static __isOneDigitInt(e){return(1073741823&e)===e}}u.__kMaxLength=33554432,u.__kMaxLengthBits=u.__kMaxLength<<5,u.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],u.__kBitsPerCharTableShift=5,u.__kBitsPerCharTableMultiplier=1<<u.__kBitsPerCharTableShift,u.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],u.__kBitConversionBuffer=new ArrayBuffer(8),u.__kBitConversionDouble=new Float64Array(u.__kBitConversionBuffer),u.__kBitConversionInts=new Int32Array(u.__kBitConversionBuffer),u.__kBitConversionIntHigh=u.__detectBigEndian()?0:1,u.__kBitConversionIntLow=u.__detectBigEndian()?1:0,u.__clz30=Math.clz32?function(n){return Math.clz32(n)-2}:function(n){return n===0?30:0|29-(0|Math.log(n>>>0)/Math.LN2)},u.__imul=Math.imul||function(n,e){return 0|n*e};const Se=u.BigInt(0),rr=u.BigInt(1),Xo=u.BigInt(2),Fs=u.BigInt(10),Ss=u.BigInt(24),zs=u.BigInt(60),Zs=u.BigInt(1e3),gr=u.BigInt(1e6),Kn=u.BigInt(1e9),ha=u.multiply(u.BigInt(3600),Kn),qs=u.multiply(zs,Kn),Lt=u.multiply(ha,Ss);function ft(n){return typeof n=="bigint"?u.BigInt(n.toString(10)):n}function ma(n){return u.equal(u.remainder(n,Xo),Se)}function zt(n){return u.lessThan(n,Se)?u.unaryMinus(n):n}function zr(n,e){return u.lessThan(n,e)?-1:u.greaterThan(n,e)?1:0}function Zn(n,e){return{quotient:u.divide(n,e),remainder:u.remainder(n,e)}}var Ei,Mi;const O="slot-epochNanoSeconds",j="slot-iso-date",q="slot-iso-date-time",G="slot-time",_="slot-calendar",fa="slot-date-brand",ga="slot-year-month-brand",ya="slot-month-day-brand",F="slot-time-zone",ve="slot-years",Te="slot-months",Ye="slot-weeks",De="slot-days",_e="slot-hours",Ee="slot-minutes",Me="slot-seconds",xe="slot-milliseconds",Ce="slot-microseconds",Re="slot-nanoseconds",pa="date",wa="ym",ba="md",va="time",Ta="datetime",Da="instant",en="original",hn="timezone-canonical",Co="timezone-original",qn="calendar-id",_a="locale",ko="options",Ea=new WeakMap,Oo=Symbol.for("@@Temporal__GetSlots");(Ei=globalThis)[Oo]||(Ei[Oo]=function(n){return Ea.get(n)});const no=globalThis[Oo],jo=Symbol.for("@@Temporal__CreateSlots");(Mi=globalThis)[jo]||(Mi[jo]=function(n){Ea.set(n,Object.create(null))});const xt=globalThis[jo];function Ne(n,...e){if(!n||typeof n!="object")return!1;const t=no(n);return!!t&&e.every((r=>r in t))}function m(n,e){const t=no(n)?.[e];if(t===void 0)throw new TypeError(`Missing internal slot ${e}`);return t}function P(n,e,t){const r=no(n);if(r===void 0)throw new TypeError("Missing slots for the given container");if(r[e])throw new TypeError(`${e} already has set`);r[e]=t}const $o={};function Ct(n,e){Object.defineProperty(n.prototype,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0});const t=Object.getOwnPropertyNames(n);for(let o=0;o<t.length;o++){const i=t[o],a=Object.getOwnPropertyDescriptor(n,i);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n,i,a))}const r=Object.getOwnPropertyNames(n.prototype);for(let o=0;o<r.length;o++){const i=r[o],a=Object.getOwnPropertyDescriptor(n.prototype,i);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n.prototype,i,a))}No(e,n),No(`${e}.prototype`,n.prototype)}function No(n,e){const t=`%${n}%`;if($o[t]!==void 0)throw new Error(`intrinsic ${n} already exists`);$o[t]=e}function ue(n){return $o[n]}function fn(n,e){let t=n;if(t===0)return{div:t,mod:t};const r=Math.sign(t);t=Math.abs(t);const o=Math.trunc(1+Math.log10(t));if(e>=o)return{div:0*r,mod:r*t};if(e===0)return{div:r*t,mod:0*r};const i=t.toPrecision(o);return{div:r*Number.parseInt(i.slice(0,o-e),10),mod:r*Number.parseInt(i.slice(o-e),10)}}function vo(n,e,t){let r=n,o=t;if(r===0)return o;const i=Math.sign(r)||Math.sign(o);r=Math.abs(r),o=Math.abs(o);const a=r.toPrecision(Math.trunc(1+Math.log10(r)));if(o===0)return i*Number.parseInt(a+"0".repeat(e),10);const s=a+o.toPrecision(Math.trunc(1+Math.log10(o))).padStart(e,"0");return i*Number.parseInt(s,10)}function ro(n,e){const t=e==="negative";switch(n){case"ceil":return t?"zero":"infinity";case"floor":return t?"infinity":"zero";case"expand":return"infinity";case"trunc":return"zero";case"halfCeil":return t?"half-zero":"half-infinity";case"halfFloor":return t?"half-infinity":"half-zero";case"halfExpand":return"half-infinity";case"halfTrunc":return"half-zero";case"halfEven":return"half-even"}}function oo(n,e,t,r,o){return o==="zero"?n:o==="infinity"?e:t<0?n:t>0?e:o==="half-zero"?n:o==="half-infinity"?e:r?n:e}class R{constructor(e){this.totalNs=ft(e),this.sec=u.toNumber(u.divide(this.totalNs,Kn)),this.subsec=u.toNumber(u.remainder(this.totalNs,Kn))}static validateNew(e,t){if(u.greaterThan(zt(e),R.MAX))throw new RangeError(`${t} of duration time units cannot exceed ${R.MAX} s`);return new R(e)}static fromEpochNsDiff(e,t){const r=u.subtract(ft(e),ft(t));return new R(r)}static fromComponents(e,t,r,o,i,a){const s=u.add(u.add(u.add(u.add(u.add(u.BigInt(a),u.multiply(u.BigInt(i),Zs)),u.multiply(u.BigInt(o),gr)),u.multiply(u.BigInt(r),Kn)),u.multiply(u.BigInt(t),qs)),u.multiply(u.BigInt(e),ha));return R.validateNew(s,"total")}abs(){return new R(zt(this.totalNs))}add(e){return R.validateNew(u.add(this.totalNs,e.totalNs),"sum")}add24HourDays(e){return R.validateNew(u.add(this.totalNs,u.multiply(u.BigInt(e),Lt)),"sum")}addToEpochNs(e){return u.add(ft(e),this.totalNs)}cmp(e){return zr(this.totalNs,e.totalNs)}divmod(e){const{quotient:t,remainder:r}=Zn(this.totalNs,u.BigInt(e));return{quotient:u.toNumber(t),remainder:new R(r)}}fdiv(e){const t=ft(e),r=u.BigInt(t);let{quotient:o,remainder:i}=Zn(this.totalNs,r);const a=[];let s;const c=(u.lessThan(this.totalNs,Se)?-1:1)*Math.sign(u.toNumber(t));for(;!u.equal(i,Se)&&a.length<50;)i=u.multiply(i,Fs),{quotient:s,remainder:i}=Zn(i,r),a.push(Math.abs(u.toNumber(s)));return c*+(zt(o).toString()+"."+a.join(""))}isZero(){return u.equal(this.totalNs,Se)}round(e,t){const r=ft(e);if(u.equal(r,rr))return this;const{quotient:o,remainder:i}=Zn(this.totalNs,r),a=u.lessThan(this.totalNs,Se)?"negative":"positive",s=u.multiply(zt(o),r),c=u.add(s,r),l=zr(zt(u.multiply(i,Xo)),r),d=ro(t,a),h=u.equal(zt(this.totalNs),s)?s:oo(s,c,l,ma(o),d),f=a==="positive"?h:u.unaryMinus(h);return R.validateNew(f,"rounding")}sign(){return this.cmp(new R(Se))}subtract(e){return R.validateNew(u.subtract(this.totalNs,e.totalNs),"difference")}}R.MAX=u.BigInt("9007199254740991999999999"),R.ZERO=new R(Se);const xi=/[A-Za-z._][A-Za-z._0-9+-]*/,yr=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${xi.source})(?:\\/(?:${xi.source}))*)`),Ma=/(?:[+-]\d{6}|\d{4})/,Zr=/(?:0[1-9]|1[0-2])/,Po=/(?:0[1-9]|[12]\d|3[01])/,Ws=new RegExp(`(${Ma.source})(?:-(${Zr.source})-(${Po.source})|(${Zr.source})(${Po.source}))`),xa=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,Ca=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,ka=new RegExp(`([zZ])|${Ca.source}?`),wn=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,Hs=new RegExp([`^${Ws.source}`,`(?:(?:[tT]|\\s+)${xa.source}(?:${ka.source})?)?`,`(?:\\[!?(${yr.source})\\])?`,`((?:${wn.source})*)$`].join("")),Gs=new RegExp([`^[tT]?${xa.source}`,`(?:${ka.source})?`,`(?:\\[!?${yr.source}\\])?`,`((?:${wn.source})*)$`].join("")),Vs=new RegExp(`^(${Ma.source})-?(${Zr.source})(?:\\[!?${yr.source}\\])?((?:${wn.source})*)$`),Qs=new RegExp(`^(?:--)?(${Zr.source})-?(${Po.source})(?:\\[!?${yr.source}\\])?((?:${wn.source})*)$`),To=/(\d+)(?:[.,](\d{1,9}))?/,Xs=new RegExp(`(?:${To.source}H)?(?:${To.source}M)?(?:${To.source}S)?`),Ks=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${Xs.source})?$`,"i"),At=864e5,qr=1e6*At,Bs=6e10,Oa=1e8*At,bn=it(Oa),or=u.unaryMinus(bn),Js=u.add(u.subtract(or,Lt),rr),ec=u.subtract(u.add(bn,Lt),rr),tc=146097*At,Ci=-271821,ki=275760,Bn=Date.UTC(1847,0,1),nc=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","ethiopic-amete-alem","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"],rc=new Set(["ACT","AET","AGT","ART","AST","BET","BST","CAT","CNT","CST","CTT","EAT","ECT","IET","IST","JST","MIT","NET","NST","PLT","PNT","PRT","PST","SST","VST"]);function V(n){return typeof n=="object"&&n!==null||typeof n=="function"}function io(n){if(typeof n=="bigint")throw new TypeError("Cannot convert BigInt to number");return Number(n)}function ao(n){if(typeof n=="symbol")throw new TypeError("Cannot convert a Symbol value to a String");return String(n)}function N(n){const e=io(n);if(e===0)return 0;if(Number.isNaN(e)||e===1/0||e===-1/0)throw new RangeError("invalid number value");const t=Math.trunc(e);return t===0?0:t}function Oi(n,e){const t=N(n);if(t<=0)throw e!==void 0?new RangeError(`property '${e}' cannot be a a number less than one`):new RangeError("Cannot convert a number less than one to a positive integer");return t}function Be(n){const e=io(n);if(Number.isNaN(e))throw new RangeError("not a number");if(e===1/0||e===-1/0)throw new RangeError("infinity is out of range");if(!(function(t){if(typeof t!="number"||Number.isNaN(t)||t===1/0||t===-1/0)return!1;const r=Math.abs(t);return Math.floor(r)===r})(e))throw new RangeError(`unsupported fractional value ${n}`);return e===0?0:e}function ir(n,e){return String(n).padStart(e,"0")}function re(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function Yo(n,e){if(V(n)){const t=n?.toString();if(typeof t=="string"||typeof t=="number")return t;throw new TypeError("Cannot convert object to primitive value")}return n}const Ro=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],oc={era:ao,eraYear:N,year:N,month:Oi,monthCode:function(n){const e=re(Yo(n));if(e.length<3||e.length>4||e[0]!=="M"||"0123456789".indexOf(e[1])===-1||"0123456789".indexOf(e[2])===-1||e[1]+e[2]==="00"&&e[3]!=="L"||e[3]!=="L"&&e[3]!==void 0)throw new RangeError(`bad month code ${e}; must match M01-M99 or M00L-M99L`);return e},day:Oi,hour:N,minute:N,second:N,millisecond:N,microsecond:N,nanosecond:N,offset:function(n){const e=re(Yo(n));return Nn(e),e},timeZone:je},ic={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},vn=[["years","year","date"],["months","month","date"],["weeks","week","date"],["days","day","date"],["hours","hour","time"],["minutes","minute","time"],["seconds","second","time"],["milliseconds","millisecond","time"],["microseconds","microsecond","time"],["nanoseconds","nanosecond","time"]],ji=Object.fromEntries(vn.map((n=>[n[0],n[1]]))),ac=Object.fromEntries(vn.map((([n,e])=>[e,n]))),Jn=vn.map((([,n])=>n)),Tn={day:qr,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},Wr=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],sc=Intl.DateTimeFormat,$i=new Map;function ja(n){const e=ur(n);let t=$i.get(e);return t===void 0&&(t=new sc("en-us",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$i.set(e,t)),t}function se(n){return Ne(n,O)&&!Ne(n,F,_)}function W(n){return Ne(n,ve,Te,De,_e,Ee,Me,xe,Ce,Re)}function H(n){return Ne(n,fa)}function K(n){return Ne(n,G)}function Z(n){return Ne(n,q)}function ce(n){return Ne(n,ga)}function Fe(n){return Ne(n,ya)}function Y(n){return Ne(n,O,F,_)}function b(n,e){if(!e(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function On(n){if(Ne(n,_)||Ne(n,F))throw new TypeError("with() does not support a calendar or timeZone property");if(K(n))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(n.calendar!==void 0)throw new TypeError("with() does not support a calendar property");if(n.timeZone!==void 0)throw new TypeError("with() does not support a timeZone property")}function pr(n,e){return e==="never"||e==="auto"&&n==="iso8601"?"":`[${e==="critical"?"!":""}u-ca=${n}]`}function so(n){let e,t,r=!1;for(wn.lastIndex=0;t=wn.exec(n);){const{1:o,2:i,3:a}=t;if(i==="u-ca"){if(e===void 0)e=a,r=o==="!";else if(o==="!"||r)throw new RangeError(`Invalid annotations in ${n}: more than one u-ca present with critical flag`)}else if(o==="!")throw new RangeError(`Unrecognized annotation: !${i}=${a}`)}return e}function ut(n){const e=Hs.exec(n);if(!e)throw new RangeError(`invalid RFC 9557 string: ${n}`);const t=so(e[16]);let r=e[1];if(r==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);const o=+r,i=+(e[2]??e[4]??1),a=+(e[3]??e[5]??1),s=e[6]!==void 0,c=+(e[6]??0),l=+(e[7]??e[10]??0);let d=+(e[8]??e[11]??0);d===60&&(d=59);const h=(e[9]??e[12]??"")+"000000000",f=+h.slice(0,3),g=+h.slice(3,6),y=+h.slice(6,9);let p,w=!1;e[13]?(p=void 0,w=!0):e[14]&&(p=e[14]);const T=e[15];return ni(o,i,a,c,l,d,f,g,y),{year:o,month:i,day:a,time:s?{hour:c,minute:l,second:d,millisecond:f,microsecond:g,nanosecond:y}:"start-of-day",tzAnnotation:T,offset:p,z:w,calendar:t}}function $a(n){const e=Gs.exec(n);let t,r,o,i,a,s,c;if(e){c=so(e[10]),t=+(e[1]??0),r=+(e[2]??e[5]??0),o=+(e[3]??e[6]??0),o===60&&(o=59);const l=(e[4]??e[7]??"")+"000000000";if(i=+l.slice(0,3),a=+l.slice(3,6),s=+l.slice(6,9),e[8])throw new RangeError("Z designator not supported for PlainTime")}else{let l,d;if({time:l,z:d,calendar:c}=ut(n),l==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(d)throw new RangeError("Z designator not supported for PlainTime");({hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s}=l)}if(ho(t,r,o,i,a,s),/[tT ][0-9][0-9]/.test(n))return{hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s,calendar:c};try{const{month:l,day:d}=Bo(n);Qt(1972,l,d)}catch{try{const{year:l,month:d}=Ko(n);Qt(l,d,1)}catch{return{hour:t,minute:r,second:o,millisecond:i,microsecond:a,nanosecond:s,calendar:c}}}throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`)}function Ko(n){const e=Vs.exec(n);let t,r,o,i;if(e){o=so(e[3]);let a=e[1];if(a==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);if(t=+a,r=+e[2],i=1,o!==void 0&&o!=="iso8601")throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let a;if({year:t,month:r,calendar:o,day:i,z:a}=ut(n),a)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:t,month:r,calendar:o,referenceISODay:i}}function Bo(n){const e=Qs.exec(n);let t,r,o,i;if(e){if(o=so(e[3]),t=+e[1],r=+e[2],o!==void 0&&o!=="iso8601")throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let a;if({month:t,day:r,calendar:o,year:i,z:a}=ut(n),a)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:t,day:r,calendar:o,referenceISOYear:i}}const Na=new RegExp(`^${yr.source}$`,"i"),Pa=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Ya(n){const e=lc.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${e}: ${n}`)}function It(n){return Na.test(n)||Ya(n),Pa.test(n)?{offsetMinutes:Nn(n)/6e10}:{tzName:n}}function er(n,e,t,r){let o=n,i=e,a=t;switch(r){case"reject":Qt(o,i,a);break;case"constrain":({year:o,month:i,day:a}=Ka(o,i,a))}return{year:o,month:i,day:a}}function co(n,e,t,r,o,i,a){let s=n,c=e,l=t,d=r,h=o,f=i;switch(a){case"reject":ho(s,c,l,d,h,f);break;case"constrain":s=ke(s,0,23),c=ke(c,0,59),l=ke(l,0,59),d=ke(d,0,999),h=ke(h,0,999),f=ke(f,0,999)}return{hour:s,minute:c,second:l,millisecond:d,microsecond:h,nanosecond:f}}function Ra(n){if(!V(n))throw new TypeError("invalid duration-like");const e={years:void 0,months:void 0,weeks:void 0,days:void 0,hours:void 0,minutes:void 0,seconds:void 0,milliseconds:void 0,microseconds:void 0,nanoseconds:void 0};let t=!1;for(let r=0;r<Wr.length;r++){const o=Wr[r],i=n[o];i!==void 0&&(t=!0,e[o]=Be(i))}if(!t)throw new TypeError("invalid duration-like");return e}function fe({years:n,months:e,weeks:t,days:r},o,i,a){return{years:n,months:a??e,weeks:i??t,days:o??r}}function U(n,e){return{isoDate:n,time:e}}function L(n){return Tt(n,"overflow",["constrain","reject"],"constrain")}function tr(n){return Tt(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Je(n,e){return Tt(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],e)}function Ur(n,e){return Tt(n,"offset",["prefer","use","ignore","reject"],e)}function wr(n){return Tt(n,"calendarName",["auto","always","never","critical"],"auto")}function jn(n){let e=n.roundingIncrement;if(e===void 0)return 1;const t=N(e);if(t<1||t>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${e}`);return t}function $n(n,e,t){const r=t?e:e-1;if(n>r)throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);if(e%n!=0)throw new RangeError(`Rounding increment must divide evenly into ${e}`)}function br(n){const e=n.fractionalSecondDigits;if(e===void 0)return"auto";if(typeof e!="number"){if(ao(e)!=="auto")throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`);return"auto"}const t=Math.floor(e);if(!Number.isFinite(t)||t<0||t>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`);return t}function vr(n,e){switch(n){case"minute":return{precision:"minute",unit:"minute",increment:1};case"second":return{precision:0,unit:"second",increment:1};case"millisecond":return{precision:3,unit:"millisecond",increment:1};case"microsecond":return{precision:6,unit:"microsecond",increment:1};case"nanosecond":return{precision:9,unit:"nanosecond",increment:1}}switch(e){case"auto":return{precision:e,unit:"nanosecond",increment:1};case 0:return{precision:e,unit:"second",increment:1};case 1:case 2:case 3:return{precision:e,unit:"millisecond",increment:10**(3-e)};case 4:case 5:case 6:return{precision:e,unit:"microsecond",increment:10**(6-e)};case 7:case 8:case 9:return{precision:e,unit:"nanosecond",increment:10**(9-e)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${e}`)}}const Et=Symbol("~required~");function Le(n,e,t,r,o=[]){let i=[];for(let l=0;l<vn.length;l++){const d=vn[l],h=d[1],f=d[2];t!=="datetime"&&t!==f||i.push(h)}i=i.concat(o);let a=r;a===Et?a=void 0:a!==void 0&&i.push(a);let s=[];s=s.concat(i);for(let l=0;l<i.length;l++){const d=i[l],h=ac[d];h!==void 0&&s.push(h)}let c=Tt(n,e,s,a);if(c===void 0&&r===Et)throw new RangeError(`${e} is required`);return c&&c in ji?ji[c]:c}function Do(n){const e=n.relativeTo;if(e===void 0)return{};let t,r,o,i,a,s="option",c=!1;if(V(e)){if(Y(e))return{zonedRelativeTo:e};if(H(e))return{plainRelativeTo:e};if(Z(e))return{plainRelativeTo:Oe(m(e,q).isoDate,m(e,_))};o=Mr(e);const l=qe(o,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:t,time:r}=Dr(o,l,"constrain")),{offset:a,timeZone:i}=l,a===void 0&&(s="wall")}else{let l,d,h,f,g;if({year:h,month:f,day:g,time:r,calendar:o,tzAnnotation:l,offset:a,z:d}=ut(re(e)),l)i=je(l),d?s="exact":a||(s="wall"),c=!0;else if(d)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");o||(o="iso8601"),o=Pe(o),t={year:h,month:f,day:g}}return i===void 0?{plainRelativeTo:Oe(t,o)}:{zonedRelativeTo:me(Hr(t,r,s,s==="option"?Nn(a):0,i,"compatible","reject",c),i,o)}}function gt(n){return m(n,ve)!==0?"year":m(n,Te)!==0?"month":m(n,Ye)!==0?"week":m(n,De)!==0?"day":m(n,_e)!==0?"hour":m(n,Ee)!==0?"minute":m(n,Me)!==0?"second":m(n,xe)!==0?"millisecond":m(n,Ce)!==0?"microsecond":"nanosecond"}function bt(n,e){return Jn.indexOf(n)>Jn.indexOf(e)?e:n}function tt(n){return n==="year"||n==="month"||n==="week"}function yt(n){return tt(n)||n==="day"?"date":"time"}function Ft(n){return ue("%calendarImpl%")(n)}function Tr(n){return ue("%calendarImpl%")(m(n,_))}function $e(n,e,t="date"){const r=Object.create(null),o=Ft(n).isoToDate(e,{year:!0,monthCode:!0,day:!0});return r.monthCode=o.monthCode,t!=="month-day"&&t!=="date"||(r.day=o.day),t!=="year-month"&&t!=="date"||(r.year=o.year),r}function qe(n,e,t,r,o){const i=Ft(n).extraFields(t),a=t.concat(r,i),s=Object.create(null);let c=!1;a.sort();for(let l=0;l<a.length;l++){const d=a[l],h=e[d];if(h!==void 0)c=!0,s[d]=(0,oc[d])(h);else if(o!=="partial"){if(o.includes(d))throw new TypeError(`required property '${d}' missing or undefined`);s[d]=ic[d]}}if(o==="partial"&&!c)throw new TypeError("no supported properties found");return s}function Io(n,e="complete"){const t=["hour","microsecond","millisecond","minute","nanosecond","second"];let r=!1;const o=Object.create(null);for(let i=0;i<t.length;i++){const a=t[i],s=n[a];s!==void 0?(o[a]=N(s),r=!0):e==="complete"&&(o[a]=0)}if(!r)throw new TypeError("invalid time-like");return o}function Wn(n,e){if(V(n)){if(H(n))return L(C(e)),Oe(m(n,j),m(n,_));if(Y(n)){const c=Xe(m(n,F),m(n,O));return L(C(e)),Oe(c.isoDate,m(n,_))}if(Z(n))return L(C(e)),Oe(m(n,q).isoDate,m(n,_));const s=Mr(n);return Oe(Ut(s,qe(s,n,["year","month","monthCode","day"],[],[]),L(C(e))),s)}let{year:t,month:r,day:o,calendar:i,z:a}=ut(re(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return i||(i="iso8601"),i=Pe(i),L(C(e)),Oe({year:t,month:r,day:o},i)}function Dr(n,e,t){return U(Ut(n,e,t),co(e.hour,e.minute,e.second,e.millisecond,e.microsecond,e.nanosecond,t))}function Hn(n,e){let t,r,o;if(V(n)){if(Z(n))return L(C(e)),He(m(n,q),m(n,_));if(Y(n)){const s=Xe(m(n,F),m(n,O));return L(C(e)),He(s,m(n,_))}if(H(n))return L(C(e)),He(U(m(n,j),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),m(n,_));o=Mr(n);const i=qe(o,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=L(C(e));({isoDate:t,time:r}=Dr(o,i,a))}else{let i,a,s,c;if({year:a,month:s,day:c,time:r,calendar:o,z:i}=ut(re(n)),i)throw new RangeError("Z designator not supported for PlainDateTime");r==="start-of-day"&&(r={deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),ni(a,s,c,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),o||(o="iso8601"),o=Pe(o),L(C(e)),t={year:a,month:s,day:c}}return He(U(t,r),o)}function Qe(n){const e=ue("%Temporal.Duration%");if(W(n))return new e(m(n,ve),m(n,Te),m(n,Ye),m(n,De),m(n,_e),m(n,Ee),m(n,Me),m(n,xe),m(n,Ce),m(n,Re));if(!V(n))return(function(o){const{years:i,months:a,weeks:s,days:c,hours:l,minutes:d,seconds:h,milliseconds:f,microseconds:g,nanoseconds:y}=(function(p){const w=Ks.exec(p);if(!w)throw new RangeError(`invalid duration: ${p}`);if(w.every((($r,Nr)=>Nr<2||$r===void 0)))throw new RangeError(`invalid duration: ${p}`);const T=w[1]==="-"?-1:1,M=w[2]===void 0?0:N(w[2])*T,x=w[3]===void 0?0:N(w[3])*T,k=w[4]===void 0?0:N(w[4])*T,$=w[5]===void 0?0:N(w[5])*T,Q=w[6]===void 0?0:N(w[6])*T,J=w[7],B=w[8],z=w[9],de=w[10],ee=w[11];let S=0,oe=0,ye=0;if(J!==void 0){if(B??z??de??ee)throw new RangeError("only the smallest unit can be fractional");ye=3600*N((J+"000000000").slice(0,9))*T}else if(S=B===void 0?0:N(B)*T,z!==void 0){if(de??ee)throw new RangeError("only the smallest unit can be fractional");ye=60*N((z+"000000000").slice(0,9))*T}else oe=de===void 0?0:N(de)*T,ee!==void 0&&(ye=N((ee+"000000000").slice(0,9))*T);const We=ye%1e3,dt=Math.trunc(ye/1e3)%1e3,ht=Math.trunc(ye/1e6)%1e3;return oe+=Math.trunc(ye/1e9)%60,S+=Math.trunc(ye/6e10),mo(M,x,k,$,Q,S,oe,ht,dt,We),{years:M,months:x,weeks:k,days:$,hours:Q,minutes:S,seconds:oe,milliseconds:ht,microseconds:dt,nanoseconds:We}})(o);return new(ue("%Temporal.Duration%"))(i,a,s,c,l,d,h,f,g,y)})(re(n));const t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};let r=Ra(n);for(let o=0;o<Wr.length;o++){const i=Wr[o],a=r[i];a!==void 0&&(t[i]=a)}return new e(t.years,t.months,t.weeks,t.days,t.hours,t.minutes,t.seconds,t.milliseconds,t.microseconds,t.nanoseconds)}function Gn(n){let e;if(V(n)){if(se(n)||Y(n))return rt(m(n,O));e=Yo(n)}else e=n;const{year:t,month:r,day:o,time:i,offset:a,z:s}=(function(p){const w=ut(p);if(!w.z&&!w.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return w})(re(e)),{hour:c=0,minute:l=0,second:d=0,millisecond:h=0,microsecond:f=0,nanosecond:g=0}=i==="start-of-day"?{}:i,y=lr(t,r,o,c,l,d,h,f,g-(s?0:Nn(a)));return pn(y.isoDate),rt(le(y))}function Ni(n,e){if(V(n)){if(Fe(n))return L(C(e)),gn(m(n,j),m(n,_));let s;return Ne(n,_)?s=m(n,_):(s=n.calendar,s===void 0&&(s="iso8601"),s=Er(s)),gn(Gr(s,qe(s,n,["year","month","monthCode","day"],[],[]),L(C(e))),s)}let{month:t,day:r,referenceISOYear:o,calendar:i}=Bo(re(n));if(i===void 0&&(i="iso8601"),i=Pe(i),L(C(e)),i==="iso8601")return gn({year:1972,month:t,day:r},i);let a={year:o,month:t,day:r};return tn(a),a=Gr(i,$e(i,a,"month-day"),"constrain"),gn(a,i)}function Nt(n,e){let t;if(V(n)){if(K(n))return L(C(e)),pt(m(n,G));if(Z(n))return L(C(e)),pt(m(n,q).time);if(Y(n)){const l=Xe(m(n,F),m(n,O));return L(C(e)),pt(l.time)}const{hour:r,minute:o,second:i,millisecond:a,microsecond:s,nanosecond:c}=Io(n);t=co(r,o,i,a,s,c,L(C(e)))}else t=$a(re(n)),L(C(e));return pt(t)}function Ia(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:m(Nt(n),G)}function Vn(n,e){if(V(n)){if(ce(n))return L(C(e)),yn(m(n,j),m(n,_));const s=Mr(n);return yn(ar(s,qe(s,n,["year","month","monthCode"],[],[]),L(C(e))),s)}let{year:t,month:r,referenceISODay:o,calendar:i}=Ko(re(n));i===void 0&&(i="iso8601"),i=Pe(i),L(C(e));let a={year:t,month:r,day:o};return ri(a),a=ar(i,$e(i,a,"year-month"),"constrain"),yn(a,i)}function Hr(n,e,t,r,o,i,a,s){if(e==="start-of-day")return Ot(o,n);const c=U(n,e);if(t==="wall"||a==="ignore")return ge(o,c,i);if(t==="exact"||a==="use"){const h=lr(n.year,n.month,n.day,e.hour,e.minute,e.second,e.millisecond,e.microsecond,e.nanosecond-r);pn(h.isoDate);const f=le(h);return ct(f),f}pn(n);const l=le(c),d=sr(o,c);for(let h=0;h<d.length;h++){const f=d[h],g=u.toNumber(u.subtract(l,f)),y=Pt(g,6e10,"halfExpand");if(g===r||s&&y===r)return f}if(a==="reject"){const h=Lo(r),f=cr(c,"iso8601","auto");throw new RangeError(`Offset ${h} is invalid for ${f} in ${o}`)}return Wa(d,o,c,i)}function Qn(n,e){let t,r,o,i,a,s,c,l=!1,d="option";if(V(n)){if(Y(n)){const p=C(e);return tr(p),Ur(p,"reject"),L(p),me(m(n,O),m(n,F),m(n,_))}a=Mr(n);const f=qe(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:i,timeZone:o}=f),i===void 0&&(d="wall");const g=C(e);s=tr(g),c=Ur(g,"reject");const y=L(g);({isoDate:t,time:r}=Dr(a,f,y))}else{let f,g,y,p,w;({year:y,month:p,day:w,time:r,tzAnnotation:f,offset:i,z:g,calendar:a}=(function(M){const x=ut(M);if(!x.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return x})(re(n))),o=je(f),g?d="exact":i||(d="wall"),a||(a="iso8601"),a=Pe(a),l=!0;const T=C(e);s=tr(T),c=Ur(T,"reject"),L(T),t={year:y,month:p,day:w}}let h=0;return d==="option"&&(h=Nn(i)),me(Hr(t,r,d,h,o,s,c,l),o,a)}function La(n,e,t){tn(e),xt(n),P(n,j,e),P(n,_,t),P(n,fa,!0)}function Oe(n,e){const t=ue("%Temporal.PlainDate%"),r=Object.create(t.prototype);return La(r,n,e),r}function Aa(n,e,t){Xt(e),xt(n),P(n,q,e),P(n,_,t)}function He(n,e){const t=ue("%Temporal.PlainDateTime%"),r=Object.create(t.prototype);return Aa(r,n,e),r}function Ua(n,e,t){tn(e),xt(n),P(n,j,e),P(n,_,t),P(n,ya,!0)}function gn(n,e){const t=ue("%Temporal.PlainMonthDay%"),r=Object.create(t.prototype);return Ua(r,n,e),r}function Fa(n,e){xt(n),P(n,G,e)}function pt(n){const e=ue("%Temporal.PlainTime%"),t=Object.create(e.prototype);return Fa(t,n),t}function Sa(n,e,t){ri(e),xt(n),P(n,j,e),P(n,_,t),P(n,ga,!0)}function yn(n,e){const t=ue("%Temporal.PlainYearMonth%"),r=Object.create(t.prototype);return Sa(r,n,e),r}function za(n,e){ct(e),xt(n),P(n,O,e)}function rt(n){const e=ue("%Temporal.Instant%"),t=Object.create(e.prototype);return za(t,n),t}function Za(n,e,t,r){ct(e),xt(n),P(n,O,e),P(n,F,t),P(n,_,r)}function me(n,e,t="iso8601"){const r=ue("%Temporal.ZonedDateTime%"),o=Object.create(r.prototype);return Za(o,n,e,t),o}function Pi(n){return Ro.filter((e=>n[e]!==void 0))}function Vt(n,e,t){const r=Pi(t),o=Ft(n).fieldKeysToIgnore(r),i=Object.create(null),a=Pi(e);for(let s=0;s<Ro.length;s++){let c;const l=Ro[s];a.includes(l)&&!o.includes(l)&&(c=e[l]),r.includes(l)&&(c=t[l]),c!==void 0&&(i[l]=c)}return i}function ze(n,e,t,r){const o=Ft(n).dateAdd(e,t,r);return tn(o),o}function _r(n,e,t,r){return Ft(n).dateUntil(e,t,r)}function Er(n){if(V(n)&&Ne(n,_))return m(n,_);const e=re(n);try{return Pe(e)}catch{}let t;try{({calendar:t}=ut(e))}catch{try{({calendar:t}=$a(e))}catch{try{({calendar:t}=Ko(e))}catch{({calendar:t}=Bo(e))}}}return t||(t="iso8601"),Pe(t)}function Mr(n){if(Ne(n,_))return m(n,_);const{calendar:e}=n;return e===void 0?"iso8601":Er(e)}function st(n,e){return Pe(n)===Pe(e)}function Ut(n,e,t){const r=Ft(n);r.resolveFields(e,"date");const o=r.dateToISO(e,t);return tn(o),o}function ar(n,e,t){const r=Ft(n);r.resolveFields(e,"year-month"),e.day=1;const o=r.dateToISO(e,t);return ri(o),o}function Gr(n,e,t){const r=Ft(n);r.resolveFields(e,"month-day");const o=r.monthDayToISOReferenceDate(e,t);return tn(o),o}function je(n){if(V(n)&&Y(n))return m(n,F);const e=re(n);if(e==="UTC")return"UTC";const{tzName:t,offsetMinutes:r}=(function(i){const{tzAnnotation:a,offset:s,z:c}=(function(l){if(Na.test(l))return{tzAnnotation:l,offset:void 0,z:!1};try{const{tzAnnotation:d,offset:h,z:f}=ut(l);if(f||d||h)return{tzAnnotation:d,offset:h,z:f}}catch{}Ya(l)})(i);return a?It(a):c?It("UTC"):s?It(s):void 0})(e);if(r!==void 0)return Jo(r);const o=Vr(t);if(!o)throw new RangeError(`Unrecognized time zone ${t}`);return o.identifier}function qa(n,e){if(n===e)return!0;const t=It(n).offsetMinutes,r=It(e).offsetMinutes;if(t===void 0&&r===void 0){const o=Vr(e);if(!o)return!1;const i=Vr(n);return!!i&&i.primaryIdentifier===o.primaryIdentifier}return t===r}function wt(n,e){const t=It(n).offsetMinutes;return t!==void 0?6e10*t:Ao(n,e)}function Lo(n){const e=n<0?"-":"+",t=Math.abs(n),r=Math.floor(t/36e11),o=Math.floor(t/6e10)%60,i=Math.floor(t/1e9)%60,a=t%1e9;return`${e}${lo(r,o,i,a,i===0&&a===0?"minute":"auto")}`}function Xe(n,e){const t=wt(n,e);let{isoDate:{year:r,month:o,day:i},time:{hour:a,minute:s,second:c,millisecond:l,microsecond:d,nanosecond:h}}=Va(e);return lr(r,o,i,a,s,c,l,d,h+t)}function ge(n,e,t){return Wa(sr(n,e),n,e,t)}function Wa(n,e,t,r){const o=n.length;if(o===1)return n[0];if(o)switch(r){case"compatible":case"earlier":return n[0];case"later":return n[o-1];case"reject":throw new RangeError("multiple instants found")}if(r==="reject")throw new RangeError("multiple instants found");const i=le(t),a=u.subtract(i,Lt);ct(a);const s=wt(e,a),c=u.add(i,Lt);ct(c);const l=wt(e,c)-s;switch(r){case"earlier":{const d=R.fromComponents(0,0,0,0,0,-l),h=Dn(t.time,d);return sr(e,U(Ae(t.isoDate.year,t.isoDate.month,t.isoDate.day+h.deltaDays),h))[0]}case"compatible":case"later":{const d=R.fromComponents(0,0,0,0,0,l),h=Dn(t.time,d),f=sr(e,U(Ae(t.isoDate.year,t.isoDate.month,t.isoDate.day+h.deltaDays),h));return f[f.length-1]}}}function sr(n,e){if(n==="UTC")return pn(e.isoDate),[le(e)];const t=It(n).offsetMinutes;if(t!==void 0){const r=lr(e.isoDate.year,e.isoDate.month,e.isoDate.day,e.time.hour,e.time.minute-t,e.time.second,e.time.millisecond,e.time.microsecond,e.time.nanosecond);pn(r.isoDate);const o=le(r);return ct(o),[o]}return pn(e.isoDate),(function(r,o){let i=le(o),a=u.subtract(i,Lt);u.lessThan(a,or)&&(a=i);let s=u.add(i,Lt);u.greaterThan(s,bn)&&(s=i);const c=Ao(r,a),l=Ao(r,s);return(c===l?[c]:[c,l]).map((h=>{const f=u.subtract(i,u.BigInt(h)),g=(function(y,p){const{epochMilliseconds:w,time:{millisecond:T,microsecond:M,nanosecond:x}}=Va(p),{year:k,month:$,day:Q,hour:J,minute:B,second:z}=Qa(y,w);return lr(k,$,Q,J,B,z,T,M,x)})(r,f);if(_n(o,g)===0)return ct(f),f})).filter((h=>h!==void 0))})(n,e)}function Ot(n,e){const t=U(e,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=sr(n,t);if(r.length)return r[0];const o=le(t),i=u.subtract(o,Lt);return ct(i),ti(n,i)}function xr(n){let e;return e=n<0||n>9999?(n<0?"-":"+")+ir(Math.abs(n),6):ir(n,4),e}function Ze(n){return ir(n,2)}function Ha(n,e){let t;if(e==="auto"){if(n===0)return"";t=ir(n,9).replace(/0+$/,"")}else{if(e===0)return"";t=ir(n,9).slice(0,e)}return`.${t}`}function lo(n,e,t,r,o){let i=`${Ze(n)}:${Ze(e)}`;return o==="minute"||(i+=`:${Ze(t)}`,i+=Ha(r,o)),i}function Yi(n,e,t){let r=e;r===void 0&&(r="UTC");const o=m(n,O),i=cr(Xe(r,o),"iso8601",t,"never");let a="Z";return e!==void 0&&(a=Ga(wt(r,o))),`${i}${a}`}function Rr(n,e){const t=m(n,ve),r=m(n,Te),o=m(n,Ye),i=m(n,De),a=m(n,_e),s=m(n,Ee),c=Xr(n);let l="";t!==0&&(l+=`${Math.abs(t)}Y`),r!==0&&(l+=`${Math.abs(r)}M`),o!==0&&(l+=`${Math.abs(o)}W`),i!==0&&(l+=`${Math.abs(i)}D`);let d="";a!==0&&(d+=`${Math.abs(a)}H`),s!==0&&(d+=`${Math.abs(s)}M`);const h=R.fromComponents(0,0,m(n,Me),m(n,xe),m(n,Ce),m(n,Re));h.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(gt(n))&&e==="auto"||(d+=`${Math.abs(h.sec)}${Ha(Math.abs(h.subsec),e)}S`);let f=`${c<0?"-":""}P${l}`;return d&&(f=`${f}T${d}`),f}function Ri(n,e="auto"){const{year:t,month:r,day:o}=m(n,j);return`${xr(t)}-${Ze(r)}-${Ze(o)}${pr(m(n,_),e)}`}function Ii({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a){return lo(n,e,t,1e6*r+1e3*o+i,a)}function cr(n,e,t,r="auto"){const{isoDate:{year:o,month:i,day:a},time:{hour:s,minute:c,second:l,millisecond:d,microsecond:h,nanosecond:f}}=n;return`${xr(o)}-${Ze(i)}-${Ze(a)}T${lo(s,c,l,1e6*d+1e3*h+f,t)}${pr(e,r)}`}function Li(n,e="auto"){const{year:t,month:r,day:o}=m(n,j);let i=`${Ze(r)}-${Ze(o)}`;const a=m(n,_);e!=="always"&&e!=="critical"&&a==="iso8601"||(i=`${xr(t)}-${i}`);const s=pr(a,e);return s&&(i+=s),i}function Ai(n,e="auto"){const{year:t,month:r,day:o}=m(n,j);let i=`${xr(t)}-${Ze(r)}`;const a=m(n,_);e!=="always"&&e!=="critical"&&a==="iso8601"||(i+=`-${Ze(o)}`);const s=pr(a,e);return s&&(i+=s),i}function Ui(n,e,t="auto",r="auto",o="auto",i=void 0){let a=m(n,O);if(i){const{unit:d,increment:h,roundingMode:f}=i;a=zo(a,h,d,f)}const s=m(n,F),c=wt(s,a);let l=cr(Xe(s,a),"iso8601",e,"never");return o!=="never"&&(l+=Ga(c)),r!=="never"&&(l+=`[${r==="critical"?"!":""}${s}]`),l+=pr(m(n,_),t),l}function Fi(n){return Pa.test(n)}function Nn(n){const e=uc.exec(n);if(!e)throw new RangeError(`invalid time zone offset: ${n}; must match ±HH:MM[:SS.SSSSSSSSS]`);return(e[1]==="-"?-1:1)*(1e9*(60*(60*+e[2]+ +(e[3]||0))+ +(e[4]||0))+ +((e[5]||0)+"000000000").slice(0,9))}let An;const cc=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function Vr(n){if(An===void 0){const i=Intl.supportedValuesOf?.("timeZone");if(i){An=new Map;for(let a=0;a<i.length;a++){const s=i[a];An.set(ur(s),s)}}else An=null}const e=ur(n);let t=An?.get(e);if(t)return{identifier:t,primaryIdentifier:t};try{t=ja(n).resolvedOptions().timeZone}catch{return}if(e==="antarctica/south_pole"&&(t="Antarctica/McMurdo"),rc.has(n))throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${t} instead`);const r=[...e].map(((i,a)=>a===0||cc[e[a-1]]?i.toUpperCase():i)).join("").split("/");if(r.length===1)return e==="gb-eire"?{identifier:"GB-Eire",primaryIdentifier:t}:{identifier:e.length<=3||/[-0-9]/.test(e)?e.toUpperCase():r[0],primaryIdentifier:t};if(r[0]==="Etc")return{identifier:`Etc/${["Zulu","Greenwich","Universal"].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:t};if(r[0]==="Us")return{identifier:`US/${r[1]}`,primaryIdentifier:t};const o=new Map([["Act","ACT"],["Lhi","LHI"],["Nsw","NSW"],["Dar_Es_Salaam","Dar_es_Salaam"],["Port_Of_Spain","Port_of_Spain"],["Port-Au-Prince","Port-au-Prince"],["Isle_Of_Man","Isle_of_Man"],["Comodrivadavia","ComodRivadavia"],["Knox_In","Knox_IN"],["Dumontdurville","DumontDUrville"],["Mcmurdo","McMurdo"],["Denoronha","DeNoronha"],["Easterisland","EasterIsland"],["Bajanorte","BajaNorte"],["Bajasur","BajaSur"]]);return r[1]=o.get(r[1])??r[1],r.length>2&&(r[2]=o.get(r[2])??r[2]),{identifier:r.join("/"),primaryIdentifier:t}}function Ht(n,e){const{year:t,month:r,day:o,hour:i,minute:a,second:s}=Qa(n,e);let c=e%1e3;return c<0&&(c+=1e3),1e6*(ei({isoDate:{year:t,month:r,day:o},time:{hour:i,minute:a,second:s,millisecond:c}})-e)}function Ao(n,e){return Ht(n,Ke(e,"floor"))}function Jo(n){const e=n<0?"-":"+",t=Math.abs(n);return`${e}${lo(Math.floor(t/60),t%60,0,0,"minute")}`}function Ga(n){return Jo(Pt(n,Bs,"halfExpand")/6e10)}function ei({isoDate:{year:n,month:e,day:t},time:{hour:r,minute:o,second:i,millisecond:a}}){const s=n%400,c=(n-s)/400,l=new Date;return l.setUTCHours(r,o,i,a),l.setUTCFullYear(s,e-1,t),l.getTime()+tc*c}function le(n){const e=ei(n),t=1e3*n.time.microsecond+n.time.nanosecond;return u.add(it(e),u.BigInt(t))}function Va(n){let e=Ke(n,"trunc"),t=u.toNumber(u.remainder(n,gr));t<0&&(t+=1e6,e-=1);const r=Math.floor(t/1e3)%1e3,o=t%1e3,i=new Date(e);return{epochMilliseconds:e,isoDate:{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate()},time:{hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds(),microsecond:r,nanosecond:o}}}function ti(n,e){if(n==="UTC")return null;const t=Ke(e,"floor");if(t<Bn)return ti(n,it(Bn));const r=Date.now(),o=Math.max(t,r)+366*At*3;let i=t,a=Ht(n,i),s=i,c=a;for(;a===c&&i<o;){if(s=i+2*At*7,s>Oa)return null;c=Ht(n,s),a===c&&(i=s)}return a===c?null:it(is((l=>Ht(n,l)),i,s,a,c))}function Uo(n,e){if(n==="UTC")return null;const t=Ke(e,"ceil"),r=Date.now(),o=r+366*At*3;if(t>o){const l=Uo(n,it(o));if(l===null||u.lessThan(l,it(r)))return l}if(n==="Africa/Casablanca"||n==="Africa/El_Aaiun"){const l=Date.UTC(2088,0,1);if(l<t)return Uo(n,it(l))}let i=t-1;if(i<Bn)return null;let a=Ht(n,i),s=i,c=a;for(;a===c&&i>Bn;){if(s=i-2*At*7,s<Bn)return null;c=Ht(n,s),a===c&&(i=s)}return a===c?null:it(is((l=>Ht(n,l)),s,i,c,a))}function Qa(n,e){return(function(t){const r=t.split(/[^\w]+/);if(r.length!==7)throw new RangeError(`expected 7 parts in "${t}`);const o=+r[0],i=+r[1];let a=+r[2];const s=r[3];if(s[0]==="b"||s[0]==="B")a=1-a;else if(s[0]!=="a"&&s[0]!=="A")throw new RangeError(`Unknown era ${s} in "${t}`);const c=r[4]==="24"?0:+r[4],l=+r[5],d=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(i)&&Number.isFinite(c)&&Number.isFinite(l)&&Number.isFinite(d)))throw new RangeError(`Invalid number in "${t}`);return{year:a,month:o,day:i,hour:c,minute:l,second:d}})(ja(n).format(e))}function Qr(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function Gt(n,e){return{standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]}[Qr(n)?"leapyear":"standard"][e-1]}function Xr(n){const e=[m(n,ve),m(n,Te),m(n,Ye),m(n,De),m(n,_e),m(n,Ee),m(n,Me),m(n,xe),m(n,Ce),m(n,Re)];for(let t=0;t<e.length;t++){const r=e[t];if(r!==0)return r<0?-1:1}return 0}function uo(n){const e=["years","months","weeks","days"];for(let t=0;t<e.length;t++){const r=n[e[t]];if(r!==0)return r<0?-1:1}return 0}function Xa(n){const e=uo(n.date);return e!==0?e:n.time.sign()}function qt(n,e){let t=n,r=e;if(!Number.isFinite(t)||!Number.isFinite(r))throw new RangeError("infinity is out of range");return r-=1,t+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:t,month:r}}function Ae(n,e,t){let r=n,o=e,i=t;if(!Number.isFinite(i))throw new RangeError("infinity is out of range");({year:r,month:o}=qt(r,o));const a=146097;if(Math.abs(i)>a){const l=Math.trunc(i/a);r+=400*l,i-=l*a}let s=0,c=o>2?r:r-1;for(;s=Qr(c)?366:365,i<-s;)r-=1,c-=1,i+=s;for(c+=1;s=Qr(c)?366:365,i>s;)r+=1,c+=1,i-=s;for(;i<1;)({year:r,month:o}=qt(r,o-1)),i+=Gt(r,o);for(;i>Gt(r,o);)i-=Gt(r,o),{year:r,month:o}=qt(r,o+1);return{year:r,month:o,day:i}}function lr(n,e,t,r,o,i,a,s,c){const l=jt(r,o,i,a,s,c);return U(Ae(n,e,t+l.deltaDays),l)}function jt(n,e,t,r,o,i){let a,s=n,c=e,l=t,d=r,h=o,f=i;({div:a,mod:f}=fn(f,3)),h+=a,f<0&&(h-=1,f+=1e3),{div:a,mod:h}=fn(h,3),d+=a,h<0&&(d-=1,h+=1e3),l+=Math.trunc(d/1e3),d%=1e3,d<0&&(l-=1,d+=1e3),c+=Math.trunc(l/60),l%=60,l<0&&(c-=1,l+=60),s+=Math.trunc(c/60),c%=60,c<0&&(s-=1,c+=60);let g=Math.trunc(s/24);return s%=24,s<0&&(g-=1,s+=24),g+=0,s+=0,c+=0,l+=0,d+=0,h+=0,f+=0,{deltaDays:g,hour:s,minute:c,second:l,millisecond:d,microsecond:h,nanosecond:f}}function Si(n,e){const t=fe(n,0);if(uo(t)===0)return n.days;const r=m(e,j),o=ze(m(e,_),r,t,"constrain"),i=Kt(r.year,r.month-1,r.day),a=Kt(o.year,o.month-1,o.day)-i;return n.days+a}function Ue(n){return new(ue("%Temporal.Duration%"))(-m(n,ve),-m(n,Te),-m(n,Ye),-m(n,De),-m(n,_e),-m(n,Ee),-m(n,Me),-m(n,xe),-m(n,Ce),-m(n,Re))}function ke(n,e,t){return Math.min(t,Math.max(e,n))}function Ka(n,e,t){const r=ke(e,1,12);return{year:n,month:r,day:ke(t,1,Gt(n,r))}}function ae(n,e,t){if(n<e||n>t)throw new RangeError(`value out of range: ${e} <= ${n} <= ${t}`)}function Qt(n,e,t){ae(e,1,12),ae(t,1,Gt(n,e))}function tn(n){Xt(U(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function ho(n,e,t,r,o,i){ae(n,0,23),ae(e,0,59),ae(t,0,59),ae(r,0,999),ae(o,0,999),ae(i,0,999)}function ni(n,e,t,r,o,i,a,s,c){Qt(n,e,t),ho(r,o,i,a,s,c)}function Xt(n){const e=le(n);(u.lessThan(e,Js)||u.greaterThan(e,ec))&&ct(e)}function Fo(n){le(n)}function ct(n){if(u.lessThan(n,or)||u.greaterThan(n,bn))throw new RangeError("date/time value is outside of supported range")}function ri({year:n,month:e}){ae(n,Ci,ki),n===Ci?ae(e,4,12):n===ki&&ae(e,1,9)}function mo(n,e,t,r,o,i,a,s,c,l){let d=0;const h=[n,e,t,r,o,i,a,s,c,l];for(let T=0;T<h.length;T++){const M=h[T];if(M===1/0||M===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(M!==0){const x=M<0?-1:1;if(d!==0&&x!==d)throw new RangeError("mixed-sign values not allowed as duration fields");d=x}}if(Math.abs(n)>=2**32||Math.abs(e)>=2**32||Math.abs(t)>=2**32)throw new RangeError("years, months, and weeks must be < 2³²");const f=fn(s,3),g=fn(c,6),y=fn(l,9),p=fn(1e6*f.mod+1e3*g.mod+y.mod,9).div,w=86400*r+3600*o+60*i+a+f.div+g.div+y.div+p;if(!Number.isSafeInteger(w))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function mn(n){return{date:{years:m(n,ve),months:m(n,Te),weeks:m(n,Ye),days:m(n,De)},time:R.fromComponents(m(n,_e),m(n,Ee),m(n,Me),m(n,xe),m(n,Ce),m(n,Re))}}function ot(n){const e=R.fromComponents(m(n,_e),m(n,Ee),m(n,Me),m(n,xe),m(n,Ce),m(n,Re)).add24HourDays(m(n,De));return{date:{years:m(n,ve),months:m(n,Te),weeks:m(n,Ye),days:0},time:e}}function Ba(n){const e=ot(n),t=Math.trunc(e.time.sec/86400);return mo(e.date.years,e.date.months,e.date.weeks,t,0,0,0,0,0,0),{...e.date,days:t}}function Ge(n,e){const t=n.time.sign();let r=n.time.abs().subsec,o=0,i=0,a=n.time.abs().sec,s=0,c=0,l=0;switch(e){case"year":case"month":case"week":case"day":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60,c=Math.trunc(s/60),s%=60,l=Math.trunc(c/24),c%=24;break;case"hour":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60,c=Math.trunc(s/60),s%=60;break;case"minute":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3,s=Math.trunc(a/60),a%=60;break;case"second":o=Math.trunc(r/1e3),r%=1e3,i=Math.trunc(o/1e3),o%=1e3,a+=Math.trunc(i/1e3),i%=1e3;break;case"millisecond":o=Math.trunc(r/1e3),r%=1e3,i=vo(a,3,Math.trunc(o/1e3)),o%=1e3,a=0;break;case"microsecond":o=vo(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=vo(a,9,r),a=0}return new(ue("%Temporal.Duration%"))(n.date.years,n.date.months,n.date.weeks,n.date.days+t*l,t*c,t*s,t*a,t*i,t*o,t*r)}function vt(n,e){return uo(n),e.sign(),{date:n,time:e}}function Kt(n,e,t){return ei({isoDate:{year:n,month:e+1,day:t},time:{hour:0,minute:0,second:0,millisecond:0}})/At}function pn({year:n,month:e,day:t}){if(Math.abs(Kt(n,e-1,t))>1e8)throw new RangeError("date/time value is outside the supported range")}function oi(n,e){const t=e.hour-n.hour,r=e.minute-n.minute,o=e.second-n.second,i=e.millisecond-n.millisecond,a=e.microsecond-n.microsecond,s=e.nanosecond-n.nanosecond;return R.fromComponents(t,r,o,i,a,s)}function ii(n,e,t,r,o){let i=R.fromEpochNsDiff(e,n);return i=Kr(i,t,r,o),vt({years:0,months:0,weeks:0,days:0},i)}function Ja(n,e,t,r){Fo(n),Fo(e);let o=oi(n.time,e.time);const i=o.sign(),a=lt(n.isoDate,e.isoDate);let s=e.isoDate;a===i&&(s=Ae(s.year,s.month,s.day+i),o=o.add24HourDays(-i));const c=bt("day",r),l=_r(t,n.isoDate,s,c);return r!==c&&(o=o.add24HourDays(l.days),l.days=0),vt(l,o)}function es(n,e,t,r,o){const i=u.subtract(e,n);if(u.equal(i,Se))return{date:{years:0,months:0,weeks:0,days:0},time:R.ZERO};const a=u.lessThan(i,Se)?-1:1,s=Xe(t,n),c=Xe(t,e);let l,d=0,h=a===1?2:1,f=oi(s.time,c.time);for(f.sign()===-a&&d++;d<=h;d++){l=U(Ae(c.isoDate.year,c.isoDate.month,c.isoDate.day-d*a),s.time);const y=ge(t,l,"compatible");if(f=R.fromEpochNsDiff(e,y),f.sign()!==-a)break}const g=bt("day",o);return vt(_r(r,s.isoDate,l.isoDate,g),f)}function ts(n,e,t,r,o,i,a,s,c){let l,d,h,f,g=e;switch(s){case"year":{const S=Pt(g.date.years,a,"trunc");l=S,d=S+a*n,h={years:l,months:0,weeks:0,days:0},f={...h,years:d};break}case"month":{const S=Pt(g.date.months,a,"trunc");l=S,d=S+a*n,h=fe(g.date,0,0,l),f=fe(g.date,0,0,d);break}case"week":{const S=fe(g.date,0,0),oe=ze(i,r.isoDate,S,"constrain"),ye=_r(i,oe,Ae(oe.year,oe.month,oe.day+g.date.days),"week"),We=Pt(g.date.weeks+ye.weeks,a,"trunc");l=We,d=We+a*n,h=fe(g.date,0,l),f=fe(g.date,0,d);break}case"day":{const S=Pt(g.date.days,a,"trunc");l=S,d=S+a*n,h=fe(g.date,l),f=fe(g.date,d);break}}const y=ze(i,r.isoDate,h,"constrain"),p=ze(i,r.isoDate,f,"constrain");let w,T;const M=U(y,r.time),x=U(p,r.time);o?(w=ge(o,M,"compatible"),T=ge(o,x,"compatible")):(w=le(M),T=le(x));const k=R.fromEpochNsDiff(t,w),$=R.fromEpochNsDiff(T,w),Q=ro(c,n<0?"negative":"positive"),J=k.add(k).abs().subtract($.abs()).sign(),B=Math.abs(l)/a%2==0,z=k.isZero()?Math.abs(l):k.cmp($)?oo(Math.abs(l),Math.abs(d),J,B,Q):Math.abs(d),de=new R(u.add(u.multiply($.totalNs,u.BigInt(l)),u.multiply(k.totalNs,u.BigInt(a*n)))).fdiv($.totalNs),ee=z===Math.abs(d);return g={date:ee?f:h,time:R.ZERO},{nudgeResult:{duration:g,nudgedEpochNs:ee?T:w,didExpandCalendarUnit:ee},total:de}}function fo(n,e,t,r,o,i,a,s,c){let l=n;const d=tt(s)||r&&s==="day",h=Xa(l)<0?-1:1;let f;return d?{nudgeResult:f}=ts(h,l,e,t,r,o,a,s,c):f=r?(function(g,y,p,w,T,M,x,k){let $=y;const Q=ze(T,p.isoDate,$.date,"constrain"),J=U(Q,p.time),B=U(Ae(Q.year,Q.month,Q.day+g),p.time),z=ge(w,J,"compatible"),de=ge(w,B,"compatible"),ee=R.fromEpochNsDiff(de,z);if(ee.sign()!==g)throw new RangeError("time zone returned inconsistent Instants");const S=u.BigInt(Tn[x]*M);let oe=$.time.round(S,k);const ye=oe.subtract(ee),We=ye.sign()!==-g;let dt,ht;return We?(dt=g,oe=ye.round(S,k),ht=oe.addToEpochNs(de)):(dt=0,ht=oe.addToEpochNs(z)),{duration:vt(fe($.date,$.date.days+dt),oe),nudgedEpochNs:ht,didExpandCalendarUnit:We}})(h,l,t,r,o,a,s,c):(function(g,y,p,w,T,M){let x=g;const k=x.time.add24HourDays(x.date.days),$=k.round(u.BigInt(w*Tn[T]),M),Q=$.subtract(k),{quotient:J}=k.divmod(qr),{quotient:B}=$.divmod(qr),z=Math.sign(B-J)===k.sign(),de=Q.addToEpochNs(y);let ee=0,S=$;return yt(p)==="date"&&(ee=B,S=$.add(R.fromComponents(24*-B,0,0,0,0,0))),{duration:{date:fe(x.date,ee),time:S},nudgedEpochNs:de,didExpandCalendarUnit:z}})(l,e,i,a,s,c),l=f.duration,f.didExpandCalendarUnit&&s!=="week"&&(l=(function(g,y,p,w,T,M,x,k){let $=y;if(k===x)return $;const Q=Jn.indexOf(x);for(let J=Jn.indexOf(k)-1;J>=Q;J--){const B=Jn[J];if(B==="week"&&x!=="week")continue;let z;switch(B){case"year":z={years:$.date.years+g,months:0,weeks:0,days:0};break;case"month":{const S=$.date.months+g;z=fe($.date,0,0,S);break}case"week":{const S=$.date.weeks+g;z=fe($.date,0,S);break}}const de=U(ze(M,w.isoDate,z,"constrain"),w.time);let ee;if(ee=T?ge(T,de,"compatible"):le(de),zr(p,ee)===-g)break;$={date:z,time:R.ZERO}}return $})(h,l,f.nudgedEpochNs,t,r,o,i,bt(s,"day"))),l}function zi(n,e,t,r,o,i){return tt(i)||r&&i==="day"?ts(Xa(n)<0?-1:1,n,e,t,r,o,1,i,"trunc").total:nr(n.time.add24HourDays(n.date.days),i)}function ns(n,e,t,r,o,i,a){if(_n(n,e)==0)return{date:{years:0,months:0,weeks:0,days:0},time:R.ZERO};Xt(n),Xt(e);const s=Ja(n,e,t,r);return i==="nanosecond"&&o===1?s:fo(s,le(e),n,null,t,r,o,i,a)}function rs(n,e,t,r,o,i,a,s){if(yt(o)==="time")return ii(n,e,i,a,s);const c=es(n,e,t,r,o);return a==="nanosecond"&&i===1?c:fo(c,e,Xe(t,n),t,r,o,i,a,s)}function Pn(n,e,t,r,o,i){const a=vn.reduce(((g,y)=>{const p=y[0],w=y[1],T=y[2];return t!=="datetime"&&T!==t||r.includes(w)||g.push(w,p),g}),[]);let s=Le(e,"largestUnit",t,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);const c=jn(e);let l=Je(e,"trunc");n==="since"&&(l=(function(g){switch(g){case"ceil":return"floor";case"floor":return"ceil";case"halfCeil":return"halfFloor";case"halfFloor":return"halfCeil";default:return g}})(l));const d=Le(e,"smallestUnit",t,o);if(r.includes(d))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${d}`);const h=bt(i,d);if(s==="auto"&&(s=h),bt(s,d)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${d}`);const f={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[d];return f!==void 0&&$n(c,f,!1),{largestUnit:s,roundingIncrement:c,roundingMode:l,smallestUnit:d}}function Zi(n,e,t,r){const o=Gn(t),i=Pn(n,C(r),"time",[],"nanosecond","second");let a=Ge(ii(m(e,O),m(o,O),i.roundingIncrement,i.smallestUnit,i.roundingMode),i.largestUnit);return n==="since"&&(a=Ue(a)),a}function qi(n,e,t,r){const o=Wn(t),i=m(e,_),a=m(o,_);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=Pn(n,C(r),"date",[],"day","day"),c=ue("%Temporal.Duration%"),l=m(e,j),d=m(o,j);if(lt(l,d)===0)return new c;let h={date:_r(i,l,d,s.largestUnit),time:R.ZERO};if(s.smallestUnit!=="day"||s.roundingIncrement!==1){const g=U(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});h=fo(h,le(U(d,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),g,null,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let f=Ge(h,"day");return n==="since"&&(f=Ue(f)),f}function Wi(n,e,t,r){const o=Hn(t),i=m(e,_),a=m(o,_);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=Pn(n,C(r),"datetime",[],"nanosecond","day"),c=ue("%Temporal.Duration%"),l=m(e,q),d=m(o,q);if(_n(l,d)===0)return new c;let h=Ge(ns(l,d,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(h=Ue(h)),h}function Hi(n,e,t,r){const o=Nt(t),i=Pn(n,C(r),"time",[],"nanosecond","hour");let a=oi(m(e,G),m(o,G));a=Kr(a,i.roundingIncrement,i.smallestUnit,i.roundingMode);let s=Ge(vt({years:0,months:0,weeks:0,days:0},a),i.largestUnit);return n==="since"&&(s=Ue(s)),s}function Gi(n,e,t,r){const o=Vn(t),i=m(e,_),a=m(o,_);if(!st(i,a))throw new RangeError(`cannot compute difference between months of ${i} and ${a} calendars`);const s=Pn(n,C(r),"date",["week","day"],"month","year"),c=ue("%Temporal.Duration%");if(lt(m(e,j),m(o,j))==0)return new c;const l=$e(i,m(e,j),"year-month");l.day=1;const d=Ut(i,l,"constrain"),h=$e(i,m(o,j),"year-month");h.day=1;const f=Ut(i,h,"constrain");let g={date:fe(_r(i,d,f,s.largestUnit),0,0),time:R.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){const p=U(d,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});g=fo(g,le(U(f,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),p,null,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let y=Ge(g,"day");return n==="since"&&(y=Ue(y)),y}function Vi(n,e,t,r){const o=Qn(t),i=m(e,_),a=m(o,_);if(!st(i,a))throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);const s=Pn(n,C(r),"datetime",[],"nanosecond","hour"),c=m(e,O),l=m(o,O),d=ue("%Temporal.Duration%");let h;if(yt(s.largestUnit)!=="date")h=Ge(ii(c,l,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{const f=m(e,F);if(!qa(f,m(o,F)))throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");if(u.equal(c,l))return new d;h=Ge(rs(c,l,f,i,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(h=Ue(h)),h}function Dn({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a){let s=t,c=i;return s+=a.sec,c+=a.subsec,jt(n,e,s,r,o,c)}function So(n,e){const t=e.addToEpochNs(n);return ct(t),t}function Xn(n,e,t,r,o="constrain"){if(uo(r.date)===0)return So(n,r.time);const i=Xe(e,n);return So(ge(e,U(ze(t,i.isoDate,r.date,o),i.time),"compatible"),r.time)}function Qi(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=bt(gt(e),gt(r));if(tt(o))throw new RangeError("For years, months, or weeks arithmetic, use date arithmetic relative to a starting point");const i=ot(e),a=ot(r);return Ge(vt({years:0,months:0,weeks:0,days:0},i.time.add(a.time)),o)}function Xi(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=gt(r);if(yt(o)==="date")throw new RangeError(`Duration field ${o} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);const i=ot(r);return rt(So(m(e,O),i.time))}function Ki(n,e,t,r){const o=m(e,_);let i=Qe(t);n==="subtract"&&(i=Ue(i));const a=Ba(i),s=L(C(r));return Oe(ze(o,m(e,j),a,s),o)}function Bi(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=m(e,_),s=ot(o),c=m(e,q),l=Dn(c.time,s.time),d=fe(s.date,l.deltaDays);return mo(d.years,d.months,d.weeks,d.days,0,0,0,0,0,0),He(U(ze(a,c.isoDate,d,i),l),a)}function Ji(n,e,t){let r=Qe(t);n==="subtract"&&(r=Ue(r));const o=ot(r),{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=Dn(m(e,G),o.time);return pt(co(i,a,s,c,l,d,"reject"))}function ea(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=Xr(o),s=m(e,_),c=$e(s,m(e,j),"year-month");c.day=1;let l=Ut(s,c,"constrain");if(a<0){const h=ze(s,l,{months:1},"constrain");l=Ae(h.year,h.month,h.day-1)}const d=Ba(o);return tn(l),yn(ar(s,$e(s,ze(s,l,d,i),"year-month"),i),s)}function ta(n,e,t,r){let o=Qe(t);n==="subtract"&&(o=Ue(o));const i=L(C(r)),a=m(e,F),s=m(e,_),c=mn(o);return me(Xn(m(e,O),a,s,c,i),a,s)}function Pt(n,e,t){const r=Math.trunc(n/e),o=n%e,i=n<0?"negative":"positive",a=Math.abs(r),s=a+1,c=Ie(Math.abs(2*o)-e),l=a%2==0,d=ro(t,i),h=o===0?a:oo(a,s,c,l,d);return e*(i==="positive"?h:-h)}function zo(n,e,t,r){const o=Tn[t]*e;return(function(i,a,s){const c=ft(i),l=ft(a),d=u.divide(c,l),h=u.remainder(c,l),f=ro(s,"positive");let g,y;u.lessThan(c,Se)?(g=u.subtract(d,rr),y=d):(g=d,y=u.add(d,rr));const p=zr(zt(u.multiply(h,Xo)),l)*(u.lessThan(c,Se)?-1:1)+0,w=u.equal(h,Se)?d:oo(g,y,p,ma(g),f);return u.multiply(w,l)})(n,u.BigInt(o),r)}function Zo(n,e,t,r){Fo(n);const{year:o,month:i,day:a}=n.isoDate,s=qo(n.time,e,t,r);return U(Ae(o,i,a+s.deltaDays),s)}function qo({hour:n,minute:e,second:t,millisecond:r,microsecond:o,nanosecond:i},a,s,c){let l;switch(s){case"day":case"hour":l=1e3*(1e3*(1e3*(60*(60*n+e)+t)+r)+o)+i;break;case"minute":l=1e3*(1e3*(1e3*(60*e+t)+r)+o)+i;break;case"second":l=1e3*(1e3*(1e3*t+r)+o)+i;break;case"millisecond":l=1e3*(1e3*r+o)+i;break;case"microsecond":l=1e3*o+i;break;case"nanosecond":l=i}const d=Tn[s],h=Pt(l,d*a,c)/d;switch(s){case"day":return{deltaDays:h,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return jt(h,0,0,0,0,0);case"minute":return jt(n,h,0,0,0,0);case"second":return jt(n,e,h,0,0,0);case"millisecond":return jt(n,e,t,h,0,0);case"microsecond":return jt(n,e,t,r,h,0);case"nanosecond":return jt(n,e,t,r,o,h);default:throw new Error(`Invalid unit ${s}`)}}function Kr(n,e,t,r){const o=Tn[t];return n.round(u.BigInt(o*e),r)}function nr(n,e){const t=Tn[e];return n.fdiv(u.BigInt(t))}function lt(n,e){return n.year!==e.year?Ie(n.year-e.year):n.month!==e.month?Ie(n.month-e.month):n.day!==e.day?Ie(n.day-e.day):0}function Wo(n,e){return n.hour!==e.hour?Ie(n.hour-e.hour):n.minute!==e.minute?Ie(n.minute-e.minute):n.second!==e.second?Ie(n.second-e.second):n.millisecond!==e.millisecond?Ie(n.millisecond-e.millisecond):n.microsecond!==e.microsecond?Ie(n.microsecond-e.microsecond):n.nanosecond!==e.nanosecond?Ie(n.nanosecond-e.nanosecond):0}function _n(n,e){const t=lt(n.isoDate,e.isoDate);return t!==0?t:Wo(n.time,e.time)}function os(n){const e=Br(n);return globalThis.BigInt!==void 0?globalThis.BigInt(e.toString(10)):e}function Ke(n,e){const t=ft(n),{quotient:r,remainder:o}=Zn(t,gr);let i=u.toNumber(r);return e==="floor"&&u.toNumber(o)<0&&(i-=1),e==="ceil"&&u.toNumber(o)>0&&(i+=1),i}function it(n){if(!Number.isInteger(n))throw new RangeError("epoch milliseconds must be an integer");return u.multiply(u.BigInt(n),gr)}function Br(n){let e=n;if(typeof n=="object"){const t=n[Symbol.toPrimitive];t&&typeof t=="function"&&(e=t.call(n,"number"))}if(typeof e=="number")throw new TypeError("cannot convert number to bigint");return typeof e=="bigint"?u.BigInt(e.toString(10)):u.BigInt(e)}const Ho=(()=>{let n=u.BigInt(Date.now()%1e6);return()=>{const e=Date.now(),t=u.BigInt(e),r=u.add(it(e),n);return n=u.remainder(t,gr),u.greaterThan(r,bn)?bn:u.lessThan(r,or)?or:r}})();function Un(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Ie(n){return n<0?-1:n>0?1:n}function C(n){if(n===void 0)return Object.create(null);if(V(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function Bt(n,e){const t=Object.create(null);return t[n]=e,t}function Tt(n,e,t,r){let o=n[e];if(o!==void 0){if(o=ao(o),!t.includes(o))throw new RangeError(`${e} must be one of ${t.join(", ")}, not ${o}`);return o}if(r===Et)throw new RangeError(`${e} option is required`);return r}function Pe(n){const e=ur(n);if(!nc.includes(ur(e)))throw new RangeError(`invalid calendar identifier ${e}`);switch(e){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return e}function ur(n){let e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);e+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return e}function St(n){throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n==="PlainMonthDay"?"Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))":`Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`)}const lc=new RegExp(`^${Ca.source}$`),uc=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function is(n,e,t,r=n(e),o=n(t)){let i=e,a=t,s=r,c=o;for(;a-i>1;){let l=Math.trunc((i+a)/2);const d=n(l);d===s?(i=l,s=d):d===c&&(a=l,c=d)}return a}function as(n){return[...n]}function ss(n,e){if(n!=="gregory"&&n!=="iso8601")return;const t=Cr[n];let r=e.year;const{dayOfWeek:o,dayOfYear:i,daysInYear:a}=t.isoToDate(e,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=t.getFirstDayOfWeek(),c=t.getMinimalDaysInFirstWeek();let l=(o+7-s)%7,d=(o-i+7001-s)%7,h=Math.floor((i-1+d)/7);if(7-d>=c&&++h,h==0)h=(function(f,g,y,p){let w=(p-f-y+1)%7;w<0&&(w+=7);let T=Math.floor((y+w-1)/7);return 7-w>=g&&++T,T})(s,c,i+t.isoToDate(t.dateAdd(e,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,o),r--;else if(i>=a-5){let f=(l+a-i)%7;f<0&&(f+=7),6-f>=c&&i+7-l>a&&(h=1,r++)}return{week:h,year:r}}function na(n,e,t,r,o){if(e!==o.year){if(n*(e-o.year)>0)return!0}else if(t!==o.month){if(n*(t-o.month)>0)return!0}else if(r!==o.day&&n*(r-o.day)>0)return!0;return!1}const Cr={};function Jt(n){if(!n.startsWith("M"))throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);const e=+n.slice(1);if(Number.isNaN(e))throw new RangeError(`Invalid month code: ${n}`);return e}function at(n,e=!1){return`M${`${n}`.padStart(2,"0")}${e?"L":""}`}function ai(n,e=void 0,t=12){let{month:r,monthCode:o}=n;if(o===void 0){if(r===void 0)throw new TypeError("Either month or monthCode are required");e==="reject"&&ae(r,1,t),e==="constrain"&&(r=ke(r,1,t)),o=at(r)}else{const i=Jt(o);if(o!==at(i))throw new RangeError(`Invalid month code: ${o}`);if(r!==void 0&&r!==i)throw new RangeError(`monthCode ${o} and month ${r} must match if both are present`);if(r=i,r<1||r>t)throw new RangeError(`Invalid monthCode: ${o}`)}return{...n,month:r,monthCode:o}}Cr.iso8601={resolveFields(n,e){if((e==="date"||e==="year-month")&&n.year===void 0)throw new TypeError("year is required");if((e==="date"||e==="month-day")&&n.day===void 0)throw new TypeError("day is required");Object.assign(n,ai(n))},dateToISO:(n,e)=>er(n.year,n.month,n.day,e),monthDayToISOReferenceDate(n,e){const{month:t,day:r}=er(n.year??1972,n.month,n.day,e);return{month:t,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(n){const e=new Set;for(let t=0;t<n.length;t++){const r=n[t];e.add(r),r==="month"?e.add("monthCode"):r==="monthCode"&&e.add("month")}return as(e)},dateAdd(n,{years:e=0,months:t=0,weeks:r=0,days:o=0},i){let{year:a,month:s,day:c}=n;return a+=e,s+=t,{year:a,month:s}=qt(a,s),{year:a,month:s,day:c}=er(a,s,c,i),c+=o+7*r,Ae(a,s,c)},dateUntil(n,e,t){const r=-lt(n,e);if(r===0)return{years:0,months:0,weeks:0,days:0};let o,i=0,a=0;if(t==="year"||t==="month"){let d=e.year-n.year;for(d!==0&&(d-=r);!na(r,n.year+d,n.month,n.day,e);)i=d,d+=r;let h=r;for(o=qt(n.year+i,n.month+h);!na(r,o.year,o.month,n.day,e);)a=h,h+=r,o=qt(o.year,o.month+r);t==="month"&&(a+=12*i,i=0)}o=qt(n.year+i,n.month+a);const s=Ka(o.year,o.month,n.day);let c=0,l=Kt(e.year,e.month-1,e.day)-Kt(s.year,s.month-1,s.day);return t==="week"&&(c=Math.trunc(l/7),l%=7),{years:i,months:a,weeks:c,days:l}},isoToDate({year:n,month:e,day:t},r){const o={era:void 0,eraYear:void 0,year:n,month:e,day:t,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(o.monthCode=at(e)),r.dayOfWeek){const i=e+(e<3?10:-2),a=n-(e<3?1:0),s=Math.floor(a/100),c=a-100*s,l=(t+Math.floor(2.6*i-.2)+(c+Math.floor(c/4))+(Math.floor(s/4)-2*s))%7;o.dayOfWeek=l+(l<=0?7:0)}if(r.dayOfYear){let i=t;for(let a=e-1;a>0;a--)i+=Gt(n,a);o.dayOfYear=i}return r.weekOfYear&&(o.weekOfYear=ss("iso8601",{year:n,month:e,day:t})),r.daysInMonth&&(o.daysInMonth=Gt(n,e)),(r.daysInYear||r.inLeapYear)&&(o.inLeapYear=Qr(n),o.daysInYear=o.inLeapYear?366:365),o},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};class ie{constructor(e){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,e!==void 0){let t=0;for(const r of e.map.entries()){if(++t>ie.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(e){const t=this.map.get(e);return t&&(this.hits++,this.report()),this.calls++,t}set(e,t){this.map.set(e,t),this.misses++,this.report()}report(){}setObject(e){if(ie.objectMap.get(e))throw new RangeError("object already cached");ie.objectMap.set(e,this),this.report()}static getCacheForObject(e){let t=ie.objectMap.get(e);return t||(t=new ie,ie.objectMap.set(e,t)),t}}function cs({isoYear:n,isoMonth:e,isoDay:t}){return`${xr(n)}-${Ze(e)}-${Ze(t)}T00:00Z`}function _o(n,e){return{years:n.year-e.year,months:n.month-e.month,days:n.day-e.day}}ie.objectMap=new WeakMap,ie.MAX_CACHE_ENTRIES=1e3;class nn{constructor(){this.eras=[],this.hasEra=!1,this.erasBeginMidYear=!1}getFormatter(){return this.formatter===void 0&&(this.formatter=new Intl.DateTimeFormat(`en-US-u-ca-${this.id}`,{day:"numeric",month:"numeric",year:"numeric",era:"short",timeZone:"UTC"})),this.formatter}getCalendarParts(e){let t=this.getFormatter(),r=new Date(e);if(e==="-271821-04-19T00:00Z"){const o=t.resolvedOptions();t=new Intl.DateTimeFormat(o.locale,{...o,timeZone:"Etc/GMT+1"}),r=new Date("-271821-04-20T00:00Z")}try{return t.formatToParts(r)}catch{throw new RangeError(`Invalid ISO date: ${e}`)}}isoToCalendarDate(e,t){const{year:r,month:o,day:i}=e,a=JSON.stringify({func:"isoToCalendarDate",isoYear:r,isoMonth:o,isoDay:i,id:this.id}),s=t.get(a);if(s)return s;const c=cs({isoYear:r,isoMonth:o,isoDay:i}),l=this.getCalendarParts(c),d={};for(let f=0;f<l.length;f++){const{type:g,value:y}=l[f];if(g!=="year"&&g!=="relatedYear"||(this.hasEra?d.eraYear=+y:d.year=+y),g==="month"){const p=/^([0-9]*)(.*?)$/.exec(y);if(!p||p.length!=3||!p[1]&&!p[2])throw new RangeError(`Unexpected month: ${y}`);if(d.month=p[1]?+p[1]:1,d.month<1)throw new RangeError(`Invalid month ${y} from ${c}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(d.month>13)throw new RangeError(`Invalid month ${y} from ${c}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);p[2]&&(d.monthExtra=p[2])}g==="day"&&(d.day=+y),this.hasEra&&g==="era"&&y!=null&&y!==""&&(d.era=y.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&d.eraYear===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){const f=this.eras.find((g=>d.era===g.genericName));f&&(d.era=f.code)}if(this.reviseIntlEra){const{era:f,eraYear:g}=this.reviseIntlEra(d,e);d.era=f,d.eraYear=g}this.checkIcuBugs&&this.checkIcuBugs(e);const h=this.adjustCalendarDate(d,t,"constrain",!0);if(h.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(e)}`);if(h.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(e)}`);if(h.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(e)}`);return t.set(a,h),["constrain","reject"].forEach((f=>{const g=JSON.stringify({func:"calendarToIsoDate",year:h.year,month:h.month,day:h.day,overflow:f,id:this.id});t.set(g,e)})),h}validateCalendarDate(e){const{month:t,year:r,day:o,eraYear:i,monthCode:a,monthExtra:s}=e;if(s!==void 0)throw new RangeError("Unexpected `monthExtra` value");if(r===void 0&&i===void 0)throw new TypeError("year or eraYear is required");if(t===void 0&&a===void 0)throw new TypeError("month or monthCode is required");if(o===void 0)throw new RangeError("Missing day");if(a!==void 0){if(typeof a!="string")throw new RangeError("monthCode must be a string, not "+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw new RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&e.era===void 0!=(e.eraYear===void 0))throw new TypeError("properties era and eraYear must be provided together")}adjustCalendarDate(e,t=void 0,r="constrain",o=!1){if(this.calendarType==="lunisolar")throw new RangeError("Override required for lunisolar calendars");let i=e;this.validateCalendarDate(i);const a=this.monthsInYear(i,t);let{month:s,monthCode:c}=i;return{month:s,monthCode:c}=ai(i,r,a),{...i,month:s,monthCode:c}}regulateMonthDayNaive(e,t,r){const o=this.monthsInYear(e,r);let{month:i,day:a}=e;return t==="reject"?(ae(i,1,o),ae(a,1,this.maximumMonthLength(e))):(i=ke(i,1,o),a=ke(a,1,this.maximumMonthLength({...e,month:i}))),{...e,month:i,day:a}}calendarToIsoDate(e,t="constrain",r){const o=e;let i=this.adjustCalendarDate(e,r,t,!1);i=this.regulateMonthDayNaive(i,t,r);const{year:a,month:s,day:c}=i,l=JSON.stringify({func:"calendarToIsoDate",year:a,month:s,day:c,overflow:t,id:this.id});let d,h=r.get(l);if(h||o.year!==void 0&&o.month!==void 0&&o.day!==void 0&&(o.year!==i.year||o.month!==i.month||o.day!==i.day)&&(d=JSON.stringify({func:"calendarToIsoDate",year:o.year,month:o.month,day:o.day,overflow:t,id:this.id}),h=r.get(d),h))return h;let f=this.estimateIsoDate({year:a,month:s,day:c});const g=M=>{let x=this.addDaysIso(f,M);if(i.day>this.minimumMonthLength(i)){let k=this.isoToCalendarDate(x,r);for(;k.month!==s||k.year!==a;){if(t==="reject")throw new RangeError(`day ${c} does not exist in month ${s} of year ${a}`);x=this.addDaysIso(x,-1),k=this.isoToCalendarDate(x,r)}}return x};let y=0,p=this.isoToCalendarDate(f,r),w=_o(i,p);if(w.years!==0||w.months!==0||w.days!==0){const M=365*w.years+30*w.months+w.days;f=this.addDaysIso(f,M),p=this.isoToCalendarDate(f,r),w=_o(i,p),w.years===0&&w.months===0?f=g(w.days):y=this.compareCalendarDates(i,p)}let T=8;for(;y;){f=this.addDaysIso(f,y*T);const M=p;p=this.isoToCalendarDate(f,r);const x=y;if(y=this.compareCalendarDates(i,p),y){if(w=_o(i,p),w.years===0&&w.months===0)f=g(w.days),y=0;else if(x&&y!==x)if(T>1)T/=2;else{if(t==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...o})}`);this.compareCalendarDates(p,M)>0&&(f=this.addDaysIso(f,-1)),y=0}}}if(r.set(l,f),d&&r.set(d,f),i.year===void 0||i.month===void 0||i.day===void 0||i.monthCode===void 0||this.hasEra&&(i.era===void 0||i.eraYear===void 0))throw new RangeError("Unexpected missing property");return f}compareCalendarDates(e,t){return e.year!==t.year?Ie(e.year-t.year):e.month!==t.month?Ie(e.month-t.month):e.day!==t.day?Ie(e.day-t.day):0}regulateDate(e,t="constrain",r){const o=this.calendarToIsoDate(e,t,r);return this.isoToCalendarDate(o,r)}addDaysIso(e,t){return Ae(e.year,e.month,e.day+t)}addDaysCalendar(e,t,r){const o=this.calendarToIsoDate(e,"constrain",r),i=this.addDaysIso(o,t);return this.isoToCalendarDate(i,r)}addMonthsCalendar(e,t,r,o){let i=e;const{day:a}=i;for(let s=0,c=Math.abs(t);s<c;s++){const{month:l}=i,d=i,h=t<0?-Math.max(a,this.daysInPreviousMonth(i,o)):this.daysInMonth(i,o),f=this.calendarToIsoDate(i,"constrain",o);let g=this.addDaysIso(f,h);if(i=this.isoToCalendarDate(g,o),t>0){const y=this.monthsInYear(d,o);for(;i.month-1!=l%y;)g=this.addDaysIso(g,-1),i=this.isoToCalendarDate(g,o)}i.day!==a&&(i=this.regulateDate({...i,day:a},"constrain",o))}if(r==="reject"&&i.day!==a)throw new RangeError(`Day ${a} does not exist in resulting calendar month`);return i}addCalendar(e,{years:t=0,months:r=0,weeks:o=0,days:i=0},a,s){const{year:c,day:l,monthCode:d}=e,h=this.adjustCalendarDate({year:c+t,monthCode:d,day:l},s),f=this.addMonthsCalendar(h,r,a,s),g=i+7*o;return this.addDaysCalendar(f,g,s)}untilCalendar(e,t,r,o){let i=0,a=0,s=0,c=0;switch(r){case"day":i=this.calendarDaysUntil(e,t,o);break;case"week":{const l=this.calendarDaysUntil(e,t,o);i=l%7,a=(l-i)/7;break}case"month":case"year":{const l=this.compareCalendarDates(t,e);if(!l)return{years:0,months:0,weeks:0,days:0};const d=t.year-e.year,h=t.day-e.day;if(r==="year"&&d){let y=0;t.monthCode>e.monthCode&&(y=1),t.monthCode<e.monthCode&&(y=-1),y||(y=Math.sign(h)),c=y*l<0?d-l:d}let f,g=c?this.addCalendar(e,{years:c},"constrain",o):e;do s+=l,f=g,g=this.addMonthsCalendar(f,l,"constrain",o),g.day!==e.day&&(g=this.regulateDate({...g,day:e.day},"constrain",o));while(this.compareCalendarDates(t,g)*l>=0);s-=l,i=this.calendarDaysUntil(f,t,o);break}}return{years:c,months:s,weeks:a,days:i}}daysInMonth(e,t){const{day:r}=e,o=this.maximumMonthLength(e),i=this.minimumMonthLength(e);if(i===o)return i;const a=r<=o-i?o:i,s=this.calendarToIsoDate(e,"constrain",t),c=this.addDaysIso(s,a),l=this.isoToCalendarDate(c,t),d=this.addDaysIso(c,-l.day);return this.isoToCalendarDate(d,t).day}daysInPreviousMonth(e,t){const{day:r,month:o,year:i}=e;let a={year:o>1?i:i-1,month:o,day:1};const s=o>1?o-1:this.monthsInYear(a,t);a={...a,month:s};const c=this.minimumMonthLength(a),l=this.maximumMonthLength(a);if(c===l)return l;const d=this.calendarToIsoDate(e,"constrain",t),h=this.addDaysIso(d,-r);return this.isoToCalendarDate(h,t).day}startOfCalendarYear(e){return{year:e.year,month:1,monthCode:"M01",day:1}}startOfCalendarMonth(e){return{year:e.year,month:e.month,day:1}}calendarDaysUntil(e,t,r){const o=this.calendarToIsoDate(e,"constrain",r),i=this.calendarToIsoDate(t,"constrain",r);return Kt(i.year,i.month-1,i.day)-Kt(o.year,o.month-1,o.day)}monthDaySearchStartYear(e,t){return 1972}monthDayFromFields(e,t,r){let o,i,a,s,c,{era:l,eraYear:d,year:h,month:f,monthCode:g,day:y}=e;if(f!==void 0&&h===void 0&&(!this.hasEra||l===void 0||d===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(g===void 0||h!==void 0||this.hasEra&&d!==void 0)&&({monthCode:g,day:y}=this.isoToCalendarDate(this.calendarToIsoDate(e,t,r),r));const p={year:this.monthDaySearchStartYear(g,y),month:12,day:31},w=this.isoToCalendarDate(p,r),T=w.monthCode>g||w.monthCode===g&&w.day>=y?w.year:w.year-1;for(let M=0;M<20;M++){const x=this.adjustCalendarDate({day:y,monthCode:g,year:T-M},r),k=this.calendarToIsoDate(x,"constrain",r),$=this.isoToCalendarDate(k,r);if({year:o,month:i,day:a}=k,$.monthCode===g&&$.day===y)return{month:i,day:a,year:o};if(t==="constrain"){const Q=this.maxLengthOfMonthCodeInAnyYear($.monthCode);if($.monthCode===g&&$.day===Q&&y>Q)return{month:i,day:a,year:o};(s===void 0||$.monthCode===s.monthCode&&$.day>s.day)&&(s=$,c=k)}}if(t==="constrain"&&c!==void 0)return c;throw new RangeError(`No recent ${this.id} year with monthCode ${g} and day ${y}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}}class dc extends nn{constructor(){super(...arguments),this.id="hebrew",this.calendarType="lunisolar",this.months={Tishri:{leap:1,regular:1,monthCode:"M01",days:30},Heshvan:{leap:2,regular:2,monthCode:"M02",days:{min:29,max:30}},Kislev:{leap:3,regular:3,monthCode:"M03",days:{min:29,max:30}},Tevet:{leap:4,regular:4,monthCode:"M04",days:29},Shevat:{leap:5,regular:5,monthCode:"M05",days:30},Adar:{leap:void 0,regular:6,monthCode:"M06",days:29},"Adar I":{leap:6,regular:void 0,monthCode:"M05L",days:30},"Adar II":{leap:7,regular:void 0,monthCode:"M06",days:29},Nisan:{leap:8,regular:7,monthCode:"M07",days:30},Iyar:{leap:9,regular:8,monthCode:"M08",days:29},Sivan:{leap:10,regular:9,monthCode:"M09",days:30},Tamuz:{leap:11,regular:10,monthCode:"M10",days:29},Av:{leap:12,regular:11,monthCode:"M11",days:30},Elul:{leap:13,regular:12,monthCode:"M12",days:29}}}inLeapYear(e){const{year:t}=e;return(7*t+1)%19<7}monthsInYear(e){return this.inLeapYear(e)?13:12}minimumMonthLength(e){return this.minMaxMonthLength(e,"min")}maximumMonthLength(e){return this.minMaxMonthLength(e,"max")}minMaxMonthLength(e,t){const{month:r,year:o}=e,i=this.getMonthCode(o,r),a=Object.entries(this.months).find((c=>c[1].monthCode===i));if(a===void 0)throw new RangeError(`unmatched Hebrew month: ${r}`);const s=a[1].days;return typeof s=="number"?s:s[t]}maxLengthOfMonthCodeInAnyYear(e){return["M04","M06","M08","M10","M12"].includes(e)?29:30}estimateIsoDate(e){const{year:t}=e;return{year:t-3760,month:1,day:1}}getMonthCode(e,t){return this.inLeapYear({year:e})?t===6?at(5,!0):at(t<6?t:t-1):at(t)}adjustCalendarDate(e,t,r="constrain",o=!1){let{year:i,month:a,monthCode:s,day:c,monthExtra:l}=e;if(i===void 0)throw new TypeError("Missing property: year");if(o){if(l){const d=this.months[l];if(!d)throw new RangeError(`Unrecognized month from formatToParts: ${l}`);a=this.inLeapYear({year:i})?d.leap:d.regular}return s=this.getMonthCode(i,a),{year:i,month:a,day:c,monthCode:s}}if(this.validateCalendarDate(e),a===void 0)if(s.endsWith("L")){if(s!=="M05L")throw new RangeError(`Hebrew leap month must have monthCode M05L, not ${s}`);if(a=6,!this.inLeapYear({year:i})){if(r==="reject")throw new RangeError(`Hebrew monthCode M05L is invalid in year ${i} which is not a leap year`);a=6,s="M06"}}else{a=Jt(s),this.inLeapYear({year:i})&&a>=6&&a++;const d=this.monthsInYear({year:i});if(a<1||a>d)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(ae(a,1,this.monthsInYear({year:i})),ae(c,1,this.maximumMonthLength({year:i,month:a}))):(a=ke(a,1,this.monthsInYear({year:i})),c=ke(c,1,this.maximumMonthLength({year:i,month:a}))),s===void 0)s=this.getMonthCode(i,a);else if(this.getMonthCode(i,a)!==s)throw new RangeError(`monthCode ${s} doesn't correspond to month ${a} in Hebrew year ${i}`);return{...e,day:c,month:a,monthCode:s,year:i}}}class Yn extends nn{constructor(){super(...arguments),this.calendarType="lunar",this.DAYS_PER_ISLAMIC_YEAR=354+11/30,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(e,t){const r={year:e.year,month:1,monthCode:"M01",day:1},o={year:e.year+1,month:1,monthCode:"M01",day:1};return this.calendarDaysUntil(r,o,t)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(e){const{year:t}=this.adjustCalendarDate(e);return{year:Math.floor(t*this.DAYS_PER_ISLAMIC_YEAR/this.DAYS_PER_ISO_YEAR)+622,month:1,day:1}}}class hc extends Yn{constructor(){super(...arguments),this.id="islamic"}}class mc extends Yn{constructor(){super(...arguments),this.id="islamic-umalqura"}}class fc extends Yn{constructor(){super(...arguments),this.id="islamic-tbla"}}class gc extends Yn{constructor(){super(...arguments),this.id="islamic-civil"}}class yc extends Yn{constructor(){super(...arguments),this.id="islamic-rgsa"}}class pc extends Yn{constructor(){super(...arguments),this.id="islamicc"}}class wc extends nn{constructor(){super(...arguments),this.id="persian",this.calendarType="solar"}inLeapYear(e,t){return this.daysInMonth({year:e.year,month:12,day:1},t)===30}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===12?29:t<=6?31:30}maximumMonthLength(e){const{month:t}=e;return t===12?30:t<=6?31:30}maxLengthOfMonthCodeInAnyYear(e){return Jt(e)<=6?31:30}estimateIsoDate(e){const{year:t}=this.adjustCalendarDate(e);return{year:t+621,month:1,day:1}}}class bc extends nn{constructor(){super(...arguments),this.id="indian",this.calendarType="solar",this.months={1:{length:30,month:3,day:22,leap:{length:31,month:3,day:21}},2:{length:31,month:4,day:21},3:{length:31,month:5,day:22},4:{length:31,month:6,day:22},5:{length:31,month:7,day:23},6:{length:31,month:8,day:23},7:{length:30,month:9,day:23},8:{length:30,month:10,day:23},9:{length:30,month:11,day:22},10:{length:30,month:12,day:22},11:{length:30,month:1,nextYear:!0,day:21},12:{length:30,month:2,nextYear:!0,day:20}},this.vulnerableToBceBug=new Date("0000-01-01T00:00Z").toLocaleDateString("en-US-u-ca-indian",{timeZone:"UTC"})!=="10/11/-79 Saka"}inLeapYear(e){return si(e.year+78)}monthsInYear(){return 12}minimumMonthLength(e){return this.getMonthInfo(e).length}maximumMonthLength(e){return this.getMonthInfo(e).length}maxLengthOfMonthCodeInAnyYear(e){const t=Jt(e);let r=this.months[t];return r=r.leap??r,r.length}getMonthInfo(e){const{month:t}=e;let r=this.months[t];if(r===void 0)throw new RangeError(`Invalid month: ${t}`);return this.inLeapYear(e)&&r.leap&&(r=r.leap),r}estimateIsoDate(e){const t=this.adjustCalendarDate(e),r=this.getMonthInfo(t);return Ae(t.year+78+(r.nextYear?1:0),r.month,r.day+t.day-1)}checkIcuBugs(e){if(this.vulnerableToBceBug&&e.year<1)throw new RangeError(`calendar '${this.id}' is broken for ISO dates before 0001-01-01 (see https://bugs.chromium.org/p/v8/issues/detail?id=10529)`)}}function si(n){return n%4==0&&(n%100!=0||n%400==0)}class ls extends nn{constructor(e,t){super(),this.calendarType="solar",this.id=e,this.isoEpoch=t}inLeapYear(e){const{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return si(t)}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===2?this.inLeapYear(e)?29:28:[4,6,9,11].indexOf(t)>=0?30:31}maximumMonthLength(e){return this.minimumMonthLength(e)}maxLengthOfMonthCodeInAnyYear(e){return[31,29,31,30,31,30,31,31,30,31,30,31][Jt(e)-1]}estimateIsoDate(e){const t=this.adjustCalendarDate(e);return er(t.year+this.isoEpoch.year,t.month+this.isoEpoch.month,t.day+this.isoEpoch.day,"constrain")}}class us extends nn{constructor(e,t){super(),this.hasEra=!0,this.calendarType="solar",this.id=e;const{eras:r,anchorEra:o}=(function(i){let a,s=i;if(s.length===0)throw new RangeError("Invalid era data: eras are required");if(s.length===1&&s[0].reverseOf)throw new RangeError("Invalid era data: anchor era cannot count years backwards");if(s.length===1&&!s[0].code)throw new RangeError("Invalid era data: at least one named era is required");if(s.filter((l=>l.reverseOf!=null)).length>1)throw new RangeError("Invalid era data: only one era can count years backwards");s.forEach((l=>{if(l.isAnchor||!l.anchorEpoch&&!l.reverseOf){if(a)throw new RangeError("Invalid era data: cannot have multiple anchor eras");a=l,l.anchorEpoch={year:l.hasYearZero?0:1}}else if(!l.code)throw new RangeError("If era name is blank, it must be the anchor era")})),s=s.filter((l=>l.code)),s.forEach((l=>{const{reverseOf:d}=l;if(d){const h=s.find((f=>f.code===d));if(h===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${d}`);l.reverseOf=h,l.anchorEpoch=h.anchorEpoch,l.isoEpoch=h.isoEpoch}l.anchorEpoch.month===void 0&&(l.anchorEpoch.month=1),l.anchorEpoch.day===void 0&&(l.anchorEpoch.day=1)})),s.sort(((l,d)=>{if(l.reverseOf)return 1;if(d.reverseOf)return-1;if(!l.isoEpoch||!d.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return d.isoEpoch.year-l.isoEpoch.year}));const c=s[s.length-1].reverseOf;if(c&&c!==s[s.length-2])throw new RangeError("Invalid era data: invalid reverse-sign era");return s.forEach(((l,d)=>{l.genericName="era"+(s.length-1-d)})),{eras:s,anchorEra:a||s[0]}})(t);this.anchorEra=o,this.eras=r}inLeapYear(e){const{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return si(t)}monthsInYear(){return 12}minimumMonthLength(e){const{month:t}=e;return t===2?this.inLeapYear(e)?29:28:[4,6,9,11].indexOf(t)>=0?30:31}maximumMonthLength(e){return this.minimumMonthLength(e)}maxLengthOfMonthCodeInAnyYear(e){return[31,29,31,30,31,30,31,31,30,31,30,31][Jt(e)-1]}completeEraYear(e){const t=(s,c,l)=>{const d=e[s];if(d!=null&&d!=c&&!(l||[]).includes(d)){const h=l?.[0];throw new RangeError(`Input ${s} ${d} doesn't match calculated value ${h?`${c} (also called ${h})`:c}`)}},r=s=>{let c;const l={...e,year:s},d=this.eras.find(((h,f)=>{if(f===this.eras.length-1){if(h.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${h.code}`);return c=h.anchorEpoch.year-s,!0}return c=s-h.anchorEpoch.year+(h.hasYearZero?0:1),!0}return this.compareCalendarDates(l,h.anchorEpoch)>=0&&(c=s-h.anchorEpoch.year+(h.hasYearZero?0:1),!0)}));if(!d)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:c,era:d.code,eraNames:d.names}};let{year:o,eraYear:i,era:a}=e;if(o!=null){const s=r(o);({eraYear:i,era:a}=s),t("era",a,s?.eraNames),t("eraYear",i)}else{if(i==null)throw new RangeError("Either year or eraYear and era are required");{if(a===void 0)throw new RangeError("era and eraYear must be provided together");const s=this.eras.find((({code:c,names:l=[]})=>c===a||l.includes(a)));if(!s)throw new RangeError(`Era ${a} (ISO year ${i}) was not matched by any era`);o=s.reverseOf?s.anchorEpoch.year-i:i+s.anchorEpoch.year-(s.hasYearZero?0:1),t("year",o),{eraYear:i,era:a}=r(o)}}return{...e,year:o,eraYear:i,era:a}}adjustCalendarDate(e,t,r="constrain"){let o=e;const{month:i,monthCode:a}=o;return i===void 0&&(o={...o,month:Jt(a)}),this.validateCalendarDate(o),o=this.completeEraYear(o),super.adjustCalendarDate(o,t,r)}estimateIsoDate(e){const t=this.adjustCalendarDate(e),{year:r,month:o,day:i}=t,{anchorEra:a}=this;return er(r+a.isoEpoch.year-(a.hasYearZero?0:1),o,i,"constrain")}}class ci extends us{constructor(e,t){super(e,t)}isoToCalendarDate(e){const{year:t,month:r,day:o}=e,i=at(r),a=t-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:r,monthCode:i,day:o})}}const nt={inLeapYear(n){const{year:e}=n;return(e+1)%4==0},monthsInYear:()=>13,minimumMonthLength(n){const{month:e}=n;return e===13?this.inLeapYear(n)?6:5:30},maximumMonthLength(n){return this.minimumMonthLength(n)},maxLengthOfMonthCodeInAnyYear:n=>n==="M13"?6:30};class vc extends ls{constructor(e,t){super(e,t),this.inLeapYear=nt.inLeapYear,this.monthsInYear=nt.monthsInYear,this.minimumMonthLength=nt.minimumMonthLength,this.maximumMonthLength=nt.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=nt.maxLengthOfMonthCodeInAnyYear}}class ds extends us{constructor(e,t){super(e,t),this.inLeapYear=nt.inLeapYear,this.monthsInYear=nt.monthsInYear,this.minimumMonthLength=nt.minimumMonthLength,this.maximumMonthLength=nt.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=nt.maxLengthOfMonthCodeInAnyYear}}class Tc extends vc{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}}class Dc extends ds{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}}class _c extends ds{constructor(){super("ethiopic",[{code:"ethioaa",names:["ethiopic-amete-alem","mundi"],isoEpoch:{year:-5492,month:7,day:17}},{code:"ethiopic",names:["incar"],isoEpoch:{year:8,month:8,day:27},anchorEpoch:{year:5501}}])}}class Ec extends ci{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}}class Mc extends ls{constructor(){super("buddhist",{year:-543,month:1,day:1})}}class xc extends ci{constructor(){super("gregory",[{code:"gregory",names:["ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"gregory-inverse",names:["be","bce"],reverseOf:"gregory"}])}reviseIntlEra(e){let{era:t,eraYear:r}=e;return t==="b"&&(t="gregory-inverse"),t==="a"&&(t="gregory"),{era:t,eraYear:r}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}}class Cc extends ci{constructor(){super("japanese",[{code:"reiwa",isoEpoch:{year:2019,month:5,day:1},anchorEpoch:{year:2019,month:5,day:1}},{code:"heisei",isoEpoch:{year:1989,month:1,day:8},anchorEpoch:{year:1989,month:1,day:8}},{code:"showa",isoEpoch:{year:1926,month:12,day:25},anchorEpoch:{year:1926,month:12,day:25}},{code:"taisho",isoEpoch:{year:1912,month:7,day:30},anchorEpoch:{year:1912,month:7,day:30}},{code:"meiji",isoEpoch:{year:1868,month:9,day:8},anchorEpoch:{year:1868,month:9,day:8}},{code:"japanese",names:["japanese","gregory","ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"japanese-inverse",names:["japanese-inverse","gregory-inverse","bc","bce"],reverseOf:"japanese"}]),this.erasBeginMidYear=!0}reviseIntlEra(e,t){const{era:r,eraYear:o}=e,{year:i}=t;return this.eras.find((a=>a.code===r))?{era:r,eraYear:o}:i<1?{era:"japanese-inverse",eraYear:1-i}:{era:"japanese",eraYear:i}}}class hs extends nn{constructor(){super(...arguments),this.calendarType="lunisolar"}inLeapYear(e,t){const r=this.getMonthList(e.year,t);return Object.entries(r).length===13}monthsInYear(e,t){return this.inLeapYear(e,t)?13:12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(e){return["M01L","M09L","M10L","M11L","M12L"].includes(e)?29:30}monthDaySearchStartYear(e,t){const r={M01L:[1651,1651],M02L:[1947,1765],M03L:[1966,1955],M04L:[1963,1944],M05L:[1971,1952],M06L:[1960,1941],M07L:[1968,1938],M08L:[1957,1718],M09L:[1832,1832],M10L:[1870,1870],M11L:[1814,1814],M12L:[1890,1890]}[e]??[1972,1972];return t<30?r[0]:r[1]}getMonthList(e,t){if(e===void 0)throw new TypeError("Missing year");const r=JSON.stringify({func:"getMonthList",calendarYear:e,id:this.id}),o=t.get(r);if(o)return o;const i=this.getFormatter(),a=(w,T)=>{const M=cs({isoYear:w,isoMonth:2,isoDay:1}),x=new Date(M);x.setUTCDate(T+1);const k=i.formatToParts(x),$=k.find((z=>z.type==="month")).value,Q=+k.find((z=>z.type==="day")).value,J=k.find((z=>z.type==="relatedYear"));let B;if(J===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return B=+J.value,{calendarMonthString:$,calendarDay:Q,calendarYearToVerify:B}};let s=17,{calendarMonthString:c,calendarDay:l,calendarYearToVerify:d}=a(e,s);c!=="1"&&(s+=29,{calendarMonthString:c,calendarDay:l}=a(e,s)),s-=l-5;const h={};let f,g,y=1,p=!1;do({calendarMonthString:c,calendarDay:l,calendarYearToVerify:d}=a(e,s)),f&&(h[g].daysInMonth=f+30-l),d!==e?p=!0:(h[c]={monthIndex:y++},s+=30),f=l,g=c;while(!p);return h[g].daysInMonth=f+30-l,t.set(r,h),h}estimateIsoDate(e){const{year:t,month:r}=e;return{year:t,month:r>=12?12:r+1,day:1}}adjustCalendarDate(e,t,r="constrain",o=!1){let{year:i,month:a,monthExtra:s,day:c,monthCode:l}=e;if(i===void 0)throw new TypeError("Missing property: year");if(o){if(s&&s!=="bis")throw new RangeError(`Unexpected leap month suffix: ${s}`);const d=at(a,s!==void 0),h=`${a}${s||""}`,f=this.getMonthList(i,t)[h];if(f===void 0)throw new RangeError(`Unmatched month ${h} in Chinese year ${i}`);return a=f.monthIndex,{year:i,month:a,day:c,monthCode:d}}if(this.validateCalendarDate(e),a===void 0){const d=this.getMonthList(i,t);let h=l.replace(/^M|L$/g,(g=>g==="L"?"bis":""));h[0]==="0"&&(h=h.slice(1));let f=d[h];if(a=f&&f.monthIndex,a===void 0&&l.endsWith("L")&&l!="M13L"&&r==="constrain"){const g=+l.replace(/^M0?|L$/g,"");f=d[g],f&&(a=f.monthIndex,l=at(g))}if(a===void 0)throw new RangeError(`Unmatched month ${l} in Chinese year ${i}`)}else if(l===void 0){const d=this.getMonthList(i,t),h=Object.entries(d),f=h.length;r==="reject"?(ae(a,1,f),ae(c,1,this.maximumMonthLength())):(a=ke(a,1,f),c=ke(c,1,this.maximumMonthLength()));const g=h.find((y=>y[1].monthIndex===a));if(g===void 0)throw new RangeError(`Invalid month ${a} in Chinese year ${i}`);l=at(+g[0].replace("bis",""),g[0].indexOf("bis")!==-1)}else{const d=this.getMonthList(i,t);let h=l.replace(/^M|L$/g,(g=>g==="L"?"bis":""));h[0]==="0"&&(h=h.slice(1));const f=d[h];if(!f)throw new RangeError(`Unmatched monthCode ${l} in Chinese year ${i}`);if(a!==f.monthIndex)throw new RangeError(`monthCode ${l} doesn't correspond to month ${a} in Chinese year ${i}`)}return{...e,year:i,month:a,monthCode:l,day:c}}}class kc extends hs{constructor(){super(...arguments),this.id="chinese"}}class Oc extends hs{constructor(){super(...arguments),this.id="dangi"}}class jc{constructor(e){this.helper=e}extraFields(e){return this.helper.hasEra&&e.includes("year")?["era","eraYear"]:[]}resolveFields(e){if(this.helper.calendarType!=="lunisolar"){const t=new ie;ai(e,void 0,this.helper.monthsInYear({year:e.year??1972},t))}}dateToISO(e,t){const r=new ie,o=this.helper.calendarToIsoDate(e,t,r);return r.setObject(o),o}monthDayToISOReferenceDate(e,t){const r=new ie,o=this.helper.monthDayFromFields(e,t,r);return r.setObject(o),o}fieldKeysToIgnore(e){const t=new Set;for(let r=0;r<e.length;r++){const o=e[r];switch(t.add(o),o){case"era":t.add("eraYear"),t.add("year");break;case"eraYear":t.add("era"),t.add("year");break;case"year":t.add("era"),t.add("eraYear");break;case"month":t.add("monthCode"),this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"));break;case"monthCode":t.add("month"),this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"));break;case"day":this.helper.erasBeginMidYear&&(t.add("era"),t.add("eraYear"))}}return as(t)}dateAdd(e,{years:t,months:r,weeks:o,days:i},a){const s=ie.getCacheForObject(e),c=this.helper.isoToCalendarDate(e,s),l=this.helper.addCalendar(c,{years:t,months:r,weeks:o,days:i},a,s),d=this.helper.calendarToIsoDate(l,"constrain",s);return ie.getCacheForObject(d)||new ie(s).setObject(d),d}dateUntil(e,t,r){const o=ie.getCacheForObject(e),i=ie.getCacheForObject(t),a=this.helper.isoToCalendarDate(e,o),s=this.helper.isoToCalendarDate(t,i);return this.helper.untilCalendar(a,s,r,o)}isoToDate(e,t){const r=ie.getCacheForObject(e),o=this.helper.isoToCalendarDate(e,r);if(t.dayOfWeek&&(o.dayOfWeek=Cr.iso8601.isoToDate(e,{dayOfWeek:!0}).dayOfWeek),t.dayOfYear){const i=this.helper.startOfCalendarYear(o),a=this.helper.calendarDaysUntil(i,o,r);o.dayOfYear=a+1}if(t.weekOfYear&&(o.weekOfYear=ss(this.helper.id,e)),o.daysInWeek=7,t.daysInMonth&&(o.daysInMonth=this.helper.daysInMonth(o,r)),t.daysInYear){const i=this.helper.startOfCalendarYear(o),a=this.helper.addCalendar(i,{years:1},"constrain",r);o.daysInYear=this.helper.calendarDaysUntil(i,a,r)}return t.monthsInYear&&(o.monthsInYear=this.helper.monthsInYear(o,r)),t.inLeapYear&&(o.inLeapYear=this.helper.inLeapYear(o,r)),o}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}}for(const n of[dc,wc,_c,Tc,Dc,kc,Oc,Ec,bc,Mc,xc,Cc,hc,mc,fc,gc,yc,pc]){const e=new n;Cr[e.id]=new jc(e)}No("calendarImpl",(function(n){return Cr[n]}));const dr=Intl.DateTimeFormat;function an(n,e){let t=m(n,e);return typeof t=="function"&&(t=new dr(m(n,_a),t(m(n,ko))),(function(r,o,i){const a=no(r);if(a===void 0)throw new TypeError("Missing slots for the given container");if(a[o]===void 0)throw new TypeError(`tried to reset ${o} which was not set`);a[o]=i})(n,e,t)),t}function Fn(n){return Ne(n,en)}class hr{constructor(e=void 0,t=void 0){(function(r,o,i){const a=i!==void 0;let s;if(a){const h=["localeMatcher","calendar","numberingSystem","hour12","hourCycle","timeZone","weekday","era","year","month","day","dayPeriod","hour","minute","second","fractionalSecondDigits","timeZoneName","formatMatcher","dateStyle","timeStyle"];s=(function(g){if(g==null)throw new TypeError(`Expected object not ${g}`);return Object(g)})(i);const f=Object.create(null);for(let g=0;g<h.length;g++){const y=h[g];Object.prototype.hasOwnProperty.call(s,y)&&(f[y]=s[y])}s=f}else s=Object.create(null);const c=new dr(o,s),l=c.resolvedOptions();if(xt(r),a){const h=Object.assign(Object.create(null),l);for(const f in h)Object.prototype.hasOwnProperty.call(s,f)||delete h[f];h.hour12=s.hour12,h.hourCycle=s.hourCycle,P(r,ko,h)}else P(r,ko,s);P(r,_a,l.locale),P(r,en,c),P(r,hn,l.timeZone),P(r,qn,l.calendar),P(r,pa,Uc),P(r,wa,Lc),P(r,ba,Ac),P(r,va,Ic),P(r,Ta,Fc),P(r,Da,Sc);const d=a?s.timeZone:void 0;if(d===void 0)P(r,Co,l.timeZone);else{const h=ao(d);if(h.startsWith("−"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");P(r,Co,je(h))}})(this,e,t)}get format(){b(this,Fn);const e=Nc.bind(this);return Object.defineProperties(e,{length:{value:1,enumerable:!1,writable:!1,configurable:!0},name:{value:"",enumerable:!1,writable:!1,configurable:!0}}),e}formatRange(e,t){return b(this,Fn),Yc.call(this,e,t)}formatToParts(e,...t){return b(this,Fn),Pc.call(this,e,...t)}formatRangeToParts(e,t){return b(this,Fn),Rc.call(this,e,t)}resolvedOptions(){return b(this,Fn),$c.call(this)}}"formatToParts"in dr.prototype||delete hr.prototype.formatToParts,"formatRangeToParts"in dr.prototype||delete hr.prototype.formatRangeToParts;const Ve=function(n=void 0,e=void 0){return new hr(n,e)};function $c(){const n=m(this,en).resolvedOptions();return n.timeZone=m(this,Co),n}function Nc(n,...e){let t,r,o=En(n,this);return o.formatter?(t=o.formatter,r=[Ke(o.epochNs,"floor")]):(t=m(this,en),r=[n,...e]),t.format(...r)}function Pc(n,...e){let t,r,o=En(n,this);return o.formatter?(t=o.formatter,r=[Ke(o.epochNs,"floor")]):(t=m(this,en),r=[n,...e]),t.formatToParts(...r)}function Yc(n,e){if(n===void 0||e===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");const t=Jr(n),r=Jr(e);let o,i=[t,r];if(Dt(t)!==Dt(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(Dt(t)){if(!ms(t,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");const{epochNs:a,formatter:s}=En(t,this),{epochNs:c,formatter:l}=En(r,this);s&&(o=s,i=[Ke(a,"floor"),Ke(c,"floor")])}return o||(o=m(this,en)),o.formatRange(...i)}function Rc(n,e){if(n===void 0||e===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");const t=Jr(n),r=Jr(e);let o,i=[t,r];if(Dt(t)!==Dt(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(Dt(t)){if(!ms(t,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");const{epochNs:a,formatter:s}=En(t,this),{epochNs:c,formatter:l}=En(r,this);s&&(o=s,i=[Ke(a,"floor"),Ke(c,"floor")])}return o||(o=m(this,en)),o.formatRangeToParts(...i)}function kr(n={},e={}){const t=Object.assign({},n),r=["year","month","day","hour","minute","second","weekday","dayPeriod","timeZoneName","dateStyle","timeStyle"];for(let o=0;o<r.length;o++){const i=r[o];t[i]=i in e?e[i]:t[i],t[i]!==!1&&t[i]!==void 0||delete t[i]}return t}function Ic(n){const e=kr(n,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(e.timeStyle!=="long"&&e.timeStyle!=="full"||(delete e.timeStyle,Object.assign(e,{hour:"numeric",minute:"2-digit",second:"2-digit"})),!yo(e)){if(Or(n))throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);Object.assign(e,{hour:"numeric",minute:"numeric",second:"numeric"})}return e}function Lc(n){const e={short:{year:"2-digit",month:"numeric"},medium:{year:"numeric",month:"short"},long:{year:"numeric",month:"long"},full:{year:"numeric",month:"long"}},t=kr(n,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in t&&t.dateStyle){const r=t.dateStyle;delete t.dateStyle,Object.assign(t,e[r])}if(!("year"in t||"month"in t||"era"in t)){if(Or(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric"})}return t}function Ac(n){const e={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},t=kr(n,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in t&&t.dateStyle){const r=t.dateStyle;delete t.dateStyle,Object.assign(t,e[r])}if(!("month"in t)&&!("day"in t)){if(Or(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(t,{month:"numeric",day:"numeric"})}return t}function Uc(n){const e=kr(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!go(e)){if(Or(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric",day:"numeric"})}return e}function Fc(n){const e=kr(n,{timeZoneName:!1});if((e.timeStyle==="long"||e.timeStyle==="full")&&(delete e.timeStyle,Object.assign(e,{hour:"numeric",minute:"2-digit",second:"2-digit"}),e.dateStyle)&&(Object.assign(e,{short:{year:"numeric",month:"numeric",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{year:"numeric",month:"long",day:"numeric",weekday:"long"}}[e.dateStyle]),delete e.dateStyle),!yo(e)&&!go(e)){if(Or(n))throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}return e}function Sc(n){let e=n;return yo(e)||go(e)||(e=Object.assign({},e,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),e}function go(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function yo(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Or(n){return go(n)||yo(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function Dt(n){return H(n)||K(n)||Z(n)||Y(n)||ce(n)||Fe(n)||se(n)}function Jr(n){return Dt(n)?n:io(n)}function ms(n,e){return!(!Dt(n)||!Dt(e)||K(n)&&!K(e)||H(n)&&!H(e)||Z(n)&&!Z(e)||Y(n)&&!Y(e)||ce(n)&&!ce(e)||Fe(n)&&!Fe(e)||se(n)&&!se(e))}function En(n,e){if(K(n)){const t={isoDate:{year:1970,month:1,day:1},time:m(n,G)};return{epochNs:ge(m(e,hn),t,"compatible"),formatter:an(e,va)}}if(ce(n)){const t=m(n,_),r=m(e,qn);if(t!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${t} in locale with calendar ${r}`);const o=U(m(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(m(e,hn),o,"compatible"),formatter:an(e,wa)}}if(Fe(n)){const t=m(n,_),r=m(e,qn);if(t!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${t} in locale with calendar ${r}`);const o=U(m(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(m(e,hn),o,"compatible"),formatter:an(e,ba)}}if(H(n)){const t=m(n,_),r=m(e,qn);if(t!=="iso8601"&&t!==r)throw new RangeError(`cannot format PlainDate with calendar ${t} in locale with calendar ${r}`);const o=U(m(n,j),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:ge(m(e,hn),o,"compatible"),formatter:an(e,pa)}}if(Z(n)){const t=m(n,_),r=m(e,qn);if(t!=="iso8601"&&t!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${t} in locale with calendar ${r}`);const o=m(n,q);return{epochNs:ge(m(e,hn),o,"compatible"),formatter:an(e,Ta)}}if(Y(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return se(n)?{epochNs:m(n,O),formatter:an(e,Da)}:{}}function fs(n){const e=Object.create(null);return e.years=m(n,ve),e.months=m(n,Te),e.weeks=m(n,Ye),e.days=m(n,De),e.hours=m(n,_e),e.minutes=m(n,Ee),e.seconds=m(n,Me),e.milliseconds=m(n,xe),e.microseconds=m(n,Ce),e.nanoseconds=m(n,Re),e}hr.prototype.constructor=Ve,Object.defineProperty(Ve,"prototype",{value:hr.prototype,writable:!1,enumerable:!1,configurable:!1}),Ve.supportedLocalesOf=dr.supportedLocalesOf,Ct(Ve,"Intl.DateTimeFormat");const{format:zc,formatToParts:Zc}=Intl.DurationFormat?.prototype??Object.create(null);function gs(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);const e=fs(Qe(n));return zc.call(this,e)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=gs,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);const e=fs(Qe(n));return Zc.call(this,e)});class li{constructor(e){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");za(this,Br(e))}get epochMilliseconds(){return b(this,se),Ke(m(this,O),"floor")}get epochNanoseconds(){return b(this,se),os(u.BigInt(m(this,O)))}add(e){return b(this,se),Xi("add",this,e)}subtract(e){return b(this,se),Xi("subtract",this,e)}until(e,t=void 0){return b(this,se),Zi("until",this,e,t)}since(e,t=void 0){return b(this,se),Zi("since",this,e,t)}round(e){if(b(this,se),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Bt("smallestUnit",e):C(e),r=jn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et);return $n(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[i],!0),rt(zo(m(this,O),r,i,o))}equals(e){b(this,se);const t=Gn(e),r=m(this,O),o=m(t,O);return u.equal(u.BigInt(r),u.BigInt(o))}toString(e=void 0){b(this,se);const t=C(e),r=br(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let a=t.timeZone;a!==void 0&&(a=je(a));const{precision:s,unit:c,increment:l}=vr(i,r);return Yi(rt(zo(m(this,O),l,c,o)),a,s)}toJSON(){return b(this,se),Yi(this,void 0,"auto")}toLocaleString(e=void 0,t=void 0){return b(this,se),new Ve(e,t).format(this)}valueOf(){St("Instant")}toZonedDateTimeISO(e){b(this,se);const t=je(e);return me(m(this,O),t,"iso8601")}static fromEpochMilliseconds(e){return rt(it(io(e)))}static fromEpochNanoseconds(e){return rt(Br(e))}static from(e){return Gn(e)}static compare(e,t){const r=Gn(e),o=Gn(t),i=m(r,O),a=m(o,O);return u.lessThan(i,a)?-1:u.greaterThan(i,a)?1:0}}Ct(li,"Temporal.Instant");class ui{constructor(e,t,r,o="iso8601"){const i=N(e),a=N(t),s=N(r),c=Pe(o===void 0?"iso8601":re(o));Qt(i,a,s),La(this,{year:i,month:a,day:s},c)}get calendarId(){return b(this,H),m(this,_)}get era(){return pe(this,"era")}get eraYear(){return pe(this,"eraYear")}get year(){return pe(this,"year")}get month(){return pe(this,"month")}get monthCode(){return pe(this,"monthCode")}get day(){return pe(this,"day")}get dayOfWeek(){return pe(this,"dayOfWeek")}get dayOfYear(){return pe(this,"dayOfYear")}get weekOfYear(){return pe(this,"weekOfYear")?.week}get yearOfWeek(){return pe(this,"weekOfYear")?.year}get daysInWeek(){return pe(this,"daysInWeek")}get daysInMonth(){return pe(this,"daysInMonth")}get daysInYear(){return pe(this,"daysInYear")}get monthsInYear(){return pe(this,"monthsInYear")}get inLeapYear(){return pe(this,"inLeapYear")}with(e,t=void 0){if(b(this,H),!V(e))throw new TypeError("invalid argument");On(e);const r=m(this,_);let o=$e(r,m(this,j));return o=Vt(r,o,qe(r,e,["year","month","monthCode","day"],[],"partial")),Oe(Ut(r,o,L(C(t))),r)}withCalendar(e){b(this,H);const t=Er(e);return Oe(m(this,j),t)}add(e,t=void 0){return b(this,H),Ki("add",this,e,t)}subtract(e,t=void 0){return b(this,H),Ki("subtract",this,e,t)}until(e,t=void 0){return b(this,H),qi("until",this,e,t)}since(e,t=void 0){return b(this,H),qi("since",this,e,t)}equals(e){b(this,H);const t=Wn(e);return lt(m(this,j),m(t,j))===0&&st(m(this,_),m(t,_))}toString(e=void 0){return b(this,H),Ri(this,wr(C(e)))}toJSON(){return b(this,H),Ri(this)}toLocaleString(e=void 0,t=void 0){return b(this,H),new Ve(e,t).format(this)}valueOf(){St("PlainDate")}toPlainDateTime(e=void 0){b(this,H);const t=Ia(e);return He(U(m(this,j),t),m(this,_))}toZonedDateTime(e){let t,r;if(b(this,H),V(e)){const a=e.timeZone;a===void 0?t=je(e):(t=je(a),r=e.plainTime)}else t=je(e);const o=m(this,j);let i;return r===void 0?i=Ot(t,o):(r=Nt(r),i=ge(t,U(o,m(r,G)),"compatible")),me(i,t,m(this,_))}toPlainYearMonth(){b(this,H);const e=m(this,_);return yn(ar(e,$e(e,m(this,j)),"constrain"),e)}toPlainMonthDay(){b(this,H);const e=m(this,_);return gn(Gr(e,$e(e,m(this,j)),"constrain"),e)}static from(e,t=void 0){return Wn(e,t)}static compare(e,t){const r=Wn(e),o=Wn(t);return lt(m(r,j),m(o,j))}}function pe(n,e){b(n,H);const t=m(n,j);return Tr(n).isoToDate(t,{[e]:!0})[e]}Ct(ui,"Temporal.PlainDate");class di{constructor(e,t,r,o=0,i=0,a=0,s=0,c=0,l=0,d="iso8601"){const h=N(e),f=N(t),g=N(r),y=o===void 0?0:N(o),p=i===void 0?0:N(i),w=a===void 0?0:N(a),T=s===void 0?0:N(s),M=c===void 0?0:N(c),x=l===void 0?0:N(l),k=Pe(d===void 0?"iso8601":re(d));ni(h,f,g,y,p,w,T,M,x),Aa(this,{isoDate:{year:h,month:f,day:g},time:{hour:y,minute:p,second:w,millisecond:T,microsecond:M,nanosecond:x}},k)}get calendarId(){return b(this,Z),m(this,_)}get year(){return we(this,"year")}get month(){return we(this,"month")}get monthCode(){return we(this,"monthCode")}get day(){return we(this,"day")}get hour(){return sn(this,"hour")}get minute(){return sn(this,"minute")}get second(){return sn(this,"second")}get millisecond(){return sn(this,"millisecond")}get microsecond(){return sn(this,"microsecond")}get nanosecond(){return sn(this,"nanosecond")}get era(){return we(this,"era")}get eraYear(){return we(this,"eraYear")}get dayOfWeek(){return we(this,"dayOfWeek")}get dayOfYear(){return we(this,"dayOfYear")}get weekOfYear(){return we(this,"weekOfYear")?.week}get yearOfWeek(){return we(this,"weekOfYear")?.year}get daysInWeek(){return we(this,"daysInWeek")}get daysInYear(){return we(this,"daysInYear")}get daysInMonth(){return we(this,"daysInMonth")}get monthsInYear(){return we(this,"monthsInYear")}get inLeapYear(){return we(this,"inLeapYear")}with(e,t=void 0){if(b(this,Z),!V(e))throw new TypeError("invalid argument");On(e);const r=m(this,_),o=m(this,q);let i={...$e(r,o.isoDate),...o.time};return i=Vt(r,i,qe(r,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),He(Dr(r,i,L(C(t))),r)}withPlainTime(e=void 0){b(this,Z);const t=Ia(e);return He(U(m(this,q).isoDate,t),m(this,_))}withCalendar(e){b(this,Z);const t=Er(e);return He(m(this,q),t)}add(e,t=void 0){return b(this,Z),Bi("add",this,e,t)}subtract(e,t=void 0){return b(this,Z),Bi("subtract",this,e,t)}until(e,t=void 0){return b(this,Z),Wi("until",this,e,t)}since(e,t=void 0){return b(this,Z),Wi("since",this,e,t)}round(e){if(b(this,Z),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Bt("smallestUnit",e):C(e),r=jn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];$n(r,a,a===1);const s=m(this,q);return He(r===1&&i==="nanosecond"?s:Zo(s,r,i,o),m(this,_))}equals(e){b(this,Z);const t=Hn(e);return _n(m(this,q),m(t,q))===0&&st(m(this,_),m(t,_))}toString(e=void 0){b(this,Z);const t=C(e),r=wr(t),o=br(t),i=Je(t,"trunc"),a=Le(t,"smallestUnit","time",void 0);if(a==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const{precision:s,unit:c,increment:l}=vr(a,o),d=Zo(m(this,q),l,c,i);return Xt(d),cr(d,m(this,_),s,r)}toJSON(){return b(this,Z),cr(m(this,q),m(this,_),"auto")}toLocaleString(e=void 0,t=void 0){return b(this,Z),new Ve(e,t).format(this)}valueOf(){St("PlainDateTime")}toZonedDateTime(e,t=void 0){b(this,Z);const r=je(e),o=tr(C(t));return me(ge(r,m(this,q),o),r,m(this,_))}toPlainDate(){return b(this,Z),Oe(m(this,q).isoDate,m(this,_))}toPlainTime(){return b(this,Z),pt(m(this,q).time)}static from(e,t=void 0){return Hn(e,t)}static compare(e,t){const r=Hn(e),o=Hn(t);return _n(m(r,q),m(o,q))}}function we(n,e){b(n,Z);const t=m(n,q).isoDate;return Tr(n).isoToDate(t,{[e]:!0})[e]}function sn(n,e){return b(n,Z),m(n,q).time[e]}Ct(di,"Temporal.PlainDateTime");class Mn{constructor(e=0,t=0,r=0,o=0,i=0,a=0,s=0,c=0,l=0,d=0){const h=e===void 0?0:Be(e),f=t===void 0?0:Be(t),g=r===void 0?0:Be(r),y=o===void 0?0:Be(o),p=i===void 0?0:Be(i),w=a===void 0?0:Be(a),T=s===void 0?0:Be(s),M=c===void 0?0:Be(c),x=l===void 0?0:Be(l),k=d===void 0?0:Be(d);mo(h,f,g,y,p,w,T,M,x,k),xt(this),P(this,ve,h),P(this,Te,f),P(this,Ye,g),P(this,De,y),P(this,_e,p),P(this,Ee,w),P(this,Me,T),P(this,xe,M),P(this,Ce,x),P(this,Re,k)}get years(){return b(this,W),m(this,ve)}get months(){return b(this,W),m(this,Te)}get weeks(){return b(this,W),m(this,Ye)}get days(){return b(this,W),m(this,De)}get hours(){return b(this,W),m(this,_e)}get minutes(){return b(this,W),m(this,Ee)}get seconds(){return b(this,W),m(this,Me)}get milliseconds(){return b(this,W),m(this,xe)}get microseconds(){return b(this,W),m(this,Ce)}get nanoseconds(){return b(this,W),m(this,Re)}get sign(){return b(this,W),Xr(this)}get blank(){return b(this,W),Xr(this)===0}with(e){b(this,W);const t=Ra(e),{years:r=m(this,ve),months:o=m(this,Te),weeks:i=m(this,Ye),days:a=m(this,De),hours:s=m(this,_e),minutes:c=m(this,Ee),seconds:l=m(this,Me),milliseconds:d=m(this,xe),microseconds:h=m(this,Ce),nanoseconds:f=m(this,Re)}=t;return new Mn(r,o,i,a,s,c,l,d,h,f)}negated(){return b(this,W),Ue(this)}abs(){return b(this,W),new Mn(Math.abs(m(this,ve)),Math.abs(m(this,Te)),Math.abs(m(this,Ye)),Math.abs(m(this,De)),Math.abs(m(this,_e)),Math.abs(m(this,Ee)),Math.abs(m(this,Me)),Math.abs(m(this,xe)),Math.abs(m(this,Ce)),Math.abs(m(this,Re)))}add(e){return b(this,W),Qi("add",this,e)}subtract(e){return b(this,W),Qi("subtract",this,e)}round(e){if(b(this,W),e===void 0)throw new TypeError("options parameter is required");const t=gt(this),r=typeof e=="string"?Bt("smallestUnit",e):C(e);let o=Le(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:i,zonedRelativeTo:a}=Do(r);const s=jn(r),c=Je(r,"halfExpand");let l=Le(r,"smallestUnit","datetime",void 0),d=!0;l||(d=!1,l="nanosecond");const h=bt(t,l);let f=!0;if(o||(f=!1,o=h),o==="auto"&&(o=h),!d&&!f)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(bt(o,l)!==o)throw new RangeError(`largestUnit ${o} cannot be smaller than smallestUnit ${l}`);const g={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[l];if(g!==void 0&&$n(s,g,!1),s>1&&yt(l)==="date"&&o!==l)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let p=mn(this);const w=m(a,F),T=m(a,_),M=m(a,O);return p=rs(M,Xn(M,w,T,p),w,T,o,s,l,c),yt(o)==="date"&&(o="hour"),Ge(p,o)}if(i){let p=ot(this);const w=Dn({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},p.time),T=m(i,j),M=m(i,_),x=ze(M,T,fe(p.date,w.deltaDays),"constrain");return p=ns(U(T,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),U(x,w),M,o,s,l,c),Ge(p,o)}if(tt(t))throw new RangeError(`a starting point is required for ${t}s balancing`);if(tt(o))throw new RangeError(`a starting point is required for ${o}s balancing`);let y=ot(this);if(l==="day"){const{quotient:p,remainder:w}=y.time.divmod(qr);let T=y.date.days+p+nr(w,"day");T=Pt(T,s,c),y=vt({years:0,months:0,weeks:0,days:T},R.ZERO)}else y=vt({years:0,months:0,weeks:0,days:0},Kr(y.time,s,l,c));return Ge(y,o)}total(e){if(b(this,W),e===void 0)throw new TypeError("options argument is required");const t=typeof e=="string"?Bt("unit",e):C(e);let{plainRelativeTo:r,zonedRelativeTo:o}=Do(t);const i=Le(t,"unit","datetime",Et);if(o){const s=mn(this),c=m(o,F),l=m(o,_),d=m(o,O);return(function(h,f,g,y,p){return yt(p)==="time"?nr(R.fromEpochNsDiff(f,h),p):zi(es(h,f,g,y,p),f,Xe(g,h),g,y,p)})(d,Xn(d,c,l,s),c,l,i)}if(r){const s=ot(this);let c=Dn({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time);const l=m(r,j),d=m(r,_),h=ze(d,l,fe(s.date,c.deltaDays),"constrain");return(function(f,g,y,p){if(_n(f,g)==0)return 0;Xt(f),Xt(g);const w=Ja(f,g,y,p);return p==="nanosecond"?u.toNumber(w.time.totalNs):zi(w,le(g),f,null,y,p)})(U(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),U(h,c),d,i)}const a=gt(this);if(tt(a))throw new RangeError(`a starting point is required for ${a}s total`);if(tt(i))throw new RangeError(`a starting point is required for ${i}s total`);return nr(ot(this).time,i)}toString(e=void 0){b(this,W);const t=C(e),r=br(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour"||i==="minute")throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');const{precision:a,unit:s,increment:c}=vr(i,r);if(s==="nanosecond"&&c===1)return Rr(this,a);const l=gt(this);let d=mn(this);const h=Kr(d.time,c,s,o);return d=vt(d.date,h),Rr(Ge(d,bt(l,"second")),a)}toJSON(){return b(this,W),Rr(this,"auto")}toLocaleString(e=void 0,t=void 0){if(b(this,W),typeof Intl.DurationFormat=="function"){const r=new Intl.DurationFormat(e,t);return gs.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),Rr(this,"auto")}valueOf(){St("Duration")}static from(e){return Qe(e)}static compare(e,t,r=void 0){const o=Qe(e),i=Qe(t),a=C(r),{plainRelativeTo:s,zonedRelativeTo:c}=Do(a);if(m(o,ve)===m(i,ve)&&m(o,Te)===m(i,Te)&&m(o,Ye)===m(i,Ye)&&m(o,De)===m(i,De)&&m(o,_e)===m(i,_e)&&m(o,Ee)===m(i,Ee)&&m(o,Me)===m(i,Me)&&m(o,xe)===m(i,xe)&&m(o,Ce)===m(i,Ce)&&m(o,Re)===m(i,Re))return 0;const l=gt(o),d=gt(i),h=mn(o),f=mn(i);if(c&&(yt(l)==="date"||yt(d)==="date")){const T=m(c,F),M=m(c,_),x=m(c,O),k=Xn(x,T,M,h),$=Xn(x,T,M,f);return Ie(u.toNumber(u.subtract(k,$)))}let g=h.date.days,y=f.date.days;if(tt(l)||tt(d)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");g=Si(h.date,s),y=Si(f.date,s)}const p=h.time.add24HourDays(g),w=f.time.add24HourDays(y);return p.cmp(w)}}Ct(Mn,"Temporal.Duration");class hi{constructor(e,t,r="iso8601",o=1972){const i=N(e),a=N(t),s=Pe(r===void 0?"iso8601":re(r)),c=N(o);Qt(c,i,a),Ua(this,{year:c,month:i,day:a},s)}get monthCode(){return ra(this,"monthCode")}get day(){return ra(this,"day")}get calendarId(){return b(this,Fe),m(this,_)}with(e,t=void 0){if(b(this,Fe),!V(e))throw new TypeError("invalid argument");On(e);const r=m(this,_);let o=$e(r,m(this,j),"month-day");return o=Vt(r,o,qe(r,e,["year","month","monthCode","day"],[],"partial")),gn(Gr(r,o,L(C(t))),r)}equals(e){b(this,Fe);const t=Ni(e);return lt(m(this,j),m(t,j))===0&&st(m(this,_),m(t,_))}toString(e=void 0){return b(this,Fe),Li(this,wr(C(e)))}toJSON(){return b(this,Fe),Li(this)}toLocaleString(e=void 0,t=void 0){return b(this,Fe),new Ve(e,t).format(this)}valueOf(){St("PlainMonthDay")}toPlainDate(e){if(b(this,Fe),!V(e))throw new TypeError("argument should be an object");const t=m(this,_);return Oe(Ut(t,Vt(t,$e(t,m(this,j),"month-day"),qe(t,e,["year"],[],[])),"constrain"),t)}static from(e,t=void 0){return Ni(e,t)}}function ra(n,e){b(n,Fe);const t=m(n,j);return Tr(n).isoToDate(t,{[e]:!0})[e]}function Eo(n){return Xe(n,Ho())}Ct(hi,"Temporal.PlainMonthDay");const ys={instant:()=>rt(Ho()),plainDateTimeISO:(n=Un())=>He(Eo(je(n)),"iso8601"),plainDateISO:(n=Un())=>Oe(Eo(je(n)).isoDate,"iso8601"),plainTimeISO:(n=Un())=>pt(Eo(je(n)).time),timeZoneId:()=>Un(),zonedDateTimeISO:(n=Un())=>{const e=je(n);return me(Ho(),e,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(ys,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});class jr{constructor(e=0,t=0,r=0,o=0,i=0,a=0){const s=e===void 0?0:N(e),c=t===void 0?0:N(t),l=r===void 0?0:N(r),d=o===void 0?0:N(o),h=i===void 0?0:N(i),f=a===void 0?0:N(a);ho(s,c,l,d,h,f),Fa(this,{hour:s,minute:c,second:l,millisecond:d,microsecond:h,nanosecond:f})}get hour(){return b(this,K),m(this,G).hour}get minute(){return b(this,K),m(this,G).minute}get second(){return b(this,K),m(this,G).second}get millisecond(){return b(this,K),m(this,G).millisecond}get microsecond(){return b(this,K),m(this,G).microsecond}get nanosecond(){return b(this,K),m(this,G).nanosecond}with(e,t=void 0){if(b(this,K),!V(e))throw new TypeError("invalid argument");On(e);const r=Io(e,"partial"),o=Io(this);let{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=Object.assign(o,r);const h=L(C(t));return{hour:i,minute:a,second:s,millisecond:c,microsecond:l,nanosecond:d}=co(i,a,s,c,l,d,h),new jr(i,a,s,c,l,d)}add(e){return b(this,K),Ji("add",this,e)}subtract(e){return b(this,K),Ji("subtract",this,e)}until(e,t=void 0){return b(this,K),Hi("until",this,e,t)}since(e,t=void 0){return b(this,K),Hi("since",this,e,t)}round(e){if(b(this,K),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Bt("smallestUnit",e):C(e),r=jn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et);return $n(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i],!1),pt(qo(m(this,G),r,i,o))}equals(e){b(this,K);const t=Nt(e);return Wo(m(this,G),m(t,G))===0}toString(e=void 0){b(this,K);const t=C(e),r=br(t),o=Je(t,"trunc"),i=Le(t,"smallestUnit","time",void 0);if(i==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const{precision:a,unit:s,increment:c}=vr(i,r);return Ii(qo(m(this,G),c,s,o),a)}toJSON(){return b(this,K),Ii(m(this,G),"auto")}toLocaleString(e=void 0,t=void 0){return b(this,K),new Ve(e,t).format(this)}valueOf(){St("PlainTime")}static from(e,t=void 0){return Nt(e,t)}static compare(e,t){const r=Nt(e),o=Nt(t);return Wo(m(r,G),m(o,G))}}Ct(jr,"Temporal.PlainTime");class mi{constructor(e,t,r="iso8601",o=1){const i=N(e),a=N(t),s=Pe(r===void 0?"iso8601":re(r)),c=N(o);Qt(i,a,c),Sa(this,{year:i,month:a,day:c},s)}get year(){return mt(this,"year")}get month(){return mt(this,"month")}get monthCode(){return mt(this,"monthCode")}get calendarId(){return b(this,ce),m(this,_)}get era(){return mt(this,"era")}get eraYear(){return mt(this,"eraYear")}get daysInMonth(){return mt(this,"daysInMonth")}get daysInYear(){return mt(this,"daysInYear")}get monthsInYear(){return mt(this,"monthsInYear")}get inLeapYear(){return mt(this,"inLeapYear")}with(e,t=void 0){if(b(this,ce),!V(e))throw new TypeError("invalid argument");On(e);const r=m(this,_);let o=$e(r,m(this,j),"year-month");return o=Vt(r,o,qe(r,e,["year","month","monthCode"],[],"partial")),yn(ar(r,o,L(C(t))),r)}add(e,t=void 0){return b(this,ce),ea("add",this,e,t)}subtract(e,t=void 0){return b(this,ce),ea("subtract",this,e,t)}until(e,t=void 0){return b(this,ce),Gi("until",this,e,t)}since(e,t=void 0){return b(this,ce),Gi("since",this,e,t)}equals(e){b(this,ce);const t=Vn(e);return lt(m(this,j),m(t,j))===0&&st(m(this,_),m(t,_))}toString(e=void 0){return b(this,ce),Ai(this,wr(C(e)))}toJSON(){return b(this,ce),Ai(this)}toLocaleString(e=void 0,t=void 0){return b(this,ce),new Ve(e,t).format(this)}valueOf(){St("PlainYearMonth")}toPlainDate(e){if(b(this,ce),!V(e))throw new TypeError("argument should be an object");const t=m(this,_);return Oe(Ut(t,Vt(t,$e(t,m(this,j),"year-month"),qe(t,e,["day"],[],[])),"constrain"),t)}static from(e,t=void 0){return Vn(e,t)}static compare(e,t){const r=Vn(e),o=Vn(t);return lt(m(r,j),m(o,j))}}function mt(n,e){b(n,ce);const t=m(n,j);return Tr(n).isoToDate(t,{[e]:!0})[e]}Ct(mi,"Temporal.PlainYearMonth");const qc=Ve.prototype.resolvedOptions;class fi{constructor(e,t,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");const o=Br(e);let i=re(t);const{tzName:a,offsetMinutes:s}=It(i);if(s===void 0){const c=Vr(a);if(!c)throw new RangeError(`unknown time zone ${a}`);i=c.identifier}else i=Jo(s);Za(this,o,i,Pe(r===void 0?"iso8601":re(r)))}get calendarId(){return b(this,Y),m(this,_)}get timeZoneId(){return b(this,Y),m(this,F)}get year(){return be(this,"year")}get month(){return be(this,"month")}get monthCode(){return be(this,"monthCode")}get day(){return be(this,"day")}get hour(){return cn(this,"hour")}get minute(){return cn(this,"minute")}get second(){return cn(this,"second")}get millisecond(){return cn(this,"millisecond")}get microsecond(){return cn(this,"microsecond")}get nanosecond(){return cn(this,"nanosecond")}get era(){return be(this,"era")}get eraYear(){return be(this,"eraYear")}get epochMilliseconds(){return b(this,Y),Ke(m(this,O),"floor")}get epochNanoseconds(){return b(this,Y),os(m(this,O))}get dayOfWeek(){return be(this,"dayOfWeek")}get dayOfYear(){return be(this,"dayOfYear")}get weekOfYear(){return be(this,"weekOfYear")?.week}get yearOfWeek(){return be(this,"weekOfYear")?.year}get hoursInDay(){b(this,Y);const e=m(this,F),t=et(this).isoDate,r=Ae(t.year,t.month,t.day+1),o=Ot(e,t),i=Ot(e,r);return nr(R.fromEpochNsDiff(i,o),"hour")}get daysInWeek(){return be(this,"daysInWeek")}get daysInMonth(){return be(this,"daysInMonth")}get daysInYear(){return be(this,"daysInYear")}get monthsInYear(){return be(this,"monthsInYear")}get inLeapYear(){return be(this,"inLeapYear")}get offset(){return b(this,Y),Lo(wt(m(this,F),m(this,O)))}get offsetNanoseconds(){return b(this,Y),wt(m(this,F),m(this,O))}with(e,t=void 0){if(b(this,Y),!V(e))throw new TypeError("invalid zoned-date-time-like");On(e);const r=m(this,_),o=m(this,F),i=wt(o,m(this,O)),a=et(this);let s={...$e(r,a.isoDate),...a.time,offset:Lo(i)};s=Vt(r,s,qe(r,e,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));const c=C(t),l=tr(c),d=Ur(c,"prefer"),h=Dr(r,s,L(c)),f=Nn(s.offset);return me(Hr(h.isoDate,h.time,"option",f,o,l,d,!1),o,r)}withPlainTime(e=void 0){b(this,Y);const t=m(this,F),r=m(this,_),o=et(this).isoDate;let i;return i=e===void 0?Ot(t,o):ge(t,U(o,m(Nt(e),G)),"compatible"),me(i,t,r)}withTimeZone(e){b(this,Y);const t=je(e);return me(m(this,O),t,m(this,_))}withCalendar(e){b(this,Y);const t=Er(e);return me(m(this,O),m(this,F),t)}add(e,t=void 0){return b(this,Y),ta("add",this,e,t)}subtract(e,t=void 0){return b(this,Y),ta("subtract",this,e,t)}until(e,t=void 0){return b(this,Y),Vi("until",this,e,t)}since(e,t=void 0){return b(this,Y),Vi("since",this,e,t)}round(e){if(b(this,Y),e===void 0)throw new TypeError("options parameter is required");const t=typeof e=="string"?Bt("smallestUnit",e):C(e),r=jn(t),o=Je(t,"halfExpand"),i=Le(t,"smallestUnit","time",Et,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];if($n(r,a,a===1),i==="nanosecond"&&r===1)return me(m(this,O),m(this,F),m(this,_));const s=m(this,F),c=m(this,O),l=et(this);let d;if(i==="day"){const h=l.isoDate,f=Ae(h.year,h.month,h.day+1),g=Ot(s,h),y=Ot(s,f),p=u.subtract(y,g);d=R.fromEpochNsDiff(c,g).round(p,o).addToEpochNs(g)}else{const h=Zo(l,r,i,o),f=wt(s,c);d=Hr(h.isoDate,h.time,"option",f,s,"compatible","prefer",!1)}return me(d,s,m(this,_))}equals(e){b(this,Y);const t=Qn(e),r=m(this,O),o=m(t,O);return!!u.equal(u.BigInt(r),u.BigInt(o))&&!!qa(m(this,F),m(t,F))&&st(m(this,_),m(t,_))}toString(e=void 0){b(this,Y);const t=C(e),r=wr(t),o=br(t),i=(function(f){return Tt(f,"offset",["auto","never"],"auto")})(t),a=Je(t,"trunc"),s=Le(t,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');const c=(function(f){return Tt(f,"timeZoneName",["auto","never","critical"],"auto")})(t),{precision:l,unit:d,increment:h}=vr(s,o);return Ui(this,l,r,c,i,{unit:d,increment:h,roundingMode:a})}toLocaleString(e=void 0,t=void 0){b(this,Y);const r=C(t),o=Object.create(null);if((function(c,l,d,h){if(l==null)return;const f=Reflect.ownKeys(l);for(let g=0;g<f.length;g++){const y=f[g];if(!d.some((p=>Object.is(p,y)))&&Object.prototype.propertyIsEnumerable.call(l,y)){const p=l[y];c[y]=p}}})(o,r,["timeZone"]),r.timeZone!==void 0)throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");if(o.year===void 0&&o.month===void 0&&o.day===void 0&&o.era===void 0&&o.weekday===void 0&&o.dateStyle===void 0&&o.hour===void 0&&o.minute===void 0&&o.second===void 0&&o.fractionalSecondDigits===void 0&&o.timeStyle===void 0&&o.dayPeriod===void 0&&o.timeZoneName===void 0&&(o.timeZoneName="short"),o.timeZone=m(this,F),Fi(o.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");const i=new Ve(e,o),a=qc.call(i).calendar,s=m(this,_);if(s!=="iso8601"&&a!=="iso8601"&&!st(a,s))throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);return i.format(rt(m(this,O)))}toJSON(){return b(this,Y),Ui(this,"auto")}valueOf(){St("ZonedDateTime")}startOfDay(){b(this,Y);const e=m(this,F);return me(Ot(e,et(this).isoDate),e,m(this,_))}getTimeZoneTransition(e){b(this,Y);const t=m(this,F);if(e===void 0)throw new TypeError("options parameter is required");const r=Tt(typeof e=="string"?Bt("direction",e):C(e),"direction",["next","previous"],Et);if(r===void 0)throw new TypeError("direction option is required");if(Fi(t)||t==="UTC")return null;const o=m(this,O),i=r==="next"?ti(t,o):Uo(t,o);return i===null?null:me(i,t,m(this,_))}toInstant(){return b(this,Y),rt(m(this,O))}toPlainDate(){return b(this,Y),Oe(et(this).isoDate,m(this,_))}toPlainTime(){return b(this,Y),pt(et(this).time)}toPlainDateTime(){return b(this,Y),He(et(this),m(this,_))}static from(e,t=void 0){return Qn(e,t)}static compare(e,t){const r=Qn(e),o=Qn(t),i=m(r,O),a=m(o,O);return u.lessThan(u.BigInt(i),u.BigInt(a))?-1:u.greaterThan(u.BigInt(i),u.BigInt(a))?1:0}}function et(n){return Xe(m(n,F),m(n,O))}function be(n,e){b(n,Y);const t=et(n).isoDate;return Tr(n).isoToDate(t,{[e]:!0})[e]}function cn(n,e){return b(n,Y),et(n).time[e]}Ct(fi,"Temporal.ZonedDateTime");var Mt=Object.freeze({__proto__:null,Duration:Mn,Instant:li,Now:ys,PlainDate:ui,PlainDateTime:di,PlainMonthDay:hi,PlainTime:jr,PlainYearMonth:mi,ZonedDateTime:fi});const Wc=[li,ui,di,Mn,hi,jr,mi,fi];for(const n of Wc){const e=Object.getOwnPropertyDescriptor(n,"prototype");(e.configurable||e.enumerable||e.writable)&&(e.configurable=!1,e.enumerable=!1,e.writable=!1,Object.defineProperty(n,"prototype",e))}const eo="YYYY/MM/DD",xn=n=>`${n.year.toString().padStart(4,"0")}/${n.month.toString().padStart(2,"0")}/${n.day.toString().padStart(2,"0")}`,gi=n=>`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}`,Sn=n=>`${new Intl.DateTimeFormat("en-US",{month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(n.year,n.month-1,n.day)))} ${n.day}`,ps=n=>`${n.hour%12||12}:${n.minute.toString().padStart(2,"0")} ${n.hour<12?"AM":"PM"}`,kt=n=>Mt.Now.instant().toZonedDateTimeISO(n||Mt.Now.timeZoneId()),Go=n=>gi(kt(n.timezone.name).toPlainTime()),ws=n=>xn(kt(n.timezone.name).toPlainDate()),Hc=n=>xn(kt().add({days:n}).toPlainDate()),Gc=n=>n&&kt(n).offset,Mo=(n,e="desktop")=>{const t=n.startDate?oa(n.startDate):null,r=n.endDate?oa(n.endDate):null,o=Gc(n.timezone.name);return!t||!r||!n.startTime||!n.endTime?"Select range":e==="mobile"?Mt.PlainDate.compare(t,r)===0?`${Sn(t)} · ${n.startTime}`:`${Sn(t)}–${Sn(r)}`:e==="tablet"?`${Sn(t)}, 00:00 → ${Sn(r)}, 00:00${o?` (${o})`:""}`:`${xn(t)} ${n.startTime} - ${xn(r)} ${n.endTime}${o?` (${o})`:""}`},oa=n=>Mt.PlainDate.from(n.replace(/\//g,"-")),Wt=(n,e)=>Mt.PlainDateTime.from(`${n.replace(/\//g,"-")}T${e}`),yi=(n,e="all")=>{const t=kt(n).toPlainDate().toString();return{minDate:e==="future"?t:void 0,maxDate:e==="past"?t:void 0}},Yt=(n,e,t,r="all")=>{if(r==="all")return null;const o=Wt(n,e),i=kt(t).toPlainDateTime(),a=Mt.PlainDateTime.compare(o,i);return r==="future"&&a<0?"Date and time must not be before now":r==="past"&&a>0?"Date and time must not be after now":null},Vc=(n,e)=>({[`${e}s`]:n}),bs=(n,e,t,r,o)=>{const i=Wt(n,e).add(Vc(t*o,r));return{date:xn(i.toPlainDate()),time:gi(i.toPlainTime())}},ln=(n,e,t,r)=>bs(n,e,t,r,-1),un=(n,e,t,r)=>bs(n,e,t,r,1),mr=(n,e,t)=>Wt(n,e).toZonedDateTime(t).toInstant().toString(),fr=(n,e)=>{const t=Mt.Instant.from(n).toZonedDateTimeISO(e);return{date:xn(t.toPlainDate()),time:gi(t.toPlainTime())}},Qc=(n,e="en-US")=>new Intl.DateTimeFormat(e,{timeZone:n,timeZoneName:"long"}).formatToParts(new Date).find(t=>t.type==="timeZoneName")?.value||"",Xc=n=>{const e=n[0]==="-"?-1:1,[t,r]=n.slice(1).split(":").map(Number);return e*(t*60+r)},Kc=n=>{const e=kt(n),t=e.offset;return{name:n,longName:Qc(n),currentTime:ps(e),utcOffset:t,offsetMinutes:Xc(t)}},Bc=()=>{const n=Intl.supportedValuesOf;return["UTC",...n?n.call(Intl,"timeZone"):[Intl.DateTimeFormat().resolvedOptions().timeZone]].filter((t,r,o)=>o.indexOf(t)===r).map(t=>Kc(t)).sort((t,r)=>t.name==="UTC"?-1:r.name==="UTC"?1:t.offsetMinutes-r.offsetMinutes)},Ir={"timezone-panel-container":"_timezone-panel-container_tykz4_1","search-container":"_search-container_tykz4_6","timezone-scroll-area":"_timezone-scroll-area_tykz4_15","list-container":"_list-container_tykz4_21"},pi={"form-container":"_form-container_1xxf4_1"},vs=A.createContext(void 0),rn=()=>{const n=A.useContext(vs);if(!n)throw new Error("usePopoverContext must be used within a PopoverProvider");return n},Jc=({children:n})=>{const[e,t]=A.useState(!1),r=()=>{t(!1)};return v.jsx(vs.Provider,{value:{popoverOpened:e,setPopoverOpened:t,closePopover:r},children:n})},wi=({onBasic:n})=>{const{theme:e}=to(),{closePopover:t}=rn(),r=_t.useMediaQuery("(max-width: 48em)"),o=_t.useMediaQuery("(max-width: 64em)");return v.jsxs(E.Flex,{justify:"space-between",align:"flex-end",gap:12,mt:12,pb:12,children:[v.jsx(E.Button,{type:"button",size:"xs",variant:"subtle",color:e.primaryColor,onClick:n,children:"Basic"}),v.jsxs(E.Flex,{direction:r?"column":"row",gap:12,flex:o?1:void 0,children:[v.jsx(E.Button,{size:"xs",variant:"subtle",color:e.primaryColor,onClick:t,fullWidth:o,children:"Cancel"}),v.jsx(E.Button,{type:"submit",size:"xs",color:e.primaryColor,fullWidth:o,children:"Apply"})]})]})},Ts=({tzRange:n,onBasic:e})=>{const[t,r]=A.useState(n.timezone),[o,i]=A.useState([]),[a,s]=A.useState(""),c=_t.useMediaQuery("(max-width: 64em)"),{closePopover:l}=rn(),d=A.useMemo(()=>Bc(),[]);A.useEffect(()=>{i(d)},[]),ua(()=>{if(a===""){i(d);return}i(d.filter(y=>y.name.toLowerCase().includes(a.toLocaleLowerCase())||y.longName.toLowerCase().includes(a.toLocaleLowerCase())||y.currentTime.toLowerCase().includes(a.toLocaleLowerCase())||y.utcOffset.toLowerCase().includes(a.toLocaleLowerCase())))},250,[a]);const h=y=>{r(y)},f=y=>{if(y.preventDefault(),!t?.name||!n.timezone.name||!n.startDate||!n.startTime||!n.endDate||!n.endTime)return;const p=mr(n.startDate,n.startTime,n.timezone.name),w=mr(n.endDate,n.endTime,n.timezone.name),T=fr(p,t.name),M=fr(w,t.name);n.onApply({startDate:T.date,startTime:T.time,endDate:M.date,endTime:M.time,timezone:t||{name:null,longName:null,utcOffset:null}}),c&&l()},g=y=>y?ps(kt(y)):"";return v.jsxs("form",{className:pi["form-container"],onSubmit:f,children:[v.jsxs(E.Flex,{direction:"column",className:Ir["timezone-panel-container"],children:[v.jsx(E.Box,{className:Ir["search-container"],children:v.jsx(Us,{searchText:a,setSearchText:s})}),v.jsxs(E.Box,{className:Ir["timezone-scroll-area"],children:[v.jsx(E.Text,{fw:600,px:12,children:"My Location"}),v.jsx(E.Flex,{direction:"column",children:v.jsx(_i,{isBrowserTimezone:!0,name:n.timezone?.name,longName:n.timezone?.longName,currentTime:g(n.timezone?.name),utcOffset:n.timezone?.utcOffset,selectedTimezone:t})}),v.jsx(E.Text,{fw:600,px:12,children:"Locations"}),v.jsx(E.Flex,{direction:"column",className:Ir["list-container"],children:o.map((y,p)=>v.jsx(_i,{name:y.name,longName:y.longName,currentTime:y.currentTime,utcOffset:y.utcOffset,selectedTimezone:t,handleTimezoneMouseClick:h},p))})]})]}),v.jsx(E.Box,{px:12,children:v.jsx(wi,{onBasic:e})})]})};var Ds=(n=>(n.ThirtySeconds="± 30 seconds",n.OneMinute="± 1 minute",n.FifteenMinutes="± 15 minutes",n.ThirtyMinutes="± 30 minutes",n.OneHour="± 1 hour",n.OneDay="± 1 day",n))(Ds||{});const el=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],ia=(n,e,t)=>{switch(t){case"± 30 seconds":const r=ln(n,e,30,"second"),o=un(n,e,30,"second");return{startDate:r.date,startTime:r.time,endDate:o.date,endTime:o.time};case"± 1 minute":const i=ln(n,e,1,"minute"),a=un(n,e,1,"minute");return{startDate:i.date,startTime:i.time,endDate:a.date,endTime:a.time};case"± 15 minutes":const s=ln(n,e,15,"minute"),c=un(n,e,15,"minute");return{startDate:s.date,startTime:s.time,endDate:c.date,endTime:c.time};case"± 30 minutes":const l=ln(n,e,30,"minute"),d=un(n,e,30,"minute");return{startDate:l.date,startTime:l.time,endDate:d.date,endTime:d.time};case"± 1 hour":const h=ln(n,e,1,"hour"),f=un(n,e,1,"hour");return{startDate:h.date,startTime:h.time,endDate:f.date,endTime:f.time};case"± 1 day":const g=ln(n,e,1,"day"),y=un(n,e,1,"day");return{startDate:g.date,startTime:g.time,endDate:y.date,endTime:y.time};default:return{startDate:n,startTime:e,endDate:n,endTime:e}}},tl=({tzRange:n,onBasic:e})=>{const t=_t.useMediaQuery("(max-width: 64em)"),{closePopover:r}=rn(),o=n.timezone.utcOffset?`GMT${n.timezone.utcOffset}`:n.timezone?.longName,i=n.options?.allowedTimeRange,a=yi(n.timezone.name,i),s=la.useForm({initialValues:{date:n.startDate??ws(n),time:n.startTime??Go(n),duration:Ds.OneDay},validate:{date:(l,d)=>l?d.time?Yt(l,d.time,n.timezone.name,i):null:"Date is required",time:(l,d)=>l?d.date?Yt(d.date,l,n.timezone.name,i):null:"Time is required",duration:(l,d)=>{if(!l)return"Duration is required";if(!d.date||!d.time)return null;const h=ia(d.date,d.time,l);return Yt(h.startDate,h.startTime,n.timezone.name,i)||Yt(h.endDate,h.endTime,n.timezone.name,i)}}}),c=l=>{if(!n.timezone.name)return;const d=mr(l.date,l.time,n.timezone.name),h=fr(d,n.timezone.name),{startDate:f,startTime:g,endDate:y,endTime:p}=ia(h.date,h.time,l.duration);n.onApply({startDate:f,startTime:g,endDate:y,endTime:p,timezone:n.timezone}),t&&r()};return v.jsx(E.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:v.jsxs("form",{className:pi["form-container"],onSubmit:s.onSubmit(c),children:[v.jsxs(E.Box,{children:[v.jsx(E.Text,{fw:600,children:"Around a time"}),v.jsxs(E.Flex,{direction:"column",gap:8,mt:12,children:[v.jsx(Zt.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...s.getInputProps("date"),popoverProps:{withinPortal:!1},minDate:a.minDate,maxDate:a.maxDate,valueFormat:eo,leftSection:v.jsx(Fr,{stroke:1.5})},s.key("date")),v.jsx(Zt.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...s.getInputProps("time"),leftSection:v.jsx(Sr,{stroke:1.5}),rightSection:t?void 0:v.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:n.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("time")),t&&o?v.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:o}):null,v.jsx(E.Select,{label:"Duration",placeholder:"Pick value",data:el,...s.getInputProps("duration"),comboboxProps:{withinPortal:!1}},s.key("duration"))]})]}),v.jsx(wi,{onBasic:e})]})})},zn={"sidebar-container":"_sidebar-container_1cvpv_1","sidebar-mobile-relative":"_sidebar-mobile-relative_1cvpv_11","sidebar-row":"_sidebar-row_1cvpv_17"};var he=(n=>(n.RELATIVE_TIME="Relative time",n.START_END_TIME="Start and end times",n.AROUND_TIME="Around a time",n.TIMEZONE="Time zone",n))(he||{});const Cn=n=>n.toPlainDateTime().toString({smallestUnit:"second"}),nl=(n,e)=>({[e]:n}),dn=(n,e,t,r)=>{const o=r.slice(0,-1),i=nl(t,r),a=e==="Last";return{label:`${e} ${t} ${t===1?o:r}`,searchKey:`${a?"-":"+"}${t}${o[0]}`,startTime:Cn(a?n.subtract(i):n),endTime:Cn(a?n:n.add(i)),unit:r,direction:a?"past":"future"}},xo=(n,e,t)=>{const r=n.add({days:t});return{label:e,searchKey:e.toLowerCase(),startTime:Cn(r.startOfDay()),endTime:Cn(r.startOfDay().add({days:1})),unit:"days",direction:t<0?"past":t>0?"future":"present"}},aa=(n,e,t,r)=>{const o=n.startOfDay(),i=e==="Last",a=i?o.subtract({days:t}):r?o:o.add({days:1}),s=i?r?o.add({days:1}):o:o.add({days:t+1});return{label:`${e} ${t} ${t===1?"day":"days"}`,searchKey:`${i?"-":"+"}${t}d`,startTime:Cn(a),endTime:Cn(s),unit:"days",direction:i?"past":"future"}},rl=(n,e)=>[xo(n,"Today",0),xo(n,"Tomorrow",1),xo(n,"Yesterday",-1),...[15,30].map(t=>dn(n,"Last",t,"seconds")),...[15,30].map(t=>dn(n,"Next",t,"seconds")),...[5,10,15,30,45].map(t=>dn(n,"Last",t,"minutes")),...[5,10,15,30,45].map(t=>dn(n,"Next",t,"minutes")),...[1,3,6,12].map(t=>dn(n,"Last",t,"hours")),...[1,3,6,12].map(t=>dn(n,"Next",t,"hours")),...[1,2,7,14,30].map(t=>aa(n,"Last",t,e)),...[1,2,7,14,30].map(t=>aa(n,"Next",t,e))],ol=(n,e)=>n==="seconds"?!e?.disableSeconds:n==="minutes"?!e?.disableMinutes:n==="hours"?!e?.disableHours:n==="days"?!e?.disableDays:!0,Vo=(n,e)=>{const t=kt(n),r=e?.allowedTimeRange??"all",o=rl(t,e?.includeTodayInQuickRanges??!1).filter(i=>ol(i.unit,e)?r==="past"?i.direction==="past":r==="future"?i.direction==="future":!0:!1);return o.map((i,a)=>({...i,lineBreak:a<o.length-1&&o[a+1].unit!==i.unit}))},$t={"relative-time-root":"_relative-time-root_emohw_1","relative-time-panel-container":"_relative-time-panel-container_emohw_9","time-row":"_time-row_emohw_16","time-row-dark":"_time-row-dark_emohw_20","time-row-light":"_time-row-light_emohw_26"},sa=({tzRange:n})=>{const[e,t]=A.useState([]),[r,o]=A.useState(""),{colorScheme:i}=to(),{closePopover:a}=rn();A.useEffect(()=>{if(n.timezone.name!==null){const c=Vo(n.timezone.name,n.options);t(c)}},[n.timezone,n.options]),ua(()=>{if(!n.timezone.name)return;const c=Vo(n.timezone.name,n.options);if(r===""){t(c);return}const l=r.toLowerCase();t(c.filter(d=>d.searchKey.includes(l)||d.label.toLowerCase().includes(l)))},250,[r,n.timezone,n.options]);const s=c=>{const[l,d]=c.startTime.split("T"),[h,f]=c.endTime.split("T");n.onApply({startDate:l,startTime:d.slice(0,8),endDate:h,endTime:f.slice(0,8),timezone:n.timezone}),a()};return v.jsxs(E.Flex,{direction:"column",className:$t["relative-time-root"],children:[v.jsx(E.Box,{style:{width:"90%"},mx:"auto",children:v.jsx(E.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:r,onChange:c=>o(c.currentTarget.value)})}),v.jsx(E.Flex,{direction:"column",className:$t["relative-time-panel-container"],children:e.map(c=>v.jsxs(E.Flex,{align:"center",justify:"space-between",className:Qo(i==="dark"?$t["time-row-dark"]:$t["time-row-light"],$t["time-row"]),py:4,px:12,mb:c.lineBreak?8:0,onClick:()=>s(c),children:[v.jsx(E.Text,{size:"sm",children:c.label}),v.jsx(E.Text,{size:"xs",c:"#5f6368",children:c.searchKey})]},c.label))})]})},ca=({setSelectedPanel:n,tzRange:e,mobileOnlyRelative:t=!1})=>t?v.jsx(E.Box,{className:zn["sidebar-mobile-relative"],children:v.jsx(sa,{tzRange:e})}):v.jsxs(E.Box,{className:zn["sidebar-container"],flex:1,children:[v.jsx(sa,{tzRange:e}),v.jsxs(E.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[v.jsxs(E.Flex,{className:zn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.START_END_TIME),children:[v.jsxs(E.Flex,{align:"center",children:[v.jsx(As,{stroke:1.5}),v.jsx(E.Text,{size:"sm",children:"Start and end times"})]}),v.jsx(bo,{stroke:1.5})]}),v.jsxs(E.Flex,{className:zn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.AROUND_TIME),children:[v.jsxs(E.Flex,{align:"center",children:[v.jsx(Sr,{stroke:1.5}),v.jsx(E.Text,{size:"sm",children:"Around a time"})]}),v.jsx(bo,{stroke:1.5})]}),v.jsxs(E.Flex,{className:zn["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>n(he.TIMEZONE),children:[v.jsxs(E.Flex,{align:"center",children:[v.jsx(Is,{stroke:1.5}),v.jsx(E.Text,{size:"sm",children:"Time zone"})]}),v.jsx(bo,{stroke:1.5})]})]})]}),il=({tzRange:n,onBasic:e})=>{const t=_t.useMediaQuery("(max-width: 64em)"),{closePopover:r}=rn(),o=n.timezone.utcOffset?`GMT${n.timezone.utcOffset}`:n.timezone?.longName,i=n.options?.allowedTimeRange,a=yi(n.timezone.name,i),s=la.useForm({mode:"uncontrolled",initialValues:{startDate:n.startDate??ws(n),startTime:n.startTime??Go(n),endDate:n.endDate??Hc(30),endTime:n.endTime??Go(n)},validate:{startDate:(l,d)=>l?d.startTime?Yt(l,d.startTime,n.timezone.name,i):null:"Start date is required",startTime:(l,d)=>l?d.startDate?Yt(d.startDate,l,n.timezone.name,i):null:"Start time is required",endDate:(l,d)=>{if(!l)return"End date is required";if(!d.endTime)return null;const h=Yt(l,d.endTime,n.timezone.name,i);if(h)return h;const f=Wt(d.startDate,d.startTime),g=Wt(l,d.endTime);return Mt.PlainDateTime.compare(g,f)>=0?null:"End time must be after start time"},endTime:(l,d)=>{if(!l)return"End time is required";if(!d.endDate)return null;const h=Yt(d.endDate,l,n.timezone.name,i);if(h)return h;const f=Wt(d.startDate,d.startTime),g=Wt(d.endDate,l);return Mt.PlainDateTime.compare(g,f)>=0?null:"End time must be after start time"}}}),c=l=>{if(!n.timezone.name)return;const d=mr(l.startDate,l.startTime,n.timezone.name),h=mr(l.endDate,l.endTime,n.timezone.name),f=fr(d,n.timezone.name),g=fr(h,n.timezone.name);n.onApply({startDate:f.date,startTime:f.time,endDate:g.date,endTime:g.time,timezone:n.timezone}),t&&r()};return v.jsx(E.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:v.jsxs("form",{className:pi["form-container"],onSubmit:s.onSubmit(c),children:[v.jsxs(E.Box,{children:[v.jsx(E.Text,{fw:600,children:"Start and end times"}),v.jsxs(E.Flex,{direction:"column",gap:8,mt:12,children:[v.jsx(Zt.DatePickerInput,{label:"Start time",...s.getInputProps("startDate"),popoverProps:{withinPortal:!1},minDate:a.minDate,maxDate:a.maxDate,valueFormat:eo,leftSection:v.jsx(Fr,{stroke:1.5})},s.key("startDate")),v.jsx(Zt.TimeInput,{withSeconds:!0,...s.getInputProps("startTime"),leftSection:v.jsx(Sr,{stroke:1.5}),rightSection:t?void 0:v.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic"},children:n.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("startTime")),t&&o?v.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:o}):null,v.jsx(Zt.DatePickerInput,{label:"End time",...s.getInputProps("endDate"),popoverProps:{withinPortal:!1},minDate:a.minDate,maxDate:a.maxDate,valueFormat:eo,leftSection:v.jsx(Fr,{stroke:1.5})},s.key("endDate")),v.jsx(Zt.TimeInput,{withSeconds:!0,...s.getInputProps("endTime"),leftSection:v.jsx(Sr,{stroke:1.5}),rightSection:t?void 0:v.jsx(E.Text,{style:{fontSize:12,fontStyle:"italic"},children:n.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("endTime")),t&&o?v.jsx(E.Text,{size:"xs",c:"dimmed",mt:-4,children:o}):null]})]}),v.jsx(wi,{onBasic:e})]})})},Rt={"trigger-button":"_trigger-button_1rr9j_1","picker-shell":"_picker-shell_1rr9j_18","basic-view":"_basic-view_1rr9j_22","basic-quick-options":"_basic-quick-options_1rr9j_26","drawer-view":"_drawer-view_1rr9j_32","mobile-layout":"_mobile-layout_1rr9j_43","mobile-nav":"_mobile-nav_1rr9j_50","mobile-content":"_mobile-content_1rr9j_54"},al=({tzRange:n,onBasic:e})=>{const[t,r]=A.useState(he.START_END_TIME),o=_t.useMediaQuery("(max-width: 64em)");A.useEffect(()=>{!o&&t===he.RELATIVE_TIME&&r(he.START_END_TIME)},[o,t]);const i=()=>{switch(t){case he.RELATIVE_TIME:return v.jsx(ca,{tzRange:n,setSelectedPanel:r,mobileOnlyRelative:!0});case he.START_END_TIME:return v.jsx(il,{tzRange:n,onBasic:e});case he.AROUND_TIME:return v.jsx(tl,{tzRange:n,onBasic:e});case he.TIMEZONE:return v.jsx(Ts,{tzRange:n,onBasic:e});default:return null}};return o?v.jsxs("div",{className:Rt["mobile-layout"],children:[v.jsx("div",{className:Rt["mobile-nav"],children:v.jsx(E.SegmentedControl,{fullWidth:!0,value:t,onChange:a=>r(a),data:[{label:"Quick",value:he.RELATIVE_TIME},{label:"Range",value:he.START_END_TIME},{label:"Around",value:he.AROUND_TIME},{label:"TZ",value:he.TIMEZONE}]})}),v.jsx("div",{className:Rt["mobile-content"],children:i()})]}):v.jsxs(E.Flex,{className:Rt["picker-shell"],children:[v.jsx(ca,{tzRange:n,setSelectedPanel:r}),i()]})},Lr=n=>n?.replace(/\//g,"-")??null,Ar=n=>n.replace(/-/g,"/"),sl=({tzRange:n,onAdvanced:e})=>{const[t,r]=A.useState([Lr(n.startDate),Lr(n.endDate)]),{colorScheme:o}=to(),{closePopover:i}=rn();A.useEffect(()=>{r([Lr(n.startDate),Lr(n.endDate)])},[n.startDate,n.endDate]);const a=A.useMemo(()=>n.timezone.name?Vo(n.timezone.name,{disableSeconds:!0,disableMinutes:!0,disableHours:!0,allowedTimeRange:n.options?.allowedTimeRange,includeTodayInQuickRanges:n.options?.includeTodayInQuickRanges}):[],[n.timezone.name,n.options?.allowedTimeRange,n.options?.includeTodayInQuickRanges]),s=yi(n.timezone.name,n.options?.allowedTimeRange),c=([d,h])=>{r([d,h]),!(!d||!h)&&n.onApply({startDate:Ar(d),startTime:"00:00:00",endDate:Ar(h),endTime:"00:00:00",timezone:n.timezone})},l=(d,h)=>{const[f]=d.split("T"),[g]=h.split("T");n.onApply({startDate:Ar(f),startTime:"00:00:00",endDate:Ar(g),endTime:"00:00:00",timezone:n.timezone}),i()};return v.jsxs(E.Flex,{direction:"column",className:Rt["basic-view"],children:[v.jsx(Zt.DatePickerInput,{type:"range",label:"Date range",value:t,onChange:c,valueFormat:eo,popoverProps:{withinPortal:!1},minDate:s.minDate,maxDate:s.maxDate,leftSection:v.jsx(Fr,{stroke:1.5})}),v.jsx(E.Text,{size:"sm",fw:600,mt:12,children:"Quick options"}),v.jsx(E.Flex,{direction:"column",className:Rt["basic-quick-options"],mt:4,children:a.map(d=>v.jsxs(E.Flex,{align:"center",justify:"space-between",className:Qo($t["time-row"],o==="dark"?$t["time-row-dark"]:$t["time-row-light"]),py:4,px:8,onClick:()=>l(d.startTime,d.endTime),children:[v.jsx(E.Text,{size:"sm",children:d.label}),v.jsx(E.Text,{size:"xs",c:"dimmed",children:d.searchKey})]},d.label))}),v.jsx(E.Button,{variant:"subtle",size:"xs",fullWidth:!0,mt:8,onClick:i,children:"Cancel"}),v.jsx(E.Button,{variant:"subtle",size:"xs",fullWidth:!0,mt:4,onClick:e,children:"Advanced"})]})},cl=n=>{const[e,t]=A.useState("basic"),{popoverOpened:r,setPopoverOpened:o}=rn(),i=_t.useMediaQuery("(max-width: 48em)"),a=_t.useMediaQuery("(max-width: 64em)"),s=()=>{o(f=>!f)},c=A.useMemo(()=>Mo(n,"desktop"),[n.startDate,n.startTime,n.endDate,n.endTime,n.timezone]),l=A.useMemo(()=>i?Mo(n,"mobile"):a?Mo(n,"tablet"):c,[c,i,a,n]),d=e==="basic"?v.jsx(sl,{tzRange:n,onAdvanced:()=>t("advanced")}):v.jsx(al,{tzRange:n,onBasic:()=>t("basic")}),h=v.jsx(E.Button,{onClick:s,style:n.buttonStyle||{},className:Rt["trigger-button"],title:c,children:l});return a?v.jsxs(v.Fragment,{children:[h,v.jsx(E.Drawer,{opened:r,onClose:()=>o(!1),size:"100%",padding:0,title:"Select time range",styles:{content:{display:"flex",flexDirection:"column"},body:{flex:1,overflow:"hidden",padding:0}},children:v.jsx("div",{className:Rt["drawer-view"],children:d})})]}):v.jsxs(E.Popover,{position:"bottom",shadow:"md",opened:r,onChange:o,children:[v.jsx(E.Popover.Target,{children:h}),v.jsx(E.Popover.Dropdown,{style:{width:e==="basic"?260:700,height:e==="basic"?"auto":400,padding:0},children:d})]})},ll=n=>v.jsx(Jc,{children:v.jsx(cl,{...n})});exports.Panel=he;exports.TimezonePanel=Ts;exports.TimezoneRangePicker=ll;
|
|
63
63
|
//# sourceMappingURL=index.cjs.js.map
|