vendor: 40,959 bytes, line 1
1import{c as To,g as xo,R as ln}from"./vendor-D9bbBGjW.js";class kt extends Error{}class _o extends kt{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Eo extends kt{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Do extends kt{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Vt extends kt{}class js extends kt{constructor(t){super(`Invalid unit ${t}`)}}class we extends kt{}class et extends kt{constructor(){super("Zone is an abstract class")}}const P="numeric",Ae="short",Te="long",rr={year:P,month:P,day:P},$s={year:P,month:Ae,day:P},Io={year:P,month:Ae,day:P,weekday:Ae},Bs={year:P,month:Te,day:P},Us={year:P,month:Te,day:P,weekday:Te},Zs={hour:P,minute:P},zs={hour:P,minute:P,second:P},Ys={hour:P,minute:P,second:P,timeZoneName:Ae},Hs={hour:P,minute:P,second:P,timeZoneName:Te},Gs={hour:P,minute:P,hourCycle:"h23"},Js={hour:P,minute:P,second:P,hourCycle:"h23"},Qs={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Ae},Xs={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Te},ea={year:P,month:P,day:P,hour:P,minute:P},ta={year:P,month:P,day:P,hour:P,minute:P,second:P},na={year:P,month:Ae,day:P,hour:P,minute:P},ra={year:P,month:Ae,day:P,hour:P,minute:P,second:P},Mo={year:P,month:Ae,day:P,weekday:Ae,hour:P,minute:P},ia={year:P,month:Te,day:P,hour:P,minute:P,timeZoneName:Ae},sa={year:P,month:Te,day:P,hour:P,minute:P,second:P,timeZoneName:Ae},aa={year:P,month:Te,day:P,weekday:Te,hour:P,minute:P,timeZoneName:Te},oa={year:P,month:Te,day:P,weekday:Te,hour:P,minute:P,second:P,timeZoneName:Te};class pn{get type(){throw new et}get name(){throw new et}get ianaName(){return this.name}get isUniversal(){throw new et}offsetName(t,r){throw new et}formatOffset(t,r){throw new et}offset(t){throw new et}equals(t){throw new et}get isValid(){throw new et}}let Jr=null;class or extends pn{static get instance(){return Jr===null&&(Jr=new or),Jr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:r,locale:o}){return va(t,r,o)}formatOffset(t,r){return mn(this.offset(t),r)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const ai=new Map;function No(s){let t=ai.get(s);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ai.set(s,t)),t}const Co={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Fo(s,t){const r=s.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,c,d,m,y,S,I,L]=o;return[m,c,d,y,S,I,L]}function Ao(s,t){const r=s.formatToParts(t),o=[];for(let c=0;c<r.length;c++){const{type:d,value:m}=r[c],y=Co[d];d==="era"?o[y]=m:Z(y)||(o[y]=parseInt(m,10))}return o}const Qr=new Map;class Be extends pn{static create(t){let r=Qr.get(t);return r===void 0&&Qr.set(t,r=new Be(t)),r}static resetCache(){Qr.clear(),ai.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Be.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:r,locale:o}){return va(t,r,o,this.name)}formatOffset(t,r){return mn(this.offset(t),r)}offset(t){if(!this.valid)return NaN;const r=new Date(t);if(isNaN(r))return NaN;const o=No(this.name);let[c,d,m,y,S,I,L]=o.formatToParts?Ao(o,r):Fo(o,r);y==="BC"&&(c=-Math.abs(c)+1);const G=lr({year:c,month:d,day:m,hour:S===24?0:S,minute:I,second:L,millisecond:0});let B=+r;const re=B%1e3;return B-=re>=0?re:1e3+re,(G-B)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let cs={};function Po(s,t={}){const r=JSON.stringify([s,t]);let o=cs[r];return o||(o=new Intl.ListFormat(s,t),cs[r]=o),o}const oi=new Map;function ui(s,t={}){const r=JSON.stringify([s,t]);let o=oi.get(r);return o===void 0&&(o=new Intl.DateTimeFormat(s,t),oi.set(r,o)),o}const li=new Map;function Ro(s,t={}){const r=JSON.stringify([s,t]);let o=li.get(r);return o===void 0&&(o=new Intl.NumberFormat(s,t),li.set(r,o)),o}const ci=new Map;function Vo(s,t={}){const{base:r,...o}=t,c=JSON.stringify([s,o]);let d=ci.get(c);return d===void 0&&(d=new Intl.RelativeTimeFormat(s,t),ci.set(c,d)),d}let fn=null;function qo(){return fn||(fn=new Intl.DateTimeFormat().resolvedOptions().locale,fn)}const fi=new Map;function ua(s){let t=fi.get(s);return t===void 0&&(t=new Intl.DateTimeFormat(s).resolvedOptions(),fi.set(s,t)),t}const hi=new Map;function Ko(s){let t=hi.get(s);if(!t){const r=new Intl.Locale(s);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in t||(t={...la,...t}),hi.set(s,t)}return t}function Wo(s){const t=s.indexOf("-x-");t!==-1&&(s=s.substring(0,t));const r=s.indexOf("-u-");if(r===-1)return[s];{let o,c;try{o=ui(s).resolvedOptions(),c=s}catch{const S=s.substring(0,r);o=ui(S).resolvedOptions(),c=S}const{numberingSystem:d,calendar:m}=o;return[c,d,m]}}function Lo(s,t,r){return(r||t)&&(s.includes("-u-")||(s+="-u"),r&&(s+=`-ca-${r}`),t&&(s+=`-nu-${t}`)),s}function jo(s){const t=[];for(let r=1;r<=12;r++){const o=z.utc(2009,r,1);t.push(s(o))}return t}function $o(s){const t=[];for(let r=1;r<=7;r++){const o=z.utc(2016,11,13+r);t.push(s(o))}return t}function Yn(s,t,r,o){const c=s.listingMode();return c==="error"?null:c==="en"?r(t):o(t)}function Bo(s){return s.numberingSystem&&s.numberingSystem!=="latn"?!1:s.numberingSystem==="latn"||!s.locale||s.locale.startsWith("en")||ua(s.locale).numberingSystem==="latn"}class Uo{constructor(t,r,o){this.padTo=o.padTo||0,this.floor=o.floor||!1;const{padTo:c,floor:d,...m}=o;if(!r||Object.keys(m).length>0){const y={useGrouping:!1,...o};o.padTo>0&&(y.minimumIntegerDigits=o.padTo),this.inf=Ro(t,y)}}format(t){if(this.inf){const r=this.floor?Math.floor(t):t;return this.inf.format(r)}else{const r=this.floor?Math.floor(t):Si(t,3);return de(r,this.padTo)}}}class Zo{constructor(t,r,o){this.opts=o,this.originalZone=void 0;let c;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const m=-1*(t.offset/60),y=m>=0?`Etc/GMT+${m}`:`Etc/GMT${m}`;t.offset!==0&&Be.create(y).valid?(c=y,this.dt=t):(c="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,c=t.zone.name):(c="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const d={...this.opts};d.timeZone=d.timeZone||c,this.dtf=ui(r,d)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(r=>{if(r.type==="timeZoneName"){const o=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:o}}else return r}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class zo{constructor(t,r,o){this.opts={style:"long",...o},!r&&pa()&&(this.rtf=Vo(t,o))}format(t,r){return this.rtf?this.rtf.format(t,r):yu(r,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]}}const la={firstDay:1,minimalDays:4,weekend:[6,7]};class ne{static fromOpts(t){return ne.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,r,o,c,d=!1){const m=t||ce.defaultLocale,y=m||(d?"en-US":qo()),S=r||ce.defaultNumberingSystem,I=o||ce.defaultOutputCalendar,L=mi(c)||ce.defaultWeekSettings;return new ne(y,S,I,L,m)}static resetCache(){fn=null,oi.clear(),li.clear(),ci.clear(),fi.clear(),hi.clear()}static fromObject({locale:t,numberingSystem:r,outputCalendar:o,weekSettings:c}={}){return ne.create(t,r,o,c)}constructor(t,r,o,c,d){const[m,y,S]=Wo(t);this.locale=m,this.numberingSystem=r||y||null,this.outputCalendar=o||S||null,this.weekSettings=c,this.intl=Lo(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bo(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&r?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:ne.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,mi(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,r=!1){return Yn(this,t,ka,()=>{const o=this.intl==="ja"||this.intl.startsWith("ja-");r&=!o;const c=r?{month:t,day:"numeric"}:{month:t},d=r?"format":"standalone";if(!this.monthsCache[d][t]){const m=o?y=>this.dtFormatter(y,c).format():y=>this.extract(y,c,"month");this.monthsCache[d][t]=jo(m)}return this.monthsCache[d][t]})}weekdays(t,r=!1){return Yn(this,t,Ta,()=>{const o=r?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},c=r?"format":"standalone";return this.weekdaysCache[c][t]||(this.weekdaysCache[c][t]=$o(d=>this.extract(d,o,"weekday"))),this.weekdaysCache[c][t]})}meridiems(){return Yn(this,void 0,()=>xa,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[z.utc(2016,11,13,9),z.utc(2016,11,13,19)].map(r=>this.extract(r,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Yn(this,t,_a,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[z.utc(-40,1,1),z.utc(2017,1,1)].map(o=>this.extract(o,r,"era"))),this.eraCache[t]})}extract(t,r,o){const c=this.dtFormatter(t,r),d=c.formatToParts(),m=d.find(y=>y.type.toLowerCase()===o);return m?m.value:null}numberFormatter(t={}){return new Uo(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,r={}){return new Zo(t,this.intl,r)}relFormatter(t={}){return new zo(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Po(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ua(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ga()?Ko(this.locale):la}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Xr=null;class ke extends pn{static get utcInstance(){return Xr===null&&(Xr=new ke(0)),Xr}static instance(t){return t===0?ke.utcInstance:new ke(t)}static parseSpecifier(t){if(t){const r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new ke(cr(r[1],r[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${mn(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${mn(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,r){return mn(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Yo extends pn{constructor(t){super(),this.zoneName=t}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 nt(s,t){if(Z(s)||s===null)return t;if(s instanceof pn)return s;if(eu(s)){const r=s.toLowerCase();return r==="default"?t:r==="local"||r==="system"?or.instance:r==="utc"||r==="gmt"?ke.utcInstance:ke.parseSpecifier(r)||Be.create(s)}else return rt(s)?ke.instance(s):typeof s=="object"&&"offset"in s&&typeof s.offset=="function"?s:new Yo(s)}const wi={arab:"[Ù -Ù©]",arabext:"[Û°-Û¹]",bali:"[á-á]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[ï¼-ï¼]",gujr:"[૦-૯]",hanidec:"[ã|ä¸|äº|ä¸|å|äº|å
|ä¸|å
«|ä¹]",khmr:"[á -á©]",knda:"[೦-೯]",laoo:"[à»-à»]",limb:"[á¥-á¥]",mlym:"[൦-൯]",mong:"[á -á ]",mymr:"[á-á]",orya:"[à¦-à¯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[à¹-à¹]",tibt:"[༠-༩]",latn:"\\d"},fs={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]},Ho=wi.hanidec.replace(/[\[|\]]/g,"").split("");function Go(s){let t=parseInt(s,10);if(isNaN(t)){t="";for(let r=0;r<s.length;r++){const o=s.charCodeAt(r);if(s[r].search(wi.hanidec)!==-1)t+=Ho.indexOf(s[r]);else for(const c in fs){const[d,m]=fs[c];o>=d&&o<=m&&(t+=o-d)}}return parseInt(t,10)}else return t}const di=new Map;function Jo(){di.clear()}function Ne({numberingSystem:s},t=""){const r=s||"latn";let o=di.get(r);o===void 0&&(o=new Map,di.set(r,o));let c=o.get(t);return c===void 0&&(c=new RegExp(`${wi[r]}${t}`),o.set(t,c)),c}let hs=()=>Date.now(),ds="system",ms=null,ys=null,ps=null,gs=60,vs,ws=null;class ce{static get now(){return hs}static set now(t){hs=t}static set defaultZone(t){ds=t}static get defaultZone(){return nt(ds,or.instance)}static get defaultLocale(){return ms}static set defaultLocale(t){ms=t}static get defaultNumberingSystem(){return ys}static set defaultNumberingSystem(t){ys=t}static get defaultOutputCalendar(){return ps}static set defaultOutputCalendar(t){ps=t}static get defaultWeekSettings(){return ws}static set defaultWeekSettings(t){ws=mi(t)}static get twoDigitCutoffYear(){return gs}static set twoDigitCutoffYear(t){gs=t%100}static get throwOnInvalid(){return vs}static set throwOnInvalid(t){vs=t}static resetCaches(){ne.resetCache(),Be.resetCache(),z.resetCache(),Jo()}}class Fe{constructor(t,r){this.reason=t,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ca=[0,31,59,90,120,151,181,212,243,273,304,334],fa=[0,31,60,91,121,152,182,213,244,274,305,335];function De(s,t){return new Fe("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${s}, which is invalid`)}function bi(s,t,r){const o=new Date(Date.UTC(s,t-1,r));s<100&&s>=0&&o.setUTCFullYear(o.getUTCFullYear()-1900);const c=o.getUTCDay();return c===0?7:c}function ha(s,t,r){return r+(gn(s)?fa:ca)[t-1]}function da(s,t){const r=gn(s)?fa:ca,o=r.findIndex(d=>d<t),c=t-r[o];return{month:o+1,day:c}}function ki(s,t){return(s-t+7)%7+1}function ir(s,t=4,r=1){const{year:o,month:c,day:d}=s,m=ha(o,c,d),y=ki(bi(o,c,d),r);let S=Math.floor((m-y+14-t)/7),I;return S<1?(I=o-1,S=yn(I,t,r)):S>yn(o,t,r)?(I=o+1,S=1):I=o,{weekYear:I,weekNumber:S,weekday:y,...fr(s)}}function bs(s,t=4,r=1){const{weekYear:o,weekNumber:c,weekday:d}=s,m=ki(bi(o,1,t),r),y=qt(o);let S=c*7+d-m-7+t,I;S<1?(I=o-1,S+=qt(I)):S>y?(I=o+1,S-=qt(o)):I=o;const{month:L,day:K}=da(I,S);return{year:I,month:L,day:K,...fr(s)}}function ei(s){const{year:t,month:r,day:o}=s,c=ha(t,r,o);return{year:t,ordinal:c,...fr(s)}}function ks(s){const{year:t,ordinal:r}=s,{month:o,day:c}=da(t,r);return{year:t,month:o,day:c,...fr(s)}}function Os(s,t){if(!Z(s.localWeekday)||!Z(s.localWeekNumber)||!Z(s.localWeekYear)){if(!Z(s.weekday)||!Z(s.weekNumber)||!Z(s.weekYear))throw new Vt("Cannot mix locale-based week fields with ISO-based week fields");return Z(s.localWeekday)||(s.weekday=s.localWeekday),Z(s.localWeekNumber)||(s.weekNumber=s.localWeekNumber),Z(s.localWeekYear)||(s.weekYear=s.localWeekYear),delete s.localWeekday,delete s.localWeekNumber,delete s.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Qo(s,t=4,r=1){const o=ur(s.weekYear),c=Ie(s.weekNumber,1,yn(s.weekYear,t,r)),d=Ie(s.weekday,1,7);return o?c?d?!1:De("weekday",s.weekday):De("week",s.weekNumber):De("weekYear",s.weekYear)}function Xo(s){const t=ur(s.year),r=Ie(s.ordinal,1,qt(s.year));return t?r?!1:De("ordinal",s.ordinal):De("year",s.year)}function ma(s){const t=ur(s.year),r=Ie(s.month,1,12),o=Ie(s.day,1,sr(s.year,s.month));return t?r?o?!1:De("day",s.day):De("month",s.month):De("year",s.year)}function ya(s){const{hour:t,minute:r,second:o,millisecond:c}=s,d=Ie(t,0,23)||t===24&&r===0&&o===0&&c===0,m=Ie(r,0,59),y=Ie(o,0,59),S=Ie(c,0,999);return d?m?y?S?!1:De("millisecond",c):De("second",o):De("minute",r):De("hour",t)}function Z(s){return typeof s>"u"}function rt(s){return typeof s=="number"}function ur(s){return typeof s=="number"&&s%1===0}function eu(s){return typeof s=="string"}function tu(s){return Object.prototype.toString.call(s)==="[object Date]"}function pa(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ga(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function nu(s){return Array.isArray(s)?s:[s]}function Ss(s,t,r){if(s.length!==0)return s.reduce((o,c)=>{const d=[t(c),c];return o&&r(o[0],d[0])===o[0]?o:d},null)[1]}function ru(s,t){return t.reduce((r,o)=>(r[o]=s[o],r),{})}function Wt(s,t){return Object.prototype.hasOwnProperty.call(s,t)}function mi(s){if(s==null)return null;if(typeof s!="object")throw new we("Week settings must be an object");if(!Ie(s.firstDay,1,7)||!Ie(s.minimalDays,1,7)||!Array.isArray(s.weekend)||s.weekend.some(t=>!Ie(t,1,7)))throw new we("Invalid week settings");return{firstDay:s.firstDay,minimalDays:s.minimalDays,weekend:Array.from(s.weekend)}}function Ie(s,t,r){return ur(s)&&s>=t&&s<=r}function iu(s,t){return s-t*Math.floor(s/t)}function de(s,t=2){const r=s<0;let o;return r?o="-"+(""+-s).padStart(t,"0"):o=(""+s).padStart(t,"0"),o}function tt(s){if(!(Z(s)||s===null||s===""))return parseInt(s,10)}function vt(s){if(!(Z(s)||s===null||s===""))return parseFloat(s)}function Oi(s){if(!(Z(s)||s===null||s==="")){const t=parseFloat("0."+s)*1e3;return Math.floor(t)}}function Si(s,t,r="round"){const o=10**t;switch(r){case"expand":return s>0?Math.ceil(s*o)/o:Math.floor(s*o)/o;case"trunc":return Math.trunc(s*o)/o;case"round":return Math.round(s*o)/o;case"floor":return Math.floor(s*o)/o;case"ceil":return Math.ceil(s*o)/o;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function gn(s){return s%4===0&&(s%100!==0||s%400===0)}function qt(s){return gn(s)?366:365}function sr(s,t){const r=iu(t-1,12)+1,o=s+(t-r)/12;return r===2?gn(o)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function lr(s){let t=Date.UTC(s.year,s.month-1,s.day,s.hour,s.minute,s.second,s.millisecond);return s.year<100&&s.year>=0&&(t=new Date(t),t.setUTCFullYear(s.year,s.month-1,s.day)),+t}function Ts(s,t,r){return-ki(bi(s,1,t),r)+t-1}function yn(s,t=4,r=1){const o=Ts(s,t,r),c=Ts(s+1,t,r);return(qt(s)-o+c)/7}function yi(s){return s>99?s:s>ce.twoDigitCutoffYear?1900+s:2e3+s}function va(s,t,r,o=null){const c=new Date(s),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};o&&(d.timeZone=o);const m={timeZoneName:t,...d},y=new Intl.DateTimeFormat(r,m).formatToParts(c).find(S=>S.type.toLowerCase()==="timezonename");return y?y.value:null}function cr(s,t){let r=parseInt(s,10);Number.isNaN(r)&&(r=0);const o=parseInt(t,10)||0,c=r<0||Object.is(r,-0)?-o:o;return r*60+c}function wa(s){const t=Number(s);if(typeof s=="boolean"||s===""||!Number.isFinite(t))throw new we(`Invalid unit value ${s}`);return t}function ar(s,t){const r={};for(const o in s)if(Wt(s,o)){const c=s[o];if(c==null)continue;r[t(o)]=wa(c)}return r}function mn(s,t){const r=Math.trunc(Math.abs(s/60)),o=Math.trunc(Math.abs(s%60)),c=s>=0?"+":"-";switch(t){case"short":return`${c}${de(r,2)}:${de(o,2)}`;case"narrow":return`${c}${r}${o>0?`:${o}`:""}`;case"techie":return`${c}${de(r,2)}${de(o,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function fr(s){return ru(s,["hour","minute","second","millisecond"])}const su=["January","February","March","April","May","June","July","August","September","October","November","December"],ba=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],au=["J","F","M","A","M","J","J","A","S","O","N","D"];function ka(s){switch(s){case"narrow":return[...au];case"short":return[...ba];case"long":return[...su];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 Oa=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Sa=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ou=["M","T","W","T","F","S","S"];function Ta(s){switch(s){case"narrow":return[...ou];case"short":return[...Sa];case"long":return[...Oa];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xa=["AM","PM"],uu=["Before Christ","Anno Domini"],lu=["BC","AD"],cu=["B","A"];function _a(s){switch(s){case"narrow":return[...cu];case"short":return[...lu];case"long":return[...uu];default:return null}}function fu(s){return xa[s.hour<12?0:1]}function hu(s,t){return Ta(t)[s.weekday-1]}function du(s,t){return ka(t)[s.month-1]}function mu(s,t){return _a(t)[s.year<0?0:1]}function yu(s,t,r="always",o=!1){const c={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."]},d=["hours","minutes","seconds"].indexOf(s)===-1;if(r==="auto"&&d){const K=s==="days";switch(t){case 1:return K?"tomorrow":`next ${c[s][0]}`;case-1:return K?"yesterday":`last ${c[s][0]}`;case 0:return K?"today":`this ${c[s][0]}`}}const m=Object.is(t,-0)||t<0,y=Math.abs(t),S=y===1,I=c[s],L=o?S?I[1]:I[2]||I[1]:S?c[s][0]:s;return m?`${y} ${L} ago`:`in ${y} ${L}`}function xs(s,t){let r="";for(const o of s)o.literal?r+=o.val:r+=t(o.val);return r}const pu={D:rr,DD:$s,DDD:Bs,DDDD:Us,t:Zs,tt:zs,ttt:Ys,tttt:Hs,T:Gs,TT:Js,TTT:Qs,TTTT:Xs,f:ea,ff:na,fff:ia,ffff:aa,F:ta,FF:ra,FFF:sa,FFFF:oa};class be{static create(t,r={}){return new be(t,r)}static parseFormat(t){let r=null,o="",c=!1;const d=[];for(let m=0;m<t.length;m++){const y=t.charAt(m);y==="'"?((o.length>0||c)&&d.push({literal:c||/^\s+$/.test(o),val:o===""?"'":o}),r=null,o="",c=!c):c||y===r?o+=y:(o.length>0&&d.push({literal:/^\s+$/.test(o),val:o}),o=y,r=y)}return o.length>0&&d.push({literal:c||/^\s+$/.test(o),val:o}),d}static macroTokenToFormatOpts(t){return pu[t]}constructor(t,r){this.opts=r,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...r}).format()}dtFormatter(t,r={}){return this.loc.dtFormatter(t,{...this.opts,...r})}formatDateTime(t,r){return this.dtFormatter(t,r).format()}formatDateTimeParts(t,r){return this.dtFormatter(t,r).formatToParts()}formatInterval(t,r){return this.dtFormatter(t.start,r).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,r){return this.dtFormatter(t,r).resolvedOptions()}num(t,r=0,o=void 0){if(this.opts.forceSimple)return de(t,r);const c={...this.opts};return r>0&&(c.padTo=r),o&&(c.signDisplay=o),this.loc.numberFormatter(c).format(t)}formatDateTimeFromString(t,r){const o=this.loc.listingMode()==="en",c=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(B,re)=>this.loc.extract(t,B,re),m=B=>t.isOffsetFixed&&t.offset===0&&B.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,B.format):"",y=()=>o?fu(t):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),S=(B,re)=>o?du(t,B):d(re?{month:B}:{month:B,day:"numeric"},"month"),I=(B,re)=>o?hu(t,B):d(re?{weekday:B}:{weekday:B,month:"long",day:"numeric"},"weekday"),L=B=>{const re=be.macroTokenToFormatOpts(B);return re?this.formatWithSystemDefault(t,re):B},K=B=>o?mu(t,B):d({era:B},"era"),G=B=>{switch(B){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return m({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return m({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return m({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return y();case"d":return c?d({day:"numeric"},"day"):this.num(t.day);case"dd":return c?d({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return I("short",!0);case"cccc":return I("long",!0);case"ccccc":return I("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return I("short",!1);case"EEEE":return I("long",!1);case"EEEEE":return I("narrow",!1);case"L":return c?d({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return c?d({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return S("short",!0);case"LLLL":return S("long",!0);case"LLLLL":return S("narrow",!0);case"M":return c?d({month:"numeric"},"month"):this.num(t.month);case"MM":return c?d({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return S("short",!1);case"MMMM":return S("long",!1);case"MMMMM":return S("narrow",!1);case"y":return c?d({year:"numeric"},"year"):this.num(t.year);case"yy":return c?d({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return c?d({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return c?d({year:"numeric"},"year"):this.num(t.year,6);case"G":return K("short");case"GG":return K("long");case"GGGGG":return K("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return L(B)}};return xs(be.parseFormat(r),G)}formatDurationFromString(t,r){const o=this.opts.signMode==="negativeLargestOnly"?-1:1,c=L=>{switch(L[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},d=(L,K)=>G=>{const B=c(G);if(B){const re=K.isNegativeDuration&&B!==K.largestUnit?o:1;let me;return this.opts.signMode==="negativeLargestOnly"&&B!==K.largestUnit?me="never":this.opts.signMode==="all"?me="always":me="auto",this.num(L.get(B)*re,G.length,me)}else return G},m=be.parseFormat(r),y=m.reduce((L,{literal:K,val:G})=>K?L:L.concat(G),[]),S=t.shiftTo(...y.map(c).filter(L=>L)),I={isNegativeDuration:S<0,largestUnit:Object.keys(S.values)[0]};return xs(m,d(S,I))}}const Ea=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Lt(...s){const t=s.reduce((r,o)=>r+o.source,"");return RegExp(`^${t}$`)}function jt(...s){return t=>s.reduce(([r,o,c],d)=>{const[m,y,S]=d(t,c);return[{...r,...m},y||o,S]},[{},null,1]).slice(0,2)}function $t(s,...t){if(s==null)return[null,null];for(const[r,o]of t){const c=r.exec(s);if(c)return o(c)}return[null,null]}function Da(...s){return(t,r)=>{const o={};let c;for(c=0;c<s.length;c++)o[s[c]]=tt(t[r+c]);return[o,null,r+c]}}const Ia=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,gu=`(?:${Ia.source}?(?:\\[(${Ea.source})\\])?)?`,Ti=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ma=RegExp(`${Ti.source}${gu}`),xi=RegExp(`(?:[Tt]${Ma.source})?`),vu=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,wu=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bu=/(\d{4})-?(\d{3})/,ku=Da("weekYear","weekNumber","weekDay"),Ou=Da("year","ordinal"),Su=/(\d{4})-(\d\d)-(\d\d)/,Na=RegExp(`${Ti.source} ?(?:${Ia.source}|(${Ea.source}))?`),Tu=RegExp(`(?: ${Na.source})?`);function Kt(s,t,r){const o=s[t];return Z(o)?r:tt(o)}function xu(s,t){return[{year:Kt(s,t),month:Kt(s,t+1,1),day:Kt(s,t+2,1)},null,t+3]}function Bt(s,t){return[{hours:Kt(s,t,0),minutes:Kt(s,t+1,0),seconds:Kt(s,t+2,0),milliseconds:Oi(s[t+3])},null,t+4]}function vn(s,t){const r=!s[t]&&!s[t+1],o=cr(s[t+1],s[t+2]),c=r?null:ke.instance(o);return[{},c,t+3]}function wn(s,t){const r=s[t]?Be.create(s[t]):null;return[{},r,t+1]}const _u=RegExp(`^T?${Ti.source}$`),Eu=/^-?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 Du(s){const[t,r,o,c,d,m,y,S,I]=s,L=t[0]==="-",K=S&&S[0]==="-",G=(B,re=!1)=>B!==void 0&&(re||B&&L)?-B:B;return[{years:G(vt(r)),months:G(vt(o)),weeks:G(vt(c)),days:G(vt(d)),hours:G(vt(m)),minutes:G(vt(y)),seconds:G(vt(S),S==="-0"),milliseconds:G(Oi(I),K)}]}const Iu={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _i(s,t,r,o,c,d,m){const y={year:t.length===2?yi(tt(t)):tt(t),month:ba.indexOf(r)+1,day:tt(o),hour:tt(c),minute:tt(d)};return m&&(y.second=tt(m)),s&&(y.weekday=s.length>3?Oa.indexOf(s)+1:Sa.indexOf(s)+1),y}const Mu=/^(?:(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 Nu(s){const[,t,r,o,c,d,m,y,S,I,L,K]=s,G=_i(t,c,o,r,d,m,y);let B;return S?B=Iu[S]:I?B=0:B=cr(L,K),[G,new ke(B)]}function Cu(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Fu=/^(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$/,Au=/^(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$/,Pu=/^(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 _s(s){const[,t,r,o,c,d,m,y]=s;return[_i(t,c,o,r,d,m,y),ke.utcInstance]}function Ru(s){const[,t,r,o,c,d,m,y]=s;return[_i(t,y,r,o,c,d,m),ke.utcInstance]}const Vu=Lt(vu,xi),qu=Lt(wu,xi),Ku=Lt(bu,xi),Wu=Lt(Ma),Ca=jt(xu,Bt,vn,wn),Lu=jt(ku,Bt,vn,wn),ju=jt(Ou,Bt,vn,wn),$u=jt(Bt,vn,wn);function Bu(s){return $t(s,[Vu,Ca],[qu,Lu],[Ku,ju],[Wu,$u])}function Uu(s){return $t(Cu(s),[Mu,Nu])}function Zu(s){return $t(s,[Fu,_s],[Au,_s],[Pu,Ru])}function zu(s){return $t(s,[Eu,Du])}const Yu=jt(Bt);function Hu(s){return $t(s,[_u,Yu])}const Gu=Lt(Su,Tu),Ju=Lt(Na),Qu=jt(Bt,vn,wn);function Xu(s){return $t(s,[Gu,Ca],[Ju,Qu])}const Es="Invalid Duration",Fa={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},el={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:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Fa},Ee=146097/400,At=146097/4800,tl={years:{quarters:4,months:12,weeks:Ee/7,days:Ee,hours:Ee*24,minutes:Ee*24*60,seconds:Ee*24*60*60,milliseconds:Ee*24*60*60*1e3},quarters:{months:3,weeks:Ee/28,days:Ee/4,hours:Ee*24/4,minutes:Ee*24*60/4,seconds:Ee*24*60*60/4,milliseconds:Ee*24*60*60*1e3/4},months:{weeks:At/7,days:At,hours:At*24,minutes:At*24*60,seconds:At*24*60*60,milliseconds:At*24*60*60*1e3},...Fa},bt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],nl=bt.slice(0).reverse();function $e(s,t,r=!1){const o={values:r?t.values:{...s.values,...t.values||{}},loc:s.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||s.conversionAccuracy,matrix:t.matrix||s.matrix};return new Q(o)}function Aa(s,t){let r=t.milliseconds??0;for(const o of nl.slice(1))t[o]&&(r+=t[o]*s[o].milliseconds);return r}function Ds(s,t){const r=Aa(s,t)<0?-1:1;bt.reduceRight((o,c)=>{if(Z(t[c]))return o;if(o){const d=t[o]*r,m=s[c][o],y=Math.floor(d/m);t[c]+=y*r,t[o]-=y*m*r}return c},null),bt.reduce((o,c)=>{if(Z(t[c]))return o;if(o){const d=t[o]%1;t[o]-=d,t[c]+=d*s[o][c]}return c},null)}function Is(s){const t={};for(const[r,o]of Object.entries(s))o!==0&&(t[r]=o);return t}class Q{constructor(t){const r=t.conversionAccuracy==="longterm"||!1;let o=r?tl:el;t.matrix&&(o=t.matrix),this.values=t.values,this.loc=t.loc||ne.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=o,this.isLuxonDuration=!0}static fromMillis(t,r){return Q.fromObject({milliseconds:t},r)}static fromObject(t,r={}){if(t==null||typeof t!="object")throw new we(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Q({values:ar(t,Q.normalizeUnit),loc:ne.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(t){if(rt(t))return Q.fromMillis(t);if(Q.isDuration(t))return t;if(typeof t=="object")return Q.fromObject(t);throw new we(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,r){const[o]=zu(t);return o?Q.fromObject(o,r):Q.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,r){const[o]=Hu(t);return o?Q.fromObject(o,r):Q.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,r=null){if(!t)throw new we("need to specify a reason the Duration is invalid");const o=t instanceof Fe?t:new Fe(t,r);if(ce.throwOnInvalid)throw new Do(o);return new Q({invalid:o})}static normalizeUnit(t){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!r)throw new js(t);return r}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,r={}){const o={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?be.create(this.loc,o).formatDurationFromString(this,t):Es}toHuman(t={}){if(!this.isValid)return Es;const r=t.showZeros!==!1,o=bt.map(c=>{const d=this.values[c];return Z(d)||d===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:c.slice(0,-1)}).format(d)}).filter(c=>c);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(o)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Si(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const r=this.toMillis();return r<0||r>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},z.fromMillis(r,{zone:"UTC"}).toISOTime(t))}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?Aa(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const r=Q.fromDurationLike(t),o={};for(const c of bt)(Wt(r.values,c)||Wt(this.values,c))&&(o[c]=r.get(c)+this.get(c));return $e(this,{values:o},!0)}minus(t){if(!this.isValid)return this;const r=Q.fromDurationLike(t);return this.plus(r.negate())}mapUnits(t){if(!this.isValid)return this;const r={};for(const o of Object.keys(this.values))r[o]=wa(t(this.values[o],o));return $e(this,{values:r},!0)}get(t){return this[Q.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const r={...this.values,...ar(t,Q.normalizeUnit)};return $e(this,{values:r})}reconfigure({locale:t,numberingSystem:r,conversionAccuracy:o,matrix:c}={}){const m={loc:this.loc.clone({locale:t,numberingSystem:r}),matrix:c,conversionAccuracy:o};return $e(this,m)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Ds(this.matrix,t),$e(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Is(this.normalize().shiftToAll().toObject());return $e(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(m=>Q.normalizeUnit(m));const r={},o={},c=this.toObject();let d;for(const m of bt)if(t.indexOf(m)>=0){d=m;let y=0;for(const I in o)y+=this.matrix[I][m]*o[I],o[I]=0;rt(c[m])&&(y+=c[m]);const S=Math.trunc(y);r[m]=S,o[m]=(y*1e3-S*1e3)/1e3}else rt(c[m])&&(o[m]=c[m]);for(const m in o)o[m]!==0&&(r[d]+=m===d?o[m]:o[m]/this.matrix[d][m]);return Ds(this.matrix,r),$e(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=this.values[r]===0?0:-this.values[r];return $e(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=Is(this.values);return $e(this,{values:t},!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(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function r(o,c){return o===void 0||o===0?c===void 0||c===0:o===c}for(const o of bt)if(!r(this.values[o],t.values[o]))return!1;return!0}}const Pt="Invalid Interval";function rl(s,t){return!s||!s.isValid?le.invalid("missing or invalid start"):!t||!t.isValid?le.invalid("missing or invalid end"):t<s?le.invalid("end before start",`The end of an interval must be after its start, but you had start=${s.toISO()} and end=${t.toISO()}`):null}class le{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,r=null){if(!t)throw new we("need to specify a reason the Interval is invalid");const o=t instanceof Fe?t:new Fe(t,r);if(ce.throwOnInvalid)throw new Eo(o);return new le({invalid:o})}static fromDateTimes(t,r){const o=cn(t),c=cn(r),d=rl(o,c);return d??new le({start:o,end:c})}static after(t,r){const o=Q.fromDurationLike(r),c=cn(t);return le.fromDateTimes(c,c.plus(o))}static before(t,r){const o=Q.fromDurationLike(r),c=cn(t);return le.fromDateTimes(c.minus(o),c)}static fromISO(t,r){const[o,c]=(t||"").split("/",2);if(o&&c){let d,m;try{d=z.fromISO(o,r),m=d.isValid}catch{m=!1}let y,S;try{y=z.fromISO(c,r),S=y.isValid}catch{S=!1}if(m&&S)return le.fromDateTimes(d,y);if(m){const I=Q.fromISO(c,r);if(I.isValid)return le.after(d,I)}else if(S){const I=Q.fromISO(o,r);if(I.isValid)return le.before(y,I)}}
vendor: 3,750 bytes, line 1
1return le.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",r){if(!this.isValid)return NaN;const o=this.start.startOf(t,r);let c;return r!=null&&r.useLocaleWeeks?c=this.end.reconfigure({locale:o.locale}):c=this.end,c=c.startOf(t,r),Math.floor(c.diff(o,t).get(t))+(c.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:r}={}){return this.isValid?le.fromDateTimes(t||this.s,r||this.e):this}splitAt(...t){if(!this.isValid)return[];const r=t.map(cn).filter(m=>this.contains(m)).sort((m,y)=>m.toMillis()-y.toMillis()),o=[];let{s:c}=this,d=0;for(;c<this.e;){const m=r[d]||this.e,y=+m>+this.e?this.e:m;o.push(le.fromDateTimes(c,y)),c=y,d+=1}return o}splitBy(t){const r=Q.fromDurationLike(t);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:o}=this,c=1,d;const m=[];for(;o<this.e;){const y=this.start.plus(r.mapUnits(S=>S*c));d=+y>+this.e?this.e:y,m.push(le.fromDateTimes(o,d)),o=d,c+=1}return m}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const r=this.s>t.s?this.s:t.s,o=this.e<t.e?this.e:t.e;return r>=o?null:le.fromDateTimes(r,o)}union(t){if(!this.isValid)return this;const r=this.s<t.s?this.s:t.s,o=this.e>t.e?this.e:t.e;return le.fromDateTimes(r,o)}static merge(t){const[r,o]=t.sort((c,d)=>c.s-d.s).reduce(([c,d],m)=>d?d.overlaps(m)||d.abutsStart(m)?[c,d.union(m)]:[c.concat([d]),m]:[c,m],[[],null]);return o&&r.push(o),r}static xor(t){let r=null,o=0;const c=[],d=t.map(S=>[{time:S.s,type:"s"},{time:S.e,type:"e"}]),m=Array.prototype.concat(...d),y=m.sort((S,I)=>S.time-I.time);for(const S of y)o+=S.type==="s"?1:-1,o===1?r=S.time:(r&&+r!=+S.time&&c.push(le.fromDateTimes(r,S.time)),r=null);return le.merge(c)}difference(...t){return le.xor([this].concat(t)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} â ${this.e.toISO()})`:Pt}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=rr,r={}){return this.isValid?be.create(this.s.loc.clone(r),t).formatInterval(this):Pt}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Pt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Pt}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Pt}toFormat(t,{separator:r=" â "}={}){return this.isValid?`${this.s.toFormat(t)}${r}${this.e.toFormat(t)}`:Pt}toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):Q.invalid(this.invalidReason)}mapEndpoints(t){return le.fromDateTimes(t(this.s),t(this.e))}}
vendor: 27,988 bytes, line 1
1class Hn{static hasDST(t=ce.defaultZone){const r=z.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(t){return Be.isValidZone(t)}static normalizeZone(t){return nt(t,ce.defaultZone)}static getStartOfWeek({locale:t=null,locObj:r=null}={}){return(r||ne.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:r=null}={}){return(r||ne.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:r=null}={}){return(r||ne.create(t)).getWeekendDays().slice()}static months(t="long",{locale:r=null,numberingSystem:o=null,locObj:c=null,outputCalendar:d="gregory"}={}){return(c||ne.create(r,o,d)).months(t)}static monthsFormat(t="long",{locale:r=null,numberingSystem:o=null,locObj:c=null,outputCalendar:d="gregory"}={}){return(c||ne.create(r,o,d)).months(t,!0)}static weekdays(t="long",{locale:r=null,numberingSystem:o=null,locObj:c=null}={}){return(c||ne.create(r,o,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:r=null,numberingSystem:o=null,locObj:c=null}={}){return(c||ne.create(r,o,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ne.create(t).meridiems()}static eras(t="short",{locale:r=null}={}){return ne.create(r,null,"gregory").eras(t)}static features(){return{relative:pa(),localeWeek:ga()}}}function Ms(s,t){const r=c=>c.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),o=r(t)-r(s);return Math.floor(Q.fromMillis(o).as("days"))}function il(s,t,r){const o=[["years",(S,I)=>I.year-S.year],["quarters",(S,I)=>I.quarter-S.quarter+(I.year-S.year)*4],["months",(S,I)=>I.month-S.month+(I.year-S.year)*12],["weeks",(S,I)=>{const L=Ms(S,I);return(L-L%7)/7}],["days",Ms]],c={},d=s;let m,y;for(const[S,I]of o)r.indexOf(S)>=0&&(m=S,c[S]=I(s,t),y=d.plus(c),y>t?(c[S]--,s=d.plus(c),s>t&&(y=s,c[S]--,s=d.plus(c))):s=y);return[s,c,y,m]}function sl(s,t,r,o){let[c,d,m,y]=il(s,t,r);const S=t-c,I=r.filter(K=>["hours","minutes","seconds","milliseconds"].indexOf(K)>=0);I.length===0&&(m<t&&(m=c.plus({[y]:1})),m!==c&&(d[y]=(d[y]||0)+S/(m-c)));const L=Q.fromObject(d,o);return I.length>0?Q.fromMillis(S,o).shiftTo(...I).plus(L):L}const al="missing Intl.DateTimeFormat.formatToParts support";function te(s,t=r=>r){return{regex:s,deser:([r])=>t(Go(r))}}const ol="Â ",Pa=`[ ${ol}]`,Ra=new RegExp(Pa,"g");function ul(s){return s.replace(/\./g,"\\.?").replace(Ra,Pa)}function Ns(s){return s.replace(/\./g,"").replace(Ra," ").toLowerCase()}function Ce(s,t){return s===null?null:{regex:RegExp(s.map(ul).join("|")),deser:([r])=>s.findIndex(o=>Ns(r)===Ns(o))+t}}function Cs(s,t){return{regex:s,deser:([,r,o])=>cr(r,o),groups:t}}function Gn(s){return{regex:s,deser:([t])=>t}}function ll(s){return s.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function cl(s,t){const r=Ne(t),o=Ne(t,"{2}"),c=Ne(t,"{3}"),d=Ne(t,"{4}"),m=Ne(t,"{6}"),y=Ne(t,"{1,2}"),S=Ne(t,"{1,3}"),I=Ne(t,"{1,6}"),L=Ne(t,"{1,9}"),K=Ne(t,"{2,4}"),G=Ne(t,"{4,6}"),B=xe=>({regex:RegExp(ll(xe.val)),deser:([Ue])=>Ue,literal:!0}),me=(xe=>{if(s.literal)return B(xe);switch(xe.val){case"G":return Ce(t.eras("short"),0);case"GG":return Ce(t.eras("long"),0);case"y":return te(I);case"yy":return te(K,yi);case"yyyy":return te(d);case"yyyyy":return te(G);case"yyyyyy":return te(m);case"M":return te(y);case"MM":return te(o);case"MMM":return Ce(t.months("short",!0),1);case"MMMM":return Ce(t.months("long",!0),1);case"L":return te(y);case"LL":return te(o);case"LLL":return Ce(t.months("short",!1),1);case"LLLL":return Ce(t.months("long",!1),1);case"d":return te(y);case"dd":return te(o);case"o":return te(S);case"ooo":return te(c);case"HH":return te(o);case"H":return te(y);case"hh":return te(o);case"h":return te(y);case"mm":return te(o);case"m":return te(y);case"q":return te(y);case"qq":return te(o);case"s":return te(y);case"ss":return te(o);case"S":return te(S);case"SSS":return te(c);case"u":return Gn(L);case"uu":return Gn(y);case"uuu":return te(r);case"a":return Ce(t.meridiems(),0);case"kkkk":return te(d);case"kk":return te(K,yi);case"W":return te(y);case"WW":return te(o);case"E":case"c":return te(r);case"EEE":return Ce(t.weekdays("short",!1),1);case"EEEE":return Ce(t.weekdays("long",!1),1);case"ccc":return Ce(t.weekdays("short",!0),1);case"cccc":return Ce(t.weekdays("long",!0),1);case"Z":case"ZZ":return Cs(new RegExp(`([+-]${y.source})(?::(${o.source}))?`),2);case"ZZZ":return Cs(new RegExp(`([+-]${y.source})(${o.source})?`),2);case"z":return Gn(/[a-z_+-/]{1,256}?/i);case" ":return Gn(/[^\S\n\r]/);default:return B(xe)}})(s)||{invalidReason:al};return me.token=s,me}const fl={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 hl(s,t,r){const{type:o,value:c}=s;if(o==="literal"){const S=/^\s+$/.test(c);return{literal:!S,val:S?" ":c}}const d=t[o];let m=o;o==="hour"&&(t.hour12!=null?m=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?m="hour12":m="hour24":m=r.hour12?"hour12":"hour24");let y=fl[m];if(typeof y=="object"&&(y=y[d]),y)return{literal:!1,val:y}}function dl(s){return[`^${s.map(r=>r.regex).reduce((r,o)=>`${r}(${o.source})`,"")}$`,s]}function ml(s,t,r){const o=s.match(t);if(o){const c={};let d=1;for(const m in r)if(Wt(r,m)){const y=r[m],S=y.groups?y.groups+1:1;!y.literal&&y.token&&(c[y.token.val[0]]=y.deser(o.slice(d,d+S))),d+=S}return[o,c]}else return[o,{}]}function yl(s){const t=d=>{switch(d){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 r=null,o;return Z(s.z)||(r=Be.create(s.z)),Z(s.Z)||(r||(r=new ke(s.Z)),o=s.Z),Z(s.q)||(s.M=(s.q-1)*3+1),Z(s.h)||(s.h<12&&s.a===1?s.h+=12:s.h===12&&s.a===0&&(s.h=0)),s.G===0&&s.y&&(s.y=-s.y),Z(s.u)||(s.S=Oi(s.u)),[Object.keys(s).reduce((d,m)=>{const y=t(m);return y&&(d[y]=s[m]),d},{}),r,o]}let ti=null;function pl(){return ti||(ti=z.fromMillis(1555555555555)),ti}function gl(s,t){if(s.literal)return s;const r=be.macroTokenToFormatOpts(s.val),o=Wa(r,t);return o==null||o.includes(void 0)?s:o}function Va(s,t){return Array.prototype.concat(...s.map(r=>gl(r,t)))}class qa{constructor(t,r){if(this.locale=t,this.format=r,this.tokens=Va(be.parseFormat(r),t),this.units=this.tokens.map(o=>cl(o,t)),this.disqualifyingUnit=this.units.find(o=>o.invalidReason),!this.disqualifyingUnit){const[o,c]=dl(this.units);this.regex=RegExp(o,"i"),this.handlers=c}}explainFromTokens(t){if(this.isValid){const[r,o]=ml(t,this.regex,this.handlers),[c,d,m]=o?yl(o):[null,null,void 0];if(Wt(o,"a")&&Wt(o,"H"))throw new Vt("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:o,result:c,zone:d,specificOffset:m}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ka(s,t,r){return new qa(s,r).explainFromTokens(t)}function vl(s,t,r){const{result:o,zone:c,specificOffset:d,invalidReason:m}=Ka(s,t,r);return[o,c,d,m]}function Wa(s,t){if(!s)return null;const o=be.create(t,s).dtFormatter(pl()),c=o.formatToParts(),d=o.resolvedOptions();return c.map(m=>hl(m,s,d))}const ni="Invalid DateTime",Fs=864e13;function hn(s){return new Fe("unsupported zone",`the zone "${s.name}" is not supported`)}function ri(s){return s.weekData===null&&(s.weekData=ir(s.c)),s.weekData}function ii(s){return s.localWeekData===null&&(s.localWeekData=ir(s.c,s.loc.getMinDaysInFirstWeek(),s.loc.getStartOfWeek())),s.localWeekData}function wt(s,t){const r={ts:s.ts,zone:s.zone,c:s.c,o:s.o,loc:s.loc,invalid:s.invalid};return new z({...r,...t,old:r})}function La(s,t,r){let o=s-t*60*1e3;const c=r.offset(o);if(t===c)return[o,t];o-=(c-t)*60*1e3;const d=r.offset(o);return c===d?[o,c]:[s-Math.min(c,d)*60*1e3,Math.max(c,d)]}function Jn(s,t){s+=t*60*1e3;const r=new Date(s);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Xn(s,t,r){return La(lr(s),t,r)}function As(s,t){const r=s.o,o=s.c.year+Math.trunc(t.years),c=s.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,d={...s.c,year:o,month:c,day:Math.min(s.c.day,sr(o,c))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},m=Q.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),y=lr(d);let[S,I]=La(y,r,s.zone);return m!==0&&(S+=m,I=s.zone.offset(S)),{ts:S,o:I}}function Rt(s,t,r,o,c,d){const{setZone:m,zone:y}=r;if(s&&Object.keys(s).length!==0||t){const S=t||y,I=z.fromObject(s,{...r,zone:S,specificOffset:d});return m?I:I.setZone(y)}else return z.invalid(new Fe("unparsable",`the input "${c}" can't be parsed as ${o}`))}function Qn(s,t,r=!0){return s.isValid?be.create(ne.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(s,t):null}function si(s,t,r){const o=s.c.year>9999||s.c.year<0;let c="";if(o&&s.c.year>=0&&(c+="+"),c+=de(s.c.year,o?6:4),r==="year")return c;if(t){if(c+="-",c+=de(s.c.month),r==="month")return c;c+="-"}else if(c+=de(s.c.month),r==="month")return c;return c+=de(s.c.day),c}function Ps(s,t,r,o,c,d,m){let y=!r||s.c.millisecond!==0||s.c.second!==0,S="";switch(m){case"day":case"month":case"year":break;default:if(S+=de(s.c.hour),m==="hour")break;if(t){if(S+=":",S+=de(s.c.minute),m==="minute")break;y&&(S+=":",S+=de(s.c.second))}else{if(S+=de(s.c.minute),m==="minute")break;y&&(S+=de(s.c.second))}if(m==="second")break;y&&(!o||s.c.millisecond!==0)&&(S+=".",S+=de(s.c.millisecond,3))}return c&&(s.isOffsetFixed&&s.offset===0&&!d?S+="Z":s.o<0?(S+="-",S+=de(Math.trunc(-s.o/60)),S+=":",S+=de(Math.trunc(-s.o%60))):(S+="+",S+=de(Math.trunc(s.o/60)),S+=":",S+=de(Math.trunc(s.o%60)))),d&&(S+="["+s.zone.ianaName+"]"),S}const ja={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wl={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},bl={ordinal:1,hour:0,minute:0,second:0,millisecond:0},er=["year","month","day","hour","minute","second","millisecond"],kl=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ol=["year","ordinal","hour","minute","second","millisecond"];function tr(s){const t={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"}[s.toLowerCase()];if(!t)throw new js(s);return t}function Rs(s){switch(s.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return tr(s)}}function Sl(s){if(dn===void 0&&(dn=ce.now()),s.type!=="iana")return s.offset(dn);const t=s.name;let r=pi.get(t);return r===void 0&&(r=s.offset(dn),pi.set(t,r)),r}function Vs(s,t){const r=nt(t.zone,ce.defaultZone);if(!r.isValid)return z.invalid(hn(r));const o=ne.fromObject(t);let c,d;if(Z(s.year))c=ce.now();else{for(const S of er)Z(s[S])&&(s[S]=ja[S]);const m=ma(s)||ya(s);if(m)return z.invalid(m);const y=Sl(r);[c,d]=Xn(s,y,r)}return new z({ts:c,zone:r,loc:o,o:d})}function qs(s,t,r){const o=Z(r.round)?!0:r.round,c=Z(r.rounding)?"trunc":r.rounding,d=(y,S)=>(y=Si(y,o||r.calendary?0:2,r.calendary?"round":c),t.loc.clone(r).relFormatter(r).format(y,S)),m=y=>r.calendary?t.hasSame(s,y)?0:t.startOf(y).diff(s.startOf(y),y).get(y):t.diff(s,y).get(y);if(r.unit)return d(m(r.unit),r.unit);for(const y of r.units){const S=m(y);if(Math.abs(S)>=1)return d(S,y)}return d(s>t?-0:0,r.units[r.units.length-1])}function Ks(s){let t={},r;return s.length>0&&typeof s[s.length-1]=="object"?(t=s[s.length-1],r=Array.from(s).slice(0,s.length-1)):r=Array.from(s),[t,r]}let dn;const pi=new Map;class z{constructor(t){const r=t.zone||ce.defaultZone;let o=t.invalid||(Number.isNaN(t.ts)?new Fe("invalid input"):null)||(r.isValid?null:hn(r));this.ts=Z(t.ts)?ce.now():t.ts;let c=null,d=null;if(!o)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r))[c,d]=[t.old.c,t.old.o];else{const y=rt(t.o)&&!t.old?t.o:r.offset(this.ts);c=Jn(this.ts,y),o=Number.isNaN(c.year)?new Fe("invalid input"):null,c=o?null:c,d=o?null:y}this._zone=r,this.loc=t.loc||ne.create(),this.invalid=o,this.weekData=null,this.localWeekData=null,this.c=c,this.o=d,this.isLuxonDateTime=!0}static now(){return new z({})}static local(){const[t,r]=Ks(arguments),[o,c,d,m,y,S,I]=r;return Vs({year:o,month:c,day:d,hour:m,minute:y,second:S,millisecond:I},t)}static utc(){const[t,r]=Ks(arguments),[o,c,d,m,y,S,I]=r;return t.zone=ke.utcInstance,Vs({year:o,month:c,day:d,hour:m,minute:y,second:S,millisecond:I},t)}static fromJSDate(t,r={}){const o=tu(t)?t.valueOf():NaN;if(Number.isNaN(o))return z.invalid("invalid input");const c=nt(r.zone,ce.defaultZone);return c.isValid?new z({ts:o,zone:c,loc:ne.fromObject(r)}):z.invalid(hn(c))}static fromMillis(t,r={}){if(rt(t))return t<-Fs||t>Fs?z.invalid("Timestamp out of range"):new z({ts:t,zone:nt(r.zone,ce.defaultZone),loc:ne.fromObject(r)});throw new we(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,r={}){if(rt(t))return new z({ts:t*1e3,zone:nt(r.zone,ce.defaultZone),loc:ne.fromObject(r)});throw new we("fromSeconds requires a numerical input")}static fromObject(t,r={}){t=t||{};const o=nt(r.zone,ce.defaultZone);if(!o.isValid)return z.invalid(hn(o));const c=ne.fromObject(r),d=ar(t,Rs),{minDaysInFirstWeek:m,startOfWeek:y}=Os(d,c),S=ce.now(),I=Z(r.specificOffset)?o.offset(S):r.specificOffset,L=!Z(d.ordinal),K=!Z(d.year),G=!Z(d.month)||!Z(d.day),B=K||G,re=d.weekYear||d.weekNumber;if((B||L)&&re)throw new Vt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(G&&L)throw new Vt("Can't mix ordinal dates with month/day");const me=re||d.weekday&&!B;let xe,Ue,Pe=Jn(S,I);me?(xe=kl,Ue=wl,Pe=ir(Pe,m,y)):L?(xe=Ol,Ue=bl,Pe=ei(Pe)):(xe=er,Ue=ja);let Ut=!1;for(const Ze of xe){const kn=d[Ze];Z(kn)?Ut?d[Ze]=Ue[Ze]:d[Ze]=Pe[Ze]:Ut=!0}const it=me?Qo(d,m,y):L?Xo(d):ma(d),Zt=it||ya(d);if(Zt)return z.invalid(Zt);const Me=me?bs(d,m,y):L?ks(d):d,[ge,bn]=Xn(Me,I,o),st=new z({ts:ge,zone:o,o:bn,loc:c});return d.weekday&&B&&t.weekday!==st.weekday?z.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${st.toISO()}`):st.isValid?st:z.invalid(st.invalid)}static fromISO(t,r={}){const[o,c]=Bu(t);return Rt(o,c,r,"ISO 8601",t)}static fromRFC2822(t,r={}){const[o,c]=Uu(t);return Rt(o,c,r,"RFC 2822",t)}static fromHTTP(t,r={}){const[o,c]=Zu(t);return Rt(o,c,r,"HTTP",r)}static fromFormat(t,r,o={}){if(Z(t)||Z(r))throw new we("fromFormat requires an input string and a format");const{locale:c=null,numberingSystem:d=null}=o,m=ne.fromOpts({locale:c,numberingSystem:d,defaultToEN:!0}),[y,S,I,L]=vl(m,t,r);return L?z.invalid(L):Rt(y,S,o,`format ${r}`,t,I)}static fromString(t,r,o={}){return z.fromFormat(t,r,o)}static fromSQL(t,r={}){const[o,c]=Xu(t);return Rt(o,c,r,"SQL",t)}static invalid(t,r=null){if(!t)throw new we("need to specify a reason the DateTime is invalid");const o=t instanceof Fe?t:new Fe(t,r);if(ce.throwOnInvalid)throw new _o(o);return new z({invalid:o})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,r={}){const o=Wa(t,ne.fromObject(r));return o?o.map(c=>c?c.val:null).join(""):null}static expandFormat(t,r={}){return Va(be.parseFormat(t),ne.fromObject(r)).map(c=>c.val).join("")}static resetCache(){dn=void 0,pi.clear()}get(t){return this[t]}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?ri(this).weekYear:NaN}get weekNumber(){return this.isValid?ri(this).weekNumber:NaN}get weekday(){return this.isValid?ri(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ii(this).weekday:NaN}get localWeekNumber(){return this.isValid?ii(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ii(this).weekYear:NaN}get ordinal(){return this.isValid?ei(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hn.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 t=864e5,r=6e4,o=lr(this.c),c=this.zone.offset(o-t),d=this.zone.offset(o+t),m=this.zone.offset(o-c*r),y=this.zone.offset(o-d*r);if(m===y)return[this];const S=o-m*r,I=o-y*r,L=Jn(S,m),K=Jn(I,y);return L.hour===K.hour&&L.minute===K.minute&&L.second===K.second&&L.millisecond===K.millisecond?[wt(this,{ts:S}),wt(this,{ts:I})]:[this]}get isInLeapYear(){return gn(this.year)}get daysInMonth(){return sr(this.year,this.month)}get daysInYear(){return this.isValid?qt(this.year):NaN}get weeksInWeekYear(){return this.isValid?yn(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?yn(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:r,numberingSystem:o,calendar:c}=be.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r,numberingSystem:o,outputCalendar:c}}toUTC(t=0,r={}){return this.setZone(ke.instance(t),r)}toLocal(){return this.setZone(ce.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:o=!1}={}){if(t=nt(t,ce.defaultZone),t.equals(this.zone))return this;if(t.isValid){let c=this.ts;if(r||o){const d=t.offset(this.ts),m=this.toObject();[c]=Xn(m,d,t)}return wt(this,{ts:c,zone:t})}else return z.invalid(hn(t))}reconfigure({locale:t,numberingSystem:r,outputCalendar:o}={}){const c=this.loc.clone({locale:t,numberingSystem:r,outputCalendar:o});return wt(this,{loc:c})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const r=ar(t,Rs),{minDaysInFirstWeek:o,startOfWeek:c}=Os(r,this.loc),d=!Z(r.weekYear)||!Z(r.weekNumber)||!Z(r.weekday),m=!Z(r.ordinal),y=!Z(r.year),S=!Z(r.month)||!Z(r.day),I=y||S,L=r.weekYear||r.weekNumber;if((I||m)&&L)throw new Vt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(S&&m)throw new Vt("Can't mix ordinal dates with month/day");let K;d?K=bs({...ir(this.c,o,c),...r},o,c):Z(r.ordinal)?(K={...this.toObject(),...r},Z(r.day)&&(K.day=Math.min(sr(K.year,K.month),K.day))):K=ks({...ei(this.c),...r});const[G,B]=Xn(K,this.o,this.zone);return wt(this,{ts:G,o:B})}plus(t){if(!this.isValid)return this;const r=Q.fromDurationLike(t);return wt(this,As(this,r))}minus(t){if(!this.isValid)return this;const r=Q.fromDurationLike(t).negate();return wt(this,As(this,r))}startOf(t,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;const o={},c=Q.normalizeUnit(t);switch(c){case"years":o.month=1;case"quarters":case"months":o.day=1;case"weeks":case"days":o.hour=0;case"hours":o.minute=0;case"minutes":o.second=0;case"seconds":o.millisecond=0;break}if(c==="weeks")if(r){const d=this.loc.getStartOfWeek(),{weekday:m}=this;m<d&&(o.weekNumber=this.weekNumber-1),o.weekday=d}else o.weekday=1;if(c==="quarters"){const d=Math.ceil(this.month/3);o.month=(d-1)*3+1}return this.set(o)}endOf(t,r){return this.isValid?this.plus({[t]:1}).startOf(t,r).minus(1):this}toFormat(t,r={}){return this.isValid?be.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):ni}toLocaleString(t=rr,r={}){return this.isValid?be.create(this.loc.clone(r),t).formatDateTime(this):ni}toLocaleParts(t={}){return this.isValid?be.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:r=!1,suppressMilliseconds:o=!1,includeOffset:c=!0,extendedZone:d=!1,precision:m="milliseconds"}={}){if(!this.isValid)return null;m=tr(m);const y=t==="extended";let S=si(this,y,m);return er.indexOf(m)>=3&&(S+="T"),S+=Ps(this,y,r,o,c,d,m),S}toISODate({format:t="extended",precision:r="day"}={}){return this.isValid?si(this,t==="extended",tr(r)):null}toISOWeekDate(){return Qn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:r=!1,includeOffset:o=!0,includePrefix:c=!1,extendedZone:d=!1,format:m="extended",precision:y="milliseconds"}={}){return this.isValid?(y=tr(y),(c&&er.indexOf(y)>=3?"T":"")+Ps(this,m==="extended",r,t,o,d,y)):null}toRFC2822(){return Qn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Qn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?si(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:r=!1,includeOffsetSpace:o=!0}={}){let c="HH:mm:ss.SSS";return(r||t)&&(o&&(c+=" "),r?c+="z":t&&(c+="ZZ")),Qn(this,c,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():ni}[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(t={}){if(!this.isValid)return{};const r={...this.c};return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,r="milliseconds",o={}){if(!this.isValid||!t.isValid)return Q.invalid("created by diffing an invalid DateTime");const c={locale:this.locale,numberingSystem:this.numberingSystem,...o},d=nu(r).map(Q.normalizeUnit),m=t.valueOf()>this.valueOf(),y=m?this:t,S=m?t:this,I=sl(y,S,d,c);return m?I.negate():I}diffNow(t="milliseconds",r={}){return this.diff(z.now(),t,r)}until(t){return this.isValid?le.fromDateTimes(this,t):this}hasSame(t,r,o){if(!this.isValid)return!1;const c=t.valueOf(),d=this.setZone(t.zone,{keepLocalTime:!0});return d.startOf(r,o)<=c&&c<=d.endOf(r,o)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const r=t.base||z.fromObject({},{zone:this.zone}),o=t.padding?this<r?-t.padding:t.padding:0;let c=["years","months","days","hours","minutes","seconds"],d=t.unit;return Array.isArray(t.unit)&&(c=t.unit,d=void 0),qs(r,this.plus(o),{...t,numeric:"always",units:c,unit:d})}toRelativeCalendar(t={}){return this.isValid?qs(t.base||z.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(z.isDateTime))throw new we("min requires all arguments be DateTimes");return Ss(t,r=>r.valueOf(),Math.min)}static max(...t){if(!t.every(z.isDateTime))throw new we("max requires all arguments be DateTimes");return Ss(t,r=>r.valueOf(),Math.max)}static fromFormatExplain(t,r,o={}){const{locale:c=null,numberingSystem:d=null}=o,m=ne.fromOpts({locale:c,numberingSystem:d,defaultToEN:!0});return Ka(m,t,r)}static fromStringExplain(t,r,o={}){return z.fromFormatExplain(t,r,o)}static buildFormatParser(t,r={}){const{locale:o=null,numberingSystem:c=null}=r,d=ne.fromOpts({locale:o,numberingSystem:c,defaultToEN:!0});return new qa(d,t)}static fromFormatParser(t,r,o={}){if(Z(t)||Z(r))throw new we("fromFormatParser requires an input string and a format parser");const{locale:c=null,numberingSystem:d=null}=o,m=ne.fromOpts({locale:c,numberingSystem:d,defaultToEN:!0});if(!m.equals(r.locale))throw new we(`fromFormatParser called with a locale of ${m}, but the format parser was created for ${r.locale}`);const{result:y,zone:S,specificOffset:I,invalidReason:L}=r.explainFromTokens(t);return L?z.invalid(L):Rt(y,S,o,`format ${r.format}`,t,I)}static get DATE_SHORT(){return rr}static get DATE_MED(){return $s}static get DATE_MED_WITH_WEEKDAY(){return Io}static get DATE_FULL(){return Bs}static get DATE_HUGE(){return Us}static get TIME_SIMPLE(){return Zs}static get TIME_WITH_SECONDS(){return zs}static get TIME_WITH_SHORT_OFFSET(){return Ys}static get TIME_WITH_LONG_OFFSET(){return Hs}static get TIME_24_SIMPLE(){return Gs}static get TIME_24_WITH_SECONDS(){return Js}static get TIME_24_WITH_SHORT_OFFSET(){return Qs}static get TIME_24_WITH_LONG_OFFSET(){return Xs}static get DATETIME_SHORT(){return ea}static get DATETIME_SHORT_WITH_SECONDS(){return ta}static get DATETIME_MED(){return na}static get DATETIME_MED_WITH_SECONDS(){return ra}static get DATETIME_MED_WITH_WEEKDAY(){return Mo}static get DATETIME_FULL(){return ia}static get DATETIME_FULL_WITH_SECONDS(){return sa}static get DATETIME_HUGE(){return aa}static get DATETIME_HUGE_WITH_SECONDS(){return oa}}function cn(s){if(z.isDateTime(s))return s;if(s&&s.valueOf&&rt(s.valueOf()))return z.fromJSDate(s);if(s&&typeof s=="object")return z.fromObject(s);throw new we(`Unknown datetime argument: ${s}, of type ${typeof s}`)}var nr={exports:{}},Tl=nr.exports,Ws;function xl(){return Ws||(Ws=1,(function(s,t){((r,o)=>{s.exports=o()})(Tl,function(){var r=function(e,n){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(i,a){i.__proto__=a}:function(i,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}))(e,n)},o=function(){return(o=Object.assign||function(e){for(var n,i=1,a=arguments.length;i<a;i++)for(var u in n=arguments[i])Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u]);return e}).apply(this,arguments)};function c(e,n,i){for(var a,u=0,l=n.length;u<l;u++)!a&&u in n||((a=a||Array.prototype.slice.call(n,0,u))[u]=n[u]);return e.concat(a||Array.prototype.slice.call(n))}var d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:To,m=Object.keys,y=Array.isArray;
vendor: 15,079 bytes, lines 1-3
1function S(e,n){return typeof n=="object"&&m(n).forEach(function(i){e[i]=n[i]}),e}typeof Promise>"u"||d.Promise||(d.Promise=Promise);var I=Object.getPrototypeOf,L={}.hasOwnProperty;function K(e,n){return L.call(e,n)}function G(e,n){typeof n=="function"&&(n=n(I(e))),(typeof Reflect>"u"?m:Reflect.ownKeys)(n).forEach(function(i){re(e,i,n[i])})}var B=Object.defineProperty;function re(e,n,i,a){B(e,n,S(i&&K(i,"get")&&typeof i.get=="function"?{get:i.get,set:i.set,configurable:!0}:{value:i,configurable:!0,writable:!0},a))}function me(e){return{from:function(n){return e.prototype=Object.create(n.prototype),re(e.prototype,"constructor",e),{extend:G.bind(null,e.prototype)}}}}var xe=Object.getOwnPropertyDescriptor,Ue=[].slice;function Pe(e,n,i){return Ue.call(e,n,i)}function Ut(e,n){return n(e)}function it(e){if(!e)throw new Error("Assertion Failed")}function Zt(e){d.setImmediate?setImmediate(e):setTimeout(e,0)}function Me(e,n){if(typeof n=="string"&&K(e,n))return e[n];if(!n)return e;if(typeof n!="string"){for(var i=[],a=0,u=n.length;a<u;++a){var l=Me(e,n[a]);i.push(l)}return i}var f,h=n.indexOf(".");return h===-1||(f=e[n.substr(0,h)])==null?void 0:Me(f,n.substr(h+1))}function ge(e,n,i){if(e&&n!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof n!="string"&&"length"in n){it(typeof i!="string"&&"length"in i);for(var a=0,u=n.length;a<u;++a)ge(e,n[a],i[a])}else{var l,f,h=n.indexOf(".");h!==-1?(l=n.substr(0,h),(h=n.substr(h+1))===""?i===void 0?y(e)&&!isNaN(parseInt(l))?e.splice(l,1):delete e[l]:e[l]=i:ge(f=(f=e[l])&&K(e,l)?f:e[l]={},h,i)):i===void 0?y(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=i}}function bn(e){var n,i={};for(n in e)K(e,n)&&(i[n]=e[n]);return i}var st=[].concat;function Ze(e){return st.apply([],e)}var We="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ze([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(n){return n+e+"Array"})}))).filter(function(e){return d[e]}),kn=new Set(We.map(function(e){return d[e]})),zt=null;function at(e){return zt=new WeakMap,e=(function n(i){if(!i||typeof i!="object")return i;var a=zt.get(i);if(a)return a;if(y(i)){a=[],zt.set(i,a);for(var u=0,l=i.length;u<l;++u)a.push(n(i[u]))}else if(kn.has(i.constructor))a=i;else{var f,h=I(i);for(f in a=h===Object.prototype?{}:Object.create(h),zt.set(i,a),i)K(i,f)&&(a[f]=n(i[f]))}return a})(e),zt=null,e}var $a={}.toString;function hr(e){return $a.call(e).slice(8,-1)}var dr=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Ba=typeof dr=="symbol"?function(e){var n;return e!=null&&(n=e[dr])&&n.apply(e)}:function(){return null};function ot(e,n){n=e.indexOf(n),0<=n&&e.splice(n,1)}var Ot={};function Ke(e){var n,i,a,u;if(arguments.length===1){if(y(e))return e.slice();if(this===Ot&&typeof e=="string")return[e];if(u=Ba(e))for(i=[];!(a=u.next()).done;)i.push(a.value);else{if(e==null)return[e];if(typeof(n=e.length)!="number")return[e];for(i=new Array(n);n--;)i[n]=e[n]}}else for(n=arguments.length,i=new Array(n);n--;)i[n]=arguments[n];return i}var mr=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},We=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Oe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(We),Ua={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function St(e,n){this.name=e,this.message=n}function Ei(e,n){return e+". Errors: "+Object.keys(n).map(function(i){return n[i].toString()}).filter(function(i,a,u){return u.indexOf(i)===a}).join(` 2`)}function On(e,n,i,a){this.failures=n,this.failedKeys=a,this.successCount=i,this.message=Ei(e,n)}function Tt(e,n){this.name="BulkError",this.failures=Object.keys(n).map(function(i){return n[i]}),this.failuresByPos=n,this.message=Ei(e,this.failures)}me(St).from(Error).extend({toString:function(){return this.name+": "+this.message}}),me(On).from(St),me(Tt).from(St);var yr=Oe.reduce(function(e,n){return e[n]=n+"Error",e},{}),Za=St,$=Oe.reduce(function(e,n){var i=n+"Error";function a(u,l){this.name=i,u?typeof u=="string"?(this.message="".concat(u).concat(l?` 3 `+l:""),this.inner=l||null):typeof u=="object"&&(this.message="".concat(u.name," ").concat(u.message),this.inner=u):(this.message=Ua[n]||i,this.inner=null)}return me(a).from(Za),e[n]=a,e},{}),Di=($.Syntax=SyntaxError,$.Type=TypeError,$.Range=RangeError,We.reduce(function(e,n){return e[n+"Error"]=$[n],e},{}));We=Oe.reduce(function(e,n){return["Syntax","Type","Range"].indexOf(n)===-1&&(e[n+"Error"]=$[n]),e},{});function ie(){}function Yt(e){return e}function za(e,n){return e==null||e===Yt?n:function(i){return n(e(i))}}function ut(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function Ya(e,n){return e===ie?n:function(){var i=e.apply(this,arguments),a=(i!==void 0&&(arguments[0]=i),this.onsuccess),u=this.onerror,l=(this.onsuccess=null,this.onerror=null,n.apply(this,arguments));return a&&(this.onsuccess=this.onsuccess?ut(a,this.onsuccess):a),u&&(this.onerror=this.onerror?ut(u,this.onerror):u),l!==void 0?l:i}}function Ha(e,n){return e===ie?n:function(){e.apply(this,arguments);var i=this.onsuccess,a=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?ut(i,this.onsuccess):i),a&&(this.onerror=this.onerror?ut(a,this.onerror):a)}}function Ga(e,n){return e===ie?n:function(u){var a=e.apply(this,arguments),u=(S(u,a),this.onsuccess),l=this.onerror,f=(this.onsuccess=null,this.onerror=null,n.apply(this,arguments));return u&&(this.onsuccess=this.onsuccess?ut(u,this.onsuccess):u),l&&(this.onerror=this.onerror?ut(l,this.onerror):l),a===void 0?f===void 0?void 0:f:S(a,f)}}function Ja(e,n){return e===ie?n:function(){return n.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function pr(e,n){return e===ie?n:function(){var i=e.apply(this,arguments);if(i&&typeof i.then=="function"){for(var a=this,u=arguments.length,l=new Array(u);u--;)l[u]=arguments[u];return i.then(function(){return n.apply(a,l)})}return n.apply(this,arguments)}}We.ModifyError=On,We.DexieError=St,We.BulkError=Tt;var Re=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Ii(e){Re=e}var Ht={},Mi=100,Gt=typeof Promise>"u"?[]:(Oe=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Gt=crypto.subtle.digest("SHA-512",new Uint8Array([0])),I(Gt),Oe]:[Oe,I(Oe),Oe]),Oe=Gt[0],Ct=Gt[1],Ct=Ct&&Ct.then,lt=Oe&&Oe.constructor,gr=!!Gt[2],Jt=function(e,n){Qt.push([e,n]),Sn&&(queueMicrotask(Xa),Sn=!1)},vr=!0,Sn=!0,ct=[],Tn=[],wr=Yt,ze={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ie,pgp:!1,env:{},finalize:ie},j=ze,Qt=[],ft=0,xn=[];function R(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var n=this._PSD=j;if(typeof e!="function"){if(e!==Ht)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&kr(this,this._value)}else this._state=null,this._value=null,++n.ref,(function i(a,u){try{u(function(l){if(a._state===null){if(l===a)throw new TypeError("A promise cannot be resolved with itself.");var f=a._lib&&xt();l&&typeof l.then=="function"?i(a,function(h,b){l instanceof R?l._then(h,b):l.then(h,b)}):(a._state=!0,a._value=l,Ci(a)),f&&_t()}},kr.bind(null,a))}catch(l){kr(a,l)}})(this,e)}var br={get:function(){var e=j,n=In;function i(a,u){var l=this,f=!e.global&&(e!==j||n!==In),h=f&&!He(),b=new R(function(x,v){Or(l,new Ni(Ai(a,e,f,h),Ai(u,e,f,h),x,v,e))});return this._consoleTask&&(b._consoleTask=this._consoleTask),b}return i.prototype=Ht,i},set:function(e){re(this,"then",e&&e.prototype===Ht?br:{get:function(){return e},set:br.set})}};function Ni(e,n,i,a,u){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof n=="function"?n:null,this.resolve=i,this.reject=a,this.psd=u}function kr(e,n){var i,a;Tn.push(n),e._state===null&&(i=e._lib&&xt(),n=wr(n),e._state=!1,e._value=n,a=e,ct.some(function(u){return u._value===a._value})||ct.push(a),Ci(e),i)&&_t()}function Ci(e){var n=e._listeners;e._listeners=[];for(var i=0,a=n.length;i<a;++i)Or(e,n[i]);var u=e._PSD;--u.ref||u.finalize(),ft===0&&(++ft,Jt(function(){--ft==0&&Sr()},[]))}function Or(e,n){if(e._state===null)e._listeners.push(n);else{var i=e._state?n.onFulfilled:n.onRejected;if(i===null)return(e._state?n.resolve:n.reject)(e._value);++n.psd.ref,++ft,Jt(Qa,[i,e,n])}}function Qa(e,n,i){try{var a,u=n._value;!n._state&&Tn.length&&(Tn=[]),a=Re&&n._consoleTask?n._consoleTask.run(function(){return e(u)}):e(u),n._state||Tn.indexOf(u)!==-1||(l=>{for(var f=ct.length;f;)if(ct[--f]._value===l._value)return ct.splice(f,1)})(n),i.resolve(a)}catch(l){i.reject(l)}finally{--ft==0&&Sr(),--i.psd.ref||i.psd.finalize()}}function Xa(){ht(ze,function(){xt()&&_t()})}function xt(){var e=vr;return Sn=vr=!1,e}function _t(){var e,n,i;do for(;0<Qt.length;)for(e=Qt,Qt=[],i=e.length,n=0;n<i;++n){var a=e[n];a[0].apply(null,a[1])}while(0<Qt.length);Sn=vr=!0}function Sr(){for(var e=ct,n=(ct=[],e.forEach(function(a){a._PSD.onunhandled.call(null,a._value,a)}),xn.slice(0)),i=n.length;i;)n[--i]()}function _n(e){return new R(Ht,!1,e)}function ae(e,n){var i=j;return function(){var a=xt(),u=j;try{return Ge(i,!0),e.apply(this,arguments)}catch(l){n&&n(l)}finally{Ge(u,!1),a&&_t()}}}G(R.prototype,{then:br,_then:function(e,n){Or(this,new Ni(null,null,e,n,j))},catch:function(e){var n,i;return arguments.length===1?this.then(null,e):(n=e,i=arguments[1],typeof n=="function"?this.then(null,function(a){return(a instanceof n?i:_n)(a)}):this.then(null,function(a){return(a&&a.name===n?i:_n)(a)}))},finally:function(e){return this.then(function(n){return R.resolve(e()).then(function(){return n})},function(n){return R.resolve(e()).then(function(){return _n(n)})})},timeout:function(e,n){var i=this;return e<1/0?new R(function(a,u){var l=setTimeout(function(){return u(new $.Timeout(n))},e);i.then(a,u).finally(clearTimeout.bind(null,l))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&re(R.prototype,Symbol.toStringTag,"Dexie.Promise"),ze.env=Fi(),G(R,{all:function(){var e=Ke.apply(null,arguments).map(Mn);return new R(function(n,i){e.length===0&&n([]);var a=e.length;e.forEach(function(u,l){return R.resolve(u).then(function(f){e[l]=f,--a||n(e)},i)})})},resolve:function(e){return e instanceof R?e:e&&typeof e.then=="function"?new R(function(n,i){e.then(n,i)}):new R(Ht,!0,e)},reject:_n,race:function(){var e=Ke.apply(null,arguments).map(Mn);return new R(function(n,i){e.map(function(a){return R.resolve(a).then(n,i)})})},PSD:{get:function(){return j},set:function(e){return j=e}},totalEchoes:{get:function(){return In}},newPSD:Ye,usePSD:ht,scheduler:{get:function(){return Jt},set:function(e){Jt=e}},rejectionMapper:{get:function(){return wr},set:function(e){wr=e}},follow:function(e,n){return new R(function(i,a){return Ye(function(u,l){var f=j;f.unhandleds=[],f.onunhandled=l,f.finalize=ut(function(){var h,b=this;h=function(){b.unhandleds.length===0?u():l(b.unhandleds[0])},xn.push(function x(){h(),xn.splice(xn.indexOf(x),1)}),++ft,Jt(function(){--ft==0&&Sr()},[])},f.finalize),e()},n,i,a)})}}),lt&&(lt.allSettled&&re(R,"allSettled",function(){var e=Ke.apply(null,arguments).map(Mn);return new R(function(n){e.length===0&&n([]);var i=e.length,a=new Array(i);e.forEach(function(u,l){return R.resolve(u).then(function(f){return a[l]={status:"fulfilled",value:f}},function(f){return a[l]={status:"rejected",reason:f}}).then(function(){return--i||n(a)})})})}),lt.any&&typeof AggregateError<"u"&&re(R,"any",function(){var e=Ke.apply(null,arguments).map(Mn);return new R(function(n,i){e.length===0&&i(new AggregateError([]));var a=e.length,u=new Array(a);e.forEach(function(l,f){return R.resolve(l).then(function(h){return n(h)},function(h){u[f]=h,--a||i(new AggregateError(u))})})})}),lt.withResolvers)&&(R.withResolvers=lt.withResolvers);var ye={awaits:0,echoes:0,id:0},eo=0,En=[],Dn=0,In=0,to=0;function Ye(e,f,i,a){var u=j,l=Object.create(u),f=(l.parent=u,l.ref=0,l.global=!1,l.id=++to,ze.env,l.env=gr?{Promise:R,PromiseProp:{value:R,configurable:!0,writable:!0},all:R.all,race:R.race,allSettled:R.allSettled,any:R.any,resolve:R.resolve,reject:R.reject}:{},f&&S(l,f),++u.ref,l.finalize=function(){--this.parent.ref||this.parent.finalize()},ht(l,e,i,a));return l.ref===0&&l.finalize(),f}function Et(){return ye.id||(ye.id=++eo),++ye.awaits,ye.echoes+=Mi,ye.id}function He(){return!!ye.awaits&&(--ye.awaits==0&&(ye.id=0),ye.echoes=ye.awaits*Mi,!0)}function Mn(e){return ye.echoes&&e&&e.constructor===lt?(Et(),e.then(function(n){return He(),n},function(n){return He(),fe(n)})):e}function no(){var e=En[En.length-1];En.pop(),Ge(e,!1)}function Ge(e,n){var i,a,u=j;(n?!ye.echoes||Dn++&&e===j:!Dn||--Dn&&e===j)||queueMicrotask(n?(function(l){++In,ye.echoes&&--ye.echoes!=0||(ye.echoes=ye.awaits=ye.id=0),En.push(j),Ge(l,!0)}).bind(null,e):no),e!==j&&(j=e,u===ze&&(ze.env=Fi()),gr)&&(i=ze.env.Promise,a=e.env,u.global||e.global)&&(Object.defineProperty(d,"Promise",a.PromiseProp),i.all=a.all,i.race=a.race,i.resolve=a.resolve,i.reject=a.reject,a.allSettled&&(i.allSettled=a.allSettled),a.any)&&(i.any=a.any)}function Fi(){var e=d.Promise;return gr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function ht(e,n,i,a,u){var l=j;try{return Ge(e,!0),n(i,a,u)}finally{Ge(l,!1)}}function Ai(e,n,i,a){return typeof e!="function"?e:function(){var u=j;i&&Et(),Ge(n,!0);try{return e.apply(this,arguments)}finally{Ge(u,!1),a&&queueMicrotask(He)}}}function Tr(e){Promise===lt&&ye.echoes===0?Dn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Ct).indexOf("[native code]")===-1&&(Et=He=ie);var fe=R.reject,dt="ï¿¿",Le="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Pi="String expected.",Dt=[],Nn="__dbnames",xr="readonly",_r="readwrite";function mt(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}var Ri={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Cn(e){return typeof e!="string"||/\./.test(e)?function(n){return n}:function(n){return n[e]===void 0&&e in n&&delete(n=at(n))[e],n}}function Vi(){throw $.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function H(e,n){try{var i=qi(e),a=qi(n);if(i!==a)return i==="Array"?1:a==="Array"?-1:i==="binary"?1:a==="binary"?-1:i==="string"?1:a==="str
3ing"?-1:i==="Date"?1:a!=="Date"?NaN:-1;switch(i){case"number":case"Date":case"string":return n<e?1:e<n?-1:0;case"binary":for(var u=Ki(e),l=Ki(n),f=u.length,h=l.length,b=f<h?f:h,x=0;x<b;++x)if(u[x]!==l[x])return u[x]<l[x]?-1:1;return f===h?0:f<h?-1:1;case"Array":for(var v=e,p=n,k=v.length,O=p.length,w=k<O?k:O,g=0;g<w;++g){var _=H(v[g],p[g]);if(_!==0)return _}return k===O?0:k<O?-1:1}}catch{}return NaN}function qi(e){var n=typeof e;return n=="object"&&(ArrayBuffer.isView(e)||(n=hr(e))==="ArrayBuffer")?"binary":n}function Ki(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Fn(e,n,i){var a=e.schema.yProps;return a?(n&&0<i.numFailures&&(n=n.filter(function(u,l){return!i.failures[l]})),Promise.all(a.map(function(u){return u=u.updatesTable,n?e.db.table(u).where("k").anyOf(n).delete():e.db.table(u).clear()})).then(function(){return i})):i}Wi.prototype.execute=function(e){var n=this["@@propmod"];if(n.add!==void 0){var i=n.add;if(y(i))return c(c([],y(e)?e:[],!0),i).sort();if(typeof i=="number")return(Number(e)||0)+i;if(typeof i=="bigint")try{return BigInt(e)+i}catch{return BigInt(0)+i}throw new TypeError("Invalid term ".concat(i))}if(n.remove!==void 0){var a=n.remove;if(y(a))return y(e)?e.filter(function(u){return!a.includes(u)}).sort():[];if(typeof a=="number")return Number(e)-a;if(typeof a=="bigint")try{return BigInt(e)-a}catch{return BigInt(0)-a}throw new TypeError("Invalid subtrahend ".concat(a))}return i=(i=n.replacePrefix)==null?void 0:i[0],i&&typeof e=="string"&&e.startsWith(i)?n.replacePrefix[1]+e.substring(i.length):e};var Xt=Wi;function Wi(e){this["@@propmod"]=e}function Li(e,n){for(var i=m(n),a=i.length,u=!1,l=0;l<a;++l){var f=i[l],h=n[f],b=Me(e,f);h instanceof Xt?(ge(e,f,h.execute(b)),u=!0):b!==h&&(ge(e,f,h),u=!0)}return u}se.prototype._trans=function(e,n,i){var a=this._tx||j.trans,u=this.name,l=Re&&typeof console<"u"&&console.createTask&&void 0;function f(x,v,p){if(p.schema[u])return n(p.idbtrans,p);throw new $.NotFound("Table "+u+" not part of transaction")}var h=xt();try{var b=a&&a.db._novip===this.db._novip?a===j.trans?a._promise(e,f,i):Ye(function(){return a._promise(e,f,i)},{trans:a,transless:j.transless||j}):(function x(v,p,k,O){if(v.idbdb&&(v._state.openComplete||j.letThrough||v._vip)){var w=v._createTransaction(p,k,v._dbSchema);try{w.create(),v._state.PR1398_maxLoop=3}catch(g){return g.name===yr.InvalidState&&v.isOpen()&&0<--v._state.PR1398_maxLoop?(v.close({disableAutoOpen:!1}),v.open().then(function(){return x(v,p,k,O)})):fe(g)}return w._promise(p,function(g,_){return Ye(function(){return j.trans=w,O(g,_,w)})}).then(function(g){if(p==="readwrite")try{w.idbtrans.commit()}catch{}return p==="readonly"?g:w._completion.then(function(){return g})})}if(v._state.openComplete)return fe(new $.DatabaseClosed(v._state.dbOpenError));if(!v._state.isBeingOpened){if(!v._state.autoOpen)return fe(new $.DatabaseClosed);v.open().catch(ie)}return v._state.dbReadyPromise.then(function(){return x(v,p,k,O)})})(this.db,e,[this.name],f);return l&&(b._consoleTask=l,b=b.catch(function(x){return fe(x)})),b}finally{h&&_t()}},se.prototype.get=function(e,n){var i=this;return e&&e.constructor===Object?this.where(e).first(n):e==null?fe(new $.Type("Invalid argument to Table.get()")):this._trans("readonly",function(a){return i.core.get({trans:a,key:e}).then(function(u){return i.hook.reading.fire(u)})}).then(n)},se.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(y(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=m(e);if(n.length===1)return this.where(n[0]).equals(e[n[0]]);var i=this.schema.indexes.concat(this.schema.primKey).filter(function(h){if(h.compound&&n.every(function(x){return 0<=h.keyPath.indexOf(x)})){for(var b=0;b<n.length;++b)if(n.indexOf(h.keyPath[b])===-1)return!1;return!0}return!1}).sort(function(h,b){return h.keyPath.length-b.keyPath.length})[0];if(i&&this.db._maxKey!==dt)return f=i.keyPath.slice(0,n.length),this.where(f).equals(f.map(function(h){return e[h]}));var a=this.schema.idxByName;function u(h,b){return H(h,b)===0}var f=n.reduce(function(v,b){var x=v[0],v=v[1],p=a[b],k=e[b];return[x||p,x||!p?mt(v,p&&p.multi?function(O){return O=Me(O,b),y(O)&&O.some(function(w){return u(k,w)})}:function(O){return u(k,Me(O,b))}):v]}
vendor: 72,937 bytes, line 3
3,[null,null]),l=f[0],f=f[1];return l?this.where(l.name).equals(e[l.keyPath]).filter(f):i?this.filter(f):this.where(n).equals("")},se.prototype.filter=function(e){return this.toCollection().and(e)},se.prototype.count=function(e){return this.toCollection().count(e)},se.prototype.offset=function(e){return this.toCollection().offset(e)},se.prototype.limit=function(e){return this.toCollection().limit(e)},se.prototype.each=function(e){return this.toCollection().each(e)},se.prototype.toArray=function(e){return this.toCollection().toArray(e)},se.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},se.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,y(e)?"[".concat(e.join("+"),"]"):e))},se.prototype.reverse=function(){return this.toCollection().reverse()},se.prototype.mapToClass=function(e){for(var n=this.db,i=this.name,a=((this.schema.mappedClass=e).prototype instanceof Vi&&(e=(f=>{var h=v,b=f;if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function x(){this.constructor=h}function v(){return f!==null&&f.apply(this,arguments)||this}return r(h,b),h.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x),Object.defineProperty(v.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),v.prototype.table=function(){return i},v})(e)),new Set),u=e.prototype;u;u=I(u))Object.getOwnPropertyNames(u).forEach(function(f){return a.add(f)});function l(f){if(!f)return f;var h,b=Object.create(e.prototype);for(h in f)if(!a.has(h))try{b[h]=f[h]}catch{}return b}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=l,this.hook("reading",l),e},se.prototype.defineClass=function(){return this.mapToClass(function(e){S(this,e)})},se.prototype.add=function(e,n){var i=this,a=this.schema.primKey,u=a.auto,l=a.keyPath,f=e;return l&&u&&(f=Cn(l)(e)),this._trans("readwrite",function(h){return i.core.mutate({trans:h,type:"add",keys:n!=null?[n]:null,values:[f]})}).then(function(h){return h.numFailures?R.reject(h.failures[0]):h.lastResult}).then(function(h){if(l)try{ge(e,l,h)}catch{}return h})},se.prototype.upsert=function(e,n){var i=this,a=this.schema.primKey.keyPath;return this._trans("readwrite",function(u){return i.core.get({trans:u,key:e}).then(function(l){var f=l??{};return Li(f,n),a&&ge(f,a,e),i.core.mutate({trans:u,type:"put",values:[f],keys:[e],upsert:!0,updates:{keys:[e],changeSpecs:[n]}}).then(function(h){return h.numFailures?R.reject(h.failures[0]):!!l})})})},se.prototype.update=function(e,n){return typeof e!="object"||y(e)?this.where(":id").equals(e).modify(n):(e=Me(e,this.schema.primKey.keyPath))===void 0?fe(new $.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(n)},se.prototype.put=function(e,n){var i=this,a=this.schema.primKey,u=a.auto,l=a.keyPath,f=e;return l&&u&&(f=Cn(l)(e)),this._trans("readwrite",function(h){return i.core.mutate({trans:h,type:"put",values:[f],keys:n!=null?[n]:null})}).then(function(h){return h.numFailures?R.reject(h.failures[0]):h.lastResult}).then(function(h){if(l)try{ge(e,l,h)}catch{}return h})},se.prototype.delete=function(e){var n=this;return this._trans("readwrite",function(i){return n.core.mutate({trans:i,type:"delete",keys:[e]}).then(function(a){return Fn(n,[e],a)}).then(function(a){return a.numFailures?R.reject(a.failures[0]):void 0})})},se.prototype.clear=function(){var e=this;return this._trans("readwrite",function(n){return e.core.mutate({trans:n,type:"deleteRange",range:Ri}).then(function(i){return Fn(e,null,i)})}).then(function(n){return n.numFailures?R.reject(n.failures[0]):void 0})},se.prototype.bulkGet=function(e){var n=this;return this._trans("readonly",function(i){return n.core.getMany({keys:e,trans:i}).then(function(a){return a.map(function(u){return n.hook.reading.fire(u)})})})},se.prototype.bulkAdd=function(e,n,i){var a=this,u=Array.isArray(n)?n:void 0,l=(i=i||(u?void 0:n))?i.allKeys:void 0;return this._trans("readwrite",function(f){var h=a.schema.primKey,x=h.auto,h=h.keyPath;if(h&&u)throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(u&&u.length!==e.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");var b=e.length,x=h&&x?e.map(Cn(h)):e;return a.core.mutate({trans:f,type:"add",keys:u,values:x,wantResults:l}).then(function(v){var p=v.numFailures,k=v.failures;if(p===0)return l?v.results:v.lastResult;throw new Tt("".concat(a.name,".bulkAdd(): ").concat(p," of ").concat(b," operations failed"),k)})})},se.prototype.bulkPut=function(e,n,i){var a=this,u=Array.isArray(n)?n:void 0,l=(i=i||(u?void 0:n))?i.allKeys:void 0;return this._trans("readwrite",function(f){var h=a.schema.primKey,x=h.auto,h=h.keyPath;if(h&&u)throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(u&&u.length!==e.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");var b=e.length,x=h&&x?e.map(Cn(h)):e;return a.core.mutate({trans:f,type:"put",keys:u,values:x,wantResults:l}).then(function(v){var p=v.numFailures,k=v.failures;if(p===0)return l?v.results:v.lastResult;throw new Tt("".concat(a.name,".bulkPut(): ").concat(p," of ").concat(b," operations failed"),k)})})},se.prototype.bulkUpdate=function(e){var n=this,i=this.core,a=e.map(function(f){return f.key}),u=e.map(function(f){return f.changes}),l=[];return this._trans("readwrite",function(f){return i.getMany({trans:f,keys:a,cache:"clone"}).then(function(h){var b=[],x=[],v=(e.forEach(function(p,k){var O=p.key,w=p.changes,g=h[k];if(g){for(var _=0,E=Object.keys(w);_<E.length;_++){var T=E[_],D=w[T];if(T===n.schema.primKey.keyPath){if(H(D,O)!==0)throw new $.Constraint("Cannot update primary key in bulkUpdate()")}else ge(g,T,D)}l.push(k),b.push(O),x.push(g)}}),b.length);return i.mutate({trans:f,type:"put",keys:b,values:x,updates:{keys:a,changeSpecs:u}}).then(function(p){var k=p.numFailures,O=p.failures;if(k===0)return v;for(var w=0,g=Object.keys(O);w<g.length;w++){var _,E=g[w],T=l[Number(E)];T!=null&&(_=O[E],delete O[E],O[T]=_)}throw new Tt("".concat(n.name,".bulkUpdate(): ").concat(k," of ").concat(v," operations failed"),O)})})})},se.prototype.bulkDelete=function(e){var n=this,i=e.length;return this._trans("readwrite",function(a){return n.core.mutate({trans:a,type:"delete",keys:e}).then(function(u){return Fn(n,e,u)})}).then(function(a){var u=a.numFailures,l=a.failures;if(u===0)return a.lastResult;throw new Tt("".concat(n.name,".bulkDelete(): ").concat(u," of ").concat(i," operations failed"),l)})};var ji=se;function se(){}function en(e){function n(f,h){if(h){for(var b=arguments.length,x=new Array(b-1);--b;)x[b-1]=arguments[b];return i[f].subscribe.apply(null,x),e}if(typeof f=="string")return i[f]}var i={};n.addEventType=l;for(var a=1,u=arguments.length;a<u;++a)l(arguments[a]);return n;function l(f,h,b){var x,v;if(typeof f!="object")return h=h||Ja,v={subscribers:[],fire:b=b||ie,subscribe:function(p){v.subscribers.indexOf(p)===-1&&(v.subscribers.push(p),v.fire=h(v.fire,p))},unsubscribe:function(p){v.subscribers=v.subscribers.filter(function(k){return k!==p}),v.fire=v.subscribers.reduce(h,b)}},i[f]=n[f]=v;m(x=f).forEach(function(p){var k=x[p];if(y(k))l(p,x[p][0],x[p][1]);else{if(k!=="asap")throw new $.InvalidArgument("Invalid event config");var O=l(p,Yt,function(){for(var w=arguments.length,g=new Array(w);w--;)g[w]=arguments[w];O.subscribers.forEach(function(_){Zt(function(){_.apply(null,g)})})})}})}}function tn(e,n){return me(n).from({prototype:e}),n}function It(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function Er(e,n){e.filter=mt(e.filter,n)}function Dr(e,n,i){var a=e.replayFilter;e.replayFilter=a?function(){return mt(a(),n())}:n,e.justLimit=i&&!a}function An(e,n){if(e.isPrimKey)return n.primaryKey;var i=n.getIndexByKeyPath(e.index);if(i)return i;throw new $.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed")}function $i(e,n,i){var a=An(e,n.schema);return n.openCursor({trans:i,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:a,range:e.range}})}function Pn(e,n,i,a){var u,l,f=e.replayFilter?mt(e.filter,e.replayFilter()):e.filter;return e.or?(u={},l=function(h,b,x){var v,p;f&&!f(b,x,function(k){return b.stop(k)},function(k){return b.fail(k)})||((p=""+(v=b.primaryKey))=="[object ArrayBuffer]"&&(p=""+new Uint8Array(v)),K(u,p))||(u[p]=!0,n(h,b,x))},Promise.all([e.or._iterate(l,i),Bi($i(e,a,i),e.algorithm,l,!e.keysOnly&&e.valueMapper)])):Bi($i(e,a,i),mt(e.algorithm,f),n,!e.keysOnly&&e.valueMapper)}function Bi(e,n,i,a){var u=ae(a?function(l,f,h){return i(a(l),f,h)}:i);return e.then(function(l){if(l)return l.start(function(){var f=function(){return l.continue()};n&&!n(l,function(h){return f=h},function(h){l.stop(h),f=ie},function(h){l.fail(h),f=ie})||u(l.value,l,function(h){return f=h}),f()})})}X.prototype._read=function(e,n){var i=this._ctx;return i.error?i.table._trans(null,fe.bind(null,i.error)):i.table._trans("readonly",e).then(n)},X.prototype._write=function(e){var n=this._ctx;return n.error?n.table._trans(null,fe.bind(null,n.error)):n.table._trans("readwrite",e,"locked")},X.prototype._addAlgorithm=function(e){var n=this._ctx;n.algorithm=mt(n.algorithm,e)},X.prototype._iterate=function(e,n){return Pn(this._ctx,e,n,this._ctx.table.core)},X.prototype.clone=function(e){var n=Object.create(this.constructor.prototype),i=Object.create(this._ctx);return e&&S(i,e),n._ctx=i,n},X.prototype.raw=function(){return this._ctx.valueMapper=null,this},X.prototype.each=function(e){var n=this._ctx;return this._read(function(i){return Pn(n,e,i,n.table.core)})},X.prototype.count=function(e){var n=this;return this._read(function(i){var a,u=n._ctx,l=u.table.core;return It(u,!0)?l.count({trans:i,query:{index:An(u,l.schema),range:u.range}}).then(function(f){return Math.min(f,u.limit)}):(a=0,Pn(u,function(){return++a,!1},i,l).then(function(){return a}))}).then(e)},X.prototype.sortBy=function(e,n){var i=e.split(".").reverse(),a=i[0],u=i.length-1;function l(b,x){return x?l(b[i[x]],x-1):b[a]}var f=this._ctx.dir==="next"?1:-1;function h(b,x){return H(l(b,u),l(x,u))*f}return this.toArray(function(b){return b.sort(h)}).then(n)},X.prototype.toArray=function(e){var n=this;return this._read(function(i){var a,u,l,f=n._ctx;return f.dir==="next"&&It(f,!0)&&0<f.limit?(a=f.valueMapper,u=An(f,f.table.core.schema),f.table.core.query({trans:i,limit:f.limit,values:!0,query:{index:u,range:f.range}}).then(function(h){return h=h.result,a?h.map(a):h})):(l=[],Pn(f,function(h){return l.push(h)},i,f.table.core).then(function(){return l}))},e)},X.prototype.offset=function(e){var n=this._ctx;return e<=0||(n.offset+=e,It(n)?Dr(n,function(){var i=e;return function(a,u){return i===0||(i===1?--i:u(function(){a.advance(i),i=0}),!1)}}):Dr(n,function(){var i=e;return function(){return--i<0}})),this},X.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Dr(this._ctx,function(){var n=e;return function(i,a,u){return--n<=0&&a(u),0<=n}},!0),this},X.prototype.until=function(e,n){return Er(this._ctx,function(i,a,u){return!e(i.value)||(a(u),n)}),this},X.prototype.first=function(e){return this.limit(1).toArray(function(n){return n[0]}).then(e)},X.prototype.last=function(e){return this.reverse().first(e)},X.prototype.filter=function(e){var n;return Er(this._ctx,function(i){return e(i.value)}),(n=this._ctx).isMatch=mt(n.isMatch,e),this},X.prototype.and=function(e){return this.filter(e)},X.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},X.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},X.prototype.desc=function(){return this.reverse()},X.prototype.eachKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(i,a){e(a.key,a)})},X.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},X.prototype.eachPrimaryKey=function(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(i,a){e(a.primaryKey,a)})},X.prototype.keys=function(e){var n=this._ctx,i=(n.keysOnly=!n.isMatch,[]);return this.each(function(a,u){i.push(u.key)}).then(function(){return i}).then(e)},X.prototype.primaryKeys=function(e){var n=this._ctx;if(n.dir==="next"&&It(n,!0)&&0<n.limit)return this._read(function(a){var u=An(n,n.table.core.schema);return n.table.core.query({trans:a,values:!1,limit:n.limit,query:{index:u,range:n.range}})}).then(function(a){return a.result}).then(e);n.keysOnly=!n.isMatch;var i=[];return this.each(function(a,u){i.push(u.primaryKey)}).then(function(){return i}).then(e)},X.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},X.prototype.firstKey=function(e){return this.limit(1).keys(function(n){return n[0]}).then(e)},X.prototype.lastKey=function(e){return this.reverse().firstKey(e)},X.prototype.distinct=function(){var e,n=this._ctx,n=n.index&&n.table.schema.idxByName[n.index];return n&&n.multi&&(e={},Er(this._ctx,function(a){var a=a.primaryKey.toString(),u=K(e,a);return e[a]=!0,!u})),this},X.prototype.modify=function(e){var n=this,i=this._ctx;return this._write(function(a){function u(g,_){var E=_.failures;k+=g-_.numFailures;for(var T=0,D=m(E);T<D.length;T++){var M=D[T];p.push(E[M])}}var l=typeof e=="function"?e:function(g){return Li(g,e)},f=i.table.core,v=f.schema.primaryKey,h=v.outbound,b=v.extractKey,x=200,v=n.db._options.modifyChunkSize,p=(v&&(x=typeof v=="object"?v[f.name]||v["*"]||200:v),[]),k=0,O=[],w=e===Ui;return n.clone().primaryKeys().then(function(g){function _(T){var D=Math.min(x,g.length-T),M=g.slice(T,T+D);return(w?Promise.resolve([]):f.getMany({trans:a,keys:M,cache:"immutable"})).then(function(F){var A=[],N=[],q=h?[]:null,V=w?M:[];if(!w)for(var C=0;C<D;++C){var W=F[C],J={value:at(W),primKey:g[T+C]};l.call(J,J.value,J)!==!1&&(J.value==null?V.push(g[T+C]):h||H(b(W),b(J.value))===0?(N.push(J.value),h&&q.push(g[T+C])):(V.push(g[T+C]),A.push(J.value)))}return Promise.resolve(0<A.length&&f.mutate({trans:a,type:"add",values:A}).then(function(ee){for(var U in ee.failures)V.splice(parseInt(U),1);u(A.length,ee)})).then(function(){return(0<N.length||E&&typeof e=="object")&&f.mutate({trans:a,type:"put",keys:q,values:N,criteria:E,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<T}).then(function(ee){return u(N.length,ee)})}).then(function(){return(0<V.length||E&&w)&&f.mutate({trans:a,type:"delete",keys:V,criteria:E,isAdditionalChunk:0<T}).then(function(ee){return Fn(i.table,V,ee)}).then(function(ee){return u(V.length,ee)})}).then(function(){return g.length>T+D&&_(T+x)})})}var E=It(i)&&i.limit===1/0&&(typeof e!="function"||w)&&{index:i.index,range:i.range};return _(0).then(function(){if(0<p.length)throw new On("Error modifying one or more objects",p,k,O);return g.length})})})},X.prototype.delete=function(){var e=this._ctx,n=e.range;return!It(e)||e.table.schema.yProps||!e.isPrimKey&&n.type!==3?this.modify(Ui):this._write(function(i){var a=e.table.core.schema.primaryKey,u=n;return e.table.core.count({trans:i,query:{index:a,range:u}}).then(function(l){return e.table.core.mutate({trans:i,type:"deleteRange",range:u}).then(function(b){var h=b.failures,b=b.numFailures;if(b)throw new On("Could not delete some values",Object.keys(h).map(function(x){return h[x]}),l-b);return l-b})})})};var ro=X;function X(){}var Ui=function(e,n){return n.value=null};function io(e,n){return e<n?-1:e===n?0:1}function so(e,n){return n<e?-1:e===n?0:1}function Se(e,n,i){return e=e instanceof zi?new e.Collection(e):e,e._ctx.error=new(i||TypeError)(n),e}function Mt(e){return new e.Collection(e,function(){return Zi("")}).limit(0)}function Rn(O,n,i,a){var u,l,f,h,b,x,v,p=i.length;if(!i.every(function(g){return typeof g=="string"}))return Se(O,Pi);function k(g){u=g==="next"?function(E){return E.toUpperCase()}:function(E){return E.toLowerCase()},l=g==="next"?function(E){return E.toLowerCase()}:function(E){return E.toUpperCase()},f=g==="next"?io:so;var _=i.map(function(E){return{lower:l(E),upper:u(E)}}).sort(function(E,T){return f(E.lower,T.lower)});h=_.map(function(E){return E.upper}),b=_.map(function(E){return E.lower}),v=(x=g)==="next"?"":a}k("next");var O=new O.Collection(O,function(){return Je(h[0],b[p-1]+a)}),w=(O._ondirectionchange=function(g){k(g)},0);return O._addAlgorithm(function(g,_,E){var T=g.key;if(typeof T=="string"){var D=l(T);if(n(D,b,w))return!0;for(var M=null,F=w;F<p;++F){var A=((N,q,V,C,W,J)=>{for(var ee=Math.min(N.length,C.length),U=-1,Y=0;Y<ee;++Y){var oe=q[Y];if(oe!==C[Y])return W(N[Y],V[Y])<0?N.substr(0,Y)+V[Y]+V.substr(Y+1):W(N[Y],C[Y])<0?N.substr(0,Y)+C[Y]+V.substr(Y+1):0<=U?N.substr(0,U)+q[U]+V.substr(U+1):null;W(N[Y],oe)<0&&(U=Y)}return ee<C.length&&J==="next"?N+V.substr(N.length):ee<N.length&&J==="prev"?N.substr(0,V.length):U<0?null:N.substr(0,U)+C[U]+V.substr(U+1)})(T,D,h[F],b[F],f,x);A===null&&M===null?w=F+1:(M===null||0<f(M,A))&&(M=A)}_(M!==null?function(){g.continue(M+v)}:E)}return!1}),O}function Je(e,n,i,a){return{type:2,lower:e,upper:n,lowerOpen:i,upperOpen:a}}function Zi(e){return{type:1,lower:e,upper:e}}Object.defineProperty(pe.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),pe.prototype.between=function(e,n,i,a){i=i!==!1,a=a===!0;try{return 0<this._cmp(e,n)||this._cmp(e,n)===0&&(i||a)&&(!i||!a)?Mt(this):new this.Collection(this,function(){return Je(e,n,!i,!a)})}catch{return Se(this,Le)}},pe.prototype.equals=function(e){return e==null?Se(this,Le):new this.Collection(this,function(){return Zi(e)})},pe.prototype.above=function(e){return e==null?Se(this,Le):new this.Collection(this,function(){return Je(e,void 0,!0)})},pe.prototype.aboveOrEqual=function(e){return e==null?Se(this,Le):new this.Collection(this,function(){return Je(e,void 0,!1)})},pe.prototype.below=function(e){return e==null?Se(this,Le):new this.Collection(this,function(){return Je(void 0,e,!1,!0)})},pe.prototype.belowOrEqual=function(e){return e==null?Se(this,Le):new this.Collection(this,function(){return Je(void 0,e)})},pe.prototype.startsWith=function(e){return typeof e!="string"?Se(this,Pi):this.between(e,e+dt,!0,!0)},pe.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):Rn(this,function(n,i){return n.indexOf(i[0])===0},[e],dt)},pe.prototype.equalsIgnoreCase=function(e){return Rn(this,function(n,i){return n===i[0]},[e],"")},pe.prototype.anyOfIgnoreCase=function(){var e=Ke.apply(Ot,arguments);return e.length===0?Mt(this):Rn(this,function(n,i){return i.indexOf(n)!==-1},e,"")},pe.prototype.startsWithAnyOfIgnoreCase=function(){var e=Ke.apply(Ot,arguments);return e.length===0?Mt(this):Rn(this,function(n,i){return i.some(function(a){return n.indexOf(a)===0})},e,dt)},pe.prototype.anyOf=function(){var e,n,i=this,a=Ke.apply(Ot,arguments),u=this._cmp;try{a.sort(u)}catch{return Se(this,Le)}return a.length===0?Mt(this):((e=new this.Collection(this,function(){return Je(a[0],a[a.length-1])}))._ondirectionchange=function(l){u=l==="next"?i._ascending:i._descending,a.sort(u)},n=0,e._addAlgorithm(function(l,f,h){for(var b=l.key;0<u(b,a[n]);)if(++n===a.length)return f(h),!1;return u(b,a[n])===0||(f(function(){l.continue(a[n])}),!1)}),e)},pe.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},pe.prototype.noneOf=function(){var e=Ke.apply(Ot,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Se(this,Le)}var n=e.reduce(function(i,a){return i?i.concat([[i[i.length-1][1],a]]):[[-1/0,a]]},null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},pe.prototype.inAnyRange=function(e,E){var i=this,a=this._cmp,u=this._ascending,l=this._descending,f=this._min,h=this._max;if(e.length===0)return Mt(this);if(!e.every(function(T){return T[0]!==void 0&&T[1]!==void 0&&u(T[0],T[1])<=0}))return Se(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",$.InvalidArgument);var b=!E||E.includeLowers!==!1,x=E&&E.includeUppers===!0,v,p=u;function k(T,D){return p(T[0],D[0])}try{(v=e.reduce(function(T,D){for(var M=0,F=T.length;M<F;++M){var A=T[M];if(a(D[0],A[1])<0&&0<a(D[1],A[0])){A[0]=f(A[0],D[0]),A[1]=h(A[1],D[1]);break}}return M===F&&T.push(D),T},[])).sort(k)}catch{return Se(this,Le)}var O=0,w=x?function(T){return 0<u(T,v[O][1])}:function(T){return 0<=u(T,v[O][1])},g=b?function(T){return 0<l(T,v[O][0])}:function(T){return 0<=l(T,v[O][0])},_=w,E=new this.Collection(this,function(){return Je(v[0][0],v[v.length-1][1],!b,!x)});return E._ondirectionchange=function(T){p=T==="next"?(_=w,u):(_=g,l),v.sort(k)},E._addAlgorithm(function(T,D,M){for(var F,A=T.key;_(A);)if(++O===v.length)return D(M),!1;return!w(F=A)&&!g(F)||(i._cmp(A,v[O][1])===0||i._cmp(A,v[O][0])===0||D(function(){p===u?T.continue(v[O][0]):T.continue(v[O][1])}),!1)}),E},pe.prototype.startsWithAnyOf=function(){var e=Ke.apply(Ot,arguments);return e.every(function(n){return typeof n=="string"})?e.length===0?Mt(this):this.inAnyRange(e.map(function(n){return[n,n+dt]})):Se(this,"startsWithAnyOf() only works with strings")};var zi=pe;function pe(){}function Ve(e){return ae(function(n){return nn(n),e(n.target.error),!1})}function nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var rn="storagemutated",Ir="x-storagemutated-1",Qe=en(null,rn),ao=(qe.prototype._lock=function(){return it(!j.global),++this._reculock,this._reculock!==1||j.global||(j.lockOwnerFor=this),this},qe.prototype._unlock=function(){if(it(!j.global),--this._reculock==0)for(j.global||(j.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{ht(e[1],e[0])}catch{}}return this},qe.prototype._locked=function(){return this._reculock&&j.lockOwnerFor!==this},qe.prototype.create=function(e){var n=this;if(this.mode){var i=this.db.idbdb,a=this.db._state.dbOpenError;if(it(!this.idbtrans),!e&&!i)switch(a&&a.name){case"DatabaseClosedError":throw new $.DatabaseClosed(a);case"MissingAPIError":throw new $.MissingAPI(a.message,a);default:throw new $.OpenFailed(a)}if(!this.active)throw new $.TransactionInactive;it(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||i).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=ae(function(u){nn(u),n._reject(e.error)}),e.onabort=ae(function(u){nn(u),n.active&&n._reject(new $.Abort(e.error)),n.active=!1,n.on("abort").fire(u)}),e.oncomplete=ae(function(){n.active=!1,n._resolve(),"mutatedParts"in e&&Qe.storagemutated.fire(e.mutatedParts)})}return this},qe.prototype._promise=function(e,n,i){var a,u=this;return e==="readwrite"&&this.mode!=="readwrite"?fe(new $.ReadOnly("Transaction is readonly")):this.active?this._locked()?new R(function(l,f){u._blockedFuncs.push([function(){u._promise(e,n,i).then(l,f)},j])}):i?Ye(function(){var l=new R(function(f,h){u._lock();var b=n(f,h,u);b&&b.then&&b.then(f,h)});return l.finally(function(){return u._unlock()}),l._lib=!0,l}):((a=new R(function(l,f){var h=n(l,f,u);h&&h.then&&h.then(l,f)}))._lib=!0,a):fe(new $.TransactionInactive)},qe.prototype._root=function(){return this.parent?this.parent._root():this},qe.prototype.waitFor=function(e){var n,i=this._root(),a=R.resolve(e),u=(i._waitingFor?i._waitingFor=i._waitingFor.then(function(){return a}):(i._waitingFor=a,i._waitingQueue=[],n=i.idbtrans.objectStore(i.storeNames[0]),(function l(){for(++i._spinCount;i._waitingQueue.length;)i._waitingQueue.shift()();i._waitingFor&&(n.get(-1/0).onsuccess=l)})()),i._waitingFor);return new R(function(l,f){a.then(function(h){return i._waitingQueue.push(ae(l.bind(null,h)))},function(h){return i._waitingQueue.push(ae(f.bind(null,h)))}).finally(function(){i._waitingFor===u&&(i._waitingFor=null)})})},qe.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new $.Abort))},qe.prototype.table=function(e){var n=this._memoizedTables||(this._memoizedTables={});if(K(n,e))return n[e];var i=this.schema[e];if(i)return(i=new this.db.Table(e,i,this)).core=this.db.core.table(e),n[e]=i;throw new $.NotFound("Table "+e+" not part of transaction")},qe);function qe(){}function Mr(e,n,i,a,u,l,f,h){return{name:e,keyPath:n,unique:i,multi:a,auto:u,compound:l,src:(i&&!f?"&":"")+(a?"*":"")+(u?"++":"")+Yi(n),type:h}}function Yi(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Nr(e,n,i){return{name:e,primKey:n,indexes:i,mappedClass:null,idxByName:(a=function(u){return[u.name,u]},i.reduce(function(u,l,f){return l=a(l,f),l&&(u[l[0]]=l[1]),u},{}))};var a}var sn=function(e){try{return e.only([[]]),sn=function(){return[[]]},[[]]}catch{return sn=function(){return dt},dt}};function Cr(e){return e==null?function(){}:typeof e=="string"?(n=e).split(".").length===1?function(i){return i[n]}:function(i){return Me(i,n)}:function(i){return Me(i,e)};var n}function Hi(e){return[].slice.call(e)}var oo=0;function an(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function uo(e,n,b){function a(w){if(w.type===3)return null;if(w.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var p=w.lower,k=w.upper,O=w.lowerOpen,w=w.upperOpen;return p===void 0?k===void 0?null:n.upperBound(k,!!w):k===void 0?n.lowerBound(p,!!O):n.bound(p,k,!!O,!!w)}function u(v){var p,k=v.name;return{name:k,schema:v,mutate:function(O){var w=O.trans,g=O.type,_=O.keys,E=O.values,T=O.range;return new Promise(function(D,M){D=ae(D);var F=w.objectStore(k),A=F.keyPath==null,N=g==="put"||g==="add";if(!N&&g!=="delete"&&g!=="deleteRange")throw new Error("Invalid operation type: "+g);var q,V=(_||E||{length:1}).length;if(_&&E&&_.length!==E.length)throw new Error("Given keys array must have same length as given values array.");if(V===0)return D({numFailures:0,failures:{},results:[],lastResult:void 0});function C(ue){++ee,nn(ue)}var W=[],J=[],ee=0;if(g==="deleteRange"){if(T.type===4)return D({numFailures:ee,failures:J,results:[],lastResult:void 0});T.type===3?W.push(q=F.clear()):W.push(q=F.delete(a(T)))}else{var A=N?A?[E,_]:[E,null]:[_,null],U=A[0],Y=A[1];if(N)for(var oe=0;oe<V;++oe)W.push(q=Y&&Y[oe]!==void 0?F[g](U[oe],Y[oe]):F[g](U[oe])),q.onerror=C;else for(oe=0;oe<V;++oe)W.push(q=F[g](U[oe])),q.onerror=C}function _e(ue){ue=ue.target.result,W.forEach(function(gt,Gr){return gt.error!=null&&(J[Gr]=gt.error)}),D({numFailures:ee,failures:J,results:g==="delete"?_:W.map(function(gt){return gt.result}),lastResult:ue})}q.onerror=function(ue){C(ue),_e(ue)},q.onsuccess=_e})},getMany:function(O){var w=O.trans,g=O.keys;return new Promise(function(_,E){_=ae(_);for(var T,D=w.objectStore(k),M=g.length,F=new Array(M),A=0,N=0,q=function(W){W=W.target,F[W._pos]=W.result,++N===A&&_(F)},V=Ve(E),C=0;C<M;++C)g[C]!=null&&((T=D.get(g[C]))._pos=C,T.onsuccess=q,T.onerror=V,++A);A===0&&_(F)})},get:function(O){var w=O.trans,g=O.key;return new Promise(function(_,E){_=ae(_);var T=w.objectStore(k).get(g);T.onsuccess=function(D){return _(D.target.result)},T.onerror=Ve(E)})},query:(p=h,function(O){return new Promise(function(w,g){w=ae(w);var _,E,T,N=O.trans,D=O.values,M=O.limit,A=O.query,F=M===1/0?void 0:M,q=A.index,A=A.range,N=N.objectStore(k),N=q.isPrimaryKey?N:N.index(q.name),q=a(A);if(M===0)return w({result:[]});p?((A=D?N.getAll(q,F):N.getAllKeys(q,F)).onsuccess=function(V){return w({result:V.target.result})},A.onerror=Ve(g)):(_=0,E=!D&&"openKeyCursor"in N?N.openKeyCursor(q):N.openCursor(q),T=[],E.onsuccess=function(V){var C=E.result;return!C||(T.push(D?C.value:C.primaryKey),++_===M)?w({result:T}):void C.continue()},E.onerror=Ve(g))})}),openCursor:function(O){var w=O.trans,g=O.values,_=O.query,E=O.reverse,T=O.unique;return new Promise(function(D,M){D=ae(D);var N=_.index,F=_.range,A=w.objectStore(k),A=N.isPrimaryKey?A:A.index(N.name),N=E?T?"prevunique":"prev":T?"nextunique":"next",q=!g&&"openKeyCursor"in A?A.openKeyCursor(a(F),N):A.openCursor(a(F),N);q.onerror=Ve(M),q.onsuccess=ae(function(V){var C,W,J,ee,U=q.result;U?(U.___id=++oo,U.done=!1,C=U.continue.bind(U),W=(W=U.continuePrimaryKey)&&W.bind(U),J=U.advance.bind(U),ee=function(){throw new Error("Cursor not stopped")},U.trans=w,U.stop=U.continue=U.continuePrimaryKey=U.advance=function(){throw new Error("Cursor not started")},U.fail=ae(M),U.next=function(){var Y=this,oe=1;return this.start(function(){return oe--?Y.continue():Y.stop()}).then(function(){return Y})},U.start=function(Y){function oe(){if(q.result)try{Y()}catch(ue){U.fail(ue)}else U.done=!0,U.start=function(){throw new Error("Cursor behind last entry")},U.stop()}var _e=new Promise(function(ue,gt){ue=ae(ue),q.onerror=Ve(gt),U.fail=gt,U.stop=function(Gr){U.stop=U.continue=U.continuePrimaryKey=U.advance=ee,ue(Gr)}});return q.onsuccess=ae(function(ue){q.onsuccess=oe,oe()}),U.continue=C,U.continuePrimaryKey=W,U.advance=J,oe(),_e},D(U)):D(null)},M)})},count:function(O){var w=O.query,g=O.trans,_=w.index,E=w.range;return new Promise(function(T,D){var M=g.objectStore(k),M=_.isPrimaryKey?M:M.index(_.name),F=a(E),F=F?M.count(F):M.count();F.onsuccess=ae(function(A){return T(A.target.result)}),F.onerror=Ve(D)})}}}l=b,f=Hi((b=e).objectStoreNames);var l,b={schema:{name:b.name,tables:f.map(function(v){return l.objectStore(v)}).map(function(v){var p=v.keyPath,k=v.autoIncrement,w=y(p),O={},w={name:v.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:p==null,compound:w,keyPath:p,autoIncrement:k,unique:!0,extractKey:Cr(p)},indexes:Hi(v.indexNames).map(function(g){return v.index(g)}).map(function(T){var D=T.name,_=T.unique,E=T.multiEntry,T=T.keyPath,D={name:D,compound:y(T),keyPath:T,unique:_,multiEntry:E,extractKey:Cr(T)};return O[an(T)]=D}),getIndexByKeyPath:function(g){return O[an(g)]}};return O[":id"]=w.primaryKey,p!=null&&(O[an(p)]=w.primaryKey),w})},hasGetAll:0<f.length&&"getAll"in l.objectStore(f[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)},f=b.schema,h=b.hasGetAll,b=f.tables.map(u),x={};return b.forEach(function(v){return x[v.name]=v}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(v){if(x[v])return x[v];throw new Error("Table '".concat(v,"' not found"))},MIN_KEY:-1/0,MAX_KEY:sn(n),schema:f}}function lo(e,n,i,a){return i=i.IDBKeyRange,n=uo(n,i,a),{dbcore:e.dbcore.reduce(function(u,l){return l=l.create,o(o({},u),l(u))},n)}}function Vn(e,n){var i=n.db,i=lo(e._middlewares,i,e._deps,n);e.core=i.dbcore,e.tables.forEach(function(a){var u=a.name;e.core.schema.tables.some(function(l){return l.name===u})&&(a.core=e.core.table(u),e[u]instanceof e.Table)&&(e[u].core=a.core)})}function qn(e,n,i,a){i.forEach(function(u){var l=a[u];n.forEach(function(f){var h=(function b(x,v){return xe(x,v)||(x=I(x))&&b(x,v)})(f,u);(!h||"value"in h&&h.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?re(f,u,{get:function(){return this.table(u)},set:function(b){B(this,u,{value:b,writable:!0,configurable:!0,enumerable:!0})}}):f[u]=new e.Table(u,l))})})}function Fr(e,n){n.forEach(function(i){for(var a in i)i[a]instanceof e.Table&&delete i[a]})}function co(e,n){return e._cfg.version-n._cfg.version}function fo(e,n,i,a){var u=e._dbSchema,l=(i.objectStoreNames.contains("$meta")&&!u.$meta&&(u.$meta=Nr("$meta",Ji("")[0],[]),e._storeNames.push("$meta")),e._createTransaction("readwrite",e._storeNames,u)),f=(l.create(i),l._completion.catch(a),l._reject.bind(l)),h=j.transless||j;Ye(function(){if(j.trans=l,j.transless=h,n!==0)return Vn(e,i),x=n,((b=l).storeNames.includes("$meta")?b.table("$meta").get("version").then(function(v){return v??x}):R.resolve(x)).then(function(_){var p=e,k=_,O=l,w=i,g=[],_=p._versions,E=p._dbSchema=Wn(0,p.idbdb,w);return(_=_.filter(function(T){return T._cfg.version>=k})).length===0?R.resolve():(_.forEach(function(T){g.push(function(){var D,M,F,A=E,N=T._cfg.dbschema,q=(Ln(p,A,w),Ln(p,N,w),E=p._dbSchema=N,Ar(A,N)),V=(q.add.forEach(function(C){Pr(w,C[0],C[1].primKey,C[1].indexes)}),q.change.forEach(function(C){if(C.recreate)throw new $.Upgrade("Not yet support for changing primary key");var W=w.objectStore(C.name);C.add.forEach(function(J){return Kn(W,J)}),C.change.forEach(function(J){W.deleteIndex(J.name),Kn(W,J)}),C.del.forEach(function(J){return W.deleteIndex(J)})}),T._cfg.contentUpgrade);if(V&&T._cfg.version>k)return Vn(p,w),O._memoizedTables={},D=bn(N),q.del.forEach(function(C){D[C]=A[C]}),Fr(p,[p.Transaction.prototype]),qn(p,[p.Transaction.prototype],m(D),D),O.schema=D,(M=mr(V))&&Et(),N=R.follow(function(){var C;(F=V(O))&&M&&(C=He.bind(null,null),F.then(C,C))}),F&&typeof F.then=="function"?R.resolve(F):N.then(function(){return F})}),g.push(function(D){var M,F,A=T._cfg.dbschema;M=A,F=D,[].slice.call(F.db.objectStoreNames).forEach(function(N){return M[N]==null&&F.db.deleteObjectStore(N)}),Fr(p,[p.Transaction.prototype]),qn(p,[p.Transaction.prototype],p._storeNames,p._dbSchema),O.schema=p._dbSchema}),g.push(function(D){p.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(p.idbdb.version/10)===T._cfg.version?(p.idbdb.deleteObjectStore("$meta"),delete p._dbSchema.$meta,p._storeNames=p._storeNames.filter(function(M){return M!=="$meta"})):D.objectStore("$meta").put(T._cfg.version,"version"))})}),(function T(){return g.length?R.resolve(g.shift()(O.idbtrans)).then(T):R.resolve()})().then(function(){Gi(E,w)}))}).catch(f);var b,x;m(u).forEach(function(v){Pr(i,v,u[v].primKey,u[v].indexes)}),Vn(e,i),R.follow(function(){return e.on.populate.fire(l)}).catch(f)})}function ho(e,n){Gi(e._dbSchema,n),n.db.version%10!=0||n.objectStoreNames.contains("$meta")||n.db.createObjectStore("$meta").add(Math.ceil(n.db.version/10-1),"version");var i=Wn(0,e.idbdb,n);Ln(e,e._dbSchema,n);for(var a=0,u=Ar(i,e._dbSchema).change;a<u.length;a++){var l=(f=>{if(f.change.length||f.recreate)return{value:void 0};var h=n.objectStore(f.name);f.add.forEach(function(b){Kn(h,b)})})(u[a]);if(typeof l=="object")return l.value}}function Ar(e,n){var i,a={del:[],add:[],change:[]};for(i in e)n[i]||a.del.push(i);for(i in n){var u=e[i],l=n[i];if(u){var f={name:i,def:l,recreate:!1,del:[],add:[],change:[]};if(""+(u.primKey.keyPath||"")!=""+(l.primKey.keyPath||"")||u.primKey.auto!==l.primKey.auto)f.recreate=!0,a.change.push(f);else{var h=u.idxByName,b=l.idxByName,x=void 0;for(x in h)b[x]||f.del.push(x);for(x in b){var v=h[x],p=b[x];v?v.src!==p.src&&f.change.push(p):f.add.push(p)}(0<f.del.length||0<f.add.length||0<f.change.length)&&a.change.push(f)}}else a.add.push([i,l])}return a}function Pr(e,n,i,a){var u=e.db.createObjectStore(n,i.keyPath?{keyPath:i.keyPath,autoIncrement:i.auto}:{autoIncrement:i.auto});a.forEach(function(l){return Kn(u,l)})}function Gi(e,n){m(e).forEach(function(i){n.db.objectStoreNames.contains(i)||Pr(n,i,e[i].primKey,e[i].indexes)})}function Kn(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function Wn(e,n,i){var a={};return Pe(n.objectStoreNames,0).forEach(function(u){for(var l=i.objectStore(u),f=Mr(Yi(x=l.keyPath),x||"",!0,!1,!!l.autoIncrement,x&&typeof x!="string",!0),h=[],b=0;b<l.indexNames.length;++b){var v=l.index(l.indexNames[b]),x=v.keyPath,v=Mr(v.name,x,!!v.unique,!!v.multiEntry,!1,x&&typeof x!="string",!1);h.push(v)}a[u]=Nr(u,f,h)}),a}function Ln(e,n,i){for(var a=i.db.objectStoreNames,u=0;u<a.length;++u){var l=a[u],f=i.objectStore(l);e._hasGetAll="getAll"in f;for(var h=0;h<f.indexNames.length;++h){var b,x=f.indexNames[h],v=f.index(x).keyPath,v=typeof v=="string"?v:"["+Pe(v).join("+")+"]";n[l]&&(b=n[l].idxByName[v])&&(b.name=x,delete n[l].idxByName[v],n[l].idxByName[x]=b)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function Ji(e){return e.split(",").map(function(n,i){var u=n.split(":"),a=(a=u[1])==null?void 0:a.trim(),u=(n=u[0].trim()).replace(/([&*]|\+\+)/g,""),l=/^\[/.test(u)?u.match(/^\[(.*)\]$/)[1].split("+"):u;return Mr(u,l||null,/\&/.test(n),/\*/.test(n),/\+\+/.test(n),y(l),i===0,a)})}Nt.prototype._createTableSchema=Nr,Nt.prototype._parseIndexSyntax=Ji,Nt.prototype._parseStoresSpec=function(e,n){var i=this;m(e).forEach(function(a){if(e[a]!==null){var u=i._parseIndexSyntax(e[a]),l=u.shift();if(!l)throw new $.Schema("Invalid schema for table "+a+": "+e[a]);if(l.unique=!0,l.multi)throw new $.Schema("Primary key cannot be multiEntry*");u.forEach(function(f){if(f.auto)throw new $.Schema("Only primary key can be marked as autoIncrement (++)");if(!f.keyPath)throw new $.Schema("Index must have a name and cannot be an empty string")}),l=i._createTableSchema(a,l,u),n[a]=l}})},Nt.prototype.stores=function(i){var n=this.db,i=(this._cfg.storesSource=this._cfg.storesSource?S(this._cfg.storesSource,i):i,n._versions),a={},u={};return i.forEach(function(l){S(a,l._cfg.storesSource),u=l._cfg.dbschema={},l._parseStoresSpec(a,u)}),n._dbSchema=u,Fr(n,[n._allTables,n,n.Transaction.prototype]),qn(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],m(u),u),n._storeNames=m(u),this},Nt.prototype.upgrade=function(e){return this._cfg.contentUpgrade=pr(this._cfg.contentUpgrade||ie,e),this};var mo=Nt;function Nt(){}function Rr(e,n){var i=e._dbNamesDB;return i||(i=e._dbNamesDB=new je(Nn,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),i.table("dbnames")}function Vr(e){return e&&typeof e.databases=="function"}function qr(e){return Ye(function(){return j.letThrough=!0,e()})}function Kr(e){return!("from"in e)}var ve=function(e,n){var i;if(!this)return i=new ve,e&&"d"in e&&S(i,e),i;S(this,arguments.length?{d:1,from:e,to:1<arguments.length?n:e}:{d:0})};function on(e,n,i){var a=H(n,i);if(!isNaN(a)){if(0<a)throw RangeError();if(Kr(e))return S(e,{from:n,to:i,d:1});var a=e.l,u=e.r;if(H(i,e.from)<0)return a?on(a,n,i):e.l={from:n,to:i,d:1,l:null,r:null},Xi(e);if(0<H(n,e.to))return u?on(u,n,i):e.r={from:n,to:i,d:1,l:null,r:null},Xi(e);H(n,e.from)<0&&(e.from=n,e.l=null,e.d=u?u.d+1:1),0<H(i,e.to)&&(e.to=i,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,a&&!e.l&&un(e,a),u&&n&&un(e,u)}}function un(e,n){Kr(n)||(function i(a,u){var l=u.from,f=u.l,h=u.r;on(a,l,u.to),f&&i(a,f),h&&i(a,h)})(e,n)}function Qi(e,n){var i=jn(n),a=i.next();if(!a.done)for(var u=a.value,l=jn(e),f=l.next(u.from),h=f.value;!a.done&&!f.done;){if(H(h.from,u.to)<=0&&0<=H(h.to,u.from))return!0;H(u.from,h.from)<0?u=(a=i.next(h.from)).value:h=(f=l.next(u.from)).value}return!1}function jn(e){var n=Kr(e)?null:{s:0,n:e};return{next:function(i){for(var a=0<arguments.length;n;)switch(n.s){case 0:if(n.s=1,a)for(;n.n.l&&H(i,n.n.from)<0;)n={up:n,n:n.n.l,s:1};else for(;n.n.l;)n={up:n,n:n.n.l,s:1};case 1:if(n.s=2,!a||H(i,n.n.to)<=0)return{value:n.n,done:!1};case 2:if(n.n.r){n.s=3,n={up:n,n:n.n.r,s:0};continue}case 3:n=n.up}return{done:!0}}}}function Xi(e){var n,i,a,u=(((u=e.r)==null?void 0:u.d)||0)-(((u=e.l)==null?void 0:u.d)||0),u=1<u?"r":u<-1?"l":"";u&&(n=u=="r"?"l":"r",i=o({},e),a=e[u],e.from=a.from,e.to=a.to,e[u]=a[u],i[u]=a[n],(e[n]=i).d=es(i)),e.d=es(e)}function es(i){var n=i.r,i=i.l;return(n?i?Math.max(n.d,i.d):n.d:i?i.d:0)+1}function $n(e,n){return m(n).forEach(function(i){e[i]?un(e[i],n[i]):e[i]=(function a(u){var l,f,h={};for(l in u)K(u,l)&&(f=u[l],h[l]=!f||typeof f!="object"||kn.has(f.constructor)?f:a(f));return h})(n[i])}),e}function Wr(e,n){return e.all||n.all||Object.keys(e).some(function(i){return n[i]&&Qi(n[i],e[i])})}G(ve.prototype,((Oe={add:function(e){return un(this,e),this},addKey:function(e){return on(this,e,e),this},addKeys:function(e){var n=this;return e.forEach(function(i){return on(n,i,i)}),this},hasKey:function(e){var n=jn(this).next(e).value;return n&&H(n.from,e)<=0&&0<=H(n.to,e)}})[dr]=function(){return jn(this)},Oe));var yt={},Lr={},jr=!1;function Bn(e){$n(Lr,e),jr||(jr=!0,setTimeout(function(){jr=!1,$r(Lr,!(Lr={}))},0))}function $r(e,n){n===void 0&&(n=!1);var i=new Set;if(e.all)for(var a=0,u=Object.values(yt);a<u.length;a++)ts(h=u[a],e,i,n);else for(var l in e){var f,h,l=/^idb\:\/\/(.*)\/(.*)\//.exec(l);l&&(f=l[1],l=l[2],h=yt["idb://".concat(f,"/").concat(l)])&&ts(h,e,i,n)}i.forEach(function(b){return b()})}function ts(e,n,i,a){for(var u=[],l=0,f=Object.entries(e.queries.query);l<f.length;l++){for(var h=f[l],b=h[0],x=[],v=0,p=h[1];v<p.length;v++){var k=p[v];Wr(n,k.obsSet)?k.subscribers.forEach(function(_){return i.add(_)}):a&&x.push(k)}a&&u.push([b,x])}if(a)for(var O=0,w=u;O<w.length;O++){var g=w[O],b=g[0],x=g[1];e.queries.query[b]=x}}function yo(e){var n=e._state,i=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then(function(){return n.dbOpenError?fe(n.dbOpenError):e});n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var a=n.openCanceller,u=Math.round(10*e.verno),l=!1;function f(){if(n.openCanceller!==a)throw new $.DatabaseClosed("db.open() was cancelled")}function h(){return new R(function(k,O){if(f(),!i)throw new $.MissingAPI;var w=e.name,g=n.autoSchema||!u?i.open(w):i.open(w,u);if(!g)throw new $.MissingAPI;g.onerror=Ve(O),g.onblocked=ae(e._fireOnBlocked),g.onupgradeneeded=ae(function(_){var E;v=g.transaction,n.autoSchema&&!e._options.allowEmptyDB?(g.onerror=nn,v.abort(),g.result.close(),(E=i.deleteDatabase(w)).onsuccess=E.onerror=ae(function(){O(new $.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(v.onerror=Ve(O),E=_.oldVersion>Math.pow(2,62)?0:_.oldVersion,p=E<1,e.idbdb=g.result,l&&ho(e,v),fo(e,E/10,v,O))},O),g.onsuccess=ae(function(){v=null;var _,E,T,D,M,F,A=e.idbdb=g.result,N=Pe(A.objectStoreNames);if(0<N.length)try{var q=A.transaction((M=N).length===1?M[0]:M,"readonly");if(n.autoSchema)F=A,D=q,(T=e).verno=F.version/10,D=T._dbSchema=Wn(0,F,D),T._storeNames=Pe(F.objectStoreNames,0),qn(T,[T._allTables],m(D),D);else if(Ln(e,e._dbSchema,q),E=q,((E=Ar(Wn(0,(_=e).idbdb,E),_._dbSchema)).add.length||E.change.some(function(V){return V.add.length||V.change.length}))&&!l)return A.close(),u=A.version+1,l=!0,k(h());Vn(e,q)}catch{}Dt.push(e),A.onversionchange=ae(function(V){n.vcFired=!0,e.on("versionchange").fire(V)}),A.onclose=ae(function(){e.close({disableAutoOpen:!1})}),p&&(N=e._deps,M=w,Vr(F=N.indexedDB)||M===Nn||Rr(F,N.IDBKeyRange).put({name:M}).catch(ie)),k()},O)}).catch(function(k){switch(k==null?void 0:k.name){case"UnknownError":if(0<n.PR1398_maxLoop)return n.PR1398_maxLoop--,h();break;case"VersionError":if(0<u)return u=0,h()}return R.reject(k)})}var b,x=n.dbReadyResolve,v=null,p=!1;return R.race([a,(typeof navigator>"u"?R.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(k){function O(){return indexedDB.databases().finally(k)}b=setInterval(O,100),O()}).finally(function(){return clearInterval(b)}):Promise.resolve()).then(h)]).then(function(){return f(),n.onReadyBeingFired=[],R.resolve(qr(function(){return e.on.ready.fire(e.vip)})).then(function k(){var O;if(0<n.onReadyBeingFired.length)return O=n.onReadyBeingFired.reduce(pr,ie),n.onReadyBeingFired=[],R.resolve(qr(function(){return O(e.vip)})).then(k)})}).finally(function(){n.openCanceller===a&&(n.onReadyBeingFired=null,n.isBeingOpened=!1)}).catch(function(k){n.dbOpenError=k;try{v&&v.abort()}catch{}return a===n.openCanceller&&e._close(),fe(k)}).finally(function(){n.openComplete=!0,x()}).then(function(){var k;return p&&(k={},e.tables.forEach(function(O){O.schema.indexes.forEach(function(w){w.name&&(k["idb://".concat(e.name,"/").concat(O.name,"/").concat(w.name)]=new ve(-1/0,[[[]]]))}),k["idb://".concat(e.name,"/").concat(O.name,"/")]=k["idb://".concat(e.name,"/").concat(O.name,"/:dels")]=new ve(-1/0,[[[]]])}),Qe(rn).fire(k),$r(k,!0)),e})}function Br(e){function n(l){return e.next(l)}var i=u(n),a=u(function(l){return e.throw(l)});function u(l){return function(h){var h=l(h),b=h.value;return h.done?b:b&&typeof b.then=="function"?b.then(i,a):y(b)?Promise.all(b).then(i,a):i(b)}}return u(n)()}function Un(e,n,i){for(var a=y(e)?e.slice():[e],u=0;u<i;++u)a.push(n);return a}var po={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return o(o({},e),{table:function(a){var i=e.table(a),a=i.schema,u={},l=[];function f(k,O,w){var T=an(k),g=u[T]=u[T]||[],_=k==null?0:typeof k=="string"?1:k.length,E=0<O,T=o(o({},w),{name:E?"".concat(T,"(virtual-from:").concat(w.name,")"):w.name,lowLevelIndex:w,isVirtual:E,keyTail:O,keyLength:_,extractKey:Cr(k),unique:!E&&w.unique});return g.push(T),T.isPrimaryKey||l.push(T),1<_&&f(_===2?k[0]:k.slice(0,_-1),O+1,w),g.sort(function(D,M){return D.keyTail-M.keyTail}),T}var h=f(a.primaryKey.keyPath,0,a.primaryKey);u[":id"]=[h];for(var b=0,x=a.indexes;b<x.length;b++){var v=x[b];f(v.keyPath,0,v)}function p(k){var O,w=k.query.index;return w.isVirtual?o(o({},k),{query:{index:w.lowLevelIndex,range:(O=k.query.range,w=w.keyTail,{type:O.type===1?2:O.type,lower:Un(O.lower,O.lowerOpen?e.MAX_KEY:e.MIN_KEY,w),lowerOpen:!0,upper:Un(O.upper,O.upperOpen?e.MIN_KEY:e.MAX_KEY,w),upperOpen:!0})}}):k}return o(o({},i),{schema:o(o({},a),{primaryKey:h,indexes:l,getIndexByKeyPath:function(k){return(k=u[an(k)])&&k[0]}}),count:function(k){return i.count(p(k))},query:function(k){return i.query(p(k))},openCursor:function(k){var O=k.query.index,w=O.keyTail,g=O.keyLength;return O.isVirtual?i.openCursor(p(k)).then(function(E){return E&&_(E)}):i.openCursor(k);function _(E){return Object.create(E,{continue:{value:function(T){T!=null?E.continue(Un(T,k.reverse?e.MAX_KEY:e.MIN_KEY,w)):k.unique?E.continue(E.key.slice(0,g).concat(k.reverse?e.MIN_KEY:e.MAX_KEY,w)):E.continue()}},continuePrimaryKey:{value:function(T,D){E.continuePrimaryKey(Un(T,e.MAX_KEY,w),D)}},primaryKey:{get:function(){return E.primaryKey}},key:{get:function(){var T=E.key;return g===1?T[0]:T.slice(0,g)}},value:{get:function(){return E.value}}})}}})}})}};function Ur(e,n,i,a){return i=i||{},a=a||"",m(e).forEach(function(u){var l,f,h;K(n,u)?(l=e[u],f=n[u],typeof l=="object"&&typeof f=="object"&&l&&f?(h=hr(l))!==hr(f)?i[a+u]=n[u]:h==="Object"?Ur(l,f,i,a+u+"."):l!==f&&(i[a+u]=n[u]):l!==f&&(i[a+u]=n[u])):i[a+u]=void 0}),m(n).forEach(function(u){K(e,u)||(i[a+u]=n[u])}),i}function Zr(e,n){return n.type==="delete"?n.keys:n.keys||n.values.map(e.extractKey)}var go={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return o(o({},e),{table:function(n){var i=e.table(n),a=i.schema.primaryKey;return o(o({},i),{mutate:function(u){var l=j.trans,f=l.table(n).hook,h=f.deleting,b=f.creating,x=f.updating;switch(u.type){case"add":if(b.fire===ie)break;return l._promise("readwrite",function(){return v(u)},!0);case"put":if(b.fire===ie&&x.fire===ie)break;return l._promise("readwrite",function(){return v(u)},!0);case"delete":if(h.fire===ie)break;return l._promise("readwrite",function(){return v(u)},!0);case"deleteRange":if(h.fire===ie)break;return l._promise("readwrite",function(){return(function p(k,O,w){return i.query({trans:k,values:!1,query:{index:a,range:O},limit:w}).then(function(g){var _=g.result;return v({type:"delete",keys:_,trans:k}).then(function(E){return 0<E.numFailures?Promise.reject(E.failures[0]):_.length<w?{failures:[],numFailures:0,lastResult:void 0}:p(k,o(o({},O),{lower:_[_.length-1],lowerOpen:!0}),w)})})})(u.trans,u.range,1e4)},!0)}return i.mutate(u);function v(p){var k,O,w,g=j.trans,_=p.keys||Zr(a,p);if(_)return(p=p.type==="add"||p.type==="put"?o(o({},p),{keys:_}):o({},p)).type!=="delete"&&(p.values=c([],p.values)),p.keys&&(p.keys=c([],p.keys)),k=i,w=_,((O=p).type==="add"?Promise.resolve([]):k.getMany({trans:O.trans,keys:w,cache:"immutable"})).then(function(E){var T=_.map(function(D,M){var F,A,N,q=E[M],V={onerror:null,onsuccess:null};return p.type==="delete"?h.fire.call(V,D,q,g):p.type==="add"||q===void 0?(F=b.fire.call(V,D,p.values[M],g),D==null&&F!=null&&(p.keys[M]=D=F,a.outbound||ge(p.values[M],a.keyPath,D))):(F=Ur(q,p.values[M]),(A=x.fire.call(V,F,D,q,g))&&(N=p.values[M],Object.keys(A).forEach(function(C){K(N,C)?N[C]=A[C]:ge(N,C,A[C])}))),V});return i.mutate(p).then(function(D){for(var M=D.failures,F=D.results,A=D.numFailures,D=D.lastResult,N=0;N<_.length;++N){var q=(F||_)[N],V=T[N];q==null?V.onerror&&V.onerror(M[N]):V.onsuccess&&V.onsuccess(p.type==="put"&&E[N]?p.values[N]:q)}return{failures:M,results:F,numFailures:A,lastResult:D}}).catch(function(D){return T.forEach(function(M){return M.onerror&&M.onerror(D)}),Promise.reject(D)})});throw new Error("Keys missing")}}})}})}};function ns(e,n,i){try{if(!n||n.keys.length<e.length)return null;for(var a=[],u=0,l=0;u<n.keys.length&&l<e.length;++u)H(n.keys[u],e[l])===0&&(a.push(i?at(n.values[u]):n.values[u]),++l);return a.length===e.length?a:null}catch{return null}}var vo={stack:"dbcore",level:-1,create:function(e){return{table:function(n){var i=e.table(n);return o(o({},i),{getMany:function(a){var u;return a.cache?(u=ns(a.keys,a.trans._cache,a.cache==="clone"))?R.resolve(u):i.getMany(a).then(function(l){return a.trans._cache={keys:a.keys,values:a.cache==="clone"?at(l):l},l}):i.getMany(a)},mutate:function(a){return a.type!=="add"&&(a.trans._cache=null),i.mutate(a)}})}}}};function rs(e,n){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!n.schema.primaryKey.outbound}function is(e,n){switch(e){case"query":return n.values&&!n.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var wo={stack:"dbcore",level:0,name:"Observability",create:function(e){var n=e.schema.name,i=new ve(e.MIN_KEY,e.MAX_KEY);return o(o({},e),{transaction:function(a,u,l){if(j.subscr&&u!=="readonly")throw new $.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(j.querier));return e.transaction(a,u,l)},table:function(a){function u(_){var g,_=_.query;return[g=_.index,new ve((g=(_=_.range).lower)!=null?g:e.MIN_KEY,(g=_.upper)!=null?g:e.MAX_KEY)]}var l=e.table(a),f=l.schema,h=f.primaryKey,b=f.indexes,x=h.extractKey,v=h.outbound,p=h.autoIncrement&&b.filter(function(w){return w.compound&&w.keyPath.includes(h.keyPath)}),k=o(o({},l),{mutate:function(w){function g(W){return W="idb://".concat(n,"/").concat(a,"/").concat(W),M[W]||(M[W]=new ve)}var _,E,T,D=w.trans,M=w.mutatedParts||(w.mutatedParts={}),F=g(""),A=g(":dels"),N=w.type,V=w.type==="deleteRange"?[w.range]:w.type==="delete"?[w.keys]:w.values.length<50?[Zr(h,w).filter(function(W){return W}),w.values]:[],q=V[0],V=V[1],C=w.trans._cache;return y(q)?(F.addKeys(q),(N=N==="delete"||q.length===V.length?ns(q,C):null)||A.addKeys(q),(N||V)&&(_=g,E=N,T=V,f.indexes.forEach(function(W){var J=_(W.name||"");function ee(Y){return Y!=null?W.extractKey(Y):null}function U(Y){W.multiEntry&&y(Y)?Y.forEach(function(oe){return J.addKey(oe)}):J.addKey(Y)}(E||T).forEach(function(Y,ue){var _e=E&&ee(E[ue]),ue=T&&ee(T[ue]);H(_e,ue)!==0&&(_e!=null&&U(_e),ue!=null)&&U(ue)})}))):q?(V={from:(C=q.lower)!=null?C:e.MIN_KEY,to:(N=q.upper)!=null?N:e.MAX_KEY},A.add(V),F.add(V)):(F.add(i),A.add(i),f.indexes.forEach(function(W){return g(W.name).add(i)})),l.mutate(w).then(function(W){return!q||w.type!=="add"&&w.type!=="put"||(F.addKeys(W.results),p&&p.forEach(function(J){for(var ee=w.values.map(function(_e){return J.extractKey(_e)}),U=J.keyPath.findIndex(function(_e){return _e===h.keyPath}),Y=0,oe=W.results.length;Y<oe;++Y)ee[Y][U]=W.results[Y];g(J.name).addKeys(ee)})),D.mutatedParts=$n(D.mutatedParts||{},M),W})}}),O={get:function(w){return[h,new ve(w.key)]},getMany:function(w){return[h,new ve().addKeys(w.keys)]},count:u,query:u,openCursor:u};return m(O).forEach(function(w){k[w]=function(g){var _=j.subscr,E=!!_,T=rs(j,l)&&is(w,g)?g.obsSet={}:_;if(E){var D,_=function(V){return V="idb://".concat(n,"/").concat(a,"/").concat(V),T[V]||(T[V]=new ve)},M=_(""),F=_(":dels"),E=O[w](g),A=E[0],E=E[1];if((w==="query"&&A.isPrimaryKey&&!g.values?F:_(A.name||"")).add(E),!A.isPrimaryKey){if(w!=="count")return D=w==="query"&&v&&g.values&&l.query(o(o({},g),{values:!1})),l[w].apply(this,arguments).then(function(V){if(w==="query"){if(v&&g.values)return D.then(function(ee){return ee=ee.result,M.addKeys(ee),V});var C=g.values?V.result.map(x):V.result;(g.values?M:F).addKeys(C)}else{var W,J;if(w==="openCursor")return J=g.values,(W=V)&&Object.create(W,{key:{get:function(){return F.addKey(W.primaryKey),W.key}},primaryKey:{get:function(){var ee=W.primaryKey;return F.addKey(ee),ee}},value:{get:function(){return J&&M.addKey(W.primaryKey),W.value}}})}return V});F.add(i)}}return l[w].apply(this,arguments)}}),k}})}};function ss(e,n,i){var a;return i.numFailures===0?n:n.type==="deleteRange"||(a=n.keys?n.keys.length:"values"in n&&n.values?n.values.length:1,i.numFailures===a)?null:(a=o({},n),y(a.keys)&&(a.keys=a.keys.filter(function(u,l){return!(l in i.failures)})),"values"in a&&y(a.values)&&(a.values=a.values.filter(function(u,l){return!(l in i.failures)})),a)}function zr(e,n){return i=e,((a=n).lower===void 0||(a.lowerOpen?0<H(i,a.lower):0<=H(i,a.lower)))&&(i=e,(a=n).upper===void 0||(a.upperOpen?H(i,a.upper)<0:H(i,a.upper)<=0));var i,a}function as(e,n,i,a,u,l){var f,h,b,x,v,p;return!i||i.length===0||(f=n.query.index,h=f.multiEntry,b=n.query.range,x=a.schema.primaryKey.extractKey,v=f.extractKey,p=(f.lowLevelIndex||f).extractKey,(a=i.reduce(function(k,O){var w=k,g=[];if(O.type==="add"||O.type==="put")for(var _=new ve,E=O.values.length-1;0<=E;--E){var T,D=O.values[E],M=x(D);!_.hasKey(M)&&(T=v(D),h&&y(T)?T.some(function(V){return zr(V,b)}):zr(T,b))&&(_.addKey(M),g.push(D))}switch(O.type){case"add":var F=new ve().addKeys(n.values?k.map(function(C){return x(C)}):k),w=k.concat(n.values?g.filter(function(C){return C=x(C),!F.hasKey(C)&&(F.addKey(C),!0)}):g.map(function(C){return x(C)}).filter(function(C){return!F.hasKey(C)&&(F.addKey(C),!0)}));break;case"put":var A=new ve().addKeys(O.values.map(function(C){return x(C)}));w=k.filter(function(C){return!A.hasKey(n.values?x(C):C)}).concat(n.values?g:g.map(function(C){return x(C)}));break;case"delete":var N=new ve().addKeys(O.keys);w=k.filter(function(C){return!N.hasKey(n.values?x(C):C)});break;case"deleteRange":var q=O.range;w=k.filter(function(C){return!zr(x(C),q)})}return w},e))===e)?e:(a.sort(function(k,O){return H(p(k),p(O))||H(x(k),x(O))}),n.limit&&n.limit<1/0&&(a.length>n.limit?a.length=n.limit:e.length===n.limit&&a.length<n.limit&&(u.dirty=!0)),l?Object.freeze(a):a)}function os(e,n){return H(e.lower,n.lower)===0&&H(e.upper,n.upper)===0&&!!e.lowerOpen==!!n.lowerOpen&&!!e.upperOpen==!!n.upperOpen}function bo(e,n){return((i,a,u,l)=>{if(i===void 0)return a!==void 0?-1:0;if(a===void 0)return 1;if((i=H(i,a))===0){if(u&&l)return 0;if(u)return 1;if(l)return-1}return i})(e.lower,n.lower,e.lowerOpen,n.lowerOpen)<=0&&0<=((i,a,u,l)=>{if(i===void 0)return a!==void 0?1:0;if(a===void 0)return-1;if((i=H(i,a))===0){if(u&&l)return 0;if(u)return-1;if(l)return 1}return i})(e.upper,n.upper,e.upperOpen,n.upperOpen)}function ko(e,n,i,a){e.subscribers.add(i),a.addEventListener("abort",function(){var u,l;e.subscribers.delete(i),e.subscribers.size===0&&(u=e,l=n,setTimeout(function(){u.subscribers.size===0&&ot(l,u)},3e3))})}var Oo={stack:"dbcore",level:0,name:"Cache",create:function(e){var n=e.schema.name;return o(o({},e),{transaction:function(i,a,u){var l,f,h=e.transaction(i,a,u);return a==="readwrite"&&(u=(l=new AbortController).signal,h.addEventListener("abort",(f=function(b){return function(){if(l.abort(),a==="readwrite"){for(var x=new Set,v=0,p=i;v<p.length;v++){var k=p[v],O=yt["idb://".concat(n,"/").concat(k)];if(O){var w=e.table(k),g=O.optimisticOps.filter(function(W){return W.trans===h});if(h._explicit&&b&&h.mutatedParts)for(var _=0,E=Object.values(O.queries.query);_<E.length;_++)for(var T=0,D=(A=E[_]).slice();T<D.length;T++)Wr((N=D[T]).obsSet,h.mutatedParts)&&(ot(A,N),N.subscribers.forEach(function(W){return x.add(W)}));else if(0<g.length){O.optimisticOps=O.optimisticOps.filter(function(W){return W.trans!==h});for(var M=0,F=Object.values(O.queries.query);M<F.length;M++)for(var A,N,q,V=0,C=(A=F[M]).slice();V<C.length;V++)(N=C[V]).res!=null&&h.mutatedParts&&(b&&!N.dirty?(q=Object.isFrozen(N.res),q=as(N.res,N.req,g,w,N,q),N.dirty?(ot(A,N),N.subscribers.forEach(function(W){return x.add(W)})):q!==N.res&&(N.res=q,N.promise=R.resolve({result:q}))):(N.dirty&&ot(A,N),N.subscribers.forEach(function(W){return x.add(W)})))}}}x.forEach(function(W){return W()})}}})(!1),{signal:u}),h.addEventListener("error",f(!1),{signal:u}),h.addEventListener("complete",f(!0),{signal:u})),h},table:function(i){var a=e.table(i),u=a.schema.primaryKey;return o(o({},a),{mutate:function(l){var f,h=j.trans;return!u.outbound&&h.db._options.cache!=="disabled"&&!h.explicit&&h.idbtrans.mode==="readwrite"&&(f=yt["idb://".concat(n,"/").concat(i)])?(h=a.mutate(l),l.type!=="add"&&l.type!=="put"||!(50<=l.values.length||Zr(u,l).some(function(b){return b==null}))?(f.optimisticOps.push(l),l.mutatedParts&&Bn(l.mutatedParts),h.then(function(b){0<b.numFailures&&(ot(f.optimisticOps,l),(b=ss(0,l,b))&&f.optimisticOps.push(b),l.mutatedParts)&&Bn(l.mutatedParts)}),h.catch(function(){ot(f.optimisticOps,l),l.mutatedParts&&Bn(l.mutatedParts)})):h.then(function(b){var x=ss(0,o(o({},l),{values:l.values.map(function(v,p){var k;return b.failures[p]?v:(ge(k=(k=u.keyPath)!=null&&k.includes(".")?at(v):o({},v),u.keyPath,b.results[p]),k)})}),b);f.optimisticOps.push(x),queueMicrotask(function(){return l.mutatedParts&&Bn(l.mutatedParts)})}),h):a.mutate(l)},query:function(l){var f,h,b,x,v,p,k;return rs(j,a)&&is("query",l)?(f=((b=j.trans)==null?void 0:b.db._options.cache)==="immutable",h=(b=j).requery,b=b.signal,p=((O,w,g,_)=>{var E=yt["idb://".concat(O,"/").concat(w)];if(!E)return[];if(!(O=E.queries[g]))return[null,!1,E,null];var T=O[(_.query?_.query.index.name:null)||""];if(!T)return[null,!1,E,null];switch(g){case"query":var D=T.find(function(M){return M.req.limit===_.limit&&M.req.values===_.values&&os(M.req.query.range,_.query.range)});return D?[D,!0,E,T]:[T.find(function(M){return("limit"in M.req?M.req.limit:1/0)>=_.limit&&(!_.values||M.req.values)&&bo(M.req.query.range,_.query.range)}),!1,E,T];case"count":return D=T.find(function(M){return os(M.req.query.range,_.query.range)}),[D,!!D,E,T]}})(n,i,"query",l),k=p[0],x=p[2],v=p[3],k&&p[1]?k.obsSet=l.obsSet:(p=a.query(l).then(function(O){var w=O.result;if(k&&(k.res=w),f){for(var g=0,_=w.length;g<_;++g)Object.freeze(w[g]);Object.freeze(w)}else O.result=at(w);return O}).catch(function(O){return v&&k&&ot(v,k),Promise.reject(O)}),k={obsSet:l.obsSet,promise:p,subscribers:new Set,type:"query",req:l,dirty:!1},v?v.push(k):(v=[k],(x=x||(yt["idb://".concat(n,"/").concat(i)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[l.query.index.name||""]=v)),ko(k,v,h,b),k.promise.then(function(O){return{result:as(O.result,l,x==null?void 0:x.optimisticOps,a,k,f)}})):a.query(l)}})}})}};function Zn(e,n){return new Proxy(e,{get:function(i,a,u){return a==="db"?n:Reflect.get(i,a,u)}})}he.prototype.version=function(e){if(isNaN(e)||e<.1)throw new $.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new $.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var n=this._versions,i=n.filter(function(a){return a._cfg.version===e})[0];return i||(i=new this.Version(e),n.push(i),n.sort(co),i.stores({}),this._state.autoSchema=!1),i},he.prototype._whenReady=function(e){var n=this;return this.idbdb&&(this._state.openComplete||j.letThrough||this._vip)?e():new R(function(i,a){if(n._state.openComplete)return a(new $.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._state.autoOpen)return void a(new $.DatabaseClosed);n.open().catch(ie)}n._state.dbReadyPromise.then(i,a)}).then(e)},he.prototype.use=function(u){var n=u.stack,i=u.create,a=u.level,u=u.name,l=(u&&this.unuse({stack:n,name:u}),this._middlewares[n]||(this._middlewares[n]=[]));return l.push({stack:n,create:i,level:a??10,name:u}),l.sort(function(f,h){return f.level-h.level}),this},he.prototype.unuse=function(e){var n=e.stack,i=e.name,a=e.create;return n&&this._middlewares[n]&&(this._middlewares[n]=this._middlewares[n].filter(function(u){return a?u.create!==a:!!i&&u.name!==i})),this},he.prototype.open=function(){var e=this;return ht(ze,function(){return yo(e)})},he.prototype._close=function(){this.on.close.fire(new CustomEvent("close"));var e=this._state,n=Dt.indexOf(this);if(0<=n&&Dt.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new R(function(i){e.dbReadyResolve=i}),e.openCanceller=new R(function(i,a){e.cancelOpen=a}))},he.prototype.close=function(n){var n=(n===void 0?{disableAutoOpen:!0}:n).disableAutoOpen,i=this._state;n?(i.isBeingOpened&&i.cancelOpen(new $.DatabaseClosed),this._close(),i.autoOpen=!1,i.dbOpenError=new $.DatabaseClosed):(this._close(),i.autoOpen=this._options.autoOpen||i.isBeingOpened,i.openComplete=!1,i.dbOpenError=null)},he.prototype.delete=function(e){var n=this,i=(e===void 0&&(e={disableAutoOpen:!0}),0<arguments.length&&typeof arguments[0]!="object"),a=this._state;return new R(function(u,l){function f(){n.close(e);var h=n._deps.indexedDB.deleteDatabase(n.name);h.onsuccess=ae(function(){var b,x,v;b=n._deps,x=n.name,Vr(v=b.indexedDB)||x===Nn||Rr(v,b.IDBKeyRange).delete(x).catch(ie),u()}),h.onerror=Ve(l),h.onblocked=n._fireOnBlocked}if(i)throw new $.InvalidArgument("Invalid closeOptions argument to db.delete()");a.isBeingOpened?a.dbReadyPromise.then(f):f()})},he.prototype.backendDB=function(){return this.idbdb},he.prototype.isOpen=function(){return this.idbdb!==null},he.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},he.prototype.hasFailed=function(){return this._state.dbOpenError!==null},he.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(he.prototype,"tables",{get:function(){var e=this;return m(this._allTables).map(function(n){return e._allTables[n]})},enumerable:!1,configurable:!0}),he.prototype.transaction=function(){var e=(function(n,i,a){var u=arguments.length;if(u<2)throw new $.InvalidArgument("Too few arguments");for(var l=new Array(u-1);--u;)l[u-1]=arguments[u];return a=l.pop(),[n,Ze(l),a]}).apply(this,arguments);return this._transaction.apply(this,e)},he.prototype._transaction=function(e,n,i){var a,u,l=this,f=j.trans,h=(f&&f.db===this&&e.indexOf("!")===-1||(f=null),e.indexOf("?")!==-1);e=e.replace("!","").replace("?","");try{if(u=n.map(function(x){if(x=x instanceof l.Table?x.name:x,typeof x!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return x}),e=="r"||e===xr)a=xr;else{if(e!="rw"&&e!=_r)throw new $.InvalidArgument("Invalid transaction mode: "+e);a=_r}if(f){if(f.mode===xr&&a===_r){if(!h)throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");f=null}f&&u.forEach(function(x){if(f&&f.storeNames.indexOf(x)===-1){if(!h)throw new $.SubTransaction("Table "+x+" not included in parent transaction.");f=null}}),h&&f&&!f.active&&(f=null)}}catch(x){return f?f._promise(null,function(v,p){p(x)}):fe(x)}var b=(function x(v,p,k,O,w){return R.resolve().then(function(){var T=j.transless||j,g=v._createTransaction(p,k,v._dbSchema,O),T=(g.explicit=!0,{trans:g,transless:T});if(O)g.idbtrans=O.idbtrans;else try{g.create(),g.idbtrans._explicit=!0,v._state.PR1398_maxLoop=3}catch(D){return D.name===yr.InvalidState&&v.isOpen()&&0<--v._state.PR1398_maxLoop?(v.close({disableAutoOpen:!1}),v.open().then(function(){return x(v,p,k,null,w)})):fe(D)}var _,E=mr(w),T=(E&&Et(),R.follow(function(){var D;(_=w.call(g,g))&&(E?(D=He.bind(null,null),_.then(D,D)):typeof _.next=="function"&&typeof _.throw=="function"&&(_=Br(_)))},T));return(_&&typeof _.then=="function"?R.resolve(_).then(function(D){return g.active?D:fe(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):T.then(function(){return _})).then(function(D){return O&&g._resolve(),g._completion.then(function(){return D})}).catch(function(D){return g._reject(D),fe(D)})})}).bind(null,this,a,u,f,i);return f?f._promise(a,b,"lock"):j.trans?ht(j.transless,function(){return l._whenReady(b)}):this._whenReady(b)},he.prototype.table=function(e){if(K(this._allTables,e))return this._allTables[e];throw new $.InvalidTable("Table ".concat(e," does not exist"))};var je=he;function he(e,n){var i,a,u,l,f,h=this,b=(this._middlewares={},this.verno=0,he.dependencies),b=(this._options=n=o({addons:he.addons,autoOpen:!0,indexedDB:b.indexedDB,IDBKeyRange:b.IDBKeyRange,cache:"cloned"},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange},n.addons),x=(this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this,{dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ie,dbReadyPromise:null,cancelOpen:ie,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:n.autoOpen}),v=(x.dbReadyPromise=new R(function(p){x.dbReadyResolve=p}),x.openCanceller=new R(function(p,k){x.cancelOpen=k}),this._state=x,this.name=e,this.on=en(this,"populate","blocked","versionchange","close",{ready:[pr,ie]}),this.once=function(p,k){var O=function(){for(var w=[],g=0;g<arguments.length;g++)w[g]=arguments[g];h.on(p).unsubscribe(O),k.apply(h,w)};return h.on(p,O)},this.on.ready.subscribe=Ut(this.on.ready.subscribe,function(p){return function(k,O){he.vip(function(){var w,g=h._state;g.openComplete?(g.dbOpenError||R.resolve().then(k),O&&p(k)):g.onReadyBeingFired?(g.onReadyBeingFired.push(k),O&&p(k)):(p(k),w=h,O||p(function _(){w.on.ready.unsubscribe(k),w.on.ready.unsubscribe(_)}))})}}),this.Collection=(i=this,tn(ro.prototype,function(_,g){this.db=i;var O=Ri,w=null;if(g)try{O=g()}catch(T){w=T}var g=_._ctx,_=g.table,E=_.hook.reading.fire;this._ctx={table:_,index:g.index,isPrimKey:!g.index||_.schema.primKey.keyPath&&g.index===_.schema.primKey.name,range:O,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:w,or:g.or,valueMapper:E!==Yt?E:null}})),this.Table=(a=this,tn(ji.prototype,function(p,k,O){this.db=a,this._tx=O,this.name=p,this.schema=k,this.hook=a._allTables[p]?a._allTables[p].hook:en(null,{creating:[Ya,ie],reading:[za,Yt],updating:[Ga,ie],deleting:[Ha,ie]})})),this.Transaction=(u=this,tn(ao.prototype,function(p,k,O,w,g){var _=this;p!=="readonly"&&k.forEach(function(E){E=(E=O[E])==null?void 0:E.yProps,E&&(k=k.concat(E.map(function(T){return T.updatesTable})))}),this.db=u,this.mode=p,this.storeNames=k,this.schema=O,this.chromeTransactionDurability=w,this.idbtrans=null,this.on=en(this,"complete","error","abort"),this.parent=g||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new R(function(E,T){_._resolve=E,_._reject=T}),this._completion.then(function(){_.active=!1,_.on.complete.fire()},function(E){var T=_.active;return _.active=!1,_.on.error.fire(E),_.parent?_.parent._reject(E):T&&_.idbtrans&&_.idbtrans.abort(),fe(E)})})),this.Version=(l=this,tn(mo.prototype,function(p){this.db=l,this._cfg={version:p,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(f=this,tn(zi.prototype,function(p,k,O){if(this.db=f,this._ctx={table:p,index:k===":id"?null:k,or:O},this._cmp=this._ascending=H,this._descending=function(w,g){return H(g,w)},this._max=function(w,g){return 0<H(w,g)?w:g},this._min=function(w,g){return H(w,g)<0?w:g},this._IDBKeyRange=f._deps.IDBKeyRange,!this._IDBKeyRange)throw new $.MissingAPI})),this.on("versionchange",function(p){0<p.newVersion,h.close({disableAutoOpen:!1})}),this.on("blocked",function(p){!p.newVersion||p.newVersion<p.oldVersion}),this._maxKey=sn(n.IDBKeyRange),this._createTransaction=function(p,k,O,w){return new h.Transaction(p,k,O,h._options.chromeTransactionDurability,w)},this._fireOnBlocked=function(p){h.on("blocked").fire(p),Dt.filter(function(k){return k.name===h.name&&k!==h&&!k._state.vcFired}).map(function(k){return k.on("versionchange").fire(p)})},this.use(vo),this.use(Oo),this.use(wo),this.use(po),this.use(go),new Proxy(this,{get:function(p,k,O){var w;return k==="_vip"||(k==="table"?function(g){return Zn(h.table(g),v)}:(w=Reflect.get(p,k,O))instanceof ji?Zn(w,v):k==="tables"?w.map(function(g){return Zn(g,v)}):k==="_createTransaction"?function(){return Zn(w.apply(this,arguments),v)}:w)}}));this.vip=v,b.forEach(function(p){return p(h)})}var zn,Ct=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",So=(Yr.prototype.subscribe=function(e,n,i){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:n,complete:i})},Yr.prototype[Ct]=function(){return this},Yr);function Yr(e){this._subscribe=e}try{zn={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{zn={indexedDB:null,IDBKeyRange:null}}function us(e){var n,i=!1,a=new So(function(u){var l=mr(e),f,h=!1,b={},x={},v={get closed(){return h},unsubscribe:function(){h||(h=!0,f&&f.abort(),p&&Qe.storagemutated.unsubscribe(O))}},p=(u.start&&u.start(v),!1),k=function(){return Tr(w)},O=function(g){$n(b,g),Wr(x,b)&&k()},w=function(){var g,_,E;!h&&zn.indexedDB&&(b={},g={},f&&f.abort(),f=new AbortController,E=(T=>{var D=xt();try{l&&Et();var M=Ye(e,T);return M=l?M.finally(He):M}finally{D&&_t()}})(_={subscr:g,signal:f.signal,requery:k,querier:e,trans:null}),Promise.resolve(E).then(function(T){i=!0,n=T,h||_.signal.aborted||(b={},(D=>{for(var M in D)if(K(D,M))return;return 1})(x=g)||p||(Qe(rn,O),p=!0),Tr(function(){return!h&&u.next&&u.next(T)}))},function(T){i=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||h||Tr(function(){h||u.error&&u.error(T)})}))};return setTimeout(k,0),v});return a.hasValue=function(){return i},a.getValue=function(){return n},a}var pt=je;function Hr(e){var n=Xe;try{Xe=!0,Qe.storagemutated.fire(e),$r(e,!0)}finally{Xe=n}}G(pt,o(o({},We),{delete:function(e){return new pt(e,{addons:[]}).delete()},exists:function(e){return new pt(e,{addons:[]}).open().then(function(n){return n.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return n=pt.dependencies,i=n.indexedDB,n=n.IDBKeyRange,(Vr(i)?Promise.resolve(i.databases()).then(function(a){return a.map(function(u){return u.name}).filter(function(u){return u!==Nn})}):Rr(i,n).toCollection().primaryKeys()).then(e)}catch{return fe(new $.MissingAPI)}var n,i},defineClass:function(){return function(e){S(this,e)}},ignoreTransaction:function(e){return j.trans?ht(j.transless,e):e()},vip:qr,async:function(e){return function(){try{var n=Br(e.apply(this,arguments));return n&&typeof n.then=="function"?n:R.resolve(n)}catch(i){return fe(i)}}},spawn:function(e,n,i){try{var a=Br(e.apply(i,n||[]));return a&&typeof a.then=="function"?a:R.resolve(a)}catch(u){return fe(u)}},currentTransaction:{get:function(){return j.trans||null}},waitFor:function(e,n){return e=R.resolve(typeof e=="function"?pt.ignoreTransaction(e):e).timeout(n||6e4),j.trans?j.trans.waitFor(e):e},Promise:R,debug:{get:function(){return Re},set:function(e){Ii(e)}},derive:me,extend:S,props:G,override:Ut,Events:en,on:Qe,liveQuery:us,extendObservabilitySet:$n,getByKeyPath:Me,setByKeyPath:ge,delByKeyPath:function(e,n){typeof n=="string"?ge(e,n,void 0):"length"in n&&[].map.call(n,function(i){ge(e,i,void 0)})},shallowClone:bn,deepClone:at,getObjectDiff:Ur,cmp:H,asap:Zt,minKey:-1/0,addons:[],connections:Dt,errnames:yr,dependencies:zn,cache:yt,semVer:"4.3.0",version:"4.3.0".split(".").map(function(e){return parseInt(e)}).reduce(function(e,n,i){return e+n/Math.pow(10,2*i)})})),pt.maxKey=sn(pt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Qe(rn,function(e){Xe||(e=new CustomEvent(Ir,{detail:e}),Xe=!0,dispatchEvent(e),Xe=!1)}),addEventListener(Ir,function(e){e=e.detail,Xe||Hr(e)}));var Ft,Xe=!1,ls=function(){};return typeof BroadcastChannel<"u"&&((ls=function(){(Ft=new BroadcastChannel(Ir)).onmessage=function(e){return e.data&&Hr(e.data)}})(),typeof Ft.unref=="function"&&Ft.unref(),Qe(rn,function(e){Xe||Ft.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!je.disableBfCache&&e.persisted){Ft!=null&&Ft.close();for(var n=0,i=Dt;n<i.length;n++)i[n].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!je.disableBfCache&&e.persisted&&(ls(),Hr({all:new ve(-1/0,[[]])}))})),R.rejectionMapper=function(e,n){return!e||e instanceof St||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Di[e.name]?e:(n=new Di[e.name](n||e.message,e),"stack"in e&&re(n,"stack",{get:function(){return this.inner.stack}}),n)},Ii(Re),o(je,Object.freeze({__proto__:null,Dexie:je,Entity:Vi,PropModification:Xt,RangeSet:ve,add:function(e){return new Xt({add:e})}
3,cmp:H,default:je,liveQuery:us,mergeRanges:un,rangesOverlap:Qi,remove:function(e){return new Xt({remove:e})},replacePrefix:function(e,n){return new Xt({replacePrefix:[e,n]})}}),{default:je}),je})})(nr)),nr.exports}var _l=xl();const gi=xo(_l),Ls=Symbol.for("Dexie"),vi=globalThis[Ls]||(globalThis[Ls]=gi);if(gi.semVer!==vi.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${gi.semVer} and ${vi.semVer}`);const{liveQuery:El,mergeRanges:Ml,rangesOverlap:Nl,RangeSet:Cl,cmp:Fl,Entity:Al,PropModification:Pl,replacePrefix:Rl,add:Vl,remove:ql,DexieYProvider:Kl}=vi;function Dl(s,t,r){var o,c;typeof s=="function"?(o=t||[],c=r):(o=[],c=t);var d=ln.useRef({hasResult:!1,result:c,error:null}),m=ln.useReducer(function(I){return I+1},0);m[0];var y=m[1],S=ln.useMemo(function(){var I=typeof s=="function"?s():s;if(!I||typeof I.subscribe!="function")throw s===I?new TypeError("Given argument to useObservable() was neither a valid observable nor a function."):new TypeError("Observable factory given to useObservable() did not return a valid observable.");if(!d.current.hasResult&&typeof window<"u"&&(typeof I.hasValue!="function"||I.hasValue()))if(typeof I.getValue=="function")d.current.result=I.getValue(),d.current.hasResult=!0;else{var L=I.subscribe(function(K){d.current.result=K,d.current.hasResult=!0});typeof L=="function"?L():L.unsubscribe()}return I},o);if(ln.useDebugValue(d.current.result),ln.useEffect(function(){var I=S.subscribe(function(L){var K=d.current;(K.error!==null||K.result!==L)&&(K.error=null,K.result=L,K.hasResult=!0,y())},function(L){var K=d.current;K.error!==L&&(K.error=L,y())});return typeof I=="function"?I:I.unsubscribe.bind(I)},o),d.current.error)throw d.current.error;return d.current.result}function Wl(s,t,r){return Dl(function(){return El(s)},t||[],r)}export{vi as D,ce as S,z as a,Wl as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.