@hebcal/core 5.2.0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/bundle.js +9346 -8256
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +3999 -9
- package/dist/index.mjs +3999 -9
- package/hebcal.d.ts +54 -6
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.2.
|
|
1
|
+
/*! @hebcal/core v5.2.2 */
|
|
2
2
|
/** @private */
|
|
3
3
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4
4
|
/** @private */
|
|
@@ -1792,7 +1792,9 @@ const flags = {
|
|
|
1792
1792
|
/** Daily page of Jerusalem Talmud (Yerushalmi) */
|
|
1793
1793
|
YERUSHALMI_YOMI: 0x1000000,
|
|
1794
1794
|
/** Nach Yomi */
|
|
1795
|
-
NACH_YOMI: 0x2000000
|
|
1795
|
+
NACH_YOMI: 0x2000000,
|
|
1796
|
+
/** Daily Learning */
|
|
1797
|
+
DAILY_LEARNING: 0x4000000
|
|
1796
1798
|
};
|
|
1797
1799
|
const flagToCategory = [[flags.MAJOR_FAST, 'holiday', 'major', 'fast'], [flags.CHANUKAH_CANDLES, 'holiday', 'major'], [flags.HEBREW_DATE, 'hebdate'], [flags.MINOR_FAST, 'holiday', 'fast'], [flags.MINOR_HOLIDAY, 'holiday', 'minor'], [flags.MODERN_HOLIDAY, 'holiday', 'modern'], [flags.MOLAD, 'molad'], [flags.OMER_COUNT, 'omer'], [flags.PARSHA_HASHAVUA, 'parashat'],
|
|
1798
1800
|
// backwards-compat
|
|
@@ -2024,9 +2026,3993 @@ class HebrewDateEvent extends Event {
|
|
|
2024
2026
|
}
|
|
2025
2027
|
}
|
|
2026
2028
|
|
|
2027
|
-
const n=36e11,t=864e11,e=[1,1e3,1e6,1e9,6e10,n,t],o=[9,6,3];function r(n){return n<=6}function i(n){return n>=6}const s$1=a("overflow",{constrain:0,reject:1},0);function a(n,t,e){const o=function(n,t,e){return (o,r)=>{if(void 0===o){const t=null!=r?r:e;if(void 0===t)throw new RangeError(`Must specify a ${n}`);return t}if(void 0===t[o])throw new RangeError(`Invalid ${n}: ${o}`);return t[o]}}(n,t,e);return (t,e)=>{const r=d(t);return o(r[n],e)}}function c(n,t,e,o){if(void 0===n)return t;if(!Number.isFinite(n))throw new RangeError("Number must be finite");n=Math.trunc(n);const r=Math.min(Math.max(n,t),e);if(r!==n&&1===o)throw new RangeError("Invalid overflowed value "+n);return r}function u(n,t){const e={};for(const o in t)void 0!==n[o]&&(e[o]=t[o](n[o]));return e}function d(n,t){if(void 0===n&&!t)return {};if(!h(n))throw TypeError("options must be an object or undefined");return n}const l=/object|function/;function h(n){return null!==n&&l.test(typeof n)}const f=a("roundingMode",{halfExpand:Math.round,ceil:Math.ceil,trunc:Math.trunc,floor:Math.floor});function m$1(){const n=new WeakMap;return [n.get.bind(n),n.set.bind(n)]}function g(n,t){Object.defineProperties(n.prototype,y(t,(n=>({get:n}))));}function y(n,t){const e={};for(const o in n)e[o]=t(n[o],o);return e}function w(n,t,e){const o={};for(const r of t)o[r]=e(n[r]);return o}function p(n,t){const e={};return n.forEach(((n,o)=>{e[n]=t(n,o);})),e}const v=["nanosecond","microsecond","millisecond","second","minute","hour"],M=[...v,"day","week","month","year"],b=M.map((n=>n+"s")),S=p(M,((n,t)=>t)),I=p(b,((n,t)=>t));function F(n,t,e,o){var r;let i;if(void 0===n){if(void 0===t)throw new RangeError("Unit is required");i=t;}else if(i=null!=(r=S[n])?r:I[n],void 0===i||i<e||i>o)throw new RangeError("Invalid unit "+n);return i}function O(n,t,o,r,i,s){var a;const c=d(n),u=null!=(a=c.roundingIncrement)?a:1,l=F(c.smallestUnit,o,r,i),h=f(c,s?Math.round:Math.trunc);let m=c.largestUnit;"auto"===m&&(m=void 0);const g=F(m,t=Math.max(t,l),r,i);if(l>g)throw new RangeError("Bad smallestUnit/largestUnit");if(l<6){const n=e[l+1],t=e[l]*u;if(n===t)throw new RangeError("Must not equal larger unit");if(n%t)throw new RangeError("Must divide into larger unit")}return {smallestUnit:l,largestUnit:g,roundingFunc:h,roundingIncrement:u}}function T(n,o,r,i){var s;const a=d("string"==typeof n?{smallestUnit:n}:n,!0),c=null!=(s=a.roundingIncrement)?s:1,u=F(a.smallestUnit,void 0,o,r),l=f(a,Math.round),h=e[u]*c;if(6===u){if(1!==c)throw new RangeError("When smallestUnit is days, roundingIncrement must be 1")}else {const n=i?t:e[u+1];if(!i&&n===h)throw new RangeError("Must not equal larger unit");if(n%h)throw new RangeError("Must divide into larger unit")}return {smallestUnit:u,roundingFunc:l,incNano:h}}const D$1=Symbol();function N(n,t,...e){return t instanceof n?t:n.from(t,...e)}class Y{toJSON(){return this.toString()}}class E extends Y{valueOf(){throw new Error("Cannot convert object using valueOf")}}const[Z,C]=m$1();class U extends E{constructor(n){super(),C(this,Object.freeze(n));}getISOFields(){return Z(this)}}function P(n,t){return n<t?-1:n>t?1:0}function R(n){return P(n,0)}function k(n,t,e){return e(n/t)*t}function x(n){return k(n,6e10,j)}function j(n){return Math.round(Math.abs(n))*R(n)}function q(n,t,e){const o=n.div(t).mult(t),r=n.sub(o).toNumber();return o.add(e(r/t)*t)}function H(n,t){return (n%t+t)%t}function L(n,t){return $(e=String(n),t,"0")+e;var e;}function B(n,t,e){return n+$(n,t,e)}function $(n,t,e){return new Array(Math.max(0,t-n.length+1)).join(e)}function A(n){return n<0?"-":"+"}const z=Math.pow(10,8);class W{constructor(n,t){this.high=n,this.low=t;}sign(){return R(this.high)||R(this.low)}neg(){return new W(-this.high||0,-this.low||0)}abs(){return this.sign()<0?this.neg():this}add(n){const[t,e]=J(n);return Q(this.high+t,this.low+e)}sub(n){const[t,e]=J(n);return Q(this.high-t,this.low-e)}mult(n){return Q(this.high*n,this.low*n)}div(n){const t=this.high/n;let e=String(t);-1!==e.indexOf("e-")&&(e=t.toFixed(20));const o=e.indexOf(".");let r=0;if(-1!==o){let n=e.substr(o+1);n=B(n,8,"0"),n=n.substr(0,8),r=parseInt(n)*(R(t)||1);}return Q(Math.trunc(t)||0,Math.trunc(this.low/n)+r)}toNumber(){return this.high*z+this.low}toBigInt(){return BigInt(this.high)*BigInt(z)+BigInt(this.low)}}function K(n,t){let e,o;if(n instanceof W)e=n.high,o=n.low;else if("number"==typeof n){if(t)throw new TypeError("Must supply bigint, not number");e=Math.trunc(n/z),o=n%z||0;}else if("bigint"==typeof n){const t=BigInt(z);e=Number(n/t),o=Number(n%t||0);}else {if("string"!=typeof n)throw new Error("Invalid type of BigNano");{if((n=n.trim()).match(/\D/))throw new SyntaxError(`Cannot parse ${n} to a BigInt`);const t=n.length-8;e=Number(n.substr(t)),o=Number(n.substr(0,t));}}return new W(e,o)}function G(n,t){return P(n.high,t.high)||P(n.low,t.low)}function J(n){return "number"==typeof n?[0,n]:[n.high,n.low]}function Q(n,t){let e=t%z||0,o=n+Math.trunc(t/z);const r=R(o),i=R(e);return i&&r&&i!==r&&(o+=i,e-=z*i),new W(o,e)}const V=b.concat("sign");function X(n){return w(n,V,(n=>-n||0))}function _(n,t){var e,o,r,i,s,a,c,u,d,l;return nn({years:null!=(e=t.years)?e:n.years,months:null!=(o=t.months)?o:n.months,weeks:null!=(r=t.weeks)?r:n.weeks,days:null!=(i=t.days)?i:n.days,hours:null!=(s=t.hours)?s:n.hours,minutes:null!=(a=t.minutes)?a:n.minutes,seconds:null!=(c=t.seconds)?c:n.seconds,milliseconds:null!=(u=t.milliseconds)?u:n.milliseconds,microseconds:null!=(d=t.microseconds)?d:n.microseconds,nanoseconds:null!=(l=t.nanoseconds)?l:n.nanoseconds})}function nn(n){return {...n,sign:tn(n)}}function tn(n){let t=0;for(const e of b){if(n[e]){t=R(n[e]);break}}return t}function en(n){let t=9;for(;t>0&&!n[b[t]];)t--;return t}const on={isoHour:0,isoMinute:0,isoSecond:0,isoMillisecond:0,isoMicrosecond:0,isoNanosecond:0},rn={hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};function sn(n){return {isoHour:n.hour||0,isoMinute:n.minute||0,isoSecond:n.second||0,isoMillisecond:n.millisecond||0,isoMicrosecond:n.microsecond||0,isoNanosecond:n.nanosecond||0}}function an(n){return K(t).mult(n.days).add(cn(n))}function cn(t){return K(t.nanoseconds).add(K(t.microseconds).mult(1e3)).add(K(t.milliseconds).mult(1e6)).add(K(t.seconds).mult(1e9)).add(K(t.minutes).mult(6e10)).add(K(t.hours).mult(n))}function un(t){return t.isoHour*n+6e10*t.isoMinute+1e9*t.isoSecond+1e6*t.isoMillisecond+1e3*t.isoMicrosecond+t.isoNanosecond}function dn(e,o){let r,i=0,s=0,a=0,c=0,u=0,d=0;switch(o){case 6:r=e.div(t),i=r.toNumber(),e=e.sub(r.mult(t));case 5:r=e.div(n),s=r.toNumber(),e=e.sub(r.mult(n));case 4:r=e.div(6e10),a=r.toNumber(),e=e.sub(r.mult(6e10));case 3:r=e.div(1e9),c=r.toNumber(),e=e.sub(r.mult(1e9));case 2:r=e.div(1e6),u=r.toNumber(),e=e.sub(r.mult(1e6));case 1:r=e.div(1e3),d=r.toNumber(),e=e.sub(r.mult(1e3));}return nn({years:0,months:0,weeks:0,days:i,hours:s,minutes:a,seconds:c,milliseconds:u,microseconds:d,nanoseconds:e.toNumber()})}function ln(e){const o=Math.floor(e/t);e-=o*t;const r=Math.floor(e/n);e-=r*n;const i=Math.floor(e/6e10);e-=6e10*i;const s=Math.floor(e/1e9);e-=1e9*s;const a=Math.floor(e/1e6);e-=1e6*a;const c=Math.floor(e/1e3);return [{isoHour:r,isoMinute:i,isoSecond:s,isoMillisecond:a,isoMicrosecond:c,isoNanosecond:e-=1e3*c},o]}const hn={gregory:{bce:-1,ce:0},ethioaa:{era0:0},ethiopic:{era0:0,era1:5500},coptic:{era0:-1,era1:0},roc:{beforeroc:-1,minguo:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0},japanese:{bce:-1,ce:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018}};class fn{constructor(n){this.id=n;}monthCode(n,t){return "M"+L(n,2)}convertMonthCode(n,t){const e=/L$/.test(n),o=parseInt(n.substr(1));if(e)throw new RangeError("Calendar system doesnt support leap months");return [o,!1]}}function mn(n,t,e,o){var r;let i=null==(r=hn[gn(n)])?void 0:r[e];if(void 0===i){if(!o)throw new Error("Unkown era "+e);i=0;}return (i+t)*(R(i)||1)}function gn(n){return n.split("-")[0]}class yn extends fn{computeFields(n){const t=Fn(n);return {era:void 0,eraYear:void 0,year:t.isoYear,month:t.isoMonth,day:t.isoDay}}epochMilliseconds(n,t,e){return Sn(n,t,e)}daysInMonth(n,t){return 2===t?this.inLeapYear(n)?29:28:4===t||6===t||9===t||11===t?30:31}monthsInYear(){return 12}inLeapYear(n){return n%4==0&&(n%100!=0||n%400==0)}guessYearForMonthDay(){return pn}normalizeISOYearForMonthDay(){return pn}}const wn=new yn("iso8601"),pn=1972,vn=Symbol();function Mn(n){return bn(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function bn(n,t,e,o,r,i,s,a,c){return K(Sn(n,t,e,o,r,i,s)).mult(1e6).add(1e3*(null!=a?a:0)+(null!=c?c:0))}function Sn(n,t,e,o,r,i,s){const a=R(n);let c,u,d=0;const l=n>=0&&n<1e3,h=l?n+1200:n;for(;d<31;d++){c=e-a*d;const n=Date.UTC(h,t-1,c,null!=o?o:0,null!=r?r:0,null!=i?i:0,null!=s?s:0);if(!En(n)){u=n+a*d*864e5;break}}return (void 0===u||c<1||c>wn.daysInMonth(n,t))&&Zn(),l&&(u=new Date(u).setUTCFullYear(n)),u}function In(n){let t=n.div(1e6),e=n.sub(t.mult(1e6)).toNumber();e<0&&(e+=1e6,t=t.sub(1));const o=Math.floor(e/1e3);return e-=1e3*o,{...Fn(t.toNumber()),isoMicrosecond:o,isoNanosecond:e}}function Fn(n){const[t,e]=Yn(n);return {isoYear:t.getUTCFullYear(),isoMonth:t.getUTCMonth()+1,isoDay:t.getUTCDate()+e,isoHour:t.getUTCHours(),isoMinute:t.getUTCMinutes(),isoSecond:t.getUTCSeconds(),isoMillisecond:t.getUTCMilliseconds()}}function On(n){var t;return null!=(t=n[vn])?t:Mn(n.getISOFields())}function Tn(n){return Math.floor(Sn(n,1,1)/1e3)}function Dn(n){return Yn(n.div(1e6).toNumber())[0].getUTCFullYear()}function Nn(n,t,e){const[o,r]=Yn(Sn(n,t,e));return H(o.getUTCDay()+r,7)||7}function Yn(n){const t=R(n);let e,o=0;for(;o<31;o++){const r=new Date(n-t*o*864e5);if(!En(r)){e=r;break}}return void 0===e&&Zn(),[e,t*o]}function En(n){return isNaN(n.valueOf())}function Zn(){throw new RangeError("Date outside of supported range")}function Cn(n,t){return Math.round((t-n)/864e5)}function Un(n,t){return n+864e5*t}function Pn(n,t){return !Rn(n,t)&&n.calendar.toString()===t.calendar.toString()}function Rn(n,t){return G(Mn(n.getISOFields()),Mn(t.getISOFields()))}function kn(n,t){return P(un(n.getISOFields()),un(t.getISOFields()))}function xn(n,t){return P(n.year,t.year)||P(n.month,t.month)||P(n.day,t.day)}function jn(n,t){return G(n[vn],t[vn])}function qn(n,t,e,o,r){return [n=Number(n),t=c(t,1,o.monthsInYear(n),r),e=c(e,1,o.daysInMonth(n,t),r)]}function Hn(n,t){const[e,o,r]=qn(n.isoYear,n.isoMonth,n.isoDay,wn,t);return {isoYear:e,isoMonth:o,isoDay:r}}function Ln(n,t){return {...Hn(n,t),...Bn(n,t)}}function Bn({isoHour:n,isoMinute:t,isoSecond:e,isoMillisecond:o,isoMicrosecond:r,isoNanosecond:i},s){return {isoHour:n=c(n,0,23,s),isoMinute:t=c(t,0,59,s),isoSecond:e=c(e,0,59,s),isoMillisecond:o=c(o,0,999,s),isoMicrosecond:r=c(r,0,999,s),isoNanosecond:i=c(i,0,999,s)}}const $n={era:String,eraYear:Number,year:Number,month:Number,monthCode:String},An={...$n,day:Number},zn={hour:Number,minute:Number,second:Number,millisecond:Number,microsecond:Number,nanosecond:Number},Wn={era:String,eraYear:Number,year:Number,month:Number,monthCode:String,day:Number},Kn=p(b,(()=>Number));class Gn extends yn{computeFields(n){const t=super.computeFields(n),{year:e}=t;return {...t,era:e<1?"bce":"ce",eraYear:e<1?-(e-1):e}}}const Jn=a("calendarName",{auto:0,never:1,always:2},0),Qn=a("disambiguation",{compatible:0,earlier:1,later:2,reject:3},0);function Vn(n,t=4){const r=d(n),i=r.smallestUnit,s=r.fractionalSecondDigits;let a,u=0,l=1;return void 0!==i?(u=F(i,void 0,0,t),l=e[u],a=o[u]||0):void 0!==s&&"auto"!==s&&(a=c(s,0,9,1),l=Math.pow(10,9-a)),{smallestUnit:u,fractionalSecondDigits:a,roundingFunc:f(n,Math.trunc),incNano:l}}const Xn=a("timeZoneName",{auto:0,never:1},0);function _n(n,t){return nt(n)+"T"+et(n,t)}function nt(n){return tt(n)+"-"+L(n.isoDay,2)}function tt(n){const{isoYear:t}=n;return (t<1e3||t>9999?A(t)+L(Math.abs(t),6):L(t,4))+"-"+L(n.isoMonth,2)}function et(n,t){const e=[L(n.isoHour,2)];return t.smallestUnit<=4&&(e.push(L(n.isoMinute,2)),t.smallestUnit<=3&&e.push(L(n.isoSecond,2)+st(n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,t.fractionalSecondDigits)[0])),e.join(":")}function ot(n){const[t,e]=ln(Math.abs(n)),o=st(t.isoMillisecond,t.isoMicrosecond,t.isoNanosecond,void 0)[0];return A(n)+L(t.isoHour+24*e,2)+":"+L(t.isoMinute,2)+(t.isoSecond||o?":"+L(t.isoSecond,2)+o:"")}function rt(n,t){return n&&(2===t||1!==t&&"iso8601"!==n)?`[u-ca=${n}]`:""}function it(n){return n.map((([n,t,e])=>{if(e||n){return Math.abs(n).toLocaleString("fullwide",{useGrouping:!1})+t}return ""})).join("")}function st(n,t,o,r,i,s){let a=K(n).mult(1e6).add(K(t).mult(1e3)).add(o);i&&(a=q(a,void 0===r?e[s]:Math.pow(10,9-r),i));const c=a.abs(),u=c.div(1e9);let d=L(c.sub(u.mult(1e9)).toNumber(),9);return d=void 0===r?d.replace(/0+$/,""):d.substr(0,r),[d?"."+d:"",u.toNumber()*(a.sign()||1)]}function at(n){g(n,{epochNanoseconds(){return this[vn].toBigInt()},epochMicroseconds(){return this[vn].div(1e3).toBigInt()},epochMilliseconds(){return this[vn].div(1e6).toNumber()},epochSeconds(){return this[vn].div(1e9).toNumber()}});}const ct={calendar:"calendar"};for(const n of M)ct[n]="iso"+((ut=n).charAt(0).toUpperCase()+ut.slice(1));var ut;function dt(n,t=[]){g(n,p(t.concat("calendar"),(n=>function(){return this.getISOFields()[ct[n]]})));}const lt=["era","eraYear","year","month","monthCode","daysInMonth","daysInYear","monthsInYear","inLeapYear"],ht=[...lt,"day","dayOfWeek","dayOfYear","weekOfYear","daysInWeek"];function ft(n,t){g(n,p(t,(n=>function(){const t=this.calendar[n](this);return Object.defineProperty(this,n,{value:t}),t})));}function mt(n,t){(n.prototype||n)[Symbol.toStringTag]="Temporal."+t;}const gt=a("offset",{prefer:0,use:1,ignore:2,reject:3});function yt(n,e,o=0){const r=n.getPossibleInstantsFor(e);if(1===r.length)return r[0];if(3===o)throw new RangeError("Ambiguous offset");if(r.length)return r[2===o?1:0];{const r=function(n,e){const o=On(e),r=n.getOffsetNanosecondsFor(new Yr(o.sub(t)));return n.getOffsetNanosecondsFor(new Yr(o.add(t)))-r}(n,e),i=n.getPossibleInstantsFor(e.add({nanoseconds:r*(1===o?-1:1)}));return i[1===o?0:i.length-1]}}function wt({year:n,month:t,day:e},o,r,i){n+=o;const s=c(t,1,r.monthsInYear(n),i);let a=t===s?e:1;return a=c(a,1,r.daysInMonth(n,s),i),{year:n,month:s,day:a}}function pt({year:n,month:t,day:e},o,r,i){if(o){if(t+=o,o<0)for(;t<1;)t+=r.monthsInYear(--n);else {let e;for(;t>(e=r.monthsInYear(n));)t-=e,n++;}e=c(e,1,r.daysInMonth(n,t),i);}return {year:n,month:t,day:e}}function vt({isoYear:n,isoMonth:t,isoDay:e},o){if(o){let r=Sn(n,t,e);r=Un(r,o),({isoYear:n,isoMonth:t,isoDay:e}=Fn(r));}return {isoYear:n,isoMonth:t,isoDay:e}}function Mt(n,t){if(en(t)>=6)throw new RangeError("Duration cant have units >= days");return n.add(cn(t))}function bt(n,t,e=3,o){const{offsetNanoseconds:r,timeZone:i,Z:s}=n;if(void 0!==r&&2!==e){if(1===e||s)return Mn(n).sub(r);{const o=St(n,r,i,t);if(void 0!==o)return o;if(3===e)throw new RangeError("Mismatching offset/timezone")}}return yt(i,Ho(n),Qn(o))[vn]}function St(n,t,e,o){const r=e.getPossibleInstantsFor(Ho(n)),i=Mn(n),s=o?x(t):t;for(const n of r){const t=n[vn],e=i.sub(t).toNumber();if((o?x(e):e)===s)return t}}function It(n){const{timeZone:t}=n,e={...n,...on,calendar:new mr("iso8601")},o={...vt(e,1),...on,calendar:new mr("iso8601")},r=yt(t,Ho(e))[vn];return yt(t,Ho(o))[vn].sub(r).toNumber()}const Ft="(\\d{2})(:?(\\d{2})(:?(\\d{2})([.,](\\d{1,9}))?)?)?",Ot="([+-])"+Ft,Tt="(Z|"+Ot+")?(\\[([^=\\]]+)\\])?(\\[u-ca=([^\\]]+)\\])?",Dt=Pt("([+-]\\d{6}|\\d{4})-?(\\d{2})"+Tt),Nt=Pt("(--)?(\\d{2})-?(\\d{2})"+Tt),Yt=Pt("([+-]\\d{6}|\\d{4})-?(\\d{2})-?(\\d{2})([T ](\\d{2})(:?(\\d{2})(:?(\\d{2})([.,](\\d{1,9}))?)?)?)?"+Tt),Et=Pt("T?"+Ft+Tt),Zt=Pt(Ot),Ct=/^([-+])?P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T((\d+)([.,](\d{1,9}))?H)?((\d+)([.,](\d{1,9}))?M)?((\d+)([.,](\d{1,9}))?S)?)?$/i,Ut=/\u2212/g;function Pt(n){return new RegExp(`^${n}$`,"i")}function Rt(n){return n.replace(Ut,"-")}function kt(n){const t=Lt(n);if(!t)throw _t("dateTime",n);return t}function xt(n){const t=Bt(n);if(!t)throw _t("dateTime",n);return t}function jt(n){const t=zt(n);if(void 0===t)throw _t("timeZone",n);return t}function qt(n){let t=function(n){const t=Et.exec(Rt(n));if(t)return Kt(t.slice(1))}(n);if(void 0!==t){if("T"!==n.charAt(0)){const e=$t(n)||At(n);e&&function(n){try{return Hn(n,1),!0}catch(n){return !1}}(e)&&(t=void 0);}}else t=Bt(n,!0);if(void 0===t)throw _t("time",n);return t}const Ht=/^Z$/i;function Lt(n){const t=Yt.exec(Rt(n));if(t)return function(n){const t=n[11];let e,o=!1;t&&(o=Ht.test(t),e=o?0:Gt(n.slice(12)));return {...Wt(n),timeZone:n[21],offsetNanoseconds:e,Z:o}}(t.slice(1))}function Bt(n,t,e){const o=Yt.exec(Rt(n));if(o&&(e||!Ht.test(o[12]))&&(!t||o[4]))return Wt(o.slice(1))}function $t(n){const t=Dt.exec(Rt(n));if(t)return {calendar:(e=t.slice(1))[14],isoYear:Vt(e[0]),isoMonth:Vt(e[1]),isoDay:1};var e;}function At(n){const t=Nt.exec(Rt(n));if(t)return {calendar:(e=t.slice(1))[15],isoYear:pn,isoMonth:Vt(e[1]),isoDay:Vt(e[2])};var e;}function zt(n){const t=Zt.exec(Rt(n));if(t)return Gt(t.slice(1))}function Wt(n){return {calendar:n[23],isoYear:Vt(n[0]),isoMonth:Vt(n[1]),isoDay:Vt(n[2]),...Kt(n.slice(4))}}function Kt(n){const t=Qt(n[4]);return {...ln(Jt(n[6]||""))[0],isoHour:Qt(n[0]),isoMinute:Qt(n[2]),isoSecond:60===t?59:t}}function Gt(t){return ("+"===t[0]?1:-1)*function(t){return Qt(t[0])*n+6e10*Qt(t[2])+1e9*Qt(t[4])+Jt(t[6]||"")}(t.slice(1))}function Jt(n){return parseInt(B(n,9,"0"))}function Qt(n){return parseInt(n||"0")}function Vt(n){return parseInt(n||"1")}function Xt(n){return void 0===n?void 0:parseInt(n)}function _t(n,t){throw new RangeError(`Cannot parse ${n} '${t}'`)}function ne(n){return {...n,calendar:void 0===n.calendar?gr():new mr(n.calendar)}}function te(n){return {...ne(n),timeZone:new we(n.timeZone)}}class ee{constructor(n){this.id=n;}}class oe extends ee{constructor(n,t){super(n),this.offsetNano=t;}getPossibleOffsets(){return [this.offsetNano]}getOffset(){return this.offsetNano}getTransition(){}}function re(n,t){const e={},o=n.formatToParts(t);for(const n of o)e[n.type]=n.value;return e}const ie={bc:"bce",ad:"ce"};function se(n){return n=n.toLowerCase().normalize("NFD").replace(/[^a-z0-9]/g,""),ie[n]||n}const ae=Intl.DateTimeFormat;function ce(n){return [].concat(n||[])}const ue={"Pacific/Apia":{2011:[[de(13017528e5),-36e12,-396e11],[de(13168728e5),-396e11,-36e12],[de(13252392e5),-36e12,504e11]]}};function de(n){return K(n).mult(1e6)}const le=(new Date).getUTCFullYear()+10,he=[182,91,273];class fe extends ee{constructor(n){const t=new ae("en-GB",{era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:n});super(t.resolvedOptions().timeZone),this.format=t,this.yearEndOffsets={},this.transitionsInYear=ue[n]||{};}getPossibleOffsets(n){let t;const e=[this.getTransition(n,-1),this.getTransition(n.sub(1),1)].filter(Boolean);for(const o of e){const[e,r,i]=o,s=n.sub(r),a=n.sub(i);if(G(e,s)>0&&G(e,a)>0)return [r];if(!(G(e,s)<=0&&G(e,a)<=0))return r<i?[]:[r,i];t=i;}return void 0!==t?[t]:[1e9*this.getYearEndOffsetSec(Dn(n))]}getOffset(n){return 1e9*this.getOffsetForEpochSecs(n.div(1e9).toNumber())}getOffsetForEpochSecs(n){const t=re(this.format,1e3*n);let e=parseInt(t.year);"bce"===se(t.era)&&(e=-(e-1));const o=Sn(e,parseInt(t.month),parseInt(t.day),parseInt(t.hour),parseInt(t.minute),parseInt(t.second));return Math.floor(o/1e3)-n}getTransition(n,t){let e=Dn(n);if(e>le){const o=this.getTransitionFrom(e,e+t,t,n);if(o||t>0)return o;e=le;}return this.getTransitionFrom(Math.max(e,1847),t<0?1846:le,t,n)}getTransitionFrom(n,t,e,o){for(;n!==t;n+=e){let t=this.getTransitionsInYear(n);e<0&&(t=t.slice().reverse());for(const n of t)if(G(n[0],o)===e)return n}}getYearEndOffsetSec(n){const{yearEndOffsets:t}=this;return t[n]||(t[n]=this.getOffsetForEpochSecs(Tn(n+1)-1))}getTransitionsInYear(n){const{transitionsInYear:t}=this;return t[n]||(t[n]=this.computeTransitionsInYear(n))}computeTransitionsInYear(n){const t=this.getYearEndOffsetSec(n-1),e=this.getYearEndOffsetSec(n),o=Tn(n)-1,r=Tn(n+1)-1;if(t!==e)return [this.searchTransition(o,r,t,e)];const i=this.searchIsland(t,o);return void 0!==i?[this.searchTransition(o,i[0],t,i[1]),this.searchTransition(i[0],r,i[1],e)]:[]}searchTransition(n,t,e,o){for(;t-n>1;){const o=Math.floor(n+(t-n)/2);this.getOffsetForEpochSecs(o)===e?n=o:t=o;}return [K(t).mult(1e9),1e9*e,1e9*o]}searchIsland(n,t){for(const e of he){const o=t+86400*e,r=this.getOffsetForEpochSecs(o);if(r!==n)return [o,r]}}}const me={UTC:new oe("UTC",0)};const[ge,ye]=m$1();class we extends Y{constructor(n){if(!n)throw new RangeError("Invalid timezone ID");super(),ye(this,function(n){const e=(n=String(n)).toLocaleUpperCase();if(me[e])return me[e];const o=zt(n);if(void 0!==o){if(Math.abs(o)>t)throw new RangeError("Offset out of bounds");return new oe(ot(o),o)}return me[e]=new fe(n)}(n));}static from(n){if(h(n))return function(n){const t=n.timeZone;if(void 0===t)return n;if(h(t)&&void 0===t.timeZone)return t;return new we(t)}(n);const t=Lt(String(n));if(t){if(t.timeZone){const n=te(t);return function(n){const{offsetNanoseconds:t,timeZone:e,Z:o}=n;if(void 0!==t&&!o&&void 0===St(n,t,e,!0))throw new RangeError("Mismatching offset/timezone")}(n),n.timeZone}if(t.Z)return new we("UTC");if(void 0!==t.offsetNanoseconds)return new we(ot(t.offsetNanoseconds))}return new we(String(n))}get id(){return this.toString()}getOffsetStringFor(n){return ot(this.getOffsetNanosecondsFor(n))}getOffsetNanosecondsFor(n){const t=N(Yr,n);return ge(this).getOffset(t[vn])}getPlainDateTimeFor(n,t=gr()){const e=N(Yr,n);return Ho({...In(e[vn].add(this.getOffsetNanosecondsFor(e))),calendar:N(mr,t)})}getInstantFor(n,t){return yt(this,N(qo,n),Qn(t))}getPossibleInstantsFor(n){const t=Mn(N(qo,n).getISOFields());return ge(this).getPossibleOffsets(t).map((n=>new Yr(t.sub(n))))}getPreviousTransition(n){const t=N(Yr,n),e=ge(this).getTransition(t[vn],-1);return e?new Yr(e[0]):null}getNextTransition(n){const t=N(Yr,n),e=ge(this).getTransition(t[vn],1);return e?new Yr(e[0]):null}toString(){return ge(this).id}}function pe(n){if(void 0===n.timeZone)throw new TypeError("Must specify timeZone");return N(we,n.timeZone)}mt(we,"TimeZone");const ve=Le((function(n,t,e){const o=Ce(n,t,e);if(o)return {...o,timeZone:pe(n),offsetNanoseconds:void 0!==n.offset?jt(String(n.offset)):void 0}})),Me=Le(Ce),be=Le(Ue),Se=Le((function(n,t){const e=pr(n),o=je(n,$n,e);if(Be(o))return e.yearMonthFromFields(o,t)})),Ie=Le((function(n,t){const e=pr(n),o=je(n,Wn,e);if(Be(o))return void 0===n.year&&void 0===n.calendar&&(o.year=pn),e.monthDayFromFields(o,t)})),Fe=Le(Pe),Oe=Le((function(n,t,e,o){const r=Re(n,t,e,o),i=void 0!==t.offset;if(r||i)return {...r||n.getISOFields(),timeZone:n.timeZone,offsetNanoseconds:i?jt(String(t.offset)):n.offsetNanoseconds}}),!0),Te=Le(Re,!0),De=Le(ke,!0),Ne=Le((function(n,t,e){const o=n.calendar;if(Be(je(t,$n,o))){const r=He(n,t,$n,o);return o.yearMonthFromFields(r,e)}}),!0),Ye=Le((function(n,t,e){const o=n.calendar;if(Be(je(t,Wn,o))){const r=He(n,t,Wn,o);return o.monthDayFromFields(r,e)}}),!0),Ee=Le(xe,!0),Ze=Le((function(n){const t=u(n,Kn);if(Be(t))return t}));function Ce(n,t,e){const o=Ue(n,e),r=Pe(n,t);if(o)return {...o.getISOFields(),...r||on}}function Ue(n,t){const e=pr(n),o=je(n,An,e);if(Be(o))return e.dateFromFields(o,t)}function Pe(n,t){const e=u(n,zn);if(Be(e))return Bn(sn(e),t)}function Re(n,t,e,o){const r=ke(n,t,o),i=xe(n,t,e);if(r||i)return {...n.getISOFields(),...r?r.getISOFields():{},...i}}function ke(n,t,e){const o=n.calendar,r=je(t,An,o);if(Be(r)){const t=He(n,r,An,o);return o.dateFromFields(t,e)}}function xe(n,t,e){const o=u(t,zn);if(Be(o)){return Bn(sn((r=n,i=o,y(zn,((n,t)=>{var e;return null!=(e=i[t])?e:r[t]})))),e)}var r,i;}function je(n,t,e){let o=Object.keys(t);return o=e.fields?Array.prototype.slice.call(e.fields(o)):Object.keys(qe(e,o)),qe(n,o)}function qe(n,t){const e={};for(const o of t)void 0!==n[o]&&(e[o]=n[o]);return e}function He(n,t,e,o){const r=je(n,e,o);return o.mergeFields?o.mergeFields(r,t):yr(r,t)}function Le(n,t){return (...e)=>{if(t){const n=e[1];if(!h(n))throw new TypeError("must be object-like");if(void 0!==n.calendar)throw new TypeError("calendar not allowed");if(void 0!==n.timeZone)throw new TypeError("timeZone not allowed")}const o=n(...e);if(!o)throw new TypeError("No valid fields");return o}}function Be(n){return Object.keys(n).length>0}const $e=K(t).mult(1e8),Ae=$e.mult(-1),ze=$e.add(86399999999999),We=Ae.sub(86399999999999);function Ke(n,t){const e=Mn(n);Ge(e),cr(e,t);}function Ge(n){-1!==G(n,We)&&1!==G(n,ze)||Zn();}function Je(n,t){const e=Xe(un(n),t),[o,r]=ln(e);return {...vt(n,r),...o}}function Qe(n,t){const e=Xe(un(n),t),[o]=ln(e);return o}function Ve(n,t){const[e,o]=function(n){const t=In(n);return [bn(t.isoYear,t.isoMonth,t.isoDay),un(t)]}(n),r=Xe(o,t);return e.add(r)}function Xe(n,t){return k(n,t.incNano,t.roundingFunc)}function _e(n,t,e){return (o,r)=>{const i=io(n,r)?{}:{...n,...t};return {buildKey:ro(o,r,!1),buildFormat:function(n,t){return new ae(o,{calendar:n,timeZone:t||void 0,...i,...r,...e})},buildEpochMilli:no}}}function no(n){return n.epochMilliseconds}function to(n,t,e){return (o,r)=>{const i=io(n,r)?{}:n;return {buildKey:ro(o,r,e),buildFormat:function(n,e){return new ae(o,{calendar:n,...i,...r,...t,timeZone:e,timeZoneName:void 0})},buildEpochMilli:void 0!==r.timeZone?eo.bind(null,new we(r.timeZone)):oo}}}function eo(n,t){const e=Ho({...on,...t.getISOFields()});return n.getInstantFor(e).epochMilliseconds}function oo(n){return Sn((t=n.getISOFields()).isoYear,t.isoMonth,t.isoDay,t.isoHour,t.isoMinute,t.isoSecond,t.isoMillisecond);var t;}function ro(n,t,e){var o;const r=null!=(o=t.calendar)?o:function(n){for(const t of n){const n=t.match(/-u-ca-(.*)$/);if(n)return n[1]}return}(n),i=t.timeZone;return function(n,t){var o,s,a,c;const u=null==(o=n.calendar)?void 0:o.id,d=null==(s=n.timeZone)?void 0:s.id;if(t){if((null==(a=t.calendar)?void 0:a.id)!==u)throw new RangeError("Mismatching calendar");if((null==(c=t.timeZone)?void 0:c.id)!==d)throw new RangeError("Mismatching timeZone")}if((e||"iso8601"!==u)&&void 0!==u&&void 0!==r&&r!==u)throw new RangeError("Non-iso calendar mismatch");if(void 0!==d&&void 0!==i&&i!==d)throw new RangeError("Given timeZone must agree");return [r||u||"iso8601",i||d||"UTC"]}}function io(n,t){for(const e in n)if(void 0!==t[e])return !0;return !1}function so(n,t){n.prototype.toLocaleString=function(n,e){const o=t(ce(n),e||{});return o.buildFormat(...o.buildKey(this)).format(o.buildEpochMilli(this))},n.prototype[D$1]=t;}function ao(n){return null==n?void 0:n[D$1]}function co(n){const t=function(n){const t=Ct.exec(Rt(n));if(t){let n,e,o,r;[n,r]=uo(t[8],t[10],5,void 0),[e,r]=uo(t[12],t[14],4,r),[o,r]=uo(t[16],t[18],3,r);const i=function(n){const t={};for(const e in n)void 0!==n[e]&&(t[e]=n[e]);return t}({years:Xt(t[2]),months:Xt(t[3]),weeks:Xt(t[4]),days:Xt(t[5]),hours:n,minutes:e,seconds:o});if(!Object.keys(i).length)throw new RangeError("Duration string must have at least one field");const s=dn(K(r||0),2);i.milliseconds=s.milliseconds,i.microseconds=s.microseconds,i.nanoseconds=s.nanoseconds;let a=nn(i);return "-"===t[1]&&(a=X(a)),a}}(n);if(void 0===t)throw _t("duration",n);return t}function uo(n,t,o,r){if(void 0!==n){if(void 0!==r)throw new RangeError("Partial units must be last unit");return [parseInt(n),void 0!==t?Jt(t)*(e[o]/1e9):void 0]}if(void 0!==r){const n=Math.trunc(r/e[o]);return [n,r-n*e[o]]}return [void 0,void 0]}const lo=a("offset",{auto:0,never:1},0);class ho extends U{constructor(n=0,t=0,e=0,o=0,r=0,i=0){super({...Bn({isoHour:n,isoMinute:t,isoSecond:e,isoMillisecond:o,isoMicrosecond:r,isoNanosecond:i},1),calendar:gr()});}static from(n,t){const e=s$1(t);return fo(n instanceof ho?n.getISOFields():"object"==typeof n?Fe(n,e):qt(String(n)))}static compare(n,t){return kn(N(ho,n),N(ho,t))}with(n,t){return fo(Ee(this,n,s$1(t)))}add(n){return go(this,N(ko,n))}subtract(n){return go(this,X(N(ko,n)))}until(n,t){return yo(this,N(ho,n),t)}since(n,t){return yo(N(ho,n),this,t)}round(n){const t=T(n,0,5);return fo(Qe(this.getISOFields(),t))}equals(n){return !kn(this,N(ho,n))}toString(n){const t=Vn(n);return et(Qe(this.getISOFields(),t),t)}toZonedDateTime(n){const t=N(Sr,n.plainDate),e=N(we,n.timeZone);return Fo({...t.getISOFields(),...this.getISOFields(),timeZone:e})}toPlainDateTime(n){return N(Sr,n).toPlainDateTime(this)}}function fo(n){return new ho(n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function mo(n){return N(ho,null!=n?n:{hour:0})}function go(n,t){return fo(function(n,t){const e=un(n)+cn(t).toNumber(),[o]=ln(e);return o}(n.getISOFields(),t))}function yo(n,t,o){const r=O(o,5,0,0,5);return xo(function(n,t,o){return dn(K(k(un(t)-un(n),e[o.smallestUnit]*o.roundingIncrement,o.roundingFunc)),o.largestUnit)}(n.getISOFields(),t.getISOFields(),r))}mt(ho,"PlainTime"),dt(ho,v),so(ho,(function(n,t){return {buildKey:()=>["",""],buildFormat:()=>new ae(n,{hour:"numeric",minute:"2-digit",second:"2-digit",...t,timeZone:"UTC",timeZoneName:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0}),buildEpochMilli:n=>Math.trunc(un(n.getISOFields())/1e6)}}));const wo={day:1};class po extends U{constructor(n,t,e=gr(),o=1){const r=Hn({isoYear:n,isoMonth:t,isoDay:o},1),i=N(mr,e);var s,a;s=r,a=i.toString(),cr(Mn(s),a),super({...r,calendar:i});}static from(n,t){if(s$1(t),n instanceof po)return vo(n.getISOFields());if("object"==typeof n)return Se(n,t);const e=function(n){const t=$t(n)||Bt(n);if(!t)throw _t("yearMonth",n);return t}(String(n));return void 0===e.calendar&&(e.isoDay=1),vo(ne(e))}static compare(n,t){return Rn(N(po,n),N(po,t))}with(n,t){return Ne(this,n,t)}add(n,t){return Mo(this,N(ko,n),t)}subtract(n,t){return Mo(this,X(N(ko,n)),t)}until(n,t){return bo(this,N(po,n),!1,t)}since(n,t){return bo(this,N(po,n),!0,t)}equals(n){return !Rn(this,N(po,n))}toString(n){const t=this.getISOFields(),e=t.calendar.toString(),o=Jn(n);return ("iso8601"===e?tt(t):nt(t))+rt(e,o)}toPlainDate(n){return this.calendar.dateFromFields({year:this.year,month:this.month,day:n.day})}}function vo(n){return new po(n.isoYear,n.isoMonth,n.calendar,n.isoDay)}function Mo(n,t,e){return n.toPlainDate({day:t.sign<0?n.daysInMonth:1}).add(t,e).toPlainYearMonth()}function bo(n,t,e,o){return xo(Tr(n.toPlainDate(wo),t.toPlainDate(wo),vr(n,t),e,O(o,9,8,8,9)))}mt(po,"PlainYearMonth"),dt(po),ft(po,lt),so(po,to({year:"numeric",month:"numeric"},{weekday:void 0,day:void 0,hour:void 0,minute:void 0,second:void 0},!0));const So=Symbol();class Io extends U{constructor(n,t,e=gr()){const o=N(we,t),r=N(mr,e),i=K(n),[s,a]=Oo(i,o);Ke(s,r.toString()),super({...s,calendar:r,timeZone:o,offset:ot(a)}),this[vn]=i,this[So]=a;}static from(n,t){const e=gt(t,3),o=s$1(t);if(n instanceof Io)return new Io(n.epochNanoseconds,n.timeZone,n.calendar);const r="object"==typeof n;return Fo(r?ve(n,o,t):te(kt(String(n))),!r,e,t)}static compare(n,t){return jn(N(Io,n),N(Io,t))}get timeZone(){return this.getISOFields().timeZone}get offsetNanoseconds(){return this[So]}get offset(){return this.getISOFields().offset}with(n,t){Qn(t);const e=s$1(t),o=gt(t,0);return Fo(Oe(this,n,e,t),!1,o,t)}withPlainDate(n){const t=N(Sr,n),e=t.toPlainDateTime(this),{timeZone:o}=this,r=yt(o,e);return new Io(r.epochNanoseconds,o,Mr(this,t))}withPlainTime(n){return Fo({...this.getISOFields(),...void 0===n?on:N(ho,n).getISOFields()})}withCalendar(n){return new Io(this.epochNanoseconds,this.timeZone,n)}withTimeZone(n){return new Io(this.epochNanoseconds,n,this.calendar)}add(n,t){return To(this,N(ko,n),t)}subtract(n,t){return To(this,X(N(ko,n)),t)}until(n,t){return No(this,N(Io,n),!1,t)}since(n,t){return No(this,N(Io,n),!0,t)}round(n){return Do(this,T(n,0,6))}equals(n){return t=this,e=N(Io,n),Pn(t,e)&&t.timeZone.toString()===e.timeZone.toString();var t,e;}startOfDay(){return Fo({...this.getISOFields(),...on,offsetNanoseconds:this.offsetNanoseconds},!1,0)}get hoursInDay(){return It(this.getISOFields())/n}toString(n){const t=Vn(n),e=lo(n),o=Xn(n),r=Jn(n),i=Do(this,t);return _n(i.getISOFields(),t)+(0===e?ot(x(i.offsetNanoseconds)):"")+(s=this.timeZone.toString(),1!==o?`[${s}]`:"")+rt(this.calendar.toString(),r);var s;}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}toPlainDateTime(){return Ho(this.getISOFields())}toPlainDate(){return Ir(this.getISOFields())}toPlainTime(){return fo(this.getISOFields())}toInstant(){return new Yr(this.epochNanoseconds)}}function Fo(n,t,e,o){const r=bt(n,t,e,o);return new Io(r,n.timeZone,n.calendar)}function Oo(n,t){const e=new Yr(n),o=t.getOffsetNanosecondsFor(e);return [In(n.add(o)),o]}function To(n,t,e){const o=n.getISOFields(),r=function(n,t,e){const{calendar:o,timeZone:r}=n,i=o.dateAdd(Ir(n),_(t,rn),e);return yt(r,Ho({...n,...i.getISOFields()}))[vn].add(cn(t))}(o,t,e);return new Io(r,o.timeZone,o.calendar)}function Do(n,t){const e=n.getISOFields(),o=function(n,t,e){const{calendar:o,timeZone:r}=n;let i,s,a=un(n);return 6===e.smallestUnit?(i=on,s=e.roundingFunc(a/It(n))):(a=Xe(a,e),[i,s]=ln(a)),bt({...vt(n,s),...i,offsetNanoseconds:t,calendar:o,timeZone:r},!1,0)}(e,n.offsetNanoseconds,t);return new Io(o,e.timeZone,e.calendar)}function No(n,t,e,o){const r=O(o,5,0,0,9),{largestUnit:i}=r;if(i>=6&&n.timeZone.id!==t.timeZone.id)throw new Error("Must be same timeZone");return xo(Or(n,t,vr(n,t),e,r))}function Yo(n){if(void 0===n)return;if(h(n))return n instanceof Io||n instanceof qo?n:N(void 0!==n.timeZone?Io:qo,n);if("symbol"==typeof n)throw new TypeError("Incorrect relativeTo type");const t=Lt(String(n));if(t)return void 0!==t.timeZone?Fo(te(t),!0):Ho(ne(t));throw new RangeError("Invalid value of relativeTo")}function Eo(n,t,e,o){return (e instanceof Sr?function(n,t,e,o){const r=e.add(n);return [o.dateUntil(e,r,{largestUnit:M[t]}),r]}(n,Math.max(6,t),e,o):Zo(n,t,e,o))[0]}function Zo(n,t,e,o,r){const i=!0!==r&&t>7&&n.weeks;i&&(n=_(n,{weeks:0}));let s=e.add(n),a=Dr(e,s,o,t);return i&&(a=_(a,{weeks:i}),s=s.add({weeks:i})),[a,s]}function Co(n,t,e,o){const r=b[t],{sign:i}=n;if(!i)return n;const s={};for(let e=9;e>=t;e--){const t=b[e];s[t]=n[t];}const a={[r]:i},c=e.add(s),u=c.add(a),d=On(c),l=On(u),h=On(o).sub(d).toNumber()/l.sub(d).toNumber()*i;return s[r]+=h,s}function Uo(n,t,o,r,s,a){const{largestUnit:c,smallestUnit:u,roundingIncrement:d,roundingFunc:l}=a;if(!i(c)){return dn(q(On(o).sub(On(t)).mult(s?-1:1),e[u]*d,l),c)}let h=Co(n,u,t,o);const f=b[u];function m(){const n=h[f];h[f]=k(n,d,l);}return l===Math.round&&m(),s&&(h=X(h)),l!==Math.round&&m(),u>0&&(h=s?X(Eo(X(h),c,t,r)):Eo(h,c,t,r)),h}mt(Io,"ZonedDateTime"),dt(Io,v),ft(Io,ht),at(Io),so(Io,_e({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{timeZoneName:"short"},{}));const[Po,Ro]=m$1();class ko extends E{constructor(n=0,t=0,e=0,o=0,r=0,i=0,s=0,a=0,c=0,u=0){super();const d=Ze({years:n,months:t,weeks:e,days:o,hours:r,minutes:i,seconds:s,milliseconds:a,microseconds:c,nanoseconds:u});Ro(this,function(n){const t=nn(n),{sign:e}=t;for(const n of b){const o=t[n],r=R(t[n]);if(r&&r!==e)throw new RangeError("All fields must be same sign");if(!Number.isInteger(o))throw new RangeError("Duration fields must be integers")}return t}(d));}static from(n){return xo("object"==typeof n?Ze(n):co(n))}static compare(n,t,e){return function(n,t,e){if(void 0===e&&en(n)<=6&&en(t)<=6)return G(an(n),an(t));if(!e)throw new RangeError("Need relativeTo");const o=e.add(n),r=e.add(t);return void 0!==e[vn]?jn(o,r):Rn(o,r)}(N(ko,n),N(ko,t),Yo(d(e).relativeTo))}get years(){return Po(this).years}get months(){return Po(this).months}get weeks(){return Po(this).weeks}get days(){return Po(this).days}get hours(){return Po(this).hours}get minutes(){return Po(this).minutes}get seconds(){return Po(this).seconds}get milliseconds(){return Po(this).milliseconds}get microseconds(){return Po(this).microseconds}get nanoseconds(){return Po(this).nanoseconds}get sign(){return Po(this).sign}get blank(){return !this.sign}with(n){return xo({...Po(this),...Ze(n)})}negated(){return xo(X(Po(this)))}abs(){return xo(w(Po(this),V,(n=>Math.abs(n))))}add(n,t){return jo(this,N(ko,n),t)}subtract(n,t){return jo(this,X(N(ko,n)),t)}round(n){const t="string"==typeof n?{smallestUnit:n}:n;if(!h(t))throw new TypeError("Must specify options");if(void 0===t.largestUnit&&void 0===t.smallestUnit)throw new RangeError("Must specify either largestUnit or smallestUnit");const o=O(t,en(this),0,0,9,!0),i=Yo(t.relativeTo);return xo(function(n,t,o,i){const{largestUnit:s,smallestUnit:a,roundingIncrement:c,roundingFunc:u}=t;if(void 0===o&&en(n)<=6&&r(s)&&r(a))return dn(q(an(n),e[a]*c,u),s);if(!o)throw new RangeError("Need relativeTo");const[d,l]=Zo(n,s,o,i);return Uo(d,o,l,i,!1,t)}(this,o,i,i?i.calendar:void 0))}total(n){const t=function(n){let t,e;return "string"==typeof n?e=n:(e=d(n).unit,t=n.relativeTo),{unit:F(e,void 0,0,9),relativeTo:t}}(n),o=Yo(t.relativeTo);return function(n,t,o,i){if(void 0===o&&en(n)<=6&&r(t))return an(n).toNumber()/e[t];if(!o)throw new RangeError("Need relativeTo");const[s,a]=Zo(n,t,o,i,!0);return Co(s,t,o,a)[b[t]]}(this,t.unit,o,o?o.calendar:void 0)}toString(n){const t=Vn(n,3);return function(n,t){const{smallestUnit:e,fractionalSecondDigits:o,roundingFunc:r}=t,{sign:i}=n,s=n.hours,a=n.minutes;let c=n.seconds,u="";if(e<=3){const t=st(n.milliseconds,n.microseconds,n.nanoseconds,o,r,e);u=t[0],c+=t[1];}const d=void 0!==o||u||!i;return (i<0?"-":"")+"P"+it([[n.years,"Y"],[n.months,"M"],[n.weeks,"W"],[n.days,"D"]])+(s||a||c||d?"T"+it([[s,"H"],[a,"M"],[e<=3?c:0,u+"S",d]]):"")}(Po(this),t)}toLocaleString(n,t){return this.toString()}}function xo(n){return new ko(n.years,n.months,n.weeks,n.days,n.hours,n.minutes,n.seconds,n.milliseconds,n.microseconds,n.nanoseconds)}function jo(n,t,e){const o=Yo(d(e).relativeTo);return xo(function(n,t,e,o){const r=Math.max(en(n),en(t));if(void 0===e&&r<=6)return dn(an(n).add(an(t)),r);if(!e)throw new RangeError("Need relativeTo");const i=e.add(n).add(t);return Dr(e,i,o,r)}(n,t,o,o?o.calendar:void 0))}mt(ko,"Duration");class qo extends U{constructor(n,t,e,o=0,r=0,i=0,s=0,a=0,c=0,u=gr()){const d=Ln({isoYear:n,isoMonth:t,isoDay:e,isoHour:o,isoMinute:r,isoSecond:i,isoMillisecond:s,isoMicrosecond:a,isoNanosecond:c},1),l=N(mr,u);Ke(d,l.toString()),super({...d,calendar:l});}static from(n,t){const e=s$1(t);return Ho(n instanceof qo?n.getISOFields():"object"==typeof n?Me(n,e,t):ne(xt(String(n))))}static compare(n,t){return Rn(N(qo,n),N(qo,t))}with(n,t){const e=s$1(t);return Ho(Te(this,n,e,t))}withPlainDate(n){const t=N(Sr,n);return Ho({...this.getISOFields(),...t.getISOFields(),calendar:Mr(this,t)})}withPlainTime(n){return Ho({...this.getISOFields(),...mo(n).getISOFields()})}withCalendar(n){return Ho({...this.getISOFields(),calendar:N(mr,n)})}add(n,t){return Lo(this,N(ko,n),t)}subtract(n,t){return Lo(this,X(N(ko,n)),t)}until(n,t){return Bo(this,N(qo,n),!1,t)}since(n,t){return Bo(this,N(qo,n),!0,t)}round(n){const t=T(n,0,6);return Ho({...Je(this.getISOFields(),t),calendar:this.calendar})}equals(n){return Pn(this,N(qo,n))}toString(n){const t=Vn(n),e=Jn(n);return _n(Je(this.getISOFields(),t),t)+rt(this.calendar.toString(),e)}toZonedDateTime(n,t){const e=N(we,n),o=yt(e,this,Qn(t));return new Io(o.epochNanoseconds,e,this.calendar)}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}toPlainDate(){return Ir(this.getISOFields())}toPlainTime(){return fo(this.getISOFields())}}function Ho(n){return new qo(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,n.calendar)}function Lo(n,t,e){const o=function(n,t,e){const{calendar:o}=n;return In(Mn(o.dateAdd(Ir(n),_(t,rn),e).getISOFields()).add(un(n)).add(cn(t)))}(n.getISOFields(),t,e);return Ho({...o,calendar:n.calendar})}function Bo(n,t,e,o){const r=O(o,6,0,0,9);return xo(Or(n,t,vr(n,t),e,r))}mt(qo,"PlainDateTime"),dt(qo,v),ft(qo,ht),so(qo,to({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{}));class $o extends U{constructor(n,t,e=gr(),o=pn){super({...Hn({isoYear:o,isoMonth:n,isoDay:t},1),calendar:N(mr,e)});}static from(n,t){if(s$1(t),n instanceof $o)return Ao(n.getISOFields());if("object"==typeof n)return Ie(n,t);const e=function(n){const t=At(n)||Bt(n);if(!t)throw _t("monthDay",n);return t}(String(n));return void 0===e.calendar&&(e.isoYear=pn),Ao(ne(e))}with(n,t){return Ye(this,n,t)}equals(n){return !Rn(this,N($o,n))}toString(n){const t=this.getISOFields(),e=t.calendar.toString(),o=Jn(n);return ("iso8601"===e?function(n){return L(n.isoMonth,2)+"-"+L(n.isoDay,2)}(t):nt(t))+rt(e,o)}toPlainDate(n){return this.calendar.dateFromFields({year:n.year,monthCode:this.monthCode,day:this.day},{overflow:"reject"})}}function Ao(n){return new $o(n.isoMonth,n.isoDay,n.calendar,n.isoYear)}function zo(n){return n instanceof Sr||n instanceof qo||n instanceof Io||n instanceof po||n instanceof $o}function Wo(n,t,e){let o;if(n instanceof Sr)o=n;else if(zo(n)){if(e&&n instanceof $o)throw new TypeError("PlainMonthDay not allowed");o=Ir(n.getISOFields());}else o=Sr.from(n);return br(o.calendar,t),o}function Ko(n,t,e){if(zo(n))return n.getISOFields();let{era:o,eraYear:r,year:i,month:a,monthCode:c,day:u}=n;const d=void 0!==r&&void 0!==o?mn(t.id,r,o):void 0;if(void 0===i){if(void 0===d)throw new TypeError("Must specify either a year or an era & eraYear");i=d;}else if(void 0!==d&&d!==i)throw new RangeError("year and era/eraYear must match");if(void 0===u)throw new TypeError("Must specify day");const l=s$1(e);if(void 0!==c){const[n,e]=t.convertMonthCode(c,i);if(void 0!==a&&a!==n)throw new RangeError("Month doesnt match with monthCode");if(a=n,e){if(1===l)throw new RangeError("Month code out of range");u=t.daysInMonth(i,a);}}else if(void 0===a)throw new TypeError("Must specify either a month or monthCode");return [i,a,u]=qn(i,a,u,t,l),Fn(t.epochMilliseconds(i,a,u))}function Go(n,t){if(zo(n)){if(t&&n instanceof $o)throw new TypeError("PlainMonthDay not allowed");return n.getISOFields()}return Sr.from(n).getISOFields()}function Jo(n,t){return Cn(n.epochMilliseconds(t,1,1),n.epochMilliseconds(t+1,1,1))}function Qo(n,t,e,o){return Cn(n.epochMilliseconds(t,1,1),n.epochMilliseconds(t,e,o))+1}mt($o,"PlainMonthDay"),dt($o),ft($o,["monthCode","day"]),so($o,to({month:"numeric",day:"numeric"},{weekday:void 0,year:void 0,hour:void 0,minute:void 0,second:void 0},!0));const Vo={hebrew:6,chinese:0,dangi:0};class Xo extends fn{constructor(n){const t=_o(n);if(e=n,o=t.resolvedOptions().calendar,gn(e)!==gn(o))throw new RangeError("Invalid calendar: "+n);var e,o;super(n),this.format=t,this.yearCorrection=this.computeFieldsDumb(0).year-1970,this.monthCacheByYear={};}epochMilliseconds(n,t,e){return Un(this.queryMonthCache(n)[0][t-1],e-1)}daysInMonth(n,t){const e=this.queryMonthCache(n)[0],o=e[t-1];t>=e.length&&(n++,t=0);return Cn(o,this.queryMonthCache(n)[0][t])}monthsInYear(n){return this.queryMonthCache(n)[0].length}monthCode(n,t){const e=this.queryLeapMonthByYear(t);return !e||n<e?super.monthCode(n,t):super.monthCode(n-1,t)+(n===e?"L":"")}convertMonthCode(n,t){const e=this.queryLeapMonthByYear(t);let o=/L$/.test(n),r=parseInt(n.substr(1)),i=!1;if(o){const n=Vo[this.id];if(void 0===n)throw new RangeError("Calendar system doesnt support leap months");if(n){if(r!==n-1)throw new RangeError("Invalid leap-month month code")}else if(r<=1||r>=12)throw new RangeError("Invalid leap-month month code")}return !o||e&&r===e-1||(i=!0,o=!1),(o||e&&r>=e)&&r++,[r,i]}inLeapYear(n){const t=Jo(this,n);return t>Jo(this,n-1)&&t>Jo(this,n+1)}guessYearForMonthDay(n,t){let e=1970+this.yearCorrection;const o=e+100;for(;e<o;e++){const[o,r]=this.convertMonthCode(n,e);if(!r&&o<=this.monthsInYear(e)&&t<=this.daysInMonth(e,o))return e}throw new Error("Could not guess year")}normalizeISOYearForMonthDay(n){return n}computeFields(n){const t=this.computeFieldsDumb(n),e=this.queryMonthCache(t.year)[2];return {...t,month:e[t.month]}}computeFieldsDumb(n){const t=re(this.format,n);let e,o,r=parseInt(t.relatedYear||t.year);var i;return t.era&&(i=this.id,void 0!==hn[gn(i)])&&(e=se(t.era),o=r,r=mn(this.id,o,e,!0)),{era:e,eraYear:o,year:r,month:t.month,day:parseInt(t.day)}}queryLeapMonthByYear(n){const t=this.queryMonthCache(n),e=this.queryMonthCache(n-1),o=this.queryMonthCache(n+1);if(t[0].length>e[0].length&&t[0].length>o[0].length){const n=t[1],o=e[1];for(let t=0;t<o.length;t++)if(o[t]!==n[t])return t+1}}queryMonthCache(n){const{monthCacheByYear:t}=this;return t[n]||(t[n]=this.buildMonthCache(n))}buildMonthCache(n){const t=[],e=[],o={};let r=Sn(this.guessISOYear(n),1,1);for(r=Un(r,400);;){const o=this.computeFieldsDumb(r);if(o.year<n)break;r=Un(r,1-o.day),o.year===n&&(t.unshift(r),e.unshift(o.month)),r=Un(r,-1);}for(let n=0;n<e.length;n++)o[e[n]]=n+1;return [t,e,o]}guessISOYear(n){return n-this.yearCorrection}}function _o(n){return new ae("en-US",{calendar:n,era:"short",year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}const nr=Sn(1868,9,8);const tr={gregory:Gn,japanese:class extends Gn{constructor(){super(...arguments),this.format=_o("japanese");}computeFields(n){const t=super.computeFields(n);if(n>=nr){const e=re(this.format,n);t.era=se(e.era),t.eraYear=parseInt(e.relatedYear||e.year);}return t}},islamic:class extends Xo{guessISOYear(n){return Math.ceil(32*n/33+622)}}},er={iso8601:wn};function or(n){const t=(n=String(n)).toLocaleLowerCase();return er[t]||(er[t]=new(tr[gn(t)]||Xo)(n))}const rr=Sn(1582,10,15),ir=Sn(622,7,18),sr={buddhist:rr,japanese:rr,roc:rr,islamic:ir,"islamic-rgsa":ir,indian:0},ar={};function cr(n,t){return ur(n.div(1e6).toNumber(),t)}function ur(n,t){if(function(n,t){return function(n){let t=ar[n];if(void 0===t){const e=sr[n];if(void 0===e)t=!1;else {let o=or(n);o instanceof Xo||(o=new Xo(n));const r=e-864e5,i=o.computeFields(r);t=r!==o.epochMilliseconds(i.year,i.month,i.day);}ar[n]=t;}return t}(t)&&n<sr[t]}(n,t))throw new RangeError("Invalid timestamp for calendar")}function dr(n,t,e){const o=7+t-e;return -H(Nn(n,1,o)-t,7)+o-1}function lr(n,t,e){const o=dr(n,t,e),r=dr(n+1,t,e);return (Jo(wn,n)-o+r)/7}const[hr,fr]=m$1();class mr extends Y{constructor(n){super(),"islamicc"===n&&(n="islamic-civil"),fr(this,or(n));}static from(n){if(h(n))return function(n){const t=n.calendar;if(void 0===t)return n;if(h(t)&&void 0===t.calendar)return t;return new mr(t)}(n);const t=Bt(String(n),!1,!0);return new mr(t?t.calendar||"iso8601":String(n))}get id(){return this.toString()}era(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).era}eraYear(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).eraYear}year(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).year}month(n){const t=Go(n,!0);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).month}monthCode(n){const t=Wo(n,this);return hr(this).monthCode(t.month,t.year)}day(n){const t=Go(n);return wr(hr(this),t.isoYear,t.isoMonth,t.isoDay).day}dayOfWeek(n){const t=Go(n,!0);return Nn(t.isoYear,t.isoMonth,t.isoDay)}dayOfYear(n){const t=Wo(n,this,!0);return Qo(hr(this),t.year,t.month,t.day)}weekOfYear(n){const t=Go(n,!0);return function(n,t,e,o,r){const i=dr(n,o,r),s=Math.floor((Qo(wn,n,t,e)-i-1)/7)+1;if(s<1)return s+lr(n-1,o,r);const a=lr(n,o,r);return s>a?s-a:s}(t.isoYear,t.isoMonth,t.isoDay,1,4)}daysInWeek(n){return Go(n,!0),7}daysInMonth(n){const t=Wo(n,this,!0);return hr(this).daysInMonth(t.year,t.month)}daysInYear(n){const t=Wo(n,this,!0);return Jo(hr(this),t.year)}monthsInYear(n){const t=Wo(n,this,!0);return hr(this).monthsInYear(t.year)}inLeapYear(n){return hr(this).inLeapYear(this.year(n))}dateFromFields(n,t){const e=Ko(u(n,An),hr(this),t);return new Sr(e.isoYear,e.isoMonth,e.isoDay,this)}yearMonthFromFields(n,t){const e=Ko({...u(n,$n),day:1},hr(this),t);return new po(e.isoYear,e.isoMonth,this,e.isoDay)}monthDayFromFields(n,t){const e=hr(this);let{era:o,eraYear:r,year:i,month:s,monthCode:a,day:c}=u(n,Wn);if(void 0===c)throw new TypeError("required property 'day' missing or undefined");if(void 0!==a?i=pn:void 0!==o&&void 0!==r&&(i=mn(e.id,r,o)),void 0===i){if(void 0===a)throw new TypeError("either year or monthCode required with month");i=e.guessYearForMonthDay(a,c);}const d=Ko({year:i,month:s,monthCode:a,day:c},e,t);return new $o(d.isoMonth,d.isoDay,this,e.normalizeISOYearForMonthDay(d.isoYear))}dateAdd(n,e,o){const r=hr(this),i=function(n,e,o,r){n=pt(n=wt(n,e.years,o,r),e.months,o,r);let i=o.epochMilliseconds(n.year,n.month,n.day);const s=Math.trunc(cn(e).div(t).toNumber());return i=Un(i,7*e.weeks+e.days+s),Fn(i)}(N(Sr,n,o),N(ko,e),r,s$1(o));return new Sr(i.isoYear,i.isoMonth,i.isoDay,this)}dateUntil(n,t,e){const o=hr(this),r=N(Sr,n),i=N(Sr,t),s=d(e).largestUnit,a="auto"===s?6:F(s,6,6,9);return br(this,vr(r,i)),xo(function(n,t,e,o){let r=0,i=0,s=0,a=0;switch(o){case 9:r=function(n,t,e){const[,o,r]=qn(t.year,n.month,n.day,e,0),i=xn(t,n),s=P(t.month,o)||P(t.day,r);return t.year-n.year-(s&&i&&s!==i?i:0)}(n,t,e),n=wt(n,r,e,0);case 8:i=function(n,t,e){let o=0;const r=xn(t,n);if(r){let{year:i}=n;for(;i!==t.year;)o+=e.monthsInYear(i)*r,i+=r;const[,s,a]=qn(t.year,n.month,n.day,e,0);o+=t.month-s;const c=P(t.day,a);c&&r&&c!==r&&(o-=r);}return o}(n,t,e),n=pt(n,i,e,0);}a=Cn(e.epochMilliseconds(n.year,n.month,n.day),e.epochMilliseconds(t.year,t.month,t.day)),7===o&&(s=Math.trunc(a/7),a%=7);return nn({years:r,months:i,weeks:s,days:a,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0})}(r,i,o,a))}fields(n){return n.slice()}mergeFields(n,t){return yr(n,t)}toString(){return hr(this).id}}function gr(){return new mr("iso8601")}function yr(n,t){var e;const o={...n,...t};if(void 0!==n.year){delete o.era,delete o.eraYear,delete o.year;let e=!1;void 0===t.era&&void 0===t.eraYear||(o.era=t.era,o.eraYear=t.eraYear,e=!0),void 0!==t.year&&(o.year=t.year,e=!0),e||(o.year=n.year);}if(void 0!==n.monthCode){delete o.monthCode,delete o.month;let e=!1;void 0!==t.month&&(o.month=t.month,e=!0),void 0!==t.monthCode&&(o.monthCode=t.monthCode,e=!0),e||(o.monthCode=n.monthCode);}return void 0!==n.day&&(o.day=null!=(e=t.day)?e:n.day),o}function wr(n,t,e,o){const r=Sn(t,e,o);return ur(r,n.id),n.computeFields(r)}function pr(n){return void 0===n.calendar?gr():N(mr,n.calendar)}function vr(n,t){const{calendar:e}=n;return br(e,t.calendar),e}function Mr(n,t){const e=n.calendar,o=t.calendar;if("iso8601"===e.id)return o;if("iso8601"===o.id)return e;if(e.id!==o.id)throw new RangeError("Non-ISO calendars incompatible");return e}function br(n,t){if(n.toString()!==t.toString())throw new RangeError("Calendars must match")}mt(mr,"Calendar");class Sr extends U{constructor(n,t,e,o=gr()){const r=Hn({isoYear:n,isoMonth:t,isoDay:e},1),i=N(mr,o);!function(n,t){const e=Mn(n);Ge(e.add(e.sign()<0?86399999999999:0)),cr(e,t);}(r,i.toString()),super({...r,calendar:i});}static from(n,t){return s$1(t),n instanceof Sr?Ir(n.getISOFields()):"object"==typeof n?be(n,t):Ir(ne(xt(String(n))))}static compare(n,t){return Rn(N(Sr,n),N(Sr,t))}with(n,t){return De(this,n,t)}withCalendar(n){const t=this.getISOFields();return new Sr(t.isoYear,t.isoMonth,t.isoDay,n)}add(n,t){return this.calendar.dateAdd(this,n,t)}subtract(n,t){return this.calendar.dateAdd(this,N(ko,n).negated(),t)}until(n,t){return Fr(this,N(Sr,n),!1,t)}since(n,t){return Fr(this,N(Sr,n),!0,t)}equals(n){return !Rn(this,N(Sr,n))}toString(n){const t=Jn(n),e=this.getISOFields();return nt(e)+rt(e.calendar.toString(),t)}toZonedDateTime(n){const t=function(n){let t,e;if("string"==typeof n)e=n;else {if("object"!=typeof n)throw new TypeError("Invalid options/timeZone argument");if(void 0!==n.id?e=n:(e=n.timeZone,t=n.plainTime),void 0===e)throw new TypeError("Invalid timeZone argument")}return {plainTime:t,timeZone:e}}(n),e=N(we,t.timeZone),o=void 0===t.plainTime?void 0:N(ho,t.plainTime);return Fo({...this.getISOFields(),...o?o.getISOFields():on,timeZone:e})}toPlainDateTime(n){return Ho({...this.getISOFields(),...mo(n).getISOFields()})}toPlainYearMonth(){return vo(this.getISOFields())}toPlainMonthDay(){return this.calendar.monthDayFromFields(this)}}function Ir(n){return new Sr(n.isoYear,n.isoMonth,n.isoDay,n.calendar)}function Fr(n,t,e,o){return xo(Tr(n,t,vr(n,t),e,O(o,6,6,6,9)))}function Or(n,t,e,o,r){return Uo(Dr(n,t,e,r.largestUnit),n,t,e,o,r)}function Tr(n,t,e,o,r){return Uo(e.dateUntil(n,t,{largestUnit:M[r.largestUnit]}),n,t,e,o,r)}function Dr(n,t,e,o){if(!i(o))return Nr(n,t,o);const r=Ir({...n.getISOFields(),calendar:e});let s,a,c,u,d,l=Ir({...t.getISOFields(),calendar:e});do{a=e.dateUntil(r,l,{largestUnit:M[o]}),s=n.add(a),c=Nr(s,t,5),u=a.sign,d=c.sign;}while(u&&d&&u!==d&&(l=l.add({days:d})));return f=c,{sign:(h=a).sign||f.sign,years:h.years+f.years,months:h.months+f.months,weeks:h.weeks+f.weeks,days:h.days+f.days,hours:h.hours+f.hours,minutes:h.minutes+f.minutes,seconds:h.seconds+f.seconds,milliseconds:h.milliseconds+f.milliseconds,microseconds:h.microseconds+f.microseconds,nanoseconds:h.nanoseconds+f.nanoseconds};var h,f;}function Nr(n,t,e){return dn(On(t).sub(On(n)),e)}mt(Sr,"PlainDate"),dt(Sr),ft(Sr,ht),so(Sr,to({year:"numeric",month:"numeric",day:"numeric",weekday:void 0},{hour:void 0,minute:void 0,second:void 0}));class Yr extends E{constructor(n){super();const t=K(n,!0);!function(n){-1!==G(n,Ae)&&1!==G(n,$e)||Zn();}(t),this[vn]=t;}static from(n){if(n instanceof Yr)return new Yr(n.epochNanoseconds);const t=kt(String(n)),e=t.offsetNanoseconds;if(void 0===e)throw new RangeError("Must specify an offset");return new Yr(Mn(Ln(t,1)).sub(e))}static fromEpochSeconds(n){return new Yr(K(n).mult(1e9))}static fromEpochMilliseconds(n){return new Yr(K(n).mult(1e6))}static fromEpochMicroseconds(n){return new Yr(n*BigInt(1e3))}static fromEpochNanoseconds(n){return new Yr(n)}static compare(n,t){return jn(N(Yr,n),N(Yr,t))}add(n){return new Yr(Mt(this[vn],N(ko,n)))}subtract(n){return new Yr(Mt(this[vn],X(N(ko,n))))}until(n,t){return Er(this,N(Yr,n),t)}since(n,t){return Er(N(Yr,n),this,t)}round(n){const t=T(n,0,5,!0);return new Yr(Ve(this[vn],t))}equals(n){return !jn(this,N(Yr,n))}toString(n){const t=d(n).timeZone;return this.toZonedDateTimeISO(null!=t?t:"UTC").toString({...n,offset:void 0===t?"never":"auto",timeZoneName:"never"})+(void 0===t?"Z":"")}toZonedDateTimeISO(n){return new Io(this.epochNanoseconds,n)}toZonedDateTime(n){if(!h(n))throw new TypeError("Must specify options");if(void 0===n.calendar)throw new TypeError("Must specify a calendar");if(void 0===n.timeZone)throw new TypeError("Must specify a timeZone");return new Io(this.epochNanoseconds,n.timeZone,n.calendar)}}function Er(n,t,o){const r=O(o,3,0,0,5);return xo(function(n,t,o){return dn(q(t.sub(n),e[o.smallestUnit]*o.roundingIncrement,o.roundingFunc),o.largestUnit)}(n[vn],t[vn],r))}function Zr(){return Yr.fromEpochMilliseconds(this.valueOf())}mt(Yr,"Instant"),at(Yr),so(Yr,_e({year:"numeric",month:"numeric",day:"numeric",weekday:void 0,hour:"numeric",minute:"2-digit",second:"2-digit"},{timeZoneName:void 0},{}));const Cr=Symbol(),Ur=Symbol(),Pr=Symbol();class Rr extends Intl.DateTimeFormat{constructor(n,t){const e=ce(n),o=function(n){const t={};for(const e in n){let o=n[e];h(o)&&(o=o.toString()),t[e]=o;}return t}(t||{});super(e,o),this[Cr]=e,this[Ur]=o,this[Pr]=new Map;}format(n){const t=xr(this,n);return t[0]===this?super.format(t[1]):t[0].format(t[1])}formatToParts(n){return super.formatToParts.call(...xr(this,n))}formatRange(n,t){return super.formatRange.call(...jr(this,n,t))}formatRangeToParts(n,t){return super.formatRangeToParts.call(...jr(this,n,t))}}const kr=Rr;function xr(n,t){const e=ao(t);if(e){const o=qr(n,e);return [o.buildFormat(t),o.buildEpochMilli(t)]}return [n,t]}function jr(n,t,e){const o=ao(t);if(o!==ao(e))throw new TypeError("Mismatch of types");if(o){const r=qr(n,o);return [r.buildFormat(t,e),new Date(r.buildEpochMilli(t)),new Date(r.buildEpochMilli(e))]}return [n,t,e]}function qr(n,t){const e=n[Pr];let o=e.get(t);return o||(o=function(n){const t={};return {buildFormat:function(e,o){const r=n.buildKey(e,o),i=r.join("|");return t[i]||(t[i]=n.buildFormat(...r))},buildEpochMilli:n.buildEpochMilli}}(t(n[Cr],n[Ur])),e.set(t,o)),o}const Hr={zonedDateTimeISO:function(n){return Fo(Br("iso8601",n))},zonedDateTime:function(n,t){return Fo(Br(n,t))},plainDateTimeISO:function(n){return Ho(Br("iso8601",n))},plainDateTime:function(n,t){return Ho(Br(n,t))},plainDateISO:function(n){return Ir(Br("iso8601",n))},plainDate:function(n,t){return Ir(Br(n,t))},plainTimeISO:function(n){return fo(Br("iso8601",n))},instant:function(){return new Yr($r())},timeZone:Lr};mt(Hr,"Now");function Lr(){return new we((new ae).resolvedOptions().timeZone)}function Br(n,t=Lr()){const e=N(we,t);return {...Oo($r(),e)[0],timeZone:e,calendar:N(mr,n)}}function $r(){return K(Date.now()).mult(1e6)}const Ar={PlainYearMonth:po,PlainMonthDay:$o,PlainDate:Sr,PlainTime:ho,PlainDateTime:qo,ZonedDateTime:Io,Instant:Yr,Calendar:mr,TimeZone:we,Duration:ko,Now:Hr,[Symbol.toStringTag]:"Temporal"};function zr(){return "undefined"!=typeof globalThis?globalThis:window}
|
|
2029
|
+
function clampEntity(e, n, t, o, r) {
|
|
2030
|
+
const i = clampNumber(n, t, o);
|
|
2031
|
+
if (r && n !== i) {
|
|
2032
|
+
throw new RangeError(numberOutOfRange(e, n, t, o));
|
|
2033
|
+
}
|
|
2034
|
+
return i;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
function clampProp(e, n, t, o, r) {
|
|
2038
|
+
return clampEntity(n, getDefinedProp(e, n), t, o, r);
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
function getDefinedProp(e, n) {
|
|
2042
|
+
const t = e[n];
|
|
2043
|
+
if (void 0 === t) {
|
|
2044
|
+
throw new TypeError(missingField(n));
|
|
2045
|
+
}
|
|
2046
|
+
return t;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
function isObjectLike(e) {
|
|
2050
|
+
return null !== e && /object|function/.test(typeof e);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
function createLazyGenerator(e, n = Map) {
|
|
2054
|
+
const t = new n;
|
|
2055
|
+
return (n, ...o) => {
|
|
2056
|
+
if (t.has(n)) {
|
|
2057
|
+
return t.get(n);
|
|
2058
|
+
}
|
|
2059
|
+
const r = e(n, ...o);
|
|
2060
|
+
return t.set(n, r), r;
|
|
2061
|
+
};
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
function createNameDescriptors(e) {
|
|
2065
|
+
return createPropDescriptors({
|
|
2066
|
+
name: e
|
|
2067
|
+
}, 1);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function createPropDescriptors(e, n) {
|
|
2071
|
+
return mapProps((e => ({
|
|
2072
|
+
value: e,
|
|
2073
|
+
configurable: 1,
|
|
2074
|
+
writable: !n
|
|
2075
|
+
})), e);
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function createGetterDescriptors(e) {
|
|
2079
|
+
return mapProps((e => ({
|
|
2080
|
+
get: e,
|
|
2081
|
+
configurable: 1
|
|
2082
|
+
})), e);
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
function createStringTagDescriptors(e) {
|
|
2086
|
+
return {
|
|
2087
|
+
[Symbol.toStringTag]: {
|
|
2088
|
+
value: e,
|
|
2089
|
+
configurable: 1
|
|
2090
|
+
}
|
|
2091
|
+
};
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
function zipProps(e, n) {
|
|
2095
|
+
const t = {};
|
|
2096
|
+
let o = e.length;
|
|
2097
|
+
for (const r of n) {
|
|
2098
|
+
t[e[--o]] = r;
|
|
2099
|
+
}
|
|
2100
|
+
return t;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
function mapProps(e, n, t) {
|
|
2104
|
+
const o = {};
|
|
2105
|
+
for (const r in n) {
|
|
2106
|
+
o[r] = e(n[r], r, t);
|
|
2107
|
+
}
|
|
2108
|
+
return o;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
function mapPropNames(e, n, t) {
|
|
2112
|
+
const o = {};
|
|
2113
|
+
for (let r = 0; r < n.length; r++) {
|
|
2114
|
+
const i = n[r];
|
|
2115
|
+
o[i] = e(i, r, t);
|
|
2116
|
+
}
|
|
2117
|
+
return o;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
function remapProps(e, n, t) {
|
|
2121
|
+
const o = {};
|
|
2122
|
+
for (let r = 0; r < e.length; r++) {
|
|
2123
|
+
o[n[r]] = t[e[r]];
|
|
2124
|
+
}
|
|
2125
|
+
return o;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
function pluckProps(e, n) {
|
|
2129
|
+
const t = {};
|
|
2130
|
+
for (const o of e) {
|
|
2131
|
+
t[o] = n[o];
|
|
2132
|
+
}
|
|
2133
|
+
return t;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
function excludePropsByName(e, n) {
|
|
2137
|
+
const t = {};
|
|
2138
|
+
for (const o in n) {
|
|
2139
|
+
e.has(o) || (t[o] = n[o]);
|
|
2140
|
+
}
|
|
2141
|
+
return t;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
function excludeUndefinedProps(e) {
|
|
2145
|
+
e = {
|
|
2146
|
+
...e
|
|
2147
|
+
};
|
|
2148
|
+
const n = Object.keys(e);
|
|
2149
|
+
for (const t of n) {
|
|
2150
|
+
void 0 === e[t] && delete e[t];
|
|
2151
|
+
}
|
|
2152
|
+
return e;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
function hasAllPropsByName(e, n) {
|
|
2156
|
+
for (const t of n) {
|
|
2157
|
+
if (!(t in e)) {
|
|
2158
|
+
return 0;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
return 1;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
function allPropsEqual(e, n, t) {
|
|
2165
|
+
for (const o of e) {
|
|
2166
|
+
if (n[o] !== t[o]) {
|
|
2167
|
+
return 0;
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
return 1;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
function bindArgs(e, ...n) {
|
|
2174
|
+
return (...t) => e(...n, ...t);
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
function identity(e) {
|
|
2178
|
+
return e;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
function capitalize(e) {
|
|
2182
|
+
return e[0].toUpperCase() + e.substring(1);
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
function sortStrings(e) {
|
|
2186
|
+
return e.slice().sort();
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
function padNumber(e, n) {
|
|
2190
|
+
return String(n).padStart(e, "0");
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
function compareNumbers(e, n) {
|
|
2194
|
+
return Math.sign(e - n);
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
function clampNumber(e, n, t) {
|
|
2198
|
+
return Math.min(Math.max(e, n), t);
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
function divModFloor(e, n) {
|
|
2202
|
+
return [ Math.floor(e / n), modFloor(e, n) ];
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
function modFloor(e, n) {
|
|
2206
|
+
return (e % n + n) % n;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
function divModTrunc(e, n) {
|
|
2210
|
+
return [ divTrunc(e, n), modTrunc(e, n) ];
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
function divTrunc(e, n) {
|
|
2214
|
+
return Math.trunc(e / n) || 0;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
function modTrunc(e, n) {
|
|
2218
|
+
return e % n || 0;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
function hasHalf(e) {
|
|
2222
|
+
return .5 === Math.abs(e % 1);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
function givenFieldsToDayTimeNano(e, n, t) {
|
|
2226
|
+
let o = 0, r = 0;
|
|
2227
|
+
for (let i = 0; i <= n; i++) {
|
|
2228
|
+
const n = e[t[i]], a = U[i], s = A / a, [c, u] = divModTrunc(n, s);
|
|
2229
|
+
o += u * a, r += c;
|
|
2230
|
+
}
|
|
2231
|
+
const [i, a] = divModTrunc(o, A);
|
|
2232
|
+
return [ r + i, a ];
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
function nanoToGivenFields(e, n, t) {
|
|
2236
|
+
const o = {};
|
|
2237
|
+
for (let r = n; r >= 0; r--) {
|
|
2238
|
+
const n = U[r];
|
|
2239
|
+
o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);
|
|
2240
|
+
}
|
|
2241
|
+
return o;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
function getRequiredYearMonthFields(e) {
|
|
2245
|
+
return e === ae ? J : [];
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
function getRequiredMonthDayFields(e) {
|
|
2249
|
+
return e === ae ? X : [];
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
function getRequiredDateFields(e) {
|
|
2253
|
+
return e === ae ? [ "year", "day" ] : [];
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
function createDayTimeNano(e, n) {
|
|
2257
|
+
let [t, o] = divModTrunc(n, A), r = e + t;
|
|
2258
|
+
const i = Math.sign(r);
|
|
2259
|
+
return i && i === -Math.sign(o) && (r -= i, o += i * A), [ r, o ];
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
function addDayTimeNanoAndNumber(e, n) {
|
|
2263
|
+
return createDayTimeNano(e[0], e[1] + n);
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
function addDayTimeNanos(e, n, t = 1) {
|
|
2267
|
+
return createDayTimeNano(e[0] + n[0] * t, e[1] + n[1] * t);
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
function diffDayTimeNanos(e, n) {
|
|
2271
|
+
return createDayTimeNano(n[0] - e[0], n[1] - e[1]);
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
function compareDayTimeNanos(e, n) {
|
|
2275
|
+
return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
function bigIntToDayTimeNano(e, n = 1) {
|
|
2279
|
+
const t = BigInt(A / n);
|
|
2280
|
+
return [ Number(e / t), Number(e % t) * n ];
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
function numberToDayTimeNano(e, n = 1) {
|
|
2284
|
+
const t = A / n, [o, r] = divModTrunc(e, t);
|
|
2285
|
+
return [ o, r * n ];
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
function dayTimeNanoToBigInt(e, n = 1) {
|
|
2289
|
+
const [t, o] = e, r = Math.floor(o / n), i = A / n;
|
|
2290
|
+
return BigInt(t) * BigInt(i) + BigInt(r);
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
function dayTimeNanoToNumber(e, n = 1, t) {
|
|
2294
|
+
const [o, r] = dayTimeNanoToNumberRemainder(e, n);
|
|
2295
|
+
return o + (t ? r / n : 0);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
function dayTimeNanoToNumberRemainder(e, n) {
|
|
2299
|
+
const [t, o] = e, [r, i] = divModFloor(o, n);
|
|
2300
|
+
return [ t * (A / n) + r, i ];
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
function hashIntlFormatParts(e, n) {
|
|
2304
|
+
const t = e.formatToParts(n), o = {};
|
|
2305
|
+
for (const e of t) {
|
|
2306
|
+
o[e.type] = e.value;
|
|
2307
|
+
}
|
|
2308
|
+
return o;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
function checkIsoYearMonthInBounds(e) {
|
|
2312
|
+
return clampProp(e, "isoYear", ke, Ye, 1), e.isoYear === ke ? clampProp(e, "isoMonth", 4, 12, 1) : e.isoYear === Ye && clampProp(e, "isoMonth", 1, 9, 1),
|
|
2313
|
+
e;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
function checkIsoDateInBounds(e) {
|
|
2317
|
+
return checkIsoDateTimeInBounds({
|
|
2318
|
+
...e,
|
|
2319
|
+
...ve,
|
|
2320
|
+
isoHour: 12
|
|
2321
|
+
}), e;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
function checkIsoDateTimeInBounds(e) {
|
|
2325
|
+
const n = clampProp(e, "isoYear", ke, Ye, 1), t = n === ke ? 1 : n === Ye ? -1 : 0;
|
|
2326
|
+
return t && checkEpochNanoInBounds(isoToEpochNano({
|
|
2327
|
+
...e,
|
|
2328
|
+
isoDay: e.isoDay + t,
|
|
2329
|
+
isoNanosecond: e.isoNanosecond - t
|
|
2330
|
+
})), e;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
function checkEpochNanoInBounds(e) {
|
|
2334
|
+
if (!e || -1 === compareDayTimeNanos(e, Oe) || 1 === compareDayTimeNanos(e, we)) {
|
|
2335
|
+
throw new RangeError(y);
|
|
2336
|
+
}
|
|
2337
|
+
return e;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
function isoTimeFieldsToNano(e) {
|
|
2341
|
+
return givenFieldsToDayTimeNano(e, 5, ge)[1];
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
function nanoToIsoTimeAndDay(e) {
|
|
2345
|
+
const [n, t] = divModFloor(e, A);
|
|
2346
|
+
return [ nanoToGivenFields(t, 5, ge), n ];
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
function epochNanoToSec(e) {
|
|
2350
|
+
return dayTimeNanoToNumber(e, z);
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
function epochNanoToMilli(e) {
|
|
2354
|
+
return dayTimeNanoToNumber(e, Z);
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
function isoToEpochMilli(e) {
|
|
2358
|
+
return isoArgsToEpochMilli(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
function isoToEpochNano(e) {
|
|
2362
|
+
const n = isoToEpochMilli(e);
|
|
2363
|
+
if (void 0 !== n) {
|
|
2364
|
+
const [t, o] = divModTrunc(n, C);
|
|
2365
|
+
return [ t, o * Z + (e.isoMicrosecond || 0) * R + (e.isoNanosecond || 0) ];
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
function isoToEpochNanoWithOffset(e, n) {
|
|
2370
|
+
const [t, o] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) - n);
|
|
2371
|
+
return checkEpochNanoInBounds(isoToEpochNano({
|
|
2372
|
+
...e,
|
|
2373
|
+
isoDay: e.isoDay + o,
|
|
2374
|
+
...t
|
|
2375
|
+
}));
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
function isoArgsToEpochSec(...e) {
|
|
2379
|
+
return isoArgsToEpochMilli(...e) / B;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
function isoArgsToEpochMilli(...e) {
|
|
2383
|
+
const [n, t] = isoToLegacyDate(...e), o = n.getTime();
|
|
2384
|
+
if (!isNaN(o)) {
|
|
2385
|
+
return o - t * C;
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
function isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {
|
|
2390
|
+
const s = e === ke ? 1 : e === Ye ? -1 : 0, c = new Date;
|
|
2391
|
+
return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
function epochNanoToIso(e, n) {
|
|
2395
|
+
let [t, o] = addDayTimeNanoAndNumber(e, n);
|
|
2396
|
+
o < 0 && (o += A, t -= 1);
|
|
2397
|
+
const [r, i] = divModFloor(o, Z), [a, s] = divModFloor(i, R);
|
|
2398
|
+
return {
|
|
2399
|
+
...epochMilliToIso(t * C + r),
|
|
2400
|
+
isoMicrosecond: a,
|
|
2401
|
+
isoNanosecond: s
|
|
2402
|
+
};
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
function epochMilliToIso(e) {
|
|
2406
|
+
const n = e < -C * Se ? 1 : e > C * Se ? -1 : 0, t = new Date(e + n * C);
|
|
2407
|
+
return zipProps(Ne, [ t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate() - n, t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds(), t.getUTCMilliseconds() ]);
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
function computeIsoMonthsInYear() {
|
|
2411
|
+
return Re;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
function computeIsoDaysInMonth(e, n) {
|
|
2415
|
+
switch (n) {
|
|
2416
|
+
case 2:
|
|
2417
|
+
return computeIsoInLeapYear(e) ? 29 : 28;
|
|
2418
|
+
|
|
2419
|
+
case 4:
|
|
2420
|
+
case 6:
|
|
2421
|
+
case 9:
|
|
2422
|
+
case 11:
|
|
2423
|
+
return 30;
|
|
2424
|
+
}
|
|
2425
|
+
return 31;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
function computeIsoDaysInYear(e) {
|
|
2429
|
+
return computeIsoInLeapYear(e) ? 366 : 365;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
function computeIsoInLeapYear(e) {
|
|
2433
|
+
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
function computeIsoDayOfYear(e) {
|
|
2437
|
+
return diffEpochMilliByDay(isoToEpochMilli(isoDateYearStart(e)), isoToEpochMilli({
|
|
2438
|
+
...e,
|
|
2439
|
+
...ve
|
|
2440
|
+
})) + 1;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
function computeIsoDayOfWeek(e) {
|
|
2444
|
+
const [n, t] = isoToLegacyDate(e.isoYear, e.isoMonth, e.isoDay);
|
|
2445
|
+
return modFloor(n.getUTCDay() - t, 7) || 7;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
function computeIsoWeekParts(e) {
|
|
2449
|
+
const n = computeIsoDayOfYear(e), t = computeIsoDayOfWeek(e), o = computeIsoDayOfWeek(isoDateYearStart(e)), r = Math.floor((n - t + 10) / Ze), {isoYear: i} = e;
|
|
2450
|
+
return r < 1 ? [ i - 1, 5 === o || 6 === o && computeIsoInLeapYear(i - 1) ? 53 : 52 ] : 53 === r && computeIsoDaysInYear(i) - n < 4 - t ? [ i + 1, 1 ] : [ i, r ];
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
function isoDateYearStart(e) {
|
|
2454
|
+
return {
|
|
2455
|
+
...e,
|
|
2456
|
+
isoMonth: 1,
|
|
2457
|
+
isoDay: 1,
|
|
2458
|
+
...ve
|
|
2459
|
+
};
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
function computeGregoryEraParts({isoYear: e}) {
|
|
2463
|
+
return e < 1 ? [ "bce", 1 - e ] : [ "ce", e ];
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
function computeJapaneseEraParts(e) {
|
|
2467
|
+
const n = isoToEpochMilli(e);
|
|
2468
|
+
if (n < ze) {
|
|
2469
|
+
return computeGregoryEraParts(e);
|
|
2470
|
+
}
|
|
2471
|
+
const t = hashIntlFormatParts(Hn(ce), n), {era: o, eraYear: r} = parseIntlYear(t, ce);
|
|
2472
|
+
return [ o, r ];
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
function checkIsoDateTimeFields(e) {
|
|
2476
|
+
return checkIsoDateFields(e), constrainIsoTimeFields(e, 1), e;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
function checkIsoDateFields(e) {
|
|
2480
|
+
return constrainIsoDateFields(e, 1), e;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
function isIsoDateFieldsValid(e) {
|
|
2484
|
+
return allPropsEqual(ye, e, constrainIsoDateFields(e));
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
function constrainIsoDateFields(e, n) {
|
|
2488
|
+
const {isoYear: t} = e, o = clampProp(e, "isoMonth", 1, computeIsoMonthsInYear(), n);
|
|
2489
|
+
return {
|
|
2490
|
+
isoYear: t,
|
|
2491
|
+
isoMonth: o,
|
|
2492
|
+
isoDay: clampProp(e, "isoDay", 1, computeIsoDaysInMonth(t, o), n)
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
function constrainIsoTimeFields(e, n) {
|
|
2497
|
+
return zipProps(ge, [ clampProp(e, "isoHour", 0, 23, n), clampProp(e, "isoMinute", 0, 59, n), clampProp(e, "isoSecond", 0, 59, n), clampProp(e, "isoMillisecond", 0, 999, n), clampProp(e, "isoMicrosecond", 0, 999, n), clampProp(e, "isoNanosecond", 0, 999, n) ]);
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
function requireObjectLike(e) {
|
|
2501
|
+
if (!isObjectLike(e)) {
|
|
2502
|
+
throw new TypeError(n);
|
|
2503
|
+
}
|
|
2504
|
+
return e;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
function requireType(e, n, t = e) {
|
|
2508
|
+
if (typeof n !== e) {
|
|
2509
|
+
throw new TypeError(invalidEntity(t, n));
|
|
2510
|
+
}
|
|
2511
|
+
return n;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
function requireStringOrUndefined(e) {
|
|
2515
|
+
if (void 0 !== e && "string" != typeof e) {
|
|
2516
|
+
throw new TypeError("Expected string or undefined");
|
|
2517
|
+
}
|
|
2518
|
+
return e;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
function requireIntegerOrUndefined(e) {
|
|
2522
|
+
if ("number" == typeof e) {
|
|
2523
|
+
requireNumberIsInteger(e);
|
|
2524
|
+
} else if (void 0 !== e) {
|
|
2525
|
+
throw new TypeError("Expected integer or undefined");
|
|
2526
|
+
}
|
|
2527
|
+
return e;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
function requireInteger(e) {
|
|
2531
|
+
return requireNumberIsInteger(Ue(e));
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
function requirePositiveInteger(e) {
|
|
2535
|
+
return requireNumberIsPositive(requireInteger(e));
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
function requireNumberIsInteger(e, n = "number") {
|
|
2539
|
+
if (!Number.isInteger(e)) {
|
|
2540
|
+
throw new RangeError(expectedInteger(n, e));
|
|
2541
|
+
}
|
|
2542
|
+
return e || 0;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
function requireNumberIsPositive(e, n = "number") {
|
|
2546
|
+
if (e <= 0) {
|
|
2547
|
+
throw new RangeError(expectedPositive(n, e));
|
|
2548
|
+
}
|
|
2549
|
+
return e;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
function requireNonNullish(e) {
|
|
2553
|
+
if (null == e) {
|
|
2554
|
+
throw new TypeError("Cannot be null or undefined");
|
|
2555
|
+
}
|
|
2556
|
+
return e;
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
function requirePropDefined(e, n) {
|
|
2560
|
+
if (null == n) {
|
|
2561
|
+
throw new RangeError(missingField(e));
|
|
2562
|
+
}
|
|
2563
|
+
return n;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
function toString(n) {
|
|
2567
|
+
if ("symbol" == typeof n) {
|
|
2568
|
+
throw new TypeError(e);
|
|
2569
|
+
}
|
|
2570
|
+
return String(n);
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
function toStringViaPrimitive(e, n) {
|
|
2574
|
+
return isObjectLike(e) ? String(e) : Le(e, n);
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
function toBigInt(e) {
|
|
2578
|
+
if ("string" == typeof e) {
|
|
2579
|
+
return BigInt(e);
|
|
2580
|
+
}
|
|
2581
|
+
if ("bigint" != typeof e) {
|
|
2582
|
+
throw new TypeError(invalidBigInt(e));
|
|
2583
|
+
}
|
|
2584
|
+
return e;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
function toNumber(e, n = "number") {
|
|
2588
|
+
if ("bigint" == typeof e) {
|
|
2589
|
+
throw new TypeError(forbiddenBigIntToNumber(n));
|
|
2590
|
+
}
|
|
2591
|
+
if (e = Number(e), !Number.isFinite(e)) {
|
|
2592
|
+
throw new RangeError(expectedFinite(n, e));
|
|
2593
|
+
}
|
|
2594
|
+
return e;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
function toInteger(e, n) {
|
|
2598
|
+
return Math.trunc(toNumber(e, n)) || 0;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
function toStrictInteger(e, n) {
|
|
2602
|
+
return requireNumberIsInteger(toNumber(e, n), n);
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
function toPositiveInteger(e, n) {
|
|
2606
|
+
return requireNumberIsPositive(toInteger(e, n), n);
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
function refineOverflowOptions(e) {
|
|
2610
|
+
return void 0 === e ? 0 : an(requireObjectLike(e));
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
function refineZonedFieldOptions(e, n = 0) {
|
|
2614
|
+
e = normalizeOptions(e);
|
|
2615
|
+
const t = sn(e), o = cn(e, n);
|
|
2616
|
+
return [ an(e), o, t ];
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
function refineEpochDisambigOptions(e) {
|
|
2620
|
+
return sn(normalizeOptions(e));
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
function refineCalendarDiffOptions(e) {
|
|
2624
|
+
return e = normalizeOptions(e), on(e, 9, 6, 1);
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
function refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {
|
|
2628
|
+
n = normalizeOptions(n);
|
|
2629
|
+
let a = on(n, o, r), s = parseRoundingIncInteger(n), c = dn(n, i);
|
|
2630
|
+
const u = tn(n, o, r, 1);
|
|
2631
|
+
return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1),
|
|
2632
|
+
e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
function refineRoundOptions(e, n = 6, t) {
|
|
2636
|
+
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e, We));
|
|
2637
|
+
const r = dn(e, 7);
|
|
2638
|
+
let i = tn(e, n);
|
|
2639
|
+
return i = requirePropDefined(We, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
function refineDateDisplayOptions(e) {
|
|
2643
|
+
return un(normalizeOptions(e));
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
function refineTimeDisplayOptions(e, n) {
|
|
2647
|
+
return refineTimeDisplayTuple(normalizeOptions(e), n);
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
function refineTimeDisplayTuple(e, n = 4) {
|
|
2651
|
+
const t = refineSubsecDigits(e);
|
|
2652
|
+
return [ dn(e, 4), ...refineSmallestUnitAndSubsecDigits(tn(e, n), t) ];
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
function refineSmallestUnitAndSubsecDigits(e, n) {
|
|
2656
|
+
return null != e ? [ U[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
function parseRoundingIncInteger(e) {
|
|
2660
|
+
const n = e[$e];
|
|
2661
|
+
return void 0 === n ? 1 : toInteger(n, $e);
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
function refineRoundingInc(e, n, t, o) {
|
|
2665
|
+
const r = o ? A : U[n + 1];
|
|
2666
|
+
if (r) {
|
|
2667
|
+
const t = U[n];
|
|
2668
|
+
if (r % ((e = clampEntity($e, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {
|
|
2669
|
+
throw new RangeError(invalidEntity($e, e));
|
|
2670
|
+
}
|
|
2671
|
+
} else {
|
|
2672
|
+
e = clampEntity($e, e, 1, t ? 10 ** 9 : 1, 1);
|
|
2673
|
+
}
|
|
2674
|
+
return e;
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
function refineSubsecDigits(e) {
|
|
2678
|
+
let n = e[Ge];
|
|
2679
|
+
if (void 0 !== n) {
|
|
2680
|
+
if ("number" != typeof n) {
|
|
2681
|
+
if ("auto" === toString(n)) {
|
|
2682
|
+
return;
|
|
2683
|
+
}
|
|
2684
|
+
throw new RangeError(invalidEntity(Ge, n));
|
|
2685
|
+
}
|
|
2686
|
+
n = clampEntity(Ge, Math.floor(n), 0, 9, 1);
|
|
2687
|
+
}
|
|
2688
|
+
return n;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
function normalizeOptions(e) {
|
|
2692
|
+
return void 0 === e ? {} : requireObjectLike(e);
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
function normalizeUnitNameOptions(e, n) {
|
|
2696
|
+
return "string" == typeof e ? {
|
|
2697
|
+
[n]: e
|
|
2698
|
+
} : requireObjectLike(e);
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
function copyOptions(e) {
|
|
2702
|
+
if (void 0 !== e) {
|
|
2703
|
+
if (isObjectLike(e)) {
|
|
2704
|
+
return Object.assign(Object.create(null), e);
|
|
2705
|
+
}
|
|
2706
|
+
throw new TypeError(n);
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
function overrideOverflowOptions(e, n) {
|
|
2711
|
+
return e && Object.assign(Object.create(null), e, {
|
|
2712
|
+
overflow: _e[n]
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
function refineUnitOption(e, n, t = 9, o = 0, r) {
|
|
2717
|
+
let i = n[e];
|
|
2718
|
+
if (void 0 === i) {
|
|
2719
|
+
return r ? o : void 0;
|
|
2720
|
+
}
|
|
2721
|
+
if (i = toString(i), "auto" === i) {
|
|
2722
|
+
return r ? o : null;
|
|
2723
|
+
}
|
|
2724
|
+
let a = Y[i];
|
|
2725
|
+
if (void 0 === a && (a = Te[i]), void 0 === a) {
|
|
2726
|
+
throw new RangeError(invalidEntity(e, i));
|
|
2727
|
+
}
|
|
2728
|
+
return clampEntity(e, a, o, t, 1), a;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
function refineChoiceOption(e, n, t, o = 0) {
|
|
2732
|
+
const r = t[e];
|
|
2733
|
+
if (void 0 === r) {
|
|
2734
|
+
return o;
|
|
2735
|
+
}
|
|
2736
|
+
const i = toString(r), a = n[i];
|
|
2737
|
+
if (void 0 === a) {
|
|
2738
|
+
throw new RangeError(invalidEntity(e, i));
|
|
2739
|
+
}
|
|
2740
|
+
return a;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
function checkLargestSmallestUnit(e, n) {
|
|
2744
|
+
if (n > e) {
|
|
2745
|
+
throw new RangeError(v);
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
function createInstantSlots(e) {
|
|
2750
|
+
return {
|
|
2751
|
+
branding: gn,
|
|
2752
|
+
epochNanoseconds: e
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
function createZonedDateTimeSlots(e, n, t) {
|
|
2757
|
+
return {
|
|
2758
|
+
branding: In,
|
|
2759
|
+
calendar: t,
|
|
2760
|
+
timeZone: n,
|
|
2761
|
+
epochNanoseconds: e
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
function createPlainDateTimeSlots(e, n = e.calendar) {
|
|
2766
|
+
return {
|
|
2767
|
+
branding: Tn,
|
|
2768
|
+
calendar: n,
|
|
2769
|
+
...pluckProps(Ee, e)
|
|
2770
|
+
};
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
function createPlainDateSlots(e, n = e.calendar) {
|
|
2774
|
+
return {
|
|
2775
|
+
branding: hn,
|
|
2776
|
+
calendar: n,
|
|
2777
|
+
...pluckProps(Me, e)
|
|
2778
|
+
};
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
function createPlainYearMonthSlots(e, n = e.calendar) {
|
|
2782
|
+
return {
|
|
2783
|
+
branding: mn,
|
|
2784
|
+
calendar: n,
|
|
2785
|
+
...pluckProps(Me, e)
|
|
2786
|
+
};
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
function createPlainMonthDaySlots(e, n = e.calendar) {
|
|
2790
|
+
return {
|
|
2791
|
+
branding: pn,
|
|
2792
|
+
calendar: n,
|
|
2793
|
+
...pluckProps(Me, e)
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
function createPlainTimeSlots(e) {
|
|
2798
|
+
return {
|
|
2799
|
+
branding: Dn,
|
|
2800
|
+
...pluckProps(Pe, e)
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
function createDurationSlots(e) {
|
|
2805
|
+
return {
|
|
2806
|
+
branding: yn,
|
|
2807
|
+
...pluckProps(me, e)
|
|
2808
|
+
};
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
function getEpochSeconds(e) {
|
|
2812
|
+
return epochNanoToSec(e.epochNanoseconds);
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
function getEpochMilliseconds(e) {
|
|
2816
|
+
return epochNanoToMilli(e.epochNanoseconds);
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
function getEpochMicroseconds(e) {
|
|
2820
|
+
return dayTimeNanoToBigInt(e.epochNanoseconds, R);
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
function getEpochNanoseconds(e) {
|
|
2824
|
+
return dayTimeNanoToBigInt(e.epochNanoseconds);
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
function getId(e) {
|
|
2828
|
+
return "string" == typeof e ? e : Le(e.id);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
function isIdLikeEqual(e, n) {
|
|
2832
|
+
return e === n || getId(e) === getId(n);
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
function totalDuration(e, n, t, o, r) {
|
|
2836
|
+
const i = getLargestDurationUnit(o), [a, s] = ((e, n) => {
|
|
2837
|
+
const t = n((e = normalizeUnitNameOptions(e, xe))[He]);
|
|
2838
|
+
let o = rn(e);
|
|
2839
|
+
return o = requirePropDefined(xe, o), [ o, t ];
|
|
2840
|
+
})(r, e), c = Math.max(a, i);
|
|
2841
|
+
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
2842
|
+
return ((e, n) => totalDayTimeNano(durationFieldsToDayTimeNano(e, 6), n))(o, a);
|
|
2843
|
+
}
|
|
2844
|
+
if (!s) {
|
|
2845
|
+
throw new RangeError(M);
|
|
2846
|
+
}
|
|
2847
|
+
const u = createMarkerSystem(n, t, s);
|
|
2848
|
+
return ((e, n, t, o, r, i) => {
|
|
2849
|
+
const a = Sn(e), [s, c] = clampRelativeDuration(clearDurationFields(e, t - 1), t, a, o, r, i), u = computeEpochNanoFrac(s, c, n);
|
|
2850
|
+
return e[de[t]] + u * a;
|
|
2851
|
+
})(...spanDuration(o, void 0, a, ...u), a, ...u);
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
function totalDayTimeNano(e, n) {
|
|
2855
|
+
return dayTimeNanoToNumber(e, U[n], 1);
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
function clampRelativeDuration(e, n, t, o, r, i) {
|
|
2859
|
+
const a = {
|
|
2860
|
+
...De,
|
|
2861
|
+
[de[n]]: t
|
|
2862
|
+
}, s = i(o, e), c = i(s, a);
|
|
2863
|
+
return [ r(s), r(c) ];
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
function computeEpochNanoFrac(e, n, t) {
|
|
2867
|
+
const o = dayTimeNanoToNumber(diffDayTimeNanos(e, n));
|
|
2868
|
+
if (!o) {
|
|
2869
|
+
throw new RangeError(p);
|
|
2870
|
+
}
|
|
2871
|
+
return dayTimeNanoToNumber(diffDayTimeNanos(e, t)) / o;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
function roundInstant(e, n) {
|
|
2875
|
+
const [t, o, r] = refineRoundOptions(n, 5, 1);
|
|
2876
|
+
return createInstantSlots(roundDayTimeNano(e.epochNanoseconds, t, o, r, 1));
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
function roundZonedDateTime(e, n, t) {
|
|
2880
|
+
let {epochNanoseconds: o, timeZone: r, calendar: i} = n;
|
|
2881
|
+
const [a, s, c] = refineRoundOptions(t);
|
|
2882
|
+
if (0 === a && 1 === s) {
|
|
2883
|
+
return n;
|
|
2884
|
+
}
|
|
2885
|
+
const u = e(r), l = u.getOffsetNanosecondsFor(o);
|
|
2886
|
+
let f = {
|
|
2887
|
+
...epochNanoToIso(o, l),
|
|
2888
|
+
calendar: i
|
|
2889
|
+
};
|
|
2890
|
+
return f = {
|
|
2891
|
+
calendar: i,
|
|
2892
|
+
...roundDateTime(f, a, s, c, u)
|
|
2893
|
+
}, o = getMatchingInstantFor(u, f, l, 2, 0, 1), createZonedDateTimeSlots(o, r, i);
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
function roundPlainDateTime(e, n) {
|
|
2897
|
+
return createPlainDateTimeSlots(roundDateTime(e, ...refineRoundOptions(n)), e.calendar);
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
function roundPlainTime(e, n) {
|
|
2901
|
+
return createPlainTimeSlots(((e, n, t, o) => roundTimeToNano(e, computeNanoInc(n, t), o)[0])(e, ...refineRoundOptions(n, 5)));
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
function roundDateTime(e, n, t, o, r) {
|
|
2905
|
+
return 6 === n ? ((e, n, t) => {
|
|
2906
|
+
if (n) {
|
|
2907
|
+
const o = computeNanosecondsInDay(n, e);
|
|
2908
|
+
return checkIsoDateTimeInBounds({
|
|
2909
|
+
...moveByIsoDays(e, roundByInc(isoTimeFieldsToNano(e), o, t) / o),
|
|
2910
|
+
...ve
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2913
|
+
return roundDateTimeToNano(e, A, t);
|
|
2914
|
+
})(e, r, o) : roundDateTimeToNano(e, computeNanoInc(n, t), o);
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
function roundDateTimeToNano(e, n, t) {
|
|
2918
|
+
const [o, r] = roundTimeToNano(e, n, t);
|
|
2919
|
+
return checkIsoDateTimeInBounds({
|
|
2920
|
+
...moveByIsoDays(e, r),
|
|
2921
|
+
...o
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
function roundTimeToNano(e, n, t) {
|
|
2926
|
+
return nanoToIsoTimeAndDay(roundByInc(isoTimeFieldsToNano(e), n, t));
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
function balanceDayTimeDuration(e, n, t, o, r) {
|
|
2930
|
+
return nanoToDurationDayTimeFields(roundDayTimeNano(durationFieldsToDayTimeNano(e, 6), t, o, r), n);
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
function balanceDayTimeDurationByInc(e, n, t, o) {
|
|
2934
|
+
return nanoToDurationDayTimeFields(roundDayTimeNanoByInc(durationFieldsToDayTimeNano(e, n), t, o), n);
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
2938
|
+
const u = s === identity ? o > 6 ? nudgeRelativeDuration : 6 === o ? nudgeDurationDayTime : nudgeRelativeDurationTime : o > 6 ? nudgeRelativeDuration : nudgeDurationDayTime;
|
|
2939
|
+
let [l, f, d] = u(e, n, t, o, r, i, a, s, c);
|
|
2940
|
+
return d && (l = ((e, n, t, o, r, i, a) => {
|
|
2941
|
+
const s = Sn(e);
|
|
2942
|
+
for (let c = o + 1; c <= t; c++) {
|
|
2943
|
+
if (7 === c && 7 !== t) {
|
|
2944
|
+
continue;
|
|
2945
|
+
}
|
|
2946
|
+
const o = clearDurationFields(e, c - 1);
|
|
2947
|
+
o[de[c]] += s;
|
|
2948
|
+
const u = dayTimeNanoToNumber(diffDayTimeNanos(i(a(r, o)), n));
|
|
2949
|
+
if (u && Math.sign(u) !== s) {
|
|
2950
|
+
break;
|
|
2951
|
+
}
|
|
2952
|
+
e = o;
|
|
2953
|
+
}
|
|
2954
|
+
return e;
|
|
2955
|
+
})(l, f, t, Math.max(6, o), a, s, c)), l;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
function computeNanoInc(e, n) {
|
|
2959
|
+
return U[e] * n;
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
function roundByInc(e, n, t) {
|
|
2963
|
+
return ((e, n) => Nn[n](e))(e / n, t) * n;
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
function roundToMinute(e) {
|
|
2967
|
+
return roundByInc(e, q, 7);
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
function roundDayTimeNano(e, n, t, o, r) {
|
|
2971
|
+
return 6 === n ? [ roundByInc(totalDayTimeNano(e, 6), t, o), 0 ] : roundDayTimeNanoByInc(e, computeNanoInc(n, t), o, r);
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
function roundDayTimeNanoByInc(e, n, t, o) {
|
|
2975
|
+
let [r, i] = e;
|
|
2976
|
+
o && i < 0 && (i += A, r -= 1);
|
|
2977
|
+
const [a, s] = divModFloor(roundByInc(i, n, t), A);
|
|
2978
|
+
return createDayTimeNano(r + a, s);
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
function nudgeDurationDayTime(e, n, t, o, r, i) {
|
|
2982
|
+
const a = Sn(e), s = durationFieldsToDayTimeNano(e, 6), c = roundDayTimeNano(s, o, r, i), u = diffDayTimeNanos(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));
|
|
2983
|
+
return [ {
|
|
2984
|
+
...e,
|
|
2985
|
+
...f
|
|
2986
|
+
}, addDayTimeNanos(n, u), l ];
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
function nudgeRelativeDurationTime(e, n, t, o, r, i, a, s, c) {
|
|
2990
|
+
const u = Sn(e);
|
|
2991
|
+
let [l, f] = givenFieldsToDayTimeNano(e, 5, de);
|
|
2992
|
+
const d = computeNanoInc(o, r);
|
|
2993
|
+
let m = roundByInc(f, d, i);
|
|
2994
|
+
const [p, h] = clampRelativeDuration({
|
|
2995
|
+
...e,
|
|
2996
|
+
...Ie
|
|
2997
|
+
}, 6, u, a, s, c), T = m - dayTimeNanoToNumber(diffDayTimeNanos(p, h));
|
|
2998
|
+
T && Math.sign(T) !== u ? n = addDayTimeNanoAndNumber(p, m) : (l += u, m = roundByInc(T, d, i),
|
|
2999
|
+
n = addDayTimeNanoAndNumber(h, m));
|
|
3000
|
+
const D = nanoToDurationTimeFields(m);
|
|
3001
|
+
return [ {
|
|
3002
|
+
...e,
|
|
3003
|
+
...D,
|
|
3004
|
+
days: e.days + l
|
|
3005
|
+
}, n, Boolean(l) ];
|
|
3006
|
+
}
|
|
3007
|
+
|
|
3008
|
+
function nudgeRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
3009
|
+
const u = Sn(e), l = de[o], f = clearDurationFields(e, o - 1), d = divTrunc(e[l], r) * r;
|
|
3010
|
+
f[l] = d;
|
|
3011
|
+
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i), D = Math.sign(T - h) === u;
|
|
3012
|
+
return f[l] = T, [ f, D ? p : m, D ];
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
function formatInstantIso(e, n, t, o) {
|
|
3016
|
+
const [r, i, a, s] = (e => {
|
|
3017
|
+
const n = refineTimeDisplayTuple(e = normalizeOptions(e));
|
|
3018
|
+
return [ e.timeZone, ...n ];
|
|
3019
|
+
})(o), c = void 0 !== r;
|
|
3020
|
+
return ((e, n, t, o, r, i) => {
|
|
3021
|
+
t = roundDayTimeNanoByInc(t, r, o, 1);
|
|
3022
|
+
const a = n.getOffsetNanosecondsFor(t);
|
|
3023
|
+
return formatIsoDateTimeFields(epochNanoToIso(t, a), i) + (e ? formatOffsetNano(roundToMinute(a)) : "Z");
|
|
3024
|
+
})(c, n(c ? e(r) : Mn), t.epochNanoseconds, i, a, s);
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
function formatZonedDateTimeIso(e, n, t) {
|
|
3028
|
+
return ((e, n, t, o, r, i, a, s, c, u) => {
|
|
3029
|
+
o = roundDayTimeNanoByInc(o, c, s, 1);
|
|
3030
|
+
const l = e(t).getOffsetNanosecondsFor(o);
|
|
3031
|
+
return formatIsoDateTimeFields(epochNanoToIso(o, l), u) + formatOffsetNano(roundToMinute(l), a) + ((e, n) => 1 !== n ? "[" + (2 === n ? "!" : "") + getId(e) + "]" : "")(t, i) + formatCalendar(n, r);
|
|
3032
|
+
})(e, n.calendar, n.timeZone, n.epochNanoseconds, ...(e => {
|
|
3033
|
+
e = normalizeOptions(e);
|
|
3034
|
+
const n = un(e), t = refineSubsecDigits(e), o = fn(e), r = dn(e, 4), i = tn(e, 4);
|
|
3035
|
+
return [ n, ln(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];
|
|
3036
|
+
})(t));
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
function formatPlainDateTimeIso(e, n) {
|
|
3040
|
+
return ((e, n, t, o, r, i) => formatIsoDateTimeFields(roundDateTimeToNano(n, r, o), i) + formatCalendar(e, t))(e.calendar, e, ...(e => (e = normalizeOptions(e),
|
|
3041
|
+
[ un(e), ...refineTimeDisplayTuple(e) ]))(n));
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
function formatPlainDateIso(e, n) {
|
|
3045
|
+
return t = e.calendar, o = e, r = refineDateDisplayOptions(n), formatIsoDateFields(o) + formatCalendar(t, r);
|
|
3046
|
+
var t, o, r;
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
function formatPlainYearMonthIso(e, n) {
|
|
3050
|
+
return formatDateLikeIso(e.calendar, formatIsoYearMonthFields, e, refineDateDisplayOptions(n));
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
function formatPlainMonthDayIso(e, n) {
|
|
3054
|
+
return formatDateLikeIso(e.calendar, formatIsoMonthDayFields, e, refineDateDisplayOptions(n));
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
function formatPlainTimeIso(e, n) {
|
|
3058
|
+
return ((e, n, t, o) => formatIsoTimeFields(roundTimeToNano(e, t, n)[0], o))(e, ...refineTimeDisplayOptions(n));
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
function formatDurationIso(e, n) {
|
|
3062
|
+
const [t, o, r] = refineTimeDisplayOptions(n, 3);
|
|
3063
|
+
return o > 1 && (e = {
|
|
3064
|
+
...e,
|
|
3065
|
+
...balanceDayTimeDurationByInc(e, Math.min(getLargestDurationUnit(e), 6), o, t)
|
|
3066
|
+
}), ((e, n) => {
|
|
3067
|
+
const t = Sn(e), o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = dayTimeNanoToNumberRemainder(givenFieldsToDayTimeNano(o, 3, de), z), c = formatSubsecNano(s, n), u = n >= 0 || !t || c;
|
|
3068
|
+
return (t < 0 ? "-" : "") + "P" + formatDurationFragments({
|
|
3069
|
+
Y: formatNumberUnscientific(o.years),
|
|
3070
|
+
M: formatNumberUnscientific(o.months),
|
|
3071
|
+
W: formatNumberUnscientific(o.weeks),
|
|
3072
|
+
D: formatNumberUnscientific(o.days)
|
|
3073
|
+
}) + (r || i || a || u ? "T" + formatDurationFragments({
|
|
3074
|
+
H: formatNumberUnscientific(r),
|
|
3075
|
+
M: formatNumberUnscientific(i),
|
|
3076
|
+
S: formatNumberUnscientific(a, u) + c
|
|
3077
|
+
}) : "");
|
|
3078
|
+
})(e, r);
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
function formatDateLikeIso(e, n, t, o) {
|
|
3082
|
+
const r = getId(e), i = o > 1 || 0 === o && r !== ae;
|
|
3083
|
+
return 1 === o ? r === ae ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
function formatDurationFragments(e) {
|
|
3087
|
+
const n = [];
|
|
3088
|
+
for (const t in e) {
|
|
3089
|
+
const o = e[t];
|
|
3090
|
+
o && n.push(o, t);
|
|
3091
|
+
}
|
|
3092
|
+
return n.join("");
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
function formatIsoDateTimeFields(e, n) {
|
|
3096
|
+
return formatIsoDateFields(e) + "T" + formatIsoTimeFields(e, n);
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
function formatIsoDateFields(e) {
|
|
3100
|
+
return formatIsoYearMonthFields(e) + "-" + O(e.isoDay);
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
function formatIsoYearMonthFields(e) {
|
|
3104
|
+
const {isoYear: n} = e;
|
|
3105
|
+
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" + O(e.isoMonth);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
function formatIsoMonthDayFields(e) {
|
|
3109
|
+
return O(e.isoMonth) + "-" + O(e.isoDay);
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
function formatIsoTimeFields(e, n) {
|
|
3113
|
+
const t = [ O(e.isoHour), O(e.isoMinute) ];
|
|
3114
|
+
return -1 !== n && t.push(O(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * Z + n * R + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)),
|
|
3115
|
+
t.join(":");
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
function formatOffsetNano(e, n = 0) {
|
|
3119
|
+
if (1 === n) {
|
|
3120
|
+
return "";
|
|
3121
|
+
}
|
|
3122
|
+
const [t, o] = divModFloor(Math.abs(e), L), [r, i] = divModFloor(o, q), [a, s] = divModFloor(i, z);
|
|
3123
|
+
return getSignStr(e) + O(t) + ":" + O(r) + (a || s ? ":" + O(a) + formatSubsecNano(s) : "");
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
function formatCalendar(e, n) {
|
|
3127
|
+
if (1 !== n) {
|
|
3128
|
+
const t = getId(e);
|
|
3129
|
+
if (n > 1 || 0 === n && t !== ae) {
|
|
3130
|
+
return formatCalendarId(t, 2 === n);
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
return "";
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
function formatCalendarId(e, n) {
|
|
3137
|
+
return "[" + (n ? "!" : "") + "u-ca=" + e + "]";
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
function formatSubsecNano(e, n) {
|
|
3141
|
+
let t = padNumber(9, e);
|
|
3142
|
+
return t = void 0 === n ? t.replace(Fn, "") : t.slice(0, n), t ? "." + t : "";
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3145
|
+
function getSignStr(e) {
|
|
3146
|
+
return e < 0 ? "-" : "+";
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
function formatNumberUnscientific(e, n) {
|
|
3150
|
+
return e || n ? e.toLocaleString("fullwide", {
|
|
3151
|
+
useGrouping: 0
|
|
3152
|
+
}) : "";
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
function zonedEpochNanoToIso(e, n) {
|
|
3156
|
+
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
function _zonedEpochSlotsToIso(e, n) {
|
|
3160
|
+
const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = epochNanoToIso(t, o);
|
|
3161
|
+
return {
|
|
3162
|
+
calendar: e.calendar,
|
|
3163
|
+
...r,
|
|
3164
|
+
offsetNanoseconds: o
|
|
3165
|
+
};
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
function buildZonedIsoFields(e, n) {
|
|
3169
|
+
const t = bn(n, e);
|
|
3170
|
+
return {
|
|
3171
|
+
calendar: n.calendar,
|
|
3172
|
+
...pluckProps(Ee, t),
|
|
3173
|
+
offset: formatOffsetNano(t.offsetNanoseconds),
|
|
3174
|
+
timeZone: n.timeZone
|
|
3175
|
+
};
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
function getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {
|
|
3179
|
+
if (void 0 !== t && 1 === o && (1 === o || a)) {
|
|
3180
|
+
return isoToEpochNanoWithOffset(n, t);
|
|
3181
|
+
}
|
|
3182
|
+
const s = e.getPossibleInstantsFor(n);
|
|
3183
|
+
if (void 0 !== t && 3 !== o) {
|
|
3184
|
+
const e = ((e, n, t, o) => {
|
|
3185
|
+
const r = isoToEpochNano(n);
|
|
3186
|
+
o && (t = roundToMinute(t));
|
|
3187
|
+
for (const n of e) {
|
|
3188
|
+
let e = dayTimeNanoToNumber(diffDayTimeNanos(n, r));
|
|
3189
|
+
if (o && (e = roundToMinute(e)), e === t) {
|
|
3190
|
+
return n;
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
})(s, n, t, i);
|
|
3194
|
+
if (void 0 !== e) {
|
|
3195
|
+
return e;
|
|
3196
|
+
}
|
|
3197
|
+
if (0 === o) {
|
|
3198
|
+
throw new RangeError(I);
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
return a ? isoToEpochNano(n) : getSingleInstantFor(e, n, r, s);
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
function getSingleInstantFor(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {
|
|
3205
|
+
if (1 === o.length) {
|
|
3206
|
+
return o[0];
|
|
3207
|
+
}
|
|
3208
|
+
if (1 === t) {
|
|
3209
|
+
throw new RangeError(g);
|
|
3210
|
+
}
|
|
3211
|
+
if (o.length) {
|
|
3212
|
+
return o[3 === t ? 1 : 0];
|
|
3213
|
+
}
|
|
3214
|
+
const r = isoToEpochNano(n), i = ((e, n) => {
|
|
3215
|
+
const t = e.getOffsetNanosecondsFor(addDayTimeNanoAndNumber(n, -A));
|
|
3216
|
+
return e.getOffsetNanosecondsFor(addDayTimeNanoAndNumber(n, A)) - t;
|
|
3217
|
+
})(e, r), a = i * (2 === t ? -1 : 1);
|
|
3218
|
+
return (o = e.getPossibleInstantsFor(epochNanoToIso(r, a)))[2 === t ? 0 : o.length - 1];
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3221
|
+
function computeStartOfDay(e, n) {
|
|
3222
|
+
let {epochNanoseconds: t, timeZone: o, calendar: r} = n;
|
|
3223
|
+
const i = e(o);
|
|
3224
|
+
return t = getMatchingInstantFor(i, {
|
|
3225
|
+
...bn(n, i),
|
|
3226
|
+
...ve
|
|
3227
|
+
}, void 0, 0, 0, 1), createZonedDateTimeSlots(t, o, r);
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
function computeHoursInDay(e, n) {
|
|
3231
|
+
const t = e(n.timeZone);
|
|
3232
|
+
return computeNanosecondsInDay(t, bn(n, t)) / L;
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
function computeNanosecondsInDay(e, n) {
|
|
3236
|
+
n = {
|
|
3237
|
+
...n,
|
|
3238
|
+
...ve
|
|
3239
|
+
};
|
|
3240
|
+
const t = dayTimeNanoToNumber(diffDayTimeNanos(getSingleInstantFor(e, {
|
|
3241
|
+
...n,
|
|
3242
|
+
...ve
|
|
3243
|
+
}), getSingleInstantFor(e, {
|
|
3244
|
+
...moveByIsoDays(n, 1),
|
|
3245
|
+
...ve
|
|
3246
|
+
})));
|
|
3247
|
+
if (t <= 0) {
|
|
3248
|
+
throw new RangeError(p);
|
|
3249
|
+
}
|
|
3250
|
+
return t;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
function validateTimeZoneOffset(e) {
|
|
3254
|
+
if (Math.abs(e) >= A) {
|
|
3255
|
+
throw new RangeError(D$1);
|
|
3256
|
+
}
|
|
3257
|
+
return e;
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
function moveInstant(e, n, t) {
|
|
3261
|
+
return createInstantSlots(checkEpochNanoInBounds(addDayTimeNanos(n.epochNanoseconds, (e => {
|
|
3262
|
+
if (durationHasDateParts(e)) {
|
|
3263
|
+
throw new RangeError(P);
|
|
3264
|
+
}
|
|
3265
|
+
return durationFieldsToDayTimeNano(e, 5);
|
|
3266
|
+
})(e ? negateDurationFields(t) : t))));
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
3270
|
+
const a = n(o.timeZone), s = moveZonedEpochNano(e(o.calendar), a, o.epochNanoseconds, t ? negateDurationFields(r) : r, i);
|
|
3271
|
+
return {
|
|
3272
|
+
...o,
|
|
3273
|
+
epochNanoseconds: s
|
|
3274
|
+
};
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
function movePlainDateTime(e, n, t, o, r = Object.create(null)) {
|
|
3278
|
+
return createPlainDateTimeSlots({
|
|
3279
|
+
...t,
|
|
3280
|
+
...moveDateTime(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3281
|
+
});
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
function movePlainDate(e, n, t, o, r) {
|
|
3285
|
+
return {
|
|
3286
|
+
...t,
|
|
3287
|
+
...moveDateEfficient(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3288
|
+
};
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
function movePlainYearMonth(e, n, t, o, r = Object.create(null)) {
|
|
3292
|
+
const i = t.calendar, a = e(i);
|
|
3293
|
+
let s = moveToMonthStart(a, t);
|
|
3294
|
+
n && (o = negateDuration(o)), Sn(o) < 0 && (s = a.dateAdd(s, {
|
|
3295
|
+
...De,
|
|
3296
|
+
months: 1
|
|
3297
|
+
}), s = moveByIsoDays(s, -1));
|
|
3298
|
+
const c = a.dateAdd(s, o, r);
|
|
3299
|
+
return createPlainYearMonthSlots(moveToMonthStart(a, c), i);
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
function movePlainTime(e, n, t) {
|
|
3303
|
+
return createPlainTimeSlots(moveTime(n, e ? negateDurationFields(t) : t)[0]);
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
function moveZonedEpochNano(e, n, t, o, r) {
|
|
3307
|
+
const i = durationFieldsToDayTimeNano(o, 5);
|
|
3308
|
+
if (durationHasDateParts(o)) {
|
|
3309
|
+
const a = zonedEpochNanoToIso(n, t);
|
|
3310
|
+
t = addDayTimeNanos(getSingleInstantFor(n, {
|
|
3311
|
+
...moveDateEfficient(e, a, {
|
|
3312
|
+
...o,
|
|
3313
|
+
...Ie
|
|
3314
|
+
}, r),
|
|
3315
|
+
...pluckProps(ge, a),
|
|
3316
|
+
calendar: ae
|
|
3317
|
+
}), i);
|
|
3318
|
+
} else {
|
|
3319
|
+
t = addDayTimeNanos(t, i), refineOverflowOptions(r);
|
|
3320
|
+
}
|
|
3321
|
+
return checkEpochNanoInBounds(t);
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
function moveDateTime(e, n, t, o) {
|
|
3325
|
+
const [r, i] = moveTime(n, t);
|
|
3326
|
+
return checkIsoDateTimeInBounds({
|
|
3327
|
+
...moveDateEfficient(e, n, {
|
|
3328
|
+
...t,
|
|
3329
|
+
...Ie,
|
|
3330
|
+
days: t.days + i
|
|
3331
|
+
}, o),
|
|
3332
|
+
...r
|
|
3333
|
+
});
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
function moveDateEfficient(e, n, t, o) {
|
|
3337
|
+
if (t.years || t.months || t.weeks) {
|
|
3338
|
+
return e.dateAdd(n, t, o);
|
|
3339
|
+
}
|
|
3340
|
+
refineOverflowOptions(o);
|
|
3341
|
+
const r = t.days + givenFieldsToDayTimeNano(t, 5, de)[0];
|
|
3342
|
+
return r ? checkIsoDateInBounds(moveByIsoDays(n, r)) : n;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
function moveToMonthStart(e, n) {
|
|
3346
|
+
return moveByIsoDays(n, 1 - e.day(n));
|
|
3347
|
+
}
|
|
3348
|
+
|
|
3349
|
+
function moveTime(e, n) {
|
|
3350
|
+
const [t, o] = givenFieldsToDayTimeNano(n, 5, de), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);
|
|
3351
|
+
return [ r, t + i ];
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
function moveByIsoDays(e, n) {
|
|
3355
|
+
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n * C)), e;
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
function createMarkerSystem(e, n, t) {
|
|
3359
|
+
const {calendar: o, timeZone: r, epochNanoseconds: i} = t, a = e(o);
|
|
3360
|
+
if (i) {
|
|
3361
|
+
const e = n(r);
|
|
3362
|
+
return [ i, identity, bindArgs(moveZonedEpochNano, a, e), bindArgs(diffZonedEpochNanoExact, a, e) ];
|
|
3363
|
+
}
|
|
3364
|
+
return [ {
|
|
3365
|
+
...t,
|
|
3366
|
+
...ve
|
|
3367
|
+
}, isoToEpochNano, bindArgs(moveDateTime, a), bindArgs(diffDateTimesExact, a) ];
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
function spanDuration(e, n, t, o, r, i, a) {
|
|
3371
|
+
let s = i(o, e);
|
|
3372
|
+
return n && (s = i(s, n)), [ a(o, s, t), r(s) ];
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
function addDurations(e, n, t, o, r, i, a) {
|
|
3376
|
+
const s = e(normalizeOptions(a).relativeTo), c = Math.max(getLargestDurationUnit(r), getLargestDurationUnit(i));
|
|
3377
|
+
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
3378
|
+
return createDurationSlots(((e, n, t, o) => {
|
|
3379
|
+
const r = addDayTimeNanos(durationFieldsToDayTimeNano(e, 6), durationFieldsToDayTimeNano(n, 6), o ? -1 : 1);
|
|
3380
|
+
if (!Number.isFinite(r[0])) {
|
|
3381
|
+
throw new RangeError(y);
|
|
3382
|
+
}
|
|
3383
|
+
return {
|
|
3384
|
+
...De,
|
|
3385
|
+
...nanoToDurationDayTimeFields(r, t)
|
|
3386
|
+
};
|
|
3387
|
+
})(r, i, c, o));
|
|
3388
|
+
}
|
|
3389
|
+
if (!s) {
|
|
3390
|
+
throw new RangeError(M);
|
|
3391
|
+
}
|
|
3392
|
+
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...createMarkerSystem(n, t, s))[0]);
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
function roundDuration(e, n, t, o, r) {
|
|
3396
|
+
const i = getLargestDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {
|
|
3397
|
+
e = normalizeUnitNameOptions(e, We);
|
|
3398
|
+
let o = on(e);
|
|
3399
|
+
const r = t(e[He]);
|
|
3400
|
+
let i = parseRoundingIncInteger(e);
|
|
3401
|
+
const a = dn(e, 7);
|
|
3402
|
+
let s = tn(e);
|
|
3403
|
+
if (void 0 === o && void 0 === s) {
|
|
3404
|
+
throw new RangeError(E);
|
|
3405
|
+
}
|
|
3406
|
+
return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s),
|
|
3407
|
+
i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];
|
|
3408
|
+
})(r, i, e), f = Math.max(i, a);
|
|
3409
|
+
if (f < 6 || 6 === f && (!l || !l.epochNanoseconds)) {
|
|
3410
|
+
return createDurationSlots(((e, n, t, o, r) => ({
|
|
3411
|
+
...De,
|
|
3412
|
+
...balanceDayTimeDuration(e, n, t, o, r)
|
|
3413
|
+
}))(o, a, s, c, u));
|
|
3414
|
+
}
|
|
3415
|
+
if (!l) {
|
|
3416
|
+
throw new RangeError(M);
|
|
3417
|
+
}
|
|
3418
|
+
const d = createMarkerSystem(n, t, l);
|
|
3419
|
+
let m = 0;
|
|
3420
|
+
o.weeks && 7 === s && (m = o.weeks, o = {
|
|
3421
|
+
...o,
|
|
3422
|
+
weeks: 0
|
|
3423
|
+
});
|
|
3424
|
+
let [h, T] = spanDuration(o, void 0, a, ...d);
|
|
3425
|
+
const D = Sn(o), I = Sn(h);
|
|
3426
|
+
if (D && I && D !== I) {
|
|
3427
|
+
throw new RangeError(p);
|
|
3428
|
+
}
|
|
3429
|
+
return !I || 0 === s && 1 === c || (h = roundRelativeDuration(h, T, a, s, c, u, ...d)),
|
|
3430
|
+
h.weeks += m, createDurationSlots(h);
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
function negateDuration(e) {
|
|
3434
|
+
return createDurationSlots(negateDurationFields(e));
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
function negateDurationFields(e) {
|
|
3438
|
+
const n = {};
|
|
3439
|
+
for (const t of de) {
|
|
3440
|
+
n[t] = -1 * e[t] || 0;
|
|
3441
|
+
}
|
|
3442
|
+
return n;
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
function absDuration(e) {
|
|
3446
|
+
return createDurationSlots(-1 === Sn(n = e) ? negateDurationFields(n) : n);
|
|
3447
|
+
var n;
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
function queryDurationBlank(e) {
|
|
3451
|
+
return !Sn(e);
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
function computeDurationSign(e, n = de) {
|
|
3455
|
+
let t = 0;
|
|
3456
|
+
for (const o of n) {
|
|
3457
|
+
const n = Math.sign(e[o]);
|
|
3458
|
+
if (n) {
|
|
3459
|
+
if (t && t !== n) {
|
|
3460
|
+
throw new RangeError(N);
|
|
3461
|
+
}
|
|
3462
|
+
t = n;
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
return t;
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
function checkDurationFields(e) {
|
|
3469
|
+
return Sn(e), e;
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
function durationFieldsToDayTimeNano(e, n) {
|
|
3473
|
+
return givenFieldsToDayTimeNano(e, n, de);
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
function nanoToDurationDayTimeFields(e, n = 6) {
|
|
3477
|
+
const [t, o] = e, r = nanoToGivenFields(o, n, de);
|
|
3478
|
+
if (r[de[n]] += t * (A / U[n]), !Number.isFinite(r[de[n]])) {
|
|
3479
|
+
throw new RangeError(y);
|
|
3480
|
+
}
|
|
3481
|
+
return r;
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3484
|
+
function nanoToDurationTimeFields(e, n = 5) {
|
|
3485
|
+
return nanoToGivenFields(e, n, de);
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
function clearDurationFields(e, n) {
|
|
3489
|
+
const t = {
|
|
3490
|
+
...e
|
|
3491
|
+
};
|
|
3492
|
+
for (let e = 0; e <= n; e++) {
|
|
3493
|
+
t[de[e]] = 0;
|
|
3494
|
+
}
|
|
3495
|
+
return t;
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
function durationHasDateParts(e) {
|
|
3499
|
+
return Boolean(computeDurationSign(e, he));
|
|
3500
|
+
}
|
|
3501
|
+
|
|
3502
|
+
function getLargestDurationUnit(e) {
|
|
3503
|
+
let n = 9;
|
|
3504
|
+
for (;n > 0 && !e[de[n]]; n--) {}
|
|
3505
|
+
return n;
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
function createSplitTuple(e, n) {
|
|
3509
|
+
return [ e, n ];
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
function computePeriod(e) {
|
|
3513
|
+
const n = Math.floor(e / Pn) * Pn;
|
|
3514
|
+
return [ n, n + Pn ];
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
function parseInstant(e) {
|
|
3518
|
+
const n = parseDateTimeLike(e = toStringViaPrimitive(e));
|
|
3519
|
+
if (!n) {
|
|
3520
|
+
throw new RangeError(failedParse(e));
|
|
3521
|
+
}
|
|
3522
|
+
let t;
|
|
3523
|
+
if (n.o) {
|
|
3524
|
+
t = 0;
|
|
3525
|
+
} else {
|
|
3526
|
+
if (!n.offset) {
|
|
3527
|
+
throw new RangeError(failedParse(e));
|
|
3528
|
+
}
|
|
3529
|
+
t = parseOffsetNano(n.offset);
|
|
3530
|
+
}
|
|
3531
|
+
return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), createInstantSlots(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));
|
|
3532
|
+
}
|
|
3533
|
+
|
|
3534
|
+
function parseZonedOrPlainDateTime(e) {
|
|
3535
|
+
const n = parseDateTimeLike(Le(e));
|
|
3536
|
+
if (!n) {
|
|
3537
|
+
throw new RangeError(failedParse(e));
|
|
3538
|
+
}
|
|
3539
|
+
if (n.timeZone) {
|
|
3540
|
+
return finalizeZonedDateTime(n, n.offset ? parseOffsetNano(n.offset) : void 0);
|
|
3541
|
+
}
|
|
3542
|
+
if (n.o) {
|
|
3543
|
+
throw new RangeError(failedParse(e));
|
|
3544
|
+
}
|
|
3545
|
+
return finalizeDate(n);
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
function parseZonedDateTime(e, n) {
|
|
3549
|
+
const t = parseDateTimeLike(Le(e));
|
|
3550
|
+
if (!t || !t.timeZone) {
|
|
3551
|
+
throw new RangeError(failedParse(e));
|
|
3552
|
+
}
|
|
3553
|
+
const {offset: o} = t, r = o ? parseOffsetNano(o) : void 0, [, i, a] = refineZonedFieldOptions(n);
|
|
3554
|
+
return finalizeZonedDateTime(t, r, i, a);
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
function parseOffsetNano(e) {
|
|
3558
|
+
const n = parseOffsetNanoMaybe(e);
|
|
3559
|
+
if (void 0 === n) {
|
|
3560
|
+
throw new RangeError(failedParse(e));
|
|
3561
|
+
}
|
|
3562
|
+
return n;
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
function parsePlainDateTime(e) {
|
|
3566
|
+
const n = parseDateTimeLike(Le(e));
|
|
3567
|
+
if (!n || n.o) {
|
|
3568
|
+
throw new RangeError(failedParse(e));
|
|
3569
|
+
}
|
|
3570
|
+
return createPlainDateTimeSlots(finalizeDateTime(n));
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
function parsePlainDate(e) {
|
|
3574
|
+
const n = parseDateTimeLike(Le(e));
|
|
3575
|
+
if (!n || n.o) {
|
|
3576
|
+
throw new RangeError(failedParse(e));
|
|
3577
|
+
}
|
|
3578
|
+
return createPlainDateSlots(n.i ? finalizeDateTime(n) : finalizeDate(n));
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
function parsePlainYearMonth(e, n) {
|
|
3582
|
+
const t = parseYearMonthOnly(Le(n));
|
|
3583
|
+
if (t) {
|
|
3584
|
+
return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));
|
|
3585
|
+
}
|
|
3586
|
+
const o = parsePlainDate(n), r = moveToMonthStart(e(o.calendar), o);
|
|
3587
|
+
return createPlainYearMonthSlots({
|
|
3588
|
+
...o,
|
|
3589
|
+
...r
|
|
3590
|
+
});
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
function requireIsoCalendar(e) {
|
|
3594
|
+
if (e.calendar !== ae) {
|
|
3595
|
+
throw new RangeError(invalidSubstring(e.calendar));
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
function parsePlainMonthDay(e, n) {
|
|
3600
|
+
const t = parseMonthDayOnly(Le(n));
|
|
3601
|
+
if (t) {
|
|
3602
|
+
return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));
|
|
3603
|
+
}
|
|
3604
|
+
const o = parsePlainDate(n), {calendar: r} = o, i = e(r), [a, s, c] = i.u(o), [u, l] = i.l(a, s), [f, d] = i.m(u, l, c);
|
|
3605
|
+
return createPlainMonthDaySlots(i.p(f, d, c), r);
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
function parsePlainTime(e) {
|
|
3609
|
+
let n, t = (e => {
|
|
3610
|
+
const n = Un.exec(e);
|
|
3611
|
+
return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;
|
|
3612
|
+
})(Le(e));
|
|
3613
|
+
if (!t) {
|
|
3614
|
+
if (t = parseDateTimeLike(e), !t) {
|
|
3615
|
+
throw new RangeError(failedParse(e));
|
|
3616
|
+
}
|
|
3617
|
+
if (!t.i) {
|
|
3618
|
+
throw new RangeError(failedParse(e));
|
|
3619
|
+
}
|
|
3620
|
+
if (t.o) {
|
|
3621
|
+
throw new RangeError(invalidSubstring("Z"));
|
|
3622
|
+
}
|
|
3623
|
+
requireIsoCalendar(t);
|
|
3624
|
+
}
|
|
3625
|
+
if ((n = parseYearMonthOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
3626
|
+
throw new RangeError(failedParse(e));
|
|
3627
|
+
}
|
|
3628
|
+
if ((n = parseMonthDayOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
3629
|
+
throw new RangeError(failedParse(e));
|
|
3630
|
+
}
|
|
3631
|
+
return createPlainTimeSlots(constrainIsoTimeFields(t, 1));
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
function parseDuration(e) {
|
|
3635
|
+
const n = (e => {
|
|
3636
|
+
const n = xn.exec(e);
|
|
3637
|
+
return n ? (e => {
|
|
3638
|
+
function parseUnit(e, t, i) {
|
|
3639
|
+
let a = 0, s = 0;
|
|
3640
|
+
if (i && ([a, r] = divModFloor(r, U[i])), void 0 !== e) {
|
|
3641
|
+
if (o) {
|
|
3642
|
+
throw new RangeError(invalidSubstring(e));
|
|
3643
|
+
}
|
|
3644
|
+
s = (e => {
|
|
3645
|
+
const n = parseInt(e);
|
|
3646
|
+
if (!Number.isFinite(n)) {
|
|
3647
|
+
throw new RangeError(invalidSubstring(e));
|
|
3648
|
+
}
|
|
3649
|
+
return n;
|
|
3650
|
+
})(e), n = 1, t && (r = parseSubsecNano(t) * (U[i] / z), o = 1);
|
|
3651
|
+
}
|
|
3652
|
+
return a + s;
|
|
3653
|
+
}
|
|
3654
|
+
let n = 0, o = 0, r = 0, i = {
|
|
3655
|
+
...zipProps(de, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),
|
|
3656
|
+
...nanoToGivenFields(r, 2, de)
|
|
3657
|
+
};
|
|
3658
|
+
if (!n) {
|
|
3659
|
+
throw new RangeError(t);
|
|
3660
|
+
}
|
|
3661
|
+
return parseSign(e[1]) < 0 && (i = negateDurationFields(i)), i;
|
|
3662
|
+
})(n) : void 0;
|
|
3663
|
+
})(Le(e));
|
|
3664
|
+
if (!n) {
|
|
3665
|
+
throw new RangeError(failedParse(e));
|
|
3666
|
+
}
|
|
3667
|
+
return createDurationSlots(n);
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
function parseCalendarId(e) {
|
|
3671
|
+
const n = parseDateTimeLike(e) || parseYearMonthOnly(e) || parseMonthDayOnly(e);
|
|
3672
|
+
return n ? n.calendar : e;
|
|
3673
|
+
}
|
|
3674
|
+
|
|
3675
|
+
function parseTimeZoneId(e) {
|
|
3676
|
+
const n = parseDateTimeLike(e);
|
|
3677
|
+
return n && (n.timeZone || n.o && Mn || n.offset) || e;
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3680
|
+
function finalizeZonedDateTime(e, n, t = 0, o = 0) {
|
|
3681
|
+
const r = resolveTimeZoneId(e.timeZone), i = wn(r);
|
|
3682
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.h, e.o), r, resolveCalendarId(e.calendar));
|
|
3683
|
+
}
|
|
3684
|
+
|
|
3685
|
+
function finalizeDateTime(e) {
|
|
3686
|
+
return resolveSlotsCalendar(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e)));
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
function finalizeDate(e) {
|
|
3690
|
+
return resolveSlotsCalendar(checkIsoDateInBounds(checkIsoDateFields(e)));
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
function resolveSlotsCalendar(e) {
|
|
3694
|
+
return {
|
|
3695
|
+
...e,
|
|
3696
|
+
calendar: resolveCalendarId(e.calendar)
|
|
3697
|
+
};
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
function parseDateTimeLike(e) {
|
|
3701
|
+
const n = An.exec(e);
|
|
3702
|
+
return n ? (e => {
|
|
3703
|
+
const n = e[10], t = "Z" === (n || "").toUpperCase();
|
|
3704
|
+
return {
|
|
3705
|
+
isoYear: organizeIsoYearParts(e),
|
|
3706
|
+
isoMonth: parseInt(e[4]),
|
|
3707
|
+
isoDay: parseInt(e[5]),
|
|
3708
|
+
...organizeTimeParts(e.slice(5)),
|
|
3709
|
+
...organizeAnnotationParts(e[16]),
|
|
3710
|
+
i: Boolean(e[6]),
|
|
3711
|
+
o: t,
|
|
3712
|
+
offset: t ? void 0 : n
|
|
3713
|
+
};
|
|
3714
|
+
})(n) : void 0;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
function parseYearMonthOnly(e) {
|
|
3718
|
+
const n = qn.exec(e);
|
|
3719
|
+
return n ? (e => ({
|
|
3720
|
+
isoYear: organizeIsoYearParts(e),
|
|
3721
|
+
isoMonth: parseInt(e[4]),
|
|
3722
|
+
isoDay: 1,
|
|
3723
|
+
...organizeAnnotationParts(e[5])
|
|
3724
|
+
}))(n) : void 0;
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
function parseMonthDayOnly(e) {
|
|
3728
|
+
const n = Ln.exec(e);
|
|
3729
|
+
return n ? (e => ({
|
|
3730
|
+
isoYear: Be,
|
|
3731
|
+
isoMonth: parseInt(e[1]),
|
|
3732
|
+
isoDay: parseInt(e[2]),
|
|
3733
|
+
...organizeAnnotationParts(e[3])
|
|
3734
|
+
}))(n) : void 0;
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
function parseOffsetNanoMaybe(e, n) {
|
|
3738
|
+
const t = jn.exec(e);
|
|
3739
|
+
return t ? ((e, n) => {
|
|
3740
|
+
const t = e[4] || e[5];
|
|
3741
|
+
if (n && t) {
|
|
3742
|
+
throw new RangeError(invalidSubstring(t));
|
|
3743
|
+
}
|
|
3744
|
+
return validateTimeZoneOffset((parseInt0(e[2]) * L + parseInt0(e[3]) * q + parseInt0(e[4]) * z + parseSubsecNano(e[5] || "")) * parseSign(e[1]));
|
|
3745
|
+
})(t, n) : void 0;
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
function organizeIsoYearParts(e) {
|
|
3749
|
+
const n = parseSign(e[1]), t = parseInt(e[2] || e[3]);
|
|
3750
|
+
if (n < 0 && !t) {
|
|
3751
|
+
throw new RangeError(invalidSubstring(-0));
|
|
3752
|
+
}
|
|
3753
|
+
return n * t;
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
function organizeTimeParts(e) {
|
|
3757
|
+
const n = parseInt0(e[3]);
|
|
3758
|
+
return {
|
|
3759
|
+
...nanoToIsoTimeAndDay(parseSubsecNano(e[4] || ""))[0],
|
|
3760
|
+
isoHour: parseInt0(e[1]),
|
|
3761
|
+
isoMinute: parseInt0(e[2]),
|
|
3762
|
+
isoSecond: 60 === n ? 59 : n
|
|
3763
|
+
};
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
function organizeAnnotationParts(e) {
|
|
3767
|
+
let n, t;
|
|
3768
|
+
const o = [];
|
|
3769
|
+
if (e.replace(Wn, ((e, r, i) => {
|
|
3770
|
+
const a = Boolean(r), [s, c] = i.split("=").reverse();
|
|
3771
|
+
if (c) {
|
|
3772
|
+
if ("u-ca" === c) {
|
|
3773
|
+
o.push(s), n || (n = a);
|
|
3774
|
+
} else if (a) {
|
|
3775
|
+
throw new RangeError(invalidSubstring(e));
|
|
3776
|
+
}
|
|
3777
|
+
} else {
|
|
3778
|
+
if (t) {
|
|
3779
|
+
throw new RangeError(invalidSubstring(e));
|
|
3780
|
+
}
|
|
3781
|
+
t = s;
|
|
3782
|
+
}
|
|
3783
|
+
return "";
|
|
3784
|
+
})), o.length > 1 && n) {
|
|
3785
|
+
throw new RangeError(invalidSubstring(e));
|
|
3786
|
+
}
|
|
3787
|
+
return {
|
|
3788
|
+
timeZone: t,
|
|
3789
|
+
calendar: o[0] || ae
|
|
3790
|
+
};
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3793
|
+
function parseSubsecNano(e) {
|
|
3794
|
+
return parseInt(e.padEnd(9, "0"));
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
function createRegExp(e) {
|
|
3798
|
+
return new RegExp(`^${e}$`, "i");
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
function parseSign(e) {
|
|
3802
|
+
return e && "+" !== e ? -1 : 1;
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3805
|
+
function parseInt0(e) {
|
|
3806
|
+
return void 0 === e ? 0 : parseInt(e);
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3809
|
+
function resolveTimeZoneId(e) {
|
|
3810
|
+
const n = getTimeZoneEssence(e);
|
|
3811
|
+
return "number" == typeof n ? formatOffsetNano(n) : n ? (e => e.toLowerCase().split("/").map(((e, n) => (e.length <= 3 || /\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || "in" === e || "chat" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join("/"))(e) : Mn;
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
function getTimeZoneAtomic(e) {
|
|
3815
|
+
const n = getTimeZoneEssence(e);
|
|
3816
|
+
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone : Mn;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
function getTimeZoneEssence(e) {
|
|
3820
|
+
const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);
|
|
3821
|
+
return void 0 !== n ? n : e !== Mn ? $n(e) : void 0;
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
function compareInstants(e, n) {
|
|
3825
|
+
return compareDayTimeNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
function compareZonedDateTimes(e, n) {
|
|
3829
|
+
return compareDayTimeNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
function compareDurations(e, n, t, o, r, i) {
|
|
3833
|
+
const a = e(normalizeOptions(i).relativeTo), s = Math.max(getLargestDurationUnit(o), getLargestDurationUnit(r));
|
|
3834
|
+
if (allPropsEqual(de, o, r)) {
|
|
3835
|
+
return 0;
|
|
3836
|
+
}
|
|
3837
|
+
if (s < 6 || 6 === s && (!a || !a.epochNanoseconds)) {
|
|
3838
|
+
return compareDayTimeNanos(givenFieldsToDayTimeNano(o, 6, de), givenFieldsToDayTimeNano(r, 6, de));
|
|
3839
|
+
}
|
|
3840
|
+
if (!a) {
|
|
3841
|
+
throw new RangeError(M);
|
|
3842
|
+
}
|
|
3843
|
+
const [c, u, l] = createMarkerSystem(n, t, a);
|
|
3844
|
+
return compareDayTimeNanos(u(l(c, o)), u(l(c, r)));
|
|
3845
|
+
}
|
|
3846
|
+
|
|
3847
|
+
function compareIsoDateTimeFields(e, n) {
|
|
3848
|
+
return compareIsoDateFields(e, n) || compareIsoTimeFields(e, n);
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
function compareIsoDateFields(e, n) {
|
|
3852
|
+
return compareNumbers(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
function compareIsoTimeFields(e, n) {
|
|
3856
|
+
return compareNumbers(isoTimeFieldsToNano(e), isoTimeFieldsToNano(n));
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
function instantsEqual(e, n) {
|
|
3860
|
+
return !compareInstants(e, n);
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
function zonedDateTimesEqual(e, n) {
|
|
3864
|
+
return !compareZonedDateTimes(e, n) && !!isTimeZoneSlotsEqual(e.timeZone, n.timeZone) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
function plainDateTimesEqual(e, n) {
|
|
3868
|
+
return !compareIsoDateTimeFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
function plainDatesEqual(e, n) {
|
|
3872
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
function plainYearMonthsEqual(e, n) {
|
|
3876
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3879
|
+
function plainMonthDaysEqual(e, n) {
|
|
3880
|
+
return !compareIsoDateFields(e, n) && isIdLikeEqual(e.calendar, n.calendar);
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
function plainTimesEqual(e, n) {
|
|
3884
|
+
return !compareIsoTimeFields(e, n);
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
function isTimeZoneSlotsEqual(e, n) {
|
|
3888
|
+
if (e === n) {
|
|
3889
|
+
return 1;
|
|
3890
|
+
}
|
|
3891
|
+
const t = getId(e), o = getId(n);
|
|
3892
|
+
if (t === o) {
|
|
3893
|
+
return 1;
|
|
3894
|
+
}
|
|
3895
|
+
try {
|
|
3896
|
+
return getTimeZoneAtomic(t) === getTimeZoneAtomic(o);
|
|
3897
|
+
} catch (e) {}
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
function diffInstants(e, n, t, o) {
|
|
3901
|
+
const r = refineDiffOptions(e, copyOptions(o), 3, 5), i = diffEpochNano(n.epochNanoseconds, t.epochNanoseconds, ...r);
|
|
3902
|
+
return createDurationSlots(e ? negateDurationFields(i) : i);
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
function diffZonedDateTimes(e, n, t, o, r, i) {
|
|
3906
|
+
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = compareDayTimeNanos(m, d);
|
|
3907
|
+
let h;
|
|
3908
|
+
if (p) {
|
|
3909
|
+
if (c < 6) {
|
|
3910
|
+
h = diffEpochNano(d, m, c, u, l, f);
|
|
3911
|
+
} else {
|
|
3912
|
+
const t = n(((e, n) => {
|
|
3913
|
+
if (!isTimeZoneSlotsEqual(e, n)) {
|
|
3914
|
+
throw new RangeError(T);
|
|
3915
|
+
}
|
|
3916
|
+
return e;
|
|
3917
|
+
})(o.timeZone, r.timeZone)), i = e(a);
|
|
3918
|
+
h = diffZonedEpochNanoViaCalendar(i, t, p, d, m, c, s), !p || 0 === u && 1 === l || (h = roundRelativeDuration(h, m, c, u, l, f, d, identity, bindArgs(moveZonedEpochNano, i, t)));
|
|
3919
|
+
}
|
|
3920
|
+
} else {
|
|
3921
|
+
h = De;
|
|
3922
|
+
}
|
|
3923
|
+
return createDurationSlots(t ? negateDurationFields(h) : h);
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
function diffPlainDateTimes(e, n, t, o, r) {
|
|
3927
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = compareDayTimeNanos(d, f);
|
|
3928
|
+
let p;
|
|
3929
|
+
if (m) {
|
|
3930
|
+
if (s <= 6) {
|
|
3931
|
+
p = diffEpochNano(f, d, s, c, u, l);
|
|
3932
|
+
} else {
|
|
3933
|
+
const n = e(i);
|
|
3934
|
+
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t, isoToEpochNano, bindArgs(moveDateTime, n)));
|
|
3935
|
+
}
|
|
3936
|
+
} else {
|
|
3937
|
+
p = De;
|
|
3938
|
+
}
|
|
3939
|
+
return createDurationSlots(n ? negateDurationFields(p) : p);
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
function diffPlainDates(e, n, t, o, r) {
|
|
3943
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r);
|
|
3944
|
+
return diffDateLike(n || 0, (() => e(i)), t, o, ...refineDiffOptions(n, a, 6, 9, 6), a);
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
function diffPlainYearMonth(e, n, t, o, r) {
|
|
3948
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), s = refineDiffOptions(n, a, 9, 9, 8), c = e(i);
|
|
3949
|
+
return diffDateLike(n || 0, (() => c), moveToMonthStart(c, t), moveToMonthStart(c, o), ...s, a);
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
function diffDateLike(e, n, t, o, r, i, a, s, c) {
|
|
3953
|
+
const u = isoToEpochNano(t), l = isoToEpochNano(o);
|
|
3954
|
+
let f;
|
|
3955
|
+
if (compareDayTimeNanos(l, u)) {
|
|
3956
|
+
let e;
|
|
3957
|
+
6 === r ? f = diffByDay(t, o) : (e = n(), f = e.dateUntil(t, o, r, c)), 6 === i && 1 === a || (e || (e = n()),
|
|
3958
|
+
f = roundRelativeDuration(f, l, r, i, a, s, t, isoToEpochNano, ((n, t) => e.dateAdd(n, t))));
|
|
3959
|
+
} else {
|
|
3960
|
+
f = De;
|
|
3961
|
+
}
|
|
3962
|
+
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
function diffPlainTimes(e, n, t, o) {
|
|
3966
|
+
const r = copyOptions(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = isoTimeFieldsToNano(n), l = roundByInc(isoTimeFieldsToNano(t) - u, computeNanoInc(a, s), c), f = {
|
|
3967
|
+
...De,
|
|
3968
|
+
...nanoToDurationTimeFields(l, i)
|
|
3969
|
+
};
|
|
3970
|
+
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
function diffZonedEpochNanoExact(e, n, t, o, r, i) {
|
|
3974
|
+
const a = compareDayTimeNanos(o, t);
|
|
3975
|
+
return a ? r < 6 ? diffEpochNanoExact(t, o, r) : diffZonedEpochNanoViaCalendar(e, n, a, t, o, r, i) : De;
|
|
3976
|
+
}
|
|
3977
|
+
|
|
3978
|
+
function diffDateTimesExact(e, n, t, o, r) {
|
|
3979
|
+
const i = isoToEpochNano(n), a = isoToEpochNano(t), s = compareDayTimeNanos(a, i);
|
|
3980
|
+
return s ? o <= 6 ? diffEpochNanoExact(i, a, o) : diffDateTimesViaCalendar(e, s, n, t, o, r) : De;
|
|
3981
|
+
}
|
|
3982
|
+
|
|
3983
|
+
function diffZonedEpochNanoViaCalendar(e, n, t, o, r, i, a) {
|
|
3984
|
+
const s = zonedEpochNanoToIso(n, o), c = pluckProps(ge, s), u = zonedEpochNanoToIso(n, r), l = bindArgs(getSingleInstantFor, n);
|
|
3985
|
+
let f, d, m, h = 0;
|
|
3986
|
+
do {
|
|
3987
|
+
if (h > 2) {
|
|
3988
|
+
throw new RangeError(p);
|
|
3989
|
+
}
|
|
3990
|
+
f = {
|
|
3991
|
+
...moveByIsoDays(u, h++ * -t),
|
|
3992
|
+
...c
|
|
3993
|
+
}, d = l(f), m = compareDayTimeNanos(r, d);
|
|
3994
|
+
} while (m === -t);
|
|
3995
|
+
return {
|
|
3996
|
+
...6 === i ? diffByDay(s, f) : e.dateUntil(s, f, i, a),
|
|
3997
|
+
...nanoToDurationTimeFields(dayTimeNanoToNumber(diffDayTimeNanos(d, r)))
|
|
3998
|
+
};
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
4002
|
+
const a = isoTimeFieldsToNano(t);
|
|
4003
|
+
let s = isoTimeFieldsToNano(o) - a, c = t;
|
|
4004
|
+
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s += A * n), {
|
|
4005
|
+
...e.dateUntil({
|
|
4006
|
+
...c,
|
|
4007
|
+
...ve
|
|
4008
|
+
}, {
|
|
4009
|
+
...o,
|
|
4010
|
+
...ve
|
|
4011
|
+
}, r, i),
|
|
4012
|
+
...nanoToDurationTimeFields(s)
|
|
4013
|
+
};
|
|
4014
|
+
}
|
|
4015
|
+
|
|
4016
|
+
function diffEpochNano(e, n, t, o, r, i) {
|
|
4017
|
+
return {
|
|
4018
|
+
...De,
|
|
4019
|
+
...nanoToDurationDayTimeFields(roundDayTimeNano(diffDayTimeNanos(e, n), o, r, i), t)
|
|
4020
|
+
};
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
function diffEpochNanoExact(e, n, t) {
|
|
4024
|
+
return {
|
|
4025
|
+
...De,
|
|
4026
|
+
...nanoToDurationDayTimeFields(diffDayTimeNanos(e, n), t)
|
|
4027
|
+
};
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
function diffByDay(e, n) {
|
|
4031
|
+
return {
|
|
4032
|
+
...De,
|
|
4033
|
+
days: diffDays(e, n)
|
|
4034
|
+
};
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
function diffDays(e, n) {
|
|
4038
|
+
return diffEpochMilliByDay(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
function diffEpochMilliByDay(e, n) {
|
|
4042
|
+
return Math.round((n - e) / C);
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
function getCommonCalendarSlot(e, n) {
|
|
4046
|
+
if (!isIdLikeEqual(e, n)) {
|
|
4047
|
+
throw new RangeError(h);
|
|
4048
|
+
}
|
|
4049
|
+
return e;
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
function createIntlCalendar(e) {
|
|
4053
|
+
function epochMilliToIntlFields(e) {
|
|
4054
|
+
return ((e, n) => ({
|
|
4055
|
+
...parseIntlYear(e, n),
|
|
4056
|
+
month: e.month,
|
|
4057
|
+
day: parseInt(e.day)
|
|
4058
|
+
}))(hashIntlFormatParts(n, e), t);
|
|
4059
|
+
}
|
|
4060
|
+
const n = Hn(e), t = computeCalendarIdBase(e);
|
|
4061
|
+
return {
|
|
4062
|
+
id: e,
|
|
4063
|
+
I: createIntlFieldCache(epochMilliToIntlFields),
|
|
4064
|
+
N: createIntlYearMonthCache(epochMilliToIntlFields)
|
|
4065
|
+
};
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
function createIntlFieldCache(e) {
|
|
4069
|
+
return createLazyGenerator((n => {
|
|
4070
|
+
const t = isoToEpochMilli(n);
|
|
4071
|
+
return e(t);
|
|
4072
|
+
}), WeakMap);
|
|
4073
|
+
}
|
|
4074
|
+
|
|
4075
|
+
function createIntlYearMonthCache(e) {
|
|
4076
|
+
const n = e(0).year - Ce;
|
|
4077
|
+
return createLazyGenerator((t => {
|
|
4078
|
+
let o, r = isoArgsToEpochMilli(t - n);
|
|
4079
|
+
const i = [], a = [];
|
|
4080
|
+
do {
|
|
4081
|
+
r += 400 * C;
|
|
4082
|
+
} while ((o = e(r)).year <= t);
|
|
4083
|
+
do {
|
|
4084
|
+
r += (1 - o.day) * C, o.year === t && (i.push(r), a.push(o.month)), r -= C;
|
|
4085
|
+
} while ((o = e(r)).year >= t);
|
|
4086
|
+
return {
|
|
4087
|
+
P: i.reverse(),
|
|
4088
|
+
v: S(a.reverse())
|
|
4089
|
+
};
|
|
4090
|
+
}));
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
function parseIntlYear(e, n) {
|
|
4094
|
+
let t, o, r = parseIntlPartsYear(e);
|
|
4095
|
+
if (e.era) {
|
|
4096
|
+
const a = ue[n];
|
|
4097
|
+
void 0 !== a && (i = (i = e.era).normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, ""),
|
|
4098
|
+
t = le[i] || i, o = r, r = eraYearToYear(o, a[t] || 0));
|
|
4099
|
+
}
|
|
4100
|
+
var i;
|
|
4101
|
+
return {
|
|
4102
|
+
era: t,
|
|
4103
|
+
eraYear: o,
|
|
4104
|
+
year: r
|
|
4105
|
+
};
|
|
4106
|
+
}
|
|
4107
|
+
|
|
4108
|
+
function parseIntlPartsYear(e) {
|
|
4109
|
+
return parseInt(e.relatedYear || e.year);
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
function computeIntlDateParts(e) {
|
|
4113
|
+
const {year: n, month: t, day: o} = this.I(e), {v: r} = this.N(n);
|
|
4114
|
+
return [ n, r[t] + 1, o ];
|
|
4115
|
+
}
|
|
4116
|
+
|
|
4117
|
+
function computeIntlEpochMilli(e, n = 1, t = 1) {
|
|
4118
|
+
return this.N(e).P[n - 1] + (t - 1) * C;
|
|
4119
|
+
}
|
|
4120
|
+
|
|
4121
|
+
function computeIntlLeapMonth(e) {
|
|
4122
|
+
const n = queryMonthStrs(this, e), t = queryMonthStrs(this, e - 1), o = n.length;
|
|
4123
|
+
if (o > t.length) {
|
|
4124
|
+
const e = getCalendarLeapMonthMeta(this);
|
|
4125
|
+
if (e < 0) {
|
|
4126
|
+
return -e;
|
|
4127
|
+
}
|
|
4128
|
+
for (let e = 0; e < o; e++) {
|
|
4129
|
+
if (n[e] !== t[e]) {
|
|
4130
|
+
return e + 1;
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
}
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
function computeIntlDaysInYear(e) {
|
|
4137
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, e), computeIntlEpochMilli.call(this, e + 1));
|
|
4138
|
+
}
|
|
4139
|
+
|
|
4140
|
+
function computeIntlDaysInMonth(e, n) {
|
|
4141
|
+
const {P: t} = this.N(e);
|
|
4142
|
+
let o = n + 1, r = t;
|
|
4143
|
+
return o > t.length && (o = 1, r = this.N(e + 1).P), diffEpochMilliByDay(t[n - 1], r[o - 1]);
|
|
4144
|
+
}
|
|
4145
|
+
|
|
4146
|
+
function computeIntlMonthsInYear(e) {
|
|
4147
|
+
return this.N(e).P.length;
|
|
4148
|
+
}
|
|
4149
|
+
|
|
4150
|
+
function queryMonthStrs(e, n) {
|
|
4151
|
+
return Object.keys(e.N(n).v);
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
function resolveCalendarId(e) {
|
|
4155
|
+
if ((e = (e => ("islamicc" === (e = e.toLowerCase()) && (e = "islamic-civil"), e))(e)) !== ae && e !== se && computeCalendarIdBase(e) !== computeCalendarIdBase(Hn(e).resolvedOptions().calendar)) {
|
|
4156
|
+
throw new RangeError(invalidCalendar(e));
|
|
4157
|
+
}
|
|
4158
|
+
return e;
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
function computeCalendarIdBase(e) {
|
|
4162
|
+
return e.split("-")[0];
|
|
4163
|
+
}
|
|
4164
|
+
|
|
4165
|
+
function parseMonthCode(e) {
|
|
4166
|
+
const n = _n.exec(e);
|
|
4167
|
+
if (!n) {
|
|
4168
|
+
throw new RangeError(invalidMonthCode(e));
|
|
4169
|
+
}
|
|
4170
|
+
return [ parseInt(n[1]), Boolean(n[2]) ];
|
|
4171
|
+
}
|
|
4172
|
+
|
|
4173
|
+
function monthCodeNumberToMonth(e, n, t) {
|
|
4174
|
+
return e + (n || t && e >= t ? 1 : 0);
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4177
|
+
function monthToMonthCodeNumber(e, n) {
|
|
4178
|
+
return e - (n && e >= n ? 1 : 0);
|
|
4179
|
+
}
|
|
4180
|
+
|
|
4181
|
+
function eraYearToYear(e, n) {
|
|
4182
|
+
return (n + e) * (Math.sign(n) || 1) || 0;
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4185
|
+
function getCalendarEraOrigins(e) {
|
|
4186
|
+
return ue[getCalendarIdBase(e)];
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4189
|
+
function getCalendarLeapMonthMeta(e) {
|
|
4190
|
+
return fe[getCalendarIdBase(e)];
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
function getCalendarIdBase(e) {
|
|
4194
|
+
return computeCalendarIdBase(e.id || ae);
|
|
4195
|
+
}
|
|
4196
|
+
|
|
4197
|
+
function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
4198
|
+
const r = refineCalendarFields(t, o, te, [], H);
|
|
4199
|
+
if (void 0 !== r.timeZone) {
|
|
4200
|
+
const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);
|
|
4201
|
+
return {
|
|
4202
|
+
epochNanoseconds: getMatchingInstantFor(n(a), {
|
|
4203
|
+
...o,
|
|
4204
|
+
...i
|
|
4205
|
+
}, void 0 !== r.offset ? parseOffsetNano(r.offset) : void 0),
|
|
4206
|
+
timeZone: a
|
|
4207
|
+
};
|
|
4208
|
+
}
|
|
4209
|
+
return {
|
|
4210
|
+
...t.dateFromFields(r),
|
|
4211
|
+
...ve
|
|
4212
|
+
};
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
4216
|
+
const a = refineCalendarFields(t, r, te, $, H), s = e(a.timeZone), [c, u, l] = refineZonedFieldOptions(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);
|
|
4217
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(n(s), {
|
|
4218
|
+
...f,
|
|
4219
|
+
...d
|
|
4220
|
+
}, void 0 !== a.offset ? parseOffsetNano(a.offset) : void 0, u, l), s, o);
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
function refinePlainDateTimeBag(e, n, t) {
|
|
4224
|
+
const o = refineCalendarFields(e, n, te, [], j), r = refineOverflowOptions(t);
|
|
4225
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4226
|
+
...e.dateFromFields(o, overrideOverflowOptions(t, r)),
|
|
4227
|
+
...refineTimeBag(o, r)
|
|
4228
|
+
}));
|
|
4229
|
+
}
|
|
4230
|
+
|
|
4231
|
+
function refinePlainDateBag(e, n, t, o = []) {
|
|
4232
|
+
const r = refineCalendarFields(e, n, te, o);
|
|
4233
|
+
return e.dateFromFields(r, t);
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
function refinePlainYearMonthBag(e, n, t, o) {
|
|
4237
|
+
const r = refineCalendarFields(e, n, ee, o);
|
|
4238
|
+
return e.yearMonthFromFields(r, t);
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
function refinePlainMonthDayBag(e, n, t, o, r = []) {
|
|
4242
|
+
const i = refineCalendarFields(e, t, te, r);
|
|
4243
|
+
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = Be),
|
|
4244
|
+
e.monthDayFromFields(i, o);
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
function refinePlainTimeBag(e, n) {
|
|
4248
|
+
const t = refineOverflowOptions(n);
|
|
4249
|
+
return createPlainTimeSlots(refineTimeBag(refineFields(e, W, [], 1), t));
|
|
4250
|
+
}
|
|
4251
|
+
|
|
4252
|
+
function refineDurationBag(e) {
|
|
4253
|
+
const n = refineFields(e, me);
|
|
4254
|
+
return createDurationSlots(checkDurationFields({
|
|
4255
|
+
...De,
|
|
4256
|
+
...n
|
|
4257
|
+
}));
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
function refineCalendarFields(e, n, t, o = [], r = []) {
|
|
4261
|
+
return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);
|
|
4262
|
+
}
|
|
4263
|
+
|
|
4264
|
+
function refineFields(e, n, o, r = !o) {
|
|
4265
|
+
const i = {};
|
|
4266
|
+
let a, s = 0;
|
|
4267
|
+
for (const t of n) {
|
|
4268
|
+
if (t === a) {
|
|
4269
|
+
throw new RangeError(duplicateFields(t));
|
|
4270
|
+
}
|
|
4271
|
+
if ("constructor" === t || "__proto__" === t) {
|
|
4272
|
+
throw new RangeError(forbiddenField(t));
|
|
4273
|
+
}
|
|
4274
|
+
let n = e[t];
|
|
4275
|
+
if (void 0 !== n) {
|
|
4276
|
+
s = 1, Xn[t] && (n = Xn[t](n, t)), i[t] = n;
|
|
4277
|
+
} else if (o) {
|
|
4278
|
+
if (o.includes(t)) {
|
|
4279
|
+
throw new TypeError(missingField(t));
|
|
4280
|
+
}
|
|
4281
|
+
i[t] = ie[t];
|
|
4282
|
+
}
|
|
4283
|
+
a = t;
|
|
4284
|
+
}
|
|
4285
|
+
if (r && !s) {
|
|
4286
|
+
throw new TypeError(t);
|
|
4287
|
+
}
|
|
4288
|
+
return i;
|
|
4289
|
+
}
|
|
4290
|
+
|
|
4291
|
+
function refineTimeBag(e, n) {
|
|
4292
|
+
return constrainIsoTimeFields(et({
|
|
4293
|
+
...ie,
|
|
4294
|
+
...e
|
|
4295
|
+
}), n);
|
|
4296
|
+
}
|
|
4297
|
+
|
|
4298
|
+
function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
4299
|
+
const a = copyOptions(i), {calendar: s, timeZone: c} = t;
|
|
4300
|
+
return createZonedDateTimeSlots(((e, n, t, o, r) => {
|
|
4301
|
+
const i = mergeCalendarFields(e, t, o, te, G, x), [a, s, c] = refineZonedFieldOptions(r, 2);
|
|
4302
|
+
return getMatchingInstantFor(n, {
|
|
4303
|
+
...e.dateFromFields(i, overrideOverflowOptions(r, a)),
|
|
4304
|
+
...refineTimeBag(i, a)
|
|
4305
|
+
}, parseOffsetNano(i.offset), s, c);
|
|
4306
|
+
})(e(s), n(c), o, r, a), c, s);
|
|
4307
|
+
}
|
|
4308
|
+
|
|
4309
|
+
function plainDateTimeWithFields(e, n, t, o, r) {
|
|
4310
|
+
const i = copyOptions(r);
|
|
4311
|
+
return createPlainDateTimeSlots(((e, n, t, o) => {
|
|
4312
|
+
const r = mergeCalendarFields(e, n, t, te, j), i = refineOverflowOptions(o);
|
|
4313
|
+
return checkIsoDateTimeInBounds({
|
|
4314
|
+
...e.dateFromFields(r, overrideOverflowOptions(o, i)),
|
|
4315
|
+
...refineTimeBag(r, i)
|
|
4316
|
+
});
|
|
4317
|
+
})(e(n.calendar), t, o, i));
|
|
4318
|
+
}
|
|
4319
|
+
|
|
4320
|
+
function plainDateWithFields(e, n, t, o, r) {
|
|
4321
|
+
const i = copyOptions(r);
|
|
4322
|
+
return ((e, n, t, o) => {
|
|
4323
|
+
const r = mergeCalendarFields(e, n, t, te);
|
|
4324
|
+
return e.dateFromFields(r, o);
|
|
4325
|
+
})(e(n.calendar), t, o, i);
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4328
|
+
function plainYearMonthWithFields(e, n, t, o, r) {
|
|
4329
|
+
const i = copyOptions(r);
|
|
4330
|
+
return createPlainYearMonthSlots(((e, n, t, o) => {
|
|
4331
|
+
const r = mergeCalendarFields(e, n, t, ee);
|
|
4332
|
+
return e.yearMonthFromFields(r, o);
|
|
4333
|
+
})(e(n.calendar), t, o, i));
|
|
4334
|
+
}
|
|
4335
|
+
|
|
4336
|
+
function plainMonthDayWithFields(e, n, t, o, r) {
|
|
4337
|
+
const i = copyOptions(r);
|
|
4338
|
+
return ((e, n, t, o) => {
|
|
4339
|
+
const r = mergeCalendarFields(e, n, t, te);
|
|
4340
|
+
return e.monthDayFromFields(r, o);
|
|
4341
|
+
})(e(n.calendar), t, o, i);
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
function plainTimeWithFields(e, n, t) {
|
|
4345
|
+
return createPlainTimeSlots(((e, n, t) => {
|
|
4346
|
+
const o = refineOverflowOptions(t);
|
|
4347
|
+
return refineTimeBag({
|
|
4348
|
+
...pluckProps(W, e),
|
|
4349
|
+
...refineFields(n, W)
|
|
4350
|
+
}, o);
|
|
4351
|
+
})(e, n, t));
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
function durationWithFields(e, n) {
|
|
4355
|
+
return createDurationSlots((t = e, o = n, checkDurationFields({
|
|
4356
|
+
...t,
|
|
4357
|
+
...refineFields(o, me)
|
|
4358
|
+
})));
|
|
4359
|
+
var t, o;
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
function mergeCalendarFields(e, n, t, o, r = [], i = []) {
|
|
4363
|
+
const a = [ ...e.fields(o), ...r ].sort();
|
|
4364
|
+
let s = refineFields(n, a, i);
|
|
4365
|
+
const c = refineFields(t, a);
|
|
4366
|
+
return s = e.mergeFields(s, c), refineFields(s, a, []);
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4369
|
+
function convertToPlainMonthDay(e, n) {
|
|
4370
|
+
const t = refineCalendarFields(e, n, re);
|
|
4371
|
+
return e.monthDayFromFields(t);
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
function convertToPlainYearMonth(e, n, t) {
|
|
4375
|
+
const o = refineCalendarFields(e, n, ne);
|
|
4376
|
+
return e.yearMonthFromFields(o, t);
|
|
4377
|
+
}
|
|
4378
|
+
|
|
4379
|
+
function convertToIso(e, n, t, o, r) {
|
|
4380
|
+
n = pluckProps(t = e.fields(t), n), o = refineFields(o, r = e.fields(r), []);
|
|
4381
|
+
let i = e.mergeFields(n, o);
|
|
4382
|
+
return i = refineFields(i, [ ...t, ...r ].sort(), []), e.dateFromFields(i);
|
|
4383
|
+
}
|
|
4384
|
+
|
|
4385
|
+
function refineYear(e, n) {
|
|
4386
|
+
let {era: t, eraYear: o, year: r} = n;
|
|
4387
|
+
const i = getCalendarEraOrigins(e);
|
|
4388
|
+
if (void 0 !== t || void 0 !== o) {
|
|
4389
|
+
if (void 0 === t || void 0 === o) {
|
|
4390
|
+
throw new TypeError(s);
|
|
4391
|
+
}
|
|
4392
|
+
if (!i) {
|
|
4393
|
+
throw new RangeError(a);
|
|
4394
|
+
}
|
|
4395
|
+
const e = i[t];
|
|
4396
|
+
if (void 0 === e) {
|
|
4397
|
+
throw new RangeError(invalidEra(t));
|
|
4398
|
+
}
|
|
4399
|
+
const n = eraYearToYear(o, e);
|
|
4400
|
+
if (void 0 !== r && r !== n) {
|
|
4401
|
+
throw new RangeError(c);
|
|
4402
|
+
}
|
|
4403
|
+
r = n;
|
|
4404
|
+
} else if (void 0 === r) {
|
|
4405
|
+
throw new TypeError(missingYear(i));
|
|
4406
|
+
}
|
|
4407
|
+
return r;
|
|
4408
|
+
}
|
|
4409
|
+
|
|
4410
|
+
function refineMonth(e, n, t, o) {
|
|
4411
|
+
let {month: r, monthCode: i} = n;
|
|
4412
|
+
if (void 0 !== i) {
|
|
4413
|
+
const n = ((e, n, t, o) => {
|
|
4414
|
+
const r = e.F(t), [i, a] = parseMonthCode(n);
|
|
4415
|
+
let s = monthCodeNumberToMonth(i, a, r);
|
|
4416
|
+
if (a) {
|
|
4417
|
+
const n = getCalendarLeapMonthMeta(e);
|
|
4418
|
+
if (void 0 === n) {
|
|
4419
|
+
throw new RangeError(d);
|
|
4420
|
+
}
|
|
4421
|
+
if (n > 0) {
|
|
4422
|
+
if (s > n) {
|
|
4423
|
+
throw new RangeError(d);
|
|
4424
|
+
}
|
|
4425
|
+
if (void 0 === r) {
|
|
4426
|
+
if (1 === o) {
|
|
4427
|
+
throw new RangeError(d);
|
|
4428
|
+
}
|
|
4429
|
+
s--;
|
|
4430
|
+
}
|
|
4431
|
+
} else {
|
|
4432
|
+
if (s !== -n) {
|
|
4433
|
+
throw new RangeError(d);
|
|
4434
|
+
}
|
|
4435
|
+
if (void 0 === r && 1 === o) {
|
|
4436
|
+
throw new RangeError(d);
|
|
4437
|
+
}
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
return s;
|
|
4441
|
+
})(e, i, t, o);
|
|
4442
|
+
if (void 0 !== r && r !== n) {
|
|
4443
|
+
throw new RangeError(u);
|
|
4444
|
+
}
|
|
4445
|
+
r = n, o = 1;
|
|
4446
|
+
} else if (void 0 === r) {
|
|
4447
|
+
throw new TypeError(l);
|
|
4448
|
+
}
|
|
4449
|
+
return clampEntity("month", r, 1, e.O(t), o);
|
|
4450
|
+
}
|
|
4451
|
+
|
|
4452
|
+
function refineDay(e, n, t, o, r) {
|
|
4453
|
+
return clampProp(n, "day", 1, e.k(o, t), r);
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4456
|
+
function spliceFields(e, n, t, o) {
|
|
4457
|
+
let r = 0;
|
|
4458
|
+
const i = [];
|
|
4459
|
+
for (const e of t) {
|
|
4460
|
+
void 0 !== n[e] ? r = 1 : i.push(e);
|
|
4461
|
+
}
|
|
4462
|
+
if (Object.assign(e, n), r) {
|
|
4463
|
+
for (const n of o || i) {
|
|
4464
|
+
delete e[n];
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
function createNativeOpsCreator(e, n) {
|
|
4470
|
+
return t => t === ae ? e : t === se || t === ce ? Object.assign(Object.create(e), {
|
|
4471
|
+
id: t
|
|
4472
|
+
}) : Object.assign(Object.create(n), Gn(t));
|
|
4473
|
+
}
|
|
4474
|
+
|
|
4475
|
+
function constructInstantSlots(e) {
|
|
4476
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToDayTimeNano(toBigInt(e))));
|
|
4477
|
+
}
|
|
4478
|
+
|
|
4479
|
+
function constructZonedDateTimeSlots(e, n, t, o, r = ae) {
|
|
4480
|
+
return createZonedDateTimeSlots(checkEpochNanoInBounds(bigIntToDayTimeNano(toBigInt(t))), n(o), e(r));
|
|
4481
|
+
}
|
|
4482
|
+
|
|
4483
|
+
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = ae) {
|
|
4484
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(Ne, [ n, t, o, r, i, a, s, c, u ])))), e(l));
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
function constructPlainDateSlots(e, n, t, o, r = ae) {
|
|
4488
|
+
return createPlainDateSlots(checkIsoDateInBounds(checkIsoDateFields(mapProps(toInteger, {
|
|
4489
|
+
isoYear: n,
|
|
4490
|
+
isoMonth: t,
|
|
4491
|
+
isoDay: o
|
|
4492
|
+
}))), e(r));
|
|
4493
|
+
}
|
|
4494
|
+
|
|
4495
|
+
function constructPlainYearMonthSlots(e, n, t, o = ae, r = 1) {
|
|
4496
|
+
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4497
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({
|
|
4498
|
+
isoYear: i,
|
|
4499
|
+
isoMonth: a,
|
|
4500
|
+
isoDay: toInteger(r)
|
|
4501
|
+
})), s);
|
|
4502
|
+
}
|
|
4503
|
+
|
|
4504
|
+
function constructPlainMonthDaySlots(e, n, t, o = ae, r = Be) {
|
|
4505
|
+
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4506
|
+
return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({
|
|
4507
|
+
isoYear: toInteger(r),
|
|
4508
|
+
isoMonth: i,
|
|
4509
|
+
isoDay: a
|
|
4510
|
+
})), s);
|
|
4511
|
+
}
|
|
4512
|
+
|
|
4513
|
+
function constructPlainTimeSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {
|
|
4514
|
+
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(ge, [ e, n, t, o, r, i ])), 1));
|
|
4515
|
+
}
|
|
4516
|
+
|
|
4517
|
+
function constructDurationSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {
|
|
4518
|
+
return createDurationSlots(checkDurationFields(mapProps(toStrictInteger, zipProps(de, [ e, n, t, o, r, i, a, s, c, u ]))));
|
|
4519
|
+
}
|
|
4520
|
+
|
|
4521
|
+
function instantToZonedDateTime(e, n, t = ae) {
|
|
4522
|
+
return createZonedDateTimeSlots(e.epochNanoseconds, n, t);
|
|
4523
|
+
}
|
|
4524
|
+
|
|
4525
|
+
function zonedDateTimeToInstant(e) {
|
|
4526
|
+
return createInstantSlots(e.epochNanoseconds);
|
|
4527
|
+
}
|
|
4528
|
+
|
|
4529
|
+
function zonedDateTimeToPlainDateTime(e, n) {
|
|
4530
|
+
return createPlainDateTimeSlots(bn(n, e));
|
|
4531
|
+
}
|
|
4532
|
+
|
|
4533
|
+
function zonedDateTimeToPlainDate(e, n) {
|
|
4534
|
+
return createPlainDateSlots(bn(n, e));
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4537
|
+
function zonedDateTimeToPlainYearMonth(e, n, t) {
|
|
4538
|
+
return convertToPlainYearMonth(e(n.calendar), t);
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
function zonedDateTimeToPlainMonthDay(e, n, t) {
|
|
4542
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4543
|
+
}
|
|
4544
|
+
|
|
4545
|
+
function zonedDateTimeToPlainTime(e, n) {
|
|
4546
|
+
return createPlainTimeSlots(bn(n, e));
|
|
4547
|
+
}
|
|
4548
|
+
|
|
4549
|
+
function plainDateTimeToZonedDateTime(e, n, t, o) {
|
|
4550
|
+
return createZonedDateTimeSlots(((e, n, t, o) => {
|
|
4551
|
+
const r = refineEpochDisambigOptions(o);
|
|
4552
|
+
return checkEpochNanoInBounds(getSingleInstantFor(e(n), t, r));
|
|
4553
|
+
})(e, t, n, o), t, n.calendar);
|
|
4554
|
+
}
|
|
4555
|
+
|
|
4556
|
+
function plainDateTimeToPlainYearMonth(e, n, t) {
|
|
4557
|
+
const o = e(n.calendar);
|
|
4558
|
+
return createPlainYearMonthSlots({
|
|
4559
|
+
...n,
|
|
4560
|
+
...convertToPlainYearMonth(o, t)
|
|
4561
|
+
});
|
|
4562
|
+
}
|
|
4563
|
+
|
|
4564
|
+
function plainDateTimeToPlainMonthDay(e, n, t) {
|
|
4565
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4566
|
+
}
|
|
4567
|
+
|
|
4568
|
+
function plainDateToZonedDateTime(e, n, t, o, r) {
|
|
4569
|
+
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : ve;
|
|
4570
|
+
return createZonedDateTimeSlots(getSingleInstantFor(t(i), {
|
|
4571
|
+
...o,
|
|
4572
|
+
...s
|
|
4573
|
+
}), i, o.calendar);
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4576
|
+
function plainDateToPlainDateTime(e, n = ve) {
|
|
4577
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4578
|
+
...e,
|
|
4579
|
+
...n
|
|
4580
|
+
}));
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4583
|
+
function plainDateToPlainYearMonth(e, n, t) {
|
|
4584
|
+
return convertToPlainYearMonth(e(n.calendar), t);
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4587
|
+
function plainDateToPlainMonthDay(e, n, t) {
|
|
4588
|
+
return convertToPlainMonthDay(e(n.calendar), t);
|
|
4589
|
+
}
|
|
4590
|
+
|
|
4591
|
+
function plainYearMonthToPlainDate(e, n, t, o) {
|
|
4592
|
+
return ((e, n, t) => convertToIso(e, n, ne, requireObjectLike(t), X))(e(n.calendar), t, o);
|
|
4593
|
+
}
|
|
4594
|
+
|
|
4595
|
+
function plainMonthDayToPlainDate(e, n, t, o) {
|
|
4596
|
+
return ((e, n, t) => convertToIso(e, n, re, requireObjectLike(t), J))(e(n.calendar), t, o);
|
|
4597
|
+
}
|
|
4598
|
+
|
|
4599
|
+
function plainTimeToZonedDateTime(e, n, t, o, r) {
|
|
4600
|
+
const i = requireObjectLike(r), a = n(i.plainDate), s = e(i.timeZone);
|
|
4601
|
+
return createZonedDateTimeSlots(getSingleInstantFor(t(s), {
|
|
4602
|
+
...a,
|
|
4603
|
+
...o
|
|
4604
|
+
}), s, a.calendar);
|
|
4605
|
+
}
|
|
4606
|
+
|
|
4607
|
+
function plainTimeToPlainDateTime(e, n) {
|
|
4608
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4609
|
+
...e,
|
|
4610
|
+
...n
|
|
4611
|
+
}));
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
function epochSecToInstant(e) {
|
|
4615
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToDayTimeNano(e, z)));
|
|
4616
|
+
}
|
|
4617
|
+
|
|
4618
|
+
function epochMilliToInstant(e) {
|
|
4619
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToDayTimeNano(e, Z)));
|
|
4620
|
+
}
|
|
4621
|
+
|
|
4622
|
+
function epochMicroToInstant(e) {
|
|
4623
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToDayTimeNano(toBigInt(e), R)));
|
|
4624
|
+
}
|
|
4625
|
+
|
|
4626
|
+
function epochNanoToInstant(e) {
|
|
4627
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToDayTimeNano(toBigInt(e))));
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4630
|
+
function zonedDateTimeWithPlainTime(e, n, t = ve) {
|
|
4631
|
+
const o = n.timeZone, r = e(o), i = {
|
|
4632
|
+
...bn(n, r),
|
|
4633
|
+
...t
|
|
4634
|
+
};
|
|
4635
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4638
|
+
function zonedDateTimeWithPlainDate(e, n, t) {
|
|
4639
|
+
const o = n.timeZone, r = e(o), i = {
|
|
4640
|
+
...bn(n, r),
|
|
4641
|
+
...t
|
|
4642
|
+
}, a = getPreferredCalendarSlot(n.calendar, t.calendar);
|
|
4643
|
+
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);
|
|
4644
|
+
}
|
|
4645
|
+
|
|
4646
|
+
function plainDateTimeWithPlainTime(e, n = ve) {
|
|
4647
|
+
return createPlainDateTimeSlots({
|
|
4648
|
+
...e,
|
|
4649
|
+
...n
|
|
4650
|
+
});
|
|
4651
|
+
}
|
|
4652
|
+
|
|
4653
|
+
function plainDateTimeWithPlainDate(e, n) {
|
|
4654
|
+
return createPlainDateTimeSlots({
|
|
4655
|
+
...e,
|
|
4656
|
+
...n
|
|
4657
|
+
}, getPreferredCalendarSlot(e.calendar, n.calendar));
|
|
4658
|
+
}
|
|
4659
|
+
|
|
4660
|
+
function slotsWithCalendar(e, n) {
|
|
4661
|
+
return {
|
|
4662
|
+
...e,
|
|
4663
|
+
calendar: n
|
|
4664
|
+
};
|
|
4665
|
+
}
|
|
4666
|
+
|
|
4667
|
+
function slotsWithTimeZone(e, n) {
|
|
4668
|
+
return {
|
|
4669
|
+
...e,
|
|
4670
|
+
timeZone: n
|
|
4671
|
+
};
|
|
4672
|
+
}
|
|
4673
|
+
|
|
4674
|
+
function getPreferredCalendarSlot(e, n) {
|
|
4675
|
+
if (e === n) {
|
|
4676
|
+
return e;
|
|
4677
|
+
}
|
|
4678
|
+
const t = getId(e), o = getId(n);
|
|
4679
|
+
if (t === o || t === ae) {
|
|
4680
|
+
return n;
|
|
4681
|
+
}
|
|
4682
|
+
if (o === ae) {
|
|
4683
|
+
return e;
|
|
4684
|
+
}
|
|
4685
|
+
throw new RangeError(h);
|
|
4686
|
+
}
|
|
4687
|
+
|
|
4688
|
+
function createOptionsTransformer(e, n, t = []) {
|
|
4689
|
+
const o = new Set(t);
|
|
4690
|
+
return t => (((e, n) => {
|
|
4691
|
+
for (const t of n) {
|
|
4692
|
+
if (t in e) {
|
|
4693
|
+
return 1;
|
|
4694
|
+
}
|
|
4695
|
+
}
|
|
4696
|
+
return 0;
|
|
4697
|
+
})(t = excludePropsByName(o, t), e) || Object.assign(t, n), t);
|
|
4698
|
+
}
|
|
4699
|
+
|
|
4700
|
+
function isoDateFieldsToEpochNano(e, n) {
|
|
4701
|
+
return getSingleInstantFor(wn(n.timeZone), {
|
|
4702
|
+
...ve,
|
|
4703
|
+
isoHour: 12,
|
|
4704
|
+
...e
|
|
4705
|
+
});
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
function extractEpochNano(e) {
|
|
4709
|
+
return e.epochNanoseconds;
|
|
4710
|
+
}
|
|
4711
|
+
|
|
4712
|
+
function createFormatPrepper(e, n = createFormatForPrep) {
|
|
4713
|
+
const [t, , , o] = e;
|
|
4714
|
+
return (r, i = wt, ...a) => {
|
|
4715
|
+
const s = n(o ? o(...a) : void 0, r, i, t), c = s.resolvedOptions();
|
|
4716
|
+
return [ s, ...toEpochMillis(e, c, ...a) ];
|
|
4717
|
+
};
|
|
4718
|
+
}
|
|
4719
|
+
|
|
4720
|
+
function createFormatForPrep(e, n, t, o) {
|
|
4721
|
+
if (t = o(t), e) {
|
|
4722
|
+
if (void 0 !== t.timeZone) {
|
|
4723
|
+
throw new TypeError(b);
|
|
4724
|
+
}
|
|
4725
|
+
t.timeZone = e;
|
|
4726
|
+
}
|
|
4727
|
+
return new Fe(n, t);
|
|
4728
|
+
}
|
|
4729
|
+
|
|
4730
|
+
function toEpochMillis(e, n, ...t) {
|
|
4731
|
+
const [, o, r] = e;
|
|
4732
|
+
return t.map((e => (e.calendar && ((e, n, t) => {
|
|
4733
|
+
if ((t || e !== ae) && e !== n) {
|
|
4734
|
+
throw new RangeError(h);
|
|
4735
|
+
}
|
|
4736
|
+
})(getId(e.calendar), n.calendar, r), epochNanoToMilli(o(e, n)))));
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4739
|
+
function getCurrentIsoDateTime(e) {
|
|
4740
|
+
const n = zonedEpochNanoToIso(e, getCurrentEpochNanoseconds());
|
|
4741
|
+
return pluckProps(Ne, n);
|
|
4742
|
+
}
|
|
4743
|
+
|
|
4744
|
+
function getCurrentEpochNanoseconds() {
|
|
4745
|
+
return numberToDayTimeNano(Date.now(), Z);
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
function getCurrentTimeZoneId() {
|
|
4749
|
+
return Ot || (Ot = (new Fe).resolvedOptions().timeZone);
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o) => `${e} ${n} must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, forbiddenField = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, t = "No valid fields", o = "Invalid bag", r = "Cannot use valueOf", i = "Invalid calling context", a = "Forbidden era/eraYear", s = "Mismatching era/eraYear", c = "Mismatching year/eraYear", invalidEra = e => `Invalid era: ${e}`, missingYear = e => "Missing year" + (e ? "/era/eraYear" : ""), invalidMonthCode = e => `Invalid monthCode: ${e}`, u = "Mismatching month/monthCode", l = "Missing month/monthCode", f = "Cannot guess year", d = "Invalid leap month", m = "Invalid protocol", p = "Invalid protocol results", invalidCalendar = e => `Invalid Calendar: ${e}`, h = "Mismatching Calendars", T = "Mismatching TimeZones", D$1 = "Out-of-bounds offset", I = "Invalid offset for TimeZone", g = "Ambiguous offset", y = "Out-of-bounds date", N = "Cannot mix duration signs", M = "Missing relativeTo", P = "Cannot use large units", E = "Required smallestUnit or largestUnit", v = "smallestUnit > largestUnit", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, invalidFormatType = e => `Cannot format ${e}`, F = "Mismatching types for formatting", b = "Forbidden timeZone", S = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n) => n)), w = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n, t) => t)), O = /*@__PURE__*/ bindArgs(padNumber, 2), Y = {
|
|
4753
|
+
nanosecond: 0,
|
|
4754
|
+
microsecond: 1,
|
|
4755
|
+
millisecond: 2,
|
|
4756
|
+
second: 3,
|
|
4757
|
+
minute: 4,
|
|
4758
|
+
hour: 5,
|
|
4759
|
+
day: 6,
|
|
4760
|
+
week: 7,
|
|
4761
|
+
month: 8,
|
|
4762
|
+
year: 9
|
|
4763
|
+
}, k = /*@__PURE__*/ Object.keys(Y), C = 864e5, B = 1e3, R = 1e3, Z = 1e6, z = 1e9, q = 6e10, L = 36e11, A = 864e11, U = [ 1, R, Z, z, q, L, A ], j = /*@__PURE__*/ k.slice(0, 6), W = /*@__PURE__*/ sortStrings(j), x = [ "offset" ], $ = [ "timeZone" ], G = /*@__PURE__*/ j.concat(x), H = /*@__PURE__*/ G.concat($), V = [ "era", "eraYear" ], _ = /*@__PURE__*/ V.concat([ "year" ]), J = [ "year" ], K = [ "monthCode" ], Q = /*@__PURE__*/ [ "month" ].concat(K), X = [ "day" ], ee = /*@__PURE__*/ Q.concat(J), ne = /*@__PURE__*/ K.concat(J), te = /*@__PURE__*/ X.concat(ee), oe = /*@__PURE__*/ X.concat(Q), re = /*@__PURE__*/ X.concat(K), ie = /*@__PURE__*/ w(j, 0), ae = "iso8601", se = "gregory", ce = "japanese", ue = {
|
|
4764
|
+
[se]: {
|
|
4765
|
+
bce: -1,
|
|
4766
|
+
ce: 0
|
|
4767
|
+
},
|
|
4768
|
+
[ce]: {
|
|
4769
|
+
bce: -1,
|
|
4770
|
+
ce: 0,
|
|
4771
|
+
meiji: 1867,
|
|
4772
|
+
taisho: 1911,
|
|
4773
|
+
showa: 1925,
|
|
4774
|
+
heisei: 1988,
|
|
4775
|
+
reiwa: 2018
|
|
4776
|
+
},
|
|
4777
|
+
ethioaa: {
|
|
4778
|
+
era0: 0
|
|
4779
|
+
},
|
|
4780
|
+
ethiopic: {
|
|
4781
|
+
era0: 0,
|
|
4782
|
+
era1: 5500
|
|
4783
|
+
},
|
|
4784
|
+
coptic: {
|
|
4785
|
+
era0: -1,
|
|
4786
|
+
era1: 0
|
|
4787
|
+
},
|
|
4788
|
+
roc: {
|
|
4789
|
+
beforeroc: -1,
|
|
4790
|
+
minguo: 0
|
|
4791
|
+
},
|
|
4792
|
+
buddhist: {
|
|
4793
|
+
be: 0
|
|
4794
|
+
},
|
|
4795
|
+
islamic: {
|
|
4796
|
+
ah: 0
|
|
4797
|
+
},
|
|
4798
|
+
indian: {
|
|
4799
|
+
saka: 0
|
|
4800
|
+
},
|
|
4801
|
+
persian: {
|
|
4802
|
+
ap: 0
|
|
4803
|
+
}
|
|
4804
|
+
}, le = {
|
|
4805
|
+
bc: "bce",
|
|
4806
|
+
ad: "ce"
|
|
4807
|
+
}, fe = {
|
|
4808
|
+
chinese: 13,
|
|
4809
|
+
dangi: 13,
|
|
4810
|
+
hebrew: -6
|
|
4811
|
+
}, de = /*@__PURE__*/ k.map((e => e + "s")), me = /*@__PURE__*/ sortStrings(de), pe = /*@__PURE__*/ de.slice(0, 6), he = /*@__PURE__*/ de.slice(6), Te = /*@__PURE__*/ S(de), De = /*@__PURE__*/ w(de, 0), Ie = /*@__PURE__*/ w(pe, 0), ge = [ "isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour" ], ye = [ "isoDay", "isoMonth", "isoYear" ], Ne = /*@__PURE__*/ ge.concat(ye), Me = /*@__PURE__*/ sortStrings(ye), Pe = /*@__PURE__*/ sortStrings(ge), Ee = /*@__PURE__*/ sortStrings(Ne), ve = /*@__PURE__*/ w(Pe, 0), Fe = Intl.DateTimeFormat, be = "en-GB", Se = 1e8, we = [ Se, 0 ], Oe = [ -Se, 0 ], Ye = 275760, ke = -271821, Ce = 1970, Be = 1972, Re = 12, Ze = 7, ze = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), qe = /*@__PURE__*/ createLazyGenerator(computeJapaneseEraParts, WeakMap), Le = /*@__PURE__*/ bindArgs(requireType, "string"), Ae = /*@__PURE__*/ bindArgs(requireType, "boolean"), Ue = /*@__PURE__*/ bindArgs(requireType, "number"), je = /*@__PURE__*/ bindArgs(requireType, "function"), We = "smallestUnit", xe = "unit", $e = "roundingIncrement", Ge = "fractionalSecondDigits", He = "relativeTo", Ve = {
|
|
4812
|
+
constrain: 0,
|
|
4813
|
+
reject: 1
|
|
4814
|
+
}, _e = /*@__PURE__*/ Object.keys(Ve), Je = {
|
|
4815
|
+
compatible: 0,
|
|
4816
|
+
reject: 1,
|
|
4817
|
+
earlier: 2,
|
|
4818
|
+
later: 3
|
|
4819
|
+
}, Ke = {
|
|
4820
|
+
reject: 0,
|
|
4821
|
+
use: 1,
|
|
4822
|
+
prefer: 2,
|
|
4823
|
+
ignore: 3
|
|
4824
|
+
}, Qe = {
|
|
4825
|
+
auto: 0,
|
|
4826
|
+
never: 1,
|
|
4827
|
+
critical: 2,
|
|
4828
|
+
always: 3
|
|
4829
|
+
}, Xe = {
|
|
4830
|
+
auto: 0,
|
|
4831
|
+
never: 1,
|
|
4832
|
+
critical: 2
|
|
4833
|
+
}, en = {
|
|
4834
|
+
auto: 0,
|
|
4835
|
+
never: 1
|
|
4836
|
+
}, nn = {
|
|
4837
|
+
floor: 0,
|
|
4838
|
+
halfFloor: 1,
|
|
4839
|
+
ceil: 2,
|
|
4840
|
+
halfCeil: 3,
|
|
4841
|
+
trunc: 4,
|
|
4842
|
+
halfTrunc: 5,
|
|
4843
|
+
expand: 6,
|
|
4844
|
+
halfExpand: 7,
|
|
4845
|
+
halfEven: 8
|
|
4846
|
+
}, tn = /*@__PURE__*/ bindArgs(refineUnitOption, We), on = /*@__PURE__*/ bindArgs(refineUnitOption, "largestUnit"), rn = /*@__PURE__*/ bindArgs(refineUnitOption, xe), an = /*@__PURE__*/ bindArgs(refineChoiceOption, "overflow", Ve), sn = /*@__PURE__*/ bindArgs(refineChoiceOption, "disambiguation", Je), cn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", Ke), un = /*@__PURE__*/ bindArgs(refineChoiceOption, "calendarName", Qe), ln = /*@__PURE__*/ bindArgs(refineChoiceOption, "timeZoneName", Xe), fn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", en), dn = /*@__PURE__*/ bindArgs(refineChoiceOption, "roundingMode", nn), mn = "PlainYearMonth", pn = "PlainMonthDay", hn = "PlainDate", Tn = "PlainDateTime", Dn = "PlainTime", In = "ZonedDateTime", gn = "Instant", yn = "Duration", Nn = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], Mn = "UTC", Pn = 5184e3, En = /*@__PURE__*/ isoArgsToEpochSec(1847), vn = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), Fn = /0+$/, bn = /*@__PURE__*/ createLazyGenerator(_zonedEpochSlotsToIso, WeakMap), Sn = /*@__PURE__*/ createLazyGenerator(computeDurationSign, WeakMap), wn = /*@__PURE__*/ createLazyGenerator((e => {
|
|
4847
|
+
const n = getTimeZoneEssence(e);
|
|
4848
|
+
return "object" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);
|
|
4849
|
+
}));
|
|
4850
|
+
|
|
4851
|
+
class FixedTimeZone {
|
|
4852
|
+
constructor(e) {
|
|
4853
|
+
this.h = e;
|
|
4854
|
+
}
|
|
4855
|
+
getOffsetNanosecondsFor() {
|
|
4856
|
+
return this.h;
|
|
4857
|
+
}
|
|
4858
|
+
getPossibleInstantsFor(e) {
|
|
4859
|
+
return [ isoToEpochNanoWithOffset(e, this.h) ];
|
|
4860
|
+
}
|
|
4861
|
+
C() {}
|
|
4862
|
+
}
|
|
4863
|
+
|
|
4864
|
+
class IntlTimeZone {
|
|
4865
|
+
constructor(e) {
|
|
4866
|
+
this.B = (e => {
|
|
4867
|
+
function getOffsetSec(e) {
|
|
4868
|
+
const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);
|
|
4869
|
+
return c === u ? c : pinch(t(a, s), c, u, e);
|
|
4870
|
+
}
|
|
4871
|
+
function pinch(n, t, o, r) {
|
|
4872
|
+
let i, a;
|
|
4873
|
+
for (;(void 0 === r || void 0 === (i = r < n[0] ? t : r >= n[1] ? o : void 0)) && (a = n[1] - n[0]); ) {
|
|
4874
|
+
const t = n[0] + Math.floor(a / 2);
|
|
4875
|
+
e(t) === o ? n[1] = t : n[0] = t + 1;
|
|
4876
|
+
}
|
|
4877
|
+
return i;
|
|
4878
|
+
}
|
|
4879
|
+
const n = createLazyGenerator(e), t = createLazyGenerator(createSplitTuple);
|
|
4880
|
+
let o = En, r = vn;
|
|
4881
|
+
return {
|
|
4882
|
+
R(e) {
|
|
4883
|
+
const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;
|
|
4884
|
+
if (n === t) {
|
|
4885
|
+
return [ o ];
|
|
4886
|
+
}
|
|
4887
|
+
const i = getOffsetSec(o);
|
|
4888
|
+
return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];
|
|
4889
|
+
},
|
|
4890
|
+
q: getOffsetSec,
|
|
4891
|
+
C(e, i) {
|
|
4892
|
+
const a = clampNumber(e, o, r);
|
|
4893
|
+
let [s, c] = computePeriod(a);
|
|
4894
|
+
const u = Pn * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a,
|
|
4895
|
+
0);
|
|
4896
|
+
for (;l(); ) {
|
|
4897
|
+
const o = n(s), r = n(c);
|
|
4898
|
+
if (o !== r) {
|
|
4899
|
+
const n = t(s, c);
|
|
4900
|
+
pinch(n, o, r);
|
|
4901
|
+
const a = n[0];
|
|
4902
|
+
if ((compareNumbers(a, e) || 1) === i) {
|
|
4903
|
+
return a;
|
|
4904
|
+
}
|
|
4905
|
+
}
|
|
4906
|
+
s += u, c += u;
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
};
|
|
4910
|
+
})((e => n => {
|
|
4911
|
+
const t = hashIntlFormatParts(e, n * B);
|
|
4912
|
+
return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;
|
|
4913
|
+
})(e));
|
|
4914
|
+
}
|
|
4915
|
+
getOffsetNanosecondsFor(e) {
|
|
4916
|
+
return this.B.q(epochNanoToSec(e)) * z;
|
|
4917
|
+
}
|
|
4918
|
+
getPossibleInstantsFor(e) {
|
|
4919
|
+
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * Z + o.isoMicrosecond * R + o.isoNanosecond ];
|
|
4920
|
+
var o;
|
|
4921
|
+
return this.B.R(n).map((e => checkEpochNanoInBounds(addDayTimeNanoAndNumber(numberToDayTimeNano(e, z), t))));
|
|
4922
|
+
}
|
|
4923
|
+
C(e, n) {
|
|
4924
|
+
const [t, o] = (e => dayTimeNanoToNumberRemainder(e, z))(e), r = this.B.C(t + (n > 0 || o ? 1 : 0), n);
|
|
4925
|
+
if (void 0 !== r) {
|
|
4926
|
+
return numberToDayTimeNano(r, z);
|
|
4927
|
+
}
|
|
4928
|
+
}
|
|
4929
|
+
}
|
|
4930
|
+
|
|
4931
|
+
const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(\\d{4}))-?(\\d{2})`, Cn = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + Yn + ")?)?", Bn = On + Cn, Rn = kn + "-?(\\d{2})(?:[T ]" + Cn + "(Z|" + Bn + ")?)?", Zn = "\\[(!?)([^\\]]*)\\]", zn = `((?:${Zn})*)`, qn = /*@__PURE__*/ createRegExp(kn + zn), Ln = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})" + zn), An = /*@__PURE__*/ createRegExp(Rn + zn), Un = /*@__PURE__*/ createRegExp("T?" + Cn + "(?:" + Bn + ")?" + zn), jn = /*@__PURE__*/ createRegExp(Bn), Wn = /*@__PURE__*/ new RegExp(Zn, "g"), xn = /*@__PURE__*/ createRegExp(`${On}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${Yn}H)?(?:(\\d+)${Yn}M)?(?:(\\d+)${Yn}S)?)?`), $n = /*@__PURE__*/ createLazyGenerator((e => new Fe(be, {
|
|
4932
|
+
timeZone: e,
|
|
4933
|
+
era: "short",
|
|
4934
|
+
year: "numeric",
|
|
4935
|
+
month: "numeric",
|
|
4936
|
+
day: "numeric",
|
|
4937
|
+
hour: "numeric",
|
|
4938
|
+
minute: "numeric",
|
|
4939
|
+
second: "numeric"
|
|
4940
|
+
}))), Gn = /*@__PURE__*/ createLazyGenerator(createIntlCalendar), Hn = /*@__PURE__*/ createLazyGenerator((e => new Fe(be, {
|
|
4941
|
+
calendar: e,
|
|
4942
|
+
timeZone: Mn,
|
|
4943
|
+
era: "short",
|
|
4944
|
+
year: "numeric",
|
|
4945
|
+
month: "short",
|
|
4946
|
+
day: "numeric"
|
|
4947
|
+
}))), Vn = {
|
|
4948
|
+
dateAdd(e, n, t) {
|
|
4949
|
+
const o = refineOverflowOptions(t);
|
|
4950
|
+
let r, {years: i, months: a, weeks: s, days: c} = n;
|
|
4951
|
+
if (c += givenFieldsToDayTimeNano(n, 5, de)[0], i || a) {
|
|
4952
|
+
let [n, t, s] = this.u(e);
|
|
4953
|
+
if (i) {
|
|
4954
|
+
const [e, r] = this.l(n, t);
|
|
4955
|
+
n += i, t = monthCodeNumberToMonth(e, r, this.F(n)), t = clampEntity("month", t, 1, this.O(n), o);
|
|
4956
|
+
}
|
|
4957
|
+
a && ([n, t] = this.L(n, t, a)), s = clampEntity("day", s, 1, this.k(n, t), o),
|
|
4958
|
+
r = this.U(n, t, s);
|
|
4959
|
+
} else {
|
|
4960
|
+
if (!s && !c) {
|
|
4961
|
+
return e;
|
|
4962
|
+
}
|
|
4963
|
+
r = isoToEpochMilli(e);
|
|
4964
|
+
}
|
|
4965
|
+
return r += (s * Ze + c) * C, checkIsoDateInBounds(epochMilliToIso(r));
|
|
4966
|
+
},
|
|
4967
|
+
dateUntil(e, n, t) {
|
|
4968
|
+
if (t <= 7) {
|
|
4969
|
+
let o = 0, r = diffDays(e, n);
|
|
4970
|
+
return 7 === t && ([o, r] = divModTrunc(r, Ze)), {
|
|
4971
|
+
...De,
|
|
4972
|
+
weeks: o,
|
|
4973
|
+
days: r
|
|
4974
|
+
};
|
|
4975
|
+
}
|
|
4976
|
+
const o = this.u(e), r = this.u(n);
|
|
4977
|
+
let [i, a, s] = ((e, n, t, o, r, i, a) => {
|
|
4978
|
+
function updateYearMonth() {
|
|
4979
|
+
const [o, a] = e.l(n, t), [l, f] = e.l(r, i);
|
|
4980
|
+
s = r - n, c = e.O(r), u = s ? l - o || Number(f) - Number(a) : i - Math.min(t, c);
|
|
4981
|
+
}
|
|
4982
|
+
function updateYearMonthDay() {
|
|
4983
|
+
updateYearMonth(), l = e.k(r, i), f = a - Math.min(o, l);
|
|
4984
|
+
}
|
|
4985
|
+
let s, c, u, l, f;
|
|
4986
|
+
updateYearMonthDay();
|
|
4987
|
+
const d = Math.sign(f), m = Math.sign(s) || Math.sign(u) || d;
|
|
4988
|
+
if (m) {
|
|
4989
|
+
if (d === -m) {
|
|
4990
|
+
const n = l;
|
|
4991
|
+
[r, i] = e.L(r, i, -m), updateYearMonthDay(), f += m < 0 ? -n : l;
|
|
4992
|
+
}
|
|
4993
|
+
if (Math.sign(u) === -m) {
|
|
4994
|
+
const e = c;
|
|
4995
|
+
r -= m, updateYearMonth(), u += m < 0 ? -e : c;
|
|
4996
|
+
}
|
|
4997
|
+
}
|
|
4998
|
+
return [ s, u, f ];
|
|
4999
|
+
})(this, ...o, ...r);
|
|
5000
|
+
return 8 === t && (a += this.j(i, o[0]), i = 0), {
|
|
5001
|
+
...De,
|
|
5002
|
+
years: i,
|
|
5003
|
+
months: a,
|
|
5004
|
+
days: s
|
|
5005
|
+
};
|
|
5006
|
+
},
|
|
5007
|
+
dateFromFields(e, n) {
|
|
5008
|
+
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);
|
|
5009
|
+
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id || ae);
|
|
5010
|
+
},
|
|
5011
|
+
yearMonthFromFields(e, n) {
|
|
5012
|
+
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);
|
|
5013
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id || ae);
|
|
5014
|
+
},
|
|
5015
|
+
monthDayFromFields(e, n) {
|
|
5016
|
+
const t = refineOverflowOptions(n), o = !this.id, {monthCode: r, year: i, month: a} = e;
|
|
5017
|
+
let s, c, l, d, m;
|
|
5018
|
+
if (void 0 !== r) {
|
|
5019
|
+
[s, c] = parseMonthCode(r), m = getDefinedProp(e, "day");
|
|
5020
|
+
const n = this.m(s, c, m);
|
|
5021
|
+
if (!n) {
|
|
5022
|
+
throw new RangeError(f);
|
|
5023
|
+
}
|
|
5024
|
+
if ([l, d] = n, void 0 !== a && a !== d) {
|
|
5025
|
+
throw new RangeError(u);
|
|
5026
|
+
}
|
|
5027
|
+
o && (d = clampEntity("month", d, 1, Re, 1), m = clampEntity("day", m, 1, computeIsoDaysInMonth(void 0 !== i ? i : l, d), t));
|
|
5028
|
+
} else {
|
|
5029
|
+
l = void 0 === i && o ? Be : refineYear(this, e), d = refineMonth(this, e, l, t),
|
|
5030
|
+
m = refineDay(this, e, d, l, t);
|
|
5031
|
+
const n = this.F(l);
|
|
5032
|
+
c = d === n, s = monthToMonthCodeNumber(d, n);
|
|
5033
|
+
const r = this.m(s, c, m);
|
|
5034
|
+
if (!r) {
|
|
5035
|
+
throw new RangeError(f);
|
|
5036
|
+
}
|
|
5037
|
+
[l, d] = r;
|
|
5038
|
+
}
|
|
5039
|
+
return createPlainMonthDaySlots(this.p(l, d, m), this.id || ae);
|
|
5040
|
+
},
|
|
5041
|
+
fields(e) {
|
|
5042
|
+
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...V ] : e;
|
|
5043
|
+
},
|
|
5044
|
+
mergeFields(e, n) {
|
|
5045
|
+
const t = Object.assign(Object.create(null), e);
|
|
5046
|
+
return spliceFields(t, n, Q), getCalendarEraOrigins(this) && (spliceFields(t, n, _),
|
|
5047
|
+
this.id === ce && spliceFields(t, n, oe, V)), t;
|
|
5048
|
+
},
|
|
5049
|
+
inLeapYear(e) {
|
|
5050
|
+
const [n] = this.u(e);
|
|
5051
|
+
return this.$(n);
|
|
5052
|
+
},
|
|
5053
|
+
monthsInYear(e) {
|
|
5054
|
+
const [n] = this.u(e);
|
|
5055
|
+
return this.O(n);
|
|
5056
|
+
},
|
|
5057
|
+
daysInMonth(e) {
|
|
5058
|
+
const [n, t] = this.u(e);
|
|
5059
|
+
return this.k(n, t);
|
|
5060
|
+
},
|
|
5061
|
+
daysInYear(e) {
|
|
5062
|
+
const [n] = this.u(e);
|
|
5063
|
+
return this.G(n);
|
|
5064
|
+
},
|
|
5065
|
+
era(e) {
|
|
5066
|
+
return this.V(e)[0];
|
|
5067
|
+
},
|
|
5068
|
+
eraYear(e) {
|
|
5069
|
+
return this.V(e)[1];
|
|
5070
|
+
},
|
|
5071
|
+
monthCode(e) {
|
|
5072
|
+
const [n, t] = this.u(e), [o, r] = this.l(n, t);
|
|
5073
|
+
return ((e, n) => "M" + O(e) + (n ? "L" : ""))(o, r);
|
|
5074
|
+
},
|
|
5075
|
+
dayOfWeek: computeIsoDayOfWeek,
|
|
5076
|
+
weekOfYear(e) {
|
|
5077
|
+
return computeIsoWeekParts(e)[1];
|
|
5078
|
+
},
|
|
5079
|
+
yearOfWeek(e) {
|
|
5080
|
+
return computeIsoWeekParts(e)[0];
|
|
5081
|
+
},
|
|
5082
|
+
daysInWeek() {
|
|
5083
|
+
return Ze;
|
|
5084
|
+
}
|
|
5085
|
+
}, _n = /^M(\d{2})(L?)$/, Jn = {
|
|
5086
|
+
era: toStringViaPrimitive,
|
|
5087
|
+
eraYear: toInteger,
|
|
5088
|
+
year: toInteger,
|
|
5089
|
+
month: toPositiveInteger,
|
|
5090
|
+
monthCode: toStringViaPrimitive,
|
|
5091
|
+
day: toPositiveInteger
|
|
5092
|
+
}, Kn = /*@__PURE__*/ w(j, toInteger), Qn = /*@__PURE__*/ w(de, toStrictInteger), Xn = /*@__PURE__*/ Object.assign({}, Jn, Kn, Qn, {
|
|
5093
|
+
offset: toStringViaPrimitive
|
|
5094
|
+
}), et = /*@__PURE__*/ bindArgs(remapProps, j, ge), nt = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, Vn, {
|
|
5095
|
+
u: e => [ e.isoYear, e.isoMonth, e.isoDay ],
|
|
5096
|
+
V(e) {
|
|
5097
|
+
return this.id === se ? computeGregoryEraParts(e) : this.id === ce ? qe(e) : [ void 0, void 0 ];
|
|
5098
|
+
},
|
|
5099
|
+
l: (e, n) => [ n, 0 ],
|
|
5100
|
+
m(e, n) {
|
|
5101
|
+
if (!n) {
|
|
5102
|
+
return [ Be, e ];
|
|
5103
|
+
}
|
|
5104
|
+
},
|
|
5105
|
+
$: computeIsoInLeapYear,
|
|
5106
|
+
F() {},
|
|
5107
|
+
O: computeIsoMonthsInYear,
|
|
5108
|
+
j: e => e * Re,
|
|
5109
|
+
k: computeIsoDaysInMonth,
|
|
5110
|
+
G: computeIsoDaysInYear,
|
|
5111
|
+
dayOfYear: computeIsoDayOfYear,
|
|
5112
|
+
p: (e, n, t) => ({
|
|
5113
|
+
isoYear: e,
|
|
5114
|
+
isoMonth: n,
|
|
5115
|
+
isoDay: t
|
|
5116
|
+
}),
|
|
5117
|
+
U: isoArgsToEpochMilli,
|
|
5118
|
+
L: (e, n, t) => (e += divTrunc(t, Re), (n += modTrunc(t, Re)) < 1 ? (e--, n += Re) : n > Re && (e++,
|
|
5119
|
+
n -= Re), [ e, n ]),
|
|
5120
|
+
year(e) {
|
|
5121
|
+
return e.isoYear;
|
|
5122
|
+
},
|
|
5123
|
+
month(e) {
|
|
5124
|
+
return e.isoMonth;
|
|
5125
|
+
},
|
|
5126
|
+
day: e => e.isoDay
|
|
5127
|
+
}), /*@__PURE__*/ Object.assign({}, Vn, {
|
|
5128
|
+
u: computeIntlDateParts,
|
|
5129
|
+
V(e) {
|
|
5130
|
+
const n = this.I(e);
|
|
5131
|
+
return [ n.era, n.eraYear ];
|
|
5132
|
+
},
|
|
5133
|
+
l(e, n) {
|
|
5134
|
+
const t = computeIntlLeapMonth.call(this, e);
|
|
5135
|
+
return [ monthToMonthCodeNumber(n, t), t === n ];
|
|
5136
|
+
},
|
|
5137
|
+
m(e, n, t) {
|
|
5138
|
+
let [o, r, i] = computeIntlDateParts.call(this, {
|
|
5139
|
+
isoYear: Be,
|
|
5140
|
+
isoMonth: Re,
|
|
5141
|
+
isoDay: 31
|
|
5142
|
+
});
|
|
5143
|
+
const a = computeIntlLeapMonth.call(this, o), s = r === a;
|
|
5144
|
+
1 === (compareNumbers(e, monthToMonthCodeNumber(r, a)) || compareNumbers(Number(n), Number(s)) || compareNumbers(t, i)) && o--;
|
|
5145
|
+
for (let r = 0; r < 100; r++) {
|
|
5146
|
+
const i = o - r, a = computeIntlLeapMonth.call(this, i), s = monthCodeNumberToMonth(e, n, a);
|
|
5147
|
+
if (n === (s === a) && t <= computeIntlDaysInMonth.call(this, i, s)) {
|
|
5148
|
+
return [ i, s ];
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
},
|
|
5152
|
+
$(e) {
|
|
5153
|
+
const n = computeIntlDaysInYear.call(this, e);
|
|
5154
|
+
return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);
|
|
5155
|
+
},
|
|
5156
|
+
F: computeIntlLeapMonth,
|
|
5157
|
+
O: computeIntlMonthsInYear,
|
|
5158
|
+
j(e, n) {
|
|
5159
|
+
const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;
|
|
5160
|
+
let i = 0;
|
|
5161
|
+
for (let e = n; e !== t; e += o) {
|
|
5162
|
+
i += computeIntlMonthsInYear.call(this, e + r);
|
|
5163
|
+
}
|
|
5164
|
+
return i;
|
|
5165
|
+
},
|
|
5166
|
+
k: computeIntlDaysInMonth,
|
|
5167
|
+
G: computeIntlDaysInYear,
|
|
5168
|
+
dayOfYear(e) {
|
|
5169
|
+
const n = isoToEpochMilli({
|
|
5170
|
+
...e,
|
|
5171
|
+
...ve
|
|
5172
|
+
}), {year: t} = this.I(e);
|
|
5173
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n);
|
|
5174
|
+
},
|
|
5175
|
+
p(e, n, t) {
|
|
5176
|
+
return checkIsoDateInBounds({
|
|
5177
|
+
...epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t))
|
|
5178
|
+
});
|
|
5179
|
+
},
|
|
5180
|
+
U: computeIntlEpochMilli,
|
|
5181
|
+
L(e, n, t) {
|
|
5182
|
+
if (t) {
|
|
5183
|
+
if (n += t, t < 0) {
|
|
5184
|
+
if (n < Number.MIN_SAFE_INTEGER) {
|
|
5185
|
+
throw new RangeError(y);
|
|
5186
|
+
}
|
|
5187
|
+
for (;n < 1; ) {
|
|
5188
|
+
n += computeIntlMonthsInYear.call(this, --e);
|
|
5189
|
+
}
|
|
5190
|
+
} else {
|
|
5191
|
+
if (n > Number.MAX_SAFE_INTEGER) {
|
|
5192
|
+
throw new RangeError(y);
|
|
5193
|
+
}
|
|
5194
|
+
let t;
|
|
5195
|
+
for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {
|
|
5196
|
+
n -= t, e++;
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5200
|
+
return [ e, n ];
|
|
5201
|
+
},
|
|
5202
|
+
year(e) {
|
|
5203
|
+
return this.I(e).year;
|
|
5204
|
+
},
|
|
5205
|
+
month(e) {
|
|
5206
|
+
const {year: n, month: t} = this.I(e), {v: o} = this.N(n);
|
|
5207
|
+
return o[t] + 1;
|
|
5208
|
+
},
|
|
5209
|
+
day(e) {
|
|
5210
|
+
return this.I(e).day;
|
|
5211
|
+
}
|
|
5212
|
+
})), tt = "numeric", ot = [ "timeZoneName" ], rt = {
|
|
5213
|
+
month: tt,
|
|
5214
|
+
day: tt
|
|
5215
|
+
}, it = {
|
|
5216
|
+
year: tt,
|
|
5217
|
+
month: tt
|
|
5218
|
+
}, at = /*@__PURE__*/ Object.assign({}, it, {
|
|
5219
|
+
day: tt
|
|
5220
|
+
}), st = {
|
|
5221
|
+
hour: tt,
|
|
5222
|
+
minute: tt,
|
|
5223
|
+
second: tt
|
|
5224
|
+
}, ct = /*@__PURE__*/ Object.assign({}, at, st), ut = /*@__PURE__*/ Object.assign({}, ct, {
|
|
5225
|
+
timeZoneName: "short"
|
|
5226
|
+
}), lt = /*@__PURE__*/ Object.keys(rt), ft = /*@__PURE__*/ Object.keys(it), dt = /*@__PURE__*/ Object.keys(at), mt = /*@__PURE__*/ Object.keys(st), pt = /*@__PURE__*/ dt.concat([ "weekday", "dateStyle" ]), ht = /*@__PURE__*/ mt.concat([ "dayPeriod", "timeStyle" ]), Tt = /*@__PURE__*/ pt.concat(ht), Dt = /*@__PURE__*/ Tt.concat(ot), It = /*@__PURE__*/ ot.concat(ht), gt = /*@__PURE__*/ ot.concat(pt), yt = /*@__PURE__*/ ot.concat([ "day", "weekday", "dateStyle" ], ht), Nt = /*@__PURE__*/ createOptionsTransformer(lt, rt, /*@__PURE__*/ ot.concat([ "year", "weekday", "dateStyle" ], ht)), Mt = [ /*@__PURE__*/ createOptionsTransformer(ft, it, yt), isoDateFieldsToEpochNano, 1 ], Pt = [ Nt, isoDateFieldsToEpochNano, 1 ], Et = [ /*@__PURE__*/ createOptionsTransformer(pt, at, It), isoDateFieldsToEpochNano ], vt = [ /*@__PURE__*/ createOptionsTransformer(Tt, ct, ot), isoDateFieldsToEpochNano ], Ft = [ /*@__PURE__*/ createOptionsTransformer(ht, st, gt), (e, n) => getSingleInstantFor(wn(n.timeZone), {
|
|
5227
|
+
isoYear: Ce,
|
|
5228
|
+
isoMonth: 1,
|
|
5229
|
+
isoDay: 1,
|
|
5230
|
+
...e
|
|
5231
|
+
}) ], bt = [ /*@__PURE__*/ createOptionsTransformer(Tt, ct), extractEpochNano ], St = [ /*@__PURE__*/ createOptionsTransformer(Dt, ut), extractEpochNano, 0, (e, n) => {
|
|
5232
|
+
const t = getId(e.timeZone);
|
|
5233
|
+
if (n && getId(n.timeZone) !== t) {
|
|
5234
|
+
throw new RangeError(T);
|
|
5235
|
+
}
|
|
5236
|
+
return t;
|
|
5237
|
+
} ], wt = {};
|
|
5238
|
+
|
|
5239
|
+
let Ot;
|
|
5240
|
+
|
|
5241
|
+
function createSlotClass(e, t, n, o, r) {
|
|
5242
|
+
function Class(...e) {
|
|
5243
|
+
if (!(this instanceof Class)) {
|
|
5244
|
+
throw new TypeError(i);
|
|
5245
|
+
}
|
|
5246
|
+
Ea(this, t(...e));
|
|
5247
|
+
}
|
|
5248
|
+
function bindMethod(e, t) {
|
|
5249
|
+
return Object.defineProperties((function(...t) {
|
|
5250
|
+
return e.call(this, getSpecificSlots(this), ...t);
|
|
5251
|
+
}), createNameDescriptors(t));
|
|
5252
|
+
}
|
|
5253
|
+
function getSpecificSlots(t) {
|
|
5254
|
+
const n = Aa(t);
|
|
5255
|
+
if (!n || n.branding !== e) {
|
|
5256
|
+
throw new TypeError(i);
|
|
5257
|
+
}
|
|
5258
|
+
return n;
|
|
5259
|
+
}
|
|
5260
|
+
return Object.defineProperties(Class.prototype, {
|
|
5261
|
+
...createGetterDescriptors(mapProps(bindMethod, n)),
|
|
5262
|
+
...createPropDescriptors(mapProps(bindMethod, o)),
|
|
5263
|
+
...createStringTagDescriptors("Temporal." + e)
|
|
5264
|
+
}), Object.defineProperties(Class, {
|
|
5265
|
+
...createPropDescriptors(r),
|
|
5266
|
+
...createNameDescriptors(e)
|
|
5267
|
+
}), [ Class, e => {
|
|
5268
|
+
const t = Object.create(Class.prototype);
|
|
5269
|
+
return Ea(t, e), t;
|
|
5270
|
+
}, getSpecificSlots ];
|
|
5271
|
+
}
|
|
5272
|
+
|
|
5273
|
+
function createProtocolValidator(e) {
|
|
5274
|
+
return e = e.concat("id").sort(), t => {
|
|
5275
|
+
if (!hasAllPropsByName(t, e)) {
|
|
5276
|
+
throw new TypeError(m);
|
|
5277
|
+
}
|
|
5278
|
+
return t;
|
|
5279
|
+
};
|
|
5280
|
+
}
|
|
5281
|
+
|
|
5282
|
+
function rejectInvalidBag(e) {
|
|
5283
|
+
if (Aa(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {
|
|
5284
|
+
throw new TypeError(o);
|
|
5285
|
+
}
|
|
5286
|
+
return e;
|
|
5287
|
+
}
|
|
5288
|
+
|
|
5289
|
+
function createDateTimeFormatClass() {
|
|
5290
|
+
const e = Fe.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(Fe), DateTimeFormat = function(e, t = {}) {
|
|
5291
|
+
if (!(this instanceof DateTimeFormat)) {
|
|
5292
|
+
return new DateTimeFormat(e, t);
|
|
5293
|
+
}
|
|
5294
|
+
Va.set(this, ((e, t = {}) => {
|
|
5295
|
+
const n = new Fe(e, t), o = n.resolvedOptions(), r = o.locale, a = pluckProps(Object.keys(t), o), i = createLazyGenerator(createFormatPrepperForBranding), prepFormat = (...e) => {
|
|
5296
|
+
let t;
|
|
5297
|
+
const o = e.map(((e, n) => {
|
|
5298
|
+
const o = Aa(e), r = (o || {}).branding;
|
|
5299
|
+
if (n && t && t !== r) {
|
|
5300
|
+
throw new TypeError(F);
|
|
5301
|
+
}
|
|
5302
|
+
return t = r, o;
|
|
5303
|
+
}));
|
|
5304
|
+
return t ? i(t)(r, a, ...o) : [ n, ...e ];
|
|
5305
|
+
};
|
|
5306
|
+
return prepFormat.J = n, prepFormat;
|
|
5307
|
+
})(e, t));
|
|
5308
|
+
};
|
|
5309
|
+
for (const e in t) {
|
|
5310
|
+
const n = t[e], o = e.startsWith("format") && createFormatMethod(e);
|
|
5311
|
+
"function" == typeof n.value ? n.value = "constructor" === e ? DateTimeFormat : o || createProxiedMethod(e) : o && (n.get = function() {
|
|
5312
|
+
return o.bind(this);
|
|
5313
|
+
});
|
|
5314
|
+
}
|
|
5315
|
+
return n.prototype.value = Object.create(e, t), Object.defineProperties(DateTimeFormat, n),
|
|
5316
|
+
DateTimeFormat;
|
|
5317
|
+
}
|
|
5318
|
+
|
|
5319
|
+
function createFormatMethod(e) {
|
|
5320
|
+
return function(...t) {
|
|
5321
|
+
const n = Va.get(this), [o, ...r] = n(...t);
|
|
5322
|
+
return o[e](...r);
|
|
5323
|
+
};
|
|
5324
|
+
}
|
|
5325
|
+
|
|
5326
|
+
function createProxiedMethod(e) {
|
|
5327
|
+
return function(...t) {
|
|
5328
|
+
return Va.get(this).J[e](...t);
|
|
5329
|
+
};
|
|
5330
|
+
}
|
|
5331
|
+
|
|
5332
|
+
function createFormatPrepperForBranding(e) {
|
|
5333
|
+
const t = Ja[e];
|
|
5334
|
+
if (!t) {
|
|
5335
|
+
throw new TypeError(invalidFormatType(e));
|
|
5336
|
+
}
|
|
5337
|
+
return createFormatPrepper(t, createLazyGenerator(createFormatForPrep));
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
function createCalendarFieldMethods(e, t) {
|
|
5341
|
+
const n = {};
|
|
5342
|
+
for (const o in e) {
|
|
5343
|
+
n[o] = ({K: e}, n) => {
|
|
5344
|
+
const r = Aa(n) || {}, {branding: a} = r, i = a === hn || t.includes(a) ? r : toPlainDateSlots(n);
|
|
5345
|
+
return e[o](i);
|
|
5346
|
+
};
|
|
5347
|
+
}
|
|
5348
|
+
return n;
|
|
5349
|
+
}
|
|
5350
|
+
|
|
5351
|
+
function createCalendarGetters(e) {
|
|
5352
|
+
const t = {};
|
|
5353
|
+
for (const n in e) {
|
|
5354
|
+
t[n] = e => {
|
|
5355
|
+
const {calendar: t} = e;
|
|
5356
|
+
return (o = t, "string" == typeof o ? nt(o) : (r = o, Object.assign(Object.create(ni), {
|
|
5357
|
+
X: r
|
|
5358
|
+
})))[n](e);
|
|
5359
|
+
var o, r;
|
|
5360
|
+
};
|
|
5361
|
+
}
|
|
5362
|
+
return t;
|
|
5363
|
+
}
|
|
5364
|
+
|
|
5365
|
+
function neverValueOf() {
|
|
5366
|
+
throw new TypeError(r);
|
|
5367
|
+
}
|
|
5368
|
+
|
|
5369
|
+
function createCalendarFromSlots({calendar: e}) {
|
|
5370
|
+
return "string" == typeof e ? new ns(e) : e;
|
|
5371
|
+
}
|
|
5372
|
+
|
|
5373
|
+
function toPlainMonthDaySlots(e, t) {
|
|
5374
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5375
|
+
const n = Aa(e);
|
|
5376
|
+
if (n && n.branding === pn) {
|
|
5377
|
+
return refineOverflowOptions(t), n;
|
|
5378
|
+
}
|
|
5379
|
+
const o = extractCalendarSlotFromBag(e);
|
|
5380
|
+
return refinePlainMonthDayBag(Wi(o || ae), !o, e, t);
|
|
5381
|
+
}
|
|
5382
|
+
const n = parsePlainMonthDay(nt, e);
|
|
5383
|
+
return refineOverflowOptions(t), n;
|
|
5384
|
+
}
|
|
2028
5385
|
|
|
2029
|
-
|
|
5386
|
+
function getOffsetNanosecondsForAdapter(e, t, n) {
|
|
5387
|
+
return o = t.call(e, hi(createInstantSlots(n))), validateTimeZoneOffset(requireInteger(o));
|
|
5388
|
+
var o;
|
|
5389
|
+
}
|
|
5390
|
+
|
|
5391
|
+
function createAdapterOps(e, t = ui) {
|
|
5392
|
+
const n = Object.keys(t).sort(), o = {};
|
|
5393
|
+
for (const r of n) {
|
|
5394
|
+
o[r] = bindArgs(t[r], e, je(e[r]));
|
|
5395
|
+
}
|
|
5396
|
+
return o;
|
|
5397
|
+
}
|
|
5398
|
+
|
|
5399
|
+
function createTimeZoneOps(e, t) {
|
|
5400
|
+
return "string" == typeof e ? wn(e) : createAdapterOps(e, t);
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
function createTimeZoneOffsetOps(e) {
|
|
5404
|
+
return createTimeZoneOps(e, di);
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
function toPlainYearMonthSlots(e, t) {
|
|
5408
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5409
|
+
const n = Aa(e);
|
|
5410
|
+
return n && n.branding === mn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(xi(getCalendarSlotFromBag(e)), e, t);
|
|
5411
|
+
}
|
|
5412
|
+
const n = parsePlainYearMonth(nt, e);
|
|
5413
|
+
return refineOverflowOptions(t), n;
|
|
5414
|
+
}
|
|
5415
|
+
|
|
5416
|
+
function toZonedDateTimeSlots(e, t) {
|
|
5417
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5418
|
+
const n = Aa(e);
|
|
5419
|
+
if (n && n.branding === In) {
|
|
5420
|
+
return refineZonedFieldOptions(t), n;
|
|
5421
|
+
}
|
|
5422
|
+
const o = getCalendarSlotFromBag(e);
|
|
5423
|
+
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, Ri(o), o, e, t);
|
|
5424
|
+
}
|
|
5425
|
+
return parseZonedDateTime(e, t);
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
function slotsToIso(e) {
|
|
5429
|
+
return bn(e, createTimeZoneOffsetOps);
|
|
5430
|
+
}
|
|
5431
|
+
|
|
5432
|
+
function adaptDateMethods(e) {
|
|
5433
|
+
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5434
|
+
}
|
|
5435
|
+
|
|
5436
|
+
function toInstantSlots(e) {
|
|
5437
|
+
if (isObjectLike(e)) {
|
|
5438
|
+
const t = Aa(e);
|
|
5439
|
+
if (t) {
|
|
5440
|
+
switch (t.branding) {
|
|
5441
|
+
case gn:
|
|
5442
|
+
return t;
|
|
5443
|
+
|
|
5444
|
+
case In:
|
|
5445
|
+
return createInstantSlots(t.epochNanoseconds);
|
|
5446
|
+
}
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5449
|
+
return parseInstant(e);
|
|
5450
|
+
}
|
|
5451
|
+
|
|
5452
|
+
function qt() {
|
|
5453
|
+
return hi(createInstantSlots(numberToDayTimeNano(this.valueOf(), Z)));
|
|
5454
|
+
}
|
|
5455
|
+
|
|
5456
|
+
function getImplTransition(e, t, n) {
|
|
5457
|
+
const o = t.C(toInstantSlots(n).epochNanoseconds, e);
|
|
5458
|
+
return o ? hi(createInstantSlots(o)) : null;
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
function refineTimeZoneSlot(e) {
|
|
5462
|
+
return isObjectLike(e) ? (Aa(e) || {}).timeZone || gi(e) : (e => resolveTimeZoneId(parseTimeZoneId(Le(e))))(e);
|
|
5463
|
+
}
|
|
5464
|
+
|
|
5465
|
+
function toPlainTimeSlots(e, t) {
|
|
5466
|
+
if (isObjectLike(e)) {
|
|
5467
|
+
const n = Aa(e) || {};
|
|
5468
|
+
switch (n.branding) {
|
|
5469
|
+
case Dn:
|
|
5470
|
+
return refineOverflowOptions(t), n;
|
|
5471
|
+
|
|
5472
|
+
case Tn:
|
|
5473
|
+
return refineOverflowOptions(t), createPlainTimeSlots(n);
|
|
5474
|
+
|
|
5475
|
+
case In:
|
|
5476
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainTime(createTimeZoneOffsetOps, n);
|
|
5477
|
+
}
|
|
5478
|
+
return refinePlainTimeBag(e, t);
|
|
5479
|
+
}
|
|
5480
|
+
return refineOverflowOptions(t), parsePlainTime(e);
|
|
5481
|
+
}
|
|
5482
|
+
|
|
5483
|
+
function optionalToPlainTimeFields(e) {
|
|
5484
|
+
return void 0 === e ? void 0 : toPlainTimeSlots(e);
|
|
5485
|
+
}
|
|
5486
|
+
|
|
5487
|
+
function toPlainDateTimeSlots(e, t) {
|
|
5488
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5489
|
+
const n = Aa(e) || {};
|
|
5490
|
+
switch (n.branding) {
|
|
5491
|
+
case Tn:
|
|
5492
|
+
return refineOverflowOptions(t), n;
|
|
5493
|
+
|
|
5494
|
+
case hn:
|
|
5495
|
+
return refineOverflowOptions(t), createPlainDateTimeSlots({
|
|
5496
|
+
...n,
|
|
5497
|
+
...ve
|
|
5498
|
+
});
|
|
5499
|
+
|
|
5500
|
+
case In:
|
|
5501
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, n);
|
|
5502
|
+
}
|
|
5503
|
+
return refinePlainDateTimeBag(Ri(getCalendarSlotFromBag(e)), e, t);
|
|
5504
|
+
}
|
|
5505
|
+
const n = parsePlainDateTime(e);
|
|
5506
|
+
return refineOverflowOptions(t), n;
|
|
5507
|
+
}
|
|
5508
|
+
|
|
5509
|
+
function toPlainDateSlots(e, t) {
|
|
5510
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5511
|
+
const n = Aa(e) || {};
|
|
5512
|
+
switch (n.branding) {
|
|
5513
|
+
case hn:
|
|
5514
|
+
return refineOverflowOptions(t), n;
|
|
5515
|
+
|
|
5516
|
+
case Tn:
|
|
5517
|
+
return refineOverflowOptions(t), createPlainDateSlots(n);
|
|
5518
|
+
|
|
5519
|
+
case In:
|
|
5520
|
+
return refineOverflowOptions(t), zonedDateTimeToPlainDate(createTimeZoneOffsetOps, n);
|
|
5521
|
+
}
|
|
5522
|
+
return refinePlainDateBag(Ri(getCalendarSlotFromBag(e)), e, t);
|
|
5523
|
+
}
|
|
5524
|
+
const n = parsePlainDate(e);
|
|
5525
|
+
return refineOverflowOptions(t), n;
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
function dayAdapter(e, t, n) {
|
|
5529
|
+
return requirePositiveInteger(t.call(e, wi(createPlainDateSlots(n, e))));
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5532
|
+
function createCompoundOpsCreator(e) {
|
|
5533
|
+
return t => "string" == typeof t ? nt(t) : ((e, t) => {
|
|
5534
|
+
const n = Object.keys(t).sort(), o = {};
|
|
5535
|
+
for (const r of n) {
|
|
5536
|
+
o[r] = bindArgs(t[r], e, e[r]);
|
|
5537
|
+
}
|
|
5538
|
+
return o;
|
|
5539
|
+
})(t, e);
|
|
5540
|
+
}
|
|
5541
|
+
|
|
5542
|
+
function toDurationSlots(e) {
|
|
5543
|
+
if (isObjectLike(e)) {
|
|
5544
|
+
const t = Aa(e);
|
|
5545
|
+
return t && t.branding === yn ? t : refineDurationBag(e);
|
|
5546
|
+
}
|
|
5547
|
+
return parseDuration(e);
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5550
|
+
function refinePublicRelativeTo(e) {
|
|
5551
|
+
if (void 0 !== e) {
|
|
5552
|
+
if (isObjectLike(e)) {
|
|
5553
|
+
const t = Aa(e) || {};
|
|
5554
|
+
switch (t.branding) {
|
|
5555
|
+
case In:
|
|
5556
|
+
case hn:
|
|
5557
|
+
return t;
|
|
5558
|
+
|
|
5559
|
+
case Tn:
|
|
5560
|
+
return createPlainDateSlots(t);
|
|
5561
|
+
}
|
|
5562
|
+
const n = getCalendarSlotFromBag(e);
|
|
5563
|
+
return {
|
|
5564
|
+
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, Ri(n), e),
|
|
5565
|
+
calendar: n
|
|
5566
|
+
};
|
|
5567
|
+
}
|
|
5568
|
+
return parseZonedOrPlainDateTime(e);
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
function getCalendarSlotFromBag(e) {
|
|
5573
|
+
return extractCalendarSlotFromBag(e) || ae;
|
|
5574
|
+
}
|
|
5575
|
+
|
|
5576
|
+
function extractCalendarSlotFromBag(e) {
|
|
5577
|
+
const {calendar: t} = e;
|
|
5578
|
+
if (void 0 !== t) {
|
|
5579
|
+
return refineCalendarSlot(t);
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
|
|
5583
|
+
function refineCalendarSlot(e) {
|
|
5584
|
+
return isObjectLike(e) ? (Aa(e) || {}).calendar || os(e) : (e => resolveCalendarId(parseCalendarId(Le(e))))(e);
|
|
5585
|
+
}
|
|
5586
|
+
|
|
5587
|
+
const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /*@__PURE__*/ Ya.set.bind(Ya), kt = /*@__PURE__*/ createDateTimeFormatClass(), Va = /*@__PURE__*/ new WeakMap, Ja = {
|
|
5588
|
+
PlainYearMonth: Mt,
|
|
5589
|
+
PlainMonthDay: Pt,
|
|
5590
|
+
PlainDate: Et,
|
|
5591
|
+
PlainDateTime: vt,
|
|
5592
|
+
PlainTime: Ft,
|
|
5593
|
+
Instant: bt
|
|
5594
|
+
}, La = /*@__PURE__*/ createFormatPrepper(Mt), ka = /*@__PURE__*/ createFormatPrepper(Pt), qa = /*@__PURE__*/ createFormatPrepper(Et), xa = /*@__PURE__*/ createFormatPrepper(vt), Ra = /*@__PURE__*/ createFormatPrepper(Ft), Wa = /*@__PURE__*/ createFormatPrepper(bt), Ga = /*@__PURE__*/ createFormatPrepper(St), Ua = {
|
|
5595
|
+
era: requireStringOrUndefined,
|
|
5596
|
+
eraYear: requireIntegerOrUndefined,
|
|
5597
|
+
year: requireInteger,
|
|
5598
|
+
month: requirePositiveInteger,
|
|
5599
|
+
daysInMonth: requirePositiveInteger,
|
|
5600
|
+
daysInYear: requirePositiveInteger,
|
|
5601
|
+
inLeapYear: Ae,
|
|
5602
|
+
monthsInYear: requirePositiveInteger
|
|
5603
|
+
}, za = {
|
|
5604
|
+
monthCode: Le
|
|
5605
|
+
}, Ha = {
|
|
5606
|
+
day: requirePositiveInteger
|
|
5607
|
+
}, Ka = {
|
|
5608
|
+
dayOfWeek: requirePositiveInteger,
|
|
5609
|
+
dayOfYear: requirePositiveInteger,
|
|
5610
|
+
weekOfYear: requirePositiveInteger,
|
|
5611
|
+
yearOfWeek: requireInteger,
|
|
5612
|
+
daysInWeek: requirePositiveInteger
|
|
5613
|
+
}, Qa = /*@__PURE__*/ Object.assign({}, Ua, za, Ha, Ka), Xa = {
|
|
5614
|
+
...createCalendarFieldMethods(Ua, [ mn ]),
|
|
5615
|
+
...createCalendarFieldMethods(Ka, []),
|
|
5616
|
+
...createCalendarFieldMethods(za, [ mn, pn ]),
|
|
5617
|
+
...createCalendarFieldMethods(Ha, [ pn ])
|
|
5618
|
+
}, $a = /*@__PURE__*/ createCalendarGetters(Qa), _a = /*@__PURE__*/ createCalendarGetters({
|
|
5619
|
+
...Ua,
|
|
5620
|
+
...za
|
|
5621
|
+
}), ei = /*@__PURE__*/ createCalendarGetters({
|
|
5622
|
+
...za,
|
|
5623
|
+
...Ha
|
|
5624
|
+
}), ti = {
|
|
5625
|
+
calendarId: e => getId(e.calendar)
|
|
5626
|
+
}, ni = /*@__PURE__*/ mapProps(((e, t) => function(n) {
|
|
5627
|
+
const {X: o} = this;
|
|
5628
|
+
return e(o[t](wi(createPlainDateSlots(n, o))));
|
|
5629
|
+
}), Qa), oi = /*@__PURE__*/ mapPropNames((e => t => t[e]), de), ri = /*@__PURE__*/ mapPropNames(((e, t) => e => e[ge[t]]), j), ai = {
|
|
5630
|
+
epochSeconds: getEpochSeconds,
|
|
5631
|
+
epochMilliseconds: getEpochMilliseconds,
|
|
5632
|
+
epochMicroseconds: getEpochMicroseconds,
|
|
5633
|
+
epochNanoseconds: getEpochNanoseconds
|
|
5634
|
+
}, ii = /*@__PURE__*/ bindArgs(excludePropsByName, new Set([ "branding" ])), [si, li, ci] = createSlotClass(pn, bindArgs(constructPlainMonthDaySlots, refineCalendarSlot), {
|
|
5635
|
+
...ti,
|
|
5636
|
+
...ei
|
|
5637
|
+
}, {
|
|
5638
|
+
with(e, t, n) {
|
|
5639
|
+
return li(plainMonthDayWithFields(zi, e, this, rejectInvalidBag(t), n));
|
|
5640
|
+
},
|
|
5641
|
+
equals: (e, t) => plainMonthDaysEqual(e, toPlainMonthDaySlots(t)),
|
|
5642
|
+
toString: formatPlainMonthDayIso,
|
|
5643
|
+
toJSON: e => formatPlainMonthDayIso(e),
|
|
5644
|
+
toLocaleString(e, t, n) {
|
|
5645
|
+
const [o, r] = ka(t, n, e);
|
|
5646
|
+
return o.format(r);
|
|
5647
|
+
},
|
|
5648
|
+
toPlainDate(e, t) {
|
|
5649
|
+
return wi(plainMonthDayToPlainDate(Ui, e, this, t));
|
|
5650
|
+
},
|
|
5651
|
+
getISOFields: ii,
|
|
5652
|
+
getCalendar: createCalendarFromSlots,
|
|
5653
|
+
valueOf: neverValueOf
|
|
5654
|
+
}, {
|
|
5655
|
+
from: (e, t) => li(toPlainMonthDaySlots(e, t))
|
|
5656
|
+
}), ui = {
|
|
5657
|
+
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,
|
|
5658
|
+
getPossibleInstantsFor(e, t, n) {
|
|
5659
|
+
return [ ...t.call(e, Ii(createPlainDateTimeSlots(n, ae))) ].map((e => Pi(e).epochNanoseconds));
|
|
5660
|
+
}
|
|
5661
|
+
}, di = {
|
|
5662
|
+
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter
|
|
5663
|
+
}, [fi, mi, Si] = createSlotClass(mn, bindArgs(constructPlainYearMonthSlots, refineCalendarSlot), {
|
|
5664
|
+
...ti,
|
|
5665
|
+
..._a
|
|
5666
|
+
}, {
|
|
5667
|
+
with(e, t, n) {
|
|
5668
|
+
return mi(plainYearMonthWithFields(Gi, e, this, rejectInvalidBag(t), n));
|
|
5669
|
+
},
|
|
5670
|
+
add: (e, t, n) => mi(movePlainYearMonth(Qi, 0, e, toDurationSlots(t), n)),
|
|
5671
|
+
subtract: (e, t, n) => mi(movePlainYearMonth(Qi, 1, e, toDurationSlots(t), n)),
|
|
5672
|
+
until: (e, t, n) => _i(diffPlainYearMonth(Xi, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5673
|
+
since: (e, t, n) => _i(diffPlainYearMonth(Xi, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5674
|
+
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5675
|
+
toString: formatPlainYearMonthIso,
|
|
5676
|
+
toJSON: e => formatPlainYearMonthIso(e),
|
|
5677
|
+
toLocaleString(e, t, n) {
|
|
5678
|
+
const [o, r] = La(t, n, e);
|
|
5679
|
+
return o.format(r);
|
|
5680
|
+
},
|
|
5681
|
+
toPlainDate(e, t) {
|
|
5682
|
+
return wi(plainYearMonthToPlainDate(Ui, e, this, t));
|
|
5683
|
+
},
|
|
5684
|
+
getISOFields: ii,
|
|
5685
|
+
getCalendar: createCalendarFromSlots,
|
|
5686
|
+
valueOf: neverValueOf
|
|
5687
|
+
}, {
|
|
5688
|
+
from: (e, t) => mi(toPlainYearMonthSlots(e, t)),
|
|
5689
|
+
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5690
|
+
}), [Oi, Ti] = createSlotClass(In, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5691
|
+
...ai,
|
|
5692
|
+
...ti,
|
|
5693
|
+
...adaptDateMethods($a),
|
|
5694
|
+
...adaptDateMethods(ri),
|
|
5695
|
+
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5696
|
+
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5697
|
+
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5698
|
+
timeZoneId: e => getId(e.timeZone)
|
|
5699
|
+
}, {
|
|
5700
|
+
with(e, t, n) {
|
|
5701
|
+
return Ti(zonedDateTimeWithFields(Ui, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5702
|
+
},
|
|
5703
|
+
withPlainTime: (e, t) => Ti(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5704
|
+
withPlainDate: (e, t) => Ti(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5705
|
+
withTimeZone: (e, t) => Ti(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5706
|
+
withCalendar: (e, t) => Ti(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5707
|
+
add: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5708
|
+
subtract: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5709
|
+
until: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5710
|
+
since: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5711
|
+
round: (e, t) => Ti(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5712
|
+
startOfDay: e => Ti(computeStartOfDay(createTimeZoneOps, e)),
|
|
5713
|
+
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5714
|
+
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
5715
|
+
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
5716
|
+
toLocaleString(e, t, n = {}) {
|
|
5717
|
+
const [o, r] = Ga(t, n, e);
|
|
5718
|
+
return o.format(r);
|
|
5719
|
+
},
|
|
5720
|
+
toInstant: e => hi(zonedDateTimeToInstant(e)),
|
|
5721
|
+
toPlainDate: e => wi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
5722
|
+
toPlainTime: e => bi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
5723
|
+
toPlainDateTime: e => Ii(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
5724
|
+
toPlainYearMonth(e) {
|
|
5725
|
+
return mi(zonedDateTimeToPlainYearMonth(xi, e, this));
|
|
5726
|
+
},
|
|
5727
|
+
toPlainMonthDay(e) {
|
|
5728
|
+
return li(zonedDateTimeToPlainMonthDay(Wi, e, this));
|
|
5729
|
+
},
|
|
5730
|
+
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
5731
|
+
getCalendar: createCalendarFromSlots,
|
|
5732
|
+
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Di(e) : e,
|
|
5733
|
+
valueOf: neverValueOf
|
|
5734
|
+
}, {
|
|
5735
|
+
from: (e, t) => Ti(toZonedDateTimeSlots(e, t)),
|
|
5736
|
+
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
5737
|
+
}), [pi, hi, Pi] = createSlotClass(gn, constructInstantSlots, ai, {
|
|
5738
|
+
add: (e, t) => hi(moveInstant(0, e, toDurationSlots(t))),
|
|
5739
|
+
subtract: (e, t) => hi(moveInstant(1, e, toDurationSlots(t))),
|
|
5740
|
+
until: (e, t, n) => _i(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5741
|
+
since: (e, t, n) => _i(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5742
|
+
round: (e, t) => hi(roundInstant(e, t)),
|
|
5743
|
+
equals: (e, t) => instantsEqual(e, toInstantSlots(t)),
|
|
5744
|
+
toString: (e, t) => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),
|
|
5745
|
+
toJSON: e => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e),
|
|
5746
|
+
toLocaleString(e, t, n) {
|
|
5747
|
+
const [o, r] = Wa(t, n, e);
|
|
5748
|
+
return o.format(r);
|
|
5749
|
+
},
|
|
5750
|
+
toZonedDateTimeISO: (e, t) => Ti(instantToZonedDateTime(e, refineTimeZoneSlot(t))),
|
|
5751
|
+
toZonedDateTime(e, t) {
|
|
5752
|
+
const n = requireObjectLike(t);
|
|
5753
|
+
return Ti(instantToZonedDateTime(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));
|
|
5754
|
+
},
|
|
5755
|
+
valueOf: neverValueOf
|
|
5756
|
+
}, {
|
|
5757
|
+
from: e => hi(toInstantSlots(e)),
|
|
5758
|
+
fromEpochSeconds: e => hi(epochSecToInstant(e)),
|
|
5759
|
+
fromEpochMilliseconds: e => hi(epochMilliToInstant(e)),
|
|
5760
|
+
fromEpochMicroseconds: e => hi(epochMicroToInstant(e)),
|
|
5761
|
+
fromEpochNanoseconds: e => hi(epochNanoToInstant(e)),
|
|
5762
|
+
compare: (e, t) => compareInstants(toInstantSlots(e), toInstantSlots(t))
|
|
5763
|
+
}), [Di, Ci] = createSlotClass("TimeZone", (e => {
|
|
5764
|
+
const t = resolveTimeZoneId(e);
|
|
5765
|
+
return {
|
|
5766
|
+
branding: "TimeZone",
|
|
5767
|
+
id: t,
|
|
5768
|
+
K: wn(t)
|
|
5769
|
+
};
|
|
5770
|
+
}), {
|
|
5771
|
+
id: e => e.id
|
|
5772
|
+
}, {
|
|
5773
|
+
toString: e => e.id,
|
|
5774
|
+
toJSON: e => e.id,
|
|
5775
|
+
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => hi(createInstantSlots(e)))),
|
|
5776
|
+
getOffsetNanosecondsFor: ({K: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),
|
|
5777
|
+
getOffsetStringFor(e, t) {
|
|
5778
|
+
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, di).getOffsetNanosecondsFor(n);
|
|
5779
|
+
return formatOffsetNano(o);
|
|
5780
|
+
},
|
|
5781
|
+
getPlainDateTimeFor(e, t, n = ae) {
|
|
5782
|
+
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, di).getOffsetNanosecondsFor(o);
|
|
5783
|
+
return Ii(createPlainDateTimeSlots(epochNanoToIso(o, r), refineCalendarSlot(n)));
|
|
5784
|
+
},
|
|
5785
|
+
getInstantFor(e, t, n) {
|
|
5786
|
+
const o = toPlainDateTimeSlots(t), r = refineEpochDisambigOptions(n), a = createAdapterOps(this);
|
|
5787
|
+
return hi(createInstantSlots(getSingleInstantFor(a, o, r)));
|
|
5788
|
+
},
|
|
5789
|
+
getNextTransition: ({K: e}, t) => getImplTransition(1, e, t),
|
|
5790
|
+
getPreviousTransition: ({K: e}, t) => getImplTransition(-1, e, t),
|
|
5791
|
+
equals(e, t) {
|
|
5792
|
+
return !!isTimeZoneSlotsEqual(this, refineTimeZoneSlot(t));
|
|
5793
|
+
}
|
|
5794
|
+
}, {
|
|
5795
|
+
from(e) {
|
|
5796
|
+
const t = refineTimeZoneSlot(e);
|
|
5797
|
+
return "string" == typeof t ? new Di(t) : t;
|
|
5798
|
+
}
|
|
5799
|
+
}), gi = /*@__PURE__*/ createProtocolValidator(Object.keys(ui)), [Zi, bi] = createSlotClass(Dn, constructPlainTimeSlots, ri, {
|
|
5800
|
+
with(e, t, n) {
|
|
5801
|
+
return bi(plainTimeWithFields(this, rejectInvalidBag(t), n));
|
|
5802
|
+
},
|
|
5803
|
+
add: (e, t) => bi(movePlainTime(0, e, toDurationSlots(t))),
|
|
5804
|
+
subtract: (e, t) => bi(movePlainTime(1, e, toDurationSlots(t))),
|
|
5805
|
+
until: (e, t, n) => _i(diffPlainTimes(0, e, toPlainTimeSlots(t), n)),
|
|
5806
|
+
since: (e, t, n) => _i(diffPlainTimes(1, e, toPlainTimeSlots(t), n)),
|
|
5807
|
+
round: (e, t) => bi(roundPlainTime(e, t)),
|
|
5808
|
+
equals: (e, t) => plainTimesEqual(e, toPlainTimeSlots(t)),
|
|
5809
|
+
toString: formatPlainTimeIso,
|
|
5810
|
+
toJSON: e => formatPlainTimeIso(e),
|
|
5811
|
+
toLocaleString(e, t, n) {
|
|
5812
|
+
const [o, r] = Ra(t, n, e);
|
|
5813
|
+
return o.format(r);
|
|
5814
|
+
},
|
|
5815
|
+
toZonedDateTime: (e, t) => Ti(plainTimeToZonedDateTime(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),
|
|
5816
|
+
toPlainDateTime: (e, t) => Ii(plainTimeToPlainDateTime(e, toPlainDateSlots(t))),
|
|
5817
|
+
getISOFields: ii,
|
|
5818
|
+
valueOf: neverValueOf
|
|
5819
|
+
}, {
|
|
5820
|
+
from: (e, t) => bi(toPlainTimeSlots(e, t)),
|
|
5821
|
+
compare: (e, t) => compareIsoTimeFields(toPlainTimeSlots(e), toPlainTimeSlots(t))
|
|
5822
|
+
}), [Fi, Ii] = createSlotClass(Tn, bindArgs(constructPlainDateTimeSlots, refineCalendarSlot), {
|
|
5823
|
+
...ti,
|
|
5824
|
+
...$a,
|
|
5825
|
+
...ri
|
|
5826
|
+
}, {
|
|
5827
|
+
with(e, t, n) {
|
|
5828
|
+
return Ii(plainDateTimeWithFields(Ui, e, this, rejectInvalidBag(t), n));
|
|
5829
|
+
},
|
|
5830
|
+
withPlainTime: (e, t) => Ii(plainDateTimeWithPlainTime(e, optionalToPlainTimeFields(t))),
|
|
5831
|
+
withPlainDate: (e, t) => Ii(plainDateTimeWithPlainDate(e, toPlainDateSlots(t))),
|
|
5832
|
+
withCalendar: (e, t) => Ii(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5833
|
+
add: (e, t, n) => Ii(movePlainDateTime(Hi, 0, e, toDurationSlots(t), n)),
|
|
5834
|
+
subtract: (e, t, n) => Ii(movePlainDateTime(Hi, 1, e, toDurationSlots(t), n)),
|
|
5835
|
+
until: (e, t, n) => _i(diffPlainDateTimes(Ki, 0, e, toPlainDateTimeSlots(t), n)),
|
|
5836
|
+
since: (e, t, n) => _i(diffPlainDateTimes(Ki, 1, e, toPlainDateTimeSlots(t), n)),
|
|
5837
|
+
round: (e, t) => Ii(roundPlainDateTime(e, t)),
|
|
5838
|
+
equals: (e, t) => plainDateTimesEqual(e, toPlainDateTimeSlots(t)),
|
|
5839
|
+
toString: (e, t) => formatPlainDateTimeIso(e, t),
|
|
5840
|
+
toJSON: e => formatPlainDateTimeIso(e),
|
|
5841
|
+
toLocaleString(e, t, n) {
|
|
5842
|
+
const [o, r] = xa(t, n, e);
|
|
5843
|
+
return o.format(r);
|
|
5844
|
+
},
|
|
5845
|
+
toZonedDateTime: (e, t, n) => Ti(plainDateTimeToZonedDateTime(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),
|
|
5846
|
+
toPlainDate: e => wi(createPlainDateSlots(e)),
|
|
5847
|
+
toPlainYearMonth(e) {
|
|
5848
|
+
return mi(plainDateTimeToPlainYearMonth(xi, e, this));
|
|
5849
|
+
},
|
|
5850
|
+
toPlainMonthDay(e) {
|
|
5851
|
+
return li(plainDateTimeToPlainMonthDay(Wi, e, this));
|
|
5852
|
+
},
|
|
5853
|
+
toPlainTime: e => bi(createPlainTimeSlots(e)),
|
|
5854
|
+
getISOFields: ii,
|
|
5855
|
+
getCalendar: createCalendarFromSlots,
|
|
5856
|
+
valueOf: neverValueOf
|
|
5857
|
+
}, {
|
|
5858
|
+
from: (e, t) => Ii(toPlainDateTimeSlots(e, t)),
|
|
5859
|
+
compare: (e, t) => compareIsoDateTimeFields(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))
|
|
5860
|
+
}), [vi, wi, ji] = createSlotClass(hn, bindArgs(constructPlainDateSlots, refineCalendarSlot), {
|
|
5861
|
+
...ti,
|
|
5862
|
+
...$a
|
|
5863
|
+
}, {
|
|
5864
|
+
with(e, t, n) {
|
|
5865
|
+
return wi(plainDateWithFields(Ui, e, this, rejectInvalidBag(t), n));
|
|
5866
|
+
},
|
|
5867
|
+
withCalendar: (e, t) => wi(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5868
|
+
add: (e, t, n) => wi(movePlainDate(Hi, 0, e, toDurationSlots(t), n)),
|
|
5869
|
+
subtract: (e, t, n) => wi(movePlainDate(Hi, 1, e, toDurationSlots(t), n)),
|
|
5870
|
+
until: (e, t, n) => _i(diffPlainDates(Ki, 0, e, toPlainDateSlots(t), n)),
|
|
5871
|
+
since: (e, t, n) => _i(diffPlainDates(Ki, 1, e, toPlainDateSlots(t), n)),
|
|
5872
|
+
equals: (e, t) => plainDatesEqual(e, toPlainDateSlots(t)),
|
|
5873
|
+
toString: formatPlainDateIso,
|
|
5874
|
+
toJSON: e => formatPlainDateIso(e),
|
|
5875
|
+
toLocaleString(e, t, n) {
|
|
5876
|
+
const [o, r] = qa(t, n, e);
|
|
5877
|
+
return o.format(r);
|
|
5878
|
+
},
|
|
5879
|
+
toZonedDateTime(e, t) {
|
|
5880
|
+
const n = !isObjectLike(t) || t instanceof Di ? {
|
|
5881
|
+
timeZone: t
|
|
5882
|
+
} : t;
|
|
5883
|
+
return Ti(plainDateToZonedDateTime(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));
|
|
5884
|
+
},
|
|
5885
|
+
toPlainDateTime: (e, t) => Ii(plainDateToPlainDateTime(e, optionalToPlainTimeFields(t))),
|
|
5886
|
+
toPlainYearMonth(e) {
|
|
5887
|
+
return mi(plainDateToPlainYearMonth(xi, e, this));
|
|
5888
|
+
},
|
|
5889
|
+
toPlainMonthDay(e) {
|
|
5890
|
+
return li(plainDateToPlainMonthDay(Wi, e, this));
|
|
5891
|
+
},
|
|
5892
|
+
getISOFields: ii,
|
|
5893
|
+
getCalendar: createCalendarFromSlots,
|
|
5894
|
+
valueOf: neverValueOf
|
|
5895
|
+
}, {
|
|
5896
|
+
from: (e, t) => wi(toPlainDateSlots(e, t)),
|
|
5897
|
+
compare: (e, t) => compareIsoDateFields(toPlainDateSlots(e), toPlainDateSlots(t))
|
|
5898
|
+
}), Mi = {
|
|
5899
|
+
fields(e, t, n) {
|
|
5900
|
+
return [ ...t.call(e, n) ];
|
|
5901
|
+
}
|
|
5902
|
+
}, yi = /*@__PURE__*/ Object.assign({
|
|
5903
|
+
dateFromFields(e, t, n, o) {
|
|
5904
|
+
return ji(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5905
|
+
}
|
|
5906
|
+
}, Mi), Ni = /*@__PURE__*/ Object.assign({
|
|
5907
|
+
yearMonthFromFields(e, t, n, o) {
|
|
5908
|
+
return Si(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5909
|
+
}
|
|
5910
|
+
}, Mi), Bi = /*@__PURE__*/ Object.assign({
|
|
5911
|
+
monthDayFromFields(e, t, n, o) {
|
|
5912
|
+
return ci(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5913
|
+
}
|
|
5914
|
+
}, Mi), Yi = {
|
|
5915
|
+
mergeFields(e, t, n, o) {
|
|
5916
|
+
return requireObjectLike(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));
|
|
5917
|
+
}
|
|
5918
|
+
}, Ai = /*@__PURE__*/ Object.assign({}, yi, Yi), Ei = /*@__PURE__*/ Object.assign({}, Ni, Yi), Vi = /*@__PURE__*/ Object.assign({}, Bi, Yi), Ji = {
|
|
5919
|
+
dateAdd(e, t, n, o, r) {
|
|
5920
|
+
return ji(t.call(e, wi(createPlainDateSlots(n, e)), _i(createDurationSlots(o)), r));
|
|
5921
|
+
}
|
|
5922
|
+
}, Li = /*@__PURE__*/ Object.assign({}, Ji, {
|
|
5923
|
+
dateUntil(e, t, n, o, r, a) {
|
|
5924
|
+
return es(t.call(e, wi(createPlainDateSlots(n, e)), wi(createPlainDateSlots(o, e)), Object.assign(Object.create(null), a, {
|
|
5925
|
+
largestUnit: k[r]
|
|
5926
|
+
})));
|
|
5927
|
+
}
|
|
5928
|
+
}), ki = /*@__PURE__*/ Object.assign({}, Ji, {
|
|
5929
|
+
day: dayAdapter
|
|
5930
|
+
}), qi = /*@__PURE__*/ Object.assign({}, Li, {
|
|
5931
|
+
day: dayAdapter
|
|
5932
|
+
}), xi = /*@__PURE__*/ createCompoundOpsCreator(Ni), Ri = /*@__PURE__*/ createCompoundOpsCreator(yi), Wi = /*@__PURE__*/ createCompoundOpsCreator(Bi), Gi = /*@__PURE__*/ createCompoundOpsCreator(Ei), Ui = /*@__PURE__*/ createCompoundOpsCreator(Ai), zi = /*@__PURE__*/ createCompoundOpsCreator(Vi), Hi = /*@__PURE__*/ createCompoundOpsCreator(Ji), Ki = /*@__PURE__*/ createCompoundOpsCreator(Li), Qi = /*@__PURE__*/ createCompoundOpsCreator(ki), Xi = /*@__PURE__*/ createCompoundOpsCreator(qi), [$i, _i, es] = createSlotClass(yn, constructDurationSlots, {
|
|
5933
|
+
...oi,
|
|
5934
|
+
blank: e => queryDurationBlank(e),
|
|
5935
|
+
sign: e => Sn(e)
|
|
5936
|
+
}, {
|
|
5937
|
+
with: (e, t) => _i(durationWithFields(e, t)),
|
|
5938
|
+
add: (e, t, n) => _i(addDurations(refinePublicRelativeTo, Ki, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5939
|
+
subtract: (e, t, n) => _i(addDurations(refinePublicRelativeTo, Ki, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5940
|
+
negated: e => _i(negateDuration(e)),
|
|
5941
|
+
abs: e => _i(absDuration(e)),
|
|
5942
|
+
round: (e, t) => _i(roundDuration(refinePublicRelativeTo, Ki, createTimeZoneOps, e, t)),
|
|
5943
|
+
total: (e, t) => totalDuration(refinePublicRelativeTo, Ki, createTimeZoneOps, e, t),
|
|
5944
|
+
toString: formatDurationIso,
|
|
5945
|
+
toLocaleString(e, t, n) {
|
|
5946
|
+
return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : formatDurationIso(e);
|
|
5947
|
+
},
|
|
5948
|
+
toJSON: e => formatDurationIso(e),
|
|
5949
|
+
valueOf: neverValueOf
|
|
5950
|
+
}, {
|
|
5951
|
+
from: e => _i(toDurationSlots(e)),
|
|
5952
|
+
compare: (e, t, n) => compareDurations(refinePublicRelativeTo, Ki, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)
|
|
5953
|
+
}), ts = {
|
|
5954
|
+
toString: e => e.id,
|
|
5955
|
+
toJSON: e => e.id,
|
|
5956
|
+
...Xa,
|
|
5957
|
+
dateAdd: ({id: e, K: t}, n, o, r) => wi(createPlainDateSlots(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),
|
|
5958
|
+
dateUntil: ({K: e}, t, n, o) => _i(createDurationSlots(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), refineCalendarDiffOptions(o)))),
|
|
5959
|
+
dateFromFields: ({id: e, K: t}, n, o) => wi(refinePlainDateBag(t, n, o, getRequiredDateFields(e))),
|
|
5960
|
+
yearMonthFromFields: ({id: e, K: t}, n, o) => mi(refinePlainYearMonthBag(t, n, o, getRequiredYearMonthFields(e))),
|
|
5961
|
+
monthDayFromFields: ({id: e, K: t}, n, o) => li(refinePlainMonthDayBag(t, 0, n, o, getRequiredMonthDayFields(e))),
|
|
5962
|
+
fields({K: e}, t) {
|
|
5963
|
+
const n = new Set(te), o = [];
|
|
5964
|
+
for (const e of t) {
|
|
5965
|
+
if (Le(e), !n.has(e)) {
|
|
5966
|
+
throw new RangeError(forbiddenField(e));
|
|
5967
|
+
}
|
|
5968
|
+
n.delete(e), o.push(e);
|
|
5969
|
+
}
|
|
5970
|
+
return e.fields(o);
|
|
5971
|
+
},
|
|
5972
|
+
mergeFields: ({K: e}, t, n) => e.mergeFields(excludeUndefinedProps(requireNonNullish(t)), excludeUndefinedProps(requireNonNullish(n)))
|
|
5973
|
+
}, [ns] = createSlotClass("Calendar", (e => {
|
|
5974
|
+
const t = resolveCalendarId(Le(e));
|
|
5975
|
+
return {
|
|
5976
|
+
branding: "Calendar",
|
|
5977
|
+
id: t,
|
|
5978
|
+
K: nt(t)
|
|
5979
|
+
};
|
|
5980
|
+
}), {
|
|
5981
|
+
id: e => e.id
|
|
5982
|
+
}, ts, {
|
|
5983
|
+
from(e) {
|
|
5984
|
+
const t = refineCalendarSlot(e);
|
|
5985
|
+
return "string" == typeof t ? new ns(t) : t;
|
|
5986
|
+
}
|
|
5987
|
+
}), os = /*@__PURE__*/ createProtocolValidator(Object.keys(ts).slice(4)), rs = /*@__PURE__*/ Object.defineProperties({}, {
|
|
5988
|
+
...createStringTagDescriptors("Temporal.Now"),
|
|
5989
|
+
...createPropDescriptors({
|
|
5990
|
+
timeZoneId: () => getCurrentTimeZoneId(),
|
|
5991
|
+
instant: () => hi(createInstantSlots(getCurrentEpochNanoseconds())),
|
|
5992
|
+
zonedDateTime: (e, t = getCurrentTimeZoneId()) => Ti(createZonedDateTimeSlots(getCurrentEpochNanoseconds(), refineTimeZoneSlot(t), refineCalendarSlot(e))),
|
|
5993
|
+
zonedDateTimeISO: (e = getCurrentTimeZoneId()) => Ti(createZonedDateTimeSlots(getCurrentEpochNanoseconds(), refineTimeZoneSlot(e), ae)),
|
|
5994
|
+
plainDateTime: (e, t = getCurrentTimeZoneId()) => Ii(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
5995
|
+
plainDateTimeISO: (e = getCurrentTimeZoneId()) => Ii(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ae)),
|
|
5996
|
+
plainDate: (e, t = getCurrentTimeZoneId()) => wi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
5997
|
+
plainDateISO: (e = getCurrentTimeZoneId()) => wi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ae)),
|
|
5998
|
+
plainTimeISO: (e = getCurrentTimeZoneId()) => bi(createPlainTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))
|
|
5999
|
+
})
|
|
6000
|
+
}), jt = /*@__PURE__*/ Object.defineProperties({}, {
|
|
6001
|
+
...createStringTagDescriptors("Temporal"),
|
|
6002
|
+
...createPropDescriptors({
|
|
6003
|
+
PlainYearMonth: fi,
|
|
6004
|
+
PlainMonthDay: si,
|
|
6005
|
+
PlainDate: vi,
|
|
6006
|
+
PlainTime: Zi,
|
|
6007
|
+
PlainDateTime: Fi,
|
|
6008
|
+
ZonedDateTime: Oi,
|
|
6009
|
+
Instant: pi,
|
|
6010
|
+
Calendar: ns,
|
|
6011
|
+
TimeZone: Di,
|
|
6012
|
+
Duration: $i,
|
|
6013
|
+
Now: rs
|
|
6014
|
+
})
|
|
6015
|
+
});
|
|
2030
6016
|
|
|
2031
6017
|
/**
|
|
2032
6018
|
* java.lang.Math.toRadians
|
|
@@ -2759,7 +6745,7 @@ class NOAACalculator {
|
|
|
2759
6745
|
return cal
|
|
2760
6746
|
.toZonedDateTime({
|
|
2761
6747
|
timeZone: 'UTC',
|
|
2762
|
-
plainTime: new
|
|
6748
|
+
plainTime: new jt.PlainTime(hours, minutes, seconds, Math.trunc(calculatedTime * 1000)),
|
|
2763
6749
|
})
|
|
2764
6750
|
.withTimeZone(this.geoLocation.getTimeZone());
|
|
2765
6751
|
}
|
|
@@ -3488,9 +7474,13 @@ function pad4(number) {
|
|
|
3488
7474
|
return String(number);
|
|
3489
7475
|
}
|
|
3490
7476
|
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
7477
|
+
Object.defineProperties(globalThis, createPropDescriptors({
|
|
7478
|
+
Temporal: jt
|
|
7479
|
+
})), Object.defineProperties(Intl, createPropDescriptors({
|
|
7480
|
+
DateTimeFormat: kt
|
|
7481
|
+
})), Object.defineProperties(Date.prototype, createPropDescriptors({
|
|
7482
|
+
toTemporalInstant: qt
|
|
7483
|
+
}));
|
|
3494
7484
|
|
|
3495
7485
|
/**
|
|
3496
7486
|
* @private
|
|
@@ -6330,7 +10320,7 @@ class DailyLearning {
|
|
|
6330
10320
|
}
|
|
6331
10321
|
|
|
6332
10322
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
6333
|
-
const version = '5.2.
|
|
10323
|
+
const version = '5.2.2';
|
|
6334
10324
|
|
|
6335
10325
|
const NONE$1 = 0;
|
|
6336
10326
|
const HALF = 1;
|