UNPKG

@vecrea/oid4vc-verifier-endpoint-core

Version:
1 lines 298 kB
"use strict";var xu=Object.defineProperty;var aa=t=>{throw TypeError(t)};var Ou=(t,e,r)=>e in t?xu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var h=(t,e,r)=>Ou(t,typeof e!="symbol"?e+"":e,r),oa=(t,e,r)=>e.has(t)||aa("Cannot "+r);var F=(t,e,r)=>(oa(t,e,"read from private field"),r?r.call(t):e.get(t)),G=(t,e,r)=>e.has(t)?aa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ve=(t,e,r,n)=>(oa(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Tu=t=>t===void 0?"undefined":t===null?"null":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t),so=t=>t instanceof Error?t:new Error(Tu(t));class He{constructor(e,r){if(this.value=e,this.error=r,e&&r)throw new Error("Result cannot be both success and failure")}static success(e){return new He(e,void 0)}static failure(e){return new He(void 0,e)}isSuccess(){return this.error===void 0}isFailure(){return!this.isSuccess()}getOrThrow(){if(this.isSuccess())return this.value;throw this.error}getOrDefault(e){return this.isSuccess()?this.value:e}getOrElse(e){return this.isSuccess()?this.value:e(this.error)}onSuccess(e){return this.isSuccess()&&e(this.value),this}onFailure(e){return this.isFailure()&&e(this.error),this}recover(e){return this.isFailure()?En(()=>e(this.error)):this}async recoverAsync(e){return this.isFailure()?Qe(()=>e(this.error)):this}}const En=(t,...e)=>{try{const r=t(...e);return r instanceof He?r:He.success(r)}catch(r){return He.failure(so(r))}},Qe=async(t,...e)=>{try{const r=await t(...e);return r instanceof He?r:He.success(r)}catch(r){return He.failure(so(r))}},ei="{RESPONSE_CODE}",io=()=>Au,Au=(t,e)=>En(()=>{if(!t.includes(ei))throw new Error("Expected response_code place holder not found in template");const r=t.replace(ei,e.value);return new URL(r)});class Pt extends Error{}class Iu extends Pt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Nu extends Pt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Cu extends Pt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Bt extends Pt{}class ao extends Pt{constructor(e){super(`Invalid unit ${e}`)}}class oe extends Pt{}class et extends Pt{constructor(){super("Zone is an abstract class")}}const v="numeric",Ce="short",ye="long",xn={year:v,month:v,day:v},oo={year:v,month:Ce,day:v},Ru={year:v,month:Ce,day:v,weekday:Ce},co={year:v,month:ye,day:v},uo={year:v,month:ye,day:v,weekday:ye},lo={hour:v,minute:v},ho={hour:v,minute:v,second:v},fo={hour:v,minute:v,second:v,timeZoneName:Ce},po={hour:v,minute:v,second:v,timeZoneName:ye},mo={hour:v,minute:v,hourCycle:"h23"},yo={hour:v,minute:v,second:v,hourCycle:"h23"},go={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:Ce},vo={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:ye},_o={year:v,month:v,day:v,hour:v,minute:v},wo={year:v,month:v,day:v,hour:v,minute:v,second:v},bo={year:v,month:Ce,day:v,hour:v,minute:v},So={year:v,month:Ce,day:v,hour:v,minute:v,second:v},Du={year:v,month:Ce,day:v,weekday:Ce,hour:v,minute:v},ko={year:v,month:ye,day:v,hour:v,minute:v,timeZoneName:Ce},Eo={year:v,month:ye,day:v,hour:v,minute:v,second:v,timeZoneName:Ce},xo={year:v,month:ye,day:v,weekday:ye,hour:v,minute:v,timeZoneName:ye},Oo={year:v,month:ye,day:v,weekday:ye,hour:v,minute:v,second:v,timeZoneName:ye};class nn{get type(){throw new et}get name(){throw new et}get ianaName(){return this.name}get isUniversal(){throw new et}offsetName(e,r){throw new et}formatOffset(e,r){throw new et}offset(e){throw new et}equals(e){throw new et}get isValid(){throw new et}}let Zs=null;class vs extends nn{static get instance(){return Zs===null&&(Zs=new vs),Zs}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return Po(e,r,n)}formatOffset(e,r){return Tr(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let vn={};function Mu(t){return vn[t]||(vn[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),vn[t]}const Pu={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Ju(t,e){const r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,i,a,o,c,u,l]=n;return[a,s,i,o,c,u,l]}function Wu(t,e){const r=t.formatToParts(e),n=[];for(let s=0;s<r.length;s++){const{type:i,value:a}=r[s],o=Pu[i];i==="era"?n[o]=a:C(o)||(n[o]=parseInt(a,10))}return n}let dn={};class ze extends nn{static create(e){return dn[e]||(dn[e]=new ze(e)),dn[e]}static resetCache(){dn={},vn={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ze.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return Po(e,r,n,this.name)}formatOffset(e,r){return Tr(this.offset(e),r)}offset(e){const r=new Date(e);if(isNaN(r))return NaN;const n=Mu(this.name);let[s,i,a,o,c,u,l]=n.formatToParts?Wu(n,r):Ju(n,r);o==="BC"&&(s=-Math.abs(s)+1);const S=ws({year:s,month:i,day:a,hour:c===24?0:c,minute:u,second:l,millisecond:0});let p=+r;const x=p%1e3;return p-=x>=0?x:1e3+x,(S-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ca={};function $u(t,e={}){const r=JSON.stringify([t,e]);let n=ca[r];return n||(n=new Intl.ListFormat(t,e),ca[r]=n),n}let ti={};function ri(t,e={}){const r=JSON.stringify([t,e]);let n=ti[r];return n||(n=new Intl.DateTimeFormat(t,e),ti[r]=n),n}let ni={};function Zu(t,e={}){const r=JSON.stringify([t,e]);let n=ni[r];return n||(n=new Intl.NumberFormat(t,e),ni[r]=n),n}let si={};function Uu(t,e={}){const{base:r,...n}=e,s=JSON.stringify([t,n]);let i=si[s];return i||(i=new Intl.RelativeTimeFormat(t,e),si[s]=i),i}let wr=null;function Vu(){return wr||(wr=new Intl.DateTimeFormat().resolvedOptions().locale,wr)}let ua={};function Lu(t){let e=ua[t];if(!e){const r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,ua[t]=e}return e}function Fu(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const r=t.indexOf("-u-");if(r===-1)return[t];{let n,s;try{n=ri(t).resolvedOptions(),s=t}catch{const c=t.substring(0,r);n=ri(c).resolvedOptions(),s=c}const{numberingSystem:i,calendar:a}=n;return[s,i,a]}}function ju(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function qu(t){const e=[];for(let r=1;r<=12;r++){const n=R.utc(2009,r,1);e.push(t(n))}return e}function Hu(t){const e=[];for(let r=1;r<=7;r++){const n=R.utc(2016,11,13+r);e.push(t(n))}return e}function hn(t,e,r,n){const s=t.listingMode();return s==="error"?null:s==="en"?r(e):n(e)}function Ku(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Bu{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i,...a}=n;if(!r||Object.keys(a).length>0){const o={useGrouping:!1,...n};n.padTo>0&&(o.minimumIntegerDigits=n.padTo),this.inf=Zu(e,o)}}format(e){if(this.inf){const r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{const r=this.floor?Math.floor(e):Wi(e,3);return te(r,this.padTo)}}}class zu{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&ze.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=ri(r,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Gu{constructor(e,r,n){this.opts={style:"long",...n},!r&&Do()&&(this.rtf=Uu(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):_l(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}}const Yu={firstDay:1,minimalDays:4,weekend:[6,7]};class q{static fromOpts(e){return q.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,s,i=!1){const a=e||X.defaultLocale,o=a||(i?"en-US":Vu()),c=r||X.defaultNumberingSystem,u=n||X.defaultOutputCalendar,l=ii(s)||X.defaultWeekSettings;return new q(o,c,u,l,a)}static resetCache(){wr=null,ti={},ni={},si={}}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:s}={}){return q.create(e,r,n,s)}constructor(e,r,n,s,i){const[a,o,c]=Fu(e);this.locale=a,this.numberingSystem=r||o||null,this.outputCalendar=n||c||null,this.weekSettings=s,this.intl=ju(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ku(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:q.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,ii(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return hn(this,e,$o,()=>{const n=r?{month:e,day:"numeric"}:{month:e},s=r?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=qu(i=>this.extract(i,n,"month"))),this.monthsCache[s][e]})}weekdays(e,r=!1){return hn(this,e,Vo,()=>{const n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=r?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Hu(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return hn(this,void 0,()=>Lo,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[R.utc(2016,11,13,9),R.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return hn(this,e,Fo,()=>{const r={era:e};return this.eraCache[e]||(this.eraCache[e]=[R.utc(-40,1,1),R.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){const s=this.dtFormatter(e,r),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new Bu(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new zu(e,this.intl,r)}relFormatter(e={}){return new Gu(this.intl,this.isEnglish(),e)}listFormatter(e={}){return $u(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Mo()?Lu(this.locale):Yu}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Us=null;class de extends nn{static get utcInstance(){return Us===null&&(Us=new de(0)),Us}static instance(e){return e===0?de.utcInstance:new de(e)}static parseSpecifier(e){if(e){const r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new de(bs(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Tr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Tr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Tr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Xu extends nn{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ot(t,e){if(C(t)||t===null)return e;if(t instanceof nn)return t;if(sl(t)){const r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?vs.instance:r==="utc"||r==="gmt"?de.utcInstance:de.parseSpecifier(r)||ze.create(t)}else return lt(t)?de.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Xu(t)}const Di={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},la={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Qu=Di.hanidec.replace(/[\[|\]]/g,"").split("");function el(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);if(t[r].search(Di.hanidec)!==-1)e+=Qu.indexOf(t[r]);else for(const s in la){const[i,a]=la[s];n>=i&&n<=a&&(e+=n-i)}}return parseInt(e,10)}else return e}let Lt={};function tl(){Lt={}}function xe({numberingSystem:t},e=""){const r=t||"latn";return Lt[r]||(Lt[r]={}),Lt[r][e]||(Lt[r][e]=new RegExp(`${Di[r]}${e}`)),Lt[r][e]}let da=()=>Date.now(),ha="system",fa=null,pa=null,ma=null,ya=60,ga,va=null;class X{static get now(){return da}static set now(e){da=e}static set defaultZone(e){ha=e}static get defaultZone(){return ot(ha,vs.instance)}static get defaultLocale(){return fa}static set defaultLocale(e){fa=e}static get defaultNumberingSystem(){return pa}static set defaultNumberingSystem(e){pa=e}static get defaultOutputCalendar(){return ma}static set defaultOutputCalendar(e){ma=e}static get defaultWeekSettings(){return va}static set defaultWeekSettings(e){va=ii(e)}static get twoDigitCutoffYear(){return ya}static set twoDigitCutoffYear(e){ya=e%100}static get throwOnInvalid(){return ga}static set throwOnInvalid(e){ga=e}static resetCaches(){q.resetCache(),ze.resetCache(),R.resetCache(),tl()}}class Te{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const To=[0,31,59,90,120,151,181,212,243,273,304,334],Ao=[0,31,60,91,121,152,182,213,244,274,305,335];function we(t,e){return new Te("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Mi(t,e,r){const n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function Io(t,e,r){return r+(sn(t)?Ao:To)[e-1]}function No(t,e){const r=sn(t)?Ao:To,n=r.findIndex(i=>i<e),s=e-r[n];return{month:n+1,day:s}}function Pi(t,e){return(t-e+7)%7+1}function On(t,e=4,r=1){const{year:n,month:s,day:i}=t,a=Io(n,s,i),o=Pi(Mi(n,s,i),r);let c=Math.floor((a-o+14-e)/7),u;return c<1?(u=n-1,c=Dr(u,e,r)):c>Dr(n,e,r)?(u=n+1,c=1):u=n,{weekYear:u,weekNumber:c,weekday:o,...Ss(t)}}function _a(t,e=4,r=1){const{weekYear:n,weekNumber:s,weekday:i}=t,a=Pi(Mi(n,1,e),r),o=Gt(n);let c=s*7+i-a-7+e,u;c<1?(u=n-1,c+=Gt(u)):c>o?(u=n+1,c-=Gt(n)):u=n;const{month:l,day:m}=No(u,c);return{year:u,month:l,day:m,...Ss(t)}}function Vs(t){const{year:e,month:r,day:n}=t,s=Io(e,r,n);return{year:e,ordinal:s,...Ss(t)}}function wa(t){const{year:e,ordinal:r}=t,{month:n,day:s}=No(e,r);return{year:e,month:n,day:s,...Ss(t)}}function ba(t,e){if(!C(t.localWeekday)||!C(t.localWeekNumber)||!C(t.localWeekYear)){if(!C(t.weekday)||!C(t.weekNumber)||!C(t.weekYear))throw new Bt("Cannot mix locale-based week fields with ISO-based week fields");return C(t.localWeekday)||(t.weekday=t.localWeekday),C(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),C(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function rl(t,e=4,r=1){const n=_s(t.weekYear),s=be(t.weekNumber,1,Dr(t.weekYear,e,r)),i=be(t.weekday,1,7);return n?s?i?!1:we("weekday",t.weekday):we("week",t.weekNumber):we("weekYear",t.weekYear)}function nl(t){const e=_s(t.year),r=be(t.ordinal,1,Gt(t.year));return e?r?!1:we("ordinal",t.ordinal):we("year",t.year)}function Co(t){const e=_s(t.year),r=be(t.month,1,12),n=be(t.day,1,Tn(t.year,t.month));return e?r?n?!1:we("day",t.day):we("month",t.month):we("year",t.year)}function Ro(t){const{hour:e,minute:r,second:n,millisecond:s}=t,i=be(e,0,23)||e===24&&r===0&&n===0&&s===0,a=be(r,0,59),o=be(n,0,59),c=be(s,0,999);return i?a?o?c?!1:we("millisecond",s):we("second",n):we("minute",r):we("hour",e)}function C(t){return typeof t>"u"}function lt(t){return typeof t=="number"}function _s(t){return typeof t=="number"&&t%1===0}function sl(t){return typeof t=="string"}function il(t){return Object.prototype.toString.call(t)==="[object Date]"}function Do(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Mo(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function al(t){return Array.isArray(t)?t:[t]}function Sa(t,e,r){if(t.length!==0)return t.reduce((n,s)=>{const i=[e(s),s];return n&&r(n[0],i[0])===n[0]?n:i},null)[1]}function ol(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function tr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ii(t){if(t==null)return null;if(typeof t!="object")throw new oe("Week settings must be an object");if(!be(t.firstDay,1,7)||!be(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!be(e,1,7)))throw new oe("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function be(t,e,r){return _s(t)&&t>=e&&t<=r}function cl(t,e){return t-e*Math.floor(t/e)}function te(t,e=2){const r=t<0;let n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function it(t){if(!(C(t)||t===null||t===""))return parseInt(t,10)}function gt(t){if(!(C(t)||t===null||t===""))return parseFloat(t)}function Ji(t){if(!(C(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Wi(t,e,r=!1){const n=10**e;return(r?Math.trunc:Math.round)(t*n)/n}function sn(t){return t%4===0&&(t%100!==0||t%400===0)}function Gt(t){return sn(t)?366:365}function Tn(t,e){const r=cl(e-1,12)+1,n=t+(e-r)/12;return r===2?sn(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function ws(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function ka(t,e,r){return-Pi(Mi(t,1,e),r)+e-1}function Dr(t,e=4,r=1){const n=ka(t,e,r),s=ka(t+1,e,r);return(Gt(t)-n+s)/7}function ai(t){return t>99?t:t>X.twoDigitCutoffYear?1900+t:2e3+t}function Po(t,e,r,n=null){const s=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(r,a).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return o?o.value:null}function bs(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);const n=parseInt(e,10)||0,s=r<0||Object.is(r,-0)?-n:n;return r*60+s}function Jo(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new oe(`Invalid unit value ${t}`);return e}function An(t,e){const r={};for(const n in t)if(tr(t,n)){const s=t[n];if(s==null)continue;r[e(n)]=Jo(s)}return r}function Tr(t,e){const r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${te(r,2)}:${te(n,2)}`;case"narrow":return`${s}${r}${n>0?`:${n}`:""}`;case"techie":return`${s}${te(r,2)}${te(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ss(t){return ol(t,["hour","minute","second","millisecond"])}const ul=["January","February","March","April","May","June","July","August","September","October","November","December"],Wo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ll=["J","F","M","A","M","J","J","A","S","O","N","D"];function $o(t){switch(t){case"narrow":return[...ll];case"short":return[...Wo];case"long":return[...ul];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Zo=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Uo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dl=["M","T","W","T","F","S","S"];function Vo(t){switch(t){case"narrow":return[...dl];case"short":return[...Uo];case"long":return[...Zo];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Lo=["AM","PM"],hl=["Before Christ","Anno Domini"],fl=["BC","AD"],pl=["B","A"];function Fo(t){switch(t){case"narrow":return[...pl];case"short":return[...fl];case"long":return[...hl];default:return null}}function ml(t){return Lo[t.hour<12?0:1]}function yl(t,e){return Vo(e)[t.weekday-1]}function gl(t,e){return $o(e)[t.month-1]}function vl(t,e){return Fo(e)[t.year<0?0:1]}function _l(t,e,r="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&i){const m=t==="days";switch(e){case 1:return m?"tomorrow":`next ${s[t][0]}`;case-1:return m?"yesterday":`last ${s[t][0]}`;case 0:return m?"today":`this ${s[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),c=o===1,u=s[t],l=n?c?u[1]:u[2]||u[1]:c?s[t][0]:t;return a?`${o} ${l} ago`:`in ${o} ${l}`}function Ea(t,e){let r="";for(const n of t)n.literal?r+=n.val:r+=e(n.val);return r}const wl={D:xn,DD:oo,DDD:co,DDDD:uo,t:lo,tt:ho,ttt:fo,tttt:po,T:mo,TT:yo,TTT:go,TTTT:vo,f:_o,ff:bo,fff:ko,ffff:xo,F:wo,FF:So,FFF:Eo,FFFF:Oo};class ce{static create(e,r={}){return new ce(e,r)}static parseFormat(e){let r=null,n="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?(n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),r=null,n="",s=!s):s||o===r?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,r=o)}return n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return wl[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0){if(this.opts.forceSimple)return te(e,r);const n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,r){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,x)=>this.loc.extract(e,p,x),a=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",o=()=>n?ml(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,x)=>n?gl(e,p):i(x?{month:p}:{month:p,day:"numeric"},"month"),u=(p,x)=>n?yl(e,p):i(x?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),l=p=>{const x=ce.macroTokenToFormatOpts(p);return x?this.formatWithSystemDefault(e,x):p},m=p=>n?vl(e,p):i({era:p},"era"),S=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(p)}};return Ea(ce.parseFormat(r),S)}formatDurationFromString(e,r){const n=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>u=>{const l=n(u);return l?this.num(c.get(l),u.length):u},i=ce.parseFormat(r),a=i.reduce((c,{literal:u,val:l})=>u?c:c.concat(l),[]),o=e.shiftTo(...a.map(n).filter(c=>c));return Ea(i,s(o))}}const jo=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function hr(...t){const e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function fr(...t){return e=>t.reduce(([r,n,s],i)=>{const[a,o,c]=i(e,s);return[{...r,...a},o||n,c]},[{},null,1]).slice(0,2)}function pr(t,...e){if(t==null)return[null,null];for(const[r,n]of e){const s=r.exec(t);if(s)return n(s)}return[null,null]}function qo(...t){return(e,r)=>{const n={};let s;for(s=0;s<t.length;s++)n[t[s]]=it(e[r+s]);return[n,null,r+s]}}const Ho=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,bl=`(?:${Ho.source}?(?:\\[(${jo.source})\\])?)?`,$i=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ko=RegExp(`${$i.source}${bl}`),Zi=RegExp(`(?:T${Ko.source})?`),Sl=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,kl=/(\d{4})-?W(\d\d)(?:-?(\d))?/,El=/(\d{4})-?(\d{3})/,xl=qo("weekYear","weekNumber","weekDay"),Ol=qo("year","ordinal"),Tl=/(\d{4})-(\d\d)-(\d\d)/,Bo=RegExp(`${$i.source} ?(?:${Ho.source}|(${jo.source}))?`),Al=RegExp(`(?: ${Bo.source})?`);function Yt(t,e,r){const n=t[e];return C(n)?r:it(n)}function Il(t,e){return[{year:Yt(t,e),month:Yt(t,e+1,1),day:Yt(t,e+2,1)},null,e+3]}function mr(t,e){return[{hours:Yt(t,e,0),minutes:Yt(t,e+1,0),seconds:Yt(t,e+2,0),milliseconds:Ji(t[e+3])},null,e+4]}function an(t,e){const r=!t[e]&&!t[e+1],n=bs(t[e+1],t[e+2]),s=r?null:de.instance(n);return[{},s,e+3]}function on(t,e){const r=t[e]?ze.create(t[e]):null;return[{},r,e+1]}const Nl=RegExp(`^T?${$i.source}$`),Cl=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Rl(t){const[e,r,n,s,i,a,o,c,u]=t,l=e[0]==="-",m=c&&c[0]==="-",S=(p,x=!1)=>p!==void 0&&(x||p&&l)?-p:p;return[{years:S(gt(r)),months:S(gt(n)),weeks:S(gt(s)),days:S(gt(i)),hours:S(gt(a)),minutes:S(gt(o)),seconds:S(gt(c),c==="-0"),milliseconds:S(Ji(u),m)}]}const Dl={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ui(t,e,r,n,s,i,a){const o={year:e.length===2?ai(it(e)):it(e),month:Wo.indexOf(r)+1,day:it(n),hour:it(s),minute:it(i)};return a&&(o.second=it(a)),t&&(o.weekday=t.length>3?Zo.indexOf(t)+1:Uo.indexOf(t)+1),o}const Ml=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Pl(t){const[,e,r,n,s,i,a,o,c,u,l,m]=t,S=Ui(e,s,n,r,i,a,o);let p;return c?p=Dl[c]:u?p=0:p=bs(l,m),[S,new de(p)]}function Jl(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Wl=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$l=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Zl=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function xa(t){const[,e,r,n,s,i,a,o]=t;return[Ui(e,s,n,r,i,a,o),de.utcInstance]}function Ul(t){const[,e,r,n,s,i,a,o]=t;return[Ui(e,o,r,n,s,i,a),de.utcInstance]}const Vl=hr(Sl,Zi),Ll=hr(kl,Zi),Fl=hr(El,Zi),jl=hr(Ko),zo=fr(Il,mr,an,on),ql=fr(xl,mr,an,on),Hl=fr(Ol,mr,an,on),Kl=fr(mr,an,on);function Bl(t){return pr(t,[Vl,zo],[Ll,ql],[Fl,Hl],[jl,Kl])}function zl(t){return pr(Jl(t),[Ml,Pl])}function Gl(t){return pr(t,[Wl,xa],[$l,xa],[Zl,Ul])}function Yl(t){return pr(t,[Cl,Rl])}const Xl=fr(mr);function Ql(t){return pr(t,[Nl,Xl])}const ed=hr(Tl,Al),td=hr(Bo),rd=fr(mr,an,on);function nd(t){return pr(t,[ed,zo],[td,rd])}const Oa="Invalid Duration",Go={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},sd={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Go},_e=146097/400,Wt=146097/4800,id={years:{quarters:4,months:12,weeks:_e/7,days:_e,hours:_e*24,minutes:_e*24*60,seconds:_e*24*60*60,milliseconds:_e*24*60*60*1e3},quarters:{months:3,weeks:_e/28,days:_e/4,hours:_e*24/4,minutes:_e*24*60/4,seconds:_e*24*60*60/4,milliseconds:_e*24*60*60*1e3/4},months:{weeks:Wt/7,days:Wt,hours:Wt*24,minutes:Wt*24*60,seconds:Wt*24*60*60,milliseconds:Wt*24*60*60*1e3},...Go},wt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ad=wt.slice(0).reverse();function tt(t,e,r=!1){const n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Z(n)}function Yo(t,e){let r=e.milliseconds??0;for(const n of ad.slice(1))e[n]&&(r+=e[n]*t[n].milliseconds);return r}function Ta(t,e){const r=Yo(t,e)<0?-1:1;wt.reduceRight((n,s)=>{if(C(e[s]))return n;if(n){const i=e[n]*r,a=t[s][n],o=Math.floor(i/a);e[s]+=o*r,e[n]-=o*a*r}return s},null),wt.reduce((n,s)=>{if(C(e[s]))return n;if(n){const i=e[n]%1;e[n]-=i,e[s]+=i*t[n][s]}return s},null)}function od(t){const e={};for(const[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}class Z{constructor(e){const r=e.conversionAccuracy==="longterm"||!1;let n=r?id:sd;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||q.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return Z.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new oe(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Z({values:An(e,Z.normalizeUnit),loc:q.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(lt(e))return Z.fromMillis(e);if(Z.isDuration(e))return e;if(typeof e=="object")return Z.fromObject(e);throw new oe(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){const[n]=Yl(e);return n?Z.fromObject(n,r):Z.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){const[n]=Ql(e);return n?Z.fromObject(n,r):Z.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new oe("need to specify a reason the Duration is invalid");const n=e instanceof Te?e:new Te(e,r);if(X.throwOnInvalid)throw new Cu(n);return new Z({invalid:n})}static normalizeUnit(e){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new ao(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){const n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?ce.create(this.loc,n).formatDurationFromString(this,e):Oa}toHuman(e={}){if(!this.isValid)return Oa;const r=wt.map(n=>{const s=this.values[n];return C(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(s)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Wi(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},R.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Yo(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const r=Z.fromDurationLike(e),n={};for(const s of wt)(tr(r.values,s)||tr(this.values,s))&&(n[s]=r.get(s)+this.get(s));return tt(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const r=Z.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;const r={};for(const n of Object.keys(this.values))r[n]=Jo(e(this.values[n],n));return tt(this,{values:r},!0)}get(e){return this[Z.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const r={...this.values,...An(e,Z.normalizeUnit)};return tt(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:s,conversionAccuracy:n};return tt(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ta(this.matrix,e),tt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=od(this.normalize().shiftToAll().toObject());return tt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>Z.normalizeUnit(a));const r={},n={},s=this.toObject();let i;for(const a of wt)if(e.indexOf(a)>=0){i=a;let o=0;for(const u in n)o+=this.matrix[u][a]*n[u],n[u]=0;lt(s[a])&&(o+=s[a]);const c=Math.trunc(o);r[a]=c,n[a]=(o*1e3-c*1e3)/1e3}else lt(s[a])&&(n[a]=s[a]);for(const a in n)n[a]!==0&&(r[i]+=a===i?n[a]:n[a]/this.matrix[i][a]);return Ta(this.matrix,r),tt(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return tt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of wt)if(!r(this.values[n],e.values[n]))return!1;return!0}}const $t="Invalid Interval";function cd(t,e){return!t||!t.isValid?Y.invalid("missing or invalid start"):!e||!e.isValid?Y.invalid("missing or invalid end"):e<t?Y.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class Y{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new oe("need to specify a reason the Interval is invalid");const n=e instanceof Te?e:new Te(e,r);if(X.throwOnInvalid)throw new Nu(n);return new Y({invalid:n})}static fromDateTimes(e,r){const n=vr(e),s=vr(r),i=cd(n,s);return i??new Y({start:n,end:s})}static after(e,r){const n=Z.fromDurationLike(r),s=vr(e);return Y.fromDateTimes(s,s.plus(n))}static before(e,r){const n=Z.fromDurationLike(r),s=vr(e);return Y.fromDateTimes(s.minus(n),s)}static fromISO(e,r){const[n,s]=(e||"").split("/",2);if(n&&s){let i,a;try{i=R.fromISO(n,r),a=i.isValid}catch{a=!1}let o,c;try{o=R.fromISO(s,r),c=o.isValid}catch{c=!1}if(a&&c)return Y.fromDateTimes(i,o);if(a){const u=Z.fromISO(s,r);if(u.isValid)return Y.after(i,u)}else if(c){const u=Z.fromISO(n,r);if(u.isValid)return Y.before(o,u)}}return Y.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;const n=this.start.startOf(e,r);let s;return r!=null&&r.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(e,r),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?Y.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];const r=e.map(vr).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),n=[];let{s}=this,i=0;for(;s<this.e;){const a=r[i]||this.e,o=+a>+this.e?this.e:a;n.push(Y.fromDateTimes(s,o)),s=o,i+=1}return n}splitBy(e){const r=Z.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,s=1,i;const a=[];for(;n<this.e;){const o=this.start.plus(r.mapUnits(c=>c*s));i=+o>+this.e?this.e:o,a.push(Y.fromDateTimes(n,i)),n=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:Y.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;const r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Y.fromDateTimes(r,n)}static merge(e){const[r,n]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0;const s=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((c,u)=>c.time-u.time);for(const c of o)n+=c.type==="s"?1:-1,n===1?r=c.time:(r&&+r!=+c.time&&s.push(Y.fromDateTimes(r,c.time)),r=null);return Y.merge(s)}difference(...e){return Y.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:$t}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=xn,r={}){return this.isValid?ce.create(this.s.loc.clone(r),e).formatInterval(this):$t}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:$t}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:$t}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:$t}toFormat(e,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:$t}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):Z.invalid(this.invalidReason)}mapEndpoints(e){return Y.fromDateTimes(e(this.s),e(this.e))}}class fn{static hasDST(e=X.defaultZone){const r=R.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return ze.isValidZone(e)}static normalizeZone(e){return ot(e,X.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||q.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||q.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||q.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||q.create(r,n,i)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||q.create(r,n,i)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null}={}){return(s||q.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:s=null}={}){return(s||q.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return q.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return q.create(r,null,"gregory").eras(e)}static features(){return{relative:Do(),localeWeek:Mo()}}}function Aa(t,e){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(Z.fromMillis(n).as("days"))}function ud(t,e,r){const n=[["years",(c,u)=>u.year-c.year],["quarters",(c,u)=>u.quarter-c.quarter+(u.year-c.year)*4],["months",(c,u)=>u.month-c.month+(u.year-c.year)*12],["weeks",(c,u)=>{const l=Aa(c,u);return(l-l%7)/7}],["days",Aa]],s={},i=t;let a,o;for(const[c,u]of n)r.indexOf(c)>=0&&(a=c,s[c]=u(t,e),o=i.plus(s),o>e?(s[c]--,t=i.plus(s),t>e&&(o=t,s[c]--,t=i.plus(s))):t=o);return[t,s,o,a]}function ld(t,e,r,n){let[s,i,a,o]=ud(t,e,r);const c=e-s,u=r.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);u.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+c/(a-s)));const l=Z.fromObject(i,n);return u.length>0?Z.fromMillis(c,n).shiftTo(...u).plus(l):l}const dd="missing Intl.DateTimeFormat.formatToParts support";function j(t,e=r=>r){return{regex:t,deser:([r])=>e(el(r))}}const hd=" ",Xo=`[ ${hd}]`,Qo=new RegExp(Xo,"g");function fd(t){return t.replace(/\./g,"\\.?").replace(Qo,Xo)}function Ia(t){return t.replace(/\./g,"").replace(Qo," ").toLowerCase()}function Oe(t,e){return t===null?null:{regex:RegExp(t.map(fd).join("|")),deser:([r])=>t.findIndex(n=>Ia(r)===Ia(n))+e}}function Na(t,e){return{regex:t,deser:([,r,n])=>bs(r,n),groups:e}}function pn(t){return{regex:t,deser:([e])=>e}}function pd(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function md(t,e){const r=xe(e),n=xe(e,"{2}"),s=xe(e,"{3}"),i=xe(e,"{4}"),a=xe(e,"{6}"),o=xe(e,"{1,2}"),c=xe(e,"{1,3}"),u=xe(e,"{1,6}"),l=xe(e,"{1,9}"),m=xe(e,"{2,4}"),S=xe(e,"{4,6}"),p=K=>({regex:RegExp(pd(K.val)),deser:([re])=>re,literal:!0}),W=(K=>{if(t.literal)return p(K);switch(K.val){case"G":return Oe(e.eras("short"),0);case"GG":return Oe(e.eras("long"),0);case"y":return j(u);case"yy":return j(m,ai);case"yyyy":return j(i);case"yyyyy":return j(S);case"yyyyyy":return j(a);case"M":return j(o);case"MM":return j(n);case"MMM":return Oe(e.months("short",!0),1);case"MMMM":return Oe(e.months("long",!0),1);case"L":return j(o);case"LL":return j(n);case"LLL":return Oe(e.months("short",!1),1);case"LLLL":return Oe(e.months("long",!1),1);case"d":return j(o);case"dd":return j(n);case"o":return j(c);case"ooo":return j(s);case"HH":return j(n);case"H":return j(o);case"hh":return j(n);case"h":return j(o);case"mm":return j(n);case"m":return j(o);case"q":return j(o);case"qq":return j(n);case"s":return j(o);case"ss":return j(n);case"S":return j(c);case"SSS":return j(s);case"u":return pn(l);case"uu":return pn(o);case"uuu":return j(r);case"a":return Oe(e.meridiems(),0);case"kkkk":return j(i);case"kk":return j(m,ai);case"W":return j(o);case"WW":return j(n);case"E":case"c":return j(r);case"EEE":return Oe(e.weekdays("short",!1),1);case"EEEE":return Oe(e.weekdays("long",!1),1);case"ccc":return Oe(e.weekdays("short",!0),1);case"cccc":return Oe(e.weekdays("long",!0),1);case"Z":case"ZZ":return Na(new RegExp(`([+-]${o.source})(?::(${n.source}))?`),2);case"ZZZ":return Na(new RegExp(`([+-]${o.source})(${n.source})?`),2);case"z":return pn(/[a-z_+-/]{1,256}?/i);case" ":return pn(/[^\S\n\r]/);default:return p(K)}})(t)||{invalidReason:dd};return W.token=t,W}const yd={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};f