@stacksjs/scheduler 0.64.6 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cron.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { CronCallback, CronCommand, CronContext, CronJobParams, CronOnCompleteCallback, CronOnCompleteCommand, Ranges, TimeUnit } from "cron";
2
+ export { CronJob, CronTime } from "cron";
@@ -0,0 +1,3 @@
1
+ export * from "./cron";
2
+ export * from "./schedule";
3
+ export * from "./types";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{log as M$}from"@stacksjs/cli";import{spawn as I4}from"child_process";class z extends Error{}class a extends z{constructor(_,$){super(`You can't specify both ${_} and ${$}`)}}class u extends Error{}class C$ extends u{constructor(_){super(`Invalid DateTime: ${_.toMessage()}`)}}class F$ extends u{constructor(_){super(`Invalid Interval: ${_.toMessage()}`)}}class Z$ extends u{constructor(_){super(`Invalid Duration: ${_.toMessage()}`)}}class p extends u{}class U_ extends u{constructor(_){super(`Invalid unit ${_}`)}}class U extends u{}class c extends u{constructor(){super("Zone is an abstract class")}}var o={year:"numeric",month:"numeric",day:"numeric"},b_={year:"numeric",month:"short",day:"numeric"},HK={year:"numeric",month:"short",day:"numeric",weekday:"short"},k_={year:"numeric",month:"long",day:"numeric"},h_={year:"numeric",month:"long",day:"numeric",weekday:"long"},g_={hour:"numeric",minute:"numeric"},f_={hour:"numeric",minute:"numeric",second:"numeric"},p_={hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},c_={hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"long"},m_={hour:"numeric",minute:"numeric",hourCycle:"h23"},u_={hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"},l_={hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23",timeZoneName:"short"},d_={hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23",timeZoneName:"long"},s_={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"},i_={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},r_={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"},n_={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},EK={year:"numeric",month:"short",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric"},a_={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"},o_={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},t_={year:"numeric",month:"long",day:"numeric",weekday:"long",hour:"numeric",minute:"numeric",timeZoneName:"long"},e_={year:"numeric",month:"long",day:"numeric",weekday:"long",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"long"};class S{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(_,$){throw new c}formatOffset(_,$){throw new c}offset(_){throw new c}equals(_){throw new c}get isValid(){throw new c}}var L$=null;class t extends S{static get instance(){if(L$===null)L$=new t;return L$}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(_,{format:$,locale:K}){return _$(_,$,K)}formatOffset(_,$){return l(this.offset(_),$)}offset(_){return-new Date(_).getTimezoneOffset()}equals(_){return _.type==="system"}get isValid(){return!0}}function y4(_){if(!K$[_])K$[_]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:_,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"});return K$[_]}function k4(_,$){const K=_.format($).replace(/\u200E/g,""),Q=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(K),[,q,X,B,G,J,V,E]=Q;return[B,q,X,G,J,V,E]}function h4(_,$){const K=_.formatToParts($),Q=[];for(let q=0;q<K.length;q++){const{type:X,value:B}=K[q],G=b4[X];if(X==="era")Q[G]=B;else if(!Y(G))Q[G]=parseInt(B,10)}return Q}var K$={},b4={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},$$={};class D extends S{static create(_){if(!$$[_])$$[_]=new D(_);return $$[_]}static resetCache(){$$={},K$={}}static isValidSpecifier(_){return this.isValidZone(_)}static isValidZone(_){if(!_)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:_}).format(),!0}catch($){return!1}}constructor(_){super();this.zoneName=_,this.valid=D.isValidZone(_)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(_,{format:$,locale:K}){return _$(_,$,K,this.name)}formatOffset(_,$){return l(this.offset(_),$)}offset(_){const $=new Date(_);if(isNaN($))return NaN;const K=y4(this.name);let[Q,q,X,B,G,J,V]=K.formatToParts?h4(K,$):k4(K,$);if(B==="BC")Q=-Math.abs(Q)+1;const C=B_({year:Q,month:q,day:X,hour:G===24?0:G,minute:J,second:V,millisecond:0});let P=+$;const A=P%1000;return P-=A>=0?A:1000+A,(C-P)/60000}equals(_){return _.type==="iana"&&_.name===this.name}get isValid(){return this.valid}}function g4(_,$={}){const K=JSON.stringify([_,$]);let Q=YK[K];if(!Q)Q=new Intl.ListFormat(_,$),YK[K]=Q;return Q}function x$(_,$={}){const K=JSON.stringify([_,$]);let Q=z$[K];if(!Q)Q=new Intl.DateTimeFormat(_,$),z$[K]=Q;return Q}function f4(_,$={}){const K=JSON.stringify([_,$]);let Q=w$[K];if(!Q)Q=new Intl.NumberFormat(_,$),w$[K]=Q;return Q}function p4(_,$={}){const{base:K,...Q}=$,q=JSON.stringify([_,Q]);let X=I$[q];if(!X)X=new Intl.RelativeTimeFormat(_,$),I$[q]=X;return X}function c4(){if(L_)return L_;else return L_=new Intl.DateTimeFormat().resolvedOptions().locale,L_}function m4(_){let $=PK[_];if(!$){const K=new Intl.Locale(_);$="getWeekInfo"in K?K.getWeekInfo():K.weekInfo,PK[_]=$}return $}function u4(_){const $=_.indexOf("-x-");if($!==-1)_=_.substring(0,$);const K=_.indexOf("-u-");if(K===-1)return[_];else{let Q,q;try{Q=x$(_).resolvedOptions(),q=_}catch(G){const J=_.substring(0,K);Q=x$(J).resolvedOptions(),q=J}const{numberingSystem:X,calendar:B}=Q;return[q,X,B]}}function l4(_,$,K){if(K||$){if(!_.includes("-u-"))_+="-u";if(K)_+=`-ca-${K}`;if($)_+=`-nu-${$}`;return _}else return _}function d4(_){const $=[];for(let K=1;K<=12;K++){const Q=H.utc(2009,K,1);$.push(_(Q))}return $}function s4(_){const $=[];for(let K=1;K<=7;K++){const Q=H.utc(2016,11,13+K);$.push(_(Q))}return $}function Q$(_,$,K,Q){const q=_.listingMode();if(q==="error")return null;else if(q==="en")return K($);else return Q($)}function i4(_){if(_.numberingSystem&&_.numberingSystem!=="latn")return!1;else return _.numberingSystem==="latn"||!_.locale||_.locale.startsWith("en")||new Intl.DateTimeFormat(_.intl).resolvedOptions().numberingSystem==="latn"}var YK={},z$={},w$={},I$={},L_=null,PK={};class RK{constructor(_,$,K){this.padTo=K.padTo||0,this.floor=K.floor||!1;const{padTo:Q,floor:q,...X}=K;if(!$||Object.keys(X).length>0){const B={useGrouping:!1,...K};if(K.padTo>0)B.minimumIntegerDigits=K.padTo;this.inf=f4(_,B)}}format(_){if(this.inf){const $=this.floor?Math.floor(_):_;return this.inf.format($)}else{const $=this.floor?Math.floor(_):G_(_,3);return Z($,this.padTo)}}}class NK{constructor(_,$,K){this.opts=K,this.originalZone=void 0;let Q=void 0;if(this.opts.timeZone)this.dt=_;else if(_.zone.type==="fixed"){const X=-1*(_.offset/60),B=X>=0?`Etc/GMT+${X}`:`Etc/GMT${X}`;if(_.offset!==0&&D.create(B).valid)Q=B,this.dt=_;else Q="UTC",this.dt=_.offset===0?_:_.setZone("UTC").plus({minutes:_.offset}),this.originalZone=_.zone}else if(_.zone.type==="system")this.dt=_;else if(_.zone.type==="iana")this.dt=_,Q=_.zone.name;else Q="UTC",this.dt=_.setZone("UTC").plus({minutes:_.offset}),this.originalZone=_.zone;const q={...this.opts};q.timeZone=q.timeZone||Q,this.dtf=x$($,q)}format(){if(this.originalZone)return this.formatToParts().map(({value:_})=>_).join("");return this.dtf.format(this.dt.toJSDate())}formatToParts(){const _=this.dtf.formatToParts(this.dt.toJSDate());if(this.originalZone)return _.map(($)=>{if($.type==="timeZoneName"){const K=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...$,value:K}}else return $});return _}resolvedOptions(){return this.dtf.resolvedOptions()}}class AK{constructor(_,$,K){if(this.opts={style:"long",...K},!$&&q$())this.rtf=p4(_,K)}format(_,$){if(this.rtf)return this.rtf.format(_,$);else return MK($,_,this.opts.numeric,this.opts.style!=="long")}formatToParts(_,$){if(this.rtf)return this.rtf.formatToParts(_,$);else return[]}}var r4={firstDay:1,minimalDays:4,weekend:[6,7]};class N{static fromOpts(_){return N.create(_.locale,_.numberingSystem,_.outputCalendar,_.weekSettings,_.defaultToEN)}static create(_,$,K,Q,q=!1){const X=_||W.defaultLocale,B=X||(q?"en-US":c4()),G=$||W.defaultNumberingSystem,J=K||W.defaultOutputCalendar,V=z_(Q)||W.defaultWeekSettings;return new N(B,G,J,V,X)}static resetCache(){L_=null,z$={},w$={},I$={}}static fromObject({locale:_,numberingSystem:$,outputCalendar:K,weekSettings:Q}={}){return N.create(_,$,K,Q)}constructor(_,$,K,Q,q){const[X,B,G]=u4(_);this.locale=X,this.numberingSystem=$||B||null,this.outputCalendar=K||G||null,this.weekSettings=Q,this.intl=l4(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=q,this.fastNumbersCached=null}get fastNumbers(){if(this.fastNumbersCached==null)this.fastNumbersCached=i4(this);return this.fastNumbersCached}listingMode(){const _=this.isEnglish(),$=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return _&&$?"en":"intl"}clone(_){if(!_||Object.getOwnPropertyNames(_).length===0)return this;else return N.create(_.locale||this.specifiedLocale,_.numberingSystem||this.numberingSystem,_.outputCalendar||this.outputCalendar,z_(_.weekSettings)||this.weekSettings,_.defaultToEN||!1)}redefaultToEN(_={}){return this.clone({..._,defaultToEN:!0})}redefaultToSystem(_={}){return this.clone({..._,defaultToEN:!1})}months(_,$=!1){return Q$(this,_,D$,()=>{const K=$?{month:_,day:"numeric"}:{month:_},Q=$?"format":"standalone";if(!this.monthsCache[Q][_])this.monthsCache[Q][_]=d4((q)=>this.extract(q,K,"month"));return this.monthsCache[Q][_]})}weekdays(_,$=!1){return Q$(this,_,j$,()=>{const K=$?{weekday:_,year:"numeric",month:"long",day:"numeric"}:{weekday:_},Q=$?"format":"standalone";if(!this.weekdaysCache[Q][_])this.weekdaysCache[Q][_]=s4((q)=>this.extract(q,K,"weekday"));return this.weekdaysCache[Q][_]})}meridiems(){return Q$(this,void 0,()=>O$,()=>{if(!this.meridiemCache){const _={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[H.utc(2016,11,13,9),H.utc(2016,11,13,19)].map(($)=>this.extract($,_,"dayperiod"))}return this.meridiemCache})}eras(_){return Q$(this,_,v$,()=>{const $={era:_};if(!this.eraCache[_])this.eraCache[_]=[H.utc(-40,1,1),H.utc(2017,1,1)].map((K)=>this.extract(K,$,"era"));return this.eraCache[_]})}extract(_,$,K){const Q=this.dtFormatter(_,$),q=Q.formatToParts(),X=q.find((B)=>B.type.toLowerCase()===K);return X?X.value:null}numberFormatter(_={}){return new RK(this.intl,_.forceSimple||this.fastNumbers,_)}dtFormatter(_,$={}){return new NK(_,this.intl,$)}relFormatter(_={}){return new AK(this.intl,this.isEnglish(),_)}listFormatter(_={}){return g4(this.intl,_)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){if(this.weekSettings)return this.weekSettings;else if(!X$())return r4;else return m4(this.locale)}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(_){return this.locale===_.locale&&this.numberingSystem===_.numberingSystem&&this.outputCalendar===_.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}var T$=null;class x extends S{static get utcInstance(){if(T$===null)T$=new x(0);return T$}static instance(_){return _===0?x.utcInstance:new x(_)}static parseSpecifier(_){if(_){const $=_.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if($)return new x(e($[1],$[2]))}return null}constructor(_){super();this.fixed=_}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${l(this.fixed,"narrow")}`}get ianaName(){if(this.fixed===0)return"Etc/UTC";else return`Etc/GMT${l(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(_,$){return l(this.fixed,$)}get isUniversal(){return!0}offset(){return this.fixed}equals(_){return _.type==="fixed"&&_.fixed===this.fixed}get isValid(){return!0}}class B$ extends S{constructor(_){super();this.zoneName=_}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 k(_,$){let K;if(Y(_)||_===null)return $;else if(_ instanceof S)return _;else if(WK(_)){const Q=_.toLowerCase();if(Q==="default")return $;else if(Q==="local"||Q==="system")return t.instance;else if(Q==="utc"||Q==="gmt")return x.utcInstance;else return x.parseSpecifier(Q)||D.create(_)}else if(h(_))return x.instance(_);else if(typeof _==="object"&&"offset"in _&&typeof _.offset==="function")return _;else return new B$(_)}function FK(_){let $=parseInt(_,10);if(isNaN($)){$="";for(let K=0;K<_.length;K++){const Q=_.charCodeAt(K);if(_[K].search(y$.hanidec)!==-1)$+=n4.indexOf(_[K]);else for(let q in CK){const[X,B]=CK[q];if(Q>=X&&Q<=B)$+=Q-X}}return parseInt($,10)}else return $}function ZK(){J_={}}function T({numberingSystem:_},$=""){const K=_||"latn";if(!J_[K])J_[K]={};if(!J_[K][$])J_[K][$]=new RegExp(`${y$[K]}${$}`);return J_[K][$]}var y$={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},CK={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]},n4=y$.hanidec.replace(/[\[|\]]/g,"").split(""),J_={};var UK=()=>Date.now(),LK="system",zK=null,xK=null,wK=null,IK=60,DK,jK=null;class W{static get now(){return UK}static set now(_){UK=_}static set defaultZone(_){LK=_}static get defaultZone(){return k(LK,t.instance)}static get defaultLocale(){return zK}static set defaultLocale(_){zK=_}static get defaultNumberingSystem(){return xK}static set defaultNumberingSystem(_){xK=_}static get defaultOutputCalendar(){return wK}static set defaultOutputCalendar(_){wK=_}static get defaultWeekSettings(){return jK}static set defaultWeekSettings(_){jK=z_(_)}static get twoDigitCutoffYear(){return IK}static set twoDigitCutoffYear(_){IK=_%100}static get throwOnInvalid(){return DK}static set throwOnInvalid(_){DK=_}static resetCaches(){N.resetCache(),D.resetCache(),H.resetCache(),ZK()}}class I{constructor(_,$){this.reason=_,this.explanation=$}toMessage(){if(this.explanation)return`${this.reason}: ${this.explanation}`;else return this.reason}}function y(_,$){return new I("unit out of range",`you specified ${$} (of type ${typeof $}) as a ${_}, which is invalid`)}function G$(_,$,K){const Q=new Date(Date.UTC(_,$-1,K));if(_<100&&_>=0)Q.setUTCFullYear(Q.getUTCFullYear()-1900);const q=Q.getUTCDay();return q===0?7:q}function SK(_,$,K){return K+($_(_)?vK:OK)[$-1]}function TK(_,$){const K=$_(_)?vK:OK,Q=K.findIndex((X)=>X<$),q=$-K[Q];return{month:Q+1,day:q}}function x_(_,$){return(_-$+7)%7+1}function w_(_,$=4,K=1){const{year:Q,month:q,day:X}=_,B=SK(Q,q,X),G=x_(G$(Q,q,X),K);let J=Math.floor((B-G+14-$)/7),V;if(J<1)V=Q-1,J=__(V,$,K);else if(J>__(Q,$,K))V=Q+1,J=1;else V=Q;return{weekYear:V,weekNumber:J,weekday:G,...D_(_)}}function b$(_,$=4,K=1){const{weekYear:Q,weekNumber:q,weekday:X}=_,B=x_(G$(Q,1,$),K),G=d(Q);let J=q*7+X-B-7+$,V;if(J<1)V=Q-1,J+=d(V);else if(J>G)V=Q+1,J-=d(Q);else V=Q;const{month:E,day:C}=TK(V,J);return{year:V,month:E,day:C,...D_(_)}}function J$(_){const{year:$,month:K,day:Q}=_,q=SK($,K,Q);return{year:$,ordinal:q,...D_(_)}}function k$(_){const{year:$,ordinal:K}=_,{month:Q,day:q}=TK($,K);return{year:$,month:Q,day:q,...D_(_)}}function h$(_,$){if(!Y(_.localWeekday)||!Y(_.localWeekNumber)||!Y(_.localWeekYear)){if(!Y(_.weekday)||!Y(_.weekNumber)||!Y(_.weekYear))throw new p("Cannot mix locale-based week fields with ISO-based week fields");if(!Y(_.localWeekday))_.weekday=_.localWeekday;if(!Y(_.localWeekNumber))_.weekNumber=_.localWeekNumber;if(!Y(_.localWeekYear))_.weekYear=_.localWeekYear;return delete _.localWeekday,delete _.localWeekNumber,delete _.localWeekYear,{minDaysInFirstWeek:$.getMinDaysInFirstWeek(),startOfWeek:$.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function yK(_,$=4,K=1){const Q=I_(_.weekYear),q=O(_.weekNumber,1,__(_.weekYear,$,K)),X=O(_.weekday,1,7);if(!Q)return y("weekYear",_.weekYear);else if(!q)return y("week",_.weekNumber);else if(!X)return y("weekday",_.weekday);else return!1}function bK(_){const $=I_(_.year),K=O(_.ordinal,1,d(_.year));if(!$)return y("year",_.year);else if(!K)return y("ordinal",_.ordinal);else return!1}function g$(_){const $=I_(_.year),K=O(_.month,1,12),Q=O(_.day,1,V_(_.year,_.month));if(!$)return y("year",_.year);else if(!K)return y("month",_.month);else if(!Q)return y("day",_.day);else return!1}function f$(_){const{hour:$,minute:K,second:Q,millisecond:q}=_,X=O($,0,23)||$===24&&K===0&&Q===0&&q===0,B=O(K,0,59),G=O(Q,0,59),J=O(q,0,999);if(!X)return y("hour",$);else if(!B)return y("minute",K);else if(!G)return y("second",Q);else if(!J)return y("millisecond",q);else return!1}var OK=[0,31,59,90,120,151,181,212,243,273,304,334],vK=[0,31,60,91,121,152,182,213,244,274,305,335];function Y(_){return typeof _==="undefined"}function h(_){return typeof _==="number"}function I_(_){return typeof _==="number"&&_%1===0}function WK(_){return typeof _==="string"}function hK(_){return Object.prototype.toString.call(_)==="[object Date]"}function q$(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat}catch(_){return!1}}function X$(){try{return typeof Intl!=="undefined"&&!!Intl.Locale&&(("weekInfo"in Intl.Locale.prototype)||("getWeekInfo"in Intl.Locale.prototype))}catch(_){return!1}}function gK(_){return Array.isArray(_)?_:[_]}function p$(_,$,K){if(_.length===0)return;return _.reduce((Q,q)=>{const X=[$(q),q];if(!Q)return X;else if(K(Q[0],X[0])===Q[0])return Q;else return X},null)[1]}function a4(_,$){return $.reduce((K,Q)=>{return K[Q]=_[Q],K},{})}function s(_,$){return Object.prototype.hasOwnProperty.call(_,$)}function z_(_){if(_==null)return null;else if(typeof _!=="object")throw new U("Week settings must be an object");else{if(!O(_.firstDay,1,7)||!O(_.minimalDays,1,7)||!Array.isArray(_.weekend)||_.weekend.some(($)=>!O($,1,7)))throw new U("Invalid week settings");return{firstDay:_.firstDay,minimalDays:_.minimalDays,weekend:Array.from(_.weekend)}}}function O(_,$,K){return I_(_)&&_>=$&&_<=K}function o4(_,$){return _-$*Math.floor(_/$)}function Z(_,$=2){const K=_<0;let Q;if(K)Q="-"+(""+-_).padStart($,"0");else Q=(""+_).padStart($,"0");return Q}function m(_){if(Y(_)||_===null||_==="")return;else return parseInt(_,10)}function i(_){if(Y(_)||_===null||_==="")return;else return parseFloat(_)}function j_(_){if(Y(_)||_===null||_==="")return;else{const $=parseFloat("0."+_)*1000;return Math.floor($)}}function G_(_,$,K=!1){const Q=10**$;return(K?Math.trunc:Math.round)(_*Q)/Q}function $_(_){return _%4===0&&(_%100!==0||_%400===0)}function d(_){return $_(_)?366:365}function V_(_,$){const K=o4($-1,12)+1,Q=_+($-K)/12;if(K===2)return $_(Q)?29:28;else return[31,null,31,30,31,30,31,31,30,31,30,31][K-1]}function B_(_){let $=Date.UTC(_.year,_.month-1,_.day,_.hour,_.minute,_.second,_.millisecond);if(_.year<100&&_.year>=0)$=new Date($),$.setUTCFullYear(_.year,_.month-1,_.day);return+$}function kK(_,$,K){return-x_(G$(_,1,$),K)+$-1}function __(_,$=4,K=1){const Q=kK(_,$,K),q=kK(_+1,$,K);return(d(_)-Q+q)/7}function O_(_){if(_>99)return _;else return _>W.twoDigitCutoffYear?1900+_:2000+_}function _$(_,$,K,Q=null){const q=new Date(_),X={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if(Q)X.timeZone=Q;const B={timeZoneName:$,...X},G=new Intl.DateTimeFormat(K,B).formatToParts(q).find((J)=>J.type.toLowerCase()==="timezonename");return G?G.value:null}function e(_,$){let K=parseInt(_,10);if(Number.isNaN(K))K=0;const Q=parseInt($,10)||0,q=K<0||Object.is(K,-0)?-Q:Q;return K*60+q}function c$(_){const $=Number(_);if(typeof _==="boolean"||_===""||Number.isNaN($))throw new U(`Invalid unit value ${_}`);return $}function H_(_,$){const K={};for(let Q in _)if(s(_,Q)){const q=_[Q];if(q===void 0||q===null)continue;K[$(Q)]=c$(q)}return K}function l(_,$){const K=Math.trunc(Math.abs(_/60)),Q=Math.trunc(Math.abs(_%60)),q=_>=0?"+":"-";switch($){case"short":return`${q}${Z(K,2)}:${Z(Q,2)}`;case"narrow":return`${q}${K}${Q>0?`:${Q}`:""}`;case"techie":return`${q}${Z(K,2)}${Z(Q,2)}`;default:throw new RangeError(`Value format ${$} is out of range for property format`)}}function D_(_){return a4(_,["hour","minute","second","millisecond"])}function D$(_){switch(_){case"narrow":return[...e4];case"short":return[...m$];case"long":return[...t4];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}}function j$(_){switch(_){case"narrow":return[..._Q];case"short":return[...l$];case"long":return[...u$];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}function v$(_){switch(_){case"narrow":return[...QQ];case"short":return[...KQ];case"long":return[...$Q];default:return null}}function fK(_){return O$[_.hour<12?0:1]}function pK(_,$){return j$($)[_.weekday-1]}function cK(_,$){return D$($)[_.month-1]}function mK(_,$){return v$($)[_.year<0?0:1]}function MK(_,$,K="always",Q=!1){const q={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."]},X=["hours","minutes","seconds"].indexOf(_)===-1;if(K==="auto"&&X){const C=_==="days";switch($){case 1:return C?"tomorrow":`next ${q[_][0]}`;case-1:return C?"yesterday":`last ${q[_][0]}`;case 0:return C?"today":`this ${q[_][0]}`;default:}}const B=Object.is($,-0)||$<0,G=Math.abs($),J=G===1,V=q[_],E=Q?J?V[1]:V[2]||V[1]:J?q[_][0]:_;return B?`${G} ${E} ago`:`in ${G} ${E}`}var t4=["January","February","March","April","May","June","July","August","September","October","November","December"],m$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e4=["J","F","M","A","M","J","J","A","S","O","N","D"],u$=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],l$=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],_Q=["M","T","W","T","F","S","S"],O$=["AM","PM"],$Q=["Before Christ","Anno Domini"],KQ=["BC","AD"],QQ=["B","A"];function uK(_,$){let K="";for(let Q of _)if(Q.literal)K+=Q.val;else K+=$(Q.val);return K}var qQ={D:o,DD:b_,DDD:k_,DDDD:h_,t:g_,tt:f_,ttt:p_,tttt:c_,T:m_,TT:u_,TTT:l_,TTTT:d_,f:s_,ff:r_,fff:a_,ffff:t_,F:i_,FF:n_,FFF:o_,FFFF:e_};class L{static create(_,$={}){return new L(_,$)}static parseFormat(_){let $=null,K="",Q=!1;const q=[];for(let X=0;X<_.length;X++){const B=_.charAt(X);if(B==="'"){if(K.length>0)q.push({literal:Q||/^\s+$/.test(K),val:K});$=null,K="",Q=!Q}else if(Q)K+=B;else if(B===$)K+=B;else{if(K.length>0)q.push({literal:/^\s+$/.test(K),val:K});K=B,$=B}}if(K.length>0)q.push({literal:Q||/^\s+$/.test(K),val:K});return q}static macroTokenToFormatOpts(_){return qQ[_]}constructor(_,$){this.opts=$,this.loc=_,this.systemLoc=null}formatWithSystemDefault(_,$){if(this.systemLoc===null)this.systemLoc=this.loc.redefaultToSystem();return this.systemLoc.dtFormatter(_,{...this.opts,...$}).format()}dtFormatter(_,$={}){return this.loc.dtFormatter(_,{...this.opts,...$})}formatDateTime(_,$){return this.dtFormatter(_,$).format()}formatDateTimeParts(_,$){return this.dtFormatter(_,$).formatToParts()}formatInterval(_,$){return this.dtFormatter(_.start,$).dtf.formatRange(_.start.toJSDate(),_.end.toJSDate())}resolvedOptions(_,$){return this.dtFormatter(_,$).resolvedOptions()}num(_,$=0){if(this.opts.forceSimple)return Z(_,$);const K={...this.opts};if($>0)K.padTo=$;return this.loc.numberFormatter(K).format(_)}formatDateTimeFromString(_,$){const K=this.loc.listingMode()==="en",Q=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",q=(P,A)=>this.loc.extract(_,P,A),X=(P)=>{if(_.isOffsetFixed&&_.offset===0&&P.allowZ)return"Z";return _.isValid?_.zone.formatOffset(_.ts,P.format):""},B=()=>K?fK(_):q({hour:"numeric",hourCycle:"h12"},"dayperiod"),G=(P,A)=>K?cK(_,P):q(A?{month:P}:{month:P,day:"numeric"},"month"),J=(P,A)=>K?pK(_,P):q(A?{weekday:P}:{weekday:P,month:"long",day:"numeric"},"weekday"),V=(P)=>{const A=L.macroTokenToFormatOpts(P);if(A)return this.formatWithSystemDefault(_,A);else return P},E=(P)=>K?mK(_,P):q({era:P},"era"),C=(P)=>{switch(P){case"S":return this.num(_.millisecond);case"u":case"SSS":return this.num(_.millisecond,3);case"s":return this.num(_.second);case"ss":return this.num(_.second,2);case"uu":return this.num(Math.floor(_.millisecond/10),2);case"uuu":return this.num(Math.floor(_.millisecond/100));case"m":return this.num(_.minute);case"mm":return this.num(_.minute,2);case"h":return this.num(_.hour%12===0?12:_.hour%12);case"hh":return this.num(_.hour%12===0?12:_.hour%12,2);case"H":return this.num(_.hour);case"HH":return this.num(_.hour,2);case"Z":return X({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return X({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return X({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return _.zone.offsetName(_.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return _.zone.offsetName(_.ts,{format:"long",locale:this.loc.locale});case"z":return _.zoneName;case"a":return B();case"d":return Q?q({day:"numeric"},"day"):this.num(_.day);case"dd":return Q?q({day:"2-digit"},"day"):this.num(_.day,2);case"c":return this.num(_.weekday);case"ccc":return J("short",!0);case"cccc":return J("long",!0);case"ccccc":return J("narrow",!0);case"E":return this.num(_.weekday);case"EEE":return J("short",!1);case"EEEE":return J("long",!1);case"EEEEE":return J("narrow",!1);case"L":return Q?q({month:"numeric",day:"numeric"},"month"):this.num(_.month);case"LL":return Q?q({month:"2-digit",day:"numeric"},"month"):this.num(_.month,2);case"LLL":return G("short",!0);case"LLLL":return G("long",!0);case"LLLLL":return G("narrow",!0);case"M":return Q?q({month:"numeric"},"month"):this.num(_.month);case"MM":return Q?q({month:"2-digit"},"month"):this.num(_.month,2);case"MMM":return G("short",!1);case"MMMM":return G("long",!1);case"MMMMM":return G("narrow",!1);case"y":return Q?q({year:"numeric"},"year"):this.num(_.year);case"yy":return Q?q({year:"2-digit"},"year"):this.num(_.year.toString().slice(-2),2);case"yyyy":return Q?q({year:"numeric"},"year"):this.num(_.year,4);case"yyyyyy":return Q?q({year:"numeric"},"year"):this.num(_.year,6);case"G":return E("short");case"GG":return E("long");case"GGGGG":return E("narrow");case"kk":return this.num(_.weekYear.toString().slice(-2),2);case"kkkk":return this.num(_.weekYear,4);case"W":return this.num(_.weekNumber);case"WW":return this.num(_.weekNumber,2);case"n":return this.num(_.localWeekNumber);case"nn":return this.num(_.localWeekNumber,2);case"ii":return this.num(_.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(_.localWeekYear,4);case"o":return this.num(_.ordinal);case"ooo":return this.num(_.ordinal,3);case"q":return this.num(_.quarter);case"qq":return this.num(_.quarter,2);case"X":return this.num(Math.floor(_.ts/1000));case"x":return this.num(_.ts);default:return V(P)}};return uK(L.parseFormat($),C)}formatDurationFromString(_,$){const K=(G)=>{switch(G[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}},Q=(G)=>(J)=>{const V=K(J);if(V)return this.num(G.get(V),J.length);else return J},q=L.parseFormat($),X=q.reduce((G,{literal:J,val:V})=>J?G:G.concat(V),[]),B=_.shiftTo(...X.map(K).filter((G)=>G));return uK(q,Q(B))}}function Y_(..._){const $=_.reduce((K,Q)=>K+Q.source,"");return RegExp(`^${$}\$`)}function P_(..._){return($)=>_.reduce(([K,Q,q],X)=>{const[B,G,J]=X($,q);return[{...K,...B},G||Q,J]},[{},null,1]).slice(0,2)}function R_(_,...$){if(_==null)return[null,null];for(let[K,Q]of $){const q=K.exec(_);if(q)return Q(q)}return[null,null]}function sK(..._){return($,K)=>{const Q={};let q;for(q=0;q<_.length;q++)Q[_[q]]=m($[K+q]);return[Q,null,K+q]}}function E_(_,$,K){const Q=_[$];return Y(Q)?K:m(Q)}function PQ(_,$){return[{year:E_(_,$),month:E_(_,$+1,1),day:E_(_,$+2,1)},null,$+3]}function N_(_,$){return[{hours:E_(_,$,0),minutes:E_(_,$+1,0),seconds:E_(_,$+2,0),milliseconds:j_(_[$+3])},null,$+4]}function v_(_,$){const K=!_[$]&&!_[$+1],Q=e(_[$+1],_[$+2]),q=K?null:x.instance(Q);return[{},q,$+3]}function S_(_,$){const K=_[$]?D.create(_[$]):null;return[{},K,$+1]}function AQ(_){const[$,K,Q,q,X,B,G,J,V]=_,E=$[0]==="-",C=J&&J[0]==="-",P=(A,j=!1)=>A!==void 0&&(j||A&&E)?-A:A;return[{years:P(i(K)),months:P(i(Q)),weeks:P(i(q)),days:P(i(X)),hours:P(i(B)),minutes:P(i(G)),seconds:P(i(J),J==="-0"),milliseconds:P(j_(V),C)}]}function i$(_,$,K,Q,q,X,B){const G={year:$.length===2?O_(m($)):m($),month:m$.indexOf(K)+1,day:m(Q),hour:m(q),minute:m(X)};if(B)G.second=m(B);if(_)G.weekday=_.length>3?u$.indexOf(_)+1:l$.indexOf(_)+1;return G}function CQ(_){const[,$,K,Q,q,X,B,G,J,V,E,C]=_,P=i$($,q,Q,K,X,B,G);let A;if(J)A=MQ[J];else if(V)A=0;else A=e(E,C);return[P,new x(A)]}function FQ(_){return _.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function lK(_){const[,$,K,Q,q,X,B,G]=_;return[i$($,q,Q,K,X,B,G),x.utcInstance]}function zQ(_){const[,$,K,Q,q,X,B,G]=_;return[i$($,G,K,Q,q,X,B),x.utcInstance]}function oK(_){return R_(_,[xQ,aK],[wQ,jQ],[IQ,OQ],[DQ,vQ])}function tK(_){return R_(FQ(_),[WQ,CQ])}function eK(_){return R_(_,[ZQ,lK],[UQ,lK],[LQ,zQ])}function _4(_){return R_(_,[NQ,AQ])}function $4(_){return R_(_,[RQ,SQ])}function K4(_){return R_(_,[TQ,aK],[yQ,bQ])}var dK=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,iK=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,XQ=`(?:${iK.source}?(?:\\[(${dK.source})\\])?)?`,d$=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rK=RegExp(`${d$.source}${XQ}`),s$=RegExp(`(?:T${rK.source})?`),BQ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,GQ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,JQ=/(\d{4})-?(\d{3})/,VQ=sK("weekYear","weekNumber","weekDay"),HQ=sK("year","ordinal"),EQ=/(\d{4})-(\d\d)-(\d\d)/,nK=RegExp(`${d$.source} ?(?:${iK.source}|(${dK.source}))?`),YQ=RegExp(`(?: ${nK.source})?`),RQ=RegExp(`^T?${d$.source}\$`),NQ=/^-?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)?)?)$/,MQ={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},WQ=/^(?:(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)))$/,ZQ=/^(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$/,UQ=/^(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$/,LQ=/^(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})$/,xQ=Y_(BQ,s$),wQ=Y_(GQ,s$),IQ=Y_(JQ,s$),DQ=Y_(rK),aK=P_(PQ,N_,v_,S_),jQ=P_(VQ,N_,v_,S_),OQ=P_(HQ,N_,v_,S_),vQ=P_(N_,v_,S_),SQ=P_(N_),TQ=Y_(EQ,YQ),yQ=Y_(nK),bQ=P_(N_,v_,S_);function r(_,$,K=!1){const Q={values:K?$.values:{..._.values,...$.values||{}},loc:_.loc.clone($.loc),conversionAccuracy:$.conversionAccuracy||_.conversionAccuracy,matrix:$.matrix||_.matrix};return new R(Q)}function B4(_,$){let K=$.milliseconds??0;for(let Q of gQ.slice(1))if($[Q])K+=$[Q]*_[Q].milliseconds;return K}function q4(_,$){const K=B4(_,$)<0?-1:1;K_.reduceRight((Q,q)=>{if(!Y($[q])){if(Q){const X=$[Q]*K,B=_[q][Q],G=Math.floor(X/B);$[q]+=G*K,$[Q]-=G*B*K}return q}else return Q},null),K_.reduce((Q,q)=>{if(!Y($[q])){if(Q){const X=$[Q]%1;$[Q]-=X,$[q]+=X*_[Q][q]}return q}else return Q},null)}function fQ(_){const $={};for(let[K,Q]of Object.entries(_))if(Q!==0)$[K]=Q;return $}var Q4="Invalid Duration",X4={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:604800000},days:{hours:24,minutes:1440,seconds:86400,milliseconds:86400000},hours:{minutes:60,seconds:3600,milliseconds:3600000},minutes:{seconds:60,milliseconds:60000},seconds:{milliseconds:1000}},kQ={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536000,milliseconds:31536000000},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:7862400000},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592000,milliseconds:2592000000},...X4},b=365.2425,A_=30.436875,hQ={years:{quarters:4,months:12,weeks:b/7,days:b,hours:b*24,minutes:b*24*60,seconds:b*24*60*60,milliseconds:b*24*60*60*1000},quarters:{months:3,weeks:b/28,days:b/4,hours:b*24/4,minutes:b*24*60/4,seconds:b*24*60*60/4,milliseconds:b*24*60*60*1000/4},months:{weeks:A_/7,days:A_,hours:A_*24,minutes:A_*24*60,seconds:A_*24*60*60,milliseconds:A_*24*60*60*1000},...X4},K_=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],gQ=K_.slice(0).reverse();class R{constructor(_){const $=_.conversionAccuracy==="longterm"||!1;let K=$?hQ:kQ;if(_.matrix)K=_.matrix;this.values=_.values,this.loc=_.loc||N.create(),this.conversionAccuracy=$?"longterm":"casual",this.invalid=_.invalid||null,this.matrix=K,this.isLuxonDuration=!0}static fromMillis(_,$){return R.fromObject({milliseconds:_},$)}static fromObject(_,$={}){if(_==null||typeof _!=="object")throw new U(`Duration.fromObject: argument expected to be an object, got ${_===null?"null":typeof _}`);return new R({values:H_(_,R.normalizeUnit),loc:N.fromObject($),conversionAccuracy:$.conversionAccuracy,matrix:$.matrix})}static fromDurationLike(_){if(h(_))return R.fromMillis(_);else if(R.isDuration(_))return _;else if(typeof _==="object")return R.fromObject(_);else throw new U(`Unknown duration argument ${_} of type ${typeof _}`)}static fromISO(_,$){const[K]=_4(_);if(K)return R.fromObject(K,$);else return R.invalid("unparsable",`the input "${_}" can't be parsed as ISO 8601`)}static fromISOTime(_,$){const[K]=$4(_);if(K)return R.fromObject(K,$);else return R.invalid("unparsable",`the input "${_}" can't be parsed as ISO 8601`)}static invalid(_,$=null){if(!_)throw new U("need to specify a reason the Duration is invalid");const K=_ instanceof I?_:new I(_,$);if(W.throwOnInvalid)throw new Z$(K);else return new R({invalid:K})}static normalizeUnit(_){const $={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"}[_?_.toLowerCase():_];if(!$)throw new U_(_);return $}static isDuration(_){return _&&_.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(_,$={}){const K={...$,floor:$.round!==!1&&$.floor!==!1};return this.isValid?L.create(this.loc,K).formatDurationFromString(this,_):Q4}toHuman(_={}){if(!this.isValid)return Q4;const $=K_.map((K)=>{const Q=this.values[K];if(Y(Q))return null;return this.loc.numberFormatter({style:"unit",unitDisplay:"long",..._,unit:K.slice(0,-1)}).format(Q)}).filter((K)=>K);return this.loc.listFormatter({type:"conjunction",style:_.listStyle||"narrow",..._}).format($)}toObject(){if(!this.isValid)return{};return{...this.values}}toISO(){if(!this.isValid)return null;let _="P";if(this.years!==0)_+=this.years+"Y";if(this.months!==0||this.quarters!==0)_+=this.months+this.quarters*3+"M";if(this.weeks!==0)_+=this.weeks+"W";if(this.days!==0)_+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)_+="T";if(this.hours!==0)_+=this.hours+"H";if(this.minutes!==0)_+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0)_+=G_(this.seconds+this.milliseconds/1000,3)+"S";if(_==="P")_+="T0S";return _}toISOTime(_={}){if(!this.isValid)return null;const $=this.toMillis();if($<0||$>=86400000)return null;return _={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",..._,includeOffset:!1},H.fromMillis($,{zone:"UTC"}).toISOTime(_)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Duration { values: ${JSON.stringify(this.values)} }`;else return`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){if(!this.isValid)return NaN;return B4(this.matrix,this.values)}valueOf(){return this.toMillis()}plus(_){if(!this.isValid)return this;const $=R.fromDurationLike(_),K={};for(let Q of K_)if(s($.values,Q)||s(this.values,Q))K[Q]=$.get(Q)+this.get(Q);return r(this,{values:K},!0)}minus(_){if(!this.isValid)return this;const $=R.fromDurationLike(_);return this.plus($.negate())}mapUnits(_){if(!this.isValid)return this;const $={};for(let K of Object.keys(this.values))$[K]=c$(_(this.values[K],K));return r(this,{values:$},!0)}get(_){return this[R.normalizeUnit(_)]}set(_){if(!this.isValid)return this;const $={...this.values,...H_(_,R.normalizeUnit)};return r(this,{values:$})}reconfigure({locale:_,numberingSystem:$,conversionAccuracy:K,matrix:Q}={}){const X={loc:this.loc.clone({locale:_,numberingSystem:$}),matrix:Q,conversionAccuracy:K};return r(this,X)}as(_){return this.isValid?this.shiftTo(_).get(_):NaN}normalize(){if(!this.isValid)return this;const _=this.toObject();return q4(this.matrix,_),r(this,{values:_},!0)}rescale(){if(!this.isValid)return this;const _=fQ(this.normalize().shiftToAll().toObject());return r(this,{values:_},!0)}shiftTo(..._){if(!this.isValid)return this;if(_.length===0)return this;_=_.map((X)=>R.normalizeUnit(X));const $={},K={},Q=this.toObject();let q;for(let X of K_)if(_.indexOf(X)>=0){q=X;let B=0;for(let J in K)B+=this.matrix[J][X]*K[J],K[J]=0;if(h(Q[X]))B+=Q[X];const G=Math.trunc(B);$[X]=G,K[X]=(B*1000-G*1000)/1000}else if(h(Q[X]))K[X]=Q[X];for(let X in K)if(K[X]!==0)$[q]+=X===q?K[X]:K[X]/this.matrix[q][X];return q4(this.matrix,$),r(this,{values:$},!0)}shiftToAll(){if(!this.isValid)return this;return this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds")}negate(){if(!this.isValid)return this;const _={};for(let $ of Object.keys(this.values))_[$]=this.values[$]===0?0:-this.values[$];return r(this,{values:_},!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(_){if(!this.isValid||!_.isValid)return!1;if(!this.loc.equals(_.loc))return!1;function $(K,Q){if(K===void 0||K===0)return Q===void 0||Q===0;return K===Q}for(let K of K_)if(!$(this.values[K],_.values[K]))return!1;return!0}}function pQ(_,$){if(!_||!_.isValid)return F.invalid("missing or invalid start");else if(!$||!$.isValid)return F.invalid("missing or invalid end");else if($<_)return F.invalid("end before start",`The end of an interval must be after its start, but you had start=${_.toISO()} and end=${$.toISO()}`);else return null}var M_="Invalid Interval";class F{constructor(_){this.s=_.start,this.e=_.end,this.invalid=_.invalid||null,this.isLuxonInterval=!0}static invalid(_,$=null){if(!_)throw new U("need to specify a reason the Interval is invalid");const K=_ instanceof I?_:new I(_,$);if(W.throwOnInvalid)throw new F$(K);else return new F({invalid:K})}static fromDateTimes(_,$){const K=W_(_),Q=W_($),q=pQ(K,Q);if(q==null)return new F({start:K,end:Q});else return q}static after(_,$){const K=R.fromDurationLike($),Q=W_(_);return F.fromDateTimes(Q,Q.plus(K))}static before(_,$){const K=R.fromDurationLike($),Q=W_(_);return F.fromDateTimes(Q.minus(K),Q)}static fromISO(_,$){const[K,Q]=(_||"").split("/",2);if(K&&Q){let q,X;try{q=H.fromISO(K,$),X=q.isValid}catch(J){X=!1}let B,G;try{B=H.fromISO(Q,$),G=B.isValid}catch(J){G=!1}if(X&&G)return F.fromDateTimes(q,B);if(X){const J=R.fromISO(Q,$);if(J.isValid)return F.after(q,J)}else if(G){const J=R.fromISO(K,$);if(J.isValid)return F.before(B,J)}}return F.invalid("unparsable",`the input "${_}" can't be parsed as ISO 8601`)}static isInterval(_){return _&&_.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(_="milliseconds"){return this.isValid?this.toDuration(...[_]).get(_):NaN}count(_="milliseconds",$){if(!this.isValid)return NaN;const K=this.start.startOf(_,$);let Q;if($?.useLocaleWeeks)Q=this.end.reconfigure({locale:K.locale});else Q=this.end;return Q=Q.startOf(_,$),Math.floor(Q.diff(K,_).get(_))+(Q.valueOf()!==this.end.valueOf())}hasSame(_){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,_):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(_){if(!this.isValid)return!1;return this.s>_}isBefore(_){if(!this.isValid)return!1;return this.e<=_}contains(_){if(!this.isValid)return!1;return this.s<=_&&this.e>_}set({start:_,end:$}={}){if(!this.isValid)return this;return F.fromDateTimes(_||this.s,$||this.e)}splitAt(..._){if(!this.isValid)return[];const $=_.map(W_).filter((X)=>this.contains(X)).sort((X,B)=>X.toMillis()-B.toMillis()),K=[];let{s:Q}=this,q=0;while(Q<this.e){const X=$[q]||this.e,B=+X>+this.e?this.e:X;K.push(F.fromDateTimes(Q,B)),Q=B,q+=1}return K}splitBy(_){const $=R.fromDurationLike(_);if(!this.isValid||!$.isValid||$.as("milliseconds")===0)return[];let{s:K}=this,Q=1,q;const X=[];while(K<this.e){const B=this.start.plus($.mapUnits((G)=>G*Q));q=+B>+this.e?this.e:B,X.push(F.fromDateTimes(K,q)),K=q,Q+=1}return X}divideEqually(_){if(!this.isValid)return[];return this.splitBy(this.length()/_).slice(0,_)}overlaps(_){return this.e>_.s&&this.s<_.e}abutsStart(_){if(!this.isValid)return!1;return+this.e===+_.s}abutsEnd(_){if(!this.isValid)return!1;return+_.e===+this.s}engulfs(_){if(!this.isValid)return!1;return this.s<=_.s&&this.e>=_.e}equals(_){if(!this.isValid||!_.isValid)return!1;return this.s.equals(_.s)&&this.e.equals(_.e)}intersection(_){if(!this.isValid)return this;const $=this.s>_.s?this.s:_.s,K=this.e<_.e?this.e:_.e;if($>=K)return null;else return F.fromDateTimes($,K)}union(_){if(!this.isValid)return this;const $=this.s<_.s?this.s:_.s,K=this.e>_.e?this.e:_.e;return F.fromDateTimes($,K)}static merge(_){const[$,K]=_.sort((Q,q)=>Q.s-q.s).reduce(([Q,q],X)=>{if(!q)return[Q,X];else if(q.overlaps(X)||q.abutsStart(X))return[Q,q.union(X)];else return[Q.concat([q]),X]},[[],null]);if(K)$.push(K);return $}static xor(_){let $=null,K=0;const Q=[],q=_.map((G)=>[{time:G.s,type:"s"},{time:G.e,type:"e"}]),X=Array.prototype.concat(...q),B=X.sort((G,J)=>G.time-J.time);for(let G of B)if(K+=G.type==="s"?1:-1,K===1)$=G.time;else{if($&&+$!==+G.time)Q.push(F.fromDateTimes($,G.time));$=null}return F.merge(Q)}difference(..._){return F.xor([this].concat(_)).map(($)=>this.intersection($)).filter(($)=>$&&!$.isEmpty())}toString(){if(!this.isValid)return M_;return`[${this.s.toISO()} \u2013 ${this.e.toISO()})`}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;else return`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(_=o,$={}){return this.isValid?L.create(this.s.loc.clone($),_).formatInterval(this):M_}toISO(_){if(!this.isValid)return M_;return`${this.s.toISO(_)}/${this.e.toISO(_)}`}toISODate(){if(!this.isValid)return M_;return`${this.s.toISODate()}/${this.e.toISODate()}`}toISOTime(_){if(!this.isValid)return M_;return`${this.s.toISOTime(_)}/${this.e.toISOTime(_)}`}toFormat(_,{separator:$=" \u2013 "}={}){if(!this.isValid)return M_;return`${this.s.toFormat(_)}${$}${this.e.toFormat(_)}`}toDuration(_,$){if(!this.isValid)return R.invalid(this.invalidReason);return this.e.diff(this.s,_,$)}mapEndpoints(_){return F.fromDateTimes(_(this.s),_(this.e))}}class Q_{static hasDST(_=W.defaultZone){const $=H.now().setZone(_).set({month:12});return!_.isUniversal&&$.offset!==$.set({month:6}).offset}static isValidIANAZone(_){return D.isValidZone(_)}static normalizeZone(_){return k(_,W.defaultZone)}static getStartOfWeek({locale:_=null,locObj:$=null}={}){return($||N.create(_)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:_=null,locObj:$=null}={}){return($||N.create(_)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:_=null,locObj:$=null}={}){return($||N.create(_)).getWeekendDays().slice()}static months(_="long",{locale:$=null,numberingSystem:K=null,locObj:Q=null,outputCalendar:q="gregory"}={}){return(Q||N.create($,K,q)).months(_)}static monthsFormat(_="long",{locale:$=null,numberingSystem:K=null,locObj:Q=null,outputCalendar:q="gregory"}={}){return(Q||N.create($,K,q)).months(_,!0)}static weekdays(_="long",{locale:$=null,numberingSystem:K=null,locObj:Q=null}={}){return(Q||N.create($,K,null)).weekdays(_)}static weekdaysFormat(_="long",{locale:$=null,numberingSystem:K=null,locObj:Q=null}={}){return(Q||N.create($,K,null)).weekdays(_,!0)}static meridiems({locale:_=null}={}){return N.create(_).meridiems()}static eras(_="short",{locale:$=null}={}){return N.create($,null,"gregory").eras(_)}static features(){return{relative:q$(),localeWeek:X$()}}}function G4(_,$){const K=(q)=>q.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),Q=K($)-K(_);return Math.floor(R.fromMillis(Q).as("days"))}function cQ(_,$,K){const Q=[["years",(J,V)=>V.year-J.year],["quarters",(J,V)=>V.quarter-J.quarter+(V.year-J.year)*4],["months",(J,V)=>V.month-J.month+(V.year-J.year)*12],["weeks",(J,V)=>{const E=G4(J,V);return(E-E%7)/7}],["days",G4]],q={},X=_;let B,G;for(let[J,V]of Q)if(K.indexOf(J)>=0)if(B=J,q[J]=V(_,$),G=X.plus(q),G>$){if(q[J]--,_=X.plus(q),_>$)G=_,q[J]--,_=X.plus(q)}else _=G;return[_,q,G,B]}function r$(_,$,K,Q){let[q,X,B,G]=cQ(_,$,K);const J=$-q,V=K.filter((C)=>["hours","minutes","seconds","milliseconds"].indexOf(C)>=0);if(V.length===0){if(B<$)B=q.plus({[G]:1});if(B!==q)X[G]=(X[G]||0)+J/(B-q)}const E=R.fromObject(X,Q);if(V.length>0)return R.fromMillis(J,Q).shiftTo(...V).plus(E);else return E}function M(_,$=(K)=>K){return{regex:_,deser:([K])=>$(FK(K))}}function lQ(_){return _.replace(/\./g,"\\.?").replace(E4,H4)}function J4(_){return _.replace(/\./g,"").replace(E4," ").toLowerCase()}function g(_,$){if(_===null)return null;else return{regex:RegExp(_.map(lQ).join("|")),deser:([K])=>_.findIndex((Q)=>J4(K)===J4(Q))+$}}function V4(_,$){return{regex:_,deser:([,K,Q])=>e(K,Q),groups:$}}function V$(_){return{regex:_,deser:([$])=>$}}function dQ(_){return _.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function sQ(_,$){const K=T($),Q=T($,"{2}"),q=T($,"{3}"),X=T($,"{4}"),B=T($,"{6}"),G=T($,"{1,2}"),J=T($,"{1,3}"),V=T($,"{1,6}"),E=T($,"{1,9}"),C=T($,"{2,4}"),P=T($,"{4,6}"),A=(v)=>({regex:RegExp(dQ(v.val)),deser:([f])=>f,literal:!0}),w=((v)=>{if(_.literal)return A(v);switch(v.val){case"G":return g($.eras("short"),0);case"GG":return g($.eras("long"),0);case"y":return M(V);case"yy":return M(C,O_);case"yyyy":return M(X);case"yyyyy":return M(P);case"yyyyyy":return M(B);case"M":return M(G);case"MM":return M(Q);case"MMM":return g($.months("short",!0),1);case"MMMM":return g($.months("long",!0),1);case"L":return M(G);case"LL":return M(Q);case"LLL":return g($.months("short",!1),1);case"LLLL":return g($.months("long",!1),1);case"d":return M(G);case"dd":return M(Q);case"o":return M(J);case"ooo":return M(q);case"HH":return M(Q);case"H":return M(G);case"hh":return M(Q);case"h":return M(G);case"mm":return M(Q);case"m":return M(G);case"q":return M(G);case"qq":return M(Q);case"s":return M(G);case"ss":return M(Q);case"S":return M(J);case"SSS":return M(q);case"u":return V$(E);case"uu":return V$(G);case"uuu":return M(K);case"a":return g($.meridiems(),0);case"kkkk":return M(X);case"kk":return M(C,O_);case"W":return M(G);case"WW":return M(Q);case"E":case"c":return M(K);case"EEE":return g($.weekdays("short",!1),1);case"EEEE":return g($.weekdays("long",!1),1);case"ccc":return g($.weekdays("short",!0),1);case"cccc":return g($.weekdays("long",!0),1);case"Z":case"ZZ":return V4(new RegExp(`([+-]${G.source})(?::(${Q.source}))?`),2);case"ZZZ":return V4(new RegExp(`([+-]${G.source})(${Q.source})?`),2);case"z":return V$(/[a-z_+-/]{1,256}?/i);case" ":return V$(/[^\S\n\r]/);default:return A(v)}})(_)||{invalidReason:mQ};return w.token=_,w}function rQ(_,$,K){const{type:Q,value:q}=_;if(Q==="literal"){const J=/^\s+$/.test(q);return{literal:!J,val:J?" ":q}}const X=$[Q];let B=Q;if(Q==="hour")if($.hour12!=null)B=$.hour12?"hour12":"hour24";else if($.hourCycle!=null)if($.hourCycle==="h11"||$.hourCycle==="h12")B="hour12";else B="hour24";else B=K.hour12?"hour12":"hour24";let G=iQ[B];if(typeof G==="object")G=G[X];if(G)return{literal:!1,val:G};return}function nQ(_){return[`^${_.map((K)=>K.regex).reduce((K,Q)=>`${K}(${Q.source})`,"")}\$`,_]}function aQ(_,$,K){const Q=_.match($);if(Q){const q={};let X=1;for(let B in K)if(s(K,B)){const G=K[B],J=G.groups?G.groups+1:1;if(!G.literal&&G.token)q[G.token.val[0]]=G.deser(Q.slice(X,X+J));X+=J}return[Q,q]}else return[Q,{}]}function oQ(_){const $=(X)=>{switch(X){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let K=null,Q;if(!Y(_.z))K=D.create(_.z);if(!Y(_.Z)){if(!K)K=new x(_.Z);Q=_.Z}if(!Y(_.q))_.M=(_.q-1)*3+1;if(!Y(_.h)){if(_.h<12&&_.a===1)_.h+=12;else if(_.h===12&&_.a===0)_.h=0}if(_.G===0&&_.y)_.y=-_.y;if(!Y(_.u))_.S=j_(_.u);return[Object.keys(_).reduce((X,B)=>{const G=$(B);if(G)X[G]=_[B];return X},{}),K,Q]}function tQ(){if(!n$)n$=H.fromMillis(1555555555555);return n$}function eQ(_,$){if(_.literal)return _;const K=L.macroTokenToFormatOpts(_.val),Q=t$(K,$);if(Q==null||Q.includes(void 0))return _;return Q}function a$(_,$){return Array.prototype.concat(..._.map((K)=>eQ(K,$)))}function o$(_,$,K){return new H$(_,K).explainFromTokens($)}function Y4(_,$,K){const{result:Q,zone:q,specificOffset:X,invalidReason:B}=o$(_,$,K);return[Q,q,X,B]}function t$(_,$){if(!_)return null;const Q=L.create($,_).dtFormatter(tQ()),q=Q.formatToParts(),X=Q.resolvedOptions();return q.map((B)=>rQ(B,_,X))}var mQ="missing Intl.DateTimeFormat.formatToParts support",uQ=String.fromCharCode(160),H4=`[ ${uQ}]`,E4=new RegExp(H4,"g"),iQ={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"}},n$=null;class H${constructor(_,$){if(this.locale=_,this.format=$,this.tokens=a$(L.parseFormat($),_),this.units=this.tokens.map((K)=>sQ(K,_)),this.disqualifyingUnit=this.units.find((K)=>K.invalidReason),!this.disqualifyingUnit){const[K,Q]=nQ(this.units);this.regex=RegExp(K,"i"),this.handlers=Q}}explainFromTokens(_){if(!this.isValid)return{input:_,tokens:this.tokens,invalidReason:this.invalidReason};else{const[$,K]=aQ(_,this.regex,this.handlers),[Q,q,X]=K?oQ(K):[null,null,void 0];if(s(K,"a")&&s(K,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:_,tokens:this.tokens,regex:this.regex,rawMatches:$,matches:K,result:Q,zone:q,specificOffset:X}}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function T_(_){return new I("unsupported zone",`the zone "${_.name}" is not supported`)}function _K(_){if(_.weekData===null)_.weekData=w_(_.c);return _.weekData}function $K(_){if(_.localWeekData===null)_.localWeekData=w_(_.c,_.loc.getMinDaysInFirstWeek(),_.loc.getStartOfWeek());return _.localWeekData}function q_(_,$){const K={ts:_.ts,zone:_.zone,c:_.c,o:_.o,loc:_.loc,invalid:_.invalid};return new H({...K,...$,old:K})}function F4(_,$,K){let Q=_-$*60*1000;const q=K.offset(Q);if($===q)return[Q,$];Q-=(q-$)*60*1000;const X=K.offset(Q);if(q===X)return[Q,q];return[_-Math.min(q,X)*60*1000,Math.max(q,X)]}function E$(_,$){_+=$*60*1000;const K=new Date(_);return{year:K.getUTCFullYear(),month:K.getUTCMonth()+1,day:K.getUTCDate(),hour:K.getUTCHours(),minute:K.getUTCMinutes(),second:K.getUTCSeconds(),millisecond:K.getUTCMilliseconds()}}function P$(_,$,K){return F4(B_(_),$,K)}function R4(_,$){const K=_.o,Q=_.c.year+Math.trunc($.years),q=_.c.month+Math.trunc($.months)+Math.trunc($.quarters)*3,X={..._.c,year:Q,month:q,day:Math.min(_.c.day,V_(Q,q))+Math.trunc($.days)+Math.trunc($.weeks)*7},B=R.fromObject({years:$.years-Math.trunc($.years),quarters:$.quarters-Math.trunc($.quarters),months:$.months-Math.trunc($.months),weeks:$.weeks-Math.trunc($.weeks),days:$.days-Math.trunc($.days),hours:$.hours,minutes:$.minutes,seconds:$.seconds,milliseconds:$.milliseconds}).as("milliseconds"),G=B_(X);let[J,V]=F4(G,K,_.zone);if(B!==0)J+=B,V=_.zone.offset(J);return{ts:J,o:V}}function C_(_,$,K,Q,q,X){const{setZone:B,zone:G}=K;if(_&&Object.keys(_).length!==0||$){const J=$||G,V=H.fromObject(_,{...K,zone:J,specificOffset:X});return B?V:V.setZone(G)}else return H.invalid(new I("unparsable",`the input "${q}" can't be parsed as ${Q}`))}function Y$(_,$,K=!0){return _.isValid?L.create(N.create("en-US"),{allowZ:K,forceSimple:!0}).formatDateTimeFromString(_,$):null}function KK(_,$){const K=_.c.year>9999||_.c.year<0;let Q="";if(K&&_.c.year>=0)Q+="+";if(Q+=Z(_.c.year,K?6:4),$)Q+="-",Q+=Z(_.c.month),Q+="-",Q+=Z(_.c.day);else Q+=Z(_.c.month),Q+=Z(_.c.day);return Q}function N4(_,$,K,Q,q,X){let B=Z(_.c.hour);if($){if(B+=":",B+=Z(_.c.minute),_.c.millisecond!==0||_.c.second!==0||!K)B+=":"}else B+=Z(_.c.minute);if(_.c.millisecond!==0||_.c.second!==0||!K){if(B+=Z(_.c.second),_.c.millisecond!==0||!Q)B+=".",B+=Z(_.c.millisecond,3)}if(q)if(_.isOffsetFixed&&_.offset===0&&!X)B+="Z";else if(_.o<0)B+="-",B+=Z(Math.trunc(-_.o/60)),B+=":",B+=Z(Math.trunc(-_.o%60));else B+="+",B+=Z(Math.trunc(_.o/60)),B+=":",B+=Z(Math.trunc(_.o%60));if(X)B+="["+_.zone.ianaName+"]";return B}function q5(_){const $={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[_.toLowerCase()];if(!$)throw new U_(_);return $}function A4(_){switch(_.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return q5(_)}}function X5(_){if(!N$[_]){if(R$===void 0)R$=W.now();N$[_]=_.offset(R$)}return N$[_]}function M4(_,$){const K=k($.zone,W.defaultZone);if(!K.isValid)return H.invalid(T_(K));const Q=N.fromObject($);let q,X;if(!Y(_.year)){for(let J of U4)if(Y(_[J]))_[J]=Z4[J];const B=g$(_)||f$(_);if(B)return H.invalid(B);const G=X5(K);[q,X]=P$(_,G,K)}else q=W.now();return new H({ts:q,zone:K,loc:Q,o:X})}function W4(_,$,K){const Q=Y(K.round)?!0:K.round,q=(B,G)=>{return B=G_(B,Q||K.calendary?0:2,!0),$.loc.clone(K).relFormatter(K).format(B,G)},X=(B)=>{if(K.calendary)if(!$.hasSame(_,B))return $.startOf(B).diff(_.startOf(B),B).get(B);else return 0;else return $.diff(_,B).get(B)};if(K.unit)return q(X(K.unit),K.unit);for(let B of K.units){const G=X(B);if(Math.abs(G)>=1)return q(G,B)}return q(_>$?-0:0,K.units[K.units.length-1])}function C4(_){let $={},K;if(_.length>0&&typeof _[_.length-1]==="object")$=_[_.length-1],K=Array.from(_).slice(0,_.length-1);else K=Array.from(_);return[$,K]}function W_(_){if(H.isDateTime(_))return _;else if(_&&_.valueOf&&h(_.valueOf()))return H.fromJSDate(_);else if(_&&typeof _==="object")return H.fromObject(_);else throw new U(`Unknown datetime argument: ${_}, of type ${typeof _}`)}var e$="Invalid DateTime",P4=8640000000000000,Z4={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},_5={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},$5={ordinal:1,hour:0,minute:0,second:0,millisecond:0},U4=["year","month","day","hour","minute","second","millisecond"],K5=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Q5=["year","ordinal","hour","minute","second","millisecond"],R$,N$={};class H{constructor(_){const $=_.zone||W.defaultZone;let K=_.invalid||(Number.isNaN(_.ts)?new I("invalid input"):null)||(!$.isValid?T_($):null);this.ts=Y(_.ts)?W.now():_.ts;let Q=null,q=null;if(!K)if(_.old&&_.old.ts===this.ts&&_.old.zone.equals($))[Q,q]=[_.old.c,_.old.o];else{const B=h(_.o)&&!_.old?_.o:$.offset(this.ts);Q=E$(this.ts,B),K=Number.isNaN(Q.year)?new I("invalid input"):null,Q=K?null:Q,q=K?null:B}this._zone=$,this.loc=_.loc||N.create(),this.invalid=K,this.weekData=null,this.localWeekData=null,this.c=Q,this.o=q,this.isLuxonDateTime=!0}static now(){return new H({})}static local(){const[_,$]=C4(arguments),[K,Q,q,X,B,G,J]=$;return M4({year:K,month:Q,day:q,hour:X,minute:B,second:G,millisecond:J},_)}static utc(){const[_,$]=C4(arguments),[K,Q,q,X,B,G,J]=$;return _.zone=x.utcInstance,M4({year:K,month:Q,day:q,hour:X,minute:B,second:G,millisecond:J},_)}static fromJSDate(_,$={}){const K=hK(_)?_.valueOf():NaN;if(Number.isNaN(K))return H.invalid("invalid input");const Q=k($.zone,W.defaultZone);if(!Q.isValid)return H.invalid(T_(Q));return new H({ts:K,zone:Q,loc:N.fromObject($)})}static fromMillis(_,$={}){if(!h(_))throw new U(`fromMillis requires a numerical input, but received a ${typeof _} with value ${_}`);else if(_<-P4||_>P4)return H.invalid("Timestamp out of range");else return new H({ts:_,zone:k($.zone,W.defaultZone),loc:N.fromObject($)})}static fromSeconds(_,$={}){if(!h(_))throw new U("fromSeconds requires a numerical input");else return new H({ts:_*1000,zone:k($.zone,W.defaultZone),loc:N.fromObject($)})}static fromObject(_,$={}){_=_||{};const K=k($.zone,W.defaultZone);if(!K.isValid)return H.invalid(T_(K));const Q=N.fromObject($),q=H_(_,A4),{minDaysInFirstWeek:X,startOfWeek:B}=h$(q,Q),G=W.now(),J=!Y($.specificOffset)?$.specificOffset:K.offset(G),V=!Y(q.ordinal),E=!Y(q.year),C=!Y(q.month)||!Y(q.day),P=E||C,A=q.weekYear||q.weekNumber;if((P||V)&&A)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&V)throw new p("Can't mix ordinal dates with month/day");const j=A||q.weekday&&!P;let w,v,f=E$(G,J);if(j)w=K5,v=_5,f=w_(f,X,B);else if(V)w=Q5,v=$5,f=J$(f);else w=U4,v=Z4;let W$=!1;for(let Z_ of w){const T4=q[Z_];if(!Y(T4))W$=!0;else if(W$)q[Z_]=v[Z_];else q[Z_]=f[Z_]}const j4=j?yK(q,X,B):V?bK(q):g$(q),VK=j4||f$(q);if(VK)return H.invalid(VK);const O4=j?b$(q,X,B):V?k$(q):q,[v4,S4]=P$(O4,J,K),F_=new H({ts:v4,zone:K,o:S4,loc:Q});if(q.weekday&&P&&_.weekday!==F_.weekday)return H.invalid("mismatched weekday",`you can't specify both a weekday of ${q.weekday} and a date of ${F_.toISO()}`);if(!F_.isValid)return H.invalid(F_.invalid);return F_}static fromISO(_,$={}){const[K,Q]=oK(_);return C_(K,Q,$,"ISO 8601",_)}static fromRFC2822(_,$={}){const[K,Q]=tK(_);return C_(K,Q,$,"RFC 2822",_)}static fromHTTP(_,$={}){const[K,Q]=eK(_);return C_(K,Q,$,"HTTP",$)}static fromFormat(_,$,K={}){if(Y(_)||Y($))throw new U("fromFormat requires an input string and a format");const{locale:Q=null,numberingSystem:q=null}=K,X=N.fromOpts({locale:Q,numberingSystem:q,defaultToEN:!0}),[B,G,J,V]=Y4(X,_,$);if(V)return H.invalid(V);else return C_(B,G,K,`format ${$}`,_,J)}static fromString(_,$,K={}){return H.fromFormat(_,$,K)}static fromSQL(_,$={}){const[K,Q]=K4(_);return C_(K,Q,$,"SQL",_)}static invalid(_,$=null){if(!_)throw new U("need to specify a reason the DateTime is invalid");const K=_ instanceof I?_:new I(_,$);if(W.throwOnInvalid)throw new C$(K);else return new H({invalid:K})}static isDateTime(_){return _&&_.isLuxonDateTime||!1}static parseFormatForOpts(_,$={}){const K=t$(_,N.fromObject($));return!K?null:K.map((Q)=>Q?Q.val:null).join("")}static expandFormat(_,$={}){return a$(L.parseFormat(_),N.fromObject($)).map((Q)=>Q.val).join("")}static resetCache(){R$=void 0,N$={}}get(_){return this[_]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?_K(this).weekYear:NaN}get weekNumber(){return this.isValid?_K(this).weekNumber:NaN}get weekday(){return this.isValid?_K(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$K(this).weekday:NaN}get localWeekNumber(){return this.isValid?$K(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$K(this).weekYear:NaN}get ordinal(){return this.isValid?J$(this.c).ordinal:NaN}get monthShort(){return this.isValid?Q_.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Q_.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Q_.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Q_.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"short",locale:this.locale});else return null}get offsetNameLong(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"long",locale:this.locale});else return null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){if(this.isOffsetFixed)return!1;else return this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const _=86400000,$=60000,K=B_(this.c),Q=this.zone.offset(K-_),q=this.zone.offset(K+_),X=this.zone.offset(K-Q*$),B=this.zone.offset(K-q*$);if(X===B)return[this];const G=K-X*$,J=K-B*$,V=E$(G,X),E=E$(J,B);if(V.hour===E.hour&&V.minute===E.minute&&V.second===E.second&&V.millisecond===E.millisecond)return[q_(this,{ts:G}),q_(this,{ts:J})];return[this]}get isInLeapYear(){return $_(this.year)}get daysInMonth(){return V_(this.year,this.month)}get daysInYear(){return this.isValid?d(this.year):NaN}get weeksInWeekYear(){return this.isValid?__(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?__(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(_={}){const{locale:$,numberingSystem:K,calendar:Q}=L.create(this.loc.clone(_),_).resolvedOptions(this);return{locale:$,numberingSystem:K,outputCalendar:Q}}toUTC(_=0,$={}){return this.setZone(x.instance(_),$)}toLocal(){return this.setZone(W.defaultZone)}setZone(_,{keepLocalTime:$=!1,keepCalendarTime:K=!1}={}){if(_=k(_,W.defaultZone),_.equals(this.zone))return this;else if(!_.isValid)return H.invalid(T_(_));else{let Q=this.ts;if($||K){const q=_.offset(this.ts),X=this.toObject();[Q]=P$(X,q,_)}return q_(this,{ts:Q,zone:_})}}reconfigure({locale:_,numberingSystem:$,outputCalendar:K}={}){const Q=this.loc.clone({locale:_,numberingSystem:$,outputCalendar:K});return q_(this,{loc:Q})}setLocale(_){return this.reconfigure({locale:_})}set(_){if(!this.isValid)return this;const $=H_(_,A4),{minDaysInFirstWeek:K,startOfWeek:Q}=h$($,this.loc),q=!Y($.weekYear)||!Y($.weekNumber)||!Y($.weekday),X=!Y($.ordinal),B=!Y($.year),G=!Y($.month)||!Y($.day),J=B||G,V=$.weekYear||$.weekNumber;if((J||X)&&V)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(G&&X)throw new p("Can't mix ordinal dates with month/day");let E;if(q)E=b$({...w_(this.c,K,Q),...$},K,Q);else if(!Y($.ordinal))E=k$({...J$(this.c),...$});else if(E={...this.toObject(),...$},Y($.day))E.day=Math.min(V_(E.year,E.month),E.day);const[C,P]=P$(E,this.o,this.zone);return q_(this,{ts:C,o:P})}plus(_){if(!this.isValid)return this;const $=R.fromDurationLike(_);return q_(this,R4(this,$))}minus(_){if(!this.isValid)return this;const $=R.fromDurationLike(_).negate();return q_(this,R4(this,$))}startOf(_,{useLocaleWeeks:$=!1}={}){if(!this.isValid)return this;const K={},Q=R.normalizeUnit(_);switch(Q){case"years":K.month=1;case"quarters":case"months":K.day=1;case"weeks":case"days":K.hour=0;case"hours":K.minute=0;case"minutes":K.second=0;case"seconds":K.millisecond=0;break;case"milliseconds":break}if(Q==="weeks")if($){const q=this.loc.getStartOfWeek(),{weekday:X}=this;if(X<q)K.weekNumber=this.weekNumber-1;K.weekday=q}else K.weekday=1;if(Q==="quarters"){const q=Math.ceil(this.month/3);K.month=(q-1)*3+1}return this.set(K)}endOf(_,$){return this.isValid?this.plus({[_]:1}).startOf(_,$).minus(1):this}toFormat(_,$={}){return this.isValid?L.create(this.loc.redefaultToEN($)).formatDateTimeFromString(this,_):e$}toLocaleString(_=o,$={}){return this.isValid?L.create(this.loc.clone($),_).formatDateTime(this):e$}toLocaleParts(_={}){return this.isValid?L.create(this.loc.clone(_),_).formatDateTimeParts(this):[]}toISO({format:_="extended",suppressSeconds:$=!1,suppressMilliseconds:K=!1,includeOffset:Q=!0,extendedZone:q=!1}={}){if(!this.isValid)return null;const X=_==="extended";let B=KK(this,X);return B+="T",B+=N4(this,X,$,K,Q,q),B}toISODate({format:_="extended"}={}){if(!this.isValid)return null;return KK(this,_==="extended")}toISOWeekDate(){return Y$(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:_=!1,suppressSeconds:$=!1,includeOffset:K=!0,includePrefix:Q=!1,extendedZone:q=!1,format:X="extended"}={}){if(!this.isValid)return null;return(Q?"T":"")+N4(this,X==="extended",$,_,K,q)}toRFC2822(){return Y$(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Y$(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){if(!this.isValid)return null;return KK(this,!0)}toSQLTime({includeOffset:_=!0,includeZone:$=!1,includeOffsetSpace:K=!0}={}){let Q="HH:mm:ss.SSS";if($||_){if(K)Q+=" ";if($)Q+="z";else if(_)Q+="ZZ"}return Y$(this,Q,!0)}toSQL(_={}){if(!this.isValid)return null;return`${this.toSQLDate()} ${this.toSQLTime(_)}`}toString(){return this.isValid?this.toISO():e$}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;else return`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1000:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1000):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(_={}){if(!this.isValid)return{};const $={...this.c};if(_.includeConfig)$.outputCalendar=this.outputCalendar,$.numberingSystem=this.loc.numberingSystem,$.locale=this.loc.locale;return $}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(_,$="milliseconds",K={}){if(!this.isValid||!_.isValid)return R.invalid("created by diffing an invalid DateTime");const Q={locale:this.locale,numberingSystem:this.numberingSystem,...K},q=gK($).map(R.normalizeUnit),X=_.valueOf()>this.valueOf(),B=X?this:_,G=X?_:this,J=r$(B,G,q,Q);return X?J.negate():J}diffNow(_="milliseconds",$={}){return this.diff(H.now(),_,$)}until(_){return this.isValid?F.fromDateTimes(this,_):this}hasSame(_,$,K){if(!this.isValid)return!1;const Q=_.valueOf(),q=this.setZone(_.zone,{keepLocalTime:!0});return q.startOf($,K)<=Q&&Q<=q.endOf($,K)}equals(_){return this.isValid&&_.isValid&&this.valueOf()===_.valueOf()&&this.zone.equals(_.zone)&&this.loc.equals(_.loc)}toRelative(_={}){if(!this.isValid)return null;const $=_.base||H.fromObject({},{zone:this.zone}),K=_.padding?this<$?-_.padding:_.padding:0;let Q=["years","months","days","hours","minutes","seconds"],q=_.unit;if(Array.isArray(_.unit))Q=_.unit,q=void 0;return W4($,this.plus(K),{..._,numeric:"always",units:Q,unit:q})}toRelativeCalendar(_={}){if(!this.isValid)return null;return W4(_.base||H.fromObject({},{zone:this.zone}),this,{..._,numeric:"auto",units:["years","months","days"],calendary:!0})}static min(..._){if(!_.every(H.isDateTime))throw new U("min requires all arguments be DateTimes");return p$(_,($)=>$.valueOf(),Math.min)}static max(..._){if(!_.every(H.isDateTime))throw new U("max requires all arguments be DateTimes");return p$(_,($)=>$.valueOf(),Math.max)}static fromFormatExplain(_,$,K={}){const{locale:Q=null,numberingSystem:q=null}=K,X=N.fromOpts({locale:Q,numberingSystem:q,defaultToEN:!0});return o$(X,_,$)}static fromStringExplain(_,$,K={}){return H.fromFormatExplain(_,$,K)}static buildFormatParser(_,$={}){const{locale:K=null,numberingSystem:Q=null}=$,q=N.fromOpts({locale:K,numberingSystem:Q,defaultToEN:!0});return new H$(q,_)}static fromFormatParser(_,$,K={}){if(Y(_)||Y($))throw new U("fromFormatParser requires an input string and a format parser");const{locale:Q=null,numberingSystem:q=null}=K,X=N.fromOpts({locale:Q,numberingSystem:q,defaultToEN:!0});if(!X.equals($.locale))throw new U(`fromFormatParser called with a locale of ${X}, but the format parser was created for ${$.locale}`);const{result:B,zone:G,specificOffset:J,invalidReason:V}=$.explainFromTokens(_);if(V)return H.invalid(V);else return C_(B,G,K,`format ${$.format}`,_,J)}static get DATE_SHORT(){return o}static get DATE_MED(){return b_}static get DATE_MED_WITH_WEEKDAY(){return HK}static get DATE_FULL(){return k_}static get DATE_HUGE(){return h_}static get TIME_SIMPLE(){return g_}static get TIME_WITH_SECONDS(){return f_}static get TIME_WITH_SHORT_OFFSET(){return p_}static get TIME_WITH_LONG_OFFSET(){return c_}static get TIME_24_SIMPLE(){return m_}static get TIME_24_WITH_SECONDS(){return u_}static get TIME_24_WITH_SHORT_OFFSET(){return l_}static get TIME_24_WITH_LONG_OFFSET(){return d_}static get DATETIME_SHORT(){return s_}static get DATETIME_SHORT_WITH_SECONDS(){return i_}static get DATETIME_MED(){return r_}static get DATETIME_MED_WITH_SECONDS(){return n_}static get DATETIME_MED_WITH_WEEKDAY(){return EK}static get DATETIME_FULL(){return a_}static get DATETIME_FULL_WITH_SECONDS(){return o_}static get DATETIME_HUGE(){return t_}static get DATETIME_HUGE_WITH_SECONDS(){return e_}}var QK=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]}),qK=Object.freeze({1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}),L4=Object.freeze({second:"0",minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"}),XK=Object.freeze({jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}),BK=Object.freeze({SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY_OF_MONTH:"dayOfMonth",MONTH:"month",DAY_OF_WEEK:"dayOfWeek"}),y_=Object.freeze(Object.values(BK)),A$=y_.length,GK=Object.freeze({"@yearly":"0 0 0 1 1 *","@monthly":"0 0 0 1 * *","@weekly":"0 0 0 * * 0","@daily":"0 0 0 * * *","@hourly":"0 0 * * * *","@minutely":"0 * * * * *","@secondly":"* * * * * *","@weekdays":"0 0 0 * * 1-5","@weekends":"0 0 0 * * 0,6"}),z4=/\*/g,x4=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g;function JK(_){return Object.keys(_)}function w4(_,$){if(_!=null&&$!=null)throw new a("timeZone","utcOffset");if(_!=null)return{timeZone:_,utcOffset:null};if($!=null)return{timeZone:null,utcOffset:$};return{timeZone:null,utcOffset:null}}class n{source;timeZone;utcOffset;realDate=!1;second={};minute={};hour={};dayOfMonth={};month={};dayOfWeek={};constructor(_,$,K){if($!=null&&K!=null)throw new a("timeZone","utcOffset");if($){if(!H.fromObject({},{zone:$}).isValid)throw new z("Invalid timezone.");this.timeZone=$}if(K!=null)this.utcOffset=K;if(_ instanceof Date||_ instanceof H)this.source=_ instanceof Date?H.fromJSDate(_):_,this.realDate=!0;else this.source=_,this._parse(this.source),this._verifyParse()}_getWeekDay(_){return _.weekday===7?0:_.weekday}_verifyParse(){const _=JK(this.month),$=JK(this.dayOfMonth);let K=!1,Q=null;for(let q of _){const X=qK[q];for(let B of $)if(B<=X)K=!0;if(!K)Q=q,console.warn(`Month '${q}' is limited to '${X}' days.`)}if(!K&&Q!==null){const q=qK[Q];for(let X of $)if(X>q){delete this.dayOfMonth[X];const B=X%q;this.dayOfMonth[B]=!0}}}sendAt(_){let $=this.realDate&&this.source instanceof H?this.source:H.local();if(this.timeZone)$=$.setZone(this.timeZone);if(this.utcOffset!==void 0){const Q=this.utcOffset<0?"-":"+",q=Math.trunc(this.utcOffset/60),X=String(Math.abs(q)).padStart(2,"0"),B=Math.abs(this.utcOffset-q*60),G=String(B).padStart(2,"0"),J=`UTC${Q}${X}:${G}`;if($=$.setZone(J),!$.isValid)throw new z("ERROR: You specified an invalid UTC offset.")}if(this.realDate){if(H.local()>$)throw new z("WARNING: Date in past. Will never be fired.");return $}if(_===void 0||Number.isNaN(_)||_<0)return this.getNextDateFrom($);const K=[];for(;_>0;_--)$=this.getNextDateFrom($),K.push($);return K}getTimeout(){return Math.max(-1,this.sendAt().toMillis()-H.local().toMillis())}toString(){return this.toJSON().join(" ")}toJSON(){return y_.map((_)=>{return this._wcOrAll(_)})}getNextDateFrom(_,$){if(_ instanceof Date)_=H.fromJSDate(_);let K=_;const Q=_.toMillis();if($)K=K.setZone($);if(!this.realDate){if(K.millisecond>0)K=K.set({millisecond:0,second:K.second+1})}if(!K.isValid)throw new z("ERROR: You specified an invalid date.");const q=H.now().plus({years:8});while(!0){const X=K.toMillis()-_.toMillis();if(K>q)throw new z(`Something went wrong. No execution date was found in the next 8 years.
3
- Please provide the following string if you would like to help debug:
4
- Time Zone: ${$?.toString()??'""'} - Cron String: ${this.source.toString()} - UTC offset: ${K.offset} - current Date: ${H.local().toString()}`);if(!(K.month in this.month)&&Object.keys(this.month).length!==12){if(K=K.plus({months:1}),K=K.set({day:1,hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,K)){const[B,G]=this._findPreviousDSTJump(K);if(K=G,B)break}continue}if(!(K.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!((this._getWeekDay(K)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7)){if(K=K.plus({days:1}),K=K.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,K)){const[B,G]=this._findPreviousDSTJump(K);if(K=G,B)break}continue}if(!(this._getWeekDay(K)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!((K.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31)){if(K=K.plus({days:1}),K=K.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,K)){const[B,G]=this._findPreviousDSTJump(K);if(K=G,B)break}continue}if(!(K.hour in this.hour)&&Object.keys(this.hour).length!==24){const B=K.hour===23&&X>86400000?0:K.hour+1,G=K.minute;if(K=K.set({hour:B}),K=K.set({minute:0,second:0}),this._forwardDSTJump(B,G,K)){const[J,V]=this._findPreviousDSTJump(K);if(K=V,J)break}continue}if(!(K.minute in this.minute)&&Object.keys(this.minute).length!==60){const B=K.minute===59&&X>3600000?0:K.minute+1,G=K.hour+(B===60?1:0);if(K=K.set({minute:B}),K=K.set({second:0}),this._forwardDSTJump(G,B,K)){const[J,V]=this._findPreviousDSTJump(K);if(K=V,J)break}continue}if(!(K.second in this.second)&&Object.keys(this.second).length!==60){const B=K.second===59&&X>60000?0:K.second+1,G=K.minute+(B===60?1:0),J=K.hour+(G===60?1:0);if(K=K.set({second:B}),this._forwardDSTJump(J,G,K)){const[V,E]=this._findPreviousDSTJump(K);if(K=E,V)break}continue}if(K.toMillis()===Q){const B=K.second+1,G=K.minute+(B===60?1:0),J=K.hour+(G===60?1:0);if(K=K.set({second:B}),this._forwardDSTJump(J,G,K)){const[V,E]=this._findPreviousDSTJump(K);if(K=E,V)break}continue}break}return K}_findPreviousDSTJump(_){let $,K,Q,q,X=_;const B=1440;let G=0;do{if(++G>B)throw new z(`ERROR: This DST checking related function assumes the input DateTime (${_.toISO()??_.toMillis()}) is within 24 hours of a DST jump.`);if($=X.minute-1,K=X.hour,$<0)$+=60,K=(K+24-1)%24;X=X.minus({minute:1}),Q=X.minute,q=X.hour}while($===Q&&K===q);const J=X.plus({minute:1}).set({second:0,millisecond:0}),V=J.minus({second:1});if(_.month+1 in this.month&&_.day in this.dayOfMonth&&this._getWeekDay(_)in this.dayOfWeek)return[this._checkTimeInSkippedRange(V,J),J];return[!1,J]}_checkTimeInSkippedRange(_,$){const K=(_.minute+1)%60,Q=(_.hour+(K===0?1:0))%24,q=$.hour-Q+1,X=K===0&&$.minute===0;if(q===2&&X)return Q in this.hour;if(q===1)return Q in this.hour&&this._checkTimeInSkippedRangeSingleHour(K,$.minute);return this._checkTimeInSkippedRangeMultiHour(Q,K,$.hour,$.minute)}_checkTimeInSkippedRangeSingleHour(_,$){for(let K=_;K<$;++K)if(K in this.minute)return!0;return $ in this.minute&&0 in this.second}_checkTimeInSkippedRangeMultiHour(_,$,K,Q){if(_>=K)throw new z(`ERROR: This DST checking related function assumes the forward jump starting hour (${_}) is less than the end hour (${K})`);const q=Array.from({length:60-$},(J,V)=>$+V),X=Array.from({length:Q},(J,V)=>V),B=Array.from({length:60},(J,V)=>V),G=(J)=>{if(J===_)return q;if(J===K)return X;return B};for(let J=_;J<=K;++J){if(!(J in this.hour))continue;const V=G(J);for(let E of V)if(E in this.minute)return!0}return K in this.hour&&Q in this.minute&&0 in this.second}_forwardDSTJump(_,$,K){const{hour:Q,minute:q}=K,X=_%24<Q,B=$%60<q;return X||B}_wcOrAll(_){if(this._hasAll(_))return"*";const $=[];for(let K in this[_])$.push(K);return $.join(",")}_hasAll(_){const $=QK[_],K=$[0],Q=_===BK.DAY_OF_WEEK?$[1]-1:$[1];for(let q=K,X=Q;q<X;q++)if(!(q in this[_]))return!1;return!0}_parse(_){if(_=_.toLowerCase(),Object.keys(GK).includes(_))_=GK[_];_=_.replace(/[a-z]{1,3}/gi,(Q)=>{if(Object.keys(XK).includes(Q))return XK[Q].toString();throw new z(`Unknown alias: ${Q}`)});const $=_.trim().split(/\s+/);if($.length<A$-1)throw new z("Too few fields");if($.length>A$)throw new z("Too many fields");const K=$.length;for(let Q of y_){const q=y_.indexOf(Q),X=$[q-(A$-K)]??L4[Q];this._parseField(X,Q)}}_parseField(_,$){const K=this[$];let Q;const q=QK[$],X=q[0],B=q[1];_.split(",").forEach((V)=>{const E=V.indexOf("*");if(E!==-1&&E!==0)throw new z(`Field (${V}) has an invalid wildcard expression`)}),_=_.replace(z4,`${X}-${B}`);const J=_.split(",");for(let V of J){const E=[...V.matchAll(x4)][0];if(E?.[1]!==void 0){const[,C,P,A]=E;let j=Number.parseInt(C,10),w=P!==void 0?Number.parseInt(P,10):void 0;const v=A!==void 0,f=Number.parseInt(A??"1",10);if(f===0)throw new z(`Field (${$}) has a step of zero`);if(w!==void 0&&j>w)throw new z(`Field (${$}) has an invalid range`);if(j<X||w!==void 0&&w>B||w===void 0&&j>B)throw new z(`Field value (${_}) is out of range`);if(j=Math.min(Math.max(X,~~Math.abs(j)),B),w!==void 0)w=Math.min(B,~~Math.abs(w));else w=v?B:j;Q=j;do K[Q]=!0,Q+=f;while(Q<=w);if($==="dayOfWeek"){if(!K[0]&&!!K[7])K[0]=K[7];K[7]=void 0}}else throw new z(`Field (${$}) cannot be parsed`)}}}class X_{cronTime;running=!1;unrefTimeout=!1;lastExecution=null;runOnce=!1;context;onComplete;_timeout;_callbacks=[];_errorHandler;constructor(_,$,K,Q,q,X,B,G,J,V){this._errorHandler=V,this.context=X??this;const{timeZone:E,utcOffset:C}=w4(q,G);if(this.cronTime=new n(_,E,C),J!=null)this.unrefTimeout=J;if(K!=null)this.onComplete=this._fnWrap(K);if(this.cronTime.realDate)this.runOnce=!0;if(this.addCallback(this._fnWrap($)),B)this.lastExecution=new Date,this.fireOnTick();if(Q)this.start()}static from(_){if(_.timeZone!=null&&_.utcOffset!=null)throw new a("timeZone","utcOffset");if(_.timeZone!=null)return new X_(_.cronTime,_.onTick,_.onComplete,_.start,_.timeZone,_.context,_.runOnInit,_.utcOffset,_.unrefTimeout);if(_.utcOffset!=null)return new X_(_.cronTime,_.onTick,_.onComplete,_.start,null,_.context,_.runOnInit,_.utcOffset,_.unrefTimeout);return new X_(_.cronTime,_.onTick,_.onComplete,_.start,_.timeZone,_.context,_.runOnInit,_.utcOffset,_.unrefTimeout)}_fnWrap(_){switch(typeof _){case"function":return _;case"string":{const[$,...K]=_.split(" ");return I4.bind(void 0,$??_,K,{})}case"object":return I4.bind(void 0,_.command,_.args??[],_.options??{})}}addCallback(_){if(typeof _==="function")this._callbacks.push(_)}setTime(_){if(!(_ instanceof n))throw new z("time must be an instance of CronTime.");const $=this.running;if(this.stop(),this.cronTime=_,_.realDate)this.runOnce=!0;if($)this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){try{for(let _ of this._callbacks)_.call(this.context,this.onComplete)}catch(_){if(this._errorHandler&&_ instanceof Error)this._errorHandler(_);else console.error("An error occurred in the cron job callback:",_)}}nextDates(_){return this.cronTime.sendAt(_??0)}start(){if(this.running)return;const _=2147483647;let $=this.cronTime.getTimeout(),K=0,Q;const q=(B)=>{if(this._timeout=setTimeout(X,B),this.unrefTimeout&&typeof this._timeout.unref==="function")this._timeout.unref()},X=()=>{const B=Q+$-Date.now();if(B>0){let G=this.cronTime.getTimeout();if(G>B)G=B;K+=G}if(K){if(K>_)K-=_,$=_;else $=K,K=0;q($)}else{if(this.lastExecution=new Date,this.running=!1,!this.runOnce)this.start();this.fireOnTick()}};if($>=0){if(this.running=!0,$>_)K=$-_,$=_;q($)}else this.stop()}lastDate(){return this.lastExecution}stop(){if(this._timeout)clearTimeout(this._timeout);if(this.running=!1,typeof this.onComplete==="function")this.onComplete.call(this.context)}}function A8(_){return new n(_).sendAt()}function M8(_){return new n(_).getTimeout()}class D4{cronPattern="";timezone="America/Los_Angeles";task;constructor(_){this.task=_}everySecond(){return this.cronPattern="* * * * * *",this}everyMinute(){return this.cronPattern="0 * * * * *",this}everyTwoMinutes(){return this.cronPattern="*/2 * * * * *",this}everyFiveMinutes(){return this.cronPattern="*/5 * * * *",this}everyTenMinutes(){return this.cronPattern="*/10 * * * *",this}everyThirtyMinutes(){return this.cronPattern="*/30 * * * *",this}hourly(){return this.cronPattern="0 0 * * * *",this}daily(){return this.cronPattern="0 0 0 * * *",this}weekly(){return this.cronPattern="0 0 0 * * 0",this}monthly(){return this.cronPattern="0 0 0 1 * *",this}yearly(){return this.cronPattern="0 0 0 1 1 *",this}onDays(_){const $=_.join(",");return this.cronPattern=`0 0 0 * * ${$}`,this}at(_){const[$,K]=_.split(":").map(Number);return this.cronPattern=`${K} ${$} * * *`,this}setTimeZone(_){return this.timezone=_,this}start(){new X_(this.cronPattern,this.task,null,!0,this.timezone),M$.info(`Scheduled task with pattern: ${this.cronPattern} in timezone: ${this.timezone}`)}job(_){return M$.info(`Scheduling job: ${_}`),this}action(_){return M$.info(`Scheduling action: ${_}`),this}static command(_){return M$.info(`Executing command: ${_}`),this}}export{M8 as timeout,A8 as sendAt,D4 as Schedule,n as CronTime,X_ as BunCronJob};
2
+ var DX=Object.create;var{getPrototypeOf:xX,defineProperty:E1,getOwnPropertyNames:TX}=Object;var vX=Object.prototype.hasOwnProperty;var yX=(X,Q,K)=>{K=X!=null?DX(xX(X)):{};const $=Q||!X||!X.__esModule?E1(K,"default",{value:X,enumerable:!0}):K;for(let q of TX(X))if(!vX.call($,q))E1($,q,{get:()=>X[q],enumerable:!0});return $};var s=(X,Q)=>()=>(Q||X((Q={exports:{}}).exports,Q),Q.exports);var QX=s((XX)=>{function bX(X){if(!D0[X])D0[X]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:X,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"});return D0[X]}function gX(X,Q){const K=X.format(Q).replace(/\u200E/g,""),$=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(K),[,q,G,B,V,J,C,U]=$;return[B,q,G,V,J,C,U]}function fX(X,Q){const K=X.formatToParts(Q),$=[];for(let q=0;q<K.length;q++){const{type:G,value:B}=K[q],V=hX[G];if(G==="era")$[V]=B;else if(!R(V))$[V]=parseInt(B,10)}return $}function pX(X,Q={}){const K=JSON.stringify([X,Q]);let $=M1[K];if(!$)$=new Intl.ListFormat(X,Q),M1[K]=$;return $}function t0(X,Q={}){const K=JSON.stringify([X,Q]);let $=e0[K];if(!$)$=new Intl.DateTimeFormat(X,Q),e0[K]=$;return $}function cX(X,Q={}){const K=JSON.stringify([X,Q]);let $=X1[K];if(!$)$=new Intl.NumberFormat(X,Q),X1[K]=$;return $}function mX(X,Q={}){const{base:K,...$}=Q,q=JSON.stringify([X,$]);let G=Q1[q];if(!G)G=new Intl.RelativeTimeFormat(X,Q),Q1[q]=G;return G}function uX(){if(A0)return A0;else return A0=new Intl.DateTimeFormat().resolvedOptions().locale,A0}function lX(X){let Q=L1[X];if(!Q){const K=new Intl.Locale(X);Q="getWeekInfo"in K?K.getWeekInfo():K.weekInfo,L1[X]=Q}return Q}function dX(X){const Q=X.indexOf("-x-");if(Q!==-1)X=X.substring(0,Q);const K=X.indexOf("-u-");if(K===-1)return[X];else{let $,q;try{$=t0(X).resolvedOptions(),q=X}catch(V){const J=X.substring(0,K);$=t0(J).resolvedOptions(),q=J}const{numberingSystem:G,calendar:B}=$;return[q,G,B]}}function iX(X,Q,K){if(K||Q){if(!X.includes("-u-"))X+="-u";if(K)X+=`-ca-${K}`;if(Q)X+=`-nu-${Q}`;return X}else return X}function sX(X){const Q=[];for(let K=1;K<=12;K++){const $=N.utc(2009,K,1);Q.push(X($))}return Q}function rX(X){const Q=[];for(let K=1;K<=7;K++){const $=N.utc(2016,11,13+K);Q.push(X($))}return Q}function z0(X,Q,K,$){const q=X.listingMode();if(q==="error")return null;else if(q==="en")return K(Q);else return $(Q)}function nX(X){if(X.numberingSystem&&X.numberingSystem!=="latn")return!1;else return X.numberingSystem==="latn"||!X.locale||X.locale.startsWith("en")||new Intl.DateTimeFormat(X.intl).resolvedOptions().numberingSystem==="latn"}function d(X,Q){if(R(X)||X===null)return Q;else if(X instanceof t)return X;else if(tX(X)){const K=X.toLowerCase();if(K==="default")return Q;else if(K==="local"||K==="system")return W0.instance;else if(K==="utc"||K==="gmt")return j.utcInstance;else return j.parseSpecifier(K)||p.create(X)}else if(e(X))return j.instance(X);else if(typeof X==="object"&&"offset"in X&&typeof X.offset==="function")return X;else return new G1(X)}function k(X,Q){return new y("unit out of range",`you specified ${Q} (of type ${typeof Q}) as a ${X}, which is invalid`)}function B1(X,Q,K){const $=new Date(Date.UTC(X,Q-1,K));if(X<100&&X>=0)$.setUTCFullYear($.getUTCFullYear()-1900);const q=$.getUTCDay();return q===0?7:q}function F7(X,Q,K){return K+(E0(X)?Z7:L7)[Q-1]}function z7(X,Q){const K=E0(X)?Z7:L7,$=K.findIndex((G)=>G<Q),q=Q-K[$];return{month:$+1,day:q}}function V1(X,Q){return(X-Q+7)%7+1}function v0(X,Q=4,K=1){const{year:$,month:q,day:G}=X,B=F7($,q,G),V=V1(B1($,q,G),K);let J=Math.floor((B-V+14-Q)/7),C;if(J<1)C=$-1,J=_0(C,Q,K);else if(J>_0($,Q,K))C=$+1,J=1;else C=$;return{weekYear:C,weekNumber:J,weekday:V,...g0(X)}}function x1(X,Q=4,K=1){const{weekYear:$,weekNumber:q,weekday:G}=X,B=V1(B1($,1,Q),K),V=G0($);let J=q*7+G-B-7+Q,C;if(J<1)C=$-1,J+=G0(C);else if(J>V)C=$+1,J-=G0($);else C=$;const{month:U,day:_}=z7(C,J);return{year:C,month:U,day:_,...g0(X)}}function i0(X){const{year:Q,month:K,day:$}=X,q=F7(Q,K,$);return{year:Q,ordinal:q,...g0(X)}}function T1(X){const{year:Q,ordinal:K}=X,{month:$,day:q}=z7(Q,K);return{year:Q,month:$,day:q,...g0(X)}}function v1(X,Q){if(!R(X.localWeekday)||!R(X.localWeekNumber)||!R(X.localWeekYear)){if(!R(X.weekday)||!R(X.weekNumber)||!R(X.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");if(!R(X.localWeekday))X.weekday=X.localWeekday;if(!R(X.localWeekNumber))X.weekNumber=X.localWeekNumber;if(!R(X.localWeekYear))X.weekYear=X.localWeekYear;return delete X.localWeekday,delete X.localWeekNumber,delete X.localWeekYear,{minDaysInFirstWeek:Q.getMinDaysInFirstWeek(),startOfWeek:Q.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function oX(X,Q=4,K=1){const $=S0(X.weekYear),q=S(X.weekNumber,1,_0(X.weekYear,Q,K)),G=S(X.weekday,1,7);if(!$)return k("weekYear",X.weekYear);else if(!q)return k("week",X.weekNumber);else if(!G)return k("weekday",X.weekday);else return!1}function eX(X){const Q=S0(X.year),K=S(X.ordinal,1,G0(X.year));if(!Q)return k("year",X.year);else if(!K)return k("ordinal",X.ordinal);else return!1}function w7(X){const Q=S0(X.year),K=S(X.month,1,12),$=S(X.day,1,y0(X.year,X.month));if(!Q)return k("year",X.year);else if(!K)return k("month",X.month);else if(!$)return k("day",X.day);else return!1}function j7(X){const{hour:Q,minute:K,second:$,millisecond:q}=X,G=S(Q,0,23)||Q===24&&K===0&&$===0&&q===0,B=S(K,0,59),V=S($,0,59),J=S(q,0,999);if(!G)return k("hour",Q);else if(!B)return k("minute",K);else if(!V)return k("second",$);else if(!J)return k("millisecond",q);else return!1}function R(X){return typeof X==="undefined"}function e(X){return typeof X==="number"}function S0(X){return typeof X==="number"&&X%1===0}function tX(X){return typeof X==="string"}function X6(X){return Object.prototype.toString.call(X)==="[object Date]"}function I7(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat}catch(X){return!1}}function O7(){try{return typeof Intl!=="undefined"&&!!Intl.Locale&&(("weekInfo"in Intl.Locale.prototype)||("getWeekInfo"in Intl.Locale.prototype))}catch(X){return!1}}function Q6(X){return Array.isArray(X)?X:[X]}function y1(X,Q,K){if(X.length===0)return;return X.reduce(($,q)=>{const G=[Q(q),q];if(!$)return G;else if(K($[0],G[0])===$[0])return $;else return G},null)[1]}function K6(X,Q){return Q.reduce((K,$)=>{return K[$]=X[$],K},{})}function V0(X,Q){return Object.prototype.hasOwnProperty.call(X,Q)}function K1(X){if(X==null)return null;else if(typeof X!=="object")throw new O("Week settings must be an object");else{if(!S(X.firstDay,1,7)||!S(X.minimalDays,1,7)||!Array.isArray(X.weekend)||X.weekend.some((Q)=>!S(Q,1,7)))throw new O("Invalid week settings");return{firstDay:X.firstDay,minimalDays:X.minimalDays,weekend:Array.from(X.weekend)}}}function S(X,Q,K){return S0(X)&&X>=Q&&X<=K}function $6(X,Q){return X-Q*Math.floor(X/Q)}function Z(X,Q=2){const K=X<0;let $;if(K)$="-"+(""+-X).padStart(Q,"0");else $=(""+X).padStart(Q,"0");return $}function l(X){if(R(X)||X===null||X==="")return;else return parseInt(X,10)}function r(X){if(R(X)||X===null||X==="")return;else return parseFloat(X)}function J1(X){if(R(X)||X===null||X==="")return;else{const Q=parseFloat("0."+X)*1000;return Math.floor(Q)}}function C1(X,Q,K=!1){const $=10**Q;return(K?Math.trunc:Math.round)(X*$)/$}function E0(X){return X%4===0&&(X%100!==0||X%400===0)}function G0(X){return E0(X)?366:365}function y0(X,Q){const K=$6(Q-1,12)+1,$=X+(Q-K)/12;if(K===2)return E0($)?29:28;else return[31,null,31,30,31,30,31,31,30,31,30,31][K-1]}function b0(X){let Q=Date.UTC(X.year,X.month-1,X.day,X.hour,X.minute,X.second,X.millisecond);if(X.year<100&&X.year>=0)Q=new Date(Q),Q.setUTCFullYear(X.year,X.month-1,X.day);return+Q}function k1(X,Q,K){return-V1(B1(X,1,Q),K)+Q-1}function _0(X,Q=4,K=1){const $=k1(X,Q,K),q=k1(X+1,Q,K);return(G0(X)-$+q)/7}function $1(X){if(X>99)return X;else return X>L.twoDigitCutoffYear?1900+X:2000+X}function D7(X,Q,K,$=null){const q=new Date(X),G={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if($)G.timeZone=$;const B={timeZoneName:Q,...G},V=new Intl.DateTimeFormat(K,B).formatToParts(q).find((J)=>J.type.toLowerCase()==="timezonename");return V?V.value:null}function h0(X,Q){let K=parseInt(X,10);if(Number.isNaN(K))K=0;const $=parseInt(Q,10)||0,q=K<0||Object.is(K,-0)?-$:$;return K*60+q}function x7(X){const Q=Number(X);if(typeof X==="boolean"||X===""||Number.isNaN(Q))throw new O(`Invalid unit value ${X}`);return Q}function k0(X,Q){const K={};for(let $ in X)if(V0(X,$)){const q=X[$];if(q===void 0||q===null)continue;K[Q($)]=x7(q)}return K}function H0(X,Q){const K=Math.trunc(Math.abs(X/60)),$=Math.trunc(Math.abs(X%60)),q=X>=0?"+":"-";switch(Q){case"short":return`${q}${Z(K,2)}:${Z($,2)}`;case"narrow":return`${q}${K}${$>0?`:${$}`:""}`;case"techie":return`${q}${Z(K,2)}${Z($,2)}`;default:throw new RangeError(`Value format ${Q} is out of range for property format`)}}function g0(X){return K6(X,["hour","minute","second","millisecond"])}function v7(X){switch(X){case"narrow":return[...G6];case"short":return[...T7];case"long":return[...q6];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}}function S7(X){switch(X){case"narrow":return[...B6];case"short":return[...k7];case"long":return[...y7];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}function h7(X){switch(X){case"narrow":return[...C6];case"short":return[...J6];case"long":return[...V6];default:return null}}function Y6(X){return b7[X.hour<12?0:1]}function U6(X,Q){return S7(Q)[X.weekday-1]}function P6(X,Q){return v7(Q)[X.month-1]}function R6(X,Q){return h7(Q)[X.year<0?0:1]}function N6(X,Q,K="always",$=!1){const q={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."]},G=["hours","minutes","seconds"].indexOf(X)===-1;if(K==="auto"&&G){const _=X==="days";switch(Q){case 1:return _?"tomorrow":`next ${q[X][0]}`;case-1:return _?"yesterday":`last ${q[X][0]}`;case 0:return _?"today":`this ${q[X][0]}`}}const B=Object.is(Q,-0)||Q<0,V=Math.abs(Q),J=V===1,C=q[X],U=$?J?C[1]:C[2]||C[1]:J?q[X][0]:X;return B?`${V} ${U} ago`:`in ${V} ${U}`}function S1(X,Q){let K="";for(let $ of X)if($.literal)K+=$.val;else K+=Q($.val);return K}function J0(...X){const Q=X.reduce((K,$)=>K+$.source,"");return RegExp(`^${Q}\$`)}function C0(...X){return(Q)=>X.reduce(([K,$,q],G)=>{const[B,V,J]=G(Q,q);return[{...K,...B},V||$,J]},[{},null,1]).slice(0,2)}function Y0(X,...Q){if(X==null)return[null,null];for(let[K,$]of Q){const q=K.exec(X);if(q)return $(q)}return[null,null]}function f7(...X){return(Q,K)=>{const $={};let q;for(q=0;q<X.length;q++)$[X[q]]=l(Q[K+q]);return[$,null,K+q]}}function B0(X,Q,K){const $=X[Q];return R($)?K:l($)}function z6(X,Q){return[{year:B0(X,Q),month:B0(X,Q+1,1),day:B0(X,Q+2,1)},null,Q+3]}function U0(X,Q){return[{hours:B0(X,Q,0),minutes:B0(X,Q+1,0),seconds:B0(X,Q+2,0),milliseconds:J1(X[Q+3])},null,Q+4]}function M0(X,Q){const K=!X[Q]&&!X[Q+1],$=h0(X[Q+1],X[Q+2]),q=K?null:j.instance($);return[{},q,Q+3]}function L0(X,Q){const K=X[Q]?p.create(X[Q]):null;return[{},K,Q+1]}function I6(X){const[Q,K,$,q,G,B,V,J,C]=X,U=Q[0]==="-",_=J&&J[0]==="-",P=(A,D=!1)=>A!==void 0&&(D||A&&U)?-A:A;return[{years:P(r(K)),months:P(r($)),weeks:P(r(q)),days:P(r(G)),hours:P(r(B)),minutes:P(r(V)),seconds:P(r(J),J==="-0"),milliseconds:P(J1(C),_)}]}function P1(X,Q,K,$,q,G,B){const V={year:Q.length===2?$1(l(Q)):l(Q),month:T7.indexOf(K)+1,day:l($),hour:l(q),minute:l(G)};if(B)V.second=l(B);if(X)V.weekday=X.length>3?y7.indexOf(X)+1:k7.indexOf(X)+1;return V}function x6(X){const[,Q,K,$,q,G,B,V,J,C,U,_]=X,P=P1(Q,q,$,K,G,B,V);let A;if(J)A=O6[J];else if(C)A=0;else A=h0(U,_);return[P,new j(A)]}function T6(X){return X.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function b1(X){const[,Q,K,$,q,G,B,V]=X;return[P1(Q,q,$,K,G,B,V),j.utcInstance]}function S6(X){const[,Q,K,$,q,G,B,V]=X;return[P1(Q,V,K,$,q,G,B),j.utcInstance]}function u6(X){return Y0(X,[b6,u7],[h6,p6],[g6,c6],[f6,m6])}function l6(X){return Y0(T6(X),[D6,x6])}function d6(X){return Y0(X,[v6,b1],[y6,b1],[k6,S6])}function i6(X){return Y0(X,[j6,I6])}function r6(X){return Y0(X,[w6,s6])}function e6(X){return Y0(X,[n6,u7],[a6,o6])}function u(X,Q,K=!1){const $={values:K?Q.values:{...X.values,...Q.values||{}},loc:X.loc.clone(Q.loc),conversionAccuracy:Q.conversionAccuracy||X.conversionAccuracy,matrix:Q.matrix||X.matrix};return new H($)}function d7(X,Q){var K;let $=(K=Q.milliseconds)!=null?K:0;for(let q of Q8.slice(1))if(Q[q])$+=Q[q]*X[q].milliseconds;return $}function g1(X,Q){const K=d7(X,Q)<0?-1:1;o.reduceRight(($,q)=>{if(!R(Q[q])){if($){const G=Q[$]*K,B=X[q][$],V=Math.floor(G/B);Q[q]+=V*K,Q[$]-=V*B*K}return q}else return $},null),o.reduce(($,q)=>{if(!R(Q[q])){if($){const G=Q[$]%1;Q[$]-=G,Q[q]+=G*X[$][q]}return q}else return $},null)}function K8(X){const Q={};for(let[K,$]of Object.entries(X))if($!==0)Q[K]=$;return Q}function $8(X,Q){if(!X||!X.isValid)return M.invalid("missing or invalid start");else if(!Q||!Q.isValid)return M.invalid("missing or invalid end");else if(Q<X)return M.invalid("end before start",`The end of an interval must be after its start, but you had start=${X.toISO()} and end=${Q.toISO()}`);else return null}function f1(X,Q){const K=(q)=>q.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),$=K(Q)-K(X);return Math.floor(H.fromMillis($).as("days"))}function q8(X,Q,K){const $=[["years",(J,C)=>C.year-J.year],["quarters",(J,C)=>C.quarter-J.quarter+(C.year-J.year)*4],["months",(J,C)=>C.month-J.month+(C.year-J.year)*12],["weeks",(J,C)=>{const U=f1(J,C);return(U-U%7)/7}],["days",f1]],q={},G=X;let B,V;for(let[J,C]of $)if(K.indexOf(J)>=0)if(B=J,q[J]=C(X,Q),V=G.plus(q),V>Q){if(q[J]--,X=G.plus(q),X>Q)V=X,q[J]--,X=G.plus(q)}else X=V;return[X,q,V,B]}function G8(X,Q,K,$){let[q,G,B,V]=q8(X,Q,K);const J=Q-q,C=K.filter((_)=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);if(C.length===0){if(B<Q)B=q.plus({[V]:1});if(B!==q)G[V]=(G[V]||0)+J/(B-q)}const U=H.fromObject(G,$);if(C.length>0)return H.fromMillis(J,$).shiftTo(...C).plus(U);else return U}function V8(X){let Q=parseInt(X,10);if(isNaN(Q)){Q="";for(let K=0;K<X.length;K++){const $=X.charCodeAt(K);if(X[K].search(R1.hanidec)!==-1)Q+=B8.indexOf(X[K]);else for(let q in p1){const[G,B]=p1[q];if($>=G&&$<=B)Q+=$-G}}return parseInt(Q,10)}else return Q}function b({numberingSystem:X},Q=""){return new RegExp(`${R1[X||"latn"]}${Q}`)}function W(X,Q=(K)=>K){return{regex:X,deser:([K])=>Q(V8(K))}}function Y8(X){return X.replace(/\./g,"\\.?").replace(s7,i7)}function c1(X){return X.replace(/\./g,"").replace(s7," ").toLowerCase()}function h(X,Q){if(X===null)return null;else return{regex:RegExp(X.map(Y8).join("|")),deser:([K])=>X.findIndex(($)=>c1(K)===c1($))+Q}}function m1(X,Q){return{regex:X,deser:([,K,$])=>h0(K,$),groups:Q}}function w0(X){return{regex:X,deser:([Q])=>Q}}function U8(X){return X.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function P8(X,Q){const K=b(Q),$=b(Q,"{2}"),q=b(Q,"{3}"),G=b(Q,"{4}"),B=b(Q,"{6}"),V=b(Q,"{1,2}"),J=b(Q,"{1,3}"),C=b(Q,"{1,6}"),U=b(Q,"{1,9}"),_=b(Q,"{2,4}"),P=b(Q,"{4,6}"),A=(T)=>({regex:RegExp(U8(T.val)),deser:([f])=>f,literal:!0}),F=((T)=>{if(X.literal)return A(T);switch(T.val){case"G":return h(Q.eras("short"),0);case"GG":return h(Q.eras("long"),0);case"y":return W(C);case"yy":return W(_,$1);case"yyyy":return W(G);case"yyyyy":return W(P);case"yyyyyy":return W(B);case"M":return W(V);case"MM":return W($);case"MMM":return h(Q.months("short",!0),1);case"MMMM":return h(Q.months("long",!0),1);case"L":return W(V);case"LL":return W($);case"LLL":return h(Q.months("short",!1),1);case"LLLL":return h(Q.months("long",!1),1);case"d":return W(V);case"dd":return W($);case"o":return W(J);case"ooo":return W(q);case"HH":return W($);case"H":return W(V);case"hh":return W($);case"h":return W(V);case"mm":return W($);case"m":return W(V);case"q":return W(V);case"qq":return W($);case"s":return W(V);case"ss":return W($);case"S":return W(J);case"SSS":return W(q);case"u":return w0(U);case"uu":return w0(V);case"uuu":return W(K);case"a":return h(Q.meridiems(),0);case"kkkk":return W(G);case"kk":return W(_,$1);case"W":return W(V);case"WW":return W($);case"E":case"c":return W(K);case"EEE":return h(Q.weekdays("short",!1),1);case"EEEE":return h(Q.weekdays("long",!1),1);case"ccc":return h(Q.weekdays("short",!0),1);case"cccc":return h(Q.weekdays("long",!0),1);case"Z":case"ZZ":return m1(new RegExp(`([+-]${V.source})(?::(${$.source}))?`),2);case"ZZZ":return m1(new RegExp(`([+-]${V.source})(${$.source})?`),2);case"z":return w0(/[a-z_+-/]{1,256}?/i);case" ":return w0(/[^\S\n\r]/);default:return A(T)}})(X)||{invalidReason:J8};return F.token=X,F}function N8(X,Q,K){const{type:$,value:q}=X;if($==="literal"){const J=/^\s+$/.test(q);return{literal:!J,val:J?" ":q}}const G=Q[$];let B=$;if($==="hour")if(Q.hour12!=null)B=Q.hour12?"hour12":"hour24";else if(Q.hourCycle!=null)if(Q.hourCycle==="h11"||Q.hourCycle==="h12")B="hour12";else B="hour24";else B=K.hour12?"hour12":"hour24";let V=R8[B];if(typeof V==="object")V=V[G];if(V)return{literal:!1,val:V};return}function A8(X){return[`^${X.map((K)=>K.regex).reduce((K,$)=>`${K}(${$.source})`,"")}\$`,X]}function H8(X,Q,K){const $=X.match(Q);if($){const q={};let G=1;for(let B in K)if(V0(K,B)){const V=K[B],J=V.groups?V.groups+1:1;if(!V.literal&&V.token)q[V.token.val[0]]=V.deser($.slice(G,G+J));G+=J}return[$,q]}else return[$,{}]}function _8(X){const Q=(G)=>{switch(G){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let K=null,$;if(!R(X.z))K=p.create(X.z);if(!R(X.Z)){if(!K)K=new j(X.Z);$=X.Z}if(!R(X.q))X.M=(X.q-1)*3+1;if(!R(X.h)){if(X.h<12&&X.a===1)X.h+=12;else if(X.h===12&&X.a===0)X.h=0}if(X.G===0&&X.y)X.y=-X.y;if(!R(X.u))X.S=J1(X.u);return[Object.keys(X).reduce((G,B)=>{const V=Q(B);if(V)G[V]=X[B];return G},{}),K,$]}function W8(){if(!s0)s0=N.fromMillis(1555555555555);return s0}function E8(X,Q){if(X.literal)return X;const K=w.macroTokenToFormatOpts(X.val),$=a7(K,Q);if($==null||$.includes(void 0))return X;return $}function r7(X,Q){return Array.prototype.concat(...X.map((K)=>E8(K,Q)))}function n7(X,Q,K){const $=r7(w.parseFormat(K),X),q=$.map((B)=>P8(B,X)),G=q.find((B)=>B.invalidReason);if(G)return{input:Q,tokens:$,invalidReason:G.invalidReason};else{const[B,V]=A8(q),J=RegExp(B,"i"),[C,U]=H8(Q,J,V),[_,P,A]=U?_8(U):[null,null,void 0];if(V0(U,"a")&&V0(U,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:Q,tokens:$,regex:J,rawMatches:C,matches:U,result:_,zone:P,specificOffset:A}}}function M8(X,Q,K){const{result:$,zone:q,specificOffset:G,invalidReason:B}=n7(X,Q,K);return[$,q,G,B]}function a7(X,Q){if(!X)return null;const $=w.create(Q,X).dtFormatter(W8()),q=$.formatToParts(),G=$.resolvedOptions();return q.map((B)=>N8(B,X,G))}function j0(X){return new y("unsupported zone",`the zone "${X.name}" is not supported`)}function n0(X){if(X.weekData===null)X.weekData=v0(X.c);return X.weekData}function a0(X){if(X.localWeekData===null)X.localWeekData=v0(X.c,X.loc.getMinDaysInFirstWeek(),X.loc.getStartOfWeek());return X.localWeekData}function n(X,Q){const K={ts:X.ts,zone:X.zone,c:X.c,o:X.o,loc:X.loc,invalid:X.invalid};return new N({...K,...Q,old:K})}function o7(X,Q,K){let $=X-Q*60*1000;const q=K.offset($);if(Q===q)return[$,Q];$-=(q-Q)*60*1000;const G=K.offset($);if(q===G)return[$,q];return[X-Math.min(q,G)*60*1000,Math.max(q,G)]}function I0(X,Q){X+=Q*60*1000;const K=new Date(X);return{year:K.getUTCFullYear(),month:K.getUTCMonth()+1,day:K.getUTCDate(),hour:K.getUTCHours(),minute:K.getUTCMinutes(),second:K.getUTCSeconds(),millisecond:K.getUTCMilliseconds()}}function x0(X,Q,K){return o7(b0(X),Q,K)}function l1(X,Q){const K=X.o,$=X.c.year+Math.trunc(Q.years),q=X.c.month+Math.trunc(Q.months)+Math.trunc(Q.quarters)*3,G={...X.c,year:$,month:q,day:Math.min(X.c.day,y0($,q))+Math.trunc(Q.days)+Math.trunc(Q.weeks)*7},B=H.fromObject({years:Q.years-Math.trunc(Q.years),quarters:Q.quarters-Math.trunc(Q.quarters),months:Q.months-Math.trunc(Q.months),weeks:Q.weeks-Math.trunc(Q.weeks),days:Q.days-Math.trunc(Q.days),hours:Q.hours,minutes:Q.minutes,seconds:Q.seconds,milliseconds:Q.milliseconds}).as("milliseconds"),V=b0(G);let[J,C]=o7(V,K,X.zone);if(B!==0)J+=B,C=X.zone.offset(J);return{ts:J,o:C}}function R0(X,Q,K,$,q,G){const{setZone:B,zone:V}=K;if(X&&Object.keys(X).length!==0||Q){const J=Q||V,C=N.fromObject(X,{...K,zone:J,specificOffset:G});return B?C:C.setZone(V)}else return N.invalid(new y("unparsable",`the input "${q}" can't be parsed as ${$}`))}function O0(X,Q,K=!0){return X.isValid?w.create(E.create("en-US"),{allowZ:K,forceSimple:!0}).formatDateTimeFromString(X,Q):null}function o0(X,Q){const K=X.c.year>9999||X.c.year<0;let $="";if(K&&X.c.year>=0)$+="+";if($+=Z(X.c.year,K?6:4),Q)$+="-",$+=Z(X.c.month),$+="-",$+=Z(X.c.day);else $+=Z(X.c.month),$+=Z(X.c.day);return $}function d1(X,Q,K,$,q,G){let B=Z(X.c.hour);if(Q){if(B+=":",B+=Z(X.c.minute),X.c.millisecond!==0||X.c.second!==0||!K)B+=":"}else B+=Z(X.c.minute);if(X.c.millisecond!==0||X.c.second!==0||!K){if(B+=Z(X.c.second),X.c.millisecond!==0||!$)B+=".",B+=Z(X.c.millisecond,3)}if(q)if(X.isOffsetFixed&&X.offset===0&&!G)B+="Z";else if(X.o<0)B+="-",B+=Z(Math.trunc(-X.o/60)),B+=":",B+=Z(Math.trunc(-X.o%60));else B+="+",B+=Z(Math.trunc(X.o/60)),B+=":",B+=Z(Math.trunc(X.o%60));if(G)B+="["+X.zone.ianaName+"]";return B}function w8(X){const Q={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[X.toLowerCase()];if(!Q)throw new q1(X);return Q}function i1(X){switch(X.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return w8(X)}}function s1(X,Q){const K=d(Q.zone,L.defaultZone),$=E.fromObject(Q),q=L.now();let G,B;if(!R(X.year)){for(let C of t7)if(R(X[C]))X[C]=e7[C];const V=w7(X)||j7(X);if(V)return N.invalid(V);const J=K.offset(q);[G,B]=x0(X,J,K)}else G=q;return new N({ts:G,zone:K,loc:$,o:B})}function r1(X,Q,K){const $=R(K.round)?!0:K.round,q=(B,V)=>{return B=C1(B,$||K.calendary?0:2,!0),Q.loc.clone(K).relFormatter(K).format(B,V)},G=(B)=>{if(K.calendary)if(!Q.hasSame(X,B))return Q.startOf(B).diff(X.startOf(B),B).get(B);else return 0;else return Q.diff(X,B).get(B)};if(K.unit)return q(G(K.unit),K.unit);for(let B of K.units){const V=G(B);if(Math.abs(V)>=1)return q(V,B)}return q(X>Q?-0:0,K.units[K.units.length-1])}function n1(X){let Q={},K;if(X.length>0&&typeof X[X.length-1]==="object")Q=X[X.length-1],K=Array.from(X).slice(0,X.length-1);else K=Array.from(X);return[Q,K]}function N0(X){if(N.isDateTime(X))return X;else if(X&&X.valueOf&&e(X.valueOf()))return N.fromJSDate(X);else if(X&&typeof X==="object")return N.fromObject(X);else throw new O(`Unknown datetime argument: ${X}, of type ${typeof X}`)}Object.defineProperty(XX,"__esModule",{value:!0});class i extends Error{}class a1 extends i{constructor(X){super(`Invalid DateTime: ${X.toMessage()}`)}}class o1 extends i{constructor(X){super(`Invalid Interval: ${X.toMessage()}`)}}class e1 extends i{constructor(X){super(`Invalid Duration: ${X.toMessage()}`)}}class a extends i{}class q1 extends i{constructor(X){super(`Invalid unit ${X}`)}}class O extends i{}class m extends i{constructor(){super("Zone is an abstract class")}}var Y="numeric",g="short",x="long",T0={year:Y,month:Y,day:Y},t1={year:Y,month:g,day:Y},kX={year:Y,month:g,day:Y,weekday:g},X7={year:Y,month:x,day:Y},Q7={year:Y,month:x,day:Y,weekday:x},K7={hour:Y,minute:Y},$7={hour:Y,minute:Y,second:Y},q7={hour:Y,minute:Y,second:Y,timeZoneName:g},G7={hour:Y,minute:Y,second:Y,timeZoneName:x},B7={hour:Y,minute:Y,hourCycle:"h23"},V7={hour:Y,minute:Y,second:Y,hourCycle:"h23"},J7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:g},C7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:x},Y7={year:Y,month:Y,day:Y,hour:Y,minute:Y},U7={year:Y,month:Y,day:Y,hour:Y,minute:Y,second:Y},P7={year:Y,month:g,day:Y,hour:Y,minute:Y},R7={year:Y,month:g,day:Y,hour:Y,minute:Y,second:Y},SX={year:Y,month:g,day:Y,weekday:g,hour:Y,minute:Y},N7={year:Y,month:x,day:Y,hour:Y,minute:Y,timeZoneName:g},A7={year:Y,month:x,day:Y,hour:Y,minute:Y,second:Y,timeZoneName:g},H7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,timeZoneName:x},_7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,second:Y,timeZoneName:x};class t{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(X,Q){throw new m}formatOffset(X,Q){throw new m}offset(X){throw new m}equals(X){throw new m}get isValid(){throw new m}}var l0=null;class W0 extends t{static get instance(){if(l0===null)l0=new W0;return l0}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){return-new Date(X).getTimezoneOffset()}equals(X){return X.type==="system"}get isValid(){return!0}}var D0={},hX={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},F0={};class p extends t{static create(X){if(!F0[X])F0[X]=new p(X);return F0[X]}static resetCache(){F0={},D0={}}static isValidSpecifier(X){return this.isValidZone(X)}static isValidZone(X){if(!X)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:X}).format(),!0}catch(Q){return!1}}constructor(X){super();this.zoneName=X,this.valid=p.isValidZone(X)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K,this.name)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){const Q=new Date(X);if(isNaN(Q))return NaN;const K=bX(this.name);let[$,q,G,B,V,J,C]=K.formatToParts?fX(K,Q):gX(K,Q);if(B==="BC")$=-Math.abs($)+1;const _=b0({year:$,month:q,day:G,hour:V===24?0:V,minute:J,second:C,millisecond:0});let P=+Q;const A=P%1000;return P-=A>=0?A:1000+A,(_-P)/60000}equals(X){return X.type==="iana"&&X.name===this.name}get isValid(){return this.valid}}var M1={},e0={},X1={},Q1={},A0=null,L1={};class W7{constructor(X,Q,K){this.padTo=K.padTo||0,this.floor=K.floor||!1;const{padTo:$,floor:q,...G}=K;if(!Q||Object.keys(G).length>0){const B={useGrouping:!1,...K};if(K.padTo>0)B.minimumIntegerDigits=K.padTo;this.inf=cX(X,B)}}format(X){if(this.inf){const Q=this.floor?Math.floor(X):X;return this.inf.format(Q)}else{const Q=this.floor?Math.floor(X):C1(X,3);return Z(Q,this.padTo)}}}class E7{constructor(X,Q,K){this.opts=K,this.originalZone=void 0;let $=void 0;if(this.opts.timeZone)this.dt=X;else if(X.zone.type==="fixed"){const G=-1*(X.offset/60),B=G>=0?`Etc/GMT+${G}`:`Etc/GMT${G}`;if(X.offset!==0&&p.create(B).valid)$=B,this.dt=X;else $="UTC",this.dt=X.offset===0?X:X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone}else if(X.zone.type==="system")this.dt=X;else if(X.zone.type==="iana")this.dt=X,$=X.zone.name;else $="UTC",this.dt=X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone;const q={...this.opts};q.timeZone=q.timeZone||$,this.dtf=t0(Q,q)}format(){if(this.originalZone)return this.formatToParts().map(({value:X})=>X).join("");return this.dtf.format(this.dt.toJSDate())}formatToParts(){const X=this.dtf.formatToParts(this.dt.toJSDate());if(this.originalZone)return X.map((Q)=>{if(Q.type==="timeZoneName"){const K=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...Q,value:K}}else return Q});return X}resolvedOptions(){return this.dtf.resolvedOptions()}}class M7{constructor(X,Q,K){if(this.opts={style:"long",...K},!Q&&I7())this.rtf=mX(X,K)}format(X,Q){if(this.rtf)return this.rtf.format(X,Q);else return N6(Q,X,this.opts.numeric,this.opts.style!=="long")}formatToParts(X,Q){if(this.rtf)return this.rtf.formatToParts(X,Q);else return[]}}var aX={firstDay:1,minimalDays:4,weekend:[6,7]};class E{static fromOpts(X){return E.create(X.locale,X.numberingSystem,X.outputCalendar,X.weekSettings,X.defaultToEN)}static create(X,Q,K,$,q=!1){const G=X||L.defaultLocale,B=G||(q?"en-US":uX()),V=Q||L.defaultNumberingSystem,J=K||L.defaultOutputCalendar,C=K1($)||L.defaultWeekSettings;return new E(B,V,J,C,G)}static resetCache(){A0=null,e0={},X1={},Q1={}}static fromObject({locale:X,numberingSystem:Q,outputCalendar:K,weekSettings:$}={}){return E.create(X,Q,K,$)}constructor(X,Q,K,$,q){const[G,B,V]=dX(X);this.locale=G,this.numberingSystem=Q||B||null,this.outputCalendar=K||V||null,this.weekSettings=$,this.intl=iX(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=q,this.fastNumbersCached=null}get fastNumbers(){if(this.fastNumbersCached==null)this.fastNumbersCached=nX(this);return this.fastNumbersCached}listingMode(){const X=this.isEnglish(),Q=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return X&&Q?"en":"intl"}clone(X){if(!X||Object.getOwnPropertyNames(X).length===0)return this;else return E.create(X.locale||this.specifiedLocale,X.numberingSystem||this.numberingSystem,X.outputCalendar||this.outputCalendar,K1(X.weekSettings)||this.weekSettings,X.defaultToEN||!1)}redefaultToEN(X={}){return this.clone({...X,defaultToEN:!0})}redefaultToSystem(X={}){return this.clone({...X,defaultToEN:!1})}months(X,Q=!1){return z0(this,X,v7,()=>{const K=Q?{month:X,day:"numeric"}:{month:X},$=Q?"format":"standalone";if(!this.monthsCache[$][X])this.monthsCache[$][X]=sX((q)=>this.extract(q,K,"month"));return this.monthsCache[$][X]})}weekdays(X,Q=!1){return z0(this,X,S7,()=>{const K=Q?{weekday:X,year:"numeric",month:"long",day:"numeric"}:{weekday:X},$=Q?"format":"standalone";if(!this.weekdaysCache[$][X])this.weekdaysCache[$][X]=rX((q)=>this.extract(q,K,"weekday"));return this.weekdaysCache[$][X]})}meridiems(){return z0(this,void 0,()=>b7,()=>{if(!this.meridiemCache){const X={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[N.utc(2016,11,13,9),N.utc(2016,11,13,19)].map((Q)=>this.extract(Q,X,"dayperiod"))}return this.meridiemCache})}eras(X){return z0(this,X,h7,()=>{const Q={era:X};if(!this.eraCache[X])this.eraCache[X]=[N.utc(-40,1,1),N.utc(2017,1,1)].map((K)=>this.extract(K,Q,"era"));return this.eraCache[X]})}extract(X,Q,K){const $=this.dtFormatter(X,Q),q=$.formatToParts(),G=q.find((B)=>B.type.toLowerCase()===K);return G?G.value:null}numberFormatter(X={}){return new W7(this.intl,X.forceSimple||this.fastNumbers,X)}dtFormatter(X,Q={}){return new E7(X,this.intl,Q)}relFormatter(X={}){return new M7(this.intl,this.isEnglish(),X)}listFormatter(X={}){return pX(this.intl,X)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){if(this.weekSettings)return this.weekSettings;else if(!O7())return aX;else return lX(this.locale)}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(X){return this.locale===X.locale&&this.numberingSystem===X.numberingSystem&&this.outputCalendar===X.outputCalendar}}var d0=null;class j extends t{static get utcInstance(){if(d0===null)d0=new j(0);return d0}static instance(X){return X===0?j.utcInstance:new j(X)}static parseSpecifier(X){if(X){const Q=X.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(Q)return new j(h0(Q[1],Q[2]))}return null}constructor(X){super();this.fixed=X}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${H0(this.fixed,"narrow")}`}get ianaName(){if(this.fixed===0)return"Etc/UTC";else return`Etc/GMT${H0(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(X,Q){return H0(this.fixed,Q)}get isUniversal(){return!0}offset(){return this.fixed}equals(X){return X.type==="fixed"&&X.fixed===this.fixed}get isValid(){return!0}}class G1 extends t{constructor(X){super();this.zoneName=X}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}}var Z1=()=>Date.now(),F1="system",z1=null,w1=null,j1=null,I1=60,O1,D1=null;class L{static get now(){return Z1}static set now(X){Z1=X}static set defaultZone(X){F1=X}static get defaultZone(){return d(F1,W0.instance)}static get defaultLocale(){return z1}static set defaultLocale(X){z1=X}static get defaultNumberingSystem(){return w1}static set defaultNumberingSystem(X){w1=X}static get defaultOutputCalendar(){return j1}static set defaultOutputCalendar(X){j1=X}static get defaultWeekSettings(){return D1}static set defaultWeekSettings(X){D1=K1(X)}static get twoDigitCutoffYear(){return I1}static set twoDigitCutoffYear(X){I1=X%100}static get throwOnInvalid(){return O1}static set throwOnInvalid(X){O1=X}static resetCaches(){E.resetCache(),p.resetCache()}}class y{constructor(X,Q){this.reason=X,this.explanation=Q}toMessage(){if(this.explanation)return`${this.reason}: ${this.explanation}`;else return this.reason}}var L7=[0,31,59,90,120,151,181,212,243,273,304,334],Z7=[0,31,60,91,121,152,182,213,244,274,305,335],q6=["January","February","March","April","May","June","July","August","September","October","November","December"],T7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],G6=["J","F","M","A","M","J","J","A","S","O","N","D"],y7=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],k7=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],B6=["M","T","W","T","F","S","S"],b7=["AM","PM"],V6=["Before Christ","Anno Domini"],J6=["BC","AD"],C6=["B","A"],A6={D:T0,DD:t1,DDD:X7,DDDD:Q7,t:K7,tt:$7,ttt:q7,tttt:G7,T:B7,TT:V7,TTT:J7,TTTT:C7,f:Y7,ff:P7,fff:N7,ffff:H7,F:U7,FF:R7,FFF:A7,FFFF:_7};class w{static create(X,Q={}){return new w(X,Q)}static parseFormat(X){let Q=null,K="",$=!1;const q=[];for(let G=0;G<X.length;G++){const B=X.charAt(G);if(B==="'"){if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});Q=null,K="",$=!$}else if($)K+=B;else if(B===Q)K+=B;else{if(K.length>0)q.push({literal:/^\s+$/.test(K),val:K});K=B,Q=B}}if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});return q}static macroTokenToFormatOpts(X){return A6[X]}constructor(X,Q){this.opts=Q,this.loc=X,this.systemLoc=null}formatWithSystemDefault(X,Q){if(this.systemLoc===null)this.systemLoc=this.loc.redefaultToSystem();return this.systemLoc.dtFormatter(X,{...this.opts,...Q}).format()}dtFormatter(X,Q={}){return this.loc.dtFormatter(X,{...this.opts,...Q})}formatDateTime(X,Q){return this.dtFormatter(X,Q).format()}formatDateTimeParts(X,Q){return this.dtFormatter(X,Q).formatToParts()}formatInterval(X,Q){return this.dtFormatter(X.start,Q).dtf.formatRange(X.start.toJSDate(),X.end.toJSDate())}resolvedOptions(X,Q){return this.dtFormatter(X,Q).resolvedOptions()}num(X,Q=0){if(this.opts.forceSimple)return Z(X,Q);const K={...this.opts};if(Q>0)K.padTo=Q;return this.loc.numberFormatter(K).format(X)}formatDateTimeFromString(X,Q){const K=this.loc.listingMode()==="en",$=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",q=(P,A)=>this.loc.extract(X,P,A),G=(P)=>{if(X.isOffsetFixed&&X.offset===0&&P.allowZ)return"Z";return X.isValid?X.zone.formatOffset(X.ts,P.format):""},B=()=>K?Y6(X):q({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(P,A)=>K?P6(X,P):q(A?{month:P}:{month:P,day:"numeric"},"month"),J=(P,A)=>K?U6(X,P):q(A?{weekday:P}:{weekday:P,month:"long",day:"numeric"},"weekday"),C=(P)=>{const A=w.macroTokenToFormatOpts(P);if(A)return this.formatWithSystemDefault(X,A);else return P},U=(P)=>K?R6(X,P):q({era:P},"era"),_=(P)=>{switch(P){case"S":return this.num(X.millisecond);case"u":case"SSS":return this.num(X.millisecond,3);case"s":return this.num(X.second);case"ss":return this.num(X.second,2);case"uu":return this.num(Math.floor(X.millisecond/10),2);case"uuu":return this.num(Math.floor(X.millisecond/100));case"m":return this.num(X.minute);case"mm":return this.num(X.minute,2);case"h":return this.num(X.hour%12===0?12:X.hour%12);case"hh":return this.num(X.hour%12===0?12:X.hour%12,2);case"H":return this.num(X.hour);case"HH":return this.num(X.hour,2);case"Z":return G({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return G({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return G({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return X.zone.offsetName(X.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return X.zone.offsetName(X.ts,{format:"long",locale:this.loc.locale});case"z":return X.zoneName;case"a":return B();case"d":return $?q({day:"numeric"},"day"):this.num(X.day);case"dd":return $?q({day:"2-digit"},"day"):this.num(X.day,2);case"c":return this.num(X.weekday);case"ccc":return J("short",!0);case"cccc":return J("long",!0);case"ccccc":return J("narrow",!0);case"E":return this.num(X.weekday);case"EEE":return J("short",!1);case"EEEE":return J("long",!1);case"EEEEE":return J("narrow",!1);case"L":return $?q({month:"numeric",day:"numeric"},"month"):this.num(X.month);case"LL":return $?q({month:"2-digit",day:"numeric"},"month"):this.num(X.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return $?q({month:"numeric"},"month"):this.num(X.month);case"MM":return $?q({month:"2-digit"},"month"):this.num(X.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return $?q({year:"numeric"},"year"):this.num(X.year);case"yy":return $?q({year:"2-digit"},"year"):this.num(X.year.toString().slice(-2),2);case"yyyy":return $?q({year:"numeric"},"year"):this.num(X.year,4);case"yyyyyy":return $?q({year:"numeric"},"year"):this.num(X.year,6);case"G":return U("short");case"GG":return U("long");case"GGGGG":return U("narrow");case"kk":return this.num(X.weekYear.toString().slice(-2),2);case"kkkk":return this.num(X.weekYear,4);case"W":return this.num(X.weekNumber);case"WW":return this.num(X.weekNumber,2);case"n":return this.num(X.localWeekNumber);case"nn":return this.num(X.localWeekNumber,2);case"ii":return this.num(X.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(X.localWeekYear,4);case"o":return this.num(X.ordinal);case"ooo":return this.num(X.ordinal,3);case"q":return this.num(X.quarter);case"qq":return this.num(X.quarter,2);case"X":return this.num(Math.floor(X.ts/1000));case"x":return this.num(X.ts);default:return C(P)}};return S1(w.parseFormat(Q),_)}formatDurationFromString(X,Q){const K=(V)=>{switch(V[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}},$=(V)=>(J)=>{const C=K(J);if(C)return this.num(V.get(C),J.length);else return J},q=w.parseFormat(Q),G=q.reduce((V,{literal:J,val:C})=>J?V:V.concat(C),[]),B=X.shiftTo(...G.map(K).filter((V)=>V));return S1(q,$(B))}}var g7=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,p7=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,H6=`(?:${p7.source}?(?:\\[(${g7.source})\\])?)?`,Y1=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,c7=RegExp(`${Y1.source}${H6}`),U1=RegExp(`(?:T${c7.source})?`),_6=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,W6=/(\d{4})-?W(\d\d)(?:-?(\d))?/,E6=/(\d{4})-?(\d{3})/,M6=f7("weekYear","weekNumber","weekDay"),L6=f7("year","ordinal"),Z6=/(\d{4})-(\d\d)-(\d\d)/,m7=RegExp(`${Y1.source} ?(?:${p7.source}|(${g7.source}))?`),F6=RegExp(`(?: ${m7.source})?`),w6=RegExp(`^T?${Y1.source}\$`),j6=/^-?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)?)?)$/,O6={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},D6=/^(?:(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)))$/,v6=/^(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$/,y6=/^(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$/,k6=/^(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})$/,b6=J0(_6,U1),h6=J0(W6,U1),g6=J0(E6,U1),f6=J0(c7),u7=C0(z6,U0,M0,L0),p6=C0(M6,U0,M0,L0),c6=C0(L6,U0,M0,L0),m6=C0(U0,M0,L0),s6=C0(U0),n6=J0(Z6,F6),a6=J0(m7),o6=C0(U0,M0,L0),h1="Invalid Duration",l7={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:604800000},days:{hours:24,minutes:1440,seconds:86400,milliseconds:86400000},hours:{minutes:60,seconds:3600,milliseconds:3600000},minutes:{seconds:60,milliseconds:60000},seconds:{milliseconds:1000}},t6={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536000,milliseconds:31536000000},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:7862400000},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592000,milliseconds:2592000000},...l7},v=365.2425,K0=30.436875,X8={years:{quarters:4,months:12,weeks:v/7,days:v,hours:v*24,minutes:v*24*60,seconds:v*24*60*60,milliseconds:v*24*60*60*1000},quarters:{months:3,weeks:v/28,days:v/4,hours:v*24/4,minutes:v*24*60/4,seconds:v*24*60*60/4,milliseconds:v*24*60*60*1000/4},months:{weeks:K0/7,days:K0,hours:K0*24,minutes:K0*24*60,seconds:K0*24*60*60,milliseconds:K0*24*60*60*1000},...l7},o=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Q8=o.slice(0).reverse();class H{constructor(X){const Q=X.conversionAccuracy==="longterm"||!1;let K=Q?X8:t6;if(X.matrix)K=X.matrix;this.values=X.values,this.loc=X.loc||E.create(),this.conversionAccuracy=Q?"longterm":"casual",this.invalid=X.invalid||null,this.matrix=K,this.isLuxonDuration=!0}static fromMillis(X,Q){return H.fromObject({milliseconds:X},Q)}static fromObject(X,Q={}){if(X==null||typeof X!=="object")throw new O(`Duration.fromObject: argument expected to be an object, got ${X===null?"null":typeof X}`);return new H({values:k0(X,H.normalizeUnit),loc:E.fromObject(Q),conversionAccuracy:Q.conversionAccuracy,matrix:Q.matrix})}static fromDurationLike(X){if(e(X))return H.fromMillis(X);else if(H.isDuration(X))return X;else if(typeof X==="object")return H.fromObject(X);else throw new O(`Unknown duration argument ${X} of type ${typeof X}`)}static fromISO(X,Q){const[K]=i6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static fromISOTime(X,Q){const[K]=r6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Duration is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new e1(K);else return new H({invalid:K})}static normalizeUnit(X){const Q={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"}[X?X.toLowerCase():X];if(!Q)throw new q1(X);return Q}static isDuration(X){return X&&X.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(X,Q={}){const K={...Q,floor:Q.round!==!1&&Q.floor!==!1};return this.isValid?w.create(this.loc,K).formatDurationFromString(this,X):h1}toHuman(X={}){if(!this.isValid)return h1;const Q=o.map((K)=>{const $=this.values[K];if(R($))return null;return this.loc.numberFormatter({style:"unit",unitDisplay:"long",...X,unit:K.slice(0,-1)}).format($)}).filter((K)=>K);return this.loc.listFormatter({type:"conjunction",style:X.listStyle||"narrow",...X}).format(Q)}toObject(){if(!this.isValid)return{};return{...this.values}}toISO(){if(!this.isValid)return null;let X="P";if(this.years!==0)X+=this.years+"Y";if(this.months!==0||this.quarters!==0)X+=this.months+this.quarters*3+"M";if(this.weeks!==0)X+=this.weeks+"W";if(this.days!==0)X+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)X+="T";if(this.hours!==0)X+=this.hours+"H";if(this.minutes!==0)X+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0)X+=C1(this.seconds+this.milliseconds/1000,3)+"S";if(X==="P")X+="T0S";return X}toISOTime(X={}){if(!this.isValid)return null;const Q=this.toMillis();if(Q<0||Q>=86400000)return null;return X={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...X,includeOffset:!1},N.fromMillis(Q,{zone:"UTC"}).toISOTime(X)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Duration { values: ${JSON.stringify(this.values)} }`;else return`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){if(!this.isValid)return NaN;return d7(this.matrix,this.values)}valueOf(){return this.toMillis()}plus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X),K={};for(let $ of o)if(V0(Q.values,$)||V0(this.values,$))K[$]=Q.get($)+this.get($);return u(this,{values:K},!0)}minus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X);return this.plus(Q.negate())}mapUnits(X){if(!this.isValid)return this;const Q={};for(let K of Object.keys(this.values))Q[K]=x7(X(this.values[K],K));return u(this,{values:Q},!0)}get(X){return this[H.normalizeUnit(X)]}set(X){if(!this.isValid)return this;const Q={...this.values,...k0(X,H.normalizeUnit)};return u(this,{values:Q})}reconfigure({locale:X,numberingSystem:Q,conversionAccuracy:K,matrix:$}={}){const G={loc:this.loc.clone({locale:X,numberingSystem:Q}),matrix:$,conversionAccuracy:K};return u(this,G)}as(X){return this.isValid?this.shiftTo(X).get(X):NaN}normalize(){if(!this.isValid)return this;const X=this.toObject();return g1(this.matrix,X),u(this,{values:X},!0)}rescale(){if(!this.isValid)return this;const X=K8(this.normalize().shiftToAll().toObject());return u(this,{values:X},!0)}shiftTo(...X){if(!this.isValid)return this;if(X.length===0)return this;X=X.map((G)=>H.normalizeUnit(G));const Q={},K={},$=this.toObject();let q;for(let G of o)if(X.indexOf(G)>=0){q=G;let B=0;for(let J in K)B+=this.matrix[J][G]*K[J],K[J]=0;if(e($[G]))B+=$[G];const V=Math.trunc(B);Q[G]=V,K[G]=(B*1000-V*1000)/1000}else if(e($[G]))K[G]=$[G];for(let G in K)if(K[G]!==0)Q[q]+=G===q?K[G]:K[G]/this.matrix[q][G];return g1(this.matrix,Q),u(this,{values:Q},!0)}shiftToAll(){if(!this.isValid)return this;return this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds")}negate(){if(!this.isValid)return this;const X={};for(let Q of Object.keys(this.values))X[Q]=this.values[Q]===0?0:-this.values[Q];return u(this,{values:X},!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(X){if(!this.isValid||!X.isValid)return!1;if(!this.loc.equals(X.loc))return!1;function Q(K,$){if(K===void 0||K===0)return $===void 0||$===0;return K===$}for(let K of o)if(!Q(this.values[K],X.values[K]))return!1;return!0}}var $0="Invalid Interval";class M{constructor(X){this.s=X.start,this.e=X.end,this.invalid=X.invalid||null,this.isLuxonInterval=!0}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Interval is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new o1(K);else return new M({invalid:K})}static fromDateTimes(X,Q){const K=N0(X),$=N0(Q),q=$8(K,$);if(q==null)return new M({start:K,end:$});else return q}static after(X,Q){const K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($,$.plus(K))}static before(X,Q){const K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($.minus(K),$)}static fromISO(X,Q){const[K,$]=(X||"").split("/",2);if(K&&$){let q,G;try{q=N.fromISO(K,Q),G=q.isValid}catch(J){G=!1}let B,V;try{B=N.fromISO($,Q),V=B.isValid}catch(J){V=!1}if(G&&V)return M.fromDateTimes(q,B);if(G){const J=H.fromISO($,Q);if(J.isValid)return M.after(q,J)}else if(V){const J=H.fromISO(K,Q);if(J.isValid)return M.before(B,J)}}return M.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static isInterval(X){return X&&X.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(X="milliseconds"){return this.isValid?this.toDuration(...[X]).get(X):NaN}count(X="milliseconds",Q){if(!this.isValid)return NaN;const K=this.start.startOf(X,Q);let $;if(Q!=null&&Q.useLocaleWeeks)$=this.end.reconfigure({locale:K.locale});else $=this.end;return $=$.startOf(X,Q),Math.floor($.diff(K,X).get(X))+($.valueOf()!==this.end.valueOf())}hasSame(X){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,X):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(X){if(!this.isValid)return!1;return this.s>X}isBefore(X){if(!this.isValid)return!1;return this.e<=X}contains(X){if(!this.isValid)return!1;return this.s<=X&&this.e>X}set({start:X,end:Q}={}){if(!this.isValid)return this;return M.fromDateTimes(X||this.s,Q||this.e)}splitAt(...X){if(!this.isValid)return[];const Q=X.map(N0).filter((G)=>this.contains(G)).sort((G,B)=>G.toMillis()-B.toMillis()),K=[];let{s:$}=this,q=0;while($<this.e){const G=Q[q]||this.e,B=+G>+this.e?this.e:G;K.push(M.fromDateTimes($,B)),$=B,q+=1}return K}splitBy(X){const Q=H.fromDurationLike(X);if(!this.isValid||!Q.isValid||Q.as("milliseconds")===0)return[];let{s:K}=this,$=1,q;const G=[];while(K<this.e){const B=this.start.plus(Q.mapUnits((V)=>V*$));q=+B>+this.e?this.e:B,G.push(M.fromDateTimes(K,q)),K=q,$+=1}return G}divideEqually(X){if(!this.isValid)return[];return this.splitBy(this.length()/X).slice(0,X)}overlaps(X){return this.e>X.s&&this.s<X.e}abutsStart(X){if(!this.isValid)return!1;return+this.e===+X.s}abutsEnd(X){if(!this.isValid)return!1;return+X.e===+this.s}engulfs(X){if(!this.isValid)return!1;return this.s<=X.s&&this.e>=X.e}equals(X){if(!this.isValid||!X.isValid)return!1;return this.s.equals(X.s)&&this.e.equals(X.e)}intersection(X){if(!this.isValid)return this;const Q=this.s>X.s?this.s:X.s,K=this.e<X.e?this.e:X.e;if(Q>=K)return null;else return M.fromDateTimes(Q,K)}union(X){if(!this.isValid)return this;const Q=this.s<X.s?this.s:X.s,K=this.e>X.e?this.e:X.e;return M.fromDateTimes(Q,K)}static merge(X){const[Q,K]=X.sort(($,q)=>$.s-q.s).reduce(([$,q],G)=>{if(!q)return[$,G];else if(q.overlaps(G)||q.abutsStart(G))return[$,q.union(G)];else return[$.concat([q]),G]},[[],null]);if(K)Q.push(K);return Q}static xor(X){let Q=null,K=0;const $=[],q=X.map((V)=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),G=Array.prototype.concat(...q),B=G.sort((V,J)=>V.time-J.time);for(let V of B)if(K+=V.type==="s"?1:-1,K===1)Q=V.time;else{if(Q&&+Q!==+V.time)$.push(M.fromDateTimes(Q,V.time));Q=null}return M.merge($)}difference(...X){return M.xor([this].concat(X)).map((Q)=>this.intersection(Q)).filter((Q)=>Q&&!Q.isEmpty())}toString(){if(!this.isValid)return $0;return`[${this.s.toISO()} \u2013 ${this.e.toISO()})`}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;else return`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.s.loc.clone(Q),X).formatInterval(this):$0}toISO(X){if(!this.isValid)return $0;return`${this.s.toISO(X)}/${this.e.toISO(X)}`}toISODate(){if(!this.isValid)return $0;return`${this.s.toISODate()}/${this.e.toISODate()}`}toISOTime(X){if(!this.isValid)return $0;return`${this.s.toISOTime(X)}/${this.e.toISOTime(X)}`}toFormat(X,{separator:Q=" \u2013 "}={}){if(!this.isValid)return $0;return`${this.s.toFormat(X)}${Q}${this.e.toFormat(X)}`}toDuration(X,Q){if(!this.isValid)return H.invalid(this.invalidReason);return this.e.diff(this.s,X,Q)}mapEndpoints(X){return M.fromDateTimes(X(this.s),X(this.e))}}class q0{static hasDST(X=L.defaultZone){const Q=N.now().setZone(X).set({month:12});return!X.isUniversal&&Q.offset!==Q.set({month:6}).offset}static isValidIANAZone(X){return p.isValidZone(X)}static normalizeZone(X){return d(X,L.defaultZone)}static getStartOfWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getWeekendDays().slice()}static months(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X)}static monthsFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X,!0)}static weekdays(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X)}static weekdaysFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X,!0)}static meridiems({locale:X=null}={}){return E.create(X).meridiems()}static eras(X="short",{locale:Q=null}={}){return E.create(Q,null,"gregory").eras(X)}static features(){return{relative:I7(),localeWeek:O7()}}}var R1={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},p1={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]},B8=R1.hanidec.replace(/[\[|\]]/g,"").split(""),J8="missing Intl.DateTimeFormat.formatToParts support",C8=String.fromCharCode(160),i7=`[ ${C8}]`,s7=new RegExp(i7,"g"),R8={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"}},s0=null,r0="Invalid DateTime",u1=8640000000000000,e7={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L8={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Z8={ordinal:1,hour:0,minute:0,second:0,millisecond:0},t7=["year","month","day","hour","minute","second","millisecond"],F8=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],z8=["year","ordinal","hour","minute","second","millisecond"];class N{constructor(X){const Q=X.zone||L.defaultZone;let K=X.invalid||(Number.isNaN(X.ts)?new y("invalid input"):null)||(!Q.isValid?j0(Q):null);this.ts=R(X.ts)?L.now():X.ts;let $=null,q=null;if(!K)if(X.old&&X.old.ts===this.ts&&X.old.zone.equals(Q))[$,q]=[X.old.c,X.old.o];else{const B=Q.offset(this.ts);$=I0(this.ts,B),K=Number.isNaN($.year)?new y("invalid input"):null,$=K?null:$,q=K?null:B}this._zone=Q,this.loc=X.loc||E.create(),this.invalid=K,this.weekData=null,this.localWeekData=null,this.c=$,this.o=q,this.isLuxonDateTime=!0}static now(){return new N({})}static local(){const[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static utc(){const[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return X.zone=j.utcInstance,s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static fromJSDate(X,Q={}){const K=X6(X)?X.valueOf():NaN;if(Number.isNaN(K))return N.invalid("invalid input");const $=d(Q.zone,L.defaultZone);if(!$.isValid)return N.invalid(j0($));return new N({ts:K,zone:$,loc:E.fromObject(Q)})}static fromMillis(X,Q={}){if(!e(X))throw new O(`fromMillis requires a numerical input, but received a ${typeof X} with value ${X}`);else if(X<-u1||X>u1)return N.invalid("Timestamp out of range");else return new N({ts:X,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromSeconds(X,Q={}){if(!e(X))throw new O("fromSeconds requires a numerical input");else return new N({ts:X*1000,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromObject(X,Q={}){X=X||{};const K=d(Q.zone,L.defaultZone);if(!K.isValid)return N.invalid(j0(K));const $=E.fromObject(Q),q=k0(X,i1),{minDaysInFirstWeek:G,startOfWeek:B}=v1(q,$),V=L.now(),J=!R(Q.specificOffset)?Q.specificOffset:K.offset(V),C=!R(q.ordinal),U=!R(q.year),_=!R(q.month)||!R(q.day),P=U||_,A=q.weekYear||q.weekNumber;if((P||C)&&A)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&C)throw new a("Can't mix ordinal dates with month/day");const D=A||q.weekday&&!P;let F,T,f=I0(V,J);if(D)F=F8,T=L8,f=v0(f,G,B);else if(C)F=z8,T=Z8,f=i0(f);else F=t7,T=e7;let m0=!1;for(let P0 of F){const OX=q[P0];if(!R(OX))m0=!0;else if(m0)q[P0]=T[P0];else q[P0]=f[P0]}const zX=D?oX(q,G,B):C?eX(q):w7(q),W1=zX||j7(q);if(W1)return N.invalid(W1);const wX=D?x1(q,G,B):C?T1(q):q,[jX,IX]=x0(wX,J,K),u0=new N({ts:jX,zone:K,o:IX,loc:$});if(q.weekday&&P&&X.weekday!==u0.weekday)return N.invalid("mismatched weekday",`you can't specify both a weekday of ${q.weekday} and a date of ${u0.toISO()}`);return u0}static fromISO(X,Q={}){const[K,$]=u6(X);return R0(K,$,Q,"ISO 8601",X)}static fromRFC2822(X,Q={}){const[K,$]=l6(X);return R0(K,$,Q,"RFC 2822",X)}static fromHTTP(X,Q={}){const[K,$]=d6(X);return R0(K,$,Q,"HTTP",Q)}static fromFormat(X,Q,K={}){if(R(X)||R(Q))throw new O("fromFormat requires an input string and a format");const{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0}),[B,V,J,C]=M8(G,X,Q);if(C)return N.invalid(C);else return R0(B,V,K,`format ${Q}`,X,J)}static fromString(X,Q,K={}){return N.fromFormat(X,Q,K)}static fromSQL(X,Q={}){const[K,$]=e6(X);return R0(K,$,Q,"SQL",X)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the DateTime is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new a1(K);else return new N({invalid:K})}static isDateTime(X){return X&&X.isLuxonDateTime||!1}static parseFormatForOpts(X,Q={}){const K=a7(X,E.fromObject(Q));return!K?null:K.map(($)=>$?$.val:null).join("")}static expandFormat(X,Q={}){return r7(w.parseFormat(X),E.fromObject(Q)).map(($)=>$.val).join("")}get(X){return this[X]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?n0(this).weekYear:NaN}get weekNumber(){return this.isValid?n0(this).weekNumber:NaN}get weekday(){return this.isValid?n0(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?a0(this).weekday:NaN}get localWeekNumber(){return this.isValid?a0(this).weekNumber:NaN}get localWeekYear(){return this.isValid?a0(this).weekYear:NaN}get ordinal(){return this.isValid?i0(this.c).ordinal:NaN}get monthShort(){return this.isValid?q0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?q0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?q0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?q0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"short",locale:this.locale});else return null}get offsetNameLong(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"long",locale:this.locale});else return null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){if(this.isOffsetFixed)return!1;else return this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const X=86400000,Q=60000,K=b0(this.c),$=this.zone.offset(K-X),q=this.zone.offset(K+X),G=this.zone.offset(K-$*Q),B=this.zone.offset(K-q*Q);if(G===B)return[this];const V=K-G*Q,J=K-B*Q,C=I0(V,G),U=I0(J,B);if(C.hour===U.hour&&C.minute===U.minute&&C.second===U.second&&C.millisecond===U.millisecond)return[n(this,{ts:V}),n(this,{ts:J})];return[this]}get isInLeapYear(){return E0(this.year)}get daysInMonth(){return y0(this.year,this.month)}get daysInYear(){return this.isValid?G0(this.year):NaN}get weeksInWeekYear(){return this.isValid?_0(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?_0(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(X={}){const{locale:Q,numberingSystem:K,calendar:$}=w.create(this.loc.clone(X),X).resolvedOptions(this);return{locale:Q,numberingSystem:K,outputCalendar:$}}toUTC(X=0,Q={}){return this.setZone(j.instance(X),Q)}toLocal(){return this.setZone(L.defaultZone)}setZone(X,{keepLocalTime:Q=!1,keepCalendarTime:K=!1}={}){if(X=d(X,L.defaultZone),X.equals(this.zone))return this;else if(!X.isValid)return N.invalid(j0(X));else{let $=this.ts;if(Q||K){const q=X.offset(this.ts),G=this.toObject();[$]=x0(G,q,X)}return n(this,{ts:$,zone:X})}}reconfigure({locale:X,numberingSystem:Q,outputCalendar:K}={}){const $=this.loc.clone({locale:X,numberingSystem:Q,outputCalendar:K});return n(this,{loc:$})}setLocale(X){return this.reconfigure({locale:X})}set(X){if(!this.isValid)return this;const Q=k0(X,i1),{minDaysInFirstWeek:K,startOfWeek:$}=v1(Q,this.loc),q=!R(Q.weekYear)||!R(Q.weekNumber)||!R(Q.weekday),G=!R(Q.ordinal),B=!R(Q.year),V=!R(Q.month)||!R(Q.day),J=B||V,C=Q.weekYear||Q.weekNumber;if((J||G)&&C)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&G)throw new a("Can't mix ordinal dates with month/day");let U;if(q)U=x1({...v0(this.c,K,$),...Q},K,$);else if(!R(Q.ordinal))U=T1({...i0(this.c),...Q});else if(U={...this.toObject(),...Q},R(Q.day))U.day=Math.min(y0(U.year,U.month),U.day);const[_,P]=x0(U,this.o,this.zone);return n(this,{ts:_,o:P})}plus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X);return n(this,l1(this,Q))}minus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X).negate();return n(this,l1(this,Q))}startOf(X,{useLocaleWeeks:Q=!1}={}){if(!this.isValid)return this;const K={},$=H.normalizeUnit(X);switch($){case"years":K.month=1;case"quarters":case"months":K.day=1;case"weeks":case"days":K.hour=0;case"hours":K.minute=0;case"minutes":K.second=0;case"seconds":K.millisecond=0;break}if($==="weeks")if(Q){const q=this.loc.getStartOfWeek(),{weekday:G}=this;if(G<q)K.weekNumber=this.weekNumber-1;K.weekday=q}else K.weekday=1;if($==="quarters"){const q=Math.ceil(this.month/3);K.month=(q-1)*3+1}return this.set(K)}endOf(X,Q){return this.isValid?this.plus({[X]:1}).startOf(X,Q).minus(1):this}toFormat(X,Q={}){return this.isValid?w.create(this.loc.redefaultToEN(Q)).formatDateTimeFromString(this,X):r0}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.loc.clone(Q),X).formatDateTime(this):r0}toLocaleParts(X={}){return this.isValid?w.create(this.loc.clone(X),X).formatDateTimeParts(this):[]}toISO({format:X="extended",suppressSeconds:Q=!1,suppressMilliseconds:K=!1,includeOffset:$=!0,extendedZone:q=!1}={}){if(!this.isValid)return null;const G=X==="extended";let B=o0(this,G);return B+="T",B+=d1(this,G,Q,K,$,q),B}toISODate({format:X="extended"}={}){if(!this.isValid)return null;return o0(this,X==="extended")}toISOWeekDate(){return O0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:X=!1,suppressSeconds:Q=!1,includeOffset:K=!0,includePrefix:$=!1,extendedZone:q=!1,format:G="extended"}={}){if(!this.isValid)return null;return($?"T":"")+d1(this,G==="extended",Q,X,K,q)}toRFC2822(){return O0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return O0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){if(!this.isValid)return null;return o0(this,!0)}toSQLTime({includeOffset:X=!0,includeZone:Q=!1,includeOffsetSpace:K=!0}={}){let $="HH:mm:ss.SSS";if(Q||X){if(K)$+=" ";if(Q)$+="z";else if(X)$+="ZZ"}return O0(this,$,!0)}toSQL(X={}){if(!this.isValid)return null;return`${this.toSQLDate()} ${this.toSQLTime(X)}`}toString(){return this.isValid?this.toISO():r0}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;else return`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1000:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1000):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(X={}){if(!this.isValid)return{};const Q={...this.c};if(X.includeConfig)Q.outputCalendar=this.outputCalendar,Q.numberingSystem=this.loc.numberingSystem,Q.locale=this.loc.locale;return Q}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(X,Q="milliseconds",K={}){if(!this.isValid||!X.isValid)return H.invalid("created by diffing an invalid DateTime");const $={locale:this.locale,numberingSystem:this.numberingSystem,...K},q=Q6(Q).map(H.normalizeUnit),G=X.valueOf()>this.valueOf(),B=G?this:X,V=G?X:this,J=G8(B,V,q,$);return G?J.negate():J}diffNow(X="milliseconds",Q={}){return this.diff(N.now(),X,Q)}until(X){return this.isValid?M.fromDateTimes(this,X):this}hasSame(X,Q,K){if(!this.isValid)return!1;const $=X.valueOf(),q=this.setZone(X.zone,{keepLocalTime:!0});return q.startOf(Q,K)<=$&&$<=q.endOf(Q,K)}equals(X){return this.isValid&&X.isValid&&this.valueOf()===X.valueOf()&&this.zone.equals(X.zone)&&this.loc.equals(X.loc)}toRelative(X={}){if(!this.isValid)return null;const Q=X.base||N.fromObject({},{zone:this.zone}),K=X.padding?this<Q?-X.padding:X.padding:0;let $=["years","months","days","hours","minutes","seconds"],q=X.unit;if(Array.isArray(X.unit))$=X.unit,q=void 0;return r1(Q,this.plus(K),{...X,numeric:"always",units:$,unit:q})}toRelativeCalendar(X={}){if(!this.isValid)return null;return r1(X.base||N.fromObject({},{zone:this.zone}),this,{...X,numeric:"auto",units:["years","months","days"],calendary:!0})}static min(...X){if(!X.every(N.isDateTime))throw new O("min requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.min)}static max(...X){if(!X.every(N.isDateTime))throw new O("max requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.max)}static fromFormatExplain(X,Q,K={}){const{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0});return n7(G,X,Q)}static fromStringExplain(X,Q,K={}){return N.fromFormatExplain(X,Q,K)}static get DATE_SHORT(){return T0}static get DATE_MED(){return t1}static get DATE_MED_WITH_WEEKDAY(){return kX}static get DATE_FULL(){return X7}static get DATE_HUGE(){return Q7}static get TIME_SIMPLE(){return K7}static get TIME_WITH_SECONDS(){return $7}static get TIME_WITH_SHORT_OFFSET(){return q7}static get TIME_WITH_LONG_OFFSET(){return G7}static get TIME_24_SIMPLE(){return B7}static get TIME_24_WITH_SECONDS(){return V7}static get TIME_24_WITH_SHORT_OFFSET(){return J7}static get TIME_24_WITH_LONG_OFFSET(){return C7}static get DATETIME_SHORT(){return Y7}static get DATETIME_SHORT_WITH_SECONDS(){return U7}static get DATETIME_MED(){return P7}static get DATETIME_MED_WITH_SECONDS(){return R7}static get DATETIME_MED_WITH_WEEKDAY(){return SX}static get DATETIME_FULL(){return N7}static get DATETIME_FULL_WITH_SECONDS(){return A7}static get DATETIME_HUGE(){return H7}static get DATETIME_HUGE_WITH_SECONDS(){return _7}}var j8="3.4.4";XX.DateTime=N;XX.Duration=H;XX.FixedOffsetZone=j;XX.IANAZone=p;XX.Info=q0;XX.Interval=M;XX.InvalidZone=G1;XX.Settings=L;XX.SystemZone=W0;XX.VERSION=j8;XX.Zone=t});var BX=s((KX)=>{Object.defineProperty(KX,"__esModule",{value:!0});KX.RE_RANGE=KX.RE_WILDCARDS=KX.PRESETS=KX.TIME_UNITS_LEN=KX.TIME_UNITS=KX.TIME_UNITS_MAP=KX.ALIASES=KX.PARSE_DEFAULTS=KX.MONTH_CONSTRAINTS=KX.CONSTRAINTS=void 0;KX.CONSTRAINTS=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]});KX.MONTH_CONSTRAINTS=Object.freeze({1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31});KX.PARSE_DEFAULTS=Object.freeze({second:"0",minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"});KX.ALIASES=Object.freeze({jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6});KX.TIME_UNITS_MAP=Object.freeze({SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY_OF_MONTH:"dayOfMonth",MONTH:"month",DAY_OF_WEEK:"dayOfWeek"});KX.TIME_UNITS=Object.freeze(Object.values(KX.TIME_UNITS_MAP));KX.TIME_UNITS_LEN=KX.TIME_UNITS.length;KX.PRESETS=Object.freeze({"@yearly":"0 0 0 1 1 *","@monthly":"0 0 0 1 * *","@weekly":"0 0 0 * * 0","@daily":"0 0 0 * * *","@hourly":"0 0 * * * *","@minutely":"0 * * * * *","@secondly":"* * * * * *","@weekdays":"0 0 0 * * 1-5","@weekends":"0 0 0 * * 0,6"});KX.RE_WILDCARDS=/\*/g;KX.RE_RANGE=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g});var A1=s((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.ExclusiveParametersError=JX.CronError=void 0;class N1 extends Error{}JX.CronError=N1;class VX extends N1{constructor(X,Q){super(`You can't specify both ${X} and ${Q}`)}}JX.ExclusiveParametersError=VX});var PX=s((YX)=>{Object.defineProperty(YX,"__esModule",{value:!0});YX.getRecordKeys=void 0;var i8=(X)=>{return Object.keys(X)};YX.getRecordKeys=i8});var f0=s((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CronTime=void 0;var c=QX(),z=BX(),I=A1(),RX=PX();class NX{constructor(X,Q,K){if(this.realDate=!1,this.second={},this.minute={},this.hour={},this.dayOfMonth={},this.month={},this.dayOfWeek={},Q!=null&&K!=null)throw new I.ExclusiveParametersError("timeZone","utcOffset");if(Q){if(!c.DateTime.fromObject({},{zone:Q}).isValid)throw new I.CronError("Invalid timezone.");this.timeZone=Q}if(K!=null)this.utcOffset=K;if(X instanceof Date||X instanceof c.DateTime)this.source=X instanceof Date?c.DateTime.fromJSDate(X):X,this.realDate=!0;else this.source=X,this._parse(this.source),this._verifyParse()}_getWeekDay(X){return X.weekday===7?0:X.weekday}_verifyParse(){const X=RX.getRecordKeys(this.month),Q=RX.getRecordKeys(this.dayOfMonth);let K=!1,$=null;for(let q of X){const G=z.MONTH_CONSTRAINTS[q];for(let B of Q)if(B<=G)K=!0;if(!K)$=q,console.warn(`Month '${q}' is limited to '${G}' days.`)}if(!K&&$!==null){const q=z.MONTH_CONSTRAINTS[$];for(let G of Q)if(G>q){delete this.dayOfMonth[G];const B=G%q;this.dayOfMonth[B]=!0}}}sendAt(X){let Q=this.realDate&&this.source instanceof c.DateTime?this.source:c.DateTime.local();if(this.timeZone)Q=Q.setZone(this.timeZone);if(this.utcOffset!==void 0){const K=this.utcOffset<0?"-":"+",$=Math.trunc(this.utcOffset/60),q=String(Math.abs($)).padStart(2,"0"),G=Math.abs(this.utcOffset-$*60),B=String(G).padStart(2,"0"),V=`UTC${K}${q}:${B}`;if(Q=Q.setZone(V),!Q.isValid)throw new I.CronError("ERROR: You specified an invalid UTC offset.")}if(this.realDate){if(c.DateTime.local()>Q)throw new I.CronError("WARNING: Date in past. Will never be fired.");return Q}if(X===void 0||isNaN(X)||X<0)return this.getNextDateFrom(Q);else{const K=[];for(;X>0;X--)Q=this.getNextDateFrom(Q),K.push(Q);return K}}getTimeout(){return Math.max(-1,this.sendAt().toMillis()-c.DateTime.local().toMillis())}toString(){return this.toJSON().join(" ")}toJSON(){return z.TIME_UNITS.map((X)=>{return this._wcOrAll(X)})}getNextDateFrom(X,Q){var K;if(X instanceof Date)X=c.DateTime.fromJSDate(X);let $=X;const q=X.toMillis();if(Q)$=$.setZone(Q);if(!this.realDate){if($.millisecond>0)$=$.set({millisecond:0,second:$.second+1})}if(!$.isValid)throw new I.CronError("ERROR: You specified an invalid date.");const G=c.DateTime.now().plus({years:8});while(!0){const B=$.toMillis()-X.toMillis();if($>G)throw new I.CronError(`Something went wrong. No execution date was found in the next 8 years.
3
+ Please provide the following string if you would like to help debug:
4
+ Time Zone: ${(K=Q===null||Q===void 0?void 0:Q.toString())!==null&&K!==void 0?K:'""'} - Cron String: ${this.source.toString()} - UTC offset: ${$.offset} - current Date: ${c.DateTime.local().toString()}`);if(!($.month in this.month)&&Object.keys(this.month).length!==12){if($=$.plus({months:1}),$=$.set({day:1,hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!((this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!(this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!(($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.hour in this.hour)&&Object.keys(this.hour).length!==24){const V=$.hour===23&&B>86400000?0:$.hour+1,J=$.minute;if($=$.set({hour:V}),$=$.set({minute:0,second:0}),this._forwardDSTJump(V,J,$)){const[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.minute in this.minute)&&Object.keys(this.minute).length!==60){const V=$.minute===59&&B>3600000?0:$.minute+1,J=$.hour+(V===60?1:0);if($=$.set({minute:V}),$=$.set({second:0}),this._forwardDSTJump(J,V,$)){const[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.second in this.second)&&Object.keys(this.second).length!==60){const V=$.second===59&&B>60000?0:$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){const[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}if($.toMillis()===q){const V=$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){const[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}break}return $}_findPreviousDSTJump(X){var Q;let K,$,q,G,B=X;const V=1440;let J=0;do{if(++J>V)throw new I.CronError(`ERROR: This DST checking related function assumes the input DateTime (${(Q=X.toISO())!==null&&Q!==void 0?Q:X.toMillis()}) is within 24 hours of a DST jump.`);if(K=B.minute-1,$=B.hour,K<0)K+=60,$=($+24-1)%24;B=B.minus({minute:1}),q=B.minute,G=B.hour}while(K===q&&$===G);const C=B.plus({minute:1}).set({second:0,millisecond:0}),U=C.minus({second:1});if(X.month+1 in this.month&&X.day in this.dayOfMonth&&this._getWeekDay(X)in this.dayOfWeek)return[this._checkTimeInSkippedRange(U,C),C];return[!1,C]}_checkTimeInSkippedRange(X,Q){const K=(X.minute+1)%60,$=(X.hour+(K===0?1:0))%24,q=Q.hour-$+1,G=K===0&&Q.minute===0;if(q===2&&G)return $ in this.hour;else if(q===1)return $ in this.hour&&this._checkTimeInSkippedRangeSingleHour(K,Q.minute);else return this._checkTimeInSkippedRangeMultiHour($,K,Q.hour,Q.minute)}_checkTimeInSkippedRangeSingleHour(X,Q){for(let K=X;K<Q;++K)if(K in this.minute)return!0;return Q in this.minute&&0 in this.second}_checkTimeInSkippedRangeMultiHour(X,Q,K,$){if(X>=K)throw new I.CronError(`ERROR: This DST checking related function assumes the forward jump starting hour (${X}) is less than the end hour (${K})`);const q=Array.from({length:60-Q},(J,C)=>Q+C),G=Array.from({length:$},(J,C)=>C),B=Array.from({length:60},(J,C)=>C),V=(J)=>{if(J===X)return q;else if(J===K)return G;else return B};for(let J=X;J<=K;++J){if(!(J in this.hour))continue;const C=V(J);for(let U of C)if(U in this.minute)return!0}return K in this.hour&&$ in this.minute&&0 in this.second}_forwardDSTJump(X,Q,K){const{hour:$,minute:q}=K,G=X%24<$,B=Q%60<q;return G||B}_wcOrAll(X){if(this._hasAll(X))return"*";const Q=[];for(let K in this[X])Q.push(K);return Q.join(",")}_hasAll(X){const Q=z.CONSTRAINTS[X],K=Q[0],$=X===z.TIME_UNITS_MAP.DAY_OF_WEEK?Q[1]-1:Q[1];for(let q=K,G=$;q<G;q++)if(!(q in this[X]))return!1;return!0}_parse(X){var Q;if(X=X.toLowerCase(),Object.keys(z.PRESETS).includes(X))X=z.PRESETS[X];X=X.replace(/[a-z]{1,3}/gi,(q)=>{if(Object.keys(z.ALIASES).includes(q))return z.ALIASES[q].toString();throw new I.CronError(`Unknown alias: ${q}`)});const K=X.trim().split(/\s+/);if(K.length<z.TIME_UNITS_LEN-1)throw new I.CronError("Too few fields");if(K.length>z.TIME_UNITS_LEN)throw new I.CronError("Too many fields");const $=K.length;for(let q of z.TIME_UNITS){const G=z.TIME_UNITS.indexOf(q),B=(Q=K[G-(z.TIME_UNITS_LEN-$)])!==null&&Q!==void 0?Q:z.PARSE_DEFAULTS[q];this._parseField(B,q)}}_parseField(X,Q){const K=this[Q];let $;const q=z.CONSTRAINTS[Q],G=q[0],B=q[1];X.split(",").forEach((C)=>{const U=C.indexOf("*");if(U!==-1&&U!==0)throw new I.CronError(`Field (${C}) has an invalid wildcard expression`)}),X=X.replace(z.RE_WILDCARDS,`${G}-${B}`);const J=X.split(",");for(let C of J){const U=[...C.matchAll(z.RE_RANGE)][0];if((U===null||U===void 0?void 0:U[1])!==void 0){const[,_,P,A]=U;let D=parseInt(_,10),F=P!==void 0?parseInt(P,10):void 0;const T=A!==void 0,f=parseInt(A!==null&&A!==void 0?A:"1",10);if(f===0)throw new I.CronError(`Field (${Q}) has a step of zero`);if(F!==void 0&&D>F)throw new I.CronError(`Field (${Q}) has an invalid range`);if(D<G||F!==void 0&&F>B||F===void 0&&D>B)throw new I.CronError(`Field value (${X}) is out of range`);if(D=Math.min(Math.max(G,~~Math.abs(D)),B),F!==void 0)F=Math.min(B,~~Math.abs(F));else F=T?B:D;$=D;do K[$]=!0,$+=f;while($<=F);if(Q==="dayOfWeek"){if(!K[0]&&!!K[7])K[0]=K[7];delete K[7]}}else throw new I.CronError(`Field (${Q}) cannot be parsed`)}}}AX.CronTime=NX});var MX=s((WX)=>{Object.defineProperty(WX,"__esModule",{value:!0});WX.CronJob=void 0;var _X=import.meta.require("child_process"),H1=A1(),p0=f0();class Z0{constructor(X,Q,K,$,q,G,B,V,J){if(this.running=!1,this.unrefTimeout=!1,this.lastExecution=null,this.runOnce=!1,this._callbacks=[],this.context=G!==null&&G!==void 0?G:this,q!=null&&V!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(q!=null)this.cronTime=new p0.CronTime(X,q,null);else if(V!=null)this.cronTime=new p0.CronTime(X,null,V);else this.cronTime=new p0.CronTime(X,q,V);if(J!=null)this.unrefTimeout=J;if(K!=null)this.onComplete=this._fnWrap(K);if(this.cronTime.realDate)this.runOnce=!0;if(this.addCallback(this._fnWrap(Q)),B)this.lastExecution=new Date,this.fireOnTick();if($)this.start()}static from(X){if(X.timeZone!=null&&X.utcOffset!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(X.timeZone!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else if(X.utcOffset!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,null,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout)}_fnWrap(X){var Q,K;switch(typeof X){case"function":return X;case"string":{const[$,...q]=X.split(" ");return _X.spawn.bind(void 0,$!==null&&$!==void 0?$:X,q,{})}case"object":return _X.spawn.bind(void 0,X.command,(Q=X.args)!==null&&Q!==void 0?Q:[],(K=X.options)!==null&&K!==void 0?K:{})}}addCallback(X){if(typeof X==="function")this._callbacks.push(X)}setTime(X){if(!(X instanceof p0.CronTime))throw new H1.CronError("time must be an instance of CronTime.");const Q=this.running;if(this.stop(),this.cronTime=X,X.realDate)this.runOnce=!0;if(Q)this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){for(let X of this._callbacks)X.call(this.context,this.onComplete)}nextDates(X){return this.cronTime.sendAt(X!==null&&X!==void 0?X:0)}start(){if(this.running)return;const X=2147483647;let Q=this.cronTime.getTimeout(),K=0,$;const q=(B)=>{if($=Date.now(),this._timeout=setTimeout(G,B),this.unrefTimeout&&typeof this._timeout.unref==="function")this._timeout.unref()},G=()=>{const B=$+Q-Date.now();if(B>0){let V=this.cronTime.getTimeout();if(V>B)V=B;K+=V}if(K){if(K>X)K-=X,Q=X;else Q=K,K=0;q(Q)}else{if(this.lastExecution=new Date,this.running=!1,!this.runOnce)this.start();this.fireOnTick()}};if(Q>=0){if(this.running=!0,Q>X)K=Q-X,Q=X;q(Q)}else this.stop()}lastDate(){return this.lastExecution}stop(){if(this._timeout)clearTimeout(this._timeout);if(this.running=!1,typeof this.onComplete==="function")this.onComplete.call(this.context)}}WX.CronJob=Z0});var FX=s((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.timeout=c0.sendAt=c0.CronTime=c0.CronJob=void 0;var LX=f0(),s8=MX();Object.defineProperty(c0,"CronJob",{enumerable:!0,get:function(){return s8.CronJob}});var r8=f0();Object.defineProperty(c0,"CronTime",{enumerable:!0,get:function(){return r8.CronTime}});var n8=(X)=>new LX.CronTime(X).sendAt();c0.sendAt=n8;var a8=(X)=>new LX.CronTime(X).getTimeout();c0.timeout=a8});var X0=yX(FX(),1);import{log as Q0,runCommand as e8}from"@stacksjs/cli";function R4(X){return new X0.CronTime(X).sendAt()}function N4(X){return new X0.CronTime(X).getTimeout()}class _1{cronPattern="";timezone="America/Los_Angeles";task;constructor(X){this.task=X}everySecond(){return this.cronPattern="* * * * * *",this}everyMinute(){return this.cronPattern="0 * * * * *",this}everyTwoMinutes(){return this.cronPattern="*/2 * * * * *",this}everyFiveMinutes(){return this.cronPattern="*/5 * * * *",this}everyTenMinutes(){return this.cronPattern="*/10 * * * *",this}everyThirtyMinutes(){return this.cronPattern="*/30 * * * *",this}everyHour(){return this.cronPattern="0 0 * * * *",this}everyDay(){return this.cronPattern="0 0 0 * * *",this}hourly(){return this.cronPattern="0 0 * * * *",this}daily(){return this.cronPattern="0 0 0 * * *",this}weekly(){return this.cronPattern="0 0 0 * * 0",this}monthly(){return this.cronPattern="0 0 0 1 * *",this}yearly(){return this.cronPattern="0 0 0 1 1 *",this}onDays(X){const Q=X.join(",");return this.cronPattern=`0 0 0 * * ${Q}`,this}at(X){const[Q,K]=X.split(":").map(Number);return this.cronPattern=`${K} ${Q} * * *`,this}setTimeZone(X){return this.timezone=X,this}start(){new X0.CronJob(this.cronPattern,this.task,null,!0,this.timezone),Q0.info(`Scheduled task with pattern: ${this.cronPattern} in timezone: ${this.timezone}`)}job(X){return Q0.info(`Scheduling job: ${X}`),this}action(X){return Q0.info(`Scheduling action: ${X}`),this}static command(X){return Q0.info(`Executing command: ${X}`),new _1(async()=>{Q0.info(`Executing command: ${X}`);const Q=await e8(X);if(Q.isErr()){Q0.error(Q.error);return}Q0.info(Q.value)})}}class t8 extends _1{}var export_CronTime=X0.CronTime;var export_CronJob=X0.CronJob;export{N4 as timeout,R4 as sendAt,_1 as Schedule,t8 as Job,export_CronTime as CronTime,export_CronJob as CronJob};
5
5
 
6
- //# debugId=82B6CFE506E0EA7C64756E2164756E21
6
+ //# debugId=8DFB5519B839950464756E2164756E21
7
7
  //# sourceMappingURL=index.js.map