1
0
Fork 0
golang-github-pocketbase-po.../ui/dist/assets/autocomplete.worker-SdNqUZMM.js
Daniel Baumann e28c88ef14
Adding upstream version 0.28.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 10:57:38 +02:00

4 lines
90 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){"use strict";class Y extends Error{}class Yn extends Y{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Jn extends Y{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Bn extends Y{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class j extends Y{}class ft extends Y{constructor(e){super(`Invalid unit ${e}`)}}class x extends Y{}class U extends Y{constructor(){super("Zone is an abstract class")}}const c="numeric",W="short",I="long",Se={year:c,month:c,day:c},dt={year:c,month:W,day:c},Gn={year:c,month:W,day:c,weekday:W},ht={year:c,month:I,day:c},mt={year:c,month:I,day:c,weekday:I},yt={hour:c,minute:c},gt={hour:c,minute:c,second:c},pt={hour:c,minute:c,second:c,timeZoneName:W},wt={hour:c,minute:c,second:c,timeZoneName:I},St={hour:c,minute:c,hourCycle:"h23"},kt={hour:c,minute:c,second:c,hourCycle:"h23"},Tt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:W},Ot={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:I},Nt={year:c,month:c,day:c,hour:c,minute:c},Et={year:c,month:c,day:c,hour:c,minute:c,second:c},xt={year:c,month:W,day:c,hour:c,minute:c},bt={year:c,month:W,day:c,hour:c,minute:c,second:c},jn={year:c,month:W,day:c,weekday:W,hour:c,minute:c},vt={year:c,month:I,day:c,hour:c,minute:c,timeZoneName:W},It={year:c,month:I,day:c,hour:c,minute:c,second:c,timeZoneName:W},Mt={year:c,month:I,day:c,weekday:I,hour:c,minute:c,timeZoneName:I},Dt={year:c,month:I,day:c,weekday:I,hour:c,minute:c,second:c,timeZoneName:I};class ae{get type(){throw new U}get name(){throw new U}get ianaName(){return this.name}get isUniversal(){throw new U}offsetName(e,t){throw new U}formatOffset(e,t){throw new U}offset(e){throw new U}equals(e){throw new U}get isValid(){throw new U}}let We=null;class ke extends ae{static get instance(){return We===null&&(We=new ke),We}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nn(e,t,n)}formatOffset(e,t){return ce(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ce=new Map;function Kn(r){let e=Ce.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ce.set(r,e)),e}const Hn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Qn(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,f]=n;return[a,s,i,o,u,l,f]}function _n(r,e){const t=r.formatToParts(e),n=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=Hn[i];i==="era"?n[o]=a:g(o)||(n[o]=parseInt(a,10))}return n}const Le=new Map;class $ extends ae{static create(e){let t=Le.get(e);return t===void 0&&Le.set(e,t=new $(e)),t}static resetCache(){Le.clear(),Ce.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=$.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nn(e,t,n,this.name)}formatOffset(e,t){return ce(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=Kn(this.name);let[s,i,a,o,u,l,f]=n.formatToParts?_n(n,t):Qn(n,t);o==="BC"&&(s=-Math.abs(s)+1);const k=xe({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let m=+t;const N=m%1e3;return m-=N>=0?N:1e3+N,(k-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Ft={};function Xn(r,e={}){const t=JSON.stringify([r,e]);let n=Ft[t];return n||(n=new Intl.ListFormat(r,e),Ft[t]=n),n}const Re=new Map;function $e(r,e={}){const t=JSON.stringify([r,e]);let n=Re.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),Re.set(t,n)),n}const Ue=new Map;function er(r,e={}){const t=JSON.stringify([r,e]);let n=Ue.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),Ue.set(t,n)),n}const Ze=new Map;function tr(r,e={}){const{base:t,...n}=e,s=JSON.stringify([r,n]);let i=Ze.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(r,e),Ze.set(s,i)),i}let oe=null;function nr(){return oe||(oe=new Intl.DateTimeFormat().resolvedOptions().locale,oe)}const qe=new Map;function Vt(r){let e=qe.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),qe.set(r,e)),e}const ze=new Map;function rr(r){let e=ze.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...At,...e}),ze.set(r,e)}return e}function sr(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,s;try{n=$e(r).resolvedOptions(),s=r}catch{const u=r.substring(0,t);n=$e(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=n;return[s,i,a]}}function ir(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function ar(r){const e=[];for(let t=1;t<=12;t++){const n=y.utc(2009,t,1);e.push(r(n))}return e}function or(r){const e=[];for(let t=1;t<=7;t++){const n=y.utc(2016,11,13+t);e.push(r(n))}return e}function Te(r,e,t,n){const s=r.listingMode();return s==="error"?null:s==="en"?t(e):n(e)}function ur(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||Vt(r.locale).numberingSystem==="latn"}class lr{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i,...a}=n;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...n};n.padTo>0&&(o.minimumIntegerDigits=n.padTo),this.inf=er(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Qe(e,3);return E(t,this.padTo)}}}class cr{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&$.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=$e(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class fr{constructor(e,t,n){this.opts={style:"long",...n},!t&&_t()&&(this.rtf=tr(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):Ar(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const At={firstDay:1,minimalDays:4,weekend:[6,7]};class S{static fromOpts(e){return S.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,s,i=!1){const a=e||T.defaultLocale,o=a||(i?"en-US":nr()),u=t||T.defaultNumberingSystem,l=n||T.defaultOutputCalendar,f=Ke(s)||T.defaultWeekSettings;return new S(o,u,l,f,a)}static resetCache(){oe=null,Re.clear(),Ue.clear(),Ze.clear(),qe.clear(),ze.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:s}={}){return S.create(e,t,n,s)}constructor(e,t,n,s,i){const[a,o,u]=sr(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||u||null,this.weekSettings=s,this.intl=ir(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=ur(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:S.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Te(this,e,an,()=>{const n=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=ar(i=>this.extract(i,n,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return Te(this,e,ln,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=or(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Te(this,void 0,()=>cn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[y.utc(2016,11,13,9),y.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Te(this,e,fn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[y.utc(-40,1,1),y.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new lr(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new cr(e,this.intl,t)}relFormatter(e={}){return new fr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Xn(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Vt(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Xt()?rr(this.locale):At}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Pe=null;class v extends ae{static get utcInstance(){return Pe===null&&(Pe=new v(0)),Pe}static instance(e){return e===0?v.utcInstance:new v(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new v(be(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ce(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ce(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ce(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class dr extends ae{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Z(r,e){if(g(r)||r===null)return e;if(r instanceof ae)return r;if(wr(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?ke.instance:t==="utc"||t==="gmt"?v.utcInstance:v.parseSpecifier(t)||$.create(r)}else return q(r)?v.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new dr(r)}const Ye={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},Wt={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]},hr=Ye.hanidec.replace(/[\[|\]]/g,"").split("");function mr(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Ye.hanidec)!==-1)e+=hr.indexOf(r[t]);else for(const s in Wt){const[i,a]=Wt[s];n>=i&&n<=a&&(e+=n-i)}}return parseInt(e,10)}else return e}const Je=new Map;function yr(){Je.clear()}function C({numberingSystem:r},e=""){const t=r||"latn";let n=Je.get(t);n===void 0&&(n=new Map,Je.set(t,n));let s=n.get(e);return s===void 0&&(s=new RegExp(`${Ye[t]}${e}`),n.set(e,s)),s}let Ct=()=>Date.now(),Lt="system",Rt=null,$t=null,Ut=null,Zt=60,qt,zt=null;class T{static get now(){return Ct}static set now(e){Ct=e}static set defaultZone(e){Lt=e}static get defaultZone(){return Z(Lt,ke.instance)}static get defaultLocale(){return Rt}static set defaultLocale(e){Rt=e}static get defaultNumberingSystem(){return $t}static set defaultNumberingSystem(e){$t=e}static get defaultOutputCalendar(){return Ut}static set defaultOutputCalendar(e){Ut=e}static get defaultWeekSettings(){return zt}static set defaultWeekSettings(e){zt=Ke(e)}static get twoDigitCutoffYear(){return Zt}static set twoDigitCutoffYear(e){Zt=e%100}static get throwOnInvalid(){return qt}static set throwOnInvalid(e){qt=e}static resetCaches(){S.resetCache(),$.resetCache(),y.resetCache(),yr()}}class L{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Pt=[0,31,59,90,120,151,181,212,243,273,304,334],Yt=[0,31,60,91,121,152,182,213,244,274,305,335];function F(r,e){return new L("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function Be(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function Jt(r,e,t){return t+(ue(r)?Yt:Pt)[e-1]}function Bt(r,e){const t=ue(r)?Yt:Pt,n=t.findIndex(i=>i<e),s=e-t[n];return{month:n+1,day:s}}function Ge(r,e){return(r-e+7)%7+1}function Oe(r,e=4,t=1){const{year:n,month:s,day:i}=r,a=Jt(n,s,i),o=Ge(Be(n,s,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=n-1,u=le(l,e,t)):u>le(n,e,t)?(l=n+1,u=1):l=n,{weekYear:l,weekNumber:u,weekday:o,...Ie(r)}}function Gt(r,e=4,t=1){const{weekYear:n,weekNumber:s,weekday:i}=r,a=Ge(Be(n,1,e),t),o=H(n);let u=s*7+i-a-7+e,l;u<1?(l=n-1,u+=H(l)):u>o?(l=n+1,u-=H(n)):l=n;const{month:f,day:h}=Bt(l,u);return{year:l,month:f,day:h,...Ie(r)}}function je(r){const{year:e,month:t,day:n}=r,s=Jt(e,t,n);return{year:e,ordinal:s,...Ie(r)}}function jt(r){const{year:e,ordinal:t}=r,{month:n,day:s}=Bt(e,t);return{year:e,month:n,day:s,...Ie(r)}}function Kt(r,e){if(!g(r.localWeekday)||!g(r.localWeekNumber)||!g(r.localWeekYear)){if(!g(r.weekday)||!g(r.weekNumber)||!g(r.weekYear))throw new j("Cannot mix locale-based week fields with ISO-based week fields");return g(r.localWeekday)||(r.weekday=r.localWeekday),g(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),g(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gr(r,e=4,t=1){const n=Ne(r.weekYear),s=V(r.weekNumber,1,le(r.weekYear,e,t)),i=V(r.weekday,1,7);return n?s?i?!1:F("weekday",r.weekday):F("week",r.weekNumber):F("weekYear",r.weekYear)}function pr(r){const e=Ne(r.year),t=V(r.ordinal,1,H(r.year));return e?t?!1:F("ordinal",r.ordinal):F("year",r.year)}function Ht(r){const e=Ne(r.year),t=V(r.month,1,12),n=V(r.day,1,Ee(r.year,r.month));return e?t?n?!1:F("day",r.day):F("month",r.month):F("year",r.year)}function Qt(r){const{hour:e,minute:t,second:n,millisecond:s}=r,i=V(e,0,23)||e===24&&t===0&&n===0&&s===0,a=V(t,0,59),o=V(n,0,59),u=V(s,0,999);return i?a?o?u?!1:F("millisecond",s):F("second",n):F("minute",t):F("hour",e)}function g(r){return typeof r>"u"}function q(r){return typeof r=="number"}function Ne(r){return typeof r=="number"&&r%1===0}function wr(r){return typeof r=="string"}function Sr(r){return Object.prototype.toString.call(r)==="[object Date]"}function _t(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xt(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function kr(r){return Array.isArray(r)?r:[r]}function en(r,e,t){if(r.length!==0)return r.reduce((n,s)=>{const i=[e(s),s];return n&&t(n[0],i[0])===n[0]?n:i},null)[1]}function Tr(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function K(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Ke(r){if(r==null)return null;if(typeof r!="object")throw new x("Week settings must be an object");if(!V(r.firstDay,1,7)||!V(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!V(e,1,7)))throw new x("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function V(r,e,t){return Ne(r)&&r>=e&&r<=t}function Or(r,e){return r-e*Math.floor(r/e)}function E(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function z(r){if(!(g(r)||r===null||r===""))return parseInt(r,10)}function J(r){if(!(g(r)||r===null||r===""))return parseFloat(r)}function He(r){if(!(g(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function Qe(r,e,t=!1){const n=10**e;return(t?Math.trunc:Math.round)(r*n)/n}function ue(r){return r%4===0&&(r%100!==0||r%400===0)}function H(r){return ue(r)?366:365}function Ee(r,e){const t=Or(e-1,12)+1,n=r+(e-t)/12;return t===2?ue(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function xe(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function tn(r,e,t){return-Ge(Be(r,1,e),t)+e-1}function le(r,e=4,t=1){const n=tn(r,e,t),s=tn(r+1,e,t);return(H(r)-n+s)/7}function _e(r){return r>99?r:r>T.twoDigitCutoffYear?1900+r:2e3+r}function nn(r,e,t,n=null){const s=new Date(r),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function be(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-n:n;return t*60+s}function rn(r){const e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new x(`Invalid unit value ${r}`);return e}function ve(r,e){const t={};for(const n in r)if(K(r,n)){const s=r[n];if(s==null)continue;t[e(n)]=rn(s)}return t}function ce(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),s=r>=0?"+":"-";switch(e){case"short":return`${s}${E(t,2)}:${E(n,2)}`;case"narrow":return`${s}${t}${n>0?`:${n}`:""}`;case"techie":return`${s}${E(t,2)}${E(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ie(r){return Tr(r,["hour","minute","second","millisecond"])}const Nr=["January","February","March","April","May","June","July","August","September","October","November","December"],sn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Er=["J","F","M","A","M","J","J","A","S","O","N","D"];function an(r){switch(r){case"narrow":return[...Er];case"short":return[...sn];case"long":return[...Nr];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const on=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],un=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],xr=["M","T","W","T","F","S","S"];function ln(r){switch(r){case"narrow":return[...xr];case"short":return[...un];case"long":return[...on];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const cn=["AM","PM"],br=["Before Christ","Anno Domini"],vr=["BC","AD"],Ir=["B","A"];function fn(r){switch(r){case"narrow":return[...Ir];case"short":return[...vr];case"long":return[...br];default:return null}}function Mr(r){return cn[r.hour<12?0:1]}function Dr(r,e){return ln(e)[r.weekday-1]}function Fr(r,e){return an(e)[r.month-1]}function Vr(r,e){return fn(e)[r.year<0?0:1]}function Ar(r,e,t="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&i){const h=r==="days";switch(e){case 1:return h?"tomorrow":`next ${s[r][0]}`;case-1:return h?"yesterday":`last ${s[r][0]}`;case 0:return h?"today":`this ${s[r][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[r],f=n?u?l[1]:l[2]||l[1]:u?s[r][0]:r;return a?`${o} ${f} ago`:`in ${o} ${f}`}function dn(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const Wr={D:Se,DD:dt,DDD:ht,DDDD:mt,t:yt,tt:gt,ttt:pt,tttt:wt,T:St,TT:kt,TTT:Tt,TTTT:Ot,f:Nt,ff:xt,fff:vt,ffff:Mt,F:Et,FF:bt,FFF:It,FFFF:Dt};class b{static create(e,t={}){return new b(e,t)}static parseFormat(e){let t=null,n="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?(n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),t=null,n="",s=!s):s||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Wr[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return E(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,N)=>this.loc.extract(e,m,N),a=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",o=()=>n?Mr(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(m,N)=>n?Fr(e,m):i(N?{month:m}:{month:m,day:"numeric"},"month"),l=(m,N)=>n?Dr(e,m):i(N?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const N=b.macroTokenToFormatOpts(m);return N?this.formatWithSystemDefault(e,N):m},h=m=>n?Vr(e,m):i({era:m},"era"),k=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return dn(b.parseFormat(t),k)}formatDurationFromString(e,t){const n=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=u=>l=>{const f=n(l);return f?this.num(u.get(f),l.length):l},i=b.parseFormat(t),a=i.reduce((u,{literal:l,val:f})=>l?u:u.concat(f),[]),o=e.shiftTo(...a.map(n).filter(u=>u));return dn(i,s(o))}}const hn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Q(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function _(...r){return e=>r.reduce(([t,n,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||n,u]},[{},null,1]).slice(0,2)}function X(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const s=t.exec(r);if(s)return n(s)}return[null,null]}function mn(...r){return(e,t)=>{const n={};let s;for(s=0;s<r.length;s++)n[r[s]]=z(e[t+s]);return[n,null,t+s]}}const yn=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Cr=`(?:${yn.source}?(?:\\[(${hn.source})\\])?)?`,Xe=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gn=RegExp(`${Xe.source}${Cr}`),et=RegExp(`(?:T${gn.source})?`),Lr=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Rr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,$r=/(\d{4})-?(\d{3})/,Ur=mn("weekYear","weekNumber","weekDay"),Zr=mn("year","ordinal"),qr=/(\d{4})-(\d\d)-(\d\d)/,pn=RegExp(`${Xe.source} ?(?:${yn.source}|(${hn.source}))?`),zr=RegExp(`(?: ${pn.source})?`);function ee(r,e,t){const n=r[e];return g(n)?t:z(n)}function Pr(r,e){return[{year:ee(r,e),month:ee(r,e+1,1),day:ee(r,e+2,1)},null,e+3]}function te(r,e){return[{hours:ee(r,e,0),minutes:ee(r,e+1,0),seconds:ee(r,e+2,0),milliseconds:He(r[e+3])},null,e+4]}function fe(r,e){const t=!r[e]&&!r[e+1],n=be(r[e+1],r[e+2]),s=t?null:v.instance(n);return[{},s,e+3]}function de(r,e){const t=r[e]?$.create(r[e]):null;return[{},t,e+1]}const Yr=RegExp(`^T?${Xe.source}$`),Jr=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Br(r){const[e,t,n,s,i,a,o,u,l]=r,f=e[0]==="-",h=u&&u[0]==="-",k=(m,N=!1)=>m!==void 0&&(N||m&&f)?-m:m;return[{years:k(J(t)),months:k(J(n)),weeks:k(J(s)),days:k(J(i)),hours:k(J(a)),minutes:k(J(o)),seconds:k(J(u),u==="-0"),milliseconds:k(He(l),h)}]}const Gr={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function tt(r,e,t,n,s,i,a){const o={year:e.length===2?_e(z(e)):z(e),month:sn.indexOf(t)+1,day:z(n),hour:z(s),minute:z(i)};return a&&(o.second=z(a)),r&&(o.weekday=r.length>3?on.indexOf(r)+1:un.indexOf(r)+1),o}const jr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Kr(r){const[,e,t,n,s,i,a,o,u,l,f,h]=r,k=tt(e,s,n,t,i,a,o);let m;return u?m=Gr[u]:l?m=0:m=be(f,h),[k,new v(m)]}function Hr(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Qr=/^(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$/,_r=/^(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$/,Xr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wn(r){const[,e,t,n,s,i,a,o]=r;return[tt(e,s,n,t,i,a,o),v.utcInstance]}function es(r){const[,e,t,n,s,i,a,o]=r;return[tt(e,o,t,n,s,i,a),v.utcInstance]}const ts=Q(Lr,et),ns=Q(Rr,et),rs=Q($r,et),ss=Q(gn),Sn=_(Pr,te,fe,de),is=_(Ur,te,fe,de),as=_(Zr,te,fe,de),os=_(te,fe,de);function us(r){return X(r,[ts,Sn],[ns,is],[rs,as],[ss,os])}function ls(r){return X(Hr(r),[jr,Kr])}function cs(r){return X(r,[Qr,wn],[_r,wn],[Xr,es])}function fs(r){return X(r,[Jr,Br])}const ds=_(te);function hs(r){return X(r,[Yr,ds])}const ms=Q(qr,zr),ys=Q(pn),gs=_(te,fe,de);function ps(r){return X(r,[ms,Sn],[ys,gs])}const kn="Invalid Duration",Tn={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ws={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Tn},A=146097/400,ne=146097/4800,Ss={years:{quarters:4,months:12,weeks:A/7,days:A,hours:A*24,minutes:A*24*60,seconds:A*24*60*60,milliseconds:A*24*60*60*1e3},quarters:{months:3,weeks:A/28,days:A/4,hours:A*24/4,minutes:A*24*60/4,seconds:A*24*60*60/4,milliseconds:A*24*60*60*1e3/4},months:{weeks:ne/7,days:ne,hours:ne*24,minutes:ne*24*60,seconds:ne*24*60*60,milliseconds:ne*24*60*60*1e3},...Tn},B=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ks=B.slice(0).reverse();function P(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new p(n)}function On(r,e){let t=e.milliseconds??0;for(const n of ks.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function Nn(r,e){const t=On(r,e)<0?-1:1;B.reduceRight((n,s)=>{if(g(e[s]))return n;if(n){const i=e[n]*t,a=r[s][n],o=Math.floor(i/a);e[s]+=o*t,e[n]-=o*a*t}return s},null),B.reduce((n,s)=>{if(g(e[s]))return n;if(n){const i=e[n]%1;e[n]-=i,e[s]+=i*r[n][s]}return s},null)}function Ts(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class p{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?Ss:ws;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||S.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return p.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new x(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new p({values:ve(e,p.normalizeUnit),loc:S.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(q(e))return p.fromMillis(e);if(p.isDuration(e))return e;if(typeof e=="object")return p.fromObject(e);throw new x(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=fs(e);return n?p.fromObject(n,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=hs(e);return n?p.fromObject(n,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new x("need to specify a reason the Duration is invalid");const n=e instanceof L?e:new L(e,t);if(T.throwOnInvalid)throw new Bn(n);return new p({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new ft(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?b.create(this.loc,n).formatDurationFromString(this,e):kn}toHuman(e={}){if(!this.isValid)return kn;const t=B.map(n=>{const s=this.values[n];return g(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(s)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Qe(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},y.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?On(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e),n={};for(const s of B)(K(t.values,s)||K(this.values,s))&&(n[s]=t.get(s)+this.get(s));return P(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=rn(e(this.values[n],n));return P(this,{values:t},!0)}get(e){return this[p.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...ve(e,p.normalizeUnit)};return P(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n};return P(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Nn(this.matrix,e),P(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ts(this.normalize().shiftToAll().toObject());return P(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>p.normalizeUnit(a));const t={},n={},s=this.toObject();let i;for(const a of B)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in n)o+=this.matrix[l][a]*n[l],n[l]=0;q(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,n[a]=(o*1e3-u*1e3)/1e3}else q(s[a])&&(n[a]=s[a]);for(const a in n)n[a]!==0&&(t[i]+=a===i?n[a]:n[a]/this.matrix[i][a]);return Nn(this.matrix,t),P(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return P(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of B)if(!t(this.values[n],e.values[n]))return!1;return!0}}const re="Invalid Interval";function Os(r,e){return!r||!r.isValid?O.invalid("missing or invalid start"):!e||!e.isValid?O.invalid("missing or invalid end"):e<r?O.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class O{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new x("need to specify a reason the Interval is invalid");const n=e instanceof L?e:new L(e,t);if(T.throwOnInvalid)throw new Jn(n);return new O({invalid:n})}static fromDateTimes(e,t){const n=ye(e),s=ye(t),i=Os(n,s);return i??new O({start:n,end:s})}static after(e,t){const n=p.fromDurationLike(t),s=ye(e);return O.fromDateTimes(s,s.plus(n))}static before(e,t){const n=p.fromDurationLike(t),s=ye(e);return O.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let i,a;try{i=y.fromISO(n,t),a=i.isValid}catch{a=!1}let o,u;try{o=y.fromISO(s,t),u=o.isValid}catch{u=!1}if(a&&u)return O.fromDateTimes(i,o);if(a){const l=p.fromISO(s,t);if(l.isValid)return O.after(i,l)}else if(u){const l=p.fromISO(n,t);if(l.isValid)return O.before(o,l)}}return O.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let s;return t!=null&&t.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?O.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ye).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),n=[];let{s}=this,i=0;for(;s<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;n.push(O.fromDateTimes(s,o)),s=o,i+=1}return n}splitBy(e){const t=p.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,s=1,i;const a=[];for(;n<this.e;){const o=this.start.plus(t.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(O.fromDateTimes(n,i)),n=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:O.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return O.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)n+=u.type==="s"?1:-1,n===1?t=u.time:(t&&+t!=+u.time&&s.push(O.fromDateTimes(t,u.time)),t=null);return O.merge(s)}difference(...e){return O.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} ${this.e.toISO()})`:re}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Se,t={}){return this.isValid?b.create(this.s.loc.clone(t),e).formatInterval(this):re}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:re}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:re}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:re}toFormat(e,{separator:t=" "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:re}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):p.invalid(this.invalidReason)}mapEndpoints(e){return O.fromDateTimes(e(this.s),e(this.e))}}class Me{static hasDST(e=T.defaultZone){const t=y.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return $.isValidZone(e)}static normalizeZone(e){return Z(e,T.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||S.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||S.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||S.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||S.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||S.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||S.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||S.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return S.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return S.create(t,null,"gregory").eras(e)}static features(){return{relative:_t(),localeWeek:Xt()}}}function En(r,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(p.fromMillis(n).as("days"))}function Ns(r,e,t){const n=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=En(u,l);return(f-f%7)/7}],["days",En]],s={},i=r;let a,o;for(const[u,l]of n)t.indexOf(u)>=0&&(a=u,s[u]=l(r,e),o=i.plus(s),o>e?(s[u]--,r=i.plus(s),r>e&&(o=r,s[u]--,r=i.plus(s))):r=o);return[r,s,o,a]}function Es(r,e,t,n){let[s,i,a,o]=Ns(r,e,t);const u=e-s,l=t.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);l.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const f=p.fromObject(i,n);return l.length>0?p.fromMillis(u,n).shiftTo(...l).plus(f):f}const xs="missing Intl.DateTimeFormat.formatToParts support";function w(r,e=t=>t){return{regex:r,deser:([t])=>e(mr(t))}}const xn="[  ]",bn=new RegExp(xn,"g");function bs(r){return r.replace(/\./g,"\\.?").replace(bn,xn)}function vn(r){return r.replace(/\./g,"").replace(bn," ").toLowerCase()}function R(r,e){return r===null?null:{regex:RegExp(r.map(bs).join("|")),deser:([t])=>r.findIndex(n=>vn(t)===vn(n))+e}}function In(r,e){return{regex:r,deser:([,t,n])=>be(t,n),groups:e}}function De(r){return{regex:r,deser:([e])=>e}}function vs(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Is(r,e){const t=C(e),n=C(e,"{2}"),s=C(e,"{3}"),i=C(e,"{4}"),a=C(e,"{6}"),o=C(e,"{1,2}"),u=C(e,"{1,3}"),l=C(e,"{1,6}"),f=C(e,"{1,9}"),h=C(e,"{2,4}"),k=C(e,"{4,6}"),m=D=>({regex:RegExp(vs(D.val)),deser:([ie])=>ie,literal:!0}),M=(D=>{if(r.literal)return m(D);switch(D.val){case"G":return R(e.eras("short"),0);case"GG":return R(e.eras("long"),0);case"y":return w(l);case"yy":return w(h,_e);case"yyyy":return w(i);case"yyyyy":return w(k);case"yyyyyy":return w(a);case"M":return w(o);case"MM":return w(n);case"MMM":return R(e.months("short",!0),1);case"MMMM":return R(e.months("long",!0),1);case"L":return w(o);case"LL":return w(n);case"LLL":return R(e.months("short",!1),1);case"LLLL":return R(e.months("long",!1),1);case"d":return w(o);case"dd":return w(n);case"o":return w(u);case"ooo":return w(s);case"HH":return w(n);case"H":return w(o);case"hh":return w(n);case"h":return w(o);case"mm":return w(n);case"m":return w(o);case"q":return w(o);case"qq":return w(n);case"s":return w(o);case"ss":return w(n);case"S":return w(u);case"SSS":return w(s);case"u":return De(f);case"uu":return De(o);case"uuu":return w(t);case"a":return R(e.meridiems(),0);case"kkkk":return w(i);case"kk":return w(h,_e);case"W":return w(o);case"WW":return w(n);case"E":case"c":return w(t);case"EEE":return R(e.weekdays("short",!1),1);case"EEEE":return R(e.weekdays("long",!1),1);case"ccc":return R(e.weekdays("short",!0),1);case"cccc":return R(e.weekdays("long",!0),1);case"Z":case"ZZ":return In(new RegExp(`([+-]${o.source})(?::(${n.source}))?`),2);case"ZZZ":return In(new RegExp(`([+-]${o.source})(${n.source})?`),2);case"z":return De(/[a-z_+-/]{1,256}?/i);case" ":return De(/[^\S\n\r]/);default:return m(D)}})(r)||{invalidReason:xs};return M.token=r,M}const Ms={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"}};function Ds(r,e,t){const{type:n,value:s}=r;if(n==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[n];let a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=Ms[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Fs(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function Vs(r,e,t){const n=r.match(e);if(n){const s={};let i=1;for(const a in t)if(K(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(n.slice(i,i+u))),i+=u}return[n,s]}else return[n,{}]}function As(r){const e=i=>{switch(i){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 t=null,n;return g(r.z)||(t=$.create(r.z)),g(r.Z)||(t||(t=new v(r.Z)),n=r.Z),g(r.q)||(r.M=(r.q-1)*3+1),g(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),g(r.u)||(r.S=He(r.u)),[Object.keys(r).reduce((i,a)=>{const o=e(a);return o&&(i[o]=r[a]),i},{}),t,n]}let nt=null;function Ws(){return nt||(nt=y.fromMillis(1555555555555)),nt}function Cs(r,e){if(r.literal)return r;const t=b.macroTokenToFormatOpts(r.val),n=Vn(t,e);return n==null||n.includes(void 0)?r:n}function Mn(r,e){return Array.prototype.concat(...r.map(t=>Cs(t,e)))}class Dn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Mn(b.parseFormat(t),e),this.units=this.tokens.map(n=>Is(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,s]=Fs(this.units);this.regex=RegExp(n,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,n]=Vs(e,this.regex,this.handlers),[s,i,a]=n?As(n):[null,null,void 0];if(K(n,"a")&&K(n,"H"))throw new j("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Fn(r,e,t){return new Dn(r,t).explainFromTokens(e)}function Ls(r,e,t){const{result:n,zone:s,specificOffset:i,invalidReason:a}=Fn(r,e,t);return[n,s,i,a]}function Vn(r,e){if(!r)return null;const n=b.create(e,r).dtFormatter(Ws()),s=n.formatToParts(),i=n.resolvedOptions();return s.map(a=>Ds(a,r,i))}const rt="Invalid DateTime",Rs=864e13;function he(r){return new L("unsupported zone",`the zone "${r.name}" is not supported`)}function st(r){return r.weekData===null&&(r.weekData=Oe(r.c)),r.weekData}function it(r){return r.localWeekData===null&&(r.localWeekData=Oe(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function G(r,e){const t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new y({...t,...e,old:t})}function An(r,e,t){let n=r-e*60*1e3;const s=t.offset(n);if(e===s)return[n,e];n-=(s-e)*60*1e3;const i=t.offset(n);return s===i?[n,s]:[r-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Fe(r,e){r+=e*60*1e3;const t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ve(r,e,t){return An(xe(r),e,t)}function Wn(r,e){const t=r.o,n=r.c.year+Math.trunc(e.years),s=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...r.c,year:n,month:s,day:Math.min(r.c.day,Ee(n,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=p.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=xe(i);let[u,l]=An(o,t,r.zone);return a!==0&&(u+=a,l=r.zone.offset(u)),{ts:u,o:l}}function se(r,e,t,n,s,i){const{setZone:a,zone:o}=t;if(r&&Object.keys(r).length!==0||e){const u=e||o,l=y.fromObject(r,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return y.invalid(new L("unparsable",`the input "${s}" can't be parsed as ${n}`))}function Ae(r,e,t=!0){return r.isValid?b.create(S.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function at(r,e){const t=r.c.year>9999||r.c.year<0;let n="";return t&&r.c.year>=0&&(n+="+"),n+=E(r.c.year,t?6:4),e?(n+="-",n+=E(r.c.month),n+="-",n+=E(r.c.day)):(n+=E(r.c.month),n+=E(r.c.day)),n}function Cn(r,e,t,n,s,i){let a=E(r.c.hour);return e?(a+=":",a+=E(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(a+=":")):a+=E(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(a+=E(r.c.second),(r.c.millisecond!==0||!n)&&(a+=".",a+=E(r.c.millisecond,3))),s&&(r.isOffsetFixed&&r.offset===0&&!i?a+="Z":r.o<0?(a+="-",a+=E(Math.trunc(-r.o/60)),a+=":",a+=E(Math.trunc(-r.o%60))):(a+="+",a+=E(Math.trunc(r.o/60)),a+=":",a+=E(Math.trunc(r.o%60)))),i&&(a+="["+r.zone.ianaName+"]"),a}const Ln={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},$s={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Us={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Rn=["year","month","day","hour","minute","second","millisecond"],Zs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],qs=["year","ordinal","hour","minute","second","millisecond"];function zs(r){const e={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"}[r.toLowerCase()];if(!e)throw new ft(r);return e}function $n(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return zs(r)}}function Ps(r){if(me===void 0&&(me=T.now()),r.type!=="iana")return r.offset(me);const e=r.name;let t=ot.get(e);return t===void 0&&(t=r.offset(me),ot.set(e,t)),t}function Un(r,e){const t=Z(e.zone,T.defaultZone);if(!t.isValid)return y.invalid(he(t));const n=S.fromObject(e);let s,i;if(g(r.year))s=T.now();else{for(const u of Rn)g(r[u])&&(r[u]=Ln[u]);const a=Ht(r)||Qt(r);if(a)return y.invalid(a);const o=Ps(t);[s,i]=Ve(r,o,t)}return new y({ts:s,zone:t,loc:n,o:i})}function Zn(r,e,t){const n=g(t.round)?!0:t.round,s=(a,o)=>(a=Qe(a,n||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(a,o)),i=a=>t.calendary?e.hasSame(r,a)?0:e.startOf(a).diff(r.startOf(a),a).get(a):e.diff(r,a).get(a);if(t.unit)return s(i(t.unit),t.unit);for(const a of t.units){const o=i(a);if(Math.abs(o)>=1)return s(o,a)}return s(r>e?-0:0,t.units[t.units.length-1])}function qn(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}let me;const ot=new Map;class y{constructor(e){const t=e.zone||T.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new L("invalid input"):null)||(t.isValid?null:he(t));this.ts=g(e.ts)?T.now():e.ts;let s=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=q(e.o)&&!e.old?e.o:t.offset(this.ts);s=Fe(this.ts,o),n=Number.isNaN(s.year)?new L("invalid input"):null,s=n?null:s,i=n?null:o}this._zone=t,this.loc=e.loc||S.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new y({})}static local(){const[e,t]=qn(arguments),[n,s,i,a,o,u,l]=t;return Un({year:n,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=qn(arguments),[n,s,i,a,o,u,l]=t;return e.zone=v.utcInstance,Un({year:n,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const n=Sr(e)?e.valueOf():NaN;if(Number.isNaN(n))return y.invalid("invalid input");const s=Z(t.zone,T.defaultZone);return s.isValid?new y({ts:n,zone:s,loc:S.fromObject(t)}):y.invalid(he(s))}static fromMillis(e,t={}){if(q(e))return e<-864e13||e>Rs?y.invalid("Timestamp out of range"):new y({ts:e,zone:Z(t.zone,T.defaultZone),loc:S.fromObject(t)});throw new x(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(q(e))return new y({ts:e*1e3,zone:Z(t.zone,T.defaultZone),loc:S.fromObject(t)});throw new x("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=Z(t.zone,T.defaultZone);if(!n.isValid)return y.invalid(he(n));const s=S.fromObject(t),i=ve(e,$n),{minDaysInFirstWeek:a,startOfWeek:o}=Kt(i,s),u=T.now(),l=g(t.specificOffset)?n.offset(u):t.specificOffset,f=!g(i.ordinal),h=!g(i.year),k=!g(i.month)||!g(i.day),m=h||k,N=i.weekYear||i.weekNumber;if((m||f)&&N)throw new j("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(k&&f)throw new j("Can't mix ordinal dates with month/day");const M=N||i.weekday&&!m;let D,ie,ge=Fe(u,l);M?(D=Zs,ie=$s,ge=Oe(ge,a,o)):f?(D=qs,ie=Us,ge=je(ge)):(D=Rn,ie=Ln);let zn=!1;for(const we of D){const ei=i[we];g(ei)?zn?i[we]=ie[we]:i[we]=ge[we]:zn=!0}const Hs=M?gr(i,a,o):f?pr(i):Ht(i),Pn=Hs||Qt(i);if(Pn)return y.invalid(Pn);const Qs=M?Gt(i,a,o):f?jt(i):i,[_s,Xs]=Ve(Qs,l,n),pe=new y({ts:_s,zone:n,o:Xs,loc:s});return i.weekday&&m&&e.weekday!==pe.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${pe.toISO()}`):pe.isValid?pe:y.invalid(pe.invalid)}static fromISO(e,t={}){const[n,s]=us(e);return se(n,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,s]=ls(e);return se(n,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,s]=cs(e);return se(n,s,t,"HTTP",t)}static fromFormat(e,t,n={}){if(g(e)||g(t))throw new x("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=n,a=S.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=Ls(a,e,t);return f?y.invalid(f):se(o,u,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return y.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,s]=ps(e);return se(n,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new x("need to specify a reason the DateTime is invalid");const n=e instanceof L?e:new L(e,t);if(T.throwOnInvalid)throw new Yn(n);return new y({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Vn(e,S.fromObject(t));return n?n.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return Mn(b.parseFormat(e),S.fromObject(t)).map(s=>s.val).join("")}static resetCache(){me=void 0,ot.clear()}get(e){return this[e]}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?st(this).weekYear:NaN}get weekNumber(){return this.isValid?st(this).weekNumber:NaN}get weekday(){return this.isValid?st(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?it(this).weekday:NaN}get localWeekNumber(){return this.isValid?it(this).weekNumber:NaN}get localWeekYear(){return this.isValid?it(this).weekYear:NaN}get ordinal(){return this.isValid?je(this.c).ordinal:NaN}get monthShort(){return this.isValid?Me.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Me.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Me.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Me.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1: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 e=864e5,t=6e4,n=xe(this.c),s=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-s*t),o=this.zone.offset(n-i*t);if(a===o)return[this];const u=n-a*t,l=n-o*t,f=Fe(u,a),h=Fe(l,o);return f.hour===h.hour&&f.minute===h.minute&&f.second===h.second&&f.millisecond===h.millisecond?[G(this,{ts:u}),G(this,{ts:l})]:[this]}get isInLeapYear(){return ue(this.year)}get daysInMonth(){return Ee(this.year,this.month)}get daysInYear(){return this.isValid?H(this.year):NaN}get weeksInWeekYear(){return this.isValid?le(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?le(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:s}=b.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(v.instance(e),t)}toLocal(){return this.setZone(T.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Z(e,T.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||n){const i=e.offset(this.ts),a=this.toObject();[s]=Ve(a,i,e)}return G(this,{ts:s,zone:e})}else return y.invalid(he(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return G(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ve(e,$n),{minDaysInFirstWeek:n,startOfWeek:s}=Kt(t,this.loc),i=!g(t.weekYear)||!g(t.weekNumber)||!g(t.weekday),a=!g(t.ordinal),o=!g(t.year),u=!g(t.month)||!g(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new j("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new j("Can't mix ordinal dates with month/day");let h;i?h=Gt({...Oe(this.c,n,s),...t},n,s):g(t.ordinal)?(h={...this.toObject(),...t},g(t.day)&&(h.day=Math.min(Ee(h.year,h.month),h.day))):h=jt({...je(this.c),...t});const[k,m]=Ve(h,this.o,this.zone);return G(this,{ts:k,o:m})}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return G(this,Wn(this,t))}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e).negate();return G(this,Wn(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},s=p.normalizeUnit(e);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(n.weekNumber=this.weekNumber-1),n.weekday=i}else n.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?b.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):rt}toLocaleString(e=Se,t={}){return this.isValid?b.create(this.loc.clone(t),e).formatDateTime(this):rt}toLocaleParts(e={}){return this.isValid?b.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=e==="extended";let o=at(this,a);return o+="T",o+=Cn(this,a,t,n,s,i),o}toISODate({format:e="extended"}={}){return this.isValid?at(this,e==="extended"):null}toISOWeekDate(){return Ae(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(s?"T":"")+Cn(this,a==="extended",t,e,n,i):null}toRFC2822(){return Ae(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ae(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?at(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(n&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ae(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():rt}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return p.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=kr(t).map(p.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Es(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(y.now(),e,t)}until(e){return this.isValid?O.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=s&&s<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||y.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),Zn(t,this.plus(n),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?Zn(e.base||y.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(y.isDateTime))throw new x("min requires all arguments be DateTimes");return en(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(y.isDateTime))throw new x("max requires all arguments be DateTimes");return en(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:s=null,numberingSystem:i=null}=n,a=S.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return Fn(a,e,t)}static fromStringExplain(e,t,n={}){return y.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:s=null}=t,i=S.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return new Dn(i,e)}static fromFormatParser(e,t,n={}){if(g(e)||g(t))throw new x("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=n,a=S.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new x(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?y.invalid(f):se(o,u,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return Se}static get DATE_MED(){return dt}static get DATE_MED_WITH_WEEKDAY(){return Gn}static get DATE_FULL(){return ht}static get DATE_HUGE(){return mt}static get TIME_SIMPLE(){return yt}static get TIME_WITH_SECONDS(){return gt}static get TIME_WITH_SHORT_OFFSET(){return pt}static get TIME_WITH_LONG_OFFSET(){return wt}static get TIME_24_SIMPLE(){return St}static get TIME_24_WITH_SECONDS(){return kt}static get TIME_24_WITH_SHORT_OFFSET(){return Tt}static get TIME_24_WITH_LONG_OFFSET(){return Ot}static get DATETIME_SHORT(){return Nt}static get DATETIME_SHORT_WITH_SECONDS(){return Et}static get DATETIME_MED(){return xt}static get DATETIME_MED_WITH_SECONDS(){return bt}static get DATETIME_MED_WITH_WEEKDAY(){return jn}static get DATETIME_FULL(){return vt}static get DATETIME_FULL_WITH_SECONDS(){return It}static get DATETIME_HUGE(){return Mt}static get DATETIME_HUGE_WITH_SECONDS(){return Dt}}function ye(r){if(y.isDateTime(r))return r;if(r&&r.valueOf&&q(r.valueOf()))return y.fromJSDate(r);if(r&&typeof r=="object")return y.fromObject(r);throw new x(`Unknown datetime argument: ${r}, of type ${typeof r}`)}const Ys=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],Js=[".mp4",".avi",".mov",".3gp",".wmv"],Bs=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],Gs=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"],js=["relation","file","select"],Ks=["text","email","url","editor"];class d{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static zeroValue(e){switch(typeof e){case"string":return"";case"number":return 0;case"boolean":return!1;case"object":return e===null?null:Array.isArray(e)?[]:{};case"undefined":return;default:return null}}static isEmpty(e){return e===""||e===null||typeof e>"u"||Array.isArray(e)&&e.length===0||d.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||(e==null?void 0:e.isContentEditable)}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return d.isInput(e)||t==="button"||t==="a"||t==="details"||(e==null?void 0:e.tabIndex)>=0}static hasNonEmptyProps(e){for(let t in e)if(!d.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!d.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let n=e.length-1;n>=0;n--)if(e[n]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let n=e.length-1;n>=0;n--)if(e[n]==t){e.splice(n,1);break}}static pushUnique(e,t){d.inArray(e,t)||e.push(t)}static mergeUnique(e,t){for(let n of t)d.pushUnique(e,n);return e}static findByKey(e,t,n){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==n)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const n={};for(let s in e)n[e[s][t]]=n[e[s][t]]||[],n[e[s][t]].push(e[s]);return n}static removeByKey(e,t,n){for(let s in e)if(e[s][t]==n){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,n="id"){for(let s=e.length-1;s>=0;s--)if(e[s][n]==t[n]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const n={};for(const s of e)n[s[t]]=s;return Object.values(n)}static filterRedactedProps(e,t="******"){const n=JSON.parse(JSON.stringify(e||{}));for(let s in n)typeof n[s]=="object"&&n[s]!==null?n[s]=d.filterRedactedProps(n[s],t):n[s]===t&&delete n[s];return n}static getNestedVal(e,t,n=null,s="."){let i=e||{},a=(t||"").split(s);for(const o of a){if(!d.isObject(i)&&!Array.isArray(i)||typeof i[o]>"u")return n;i=i[o]}return i}static setByPath(e,t,n,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let i=e,a=t.split(s),o=a.pop();for(const u of a)(!d.isObject(i)&&!Array.isArray(i)||!d.isObject(i[u])&&!Array.isArray(i[u]))&&(i[u]={}),i=i[u];i[o]=n}static deleteByPath(e,t,n="."){let s=e||{},i=(t||"").split(n),a=i.pop();for(const o of i)(!d.isObject(s)&&!Array.isArray(s)||!d.isObject(s[o])&&!Array.isArray(s[o]))&&(s[o]={}),s=s[o];Array.isArray(s)?s.splice(a,1):d.isObject(s)&&delete s[a],i.length>0&&(Array.isArray(s)&&!s.length||d.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||d.isObject(e)&&Object.keys(e).length>0)&&d.deleteByPath(e,i.join(n),n)}static randomString(e=10){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s<e;s++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}static randomSecret(e=15){if(typeof crypto>"u")return d.randomString(e);const t=new Uint8Array(e);crypto.getRandomValues(t);const n="-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let s="";for(let i=0;i<e;i++)s+=n.charAt(t[i]%n.length);return s}static sentenize(e,t=!0){if(typeof e!="string")return"";if(e=e.trim().split("_").join(" "),e==="")return e;if(e=e[0].toUpperCase()+e.substring(1),t){let n=e[e.length-1];n!=="."&&n!=="?"&&n!=="!"&&(e+=".")}return e}static trimQuotedValue(e){return typeof e=="string"&&(e[0]=='"'||e[0]=="'"||e[0]=="`")&&e[0]==e[e.length-1]?e.slice(1,-1):e}static plainText(e){return e?(new DOMParser().parseFromString(e,"text/html").body.innerText||"").trim():""}static truncate(e,t=150,n=!0){return e=""+e,e.length<=t?e:e.substring(0,t)+(n?"...":"")}static truncateObject(e){const t={};for(let n in e){let s=e[n];typeof s=="string"&&(s=d.truncate(s,150,!0)),t[n]=s}return t}static slugify(e,t="_",n=[".","=","-"]){if(e==="")return"";const s={a:/а|à|á|å|â/gi,b:/б/gi,c:/ц|ç/gi,d:/д/gi,e:/е|è|é|ê|ẽ|ë/gi,f:/ф/gi,g:/г/gi,h:/х/gi,i:/й|и|ì|í|î/gi,j:/ж/gi,k:/к/gi,l:/л/gi,m:/м/gi,n:/н|ñ/gi,o:/о|ò|ó|ô|ø/gi,p:/п/gi,q:/я/gi,r:/р/gi,s:/с/gi,t:/т/gi,u:/ю|ù|ú|ů|û/gi,v:/в/gi,w:/в/gi,x:/ь/gi,y:/ъ/gi,z:/з/gi,ae:/ä|æ/gi,oe:/ö/gi,ue:/ü/gi,Ae:/Ä/gi,Ue:/Ü/gi,Oe:/Ö/gi,ss:/ß/gi,and:/&/gi};for(let i in s)e=e.replace(s[i],i);return e.replace(new RegExp("["+n.join("")+"]","g")," ").replace(/[^\w\ ]/gi,"").replace(/\s+/g,t)}static escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static splitNonEmpty(e,t=","){const n=[],s=(e||"").replaceAll("\\"+t,"{_PB_ESCAPED_}").split(t).map(i=>i.replaceAll("{_PB_ESCAPED_}",t));for(let i of s)i=i.trim(),d.isEmpty(i)||n.push(i);return n}static joinNonEmpty(e,t=", "){e=e||[];const n=[],s=t.length>1?t.trim():t;for(let i of e)i=typeof i=="string"?i.trim():"",d.isEmpty(i)||n.push(i.replaceAll(s,"\\"+s));return n.join(t)}static getInitials(e){if(e=(e||"").split("@")[0].trim(),e.length<=2)return e.toUpperCase();const t=e.split(/[\.\_\-\ ]/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},n=t[e.length]||t[19];return y.fromFormat(e,n,{zone:"UTC"})}return typeof e=="number"?y.fromMillis(e):y.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return d.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return d.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(typeof e=="object")try{e=JSON.stringify(e,null,2)}catch{}if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(n=>{console.warn("Failed to copy.",n)})}static download(e,t){const n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.setAttribute("target","_blank"),n.click(),n.remove()}static downloadJson(e,t){t=t.endsWith(".json")?t:t+".json";const n=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),s=window.URL.createObjectURL(n);d.download(s,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const n=decodeURIComponent(atob(t));return JSON.parse(n)||{}}catch(n){console.warn("Failed to parse JWT payload data.",n)}return{}}static hasImageExtension(e){return e=e||"",!!Ys.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return e=e||"",!!Js.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return e=e||"",!!Bs.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return e=e||"",!!Gs.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return d.hasImageExtension(e)?"image":d.hasDocumentExtension(e)?"document":d.hasVideoExtension(e)?"video":d.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,n=100){return new Promise(s=>{let i=new FileReader;i.onload=function(a){let o=new Image;o.onload=function(){let u=document.createElement("canvas"),l=u.getContext("2d"),f=o.width,h=o.height;return u.width=t,u.height=n,l.drawImage(o,f>h?(f-h)/2:0,0,f>h?h:f,f>h?h:f,0,0,t,n),s(u.toDataURL(e.type))},o.src=a.target.result},i.readAsDataURL(e)})}static addValueToFormData(e,t,n){if(!(typeof n>"u"))if(d.isEmpty(n))e.append(t,"");else if(Array.isArray(n))for(const s of n)d.addValueToFormData(e,t,s);else n instanceof File?e.append(t,n):n instanceof Date?e.append(t,n.toISOString()):d.isObject(n)?e.append(t,JSON.stringify(n)):e.append(t,""+n)}static dummyCollectionRecord(e){return Object.assign({collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name},d.dummyCollectionSchemaData(e))}static dummyCollectionSchemaData(e,t=!1){var i;const n=(e==null?void 0:e.fields)||[],s={};for(const a of n){if(a.hidden||t&&a.primaryKey&&a.autogeneratePattern||t&&a.type==="autodate")continue;let o=null;if(a.type==="number")o=123;else if(a.type==="date"||a.type==="autodate")o="2022-01-01 10:00:00.123Z";else if(a.type=="bool")o=!0;else if(a.type=="email")o="test@example.com";else if(a.type=="url")o="https://example.com";else if(a.type=="json")o="JSON";else if(a.type=="file"){if(t)continue;o="filename.jpg",a.maxSelect!=1&&(o=[o])}else a.type=="select"?(o=(i=a==null?void 0:a.values)==null?void 0:i[0],(a==null?void 0:a.maxSelect)!=1&&(o=[o])):a.type=="relation"?(o="RELATION_RECORD_ID",(a==null?void 0:a.maxSelect)!=1&&(o=[o])):a.type=="geoPoint"?o={lon:0,lat:0}:o="test";s[a.name]=o}return s}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"password":return"ri-lock-password-line";case"autodate":return"ri-calendar-check-line";case"geoPoint":return"ri-map-pin-2-line";default:return"ri-star-s-line"}}static getFieldValueType(e){switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"geoPoint":return"Object";case"file":return"File";case"select":case"relation":return(e==null?void 0:e.maxSelect)==1?"String":"Array<String>";default:return"String"}}static zeroDefaultStr(e){return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="geoPoint"?'{"lon":0,"lat":0}':(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&(e==null?void 0:e.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,n=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let l in e)if(l!=="fields"&&JSON.stringify(e[l])!==JSON.stringify(t[l]))return!0;const s=Array.isArray(e.fields)?e.fields:[],i=Array.isArray(t.fields)?t.fields:[],a=s.filter(l=>(l==null?void 0:l.id)&&!d.findByKey(i,"id",l.id)),o=i.filter(l=>(l==null?void 0:l.id)&&!d.findByKey(s,"id",l.id)),u=i.filter(l=>{const f=d.isObject(l)&&d.findByKey(s,"id",l.id);if(!f)return!1;for(let h in f)if(JSON.stringify(l[h])!=JSON.stringify(f[h]))return!0;return!1});return!!(o.length||u.length||n&&a.length)}static sortCollections(e=[]){const t=[],n=[],s=[];for(const a of e)a.type==="auth"?t.push(a):a.type==="base"?n.push(a):s.push(a);function i(a,o){return a.name>o.name?1:a.name<o.name?-1:0}return[].concat(t.sort(i),n.sort(i),s.sort(i))}static getExpandPresentableRelFields(e,t,n=2){let s=[];const i=t.find(a=>a.id==e.collectionId);if(!i)return s;for(const a of i.fields){if(!a.presentable||a.type!="relation"||n<=0)continue;const o=d.getExpandPresentableRelFields(a,t,n-1);for(const u of o)s.push(e.name+"."+u)}return s.length||s.push(e.name),s}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){const e=["DIV","P","A","EM","B","STRONG","H1","H2","H3","H4","H5","H6","TABLE","TR","TD","TH","TBODY","THEAD","TFOOT","BR","HR","Q","SUP","SUB","DEL","IMG","OL","UL","LI","CODE"];function t(s){let i=s.parentNode;for(;s.firstChild;)i.insertBefore(s.firstChild,s);i.removeChild(s)}function n(s){if(s){for(const i of s.children)n(i);e.includes(s.tagName)?(s.removeAttribute("style"),s.removeAttribute("class")):t(s)}}return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,convert_unsafe_embeds:!0,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],codesample_global_prismjs:!0,codesample_languages:[{text:"HTML/XML",value:"markup"},{text:"CSS",value:"css"},{text:"SQL",value:"sql"},{text:"JavaScript",value:"javascript"},{text:"Go",value:"go"},{text:"Dart",value:"dart"},{text:"Zig",value:"zig"},{text:"Rust",value:"rust"},{text:"Lua",value:"lua"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"},{text:"Markdown",value:"markdown"},{text:"Swift",value:"swift"},{text:"Kotlin",value:"kotlin"},{text:"Elixir",value:"elixir"},{text:"Scala",value:"scala"},{text:"Julia",value:"julia"},{text:"Haskell",value:"haskell"}],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image_picker table codesample direction | code fullscreen",paste_postprocess:(s,i)=>{n(i.node)},file_picker_types:"image",file_picker_callback:(s,i,a)=>{const o=document.createElement("input");o.setAttribute("type","file"),o.setAttribute("accept","image/*"),o.addEventListener("change",u=>{const l=u.target.files[0],f=new FileReader;f.addEventListener("load",()=>{if(!tinymce)return;const h="blobid"+new Date().getTime(),k=tinymce.activeEditor.editorUpload.blobCache,m=f.result.split(",")[1],N=k.create(h,l,m);k.add(N),s(N.blobUri(),{title:l.name})}),f.readAsDataURL(l)}),o.click()},setup:s=>{s.on("keydown",a=>{(a.ctrlKey||a.metaKey)&&a.code=="KeyS"&&s.formElement&&(a.preventDefault(),a.stopPropagation(),s.formElement.dispatchEvent(new KeyboardEvent("keydown",a)))});const i="tinymce_last_direction";s.on("init",()=>{var o;const a=(o=window==null?void 0:window.localStorage)==null?void 0:o.getItem(i);!s.isDirty()&&s.getContent()==""&&a=="rtl"&&s.execCommand("mceDirectionRTL")}),s.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:a=>{a([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var u;(u=window==null?void 0:window.localStorage)==null||u.setItem(i,"ltr"),s.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var u;(u=window==null?void 0:window.localStorage)==null||u.setItem(i,"rtl"),s.execCommand("mceDirectionRTL")}}])}}),s.ui.registry.addMenuButton("image_picker",{icon:"image",fetch:a=>{a([{type:"menuitem",text:"From collection",icon:"gallery",onAction:()=>{s.dispatch("collections_file_picker",{})}},{type:"menuitem",text:"Inline",icon:"browse",onAction:()=>{s.execCommand("mceImage")}}])}})}}}static displayValue(e,t,n="N/A"){e=e||{},t=t||[];let s=[];for(const a of t){let o=e[a];typeof o>"u"||(o=d.stringifyValue(o,n),s.push(o))}if(s.length>0)return s.join(", ");const i=["title","name","slug","email","username","nickname","label","heading","message","key","identifier","id"];for(const a of i){let o=d.stringifyValue(e[a],"");if(o)return o}return n}static stringifyValue(e,t="N/A",n=150){if(d.isEmpty(e))return t;if(typeof e=="number")return""+e;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?d.plainText(e):e,d.truncate(e,n)||t;if(Array.isArray(e)&&typeof e[0]!="object")return d.truncate(e.join(","),n);if(typeof e=="object")try{return d.truncate(JSON.stringify(e),n)||t}catch{return t}return e}static extractColumnsFromQuery(e){var a;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const n=e.match(/select\s+([\s\S]+)\s+from/),s=((a=n==null?void 0:n[1])==null?void 0:a.split(","))||[],i=[];for(let o of s){const u=o.trim().split(" ").pop();u!=""&&u!=t&&i.push(u.replace(/[\'\"\`\[\]\s]/g,""))}return i}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let n=[t+"id"];if(e.type==="view")for(let i of d.extractColumnsFromQuery(e.viewQuery))d.pushUnique(n,t+i);const s=e.fields||[];for(const i of s)i.type=="geoPoint"?(d.pushUnique(n,t+i.name+".lon"),d.pushUnique(n,t+i.name+".lat")):d.pushUnique(n,t+i.name);return n}static getCollectionAutocompleteKeys(e,t,n="",s=0){let i=e.find(o=>o.name==t||o.id==t);if(!i||s>=4)return[];i.fields=i.fields||[];let a=d.getAllCollectionIdentifiers(i,n);for(const o of i.fields){const u=n+o.name;if(o.type=="relation"&&o.collectionId){const l=d.getCollectionAutocompleteKeys(e,o.collectionId,u+".",s+1);l.length&&(a=a.concat(l))}o.maxSelect!=1&&js.includes(o.type)?(a.push(u+":each"),a.push(u+":length")):Ks.includes(o.type)&&a.push(u+":lower")}for(const o of e){o.fields=o.fields||[];for(const u of o.fields)if(u.type=="relation"&&u.collectionId==i.id){const l=n+o.name+"_via_"+u.name,f=d.getCollectionAutocompleteKeys(e,o.id,l+".",s+2);f.length&&(a=a.concat(f))}}return a}static getCollectionJoinAutocompleteKeys(e){const t=[];let n,s;for(const i of e)if(!i.system){n="@collection."+i.name+".",s=d.getCollectionAutocompleteKeys(e,i.name,n);for(const a of s)t.push(a)}return t}static getRequestAutocompleteKeys(e,t){const n=[];n.push("@request.context"),n.push("@request.method"),n.push("@request.query."),n.push("@request.body."),n.push("@request.headers."),n.push("@request.auth.collectionId"),n.push("@request.auth.collectionName");const s=e.filter(i=>i.type==="auth");for(const i of s){if(i.system)continue;const a=d.getCollectionAutocompleteKeys(e,i.id,"@request.auth.");for(const o of a)d.pushUnique(n,o)}if(t){const i=d.getCollectionAutocompleteKeys(e,t,"@request.body.");for(const a of i){n.push(a);const o=a.split(".");o.length===3&&o[2].indexOf(":")===-1&&n.push(a+":isset")}}return n}static parseIndex(e){var u,l,f,h,k;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const i=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((u=s[1])==null?void 0:u.trim().toLowerCase())==="unique",t.optional=!d.isEmpty((l=s[2])==null?void 0:l.trim());const a=(s[3]||"").split(".");a.length==2?(t.schemaName=a[0].replace(i,""),t.indexName=a[1].replace(i,"")):(t.schemaName="",t.indexName=a[0].replace(i,"")),t.tableName=(s[4]||"").replace(i,"");const o=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of o){m=m.trim().replaceAll("{PB_TEMP}",",");const M=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((M==null?void 0:M.length)!=4)continue;const D=(h=(f=M[1])==null?void 0:f.trim())==null?void 0:h.replace(i,"");D&&t.columns.push({name:D,collate:M[2]||"",sort:((k=M[3])==null?void 0:k.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+d.randomString(10)}\` `,t+=`ON \`${e.tableName}\` (`;const n=e.columns.filter(s=>!!(s!=null&&s.name));return n.length>1&&(t+=`
`),t+=n.map(s=>{let i="";return s.name.includes("(")||s.name.includes(" ")?i+=s.name:i+="`"+s.name+"`",s.collate&&(i+=" COLLATE "+s.collate),s.sort&&(i+=" "+s.sort.toUpperCase()),i}).join(`,
`),n.length>1&&(t+=`
`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const n=d.parseIndex(e);return n.tableName=t,d.buildIndex(n)}static replaceIndexColumn(e,t,n){if(t===n)return e;const s=d.parseIndex(e);let i=!1;for(let a of s.columns)a.name===t&&(a.name=n,i=!0);return i?d.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const n=["=","!=","~","!~",">",">=","<","<="];for(const s of n)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static normalizeLogsFilter(e,t=[]){return d.normalizeSearchFilter(e,["level","message","data"].concat(t))}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,hidden:!1,required:!1},e)}static triggerResize(){window.dispatchEvent(new Event("resize"))}static getHashQueryParams(){let e="";const t=window.location.hash.indexOf("?");return t>-1&&(e=window.location.hash.substring(t+1)),Object.fromEntries(new URLSearchParams(e))}static replaceHashQueryParams(e){e=e||{};let t="",n=window.location.hash;const s=n.indexOf("?");s>-1&&(t=n.substring(s+1),n=n.substring(0,s));const i=new URLSearchParams(t);for(let u in e){const l=e[u];l===null?i.delete(u):i.set(u,l)}t=i.toString(),t!=""&&(n+="?"+t);let a=window.location.href;const o=a.indexOf("#");o>-1&&(a=a.substring(0,o)),window.location.replace(a+n)}}const ut=11e3;onmessage=r=>{var t,n;if(!r.data.collections)return;const e={};e.baseKeys=d.getCollectionAutocompleteKeys(r.data.collections,(t=r.data.baseCollection)==null?void 0:t.name),e.baseKeys=ct(e.baseKeys.sort(lt),ut),r.data.disableRequestKeys||(e.requestKeys=d.getRequestAutocompleteKeys(r.data.collections,(n=r.data.baseCollection)==null?void 0:n.name),e.requestKeys=ct(e.requestKeys.sort(lt),ut)),r.data.disableCollectionJoinKeys||(e.collectionJoinKeys=d.getCollectionJoinAutocompleteKeys(r.data.collections),e.collectionJoinKeys=ct(e.collectionJoinKeys.sort(lt),ut)),postMessage(e)};function lt(r,e){return r.length-e.length}function ct(r,e){return r.length>e?r.slice(0,e):r}})();