headless-react-datepicker
Version:
A headless, highly customizable, multi-calendar date picker component for React. It supports various calendars and locales.
1 lines • 206 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function i(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;class o extends Array{constructor(e,t){if(super(e),this.sign=t,Object.setPrototypeOf(this,o.prototype),e>o.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Math.floor,r=Number.isFinite;if("number"==typeof e){if(0===e)return o.__zero();if(o.__isOneDigitInt(e))return 0>e?o.__oneDigit(-e,!0):o.__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 o.__fromDouble(e)}if("string"==typeof e){const t=o.__fromString(e);if(null===t)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return t}if("boolean"==typeof e)return!0===e?o.__oneDigit(1,!1):o.__zero();if("object"==typeof e){if(e.constructor===o)return e;const t=o.__toPrimitive(e);return o.BigInt(t)}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):t)+", ");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 0===this.length?"0":e&e-1?o.__toStringGeneric(this,e,!1):o.__toStringBasePowerOfTwo(this,e)}valueOf(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}static toNumber(e){const t=e.length;if(0===t)return 0;if(1===t){const t=e.__unsignedDigit(0);return e.sign?-t:t}const r=e.__digit(t-1),n=o.__clz30(r),i=30*t-n;if(1024<i)return e.sign?-1/0:1/0;let a=i-1,s=r,l=t-1;const c=n+3;let d=32===c?0:s<<c;d>>>=12;const h=c-12;let u=12<=c?0:s<<20+c,m=20+c;for(0<h&&0<l&&(l--,s=e.__digit(l),d|=s>>>30-h,u=s<<h+2,m=h+2);0<m&&0<l;)l--,s=e.__digit(l),u|=30<=m?s<<m-30:s>>>30-m,m-=30;const f=o.__decideRounding(e,m,l,s);if((1===f||0===f&&!(1&~u))&&(u=u+1>>>0,0===u&&(d++,0!=d>>>20&&(d=0,a++,1023<a))))return e.sign?-1/0:1/0;const y=e.sign?-2147483648:0;return a=a+1023<<20,o.__kBitConversionInts[o.__kBitConversionIntHigh]=y|a|d,o.__kBitConversionInts[o.__kBitConversionIntLow]=u,o.__kBitConversionDouble[0]}static unaryMinus(e){if(0===e.length)return e;const t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?o.__absoluteSubOne(e).__trim():o.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return o.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return!e.sign||1&t.__digit(0)?e:o.unaryMinus(e);if(1<t.length)throw new RangeError("BigInt too big");let r=t.__unsignedDigit(0);if(1===r)return e;if(r>=o.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){const t=1+(0|r/30),n=e.sign&&!!(1&r),i=new o(t,n);i.__initializeDigits();const a=1<<r%30;return i.__setDigit(t-1,a),i}let n=null,i=e;for(!!(1&r)&&(n=e),r>>=1;0!==r;r>>=1)i=o.multiply(i,i),1&r&&(n=null===n?i:o.multiply(n,i));return n}static multiply(e,t){if(0===e.length)return e;if(0===t.length)return t;let r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;const n=new o(r,e.sign!==t.sign);n.__initializeDigits();for(let r=0;r<e.length;r++)o.__multiplyAccumulate(t,e.__digit(r),n,r);return n.__trim()}static divide(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>o.__absoluteCompare(e,t))return o.__zero();const r=e.sign!==t.sign,n=t.__unsignedDigit(0);let i;if(1===t.length&&32767>=n){if(1===n)return r===e.sign?e:o.unaryMinus(e);i=o.__absoluteDivSmall(e,n,null)}else i=o.__absoluteDivLarge(e,t,!0,!1);return i.sign=r,i.__trim()}static remainder(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>o.__absoluteCompare(e,t))return e;const r=t.__unsignedDigit(0);if(1===t.length&&32767>=r){if(1===r)return o.__zero();const t=o.__absoluteModSmall(e,r);return 0===t?o.__zero():o.__oneDigit(t,e.sign)}const n=o.__absoluteDivLarge(e,t,!1,!0);return n.sign=e.sign,n.__trim()}static add(e,t){const r=e.sign;return r===t.sign?o.__absoluteAdd(e,t,r):0<=o.__absoluteCompare(e,t)?o.__absoluteSub(e,t,r):o.__absoluteSub(t,e,!r)}static subtract(e,t){const r=e.sign;return r===t.sign?0<=o.__absoluteCompare(e,t)?o.__absoluteSub(e,t,r):o.__absoluteSub(t,e,!r):o.__absoluteAdd(e,t,r)}static leftShift(e,t){return 0===t.length||0===e.length?e:t.sign?o.__rightShiftByAbsolute(e,t):o.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return 0===t.length||0===e.length?e:t.sign?o.__leftShiftByAbsolute(e,t):o.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>o.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=o.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<o.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=o.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign)return!1;if(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!o.equal(e,t)}static bitwiseAnd(e,t){var r=Math.max;if(!e.sign&&!t.sign)return o.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){const n=r(e.length,t.length)+1;let i=o.__absoluteSubOne(e,n);const a=o.__absoluteSubOne(t);return i=o.__absoluteOr(i,a,i),o.__absoluteAddOne(i,!0,i).__trim()}return e.sign&&([e,t]=[t,e]),o.__absoluteAndNot(e,o.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){var r=Math.max;if(!e.sign&&!t.sign)return o.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){const n=r(e.length,t.length),i=o.__absoluteSubOne(e,n),a=o.__absoluteSubOne(t);return o.__absoluteXor(i,a,i).__trim()}const n=r(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let i=o.__absoluteSubOne(t,n);return i=o.__absoluteXor(i,e,i),o.__absoluteAddOne(i,!0,i).__trim()}static bitwiseOr(e,t){const r=(0,Math.max)(e.length,t.length);if(!e.sign&&!t.sign)return o.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let n=o.__absoluteSubOne(e,r);const i=o.__absoluteSubOne(t);return n=o.__absoluteAnd(n,i,n),o.__absoluteAddOne(n,!0,n).__trim()}e.sign&&([e,t]=[t,e]);let n=o.__absoluteSubOne(t,r);return n=o.__absoluteAndNot(n,e,n),o.__absoluteAddOne(n,!0,n).__trim()}static asIntN(e,t){var r=Math.floor;if(0===t.length)return t;if(0>(e=r(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return o.__zero();if(e>=o.__kMaxLengthBits)return t;const n=0|(e+29)/30;if(t.length<n)return t;const i=t.__unsignedDigit(n-1),a=1<<(e-1)%30;if(t.length===n&&i<a)return t;if((i&a)!==a)return o.__truncateToNBits(e,t);if(!t.sign)return o.__truncateAndSubFromPowerOfTwo(e,t,!0);if(!(i&a-1)){for(let r=n-2;0<=r;r--)if(0!==t.__digit(r))return o.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===n&&i===a?t:o.__truncateToNBits(e,t)}return o.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){var r=Math.floor;if(0===t.length)return t;if(0>(e=r(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return o.__zero();if(t.sign){if(e>o.__kMaxLengthBits)throw new RangeError("BigInt too big");return o.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=o.__kMaxLengthBits)return t;const n=0|(e+29)/30;if(t.length<n)return t;const i=e%30;if(t.length==n){if(0===i)return t;if(0==t.__digit(n-1)>>>i)return t}return o.__truncateToNBits(e,t)}static ADD(e,t){if(e=o.__toPrimitive(e),t=o.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=o.__toNumeric(e),t=o.__toNumeric(t),o.__isBigInt(e)&&o.__isBigInt(t))return o.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return o.__compare(e,t,0)}static LE(e,t){return o.__compare(e,t,1)}static GT(e,t){return o.__compare(e,t,2)}static GE(e,t){return o.__compare(e,t,3)}static EQ(e,t){for(;;){if(o.__isBigInt(e))return o.__isBigInt(t)?o.equal(e,t):o.EQ(t,e);if("number"==typeof e){if(o.__isBigInt(t))return o.__equalToNumber(t,e);if("object"!=typeof t)return e==t;t=o.__toPrimitive(t)}else if("string"==typeof e){if(o.__isBigInt(t))return null!==(e=o.__fromString(e))&&o.equal(e,t);if("object"!=typeof t)return e==t;t=o.__toPrimitive(t)}else if("boolean"==typeof e){if(o.__isBigInt(t))return o.__equalToNumber(t,+e);if("object"!=typeof t)return e==t;t=o.__toPrimitive(t)}else if("symbol"==typeof e){if(o.__isBigInt(t))return!1;if("object"!=typeof t)return e==t;t=o.__toPrimitive(t)}else{if("object"!=typeof e)return e==t;if("object"==typeof t&&t.constructor!==o)return e==t;e=o.__toPrimitive(e)}}}static NE(e,t){return!o.EQ(e,t)}static DataViewGetBigInt64(e,t,r=!1){return o.asIntN(64,o.DataViewGetBigUint64(e,t,r))}static DataViewGetBigUint64(e,t,r=!1){const[n,i]=r?[4,0]:[0,4],a=e.getUint32(t+n,r),s=e.getUint32(t+i,r),l=new o(3,!1);return l.__setDigit(0,1073741823&s),l.__setDigit(1,(268435455&a)<<2|s>>>30),l.__setDigit(2,a>>>28),l.__trim()}static DataViewSetBigInt64(e,t,r,n=!1){o.DataViewSetBigUint64(e,t,r,n)}static DataViewSetBigUint64(e,t,r,n=!1){let i=0,a=0;if(0<(r=o.asUintN(64,r)).length&&(a=r.__digit(0),1<r.length)){const e=r.__digit(1);a|=e<<30,i=e>>>2,2<r.length&&(i|=r.__digit(2)<<28)}const[s,l]=n?[4,0]:[0,4];e.setUint32(t+s,i,n),e.setUint32(t+l,a,n)}static __zero(){return new o(0,!1)}static __oneDigit(e,t){const r=new o(1,t);return r.__setDigit(0,e),r}__copy(){const e=new o(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(;0===t;)e--,t=this[e-1],this.pop();return 0===e&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,r,n){if(0<t)return-1;let i;if(0>t)i=-t-1;else{if(0===r)return-1;r--,n=e.__digit(r),i=29}let o=1<<i;if(0==(n&o))return-1;if(o-=1,0!=(n&o))return 1;for(;0<r;)if(r--,0!==e.__digit(r))return 1;return 0}static __fromDouble(e){o.__kBitConversionDouble[0]=e;const t=(2047&o.__kBitConversionInts[o.__kBitConversionIntHigh]>>>20)-1023,r=1+(0|t/30),n=new o(r,0>e);let i=1048575&o.__kBitConversionInts[o.__kBitConversionIntHigh]|1048576,a=o.__kBitConversionInts[o.__kBitConversionIntLow];const s=t%30;let l,c=0;if(s<20){const e=20-s;c=e+32,l=i>>>e,i=i<<32-e|a>>>e,a<<=32-e}else if(20===s)c=32,l=i,i=a,a=0;else{const e=s-20;c=32-e,l=i<<e|a>>>32-e,i=a<<e,a=0}n.__setDigit(r-1,l);for(let e=r-2;0<=e;e--)0<c?(c-=30,l=i>>>2,i=i<<30|a>>>2,a<<=30):l=0,n.__setDigit(e,l);return n.__trim()}static __isWhitespace(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}static __fromString(e,t=0){let r=0;const n=e.length;let i=0;if(i===n)return o.__zero();let a=e.charCodeAt(i);for(;o.__isWhitespace(a);){if(++i===n)return o.__zero();a=e.charCodeAt(i)}if(43===a){if(++i===n)return null;a=e.charCodeAt(i),r=1}else if(45===a){if(++i===n)return null;a=e.charCodeAt(i),r=-1}if(0===t){if(t=10,48===a){if(++i===n)return o.__zero();if(a=e.charCodeAt(i),88===a||120===a){if(t=16,++i===n)return null;a=e.charCodeAt(i)}else if(79===a||111===a){if(t=8,++i===n)return null;a=e.charCodeAt(i)}else if(66===a||98===a){if(t=2,++i===n)return null;a=e.charCodeAt(i)}}}else if(16===t&&48===a){if(++i===n)return o.__zero();if(a=e.charCodeAt(i),88===a||120===a){if(++i===n)return null;a=e.charCodeAt(i)}}if(0!=r&&10!==t)return null;for(;48===a;){if(++i===n)return o.__zero();a=e.charCodeAt(i)}const s=n-i;let l=o.__kMaxBitsPerChar[t],c=o.__kBitsPerCharTableMultiplier-1;if(s>1073741824/l)return null;const d=l*s+c>>>o.__kBitsPerCharTableShift,h=new o(0|(d+29)/30,!1),u=10>t?t:10,m=10<t?t-10:0;if(t&t-1){h.__initializeDigits();let r=!1,s=0;do{let d=0,f=1;for(;;){let o;if(a-48>>>0<u)o=a-48;else{if(!((32|a)-97>>>0<m)){r=!0;break}o=(32|a)-87}const l=f*t;if(1073741823<l)break;if(f=l,d=d*t+o,s++,++i===n){r=!0;break}a=e.charCodeAt(i)}c=30*o.__kBitsPerCharTableMultiplier-1;const y=0|(l*s+c>>>o.__kBitsPerCharTableShift)/30;h.__inplaceMultiplyAdd(f,d,y)}while(!r)}else{l>>=o.__kBitsPerCharTableShift;const t=[],r=[];let s=!1;do{let o=0,c=0;for(;;){let t;if(a-48>>>0<u)t=a-48;else{if(!((32|a)-97>>>0<m)){s=!0;break}t=(32|a)-87}if(c+=l,o=o<<l|t,++i===n){s=!0;break}if(a=e.charCodeAt(i),30<c+l)break}t.push(o),r.push(c)}while(!s);o.__fillFromParts(h,t,r)}if(i!==n){if(!o.__isWhitespace(a))return null;for(i++;i<n;i++)if(a=e.charCodeAt(i),!o.__isWhitespace(a))return null}return h.sign=-1==r,h.__trim()}static __fillFromParts(e,t,r){let n=0,i=0,o=0;for(let a=t.length-1;0<=a;a--){const s=t[a],l=r[a];i|=s<<o,o+=l,30===o?(e.__setDigit(n++,i),o=0,i=0):30<o&&(e.__setDigit(n++,1073741823&i),o-=30,i=s>>>l-o)}if(0!==i){if(n>=e.length)throw new Error("implementation bug");e.__setDigit(n++,i)}for(;n<e.length;n++)e.__setDigit(n,0)}static __toStringBasePowerOfTwo(e,t){const r=e.length;let n=t-1;n=(85&n>>>1)+(85&n),n=(51&n>>>2)+(51&n),n=(15&n>>>4)+(15&n);const i=n,a=t-1,s=e.__digit(r-1);let l=0|(30*r-o.__clz30(s)+i-1)/i;if(e.sign&&l++,268435456<l)throw new Error("string too long");const c=Array(l);let d=l-1,h=0,u=0;for(let t=0;t<r-1;t++){const r=e.__digit(t),n=(h|r<<u)&a;c[d--]=o.__kConversionChars[n];const s=i-u;for(h=r>>>s,u=30-s;u>=i;)c[d--]=o.__kConversionChars[h&a],h>>>=i,u-=i}const m=(h|s<<u)&a;for(c[d--]=o.__kConversionChars[m],h=s>>>i-u;0!==h;)c[d--]=o.__kConversionChars[h&a],h>>>=i;if(e.sign&&(c[d--]="-"),-1!=d)throw new Error("implementation bug");return c.join("")}static __toStringGeneric(e,t,r){const n=e.length;if(0===n)return"";if(1===n){let n=e.__unsignedDigit(0).toString(t);return!1===r&&e.sign&&(n="-"+n),n}const i=30*n-o.__clz30(e.__digit(n-1)),a=o.__kMaxBitsPerChar[t]-1;let s=i*o.__kBitsPerCharTableMultiplier;s+=a-1,s=0|s/a;const l=s+1>>1,c=o.exponentiate(o.__oneDigit(t,!1),o.__oneDigit(l,!1));let d,h;const u=c.__unsignedDigit(0);if(1===c.length&&32767>=u){d=new o(e.length,!1),d.__initializeDigits();let r=0;for(let t=2*e.length-1;0<=t;t--){const n=r<<15|e.__halfDigit(t);d.__setHalfDigit(t,0|n/u),r=0|n%u}h=r.toString(t)}else{const r=o.__absoluteDivLarge(e,c,!0,!0);d=r.quotient;const n=r.remainder.__trim();h=o.__toStringGeneric(n,t,!0)}d.__trim();let m=o.__toStringGeneric(d,t,!0);for(;h.length<l;)h="0"+h;return!1===r&&e.sign&&(m="-"+m),m+h}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 o.__unequalSign(r);const n=o.__absoluteCompare(e,t);return 0<n?o.__absoluteGreater(r):0>n?o.__absoluteLess(r):0}static __compareToNumber(e,t){if(o.__isOneDigitInt(t)){const r=e.sign,n=0>t;if(r!==n)return o.__unequalSign(r);if(0===e.length){if(n)throw new Error("implementation bug");return 0===t?0:-1}if(1<e.length)return o.__absoluteGreater(r);const i=Math.abs(t),a=e.__unsignedDigit(0);return a>i?o.__absoluteGreater(r):a<i?o.__absoluteLess(r):0}return o.__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 o.__unequalSign(r);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;o.__kBitConversionDouble[0]=t;const n=2047&o.__kBitConversionInts[o.__kBitConversionIntHigh]>>>20;if(2047==n)throw new Error("implementation bug: handled elsewhere");const i=n-1023;if(0>i)return o.__absoluteGreater(r);const a=e.length;let s=e.__digit(a-1);const l=o.__clz30(s),c=30*a-l,d=i+1;if(c<d)return o.__absoluteLess(r);if(c>d)return o.__absoluteGreater(r);let h=1048576|1048575&o.__kBitConversionInts[o.__kBitConversionIntHigh],u=o.__kBitConversionInts[o.__kBitConversionIntLow];const m=29-l;if(m!==(0|(c-1)%30))throw new Error("implementation bug");let f,y=0;if(20>m){const e=20-m;y=e+32,f=h>>>e,h=h<<32-e|u>>>e,u<<=32-e}else if(20===m)y=32,f=h,h=u,u=0;else{const e=m-20;y=32-e,f=h<<e|u>>>32-e,h=u<<e,u=0}if(s>>>=0,f>>>=0,s>f)return o.__absoluteGreater(r);if(s<f)return o.__absoluteLess(r);for(let t=a-2;0<=t;t--){0<y?(y-=30,f=h>>>2,h=h<<30|u>>>2,u<<=30):f=0;const n=e.__unsignedDigit(t);if(n>f)return o.__absoluteGreater(r);if(n<f)return o.__absoluteLess(r)}if(0!==h||0!==u){if(0===y)throw new Error("implementation bug");return o.__absoluteLess(r)}return 0}static __equalToNumber(e,t){var r=Math.abs;return o.__isOneDigitInt(t)?0===t?0===e.length:1===e.length&&e.sign===0>t&&e.__unsignedDigit(0)===r(t):0===o.__compareToDouble(e,t)}static __comparisonResultToBool(e,t){return 0===t?0>e:1===t?0>=e:2===t?0<e:3===t?0<=e:void 0}static __compare(e,t,r){if(e=o.__toPrimitive(e),t=o.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(o.__isBigInt(e)&&"string"==typeof t)return null!==(t=o.__fromString(t))&&o.__comparisonResultToBool(o.__compareToBigInt(e,t),r);if("string"==typeof e&&o.__isBigInt(t))return null!==(e=o.__fromString(e))&&o.__comparisonResultToBool(o.__compareToBigInt(e,t),r);if(e=o.__toNumeric(e),t=o.__toNumeric(t),o.__isBigInt(e)){if(o.__isBigInt(t))return o.__comparisonResultToBool(o.__compareToBigInt(e,t),r);if("number"!=typeof t)throw new Error("implementation bug");return o.__comparisonResultToBool(o.__compareToNumber(e,t),r)}if("number"!=typeof e)throw new Error("implementation bug");if(o.__isBigInt(t))return o.__comparisonResultToBool(o.__compareToNumber(t,e),2^r);if("number"!=typeof t)throw new Error("implementation bug");return 0===r?e<t:1===r?e<=t:2===r?e>t:3===r?e>=t:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,r){if(e.length<t.length)return o.__absoluteAdd(t,e,r);if(0===e.length)return e;if(0===t.length)return e.sign===r?e:o.unaryMinus(e);let n=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&n++;const i=new o(n,r);let a=0,s=0;for(;s<t.length;s++){const r=e.__digit(s)+t.__digit(s)+a;a=r>>>30,i.__setDigit(s,1073741823&r)}for(;s<e.length;s++){const t=e.__digit(s)+a;a=t>>>30,i.__setDigit(s,1073741823&t)}return s<i.length&&i.__setDigit(s,a),i.__trim()}static __absoluteSub(e,t,r){if(0===e.length)return e;if(0===t.length)return e.sign===r?e:o.unaryMinus(e);const n=new o(e.length,r);let i=0,a=0;for(;a<t.length;a++){const r=e.__digit(a)-t.__digit(a)-i;i=1&r>>>30,n.__setDigit(a,1073741823&r)}for(;a<e.length;a++){const t=e.__digit(a)-i;i=1&t>>>30,n.__setDigit(a,1073741823&t)}return n.__trim()}static __absoluteAddOne(e,t,r=null){const n=e.length;null===r?r=new o(n,t):r.sign=t;let i=1;for(let t=0;t<n;t++){const n=e.__digit(t)+i;i=n>>>30,r.__setDigit(t,1073741823&n)}return 0!=i&&r.__setDigitGrow(n,1),r}static __absoluteSubOne(e,t){const r=e.length,n=new o(t=t||r,!1);let i=1;for(let t=0;t<r;t++){const r=e.__digit(t)-i;i=1&r>>>30,n.__setDigit(t,1073741823&r)}if(0!=i)throw new Error("implementation bug");for(let e=r;e<t;e++)n.__setDigit(e,0);return n}static __absoluteAnd(e,t,r=null){let n=e.length,i=t.length,a=i;if(n<i){a=n;const r=e,o=n;e=t,n=i,t=r,i=o}let s=a;null===r?r=new o(s,!1):s=r.length;let l=0;for(;l<a;l++)r.__setDigit(l,e.__digit(l)&t.__digit(l));for(;l<s;l++)r.__setDigit(l,0);return r}static __absoluteAndNot(e,t,r=null){const n=e.length,i=t.length;let a=i;n<i&&(a=n);let s=n;null===r?r=new o(s,!1):s=r.length;let l=0;for(;l<a;l++)r.__setDigit(l,e.__digit(l)&~t.__digit(l));for(;l<n;l++)r.__setDigit(l,e.__digit(l));for(;l<s;l++)r.__setDigit(l,0);return r}static __absoluteOr(e,t,r=null){let n=e.length,i=t.length,a=i;if(n<i){a=n;const r=e,o=n;e=t,n=i,t=r,i=o}let s=n;null===r?r=new o(s,!1):s=r.length;let l=0;for(;l<a;l++)r.__setDigit(l,e.__digit(l)|t.__digit(l));for(;l<n;l++)r.__setDigit(l,e.__digit(l));for(;l<s;l++)r.__setDigit(l,0);return r}static __absoluteXor(e,t,r=null){let n=e.length,i=t.length,a=i;if(n<i){a=n;const r=e,o=n;e=t,n=i,t=r,i=o}let s=n;null===r?r=new o(s,!1):s=r.length;let l=0;for(;l<a;l++)r.__setDigit(l,e.__digit(l)^t.__digit(l));for(;l<n;l++)r.__setDigit(l,e.__digit(l));for(;l<s;l++)r.__setDigit(l,0);return r}static __absoluteCompare(e,t){const r=e.length-t.length;if(0!=r)return r;let n=e.length-1;for(;0<=n&&e.__digit(n)===t.__digit(n);)n--;return 0>n?0:e.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(e,t,r,n){if(0===t)return;const i=32767&t,a=t>>>15;let s=0,l=0;for(let t,c=0;c<e.length;c++,n++){t=r.__digit(n);const d=e.__digit(c),h=32767&d,u=d>>>15,m=o.__imul(h,i),f=o.__imul(h,a),y=o.__imul(u,i);t+=l+m+s,s=t>>>30,t&=1073741823,t+=((32767&f)<<15)+((32767&y)<<15),s+=t>>>30,l=o.__imul(u,a)+(f>>>15)+(y>>>15),r.__setDigit(n,1073741823&t)}for(;0!=s||0!==l;n++){let e=r.__digit(n);e+=s+l,l=0,s=e>>>30,r.__setDigit(n,1073741823&e)}}static __internalMultiplyAdd(e,t,r,n,i){let a=r,s=0;for(let r=0;r<n;r++){const n=e.__digit(r),l=o.__imul(32767&n,t),c=o.__imul(n>>>15,t),d=l+((32767&c)<<15)+s+a;a=d>>>30,s=c>>>15,i.__setDigit(r,1073741823&d)}if(i.length>n)for(i.__setDigit(n++,a+s);n<i.length;)i.__setDigit(n++,0);else if(0!==a+s)throw new Error("implementation bug")}__inplaceMultiplyAdd(e,t,r){r>this.length&&(r=this.length);const n=32767&e,i=e>>>15;let a=0,s=t;for(let e=0;e<r;e++){const t=this.__digit(e),r=32767&t,l=t>>>15,c=o.__imul(r,n),d=o.__imul(r,i),h=o.__imul(l,n);let u=s+c+a;a=u>>>30,u&=1073741823,u+=((32767&d)<<15)+((32767&h)<<15),a+=u>>>30,s=o.__imul(l,i)+(d>>>15)+(h>>>15),this.__setDigit(e,1073741823&u)}if(0!=a||0!==s)throw new Error("implementation bug")}static __absoluteDivSmall(e,t,r=null){null===r&&(r=new o(e.length,!1));let n=0;for(let i,o=2*e.length-1;0<=o;o-=2){i=(n<<15|e.__halfDigit(o))>>>0;const a=0|i/t;n=0|i%t,i=(n<<15|e.__halfDigit(o-1))>>>0;const s=0|i/t;n=0|i%t,r.__setDigit(o>>>1,a<<15|s)}return r}static __absoluteModSmall(e,t){let r=0;for(let n=2*e.length-1;0<=n;n--){r=0|((r<<15|e.__halfDigit(n))>>>0)%t}return r}static __absoluteDivLarge(e,t,r,n){const i=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-i;let l=null;r&&(l=new o(s+2>>>1,!1),l.__initializeDigits());const c=new o(i+2>>>1,!1);c.__initializeDigits();const d=o.__clz15(t.__halfDigit(i-1));0<d&&(t=o.__specialLeftShift(t,d,0));const h=o.__specialLeftShift(e,d,1),u=t.__halfDigit(i-1);let m=0;for(let e,n=s;0<=n;n--){e=32767;const s=h.__halfDigit(n+i);if(s!==u){const r=(s<<15|h.__halfDigit(n+i-1))>>>0;e=0|r/u;let a=0|r%u;const l=t.__halfDigit(i-2),c=h.__halfDigit(n+i-2);for(;o.__imul(e,l)>>>0>(a<<16|c)>>>0&&(e--,a+=u,!(32767<a)););}o.__internalMultiplyAdd(t,e,0,a,c);let d=h.__inplaceSub(c,n,i+1);0!==d&&(d=h.__inplaceAdd(t,n,i),h.__setHalfDigit(n+i,32767&h.__halfDigit(n+i)+d),e--),r&&(1&n?m=e<<15:l.__setDigit(n>>>1,m|e))}if(n)return h.__inplaceRightShift(d),r?{quotient:l,remainder:h}:h;if(r)return l;throw new Error("unreachable")}static __clz15(e){return o.__clz30(e)-15}__inplaceAdd(e,t,r){let n=0;for(let i=0;i<r;i++){const r=this.__halfDigit(t+i)+e.__halfDigit(i)+n;n=r>>>15,this.__setHalfDigit(t+i,32767&r)}return n}__inplaceSub(e,t,r){let n=0;if(1&t){t>>=1;let i=this.__digit(t),o=32767&i,a=0;for(;a<r-1>>>1;a++){const r=e.__digit(a),s=(i>>>15)-(32767&r)-n;n=1&s>>>15,this.__setDigit(t+a,(32767&s)<<15|32767&o),i=this.__digit(t+a+1),o=(32767&i)-(r>>>15)-n,n=1&o>>>15}const s=e.__digit(a),l=(i>>>15)-(32767&s)-n;if(n=1&l>>>15,this.__setDigit(t+a,(32767&l)<<15|32767&o),t+a+1>=this.length)throw new RangeError("out of bounds");!(1&r)&&(i=this.__digit(t+a+1),o=(32767&i)-(s>>>15)-n,n=1&o>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;let i=0;for(;i<e.length-1;i++){const r=this.__digit(t+i),o=e.__digit(i),a=(32767&r)-(32767&o)-n;n=1&a>>>15;const s=(r>>>15)-(o>>>15)-n;n=1&s>>>15,this.__setDigit(t+i,(32767&s)<<15|32767&a)}const o=this.__digit(t+i),a=e.__digit(i),s=(32767&o)-(32767&a)-n;n=1&s>>>15;let l=0;!(1&r)&&(l=(o>>>15)-(a>>>15)-n,n=1&l>>>15),this.__setDigit(t+i,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(e){if(0===e)return;let t=this.__digit(0)>>>e;const r=this.length-1;for(let n=0;n<r;n++){const r=this.__digit(n+1);this.__setDigit(n,1073741823&r<<30-e|t),t=r>>>e}this.__setDigit(r,t)}static __specialLeftShift(e,t,r){const n=e.length,i=new o(n+r,!1);if(0===t){for(let t=0;t<n;t++)i.__setDigit(t,e.__digit(t));return 0<r&&i.__setDigit(n,0),i}let a=0;for(let r=0;r<n;r++){const n=e.__digit(r);i.__setDigit(r,1073741823&n<<t|a),a=n>>>30-t}return 0<r&&i.__setDigit(n,a),i}static __leftShiftByAbsolute(e,t){const r=o.__toShiftAmount(t);if(0>r)throw new RangeError("BigInt too big");const n=0|r/30,i=r%30,a=e.length,s=0!==i&&0!=e.__digit(a-1)>>>30-i,l=a+n+(s?1:0),c=new o(l,e.sign);if(0===i){let t=0;for(;t<n;t++)c.__setDigit(t,0);for(;t<l;t++)c.__setDigit(t,e.__digit(t-n))}else{let t=0;for(let e=0;e<n;e++)c.__setDigit(e,0);for(let r=0;r<a;r++){const o=e.__digit(r);c.__setDigit(r+n,1073741823&o<<i|t),t=o>>>30-i}if(s)c.__setDigit(a+n,t);else if(0!==t)throw new Error("implementation bug")}return c.__trim()}static __rightShiftByAbsolute(e,t){const r=e.length,n=e.sign,i=o.__toShiftAmount(t);if(0>i)return o.__rightShiftByMaximum(n);const a=0|i/30,s=i%30;let l=r-a;if(0>=l)return o.__rightShiftByMaximum(n);let c=!1;if(n)if(e.__digit(a)&(1<<s)-1)c=!0;else for(let t=0;t<a;t++)if(0!==e.__digit(t)){c=!0;break}if(c&&0===s){0==~e.__digit(r-1)&&l++}let d=new o(l,n);if(0===s){d.__setDigit(l-1,0);for(let t=a;t<r;t++)d.__setDigit(t-a,e.__digit(t))}else{let t=e.__digit(a)>>>s;const n=r-a-1;for(let r=0;r<n;r++){const n=e.__digit(r+a+1);d.__setDigit(r,1073741823&n<<30-s|t),t=n>>>s}d.__setDigit(n,t)}return c&&(d=o.__absoluteAddOne(d,!0,d)),d.__trim()}static __rightShiftByMaximum(e){return e?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(e){if(1<e.length)return-1;const t=e.__unsignedDigit(0);return t>o.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if("object"!=typeof e)return e;if(e.constructor===o)return e;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive&&e[Symbol.toPrimitive]){const r=e[Symbol.toPrimitive](t);if("object"!=typeof r)return r;throw new TypeError("Cannot convert object to primitive value")}const r=e.valueOf;if(r){const t=r.call(e);if("object"!=typeof t)return t}const n=e.toString;if(n){const t=n.call(e);if("object"!=typeof t)return t}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return o.__isBigInt(e)?e:+e}static __isBigInt(e){return"object"==typeof e&&null!==e&&e.constructor===o}static __truncateToNBits(e,t){const r=0|(e+29)/30,n=new o(r,t.sign),i=r-1;for(let e=0;e<i;e++)n.__setDigit(e,t.__digit(e));let a=t.__digit(i);if(0!=e%30){const t=32-e%30;a=a<<t>>>t}return n.__setDigit(i,a),n.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,r){var n=Math.min;const i=0|(e+29)/30,a=new o(i,r);let s=0;const l=i-1;let c=0;for(const e=n(l,t.length);s<e;s++){const e=0-t.__digit(s)-c;c=1&e>>>30,a.__setDigit(s,1073741823&e)}for(;s<l;s++)a.__setDigit(s,1073741823&-c);let d=l<t.length?t.__digit(l):0;const h=e%30;let u;if(0==h)u=0-d-c,u&=1073741823;else{const e=32-h;d=d<<e>>>e;const t=1<<32-e;u=t-d-c,u&=t-1}return a.__setDigit(l,u),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,n=this.__digit(r),i=1&e?32767&n|t<<15:1073709056&n|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 o.__kBitConversionDouble[0]=-0,0!==o.__kBitConversionInts[0]}static __isOneDigitInt(e){return(1073741823&e)===e}}o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__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],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<<o.__kBitsPerCharTableShift,o.__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"],o.__kBitConversionBuffer=new ArrayBuffer(8),o.__kBitConversionDouble=new Float64Array(o.__kBitConversionBuffer),o.__kBitConversionInts=new Int32Array(o.__kBitConversionBuffer),o.__kBitConversionIntHigh=o.__detectBigEndian()?0:1,o.__kBitConversionIntLow=o.__detectBigEndian()?1:0,o.__clz30=Math.clz32?function(e){return Math.clz32(e)-2}:function(e){return 0===e?30:0|29-(0|Math.log(e>>>0)/Math.LN2)},o.__imul=Math.imul||function(e,t){return 0|e*t};const a={};function s(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0});for(const t of Object.getOwnPropertyNames(e)){const r=Object.getOwnPropertyDescriptor(e,t);r.configurable&&r.enumerable&&(r.enumerable=!1,Object.defineProperty(e,t,r))}for(const t of Object.getOwnPropertyNames(e.prototype)){const r=Object.getOwnPropertyDescriptor(e.prototype,t);r.configurable&&r.enumerable&&(r.enumerable=!1,Object.defineProperty(e.prototype,t,r))}l(t,e),l(`${t}.prototype`,e.prototype)}function l(e,t){const r=`%${e}%`;if(void 0!==a[r])throw new Error(`intrinsic ${e} already exists`);a[r]=t}function c(e){return a[e]}var d,h;const u="slot-epochNanoSeconds",m="slot-timezone-identifier",f="slot-year",y="slot-month",g="slot-day",w="slot-hour",p="slot-minute",v="slot-second",_="slot-millisecond",T="slot-microsecond",b="slot-nanosecond",E="slot-calendar",I="slot-date-brand",D="slot-year-month-brand",C="slot-month-day-brand",S="slot-cached-instant",B="slot-time-zone",M="slot-years",k="slot-months",O="slot-weeks",$="slot-days",R="slot-hours",Y="slot-minutes",N="slot-seconds",x="slot-milliseconds",P="slot-microseconds",A="slot-nanoseconds",j="slot-calendar-identifier",F=new WeakMap,L=Symbol.for("@@Temporal__GetSlots");(d=globalThis)[L]||(d[L]=function(e){return F.get(e)});const U=globalThis[L],q=Symbol.for("@@Temporal__CreateSlots");(h=globalThis)[q]||(h[q]=function(e){F.set(e,Object.create(null))});const Z=globalThis[q];function z(e,...t){if(!e||"object"!=typeof e)return!1;const r=U(e);return!!r&&t.every(e=>e in r)}function W(e,t){const r=U(e)?.[t];if(void 0===r)throw new TypeError(`Missing internal slot ${t}`);return r}function H(e,t,r){const n=U(e);if(void 0===n)throw new TypeError("Missing slots for the given container");if(n[t])throw new TypeError(`${t} already has set`);n[t]=r}const J=/\.[-A-Za-z_]|\.\.[-A-Za-z._]{1,12}|\.[-A-Za-z_][-A-Za-z._]{0,12}|[A-Za-z_][-A-Za-z._]{0,13}/,G=new RegExp("(?:"+[`(?:${J.source})(?:\\/(?:${J.source}))*`,"Etc/GMT(?:0|[-+]\\d{1,2})","GMT[-+]?0","EST5EDT","CST6CDT","MST7MDT","PST8PDT",/(?:[+\u2212-][0-2][0-9](?::?[0-5][0-9](?::?[0-5][0-9](?:[.,]\d{1,9})?)?)?)/.source].join("|")+")"),V=/(?:[+\u2212-]\d{6}|\d{4})/,K=/(?:0[1-9]|1[0-2])/,X=/(?:0[1-9]|[12]\d|3[01])/,Q=new RegExp(`(${V.source})(?:-(${K.source})-(${X.source})|(${K.source})(${X.source}))`),ee=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,te=/([+\u2212-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/,re=new RegExp(`([zZ])|${te.source}?`),ne=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,ie=new RegExp([`^${Q.source}`,`(?:(?:T|\\s+)${ee.source}(?:${re.source})?)?`,`(?:\\[!?(${G.source})\\])?`,`((?:${ne.source})*)$`].join(""),"i"),oe=new RegExp([`^T?${ee.source}`,`(?:${re.source})?`,`(?:\\[!?${G.source}\\])?`,`((?:${ne.source})*)$`].join(""),"i"),ae=new RegExp(`^(${V.source})-?(${K.source})(?:\\[!?${G.source}\\])?((?:${ne.source})*)$`),se=new RegExp(`^(?:--)?(${K.source})-?(${X.source})(?:\\[!?${G.source}\\])?((?:${ne.source})*)$`),le=/(\d+)(?:[.,](\d{1,9}))?/,ce=new RegExp(`(?:${le.source}H)?(?:${le.source}M)?(?:${le.source}S)?`),de=new RegExp(`^([+−-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${ce.source})?$`,"i"),he=Array.prototype.includes,ue=Array.prototype.push,me=globalThis.Intl.DateTimeFormat,fe=Math.min,ye=Math.max,ge=Math.abs,we=Math.floor,pe=Math.sign,ve=Math.trunc,_e=Number.isNaN,Te=Number.isFinite,be=Number,Ee=String,Ie=Number.MAX_SAFE_INTEGER,De=Object.create,Ce=Object.getOwnPropertyDescriptor,Se=Reflect.apply,Be=Reflect.ownKeys,Me=o.BigInt(0),ke=o.BigInt(1),Oe=o.BigInt(60),$e=o.BigInt(24),Re=o.BigInt(1e3),Ye=o.BigInt(1e6),Ne=o.BigInt(1e9),xe=o.BigInt(-1),Pe=o.multiply(o.BigInt(3600),Ne),Ae=o.multiply(Oe,Ne),je=o.multiply(Pe,$e),Fe=o.multiply(o.BigInt(-86400),o.BigInt(1e17)),Le=o.multiply(o.BigInt(86400),o.BigInt(1e17)),Ue=-271821,qe=275760,Ze=o.multiply(o.BigInt(-388152),o.BigInt(1e13)),ze=o.multiply(je,o.BigInt(3660)),We=o.multiply(je,o.BigInt(366)),He=o.multiply(je,o.BigInt(14)),Je=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"];function Ge(e){return o.equal(e,Me)}function Ve(e,t){const r=e[t];if(void 0!==r)return r}function Ke(e,t,r){return Se(e,t,arguments.length>2?r:[])}function Xe(e){return"object"==typeof e&&null!==e||"function"==typeof e}function Qe(e){if("bigint"==typeof e)throw new TypeError("Cannot convert BigInt to number");return be(e)}function et(e){const t=Qe(e);if(_e(t)||0===t)return 0;if(!Te(t))return t;const r=we(ge(t));return 0===r?0:pe(t)*r}function tt(e){if("number"!=typeof e||_e(e)||!Te(e))return!1;const t=ge(e);return we(t)===t}function rt(e){if("symbol"==typeof e)throw new TypeError("Cannot convert a Symbol value to a String");return Ee(e)}function nt(e){const t=Qe(e);if(0===t)return 0;if(_e(t)||!Te(t))throw new RangeError("invalid number value");const r=ve(t);return 0===r?0:r}function it(e,t){const r=nt(e);if(r<=0){if(void 0!==t)throw new RangeError(`property '${t}' cannot be a a number less than one`);throw new RangeError("Cannot convert a number less than one to a positive integer")}return r}function ot(e){const t=Qe(e);if(!Te(t))throw new RangeError("infinity is out of range");if(!tt(t))throw new RangeError(`unsupported fractional value ${e}`);return 0===t?0:t}function at(e,t){return{quotient:o.divide(e,t),remainder:o.remainder(e,t)}}function st(e){return o.lessThan(e,Me)}function lt(e){return Ge(e)?0:st(e)?-1:1}function ct(e){return o.lessThan(e,Me)?o.multiply(e,xe):e}const dt=new Map([["year",nt],["month",it],["monthCode",rt],["day",it],["hour",nt],["minute",nt],["second",nt],["millisecond",nt],["microsecond",nt],["nanosecond",nt],["years",ot],["months",ot],["weeks",ot],["days",ot],["hours",ot],["minutes",ot],["seconds",ot],["milliseconds",ot],["microseconds",ot],["nanoseconds",ot],["era",rt],["eraYear",et],["offset",rt]]),ht=new Map([["hour",0],["minute",0],["second",0],["millisecond",0],["microsecond",0],["nanosecond",0]]),ut=[["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"]],mt=new Map(ut.map(e=>[e[0],e[1]])),ft=new Map(ut.map(([e,t])=>[t,e])),yt=ut.map(([,e])=>e),gt=Array.from(mt.keys()).sort(),wt=new Map;function pt(e){let t=wt.get(e);return void 0===t&&(t=new me("en-us",{timeZone:Ee(e),hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),wt.set(e,t)),t}function vt(e){if(null==e)throw new TypeError(`Expected object not ${e}`);return Object(e)}function _t(e,t,r,n){if(null==t)return;const i=Be(t);for(const o of i)if(!r.some(e=>Object.is(e,o))&&Object.prototype.propertyIsEnumerable.call(t,o)){const r=t[o];if(n&&n.some(e=>Object.is(e,r)))continue;e[o]=r}}function Tt(e){return z(e,u)&&!z(e,B,E)}function bt(e){return z(e,m)}function Et(e){return z(e,j)}function It(e){return z(e,M,k,$,R,Y,N,x,P,A)}function Dt(e){return z(e,I)}function Ct(e){return z(e,w,p,v,_,T,b)&&!z(e,f,y,g)}function St(e){return z(e,f,y,g,w,p,v,_,T,b)}function Bt(e){return z(e,D)}function Mt(e){return z(e,C)}function kt(e){return z(e,u,B,E)}function Ot(e){if(z(e,E)||z(e,B))throw new TypeError("with() does not support a calendar or timeZone property");if(Ct(e))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(void 0!==e.calendar)throw new TypeError("with() does not support a calendar property");if(void 0!==e.timeZone)throw new TypeError("with() does not support a timeZone property")}function $t(e,t){return"never"===t?"":Rt(qr(e),t)}function Rt(e,t){return"never"===t||"auto"===t&&"iso8601"===e?"":`[${"critical"===t?"!":""}u-ca=${e}]`}function Yt(e){const t=ie.exec(e);if(!t)throw new RangeError(`invalid ISO 8601 string: ${e}`);let r=t[1];if("−"===r[0]&&(r=`-${r.slice(1)}`),"-000000"===r)throw new RangeError(`invalid ISO 8601 string: ${e}`);const n=et(r),i=et(t[2]||t[4]),o=et(t[3]||t[5]),a=et(t[6]),s=void 0!==t[6],l=et(t[7]||t[10]);let c=et(t[8]||t[11]);60===c&&(c=59);const d=(t[9]||t[12])+"000000000",h=et(d.slice(0,3)),u=et(d.slice(3,6)),m=et(d.slice(6,9));let f,y=!1;if(t[13])f=void 0,y=!0;else if(t[14]&&t[15]){const e="-"===t[14]||"−"===t[14]?"-":"+",r=t[15]||"00",n=t[16]||"00",i=t[17]||"00";let o=t[18]||"0";if(f=`${e}${r}:${n}`,+o){for(;o.endsWith("0");)o=o.slice(0,-1);f+=`:${i}.${o}`}else+i&&(f+=`:${i}`);"-00:00"===f&&(f="+00:00")}const g=t[19],w=t[20];let p;for(const[,e,t,r]of w.matchAll(ne))if("u-ca"===t)void 0===p&&(p=r);else if("!"===e)throw new RangeError(`Unrecognized annotation: !${t}=${r}`);return ri(n,i,o,a,l,c,h,u,m),{year:n,month:i,day:o,hasTime:s,hour:a,minute:l,second:c,millisecond:h,microsecond:u,nanosecond:m,ianaName:g,offset:f,z:y,calendar:p}}function Nt(e){const t=ae.exec(e);let r,n,i,o;if(t){let o=t[1];if("−"===o[0]&&(o=`-${o.slice(1)}`),"-000000"===o)throw new RangeError(`invalid ISO 8601 string: ${e}`);r=et(o),n=et(t[2]);const a=t[3];for(const[,e,t,r]of a.matchAll(ne))if("u-ca"===t)void 0===i&&(i=r);else if("!"===e)throw new RangeError(`Unrecognized annotation: !${t}=${r}`);if(void 0!==i&&"iso8601"!==i)throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let t;if(({year:r,month:n,calendar:i,day:o,z:t}=Yt(e)),t)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:r,month:n,calendar:i,referenceISODay:o}}function xt(e){const t=se.exec(e);let r,n,i,o;if(t){r=et(t[1]),n=et(t[2]);const e=t[3];for(const[,t,r,n]of e.matchAll(ne))if("u-ca"===r)void 0===i&&(i=n);else if("!"===t)throw new RangeError(`Unrecognized annotation: !${r}=${n}`);if(void 0!==i&&"iso8601"!==i)throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let t;if(({month:r,day:n,calendar:i,year:o,z:t}=Yt(e)),t)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:r,day:n,calendar:i,referenceISOYear:o}}function Pt(e,t,r,n){let i=e,o=t,a=r;switch(n){case"reject":Qn(i,o,a);break;case"constrain":({year:i,month:o,day:a}=Kn(i,o,a))}return{year:i,month:o,day:a}}function At(e,t,r,n,i,o,a){let s=e,l=t,c=r,d=n,h=i,u=o;switch(a){case"reject":ti(s,l,c,d,h,u);break;case"constrain":({hour:s,minute:l,second:c,millisecond:d,microsecond:h,nanosecond:u}=function(e,t,r,n,i,o){return{hour:Vn(e,0,23),minute:Vn(t,0,59),second:Vn(r,0,59),millisecond:Vn(n,0,999),microsecond:Vn(i,0,999),nanosecond:Vn(o,0,999)}}(s,l,c,d,h,u))}return{hour:s,minute:l,second:c,millisecond:d,microsecond:h,nanosecond:u}}function jt(e){if(!Xe(e))return function(e){const t=de.exec(e);if(!t)throw new RangeError(`invalid duration: ${e}`);if(t.slice(2).every(e=>void 0===e))throw new RangeError(`invalid duration: ${e}`);const r="-"===t[1]||"−"===t[1]?-1:1,n=void 0===t[2]?0:nt(t[2])*r,i=void 0===t[3]?0:nt(t[3])*r,o=void 0===t[4]?0:nt(t[4])*r,a=void 0===t[5]?0:nt(t[5])*r,s=void 0===t[6]?0:nt(t[6])*r,l=t[7],c=t[8],d=t[9],h=t[10],u=t[11];let m=0,f=0,y=0;if(void 0!==l){if(c??d??h??u)throw new RangeError("only the smallest unit can be fractional");y=3600*et((l+"000000000").slice(0,9))*r}else if(m=void 0===c?0:nt(c)*r,void 0!==d){if(h??u)throw new RangeError("only the smallest unit can be fractional");y=60*et((d+"000000000").slice(0,9))*r}else f=void 0===h?0:nt(h)*r,void 0!==u&&(y=et((u+"000000000").slice(0,9))*r);const g=y%1e3,w=ve(y/1e3)%1e3,p=ve(y/1e6)%1e3;return f+=ve(y/1e9)%60,m+=ve(y/6e10),oi(n,i,o,a,s,m,f,p,w,g),{years:n,months:i,weeks:o,days:a,hours:s,minutes:m,seconds:f,milliseconds:p,microseconds:w,nanoseconds:g}}(rt(e));if(It(e))return{years:W(e,M),months:W(e,k),weeks:W(e,O),days:W(e,$),hours:W(e,R),minutes:W(e,Y),seconds:W(e,N),milliseconds:W(e,x),microseconds:W(e,P),nanoseconds:W(e,A)};const t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};let r=function(e){if(!Xe(e))throw new TypeError("invalid duration-like");const t={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 r=!1;for(const n of gt){const i=e[n];void 0!==i&&(r=!0,t[n]=ot(i))}if(!r)throw new TypeError("invalid duration-like");return t}(e);for(const e of gt){const n=r[e];void 0!==n&&(t[e]=n)}let{years:n,months:i,weeks:o,days:a,hours:s,minutes:l,seconds:c,milliseconds:d,microseconds:h,nanoseconds:u}=t;return oi(n,i,o,a,s,l,c,d,h,u),{years:n,months:i,weeks:o,days:a,hours:s,minutes:l,seconds:c,milliseconds:d,microseconds:h,nanoseconds:u}}function Ft(e){return void 0===e?"constrain":Ki(e,"overflow",["constrain","reject"],"constrain")}function Lt(e){return void 0===e?"compatible":Ki(e,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Ut(e,t){return Ki(e,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function qt(e,t){return void 0===e?t:Ki(e,"offset",["prefer","use","ignore","reject"],t)}function Zt(e){return Ki(e,"calendarName",["auto","always","never","critical"],"auto")}function zt(e){let t=e.roundingIncrement;if(void 0===t)return 1;if(t=Qe(t),!Te(t))throw new RangeError("roundingIncrement must be finite");const r=ve(t);if(r<1||r>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);return r}function Wt(e,t,r){const n=r?t:t-1;if(e>n)throw new RangeError(`roundingIncrement must be at least 1 and less than ${n}, not ${e}`);if(t%e!=0)throw new RangeError(`Rounding increment must divide evenly into ${t}`)}function Ht(e){const t=e.fractionalSecondDigits;if(void 0===t)return"auto";if("number"!=typeof t){if("auto"!==rt(t))throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return"auto"}const r=we(t);if(!Te(r)||r<0||r>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return r}function Jt(e,t){switch(e){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(t){case"auto":return{precision:t,unit:"nanosecond",increment:1};case 0:return{precision:t,unit:"second",increment:1};case 1:case 2:case 3:return{precision:t,unit:"millisecond",increment:10**(3-t)};case 4:case 5:case 6:return{precision:t,unit:"microsecond",increment:10**(6-t)};case 7:case 8:case 9:return{precision:t,unit:"nanosecond",increment:10**(9-t)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`)}}const Gt=Symbol("~required~");function Vt(e,t,r,n,i=[]){const o=[];for(const[,e,t]of ut)"datetime"!==r&&r!==t||o.push(e);o.push(...i);let a=n;a===Gt?a=void 0:void 0!==a&&o.push(a);const s=[...o];for(const e of o){const t=ft.get(e);void 0!==t&&s.push(t)}let l=Ki(e,t,s,a);if(void 0===l&&n===Gt)throw new RangeError(`${t} is required`);return mt.has(l)?mt.get(l):l}function Kt(e){const t=e.relativeTo;if(void 0===t)return t;let r,n,i,o,a,s,l,c,d,h,u,m,f="option",y=!1;if(Xe(t)){if(kt(t)||Dt(t))return t;if(St(t))return tn(t);h=Ur(t);const e=br(h,["day","hour","microsecond","millisecond","minute","month","monthCode","nanosecond","second","year"]);e.push("timeZone","offset");const y=er(t,e,[]),g=De(null);g.overflow="constrain",({year:r,month:n,day:i,hour:o,minute:a,second:s,millisecond:l,microsecond:c,nanosecond:d}=nr(h,y,g)),m=y.offset,void 0===m&&(f="wall"),u=y.timeZone,void 0!==u&&(u=Kr(u))}else{let e,g;if(({year:r,month:n,day:i,hour:o,minute:a,second:s,millisecond:l,microsecond:c,nanosecond:d,calendar:h,ianaName:e,offset:m,z:g}=Yt(rt(t))),e)u=Kr(e),g?f="exact":m||(f="wall"),y=!0;else if(g)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");if(h||(h="iso8601"),!Xi(h))throw new RangeError(`invalid calendar identifier ${h}`);h=Qi(h)}return void 0===u?mr(r,n,i,h):Tr(dr(r,n,i,o,a,s,l,c,d,f,"option"===f?Tn(m):0,u,"compatible","reject",y),u,h)}function Xt(e,t,r,n,i,o,a,s,l,c){for(const[d,h]of[["years",e],["months",t],["weeks",r],["days",n],["hours",i],["minutes",o],["seconds",a],["milliseconds",s],["microseconds",l],["nanoseconds",c]])if(0!==h)return mt.get(d);return"nanosecond"}function Qt(e,t){return yt.indexOf(e)>yt.indexOf(t)?t:e}function er(e,t,r,{emptySourceErrorMessage:n}={emptySourceErrorMessage:"no supported properties found"}){const i=De(null);let o=!1;t.sort();for(const n of t){let t=e[n];if(void 0!==t)o=!0,dt.has(n)&&(t=dt.get(n)(t)),i[n]=t;else if("partial"!==r){if(he.call(r,n))throw new TypeError(`required property '${n}' missing or undefined`);t=ht.get(n),i[n]=t}}if("partial"===r&&!o)throw new TypeError(n);return i}function tr(e,t="complete"){const r=["hour","microsecond","millisecond","minute","nanosecond","second"],n=er(e,r,"partial",{emptySourceErrorMessage:"invalid time-like"}),i={};for(const e of r){const r=Ce(n,e);void 0!==r?i[e]=r.value:"complete"===t&&(i[e]=0)}return i}function rr(e,t){let r=e;if(Xe(r)){if(Dt(r))return r;if(kt(r)&&(Ft(t),r=an(W(r,B),W(r,S),W(r,E))),St(r))return Ft(t),mr(W(r,f),W(r,y),W(r,g),W(r,E));const e=Ur(r);return Jr(e,er(r,br(e,["day","month","monthCode","year"]),[]),t)}Ft(t);let{year:n,month:i,day:o,calendar:a,z:s}=function(e){return Yt(e)}(rt(r));if(s)throw new RangeError("Z designator not supported for PlainDate");if(a||(a="iso8601"),!Xi(a))throw new RangeError(`invalid calendar identifier ${a}`);return a=Qi(a),mr(n,i,o,a)}function nr(e,t,r){let{hour:n,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=tr(t);const c=Ft(r),d=Jr(e,t,r),h=W(d,f),u=W(d,y),m=W(d,g);return({hour:n,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=At(n,i,o,a,s,l,c)),{year:h,month:u,day:m,hour:n,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}}function ir(e,t){let r,n,i,o,a,s,l,c,d,h;if(Xe(e)){if(St(e))return e;if(kt(e))return Ft(t),an(W(e,B),W(e,S),W(e,E));if(Dt(e))return Ft(t),yr(W(e,f),W(e,y),W(e,g),0,0,0,0,0,0,W(e,E));h=Ur(e);const u=er(e,br(h,["day","hour","microsecond","millisecond","minute","month","monthCode","nanosecond","second","year"]),[]);({year:r,month:n,day:i,hour:o,minute:a,second:s,millisecond:l,microsecond:c,nanosecond:d}=nr(h,u,t))}else{let u;if(Ft(t),({year:r,month:n,day:i,hour:o,minute:a,second:s,millisecond:l,microsecond:c,nanosecond:d,calendar:h,z:u}=function(e){return Yt(e)}(rt(e))),u)throw new RangeError("Z designator not supported for PlainDateTime");if(ri(r,n,i,o,a,s,l,c,d),h||(h="iso8601"),!Xi(h))throw new RangeError(`invalid calendar identifier ${h}`);h=Qi(h)}return yr(r,n,i,o,a,s,l,c,d,h)}function or(e){if(It(e))return e;let{years:t,months:r,weeks:n,days:i,hours:o,minutes:a,seconds:s,milliseconds:l,microseconds:d,nanoseconds:h}=jt(e);return new(c("%Temporal.Duration%"))(t,r,n,i,o,a,s,l,d,h)}function ar(e){if(Tt(e))return e;if(kt(e))return new(c("%Temporal.Instant%"))(W(e,u));const t=function(e){let{year:t,month:r,day:n,hour:i,minute:o,second:a,millisecond:s,microsecond:l,nanosecond:c,offset:d,z:h}=function(e){const t=Yt(e);if(!t.z&&!t.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return t}(e);if(!h&&!d)throw new RangeError("Temporal.Instant requires a time zone offset");const u=h?0:Tn(d);({year:t,month:r,day:n,hour:i,minute:o,second:a,millisecond:s,microsecond:l,nanosecond:c}=Ln(t,r,n,i,o,a,s,l,c-u));const m=Cn(t,r,n,i,o,a,s,l,c);if(null===m)throw new RangeError("DateTime outside of supported range");return m}(rt(e));return new(c("%Temporal.Instant%"))(t)}function sr(e,t){let r=e;if(Xe(r)){if(Mt(r))return r;let e,n;if(z(r,E))e=W(r,E),n=!1;else{let t=r.calendar;n=void 0===t,void 0===t&&(t="iso8601"),e=Lr(t)}const i=er(r,br(e,["day","month","monthCode","year"]),[]);return n&&void 0!==i.month&&void 0===i.monthCode&&void 0===i.year&&(i.year=1972),Vr(e,i,t)}Ft(t);let{month:n,day:i,referenceISOYear:o,calendar:a}=xt(rt(r));if(void 0===a&&(a="iso8601"),!Xi(a))throw new RangeError(`invalid calendar identifier ${a}`);return a=Qi(a),void 0===o?(Qn(1972,n,i),wr(n,i,a)):Vr(a,wr(n,i,a,o))}function lr(e,t="constrain"){let r,n,i,o,a,s,l=e;if(Xe(l)){if(Ct(l))return l;if(kt(l)&&(l=an(W(l,B),W(l,S),W(l,E))),St(l))return new(c("%Temporal.PlainTime%"))(W(l,w),W(l,p),W(l,v),W(l,_),W(l,T),W(l,b));({hour:r,minute:n,second:i,millisecond:o,microsecond:a,nanosecond:s}=tr(l)),({hour:r,minute:n,second:i,millisecond:o,microsecond:a,nanosecond:s}=At(r,n,i,o,a,s,t))}else({hour:r,minute:n,second:i,millisecond:o,microsecond:a,nanosecond:s}=function(e){const t=oe.exec(e);let r,n,i,o,a,s,l;if(t){r=et(t[1]),n=et(t[2]||t[5]),i=et(t[3]||t[6]),60===i&&(i=59);const e=(t[4]||t[7]