Socket
Socket
Sign inDemoInstall

temporal-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temporal-polyfill - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/global.js

@@ -1,2 +0,2 @@

function n(n,e){return n<e?-1:n>e?1:0}function e(e){return n(e,0)}function t(n,e,t){const r=BigInt(e),o=n/r*r,i=Number(n-o);return o+BigInt(t(i/e))*r}function r(n,e){return(n%e+e)%e}var o=1000n,i=1000000n,s=1000000000n,a=60000000000n,c=3600000000000n,u=86400000000000n,d=[1,1e3,1e6,1e9,6e10,36e11,864e11],h=[9,6,3];function l(n){return n<=6}function f(n){return n>=6}function m(n){return p(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function g(n){return Math.floor(y(n)/1e3)}function y(n){return w(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond)}function p(n,e,t,r,s,a,c,u,d){return BigInt(w(n,e,t,r,s,a,c))*i+BigInt(u??0)*o+BigInt(d??0)}function w(n,t,r,o,i,s,a){const c=n??1970,u=t??1,d=r??1,h=e(c);let l,f,m=0;const g=c>=0&&c<1e3,y=g?c+1200:c;for(;m<31;m++){l=d-h*m;const n=Date.UTC(y,u-1,l,o??0,i??0,s??0,a??0);if(!Y(n)){f=n+h*m*864e5;break}}return(void 0===f||l<1||l>B.daysInMonth(c,u))&&b(),g&&(f=new Date(f).setUTCFullYear(c)),f}function v(n){let e=n/i,t=Number(n-e*i);t<0&&(t+=1e6,e-=1n);const r=Math.floor(t/1e3);return t-=1e3*r,{...M(Number(e)),isoMicrosecond:r,isoNanosecond:t}}function M(n){const[e,t]=N(n);return{isoYear:e.getUTCFullYear(),isoMonth:e.getUTCMonth()+1,isoDay:e.getUTCDate()+t,isoHour:e.getUTCHours(),isoMinute:e.getUTCMinutes(),isoSecond:e.getUTCSeconds(),isoMillisecond:e.getUTCMilliseconds()}}function I(n){return N(1e3*n)[0].getUTCFullYear()}function S(n){return Math.floor(w(n)/1e3)}function T(n,e){return Math.round((e-n)/864e5)}function D(n,e){return n+864e5*e}function F(n,e,t){const[o,i]=N(w(n,e,t));return r(o.getUTCDay()+i,7)||7}function O(n){(n<-8640000086399999999999n||n>8640000086399999999999n)&&b()}function N(n){const t=e(n);let r,o=0;for(;o<31;o++){const e=new Date(n-t*o*864e5);if(!Y(e)){r=e;break}}return void 0===r&&b(),[r,t*o]}function Y(n){return isNaN(n.valueOf())}function b(){throw new RangeError("Date outside of supported range")}function Z(n,e){return String(n).padStart(e,"0")}function E(n){return n<0?"-":"+"}var C={gregory:{bce:-1,ce:0},ethioaa:{era0:0},ethiopic:{era0:0,era1:5500},coptic:{era0:-1,era1:0},roc:{"before-roc":-1,minguo:0},buddhist:{be:0},japanese:{bce:-1,ce:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018}},P=class{constructor(n){this.id=n}era(n,e,t){}eraYear(n,e,t){}monthCode(n,e){return"M"+Z(n,2)}convertMonthCode(n,e){return parseInt(n.substr(1))}convertEraYear(n,t,r){let o=C[this.id]?.[t];if(void 0===o){if(r)throw new Error("Unkown era "+t);o=0}return(o+n)*(e(o)||1)}},U=class extends P{year(n){return n}month(n,e){return e}day(n,e,t){return t}epochMilliseconds(n,e,t){return w(n,e,t)}daysInMonth(n,e){return 2===e?this.inLeapYear(n)?29:28:4===e||6===e||9===e||11===e?30:31}monthsInYear(){return 12}inLeapYear(n){return n%4==0&&(n%100!=0||n%400==0)}guessYearForMonthDay(){return 1972}normalizeISOYearForMonthDay(){return 1972}},B=new U("iso8601"),R=x("overflow",{constrain:0,reject:1},0);function x(n,e,t){const r=function(n,e,t){return(r,o)=>{if(void 0===r){const e=o??t;if(void 0===e)throw new RangeError(`Must specify a ${n}`);return e}if(void 0===e[r])throw new RangeError(`Invalid ${n}: ${r}`);return e[r]}}(n,e,t);return(e,t)=>{const o=L(e);return r(o[n],t)}}function k(n,e,t,r){if(void 0===n)return e;if(!Number.isFinite(n))throw new RangeError("Number must be finite");n=Math.trunc(n);const o=Math.min(Math.max(n,e),t);if(o!==n&&1===r)throw new RangeError("Invalid overflowed value "+n);return o}function j(n,e){const t={};let r=0;for(const o in e)void 0!==n[o]&&(t[o]=e[o](n[o]),r++);if(!r)throw new TypeError("Invalid object, no keys");return t}function L(n){if(void 0===n)return{};if(!$(n))throw TypeError("options must be an object or undefined");return n}var H=/object|function/;function $(n){return null!==n&&H.test(typeof n)}var A=["calendar","timeZone"];function q(n,e){for(const e of A)if(void 0!==n[e])throw new TypeError(`Disallowed field ${e}`);return j(n,e)}var z=x("roundingMode",{halfExpand:Math.round,ceil:Math.ceil,trunc:Math.trunc,floor:Math.floor});function W(){const n=new WeakMap;return[n.get.bind(n),n.set.bind(n)]}function G(n,e){Object.defineProperties(n.prototype,J(e,(n=>({get:n}))))}function J(n,e){const t={};for(const r in n)t[r]=e(n[r],r);return t}function K(n,e){const t={};return n.forEach(((n,r)=>{t[n]=e(n,r)})),t}var Q=["nanosecond","microsecond","millisecond","second","minute","hour"],V=[...Q,"day","week","month","year"],X=V.map((n=>n+"s")),_=K(V,((n,e)=>e)),nn=K(X,((n,e)=>e));function en(n,e,t,r){let o;if(void 0===n){if(void 0===e)throw new RangeError("Unit is required");o=e}else if(o=_[n]??nn[n],void 0===o||o<t||o>r)throw new RangeError("Invalid unit "+n);return o}function tn(n,e,t,r,o,i){if(void 0===e&&!$(n))throw new TypeError("Need rounding options");const s=L(n),a=s.roundingIncrement??1,c=en(s.smallestUnit,e,t,r);if(!o&&i){if(c<6&&864e11%a*d[c])throw new RangeError("Increment must evenly divide into 24 hours")}else{if(c<6?d[c+1]%a:!o&&1!==a)throw new RangeError("roundingIncrement does not divide evenly into next highest unit");if(c<6&&a*d[c]>=d[c+1])throw new RangeError("roundingIncrement must be less than next highest unit")}return{smallestUnit:c,roundingMode:z(n,o?Math.trunc:Math.round),roundingIncrement:a}}function rn(n,e,t,r,o,i,s){const a=tn(n,t,r,o,!s,i);e=Math.max(e,a.smallestUnit);let c=L(n).largestUnit;"auto"===c&&(c=void 0);const u=en(c,e,r,o);if(a.smallestUnit>u)throw new RangeError("Bad smallestUnit/largestUnit");return{largestUnit:u,...a}}function on(n,e,...t){return e instanceof n?e:n.from(e,...t)}var sn=class{toJSON(){return this.toString()}},an=class extends sn{valueOf(){throw new Error("Cannot convert object using valueOf")}},[cn,un]=W(),dn=class extends an{constructor(n){super(),un(this,Object.freeze(n))}getISOFields(){return cn(this)}},hn=class extends U{era(n,e,t){return n<1?"bce":"ce"}eraYear(n,e,t){return n<1?-(n-1):n}},ln=x("calendarName",{auto:0,never:1,always:2},0),fn={era:String,eraYear:Number,year:Number,month:Number,monthCode:String},mn={...fn,day:Number},gn={hour:Number,minute:Number,second:Number,millisecond:Number,microsecond:Number,nanosecond:Number},yn={...mn,...gn},pn={...yn,offset:String},wn=K(X,(()=>Number)),vn=x("offset",{prefer:0,use:1,ignore:2,reject:3});function Mn(n,e=4){const t=L(n),r=t.smallestUnit,o=t.fractionalSecondDigits;let i,s=0,a=1;return void 0!==r?(s=en(r,void 0,0,e),a=d[s],i=h[s]||0):void 0!==o&&"auto"!==o&&(i=k(o,0,9,1),a=Math.pow(10,9-i)),{smallestUnit:s,fractionalSecondDigits:i,roundingMode:z(n,Math.trunc),roundingIncrement:a}}var In=x("timeZoneName",{auto:0,never:1},0);function Sn(n){G(n,{epochMicroseconds(){return this.epochNanoseconds/o},epochMilliseconds(){return Number(this.epochNanoseconds/i)},epochSeconds(){return Number(this.epochNanoseconds/s)}})}var Tn,Dn={calendar:"calendar"};for(const n of V)Dn[n]="iso"+((Tn=n).charAt(0).toUpperCase()+Tn.slice(1));function Fn(n,e=[]){G(n,K(e.concat("calendar"),(n=>function(){return this.getISOFields()[Dn[n]]})))}var On=["era","eraYear","year","month","monthCode","daysInMonth","daysInYear","monthsInYear","inLeapYear"],Nn=[...On,"day","dayOfWeek","dayOfYear","weekOfYear","daysInWeek"];function Yn(n,e){G(n,K(e,(n=>function(){const e=this.calendar[n](this);return Object.defineProperty(this,n,{value:e}),e})))}var bn=x("disambiguation",{compatible:0,earlier:1,later:2,reject:3},0);var Zn=class{constructor(n){this.id=n}},En=class extends Zn{constructor(n,e){super(n),this.offsetSecs=e}getPossibleOffsets(){return[this.offsetSecs]}getOffset(){return this.offsetSecs}getTransition(){}};function Cn(n,e){const t={},r=n.formatToParts(e);for(const n of r)t[n.type]=n.value;return t}var Pn={bc:"bce",ad:"ce"};function Un(n){return n=n.toLowerCase().replace(/[^a-z0-9]g/,"").replace(/ /g,"-"),Pn[n]||n}var Bn={"Pacific/Apia":{2011:[[1301752800,-36e3,-39600],[1316872800,-39600,-36e3],[1325239200,-36e3,50400]]}},Rn=[182,91,273],xn=class extends Zn{constructor(n){const e=new vr("en-GB",{era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:n});super(e.resolvedOptions().timeZone),this.format=e,this.yearEndOffsets={},this.transitionsInYear=Bn[n]||{}}getPossibleOffsets(n){const e=[this.getTransition(n,-1),this.getTransition(n-1,1)].filter(Boolean);let t;for(const r of e){const[e,o,i]=r,s=n-o,a=n-i;if(e>s&&e>a)return[o];if(!(e<=s&&e<=a))return[o,i];t=i}return void 0!==t?[t]:[this.getYearEndOffset(I(n))]}getOffset(n){const e=Cn(this.format,1e3*n);let t=parseInt(e.year);"bce"===Un(e.era)&&(t=-(t-1));const r=w(t,parseInt(e.month),parseInt(e.day),parseInt(e.hour),parseInt(e.minute),parseInt(e.second));return Math.floor(r/1e3)-n}getTransition(e,t){const r=I(e);for(let o=0;o<5;o++){const i=r+o*t,s=this.getTransitionsInYear(i),a=s.length,c=t<0?a-1:0;for(let r=0;r<a;r++){const o=s[c+r*t];if(n(o[0],e)===t)return o}}}getYearEndOffset(n){const{yearEndOffsets:e}=this;return e[n]||(e[n]=this.getOffset(S(n+1)-1))}getTransitionsInYear(n){const{transitionsInYear:e}=this;return e[n]||(e[n]=this.computeTransitionsInYear(n))}computeTransitionsInYear(n){const e=this.getYearEndOffset(n-1),t=this.getYearEndOffset(n),r=S(n)-1,o=S(n+1)-1;if(e!==t)return[this.searchTransition(r,o,e,t)];const i=this.searchIsland(e,r);return void 0!==i?[this.searchTransition(r,i[0],e,i[1]),this.searchTransition(i[0],o,i[1],t)]:[]}searchTransition(n,e,t,r){for(;e-n>1;){const r=Math.floor(n+(e-n)/2);this.getOffset(r)===t?n=r:e=r}return[e,t,r]}searchIsland(n,e){for(const t of Rn){const r=e+86400*t,o=this.getOffset(r);if(o!==n)return[r,o]}}},kn={UTC:new En("UTC",0)};function jn(n,e,t,r){const o=X[e],{sign:i}=n,s={};for(let t=9;t>=e;t--){const e=X[t];s[e]=n[e]}const a={[o]:i},c=t.add(s),u=c.add(a),d=Ln(c),h=Ln(u),l=Ln(r),f=Number(l-d)/Number(h-d)*i;return s[o]+=f,s}function Ln(n){const{epochNanoseconds:e}=n;return void 0!==e?e:m(n.getISOFields())}var Hn=x("offset",{auto:0,never:1},0),PlainMonthDay=class extends dn{constructor(n,e,t=sr(),r){super({...jt({isoYear:r??("iso8601"===t.id?1972:function(n,e){throw new n(e)}(Error,"Must specify referenceYear")),isoMonth:n,isoDay:e},1),calendar:t})}static from(n,e){if(R(e),n instanceof PlainMonthDay)return An(n.getISOFields());if("object"==typeof n){const t=ar(n);let r=j(n,$n);return void 0===r.year&&void 0===n.calendar&&(r={...r,year:1972}),t.monthDayFromFields(r,e)}const t=function(n){const e=Oe.exec(ze(n));if(e)return{...ke(e),calendar:e[6]?new Calendar2(e[6]):sr()}}(r=String(n))||Be(r)||Ge("monthDay",r);var r;return void 0===t.calendar&&(t.isoYear=1972),An(Ze(t))}with(n,e){const t=function(n,e){const t={day:n.day??e.day};void 0!==n.monthCode?(t.monthCode=n.monthCode,void 0!==n.month&&(t.month=n.month)):void 0!==n.month?(t.month=n.month,t.year=n.year):t.monthCode=e.monthCode;return t}(q(n,$n),this);return this.calendar.monthDayFromFields(t,e)}equals(n){return e=this,t=on(PlainMonthDay,n),e.calendar.id===t.calendar.id&&m(e.getISOFields())===m(t.getISOFields());var e,t}toString(n){const e=this.getISOFields(),t=e.calendar.id,r=ln(n);return("iso8601"===t?function(n){return Z(n.isoMonth,2)+"-"+Z(n.isoDay,2)}(e):ut(e))+ft(t,r)}toLocaleString(n,e){return Sr(this,n,{month:"numeric",day:"numeric",...e,weekday:void 0,year:void 0,hour:void 0,minute:void 0,second:void 0},!0)}toPlainDate(n,e){return this.calendar.dateFromFields({year:n.year,monthCode:this.monthCode,day:this.day},e)}};Fn(PlainMonthDay),Yn(PlainMonthDay,["monthCode","day"]);var $n={era:String,eraYear:Number,year:Number,month:Number,monthCode:String,day:Number};function An(n){return new PlainMonthDay(n.isoMonth,n.isoDay,n.calendar,n.isoYear)}var qn={day:1},PlainYearMonth=class extends dn{constructor(n,e,t=sr(),r=1){const o=jt({isoYear:n,isoMonth:e,isoDay:r},1);m(o),super({...o,calendar:on(Calendar2,t)})}static from(n,e){if(R(e),n instanceof PlainYearMonth)return Wn(n.getISOFields());if("object"==typeof n){const t=j(n,fn);return ar(n).yearMonthFromFields(t,e)}const t=Ce(String(n));return void 0===t.calendar&&(t.isoDay=1),Wn(Ze(t))}static compare(n,e){return Jn(on(PlainYearMonth,n),on(PlainYearMonth,e))}with(n,e){const t=q(n,fn);return this.calendar.yearMonthFromFields(Gn(t,this),e)}add(n,e){return zn(this,on(Duration,n),e)}subtract(n,e){return zn(this,on(Duration,n).negated(),e)}until(n,e){return $t(this.toPlainDate(qn),on(PlainYearMonth,n).toPlainDate(qn),rn(e,9,8,8,9))}since(n,e){return $t(this.toPlainDate(qn),on(PlainYearMonth,n).toPlainDate(qn),rn(e,9,8,8,9),!0)}equals(n){return 0===Jn(this,on(PlainYearMonth,n))}toString(n){const e=this.getISOFields(),t=e.calendar.id,r=ln(n);return("iso8601"===t?dt(e):ut(e))+ft(t,r)}toLocaleString(n,e){return Sr(this,n,{year:"numeric",month:"numeric",...e,weekday:void 0,day:void 0,hour:void 0,minute:void 0,second:void 0},!0)}toPlainDate(n){return this.calendar.dateFromFields({year:this.year,month:this.month,day:n.day})}};function zn(n,e,t){return n.toPlainDate({day:e.sign<0?n.daysInMonth:1}).add(e,t).toPlainYearMonth()}function Wn(n){return new PlainYearMonth(n.isoYear,n.isoMonth,n.calendar,n.isoDay)}function Gn(n,e){const t={};let r=!1,o=!1;return void 0===n.era&&void 0===n.eraYear||(t.era=n.era,t.eraYear=n.eraYear,r=!0),void 0!==n.year&&(t.year=n.year,r=!0),r||(t.year=e.year),void 0!==n.month&&(t.month=n.month,o=!0),void 0!==n.monthCode&&(t.monthCode=n.monthCode,o=!0),o||(t.month=e.month),t}function Jn(e,t){return n(m(e.getISOFields()),m(t.getISOFields()))||n(e.calendar.id,t.calendar.id)}Fn(PlainYearMonth),Yn(PlainYearMonth,On);var[Kn,Qn]=W(),ZonedDateTime=class extends dn{constructor(n,e,t=sr()){const r=on(TimeZone,e),o=on(Calendar2,t),i=new Instant(n),s=r.getOffsetNanosecondsFor(i);super({...v(n+BigInt(s)),calendar:o,timeZone:r,offset:r.getOffsetStringFor(i)}),Qn(this,{epochNanoseconds:n,offsetNanoseconds:s})}static from(n,e){const t=vn(e,3),r=R(e);return Vn(n instanceof ZonedDateTime?{...n.getISOFields(),offset:n.offsetNanoseconds}:"object"==typeof n?Xn(j(n,pn),e,r,ar(n),function(n){if(void 0===n.timeZone)throw new TypeError("Must specify timeZone");return on(TimeZone,n.timeZone)}(n)):Ee(Ce(String(n))),e,t)}static compare(e,t){return n(on(ZonedDateTime,e).epochNanoseconds,on(ZonedDateTime,t).epochNanoseconds)}get timeZone(){return this.getISOFields().timeZone}get epochNanoseconds(){return Kn(this).epochNanoseconds}get offsetNanoseconds(){return Kn(this).offsetNanoseconds}get offset(){return this.getISOFields().offset}with(n,e){const t=q(n,pn),r={...fr(o=t,i=this),offset:o.offset??i.offset};var o,i;const s=vn(e,0),a=R(e);return bn(e),Vn(Xn(r,e,a,this.calendar,this.timeZone),e,s)}withPlainDate(n){const e=on(PlainDate,n),t=e.toPlainDateTime(this),{timeZone:r}=this,o=r.getInstantFor(t);return new ZonedDateTime(o.epochNanoseconds,r,ur(this,e))}withPlainTime(n){return this.toPlainDate().toZonedDateTime({plainTime:n,timeZone:this.timeZone})}withCalendar(n){return new ZonedDateTime(this.epochNanoseconds,this.timeZone,n)}withTimeZone(n){return new ZonedDateTime(this.epochNanoseconds,n,this.calendar)}add(n,e){return _n(this,on(Duration,n),e)}subtract(n,e){return _n(this,on(Duration,n).negated(),e)}until(n,e){return ne(this,on(ZonedDateTime,n),e)}since(n,e){return ne(this,on(ZonedDateTime,n),e,!0)}round(n){return function(n,e){const t=tn(e,void 0,0,6);if(6===t.smallestUnit){const e=function(n,e,t){const r=tt(n);return{day:t(Number(r)/e),hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}}(n,ie(n),t.roundingMode);return hr(he(n.getISOFields(),e)).toZonedDateTime(n.timeZone)}return se(n,de(t),t.roundingMode)}(this,n)}equals(n){const e=on(ZonedDateTime,n);return this.epochNanoseconds===e.epochNanoseconds&&this.calendar.id===e.calendar.id&&this.timeZone.id===e.timeZone.id}startOfDay(){return Vn({...this.getISOFields(),...oe,offset:void 0},void 0,3)}get hoursInDay(){return ie(this)/36e11}toString(n){const e=Mn(n),t=Hn(n),r=In(n),o=ln(n),i=se(this,e.roundingIncrement,e.roundingMode).getISOFields();return ct(i,e)+(0===t?i.offset:"")+function(n,e){if(1!==e)return`[${n}]`;return""}(i.timeZone.id,r)+ft(i.calendar.id,o)}toLocaleString(n,e){return function(n,e,t){const r=n.getISOFields(),o=r.calendar.id,i=r.timeZone.id,{timeZone:s}=t;if(void 0!==s&&s!==i)throw new RangeError("Given timeZone must agree");return Tr(n.epochMilliseconds,o,e,{timeZone:i,timeZoneName:"short",...t})}(this,n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e})}toPlainYearMonth(){return Wn(this.getISOFields())}toPlainMonthDay(){return An(this.getISOFields())}toPlainDateTime(){return hr(this.getISOFields())}toPlainDate(){return Rt(this.getISOFields())}toPlainTime(){return Je(this.getISOFields())}toInstant(){return new Instant(this.epochNanoseconds)}};function Vn(n,e,t){const{calendar:r,timeZone:o,offset:i,Z:s}=n;let a;if(void 0!==i&&2!==t&&(a=m(n)-BigInt(i),1!==t&&!s)){if(!function(n,e){for(const t of e)if(t.epochNanoseconds===n)return!0;return!1}(a,o.getPossibleInstantsFor(hr(n)))){if(3===t)throw new RangeError("Mismatching offset/timezone");a=void 0}}return void 0===a&&(a=o.getInstantFor(hr(n),e).epochNanoseconds),new ZonedDateTime(a,o,r)}function Xn(n,e,t,r,o){return{...lr(n,e,t,r),timeZone:o,offset:n.offset?(i=n.offset,Re(i)??Ge("timeZone",i)):void 0};var i}function _n(n,e,t){const{calendar:r,timeZone:o}=n,i=Nt(e),s=Yt(e),a=r.dateAdd(n.toPlainDate(),i,t).toZonedDateTime({plainTime:n,timeZone:o}),c=tt(s),u=a.epochNanoseconds+c;return new ZonedDateTime(u,o,r)}function ne(n,e,t,r){const o=rn(t,5,0,0,9),{largestUnit:i}=o;if(i>=6&&n.timeZone.id!==e.timeZone.id)throw new Error("Must be same timeZone");return ae(ee(n,e,i),o,n,e,r)}function ee(n,e,t){const r=cr(n,e);if(!f(t))return te(n,e,t);const o=Rt(n.getISOFields());let i,s,a,c,u,d=Rt(e.getISOFields());do{s=r.dateUntil(o,d,{largestUnit:V[t]}),i=n.add(s),a=te(i,e,5),c=s.sign,u=a.sign}while(c&&u&&c!==u&&(d=d.add({days:u})));return Mt(s,a)}function te(n,e,t){return Dt(re(e)-re(n),t)}function re(n){return n instanceof PlainDateTime?m(n.getISOFields()):n.epochNanoseconds}Fn(ZonedDateTime,Q),Yn(ZonedDateTime,Nn),Sn(ZonedDateTime);var oe={isoHour:0,isoMinute:0,isoSecond:0,isoMillisecond:0,isoMicrosecond:0,isoNanosecond:0};function ie(n){const e={...n.getISOFields(),...oe,offset:void 0},t=Vn(e,void 0,3),r=Vn({...e,...Bt(e,1)},void 0,3);return Number(r.epochNanoseconds-t.epochNanoseconds)}function se(n,e,t){return Vn({...wr(n.toPlainDateTime(),e,t).getISOFields(),timeZone:n.timeZone,offset:n.offsetNanoseconds},void 0,0)}function ae(n,e,t,r,o){const{largestUnit:i,smallestUnit:s,roundingIncrement:a,roundingMode:c}=e;if(!f(i))return Dt(ue((re(r)-re(t))*(o?-1n:1n),e),i);let u=jn(n,s,t,r);const d=X[s];function h(){const n=u[d];var e;u[d]=c(n/(e=a))*e}c===Math.round&&h(),o&&(u=Et(u)),c!==Math.round&&h();let l=wt(u);return s>0&&(l=o?It(l.negated(),i,t).negated():It(l,i,t)),l}function ce(n,e,r){return rt(t(tt(n),e,r))}function ue(n,e){return t(n,de(e),e.roundingMode)}function de(n){return d[n.smallestUnit]*n.roundingIncrement}function he(n,e){return{...Bt(n,e.day),...ot(e)}}function le(e,t){return n(e.epochNanoseconds,t.epochNanoseconds)}function fe(n,e){if(Tt(e)>=6)throw new RangeError("Duration cant have units larger than days");return new Instant(n.epochNanoseconds+tt(Yt(e)))}function me(n,e,t){const r=rn(t,3,0,0,5,!0);return Dt(ue(e.epochNanoseconds-n.epochNanoseconds,r),r.largestUnit)}var[ge,ye]=W(),Instant=class extends an{constructor(n){var e;super(),n=BigInt(n),((e=n)<-8640000000000000000000n||e>8640000000000000000000n)&&b(),ye(this,n)}static from(n){if(n instanceof Instant)return new Instant(n.epochNanoseconds);const e=Ce(String(n)),t=e.offset;if(void 0===t)throw new RangeError("Must specify an offset");return new Instant(m(mr(e,1))-BigInt(t))}static fromEpochSeconds(n){return new Instant(BigInt(n)*s)}static fromEpochMilliseconds(n){return new Instant(BigInt(n)*i)}static fromEpochMicroseconds(n){return new Instant(n*o)}static fromEpochNanoseconds(n){return new Instant(n)}static compare(n,e){return le(on(Instant,n),on(Instant,e))}get epochNanoseconds(){return ge(this)}add(n){return fe(this,on(Duration,n))}subtract(n){return fe(this,on(Duration,n).negated())}until(n,e){return me(this,on(Instant,n),e)}since(n,e){return me(on(Instant,n),this,e)}round(n){return function(n,e){const t=tn(e,void 0,0,5,!1,!0),[r,o]=at(n.epochNanoseconds);return new Instant(r+ue(o,t))}(this,n)}equals(n){return 0===le(this,on(Instant,n))}toString(n){const e=L(n).timeZone;return this.toZonedDateTimeISO(e??"UTC").toString({...n,offset:void 0===e?"never":"auto",timeZoneName:"never"})+(void 0===e?"Z":"")}toLocaleString(n,e){return new vr(n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e}).format(this.epochMilliseconds)}toZonedDateTimeISO(n){return new ZonedDateTime(this.epochNanoseconds,n)}toZonedDateTime(n){if(!$(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 ZonedDateTime(this.epochNanoseconds,n.timeZone,n.calendar)}};Sn(Instant);var[pe,we]=W(),TimeZone=class extends sn{constructor(n){if(!n)throw new RangeError("Invalid timezone ID");super(),we(this,function(n){const e=(n=String(n)).toLocaleUpperCase();if(kn[e])return kn[e];const t=Re(n);if(void 0!==t){if(Math.abs(t)>864e11)throw new RangeError("Offset out of bounds");return new En(lt(t),Math.trunc(t/1e9))}return kn[e]=new xn(n)}(n))}static from(n){if("object"==typeof n)return function(n){return n.timeZone}(n)?function(n){if("object"==typeof n){if("string"==typeof n.id)return n;throw new RangeError("Invalid timeZone")}return new TimeZone(String(n))}(n.timeZone):n;const e=Be(String(n));return new TimeZone(e&&(e.timeZone||e.Z&&"UTC"||void 0!==e.offset&&lt(e.offset))||n)}get id(){return pe(this).id}getOffsetStringFor(n){return lt(this.getOffsetNanosecondsFor(n))}getOffsetNanosecondsFor(n){const e=on(Instant,n);return 1e9*pe(this).getOffset(e.epochSeconds)}getPlainDateTimeFor(n,e=sr()){const t=on(Instant,n);return hr({...v(t.epochNanoseconds+BigInt(this.getOffsetNanosecondsFor(t))),calendar:on(Calendar2,e)})}getInstantFor(n,e){const t=bn(e),r=on(PlainDateTime,n).getISOFields(),o=g(r),i=pe(this).getPossibleOffsets(o);let s;if(1===i.length||0===t)s=i[0];else{if(3===t)throw new RangeError("Ambiguous offset");s=Math[1===t?"max":"min"](...i)}return ve(o-s,r)}getPossibleInstantsFor(n){const e=on(PlainDateTime,n).getISOFields(),t=g(e);let r=pe(this).getPossibleOffsets(t);return 2===r.length&&r[0]<r[1]&&(r=[]),r.map((n=>ve(t-n,e)))}getPreviousTransition(n){const e=on(Instant,n),t=pe(this).getTransition(e.epochSeconds,-1);return t?ve(t[0]):null}getNextTransition(n){const e=on(Instant,n),t=pe(this).getTransition(e.epochSeconds,1);return t?ve(t[0]):null}toString(){return this.id}};function ve(n,e){return new Instant(BigInt(n)*s+(e?BigInt(e.isoMillisecond)*i+BigInt(e.isoMicrosecond)*o+BigInt(e.isoNanosecond):0n))}var Me="(\\d{2})?:?(\\d{2})?:?(\\d{2})?([.,](\\d{1,9}))?",Ie=`([+-])${Me}`,Se=`(Z|${Ie})?(\\[([^=\\]]+)\\])?(\\[u-ca=([^\\]]+)\\])?`,Te=We(Ie),De=We(Me+Se),Fe=We(`([+-]\\d{6}|\\d{4})-?(\\d{2})?-?(\\d{2})?([T ]${Me})?`+Se),Oe=We("(--)?(\\d{2})-?(\\d{2})?"+Se),Ne=/^([-+])?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,Ye=/Z/i,be=/\u2212/g;function Ze(n){return{...n,calendar:void 0===n.calendar?sr():new Calendar2(n.calendar)}}function Ee(n){return{...Ze(n),timeZone:new TimeZone(n.timeZone)}}function Ce(n){return Be(n)||Ge("dateTime",n)}function Pe(n){return function(n){const e=De.exec(n);if(e&&e[1])return je(e.slice(1))}(n)||Be(n)||Ge("time",n)}function Ue(n){return function(n){const e=Ne.exec(ze(n));if(e){let n,t,r,o;[n,o]=xe(e[8],e[10],5,void 0),[t,o]=xe(e[12],e[14],4,o),[r,o]=xe(e[16],e[18],3,o);let i=function(n){const e={};for(const t in n)void 0!==n[t]&&(e[t]=n[t]);return e}({years:qe(e[2]),months:qe(e[3]),weeks:qe(e[4]),days:qe(e[5]),hours:n,minutes:t,seconds:r});if(!Object.keys(i).length)throw new RangeError("Duration string must have at least one field");const s=st(BigInt(o||0),2);return i.milliseconds=s.millisecond,i.microseconds=s.microsecond,i.nanoseconds=s.nanosecond,"-"===e[1]&&(i=Et(i)),i}}(n)||Ge("duration",n)}function Be(n){const e=Fe.exec(ze(n));if(e){const n=Ye.test(e[10]);return{...(t=e.slice(1),{isoYear:Ae(t[0]),isoMonth:Ae(t[1]),isoDay:Ae(t[2])}),...je(e.slice(5)),Z:n,offset:n?0:Le(e.slice(11)),timeZone:e[18],calendar:e[20]}}var t}function Re(n){const e=Te.exec(ze(n));if(e)return Le(e.slice(1))}function xe(n,e,t,r){if(void 0!==n){if(void 0!==r)throw new RangeError("Partial units must be last unit");return[parseInt(n),void 0!==e?He(e)*(d[t]/1e9):void 0]}if(void 0!==r){const n=Math.trunc(r/d[t]);return[n,r-n*d[t]]}return[void 0,void 0]}function ke(n){return{isoYear:1972,isoMonth:Ae(n[2]),isoDay:Ae(n[3])}}function je(n){const e=$e(n[2]);return{...ot(st(BigInt(He(n[4]||"")),2)),isoHour:$e(n[0]),isoMinute:$e(n[1]),isoSecond:60===e?59:e}}function Le(n){const e=n[0];if(void 0!==e&&n[1])return("+"===e?1:-1)*function(n){return 36e11*$e(n[0])+6e10*$e(n[1])+1e9*$e(n[2])+He(n[4]||"")}(n.slice(1))}function He(n){return parseInt(n.padEnd(9,"0"))}function $e(n){return parseInt(n||"0")}function Ae(n){return parseInt(n||"1")}function qe(n){return void 0===n?void 0:parseInt(n)}function ze(n){return n.replace(be,"-")}function We(n){return new RegExp(`^${n}$`,"i")}function Ge(n,e){throw new RangeError(`Cannot parse ${n} '${e}'`)}var PlainTime=class extends dn{constructor(n=0,e=0,t=0,r=0,o=0,i=0){super({...Ke({isoHour:n,isoMinute:e,isoSecond:t,isoMillisecond:r,isoMicrosecond:o,isoNanosecond:i},1),calendar:sr()})}static from(n,e){const t=R(e);return Je(n instanceof PlainTime?n.getISOFields():"object"==typeof n?_e(j(n,gn),t):Pe(String(n)))}static compare(n,e){return et(on(PlainTime,n),on(PlainTime,e))}with(n,e){return Je(_e(Qe(q(n,gn),this),R(e)))}add(n){return Ve(this,on(Duration,n))}subtract(n){return Ve(this,on(Duration,n).negated())}until(n,e){return Xe(this,on(PlainTime,n),e)}since(n,e){return Xe(on(PlainTime,n),this,e)}round(n){return function(n,e){const t=tn(e,void 0,0,5);return Je(ot(ce(n,de(t),t.roundingMode)))}(this,n)}equals(n){return 0===et(this,on(PlainTime,n))}toString(n){const e=Mn(n);return ht(ot(ce(this,e.roundingIncrement,e.roundingMode)),e)}toLocaleString(n,e){return new vr(n,{hour:"numeric",minute:"2-digit",second:"2-digit",...e,timeZone:"UTC",timeZoneName:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0}).format(Number(tt(this)/i))}toZonedDateTime(n){return this.toPlainDateTime(n.plainDate).toZonedDateTime(n.timeZone)}toPlainDateTime(n){return on(PlainDate,n).toPlainDateTime(this)}};function Je(n){return new PlainTime(n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function Ke({isoHour:n,isoMinute:e,isoSecond:t,isoMillisecond:r,isoMicrosecond:o,isoNanosecond:i},s){return{isoHour:n=k(n,0,23,s),isoMinute:e=k(e,0,59,s),isoSecond:t=k(t,0,59,s),isoMillisecond:r=k(r,0,999,s),isoMicrosecond:o=k(o,0,999,s),isoNanosecond:i=k(i,0,999,s)}}function Qe(n,e){return J(gn,((t,r)=>n[r]??e[r]))}function Ve(n,e){var t,r;return Je(ot((t=n,r=Yt(e),rt(tt(t)+tt(r)))))}function Xe(n,e,t){const r=rn(t,5,0,0,5);return Dt(ue(tt(e)-tt(n),r),r.largestUnit)}function _e(n,e){return Ke(ot(n),e)}function nt(n){return on(PlainTime,n??{hour:0})}function et(e,t){return n(tt(e),tt(t))}function tt(n){return BigInt(n.hour)*c+BigInt(n.minute)*a+BigInt(n.second)*s+BigInt(n.millisecond)*i+BigInt(n.microsecond)*o+BigInt(n.nanosecond)}function rt(n){const[e,t]=at(n);return{...st(t,5),day:Number(e/u)}}function ot(n){return{isoNanosecond:n.nanosecond??0,isoMicrosecond:n.microsecond??0,isoMillisecond:n.millisecond??0,isoSecond:n.second??0,isoMinute:n.minute??0,isoHour:n.hour??0}}function it(n){return BigInt(n.day)*u+tt(n)}function st(n,e){const t={};for(let r=e;r>=0;r--){const e=BigInt(d[r]),o=n/e;n-=o*e,t[V[r]]=Number(o)}return t}function at(n){const e=v(n);return[p(e.isoYear,e.isoMonth,e.isoDay),(t=e,BigInt(t.isoHour)*c+BigInt(t.isoMinute)*a+BigInt(t.isoSecond)*s+BigInt(t.isoMillisecond)*i+BigInt(t.isoMicrosecond)*o+BigInt(t.isoNanosecond))];var t}function ct(n,e){return ut(n)+"T"+ht(n,e)}function ut(n){return dt(n)+"-"+Z(n.isoDay,2)}function dt(n){const{isoYear:e}=n;return(e<1e3||e>9999?E(e)+Z(Math.abs(e),6):Z(e,4))+"-"+Z(n.isoMonth,2)}function ht(n,e){const t=[Z(n.isoHour,2)];return e.smallestUnit<=4&&(t.push(Z(n.isoMinute,2)),e.smallestUnit<=3&&t.push(Z(n.isoSecond,2)+gt(n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,e.fractionalSecondDigits)[0])),t.join(":")}function lt(n){const e=st(BigInt(Math.abs(n)),5),t=gt(e.millisecond,e.microsecond,e.nanosecond,void 0)[0];return E(n)+Z(e.hour,2)+":"+Z(e.minute,2)+(e.second||t?":"+Z(e.second,2)+t:"")}function ft(n,e){return n&&(2===e||1!==e&&"iso8601"!==n)?`[u-ca=${n}]`:""}function mt(n){return n.map((([n,e,t])=>t||n?(n<BigInt(0)?-n:n)+e:"")).join("")}function gt(n,e,r,a,c,u){let h=BigInt(r)+BigInt(e)*o+BigInt(n)*i;c&&(h=t(h,void 0===a?d[u]:Math.pow(10,9-a),c));const l=h<0?-h:h,f=l/s;let m=Z(Number(l-f*s),9);return m=void 0===a?m.replace(/0+$/,""):m.substr(0,a),[m?"."+m:"",Number(f)*(h<0?-1:1)]}Fn(PlainTime,Q);var[yt,pt]=W(),Duration=class extends an{constructor(n=0,t=0,r=0,o=0,i=0,s=0,a=0,c=0,u=0,d=0){super(),pt(this,function(n){const t={};let r=0;for(const o of X){const i=Number(n[o]||0),s=e(n[o]);if(s){if(r&&r!==s)throw new RangeError("All fields must be same sign");r=s}if(!Number.isInteger(i))throw new RangeError("Duration fields must be integers");t[o]=i}return t.sign=r,t}({years:n,months:t,weeks:r,days:o,hours:i,minutes:s,seconds:a,milliseconds:c,microseconds:u,nanoseconds:d}))}static from(n){return wt("object"==typeof n?j(n,wn):Ue(n))}static compare(e,t,r){return function(e,t,r){const o=on(Duration,e),i=on(Duration,t),s=Ot(o),a=Ot(i);if(void 0===r&&s&&a)return n(it(s),it(a));const c=bt(r),u=c.add(o),d=c.add(i);if(c instanceof ZonedDateTime)return ZonedDateTime.compare(u,d);return PlainDateTime.compare(u,d)}(e,t,L(r).relativeTo)}get years(){return yt(this).years}get months(){return yt(this).months}get weeks(){return yt(this).weeks}get days(){return yt(this).days}get hours(){return yt(this).hours}get minutes(){return yt(this).minutes}get seconds(){return yt(this).seconds}get milliseconds(){return yt(this).milliseconds}get microseconds(){return yt(this).microseconds}get nanoseconds(){return yt(this).nanoseconds}get sign(){return yt(this).sign}get blank(){return!this.sign}with(n){return wt({...yt(this),...q(n,wn)})}negated(){return wt(Et(yt(this)))}abs(){return wt(J(yt(this),(n=>Math.abs(n))))}add(n,e){return vt(this,on(Duration,n),L(e).relativeTo)}subtract(n,e){return vt(this,on(Duration,n).negated(),L(e).relativeTo)}round(n){return function(n,e){if(!$(e))throw new TypeError("Must specify options");if(void 0===e.largestUnit&&void 0===e.smallestUnit)throw new RangeError("Must specify either largestUnit or smallestUnit");const t=Tt(n),r=rn(e,t,0,0,9,!1,!0),{largestUnit:o,smallestUnit:i}=r,s=Ot(n);if(void 0===e.relativeTo&&s&&l(o)&&l(i)){return Ft(st(ue(it(s),r),o))}const a=Zt(e.relativeTo),c=St(n,o,a);return ae(c,r,a,a.add(c))}(this,n)}total(n){return function(n,e,t){const r=Ot(n);if(void 0===t&&r&&l(e))return Number(it(r))/d[e];const o=Zt(t),i=St(n,e,o,!0);return jn(i,e,o,o.add(i))[X[e]]}(this,en(L(n).unit,void 0,0,9),n.relativeTo)}toString(n){const e=Mn(n,3);return function(n,e){const{smallestUnit:t,fractionalSecondDigits:r,roundingMode:o}=e,{sign:i}=n,s=BigInt(n.hours),a=BigInt(n.minutes);let c=BigInt(n.seconds),u="";if(t<=3){const e=gt(n.milliseconds,n.microseconds,n.nanoseconds,r,o,t);u=e[0],c+=BigInt(e[1])}return(i<0?"-":"")+"P"+mt([[BigInt(n.years),"Y"],[BigInt(n.months),"M"],[BigInt(n.weeks),"W"],[BigInt(n.days),"D"]])+(s||a||c||u||!i?"T"+mt([[s,"H"],[a,"M"],[t<=3?c:BigInt(0),u+"S",u||!i]]):"")}(yt(this),e)}toLocaleString(n,e){return this.toString()}};function wt(n){return new Duration(n.years,n.months,n.weeks,n.days,n.hours,n.minutes,n.seconds,n.milliseconds,n.microseconds,n.nanoseconds)}function vt(n,e,t){const r=Ot(n),o=Ot(e),i=Math.max(Tt(n),Tt(e));if(void 0===t&&r&&o)return Dt(it(r)+it(o),i);const s=bt(t),a=s.add(n).add(e);return ee(s,a,i)}function Mt(n,e){return new Duration(n.years+e.years,n.months+e.months,n.weeks+e.weeks,n.days+e.days,n.hours+e.hours,n.minutes+e.minutes,n.seconds+e.seconds,n.milliseconds+e.milliseconds,n.microseconds+e.microseconds,n.nanoseconds+e.nanoseconds)}function It(n,e,t){return t instanceof PlainDate?function(n,e,t){const r=t.add(n);return t.calendar.dateUntil(t,r,{largestUnit:V[e]})}(n,Math.max(6,e),t):St(n,e,t)}function St(n,e,t,r){const o=!0!==r&&e>7&&n.weeks;o&&(n=n.with({weeks:0}));const i=t.add(n);let s=ee(t,i,e);return o&&(s=Mt(s,new Duration(0,0,o))),s}function Tt(n){return n.years?9:n.months?8:n.weeks?7:n.days?6:n.hours?5:n.minutes?4:n.seconds?3:n.milliseconds?2:n.microseconds?1:0}function Dt(n,e){return Ft(st(n,e))}function Ft(n){return new Duration(0,0,0,n.day,n.hour,n.minute,n.second,n.millisecond,n.microsecond,n.nanosecond)}function Ot(n){if(!n.years&&!n.months&&!n.weeks)return{day:n.days,...Yt(n)}}function Nt(n){return new Duration(n.years,n.months,n.weeks,n.days)}function Yt(n){return{hour:n.hours,minute:n.minutes,second:n.seconds,millisecond:n.milliseconds,microsecond:n.microseconds,nanosecond:n.nanoseconds}}function bt(n){if(void 0===n)throw new RangeError("Need relativeTo");if("object"==typeof n)return void 0!==n.timeZone?ZonedDateTime.from(n):PlainDateTime.from(n);{const e=Ce(String(n));return void 0!==e.timeZone?Vn(Ee(e),void 0,0):hr(Ze(e))}}function Zt(n){if(void 0===n)throw new RangeError("Must specify relativeTo");if($(n))return n instanceof ZonedDateTime||n instanceof PlainDateTime?n:on(void 0!==n.timeZone?ZonedDateTime:PlainDateTime,n);if("symbol"==typeof n)throw new TypeError("Incorrect relativeTo type");const e=Be(String(n));if(e)return void 0!==e.timeZone?Vn(Ee(e),void 0,3):hr(Ze(e));throw new RangeError("Invalid value of relativeTo")}function Et(n){return J(n,(n=>-n||0))}function Ct(n,e,t,r){n=Ut(n=Pt(n,e.years,t,r),e.months,t,r);let o=t.epochMilliseconds(n.year,n.month,n.day);const[,i]=function(n){const e=tt(Yt(n)),t=e/u;return[st(e-t*u,5),new Duration(n.years,n.months,n.weeks,n.days+Number(t))]}(e);return o=D(o,7*i.weeks+i.days),M(o)}function Pt({year:n,month:e,day:t},r,o,i){n+=r;const s=k(e,1,o.monthsInYear(n),i);let a=e===s?t:1;return a=k(a,1,o.daysInMonth(n,s),i),{year:n,month:s,day:a}}function Ut({year:n,month:e,day:t},r,o,i){if(r){if(e+=r,r<0)for(;e<1;)e+=o.monthsInYear(--n);else{let t;for(;e>(t=o.monthsInYear(n));)e-=t,n++}t=k(t,1,o.daysInMonth(n,e),i)}return{year:n,month:e,day:t}}function Bt(n,e){return e?{...M(D(y(n),e)),calendar:n.calendar}:n}function Rt(n){return new PlainDate(n.isoYear,n.isoMonth,n.isoDay,n.calendar)}function xt(n,e){return{...Gn(n,e),day:n.day??e.day}}function kt(n,e,t,r,o){return[n=Number(n),e=k(e,1,r.monthsInYear(n),o),t=k(t,1,r.daysInMonth(n,e),o)]}function jt(n,e){const[t,r,o]=kt(n.isoYear,n.isoMonth,n.isoDay,B,e);return{isoYear:t,isoMonth:r,isoDay:o}}function Lt(e,t){return n(m(e.getISOFields()),m(t.getISOFields()))||n(e.calendar.id,t.calendar.id)}function Ht(e,t){return n(e.year,t.year)||function(e,t){return n(e.month,t.month)||n(e.day,t.day)}(e,t)}function $t(n,e,t,r){return ae(cr(n,e).dateUntil(n,e,{largestUnit:V[t.largestUnit]}),t,n,e,r)}var PlainDate=class extends dn{constructor(n,e,t,r=sr()){const o=jt({isoYear:n,isoMonth:e,isoDay:t},1);!function(n){const e=m(n);O(e+(e<0n?86399999999999n:0n))}(o),super({...o,calendar:on(Calendar2,r)})}static from(n,e){if(R(e),n instanceof PlainDate)return Rt(n.getISOFields());if("object"==typeof n){const t=j(n,mn);return ar(n).dateFromFields(t,e)}return Rt(Ze(Ce(String(n))))}static compare(n,e){return Lt(on(PlainDate,n),on(PlainDate,e))}with(n,e){const t=xt(q(n,mn),this);return this.calendar.dateFromFields(t,e)}withCalendar(n){const e=this.getISOFields();return new PlainDate(e.isoYear,e.isoMonth,e.isoDay,n)}add(n,e){return this.calendar.dateAdd(this,n,e)}subtract(n,e){return this.calendar.dateAdd(this,on(Duration,n).negated(),e)}until(n,e){return $t(this,on(PlainDate,n),rn(e,6,6,6,9))}since(n,e){return $t(this,on(PlainDate,n),rn(e,6,6,6,9),!0)}equals(n){return 0===Lt(this,on(PlainDate,n))}toString(n){const e=ln(n),t=this.getISOFields();return ut(t)+ft(t.calendar.id,e)}toLocaleString(n,e){return Sr(this,n,{year:"numeric",month:"numeric",day:"numeric",...e,hour:void 0,minute:void 0,second:void 0})}toZonedDateTime(n){return this.toPlainDateTime(n.plainTime).toZonedDateTime(n.timeZone)}toPlainDateTime(n){return hr({...this.getISOFields(),...nt(n).getISOFields()})}toPlainYearMonth(){return Wn(this.getISOFields())}toPlainMonthDay(){return An(this.getISOFields())}};function At(n){return n instanceof PlainDate||n instanceof PlainDateTime||n instanceof ZonedDateTime||n instanceof PlainYearMonth||n instanceof PlainMonthDay}function qt(n,e,t){let r;if(n instanceof PlainDate)r=n;else if(At(n)){if(t&&n instanceof PlainMonthDay)throw new TypeError("PlainMonthDay not allowed");r=Rt(n.getISOFields())}else r=PlainDate.from(n);return dr(r.calendar,e),r}function zt(n,e,t){if(At(n))return n.getISOFields();let{era:r,eraYear:o,year:i,month:s,monthCode:a,day:c}=n;if(void 0===i){if(void 0===o||void 0===r)throw new TypeError("Must specify either a year or an era & eraYear");i=e.convertEraYear(o,r,!0)}if(void 0!==a){const n=e.convertMonthCode(a,i);if(void 0!==s&&s!==n)throw new RangeError("Month doesnt match with monthCode");s=n}else if(void 0===s)throw new TypeError("Must specify either a month or monthCode");if(void 0===c)throw new TypeError("Must specify day");return[i,s,c]=kt(i,s,c,e,R(t)),M(e.epochMilliseconds(i,s,c))}function Wt(n,e){if(At(n)){if(e&&n instanceof PlainMonthDay)throw new TypeError("PlainMonthDay not allowed");return n.getISOFields()}return PlainDate.from(n).getISOFields()}function Gt(n,e){return T(n.epochMilliseconds(e,1,1),n.epochMilliseconds(e+1,1,1))}function Jt(n,e,t,r){return T(n.epochMilliseconds(e,1,1),n.epochMilliseconds(e,t,r))+1}Fn(PlainDate),Yn(PlainDate,Nn);var Kt=class extends P{constructor(n){const e=Qt(n);if(!function(n,e){const t=n.split("-"),r=e.split("-");return t[0]===r[0]}(n,e.resolvedOptions().calendar))throw new RangeError("Invalid calendar: "+n);super(n),this.format=e,this.yearCorrection=this.computeFields(0).year-1970,this.yearMonthCache={}}era(n,e,t){const r=w(n,e,t);return this.computeFields(r).era}eraYear(n,e,t){const r=w(n,e,t);return this.computeFields(r).eraYear}year(n,e,t){const r=w(n,e,t);return this.computeFields(r).year}month(n,e,t){const r=w(n,e,t);return this.computeFields(r).month}day(n,e,t){const r=w(n,e,t);return this.computeFields(r).day}epochMilliseconds(n,e,t){this.ensureYear(n);return D(this.yearMonthCache[n][e-1],t-1)}daysInMonth(n,e){const{yearMonthCache:t}=this;this.ensureYear(n);const r=t[n],o=r[e-1];e>=r.length&&(n++,e=0);return T(o,t[n][e])}monthsInYear(n){return this.ensureYear(n),this.yearMonthCache[n].length}inLeapYear(n){const e=Gt(this,n);return e>Gt(this,n-1)&&e>Gt(this,n+1)}guessYearForMonthDay(n,e){let t=1970+this.yearCorrection;const r=t+100;for(;t<r;t++){const r=this.convertMonthCode(n,t);if(r<=this.monthsInYear(t)&&e<=this.daysInMonth(t,r))return t}throw new Error("Could not guess year")}normalizeISOYearForMonthDay(n){return n}ensureYear(n){const{yearMonthCache:e,yearCorrection:t}=this;if(!e[n]||!e[n+1]){let e=w(n-t);e=D(e,400),this.ensureDown(e,n)}}ensureDown(n,e){const{yearMonthCache:t}=this;let r=this.computeFields(n);for(let o=r.year;o>=e;o--){const e=t[o]||(t[o]=[]),i=e.length+1;for(let t=r.month;t>=i;t--)n=D(n,1-r.day),e[t-1]=n,n=D(n,-1),r=this.computeFields(n)}}computeFields(n){const e=Cn(this.format,n);let t,r,o=parseInt(e.relatedYear||e.year);return e.era&&(t=Un(e.era),r=o,o=this.convertEraYear(r,t)),{era:t,eraYear:r,year:o,month:this.parseMonth(e.month,o),day:parseInt(e.day)}}parseMonth(n,e){return parseInt(n)}};function Qt(n){return new vr("en-US",{calendar:n,era:"short",year:"numeric",month:"numeric",day:"numeric",timeZone:"UTC"})}var Vt={Tishri:"M01",Heshvan:"M02",Kislev:"M03",Tevet:"M04",Shevat:"M05","Adar I":"M05L","Adar II":"M06",Adar:"M06",Nisan:"M07",Iyar:"M08",Sivan:"M09",Tamuz:"M10",Av:"M11",Elul:"M12"},Xt=w(1868,9,8),_t={gregory:hn,hebrew:class extends Kt{parseMonth(n,e){const t=parseInt(n);return isNaN(t)?this.convertMonthCode(Vt[n],e):t}monthCode(n,e){const t=this.inLeapYear(e)&&n>5;return super.monthCode(n-Number(t),e)+(t&&6===n?"L":"")}convertMonthCode(n,e){const t=super.convertMonthCode(n,e);return t+(n.match(/L$/)||this.inLeapYear(e)&&t>5?1:0)}inLeapYear(n){const e=this.monthsInYear(n);return e>this.monthsInYear(n-1)&&e>this.monthsInYear(n+1)}},japanese:class extends hn{constructor(){super(...arguments),this.format=Qt("japanese")}era(n,e,t){const r=w(n,e,t);return r<Xt?super.era(n,e,t):Un(Cn(this.format,r).era)}}},nr={iso8601:B};function er(e,t,r,o){let i=0,s=0,a=0,c=0;switch(o){case 9:i=function(e,t,r){const[,o,i]=kt(t.year,e.month,e.day,r,0),s=Ht(t,e),a=n(t.month,o)||n(t.day,i);return t.year-e.year-(a&&s&&a!==s?s:0)}(e,t,r),e=Pt(e,i,r,0);case 8:s=function(e,t,r){let o=0;const i=Ht(t,e);if(i){let{year:s}=e;for(;s!==t.year;)o+=r.monthsInYear(s)*i,s+=i;const[,a,c]=kt(t.year,e.month,e.day,r,0);o+=t.month-a;const u=n(t.day,c);u&&i&&u!==i&&(o-=i)}return o}(e,t,r),e=Ut(e,s,r,0)}return c=T(r.epochMilliseconds(e.year,e.month,e.day),r.epochMilliseconds(t.year,t.month,t.day)),7===o&&(a=Math.trunc(c/7),c%=7),new Duration(i,s,a,c)}function tr(n,e,t){const o=7+e-t;return-r(F(n,1,o)-e,7)+o-1}function rr(n,e,t){const r=tr(n,e,t),o=tr(n+1,e,t);return(Gt(B,n)-r+o)/7}var[or,ir]=W(),Calendar2=class extends sn{constructor(n){super(),"islamicc"===n&&(n="islamic-civil"),ir(this,function(n){const e=(n=String(n)).toLocaleLowerCase();return nr[e]||(nr[e]=new(_t[e]||Kt)(n))}(n))}static from(n){if("object"==typeof n&&n)return function(n){return n.calendar}(n)?function(n){if("object"==typeof n&&n){if("string"==typeof n.id)return n;throw new RangeError("Invalid calendar")}return new Calendar2(String(n))}(n.calendar):n;const e=Be(String(n));return new Calendar2(e?e.calendar||"iso8601":n)}get id(){return or(this).id}era(n){const e=Wt(n,!0);return or(this).era(e.isoYear,e.isoMonth,e.isoDay)}eraYear(n){const e=Wt(n,!0);return or(this).eraYear(e.isoYear,e.isoMonth,e.isoDay)}year(n){const e=Wt(n,!0);return or(this).year(e.isoYear,e.isoMonth,e.isoDay)}month(n){const e=Wt(n,!0);return or(this).month(e.isoYear,e.isoMonth,e.isoDay)}monthCode(n){const e=qt(n,this);return or(this).monthCode(e.month,e.year)}day(n){const e=Wt(n);return or(this).day(e.isoYear,e.isoMonth,e.isoDay)}dayOfWeek(n){const e=Wt(n,!0);return F(e.isoYear,e.isoMonth,e.isoDay)}dayOfYear(n){const e=qt(n,this,!0);return Jt(or(this),e.year,e.month,e.day)}weekOfYear(n){const e=Wt(n,!0);return function(n,e,t,r,o){const i=tr(n,r,o),s=Math.floor((Jt(B,n,e,t)-i-1)/7)+1;if(s<1)return s+rr(n-1,r,o);const a=rr(n,r,o);return s>a?s-a:s}(e.isoYear,e.isoMonth,e.isoDay,1,4)}daysInWeek(n){return Wt(n,!0),7}daysInMonth(n){const e=qt(n,this,!0);return or(this).daysInMonth(e.year,e.month)}daysInYear(n){const e=qt(n,this,!0);return Gt(or(this),e.year)}monthsInYear(n){const e=qt(n,this,!0);return or(this).monthsInYear(e.year)}inLeapYear(n){return or(this).inLeapYear(this.year(n))}dateFromFields(n,e){const t=zt(n,or(this),e);return new PlainDate(t.isoYear,t.isoMonth,t.isoDay,this)}yearMonthFromFields(n,e){const t=zt({...n,day:1},or(this),e);return new PlainYearMonth(t.isoYear,t.isoMonth,this,t.isoDay)}monthDayFromFields(n,e){const t=or(this);let{era:r,eraYear:o,year:i,monthCode:s,day:a}=n;if(void 0===a)throw new TypeError("required property 'day' missing or undefined");void 0!==r&&void 0!==o&&(i=t.convertEraYear(o,r));let c=i;if(void 0===c){if(void 0===s)throw new TypeError("either year or monthCode required with month");c=t.guessYearForMonthDay(s,a)}const u=zt({...n,year:c},t,e);return new PlainMonthDay(u.isoMonth,u.isoDay,this,t.normalizeISOYearForMonthDay(u.isoYear))}dateAdd(n,e,t){const r=or(this),o=Ct(on(PlainDate,n,t),on(Duration,e),r,R(t));return new PlainDate(o.isoYear,o.isoMonth,o.isoDay,this)}dateUntil(n,e,t){const r=or(this),o=on(PlainDate,n),i=on(PlainDate,e),s=en(L(t).largestUnit,6,6,9);return dr(cr(o,i),this),er(o,i,r,s)}toString(){return this.id}};function sr(){return new Calendar2("iso8601")}function ar(n){return void 0===n.calendar?sr():on(Calendar2,n.calendar)}function cr(n,e){const{calendar:t}=n;return dr(t,e.calendar),t}function ur(n,e){const t=n.calendar,r=e.calendar;if("iso8601"===t.id)return r;if("iso8601"===r.id)return t;if(t.id!==r.id)throw new RangeError("Non-ISO calendars incompatible");return t}function dr(n,e){if(n.id!==e.id)throw new RangeError("Calendars must match")}var PlainDateTime=class extends dn{constructor(n,e,t,r=0,o=0,i=0,s=0,a=0,c=0,u=sr()){const d=mr({isoYear:n,isoMonth:e,isoDay:t,isoHour:r,isoMinute:o,isoSecond:i,isoMillisecond:s,isoMicrosecond:a,isoNanosecond:c},1);O(m(d)),super({...d,calendar:on(Calendar2,u)})}static from(n,e){const t=R(e);return hr(n instanceof PlainDateTime?n.getISOFields():"object"==typeof n?lr(j(n,yn),e,t,ar(n)):Ze(Ce(String(n))))}static compare(n,e){return gr(on(PlainDateTime,n),on(PlainDateTime,e))}with(n,e){return hr(lr(fr(q(n,yn),this),e,R(e),this.calendar))}withPlainDate(n){const e=on(PlainDate,n);return hr({...this.getISOFields(),...e.getISOFields(),calendar:ur(this,e)})}withPlainTime(n){return hr({...this.getISOFields(),...nt(n).getISOFields()})}withCalendar(n){return hr({...this.getISOFields(),calendar:on(Calendar2,n)})}add(n,e){return yr(this,on(Duration,n),e)}subtract(n,e){return yr(this,on(Duration,n).negated(),e)}until(n,e){return pr(this,on(PlainDateTime,n),e)}since(n,e){return pr(this,on(PlainDateTime,n),e,!0)}round(n){return function(n,e){const t=tn(e,void 0,0,6);return wr(n,de(t),t.roundingMode)}(this,n)}equals(n){return 0===gr(this,on(PlainDateTime,n))}toString(n){const e=Mn(n),t=ln(n),r=wr(this,e.roundingIncrement,e.roundingMode).getISOFields();return ct(r,e)+ft(r.calendar.id,t)}toLocaleString(n,e){return Sr(this,n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e})}toZonedDateTime(n,e){const t=on(TimeZone,n),r=t.getInstantFor(this,e);return new ZonedDateTime(r.epochNanoseconds,t,this.calendar)}toPlainYearMonth(){return Wn(this.getISOFields())}toPlainMonthDay(){return An(this.getISOFields())}toPlainDate(){return Rt(this.getISOFields())}toPlainTime(){return Je(this.getISOFields())}};function hr(n){return new PlainDateTime(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,n.calendar)}function lr(n,e,t,r){return{...r.dateFromFields(n,e).getISOFields(),..._e(n,t)}}function fr(n,e){return{...xt(n,e),...Qe(n,e)}}function mr(n,e){return{...jt(n,e),...Ke(n,e)}}function gr(e,t){return n(m(e.getISOFields()),m(t.getISOFields()))||n(e.calendar.id,t.calendar.id)}function yr(n,e,t){const{calendar:r}=n,o=Nt(e),i=Yt(e);return hr({...v(m(r.dateAdd(Rt(n.getISOFields()),o,t).getISOFields())+tt(n)+tt(i)),calendar:r})}function pr(n,e,t,r){const o=rn(t,6,0,0,9);return ae(ee(n,e,o.largestUnit),o,n,e,r)}function wr(n,e,t){const r=ce(n,e,t);return hr(he(n.getISOFields(),r))}Fn(PlainDateTime,Q),Yn(PlainDateTime,Nn);var vr=Intl.DateTimeFormat;function Mr(n){return void 0===n?n:Ir(n)}function Ir(n){return"number"==typeof n||n instanceof Date?n:n instanceof Instant||n instanceof ZonedDateTime?n.epochMilliseconds:y(n.getISOFields())}function Sr(n,e,t,r){const o=n.getISOFields(),i=o.calendar.id;let s,{timeZone:a}=t;if(void 0!==a){const e=new TimeZone(a),t=hr({...oe,...n.getISOFields()});s=e.getInstantFor(t).epochMilliseconds}else s=y(o),a="UTC";return Tr(s,i,e,{...t,timeZone:a,timeZoneName:void 0},r)}function Tr(n,e,t,r,o){const i=new vr(t,{calendar:Dr(t)?void 0:e,...r});if((o||"iso8601"!==e)&&e!==i.resolvedOptions().calendar)throw new RangeError("Non-iso calendar mismatch");return i.format(n)}function Dr(n){const e=[].concat(n||[]);for(const n of e)if(-1!==n.indexOf("-u-ca-"))return!0;return!1}function Fr(n=Zr()){return br().toZonedDateTimeISO(n)}function Or(n,e){if(void 0===n)throw new RangeError("Must specify calendar");return br().toZonedDateTime({calendar:n,timeZone:e??Zr()})}function Nr(n=Zr()){return Fr(n).toPlainDateTime()}function Yr(n,e){return Or(n,e).toPlainDateTime()}function br(){return new Instant(BigInt(Date.now())*o)}function Zr(){return new TimeZone((new vr).resolvedOptions().timeZone)}var Er={zonedDateTimeISO:Fr,zonedDateTime:Or,plainDateTimeISO:Nr,plainDateTime:Yr,plainDateISO:function(n=Zr()){return Nr(n).toPlainDate()},plainDate:function(n,e){return Yr(n,e).toPlainDate()},plainTimeISO:function(n=Zr()){return br().toZonedDateTimeISO(n).toPlainTime()},instant:br,timeZone:Zr};!function(){if(!globalThis.Temporal){globalThis.Temporal={PlainYearMonth:PlainYearMonth,PlainMonthDay:PlainMonthDay,PlainDate:PlainDate,PlainTime:PlainTime,PlainDateTime:PlainDateTime,ZonedDateTime:ZonedDateTime,Instant:Instant,Calendar:Calendar2,TimeZone:TimeZone,Duration:Duration,Now:Er},globalThis.Date.prototype.toTemporalInstant=function(){return n=this,Instant.fromEpochMilliseconds(n.valueOf());var n};class n extends vr{format(n){return super.format(Mr(n))}formatToParts(n){return super.formatToParts(Mr(n))}formatRange(n,e){return super.formatRange(Ir(n),Ir(e))}formatRangeToParts(n,e){return super.formatRangeToParts(Ir(n),Ir(e))}}globalThis.Intl.DateTimeFormat=n}}();
function n(n,e,t){const o=function(n,e,t){return(r,o)=>{if(void 0===r){const e=o??t;if(void 0===e)throw new RangeError(`Must specify a ${n}`);return e}if(void 0===e[r])throw new RangeError(`Invalid ${n}: ${r}`);return e[r]}}(n,e,t);return(e,t)=>{const i=r(e);return o(i[n],t)}}function e(n,e,t,r){if(void 0===n)return e;if(!Number.isFinite(n))throw new RangeError("Number must be finite");n=Math.trunc(n);const o=Math.min(Math.max(n,e),t);if(o!==n&&r===c)throw new RangeError("Invalid overflowed value "+n);return o}function t(n,e){const t={};let r=0;for(const o in e)void 0!==n[o]&&(t[o]=e[o](n[o]),r++);if(!r)throw new TypeError("Invalid object, no keys");return t}function r(n){if(void 0===n)return{};if(!i(n))throw TypeError("options must be an object or undefined");return n}var o=/object|function/;function i(n){return null!==n&&o.test(typeof n)}var s=["calendar","timeZone"];function a(n,e){for(const e of s)if(void 0!==n[e])throw new TypeError(`Disallowed field ${e}`);return t(n,e)}var c=1,u=n("overflow",{constrain:0,reject:1},0);function d(){const n=new WeakMap;return[n.get.bind(n),n.set.bind(n)]}function h(n,e){Object.defineProperties(n.prototype,l(e,(n=>({get:n}))))}function l(n,e){const t={};for(const r in n)t[r]=e(n[r],r);return t}function f(n,e){const t={};return n.forEach(((n,r)=>{t[n]=e(n,r)})),t}function m(n,e,...t){return e instanceof n?e:n.from(e,...t)}var g=class{toJSON(){return this.toString()}},y=class extends g{valueOf(){throw new Error("Cannot convert object using valueOf")}},[p,w]=d(),v=class extends y{constructor(n){super(),w(this,Object.freeze(n))}getISOFields(){return p(this)}},M=1000n,I=1000000n,S=1000000000n,T=60000000000n,D=3600000000000n,F=86400000000000n,O=[1,1e3,1e6,1e9,6e10,36e11,864e11],N=[9,6,3];function Y(n){return n<=6}function b(n){return n>=6}var Z=n("roundingMode",{halfExpand:Math.round,ceil:Math.ceil,trunc:Math.trunc,floor:Math.floor}),E=["nanosecond","microsecond","millisecond","second","minute","hour"],C=[...E,"day","week","month","year"],P=C.map((n=>n+"s")),U=f(C,((n,e)=>e)),B=f(P,((n,e)=>e));function R(n,e,t,r){let o;if(void 0===n){if(void 0===e)throw new RangeError("Unit is required");o=e}else if(o=U[n]??B[n],void 0===o||o<t||o>r)throw new RangeError("Invalid unit "+n);return o}function x(n,e,t,o,s,a){if(void 0===e&&!i(n))throw new TypeError("Need rounding options");const c=r(n),u=c.roundingIncrement??1,d=R(c.smallestUnit,e,t,o);if(!s&&a){if(d<6&&864e11%u*O[d])throw new RangeError("Increment must evenly divide into 24 hours")}else{if(d<6?O[d+1]%u:!s&&1!==u)throw new RangeError("roundingIncrement does not divide evenly into next highest unit");if(d<6&&u*O[d]>=O[d+1])throw new RangeError("roundingIncrement must be less than next highest unit")}return{smallestUnit:d,roundingMode:Z(n,s?Math.trunc:Math.round),roundingIncrement:u}}function k(n,e,t,o,i,s,a){const c=x(n,t,o,i,!a,s);e=Math.max(e,c.smallestUnit);let u=r(n).largestUnit;"auto"===u&&(u=void 0);const d=R(u,e,o,i);if(c.smallestUnit>d)throw new RangeError("Bad smallestUnit/largestUnit");return{largestUnit:d,...c}}function j(n,e){return n<e?-1:n>e?1:0}function L(n){return j(n,0)}function H(n,e,t){const r=BigInt(e),o=n/r*r,i=Number(n-o);return o+BigInt(t(i/e))*r}function $(n,e){return(n%e+e)%e}function A(n){return W(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function q(n){return Math.floor(z(n)/1e3)}function z(n){return G(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond)}function W(n,e,t,r,o,i,s,a,c){return BigInt(G(n,e,t,r,o,i,s))*I+BigInt(a??0)*M+BigInt(c??0)}function G(n,e,t,r,o,i,s){const a=n??1970,c=e??1,u=t??1,d=L(a);let h,l,f=0;const m=a>=0&&a<1e3,g=m?a+1200:a;for(;f<31;f++){h=u-d*f;const n=Date.UTC(g,c-1,h,r??0,o??0,i??0,s??0);if(!rn(n)){l=n+d*f*864e5;break}}return(void 0===l||h<1||h>hn.daysInMonth(a,c))&&on(),m&&(l=new Date(l).setUTCFullYear(a)),l}function J(n){let e=n/I,t=Number(n-e*I);t<0&&(t+=1e6,e-=1n);const r=Math.floor(t/1e3);return t-=1e3*r,{...K(Number(e)),isoMicrosecond:r,isoNanosecond:t}}function K(n){const[e,t]=tn(n);return{isoYear:e.getUTCFullYear(),isoMonth:e.getUTCMonth()+1,isoDay:e.getUTCDate()+t,isoHour:e.getUTCHours(),isoMinute:e.getUTCMinutes(),isoSecond:e.getUTCSeconds(),isoMillisecond:e.getUTCMilliseconds()}}function Q(n){return tn(1e3*n)[0].getUTCFullYear()}function V(n){return Math.floor(G(n)/1e3)}function X(n,e){return Math.round((e-n)/864e5)}function _(n,e){return n+864e5*e}function nn(n,e,t){const[r,o]=tn(G(n,e,t));return $(r.getUTCDay()+o,7)||7}function en(n){(n<-8640000086399999999999n||n>8640000086399999999999n)&&on()}function tn(n){const e=L(n);let t,r=0;for(;r<31;r++){const o=new Date(n-e*r*864e5);if(!rn(o)){t=o;break}}return void 0===t&&on(),[t,e*r]}function rn(n){return isNaN(n.valueOf())}function on(){throw new RangeError("Date outside of supported range")}function sn(n,e){return String(n).padStart(e,"0")}function an(n){return n<0?"-":"+"}var cn={gregory:{bce:-1,ce:0},ethioaa:{era0:0},ethiopic:{era0:0,era1:5500},coptic:{era0:-1,era1:0},roc:{"before-roc":-1,minguo:0},buddhist:{be:0},japanese:{bce:-1,ce:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018}},un=class{constructor(n){this.id=n}era(n,e,t){}eraYear(n,e,t){}monthCode(n,e){return"M"+sn(n,2)}convertMonthCode(n,e){return parseInt(n.substr(1))}convertEraYear(n,e,t){let r=cn[this.id]?.[e];if(void 0===r){if(t)throw new Error("Unkown era "+e);r=0}return(r+n)*(L(r)||1)}},dn=class extends un{year(n){return n}month(n,e){return e}day(n,e,t){return t}epochMilliseconds(n,e,t){return G(n,e,t)}daysInMonth(n,e){return 2===e?this.inLeapYear(n)?29:28:4===e||6===e||9===e||11===e?30:31}monthsInYear(){return 12}inLeapYear(n){return n%4==0&&(n%100!=0||n%400==0)}guessYearForMonthDay(){return 1972}normalizeISOYearForMonthDay(){return 1972}},hn=new dn("iso8601"),ln=class extends dn{era(n,e,t){return n<1?"bce":"ce"}eraYear(n,e,t){return n<1?-(n-1):n}},fn=n("calendarName",{auto:0,never:1,always:2},0),mn={era:String,eraYear:Number,year:Number,month:Number,monthCode:String},gn={...mn,day:Number},yn={hour:Number,minute:Number,second:Number,millisecond:Number,microsecond:Number,nanosecond:Number},pn={...gn,...yn},wn={...pn,offset:String},vn=f(P,(()=>Number)),Mn=n("offset",{prefer:0,use:1,ignore:2,reject:3});function In(n,t=4){const o=r(n),i=o.smallestUnit,s=o.fractionalSecondDigits;let a,u=0,d=1;return void 0!==i?(u=R(i,void 0,0,t),d=O[u],a=N[u]||0):void 0!==s&&"auto"!==s&&(a=e(s,0,9,c),d=Math.pow(10,9-a)),{smallestUnit:u,fractionalSecondDigits:a,roundingMode:Z(n,Math.trunc),roundingIncrement:d}}var Sn=n("timeZoneName",{auto:0,never:1},0);function Tn(n){h(n,{epochMicroseconds(){return this.epochNanoseconds/M},epochMilliseconds(){return Number(this.epochNanoseconds/I)},epochSeconds(){return Number(this.epochNanoseconds/S)}})}var Dn,Fn={calendar:"calendar"};for(const n of C)Fn[n]="iso"+((Dn=n).charAt(0).toUpperCase()+Dn.slice(1));function On(n,e=[]){h(n,f(e.concat("calendar"),(n=>function(){return this.getISOFields()[Fn[n]]})))}var Nn=["era","eraYear","year","month","monthCode","daysInMonth","daysInYear","monthsInYear","inLeapYear"],Yn=[...Nn,"day","dayOfWeek","dayOfYear","weekOfYear","daysInWeek"];function bn(n,e){h(n,f(e,(n=>function(){const e=this.calendar[n](this);return Object.defineProperty(this,n,{value:e}),e})))}var Zn=n("disambiguation",{compatible:0,earlier:1,later:2,reject:3},0);var En=class{constructor(n){this.id=n}},Cn=class extends En{constructor(n,e){super(n),this.offsetSecs=e}getPossibleOffsets(){return[this.offsetSecs]}getOffset(){return this.offsetSecs}getTransition(){}};function Pn(n,e){const t={},r=n.formatToParts(e);for(const n of r)t[n.type]=n.value;return t}var Un={bc:"bce",ad:"ce"};function Bn(n){return n=n.toLowerCase().replace(/[^a-z0-9]g/,"").replace(/ /g,"-"),Un[n]||n}var Rn=n("offset",{auto:0,never:1},0),PlainMonthDay=class extends v{constructor(n,e,t=cr(),r){super({...Ht({isoYear:r??("iso8601"===t.id?1972:function(n,e){throw new n(e)}(Error,"Must specify referenceYear")),isoMonth:n,isoDay:e},c),calendar:t})}static from(n,e){if(u(e),n instanceof PlainMonthDay)return kn(n.getISOFields());if("object"==typeof n){const r=ur(n);let o=t(n,xn);return void 0===o.year&&void 0===n.calendar&&(o={...o,year:1972}),r.monthDayFromFields(o,e)}const r=function(n){const e=Ye.exec(Ge(n));if(e)return{...Le(e),calendar:e[6]?new Calendar2(e[6]):cr()}}(o=String(n))||xe(o)||Ke("monthDay",o);var o;return void 0===r.calendar&&(r.isoYear=1972),kn(Ce(r))}with(n,e){const t=function(n,e){const t={day:n.day??e.day};void 0!==n.monthCode?(t.monthCode=n.monthCode,void 0!==n.month&&(t.month=n.month)):void 0!==n.month?(t.month=n.month,t.year=n.year):t.monthCode=e.monthCode;return t}(a(n,xn),this);return this.calendar.monthDayFromFields(t,e)}equals(n){return e=this,t=m(PlainMonthDay,n),e.calendar.id===t.calendar.id&&A(e.getISOFields())===A(t.getISOFields());var e,t}toString(n){const e=this.getISOFields(),t=e.calendar.id,r=fn(n);return("iso8601"===t?function(n){return sn(n.isoMonth,2)+"-"+sn(n.isoDay,2)}(e):ht(e))+gt(t,r)}toLocaleString(n,e){return le(this,n,{month:"numeric",day:"numeric",...e,weekday:void 0,year:void 0,hour:void 0,minute:void 0,second:void 0},!0)}toPlainDate(n,e){return this.calendar.dateFromFields({year:n.year,monthCode:this.monthCode,day:this.day},e)}};On(PlainMonthDay),bn(PlainMonthDay,["monthCode","day"]);var xn={era:String,eraYear:Number,year:Number,month:Number,monthCode:String,day:Number};function kn(n){return new PlainMonthDay(n.isoMonth,n.isoDay,n.calendar,n.isoYear)}var jn={day:1},PlainYearMonth=class extends v{constructor(n,e,t=cr(),r=1){const o=Ht({isoYear:n,isoMonth:e,isoDay:r},c);A(o),super({...o,calendar:m(Calendar2,t)})}static from(n,e){if(u(e),n instanceof PlainYearMonth)return Hn(n.getISOFields());if("object"==typeof n){const r=t(n,mn);return ur(n).yearMonthFromFields(r,e)}const r=Ue(String(n));return void 0===r.calendar&&(r.isoDay=1),Hn(Ce(r))}static compare(n,e){return An(m(PlainYearMonth,n),m(PlainYearMonth,e))}with(n,e){const t=a(n,mn);return this.calendar.yearMonthFromFields($n(t,this),e)}add(n,e){return Ln(this,m(Duration,n),e)}subtract(n,e){return Ln(this,m(Duration,n).negated(),e)}until(n,e){return qt(this.toPlainDate(jn),m(PlainYearMonth,n).toPlainDate(jn),k(e,9,8,8,9))}since(n,e){return qt(this.toPlainDate(jn),m(PlainYearMonth,n).toPlainDate(jn),k(e,9,8,8,9),!0)}equals(n){return 0===An(this,m(PlainYearMonth,n))}toString(n){const e=this.getISOFields(),t=e.calendar.id,r=fn(n);return("iso8601"===t?lt(e):ht(e))+gt(t,r)}toLocaleString(n,e){return le(this,n,{year:"numeric",month:"numeric",...e,weekday:void 0,day:void 0,hour:void 0,minute:void 0,second:void 0},!0)}toPlainDate(n){return this.calendar.dateFromFields({year:this.year,month:this.month,day:n.day})}};function Ln(n,e,t){return n.toPlainDate({day:e.sign<0?n.daysInMonth:1}).add(e,t).toPlainYearMonth()}function Hn(n){return new PlainYearMonth(n.isoYear,n.isoMonth,n.calendar,n.isoDay)}function $n(n,e){const t={};let r=!1,o=!1;return void 0===n.era&&void 0===n.eraYear||(t.era=n.era,t.eraYear=n.eraYear,r=!0),void 0!==n.year&&(t.year=n.year,r=!0),r||(t.year=e.year),void 0!==n.month&&(t.month=n.month,o=!0),void 0!==n.monthCode&&(t.monthCode=n.monthCode,o=!0),o||(t.month=e.month),t}function An(n,e){return j(A(n.getISOFields()),A(e.getISOFields()))||j(n.calendar.id,e.calendar.id)}On(PlainYearMonth),bn(PlainYearMonth,Nn);var[qn,zn]=d(),ZonedDateTime=class extends v{constructor(n,e,t=cr()){const r=m(TimeZone,e),o=m(Calendar2,t),i=new Instant(n),s=r.getOffsetNanosecondsFor(i);super({...J(n+BigInt(s)),calendar:o,timeZone:r,offset:r.getOffsetStringFor(i)}),zn(this,{epochNanoseconds:n,offsetNanoseconds:s})}static from(n,e){const r=Mn(e,3),o=u(e);return _n(n instanceof ZonedDateTime?{...n.getISOFields(),offset:n.offsetNanoseconds}:"object"==typeof n?ne(t(n,wn),e,o,ur(n),function(n){if(void 0===n.timeZone)throw new TypeError("Must specify timeZone");return m(TimeZone,n.timeZone)}(n)):Pe(Ue(String(n))),e,r)}static compare(n,e){return j(m(ZonedDateTime,n).epochNanoseconds,m(ZonedDateTime,e).epochNanoseconds)}get timeZone(){return this.getISOFields().timeZone}get epochNanoseconds(){return qn(this).epochNanoseconds}get offsetNanoseconds(){return qn(this).offsetNanoseconds}get offset(){return this.getISOFields().offset}with(n,e){const t=a(n,wn),r={...gr(o=t,i=this),offset:o.offset??i.offset};var o,i;const s=Mn(e,0),c=u(e);return Zn(e),_n(ne(r,e,c,this.calendar,this.timeZone),e,s)}withPlainDate(n){const e=m(PlainDate,n),t=e.toPlainDateTime(this),{timeZone:r}=this,o=r.getInstantFor(t);return new ZonedDateTime(o.epochNanoseconds,r,hr(this,e))}withPlainTime(n){return this.toPlainDate().toZonedDateTime({plainTime:n,timeZone:this.timeZone})}withCalendar(n){return new ZonedDateTime(this.epochNanoseconds,this.timeZone,n)}withTimeZone(n){return new ZonedDateTime(this.epochNanoseconds,n,this.calendar)}add(n,e){return ee(this,m(Duration,n),e)}subtract(n,e){return ee(this,m(Duration,n).negated(),e)}until(n,e){return te(this,m(ZonedDateTime,n),e)}since(n,e){return te(this,m(ZonedDateTime,n),e,!0)}round(n){return function(n,e){const t=x(e,void 0,0,6);if(6===t.smallestUnit){const e=function(n,e,t){const r=ot(n);return{day:t(Number(r)/e),hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}}(n,ae(n),t.roundingMode);return fr(Xn(n.getISOFields(),e)).toZonedDateTime(n.timeZone)}return ce(n,Vn(t),t.roundingMode)}(this,n)}equals(n){const e=m(ZonedDateTime,n);return this.epochNanoseconds===e.epochNanoseconds&&this.calendar.id===e.calendar.id&&this.timeZone.id===e.timeZone.id}startOfDay(){return _n({...this.getISOFields(),...se,offset:void 0},void 0,3)}get hoursInDay(){return ae(this)/36e11}toString(n){const e=In(n),t=Rn(n),r=Sn(n),o=fn(n),i=ce(this,e.roundingIncrement,e.roundingMode).getISOFields();return dt(i,e)+(0===t?i.offset:"")+function(n,e){if(1!==e)return`[${n}]`;return""}(i.timeZone.id,r)+gt(i.calendar.id,o)}toLocaleString(n,e){return function(n,e,t){const r=n.getISOFields(),o=r.calendar.id,i=r.timeZone.id,{timeZone:s}=t;if(void 0!==s&&s!==i)throw new RangeError("Given timeZone must agree");return fe(n.epochMilliseconds,o,e,{timeZone:i,timeZoneName:"short",...t})}(this,n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e})}toPlainYearMonth(){return Hn(this.getISOFields())}toPlainMonthDay(){return kn(this.getISOFields())}toPlainDateTime(){return fr(this.getISOFields())}toPlainDate(){return kt(this.getISOFields())}toPlainTime(){return Qe(this.getISOFields())}toInstant(){return new Instant(this.epochNanoseconds)}};function Wn(n,e,t,r){const o=P[e],{sign:i}=n,s={};for(let t=9;t>=e;t--){const e=P[t];s[e]=n[e]}const a={[o]:i},c=t.add(s),u=c.add(a),d=Gn(c),h=Gn(u),l=Gn(r),f=Number(l-d)/Number(h-d)*i;return s[o]+=f,s}function Gn(n){const{epochNanoseconds:e}=n;return void 0!==e?e:A(n.getISOFields())}function Jn(n,e,t,r,o){const{largestUnit:i,smallestUnit:s,roundingIncrement:a,roundingMode:c}=e;if(!b(i))return Ot(Qn((ie(r)-ie(t))*(o?-1n:1n),e),i);let u=Wn(n,s,t,r);const d=P[s];function h(){const n=u[d];var e;u[d]=c(n/(e=a))*e}c===Math.round&&h(),o&&(u=Pt(u)),c!==Math.round&&h();let l=Mt(u);return s>0&&(l=o?Tt(l.negated(),i,t).negated():Tt(l,i,t)),l}function Kn(n,e,t){return it(H(ot(n),e,t))}function Qn(n,e){return H(n,Vn(e),e.roundingMode)}function Vn(n){return O[n.smallestUnit]*n.roundingIncrement}function Xn(n,e){return{...xt(n,e.day),...st(e)}}function _n(n,e,t){const{calendar:r,timeZone:o,offset:i,Z:s}=n;let a;if(void 0!==i&&2!==t&&(a=A(n)-BigInt(i),1!==t&&!s)){if(!function(n,e){for(const t of e)if(t.epochNanoseconds===n)return!0;return!1}(a,o.getPossibleInstantsFor(fr(n)))){if(3===t)throw new RangeError("Mismatching offset/timezone");a=void 0}}return void 0===a&&(a=o.getInstantFor(fr(n),e).epochNanoseconds),new ZonedDateTime(a,o,r)}function ne(n,e,t,r,o){return{...mr(n,e,t,r),timeZone:o,offset:n.offset?(i=n.offset,ke(i)??Ke("timeZone",i)):void 0};var i}function ee(n,e,t){const{calendar:r,timeZone:o}=n,i=bt(e),s=Zt(e),a=r.dateAdd(n.toPlainDate(),i,t).toZonedDateTime({plainTime:n,timeZone:o}),c=ot(s),u=a.epochNanoseconds+c;return new ZonedDateTime(u,o,r)}function te(n,e,t,r){const o=k(t,5,0,0,9),{largestUnit:i}=o;if(i>=6&&n.timeZone.id!==e.timeZone.id)throw new Error("Must be same timeZone");return Jn(re(n,e,i),o,n,e,r)}function re(n,e,t){const r=dr(n,e);if(!b(t))return oe(n,e,t);const o=kt(n.getISOFields());let i,s,a,c,u,d=kt(e.getISOFields());do{s=r.dateUntil(o,d,{largestUnit:C[t]}),i=n.add(s),a=oe(i,e,5),c=s.sign,u=a.sign}while(c&&u&&c!==u&&(d=d.add({days:u})));return St(s,a)}function oe(n,e,t){return Ot(ie(e)-ie(n),t)}function ie(n){return n instanceof PlainDateTime?A(n.getISOFields()):n.epochNanoseconds}On(ZonedDateTime,E),bn(ZonedDateTime,Yn),Tn(ZonedDateTime);var se={isoHour:0,isoMinute:0,isoSecond:0,isoMillisecond:0,isoMicrosecond:0,isoNanosecond:0};function ae(n){const e={...n.getISOFields(),...se,offset:void 0},t=_n(e,void 0,3),r=_n({...e,...xt(e,1)},void 0,3);return Number(r.epochNanoseconds-t.epochNanoseconds)}function ce(n,e,t){return _n({...Mr(n.toPlainDateTime(),e,t).getISOFields(),timeZone:n.timeZone,offset:n.offsetNanoseconds},void 0,0)}var ue=Intl.DateTimeFormat;function de(n){return void 0===n?n:he(n)}function he(n){return"number"==typeof n||n instanceof Date?n:n instanceof Instant||n instanceof ZonedDateTime?n.epochMilliseconds:z(n.getISOFields())}function le(n,e,t,r){const o=n.getISOFields(),i=o.calendar.id;let s,{timeZone:a}=t;if(void 0!==a){const e=new TimeZone(a),t=fr({...se,...n.getISOFields()});s=e.getInstantFor(t).epochMilliseconds}else s=z(o),a="UTC";return fe(s,i,e,{...t,timeZone:a,timeZoneName:void 0},r)}function fe(n,e,t,r,o){const i=new ue(t,{calendar:me(t)?void 0:e,...r});if((o||"iso8601"!==e)&&e!==i.resolvedOptions().calendar)throw new RangeError("Non-iso calendar mismatch");return i.format(n)}function me(n){const e=[].concat(n||[]);for(const n of e)if(-1!==n.indexOf("-u-ca-"))return!0;return!1}var ge={"Pacific/Apia":{2011:[[1301752800,-36e3,-39600],[1316872800,-39600,-36e3],[1325239200,-36e3,50400]]}},ye=[182,91,273],pe=class extends En{constructor(n){const e=new ue("en-GB",{era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZone:n});super(e.resolvedOptions().timeZone),this.format=e,this.yearEndOffsets={},this.transitionsInYear=ge[n]||{}}getPossibleOffsets(n){const e=[this.getTransition(n,-1),this.getTransition(n-1,1)].filter(Boolean);let t;for(const r of e){const[e,o,i]=r,s=n-o,a=n-i;if(e>s&&e>a)return[o];if(!(e<=s&&e<=a))return[o,i];t=i}return void 0!==t?[t]:[this.getYearEndOffset(Q(n))]}getOffset(n){const e=Pn(this.format,1e3*n);let t=parseInt(e.year);"bce"===Bn(e.era)&&(t=-(t-1));const r=G(t,parseInt(e.month),parseInt(e.day),parseInt(e.hour),parseInt(e.minute),parseInt(e.second));return Math.floor(r/1e3)-n}getTransition(n,e){const t=Q(n);for(let r=0;r<5;r++){const o=t+r*e,i=this.getTransitionsInYear(o),s=i.length,a=e<0?s-1:0;for(let t=0;t<s;t++){const r=i[a+t*e];if(j(r[0],n)===e)return r}}}getYearEndOffset(n){const{yearEndOffsets:e}=this;return e[n]||(e[n]=this.getOffset(V(n+1)-1))}getTransitionsInYear(n){const{transitionsInYear:e}=this;return e[n]||(e[n]=this.computeTransitionsInYear(n))}computeTransitionsInYear(n){const e=this.getYearEndOffset(n-1),t=this.getYearEndOffset(n),r=V(n)-1,o=V(n+1)-1;if(e!==t)return[this.searchTransition(r,o,e,t)];const i=this.searchIsland(e,r);return void 0!==i?[this.searchTransition(r,i[0],e,i[1]),this.searchTransition(i[0],o,i[1],t)]:[]}searchTransition(n,e,t,r){for(;e-n>1;){const r=Math.floor(n+(e-n)/2);this.getOffset(r)===t?n=r:e=r}return[e,t,r]}searchIsland(n,e){for(const t of ye){const r=e+86400*t,o=this.getOffset(r);if(o!==n)return[r,o]}}},we={UTC:new Cn("UTC",0)};var[ve,Me]=d(),TimeZone=class extends g{constructor(n){if(!n)throw new RangeError("Invalid timezone ID");super(),Me(this,function(n){const e=(n=String(n)).toLocaleUpperCase();if(we[e])return we[e];const t=ke(n);if(void 0!==t){if(Math.abs(t)>864e11)throw new RangeError("Offset out of bounds");return new Cn(mt(t),Math.trunc(t/1e9))}return we[e]=new pe(n)}(n))}static from(n){if("object"==typeof n)return function(n){return n.timeZone}(n)?function(n){if("object"==typeof n){if("string"==typeof n.id)return n;throw new RangeError("Invalid timeZone")}return new TimeZone(String(n))}(n.timeZone):n;const e=xe(String(n));return new TimeZone(e&&(e.timeZone||e.Z&&"UTC"||void 0!==e.offset&&mt(e.offset))||n)}get id(){return ve(this).id}getOffsetStringFor(n){return mt(this.getOffsetNanosecondsFor(n))}getOffsetNanosecondsFor(n){const e=m(Instant,n);return 1e9*ve(this).getOffset(e.epochSeconds)}getPlainDateTimeFor(n,e=cr()){const t=m(Instant,n);return fr({...J(t.epochNanoseconds+BigInt(this.getOffsetNanosecondsFor(t))),calendar:m(Calendar2,e)})}getInstantFor(n,e){const t=Zn(e),r=m(PlainDateTime,n).getISOFields(),o=q(r),i=ve(this).getPossibleOffsets(o);let s;if(1===i.length||0===t)s=i[0];else{if(3===t)throw new RangeError("Ambiguous offset");s=Math[1===t?"max":"min"](...i)}return Ie(o-s,r)}getPossibleInstantsFor(n){const e=m(PlainDateTime,n).getISOFields(),t=q(e);let r=ve(this).getPossibleOffsets(t);return 2===r.length&&r[0]<r[1]&&(r=[]),r.map((n=>Ie(t-n,e)))}getPreviousTransition(n){const e=m(Instant,n),t=ve(this).getTransition(e.epochSeconds,-1);return t?Ie(t[0]):null}getNextTransition(n){const e=m(Instant,n),t=ve(this).getTransition(e.epochSeconds,1);return t?Ie(t[0]):null}toString(){return this.id}};function Ie(n,e){return new Instant(BigInt(n)*S+(e?BigInt(e.isoMillisecond)*I+BigInt(e.isoMicrosecond)*M+BigInt(e.isoNanosecond):0n))}var Se="(\\d{2})?:?(\\d{2})?:?(\\d{2})?([.,](\\d{1,9}))?",Te=`([+-])${Se}`,De=`(Z|${Te})?(\\[([^=\\]]+)\\])?(\\[u-ca=([^\\]]+)\\])?`,Fe=Je(Te),Oe=Je(Se+De),Ne=Je(`([+-]\\d{6}|\\d{4})-?(\\d{2})?-?(\\d{2})?([T ]${Se})?`+De),Ye=Je("(--)?(\\d{2})-?(\\d{2})?"+De),be=/^([-+])?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,Ze=/Z/i,Ee=/\u2212/g;function Ce(n){return{...n,calendar:void 0===n.calendar?cr():new Calendar2(n.calendar)}}function Pe(n){return{...Ce(n),timeZone:new TimeZone(n.timeZone)}}function Ue(n){return xe(n)||Ke("dateTime",n)}function Be(n){return function(n){const e=Oe.exec(n);if(e&&e[1])return He(e.slice(1))}(n)||xe(n)||Ke("time",n)}function Re(n){return function(n){const e=be.exec(Ge(n));if(e){let n,t,r,o;[n,o]=je(e[8],e[10],5,void 0),[t,o]=je(e[12],e[14],4,o),[r,o]=je(e[16],e[18],3,o);let i=function(n){const e={};for(const t in n)void 0!==n[t]&&(e[t]=n[t]);return e}({years:We(e[2]),months:We(e[3]),weeks:We(e[4]),days:We(e[5]),hours:n,minutes:t,seconds:r});if(!Object.keys(i).length)throw new RangeError("Duration string must have at least one field");const s=ct(BigInt(o||0),2);return i.milliseconds=s.millisecond,i.microseconds=s.microsecond,i.nanoseconds=s.nanosecond,"-"===e[1]&&(i=Pt(i)),i}}(n)||Ke("duration",n)}function xe(n){const e=Ne.exec(Ge(n));if(e){const n=Ze.test(e[10]);return{...(t=e.slice(1),{isoYear:ze(t[0]),isoMonth:ze(t[1]),isoDay:ze(t[2])}),...He(e.slice(5)),Z:n,offset:n?0:$e(e.slice(11)),timeZone:e[18],calendar:e[20]}}var t}function ke(n){const e=Fe.exec(Ge(n));if(e)return $e(e.slice(1))}function je(n,e,t,r){if(void 0!==n){if(void 0!==r)throw new RangeError("Partial units must be last unit");return[parseInt(n),void 0!==e?Ae(e)*(O[t]/1e9):void 0]}if(void 0!==r){const n=Math.trunc(r/O[t]);return[n,r-n*O[t]]}return[void 0,void 0]}function Le(n){return{isoYear:1972,isoMonth:ze(n[2]),isoDay:ze(n[3])}}function He(n){const e=qe(n[2]);return{...st(ct(BigInt(Ae(n[4]||"")),2)),isoHour:qe(n[0]),isoMinute:qe(n[1]),isoSecond:60===e?59:e}}function $e(n){const e=n[0];if(void 0!==e&&n[1])return("+"===e?1:-1)*function(n){return 36e11*qe(n[0])+6e10*qe(n[1])+1e9*qe(n[2])+Ae(n[4]||"")}(n.slice(1))}function Ae(n){return parseInt(n.padEnd(9,"0"))}function qe(n){return parseInt(n||"0")}function ze(n){return parseInt(n||"1")}function We(n){return void 0===n?void 0:parseInt(n)}function Ge(n){return n.replace(Ee,"-")}function Je(n){return new RegExp(`^${n}$`,"i")}function Ke(n,e){throw new RangeError(`Cannot parse ${n} '${e}'`)}var PlainTime=class extends v{constructor(n=0,e=0,t=0,r=0,o=0,i=0){super({...Ve({isoHour:n,isoMinute:e,isoSecond:t,isoMillisecond:r,isoMicrosecond:o,isoNanosecond:i},c),calendar:cr()})}static from(n,e){const r=u(e);return Qe(n instanceof PlainTime?n.getISOFields():"object"==typeof n?et(t(n,yn),r):Be(String(n)))}static compare(n,e){return rt(m(PlainTime,n),m(PlainTime,e))}with(n,e){return Qe(et(Xe(a(n,yn),this),u(e)))}add(n){return _e(this,m(Duration,n))}subtract(n){return _e(this,m(Duration,n).negated())}until(n,e){return nt(this,m(PlainTime,n),e)}since(n,e){return nt(m(PlainTime,n),this,e)}round(n){return function(n,e){const t=x(e,void 0,0,5);return Qe(st(Kn(n,Vn(t),t.roundingMode)))}(this,n)}equals(n){return 0===rt(this,m(PlainTime,n))}toString(n){const e=In(n);return ft(st(Kn(this,e.roundingIncrement,e.roundingMode)),e)}toLocaleString(n,e){return new ue(n,{hour:"numeric",minute:"2-digit",second:"2-digit",...e,timeZone:"UTC",timeZoneName:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0}).format(Number(ot(this)/I))}toZonedDateTime(n){return this.toPlainDateTime(n.plainDate).toZonedDateTime(n.timeZone)}toPlainDateTime(n){return m(PlainDate,n).toPlainDateTime(this)}};function Qe(n){return new PlainTime(n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond)}function Ve({isoHour:n,isoMinute:t,isoSecond:r,isoMillisecond:o,isoMicrosecond:i,isoNanosecond:s},a){return{isoHour:n=e(n,0,23,a),isoMinute:t=e(t,0,59,a),isoSecond:r=e(r,0,59,a),isoMillisecond:o=e(o,0,999,a),isoMicrosecond:i=e(i,0,999,a),isoNanosecond:s=e(s,0,999,a)}}function Xe(n,e){return l(yn,((t,r)=>n[r]??e[r]))}function _e(n,e){var t,r;return Qe(st((t=n,r=Zt(e),it(ot(t)+ot(r)))))}function nt(n,e,t){const r=k(t,5,0,0,5);return Ot(Qn(ot(e)-ot(n),r),r.largestUnit)}function et(n,e){return Ve(st(n),e)}function tt(n){return m(PlainTime,n??{hour:0})}function rt(n,e){return j(ot(n),ot(e))}function ot(n){return BigInt(n.hour)*D+BigInt(n.minute)*T+BigInt(n.second)*S+BigInt(n.millisecond)*I+BigInt(n.microsecond)*M+BigInt(n.nanosecond)}function it(n){const[e,t]=ut(n);return{...ct(t,5),day:Number(e/F)}}function st(n){return{isoNanosecond:n.nanosecond??0,isoMicrosecond:n.microsecond??0,isoMillisecond:n.millisecond??0,isoSecond:n.second??0,isoMinute:n.minute??0,isoHour:n.hour??0}}function at(n){return BigInt(n.day)*F+ot(n)}function ct(n,e){const t={};for(let r=e;r>=0;r--){const e=BigInt(O[r]),o=n/e;n-=o*e,t[C[r]]=Number(o)}return t}function ut(n){const e=J(n);return[W(e.isoYear,e.isoMonth,e.isoDay),(t=e,BigInt(t.isoHour)*D+BigInt(t.isoMinute)*T+BigInt(t.isoSecond)*S+BigInt(t.isoMillisecond)*I+BigInt(t.isoMicrosecond)*M+BigInt(t.isoNanosecond))];var t}function dt(n,e){return ht(n)+"T"+ft(n,e)}function ht(n){return lt(n)+"-"+sn(n.isoDay,2)}function lt(n){const{isoYear:e}=n;return(e<1e3||e>9999?an(e)+sn(Math.abs(e),6):sn(e,4))+"-"+sn(n.isoMonth,2)}function ft(n,e){const t=[sn(n.isoHour,2)];return e.smallestUnit<=4&&(t.push(sn(n.isoMinute,2)),e.smallestUnit<=3&&t.push(sn(n.isoSecond,2)+pt(n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,e.fractionalSecondDigits)[0])),t.join(":")}function mt(n){const e=ct(BigInt(Math.abs(n)),5),t=pt(e.millisecond,e.microsecond,e.nanosecond,void 0)[0];return an(n)+sn(e.hour,2)+":"+sn(e.minute,2)+(e.second||t?":"+sn(e.second,2)+t:"")}function gt(n,e){return n&&(2===e||1!==e&&"iso8601"!==n)?`[u-ca=${n}]`:""}function yt(n){return n.map((([n,e,t])=>t||n?(n<BigInt(0)?-n:n)+e:"")).join("")}function pt(n,e,t,r,o,i){let s=BigInt(t)+BigInt(e)*M+BigInt(n)*I;o&&(s=H(s,void 0===r?O[i]:Math.pow(10,9-r),o));const a=s<0?-s:s,c=a/S;let u=sn(Number(a-c*S),9);return u=void 0===r?u.replace(/0+$/,""):u.substr(0,r),[u?"."+u:"",Number(c)*(s<0?-1:1)]}On(PlainTime,E);var[wt,vt]=d(),Duration=class extends y{constructor(n=0,e=0,t=0,r=0,o=0,i=0,s=0,a=0,c=0,u=0){super(),vt(this,function(n){const e={};let t=0;for(const r of P){const o=Number(n[r]||0),i=L(n[r]);if(i){if(t&&t!==i)throw new RangeError("All fields must be same sign");t=i}if(!Number.isInteger(o))throw new RangeError("Duration fields must be integers");e[r]=o}return e.sign=t,e}({years:n,months:e,weeks:t,days:r,hours:o,minutes:i,seconds:s,milliseconds:a,microseconds:c,nanoseconds:u}))}static from(n){return Mt("object"==typeof n?t(n,vn):Re(n))}static compare(n,e,t){return function(n,e,t){const r=m(Duration,n),o=m(Duration,e),i=Yt(r),s=Yt(o);if(void 0===t&&i&&s)return j(at(i),at(s));const a=Et(t),c=a.add(r),u=a.add(o);if(a instanceof ZonedDateTime)return ZonedDateTime.compare(c,u);return PlainDateTime.compare(c,u)}(n,e,r(t).relativeTo)}get years(){return wt(this).years}get months(){return wt(this).months}get weeks(){return wt(this).weeks}get days(){return wt(this).days}get hours(){return wt(this).hours}get minutes(){return wt(this).minutes}get seconds(){return wt(this).seconds}get milliseconds(){return wt(this).milliseconds}get microseconds(){return wt(this).microseconds}get nanoseconds(){return wt(this).nanoseconds}get sign(){return wt(this).sign}get blank(){return!this.sign}with(n){return Mt({...wt(this),...a(n,vn)})}negated(){return Mt(Pt(wt(this)))}abs(){return Mt(l(wt(this),(n=>Math.abs(n))))}add(n,e){return It(this,m(Duration,n),r(e).relativeTo)}subtract(n,e){return It(this,m(Duration,n).negated(),r(e).relativeTo)}round(n){return function(n,e){if(!i(e))throw new TypeError("Must specify options");if(void 0===e.largestUnit&&void 0===e.smallestUnit)throw new RangeError("Must specify either largestUnit or smallestUnit");const t=Ft(n),r=k(e,t,0,0,9,!1,!0),{largestUnit:o,smallestUnit:s}=r,a=Yt(n);if(void 0===e.relativeTo&&a&&Y(o)&&Y(s)){return Nt(ct(Qn(at(a),r),o))}const c=Ct(e.relativeTo),u=Dt(n,o,c);return Jn(u,r,c,c.add(u))}(this,n)}total(n){return function(n,e,t){const r=Yt(n);if(void 0===t&&r&&Y(e))return Number(at(r))/O[e];const o=Ct(t),i=Dt(n,e,o,!0);return Wn(i,e,o,o.add(i))[P[e]]}(this,R(r(n).unit,void 0,0,9),n.relativeTo)}toString(n){const e=In(n,3);return function(n,e){const{smallestUnit:t,fractionalSecondDigits:r,roundingMode:o}=e,{sign:i}=n,s=BigInt(n.hours),a=BigInt(n.minutes);let c=BigInt(n.seconds),u="";if(t<=3){const e=pt(n.milliseconds,n.microseconds,n.nanoseconds,r,o,t);u=e[0],c+=BigInt(e[1])}return(i<0?"-":"")+"P"+yt([[BigInt(n.years),"Y"],[BigInt(n.months),"M"],[BigInt(n.weeks),"W"],[BigInt(n.days),"D"]])+(s||a||c||u||!i?"T"+yt([[s,"H"],[a,"M"],[t<=3?c:BigInt(0),u+"S",u||!i]]):"")}(wt(this),e)}toLocaleString(n,e){return this.toString()}};function Mt(n){return new Duration(n.years,n.months,n.weeks,n.days,n.hours,n.minutes,n.seconds,n.milliseconds,n.microseconds,n.nanoseconds)}function It(n,e,t){const r=Yt(n),o=Yt(e),i=Math.max(Ft(n),Ft(e));if(void 0===t&&r&&o)return Ot(at(r)+at(o),i);const s=Et(t),a=s.add(n).add(e);return re(s,a,i)}function St(n,e){return new Duration(n.years+e.years,n.months+e.months,n.weeks+e.weeks,n.days+e.days,n.hours+e.hours,n.minutes+e.minutes,n.seconds+e.seconds,n.milliseconds+e.milliseconds,n.microseconds+e.microseconds,n.nanoseconds+e.nanoseconds)}function Tt(n,e,t){return t instanceof PlainDate?function(n,e,t){const r=t.add(n);return t.calendar.dateUntil(t,r,{largestUnit:C[e]})}(n,Math.max(6,e),t):Dt(n,e,t)}function Dt(n,e,t,r){const o=!0!==r&&e>7&&n.weeks;o&&(n=n.with({weeks:0}));const i=t.add(n);let s=re(t,i,e);return o&&(s=St(s,new Duration(0,0,o))),s}function Ft(n){return n.years?9:n.months?8:n.weeks?7:n.days?6:n.hours?5:n.minutes?4:n.seconds?3:n.milliseconds?2:n.microseconds?1:0}function Ot(n,e){return Nt(ct(n,e))}function Nt(n){return new Duration(0,0,0,n.day,n.hour,n.minute,n.second,n.millisecond,n.microsecond,n.nanosecond)}function Yt(n){if(!n.years&&!n.months&&!n.weeks)return{day:n.days,...Zt(n)}}function bt(n){return new Duration(n.years,n.months,n.weeks,n.days)}function Zt(n){return{hour:n.hours,minute:n.minutes,second:n.seconds,millisecond:n.milliseconds,microsecond:n.microseconds,nanosecond:n.nanoseconds}}function Et(n){if(void 0===n)throw new RangeError("Need relativeTo");if("object"==typeof n)return void 0!==n.timeZone?ZonedDateTime.from(n):PlainDateTime.from(n);{const e=Ue(String(n));return void 0!==e.timeZone?_n(Pe(e),void 0,0):fr(Ce(e))}}function Ct(n){if(void 0===n)throw new RangeError("Must specify relativeTo");if(i(n))return n instanceof ZonedDateTime||n instanceof PlainDateTime?n:m(void 0!==n.timeZone?ZonedDateTime:PlainDateTime,n);if("symbol"==typeof n)throw new TypeError("Incorrect relativeTo type");const e=xe(String(n));if(e)return void 0!==e.timeZone?_n(Pe(e),void 0,3):fr(Ce(e));throw new RangeError("Invalid value of relativeTo")}function Pt(n){return l(n,(n=>-n||0))}function Ut(n,e,t,r){n=Rt(n=Bt(n,e.years,t,r),e.months,t,r);let o=t.epochMilliseconds(n.year,n.month,n.day);const[,i]=function(n){const e=ot(Zt(n)),t=e/F;return[ct(e-t*F,5),new Duration(n.years,n.months,n.weeks,n.days+Number(t))]}(e);return o=_(o,7*i.weeks+i.days),K(o)}function Bt({year:n,month:t,day:r},o,i,s){n+=o;const a=e(t,1,i.monthsInYear(n),s);let c=t===a?r:1;return c=e(c,1,i.daysInMonth(n,a),s),{year:n,month:a,day:c}}function Rt({year:n,month:t,day:r},o,i,s){if(o){if(t+=o,o<0)for(;t<1;)t+=i.monthsInYear(--n);else{let e;for(;t>(e=i.monthsInYear(n));)t-=e,n++}r=e(r,1,i.daysInMonth(n,t),s)}return{year:n,month:t,day:r}}function xt(n,e){return e?{...K(_(z(n),e)),calendar:n.calendar}:n}function kt(n){return new PlainDate(n.isoYear,n.isoMonth,n.isoDay,n.calendar)}function jt(n,e){return{...$n(n,e),day:n.day??e.day}}function Lt(n,t,r,o,i){return[n=Number(n),t=e(t,1,o.monthsInYear(n),i),r=e(r,1,o.daysInMonth(n,t),i)]}function Ht(n,e){const[t,r,o]=Lt(n.isoYear,n.isoMonth,n.isoDay,hn,e);return{isoYear:t,isoMonth:r,isoDay:o}}function $t(n,e){return j(A(n.getISOFields()),A(e.getISOFields()))||j(n.calendar.id,e.calendar.id)}function At(n,e){return j(n.year,e.year)||function(n,e){return j(n.month,e.month)||j(n.day,e.day)}(n,e)}function qt(n,e,t,r){return Jn(dr(n,e).dateUntil(n,e,{largestUnit:C[t.largestUnit]}),t,n,e,r)}var PlainDate=class extends v{constructor(n,e,t,r=cr()){const o=Ht({isoYear:n,isoMonth:e,isoDay:t},c);!function(n){const e=A(n);en(e+(e<0n?86399999999999n:0n))}(o),super({...o,calendar:m(Calendar2,r)})}static from(n,e){if(u(e),n instanceof PlainDate)return kt(n.getISOFields());if("object"==typeof n){const r=t(n,gn);return ur(n).dateFromFields(r,e)}return kt(Ce(Ue(String(n))))}static compare(n,e){return $t(m(PlainDate,n),m(PlainDate,e))}with(n,e){const t=jt(a(n,gn),this);return this.calendar.dateFromFields(t,e)}withCalendar(n){const e=this.getISOFields();return new PlainDate(e.isoYear,e.isoMonth,e.isoDay,n)}add(n,e){return this.calendar.dateAdd(this,n,e)}subtract(n,e){return this.calendar.dateAdd(this,m(Duration,n).negated(),e)}until(n,e){return qt(this,m(PlainDate,n),k(e,6,6,6,9))}since(n,e){return qt(this,m(PlainDate,n),k(e,6,6,6,9),!0)}equals(n){return 0===$t(this,m(PlainDate,n))}toString(n){const e=fn(n),t=this.getISOFields();return ht(t)+gt(t.calendar.id,e)}toLocaleString(n,e){return le(this,n,{year:"numeric",month:"numeric",day:"numeric",...e,hour:void 0,minute:void 0,second:void 0})}toZonedDateTime(n){return this.toPlainDateTime(n.plainTime).toZonedDateTime(n.timeZone)}toPlainDateTime(n){return fr({...this.getISOFields(),...tt(n).getISOFields()})}toPlainYearMonth(){return Hn(this.getISOFields())}toPlainMonthDay(){return kn(this.getISOFields())}};function zt(n){return n instanceof PlainDate||n instanceof PlainDateTime||n instanceof ZonedDateTime||n instanceof PlainYearMonth||n instanceof PlainMonthDay}function Wt(n,e,t){let r;if(n instanceof PlainDate)r=n;else if(zt(n)){if(t&&n instanceof PlainMonthDay)throw new TypeError("PlainMonthDay not allowed");r=kt(n.getISOFields())}else r=PlainDate.from(n);return lr(r.calendar,e),r}function Gt(n,e,t){if(zt(n))return n.getISOFields();let{era:r,eraYear:o,year:i,month:s,monthCode:a,day:c}=n;if(void 0===i){if(void 0===o||void 0===r)throw new TypeError("Must specify either a year or an era & eraYear");i=e.convertEraYear(o,r,!0)}if(void 0!==a){const n=e.convertMonthCode(a,i);if(void 0!==s&&s!==n)throw new RangeError("Month doesnt match with monthCode");s=n}else if(void 0===s)throw new TypeError("Must specify either a month or monthCode");if(void 0===c)throw new TypeError("Must specify day");return[i,s,c]=Lt(i,s,c,e,u(t)),K(e.epochMilliseconds(i,s,c))}function Jt(n,e){if(zt(n)){if(e&&n instanceof PlainMonthDay)throw new TypeError("PlainMonthDay not allowed");return n.getISOFields()}return PlainDate.from(n).getISOFields()}function Kt(n,e){return X(n.epochMilliseconds(e,1,1),n.epochMilliseconds(e+1,1,1))}function Qt(n,e,t,r){return X(n.epochMilliseconds(e,1,1),n.epochMilliseconds(e,t,r))+1}On(PlainDate),bn(PlainDate,Yn);var Vt=class extends un{constructor(n){const e=Xt(n);if(!function(n,e){const t=n.split("-"),r=e.split("-");return t[0]===r[0]}(n,e.resolvedOptions().calendar))throw new RangeError("Invalid calendar: "+n);super(n),this.format=e,this.yearCorrection=this.computeFields(0).year-1970,this.yearMonthCache={}}era(n,e,t){const r=G(n,e,t);return this.computeFields(r).era}eraYear(n,e,t){const r=G(n,e,t);return this.computeFields(r).eraYear}year(n,e,t){const r=G(n,e,t);return this.computeFields(r).year}month(n,e,t){const r=G(n,e,t);return this.computeFields(r).month}day(n,e,t){const r=G(n,e,t);return this.computeFields(r).day}epochMilliseconds(n,e,t){this.ensureYear(n);return _(this.yearMonthCache[n][e-1],t-1)}daysInMonth(n,e){const{yearMonthCache:t}=this;this.ensureYear(n);const r=t[n],o=r[e-1];e>=r.length&&(n++,e=0);return X(o,t[n][e])}monthsInYear(n){return this.ensureYear(n),this.yearMonthCache[n].length}inLeapYear(n){const e=Kt(this,n);return e>Kt(this,n-1)&&e>Kt(this,n+1)}guessYearForMonthDay(n,e){let t=1970+this.yearCorrection;const r=t+100;for(;t<r;t++){const r=this.convertMonthCode(n,t);if(r<=this.monthsInYear(t)&&e<=this.daysInMonth(t,r))return t}throw new Error("Could not guess year")}normalizeISOYearForMonthDay(n){return n}ensureYear(n){const{yearMonthCache:e,yearCorrection:t}=this;if(!e[n]||!e[n+1]){let e=G(n-t);e=_(e,400),this.ensureDown(e,n)}}ensureDown(n,e){const{yearMonthCache:t}=this;let r=this.computeFields(n);for(let o=r.year;o>=e;o--){const e=t[o]||(t[o]=[]),i=e.length+1;for(let t=r.month;t>=i;t--)n=_(n,1-r.day),e[t-1]=n,n=_(n,-1),r=this.computeFields(n)}}computeFields(n){const e=Pn(this.format,n);let t,r,o=parseInt(e.relatedYear||e.year);return e.era&&(t=Bn(e.era),r=o,o=this.convertEraYear(r,t)),{era:t,eraYear:r,year:o,month:this.parseMonth(e.month,o),day:parseInt(e.day)}}parseMonth(n,e){return parseInt(n)}};function Xt(n){return new ue("en-US",{calendar:n,era:"short",year:"numeric",month:"numeric",day:"numeric",timeZone:"UTC"})}var _t={Tishri:"M01",Heshvan:"M02",Kislev:"M03",Tevet:"M04",Shevat:"M05","Adar I":"M05L","Adar II":"M06",Adar:"M06",Nisan:"M07",Iyar:"M08",Sivan:"M09",Tamuz:"M10",Av:"M11",Elul:"M12"},nr=G(1868,9,8),er={gregory:ln,hebrew:class extends Vt{parseMonth(n,e){const t=parseInt(n);return isNaN(t)?this.convertMonthCode(_t[n],e):t}monthCode(n,e){const t=this.inLeapYear(e)&&n>5;return super.monthCode(n-Number(t),e)+(t&&6===n?"L":"")}convertMonthCode(n,e){const t=super.convertMonthCode(n,e);return t+(n.match(/L$/)||this.inLeapYear(e)&&t>5?1:0)}inLeapYear(n){const e=this.monthsInYear(n);return e>this.monthsInYear(n-1)&&e>this.monthsInYear(n+1)}},japanese:class extends ln{constructor(){super(...arguments),this.format=Xt("japanese")}era(n,e,t){const r=G(n,e,t);return r<nr?super.era(n,e,t):Bn(Pn(this.format,r).era)}}},tr={iso8601:hn};function rr(n,e,t,r){let o=0,i=0,s=0,a=0;switch(r){case 9:o=function(n,e,t){const[,r,o]=Lt(e.year,n.month,n.day,t,0),i=At(e,n),s=j(e.month,r)||j(e.day,o);return e.year-n.year-(s&&i&&s!==i?i:0)}(n,e,t),n=Bt(n,o,t,0);case 8:i=function(n,e,t){let r=0;const o=At(e,n);if(o){let{year:i}=n;for(;i!==e.year;)r+=t.monthsInYear(i)*o,i+=o;const[,s,a]=Lt(e.year,n.month,n.day,t,0);r+=e.month-s;const c=j(e.day,a);c&&o&&c!==o&&(r-=o)}return r}(n,e,t),n=Rt(n,i,t,0)}return a=X(t.epochMilliseconds(n.year,n.month,n.day),t.epochMilliseconds(e.year,e.month,e.day)),7===r&&(s=Math.trunc(a/7),a%=7),new Duration(o,i,s,a)}function or(n,e,t){const r=7+e-t;return-$(nn(n,1,r)-e,7)+r-1}function ir(n,e,t){const r=or(n,e,t),o=or(n+1,e,t);return(Kt(hn,n)-r+o)/7}var[sr,ar]=d(),Calendar2=class extends g{constructor(n){super(),"islamicc"===n&&(n="islamic-civil"),ar(this,function(n){const e=(n=String(n)).toLocaleLowerCase();return tr[e]||(tr[e]=new(er[e]||Vt)(n))}(n))}static from(n){if("object"==typeof n&&n)return function(n){return n.calendar}(n)?function(n){if("object"==typeof n&&n){if("string"==typeof n.id)return n;throw new RangeError("Invalid calendar")}return new Calendar2(String(n))}(n.calendar):n;const e=xe(String(n));return new Calendar2(e?e.calendar||"iso8601":n)}get id(){return sr(this).id}era(n){const e=Jt(n,!0);return sr(this).era(e.isoYear,e.isoMonth,e.isoDay)}eraYear(n){const e=Jt(n,!0);return sr(this).eraYear(e.isoYear,e.isoMonth,e.isoDay)}year(n){const e=Jt(n,!0);return sr(this).year(e.isoYear,e.isoMonth,e.isoDay)}month(n){const e=Jt(n,!0);return sr(this).month(e.isoYear,e.isoMonth,e.isoDay)}monthCode(n){const e=Wt(n,this);return sr(this).monthCode(e.month,e.year)}day(n){const e=Jt(n);return sr(this).day(e.isoYear,e.isoMonth,e.isoDay)}dayOfWeek(n){const e=Jt(n,!0);return nn(e.isoYear,e.isoMonth,e.isoDay)}dayOfYear(n){const e=Wt(n,this,!0);return Qt(sr(this),e.year,e.month,e.day)}weekOfYear(n){const e=Jt(n,!0);return function(n,e,t,r,o){const i=or(n,r,o),s=Math.floor((Qt(hn,n,e,t)-i-1)/7)+1;if(s<1)return s+ir(n-1,r,o);const a=ir(n,r,o);return s>a?s-a:s}(e.isoYear,e.isoMonth,e.isoDay,1,4)}daysInWeek(n){return Jt(n,!0),7}daysInMonth(n){const e=Wt(n,this,!0);return sr(this).daysInMonth(e.year,e.month)}daysInYear(n){const e=Wt(n,this,!0);return Kt(sr(this),e.year)}monthsInYear(n){const e=Wt(n,this,!0);return sr(this).monthsInYear(e.year)}inLeapYear(n){return sr(this).inLeapYear(this.year(n))}dateFromFields(n,e){const t=Gt(n,sr(this),e);return new PlainDate(t.isoYear,t.isoMonth,t.isoDay,this)}yearMonthFromFields(n,e){const t=Gt({...n,day:1},sr(this),e);return new PlainYearMonth(t.isoYear,t.isoMonth,this,t.isoDay)}monthDayFromFields(n,e){const t=sr(this);let{era:r,eraYear:o,year:i,monthCode:s,day:a}=n;if(void 0===a)throw new TypeError("required property 'day' missing or undefined");void 0!==r&&void 0!==o&&(i=t.convertEraYear(o,r));let c=i;if(void 0===c){if(void 0===s)throw new TypeError("either year or monthCode required with month");c=t.guessYearForMonthDay(s,a)}const u=Gt({...n,year:c},t,e);return new PlainMonthDay(u.isoMonth,u.isoDay,this,t.normalizeISOYearForMonthDay(u.isoYear))}dateAdd(n,e,t){const r=sr(this),o=Ut(m(PlainDate,n,t),m(Duration,e),r,u(t));return new PlainDate(o.isoYear,o.isoMonth,o.isoDay,this)}dateUntil(n,e,t){const o=sr(this),i=m(PlainDate,n),s=m(PlainDate,e),a=R(r(t).largestUnit,6,6,9);return lr(dr(i,s),this),rr(i,s,o,a)}toString(){return this.id}};function cr(){return new Calendar2("iso8601")}function ur(n){return void 0===n.calendar?cr():m(Calendar2,n.calendar)}function dr(n,e){const{calendar:t}=n;return lr(t,e.calendar),t}function hr(n,e){const t=n.calendar,r=e.calendar;if("iso8601"===t.id)return r;if("iso8601"===r.id)return t;if(t.id!==r.id)throw new RangeError("Non-ISO calendars incompatible");return t}function lr(n,e){if(n.id!==e.id)throw new RangeError("Calendars must match")}var PlainDateTime=class extends v{constructor(n,e,t,r=0,o=0,i=0,s=0,a=0,u=0,d=cr()){const h=yr({isoYear:n,isoMonth:e,isoDay:t,isoHour:r,isoMinute:o,isoSecond:i,isoMillisecond:s,isoMicrosecond:a,isoNanosecond:u},c);en(A(h)),super({...h,calendar:m(Calendar2,d)})}static from(n,e){const r=u(e);return fr(n instanceof PlainDateTime?n.getISOFields():"object"==typeof n?mr(t(n,pn),e,r,ur(n)):Ce(Ue(String(n))))}static compare(n,e){return pr(m(PlainDateTime,n),m(PlainDateTime,e))}with(n,e){return fr(mr(gr(a(n,pn),this),e,u(e),this.calendar))}withPlainDate(n){const e=m(PlainDate,n);return fr({...this.getISOFields(),...e.getISOFields(),calendar:hr(this,e)})}withPlainTime(n){return fr({...this.getISOFields(),...tt(n).getISOFields()})}withCalendar(n){return fr({...this.getISOFields(),calendar:m(Calendar2,n)})}add(n,e){return wr(this,m(Duration,n),e)}subtract(n,e){return wr(this,m(Duration,n).negated(),e)}until(n,e){return vr(this,m(PlainDateTime,n),e)}since(n,e){return vr(this,m(PlainDateTime,n),e,!0)}round(n){return function(n,e){const t=x(e,void 0,0,6);return Mr(n,Vn(t),t.roundingMode)}(this,n)}equals(n){return 0===pr(this,m(PlainDateTime,n))}toString(n){const e=In(n),t=fn(n),r=Mr(this,e.roundingIncrement,e.roundingMode).getISOFields();return dt(r,e)+gt(r.calendar.id,t)}toLocaleString(n,e){return le(this,n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e})}toZonedDateTime(n,e){const t=m(TimeZone,n),r=t.getInstantFor(this,e);return new ZonedDateTime(r.epochNanoseconds,t,this.calendar)}toPlainYearMonth(){return Hn(this.getISOFields())}toPlainMonthDay(){return kn(this.getISOFields())}toPlainDate(){return kt(this.getISOFields())}toPlainTime(){return Qe(this.getISOFields())}};function fr(n){return new PlainDateTime(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,n.calendar)}function mr(n,e,t,r){return{...r.dateFromFields(n,e).getISOFields(),...et(n,t)}}function gr(n,e){return{...jt(n,e),...Xe(n,e)}}function yr(n,e){return{...Ht(n,e),...Ve(n,e)}}function pr(n,e){return j(A(n.getISOFields()),A(e.getISOFields()))||j(n.calendar.id,e.calendar.id)}function wr(n,e,t){const{calendar:r}=n,o=bt(e),i=Zt(e);return fr({...J(A(r.dateAdd(kt(n.getISOFields()),o,t).getISOFields())+ot(n)+ot(i)),calendar:r})}function vr(n,e,t,r){const o=k(t,6,0,0,9);return Jn(re(n,e,o.largestUnit),o,n,e,r)}function Mr(n,e,t){const r=Kn(n,e,t);return fr(Xn(n.getISOFields(),r))}function Ir(n,e){return j(n.epochNanoseconds,e.epochNanoseconds)}function Sr(n,e){if(Ft(e)>=6)throw new RangeError("Duration cant have units larger than days");return new Instant(n.epochNanoseconds+ot(Zt(e)))}function Tr(n,e,t){const r=k(t,3,0,0,5,!0);return Ot(Qn(e.epochNanoseconds-n.epochNanoseconds,r),r.largestUnit)}On(PlainDateTime,E),bn(PlainDateTime,Yn);var[Dr,Fr]=d(),Instant=class extends y{constructor(n){var e;super(),n=BigInt(n),((e=n)<-8640000000000000000000n||e>8640000000000000000000n)&&on(),Fr(this,n)}static from(n){if(n instanceof Instant)return new Instant(n.epochNanoseconds);const e=Ue(String(n)),t=e.offset;if(void 0===t)throw new RangeError("Must specify an offset");return new Instant(A(yr(e,c))-BigInt(t))}static fromEpochSeconds(n){return new Instant(BigInt(n)*S)}static fromEpochMilliseconds(n){return new Instant(BigInt(n)*I)}static fromEpochMicroseconds(n){return new Instant(n*M)}static fromEpochNanoseconds(n){return new Instant(n)}static compare(n,e){return Ir(m(Instant,n),m(Instant,e))}get epochNanoseconds(){return Dr(this)}add(n){return Sr(this,m(Duration,n))}subtract(n){return Sr(this,m(Duration,n).negated())}until(n,e){return Tr(this,m(Instant,n),e)}since(n,e){return Tr(m(Instant,n),this,e)}round(n){return function(n,e){const t=x(e,void 0,0,5,!1,!0),[r,o]=ut(n.epochNanoseconds);return new Instant(r+Qn(o,t))}(this,n)}equals(n){return 0===Ir(this,m(Instant,n))}toString(n){const e=r(n).timeZone;return this.toZonedDateTimeISO(e??"UTC").toString({...n,offset:void 0===e?"never":"auto",timeZoneName:"never"})+(void 0===e?"Z":"")}toLocaleString(n,e){return new ue(n,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",...e}).format(this.epochMilliseconds)}toZonedDateTimeISO(n){return new ZonedDateTime(this.epochNanoseconds,n)}toZonedDateTime(n){if(!i(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 ZonedDateTime(this.epochNanoseconds,n.timeZone,n.calendar)}};function Or(n=Er()){return Zr().toZonedDateTimeISO(n)}function Nr(n,e){if(void 0===n)throw new RangeError("Must specify calendar");return Zr().toZonedDateTime({calendar:n,timeZone:e??Er()})}function Yr(n=Er()){return Or(n).toPlainDateTime()}function br(n,e){return Nr(n,e).toPlainDateTime()}function Zr(){return new Instant(BigInt(Date.now())*M)}function Er(){return new TimeZone((new ue).resolvedOptions().timeZone)}Tn(Instant);var Cr={zonedDateTimeISO:Or,zonedDateTime:Nr,plainDateTimeISO:Yr,plainDateTime:br,plainDateISO:function(n=Er()){return Yr(n).toPlainDate()},plainDate:function(n,e){return br(n,e).toPlainDate()},plainTimeISO:function(n=Er()){return Zr().toZonedDateTimeISO(n).toPlainTime()},instant:Zr,timeZone:Er};!function(){if(!globalThis.Temporal){globalThis.Temporal={PlainYearMonth:PlainYearMonth,PlainMonthDay:PlainMonthDay,PlainDate:PlainDate,PlainTime:PlainTime,PlainDateTime:PlainDateTime,ZonedDateTime:ZonedDateTime,Instant:Instant,Calendar:Calendar2,TimeZone:TimeZone,Duration:Duration,Now:Cr},globalThis.Date.prototype.toTemporalInstant=function(){return n=this,Instant.fromEpochMilliseconds(n.valueOf());var n};class n extends ue{format(n){return super.format(de(n))}formatToParts(n){return super.formatToParts(de(n))}formatRange(n,e){return super.formatRange(he(n),he(e))}formatRangeToParts(n,e){return super.formatRangeToParts(he(n),he(e))}}globalThis.Intl.DateTimeFormat=n}}();
//# sourceMappingURL=global.js.map

@@ -1,2 +0,2 @@

import{OrigDateTimeFormat as a,normalizeIntlDateArg as t,normalizeIntlOptionalDateArg as r}from"./native/intl";import{Calendar,Duration,Instant,Now as o,PlainDate,PlainDateTime,PlainMonthDay,PlainTime,PlainYearMonth,TimeZone,ZonedDateTime,dateToTemporalInstant as e}from"./impl";function n(){if(!globalThis.Temporal){globalThis.Temporal={PlainYearMonth:PlainYearMonth,PlainMonthDay:PlainMonthDay,PlainDate:PlainDate,PlainTime:PlainTime,PlainDateTime:PlainDateTime,ZonedDateTime:ZonedDateTime,Instant:Instant,Calendar:Calendar,TimeZone:TimeZone,Duration:Duration,Now:o},globalThis.Date.prototype.toTemporalInstant=function(){return e(this)};class n extends a{format(a){return super.format(r(a))}formatToParts(a){return super.formatToParts(r(a))}formatRange(a,r){return super.formatRange(t(a),t(r))}formatRangeToParts(a,r){return super.formatRangeToParts(t(a),t(r))}}globalThis.Intl.DateTimeFormat=n}}export{n as shimTemporal};
import{Calendar,Duration,Instant,Now as a,OrigDateTimeFormat as t,PlainDate,PlainDateTime,PlainMonthDay,PlainTime,PlainYearMonth,TimeZone,ZonedDateTime,dateToTemporalInstant as r,normalizeIntlDateArg as e,normalizeIntlOptionalDateArg as o}from"./impl";function n(){if(!globalThis.Temporal){globalThis.Temporal={PlainYearMonth:PlainYearMonth,PlainMonthDay:PlainMonthDay,PlainDate:PlainDate,PlainTime:PlainTime,PlainDateTime:PlainDateTime,ZonedDateTime:ZonedDateTime,Instant:Instant,Calendar:Calendar,TimeZone:TimeZone,Duration:Duration,Now:a},globalThis.Date.prototype.toTemporalInstant=function(){return r(this)};class n extends t{format(a){return super.format(o(a))}formatToParts(a){return super.formatToParts(o(a))}formatRange(a,t){return super.formatRange(e(a),e(t))}formatRangeToParts(a,t){return super.formatRangeToParts(e(a),e(t))}}globalThis.Intl.DateTimeFormat=n}}export{n as shimTemporal};
//# sourceMappingURL=shim.js.map
{
"name": "temporal-polyfill",
"version": "0.0.1",
"version": "0.0.2",
"title": "Temporal Polyfill",

@@ -5,0 +5,0 @@ "description": "A spec-compliant Temporal JavaScript polyfill in less than 15kb",

@@ -10,3 +10,3 @@ /*

export * from './native/date'
export * from './native/intl'
export * from './native/intl' // TODO: don't export everything

@@ -13,0 +13,0 @@ export { PlainYearMonth } from './public/plainYearMonth'

@@ -9,7 +9,2 @@ /*

import {
OrigDateTimeFormat,
normalizeIntlDateArg,
normalizeIntlOptionalDateArg,
} from './native/intl'
import {
Calendar,

@@ -21,2 +16,3 @@ DateTimeFormatArg,

Now,
OrigDateTimeFormat,
PlainDate,

@@ -30,2 +26,4 @@ PlainDateTime,

dateToTemporalInstant,
normalizeIntlDateArg,
normalizeIntlOptionalDateArg,
} from './impl'

@@ -32,0 +30,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc