@bereasoftware/time-guard 2.8.0 → 2.9.0

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.
Files changed (40) hide show
  1. package/dist/adapters/temporal.adapter.d.ts +6 -2
  2. package/dist/angular/index.cjs +1 -1
  3. package/dist/angular/index.es.js +6 -3
  4. package/dist/calendars/index.es.js +1 -1
  5. package/dist/core-BDQnStek.cjs +1 -0
  6. package/dist/{core-Dxn1aRFk.js → core-GHK7isoa.js} +29 -15
  7. package/dist/locales/index.es.js +2 -2
  8. package/dist/{locales-3Mw99lQ-.js → locales-Dwe5oGoy.js} +1 -1
  9. package/dist/native/index.cjs +1 -1
  10. package/dist/native/index.es.js +3 -3
  11. package/dist/plugins/advanced-format/index.d.ts +8 -0
  12. package/dist/plugins/advanced-format.cjs +1 -1
  13. package/dist/plugins/advanced-format.es.js +11 -6
  14. package/dist/plugins/duration/index.d.ts +6 -0
  15. package/dist/plugins/duration.cjs +1 -1
  16. package/dist/plugins/duration.es.js +12 -8
  17. package/dist/plugins/manager.d.ts +6 -2
  18. package/dist/plugins/relative-time/index.d.ts +6 -0
  19. package/dist/plugins/relative-time.cjs +1 -1
  20. package/dist/plugins/relative-time.es.js +4 -1
  21. package/dist/qwik/index.cjs +1 -1
  22. package/dist/qwik/index.es.js +29 -26
  23. package/dist/qwik.d.ts +5 -1
  24. package/dist/react/index.cjs +1 -1
  25. package/dist/react/index.es.js +2 -2
  26. package/dist/solid/index.cjs +1 -1
  27. package/dist/solid/index.es.js +12 -10
  28. package/dist/solid.d.ts +5 -2
  29. package/dist/svelte/index.cjs +1 -1
  30. package/dist/svelte/index.es.js +2 -2
  31. package/dist/time-guard.cjs +1 -1
  32. package/dist/time-guard.es.js +3 -3
  33. package/dist/time-guard.iife.js +1 -1
  34. package/dist/time-guard.umd.js +1 -1
  35. package/dist/types/index.d.ts +10 -0
  36. package/dist/vue/index.cjs +1 -1
  37. package/dist/vue/index.es.js +33 -33
  38. package/dist/vue.d.ts +5 -3
  39. package/package.json +2 -2
  40. package/dist/core-TqmHKXY1.cjs +0 -1
@@ -1,16 +1,18 @@
1
- /*! time-guard v2.8.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- import { i as e, o as t, s as n } from "../core-Dxn1aRFk.js";
1
+ /*! time-guard v2.9.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ import { i as e, o as t, s as n } from "../core-GHK7isoa.js";
3
3
  import { createEffect as r, createSignal as i, onCleanup as a } from "solid-js";
4
4
  //#region src/solid.ts
5
5
  var o = Symbol("TimeGuardConfig");
6
- function s(t, n) {
7
- let [a, o] = i(e.from(t, n));
6
+ function s(e) {
7
+ return typeof e == "function" ? e() : e;
8
+ }
9
+ function c(t, n) {
10
+ let [a, o] = i(e.from(s(t), n));
8
11
  return r(() => {
9
- let r = t;
10
- o(() => e.from(r, n));
12
+ o(() => e.from(s(t), n));
11
13
  }), a;
12
14
  }
13
- function c(t) {
15
+ function l(t) {
14
16
  let n = t?.interval ?? 1e3, r = t?.config, [o, s] = i(e.now(r)), c = setInterval(() => {
15
17
  s(e.now(r));
16
18
  }, n);
@@ -18,7 +20,7 @@ function c(t) {
18
20
  clearInterval(c);
19
21
  }), o;
20
22
  }
21
- function l(e, n) {
23
+ function u(e, n) {
22
24
  let r = n?.interval ?? 6e4, o = n?.locale, s = n?.numeric, c = () => t(e, {
23
25
  locale: o,
24
26
  numeric: s
@@ -29,7 +31,7 @@ function l(e, n) {
29
31
  clearInterval(d);
30
32
  }), l;
31
33
  }
32
- function u(e, t, a) {
34
+ function d(e, t, a) {
33
35
  let [o, s] = i(n(e, t, a));
34
36
  return r(() => {
35
37
  let r = e, i = t;
@@ -37,4 +39,4 @@ function u(e, t, a) {
37
39
  }), o;
38
40
  }
39
41
  //#endregion
40
- export { o as TimeGuardConfigContext, c as useCurrentTime, l as useRelativeTime, s as useTimeGuard, u as useTimeRange };
42
+ export { o as TimeGuardConfigContext, l as useCurrentTime, u as useRelativeTime, c as useTimeGuard, d as useTimeRange };
package/dist/solid.d.ts CHANGED
@@ -7,10 +7,13 @@ import { TimeGuard, ITimeGuardConfig, TimeRange } from './core';
7
7
  export declare const TimeGuardConfigContext: unique symbol;
8
8
  /**
9
9
  * Creates a reactive signal of a TimeGuard instance.
10
- * The signal updates reactively when `input` changes.
10
+ * The signal updates reactively when `input` changes — pass an Accessor
11
+ * (e.g. a signal getter) for `input` to make this actually track it; a
12
+ * plain value is used once and won't update on its own.
11
13
  *
12
14
  * ```tsx
13
- * const tg = useTimeGuard('2026-05-20');
15
+ * const [dateStr, setDateStr] = createSignal('2026-05-20');
16
+ * const tg = useTimeGuard(dateStr); // note: dateStr, not dateStr()
14
17
  * return <p>{tg().format('dddd, DD MMMM YYYY')}</p>;
15
18
  * ```
16
19
  */
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../core-TqmHKXY1.cjs");Array.isArray,Array.prototype.indexOf,Array.prototype.includes,Array.from,Array.prototype;var t=()=>{};function n(e){for(var t=0;t<e.length;t++)e[t]()}var r=1024,i=2048,a=4096,o=65536,s=1<<19;new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},globalThis.document?.contentType;function c(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}~(i|a|r);function l(e,n,r){if(e==null)return n(void 0),r&&r(void 0),t;let i=h(()=>e.subscribe(n,r));return i.unsubscribe?()=>i.unsubscribe():i}var u=[];function d(e,t){return{subscribe:f(e,t).subscribe}}function f(e,n=t){let r=null,i=new Set;function a(t){if(c(e,t)&&(e=t,r)){let t=!u.length;for(let t of i)t[1](),u.push(t,e);if(t){for(let e=0;e<u.length;e+=2)u[e][0](u[e+1]);u.length=0}}}function o(t){a(t(e))}function s(s,c=t){let l=[s,c];return i.add(l),i.size===1&&(r=n(a,o)||t),s(e),()=>{i.delete(l),i.size===0&&r&&(r(),r=null)}}return{set:a,update:o,subscribe:s}}function p(e,r,i){let a=!Array.isArray(e),o=a?[e]:e;if(!o.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let s=r.length<2;return d(i,(e,i)=>{let c=!1,u=[],d=0,f=t,p=()=>{if(d)return;f();let n=r(a?u[0]:u,e,i);s?e(n):f=typeof n==`function`?n:t},m=o.map((e,t)=>l(e,e=>{u[t]=e,d&=~(1<<t),c&&p()},()=>{d|=1<<t}));return c=!0,p(),function(){n(m),f(),c=!1}})}o|s;var m=!1;function h(e){var t=m;try{return m=!0,e()}finally{m=t}}function g(e){return typeof e==`object`&&!!e&&`subscribe`in e&&typeof e.subscribe==`function`}function _(e){return g(e)?e:d(e)}var v=Symbol(`TimeGuardConfig`);function y(t,n){return g(t)?p(t,t=>e.i.from(t,n)):d(e.i.from(t,n))}function b(t){let n=t?.interval??1e3,r=t?.config,i=f(e.i.now(r),()=>{let t=setInterval(()=>{i.set(e.i.now(r))},n);return()=>{clearInterval(t)}});return{subscribe:i.subscribe}}function x(t,n){let r=n?.interval??6e4,i=n?.locale,a=n?.numeric,o=()=>e.o(t,{locale:i,numeric:a}),s=f(o(),()=>{let e=setInterval(()=>{s.set(o())},r);return()=>{clearInterval(e)}});return{subscribe:s.subscribe}}function S(t,n,r){return p([_(t),_(n)],([t,n])=>e.s(t,n,r))}exports.TimeGuardConfigKey=v,exports.useCurrentTime=b,exports.useRelativeTime=x,exports.useTimeGuard=y,exports.useTimeRange=S;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../core-BDQnStek.cjs");Array.isArray,Array.prototype.indexOf,Array.prototype.includes,Array.from,Array.prototype;var t=()=>{};function n(e){for(var t=0;t<e.length;t++)e[t]()}var r=1024,i=2048,a=4096,o=65536,s=1<<19;new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},globalThis.document?.contentType;function c(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}~(i|a|r);function l(e,n,r){if(e==null)return n(void 0),r&&r(void 0),t;let i=h(()=>e.subscribe(n,r));return i.unsubscribe?()=>i.unsubscribe():i}var u=[];function d(e,t){return{subscribe:f(e,t).subscribe}}function f(e,n=t){let r=null,i=new Set;function a(t){if(c(e,t)&&(e=t,r)){let t=!u.length;for(let t of i)t[1](),u.push(t,e);if(t){for(let e=0;e<u.length;e+=2)u[e][0](u[e+1]);u.length=0}}}function o(t){a(t(e))}function s(s,c=t){let l=[s,c];return i.add(l),i.size===1&&(r=n(a,o)||t),s(e),()=>{i.delete(l),i.size===0&&r&&(r(),r=null)}}return{set:a,update:o,subscribe:s}}function p(e,r,i){let a=!Array.isArray(e),o=a?[e]:e;if(!o.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let s=r.length<2;return d(i,(e,i)=>{let c=!1,u=[],d=0,f=t,p=()=>{if(d)return;f();let n=r(a?u[0]:u,e,i);s?e(n):f=typeof n==`function`?n:t},m=o.map((e,t)=>l(e,e=>{u[t]=e,d&=~(1<<t),c&&p()},()=>{d|=1<<t}));return c=!0,p(),function(){n(m),f(),c=!1}})}o|s;var m=!1;function h(e){var t=m;try{return m=!0,e()}finally{m=t}}function g(e){return typeof e==`object`&&!!e&&`subscribe`in e&&typeof e.subscribe==`function`}function _(e){return g(e)?e:d(e)}var v=Symbol(`TimeGuardConfig`);function y(t,n){return g(t)?p(t,t=>e.i.from(t,n)):d(e.i.from(t,n))}function b(t){let n=t?.interval??1e3,r=t?.config,i=f(e.i.now(r),()=>{let t=setInterval(()=>{i.set(e.i.now(r))},n);return()=>{clearInterval(t)}});return{subscribe:i.subscribe}}function x(t,n){let r=n?.interval??6e4,i=n?.locale,a=n?.numeric,o=()=>e.o(t,{locale:i,numeric:a}),s=f(o(),()=>{let e=setInterval(()=>{s.set(o())},r);return()=>{clearInterval(e)}});return{subscribe:s.subscribe}}function S(t,n,r){return p([_(t),_(n)],([t,n])=>e.s(t,n,r))}exports.TimeGuardConfigKey=v,exports.useCurrentTime=b,exports.useRelativeTime=x,exports.useTimeGuard=y,exports.useTimeRange=S;
@@ -1,5 +1,5 @@
1
- /*! time-guard v2.8.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- import { i as e, o as t, s as n } from "../core-Dxn1aRFk.js";
1
+ /*! time-guard v2.9.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ import { i as e, o as t, s as n } from "../core-GHK7isoa.js";
3
3
  Array.isArray, Array.prototype.indexOf, Array.prototype.includes, Array.from, Array.prototype;
4
4
  var r = () => {};
5
5
  function i(e) {
@@ -1,3 +1,3 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunk-C6qsp3rV.cjs"),t=require("./core-TqmHKXY1.cjs"),n=require("./locales-bc-5kDuZ.cjs"),r=require("./calendars/index.cjs"),i=require("./plugins/relative-time.cjs"),a=require("./plugins/duration.cjs"),o=require("./plugins/advanced-format.cjs");var s=e.t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.JSBI=r())})(e,function(){"use strict";var e=Math.imul,t=Math.clz32;function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(e){if(Array.isArray(e))return e}function i(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function a(e,t,n){return t=d(t),_(e,m()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&v(i,n.prototype),i}function c(e,t){for(var n,r=0;r<t.length;r++)n=t[r],n.enumerable=n.enumerable||!1,n.configurable=!0,`value`in n&&(n.writable=!0),Object.defineProperty(e,x(n.key),n)}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=ee(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunk-C6qsp3rV.cjs"),t=require("./core-BDQnStek.cjs"),n=require("./locales-bc-5kDuZ.cjs"),r=require("./calendars/index.cjs"),i=require("./plugins/relative-time.cjs"),a=require("./plugins/duration.cjs"),o=require("./plugins/advanced-format.cjs");var s=e.t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.JSBI=r())})(e,function(){"use strict";var e=Math.imul,t=Math.clz32;function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(e){if(Array.isArray(e))return e}function i(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function a(e,t,n){return t=d(t),_(e,m()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t,n){if(m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&v(i,n.prototype),i}function c(e,t){for(var n,r=0;r<t.length;r++)n=t[r],n.enumerable=n.enumerable||!1,n.configurable=!0,`value`in n&&(n.writable=!0),Object.defineProperty(e,x(n.key),n)}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=ee(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function p(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m=function(){return!!e})()}function h(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function g(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return i(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function y(e,t){return r(e)||h(e,t)||ee(e,t)||g()}function b(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function x(e){var t=b(e,`string`);return typeof t==`symbol`?t:t+``}function S(e){"@babel/helpers - typeof";return S=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},S(e)}function ee(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function te(e){var t=typeof Map==`function`?new Map:void 0;return te=function(e){function n(){return s(e,arguments,d(this).constructor)}if(e===null||!p(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},te(e)}var C=function(e){var t=Math.abs,n=Math.max,r=Math.floor;function i(e,t){var n;if(o(this,i),n=a(this,i,[e]),n.sign=t,Object.setPrototypeOf(n,i.prototype),e>i.__kMaxLength)throw RangeError(`Maximum BigInt size exceeded`);return n}return f(i,e),l(i,[{key:`toDebugString`,value:function(){var e,t=[`BigInt[`],n=u(this);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push((r&&(r>>>0).toString(16))+`, `)}}catch(e){n.e(e)}finally{n.f()}return t.push(`]`),t.join(``)}},{key:`toString`,value:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:10;if(2>e||36<e)throw RangeError(`toString() radix argument must be between 2 and 36`);return this.length===0?`0`:e&e-1?i.__toStringGeneric(this,e,!1):i.__toStringBasePowerOfTwo(this,e)}},{key:`valueOf`,value:function(){throw Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:`__copy`,value:function(){for(var e=new i(this.length,this.sign),t=0;t<this.length;t++)e[t]=this[t];return e}},{key:`__trim`,value:function(){for(var e=this.length,t=this[e-1];t===0;)e--,t=this[e-1],this.pop();return e===0&&(this.sign=!1),this}},{key:`__initializeDigits`,value:function(){for(var e=0;e<this.length;e++)this[e]=0}},{key:`__clzmsd`,value:function(){return i.__clz30(this.__digit(this.length-1))}},{key:`__inplaceMultiplyAdd`,value:function(e,t,n){n>this.length&&(n=this.length);for(var r=32767&e,a=e>>>15,o=0,s=t,c=0;c<n;c++){var l=this.__digit(c),u=32767&l,d=l>>>15,f=i.__imul(u,r),p=i.__imul(u,a),m=i.__imul(d,r),h=i.__imul(d,a),g=s+f+o;o=g>>>30,g&=1073741823,g+=((32767&p)<<15)+((32767&m)<<15),o+=g>>>30,s=h+(p>>>15)+(m>>>15),this.__setDigit(c,1073741823&g)}if(o!==0||s!==0)throw Error(`implementation bug`)}},{key:`__inplaceAdd`,value:function(e,t,n){for(var r,i=0,a=0;a<n;a++)r=this.__halfDigit(t+a)+e.__halfDigit(a)+i,i=r>>>15,this.__setHalfDigit(t+a,32767&r);return i}},{key:`__inplaceSub`,value:function(e,t,n){var r=n-1>>>1,i=0;if(1&t){t>>=1;for(var a=this.__digit(t),o=32767&a,s=0;s<r;s++){var c=e.__digit(s),l=(a>>>15)-(32767&c)-i;i=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o),a=this.__digit(t+s+1),o=(32767&a)-(c>>>15)-i,i=1&o>>>15}var u=e.__digit(s),d=(a>>>15)-(32767&u)-i;i=1&d>>>15,this.__setDigit(t+s,(32767&d)<<15|32767&o);var f=u>>>15;if(t+s+1>=this.length)throw RangeError(`out of bounds`);!(1&n)&&(a=this.__digit(t+s+1),o=(32767&a)-f-i,i=1&o>>>15,this.__setDigit(t+e.length,1073709056&a|32767&o))}else{t>>=1;for(var p=0;p<e.length-1;p++){var m=this.__digit(t+p),h=e.__digit(p),g=(32767&m)-(32767&h)-i;i=1&g>>>15;var _=(m>>>15)-(h>>>15)-i;i=1&_>>>15,this.__setDigit(t+p,(32767&_)<<15|32767&g)}var v=this.__digit(t+p),y=e.__digit(p),b=(32767&v)-(32767&y)-i;i=1&b>>>15;var x=0;!(1&n)&&(x=(v>>>15)-(y>>>15)-i,i=1&x>>>15),this.__setDigit(t+p,(32767&x)<<15|32767&b)}return i}},{key:`__inplaceRightShift`,value:function(e){if(e!==0){for(var t,n=this.__digit(0)>>>e,r=this.length-1,i=0;i<r;i++)t=this.__digit(i+1),this.__setDigit(i,1073741823&t<<30-e|n),n=t>>>e;this.__setDigit(r,n)}}},{key:`__digit`,value:function(e){return this[e]}},{key:`__unsignedDigit`,value:function(e){return this[e]>>>0}},{key:`__setDigit`,value:function(e,t){this[e]=0|t}},{key:`__setDigitGrow`,value:function(e,t){this[e]=0|t}},{key:`__halfDigitLength`,value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:`__halfDigit`,value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:`__setHalfDigit`,value:function(e,t){var n=e>>>1,r=this.__digit(n),i=1&e?32767&r|t<<15:1073709056&r|32767&t;this.__setDigit(n,i)}}],[{key:`BigInt`,value:function(e){var t=Number.isFinite;if(typeof e==`number`){if(e===0)return i.__zero();if(i.__isOneDigitInt(e))return 0>e?i.__oneDigit(-e,!0):i.__oneDigit(e,!1);if(!t(e)||r(e)!==e)throw RangeError(`The number `+e+` cannot be converted to BigInt because it is not an integer`);return i.__fromDouble(e)}if(typeof e==`string`){var n=i.__fromString(e);if(n===null)throw SyntaxError(`Cannot convert `+e+` to a BigInt`);return n}if(typeof e==`boolean`)return!0===e?i.__oneDigit(1,!1):i.__zero();if(S(e)===`object`){if(e.constructor===i)return e;var a=i.__toPrimitive(e);return i.BigInt(a)}throw TypeError(`Cannot convert `+e+` to a BigInt`)}},{key:`toNumber`,value:function(e){var t=e.length;if(t===0)return 0;if(t===1){var n=e.__unsignedDigit(0);return e.sign?-n:n}var r=e.__digit(t-1),a=i.__clz30(r),o=30*t-a;if(1024<o)return e.sign?-1/0:1/0;var s=o-1,c=r,l=t-1,u=a+3,d=u===32?0:c<<u;d>>>=12;var f=u-12,p=12<=u?0:c<<20+u,m=20+u;for(0<f&&0<l&&(l--,c=e.__digit(l),d|=c>>>30-f,p=c<<f+2,m=f+2);0<m&&0<l;)l--,c=e.__digit(l),p|=30<=m?c<<m-30:c>>>30-m,m-=30;var h=i.__decideRounding(e,m,l,c);if((h===1||h===0&&(1&p)==1)&&(p=p+1>>>0,p===0&&(d++,d>>>20&&(d=0,s++,1023<s))))return e.sign?-1/0:1/0;var g=e.sign?-2147483648:0;return s=s+1023<<20,i.__kBitConversionInts[i.__kBitConversionIntHigh]=g|s|d,i.__kBitConversionInts[i.__kBitConversionIntLow]=p,i.__kBitConversionDouble[0]}},{key:`unaryMinus`,value:function(e){if(e.length===0)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:`bitwiseNot`,value:function(e){return e.sign?i.__absoluteSubOne(e).__trim():i.__absoluteAddOne(e,!0)}},{key:`exponentiate`,value:function(e,t){if(t.sign)throw RangeError(`Exponent must be positive`);if(t.length===0)return i.__oneDigit(1,!1);if(e.length===0)return e;if(e.length===1&&e.__digit(0)===1)return e.sign&&!(1&t.__digit(0))?i.unaryMinus(e):e;if(1<t.length)throw RangeError(`BigInt too big`);var n=t.__unsignedDigit(0);if(n===1)return e;if(n>=i.__kMaxLengthBits)throw RangeError(`BigInt too big`);if(e.length===1&&e.__digit(0)===2){var r=1+(0|n/30),a=new i(r,e.sign&&(1&n)!=0);a.__initializeDigits();var o=1<<n%30;return a.__setDigit(r-1,o),a}var s=null,c=e;for(1&n&&(s=e),n>>=1;n!==0;n>>=1)c=i.multiply(c,c),1&n&&(s=s===null?c:i.multiply(s,c));return s}},{key:`multiply`,value:function(e,t){if(e.length===0)return e;if(t.length===0)return t;var n=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&n--;var r=new i(n,e.sign!==t.sign);r.__initializeDigits();for(var a=0;a<e.length;a++)i.__multiplyAccumulate(t,e.__digit(a),r,a);return r.__trim()}},{key:`divide`,value:function(e,t){if(t.length===0)throw RangeError(`Division by zero`);if(0>i.__absoluteCompare(e,t))return i.__zero();var n,r=e.sign!==t.sign,a=t.__unsignedDigit(0);if(t.length===1&&32767>=a){if(a===1)return r===e.sign?e:i.unaryMinus(e);n=i.__absoluteDivSmall(e,a,null)}else n=i.__absoluteDivLarge(e,t,!0,!1);return n.sign=r,n.__trim()}},{key:`remainder`,value:function(e,t){if(t.length===0)throw RangeError(`Division by zero`);if(0>i.__absoluteCompare(e,t))return e;var n=t.__unsignedDigit(0);if(t.length===1&&32767>=n){if(n===1)return i.__zero();var r=i.__absoluteModSmall(e,n);return r===0?i.__zero():i.__oneDigit(r,e.sign)}var a=i.__absoluteDivLarge(e,t,!1,!0);return a.sign=e.sign,a.__trim()}},{key:`add`,value:function(e,t){var n=e.sign;return n===t.sign?i.__absoluteAdd(e,t,n):0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n)}},{key:`subtract`,value:function(e,t){var n=e.sign;return n===t.sign?0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n):i.__absoluteAdd(e,t,n)}},{key:`leftShift`,value:function(e,t){return t.length===0||e.length===0?e:t.sign?i.__rightShiftByAbsolute(e,t):i.__leftShiftByAbsolute(e,t)}},{key:`signedRightShift`,value:function(e,t){return t.length===0||e.length===0?e:t.sign?i.__leftShiftByAbsolute(e,t):i.__rightShiftByAbsolute(e,t)}},{key:`unsignedRightShift`,value:function(){throw TypeError(`BigInts have no unsigned right shift; use >> instead`)}},{key:`lessThan`,value:function(e,t){return 0>i.__compareToBigInt(e,t)}},{key:`lessThanOrEqual`,value:function(e,t){return 0>=i.__compareToBigInt(e,t)}},{key:`greaterThan`,value:function(e,t){return 0<i.__compareToBigInt(e,t)}},{key:`greaterThanOrEqual`,value:function(e,t){return 0<=i.__compareToBigInt(e,t)}},{key:`equal`,value:function(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e.__digit(n)!==t.__digit(n))return!1;return!0}},{key:`notEqual`,value:function(e,t){return!i.equal(e,t)}},{key:`bitwiseAnd`,value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){var r=n(e.length,t.length)+1,a=i.__absoluteSubOne(e,r),o=i.__absoluteSubOne(t);return a=i.__absoluteOr(a,o,a),i.__absoluteAddOne(a,!0,a).__trim()}if(e.sign){var s=[t,e];e=s[0],t=s[1]}return i.__absoluteAndNot(e,i.__absoluteSubOne(t)).__trim()}},{key:`bitwiseXor`,value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){var r=n(e.length,t.length),a=i.__absoluteSubOne(e,r),o=i.__absoluteSubOne(t);return i.__absoluteXor(a,o,a).__trim()}var s=n(e.length,t.length)+1;if(e.sign){var c=[t,e];e=c[0],t=c[1]}var l=i.__absoluteSubOne(t,s);return l=i.__absoluteXor(l,e,l),i.__absoluteAddOne(l,!0,l).__trim()}},{key:`bitwiseOr`,value:function(e,t){var r=n(e.length,t.length);if(!e.sign&&!t.sign)return i.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){var a=i.__absoluteSubOne(e,r),o=i.__absoluteSubOne(t);return a=i.__absoluteAnd(a,o,a),i.__absoluteAddOne(a,!0,a).__trim()}if(e.sign){var s=[t,e];e=s[0],t=s[1]}var c=i.__absoluteSubOne(t,r);return c=i.__absoluteAndNot(c,e,c),i.__absoluteAddOne(c,!0,c).__trim()}},{key:`asIntN`,value:function(e,t){if(t.length===0)return t;if(e=r(e),0>e)throw RangeError(`Invalid value: not (convertible to) a safe integer`);if(e===0)return i.__zero();if(e>=i.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length<n)return t;var a=t.__unsignedDigit(n-1),o=1<<(e-1)%30;if(t.length===n&&a<o)return t;if((a&o)!==o)return i.__truncateToNBits(e,t);if(!t.sign)return i.__truncateAndSubFromPowerOfTwo(e,t,!0);if(!(a&o-1)){for(var s=n-2;0<=s;s--)if(t.__digit(s)!==0)return i.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===n&&a===o?t:i.__truncateToNBits(e,t)}return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}},{key:`asUintN`,value:function(e,t){if(t.length===0)return t;if(e=r(e),0>e)throw RangeError(`Invalid value: not (convertible to) a safe integer`);if(e===0)return i.__zero();if(t.sign){if(e>i.__kMaxLengthBits)throw RangeError(`BigInt too big`);return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=i.__kMaxLengthBits)return t;var n=0|(e+29)/30;if(t.length<n)return t;var a=e%30;return t.length==n&&(a===0||!(t.__digit(n-1)>>>a))?t:i.__truncateToNBits(e,t)}},{key:`ADD`,value:function(e,t){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),typeof e==`string`)return typeof t!=`string`&&(t=t.toString()),e+t;if(typeof t==`string`)return e.toString()+t;if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)&&i.__isBigInt(t))return i.add(e,t);if(typeof e==`number`&&typeof t==`number`)return e+t;throw TypeError(`Cannot mix BigInt and other types, use explicit conversions`)}},{key:`LT`,value:function(e,t){return i.__compare(e,t,0)}},{key:`LE`,value:function(e,t){return i.__compare(e,t,1)}},{key:`GT`,value:function(e,t){return i.__compare(e,t,2)}},{key:`GE`,value:function(e,t){return i.__compare(e,t,3)}},{key:`EQ`,value:function(e,t){for(;;){if(i.__isBigInt(e))return i.__isBigInt(t)?i.equal(e,t):i.EQ(t,e);if(typeof e==`number`){if(i.__isBigInt(t))return i.__equalToNumber(t,e);if(S(t)!==`object`)return e==t;t=i.__toPrimitive(t)}else if(typeof e==`string`){if(i.__isBigInt(t))return e=i.__fromString(e),e!==null&&i.equal(e,t);if(S(t)!==`object`)return e==t;t=i.__toPrimitive(t)}else if(typeof e==`boolean`){if(i.__isBigInt(t))return i.__equalToNumber(t,+e);if(S(t)!==`object`)return e==t;t=i.__toPrimitive(t)}else if(S(e)===`symbol`){if(i.__isBigInt(t))return!1;if(S(t)!==`object`)return e==t;t=i.__toPrimitive(t)}else if(S(e)===`object`){if(S(t)===`object`&&t.constructor!==i)return e==t;e=i.__toPrimitive(e)}else return e==t}}},{key:`NE`,value:function(e,t){return!i.EQ(e,t)}},{key:`DataViewGetBigInt64`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return i.asIntN(64,i.DataViewGetBigUint64(e,t,n))}},{key:`DataViewGetBigUint64`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0&&arguments[2],r=y(n?[4,0]:[0,4],2),a=r[0],o=r[1],s=e.getUint32(t+a,n),c=e.getUint32(t+o,n),l=new i(3,!1);return l.__setDigit(0,1073741823&c),l.__setDigit(1,(268435455&s)<<2|c>>>30),l.__setDigit(2,s>>>28),l.__trim()}},{key:`DataViewSetBigInt64`,value:function(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0&&arguments[3];i.DataViewSetBigUint64(e,t,n,r)}},{key:`DataViewSetBigUint64`,value:function(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0&&arguments[3];n=i.asUintN(64,n);var a=0,o=0;if(0<n.length&&(o=n.__digit(0),1<n.length)){var s=n.__digit(1);o|=s<<30,a=s>>>2,2<n.length&&(a|=n.__digit(2)<<28)}var c=y(r?[4,0]:[0,4],2),l=c[0],u=c[1];e.setUint32(t+l,a,r),e.setUint32(t+u,o,r)}},{key:`__zero`,value:function(){return new i(0,!1)}},{key:`__oneDigit`,value:function(e,t){var n=new i(1,t);return n.__setDigit(0,e),n}},{key:`__decideRounding`,value:function(e,t,n,r){if(0<t)return-1;var i;if(0>t)i=-t-1;else{if(n===0)return-1;n--,r=e.__digit(n),i=29}var a=1<<i;if((r&a)==0)return-1;if(--a,(r&a)!=0)return 1;for(;0<n;)if(n--,e.__digit(n)!==0)return 1;return 0}},{key:`__fromDouble`,value:function(e){var t=0>e;i.__kBitConversionDouble[0]=e;var n,r=(2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20)-1023,a=(0|r/30)+1,o=new i(a,t),s=1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh]|1048576,c=i.__kBitConversionInts[i.__kBitConversionIntLow],l=20,u=r%30,d=0;if(u<l){var f=l-u;d=f+32,n=s>>>f,s=s<<32-f|c>>>f,c<<=32-f}else if(u===l)d=32,n=s,s=c,c=0;else{var p=u-l;d=32-p,n=s<<p|c>>>32-p,s=c<<p,c=0}o.__setDigit(a-1,n);for(var m=a-2;0<=m;m--)0<d?(d-=30,n=s>>>2,s=s<<30|c>>>2,c<<=30):n=0,o.__setDigit(m,n);return o.__trim()}},{key:`__isWhitespace`,value:function(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)}},{key:`__fromString`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,n=0,r=e.length,a=0;if(a===r)return i.__zero();for(var o=e.charCodeAt(a);i.__isWhitespace(o);){if(++a===r)return i.__zero();o=e.charCodeAt(a)}if(o===43){if(++a===r)return null;o=e.charCodeAt(a),n=1}else if(o===45){if(++a===r)return null;o=e.charCodeAt(a),n=-1}if(t===0){if(t=10,o===48){if(++a===r)return i.__zero();if(o=e.charCodeAt(a),o===88||o===120){if(t=16,++a===r)return null;o=e.charCodeAt(a)}else if(o===79||o===111){if(t=8,++a===r)return null;o=e.charCodeAt(a)}else if(o===66||o===98){if(t=2,++a===r)return null;o=e.charCodeAt(a)}}}else if(t===16&&o===48){if(++a===r)return i.__zero();if(o=e.charCodeAt(a),o===88||o===120){if(++a===r)return null;o=e.charCodeAt(a)}}if(n!==0&&t!==10)return null;for(;o===48;){if(++a===r)return i.__zero();o=e.charCodeAt(a)}var s=r-a,c=i.__kMaxBitsPerChar[t],l=i.__kBitsPerCharTableMultiplier-1;if(s>1073741824/c)return null;var u=new i(0|((c*s+l>>>i.__kBitsPerCharTableShift)+29)/30,!1),d=10>t?t:10,f=10<t?t-10:0;if(t&t-1){u.__initializeDigits();var p=!1,m=0;do{for(var h,g=0,_=1;;){if(h=void 0,o-48>>>0<d)h=o-48;else if((32|o)-97>>>0<f)h=(32|o)-87;else{p=!0;break}var v=_*t;if(1073741823<v)break;if(_=v,g=g*t+h,m++,++a===r){p=!0;break}o=e.charCodeAt(a)}l=30*i.__kBitsPerCharTableMultiplier-1;var y=0|(c*m+l>>>i.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(_,g,y)}while(!p)}else{c>>=i.__kBitsPerCharTableShift;var b=[],x=[],S=!1;do{for(var ee,te=0,C=0;;){if(ee=void 0,o-48>>>0<d)ee=o-48;else if((32|o)-97>>>0<f)ee=(32|o)-87;else{S=!0;break}if(C+=c,te=te<<c|ee,++a===r){S=!0;break}if(o=e.charCodeAt(a),30<C+c)break}b.push(te),x.push(C)}while(!S);i.__fillFromParts(u,b,x)}if(a!==r){if(!i.__isWhitespace(o))return null;for(a++;a<r;a++)if(o=e.charCodeAt(a),!i.__isWhitespace(o))return null}return u.sign=n===-1,u.__trim()}},{key:`__fillFromParts`,value:function(e,t,n){for(var r=0,i=0,a=0,o=t.length-1;0<=o;o--){var s=t[o],c=n[o];i|=s<<a,a+=c,a===30?(e.__setDigit(r++,i),a=0,i=0):30<a&&(e.__setDigit(r++,1073741823&i),a-=30,i=s>>>c-a)}if(i!==0){if(r>=e.length)throw Error(`implementation bug`);e.__setDigit(r++,i)}for(;r<e.length;r++)e.__setDigit(r,0)}},{key:`__toStringBasePowerOfTwo`,value:function(e,t){var n=e.length,r=t-1;r=(85&r>>>1)+(85&r),r=(51&r>>>2)+(51&r),r=(15&r>>>4)+(15&r);var a=r,o=t-1,s=e.__digit(n-1),c=i.__clz30(s),l=0|(30*n-c+a-1)/a;if(e.sign&&l++,268435456<l)throw Error(`string too long`);for(var u=Array(l),d=l-1,f=0,p=0,m=0;m<n-1;m++){var h=e.__digit(m),g=(f|h<<p)&o;u[d--]=i.__kConversionChars[g];var _=a-p;for(f=h>>>_,p=30-_;p>=a;)u[d--]=i.__kConversionChars[f&o],f>>>=a,p-=a}var v=(f|s<<p)&o;for(u[d--]=i.__kConversionChars[v],f=s>>>a-p;f!==0;)u[d--]=i.__kConversionChars[f&o],f>>>=a;if(e.sign&&(u[d--]=`-`),d!==-1)throw Error(`implementation bug`);return u.join(``)}},{key:`__toStringGeneric`,value:function(e,t,n){var r=e.length;if(r===0)return``;if(r===1){var a=e.__unsignedDigit(0).toString(t);return!1===n&&e.sign&&(a=`-`+a),a}var o=30*r-i.__clz30(e.__digit(r-1)),s=i.__kMaxBitsPerChar[t]-1,c=o*i.__kBitsPerCharTableMultiplier;c+=s-1,c=0|c/s;var l,u,d=c+1>>1,f=i.exponentiate(i.__oneDigit(t,!1),i.__oneDigit(d,!1)),p=f.__unsignedDigit(0);if(f.length===1&&32767>=p){l=new i(e.length,!1),l.__initializeDigits();for(var m,h=0,g=2*e.length-1;0<=g;g--)m=h<<15|e.__halfDigit(g),l.__setHalfDigit(g,0|m/p),h=0|m%p;u=h.toString(t)}else{var _=i.__absoluteDivLarge(e,f,!0,!0);l=_.quotient;var v=_.remainder.__trim();u=i.__toStringGeneric(v,t,!0)}l.__trim();for(var y=i.__toStringGeneric(l,t,!0);u.length<d;)u=`0`+u;return!1===n&&e.sign&&(y=`-`+y),y+u}},{key:`__unequalSign`,value:function(e){return e?-1:1}},{key:`__absoluteGreater`,value:function(e){return e?-1:1}},{key:`__absoluteLess`,value:function(e){return e?1:-1}},{key:`__compareToBigInt`,value:function(e,t){var n=e.sign;if(n!==t.sign)return i.__unequalSign(n);var r=i.__absoluteCompare(e,t);return 0<r?i.__absoluteGreater(n):0>r?i.__absoluteLess(n):0}},{key:`__compareToNumber`,value:function(e,n){if(i.__isOneDigitInt(n)){var r=e.sign,a=0>n;if(r!==a)return i.__unequalSign(r);if(e.length===0){if(a)throw Error(`implementation bug`);return n===0?0:-1}if(1<e.length)return i.__absoluteGreater(r);var o=t(n),s=e.__unsignedDigit(0);return s>o?i.__absoluteGreater(r):s<o?i.__absoluteLess(r):0}return i.__compareToDouble(e,n)}},{key:`__compareToDouble`,value:function(e,t){if(t!==t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;var n=e.sign;if(n!==0>t)return i.__unequalSign(n);if(t===0)throw Error(`implementation bug: should be handled elsewhere`);if(e.length===0)return-1;i.__kBitConversionDouble[0]=t;var r=2047&i.__kBitConversionInts[i.__kBitConversionIntHigh]>>>20;if(r==2047)throw Error(`implementation bug: handled elsewhere`);var a=r-1023;if(0>a)return i.__absoluteGreater(n);var o=e.length,s=e.__digit(o-1),c=i.__clz30(s),l=30*o-c,u=a+1;if(l<u)return i.__absoluteLess(n);if(l>u)return i.__absoluteGreater(n);var d=1048576|1048575&i.__kBitConversionInts[i.__kBitConversionIntHigh],f=i.__kBitConversionInts[i.__kBitConversionIntLow],p=20,m=29-c;if(m!==(0|(l-1)%30))throw Error(`implementation bug`);var h,g=0;if(m<p){var _=p-m;g=_+32,h=d>>>_,d=d<<32-_|f>>>_,f<<=32-_}else if(m===p)g=32,h=d,d=f,f=0;else{var v=m-p;g=32-v,h=d<<v|f>>>32-v,d=f<<v,f=0}if(s>>>=0,h>>>=0,s>h)return i.__absoluteGreater(n);if(s<h)return i.__absoluteLess(n);for(var y=o-2;0<=y;y--){0<g?(g-=30,h=d>>>2,d=d<<30|f>>>2,f<<=30):h=0;var b=e.__unsignedDigit(y);if(b>h)return i.__absoluteGreater(n);if(b<h)return i.__absoluteLess(n)}if(d!==0||f!==0){if(g===0)throw Error(`implementation bug`);return i.__absoluteLess(n)}return 0}},{key:`__equalToNumber`,value:function(e,n){return i.__isOneDigitInt(n)?n===0?e.length===0:e.length===1&&e.sign===0>n&&e.__unsignedDigit(0)===t(n):i.__compareToDouble(e,n)===0}},{key:`__comparisonResultToBool`,value:function(e,t){return t===0?0>e:t===1?0>=e:t===2?0<e:t===3?0<=e:void 0}},{key:`__compare`,value:function(e,t,n){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),typeof e==`string`&&typeof t==`string`)switch(n){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(i.__isBigInt(e)&&typeof t==`string`)return t=i.__fromString(t),t!==null&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if(typeof e==`string`&&i.__isBigInt(t))return e=i.__fromString(e),e!==null&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)){if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if(typeof t!=`number`)throw Error(`implementation bug`);return i.__comparisonResultToBool(i.__compareToNumber(e,t),n)}if(typeof e!=`number`)throw Error(`implementation bug`);if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToNumber(t,e),2^n);if(typeof t!=`number`)throw Error(`implementation bug`);return n===0?e<t:n===1?e<=t:n===2?e>t:n===3?e>=t:void 0}},{key:`__absoluteAdd`,value:function(e,t,n){if(e.length<t.length)return i.__absoluteAdd(t,e,n);if(e.length===0)return e;if(t.length===0)return e.sign===n?e:i.unaryMinus(e);var r=e.length;(e.__clzmsd()===0||t.length===e.length&&t.__clzmsd()===0)&&r++;for(var a,o=new i(r,n),s=0,c=0;c<t.length;c++)a=e.__digit(c)+t.__digit(c)+s,s=a>>>30,o.__setDigit(c,1073741823&a);for(;c<e.length;c++){var l=e.__digit(c)+s;s=l>>>30,o.__setDigit(c,1073741823&l)}return c<o.length&&o.__setDigit(c,s),o.__trim()}},{key:`__absoluteSub`,value:function(e,t,n){if(e.length===0)return e;if(t.length===0)return e.sign===n?e:i.unaryMinus(e);for(var r,a=new i(e.length,n),o=0,s=0;s<t.length;s++)r=e.__digit(s)-t.__digit(s)-o,o=1&r>>>30,a.__setDigit(s,1073741823&r);for(;s<e.length;s++){var c=e.__digit(s)-o;o=1&c>>>30,a.__setDigit(s,1073741823&c)}return a.__trim()}},{key:`__absoluteAddOne`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=e.length;n===null?n=new i(r,t):n.sign=t;for(var a,o=1,s=0;s<r;s++)a=e.__digit(s)+o,o=a>>>30,n.__setDigit(s,1073741823&a);return o!==0&&n.__setDigitGrow(r,1),n}},{key:`__absoluteSubOne`,value:function(e,t){var n=e.length;t||=n;for(var r,a=new i(t,!1),o=1,s=0;s<n;s++)r=e.__digit(s)-o,o=1&r>>>30,a.__setDigit(s,1073741823&r);if(o!==0)throw Error(`implementation bug`);for(var c=n;c<t;c++)a.__setDigit(c,0);return a}},{key:`__absoluteAnd`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=e.length,a=t.length,o=a;if(r<a){o=r;var s=e,c=r;e=t,r=a,t=s,a=c}var l=o;n===null?n=new i(l,!1):l=n.length;for(var u=0;u<o;u++)n.__setDigit(u,e.__digit(u)&t.__digit(u));for(;u<l;u++)n.__setDigit(u,0);return n}},{key:`__absoluteAndNot`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=e.length,a=t.length,o=a;r<a&&(o=r);var s=r;n===null?n=new i(s,!1):s=n.length;for(var c=0;c<o;c++)n.__setDigit(c,e.__digit(c)&~t.__digit(c));for(;c<r;c++)n.__setDigit(c,e.__digit(c));for(;c<s;c++)n.__setDigit(c,0);return n}},{key:`__absoluteOr`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=e.length,a=t.length,o=a;if(r<a){o=r;var s=e,c=r;e=t,r=a,t=s,a=c}var l=r;n===null?n=new i(l,!1):l=n.length;for(var u=0;u<o;u++)n.__setDigit(u,e.__digit(u)|t.__digit(u));for(;u<r;u++)n.__setDigit(u,e.__digit(u));for(;u<l;u++)n.__setDigit(u,0);return n}},{key:`__absoluteXor`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,r=e.length,a=t.length,o=a;if(r<a){o=r;var s=e,c=r;e=t,r=a,t=s,a=c}var l=r;n===null?n=new i(l,!1):l=n.length;for(var u=0;u<o;u++)n.__setDigit(u,e.__digit(u)^t.__digit(u));for(;u<r;u++)n.__setDigit(u,e.__digit(u));for(;u<l;u++)n.__setDigit(u,0);return n}},{key:`__absoluteCompare`,value:function(e,t){var n=e.length-t.length;if(n!=0)return n;for(var r=e.length-1;0<=r&&e.__digit(r)===t.__digit(r);)r--;return 0>r?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}},{key:`__multiplyAccumulate`,value:function(e,t,n,r){if(t!==0){for(var a=32767&t,o=t>>>15,s=0,c=0,l=0;l<e.length;l++,r++){var u=n.__digit(r),d=e.__digit(l),f=32767&d,p=d>>>15,m=i.__imul(f,a),h=i.__imul(f,o),g=i.__imul(p,a),_=i.__imul(p,o);u+=c+m+s,s=u>>>30,u&=1073741823,u+=((32767&h)<<15)+((32767&g)<<15),s+=u>>>30,c=_+(h>>>15)+(g>>>15),n.__setDigit(r,1073741823&u)}for(;s!==0||c!==0;r++){var v=n.__digit(r);v+=s+c,c=0,s=v>>>30,n.__setDigit(r,1073741823&v)}}}},{key:`__internalMultiplyAdd`,value:function(e,t,n,r,a){for(var o=n,s=0,c=0;c<r;c++){var l=e.__digit(c),u=i.__imul(32767&l,t),d=i.__imul(l>>>15,t),f=u+((32767&d)<<15)+s+o;o=f>>>30,s=d>>>15,a.__setDigit(c,1073741823&f)}if(a.length>r)for(a.__setDigit(r++,o+s);r<a.length;)a.__setDigit(r++,0);else if(o+s!==0)throw Error(`implementation bug`)}},{key:`__absoluteDivSmall`,value:function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;n===null&&(n=new i(e.length,!1));for(var r=0,a=2*e.length-1;0<=a;a-=2){var o=(r<<15|e.__halfDigit(a))>>>0,s=0|o/t;r=0|o%t,o=(r<<15|e.__halfDigit(a-1))>>>0;var c=0|o/t;r=0|o%t,n.__setDigit(a>>>1,s<<15|c)}return n}},{key:`__absoluteModSmall`,value:function(e,t){for(var n,r=0,i=2*e.length-1;0<=i;i--)n=(r<<15|e.__halfDigit(i))>>>0,r=0|n%t;return r}},{key:`__absoluteDivLarge`,value:function(e,t,n,r){var a=t.__halfDigitLength(),o=t.length,s=e.__halfDigitLength()-a,c=null;n&&(c=new i(s+2>>>1,!1),c.__initializeDigits());var l=new i(a+2>>>1,!1);l.__initializeDigits();var u=i.__clz15(t.__halfDigit(a-1));0<u&&(t=i.__specialLeftShift(t,u,0));for(var d=i.__specialLeftShift(e,u,1),f=t.__halfDigit(a-1),p=0,m=s;0<=m;m--){var h=32767,g=d.__halfDigit(m+a);if(g!==f){var _=(g<<15|d.__halfDigit(m+a-1))>>>0;h=0|_/f;for(var v=0|_%f,y=t.__halfDigit(a-2),b=d.__halfDigit(m+a-2);i.__imul(h,y)>>>0>(v<<16|b)>>>0&&(h--,v+=f,!(32767<v)););}i.__internalMultiplyAdd(t,h,0,o,l);var x=d.__inplaceSub(l,m,a+1);x!==0&&(x=d.__inplaceAdd(t,m,a),d.__setHalfDigit(m+a,32767&d.__halfDigit(m+a)+x),h--),n&&(1&m?p=h<<15:c.__setDigit(m>>>1,p|h))}if(r)return d.__inplaceRightShift(u),n?{quotient:c,remainder:d}:d;if(n)return c;throw Error(`unreachable`)}},{key:`__clz15`,value:function(e){return i.__clz30(e)-15}},{key:`__specialLeftShift`,value:function(e,t,n){var r=e.length,a=new i(r+n,!1);if(t===0){for(var o=0;o<r;o++)a.__setDigit(o,e.__digit(o));return 0<n&&a.__setDigit(r,0),a}for(var s,c=0,l=0;l<r;l++)s=e.__digit(l),a.__setDigit(l,1073741823&s<<t|c),c=s>>>30-t;return 0<n&&a.__setDigit(r,c),a}},{key:`__leftShiftByAbsolute`,value:function(e,t){var n=i.__toShiftAmount(t);if(0>n)throw RangeError(`BigInt too big`);var r=0|n/30,a=n%30,o=e.length,s=a!==0&&e.__digit(o-1)>>>30-a!=0,c=o+r+ +!!s,l=new i(c,e.sign);if(a===0){for(var u=0;u<r;u++)l.__setDigit(u,0);for(;u<c;u++)l.__setDigit(u,e.__digit(u-r))}else{for(var d=0,f=0;f<r;f++)l.__setDigit(f,0);for(var p,m=0;m<o;m++)p=e.__digit(m),l.__setDigit(m+r,1073741823&p<<a|d),d=p>>>30-a;if(s)l.__setDigit(o+r,d);else if(d!==0)throw Error(`implementation bug`)}return l.__trim()}},{key:`__rightShiftByAbsolute`,value:function(e,t){var n=e.length,r=e.sign,a=i.__toShiftAmount(t);if(0>a)return i.__rightShiftByMaximum(r);var o=0|a/30,s=a%30,c=n-o;if(0>=c)return i.__rightShiftByMaximum(r);var l=!1;if(r){var u=(1<<s)-1;if((e.__digit(o)&u)!=0)l=!0;else for(var d=0;d<o;d++)if(e.__digit(d)!==0){l=!0;break}}l&&s===0&&~e.__digit(n-1)==0&&c++;var f=new i(c,r);if(s===0){f.__setDigit(c-1,0);for(var p=o;p<n;p++)f.__setDigit(p-o,e.__digit(p))}else{for(var m,h=e.__digit(o)>>>s,g=n-o-1,_=0;_<g;_++)m=e.__digit(_+o+1),f.__setDigit(_,1073741823&m<<30-s|h),h=m>>>s;f.__setDigit(g,h)}return l&&(f=i.__absoluteAddOne(f,!0,f)),f.__trim()}},{key:`__rightShiftByMaximum`,value:function(e){return e?i.__oneDigit(1,!0):i.__zero()}},{key:`__toShiftAmount`,value:function(e){if(1<e.length)return-1;var t=e.__unsignedDigit(0);return t>i.__kMaxLengthBits?-1:t}},{key:`__toPrimitive`,value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:`default`;if(S(e)!==`object`||e.constructor===i)return e;if(typeof Symbol<`u`&&S(Symbol.toPrimitive)===`symbol`&&e[Symbol.toPrimitive]){var n=e[Symbol.toPrimitive](t);if(S(n)!==`object`)return n;throw TypeError(`Cannot convert object to primitive value`)}var r=e.valueOf;if(r){var a=r.call(e);if(S(a)!==`object`)return a}var o=e.toString;if(o){var s=o.call(e);if(S(s)!==`object`)return s}throw TypeError(`Cannot convert object to primitive value`)}},{key:`__toNumeric`,value:function(e){return i.__isBigInt(e)?e:+e}},{key:`__isBigInt`,value:function(e){return S(e)===`object`&&e!==null&&e.constructor===i}},{key:`__truncateToNBits`,value:function(e,t){for(var n=0|(e+29)/30,r=new i(n,t.sign),a=n-1,o=0;o<a;o++)r.__setDigit(o,t.__digit(o));var s=t.__digit(a);if(e%30!=0){var c=32-e%30;s=s<<c>>>c}return r.__setDigit(a,s),r.__trim()}},{key:`__truncateAndSubFromPowerOfTwo`,value:function(e,t,n){for(var r=Math.min,a,o=0|(e+29)/30,s=new i(o,n),c=0,l=o-1,u=0,d=r(l,t.length);c<d;c++)a=0-t.__digit(c)-u,u=1&a>>>30,s.__setDigit(c,1073741823&a);for(;c<l;c++)s.__setDigit(c,0|1073741823&-u);var f,p=l<t.length?t.__digit(l):0,m=e%30;if(m===0)f=0-p-u,f&=1073741823;else{var h=32-m;p=p<<h>>>h;var g=1<<32-h;f=g-p-u,f&=g-1}return s.__setDigit(l,f),s.__trim()}},{key:`__digitPow`,value:function(e,t){for(var n=1;0<t;)1&t&&(n*=e),t>>>=1,e*=e;return n}},{key:`__detectBigEndian`,value:function(){return i.__kBitConversionDouble[0]=-0,i.__kBitConversionInts[0]!==0}},{key:`__isOneDigitInt`,value:function(e){return(1073741823&e)===e}}])}(te(Array));return C.__kMaxLength=33554432,C.__kMaxLengthBits=C.__kMaxLength<<5,C.__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],C.__kBitsPerCharTableShift=5,C.__kBitsPerCharTableMultiplier=1<<C.__kBitsPerCharTableShift,C.__kConversionChars=`0123456789abcdefghijklmnopqrstuvwxyz`.split(``),C.__kBitConversionBuffer=new ArrayBuffer(8),C.__kBitConversionDouble=new Float64Array(C.__kBitConversionBuffer),C.__kBitConversionInts=new Int32Array(C.__kBitConversionBuffer),C.__kBitConversionIntHigh=+!C.__detectBigEndian(),C.__kBitConversionIntLow=+!!C.__detectBigEndian(),C.__clz30=t?function(e){return t(e)-2}:function(e){var t=Math.LN2,n=Math.log;return e===0?30:0|29-(0|n(e>>>0)/t)},C.__imul=e||function(e,t){return 0|e*t},C})})),c=e.n(s(),1),l=c.default.BigInt(0),u=c.default.BigInt(1),d=c.default.BigInt(2),f=c.default.BigInt(10),p=c.default.BigInt(24),m=c.default.BigInt(60),h=c.default.BigInt(1e3),g=c.default.BigInt(1e6),_=c.default.BigInt(1e9),v=c.default.multiply(c.default.BigInt(3600),_),y=c.default.multiply(m,_),b=c.default.multiply(v,p);function x(e){return typeof e==`bigint`?c.default.BigInt(e.toString(10)):e}function S(e){return c.default.equal(c.default.remainder(e,d),l)}function ee(e){return c.default.lessThan(e,l)?c.default.unaryMinus(e):e}function te(e,t){return c.default.lessThan(e,t)?-1:+!!c.default.greaterThan(e,t)}function C(e,t){return{quotient:c.default.divide(e,t),remainder:c.default.remainder(e,t)}}var ne,re,w=`slot-epochNanoSeconds`,T=`slot-iso-date`,E=`slot-iso-date-time`,D=`slot-time`,O=`slot-calendar`,ie=`slot-date-brand`,ae=`slot-year-month-brand`,oe=`slot-month-day-brand`,k=`slot-time-zone`,se=`slot-years`,ce=`slot-months`,le=`slot-weeks`,ue=`slot-days`,de=`slot-hours`,fe=`slot-minutes`,pe=`slot-seconds`,me=`slot-milliseconds`,he=`slot-microseconds`,ge=`slot-nanoseconds`,_e=`date`,ve=`ym`,ye=`md`,be=`time`,xe=`datetime`,Se=`instant`,Ce=`original`,we=`timezone-canonical`,Te=`timezone-original`,Ee=`calendar-id`,De=`locale`,Oe=`options`,ke=new WeakMap,Ae=Symbol.for(`@@Temporal__GetSlots`);(ne=globalThis)[Ae]||(ne[Ae]=function(e){return ke.get(e)});var je=globalThis[Ae],Me=Symbol.for(`@@Temporal__CreateSlots`);(re=globalThis)[Me]||(re[Me]=function(e){ke.set(e,Object.create(null))});var Ne=globalThis[Me];function A(e,...t){if(!e||typeof e!=`object`)return!1;let n=je(e);return!!n&&t.every((e=>e in n))}function j(e,t){let n=je(e)?.[t];if(n===void 0)throw TypeError(`Missing internal slot ${t}`);return n}function M(e,t,n){let r=je(e);if(r===void 0)throw TypeError(`Missing slots for the given container`);if(r[t])throw TypeError(`${t} already has set`);r[t]=n}var Pe={};function Fe(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0});let n=Object.getOwnPropertyNames(e);for(let t=0;t<n.length;t++){let r=n[t],i=Object.getOwnPropertyDescriptor(e,r);i.configurable&&i.enumerable&&(i.enumerable=!1,Object.defineProperty(e,r,i))}let r=Object.getOwnPropertyNames(e.prototype);for(let t=0;t<r.length;t++){let n=r[t],i=Object.getOwnPropertyDescriptor(e.prototype,n);i.configurable&&i.enumerable&&(i.enumerable=!1,Object.defineProperty(e.prototype,n,i))}Ie(t,e),Ie(`${t}.prototype`,e.prototype)}function Ie(e,t){let n=`%${e}%`;if(Pe[n]!==void 0)throw Error(`intrinsic ${e} already exists`);Pe[n]=t}function N(e){return Pe[e]}function Le(e,t){let n=e;if(n===0)return{div:n,mod:n};let r=Math.sign(n);n=Math.abs(n);let i=Math.trunc(1+Math.log10(n));if(t>=i)return{div:0*r,mod:r*n};if(t===0)return{div:r*n,mod:0*r};let a=n.toPrecision(i);return{div:r*Number.parseInt(a.slice(0,i-t),10),mod:r*Number.parseInt(a.slice(i-t),10)}}function Re(e,t,n){let r=e,i=n;if(r===0)return i;let a=Math.sign(r)||Math.sign(i);r=Math.abs(r),i=Math.abs(i);let o=r.toPrecision(Math.trunc(1+Math.log10(r)));if(i===0)return a*Number.parseInt(o+`0`.repeat(t),10);let s=o+i.toPrecision(Math.trunc(1+Math.log10(i))).padStart(t,`0`);return a*Number.parseInt(s,10)}function ze(e,t){let n=t===`negative`;switch(e){case`ceil`:return n?`zero`:`infinity`;case`floor`:return n?`infinity`:`zero`;case`expand`:return`infinity`;case`trunc`:return`zero`;case`halfCeil`:return n?`half-zero`:`half-infinity`;case`halfFloor`:return n?`half-infinity`:`half-zero`;case`halfExpand`:return`half-infinity`;case`halfTrunc`:return`half-zero`;case`halfEven`:return`half-even`}}function Be(e,t,n,r,i){return i===`zero`?e:i===`infinity`?t:n<0?e:n>0?t:i===`half-zero`?e:i===`half-infinity`?t:r?e:t}var P=class e{constructor(e){this.totalNs=x(e),this.sec=c.default.toNumber(c.default.divide(this.totalNs,_)),this.subsec=c.default.toNumber(c.default.remainder(this.totalNs,_))}static validateNew(t,n){if(c.default.greaterThan(ee(t),e.MAX))throw RangeError(`${n} of duration time units cannot exceed ${e.MAX} s`);return new e(t)}static fromEpochNsDiff(t,n){return new e(c.default.subtract(x(t),x(n)))}static fromComponents(t,n,r,i,a,o){let s=c.default.add(c.default.add(c.default.add(c.default.add(c.default.add(c.default.BigInt(o),c.default.multiply(c.default.BigInt(a),h)),c.default.multiply(c.default.BigInt(i),g)),c.default.multiply(c.default.BigInt(r),_)),c.default.multiply(c.default.BigInt(n),y)),c.default.multiply(c.default.BigInt(t),v));return e.validateNew(s,`total`)}abs(){return new e(ee(this.totalNs))}add(t){return e.validateNew(c.default.add(this.totalNs,t.totalNs),`sum`)}add24HourDays(t){return e.validateNew(c.default.add(this.totalNs,c.default.multiply(c.default.BigInt(t),b)),`sum`)}addToEpochNs(e){return c.default.add(x(e),this.totalNs)}cmp(e){return te(this.totalNs,e.totalNs)}divmod(t){let{quotient:n,remainder:r}=C(this.totalNs,c.default.BigInt(t));return{quotient:c.default.toNumber(n),remainder:new e(r)}}fdiv(e){let t=x(e),n=c.default.BigInt(t),{quotient:r,remainder:i}=C(this.totalNs,n),a=[],o,s=(c.default.lessThan(this.totalNs,l)?-1:1)*Math.sign(c.default.toNumber(t));for(;!c.default.equal(i,l)&&a.length<50;)i=c.default.multiply(i,f),{quotient:o,remainder:i}=C(i,n),a.push(Math.abs(c.default.toNumber(o)));return s*Number(ee(r).toString()+`.`+a.join(``))}isZero(){return c.default.equal(this.totalNs,l)}round(t,n){let r=x(t);if(c.default.equal(r,u))return this;let{quotient:i,remainder:a}=C(this.totalNs,r),o=c.default.lessThan(this.totalNs,l)?`negative`:`positive`,s=c.default.multiply(ee(i),r),f=c.default.add(s,r),p=te(ee(c.default.multiply(a,d)),r),m=ze(n,o),h=c.default.equal(ee(this.totalNs),s)?s:Be(s,f,p,S(i),m),g=o===`positive`?h:c.default.unaryMinus(h);return e.validateNew(g,`rounding`)}sign(){return this.cmp(new e(l))}subtract(t){return e.validateNew(c.default.subtract(this.totalNs,t.totalNs),`difference`)}};P.MAX=c.default.BigInt(`9007199254740991999999999`),P.ZERO=new P(l);var Ve=/[A-Za-z._][A-Za-z._0-9+-]*/,He=RegExp(`(?:(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)|(?:${Ve.source})(?:\\/(?:${Ve.source}))*)`),Ue=/(?:[+-]\d{6}|\d{4})/,We=/(?:0[1-9]|1[0-2])/,Ge=/(?:0[1-9]|[12]\d|3[01])/,Ke=RegExp(`(${Ue.source})(?:-(${We.source})-(${Ge.source})|(${We.source})(${Ge.source}))`),qe=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,Je=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Ye=RegExp(`([zZ])|${Je.source}?`),Xe=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,Ze=new RegExp([`^${Ke.source}`,`(?:(?:[tT]|\\s+)${qe.source}(?:${Ye.source})?)?`,`(?:\\[!?(${He.source})\\])?`,`((?:${Xe.source})*)$`].join(``)),Qe=new RegExp([`^[tT]?${qe.source}`,`(?:${Ye.source})?`,`(?:\\[!?${He.source}\\])?`,`((?:${Xe.source})*)$`].join(``)),$e=RegExp(`^(${Ue.source})-?(${We.source})(?:\\[!?${He.source}\\])?((?:${Xe.source})*)$`),et=RegExp(`^(?:--)?(${We.source})-?(${Ge.source})(?:\\[!?${He.source}\\])?((?:${Xe.source})*)$`),tt=/(\d+)(?:[.,](\d{1,9}))?/,nt=RegExp(`(?:${tt.source}H)?(?:${tt.source}M)?(?:${tt.source}S)?`),rt=RegExp(`^([+-])?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?!$)${nt.source})?$`,`i`),it=864e5,at=1e6*it,ot=6e10,st=1e8*it,ct=Wi(st),lt=c.default.unaryMinus(ct),ut=c.default.add(c.default.subtract(lt,b),u),dt=c.default.subtract(c.default.add(ct,b),u),ft=146097*it,pt=-271821,mt=275760,ht=Date.UTC(1847,0,1),gt=[`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`],_t=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 F(e){return typeof e==`object`&&!!e||typeof e==`function`}function vt(e){if(typeof e==`bigint`)throw TypeError(`Cannot convert BigInt to number`);return Number(e)}function yt(e){if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a String`);return String(e)}function I(e){let t=vt(e);if(t===0)return 0;if(Number.isNaN(t)||t===1/0||t===-1/0)throw RangeError(`invalid number value`);let n=Math.trunc(t);return n===0?0:n}function bt(e,t){let n=I(e);if(n<=0)throw RangeError(t===void 0?`Cannot convert a number less than one to a positive integer`:`property '${t}' cannot be a a number less than one`);return n}function xt(e){let t=vt(e);if(Number.isNaN(t))throw RangeError(`not a number`);if(t===1/0||t===-1/0)throw RangeError(`infinity is out of range`);if(!function(e){if(typeof e!=`number`||Number.isNaN(e)||e===1/0||e===-1/0)return!1;let t=Math.abs(e);return Math.floor(t)===t}(t))throw RangeError(`unsupported fractional value ${e}`);return t===0?0:t}function St(e,t){return String(e).padStart(t,`0`)}function L(e){if(typeof e!=`string`)throw TypeError(`expected a string, not ${String(e)}`);return e}function Ct(e,t){if(F(e)){let t=e?.toString();if(typeof t==`string`||typeof t==`number`)return t;throw TypeError(`Cannot convert object to primitive value`)}return e}var wt=[`era`,`eraYear`,`year`,`month`,`monthCode`,`day`,`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`,`offset`,`timeZone`],Tt={era:yt,eraYear:I,year:I,month:bt,monthCode:function(e){let t=L(Ct(e));if(t.length<3||t.length>4||t[0]!==`M`||`0123456789`.indexOf(t[1])===-1||`0123456789`.indexOf(t[2])===-1||t[1]+t[2]===`00`&&t[3]!==`L`||t[3]!==`L`&&t[3]!==void 0)throw RangeError(`bad month code ${t}; must match M01-M99 or M00L-M99L`);return t},day:bt,hour:I,minute:I,second:I,millisecond:I,microsecond:I,nanosecond:I,offset:function(e){let t=L(Ct(e));return yr(t),t},timeZone:Qn},Et={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},Dt=[[`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`]],Ot=Object.fromEntries(Dt.map((e=>[e[0],e[1]]))),kt=Object.fromEntries(Dt.map((([e,t])=>[t,e]))),At=Dt.map((([,e])=>e)),jt={day:at,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},Mt=[`days`,`hours`,`microseconds`,`milliseconds`,`minutes`,`months`,`nanoseconds`,`seconds`,`weeks`,`years`],Nt=Intl.DateTimeFormat,Pt=new Map;function Ft(e){let t=Qi(e),n=Pt.get(t);return n===void 0&&(n=new Nt(`en-us`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Pt.set(t,n)),n}function R(e){return A(e,w)&&!A(e,k,O)}function z(e){return A(e,se,ce,ue,de,fe,pe,me,he,ge)}function B(e){return A(e,ie)}function V(e){return A(e,D)}function H(e){return A(e,E)}function U(e){return A(e,ae)}function It(e){return A(e,oe)}function W(e){return A(e,w,k,O)}function G(e,t){if(!t(e))throw TypeError(`invalid receiver: method called with the wrong type of this-object`)}function Lt(e){if(A(e,O)||A(e,k))throw TypeError(`with() does not support a calendar or timeZone property`);if(V(e))throw TypeError(`with() does not accept Temporal.PlainTime, use withPlainTime() instead`);if(e.calendar!==void 0)throw TypeError(`with() does not support a calendar property`);if(e.timeZone!==void 0)throw TypeError(`with() does not support a timeZone property`)}function Rt(e,t){return t===`never`||t===`auto`&&e===`iso8601`?``:`[${t===`critical`?`!`:``}u-ca=${e}]`}function zt(e){let t,n,r=!1;for(Xe.lastIndex=0;n=Xe.exec(e);){let{1:i,2:a,3:o}=n;if(a===`u-ca`){if(t===void 0)t=o,r=i===`!`;else if(i===`!`||r)throw RangeError(`Invalid annotations in ${e}: more than one u-ca present with critical flag`)}else if(i===`!`)throw RangeError(`Unrecognized annotation: !${a}=${o}`)}return t}function Bt(e){let t=Ze.exec(e);if(!t)throw RangeError(`invalid RFC 9557 string: ${e}`);let n=zt(t[16]),r=t[1];if(r===`-000000`)throw RangeError(`invalid RFC 9557 string: ${e}`);let i=+r,a=+(t[2]??t[4]??1),o=+(t[3]??t[5]??1),s=t[6]!==void 0,c=+(t[6]??0),l=+(t[7]??t[10]??0),u=+(t[8]??t[11]??0);u===60&&(u=59);let d=(t[9]??t[12]??``)+`000000000`,f=+d.slice(0,3),p=+d.slice(3,6),m=+d.slice(6,9),h,g=!1;t[13]?(h=void 0,g=!0):t[14]&&(h=t[14]);let _=t[15];return Jr(i,a,o,c,l,u,f,p,m),{year:i,month:a,day:o,time:s?{hour:c,minute:l,second:u,millisecond:f,microsecond:p,nanosecond:m}:`start-of-day`,tzAnnotation:_,offset:h,z:g,calendar:n}}function Vt(e){let t=Qe.exec(e),n,r,i,a,o,s,c;if(t){c=zt(t[10]),n=+(t[1]??0),r=+(t[2]??t[5]??0),i=+(t[3]??t[6]??0),i===60&&(i=59);let e=(t[4]??t[7]??``)+`000000000`;if(a=+e.slice(0,3),o=+e.slice(3,6),s=+e.slice(6,9),t[8])throw RangeError(`Z designator not supported for PlainTime`)}else{let t,l;if({time:t,z:l,calendar:c}=Bt(e),t===`start-of-day`)throw RangeError(`time is missing in string: ${e}`);if(l)throw RangeError(`Z designator not supported for PlainTime`);({hour:n,minute:r,second:i,millisecond:a,microsecond:o,nanosecond:s}=t)}if(qr(n,r,i,a,o,s),/[tT ][0-9][0-9]/.test(e))return{hour:n,minute:r,second:i,millisecond:a,microsecond:o,nanosecond:s,calendar:c};try{let{month:t,day:n}=Ut(e);Gr(1972,t,n)}catch{try{let{year:t,month:n}=Ht(e);Gr(t,n,1)}catch{return{hour:n,minute:r,second:i,millisecond:a,microsecond:o,nanosecond:s,calendar:c}}}throw RangeError(`invalid RFC 9557 time-only string ${e}; may need a T prefix`)}function Ht(e){let t=$e.exec(e),n,r,i,a;if(t){i=zt(t[3]);let o=t[1];if(o===`-000000`)throw RangeError(`invalid RFC 9557 string: ${e}`);if(n=+o,r=+t[2],a=1,i!==void 0&&i!==`iso8601`)throw RangeError(`YYYY-MM format is only valid with iso8601 calendar`)}else{let t;if({year:n,month:r,calendar:i,day:a,z:t}=Bt(e),t)throw RangeError(`Z designator not supported for PlainYearMonth`)}return{year:n,month:r,calendar:i,referenceISODay:a}}function Ut(e){let t=et.exec(e),n,r,i,a;if(t){if(i=zt(t[3]),n=+t[1],r=+t[2],i!==void 0&&i!==`iso8601`)throw RangeError(`MM-DD format is only valid with iso8601 calendar`)}else{let t;if({month:n,day:r,calendar:i,year:a,z:t}=Bt(e),t)throw RangeError(`Z designator not supported for PlainMonthDay`)}return{month:n,day:r,calendar:i,referenceISOYear:a}}var Wt=RegExp(`^${He.source}$`,`i`),Gt=RegExp(`^([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?$`);function Kt(e){let t=ea.test(e)?`Seconds not allowed in offset time zone`:`Invalid time zone`;throw RangeError(`${t}: ${e}`)}function qt(e){return Wt.test(e)||Kt(e),Gt.test(e)?{offsetMinutes:yr(e)/6e10}:{tzName:e}}function Jt(e,t,n,r){let i=e,a=t,o=n;switch(r){case`reject`:Gr(i,a,o);break;case`constrain`:({year:i,month:a,day:o}=Wr(i,a,o))}return{year:i,month:a,day:o}}function Yt(e,t,n,r,i,a,o){let s=e,c=t,l=n,u=r,d=i,f=a;switch(o){case`reject`:qr(s,c,l,u,d,f);break;case`constrain`:s=Ur(s,0,23),c=Ur(c,0,59),l=Ur(l,0,59),u=Ur(u,0,999),d=Ur(d,0,999),f=Ur(f,0,999)}return{hour:s,minute:c,second:l,millisecond:u,microsecond:d,nanosecond:f}}function Xt(e){if(!F(e))throw TypeError(`invalid duration-like`);let 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},n=!1;for(let r=0;r<Mt.length;r++){let i=Mt[r],a=e[i];a!==void 0&&(n=!0,t[i]=xt(a))}if(!n)throw TypeError(`invalid duration-like`);return t}function K({years:e,months:t,weeks:n,days:r},i,a,o){return{years:e,months:o??t,weeks:a??n,days:i??r}}function q(e,t){return{isoDate:e,time:t}}function J(e){return Xi(e,`overflow`,[`constrain`,`reject`],`constrain`)}function Zt(e){return Xi(e,`disambiguation`,[`compatible`,`earlier`,`later`,`reject`],`compatible`)}function Qt(e,t){return Xi(e,`roundingMode`,[`ceil`,`floor`,`expand`,`trunc`,`halfCeil`,`halfFloor`,`halfExpand`,`halfTrunc`,`halfEven`],t)}function $t(e,t){return Xi(e,`offset`,[`prefer`,`use`,`ignore`,`reject`],t)}function en(e){return Xi(e,`calendarName`,[`auto`,`always`,`never`,`critical`],`auto`)}function tn(e){let t=e.roundingIncrement;if(t===void 0)return 1;let n=I(t);if(n<1||n>1e9)throw RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);return n}function nn(e,t,n){let r=n?t:t-1;if(e>r)throw RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${e}`);if(t%e!=0)throw RangeError(`Rounding increment must divide evenly into ${t}`)}function rn(e){let t=e.fractionalSecondDigits;if(t===void 0)return`auto`;if(typeof t!=`number`){if(yt(t)!==`auto`)throw RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return`auto`}let n=Math.floor(t);if(!Number.isFinite(n)||n<0||n>9)throw RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return n}function an(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 RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`)}}var on=Symbol(`~required~`);function sn(e,t,n,r,i=[]){let a=[];for(let e=0;e<Dt.length;e++){let t=Dt[e],r=t[1],i=t[2];n!==`datetime`&&n!==i||a.push(r)}a=a.concat(i);let o=r;o===on?o=void 0:o!==void 0&&a.push(o);let s=[];s=s.concat(a);for(let e=0;e<a.length;e++){let t=kt[a[e]];t!==void 0&&s.push(t)}let c=Xi(e,t,s,o);if(c===void 0&&r===on)throw RangeError(`${t} is required`);return c&&c in Ot?Ot[c]:c}function cn(e){let t=e.relativeTo;if(t===void 0)return{};let n,r,i,a,o,s=`option`,c=!1;if(F(t)){if(W(t))return{zonedRelativeTo:t};if(B(t))return{plainRelativeTo:t};if(H(t))return{plainRelativeTo:An(j(t,E).isoDate,j(t,O))};i=qn(t);let e=gn(i,t,[`year`,`month`,`monthCode`,`day`],[`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`,`offset`,`timeZone`],[]);({isoDate:n,time:r}=yn(i,e,`constrain`)),{offset:o,timeZone:a}=e,o===void 0&&(s=`wall`)}else{let e,l,u,d,f;if({year:u,month:d,day:f,time:r,calendar:i,tzAnnotation:e,offset:o,z:l}=Bt(L(t)),e)a=Qn(e),l?s=`exact`:o||(s=`wall`),c=!0;else if(l)throw RangeError(`Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone`);i||=`iso8601`,i=Zi(i),n={year:u,month:d,day:f}}return a===void 0?{plainRelativeTo:An(n,i)}:{zonedRelativeTo:Y(Dn(n,r,s,s===`option`?yr(o):0,a,`compatible`,`reject`,c),a,i)}}function ln(e){return j(e,se)===0?j(e,ce)===0?j(e,le)===0?j(e,ue)===0?j(e,de)===0?j(e,fe)===0?j(e,pe)===0?j(e,me)===0?j(e,he)===0?`nanosecond`:`microsecond`:`millisecond`:`second`:`minute`:`hour`:`day`:`week`:`month`:`year`}function un(e,t){return At.indexOf(e)>At.indexOf(t)?t:e}function dn(e){return e===`year`||e===`month`||e===`week`}function fn(e){return dn(e)||e===`day`?`date`:`time`}function pn(e){return N(`%calendarImpl%`)(e)}function mn(e){return N(`%calendarImpl%`)(j(e,O))}function hn(e,t,n=`date`){let r=Object.create(null),i=pn(e).isoToDate(t,{year:!0,monthCode:!0,day:!0});return r.monthCode=i.monthCode,n!==`month-day`&&n!==`date`||(r.day=i.day),n!==`year-month`&&n!==`date`||(r.year=i.year),r}function gn(e,t,n,r,i){let a=pn(e).extraFields(n),o=n.concat(r,a),s=Object.create(null),c=!1;o.sort();for(let e=0;e<o.length;e++){let n=o[e],r=t[n];if(r!==void 0)c=!0,s[n]=(0,Tt[n])(r);else if(i!==`partial`){if(i.includes(n))throw TypeError(`required property '${n}' missing or undefined`);s[n]=Et[n]}}if(i===`partial`&&!c)throw TypeError(`no supported properties found`);return s}function _n(e,t=`complete`){let n=[`hour`,`microsecond`,`millisecond`,`minute`,`nanosecond`,`second`],r=!1,i=Object.create(null);for(let a=0;a<n.length;a++){let o=n[a],s=e[o];s===void 0?t===`complete`&&(i[o]=0):(i[o]=I(s),r=!0)}if(!r)throw TypeError(`invalid time-like`);return i}function vn(e,t){if(F(e)){if(B(e))return J($(t)),An(j(e,T),j(e,O));if(W(e)){let n=nr(j(e,k),j(e,w));return J($(t)),An(n.isoDate,j(e,O))}if(H(e))return J($(t)),An(j(e,E).isoDate,j(e,O));let n=qn(e);return An(Yn(n,gn(n,e,[`year`,`month`,`monthCode`,`day`],[],[]),J($(t))),n)}let{year:n,month:r,day:i,calendar:a,z:o}=Bt(L(e));if(o)throw RangeError(`Z designator not supported for PlainDate`);return a||=`iso8601`,a=Zi(a),J($(t)),An({year:n,month:r,day:i},a)}function yn(e,t,n){return q(Yn(e,t,n),Yt(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,n))}function bn(e,t){let n,r,i;if(F(e)){if(H(e))return J($(t)),Mn(j(e,E),j(e,O));if(W(e)){let n=nr(j(e,k),j(e,w));return J($(t)),Mn(n,j(e,O))}if(B(e))return J($(t)),Mn(q(j(e,T),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),j(e,O));i=qn(e);let a=gn(i,e,[`year`,`month`,`monthCode`,`day`],[`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`],[]),o=J($(t));({isoDate:n,time:r}=yn(i,a,o))}else{let a,o,s,c;if({year:o,month:s,day:c,time:r,calendar:i,z:a}=Bt(L(e)),a)throw 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}),Jr(o,s,c,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||=`iso8601`,i=Zi(i),J($(t)),n={year:o,month:s,day:c}}return Mn(q(n,r),i)}function xn(e){let t=N(`%Temporal.Duration%`);if(z(e))return new t(j(e,se),j(e,ce),j(e,le),j(e,ue),j(e,de),j(e,fe),j(e,pe),j(e,me),j(e,he),j(e,ge));if(!F(e))return function(e){let{years:t,months:n,weeks:r,days:i,hours:a,minutes:o,seconds:s,milliseconds:c,microseconds:l,nanoseconds:u}=function(e){let t=rt.exec(e);if(!t||t.every(((e,t)=>t<2||e===void 0)))throw RangeError(`invalid duration: ${e}`);let n=t[1]===`-`?-1:1,r=t[2]===void 0?0:I(t[2])*n,i=t[3]===void 0?0:I(t[3])*n,a=t[4]===void 0?0:I(t[4])*n,o=t[5]===void 0?0:I(t[5])*n,s=t[6]===void 0?0:I(t[6])*n,c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=0,m=0,h=0;if(c!==void 0){if(l??u??d??f)throw RangeError(`only the smallest unit can be fractional`);h=3600*I((c+`000000000`).slice(0,9))*n}else if(p=l===void 0?0:I(l)*n,u!==void 0){if(d??f)throw RangeError(`only the smallest unit can be fractional`);h=60*I((u+`000000000`).slice(0,9))*n}else m=d===void 0?0:I(d)*n,f!==void 0&&(h=I((f+`000000000`).slice(0,9))*n);let g=h%1e3,_=Math.trunc(h/1e3)%1e3,v=Math.trunc(h/1e6)%1e3;return m+=Math.trunc(h/1e9)%60,p+=Math.trunc(h/6e10),$r(r,i,a,o,s,p,m,v,_,g),{years:r,months:i,weeks:a,days:o,hours:s,minutes:p,seconds:m,milliseconds:v,microseconds:_,nanoseconds:g}}(e);return new(N(`%Temporal.Duration%`))(t,n,r,i,a,o,s,c,l,u)}(L(e));let n={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=Xt(e);for(let e=0;e<Mt.length;e++){let t=Mt[e],i=r[t];i!==void 0&&(n[t]=i)}return new t(n.years,n.months,n.weeks,n.days,n.hours,n.minutes,n.seconds,n.milliseconds,n.microseconds,n.nanoseconds)}function Sn(e){let t;if(F(e)){if(R(e)||W(e))return Bn(j(e,w));t=Ct(e)}else t=e;let{year:n,month:r,day:i,time:a,offset:o,z:s}=function(e){let t=Bt(e);if(!t.z&&!t.offset)throw RangeError(`Temporal.Instant requires a time zone offset`);return t}(L(t)),{hour:c=0,minute:l=0,second:u=0,millisecond:d=0,microsecond:f=0,nanosecond:p=0}=a===`start-of-day`?{}:a,m=zr(n,r,i,c,l,u,d,f,p-(s?0:yr(o)));return oi(m.isoDate),Bn(Z(m))}function Cn(e,t){if(F(e)){if(It(e))return J($(t)),Pn(j(e,T),j(e,O));let n;return A(e,O)?n=j(e,O):(n=e.calendar,n===void 0&&(n=`iso8601`),n=Kn(n)),Pn(Zn(n,gn(n,e,[`year`,`month`,`monthCode`,`day`],[],[]),J($(t))),n)}let{month:n,day:r,referenceISOYear:i,calendar:a}=Ut(L(e));if(a===void 0&&(a=`iso8601`),a=Zi(a),J($(t)),a===`iso8601`)return Pn({year:1972,month:n,day:r},a);let o={year:i,month:n,day:r};return Kr(o),o=Zn(a,hn(a,o,`month-day`),`constrain`),Pn(o,a)}function wn(e,t){let n;if(F(e)){if(V(e))return J($(t)),In(j(e,D));if(H(e))return J($(t)),In(j(e,E).time);if(W(e)){let n=nr(j(e,k),j(e,w));return J($(t)),In(n.time)}let{hour:r,minute:i,second:a,millisecond:o,microsecond:s,nanosecond:c}=_n(e);n=Yt(r,i,a,o,s,c,J($(t)))}else n=Vt(L(e)),J($(t));return In(n)}function Tn(e){return e===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:j(wn(e),D)}function En(e,t){if(F(e)){if(U(e))return J($(t)),Rn(j(e,T),j(e,O));let n=qn(e);return Rn(Xn(n,gn(n,e,[`year`,`month`,`monthCode`],[],[]),J($(t))),n)}let{year:n,month:r,referenceISODay:i,calendar:a}=Ht(L(e));a===void 0&&(a=`iso8601`),a=Zi(a),J($(t));let o={year:n,month:r,day:i};return Qr(o),o=Xn(a,hn(a,o,`year-month`),`constrain`),Rn(o,a)}function Dn(e,t,n,r,i,a,o,s){if(t===`start-of-day`)return ar(i,e);let l=q(e,t);if(n===`wall`||o===`ignore`)return X(i,l,a);if(n===`exact`||o===`use`){let n=zr(e.year,e.month,e.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);oi(n.isoDate);let i=Z(n);return Zr(i),i}oi(e);let u=Z(l),d=ir(i,l);for(let e=0;e<d.length;e++){let t=d[e],n=c.default.toNumber(c.default.subtract(u,t)),i=Ni(n,6e10,`halfExpand`);if(n===r||s&&i===r)return t}if(o===`reject`){let e=tr(r),t=mr(l,`iso8601`,`auto`);throw RangeError(`Offset ${e} is invalid for ${t} in ${i}`)}return rr(d,i,l,a)}function On(e,t){let n,r,i,a,o,s,c,l=!1,u=`option`;if(F(e)){if(W(e)){let n=$(t);return Zt(n),$t(n,`reject`),J(n),Y(j(e,w),j(e,k),j(e,O))}o=qn(e);let l=gn(o,e,[`year`,`month`,`monthCode`,`day`],[`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`,`offset`,`timeZone`],[`timeZone`]);({offset:a,timeZone:i}=l),a===void 0&&(u=`wall`);let d=$(t);s=Zt(d),c=$t(d,`reject`);let f=J(d);({isoDate:n,time:r}=yn(o,l,f))}else{let d,f,p,m,h;({year:p,month:m,day:h,time:r,tzAnnotation:d,offset:a,z:f,calendar:o}=function(e){let t=Bt(e);if(!t.tzAnnotation)throw RangeError(`Temporal.ZonedDateTime requires a time zone ID in brackets`);return t}(L(e))),i=Qn(d),f?u=`exact`:a||(u=`wall`),o||=`iso8601`,o=Zi(o),l=!0;let g=$(t);s=Zt(g),c=$t(g,`reject`),J(g),n={year:p,month:m,day:h}}let d=0;return u===`option`&&(d=yr(a)),Y(Dn(n,r,u,d,i,s,c,l),i,o)}function kn(e,t,n){Kr(t),Ne(e),M(e,T,t),M(e,O,n),M(e,ie,!0)}function An(e,t){let n=N(`%Temporal.PlainDate%`),r=Object.create(n.prototype);return kn(r,e,t),r}function jn(e,t,n){Yr(t),Ne(e),M(e,E,t),M(e,O,n)}function Mn(e,t){let n=N(`%Temporal.PlainDateTime%`),r=Object.create(n.prototype);return jn(r,e,t),r}function Nn(e,t,n){Kr(t),Ne(e),M(e,T,t),M(e,O,n),M(e,oe,!0)}function Pn(e,t){let n=N(`%Temporal.PlainMonthDay%`),r=Object.create(n.prototype);return Nn(r,e,t),r}function Fn(e,t){Ne(e),M(e,D,t)}function In(e){let t=N(`%Temporal.PlainTime%`),n=Object.create(t.prototype);return Fn(n,e),n}function Ln(e,t,n){Qr(t),Ne(e),M(e,T,t),M(e,O,n),M(e,ae,!0)}function Rn(e,t){let n=N(`%Temporal.PlainYearMonth%`),r=Object.create(n.prototype);return Ln(r,e,t),r}function zn(e,t){Zr(t),Ne(e),M(e,w,t)}function Bn(e){let t=N(`%Temporal.Instant%`),n=Object.create(t.prototype);return zn(n,e),n}function Vn(e,t,n,r){Zr(t),Ne(e),M(e,w,t),M(e,k,n),M(e,O,r)}function Y(e,t,n=`iso8601`){let r=N(`%Temporal.ZonedDateTime%`),i=Object.create(r.prototype);return Vn(i,e,t,n),i}function Hn(e){return wt.filter((t=>e[t]!==void 0))}function Un(e,t,n){let r=Hn(n),i=pn(e).fieldKeysToIgnore(r),a=Object.create(null),o=Hn(t);for(let e=0;e<wt.length;e++){let s,c=wt[e];o.includes(c)&&!i.includes(c)&&(s=t[c]),r.includes(c)&&(s=n[c]),s!==void 0&&(a[c]=s)}return a}function Wn(e,t,n,r){let i=pn(e).dateAdd(t,n,r);return Kr(i),i}function Gn(e,t,n,r){return pn(e).dateUntil(t,n,r)}function Kn(e){if(F(e)&&A(e,O))return j(e,O);let t=L(e);try{return Zi(t)}catch{}let n;try{({calendar:n}=Bt(t))}catch{try{({calendar:n}=Vt(t))}catch{try{({calendar:n}=Ht(t))}catch{({calendar:n}=Ut(t))}}}return n||=`iso8601`,Zi(n)}function qn(e){if(A(e,O))return j(e,O);let{calendar:t}=e;return t===void 0?`iso8601`:Kn(t)}function Jn(e,t){return Zi(e)===Zi(t)}function Yn(e,t,n){let r=pn(e);r.resolveFields(t,`date`);let i=r.dateToISO(t,n);return Kr(i),i}function Xn(e,t,n){let r=pn(e);r.resolveFields(t,`year-month`),t.day=1;let i=r.dateToISO(t,n);return Qr(i),i}function Zn(e,t,n){let r=pn(e);r.resolveFields(t,`month-day`);let i=r.monthDayToISOReferenceDate(t,n);return Kr(i),i}function Qn(e){if(F(e)&&W(e))return j(e,k);let t=L(e);if(t===`UTC`)return`UTC`;let{tzName:n,offsetMinutes:r}=function(e){let{tzAnnotation:t,offset:n,z:r}=function(e){if(Wt.test(e))return{tzAnnotation:e,offset:void 0,z:!1};try{let{tzAnnotation:t,offset:n,z:r}=Bt(e);if(r||t||n)return{tzAnnotation:t,offset:n,z:r}}catch{}Kt(e)}(e);return t?qt(t):r?qt(`UTC`):n?qt(n):void 0}(t);if(r!==void 0)return Tr(r);let i=Sr(n);if(!i)throw RangeError(`Unrecognized time zone ${n}`);return i.identifier}function $n(e,t){if(e===t)return!0;let n=qt(e).offsetMinutes,r=qt(t).offsetMinutes;if(n===void 0&&r===void 0){let n=Sr(t);if(!n)return!1;let r=Sr(e);return!!r&&r.primaryIdentifier===n.primaryIdentifier}return n===r}function er(e,t){let n=qt(e).offsetMinutes;return n===void 0?wr(e,t):6e10*n}function tr(e){let t=e<0?`-`:`+`,n=Math.abs(e),r=Math.floor(n/36e11),i=Math.floor(n/6e10)%60,a=Math.floor(n/1e9)%60,o=n%1e9;return`${t}${lr(r,i,a,o,a===0&&o===0?`minute`:`auto`)}`}function nr(e,t){let n=er(e,t),{isoDate:{year:r,month:i,day:a},time:{hour:o,minute:s,second:c,millisecond:l,microsecond:u,nanosecond:d}}=Or(t);return zr(r,i,a,o,s,c,l,u,d+n)}function X(e,t,n){return rr(ir(e,t),e,t,n)}function rr(e,t,n,r){let i=e.length;if(i===1)return e[0];if(i)switch(r){case`compatible`:case`earlier`:return e[0];case`later`:return e[i-1];case`reject`:throw RangeError(`multiple instants found`)}if(r===`reject`)throw RangeError(`multiple instants found`);let a=Z(n),o=c.default.subtract(a,b);Zr(o);let s=er(t,o),l=c.default.add(a,b);Zr(l);let u=er(t,l)-s;switch(r){case`earlier`:{let e=P.fromComponents(0,0,0,0,0,-u),r=Ci(n.time,e);return ir(t,q(Rr(n.isoDate.year,n.isoDate.month,n.isoDate.day+r.deltaDays),r))[0]}case`compatible`:case`later`:{let e=P.fromComponents(0,0,0,0,0,u),r=Ci(n.time,e),i=ir(t,q(Rr(n.isoDate.year,n.isoDate.month,n.isoDate.day+r.deltaDays),r));return i[i.length-1]}}}function ir(e,t){if(e===`UTC`)return oi(t.isoDate),[Z(t)];let n=qt(e).offsetMinutes;if(n!==void 0){let e=zr(t.isoDate.year,t.isoDate.month,t.isoDate.day,t.time.hour,t.time.minute-n,t.time.second,t.time.millisecond,t.time.microsecond,t.time.nanosecond);oi(e.isoDate);let r=Z(e);return Zr(r),[r]}return oi(t.isoDate),function(e,t){let n=Z(t),r=c.default.subtract(n,b);c.default.lessThan(r,lt)&&(r=n);let i=c.default.add(n,b);c.default.greaterThan(i,ct)&&(i=n);let a=wr(e,r),o=wr(e,i);return(a===o?[a]:[a,o]).map((r=>{let i=c.default.subtract(n,c.default.BigInt(r));if(Vi(t,function(e,t){let{epochMilliseconds:n,time:{millisecond:r,microsecond:i,nanosecond:a}}=Or(t),{year:o,month:s,day:c,hour:l,minute:u,second:d}=jr(e,n);return zr(o,s,c,l,u,d,r,i,a)}(e,i))===0)return Zr(i),i})).filter((e=>e!==void 0))}(e,t)}function ar(e,t){let n=q(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=ir(e,n);if(r.length)return r[0];let i=Z(n),a=c.default.subtract(i,b);return Zr(a),kr(e,a)}function or(e){let t;return t=e<0||e>9999?(e<0?`-`:`+`)+St(Math.abs(e),6):St(e,4),t}function sr(e){return St(e,2)}function cr(e,t){let n;if(t===`auto`){if(e===0)return``;n=St(e,9).replace(/0+$/,``)}else{if(t===0)return``;n=St(e,9).slice(0,t)}return`.${n}`}function lr(e,t,n,r,i){let a=`${sr(e)}:${sr(t)}`;return i===`minute`||(a+=`:${sr(n)}`,a+=cr(r,i)),a}function ur(e,t,n){let r=t;r===void 0&&(r=`UTC`);let i=j(e,w),a=mr(nr(r,i),`iso8601`,n,`never`),o=`Z`;return t!==void 0&&(o=Er(er(r,i))),`${a}${o}`}function dr(e,t){let n=j(e,se),r=j(e,ce),i=j(e,le),a=j(e,ue),o=j(e,de),s=j(e,fe),c=Pr(e),l=``;n!==0&&(l+=`${Math.abs(n)}Y`),r!==0&&(l+=`${Math.abs(r)}M`),i!==0&&(l+=`${Math.abs(i)}W`),a!==0&&(l+=`${Math.abs(a)}D`);let u=``;o!==0&&(u+=`${Math.abs(o)}H`),s!==0&&(u+=`${Math.abs(s)}M`);let d=P.fromComponents(0,0,j(e,pe),j(e,me),j(e,he),j(e,ge));d.isZero()&&![`second`,`millisecond`,`microsecond`,`nanosecond`].includes(ln(e))&&t===`auto`||(u+=`${Math.abs(d.sec)}${cr(Math.abs(d.subsec),t)}S`);let f=`${c<0?`-`:``}P${l}`;return u&&(f=`${f}T${u}`),f}function fr(e,t=`auto`){let{year:n,month:r,day:i}=j(e,T);return`${or(n)}-${sr(r)}-${sr(i)}${Rt(j(e,O),t)}`}function pr({hour:e,minute:t,second:n,millisecond:r,microsecond:i,nanosecond:a},o){return lr(e,t,n,1e6*r+1e3*i+a,o)}function mr(e,t,n,r=`auto`){let{isoDate:{year:i,month:a,day:o},time:{hour:s,minute:c,second:l,millisecond:u,microsecond:d,nanosecond:f}}=e;return`${or(i)}-${sr(a)}-${sr(o)}T${lr(s,c,l,1e6*u+1e3*d+f,n)}${Rt(t,r)}`}function hr(e,t=`auto`){let{year:n,month:r,day:i}=j(e,T),a=`${sr(r)}-${sr(i)}`,o=j(e,O);t!==`always`&&t!==`critical`&&o===`iso8601`||(a=`${or(n)}-${a}`);let s=Rt(o,t);return s&&(a+=s),a}function gr(e,t=`auto`){let{year:n,month:r,day:i}=j(e,T),a=`${or(n)}-${sr(r)}`,o=j(e,O);t!==`always`&&t!==`critical`&&o===`iso8601`||(a+=`-${sr(i)}`);let s=Rt(o,t);return s&&(a+=s),a}function _r(e,t,n=`auto`,r=`auto`,i=`auto`,a=void 0){let o=j(e,w);if(a){let{unit:e,increment:t,roundingMode:n}=a;o=Pi(o,t,e,n)}let s=j(e,k),c=er(s,o),l=mr(nr(s,o),`iso8601`,t,`never`);return i!==`never`&&(l+=Er(c)),r!==`never`&&(l+=`[${r===`critical`?`!`:``}${s}]`),l+=Rt(j(e,O),n),l}function vr(e){return Gt.test(e)}function yr(e){let t=ta.exec(e);if(!t)throw RangeError(`invalid time zone offset: ${e}; must match ±HH:MM[:SS.SSSSSSSSS]`);return(t[1]===`-`?-1:1)*(1e9*(60*(60*t[2]+ +(t[3]||0))+ +(t[4]||0))+ +((t[5]||0)+`000000000`).slice(0,9))}var br,xr=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function Sr(e){if(br===void 0){let e=Intl.supportedValuesOf?.(`timeZone`);if(e){br=new Map;for(let t=0;t<e.length;t++){let n=e[t];br.set(Qi(n),n)}}else br=null}let t=Qi(e),n=br?.get(t);if(n)return{identifier:n,primaryIdentifier:n};try{n=Ft(e).resolvedOptions().timeZone}catch{return}if(t===`antarctica/south_pole`&&(n=`Antarctica/McMurdo`),_t.has(e))throw RangeError(`${e} is a legacy time zone identifier from ICU. Use ${n} instead`);let r=[...t].map(((e,n)=>n===0||xr[t[n-1]]?e.toUpperCase():e)).join(``).split(`/`);if(r.length===1)return t===`gb-eire`?{identifier:`GB-Eire`,primaryIdentifier:n}:{identifier:t.length<=3||/[-0-9]/.test(t)?t.toUpperCase():r[0],primaryIdentifier:n};if(r[0]===`Etc`)return{identifier:`Etc/${[`Zulu`,`Greenwich`,`Universal`].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:n};if(r[0]===`Us`)return{identifier:`US/${r[1]}`,primaryIdentifier:n};let i=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]=i.get(r[1])??r[1],r.length>2&&(r[2]=i.get(r[2])??r[2]),{identifier:r.join(`/`),primaryIdentifier:n}}function Cr(e,t){let{year:n,month:r,day:i,hour:a,minute:o,second:s}=jr(e,t),c=t%1e3;return c<0&&(c+=1e3),1e6*(Dr({isoDate:{year:n,month:r,day:i},time:{hour:a,minute:o,second:s,millisecond:c}})-t)}function wr(e,t){return Cr(e,Ui(t,`floor`))}function Tr(e){let t=e<0?`-`:`+`,n=Math.abs(e);return`${t}${lr(Math.floor(n/60),n%60,0,0,`minute`)}`}function Er(e){return Tr(Ni(e,ot,`halfExpand`)/6e10)}function Dr({isoDate:{year:e,month:t,day:n},time:{hour:r,minute:i,second:a,millisecond:o}}){let s=e%400,c=(e-s)/400,l=new Date;return l.setUTCHours(r,i,a,o),l.setUTCFullYear(s,t-1,n),l.getTime()+ft*c}function Z(e){let t=Dr(e),n=1e3*e.time.microsecond+e.time.nanosecond;return c.default.add(Wi(t),c.default.BigInt(n))}function Or(e){let t=Ui(e,`trunc`),n=c.default.toNumber(c.default.remainder(e,g));n<0&&(n+=1e6,--t);let r=Math.floor(n/1e3)%1e3,i=n%1e3,a=new Date(t);return{epochMilliseconds:t,isoDate:{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate()},time:{hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds(),microsecond:r,nanosecond:i}}}function kr(e,t){if(e===`UTC`)return null;let n=Ui(t,`floor`);if(n<ht)return kr(e,Wi(ht));let r=Math.max(n,Date.now())+366*it*3,i=n,a=Cr(e,i),o=i,s=a;for(;a===s&&i<r;){if(o=i+2*it*7,o>st)return null;s=Cr(e,o),a===s&&(i=o)}return a===s?null:Wi(na((t=>Cr(e,t)),i,o,a,s))}function Ar(e,t){if(e===`UTC`)return null;let n=Ui(t,`ceil`),r=Date.now(),i=r+366*it*3;if(n>i){let t=Ar(e,Wi(i));if(t===null||c.default.lessThan(t,Wi(r)))return t}if(e===`Africa/Casablanca`||e===`Africa/El_Aaiun`){let t=Date.UTC(2088,0,1);if(t<n)return Ar(e,Wi(t))}let a=n-1;if(a<ht)return null;let o=Cr(e,a),s=a,l=o;for(;o===l&&a>ht;){if(s=a-2*it*7,s<ht)return null;l=Cr(e,s),o===l&&(a=s)}return o===l?null:Wi(na((t=>Cr(e,t)),s,a,l,o))}function jr(e,t){return function(e){let t=e.split(/[^\w]+/);if(t.length!==7)throw RangeError(`expected 7 parts in "${e}`);let n=+t[0],r=+t[1],i=+t[2],a=t[3];if(a[0]===`b`||a[0]===`B`)i=1-i;else if(a[0]!==`a`&&a[0]!==`A`)throw RangeError(`Unknown era ${a} in "${e}`);let o=t[4]===`24`?0:+t[4],s=+t[5],c=+t[6];if(!(Number.isFinite(i)&&Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(o)&&Number.isFinite(s)&&Number.isFinite(c)))throw RangeError(`Invalid number in "${e}`);return{year:i,month:n,day:r,hour:o,minute:s,second:c}}(Ft(e).format(t))}function Mr(e){return e!==void 0&&!(e%4!=0||e%100==0&&e%400!=0)}function Nr(e,t){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]}[Mr(e)?`leapyear`:`standard`][t-1]}function Pr(e){let t=[j(e,se),j(e,ce),j(e,le),j(e,ue),j(e,de),j(e,fe),j(e,pe),j(e,me),j(e,he),j(e,ge)];for(let e=0;e<t.length;e++){let n=t[e];if(n!==0)return n<0?-1:1}return 0}function Fr(e){let t=[`years`,`months`,`weeks`,`days`];for(let n=0;n<t.length;n++){let r=e[t[n]];if(r!==0)return r<0?-1:1}return 0}function Ir(e){let t=Fr(e.date);return t===0?e.time.sign():t}function Lr(e,t){let n=e,r=t;if(!Number.isFinite(n)||!Number.isFinite(r))throw RangeError(`infinity is out of range`);return--r,n+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:n,month:r}}function Rr(e,t,n){let r=e,i=t,a=n;if(!Number.isFinite(a))throw RangeError(`infinity is out of range`);({year:r,month:i}=Lr(r,i));let o=146097;if(Math.abs(a)>o){let e=Math.trunc(a/o);r+=400*e,a-=e*o}let s=0,c=i>2?r:r-1;for(;s=Mr(c)?366:365,a<-s;)--r,--c,a+=s;for(c+=1;s=Mr(c)?366:365,a>s;)r+=1,c+=1,a-=s;for(;a<1;)({year:r,month:i}=Lr(r,i-1)),a+=Nr(r,i);for(;a>Nr(r,i);)a-=Nr(r,i),{year:r,month:i}=Lr(r,i+1);return{year:r,month:i,day:a}}function zr(e,t,n,r,i,a,o,s,c){let l=Br(r,i,a,o,s,c);return q(Rr(e,t,n+l.deltaDays),l)}function Br(e,t,n,r,i,a){let o,s=e,c=t,l=n,u=r,d=i,f=a;({div:o,mod:f}=Le(f,3)),d+=o,f<0&&(--d,f+=1e3),{div:o,mod:d}=Le(d,3),u+=o,d<0&&(--u,d+=1e3),l+=Math.trunc(u/1e3),u%=1e3,u<0&&(--l,u+=1e3),c+=Math.trunc(l/60),l%=60,l<0&&(--c,l+=60),s+=Math.trunc(c/60),c%=60,c<0&&(--s,c+=60);let p=Math.trunc(s/24);return s%=24,s<0&&(--p,s+=24),p+=0,s+=0,c+=0,l+=0,u+=0,d+=0,f+=0,{deltaDays:p,hour:s,minute:c,second:l,millisecond:u,microsecond:d,nanosecond:f}}function Vr(e,t){let n=K(e,0);if(Fr(n)===0)return e.days;let r=j(t,T),i=Wn(j(t,O),r,n,`constrain`),a=ai(r.year,r.month-1,r.day),o=ai(i.year,i.month-1,i.day)-a;return e.days+o}function Hr(e){return new(N(`%Temporal.Duration%`))(-j(e,se),-j(e,ce),-j(e,le),-j(e,ue),-j(e,de),-j(e,fe),-j(e,pe),-j(e,me),-j(e,he),-j(e,ge))}function Ur(e,t,n){return Math.min(n,Math.max(t,e))}function Wr(e,t,n){let r=Ur(t,1,12);return{year:e,month:r,day:Ur(n,1,Nr(e,r))}}function Q(e,t,n){if(e<t||e>n)throw RangeError(`value out of range: ${t} <= ${e} <= ${n}`)}function Gr(e,t,n){Q(t,1,12),Q(n,1,Nr(e,t))}function Kr(e){Yr(q(e,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function qr(e,t,n,r,i,a){Q(e,0,23),Q(t,0,59),Q(n,0,59),Q(r,0,999),Q(i,0,999),Q(a,0,999)}function Jr(e,t,n,r,i,a,o,s,c){Gr(e,t,n),qr(r,i,a,o,s,c)}function Yr(e){let t=Z(e);(c.default.lessThan(t,ut)||c.default.greaterThan(t,dt))&&Zr(t)}function Xr(e){Z(e)}function Zr(e){if(c.default.lessThan(e,lt)||c.default.greaterThan(e,ct))throw RangeError(`date/time value is outside of supported range`)}function Qr({year:e,month:t}){Q(e,pt,mt),e===pt?Q(t,4,12):e===mt&&Q(t,1,9)}function $r(e,t,n,r,i,a,o,s,c,l){let u=0,d=[e,t,n,r,i,a,o,s,c,l];for(let e=0;e<d.length;e++){let t=d[e];if(t===1/0||t===-1/0)throw RangeError(`infinite values not allowed as duration fields`);if(t!==0){let e=t<0?-1:1;if(u!==0&&e!==u)throw RangeError(`mixed-sign values not allowed as duration fields`);u=e}}if(Math.abs(e)>=2**32||Math.abs(t)>=2**32||Math.abs(n)>=2**32)throw RangeError(`years, months, and weeks must be < 2³²`);let f=Le(s,3),p=Le(c,6),m=Le(l,9),h=Le(1e6*f.mod+1e3*p.mod+m.mod,9).div,g=86400*r+3600*i+60*a+o+f.div+p.div+m.div+h;if(!Number.isSafeInteger(g))throw RangeError(`total of duration time units cannot exceed 9007199254740991.999999999 s`)}function ei(e){return{date:{years:j(e,se),months:j(e,ce),weeks:j(e,le),days:j(e,ue)},time:P.fromComponents(j(e,de),j(e,fe),j(e,pe),j(e,me),j(e,he),j(e,ge))}}function ti(e){let t=P.fromComponents(j(e,de),j(e,fe),j(e,pe),j(e,me),j(e,he),j(e,ge)).add24HourDays(j(e,ue));return{date:{years:j(e,se),months:j(e,ce),weeks:j(e,le),days:0},time:t}}function ni(e){let t=ti(e),n=Math.trunc(t.time.sec/86400);return $r(t.date.years,t.date.months,t.date.weeks,n,0,0,0,0,0,0),{...t.date,days:n}}function ri(e,t){let n=e.time.sign(),r=e.time.abs().subsec,i=0,a=0,o=e.time.abs().sec,s=0,c=0,l=0;switch(t){case`year`:case`month`:case`week`:case`day`:i=Math.trunc(r/1e3),r%=1e3,a=Math.trunc(i/1e3),i%=1e3,o+=Math.trunc(a/1e3),a%=1e3,s=Math.trunc(o/60),o%=60,c=Math.trunc(s/60),s%=60,l=Math.trunc(c/24),c%=24;break;case`hour`:i=Math.trunc(r/1e3),r%=1e3,a=Math.trunc(i/1e3),i%=1e3,o+=Math.trunc(a/1e3),a%=1e3,s=Math.trunc(o/60),o%=60,c=Math.trunc(s/60),s%=60;break;case`minute`:i=Math.trunc(r/1e3),r%=1e3,a=Math.trunc(i/1e3),i%=1e3,o+=Math.trunc(a/1e3),a%=1e3,s=Math.trunc(o/60),o%=60;break;case`second`:i=Math.trunc(r/1e3),r%=1e3,a=Math.trunc(i/1e3),i%=1e3,o+=Math.trunc(a/1e3),a%=1e3;break;case`millisecond`:i=Math.trunc(r/1e3),r%=1e3,a=Re(o,3,Math.trunc(i/1e3)),i%=1e3,o=0;break;case`microsecond`:i=Re(o,6,Math.trunc(r/1e3)),r%=1e3,o=0;break;case`nanosecond`:r=Re(o,9,r),o=0}return new(N(`%Temporal.Duration%`))(e.date.years,e.date.months,e.date.weeks,e.date.days+n*l,n*c,n*s,n*o,n*a,n*i,n*r)}function ii(e,t){return Fr(e),t.sign(),{date:e,time:t}}function ai(e,t,n){return Dr({isoDate:{year:e,month:t+1,day:n},time:{hour:0,minute:0,second:0,millisecond:0}})/it}function oi({year:e,month:t,day:n}){if(Math.abs(ai(e,t-1,n))>1e8)throw RangeError(`date/time value is outside the supported range`)}function si(e,t){let n=t.hour-e.hour,r=t.minute-e.minute,i=t.second-e.second,a=t.millisecond-e.millisecond,o=t.microsecond-e.microsecond,s=t.nanosecond-e.nanosecond;return P.fromComponents(n,r,i,a,o,s)}function ci(e,t,n,r,i){let a=P.fromEpochNsDiff(t,e);return a=Li(a,n,r,i),ii({years:0,months:0,weeks:0,days:0},a)}function li(e,t,n,r){Xr(e),Xr(t);let i=si(e.time,t.time),a=i.sign(),o=zi(e.isoDate,t.isoDate),s=t.isoDate;o===a&&(s=Rr(s.year,s.month,s.day+a),i=i.add24HourDays(-a));let c=un(`day`,r),l=Gn(n,e.isoDate,s,c);return r!==c&&(i=i.add24HourDays(l.days),l.days=0),ii(l,i)}function ui(e,t,n,r,i){let a=c.default.subtract(t,e);if(c.default.equal(a,l))return{date:{years:0,months:0,weeks:0,days:0},time:P.ZERO};let o=c.default.lessThan(a,l)?-1:1,s=nr(n,e),u=nr(n,t),d,f=0,p=o===1?2:1,m=si(s.time,u.time);for(m.sign()===-o&&f++;f<=p;f++){d=q(Rr(u.isoDate.year,u.isoDate.month,u.isoDate.day-f*o),s.time);let e=X(n,d,`compatible`);if(m=P.fromEpochNsDiff(t,e),m.sign()!==-o)break}let h=un(`day`,i);return ii(Gn(r,s.isoDate,d.isoDate,h),m)}function di(e,t,n,r,i,a,o,s,l){let u,d,f,p,m=t;switch(s){case`year`:{let t=Ni(m.date.years,o,`trunc`);u=t,d=t+o*e,f={years:u,months:0,weeks:0,days:0},p={...f,years:d};break}case`month`:{let t=Ni(m.date.months,o,`trunc`);u=t,d=t+o*e,f=K(m.date,0,0,u),p=K(m.date,0,0,d);break}case`week`:{let t=K(m.date,0,0),n=Wn(a,r.isoDate,t,`constrain`),i=Gn(a,n,Rr(n.year,n.month,n.day+m.date.days),`week`),s=Ni(m.date.weeks+i.weeks,o,`trunc`);u=s,d=s+o*e,f=K(m.date,0,u),p=K(m.date,0,d);break}case`day`:{let t=Ni(m.date.days,o,`trunc`);u=t,d=t+o*e,f=K(m.date,u),p=K(m.date,d);break}}let h=Wn(a,r.isoDate,f,`constrain`),g=Wn(a,r.isoDate,p,`constrain`),_,v,y=q(h,r.time),b=q(g,r.time);i?(_=X(i,y,`compatible`),v=X(i,b,`compatible`)):(_=Z(y),v=Z(b));let x=P.fromEpochNsDiff(n,_),S=P.fromEpochNsDiff(v,_),ee=ze(l,e<0?`negative`:`positive`),te=x.add(x).abs().subtract(S.abs()).sign(),C=Math.abs(u)/o%2==0,ne=x.isZero()?Math.abs(u):x.cmp(S)?Be(Math.abs(u),Math.abs(d),te,C,ee):Math.abs(d),re=new P(c.default.add(c.default.multiply(S.totalNs,c.default.BigInt(u)),c.default.multiply(x.totalNs,c.default.BigInt(o*e)))).fdiv(S.totalNs),w=ne===Math.abs(d);return m={date:w?p:f,time:P.ZERO},{nudgeResult:{duration:m,nudgedEpochNs:w?v:_,didExpandCalendarUnit:w},total:re}}function fi(e,t,n,r,i,a,o,s,l){let u=e,d=dn(s)||r&&s===`day`,f=Ir(u)<0?-1:1,p;return d?{nudgeResult:p}=di(f,u,t,n,r,i,o,s,l):p=r?function(e,t,n,r,i,a,o,s){let l=t,u=Wn(i,n.isoDate,l.date,`constrain`),d=q(u,n.time),f=q(Rr(u.year,u.month,u.day+e),n.time),p=X(r,d,`compatible`),m=X(r,f,`compatible`),h=P.fromEpochNsDiff(m,p);if(h.sign()!==e)throw RangeError(`time zone returned inconsistent Instants`);let g=c.default.BigInt(jt[o]*a),_=l.time.round(g,s),v=_.subtract(h),y=v.sign()!==-e,b,x;return y?(b=e,_=v.round(g,s),x=_.addToEpochNs(m)):(b=0,x=_.addToEpochNs(p)),{duration:ii(K(l.date,l.date.days+b),_),nudgedEpochNs:x,didExpandCalendarUnit:y}}(f,u,n,r,i,o,s,l):function(e,t,n,r,i,a){let o=e,s=o.time.add24HourDays(o.date.days),l=s.round(c.default.BigInt(r*jt[i]),a),u=l.subtract(s),{quotient:d}=s.divmod(at),{quotient:f}=l.divmod(at),p=Math.sign(f-d)===s.sign(),m=u.addToEpochNs(t),h=0,g=l;return fn(n)===`date`&&(h=f,g=l.add(P.fromComponents(24*-f,0,0,0,0,0))),{duration:{date:K(o.date,h),time:g},nudgedEpochNs:m,didExpandCalendarUnit:p}}(u,t,a,o,s,l),u=p.duration,p.didExpandCalendarUnit&&s!==`week`&&(u=function(e,t,n,r,i,a,o,s){let c=t;if(s===o)return c;let l=At.indexOf(o);for(let t=At.indexOf(s)-1;t>=l;t--){let s=At[t];if(s===`week`&&o!==`week`)continue;let l;switch(s){case`year`:l={years:c.date.years+e,months:0,weeks:0,days:0};break;case`month`:{let t=c.date.months+e;l=K(c.date,0,0,t);break}case`week`:{let t=c.date.weeks+e;l=K(c.date,0,t);break}}let u=q(Wn(a,r.isoDate,l,`constrain`),r.time),d;if(d=i?X(i,u,`compatible`):Z(u),te(n,d)===-e)break;c={date:l,time:P.ZERO}}return c}(f,u,p.nudgedEpochNs,n,r,i,a,un(s,`day`))),u}function pi(e,t,n,r,i,a){return dn(a)||r&&a===`day`?di(Ir(e)<0?-1:1,e,t,n,r,i,1,a,`trunc`).total:Ri(e.time.add24HourDays(e.date.days),a)}function mi(e,t,n,r,i,a,o){if(Vi(e,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:P.ZERO};Yr(e),Yr(t);let s=li(e,t,n,r);return a===`nanosecond`&&i===1?s:fi(s,Z(t),e,null,n,r,i,a,o)}function hi(e,t,n,r,i,a,o,s){if(fn(i)===`time`)return ci(e,t,a,o,s);let c=ui(e,t,n,r,i);return o===`nanosecond`&&a===1?c:fi(c,t,nr(n,e),n,r,i,a,o,s)}function gi(e,t,n,r,i,a){let o=Dt.reduce(((e,t)=>{let i=t[0],a=t[1],o=t[2];return n!==`datetime`&&o!==n||r.includes(a)||e.push(a,i),e}),[]),s=sn(t,`largestUnit`,n,`auto`);if(r.includes(s))throw RangeError(`largestUnit must be one of ${o.join(`, `)}, not ${s}`);let c=tn(t),l=Qt(t,`trunc`);e===`since`&&(l=function(e){switch(e){case`ceil`:return`floor`;case`floor`:return`ceil`;case`halfCeil`:return`halfFloor`;case`halfFloor`:return`halfCeil`;default:return e}}(l));let u=sn(t,`smallestUnit`,n,i);if(r.includes(u))throw RangeError(`smallestUnit must be one of ${o.join(`, `)}, not ${u}`);let d=un(a,u);if(s===`auto`&&(s=d),un(s,u)!==s)throw RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${u}`);let f={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[u];return f!==void 0&&nn(c,f,!1),{largestUnit:s,roundingIncrement:c,roundingMode:l,smallestUnit:u}}function _i(e,t,n,r){let i=Sn(n),a=gi(e,$(r),`time`,[],`nanosecond`,`second`),o=ri(ci(j(t,w),j(i,w),a.roundingIncrement,a.smallestUnit,a.roundingMode),a.largestUnit);return e===`since`&&(o=Hr(o)),o}function vi(e,t,n,r){let i=vn(n),a=j(t,O),o=j(i,O);if(!Jn(a,o))throw RangeError(`cannot compute difference between dates of ${a} and ${o} calendars`);let s=gi(e,$(r),`date`,[],`day`,`day`),c=N(`%Temporal.Duration%`),l=j(t,T),u=j(i,T);if(zi(l,u)===0)return new c;let d={date:Gn(a,l,u,s.largestUnit),time:P.ZERO};if(s.smallestUnit!==`day`||s.roundingIncrement!==1){let e=q(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});d=fi(d,Z(q(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),e,null,a,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let f=ri(d,`day`);return e===`since`&&(f=Hr(f)),f}function yi(e,t,n,r){let i=bn(n),a=j(t,O),o=j(i,O);if(!Jn(a,o))throw RangeError(`cannot compute difference between dates of ${a} and ${o} calendars`);let s=gi(e,$(r),`datetime`,[],`nanosecond`,`day`),c=N(`%Temporal.Duration%`),l=j(t,E),u=j(i,E);if(Vi(l,u)===0)return new c;let d=ri(mi(l,u,a,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return e===`since`&&(d=Hr(d)),d}function bi(e,t,n,r){let i=wn(n),a=gi(e,$(r),`time`,[],`nanosecond`,`hour`),o=si(j(t,D),j(i,D));o=Li(o,a.roundingIncrement,a.smallestUnit,a.roundingMode);let s=ri(ii({years:0,months:0,weeks:0,days:0},o),a.largestUnit);return e===`since`&&(s=Hr(s)),s}function xi(e,t,n,r){let i=En(n),a=j(t,O),o=j(i,O);if(!Jn(a,o))throw RangeError(`cannot compute difference between months of ${a} and ${o} calendars`);let s=gi(e,$(r),`date`,[`week`,`day`],`month`,`year`),c=N(`%Temporal.Duration%`);if(zi(j(t,T),j(i,T))==0)return new c;let l=hn(a,j(t,T),`year-month`);l.day=1;let u=Yn(a,l,`constrain`),d=hn(a,j(i,T),`year-month`);d.day=1;let f=Yn(a,d,`constrain`),p={date:K(Gn(a,u,f,s.largestUnit),0,0),time:P.ZERO};if(s.smallestUnit!==`month`||s.roundingIncrement!==1){let e=q(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});p=fi(p,Z(q(f,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),e,null,a,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let m=ri(p,`day`);return e===`since`&&(m=Hr(m)),m}function Si(e,t,n,r){let i=On(n),a=j(t,O),o=j(i,O);if(!Jn(a,o))throw RangeError(`cannot compute difference between dates of ${a} and ${o} calendars`);let s=gi(e,$(r),`datetime`,[],`nanosecond`,`hour`),l=j(t,w),u=j(i,w),d=N(`%Temporal.Duration%`),f;if(fn(s.largestUnit)!==`date`)f=ri(ci(l,u,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let e=j(t,k);if(!$n(e,j(i,k)))throw 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(c.default.equal(l,u))return new d;f=ri(hi(l,u,e,a,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),`hour`)}return e===`since`&&(f=Hr(f)),f}function Ci({hour:e,minute:t,second:n,millisecond:r,microsecond:i,nanosecond:a},o){let s=n,c=a;return s+=o.sec,c+=o.subsec,Br(e,t,s,r,i,c)}function wi(e,t){let n=t.addToEpochNs(e);return Zr(n),n}function Ti(e,t,n,r,i=`constrain`){if(Fr(r.date)===0)return wi(e,r.time);let a=nr(t,e);return wi(X(t,q(Wn(n,a.isoDate,r.date,i),a.time),`compatible`),r.time)}function Ei(e,t,n){let r=xn(n);e===`subtract`&&(r=Hr(r));let i=un(ln(t),ln(r));if(dn(i))throw RangeError(`For years, months, or weeks arithmetic, use date arithmetic relative to a starting point`);let a=ti(t),o=ti(r);return ri(ii({years:0,months:0,weeks:0,days:0},a.time.add(o.time)),i)}function Di(e,t,n){let r=xn(n);e===`subtract`&&(r=Hr(r));let i=ln(r);if(fn(i)===`date`)throw RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let a=ti(r);return Bn(wi(j(t,w),a.time))}function Oi(e,t,n,r){let i=j(t,O),a=xn(n);e===`subtract`&&(a=Hr(a));let o=ni(a),s=J($(r));return An(Wn(i,j(t,T),o,s),i)}function ki(e,t,n,r){let i=xn(n);e===`subtract`&&(i=Hr(i));let a=J($(r)),o=j(t,O),s=ti(i),c=j(t,E),l=Ci(c.time,s.time),u=K(s.date,l.deltaDays);return $r(u.years,u.months,u.weeks,u.days,0,0,0,0,0,0),Mn(q(Wn(o,c.isoDate,u,a),l),o)}function Ai(e,t,n){let r=xn(n);e===`subtract`&&(r=Hr(r));let i=ti(r),{hour:a,minute:o,second:s,millisecond:c,microsecond:l,nanosecond:u}=Ci(j(t,D),i.time);return In(Yt(a,o,s,c,l,u,`reject`))}function ji(e,t,n,r){let i=xn(n);e===`subtract`&&(i=Hr(i));let a=J($(r)),o=Pr(i),s=j(t,O),c=hn(s,j(t,T),`year-month`);c.day=1;let l=Yn(s,c,`constrain`);if(o<0){let e=Wn(s,l,{months:1},`constrain`);l=Rr(e.year,e.month,e.day-1)}let u=ni(i);return Kr(l),Rn(Xn(s,hn(s,Wn(s,l,u,a),`year-month`),a),s)}function Mi(e,t,n,r){let i=xn(n);e===`subtract`&&(i=Hr(i));let a=J($(r)),o=j(t,k),s=j(t,O),c=ei(i);return Y(Ti(j(t,w),o,s,c,a),o,s)}function Ni(e,t,n){let r=Math.trunc(e/t),i=e%t,a=e<0?`negative`:`positive`,o=Math.abs(r),s=o+1,c=Ji(Math.abs(2*i)-t),l=o%2==0,u=ze(n,a),d=i===0?o:Be(o,s,c,l,u);return t*(a===`positive`?d:-d)}function Pi(e,t,n,r){let i=jt[n]*t;return function(e,t,n){let r=x(e),i=x(t),a=c.default.divide(r,i),o=c.default.remainder(r,i),s=ze(n,`positive`),f,p;c.default.lessThan(r,l)?(f=c.default.subtract(a,u),p=a):(f=a,p=c.default.add(a,u));let m=te(ee(c.default.multiply(o,d)),i)*(c.default.lessThan(r,l)?-1:1)+0,h=c.default.equal(o,l)?a:Be(f,p,m,S(f),s);return c.default.multiply(h,i)}(e,c.default.BigInt(i),r)}function Fi(e,t,n,r){Xr(e);let{year:i,month:a,day:o}=e.isoDate,s=Ii(e.time,t,n,r);return q(Rr(i,a,o+s.deltaDays),s)}function Ii({hour:e,minute:t,second:n,millisecond:r,microsecond:i,nanosecond:a},o,s,c){let l;switch(s){case`day`:case`hour`:l=1e3*(1e3*(1e3*(60*(60*e+t)+n)+r)+i)+a;break;case`minute`:l=1e3*(1e3*(1e3*(60*t+n)+r)+i)+a;break;case`second`:l=1e3*(1e3*(1e3*n+r)+i)+a;break;case`millisecond`:l=1e3*(1e3*r+i)+a;break;case`microsecond`:l=1e3*i+a;break;case`nanosecond`:l=a}let u=jt[s],d=Ni(l,u*o,c)/u;switch(s){case`day`:return{deltaDays:d,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case`hour`:return Br(d,0,0,0,0,0);case`minute`:return Br(e,d,0,0,0,0);case`second`:return Br(e,t,d,0,0,0);case`millisecond`:return Br(e,t,n,d,0,0);case`microsecond`:return Br(e,t,n,r,d,0);case`nanosecond`:return Br(e,t,n,r,i,d);default:throw Error(`Invalid unit ${s}`)}}function Li(e,t,n,r){let i=jt[n];return e.round(c.default.BigInt(i*t),r)}function Ri(e,t){let n=jt[t];return e.fdiv(c.default.BigInt(n))}function zi(e,t){return e.year===t.year?e.month===t.month?e.day===t.day?0:Ji(e.day-t.day):Ji(e.month-t.month):Ji(e.year-t.year)}function Bi(e,t){return e.hour===t.hour?e.minute===t.minute?e.second===t.second?e.millisecond===t.millisecond?e.microsecond===t.microsecond?e.nanosecond===t.nanosecond?0:Ji(e.nanosecond-t.nanosecond):Ji(e.microsecond-t.microsecond):Ji(e.millisecond-t.millisecond):Ji(e.second-t.second):Ji(e.minute-t.minute):Ji(e.hour-t.hour)}function Vi(e,t){let n=zi(e.isoDate,t.isoDate);return n===0?Bi(e.time,t.time):n}function Hi(e){let t=Gi(e);return globalThis.BigInt===void 0?t:globalThis.BigInt(t.toString(10))}function Ui(e,t){let{quotient:n,remainder:r}=C(x(e),g),i=c.default.toNumber(n);return t===`floor`&&c.default.toNumber(r)<0&&--i,t===`ceil`&&c.default.toNumber(r)>0&&(i+=1),i}function Wi(e){if(!Number.isInteger(e))throw RangeError(`epoch milliseconds must be an integer`);return c.default.multiply(c.default.BigInt(e),g)}function Gi(e){let t=e;if(typeof e==`object`){let n=e[Symbol.toPrimitive];n&&typeof n==`function`&&(t=n.call(e,`number`))}if(typeof t==`number`)throw TypeError(`cannot convert number to bigint`);return typeof t==`bigint`?c.default.BigInt(t.toString(10)):c.default.BigInt(t)}var Ki=(()=>{let e=c.default.BigInt(Date.now()%1e6);return()=>{let t=Date.now(),n=c.default.BigInt(t),r=c.default.add(Wi(t),e);return e=c.default.remainder(n,g),c.default.greaterThan(r,ct)?ct:c.default.lessThan(r,lt)?lt:r}})();function qi(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Ji(e){return e<0?-1:e>0?1:e}function $(e){if(e===void 0)return Object.create(null);if(F(e)&&e!==null)return e;throw TypeError(`Options parameter must be an object, not `+(e===null?`null`:typeof e))}function Yi(e,t){let n=Object.create(null);return n[e]=t,n}function Xi(e,t,n,r){let i=e[t];if(i!==void 0){if(i=yt(i),!n.includes(i))throw RangeError(`${t} must be one of ${n.join(`, `)}, not ${i}`);return i}if(r===on)throw RangeError(`${t} option is required`);return r}function Zi(e){let t=Qi(e);if(!gt.includes(Qi(t)))throw RangeError(`invalid calendar identifier ${t}`);switch(t){case`ethiopic-amete-alem`:return`ethioaa`;case`islamicc`:return`islamic-civil`}return t}function Qi(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return t}function $i(e){throw TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${e===`PlainMonthDay`?`Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))`:`Temporal.${e}.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.`)}var ea=RegExp(`^${Je.source}$`),ta=RegExp(`^([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\\d{1,9}))?)?)?$`);function na(e,t,n,r=e(t),i=e(n)){let a=t,o=n,s=r,c=i;for(;o-a>1;){let t=Math.trunc((a+o)/2),n=e(t);n===s?(a=t,s=n):n===c&&(o=t,c=n)}return o}function ra(e){return[...e]}function ia(e,t){if(e!==`gregory`&&e!==`iso8601`)return;let n=oa[e],r=t.year,{dayOfWeek:i,dayOfYear:a,daysInYear:o}=n.isoToDate(t,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=n.getFirstDayOfWeek(),c=n.getMinimalDaysInFirstWeek(),l=(i+7-s)%7,u=(i-a+7001-s)%7,d=Math.floor((a-1+u)/7);if(7-u>=c&&++d,d==0)d=function(e,t,n,r){let i=(r-e-n+1)%7;i<0&&(i+=7);let a=Math.floor((n+i-1)/7);return 7-i>=t&&++a,a}(s,c,a+n.isoToDate(n.dateAdd(t,{years:-1},`constrain`),{daysInYear:!0}).daysInYear,i),r--;else if(a>=o-5){let e=(l+o-a)%7;e<0&&(e+=7),6-e>=c&&a+7-l>o&&(d=1,r++)}return{week:d,year:r}}function aa(e,t,n,r,i){if(t!==i.year){if(e*(t-i.year)>0)return!0}else if(n!==i.month){if(e*(n-i.month)>0)return!0}else if(r!==i.day&&e*(r-i.day)>0)return!0;return!1}var oa={};function sa(e){if(!e.startsWith(`M`))throw RangeError(`Invalid month code: ${e}. Month codes must start with M.`);let t=+e.slice(1);if(Number.isNaN(t))throw RangeError(`Invalid month code: ${e}`);return t}function ca(e,t=!1){return`M${`${e}`.padStart(2,`0`)}${t?`L`:``}`}function la(e,t=void 0,n=12){let{month:r,monthCode:i}=e;if(i===void 0){if(r===void 0)throw TypeError(`Either month or monthCode are required`);t===`reject`&&Q(r,1,n),t===`constrain`&&(r=Ur(r,1,n)),i=ca(r)}else{let e=sa(i);if(i!==ca(e))throw RangeError(`Invalid month code: ${i}`);if(r!==void 0&&r!==e)throw RangeError(`monthCode ${i} and month ${r} must match if both are present`);if(r=e,r<1||r>n)throw RangeError(`Invalid monthCode: ${i}`)}return{...e,month:r,monthCode:i}}oa.iso8601={resolveFields(e,t){if((t===`date`||t===`year-month`)&&e.year===void 0)throw TypeError(`year is required`);if((t===`date`||t===`month-day`)&&e.day===void 0)throw TypeError(`day is required`);Object.assign(e,la(e))},dateToISO:(e,t)=>Jt(e.year,e.month,e.day,t),monthDayToISOReferenceDate(e,t){let{month:n,day:r}=Jt(e.year??1972,e.month,e.day,t);return{month:n,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];t.add(r),r===`month`?t.add(`monthCode`):r===`monthCode`&&t.add(`month`)}return ra(t)},dateAdd(e,{years:t=0,months:n=0,weeks:r=0,days:i=0},a){let{year:o,month:s,day:c}=e;return o+=t,s+=n,{year:o,month:s}=Lr(o,s),{year:o,month:s,day:c}=Jt(o,s,c,a),c+=i+7*r,Rr(o,s,c)},dateUntil(e,t,n){let r=-zi(e,t);if(r===0)return{years:0,months:0,weeks:0,days:0};let i,a=0,o=0;if(n===`year`||n===`month`){let s=t.year-e.year;for(s!==0&&(s-=r);!aa(r,e.year+s,e.month,e.day,t);)a=s,s+=r;let c=r;for(i=Lr(e.year+a,e.month+c);!aa(r,i.year,i.month,e.day,t);)o=c,c+=r,i=Lr(i.year,i.month+r);n===`month`&&(o+=12*a,a=0)}i=Lr(e.year+a,e.month+o);let s=Wr(i.year,i.month,e.day),c=0,l=ai(t.year,t.month-1,t.day)-ai(s.year,s.month-1,s.day);return n===`week`&&(c=Math.trunc(l/7),l%=7),{years:a,months:o,weeks:c,days:l}},isoToDate({year:e,month:t,day:n},r){let i={era:void 0,eraYear:void 0,year:e,month:t,day:n,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(i.monthCode=ca(t)),r.dayOfWeek){let r=t+(t<3?10:-2),a=e-+(t<3),o=Math.floor(a/100),s=a-100*o,c=(n+Math.floor(2.6*r-.2)+(s+Math.floor(s/4))+(Math.floor(o/4)-2*o))%7;i.dayOfWeek=c+(c<=0?7:0)}if(r.dayOfYear){let r=n;for(let n=t-1;n>0;n--)r+=Nr(e,n);i.dayOfYear=r}return r.weekOfYear&&(i.weekOfYear=ia(`iso8601`,{year:e,month:t,day:n})),r.daysInMonth&&(i.daysInMonth=Nr(e,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=Mr(e),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var ua=class e{constructor(t){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,t!==void 0){let n=0;for(let r of t.map.entries()){if(++n>e.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(e){let 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(t){if(e.objectMap.get(t))throw RangeError(`object already cached`);e.objectMap.set(t,this),this.report()}static getCacheForObject(t){let n=e.objectMap.get(t);return n||(n=new e,e.objectMap.set(t,n)),n}};function da({isoYear:e,isoMonth:t,isoDay:n}){return`${or(e)}-${sr(t)}-${sr(n)}T00:00Z`}function fa(e,t){return{years:e.year-t.year,months:e.month-t.month,days:e.day-t.day}}ua.objectMap=new WeakMap,ua.MAX_CACHE_ENTRIES=1e3;var pa=class{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(),n=new Date(e);if(e===`-271821-04-19T00:00Z`){let e=t.resolvedOptions();t=new Intl.DateTimeFormat(e.locale,{...e,timeZone:`Etc/GMT+1`}),n=new Date(`-271821-04-20T00:00Z`)}try{return t.formatToParts(n)}catch{throw RangeError(`Invalid ISO date: ${e}`)}}isoToCalendarDate(e,t){let{year:n,month:r,day:i}=e,a=JSON.stringify({func:`isoToCalendarDate`,isoYear:n,isoMonth:r,isoDay:i,id:this.id}),o=t.get(a);if(o)return o;let s=da({isoYear:n,isoMonth:r,isoDay:i}),c=this.getCalendarParts(s),l={};for(let e=0;e<c.length;e++){let{type:t,value:n}=c[e];if(t!==`year`&&t!==`relatedYear`||(this.hasEra?l.eraYear=+n:l.year=+n),t===`month`){let e=/^([0-9]*)(.*?)$/.exec(n);if(!e||e.length!=3||!e[1]&&!e[2])throw RangeError(`Unexpected month: ${n}`);if(l.month=e[1]?+e[1]:1,l.month<1)throw RangeError(`Invalid month ${n} from ${s}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(l.month>13)throw RangeError(`Invalid month ${n} from ${s}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);e[2]&&(l.monthExtra=e[2])}t===`day`&&(l.day=+n),this.hasEra&&t===`era`&&n!=null&&n!==``&&(l.era=n.split(` (`)[0].normalize(`NFD`).replace(/[^-0-9 \p{L}]/gu,``).replace(/ /g,`-`).toLowerCase())}if(this.hasEra&&l.eraYear===void 0)throw RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){let e=this.eras.find((e=>l.era===e.genericName));e&&(l.era=e.code)}if(this.reviseIntlEra){let{era:t,eraYear:n}=this.reviseIntlEra(l,e);l.era=t,l.eraYear=n}this.checkIcuBugs&&this.checkIcuBugs(e);let u=this.adjustCalendarDate(l,t,`constrain`,!0);if(u.year===void 0)throw RangeError(`Missing year converting ${JSON.stringify(e)}`);if(u.month===void 0)throw RangeError(`Missing month converting ${JSON.stringify(e)}`);if(u.day===void 0)throw RangeError(`Missing day converting ${JSON.stringify(e)}`);return t.set(a,u),[`constrain`,`reject`].forEach((n=>{let r=JSON.stringify({func:`calendarToIsoDate`,year:u.year,month:u.month,day:u.day,overflow:n,id:this.id});t.set(r,e)})),u}validateCalendarDate(e){let{month:t,year:n,day:r,eraYear:i,monthCode:a,monthExtra:o}=e;if(o!==void 0)throw RangeError("Unexpected `monthExtra` value");if(n===void 0&&i===void 0)throw TypeError(`year or eraYear is required`);if(t===void 0&&a===void 0)throw TypeError(`month or monthCode is required`);if(r===void 0)throw RangeError(`Missing day`);if(a!==void 0){if(typeof a!=`string`)throw RangeError(`monthCode must be a string, not `+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&e.era===void 0!=(e.eraYear===void 0))throw TypeError(`properties era and eraYear must be provided together`)}adjustCalendarDate(e,t=void 0,n=`constrain`,r=!1){if(this.calendarType===`lunisolar`)throw RangeError(`Override required for lunisolar calendars`);let i=e;this.validateCalendarDate(i);let a=this.monthsInYear(i,t),{month:o,monthCode:s}=i;return{month:o,monthCode:s}=la(i,n,a),{...i,month:o,monthCode:s}}regulateMonthDayNaive(e,t,n){let r=this.monthsInYear(e,n),{month:i,day:a}=e;return t===`reject`?(Q(i,1,r),Q(a,1,this.maximumMonthLength(e))):(i=Ur(i,1,r),a=Ur(a,1,this.maximumMonthLength({...e,month:i}))),{...e,month:i,day:a}}calendarToIsoDate(e,t=`constrain`,n){let r=e,i=this.adjustCalendarDate(e,n,t,!1);i=this.regulateMonthDayNaive(i,t,n);let{year:a,month:o,day:s}=i,c=JSON.stringify({func:`calendarToIsoDate`,year:a,month:o,day:s,overflow:t,id:this.id}),l,u=n.get(c);if(u||r.year!==void 0&&r.month!==void 0&&r.day!==void 0&&(r.year!==i.year||r.month!==i.month||r.day!==i.day)&&(l=JSON.stringify({func:`calendarToIsoDate`,year:r.year,month:r.month,day:r.day,overflow:t,id:this.id}),u=n.get(l),u))return u;let d=this.estimateIsoDate({year:a,month:o,day:s}),f=e=>{let r=this.addDaysIso(d,e);if(i.day>this.minimumMonthLength(i)){let e=this.isoToCalendarDate(r,n);for(;e.month!==o||e.year!==a;){if(t===`reject`)throw RangeError(`day ${s} does not exist in month ${o} of year ${a}`);r=this.addDaysIso(r,-1),e=this.isoToCalendarDate(r,n)}}return r},p=0,m=this.isoToCalendarDate(d,n),h=fa(i,m);if(h.years!==0||h.months!==0||h.days!==0){let e=365*h.years+30*h.months+h.days;d=this.addDaysIso(d,e),m=this.isoToCalendarDate(d,n),h=fa(i,m),h.years===0&&h.months===0?d=f(h.days):p=this.compareCalendarDates(i,m)}let g=8;for(;p;){d=this.addDaysIso(d,p*g);let e=m;m=this.isoToCalendarDate(d,n);let a=p;if(p=this.compareCalendarDates(i,m),p){if(h=fa(i,m),h.years===0&&h.months===0)d=f(h.days),p=0;else if(a&&p!==a)if(g>1)g/=2;else{if(t===`reject`)throw RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...r})}`);this.compareCalendarDates(m,e)>0&&(d=this.addDaysIso(d,-1)),p=0}}}if(n.set(c,d),l&&n.set(l,d),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 RangeError(`Unexpected missing property`);return d}compareCalendarDates(e,t){return e.year===t.year?e.month===t.month?e.day===t.day?0:Ji(e.day-t.day):Ji(e.month-t.month):Ji(e.year-t.year)}regulateDate(e,t=`constrain`,n){let r=this.calendarToIsoDate(e,t,n);return this.isoToCalendarDate(r,n)}addDaysIso(e,t){return Rr(e.year,e.month,e.day+t)}addDaysCalendar(e,t,n){let r=this.calendarToIsoDate(e,`constrain`,n),i=this.addDaysIso(r,t);return this.isoToCalendarDate(i,n)}addMonthsCalendar(e,t,n,r){let i=e,{day:a}=i;for(let e=0,n=Math.abs(t);e<n;e++){let{month:e}=i,n=i,o=t<0?-Math.max(a,this.daysInPreviousMonth(i,r)):this.daysInMonth(i,r),s=this.calendarToIsoDate(i,`constrain`,r),c=this.addDaysIso(s,o);if(i=this.isoToCalendarDate(c,r),t>0){let t=this.monthsInYear(n,r);for(;i.month-1!=e%t;)c=this.addDaysIso(c,-1),i=this.isoToCalendarDate(c,r)}i.day!==a&&(i=this.regulateDate({...i,day:a},`constrain`,r))}if(n===`reject`&&i.day!==a)throw RangeError(`Day ${a} does not exist in resulting calendar month`);return i}addCalendar(e,{years:t=0,months:n=0,weeks:r=0,days:i=0},a,o){let{year:s,day:c,monthCode:l}=e,u=this.adjustCalendarDate({year:s+t,monthCode:l,day:c},o),d=this.addMonthsCalendar(u,n,a,o),f=i+7*r;return this.addDaysCalendar(d,f,o)}untilCalendar(e,t,n,r){let i=0,a=0,o=0,s=0;switch(n){case`day`:i=this.calendarDaysUntil(e,t,r);break;case`week`:{let n=this.calendarDaysUntil(e,t,r);i=n%7,a=(n-i)/7;break}case`month`:case`year`:{let a=this.compareCalendarDates(t,e);if(!a)return{years:0,months:0,weeks:0,days:0};let c=t.year-e.year,l=t.day-e.day;if(n===`year`&&c){let n=0;t.monthCode>e.monthCode&&(n=1),t.monthCode<e.monthCode&&(n=-1),n||=Math.sign(l),s=n*a<0?c-a:c}let u,d=s?this.addCalendar(e,{years:s},`constrain`,r):e;do o+=a,u=d,d=this.addMonthsCalendar(u,a,`constrain`,r),d.day!==e.day&&(d=this.regulateDate({...d,day:e.day},`constrain`,r));while(this.compareCalendarDates(t,d)*a>=0);o-=a,i=this.calendarDaysUntil(u,t,r);break}}return{years:s,months:o,weeks:a,days:i}}daysInMonth(e,t){let{day:n}=e,r=this.maximumMonthLength(e),i=this.minimumMonthLength(e);if(i===r)return i;let a=n<=r-i?r:i,o=this.calendarToIsoDate(e,`constrain`,t),s=this.addDaysIso(o,a),c=this.isoToCalendarDate(s,t),l=this.addDaysIso(s,-c.day);return this.isoToCalendarDate(l,t).day}daysInPreviousMonth(e,t){let{day:n,month:r,year:i}=e,a={year:r>1?i:i-1,month:r,day:1},o=r>1?r-1:this.monthsInYear(a,t);a={...a,month:o};let s=this.minimumMonthLength(a),c=this.maximumMonthLength(a);if(s===c)return c;let l=this.calendarToIsoDate(e,`constrain`,t),u=this.addDaysIso(l,-n);return this.isoToCalendarDate(u,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,n){let r=this.calendarToIsoDate(e,`constrain`,n),i=this.calendarToIsoDate(t,`constrain`,n);return ai(i.year,i.month-1,i.day)-ai(r.year,r.month-1,r.day)}monthDaySearchStartYear(e,t){return 1972}monthDayFromFields(e,t,n){let r,i,a,o,s,{era:c,eraYear:l,year:u,month:d,monthCode:f,day:p}=e;if(d!==void 0&&u===void 0&&(!this.hasEra||c===void 0||l===void 0))throw TypeError(`when month is present, year (or era and eraYear) are required`);(f===void 0||u!==void 0||this.hasEra&&l!==void 0)&&({monthCode:f,day:p}=this.isoToCalendarDate(this.calendarToIsoDate(e,t,n),n));let m={year:this.monthDaySearchStartYear(f,p),month:12,day:31},h=this.isoToCalendarDate(m,n),g=h.monthCode>f||h.monthCode===f&&h.day>=p?h.year:h.year-1;for(let e=0;e<20;e++){let c=this.adjustCalendarDate({day:p,monthCode:f,year:g-e},n),l=this.calendarToIsoDate(c,`constrain`,n),u=this.isoToCalendarDate(l,n);if({year:r,month:i,day:a}=l,u.monthCode===f&&u.day===p)return{month:i,day:a,year:r};if(t===`constrain`){let e=this.maxLengthOfMonthCodeInAnyYear(u.monthCode);if(u.monthCode===f&&u.day===e&&p>e)return{month:i,day:a,year:r};(o===void 0||u.monthCode===o.monthCode&&u.day>o.day)&&(o=u,s=l)}}if(t===`constrain`&&s!==void 0)return s;throw RangeError(`No recent ${this.id} year with monthCode ${f} and day ${p}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},ma=class extends pa{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){let{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){let{month:n,year:r}=e,i=this.getMonthCode(r,n),a=Object.entries(this.months).find((e=>e[1].monthCode===i));if(a===void 0)throw RangeError(`unmatched Hebrew month: ${n}`);let o=a[1].days;return typeof o==`number`?o:o[t]}maxLengthOfMonthCodeInAnyYear(e){return[`M04`,`M06`,`M08`,`M10`,`M12`].includes(e)?29:30}estimateIsoDate(e){let{year:t}=e;return{year:t-3760,month:1,day:1}}getMonthCode(e,t){return this.inLeapYear({year:e})?t===6?ca(5,!0):ca(t<6?t:t-1):ca(t)}adjustCalendarDate(e,t,n=`constrain`,r=!1){let{year:i,month:a,monthCode:o,day:s,monthExtra:c}=e;if(i===void 0)throw TypeError(`Missing property: year`);if(r){if(c){let e=this.months[c];if(!e)throw RangeError(`Unrecognized month from formatToParts: ${c}`);a=this.inLeapYear({year:i})?e.leap:e.regular}return o=this.getMonthCode(i,a),{year:i,month:a,day:s,monthCode:o}}if(this.validateCalendarDate(e),a===void 0)if(o.endsWith(`L`)){if(o!==`M05L`)throw RangeError(`Hebrew leap month must have monthCode M05L, not ${o}`);if(a=6,!this.inLeapYear({year:i})){if(n===`reject`)throw RangeError(`Hebrew monthCode M05L is invalid in year ${i} which is not a leap year`);a=6,o=`M06`}}else{a=sa(o),this.inLeapYear({year:i})&&a>=6&&a++;let e=this.monthsInYear({year:i});if(a<1||a>e)throw RangeError(`Invalid monthCode: ${o}`)}else if(n===`reject`?(Q(a,1,this.monthsInYear({year:i})),Q(s,1,this.maximumMonthLength({year:i,month:a}))):(a=Ur(a,1,this.monthsInYear({year:i})),s=Ur(s,1,this.maximumMonthLength({year:i,month:a}))),o===void 0)o=this.getMonthCode(i,a);else if(this.getMonthCode(i,a)!==o)throw RangeError(`monthCode ${o} doesn't correspond to month ${a} in Hebrew year ${i}`);return{...e,day:s,month:a,monthCode:o,year:i}}},ha=class extends pa{constructor(){super(...arguments),this.calendarType=`lunar`,this.DAYS_PER_ISLAMIC_YEAR=354.3666666666667,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(e,t){let n={year:e.year,month:1,monthCode:`M01`,day:1},r={year:e.year+1,month:1,monthCode:`M01`,day:1};return this.calendarDaysUntil(n,r,t)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(e){let{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}}},ga=class extends ha{constructor(){super(...arguments),this.id=`islamic`}},_a=class extends ha{constructor(){super(...arguments),this.id=`islamic-umalqura`}},va=class extends ha{constructor(){super(...arguments),this.id=`islamic-tbla`}},ya=class extends ha{constructor(){super(...arguments),this.id=`islamic-civil`}},ba=class extends ha{constructor(){super(...arguments),this.id=`islamic-rgsa`}},xa=class extends ha{constructor(){super(...arguments),this.id=`islamicc`}},Sa=class extends pa{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){let{month:t}=e;return t===12?29:t<=6?31:30}maximumMonthLength(e){let{month:t}=e;return t===12?30:t<=6?31:30}maxLengthOfMonthCodeInAnyYear(e){return sa(e)<=6?31:30}estimateIsoDate(e){let{year:t}=this.adjustCalendarDate(e);return{year:t+621,month:1,day:1}}},Ca=class extends pa{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 wa(e.year+78)}monthsInYear(){return 12}minimumMonthLength(e){return this.getMonthInfo(e).length}maximumMonthLength(e){return this.getMonthInfo(e).length}maxLengthOfMonthCodeInAnyYear(e){let t=sa(e),n=this.months[t];return n=n.leap??n,n.length}getMonthInfo(e){let{month:t}=e,n=this.months[t];if(n===void 0)throw RangeError(`Invalid month: ${t}`);return this.inLeapYear(e)&&n.leap&&(n=n.leap),n}estimateIsoDate(e){let t=this.adjustCalendarDate(e),n=this.getMonthInfo(t);return Rr(t.year+78+ +!!n.nextYear,n.month,n.day+t.day-1)}checkIcuBugs(e){if(this.vulnerableToBceBug&&e.year<1)throw 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 wa(e){return e%4==0&&(e%100!=0||e%400==0)}var Ta=class extends pa{constructor(e,t){super(),this.calendarType=`solar`,this.id=e,this.isoEpoch=t}inLeapYear(e){let{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return wa(t)}monthsInYear(){return 12}minimumMonthLength(e){let{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][sa(e)-1]}estimateIsoDate(e){let t=this.adjustCalendarDate(e);return Jt(t.year+this.isoEpoch.year,t.month+this.isoEpoch.month,t.day+this.isoEpoch.day,`constrain`)}},Ea=class extends pa{constructor(e,t){super(),this.hasEra=!0,this.calendarType=`solar`,this.id=e;let{eras:n,anchorEra:r}=function(e){let t,n=e;if(n.length===0)throw RangeError(`Invalid era data: eras are required`);if(n.length===1&&n[0].reverseOf)throw RangeError(`Invalid era data: anchor era cannot count years backwards`);if(n.length===1&&!n[0].code)throw RangeError(`Invalid era data: at least one named era is required`);if(n.filter((e=>e.reverseOf!=null)).length>1)throw RangeError(`Invalid era data: only one era can count years backwards`);n.forEach((e=>{if(e.isAnchor||!e.anchorEpoch&&!e.reverseOf){if(t)throw RangeError(`Invalid era data: cannot have multiple anchor eras`);t=e,e.anchorEpoch={year:+!e.hasYearZero}}else if(!e.code)throw RangeError(`If era name is blank, it must be the anchor era`)})),n=n.filter((e=>e.code)),n.forEach((e=>{let{reverseOf:t}=e;if(t){let r=n.find((e=>e.code===t));if(r===void 0)throw RangeError(`Invalid era data: unmatched reverseOf era: ${t}`);e.reverseOf=r,e.anchorEpoch=r.anchorEpoch,e.isoEpoch=r.isoEpoch}e.anchorEpoch.month===void 0&&(e.anchorEpoch.month=1),e.anchorEpoch.day===void 0&&(e.anchorEpoch.day=1)})),n.sort(((e,t)=>{if(e.reverseOf)return 1;if(t.reverseOf)return-1;if(!e.isoEpoch||!t.isoEpoch)throw RangeError(`Invalid era data: missing ISO epoch`);return t.isoEpoch.year-e.isoEpoch.year}));let r=n[n.length-1].reverseOf;if(r&&r!==n[n.length-2])throw RangeError(`Invalid era data: invalid reverse-sign era`);return n.forEach(((e,t)=>{e.genericName=`era`+(n.length-1-t)})),{eras:n,anchorEra:t||n[0]}}(t);this.anchorEra=r,this.eras=n}inLeapYear(e){let{year:t}=this.estimateIsoDate({month:1,day:1,year:e.year});return wa(t)}monthsInYear(){return 12}minimumMonthLength(e){let{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][sa(e)-1]}completeEraYear(e){let t=(t,n,r)=>{let i=e[t];if(i!=null&&i!=n&&!(r||[]).includes(i)){let e=r?.[0];throw RangeError(`Input ${t} ${i} doesn't match calculated value ${e?`${n} (also called ${e})`:n}`)}},n=t=>{let n,r={...e,year:t},i=this.eras.find(((e,i)=>{if(i===this.eras.length-1){if(e.reverseOf){if(t>0)throw RangeError(`Signed year ${t} is invalid for era ${e.code}`);return n=e.anchorEpoch.year-t,!0}return n=t-e.anchorEpoch.year+ +!e.hasYearZero,!0}return this.compareCalendarDates(r,e.anchorEpoch)>=0&&(n=t-e.anchorEpoch.year+ +!e.hasYearZero,!0)}));if(!i)throw RangeError(`Year ${t} was not matched by any era`);return{eraYear:n,era:i.code,eraNames:i.names}},{year:r,eraYear:i,era:a}=e;if(r!=null){let e=n(r);({eraYear:i,era:a}=e),t(`era`,a,e?.eraNames),t(`eraYear`,i)}else{if(i==null)throw RangeError(`Either year or eraYear and era are required`);{if(a===void 0)throw RangeError(`era and eraYear must be provided together`);let e=this.eras.find((({code:e,names:t=[]})=>e===a||t.includes(a)));if(!e)throw RangeError(`Era ${a} (ISO year ${i}) was not matched by any era`);r=e.reverseOf?e.anchorEpoch.year-i:i+e.anchorEpoch.year-+!e.hasYearZero,t(`year`,r),{eraYear:i,era:a}=n(r)}}return{...e,year:r,eraYear:i,era:a}}adjustCalendarDate(e,t,n=`constrain`){let r=e,{month:i,monthCode:a}=r;return i===void 0&&(r={...r,month:sa(a)}),this.validateCalendarDate(r),r=this.completeEraYear(r),super.adjustCalendarDate(r,t,n)}estimateIsoDate(e){let{year:t,month:n,day:r}=this.adjustCalendarDate(e),{anchorEra:i}=this;return Jt(t+i.isoEpoch.year-+!i.hasYearZero,n,r,`constrain`)}},Da=class extends Ea{constructor(e,t){super(e,t)}isoToCalendarDate(e){let{year:t,month:n,day:r}=e,i=ca(n),a=t-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:n,monthCode:i,day:r})}},Oa={inLeapYear(e){let{year:t}=e;return(t+1)%4==0},monthsInYear:()=>13,minimumMonthLength(e){let{month:t}=e;return t===13?this.inLeapYear(e)?6:5:30},maximumMonthLength(e){return this.minimumMonthLength(e)},maxLengthOfMonthCodeInAnyYear:e=>e===`M13`?6:30},ka=class extends Ta{constructor(e,t){super(e,t),this.inLeapYear=Oa.inLeapYear,this.monthsInYear=Oa.monthsInYear,this.minimumMonthLength=Oa.minimumMonthLength,this.maximumMonthLength=Oa.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=Oa.maxLengthOfMonthCodeInAnyYear}},Aa=class extends Ea{constructor(e,t){super(e,t),this.inLeapYear=Oa.inLeapYear,this.monthsInYear=Oa.monthsInYear,this.minimumMonthLength=Oa.minimumMonthLength,this.maximumMonthLength=Oa.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=Oa.maxLengthOfMonthCodeInAnyYear}},ja=class extends ka{constructor(){super(`ethioaa`,{year:-5492,month:7,day:17})}},Ma=class extends Aa{constructor(){super(`coptic`,[{code:`coptic`,isoEpoch:{year:284,month:8,day:29}},{code:`coptic-inverse`,reverseOf:`coptic`}])}},Na=class extends Aa{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}}])}},Pa=class extends Da{constructor(){super(`roc`,[{code:`roc`,names:[`minguo`],isoEpoch:{year:1912,month:1,day:1}},{code:`roc-inverse`,names:[`before-roc`],reverseOf:`roc`}])}},Fa=class extends Ta{constructor(){super(`buddhist`,{year:-543,month:1,day:1})}},Ia=class extends Da{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:n}=e;return t===`b`&&(t=`gregory-inverse`),t===`a`&&(t=`gregory`),{era:t,eraYear:n}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}},La=class extends Da{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){let{era:n,eraYear:r}=e,{year:i}=t;return this.eras.find((e=>e.code===n))?{era:n,eraYear:r}:i<1?{era:`japanese-inverse`,eraYear:1-i}:{era:`japanese`,eraYear:i}}},Ra=class extends pa{constructor(){super(...arguments),this.calendarType=`lunisolar`}inLeapYear(e,t){let n=this.getMonthList(e.year,t);return Object.entries(n).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){let n={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?n[0]:n[1]}getMonthList(e,t){if(e===void 0)throw TypeError(`Missing year`);let n=JSON.stringify({func:`getMonthList`,calendarYear:e,id:this.id}),r=t.get(n);if(r)return r;let i=this.getFormatter(),a=(e,t)=>{let n=da({isoYear:e,isoMonth:2,isoDay:1}),r=new Date(n);r.setUTCDate(t+1);let a=i.formatToParts(r),o=a.find((e=>e.type===`month`)).value,s=+a.find((e=>e.type===`day`)).value,c=a.find((e=>e.type===`relatedYear`)),l;if(c===void 0)throw RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return l=+c.value,{calendarMonthString:o,calendarDay:s,calendarYearToVerify:l}},o=17,{calendarMonthString:s,calendarDay:c,calendarYearToVerify:l}=a(e,o);s!==`1`&&(o+=29,{calendarMonthString:s,calendarDay:c}=a(e,o)),o-=c-5;let u={},d,f,p=1,m=!1;do({calendarMonthString:s,calendarDay:c,calendarYearToVerify:l}=a(e,o)),d&&(u[f].daysInMonth=d+30-c),l===e?(u[s]={monthIndex:p++},o+=30):m=!0,d=c,f=s;while(!m);return u[f].daysInMonth=d+30-c,t.set(n,u),u}estimateIsoDate(e){let{year:t,month:n}=e;return{year:t,month:n>=12?12:n+1,day:1}}adjustCalendarDate(e,t,n=`constrain`,r=!1){let{year:i,month:a,monthExtra:o,day:s,monthCode:c}=e;if(i===void 0)throw TypeError(`Missing property: year`);if(r){if(o&&o!==`bis`)throw RangeError(`Unexpected leap month suffix: ${o}`);let e=ca(a,o!==void 0),n=`${a}${o||``}`,r=this.getMonthList(i,t)[n];if(r===void 0)throw RangeError(`Unmatched month ${n} in Chinese year ${i}`);return a=r.monthIndex,{year:i,month:a,day:s,monthCode:e}}if(this.validateCalendarDate(e),a===void 0){let e=this.getMonthList(i,t),r=c.replace(/^M|L$/g,(e=>e===`L`?`bis`:``));r[0]===`0`&&(r=r.slice(1));let o=e[r];if(a=o&&o.monthIndex,a===void 0&&c.endsWith(`L`)&&c!=`M13L`&&n===`constrain`){let t=+c.replace(/^M0?|L$/g,``);o=e[t],o&&(a=o.monthIndex,c=ca(t))}if(a===void 0)throw RangeError(`Unmatched month ${c} in Chinese year ${i}`)}else if(c===void 0){let e=this.getMonthList(i,t),r=Object.entries(e),o=r.length;n===`reject`?(Q(a,1,o),Q(s,1,this.maximumMonthLength())):(a=Ur(a,1,o),s=Ur(s,1,this.maximumMonthLength()));let l=r.find((e=>e[1].monthIndex===a));if(l===void 0)throw RangeError(`Invalid month ${a} in Chinese year ${i}`);c=ca(+l[0].replace(`bis`,``),l[0].indexOf(`bis`)!==-1)}else{let e=this.getMonthList(i,t),n=c.replace(/^M|L$/g,(e=>e===`L`?`bis`:``));n[0]===`0`&&(n=n.slice(1));let r=e[n];if(!r)throw RangeError(`Unmatched monthCode ${c} in Chinese year ${i}`);if(a!==r.monthIndex)throw RangeError(`monthCode ${c} doesn't correspond to month ${a} in Chinese year ${i}`)}return{...e,year:i,month:a,monthCode:c,day:s}}},za=class extends Ra{constructor(){super(...arguments),this.id=`chinese`}},Ba=class extends Ra{constructor(){super(...arguments),this.id=`dangi`}},Va=class{constructor(e){this.helper=e}extraFields(e){return this.helper.hasEra&&e.includes(`year`)?[`era`,`eraYear`]:[]}resolveFields(e){if(this.helper.calendarType!==`lunisolar`){let t=new ua;la(e,void 0,this.helper.monthsInYear({year:e.year??1972},t))}}dateToISO(e,t){let n=new ua,r=this.helper.calendarToIsoDate(e,t,n);return n.setObject(r),r}monthDayToISOReferenceDate(e,t){let n=new ua,r=this.helper.monthDayFromFields(e,t,n);return n.setObject(r),r}fieldKeysToIgnore(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];switch(t.add(r),r){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 ra(t)}dateAdd(e,{years:t,months:n,weeks:r,days:i},a){let o=ua.getCacheForObject(e),s=this.helper.isoToCalendarDate(e,o),c=this.helper.addCalendar(s,{years:t,months:n,weeks:r,days:i},a,o),l=this.helper.calendarToIsoDate(c,`constrain`,o);return ua.getCacheForObject(l)||new ua(o).setObject(l),l}dateUntil(e,t,n){let r=ua.getCacheForObject(e),i=ua.getCacheForObject(t),a=this.helper.isoToCalendarDate(e,r),o=this.helper.isoToCalendarDate(t,i);return this.helper.untilCalendar(a,o,n,r)}isoToDate(e,t){let n=ua.getCacheForObject(e),r=this.helper.isoToCalendarDate(e,n);if(t.dayOfWeek&&(r.dayOfWeek=oa.iso8601.isoToDate(e,{dayOfWeek:!0}).dayOfWeek),t.dayOfYear){let e=this.helper.startOfCalendarYear(r);r.dayOfYear=this.helper.calendarDaysUntil(e,r,n)+1}if(t.weekOfYear&&(r.weekOfYear=ia(this.helper.id,e)),r.daysInWeek=7,t.daysInMonth&&(r.daysInMonth=this.helper.daysInMonth(r,n)),t.daysInYear){let e=this.helper.startOfCalendarYear(r),t=this.helper.addCalendar(e,{years:1},`constrain`,n);r.daysInYear=this.helper.calendarDaysUntil(e,t,n)}return t.monthsInYear&&(r.monthsInYear=this.helper.monthsInYear(r,n)),t.inLeapYear&&(r.inLeapYear=this.helper.inLeapYear(r,n)),r}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}};for(let e of[ma,Sa,Na,ja,Ma,za,Ba,Pa,Ca,Fa,Ia,La,ga,_a,va,ya,ba,xa]){let t=new e;oa[t.id]=new Va(t)}Ie(`calendarImpl`,(function(e){return oa[e]}));var Ha=Intl.DateTimeFormat;function Ua(e,t){let n=j(e,t);return typeof n==`function`&&(n=new Ha(j(e,De),n(j(e,Oe))),function(e,t,n){let r=je(e);if(r===void 0)throw TypeError(`Missing slots for the given container`);if(r[t]===void 0)throw TypeError(`tried to reset ${t} which was not set`);r[t]=n}(e,t,n)),n}function Wa(e){return A(e,Ce)}var Ga=class{constructor(e=void 0,t=void 0){(function(e,t,n){let r=n!==void 0,i;if(r){let e=[`localeMatcher`,`calendar`,`numberingSystem`,`hour12`,`hourCycle`,`timeZone`,`weekday`,`era`,`year`,`month`,`day`,`dayPeriod`,`hour`,`minute`,`second`,`fractionalSecondDigits`,`timeZoneName`,`formatMatcher`,`dateStyle`,`timeStyle`];i=function(e){if(e==null)throw TypeError(`Expected object not ${e}`);return Object(e)}(n);let t=Object.create(null);for(let n=0;n<e.length;n++){let r=e[n];Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}i=t}else i=Object.create(null);let a=new Ha(t,i),o=a.resolvedOptions();if(Ne(e),r){let t=Object.assign(Object.create(null),o);for(let e in t)Object.prototype.hasOwnProperty.call(i,e)||delete t[e];t.hour12=i.hour12,t.hourCycle=i.hourCycle,M(e,Oe,t)}else M(e,Oe,i);M(e,De,o.locale),M(e,Ce,a),M(e,we,o.timeZone),M(e,Ee,o.calendar),M(e,_e,no),M(e,ve,eo),M(e,ye,to),M(e,be,$a),M(e,xe,ro),M(e,Se,io);let s=r?i.timeZone:void 0;if(s===void 0)M(e,Te,o.timeZone);else{let t=yt(s);if(t.startsWith(`−`))throw RangeError(`Unicode minus (U+2212) is not supported in time zone offsets`);M(e,Te,Qn(t))}})(this,e,t)}get format(){G(this,Wa);let e=Ja.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 G(this,Wa),Xa.call(this,e,t)}formatToParts(e,...t){return G(this,Wa),Ya.call(this,e,...t)}formatRangeToParts(e,t){return G(this,Wa),Za.call(this,e,t)}resolvedOptions(){return G(this,Wa),qa.call(this)}};`formatToParts`in Ha.prototype||delete Ga.prototype.formatToParts,`formatRangeToParts`in Ha.prototype||delete Ga.prototype.formatRangeToParts;var Ka=function(e=void 0,t=void 0){return new Ga(e,t)};function qa(){let e=j(this,Ce).resolvedOptions();return e.timeZone=j(this,Te),e}function Ja(e,...t){let n,r,i=fo(e,this);return i.formatter?(n=i.formatter,r=[Ui(i.epochNs,`floor`)]):(n=j(this,Ce),r=[e,...t]),n.format(...r)}function Ya(e,...t){let n,r,i=fo(e,this);return i.formatter?(n=i.formatter,r=[Ui(i.epochNs,`floor`)]):(n=j(this,Ce),r=[e,...t]),n.formatToParts(...r)}function Xa(e,t){if(e===void 0||t===void 0)throw TypeError(`Intl.DateTimeFormat.formatRange requires two values`);let n=lo(e),r=lo(t),i,a=[n,r];if(co(n)!==co(r))throw TypeError(`Intl.DateTimeFormat.formatRange accepts two values of the same type`);if(co(n)){if(!uo(n,r))throw TypeError(`Intl.DateTimeFormat.formatRange accepts two values of the same type`);let{epochNs:e,formatter:t}=fo(n,this),{epochNs:o,formatter:s}=fo(r,this);t&&(i=t,a=[Ui(e,`floor`),Ui(o,`floor`)])}return i||=j(this,Ce),i.formatRange(...a)}function Za(e,t){if(e===void 0||t===void 0)throw TypeError(`Intl.DateTimeFormat.formatRange requires two values`);let n=lo(e),r=lo(t),i,a=[n,r];if(co(n)!==co(r))throw TypeError(`Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type`);if(co(n)){if(!uo(n,r))throw TypeError(`Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type`);let{epochNs:e,formatter:t}=fo(n,this),{epochNs:o,formatter:s}=fo(r,this);t&&(i=t,a=[Ui(e,`floor`),Ui(o,`floor`)])}return i||=j(this,Ce),i.formatRangeToParts(...a)}function Qa(e={},t={}){let n=Object.assign({},e),r=[`year`,`month`,`day`,`hour`,`minute`,`second`,`weekday`,`dayPeriod`,`timeZoneName`,`dateStyle`,`timeStyle`];for(let e=0;e<r.length;e++){let i=r[e];n[i]=i in t?t[i]:n[i],!1!==n[i]&&n[i]!==void 0||delete n[i]}return n}function $a(e){let t=Qa(e,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(t.timeStyle!==`long`&&t.timeStyle!==`full`||(delete t.timeStyle,Object.assign(t,{hour:`numeric`,minute:`2-digit`,second:`2-digit`})),!oo(t)){if(so(e))throw TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(e)}]`);Object.assign(t,{hour:`numeric`,minute:`numeric`,second:`numeric`})}return t}function eo(e){let t={short:{year:`2-digit`,month:`numeric`},medium:{year:`numeric`,month:`short`},long:{year:`numeric`,month:`long`},full:{year:`numeric`,month:`long`}},n=Qa(e,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(`dateStyle`in n&&n.dateStyle){let e=n.dateStyle;delete n.dateStyle,Object.assign(n,t[e])}if(!(`year`in n||`month`in n||`era`in n)){if(so(e))throw TypeError(`cannot format PlainYearMonth with options [${Object.keys(e)}]`);Object.assign(n,{year:`numeric`,month:`numeric`})}return n}function to(e){let t={short:{month:`numeric`,day:`numeric`},medium:{month:`short`,day:`numeric`},long:{month:`long`,day:`numeric`},full:{month:`long`,day:`numeric`}},n=Qa(e,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(`dateStyle`in n&&n.dateStyle){let e=n.dateStyle;delete n.dateStyle,Object.assign(n,t[e])}if(!(`month`in n)&&!(`day`in n)){if(so(e))throw TypeError(`cannot format PlainMonthDay with options [${Object.keys(e)}]`);Object.assign(n,{month:`numeric`,day:`numeric`})}return n}function no(e){let t=Qa(e,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!ao(t)){if(so(e))throw TypeError(`cannot format PlainDate with options [${Object.keys(e)}]`);Object.assign(t,{year:`numeric`,month:`numeric`,day:`numeric`})}return t}function ro(e){let t=Qa(e,{timeZoneName:!1});if((t.timeStyle===`long`||t.timeStyle===`full`)&&(delete t.timeStyle,Object.assign(t,{hour:`numeric`,minute:`2-digit`,second:`2-digit`}),t.dateStyle)&&(Object.assign(t,{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`}}[t.dateStyle]),delete t.dateStyle),!oo(t)&&!ao(t)){if(so(e))throw TypeError(`cannot format PlainDateTime with options [${Object.keys(e)}]`);Object.assign(t,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`})}return t}function io(e){let t=e;return oo(t)||ao(t)||(t=Object.assign({},t,{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`})),t}function ao(e){return`year`in e||`month`in e||`day`in e||`weekday`in e||`dateStyle`in e||`era`in e}function oo(e){return`hour`in e||`minute`in e||`second`in e||`timeStyle`in e||`dayPeriod`in e||`fractionalSecondDigits`in e}function so(e){return ao(e)||oo(e)||`dateStyle`in e||`timeStyle`in e||`timeZoneName`in e}function co(e){return B(e)||V(e)||H(e)||W(e)||U(e)||It(e)||R(e)}function lo(e){return co(e)?e:vt(e)}function uo(e,t){return!(!co(e)||!co(t)||V(e)&&!V(t)||B(e)&&!B(t)||H(e)&&!H(t)||W(e)&&!W(t)||U(e)&&!U(t)||It(e)&&!It(t)||R(e)&&!R(t))}function fo(e,t){if(V(e)){let n={isoDate:{year:1970,month:1,day:1},time:j(e,D)};return{epochNs:X(j(t,we),n,`compatible`),formatter:Ua(t,be)}}if(U(e)){let n=j(e,O),r=j(t,Ee);if(n!==r)throw RangeError(`cannot format PlainYearMonth with calendar ${n} in locale with calendar ${r}`);let i=q(j(e,T),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:X(j(t,we),i,`compatible`),formatter:Ua(t,ve)}}if(It(e)){let n=j(e,O),r=j(t,Ee);if(n!==r)throw RangeError(`cannot format PlainMonthDay with calendar ${n} in locale with calendar ${r}`);let i=q(j(e,T),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:X(j(t,we),i,`compatible`),formatter:Ua(t,ye)}}if(B(e)){let n=j(e,O),r=j(t,Ee);if(n!==`iso8601`&&n!==r)throw RangeError(`cannot format PlainDate with calendar ${n} in locale with calendar ${r}`);let i=q(j(e,T),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:X(j(t,we),i,`compatible`),formatter:Ua(t,_e)}}if(H(e)){let n=j(e,O),r=j(t,Ee);if(n!==`iso8601`&&n!==r)throw RangeError(`cannot format PlainDateTime with calendar ${n} in locale with calendar ${r}`);let i=j(e,E);return{epochNs:X(j(t,we),i,`compatible`),formatter:Ua(t,xe)}}if(W(e))throw TypeError(`Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.`);return R(e)?{epochNs:j(e,w),formatter:Ua(t,Se)}:{}}function po(e){let t=Object.create(null);return t.years=j(e,se),t.months=j(e,ce),t.weeks=j(e,le),t.days=j(e,ue),t.hours=j(e,de),t.minutes=j(e,fe),t.seconds=j(e,pe),t.milliseconds=j(e,me),t.microseconds=j(e,he),t.nanoseconds=j(e,ge),t}Ga.prototype.constructor=Ka,Object.defineProperty(Ka,"prototype",{value:Ga.prototype,writable:!1,enumerable:!1,configurable:!1}),Ka.supportedLocalesOf=Ha.supportedLocalesOf,Fe(Ka,`Intl.DateTimeFormat`);var{format:mo,formatToParts:ho}=Intl.DurationFormat?.prototype??Object.create(null);function go(e){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=po(xn(e));return mo.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=go,Intl.DurationFormat.prototype.formatToParts=function(e){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=po(xn(e));return ho.call(this,t)}),Object.freeze({__proto__:null,DateTimeFormat:Ka,ModifiedIntlDurationFormatPrototypeFormat:go});var _o=class{constructor(e){if(arguments.length<1)throw TypeError(`missing argument: epochNanoseconds is required`);zn(this,Gi(e))}get epochMilliseconds(){return G(this,R),Ui(j(this,w),`floor`)}get epochNanoseconds(){return G(this,R),Hi(c.default.BigInt(j(this,w)))}add(e){return G(this,R),Di(`add`,this,e)}subtract(e){return G(this,R),Di(`subtract`,this,e)}until(e,t=void 0){return G(this,R),_i(`until`,this,e,t)}since(e,t=void 0){return G(this,R),_i(`since`,this,e,t)}round(e){if(G(this,R),e===void 0)throw TypeError(`options parameter is required`);let t=typeof e==`string`?Yi(`smallestUnit`,e):$(e),n=tn(t),r=Qt(t,`halfExpand`),i=sn(t,`smallestUnit`,`time`,on);return nn(n,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[i],!0),Bn(Pi(j(this,w),n,i,r))}equals(e){G(this,R);let t=Sn(e),n=j(this,w),r=j(t,w);return c.default.equal(c.default.BigInt(n),c.default.BigInt(r))}toString(e=void 0){G(this,R);let t=$(e),n=rn(t),r=Qt(t,`trunc`),i=sn(t,`smallestUnit`,`time`,void 0);if(i===`hour`)throw RangeError(`smallestUnit must be a time unit other than "hour"`);let a=t.timeZone;a!==void 0&&(a=Qn(a));let{precision:o,unit:s,increment:c}=an(i,n);return ur(Bn(Pi(j(this,w),c,s,r)),a,o)}toJSON(){return G(this,R),ur(this,void 0,`auto`)}toLocaleString(e=void 0,t=void 0){return G(this,R),new Ka(e,t).format(this)}valueOf(){$i(`Instant`)}toZonedDateTimeISO(e){G(this,R);let t=Qn(e);return Y(j(this,w),t,`iso8601`)}static fromEpochMilliseconds(e){return Bn(Wi(vt(e)))}static fromEpochNanoseconds(e){return Bn(Gi(e))}static from(e){return Sn(e)}static compare(e,t){let n=Sn(e),r=Sn(t),i=j(n,w),a=j(r,w);return c.default.lessThan(i,a)?-1:+!!c.default.greaterThan(i,a)}};Fe(_o,`Temporal.Instant`);var vo=class{constructor(e,t,n,r=`iso8601`){let i=I(e),a=I(t),o=I(n),s=Zi(r===void 0?`iso8601`:L(r));Gr(i,a,o),kn(this,{year:i,month:a,day:o},s)}get calendarId(){return G(this,B),j(this,O)}get era(){return yo(this,`era`)}get eraYear(){return yo(this,`eraYear`)}get year(){return yo(this,`year`)}get month(){return yo(this,`month`)}get monthCode(){return yo(this,`monthCode`)}get day(){return yo(this,`day`)}get dayOfWeek(){return yo(this,`dayOfWeek`)}get dayOfYear(){return yo(this,`dayOfYear`)}get weekOfYear(){return yo(this,`weekOfYear`)?.week}get yearOfWeek(){return yo(this,`weekOfYear`)?.year}get daysInWeek(){return yo(this,`daysInWeek`)}get daysInMonth(){return yo(this,`daysInMonth`)}get daysInYear(){return yo(this,`daysInYear`)}get monthsInYear(){return yo(this,`monthsInYear`)}get inLeapYear(){return yo(this,`inLeapYear`)}with(e,t=void 0){if(G(this,B),!F(e))throw TypeError(`invalid argument`);Lt(e);let n=j(this,O),r=hn(n,j(this,T));return r=Un(n,r,gn(n,e,[`year`,`month`,`monthCode`,`day`],[],`partial`)),An(Yn(n,r,J($(t))),n)}withCalendar(e){G(this,B);let t=Kn(e);return An(j(this,T),t)}add(e,t=void 0){return G(this,B),Oi(`add`,this,e,t)}subtract(e,t=void 0){return G(this,B),Oi(`subtract`,this,e,t)}until(e,t=void 0){return G(this,B),vi(`until`,this,e,t)}since(e,t=void 0){return G(this,B),vi(`since`,this,e,t)}equals(e){G(this,B);let t=vn(e);return zi(j(this,T),j(t,T))===0&&Jn(j(this,O),j(t,O))}toString(e=void 0){return G(this,B),fr(this,en($(e)))}toJSON(){return G(this,B),fr(this)}toLocaleString(e=void 0,t=void 0){return G(this,B),new Ka(e,t).format(this)}valueOf(){$i(`PlainDate`)}toPlainDateTime(e=void 0){G(this,B);let t=Tn(e);return Mn(q(j(this,T),t),j(this,O))}toZonedDateTime(e){let t,n;if(G(this,B),F(e)){let r=e.timeZone;r===void 0?t=Qn(e):(t=Qn(r),n=e.plainTime)}else t=Qn(e);let r=j(this,T),i;return n===void 0?i=ar(t,r):(n=wn(n),i=X(t,q(r,j(n,D)),`compatible`)),Y(i,t,j(this,O))}toPlainYearMonth(){G(this,B);let e=j(this,O);return Rn(Xn(e,hn(e,j(this,T)),`constrain`),e)}toPlainMonthDay(){G(this,B);let e=j(this,O);return Pn(Zn(e,hn(e,j(this,T)),`constrain`),e)}static from(e,t=void 0){return vn(e,t)}static compare(e,t){let n=vn(e),r=vn(t);return zi(j(n,T),j(r,T))}};function yo(e,t){G(e,B);let n=j(e,T);return mn(e).isoToDate(n,{[t]:!0})[t]}Fe(vo,`Temporal.PlainDate`);var bo=class{constructor(e,t,n,r=0,i=0,a=0,o=0,s=0,c=0,l=`iso8601`){let u=I(e),d=I(t),f=I(n),p=r===void 0?0:I(r),m=i===void 0?0:I(i),h=a===void 0?0:I(a),g=o===void 0?0:I(o),_=s===void 0?0:I(s),v=c===void 0?0:I(c),y=Zi(l===void 0?`iso8601`:L(l));Jr(u,d,f,p,m,h,g,_,v),jn(this,{isoDate:{year:u,month:d,day:f},time:{hour:p,minute:m,second:h,millisecond:g,microsecond:_,nanosecond:v}},y)}get calendarId(){return G(this,H),j(this,O)}get year(){return xo(this,`year`)}get month(){return xo(this,`month`)}get monthCode(){return xo(this,`monthCode`)}get day(){return xo(this,`day`)}get hour(){return So(this,`hour`)}get minute(){return So(this,`minute`)}get second(){return So(this,`second`)}get millisecond(){return So(this,`millisecond`)}get microsecond(){return So(this,`microsecond`)}get nanosecond(){return So(this,`nanosecond`)}get era(){return xo(this,`era`)}get eraYear(){return xo(this,`eraYear`)}get dayOfWeek(){return xo(this,`dayOfWeek`)}get dayOfYear(){return xo(this,`dayOfYear`)}get weekOfYear(){return xo(this,`weekOfYear`)?.week}get yearOfWeek(){return xo(this,`weekOfYear`)?.year}get daysInWeek(){return xo(this,`daysInWeek`)}get daysInYear(){return xo(this,`daysInYear`)}get daysInMonth(){return xo(this,`daysInMonth`)}get monthsInYear(){return xo(this,`monthsInYear`)}get inLeapYear(){return xo(this,`inLeapYear`)}with(e,t=void 0){if(G(this,H),!F(e))throw TypeError(`invalid argument`);Lt(e);let n=j(this,O),r=j(this,E),i={...hn(n,r.isoDate),...r.time};return i=Un(n,i,gn(n,e,[`year`,`month`,`monthCode`,`day`],[`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`],`partial`)),Mn(yn(n,i,J($(t))),n)}withPlainTime(e=void 0){G(this,H);let t=Tn(e);return Mn(q(j(this,E).isoDate,t),j(this,O))}withCalendar(e){G(this,H);let t=Kn(e);return Mn(j(this,E),t)}add(e,t=void 0){return G(this,H),ki(`add`,this,e,t)}subtract(e,t=void 0){return G(this,H),ki(`subtract`,this,e,t)}until(e,t=void 0){return G(this,H),yi(`until`,this,e,t)}since(e,t=void 0){return G(this,H),yi(`since`,this,e,t)}round(e){if(G(this,H),e===void 0)throw TypeError(`options parameter is required`);let t=typeof e==`string`?Yi(`smallestUnit`,e):$(e),n=tn(t),r=Qt(t,`halfExpand`),i=sn(t,`smallestUnit`,`time`,on,[`day`]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];nn(n,a,a===1);let o=j(this,E);return Mn(n===1&&i===`nanosecond`?o:Fi(o,n,i,r),j(this,O))}equals(e){G(this,H);let t=bn(e);return Vi(j(this,E),j(t,E))===0&&Jn(j(this,O),j(t,O))}toString(e=void 0){G(this,H);let t=$(e),n=en(t),r=rn(t),i=Qt(t,`trunc`),a=sn(t,`smallestUnit`,`time`,void 0);if(a===`hour`)throw RangeError(`smallestUnit must be a time unit other than "hour"`);let{precision:o,unit:s,increment:c}=an(a,r),l=Fi(j(this,E),c,s,i);return Yr(l),mr(l,j(this,O),o,n)}toJSON(){return G(this,H),mr(j(this,E),j(this,O),`auto`)}toLocaleString(e=void 0,t=void 0){return G(this,H),new Ka(e,t).format(this)}valueOf(){$i(`PlainDateTime`)}toZonedDateTime(e,t=void 0){G(this,H);let n=Qn(e),r=Zt($(t));return Y(X(n,j(this,E),r),n,j(this,O))}toPlainDate(){return G(this,H),An(j(this,E).isoDate,j(this,O))}toPlainTime(){return G(this,H),In(j(this,E).time)}static from(e,t=void 0){return bn(e,t)}static compare(e,t){let n=bn(e),r=bn(t);return Vi(j(n,E),j(r,E))}};function xo(e,t){G(e,H);let n=j(e,E).isoDate;return mn(e).isoToDate(n,{[t]:!0})[t]}function So(e,t){return G(e,H),j(e,E).time[t]}Fe(bo,`Temporal.PlainDateTime`);var Co=class e{constructor(e=0,t=0,n=0,r=0,i=0,a=0,o=0,s=0,c=0,l=0){let u=e===void 0?0:xt(e),d=t===void 0?0:xt(t),f=n===void 0?0:xt(n),p=r===void 0?0:xt(r),m=i===void 0?0:xt(i),h=a===void 0?0:xt(a),g=o===void 0?0:xt(o),_=s===void 0?0:xt(s),v=c===void 0?0:xt(c),y=l===void 0?0:xt(l);$r(u,d,f,p,m,h,g,_,v,y),Ne(this),M(this,se,u),M(this,ce,d),M(this,le,f),M(this,ue,p),M(this,de,m),M(this,fe,h),M(this,pe,g),M(this,me,_),M(this,he,v),M(this,ge,y)}get years(){return G(this,z),j(this,se)}get months(){return G(this,z),j(this,ce)}get weeks(){return G(this,z),j(this,le)}get days(){return G(this,z),j(this,ue)}get hours(){return G(this,z),j(this,de)}get minutes(){return G(this,z),j(this,fe)}get seconds(){return G(this,z),j(this,pe)}get milliseconds(){return G(this,z),j(this,me)}get microseconds(){return G(this,z),j(this,he)}get nanoseconds(){return G(this,z),j(this,ge)}get sign(){return G(this,z),Pr(this)}get blank(){return G(this,z),Pr(this)===0}with(t){G(this,z);let{years:n=j(this,se),months:r=j(this,ce),weeks:i=j(this,le),days:a=j(this,ue),hours:o=j(this,de),minutes:s=j(this,fe),seconds:c=j(this,pe),milliseconds:l=j(this,me),microseconds:u=j(this,he),nanoseconds:d=j(this,ge)}=Xt(t);return new e(n,r,i,a,o,s,c,l,u,d)}negated(){return G(this,z),Hr(this)}abs(){return G(this,z),new e(Math.abs(j(this,se)),Math.abs(j(this,ce)),Math.abs(j(this,le)),Math.abs(j(this,ue)),Math.abs(j(this,de)),Math.abs(j(this,fe)),Math.abs(j(this,pe)),Math.abs(j(this,me)),Math.abs(j(this,he)),Math.abs(j(this,ge)))}add(e){return G(this,z),Ei(`add`,this,e)}subtract(e){return G(this,z),Ei(`subtract`,this,e)}round(e){if(G(this,z),e===void 0)throw TypeError(`options parameter is required`);let t=ln(this),n=typeof e==`string`?Yi(`smallestUnit`,e):$(e),r=sn(n,`largestUnit`,`datetime`,void 0,[`auto`]),{plainRelativeTo:i,zonedRelativeTo:a}=cn(n),o=tn(n),s=Qt(n,`halfExpand`),c=sn(n,`smallestUnit`,`datetime`,void 0),l=!0;c||=(l=!1,`nanosecond`);let u=un(t,c),d=!0;if(r||=(d=!1,u),r===`auto`&&(r=u),!l&&!d)throw RangeError(`at least one of smallestUnit or largestUnit is required`);if(un(r,c)!==r)throw RangeError(`largestUnit ${r} cannot be smaller than smallestUnit ${c}`);let f={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[c];if(f!==void 0&&nn(o,f,!1),o>1&&fn(c)===`date`&&r!==c)throw RangeError(`For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit`);if(a){let e=ei(this),t=j(a,k),n=j(a,O),i=j(a,w);return e=hi(i,Ti(i,t,n,e),t,n,r,o,c,s),fn(r)===`date`&&(r=`hour`),ri(e,r)}if(i){let e=ti(this),t=Ci({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},e.time),n=j(i,T),a=j(i,O),l=Wn(a,n,K(e.date,t.deltaDays),`constrain`);return e=mi(q(n,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),q(l,t),a,r,o,c,s),ri(e,r)}if(dn(t))throw RangeError(`a starting point is required for ${t}s balancing`);if(dn(r))throw RangeError(`a starting point is required for ${r}s balancing`);let p=ti(this);if(c===`day`){let{quotient:e,remainder:t}=p.time.divmod(at),n=p.date.days+e+Ri(t,`day`);n=Ni(n,o,s),p=ii({years:0,months:0,weeks:0,days:n},P.ZERO)}else p=ii({years:0,months:0,weeks:0,days:0},Li(p.time,o,c,s));return ri(p,r)}total(e){if(G(this,z),e===void 0)throw TypeError(`options argument is required`);let t=typeof e==`string`?Yi(`unit`,e):$(e),{plainRelativeTo:n,zonedRelativeTo:r}=cn(t),i=sn(t,`unit`,`datetime`,on);if(r){let e=ei(this),t=j(r,k),n=j(r,O),a=j(r,w);return function(e,t,n,r,i){return fn(i)===`time`?Ri(P.fromEpochNsDiff(t,e),i):pi(ui(e,t,n,r,i),t,nr(n,e),n,r,i)}(a,Ti(a,t,n,e),t,n,i)}if(n){let e=ti(this),t=Ci({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},e.time),r=j(n,T),a=j(n,O),o=Wn(a,r,K(e.date,t.deltaDays),`constrain`);return function(e,t,n,r){if(Vi(e,t)==0)return 0;Yr(e),Yr(t);let i=li(e,t,n,r);return r===`nanosecond`?c.default.toNumber(i.time.totalNs):pi(i,Z(t),e,null,n,r)}(q(r,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),q(o,t),a,i)}let a=ln(this);if(dn(a))throw RangeError(`a starting point is required for ${a}s total`);if(dn(i))throw RangeError(`a starting point is required for ${i}s total`);return Ri(ti(this).time,i)}toString(e=void 0){G(this,z);let t=$(e),n=rn(t),r=Qt(t,`trunc`),i=sn(t,`smallestUnit`,`time`,void 0);if(i===`hour`||i===`minute`)throw RangeError(`smallestUnit must be a time unit other than "hours" or "minutes"`);let{precision:a,unit:o,increment:s}=an(i,n);if(o===`nanosecond`&&s===1)return dr(this,a);let c=ln(this),l=ei(this),u=Li(l.time,s,o,r);return l=ii(l.date,u),dr(ri(l,un(c,`second`)),a)}toJSON(){return G(this,z),dr(this,`auto`)}toLocaleString(e=void 0,t=void 0){if(G(this,z),typeof Intl.DurationFormat==`function`){let n=new Intl.DurationFormat(e,t);return go.call(n,this)}return console.warn(`Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat.`),dr(this,`auto`)}valueOf(){$i(`Duration`)}static from(e){return xn(e)}static compare(e,t,n=void 0){let r=xn(e),i=xn(t),{plainRelativeTo:a,zonedRelativeTo:o}=cn($(n));if(j(r,se)===j(i,se)&&j(r,ce)===j(i,ce)&&j(r,le)===j(i,le)&&j(r,ue)===j(i,ue)&&j(r,de)===j(i,de)&&j(r,fe)===j(i,fe)&&j(r,pe)===j(i,pe)&&j(r,me)===j(i,me)&&j(r,he)===j(i,he)&&j(r,ge)===j(i,ge))return 0;let s=ln(r),l=ln(i),u=ei(r),d=ei(i);if(o&&(fn(s)===`date`||fn(l)===`date`)){let e=j(o,k),t=j(o,O),n=j(o,w),r=Ti(n,e,t,u),i=Ti(n,e,t,d);return Ji(c.default.toNumber(c.default.subtract(r,i)))}let f=u.date.days,p=d.date.days;if(dn(s)||dn(l)){if(!a)throw RangeError(`A starting point is required for years, months, or weeks comparison`);f=Vr(u.date,a),p=Vr(d.date,a)}let m=u.time.add24HourDays(f),h=d.time.add24HourDays(p);return m.cmp(h)}};Fe(Co,`Temporal.Duration`);var wo=class{constructor(e,t,n=`iso8601`,r=1972){let i=I(e),a=I(t),o=Zi(n===void 0?`iso8601`:L(n)),s=I(r);Gr(s,i,a),Nn(this,{year:s,month:i,day:a},o)}get monthCode(){return To(this,`monthCode`)}get day(){return To(this,`day`)}get calendarId(){return G(this,It),j(this,O)}with(e,t=void 0){if(G(this,It),!F(e))throw TypeError(`invalid argument`);Lt(e);let n=j(this,O),r=hn(n,j(this,T),`month-day`);return r=Un(n,r,gn(n,e,[`year`,`month`,`monthCode`,`day`],[],`partial`)),Pn(Zn(n,r,J($(t))),n)}equals(e){G(this,It);let t=Cn(e);return zi(j(this,T),j(t,T))===0&&Jn(j(this,O),j(t,O))}toString(e=void 0){return G(this,It),hr(this,en($(e)))}toJSON(){return G(this,It),hr(this)}toLocaleString(e=void 0,t=void 0){return G(this,It),new Ka(e,t).format(this)}valueOf(){$i(`PlainMonthDay`)}toPlainDate(e){if(G(this,It),!F(e))throw TypeError(`argument should be an object`);let t=j(this,O);return An(Yn(t,Un(t,hn(t,j(this,T),`month-day`),gn(t,e,[`year`],[],[])),`constrain`),t)}static from(e,t=void 0){return Cn(e,t)}};function To(e,t){G(e,It);let n=j(e,T);return mn(e).isoToDate(n,{[t]:!0})[t]}function Eo(e){return nr(e,Ki())}Fe(wo,`Temporal.PlainMonthDay`);var Do={instant:()=>Bn(Ki()),plainDateTimeISO:(e=qi())=>Mn(Eo(Qn(e)),`iso8601`),plainDateISO:(e=qi())=>An(Eo(Qn(e)).isoDate,`iso8601`),plainTimeISO:(e=qi())=>In(Eo(Qn(e)).time),timeZoneId:()=>qi(),zonedDateTimeISO:(e=qi())=>{let t=Qn(e);return Y(Ki(),t,`iso8601`)},[Symbol.toStringTag]:`Temporal.Now`};Object.defineProperty(Do,Symbol.toStringTag,{value:`Temporal.Now`,writable:!1,enumerable:!1,configurable:!0});var Oo=class e{constructor(e=0,t=0,n=0,r=0,i=0,a=0){let o=e===void 0?0:I(e),s=t===void 0?0:I(t),c=n===void 0?0:I(n),l=r===void 0?0:I(r),u=i===void 0?0:I(i),d=a===void 0?0:I(a);qr(o,s,c,l,u,d),Fn(this,{hour:o,minute:s,second:c,millisecond:l,microsecond:u,nanosecond:d})}get hour(){return G(this,V),j(this,D).hour}get minute(){return G(this,V),j(this,D).minute}get second(){return G(this,V),j(this,D).second}get millisecond(){return G(this,V),j(this,D).millisecond}get microsecond(){return G(this,V),j(this,D).microsecond}get nanosecond(){return G(this,V),j(this,D).nanosecond}with(t,n=void 0){if(G(this,V),!F(t))throw TypeError(`invalid argument`);Lt(t);let r=_n(t,`partial`),i=_n(this),{hour:a,minute:o,second:s,millisecond:c,microsecond:l,nanosecond:u}=Object.assign(i,r),d=J($(n));return{hour:a,minute:o,second:s,millisecond:c,microsecond:l,nanosecond:u}=Yt(a,o,s,c,l,u,d),new e(a,o,s,c,l,u)}add(e){return G(this,V),Ai(`add`,this,e)}subtract(e){return G(this,V),Ai(`subtract`,this,e)}until(e,t=void 0){return G(this,V),bi(`until`,this,e,t)}since(e,t=void 0){return G(this,V),bi(`since`,this,e,t)}round(e){if(G(this,V),e===void 0)throw TypeError(`options parameter is required`);let t=typeof e==`string`?Yi(`smallestUnit`,e):$(e),n=tn(t),r=Qt(t,`halfExpand`),i=sn(t,`smallestUnit`,`time`,on);return nn(n,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i],!1),In(Ii(j(this,D),n,i,r))}equals(e){G(this,V);let t=wn(e);return Bi(j(this,D),j(t,D))===0}toString(e=void 0){G(this,V);let t=$(e),n=rn(t),r=Qt(t,`trunc`),i=sn(t,`smallestUnit`,`time`,void 0);if(i===`hour`)throw RangeError(`smallestUnit must be a time unit other than "hour"`);let{precision:a,unit:o,increment:s}=an(i,n);return pr(Ii(j(this,D),s,o,r),a)}toJSON(){return G(this,V),pr(j(this,D),`auto`)}toLocaleString(e=void 0,t=void 0){return G(this,V),new Ka(e,t).format(this)}valueOf(){$i(`PlainTime`)}static from(e,t=void 0){return wn(e,t)}static compare(e,t){let n=wn(e),r=wn(t);return Bi(j(n,D),j(r,D))}};Fe(Oo,`Temporal.PlainTime`);var ko=class{constructor(e,t,n=`iso8601`,r=1){let i=I(e),a=I(t),o=Zi(n===void 0?`iso8601`:L(n)),s=I(r);Gr(i,a,s),Ln(this,{year:i,month:a,day:s},o)}get year(){return Ao(this,`year`)}get month(){return Ao(this,`month`)}get monthCode(){return Ao(this,`monthCode`)}get calendarId(){return G(this,U),j(this,O)}get era(){return Ao(this,`era`)}get eraYear(){return Ao(this,`eraYear`)}get daysInMonth(){return Ao(this,`daysInMonth`)}get daysInYear(){return Ao(this,`daysInYear`)}get monthsInYear(){return Ao(this,`monthsInYear`)}get inLeapYear(){return Ao(this,`inLeapYear`)}with(e,t=void 0){if(G(this,U),!F(e))throw TypeError(`invalid argument`);Lt(e);let n=j(this,O),r=hn(n,j(this,T),`year-month`);return r=Un(n,r,gn(n,e,[`year`,`month`,`monthCode`],[],`partial`)),Rn(Xn(n,r,J($(t))),n)}add(e,t=void 0){return G(this,U),ji(`add`,this,e,t)}subtract(e,t=void 0){return G(this,U),ji(`subtract`,this,e,t)}until(e,t=void 0){return G(this,U),xi(`until`,this,e,t)}since(e,t=void 0){return G(this,U),xi(`since`,this,e,t)}equals(e){G(this,U);let t=En(e);return zi(j(this,T),j(t,T))===0&&Jn(j(this,O),j(t,O))}toString(e=void 0){return G(this,U),gr(this,en($(e)))}toJSON(){return G(this,U),gr(this)}toLocaleString(e=void 0,t=void 0){return G(this,U),new Ka(e,t).format(this)}valueOf(){$i(`PlainYearMonth`)}toPlainDate(e){if(G(this,U),!F(e))throw TypeError(`argument should be an object`);let t=j(this,O);return An(Yn(t,Un(t,hn(t,j(this,T),`year-month`),gn(t,e,[`day`],[],[])),`constrain`),t)}static from(e,t=void 0){return En(e,t)}static compare(e,t){let n=En(e),r=En(t);return zi(j(n,T),j(r,T))}};function Ao(e,t){G(e,U);let n=j(e,T);return mn(e).isoToDate(n,{[t]:!0})[t]}Fe(ko,`Temporal.PlainYearMonth`);var jo=Ka.prototype.resolvedOptions,Mo=class{constructor(e,t,n=`iso8601`){if(arguments.length<1)throw TypeError(`missing argument: epochNanoseconds is required`);let r=Gi(e),i=L(t),{tzName:a,offsetMinutes:o}=qt(i);if(o===void 0){let e=Sr(a);if(!e)throw RangeError(`unknown time zone ${a}`);i=e.identifier}else i=Tr(o);Vn(this,r,i,Zi(n===void 0?`iso8601`:L(n)))}get calendarId(){return G(this,W),j(this,O)}get timeZoneId(){return G(this,W),j(this,k)}get year(){return Po(this,`year`)}get month(){return Po(this,`month`)}get monthCode(){return Po(this,`monthCode`)}get day(){return Po(this,`day`)}get hour(){return Fo(this,`hour`)}get minute(){return Fo(this,`minute`)}get second(){return Fo(this,`second`)}get millisecond(){return Fo(this,`millisecond`)}get microsecond(){return Fo(this,`microsecond`)}get nanosecond(){return Fo(this,`nanosecond`)}get era(){return Po(this,`era`)}get eraYear(){return Po(this,`eraYear`)}get epochMilliseconds(){return G(this,W),Ui(j(this,w),`floor`)}get epochNanoseconds(){return G(this,W),Hi(j(this,w))}get dayOfWeek(){return Po(this,`dayOfWeek`)}get dayOfYear(){return Po(this,`dayOfYear`)}get weekOfYear(){return Po(this,`weekOfYear`)?.week}get yearOfWeek(){return Po(this,`weekOfYear`)?.year}get hoursInDay(){G(this,W);let e=j(this,k),t=No(this).isoDate,n=Rr(t.year,t.month,t.day+1),r=ar(e,t),i=ar(e,n);return Ri(P.fromEpochNsDiff(i,r),`hour`)}get daysInWeek(){return Po(this,`daysInWeek`)}get daysInMonth(){return Po(this,`daysInMonth`)}get daysInYear(){return Po(this,`daysInYear`)}get monthsInYear(){return Po(this,`monthsInYear`)}get inLeapYear(){return Po(this,`inLeapYear`)}get offset(){return G(this,W),tr(er(j(this,k),j(this,w)))}get offsetNanoseconds(){return G(this,W),er(j(this,k),j(this,w))}with(e,t=void 0){if(G(this,W),!F(e))throw TypeError(`invalid zoned-date-time-like`);Lt(e);let n=j(this,O),r=j(this,k),i=er(r,j(this,w)),a=No(this),o={...hn(n,a.isoDate),...a.time,offset:tr(i)};o=Un(n,o,gn(n,e,[`year`,`month`,`monthCode`,`day`],[`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`,`offset`],`partial`));let s=$(t),c=Zt(s),l=$t(s,`prefer`),u=yn(n,o,J(s)),d=yr(o.offset);return Y(Dn(u.isoDate,u.time,`option`,d,r,c,l,!1),r,n)}withPlainTime(e=void 0){G(this,W);let t=j(this,k),n=j(this,O),r=No(this).isoDate,i;return i=e===void 0?ar(t,r):X(t,q(r,j(wn(e),D)),`compatible`),Y(i,t,n)}withTimeZone(e){G(this,W);let t=Qn(e);return Y(j(this,w),t,j(this,O))}withCalendar(e){G(this,W);let t=Kn(e);return Y(j(this,w),j(this,k),t)}add(e,t=void 0){return G(this,W),Mi(`add`,this,e,t)}subtract(e,t=void 0){return G(this,W),Mi(`subtract`,this,e,t)}until(e,t=void 0){return G(this,W),Si(`until`,this,e,t)}since(e,t=void 0){return G(this,W),Si(`since`,this,e,t)}round(e){if(G(this,W),e===void 0)throw TypeError(`options parameter is required`);let t=typeof e==`string`?Yi(`smallestUnit`,e):$(e),n=tn(t),r=Qt(t,`halfExpand`),i=sn(t,`smallestUnit`,`time`,on,[`day`]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[i];if(nn(n,a,a===1),i===`nanosecond`&&n===1)return Y(j(this,w),j(this,k),j(this,O));let o=j(this,k),s=j(this,w),l=No(this),u;if(i===`day`){let e=l.isoDate,t=Rr(e.year,e.month,e.day+1),n=ar(o,e),i=ar(o,t),a=c.default.subtract(i,n);u=P.fromEpochNsDiff(s,n).round(a,r).addToEpochNs(n)}else{let e=Fi(l,n,i,r),t=er(o,s);u=Dn(e.isoDate,e.time,`option`,t,o,`compatible`,`prefer`,!1)}return Y(u,o,j(this,O))}equals(e){G(this,W);let t=On(e),n=j(this,w),r=j(t,w);return!!c.default.equal(c.default.BigInt(n),c.default.BigInt(r))&&!!$n(j(this,k),j(t,k))&&Jn(j(this,O),j(t,O))}toString(e=void 0){G(this,W);let t=$(e),n=en(t),r=rn(t),i=function(e){return Xi(e,`offset`,[`auto`,`never`],`auto`)}(t),a=Qt(t,`trunc`),o=sn(t,`smallestUnit`,`time`,void 0);if(o===`hour`)throw RangeError(`smallestUnit must be a time unit other than "hour"`);let s=function(e){return Xi(e,`timeZoneName`,[`auto`,`never`,`critical`],`auto`)}(t),{precision:c,unit:l,increment:u}=an(o,r);return _r(this,c,n,s,i,{unit:l,increment:u,roundingMode:a})}toLocaleString(e=void 0,t=void 0){G(this,W);let n=$(t),r=Object.create(null);if(function(e,t,n,r){if(t==null)return;let i=Reflect.ownKeys(t);for(let r=0;r<i.length;r++){let a=i[r];!n.some((e=>Object.is(e,a)))&&Object.prototype.propertyIsEnumerable.call(t,a)&&(e[a]=t[a])}}(r,n,[`timeZone`]),n.timeZone!==void 0)throw TypeError(`ZonedDateTime toLocaleString does not accept a timeZone option`);if(r.year===void 0&&r.month===void 0&&r.day===void 0&&r.era===void 0&&r.weekday===void 0&&r.dateStyle===void 0&&r.hour===void 0&&r.minute===void 0&&r.second===void 0&&r.fractionalSecondDigits===void 0&&r.timeStyle===void 0&&r.dayPeriod===void 0&&r.timeZoneName===void 0&&(r.timeZoneName=`short`),r.timeZone=j(this,k),vr(r.timeZone))throw RangeError(`toLocaleString does not currently support offset time zones`);let i=new Ka(e,r),a=jo.call(i).calendar,o=j(this,O);if(o!==`iso8601`&&a!==`iso8601`&&!Jn(a,o))throw RangeError(`cannot format ZonedDateTime with calendar ${o} in locale with calendar ${a}`);return i.format(Bn(j(this,w)))}toJSON(){return G(this,W),_r(this,`auto`)}valueOf(){$i(`ZonedDateTime`)}startOfDay(){G(this,W);let e=j(this,k);return Y(ar(e,No(this).isoDate),e,j(this,O))}getTimeZoneTransition(e){G(this,W);let t=j(this,k);if(e===void 0)throw TypeError(`options parameter is required`);let n=Xi(typeof e==`string`?Yi(`direction`,e):$(e),`direction`,[`next`,`previous`],on);if(n===void 0)throw TypeError(`direction option is required`);if(vr(t)||t===`UTC`)return null;let r=j(this,w),i=n===`next`?kr(t,r):Ar(t,r);return i===null?null:Y(i,t,j(this,O))}toInstant(){return G(this,W),Bn(j(this,w))}toPlainDate(){return G(this,W),An(No(this).isoDate,j(this,O))}toPlainTime(){return G(this,W),In(No(this).time)}toPlainDateTime(){return G(this,W),Mn(No(this),j(this,O))}static from(e,t=void 0){return On(e,t)}static compare(e,t){let n=On(e),r=On(t),i=j(n,w),a=j(r,w);return c.default.lessThan(c.default.BigInt(i),c.default.BigInt(a))?-1:+!!c.default.greaterThan(c.default.BigInt(i),c.default.BigInt(a))}};function No(e){return nr(j(e,k),j(e,w))}function Po(e,t){G(e,W);let n=No(e).isoDate;return mn(e).isoToDate(n,{[t]:!0})[t]}function Fo(e,t){return G(e,W),No(e).time[t]}Fe(Mo,`Temporal.ZonedDateTime`);var Io=Object.freeze({__proto__:null,Duration:Co,Instant:_o,Now:Do,PlainDate:vo,PlainDateTime:bo,PlainMonthDay:wo,PlainTime:Oo,PlainYearMonth:ko,ZonedDateTime:Mo});(class{toTemporalInstant(){return Bn(Wi(Date.prototype.valueOf.call(this)))}}).prototype.toTemporalInstant;var Lo=[_o,vo,bo,Co,wo,Oo,ko,Mo];for(let e of Lo){let t=Object.getOwnPropertyDescriptor(e,`prototype`);(t.configurable||t.enumerable||t.writable)&&(t.configurable=!1,t.enumerable=!1,t.writable=!1,Object.defineProperty(e,"prototype",t))}typeof globalThis<`u`&&!globalThis.Temporal&&(globalThis.Temporal=Io),exports.ALL_LOCALES=n.t,exports.AdvancedFormatPlugin=o.AdvancedFormatPlugin,exports.BuddhistCalendar=r.BuddhistCalendar,exports.CalendarManager=t.d,exports.ChineseCalendar=r.ChineseCalendar,exports.DEFAULT_RELATIVE_INTERVAL_MS=t.t,exports.DEFAULT_TICK_INTERVAL_MS=t.n,exports.DateFormatter=t.m,exports.Duration=a.Duration,exports.DurationPlugin=a.DurationPlugin,exports.DurationResult=t.r,exports.EN_LOCALE=n.o,exports.ES_LOCALE=n.s,exports.GregorianCalendar=t.f,exports.HebrewCalendar=r.HebrewCalendar,exports.IslamicCalendar=r.IslamicCalendar,exports.JapaneseCalendar=r.JapaneseCalendar,exports.LOCALES_COUNT=n.n,exports.LocaleManager=n.c,exports.PluginManager=t.u,exports.RelativeTimePlugin=i.RelativeTimePlugin,exports.TemporalAdapter=t.h,exports.TimeGuard=t.i,exports.TimeRange=t.a,exports.advancedFormatPlugin=o.default,exports.calendarManager=t.p,exports.computeRelativeTime=t.o,exports.createTimeRangeFrom=t.s,exports.durationPlugin=a.default,exports.getAvailableLocales=n.r,exports.loadAllLocales=n.i,exports.registerAllLocales=n.a,exports.relativeTimePlugin=i.default,exports.timeGuard=t.c,exports.version=t.l;
@@ -1,6 +1,6 @@
1
- /*! time-guard v2.8.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./core-Dxn1aRFk.js";
3
- import { a as h, c as g, i as _, n as v, o as y, r as b, s as ee, t as x } from "./locales-3Mw99lQ-.js";
1
+ /*! time-guard v2.9.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./core-GHK7isoa.js";
3
+ import { a as h, c as g, i as _, n as v, o as y, r as b, s as ee, t as x } from "./locales-Dwe5oGoy.js";
4
4
  import { BuddhistCalendar as te, ChineseCalendar as ne, HebrewCalendar as S, IslamicCalendar as re, JapaneseCalendar as ie } from "./calendars/index.es.js";
5
5
  import ae, { RelativeTimePlugin as oe } from "./plugins/relative-time.es.js";
6
6
  import se, { Duration as ce, DurationPlugin as le } from "./plugins/duration.es.js";