@xwiki/cristal-sharedworker-impl 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/assets/worker-ZwjuRGo7.js +46 -0
- package/dist/assets/worker-ZwjuRGo7.js.map +1 -0
- package/dist/components/defaultQueueWorker.d.ts +1 -1
- package/dist/components/worker.d.ts +1 -1
- package/dist/index.es.js +14 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +12 -12
- package/src/components/componentsInit.ts +2 -2
- package/src/components/defaultQueueWorker.ts +5 -7
- package/src/components/worker.ts +8 -8
- package/src/components/workerCristalApp.ts +1 -1
- package/dist/assets/worker-DhHDiwPg.js +0 -47
- package/dist/assets/worker-DhHDiwPg.js.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
(function(){"use strict";/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/const ca=Symbol("Comlink.proxy"),gu=Symbol("Comlink.endpoint"),vu=Symbol("Comlink.releaseProxy"),Ti=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),la=e=>typeof e=="object"&&e!==null||typeof e=="function",yu={canHandle:e=>la(e)&&e[ca],serialize(e){const{port1:t,port2:n}=new MessageChannel;return Di(e,t),[n,[n]]},deserialize(e){return e.start(),wu(e)}},mu={canHandle:e=>la(e)&&sr in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},fa=new Map([["proxy",yu],["throw",mu]]);function bu(e,t){for(const n of e)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function Di(e,t=globalThis,n=["*"]){t.addEventListener("message",function i(a){if(!a||!a.data)return;if(!bu(n,a.origin)){console.warn(`Invalid origin '${a.origin}' for comlink proxy`);return}const{id:s,type:f,path:d}=Object.assign({path:[]},a.data),y=(a.data.argumentList||[]).map(qt);let g;try{const T=d.slice(0,-1).reduce((L,z)=>L[z],e),E=d.reduce((L,z)=>L[z],e);switch(f){case"GET":g=E;break;case"SET":T[d.slice(-1)[0]]=qt(a.data.value),g=!0;break;case"APPLY":g=E.apply(T,y);break;case"CONSTRUCT":{const L=new E(...y);g=Au(L)}break;case"ENDPOINT":{const{port1:L,port2:z}=new MessageChannel;Di(e,z),g=xu(L,[L])}break;case"RELEASE":g=void 0;break;default:return}}catch(T){g={value:T,[sr]:0}}Promise.resolve(g).catch(T=>({value:T,[sr]:0})).then(T=>{const[E,L]=fr(T);t.postMessage(Object.assign(Object.assign({},E),{id:s}),L),f==="RELEASE"&&(t.removeEventListener("message",i),ha(t),Ti in e&&typeof e[Ti]=="function"&&e[Ti]())}).catch(T=>{const[E,L]=fr({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},E),{id:s}),L)})}),t.start&&t.start()}function _u(e){return e.constructor.name==="MessagePort"}function ha(e){_u(e)&&e.close()}function wu(e,t){return Ii(e,[],t)}function ur(e){if(e)throw new Error("Proxy has been released and is not useable")}function da(e){return hn(e,{type:"RELEASE"}).then(()=>{ha(e)})}const cr=new WeakMap,lr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(cr.get(e)||0)-1;cr.set(e,t),t===0&&da(e)});function Eu(e,t){const n=(cr.get(t)||0)+1;cr.set(t,n),lr&&lr.register(e,t,e)}function Su(e){lr&&lr.unregister(e)}function Ii(e,t=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,f){if(ur(i),f===vu)return()=>{Su(a),da(e),i=!0};if(f==="then"){if(t.length===0)return{then:()=>a};const d=hn(e,{type:"GET",path:t.map(y=>y.toString())}).then(qt);return d.then.bind(d)}return Ii(e,[...t,f])},set(s,f,d){ur(i);const[y,g]=fr(d);return hn(e,{type:"SET",path:[...t,f].map(T=>T.toString()),value:y},g).then(qt)},apply(s,f,d){ur(i);const y=t[t.length-1];if(y===gu)return hn(e,{type:"ENDPOINT"}).then(qt);if(y==="bind")return Ii(e,t.slice(0,-1));const[g,T]=pa(d);return hn(e,{type:"APPLY",path:t.map(E=>E.toString()),argumentList:g},T).then(qt)},construct(s,f){ur(i);const[d,y]=pa(f);return hn(e,{type:"CONSTRUCT",path:t.map(g=>g.toString()),argumentList:d},y).then(qt)}});return Eu(a,e),a}function Ou(e){return Array.prototype.concat.apply([],e)}function pa(e){const t=e.map(fr);return[t.map(n=>n[0]),Ou(t.map(n=>n[1]))]}const ga=new WeakMap;function xu(e,t){return ga.set(e,t),e}function Au(e){return Object.assign(e,{[ca]:!0})}function fr(e){for(const[t,n]of fa)if(n.canHandle(e)){const[i,a]=n.serialize(e);return[{type:"HANDLER",name:t,value:i},a]}return[{type:"RAW",value:e},ga.get(e)||[]]}function qt(e){switch(e.type){case"HANDLER":return fa.get(e.name).deserialize(e.value);case"RAW":return e.value}}function hn(e,t,n){return new Promise(i=>{const a=Cu();e.addEventListener("message",function s(f){!f.data||!f.data.id||f.data.id!==a||(e.removeEventListener("message",s),i(f.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:a},t),n)})}function Cu(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Ge="named",va="name",hr="unmanaged",Ni="optional",dr="inject",Dn="multi_inject",ya="inversify:tagged",ma="inversify:tagged_props",Ri="inversify:paramtypes",Pu="design:paramtypes",ba="post_construct",Mi="pre_destroy";function Tu(){return[dr,Dn,va,hr,Ge,Ni]}var _a=Tu(),Se={Request:"Request",Singleton:"Singleton",Transient:"Transient"},ge={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},In={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},Du=0;function Nn(){return Du++}var Iu=function(){function e(t,n){this.id=Nn(),this.activated=!1,this.serviceIdentifier=t,this.scope=n,this.type=ge.Invalid,this.constraint=function(i){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===Se.Singleton?this.activated:!1,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.onDeactivation=this.onDeactivation,t.cache=this.cache,t},e}(),Nu="Cannot apply @injectable decorator multiple times.",wa="Metadata key was used more than once in a parameter:",Rn="NULL argument",Ea="Key Not Found",Ru="Ambiguous match found for serviceIdentifier:",Mu="Could not unbind serviceIdentifier:",ku="No matching bindings found for serviceIdentifier:",Sa="Missing required @injectable annotation in:",ju="Missing required @inject or @multiInject annotation in:",Lu=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."},Fu="Circular dependency found:",Bu="Invalid binding type:",Vu="No snapshot available to restore.",$u="Invalid return type in middleware. Middleware must return!",Ku="Value provided to function binding must be a function!",Wu=function(e){return"You are attempting to construct '"+e+`' in a synchronous way
|
|
6
|
-
but it has asynchronous dependencies.`},Uu="The toSelf function can only be applied when a constructor is used as service identifier",Oa="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",qu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+(e[0]+" must be >= than the number of constructor arguments of its base class.")},Hu="Invalid Container constructor argument. Container options must be an object.",zu='Invalid Container option. Default scope must be a string ("singleton" or "transient").',Gu="Invalid Container option. Auto bind injectable must be a boolean",Yu="Invalid Container option. Skip base check must be a boolean",Qu="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)",Ju=function(e,t){return"@postConstruct error in class "+e+": "+t},Xu=function(e,t){return"@preDestroy error in class "+e+": "+t},ki=function(e,t){return"onDeactivation() error in class "+e+": "+t},Zu=function(e,t){return"It looks like there is a circular dependency in one of the '"+e+"' bindings. Please investigate bindings with "+("service identifier '"+t+"'.")},ec="Maximum call stack size exceeded",tc=function(){function e(){}return e.prototype.getConstructorMetadata=function(t){var n=Reflect.getMetadata(Ri,t),i=Reflect.getMetadata(ya,t);return{compilerGeneratedMetadata:n,userGeneratedMetadata:i||{}}},e.prototype.getPropertiesMetadata=function(t){var n=Reflect.getMetadata(ma,t)||[];return n},e}(),pr={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};function xa(e){return e instanceof RangeError||e.message===ec}var nc=function(e,t){try{return e()}catch(n){throw xa(n)&&(n=t()),n}};function Mn(e){if(typeof e=="function"){var t=e;return t.name}else{if(typeof e=="symbol")return e.toString();var t=e;return t}}function Aa(e,t,n){var i="",a=n(e,t);return a.length!==0&&(i=`
|
|
7
|
-
Registered bindings:`,a.forEach(function(s){var f="Object";s.implementationType!==null&&(f=gr(s.implementationType)),i=i+`
|
|
8
|
-
`+f,s.constraint.metaData&&(i=i+" - "+s.constraint.metaData)})),i}function Ca(e,t){return e.parentRequest===null?!1:e.parentRequest.serviceIdentifier===t?!0:Ca(e.parentRequest,t)}function rc(e){function t(i,a){a===void 0&&(a=[]);var s=Mn(i.serviceIdentifier);return a.push(s),i.parentRequest!==null?t(i.parentRequest,a):a}var n=t(e);return n.reverse().join(" --> ")}function Pa(e){e.childRequests.forEach(function(t){if(Ca(t,t.serviceIdentifier)){var n=rc(t);throw new Error(Fu+" "+n)}else Pa(t)})}function ic(e,t){if(t.isTagged()||t.isNamed()){var n="",i=t.getNamedTag(),a=t.getCustomTags();return i!==null&&(n+=i.toString()+`
|
|
9
|
-
`),a!==null&&a.forEach(function(s){n+=s.toString()+`
|
|
10
|
-
`})," "+e+`
|
|
11
|
-
`+e+" - "+n}else return" "+e}function gr(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}function oc(e){return e.toString().slice(7,-1)}var Ta=function(){function e(t){this.id=Nn(),this.container=t}return e.prototype.addPlan=function(t){this.plan=t},e.prototype.setCurrentRequest=function(t){this.currentRequest=t},e}(),pt=function(){function e(t,n){this.key=t,this.value=n}return e.prototype.toString=function(){return this.key===Ge?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},e}(),ac=function(){function e(t,n){this.parentContext=t,this.rootRequest=n}return e}(),sc=function(){function e(t){this._cb=t}return e.prototype.unwrap=function(){return this._cb()},e}(),uc=function(){function e(t){this.str=t}return e.prototype.startsWith=function(t){return this.str.indexOf(t)===0},e.prototype.endsWith=function(t){var n="",i=t.split("").reverse().join("");return n=this.str.split("").reverse().join(""),this.startsWith.call({str:n},i)},e.prototype.contains=function(t){return this.str.indexOf(t)!==-1},e.prototype.equals=function(t){return this.str===t},e.prototype.value=function(){return this.str},e}(),vr=function(){function e(t,n,i,a){this.id=Nn(),this.type=t,this.serviceIdentifier=i;var s=typeof n=="symbol"?oc(n):n;this.name=new uc(s||""),this.identifier=n,this.metadata=new Array;var f=null;typeof a=="string"?f=new pt(Ge,a):a instanceof pt&&(f=a),f!==null&&this.metadata.push(f)}return e.prototype.hasTag=function(t){for(var n=0,i=this.metadata;n<i.length;n++){var a=i[n];if(a.key===t)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(Dn)},e.prototype.matchesArray=function(t){return this.matchesTag(Dn)(t)},e.prototype.isNamed=function(){return this.hasTag(Ge)},e.prototype.isTagged=function(){return this.metadata.some(function(t){return _a.every(function(n){return t.key!==n})})},e.prototype.isOptional=function(){return this.matchesTag(Ni)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(t){return t.key===Ge})[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(t){return _a.every(function(n){return t.key!==n})}):null},e.prototype.matchesNamedTag=function(t){return this.matchesTag(Ge)(t)},e.prototype.matchesTag=function(t){var n=this;return function(i){for(var a=0,s=n.metadata;a<s.length;a++){var f=s[a];if(f.key===t&&f.value===i)return!0}return!1}},e}(),yr=function(e,t,n){if(n||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))};function cc(e,t){var n=gr(t);return Da(e,n,t,!1)}function Da(e,t,n,i){var a=e.getConstructorMetadata(n),s=a.compilerGeneratedMetadata;if(s===void 0){var f=Sa+" "+t+".";throw new Error(f)}var d=a.userGeneratedMetadata,y=Object.keys(d),g=n.length===0&&y.length>0,T=y.length>n.length,E=g||T?y.length:n.length,L=fc(i,t,s,d,E),z=Ia(e,n,t),X=yr(yr([],L,!0),z,!0);return X}function lc(e,t,n,i,a){var s=a[e.toString()]||[],f=Ra(s),d=f.unmanaged!==!0,y=i[e],g=f.inject||f.multiInject;if(y=g||y,y instanceof sc&&(y=y.unwrap()),d){var T=y===Object,E=y===Function,L=y===void 0,z=T||E||L;if(!t&&z){var X=ju+" argument "+e+" in class "+n+".";throw new Error(X)}var le=new vr(In.ConstructorArgument,f.targetName,y);return le.metadata=s,le}return null}function fc(e,t,n,i,a){for(var s=[],f=0;f<a;f++){var d=f,y=lc(d,e,t,n,i);y!==null&&s.push(y)}return s}function hc(e,t,n,i){var a=e||t;if(a===void 0){var s=Sa+" for property "+String(n)+" in class "+i+".";throw new Error(s)}return a}function Ia(e,t,n){for(var i=e.getPropertiesMetadata(t),a=[],s=Object.getOwnPropertySymbols(i),f=Object.keys(i),d=f.concat(s),y=0,g=d;y<g.length;y++){var T=g[y],E=i[T],L=Ra(E),z=L.targetName||T,X=hc(L.inject,L.multiInject,T,n),le=new vr(In.ClassProperty,z,X);le.metadata=E,a.push(le)}var qe=Object.getPrototypeOf(t.prototype).constructor;if(qe!==Object){var Xe=Ia(e,qe,n);a=yr(yr([],a,!0),Xe,!0)}return a}function Na(e,t){var n=Object.getPrototypeOf(t.prototype).constructor;if(n!==Object){var i=gr(n),a=Da(e,i,n,!0),s=a.map(function(y){return y.metadata.filter(function(g){return g.key===hr})}),f=[].concat.apply([],s).length,d=a.length-f;return d>0?d:Na(e,n)}else return 0}function Ra(e){var t={};return e.forEach(function(n){t[n.key.toString()]=n.value}),{inject:t[dr],multiInject:t[Dn],targetName:t[va],unmanaged:t[hr]}}var ji=function(){function e(t,n,i,a,s){this.id=Nn(),this.serviceIdentifier=t,this.parentContext=n,this.parentRequest=i,this.target=s,this.childRequests=[],this.bindings=Array.isArray(a)?a:[a],this.requestScope=i===null?new Map:null}return e.prototype.addChildRequest=function(t,n,i){var a=new e(t,this.parentContext,this,n,i);return this.childRequests.push(a),a},e}();function mr(e){return e._bindingDictionary}function dc(e,t,n,i,a,s){var f=e?Dn:dr,d=new pt(f,n),y=new vr(t,i,n,d);if(a!==void 0){var g=new pt(a,s);y.metadata.push(g)}return y}function Ma(e,t,n,i,a){var s=kn(n.container,a.serviceIdentifier),f=[];return s.length===pr.NoBindingsAvailable&&n.container.options.autoBindInjectable&&typeof a.serviceIdentifier=="function"&&e.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(a.serviceIdentifier).toSelf(),s=kn(n.container,a.serviceIdentifier)),t?f=s:f=s.filter(function(d){var y=new ji(d.serviceIdentifier,n,i,d,a);return d.constraint(y)}),pc(a.serviceIdentifier,f,a,n.container),f}function pc(e,t,n,i){switch(t.length){case pr.NoBindingsAvailable:if(n.isOptional())return t;var a=Mn(e),s=ku;throw s+=ic(a,n),s+=Aa(i,a,kn),new Error(s);case pr.OnlyOneBindingAvailable:return t;case pr.MultipleBindingsAvailable:default:if(n.isArray())return t;var a=Mn(e),s=Ru+" "+a;throw s+=Aa(i,a,kn),new Error(s)}}function ka(e,t,n,i,a,s){var f,d;if(a===null){f=Ma(e,t,i,null,s),d=new ji(n,i,null,f,s);var y=new ac(i,d);i.addPlan(y)}else f=Ma(e,t,i,a,s),d=a.addChildRequest(s.serviceIdentifier,f,s);f.forEach(function(g){var T=null;if(s.isArray())T=d.addChildRequest(g.serviceIdentifier,g,s);else{if(g.cache)return;T=d}if(g.type===ge.Instance&&g.implementationType!==null){var E=cc(e,g.implementationType);if(!i.container.options.skipBaseClassChecks){var L=Na(e,g.implementationType);if(E.length<L){var z=qu(gr(g.implementationType));throw new Error(z)}}E.forEach(function(X){ka(e,!1,X.serviceIdentifier,i,T,X)})}})}function kn(e,t){var n=[],i=mr(e);return i.hasKey(t)?n=i.get(t):e.parent!==null&&(n=kn(e.parent,t)),n}function gc(e,t,n,i,a,s,f,d){d===void 0&&(d=!1);var y=new Ta(t),g=dc(n,i,a,"",s,f);try{return ka(e,d,a,y,null,g),y}catch(T){throw xa(T)&&Pa(y.plan.rootRequest),T}}function vc(e,t,n,i){var a=new vr(In.Variable,"",t,new pt(n,i)),s=new Ta(e),f=new ji(t,s,null,[],a);return f}function Ke(e){var t=typeof e=="object"&&e!==null||typeof e=="function";return t&&typeof e.then=="function"}function ja(e){return Ke(e)?!0:Array.isArray(e)&&e.some(Ke)}var yc=function(e,t,n,i){function a(s){return s instanceof n?s:new n(function(f){f(s)})}return new(n||(n=Promise))(function(s,f){function d(T){try{g(i.next(T))}catch(E){f(E)}}function y(T){try{g(i.throw(T))}catch(E){f(E)}}function g(T){T.done?s(T.value):a(T.value).then(d,y)}g((i=i.apply(e,t||[])).next())})},mc=function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,f;return f={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function d(g){return function(T){return y([g,T])}}function y(g){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=g[0]&2?a.return:g[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,g[1])).done)return s;switch(a=0,s&&(g=[g[0]&2,s.value]),g[0]){case 0:case 1:s=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,a=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!s||g[1]>s[0]&&g[1]<s[3])){n.label=g[1];break}if(g[0]===6&&n.label<s[1]){n.label=s[1],s=g;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(g);break}s[2]&&n.ops.pop(),n.trys.pop();continue}g=t.call(e,n)}catch(T){g=[6,T],a=0}finally{i=s=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},bc=function(e,t){return t.scope===Se.Singleton&&t.activated?t.cache:t.scope===Se.Request&&e.has(t.id)?e.get(t.id):null},_c=function(e,t,n){t.scope===Se.Singleton&&Ec(t,n),t.scope===Se.Request&&wc(e,t,n)},wc=function(e,t,n){e.has(t.id)||e.set(t.id,n)},Ec=function(e,t){e.cache=t,e.activated=!0,Ke(t)&&Sc(e,t)},Sc=function(e,t){return yc(void 0,void 0,void 0,function(){var n,i;return mc(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t];case 1:return n=a.sent(),e.cache=n,[3,3];case 2:throw i=a.sent(),e.cache=null,e.activated=!1,i;case 3:return[2]}})})},jn;(function(e){e.DynamicValue="toDynamicValue",e.Factory="toFactory",e.Provider="toProvider"})(jn||(jn={}));var Oc=function(e){var t=null;switch(e.type){case ge.ConstantValue:case ge.Function:t=e.cache;break;case ge.Constructor:case ge.Instance:t=e.implementationType;break;case ge.DynamicValue:t=e.dynamicValue;break;case ge.Provider:t=e.provider;break;case ge.Factory:t=e.factory;break}if(t===null){var n=Mn(e.serviceIdentifier);throw new Error(Bu+" "+n)}},xc=function(e){switch(e.type){case ge.Factory:return{factory:e.factory,factoryType:jn.Factory};case ge.Provider:return{factory:e.provider,factoryType:jn.Provider};case ge.DynamicValue:return{factory:e.dynamicValue,factoryType:jn.DynamicValue};default:throw new Error("Unexpected factory type "+e.type)}},dn=function(){return dn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},dn.apply(this,arguments)},La=function(e,t,n,i){function a(s){return s instanceof n?s:new n(function(f){f(s)})}return new(n||(n=Promise))(function(s,f){function d(T){try{g(i.next(T))}catch(E){f(E)}}function y(T){try{g(i.throw(T))}catch(E){f(E)}}function g(T){T.done?s(T.value):a(T.value).then(d,y)}g((i=i.apply(e,t||[])).next())})},Fa=function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,f;return f={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function d(g){return function(T){return y([g,T])}}function y(g){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=g[0]&2?a.return:g[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,g[1])).done)return s;switch(a=0,s&&(g=[g[0]&2,s.value]),g[0]){case 0:case 1:s=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,a=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!s||g[1]>s[0]&&g[1]<s[3])){n.label=g[1];break}if(g[0]===6&&n.label<s[1]){n.label=s[1],s=g;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(g);break}s[2]&&n.ops.pop(),n.trys.pop();continue}g=t.call(e,n)}catch(T){g=[6,T],a=0}finally{i=s=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},Ac=function(e,t,n){if(n||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))};function Cc(e,t){return e.reduce(function(n,i){var a=t(i),s=i.target.type;return s===In.ConstructorArgument?n.constructorInjections.push(a):(n.propertyRequests.push(i),n.propertyInjections.push(a)),n.isAsync||(n.isAsync=ja(a)),n},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function Pc(e,t,n){var i;if(t.length>0){var a=Cc(t,n),s=dn(dn({},a),{constr:e});a.isAsync?i=Tc(s):i=Ba(s)}else i=new e;return i}function Ba(e){var t,n=new((t=e.constr).bind.apply(t,Ac([void 0],e.constructorInjections,!1)));return e.propertyRequests.forEach(function(i,a){var s=i.target.identifier,f=e.propertyInjections[a];(!i.target.isOptional()||f!==void 0)&&(n[s]=f)}),n}function Tc(e){return La(this,void 0,void 0,function(){var t,n;return Fa(this,function(i){switch(i.label){case 0:return[4,Va(e.constructorInjections)];case 1:return t=i.sent(),[4,Va(e.propertyInjections)];case 2:return n=i.sent(),[2,Ba(dn(dn({},e),{constructorInjections:t,propertyInjections:n}))]}})})}function Va(e){return La(this,void 0,void 0,function(){var t,n,i,a;return Fa(this,function(s){for(t=[],n=0,i=e;n<i.length;n++)a=i[n],Array.isArray(a)?t.push(Promise.all(a)):t.push(a);return[2,Promise.all(t)]})})}function $a(e,t){var n=Dc(e,t);return Ke(n)?n.then(function(){return t}):t}function Dc(e,t){var n,i;if(Reflect.hasMetadata(ba,e)){var a=Reflect.getMetadata(ba,e);try{return(i=(n=t)[a.value])===null||i===void 0?void 0:i.call(n)}catch(s){if(s instanceof Error)throw new Error(Ju(e.name,s.message))}}}function Ic(e,t){e.scope!==Se.Singleton&&Nc(e,t)}function Nc(e,t){var n="Class cannot be instantiated in "+(e.scope===Se.Request?"request":"transient")+" scope.";if(typeof e.onDeactivation=="function")throw new Error(ki(t.name,n));if(Reflect.hasMetadata(Mi,t))throw new Error(Xu(t.name,n))}function Rc(e,t,n,i){Ic(e,t);var a=Pc(t,n,i);return Ke(a)?a.then(function(s){return $a(t,s)}):$a(t,a)}var Mc=function(e,t,n,i){function a(s){return s instanceof n?s:new n(function(f){f(s)})}return new(n||(n=Promise))(function(s,f){function d(T){try{g(i.next(T))}catch(E){f(E)}}function y(T){try{g(i.throw(T))}catch(E){f(E)}}function g(T){T.done?s(T.value):a(T.value).then(d,y)}g((i=i.apply(e,t||[])).next())})},kc=function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,f;return f={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function d(g){return function(T){return y([g,T])}}function y(g){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=g[0]&2?a.return:g[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,g[1])).done)return s;switch(a=0,s&&(g=[g[0]&2,s.value]),g[0]){case 0:case 1:s=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,a=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!s||g[1]>s[0]&&g[1]<s[3])){n.label=g[1];break}if(g[0]===6&&n.label<s[1]){n.label=s[1],s=g;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(g);break}s[2]&&n.ops.pop(),n.trys.pop();continue}g=t.call(e,n)}catch(T){g=[6,T],a=0}finally{i=s=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},Li=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,i=t.childRequests,a=t.target&&t.target.isArray(),s=!t.parentRequest||!t.parentRequest.target||!t.target||!t.parentRequest.target.matchesArray(t.target.serviceIdentifier);if(a&&s)return i.map(function(d){var y=Li(e);return y(d)});if(t.target.isOptional()&&n.length===0)return;var f=n[0];return Bc(e,t,f)}},jc=function(e,t){var n=xc(e);return nc(function(){return n.factory.bind(e)(t)},function(){return new Error(Zu(n.factoryType,t.currentRequest.serviceIdentifier.toString()))})},Lc=function(e,t,n){var i,a=t.childRequests;switch(Oc(n),n.type){case ge.ConstantValue:case ge.Function:i=n.cache;break;case ge.Constructor:i=n.implementationType;break;case ge.Instance:i=Rc(n,n.implementationType,a,Li(e));break;default:i=jc(n,t.parentContext)}return i},Fc=function(e,t,n){var i=bc(e,t);return i!==null||(i=n(),_c(e,t,i)),i},Bc=function(e,t,n){return Fc(e,n,function(){var i=Lc(e,t,n);return Ke(i)?i=i.then(function(a){return Ka(t,n,a)}):i=Ka(t,n,i),i})};function Ka(e,t,n){var i=Vc(e.parentContext,t,n),a=Wc(e.parentContext.container),s,f=a.next();do{s=f.value;var d=e.parentContext,y=e.serviceIdentifier,g=Kc(s,y);Ke(i)?i=Wa(g,d,i):i=$c(g,d,i),f=a.next()}while(f.done!==!0&&!mr(s).hasKey(e.serviceIdentifier));return i}var Vc=function(e,t,n){var i;return typeof t.onActivation=="function"?i=t.onActivation(e,n):i=n,i},$c=function(e,t,n){for(var i=e.next();!i.done;){if(n=i.value(t,n),Ke(n))return Wa(e,t,n);i=e.next()}return n},Wa=function(e,t,n){return Mc(void 0,void 0,void 0,function(){var i,a;return kc(this,function(s){switch(s.label){case 0:return[4,n];case 1:i=s.sent(),a=e.next(),s.label=2;case 2:return a.done?[3,4]:[4,a.value(t,i)];case 3:return i=s.sent(),a=e.next(),[3,2];case 4:return[2,i]}})})},Kc=function(e,t){var n=e._activations;return n.hasKey(t)?n.get(t).values():[].values()},Wc=function(e){for(var t=[e],n=e.parent;n!==null;)t.push(n),n=n.parent;var i=function(){var s=t.pop();return s!==void 0?{done:!1,value:s}:{done:!0,value:void 0}},a={next:i};return a};function Uc(e){var t=Li(e.plan.rootRequest.requestScope);return t(e.plan.rootRequest)}var bt=function(e,t){var n=e.parentRequest;return n!==null?t(n)?!0:bt(n,t):!1},Ln=function(e){return function(t){var n=function(i){return i!==null&&i.target!==null&&i.target.matchesTag(e)(t)};return n.metaData=new pt(e,t),n}},br=Ln(Ge),Fi=function(e){return function(t){var n=null;if(t!==null)if(n=t.bindings[0],typeof e=="string"){var i=n.serviceIdentifier;return i===e}else{var a=t.bindings[0].implementationType;return e===a}return!1}},_r=function(){function e(t){this._binding=t}return e.prototype.when=function(t){return this._binding.constraint=t,new Ne(this._binding)},e.prototype.whenTargetNamed=function(t){return this._binding.constraint=br(t),new Ne(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(t){if(t===null)return!1;var n=t.target!==null&&!t.target.isNamed()&&!t.target.isTagged();return n},new Ne(this._binding)},e.prototype.whenTargetTagged=function(t,n){return this._binding.constraint=Ln(t)(n),new Ne(this._binding)},e.prototype.whenInjectedInto=function(t){return this._binding.constraint=function(n){return n!==null&&Fi(t)(n.parentRequest)},new Ne(this._binding)},e.prototype.whenParentNamed=function(t){return this._binding.constraint=function(n){return n!==null&&br(t)(n.parentRequest)},new Ne(this._binding)},e.prototype.whenParentTagged=function(t,n){return this._binding.constraint=function(i){return i!==null&&Ln(t)(n)(i.parentRequest)},new Ne(this._binding)},e.prototype.whenAnyAncestorIs=function(t){return this._binding.constraint=function(n){return n!==null&&bt(n,Fi(t))},new Ne(this._binding)},e.prototype.whenNoAncestorIs=function(t){return this._binding.constraint=function(n){return n!==null&&!bt(n,Fi(t))},new Ne(this._binding)},e.prototype.whenAnyAncestorNamed=function(t){return this._binding.constraint=function(n){return n!==null&&bt(n,br(t))},new Ne(this._binding)},e.prototype.whenNoAncestorNamed=function(t){return this._binding.constraint=function(n){return n!==null&&!bt(n,br(t))},new Ne(this._binding)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._binding.constraint=function(i){return i!==null&&bt(i,Ln(t)(n))},new Ne(this._binding)},e.prototype.whenNoAncestorTagged=function(t,n){return this._binding.constraint=function(i){return i!==null&&!bt(i,Ln(t)(n))},new Ne(this._binding)},e.prototype.whenAnyAncestorMatches=function(t){return this._binding.constraint=function(n){return n!==null&&bt(n,t)},new Ne(this._binding)},e.prototype.whenNoAncestorMatches=function(t){return this._binding.constraint=function(n){return n!==null&&!bt(n,t)},new Ne(this._binding)},e}(),Ne=function(){function e(t){this._binding=t}return e.prototype.onActivation=function(t){return this._binding.onActivation=t,new _r(this._binding)},e.prototype.onDeactivation=function(t){return this._binding.onDeactivation=t,new _r(this._binding)},e}(),_t=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new _r(this._binding),this._bindingOnSyntax=new Ne(this._binding)}return e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,n){return this._bindingWhenSyntax.whenTargetTagged(t,n)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,n){return this._bindingWhenSyntax.whenParentTagged(t,n)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,n)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenNoAncestorTagged(t,n)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e.prototype.onDeactivation=function(t){return this._bindingOnSyntax.onDeactivation(t)},e}(),qc=function(){function e(t){this._binding=t}return e.prototype.inRequestScope=function(){return this._binding.scope=Se.Request,new _t(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Se.Transient,new _t(this._binding)},e}(),Ua=function(){function e(t){this._binding=t,this._bindingWhenSyntax=new _r(this._binding),this._bindingOnSyntax=new Ne(this._binding),this._bindingInSyntax=new qc(t)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(t){return this._bindingWhenSyntax.when(t)},e.prototype.whenTargetNamed=function(t){return this._bindingWhenSyntax.whenTargetNamed(t)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(t,n){return this._bindingWhenSyntax.whenTargetTagged(t,n)},e.prototype.whenInjectedInto=function(t){return this._bindingWhenSyntax.whenInjectedInto(t)},e.prototype.whenParentNamed=function(t){return this._bindingWhenSyntax.whenParentNamed(t)},e.prototype.whenParentTagged=function(t,n){return this._bindingWhenSyntax.whenParentTagged(t,n)},e.prototype.whenAnyAncestorIs=function(t){return this._bindingWhenSyntax.whenAnyAncestorIs(t)},e.prototype.whenNoAncestorIs=function(t){return this._bindingWhenSyntax.whenNoAncestorIs(t)},e.prototype.whenAnyAncestorNamed=function(t){return this._bindingWhenSyntax.whenAnyAncestorNamed(t)},e.prototype.whenAnyAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenAnyAncestorTagged(t,n)},e.prototype.whenNoAncestorNamed=function(t){return this._bindingWhenSyntax.whenNoAncestorNamed(t)},e.prototype.whenNoAncestorTagged=function(t,n){return this._bindingWhenSyntax.whenNoAncestorTagged(t,n)},e.prototype.whenAnyAncestorMatches=function(t){return this._bindingWhenSyntax.whenAnyAncestorMatches(t)},e.prototype.whenNoAncestorMatches=function(t){return this._bindingWhenSyntax.whenNoAncestorMatches(t)},e.prototype.onActivation=function(t){return this._bindingOnSyntax.onActivation(t)},e.prototype.onDeactivation=function(t){return this._bindingOnSyntax.onDeactivation(t)},e}(),Hc=function(){function e(t){this._binding=t}return e.prototype.to=function(t){return this._binding.type=ge.Instance,this._binding.implementationType=t,new Ua(this._binding)},e.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+Uu);var t=this._binding.serviceIdentifier;return this.to(t)},e.prototype.toConstantValue=function(t){return this._binding.type=ge.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.toDynamicValue=function(t){return this._binding.type=ge.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new Ua(this._binding)},e.prototype.toConstructor=function(t){return this._binding.type=ge.Constructor,this._binding.implementationType=t,this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.toFactory=function(t){return this._binding.type=ge.Factory,this._binding.factory=t,this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.toFunction=function(t){if(typeof t!="function")throw new Error(Ku);var n=this.toConstantValue(t);return this._binding.type=ge.Function,this._binding.scope=Se.Singleton,n},e.prototype.toAutoFactory=function(t){return this._binding.type=ge.Factory,this._binding.factory=function(n){var i=function(){return n.container.get(t)};return i},this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.toAutoNamedFactory=function(t){return this._binding.type=ge.Factory,this._binding.factory=function(n){return function(i){return n.container.getNamed(t,i)}},new _t(this._binding)},e.prototype.toProvider=function(t){return this._binding.type=ge.Provider,this._binding.provider=t,this._binding.scope=Se.Singleton,new _t(this._binding)},e.prototype.toService=function(t){this.toDynamicValue(function(n){return n.container.get(t)})},e}(),zc=function(){function e(){}return e.of=function(t,n,i,a,s){var f=new e;return f.bindings=t,f.middleware=n,f.deactivations=a,f.activations=i,f.moduleActivationStore=s,f},e}();function Gc(e){return typeof e=="object"&&e!==null&&"clone"in e&&typeof e.clone=="function"}var Ht=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(t,n){if(t==null)throw new Error(Rn);if(n==null)throw new Error(Rn);var i=this._map.get(t);i!==void 0?i.push(n):this._map.set(t,[n])},e.prototype.get=function(t){if(t==null)throw new Error(Rn);var n=this._map.get(t);if(n!==void 0)return n;throw new Error(Ea)},e.prototype.remove=function(t){if(t==null)throw new Error(Rn);if(!this._map.delete(t))throw new Error(Ea)},e.prototype.removeIntersection=function(t){var n=this;this.traverse(function(i,a){var s=t.hasKey(i)?t.get(i):void 0;if(s!==void 0){var f=a.filter(function(d){return!s.some(function(y){return d===y})});n._setValue(i,f)}})},e.prototype.removeByCondition=function(t){var n=this,i=[];return this._map.forEach(function(a,s){for(var f=[],d=0,y=a;d<y.length;d++){var g=y[d],T=t(g);T?i.push(g):f.push(g)}n._setValue(s,f)}),i},e.prototype.hasKey=function(t){if(t==null)throw new Error(Rn);return this._map.has(t)},e.prototype.clone=function(){var t=new e;return this._map.forEach(function(n,i){n.forEach(function(a){return t.add(i,Gc(a)?a.clone():a)})}),t},e.prototype.traverse=function(t){this._map.forEach(function(n,i){t(i,n)})},e.prototype._setValue=function(t,n){n.length>0?this._map.set(t,n):this._map.delete(t)},e}(),Yc=function(){function e(){this._map=new Map}return e.prototype.remove=function(t){if(this._map.has(t)){var n=this._map.get(t);return this._map.delete(t),n}return this._getEmptyHandlersStore()},e.prototype.addDeactivation=function(t,n,i){this._getModuleActivationHandlers(t).onDeactivations.add(n,i)},e.prototype.addActivation=function(t,n,i){this._getModuleActivationHandlers(t).onActivations.add(n,i)},e.prototype.clone=function(){var t=new e;return this._map.forEach(function(n,i){t._map.set(i,{onActivations:n.onActivations.clone(),onDeactivations:n.onDeactivations.clone()})}),t},e.prototype._getModuleActivationHandlers=function(t){var n=this._map.get(t);return n===void 0&&(n=this._getEmptyHandlersStore(),this._map.set(t,n)),n},e.prototype._getEmptyHandlersStore=function(){var t={onActivations:new Ht,onDeactivations:new Ht};return t},e}(),wr=function(){return wr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},wr.apply(this,arguments)},rt=function(e,t,n,i){function a(s){return s instanceof n?s:new n(function(f){f(s)})}return new(n||(n=Promise))(function(s,f){function d(T){try{g(i.next(T))}catch(E){f(E)}}function y(T){try{g(i.throw(T))}catch(E){f(E)}}function g(T){T.done?s(T.value):a(T.value).then(d,y)}g((i=i.apply(e,t||[])).next())})},it=function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,f;return f={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function d(g){return function(T){return y([g,T])}}function y(g){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=g[0]&2?a.return:g[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,g[1])).done)return s;switch(a=0,s&&(g=[g[0]&2,s.value]),g[0]){case 0:case 1:s=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,a=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!s||g[1]>s[0]&&g[1]<s[3])){n.label=g[1];break}if(g[0]===6&&n.label<s[1]){n.label=s[1],s=g;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(g);break}s[2]&&n.ops.pop(),n.trys.pop();continue}g=t.call(e,n)}catch(T){g=[6,T],a=0}finally{i=s=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},Qc=function(e,t,n){if(n||arguments.length===2)for(var i=0,a=t.length,s;i<a;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))},Jc=function(){function e(t){var n=t||{};if(typeof n!="object")throw new Error(""+Hu);if(n.defaultScope===void 0)n.defaultScope=Se.Transient;else if(n.defaultScope!==Se.Singleton&&n.defaultScope!==Se.Transient&&n.defaultScope!==Se.Request)throw new Error(""+zu);if(n.autoBindInjectable===void 0)n.autoBindInjectable=!1;else if(typeof n.autoBindInjectable!="boolean")throw new Error(""+Gu);if(n.skipBaseClassChecks===void 0)n.skipBaseClassChecks=!1;else if(typeof n.skipBaseClassChecks!="boolean")throw new Error(""+Yu);this.options={autoBindInjectable:n.autoBindInjectable,defaultScope:n.defaultScope,skipBaseClassChecks:n.skipBaseClassChecks},this.id=Nn(),this._bindingDictionary=new Ht,this._snapshots=[],this._middleware=null,this._activations=new Ht,this._deactivations=new Ht,this.parent=null,this._metadataReader=new tc,this._moduleActivationStore=new Yc}return e.merge=function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=new e,f=Qc([t,n],i,!0).map(function(g){return mr(g)}),d=mr(s);function y(g,T){g.traverse(function(E,L){L.forEach(function(z){T.add(z.serviceIdentifier,z.clone())})})}return f.forEach(function(g){y(g,d)}),s},e.prototype.load=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=this._getContainerModuleHelpersFactory(),a=0,s=t;a<s.length;a++){var f=s[a],d=i(f.id);f.registry(d.bindFunction,d.unbindFunction,d.isboundFunction,d.rebindFunction,d.unbindAsyncFunction,d.onActivationFunction,d.onDeactivationFunction)}},e.prototype.loadAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return rt(this,void 0,void 0,function(){var i,a,s,f,d;return it(this,function(y){switch(y.label){case 0:i=this._getContainerModuleHelpersFactory(),a=0,s=t,y.label=1;case 1:return a<s.length?(f=s[a],d=i(f.id),[4,f.registry(d.bindFunction,d.unbindFunction,d.isboundFunction,d.rebindFunction,d.unbindAsyncFunction,d.onActivationFunction,d.onDeactivationFunction)]):[3,4];case 2:y.sent(),y.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},e.prototype.unload=function(){for(var t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];n.forEach(function(a){var s=t._removeModuleBindings(a.id);t._deactivateSingletons(s),t._removeModuleHandlers(a.id)})},e.prototype.unloadAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return rt(this,void 0,void 0,function(){var i,a,s,f;return it(this,function(d){switch(d.label){case 0:i=0,a=t,d.label=1;case 1:return i<a.length?(s=a[i],f=this._removeModuleBindings(s.id),[4,this._deactivateSingletonsAsync(f)]):[3,4];case 2:d.sent(),this._removeModuleHandlers(s.id),d.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.bind=function(t){var n=this.options.defaultScope||Se.Transient,i=new Iu(t,n);return this._bindingDictionary.add(t,i),new Hc(i)},e.prototype.rebind=function(t){return this.unbind(t),this.bind(t)},e.prototype.rebindAsync=function(t){return rt(this,void 0,void 0,function(){return it(this,function(n){switch(n.label){case 0:return[4,this.unbindAsync(t)];case 1:return n.sent(),[2,this.bind(t)]}})})},e.prototype.unbind=function(t){if(this._bindingDictionary.hasKey(t)){var n=this._bindingDictionary.get(t);this._deactivateSingletons(n)}this._removeServiceFromDictionary(t)},e.prototype.unbindAsync=function(t){return rt(this,void 0,void 0,function(){var n;return it(this,function(i){switch(i.label){case 0:return this._bindingDictionary.hasKey(t)?(n=this._bindingDictionary.get(t),[4,this._deactivateSingletonsAsync(n)]):[3,2];case 1:i.sent(),i.label=2;case 2:return this._removeServiceFromDictionary(t),[2]}})})},e.prototype.unbindAll=function(){var t=this;this._bindingDictionary.traverse(function(n,i){t._deactivateSingletons(i)}),this._bindingDictionary=new Ht},e.prototype.unbindAllAsync=function(){return rt(this,void 0,void 0,function(){var t,n=this;return it(this,function(i){switch(i.label){case 0:return t=[],this._bindingDictionary.traverse(function(a,s){t.push(n._deactivateSingletonsAsync(s))}),[4,Promise.all(t)];case 1:return i.sent(),this._bindingDictionary=new Ht,[2]}})})},e.prototype.onActivation=function(t,n){this._activations.add(t,n)},e.prototype.onDeactivation=function(t,n){this._deactivations.add(t,n)},e.prototype.isBound=function(t){var n=this._bindingDictionary.hasKey(t);return!n&&this.parent&&(n=this.parent.isBound(t)),n},e.prototype.isCurrentBound=function(t){return this._bindingDictionary.hasKey(t)},e.prototype.isBoundNamed=function(t,n){return this.isBoundTagged(t,Ge,n)},e.prototype.isBoundTagged=function(t,n,i){var a=!1;if(this._bindingDictionary.hasKey(t)){var s=this._bindingDictionary.get(t),f=vc(this,t,n,i);a=s.some(function(d){return d.constraint(f)})}return!a&&this.parent&&(a=this.parent.isBoundTagged(t,n,i)),a},e.prototype.snapshot=function(){this._snapshots.push(zc.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},e.prototype.restore=function(){var t=this._snapshots.pop();if(t===void 0)throw new Error(Vu);this._bindingDictionary=t.bindings,this._activations=t.activations,this._deactivations=t.deactivations,this._middleware=t.middleware,this._moduleActivationStore=t.moduleActivationStore},e.prototype.createChild=function(t){var n=new e(t||this.options);return n.parent=this,n},e.prototype.applyMiddleware=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this._middleware?this._middleware:this._planAndResolve();this._middleware=t.reduce(function(a,s){return s(a)},i)},e.prototype.applyCustomMetadataReader=function(t){this._metadataReader=t},e.prototype.get=function(t){var n=this._getNotAllArgs(t,!1);return this._getButThrowIfAsync(n)},e.prototype.getAsync=function(t){return rt(this,void 0,void 0,function(){var n;return it(this,function(i){return n=this._getNotAllArgs(t,!1),[2,this._get(n)]})})},e.prototype.getTagged=function(t,n,i){var a=this._getNotAllArgs(t,!1,n,i);return this._getButThrowIfAsync(a)},e.prototype.getTaggedAsync=function(t,n,i){return rt(this,void 0,void 0,function(){var a;return it(this,function(s){return a=this._getNotAllArgs(t,!1,n,i),[2,this._get(a)]})})},e.prototype.getNamed=function(t,n){return this.getTagged(t,Ge,n)},e.prototype.getNamedAsync=function(t,n){return this.getTaggedAsync(t,Ge,n)},e.prototype.getAll=function(t){var n=this._getAllArgs(t);return this._getButThrowIfAsync(n)},e.prototype.getAllAsync=function(t){var n=this._getAllArgs(t);return this._getAll(n)},e.prototype.getAllTagged=function(t,n,i){var a=this._getNotAllArgs(t,!0,n,i);return this._getButThrowIfAsync(a)},e.prototype.getAllTaggedAsync=function(t,n,i){var a=this._getNotAllArgs(t,!0,n,i);return this._getAll(a)},e.prototype.getAllNamed=function(t,n){return this.getAllTagged(t,Ge,n)},e.prototype.getAllNamedAsync=function(t,n){return this.getAllTaggedAsync(t,Ge,n)},e.prototype.resolve=function(t){var n=this.isBound(t);n||this.bind(t).toSelf();var i=this.get(t);return n||this.unbind(t),i},e.prototype._preDestroy=function(t,n){var i,a;if(Reflect.hasMetadata(Mi,t)){var s=Reflect.getMetadata(Mi,t);return(a=(i=n)[s.value])===null||a===void 0?void 0:a.call(i)}},e.prototype._removeModuleHandlers=function(t){var n=this._moduleActivationStore.remove(t);this._activations.removeIntersection(n.onActivations),this._deactivations.removeIntersection(n.onDeactivations)},e.prototype._removeModuleBindings=function(t){return this._bindingDictionary.removeByCondition(function(n){return n.moduleId===t})},e.prototype._deactivate=function(t,n){var i=this,a=Object.getPrototypeOf(n).constructor;try{if(this._deactivations.hasKey(t.serviceIdentifier)){var s=this._deactivateContainer(n,this._deactivations.get(t.serviceIdentifier).values());if(Ke(s))return this._handleDeactivationError(s.then(function(){return i._propagateContainerDeactivationThenBindingAndPreDestroyAsync(t,n,a)}),a)}var f=this._propagateContainerDeactivationThenBindingAndPreDestroy(t,n,a);if(Ke(f))return this._handleDeactivationError(f,a)}catch(d){if(d instanceof Error)throw new Error(ki(a.name,d.message))}},e.prototype._handleDeactivationError=function(t,n){return rt(this,void 0,void 0,function(){var i;return it(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,t];case 1:return a.sent(),[3,3];case 2:if(i=a.sent(),i instanceof Error)throw new Error(ki(n.name,i.message));return[3,3];case 3:return[2]}})})},e.prototype._deactivateContainer=function(t,n){for(var i=this,a=n.next();a.value;){var s=a.value(t);if(Ke(s))return s.then(function(){return i._deactivateContainerAsync(t,n)});a=n.next()}},e.prototype._deactivateContainerAsync=function(t,n){return rt(this,void 0,void 0,function(){var i;return it(this,function(a){switch(a.label){case 0:i=n.next(),a.label=1;case 1:return i.value?[4,i.value(t)]:[3,3];case 2:return a.sent(),i=n.next(),[3,1];case 3:return[2]}})})},e.prototype._getContainerModuleHelpersFactory=function(){var t=this,n=function(T,E){T._binding.moduleId=E},i=function(T){return function(E){var L=t.bind(E);return n(L,T),L}},a=function(){return function(T){return t.unbind(T)}},s=function(){return function(T){return t.unbindAsync(T)}},f=function(){return function(T){return t.isBound(T)}},d=function(T){return function(E){var L=t.rebind(E);return n(L,T),L}},y=function(T){return function(E,L){t._moduleActivationStore.addActivation(T,E,L),t.onActivation(E,L)}},g=function(T){return function(E,L){t._moduleActivationStore.addDeactivation(T,E,L),t.onDeactivation(E,L)}};return function(T){return{bindFunction:i(T),isboundFunction:f(),onActivationFunction:y(T),onDeactivationFunction:g(T),rebindFunction:d(T),unbindFunction:a(),unbindAsyncFunction:s()}}},e.prototype._getAll=function(t){return Promise.all(this._get(t))},e.prototype._get=function(t){var n=wr(wr({},t),{contextInterceptor:function(a){return a},targetType:In.Variable});if(this._middleware){var i=this._middleware(n);if(i==null)throw new Error($u);return i}return this._planAndResolve()(n)},e.prototype._getButThrowIfAsync=function(t){var n=this._get(t);if(ja(n))throw new Error(Wu(t.serviceIdentifier));return n},e.prototype._getAllArgs=function(t){var n={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t};return n},e.prototype._getNotAllArgs=function(t,n,i,a){var s={avoidConstraints:!1,isMultiInject:n,serviceIdentifier:t,key:i,value:a};return s},e.prototype._planAndResolve=function(){var t=this;return function(n){var i=gc(t._metadataReader,t,n.isMultiInject,n.targetType,n.serviceIdentifier,n.key,n.value,n.avoidConstraints);i=n.contextInterceptor(i);var a=Uc(i);return a}},e.prototype._deactivateIfSingleton=function(t){var n=this;if(t.activated)return Ke(t.cache)?t.cache.then(function(i){return n._deactivate(t,i)}):this._deactivate(t,t.cache)},e.prototype._deactivateSingletons=function(t){for(var n=0,i=t;n<i.length;n++){var a=i[n],s=this._deactivateIfSingleton(a);if(Ke(s))throw new Error(Qu)}},e.prototype._deactivateSingletonsAsync=function(t){return rt(this,void 0,void 0,function(){var n=this;return it(this,function(i){switch(i.label){case 0:return[4,Promise.all(t.map(function(a){return n._deactivateIfSingleton(a)}))];case 1:return i.sent(),[2]}})})},e.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(t,n,i){return this.parent?this._deactivate.bind(this.parent)(t,n):this._bindingDeactivationAndPreDestroy(t,n,i)},e.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(t,n,i){return rt(this,void 0,void 0,function(){return it(this,function(a){switch(a.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(t,n)]:[3,2];case 1:return a.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(t,n,i)];case 3:a.sent(),a.label=4;case 4:return[2]}})})},e.prototype._removeServiceFromDictionary=function(t){try{this._bindingDictionary.remove(t)}catch{throw new Error(Mu+" "+Mn(t))}},e.prototype._bindingDeactivationAndPreDestroy=function(t,n,i){var a=this;if(typeof t.onDeactivation=="function"){var s=t.onDeactivation(n);if(Ke(s))return s.then(function(){return a._preDestroy(i,n)})}return this._preDestroy(i,n)},e.prototype._bindingDeactivationAndPreDestroyAsync=function(t,n,i){return rt(this,void 0,void 0,function(){return it(this,function(a){switch(a.label){case 0:return typeof t.onDeactivation!="function"?[3,2]:[4,t.onDeactivation(n)];case 1:a.sent(),a.label=2;case 2:return[4,this._preDestroy(i,n)];case 3:return a.sent(),[2]}})})},e}();function Xc(e){for(var t=new Set,n=0,i=e;n<i.length;n++){var a=i[n];if(t.has(a))return a;t.add(a)}}function Zc(e){return e.prototype!==void 0}function el(e){if(e!==void 0)throw new Error(Oa)}function qa(e,t,n,i){el(t),Ha(ya,e,n.toString(),i)}function tl(e,t,n){if(Zc(e))throw new Error(Oa);Ha(ma,e.constructor,t,n)}function nl(e){var t=[];if(Array.isArray(e)){t=e;var n=Xc(t.map(function(i){return i.key}));if(n!==void 0)throw new Error(wa+" "+n.toString())}else t=[e];return t}function Ha(e,t,n,i){var a=nl(i),s={};Reflect.hasOwnMetadata(e,t)&&(s=Reflect.getMetadata(e,t));var f=s[n];if(f===void 0)f=[];else for(var d=function(E){if(a.some(function(L){return L.key===E.key}))throw new Error(wa+" "+E.key.toString())},y=0,g=f;y<g.length;y++){var T=g[y];d(T)}f.push.apply(f,a),s[n]=f,Reflect.defineMetadata(e,s,t)}function Bi(e){return function(t,n,i){typeof i=="number"?qa(t,n,i,e):tl(t,n,e)}}function Re(){return function(e){if(Reflect.hasOwnMetadata(Ri,e))throw new Error(Nu);var t=Reflect.getMetadata(Pu,e)||[];return Reflect.defineMetadata(Ri,t,e),e}}function Vi(e){return Bi(new pt(Ge,e))}function rl(e){return function(t){return function(n,i,a){if(t===void 0){var s=typeof n=="function"?n.name:n.constructor.name;throw new Error(Lu(s))}return Bi(new pt(e,t))(n,i,a)}}}var Oe=rl(dr);function il(){return Bi(new pt(Ni,!0))}function ol(){return function(e,t,n){var i=new pt(hr,!0);qa(e,t,n,i)}}var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*! *****************************************************************************
|
|
12
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
13
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
14
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
15
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
|
|
17
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
18
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
19
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
20
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
21
|
-
|
|
22
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
23
|
-
and limitations under the License.
|
|
24
|
-
***************************************************************************** */var za;(function(e){(function(t){var n=typeof globalThis=="object"?globalThis:typeof Er=="object"?Er:typeof self=="object"?self:typeof this=="object"?this:d(),i=a(e);typeof n.Reflect<"u"&&(i=a(n.Reflect,i)),t(i,n),typeof n.Reflect>"u"&&(n.Reflect=e);function a(y,g){return function(T,E){Object.defineProperty(y,T,{configurable:!0,writable:!0,value:E}),g&&g(T,E)}}function s(){try{return Function("return this;")()}catch{}}function f(){try{return(0,eval)("(function() { return this; })()")}catch{}}function d(){return s()||f()}})(function(t,n){var i=Object.prototype.hasOwnProperty,a=typeof Symbol=="function",s=a&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",f=a&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",d=typeof Object.create=="function",y={__proto__:[]}instanceof Array,g=!d&&!y,T={create:d?function(){return Lt(Object.create(null))}:y?function(){return Lt({__proto__:null})}:function(){return Lt({})},has:g?function(P,I){return i.call(P,I)}:function(P,I){return I in P},get:g?function(P,I){return i.call(P,I)?P[I]:void 0}:function(P,I){return P[I]}},E=Object.getPrototypeOf(Function),L=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Yn(),z=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:on(),X=typeof WeakMap=="function"?WeakMap:Qn(),le=a?Symbol.for("@reflect-metadata:registry"):void 0,qe=nn(),Xe=oi(qe);function He(P,I,j,K){if(J(j)){if(!tn(P))throw new TypeError;if(!jt(I))throw new TypeError;return Zt(P,I)}else{if(!tn(P))throw new TypeError;if(!me(I))throw new TypeError;if(!me(K)&&!J(K)&&!Ze(K))throw new TypeError;return Ze(K)&&(K=void 0),j=et(j),Ot(P,I,j,K)}}t("decorate",He);function gt(P,I){function j(K,F){if(!me(K))throw new TypeError;if(!J(F)&&!Mo(F))throw new TypeError;vt(P,I,K,F)}return j}t("metadata",gt);function ne(P,I,j,K){if(!me(j))throw new TypeError;return J(K)||(K=et(K)),vt(P,I,j,K)}t("defineMetadata",ne);function Fe(P,I,j){if(!me(I))throw new TypeError;return J(j)||(j=et(j)),Qr(P,I,j)}t("hasMetadata",Fe);function Be(P,I,j){if(!me(I))throw new TypeError;return J(j)||(j=et(j)),en(P,I,j)}t("hasOwnMetadata",Be);function Pe(P,I,j){if(!me(I))throw new TypeError;return J(j)||(j=et(j)),En(P,I,j)}t("getMetadata",Pe);function zr(P,I,j){if(!me(I))throw new TypeError;return J(j)||(j=et(j)),Jr(P,I,j)}t("getOwnMetadata",zr);function Ro(P,I){if(!me(P))throw new TypeError;return J(I)||(I=et(I)),xt(P,I)}t("getMetadataKeys",Ro);function Gr(P,I){if(!me(P))throw new TypeError;return J(I)||(I=et(I)),st(P,I)}t("getOwnMetadataKeys",Gr);function Yr(P,I,j){if(!me(I))throw new TypeError;if(J(j)||(j=et(j)),!me(I))throw new TypeError;J(j)||(j=et(j));var K=ht(I,j,!1);return J(K)?!1:K.OrdinaryDeleteMetadata(P,I,j)}t("deleteMetadata",Yr);function Zt(P,I){for(var j=P.length-1;j>=0;--j){var K=P[j],F=K(I);if(!J(F)&&!Ze(F)){if(!jt(F))throw new TypeError;I=F}}return I}function Ot(P,I,j,K){for(var F=P.length-1;F>=0;--F){var be=P[F],pe=be(I,j,K);if(!J(pe)&&!Ze(pe)){if(!me(pe))throw new TypeError;K=pe}}return K}function Qr(P,I,j){var K=en(P,I,j);if(K)return!0;var F=ze(I);return Ze(F)?!1:Qr(P,F,j)}function en(P,I,j){var K=ht(I,j,!1);return J(K)?!1:Zr(K.OrdinaryHasOwnMetadata(P,I,j))}function En(P,I,j){var K=en(P,I,j);if(K)return Jr(P,I,j);var F=ze(I);if(!Ze(F))return En(P,F,j)}function Jr(P,I,j){var K=ht(I,j,!1);if(!J(K))return K.OrdinaryGetOwnMetadata(P,I,j)}function vt(P,I,j,K){var F=ht(j,K,!0);F.OrdinaryDefineOwnMetadata(P,I,j,K)}function xt(P,I){var j=st(P,I),K=ze(P);if(K===null)return j;var F=xt(K,I);if(F.length<=0)return j;if(j.length<=0)return F;for(var be=new z,pe=[],ee=0,N=j;ee<N.length;ee++){var H=N[ee],G=be.has(H);G||(be.add(H),pe.push(H))}for(var Y=0,re=F;Y<re.length;Y++){var H=re[Y],G=be.has(H);G||(be.add(H),pe.push(H))}return pe}function st(P,I){var j=ht(P,I,!1);return j?j.OrdinaryOwnMetadataKeys(P,I):[]}function Sn(P){if(P===null)return 1;switch(typeof P){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return P===null?1:6;default:return 6}}function J(P){return P===void 0}function Ze(P){return P===null}function Xr(P){return typeof P=="symbol"}function me(P){return typeof P=="object"?P!==null:typeof P=="function"}function kt(P,I){switch(Sn(P)){case 0:return P;case 1:return P;case 2:return P;case 3:return P;case 4:return P;case 5:return P}var j="string",K=ei(P,s);if(K!==void 0){var F=K.call(P,j);if(me(F))throw new TypeError;return F}return Gn(P)}function Gn(P,I){var j,K;{var F=P.toString;if(ue(F)){var K=F.call(P);if(!me(K))return K}var j=P.valueOf;if(ue(j)){var K=j.call(P);if(!me(K))return K}}throw new TypeError}function Zr(P){return!!P}function Q(P){return""+P}function et(P){var I=kt(P);return Xr(I)?I:Q(I)}function tn(P){return Array.isArray?Array.isArray(P):P instanceof Object?P instanceof Array:Object.prototype.toString.call(P)==="[object Array]"}function ue(P){return typeof P=="function"}function jt(P){return typeof P=="function"}function Mo(P){switch(Sn(P)){case 3:return!0;case 4:return!0;default:return!1}}function ft(P,I){return P===I||P!==P&&I!==I}function ei(P,I){var j=P[I];if(j!=null){if(!ue(j))throw new TypeError;return j}}function ti(P){var I=ei(P,f);if(!ue(I))throw new TypeError;var j=I.call(P);if(!me(j))throw new TypeError;return j}function ni(P){return P.value}function ri(P){var I=P.next();return I.done?!1:I}function On(P){var I=P.return;I&&I.call(P)}function ze(P){var I=Object.getPrototypeOf(P);if(typeof P!="function"||P===E||I!==E)return I;var j=P.prototype,K=j&&Object.getPrototypeOf(j);if(K==null||K===Object.prototype)return I;var F=K.constructor;return typeof F!="function"||F===P?I:F}function ii(){var P;!J(le)&&typeof n.Reflect<"u"&&!(le in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(P=rn(n.Reflect));var I,j,K,F=new X,be={registerProvider:pe,getProvider:N,setProvider:G};return be;function pe(Y){if(!Object.isExtensible(be))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case P===Y:break;case J(I):I=Y;break;case I===Y:break;case J(j):j=Y;break;case j===Y:break;default:K===void 0&&(K=new z),K.add(Y);break}}function ee(Y,re){if(!J(I)){if(I.isProviderFor(Y,re))return I;if(!J(j)){if(j.isProviderFor(Y,re))return I;if(!J(K))for(var de=ti(K);;){var we=ri(de);if(!we)return;var tt=ni(we);if(tt.isProviderFor(Y,re))return On(de),tt}}}if(!J(P)&&P.isProviderFor(Y,re))return P}function N(Y,re){var de=F.get(Y),we;return J(de)||(we=de.get(re)),J(we)&&(we=ee(Y,re),J(we)||(J(de)&&(de=new L,F.set(Y,de)),de.set(re,we))),we}function H(Y){if(J(Y))throw new TypeError;return I===Y||j===Y||!J(K)&&K.has(Y)}function G(Y,re,de){if(!H(de))throw new Error("Metadata provider not registered.");var we=N(Y,re);if(we!==de){if(!J(we))return!1;var tt=F.get(Y);J(tt)&&(tt=new L,F.set(Y,tt)),tt.set(re,de)}return!0}}function nn(){var P;return!J(le)&&me(n.Reflect)&&Object.isExtensible(n.Reflect)&&(P=n.Reflect[le]),J(P)&&(P=ii()),!J(le)&&me(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,le,{enumerable:!1,configurable:!1,writable:!1,value:P}),P}function oi(P){var I=new X,j={isProviderFor:function(H,G){var Y=I.get(H);return J(Y)?!1:Y.has(G)},OrdinaryDefineOwnMetadata:pe,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:be,OrdinaryOwnMetadataKeys:ee,OrdinaryDeleteMetadata:N};return qe.registerProvider(j),j;function K(H,G,Y){var re=I.get(H),de=!1;if(J(re)){if(!Y)return;re=new L,I.set(H,re),de=!0}var we=re.get(G);if(J(we)){if(!Y)return;if(we=new L,re.set(G,we),!P.setProvider(H,G,j))throw re.delete(G),de&&I.delete(H),new Error("Wrong provider for target.")}return we}function F(H,G,Y){var re=K(G,Y,!1);return J(re)?!1:Zr(re.has(H))}function be(H,G,Y){var re=K(G,Y,!1);if(!J(re))return re.get(H)}function pe(H,G,Y,re){var de=K(Y,re,!0);de.set(H,G)}function ee(H,G){var Y=[],re=K(H,G,!1);if(J(re))return Y;for(var de=re.keys(),we=ti(de),tt=0;;){var At=ri(we);if(!At)return Y.length=tt,Y;var Ft=ni(At);try{Y[tt]=Ft}catch(Jn){try{On(we)}finally{throw Jn}}tt++}}function N(H,G,Y){var re=K(G,Y,!1);if(J(re)||!re.delete(H))return!1;if(re.size===0){var de=I.get(G);J(de)||(de.delete(Y),de.size===0&&I.delete(de))}return!0}}function rn(P){var I=P.defineMetadata,j=P.hasOwnMetadata,K=P.getOwnMetadata,F=P.getOwnMetadataKeys,be=P.deleteMetadata,pe=new X,ee={isProviderFor:function(N,H){var G=pe.get(N);return!J(G)&&G.has(H)?!0:F(N,H).length?(J(G)&&(G=new z,pe.set(N,G)),G.add(H),!0):!1},OrdinaryDefineOwnMetadata:I,OrdinaryHasOwnMetadata:j,OrdinaryGetOwnMetadata:K,OrdinaryOwnMetadataKeys:F,OrdinaryDeleteMetadata:be};return ee}function ht(P,I,j){var K=qe.getProvider(P,I);if(!J(K))return K;if(j){if(qe.setProvider(P,I,Xe))return Xe;throw new Error("Illegal state.")}}function Yn(){var P={},I=[],j=function(){function ee(N,H,G){this._index=0,this._keys=N,this._values=H,this._selector=G}return ee.prototype["@@iterator"]=function(){return this},ee.prototype[f]=function(){return this},ee.prototype.next=function(){var N=this._index;if(N>=0&&N<this._keys.length){var H=this._selector(this._keys[N],this._values[N]);return N+1>=this._keys.length?(this._index=-1,this._keys=I,this._values=I):this._index++,{value:H,done:!1}}return{value:void 0,done:!0}},ee.prototype.throw=function(N){throw this._index>=0&&(this._index=-1,this._keys=I,this._values=I),N},ee.prototype.return=function(N){return this._index>=0&&(this._index=-1,this._keys=I,this._values=I),{value:N,done:!0}},ee}(),K=function(){function ee(){this._keys=[],this._values=[],this._cacheKey=P,this._cacheIndex=-2}return Object.defineProperty(ee.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ee.prototype.has=function(N){return this._find(N,!1)>=0},ee.prototype.get=function(N){var H=this._find(N,!1);return H>=0?this._values[H]:void 0},ee.prototype.set=function(N,H){var G=this._find(N,!0);return this._values[G]=H,this},ee.prototype.delete=function(N){var H=this._find(N,!1);if(H>=0){for(var G=this._keys.length,Y=H+1;Y<G;Y++)this._keys[Y-1]=this._keys[Y],this._values[Y-1]=this._values[Y];return this._keys.length--,this._values.length--,ft(N,this._cacheKey)&&(this._cacheKey=P,this._cacheIndex=-2),!0}return!1},ee.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=P,this._cacheIndex=-2},ee.prototype.keys=function(){return new j(this._keys,this._values,F)},ee.prototype.values=function(){return new j(this._keys,this._values,be)},ee.prototype.entries=function(){return new j(this._keys,this._values,pe)},ee.prototype["@@iterator"]=function(){return this.entries()},ee.prototype[f]=function(){return this.entries()},ee.prototype._find=function(N,H){if(!ft(this._cacheKey,N)){this._cacheIndex=-1;for(var G=0;G<this._keys.length;G++)if(ft(this._keys[G],N)){this._cacheIndex=G;break}}return this._cacheIndex<0&&H&&(this._cacheIndex=this._keys.length,this._keys.push(N),this._values.push(void 0)),this._cacheIndex},ee}();return K;function F(ee,N){return ee}function be(ee,N){return N}function pe(ee,N){return[ee,N]}}function on(){var P=function(){function I(){this._map=new L}return Object.defineProperty(I.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),I.prototype.has=function(j){return this._map.has(j)},I.prototype.add=function(j){return this._map.set(j,j),this},I.prototype.delete=function(j){return this._map.delete(j)},I.prototype.clear=function(){this._map.clear()},I.prototype.keys=function(){return this._map.keys()},I.prototype.values=function(){return this._map.keys()},I.prototype.entries=function(){return this._map.entries()},I.prototype["@@iterator"]=function(){return this.keys()},I.prototype[f]=function(){return this.keys()},I}();return P}function Qn(){var P=16,I=T.create(),j=K();return function(){function N(){this._key=K()}return N.prototype.has=function(H){var G=F(H,!1);return G!==void 0?T.has(G,this._key):!1},N.prototype.get=function(H){var G=F(H,!1);return G!==void 0?T.get(G,this._key):void 0},N.prototype.set=function(H,G){var Y=F(H,!0);return Y[this._key]=G,this},N.prototype.delete=function(H){var G=F(H,!1);return G!==void 0?delete G[this._key]:!1},N.prototype.clear=function(){this._key=K()},N}();function K(){var N;do N="@@WeakMap@@"+ee();while(T.has(I,N));return I[N]=!0,N}function F(N,H){if(!i.call(N,j)){if(!H)return;Object.defineProperty(N,j,{value:T.create()})}return N[j]}function be(N,H){for(var G=0;G<H;++G)N[G]=Math.random()*255|0;return N}function pe(N){if(typeof Uint8Array=="function"){var H=new Uint8Array(N);return typeof crypto<"u"?crypto.getRandomValues(H):typeof msCrypto<"u"?msCrypto.getRandomValues(H):be(H,N),H}return be(new Array(N),N)}function ee(){var N=pe(P);N[6]=N[6]&79|64,N[8]=N[8]&191|128;for(var H="",G=0;G<P;++G){var Y=N[G];(G===4||G===6||G===8)&&(H+="-"),Y<16&&(H+="0"),H+=Y.toString(16).toLowerCase()}return H}}function Lt(P){return P.__=void 0,delete P.__,P}})})(za||(za={}));var sl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,cl=(e,t,n,i)=>{for(var a=i>1?void 0:i?ul(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&sl(t,n,a),a};let $i=class{constructor(){this.name="component.name",this.hint="default",this.priority=1e3,this.singleton=!1}getName(){return this.name}getHint(){return this.hint}getPriority(){return this.priority}isSingleton(){return this.singleton}};$i=cl([Re()],$i);class ll{constructor(t,n,i){this.name=t,this.entryFile=n,this.staticModule=i}}var fl=Object.defineProperty,hl=Object.getOwnPropertyDescriptor,dl=(e,t,n,i)=>{for(var a=i>1?void 0:i?hl(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&fl(t,n,a),a},pl=(e,t)=>(n,i)=>t(n,i,e);let Ki=class extends $i{constructor(e){super(),this.remoteExtensions=new Map,this.remoteExtensionDefaultURL="/apps/",this.remoteExtensionDefaultEntryFile="main.bundle.js",this.logger=e,this.logger.setModule("extensionmanager.components.defaultExtensionManager")}addRemoteExtension(e,t,n){this.remoteExtensions.set(e,new ll(e,t,n))}setRemoteExtensionsConfig(e,t){this.remoteExtensionDefaultURL=e,this.remoteExtensionDefaultEntryFile=t}async loadExtension(e,t){var n,i,a,s,f;try{const d=this.remoteExtensions.get(e),y=d&&d.entryFile?d.entryFile:this.remoteExtensionDefaultEntryFile,g=this.remoteExtensionDefaultURL+e+"/"+y,T=this.remoteExtensionDefaultURL+e+"/style.css";(n=this.logger)==null||n.debug("Ready to import ",g);try{const L=await import(T);document.adoptedStyleSheets=[L.default]}catch{}const E=await import(g);if(E!=null){(i=this.logger)==null||i.debug("Found components Init for ",e,E);const L=E.ComponentInit;new L(t),(a=this.logger)==null||a.debug("Succesfull components Init for ",e)}else(s=this.logger)==null||s.debug("No components to load for ",e);return}catch(d){(f=this.logger)==null||f.error("Exception while loading components from ",e,d)}}async loadExtensions(e){for(const t of this.remoteExtensions.keys())await this.loadExtension(t,e)}};Ki=dl([Re(),pl(0,Oe("Logger"))],Ki);let gl=class{constructor(t){var n,i;this.logger=t.get("Logger"),this.logger.setModule("extensionmanager.components.componentsInit"),(n=this.logger)==null||n.debug("Init Extension Manager components begin"),t.bind("ExtensionManager").to(Ki),(i=this.logger)==null||i.debug("Init Extension Manager components end")}};/**
|
|
25
|
-
* @vue/shared v3.5.12
|
|
26
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
27
|
-
* @license MIT
|
|
28
|
-
**//*! #__NO_SIDE_EFFECTS__ */function vl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ot=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const zt=()=>{},yl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ye=Object.assign,ml=Object.prototype.hasOwnProperty,Ce=(e,t)=>ml.call(e,t),ye=Array.isArray,pn=e=>Sr(e)==="[object Map]",bl=e=>Sr(e)==="[object Set]",Me=e=>typeof e=="function",ct=e=>typeof e=="string",Fn=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",_l=e=>(We(e)||Me(e))&&Me(e.then)&&Me(e.catch),wl=Object.prototype.toString,Sr=e=>wl.call(e),Ga=e=>Sr(e).slice(8,-1),El=e=>Sr(e)==="[object Object]",Wi=e=>ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sl=(e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gt=(e,t)=>!Object.is(e,t),Ol=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})};let Ya;const Or=()=>Ya||(Ya=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ui(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],a=ct(i)?Pl(i):Ui(i);if(a)for(const s in a)t[s]=a[s]}return t}else if(ct(e)||We(e))return e}const xl=/;(?![^(]*\))/g,Al=/:([^]+)/,Cl=/\/\*[^]*?\*\//g;function Pl(e){const t={};return e.replace(Cl,"").split(xl).forEach(n=>{if(n){const i=n.split(Al);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function qi(e){let t="";if(ct(e))t=e;else if(ye(e))for(let n=0;n<e.length;n++){const i=qi(e[n]);i&&(t+=i+" ")}else if(We(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}/**
|
|
29
|
-
* @vue/reactivity v3.5.12
|
|
30
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
31
|
-
* @license MIT
|
|
32
|
-
**/function Dt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let he;const Hi=new WeakSet;class Tl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Hi.has(this)&&(Hi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,es(this),Ja(this);const t=he,n=lt;he=this,lt=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&he!==this&&Dt("Active effect was not restored correctly - this is likely a Vue internal bug."),Xa(this),he=t,lt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Qi(t);this.deps=this.depsTail=void 0,es(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Hi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Yi(this)&&this.run()}get dirty(){return Yi(this)}}let Qa=0,Bn,Vn;function Dl(e,t=!1){if(e.flags|=8,t){e.next=Vn,Vn=e;return}e.next=Bn,Bn=e}function zi(){Qa++}function Gi(){if(--Qa>0)return;if(Vn){let t=Vn;for(Vn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Bn;){let t=Bn;for(Bn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function Ja(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Xa(e){let t,n=e.depsTail,i=n;for(;i;){const a=i.prevDep;i.version===-1?(i===n&&(n=a),Qi(i),Nl(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=a}e.deps=t,e.depsTail=n}function Yi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Il(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Il(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cr))return;e.globalVersion=Cr;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Yi(e)){e.flags&=-3;return}const n=he,i=lt;he=e,lt=!0;try{Ja(e);const a=e.fn(e._value);(t.version===0||Gt(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{he=n,lt=i,Xa(e),e.flags&=-3}}function Qi(e,t=!1){const{dep:n,prevSub:i,nextSub:a}=e;if(i&&(i.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=i,e.nextSub=void 0),process.env.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=a),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Qi(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Nl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let lt=!0;const Za=[];function xr(){Za.push(lt),lt=!1}function Ar(){const e=Za.pop();lt=e===void 0?!0:e}function es(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=he;he=void 0;try{t()}finally{he=n}}}let Cr=0;class Rl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ml{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!he||!lt||he===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==he)n=this.activeLink=new Rl(he,this),he.deps?(n.prevDep=he.depsTail,he.depsTail.nextDep=n,he.depsTail=n):he.deps=he.depsTail=n,ts(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=he.depsTail,n.nextDep=void 0,he.depsTail.nextDep=n,he.depsTail=n,he.deps===n&&(he.deps=i)}return process.env.NODE_ENV!=="production"&&he.onTrack&&he.onTrack(Ye({effect:he},t)),n}trigger(t){this.version++,Cr++,this.notify(t)}notify(t){zi();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Ye({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Gi()}}}function ts(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)ts(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),process.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Ji=new WeakMap,Yt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Xi=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),$n=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function Te(e,t,n){if(lt&&he){let i=Ji.get(e);i||Ji.set(e,i=new Map);let a=i.get(n);a||(i.set(n,a=new Ml),a.map=i,a.key=n),process.env.NODE_ENV!=="production"?a.track({target:e,type:t,key:n}):a.track()}}function It(e,t,n,i,a,s){const f=Ji.get(e);if(!f){Cr++;return}const d=y=>{y&&(process.env.NODE_ENV!=="production"?y.trigger({target:e,type:t,key:n,newValue:i,oldValue:a,oldTarget:s}):y.trigger())};if(zi(),t==="clear")f.forEach(d);else{const y=ye(e),g=y&&Wi(n);if(y&&n==="length"){const T=Number(i);f.forEach((E,L)=>{(L==="length"||L===$n||!Fn(L)&&L>=T)&&d(E)})}else switch((n!==void 0||f.has(void 0))&&d(f.get(n)),g&&d(f.get($n)),t){case"add":y?g&&d(f.get("length")):(d(f.get(Yt)),pn(e)&&d(f.get(Xi)));break;case"delete":y||(d(f.get(Yt)),pn(e)&&d(f.get(Xi)));break;case"set":pn(e)&&d(f.get(Yt));break}}Gi()}function gn(e){const t=se(e);return t===e?t:(Te(t,"iterate",$n),Qe(e)?t:t.map(Je))}function Zi(e){return Te(e=se(e),"iterate",$n),e}const kl={__proto__:null,[Symbol.iterator](){return eo(this,Symbol.iterator,Je)},concat(...e){return gn(this).concat(...e.map(t=>ye(t)?gn(t):t))},entries(){return eo(this,"entries",e=>(e[1]=Je(e[1]),e))},every(e,t){return wt(this,"every",e,t,void 0,arguments)},filter(e,t){return wt(this,"filter",e,t,n=>n.map(Je),arguments)},find(e,t){return wt(this,"find",e,t,Je,arguments)},findIndex(e,t){return wt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return wt(this,"findLast",e,t,Je,arguments)},findLastIndex(e,t){return wt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return wt(this,"forEach",e,t,void 0,arguments)},includes(...e){return to(this,"includes",e)},indexOf(...e){return to(this,"indexOf",e)},join(e){return gn(this).join(e)},lastIndexOf(...e){return to(this,"lastIndexOf",e)},map(e,t){return wt(this,"map",e,t,void 0,arguments)},pop(){return Kn(this,"pop")},push(...e){return Kn(this,"push",e)},reduce(e,...t){return ns(this,"reduce",e,t)},reduceRight(e,...t){return ns(this,"reduceRight",e,t)},shift(){return Kn(this,"shift")},some(e,t){return wt(this,"some",e,t,void 0,arguments)},splice(...e){return Kn(this,"splice",e)},toReversed(){return gn(this).toReversed()},toSorted(e){return gn(this).toSorted(e)},toSpliced(...e){return gn(this).toSpliced(...e)},unshift(...e){return Kn(this,"unshift",e)},values(){return eo(this,"values",Je)}};function eo(e,t,n){const i=Zi(e),a=i[t]();return i!==e&&!Qe(e)&&(a._next=a.next,a.next=()=>{const s=a._next();return s.value&&(s.value=n(s.value)),s}),a}const jl=Array.prototype;function wt(e,t,n,i,a,s){const f=Zi(e),d=f!==e&&!Qe(e),y=f[t];if(y!==jl[t]){const E=y.apply(e,s);return d?Je(E):E}let g=n;f!==e&&(d?g=function(E,L){return n.call(this,Je(E),L,e)}:n.length>2&&(g=function(E,L){return n.call(this,E,L,e)}));const T=y.call(f,g,i);return d&&a?a(T):T}function ns(e,t,n,i){const a=Zi(e);let s=n;return a!==e&&(Qe(e)?n.length>3&&(s=function(f,d,y){return n.call(this,f,d,y,e)}):s=function(f,d,y){return n.call(this,f,Je(d),y,e)}),a[t](s,...i)}function to(e,t,n){const i=se(e);Te(i,"iterate",$n);const a=i[t](...n);return(a===-1||a===!1)&&Ir(n[0])?(n[0]=se(n[0]),i[t](...n)):a}function Kn(e,t,n=[]){xr(),zi();const i=se(e)[t].apply(e,n);return Gi(),Ar(),i}const Ll=vl("__proto__,__v_isRef,__isVue"),rs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fn));function Fl(e){Fn(e)||(e=String(e));const t=se(this);return Te(t,"has",e),t.hasOwnProperty(e)}class is{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){const a=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(a?s?cs:us:s?Gl:ss).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const f=ye(t);if(!a){let y;if(f&&(y=kl[n]))return y;if(n==="hasOwnProperty")return Fl}const d=Reflect.get(t,n,Ue(t)?t:i);return(Fn(n)?rs.has(n):Ll(n))||(a||Te(t,"get",n),s)?d:Ue(d)?f&&Wi(n)?d:d.value:We(d)?a?fs(d):ls(d):d}}class Bl extends is{constructor(t=!1){super(!1,t)}set(t,n,i,a){let s=t[n];if(!this._isShallow){const y=Nt(s);if(!Qe(i)&&!Nt(i)&&(s=se(s),i=se(i)),!ye(t)&&Ue(s)&&!Ue(i))return y?!1:(s.value=i,!0)}const f=ye(t)&&Wi(n)?Number(n)<t.length:Ce(t,n),d=Reflect.set(t,n,i,Ue(t)?t:a);return t===se(a)&&(f?Gt(i,s)&&It(t,"set",n,i,s):It(t,"add",n,i)),d}deleteProperty(t,n){const i=Ce(t,n),a=t[n],s=Reflect.deleteProperty(t,n);return s&&i&&It(t,"delete",n,void 0,a),s}has(t,n){const i=Reflect.has(t,n);return(!Fn(n)||!rs.has(n))&&Te(t,"has",n),i}ownKeys(t){return Te(t,"iterate",ye(t)?"length":Yt),Reflect.ownKeys(t)}}class os extends is{constructor(t=!1){super(!0,t)}set(t,n){return process.env.NODE_ENV!=="production"&&Dt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return process.env.NODE_ENV!=="production"&&Dt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Vl=new Bl,$l=new os,Kl=new os(!0),no=e=>e,Pr=e=>Reflect.getPrototypeOf(e);function Wl(e,t,n){return function(...i){const a=this.__v_raw,s=se(a),f=pn(s),d=e==="entries"||e===Symbol.iterator&&f,y=e==="keys"&&f,g=a[e](...i),T=n?no:t?oo:Je;return!t&&Te(s,"iterate",y?Xi:Yt),{next(){const{value:E,done:L}=g.next();return L?{value:E,done:L}:{value:d?[T(E[0]),T(E[1])]:T(E),done:L}},[Symbol.iterator](){return this}}}}function Tr(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Dt(`${Sl(e)} operation ${n}failed: target is readonly.`,se(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ul(e,t){const n={get(a){const s=this.__v_raw,f=se(s),d=se(a);e||(Gt(a,d)&&Te(f,"get",a),Te(f,"get",d));const{has:y}=Pr(f),g=t?no:e?oo:Je;if(y.call(f,a))return g(s.get(a));if(y.call(f,d))return g(s.get(d));s!==f&&s.get(a)},get size(){const a=this.__v_raw;return!e&&Te(se(a),"iterate",Yt),Reflect.get(a,"size",a)},has(a){const s=this.__v_raw,f=se(s),d=se(a);return e||(Gt(a,d)&&Te(f,"has",a),Te(f,"has",d)),a===d?s.has(a):s.has(a)||s.has(d)},forEach(a,s){const f=this,d=f.__v_raw,y=se(d),g=t?no:e?oo:Je;return!e&&Te(y,"iterate",Yt),d.forEach((T,E)=>a.call(s,g(T),g(E),f))}};return Ye(n,e?{add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear")}:{add(a){!t&&!Qe(a)&&!Nt(a)&&(a=se(a));const s=se(this);return Pr(s).has.call(s,a)||(s.add(a),It(s,"add",a,a)),this},set(a,s){!t&&!Qe(s)&&!Nt(s)&&(s=se(s));const f=se(this),{has:d,get:y}=Pr(f);let g=d.call(f,a);g?process.env.NODE_ENV!=="production"&&as(f,d,a):(a=se(a),g=d.call(f,a));const T=y.call(f,a);return f.set(a,s),g?Gt(s,T)&&It(f,"set",a,s,T):It(f,"add",a,s),this},delete(a){const s=se(this),{has:f,get:d}=Pr(s);let y=f.call(s,a);y?process.env.NODE_ENV!=="production"&&as(s,f,a):(a=se(a),y=f.call(s,a));const g=d?d.call(s,a):void 0,T=s.delete(a);return y&&It(s,"delete",a,void 0,g),T},clear(){const a=se(this),s=a.size!==0,f=process.env.NODE_ENV!=="production"?pn(a)?new Map(a):new Set(a):void 0,d=a.clear();return s&&It(a,"clear",void 0,void 0,f),d}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=Wl(a,e,t)}),n}function ro(e,t){const n=Ul(e,t);return(i,a,s)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(Ce(n,a)&&a in i?n:i,a,s)}const ql={get:ro(!1,!1)},Hl={get:ro(!0,!1)},zl={get:ro(!0,!0)};function as(e,t,n){const i=se(n);if(i!==n&&t.call(e,i)){const a=Ga(e);Dt(`Reactive ${a} contains both the raw and reactive versions of the same object${a==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ss=new WeakMap,Gl=new WeakMap,us=new WeakMap,cs=new WeakMap;function Yl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ql(e){return e.__v_skip||!Object.isExtensible(e)?0:Yl(Ga(e))}function ls(e){return Nt(e)?e:io(e,!1,Vl,ql,ss)}function fs(e){return io(e,!0,$l,Hl,us)}function Dr(e){return io(e,!0,Kl,zl,cs)}function io(e,t,n,i,a){if(!We(e))return process.env.NODE_ENV!=="production"&&Dt(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=a.get(e);if(s)return s;const f=Ql(e);if(f===0)return e;const d=new Proxy(e,f===2?i:n);return a.set(e,d),d}function vn(e){return Nt(e)?vn(e.__v_raw):!!(e&&e.__v_isReactive)}function Nt(e){return!!(e&&e.__v_isReadonly)}function Qe(e){return!!(e&&e.__v_isShallow)}function Ir(e){return e?!!e.__v_raw:!1}function se(e){const t=e&&e.__v_raw;return t?se(t):e}function Jl(e){return!Ce(e,"__v_skip")&&Object.isExtensible(e)&&Ol(e,"__v_skip",!0),e}const Je=e=>We(e)?ls(e):e,oo=e=>We(e)?fs(e):e;function Ue(e){return e?e.__v_isRef===!0:!1}function Xl(e){return Ue(e)?e.value:e}const Zl={get:(e,t,n)=>t==="__v_raw"?e:Xl(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const a=e[t];return Ue(a)&&!Ue(n)?(a.value=n,!0):Reflect.set(e,t,n,i)}};function ef(e){return vn(e)?e:new Proxy(e,Zl)}const Nr={},Rr=new WeakMap;let Qt;function tf(e,t=!1,n=Qt){if(n){let i=Rr.get(n);i||Rr.set(n,i=[]),i.push(e)}else process.env.NODE_ENV!=="production"&&!t&&Dt("onWatcherCleanup() was called when there was no active watcher to associate with.")}function nf(e,t,n=ot){const{immediate:i,deep:a,once:s,scheduler:f,augmentJob:d,call:y}=n,g=ne=>{(n.onWarn||Dt)("Invalid watch source: ",ne,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},T=ne=>a?ne:Qe(ne)||a===!1||a===0?Rt(ne,1):Rt(ne);let E,L,z,X,le=!1,qe=!1;if(Ue(e)?(L=()=>e.value,le=Qe(e)):vn(e)?(L=()=>T(e),le=!0):ye(e)?(qe=!0,le=e.some(ne=>vn(ne)||Qe(ne)),L=()=>e.map(ne=>{if(Ue(ne))return ne.value;if(vn(ne))return T(ne);if(Me(ne))return y?y(ne,2):ne();process.env.NODE_ENV!=="production"&&g(ne)})):Me(e)?t?L=y?()=>y(e,2):e:L=()=>{if(z){xr();try{z()}finally{Ar()}}const ne=Qt;Qt=E;try{return y?y(e,3,[X]):e(X)}finally{Qt=ne}}:(L=zt,process.env.NODE_ENV!=="production"&&g(e)),t&&a){const ne=L,Fe=a===!0?1/0:a;L=()=>Rt(ne(),Fe)}const Xe=()=>{E.stop()};if(s&&t){const ne=t;t=(...Fe)=>{ne(...Fe),Xe()}}let He=qe?new Array(e.length).fill(Nr):Nr;const gt=ne=>{if(!(!(E.flags&1)||!E.dirty&&!ne))if(t){const Fe=E.run();if(a||le||(qe?Fe.some((Be,Pe)=>Gt(Be,He[Pe])):Gt(Fe,He))){z&&z();const Be=Qt;Qt=E;try{const Pe=[Fe,He===Nr?void 0:qe&&He[0]===Nr?[]:He,X];y?y(t,3,Pe):t(...Pe),He=Fe}finally{Qt=Be}}}else E.run()};return d&&d(gt),E=new Tl(L),E.scheduler=f?()=>f(gt,!1):gt,X=ne=>tf(ne,!1,E),z=E.onStop=()=>{const ne=Rr.get(E);if(ne){if(y)y(ne,4);else for(const Fe of ne)Fe();Rr.delete(E)}},process.env.NODE_ENV!=="production"&&(E.onTrack=n.onTrack,E.onTrigger=n.onTrigger),t?i?gt(!0):He=E.run():f?f(gt.bind(null,!0),!0):E.run(),Xe.pause=E.pause.bind(E),Xe.resume=E.resume.bind(E),Xe.stop=Xe,Xe}function Rt(e,t=1/0,n){if(t<=0||!We(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ue(e))Rt(e.value,t,n);else if(ye(e))for(let i=0;i<e.length;i++)Rt(e[i],t,n);else if(bl(e)||pn(e))e.forEach(i=>{Rt(i,t,n)});else if(El(e)){for(const i in e)Rt(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Rt(e[i],t,n)}return e}/**
|
|
33
|
-
* @vue/runtime-core v3.5.12
|
|
34
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
35
|
-
* @license MIT
|
|
36
|
-
**/const Jt=[];function rf(e){Jt.push(e)}function of(){Jt.pop()}let ao=!1;function Ee(e,...t){if(ao)return;ao=!0,xr();const n=Jt.length?Jt[Jt.length-1].component:null,i=n&&n.appContext.config.warnHandler,a=af();if(i)Mr(i,n,11,[e+t.map(s=>{var f,d;return(d=(f=s.toString)==null?void 0:f.call(s))!=null?d:JSON.stringify(s)}).join(""),n&&n.proxy,a.map(({vnode:s})=>`at <${Rs(n,s.type)}>`).join(`
|
|
37
|
-
`),a]);else{const s=[`[Vue warn]: ${e}`,...t];a.length&&s.push(`
|
|
38
|
-
`,...sf(a)),console.warn(...s)}Ar(),ao=!1}function af(){let e=Jt[Jt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const i=e.component&&e.component.parent;e=i&&i.vnode}return t}function sf(e){const t=[];return e.forEach((n,i)=>{t.push(...i===0?[]:[`
|
|
39
|
-
`],...uf(n))}),t}function uf({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=e.component?e.component.parent==null:!1,a=` at <${Rs(e.component,e.type,i)}`,s=">"+n;return e.props?[a,...cf(e.props),s]:[a+s]}function cf(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...hs(i,e[i]))}),n.length>3&&t.push(" ..."),t}function hs(e,t,n){return ct(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ue(t)?(t=hs(e,se(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Me(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=se(t),n?t:[`${e}=`,t])}const ds={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Mr(e,t,n,i){try{return i?e(...i):e()}catch(a){so(a,t,n)}}function ps(e,t,n,i){if(Me(e)){const a=Mr(e,t,n,i);return a&&_l(a)&&a.catch(s=>{so(s,t,n)}),a}if(ye(e)){const a=[];for(let s=0;s<e.length;s++)a.push(ps(e[s],t,n,i));return a}else process.env.NODE_ENV!=="production"&&Ee(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function so(e,t,n,i=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:f}=t&&t.appContext.config||ot;if(t){let d=t.parent;const y=t.proxy,g=process.env.NODE_ENV!=="production"?ds[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;d;){const T=d.ec;if(T){for(let E=0;E<T.length;E++)if(T[E](e,y,g)===!1)return}d=d.parent}if(s){xr(),Mr(s,null,10,[e,y,g]),Ar();return}}lf(e,n,a,i,f)}function lf(e,t,n,i=!0,a=!1){if(process.env.NODE_ENV!=="production"){const s=ds[t];if(n&&rf(n),Ee(`Unhandled error${s?` during execution of ${s}`:""}`),n&&of(),i)throw e;console.error(e)}else{if(a)throw e;console.error(e)}}const at=[];let Et=-1;const yn=[];let Mt=null,mn=0;const gs=Promise.resolve();let kr=null;const ff=100;function hf(e){const t=kr||gs;return e?t.then(this?e.bind(this):e):t}function df(e){let t=Et+1,n=at.length;for(;t<n;){const i=t+n>>>1,a=at[i],s=Wn(a);s<e||s===e&&a.flags&2?t=i+1:n=i}return t}function uo(e){if(!(e.flags&1)){const t=Wn(e),n=at[at.length-1];!n||!(e.flags&2)&&t>=Wn(n)?at.push(e):at.splice(df(t),0,e),e.flags|=1,vs()}}function vs(){kr||(kr=gs.then(ms))}function ys(e){ye(e)?yn.push(...e):Mt&&e.id===-1?Mt.splice(mn+1,0,e):e.flags&1||(yn.push(e),e.flags|=1),vs()}function pf(e){if(yn.length){const t=[...new Set(yn)].sort((n,i)=>Wn(n)-Wn(i));if(yn.length=0,Mt){Mt.push(...t);return}for(Mt=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),mn=0;mn<Mt.length;mn++){const n=Mt[mn];process.env.NODE_ENV!=="production"&&bs(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Mt=null,mn=0}}const Wn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ms(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>bs(e,n):zt;try{for(Et=0;Et<at.length;Et++){const n=at[Et];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Mr(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Et<at.length;Et++){const n=at[Et];n&&(n.flags&=-2)}Et=-1,at.length=0,pf(e),kr=null,(at.length||yn.length)&&ms(e)}}function bs(e,t){const n=e.get(t)||0;if(n>ff){const i=t.i,a=i&&Ns(i.type);return so(`Maximum recursive updates exceeded${a?` in component <${a}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const co=new Map;process.env.NODE_ENV!=="production"&&(Or().__VUE_HMR_RUNTIME__={createRecord:lo(gf),rerender:lo(vf),reload:lo(yf)});const jr=new Map;function gf(e,t){return jr.has(e)?!1:(jr.set(e,{initialDef:Lr(t),instances:new Set}),!0)}function Lr(e){return Ms(e)?e.__vccOpts:e}function vf(e,t){const n=jr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(i=>{t&&(i.render=t,Lr(i.type).render=t),i.renderCache=[],i.update()}))}function yf(e,t){const n=jr.get(e);if(!n)return;t=Lr(t),_s(n.initialDef,t);const i=[...n.instances];for(let a=0;a<i.length;a++){const s=i[a],f=Lr(s.type);let d=co.get(f);d||(f!==n.initialDef&&_s(f,t),co.set(f,d=new Set)),d.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(d.add(s),s.ceReload(t.styles),d.delete(s)):s.parent?uo(()=>{s.parent.update(),d.delete(s)}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(f)}ys(()=>{co.clear()})}function _s(e,t){Ye(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function lo(e){return(t,n)=>{try{return e(t,n)}catch(i){console.error(i),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let bn,Fr=[];function ws(e,t){var n,i;bn=e,bn?(bn.enabled=!0,Fr.forEach(({event:a,args:s})=>bn.emit(a,...s)),Fr=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{ws(s,t)}),setTimeout(()=>{bn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Fr=[])},3e3)):Fr=[]}let St=null,mf=null;const bf=e=>e.__isTeleport;function Es(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Es(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}Or().requestIdleCallback,Or().cancelIdleCallback;const _f=Symbol.for("v-ndc"),fo=e=>e?Yf(e)?Qf(e):fo(e.parent):null,Un=Ye(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?Dr(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?Dr(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?Dr(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?Dr(e.refs):e.refs,$parent:e=>fo(e.parent),$root:e=>fo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>__VUE_OPTIONS_API__?Of(e):e.type,$forceUpdate:e=>e.f||(e.f=()=>{uo(e.update)}),$nextTick:e=>e.n||(e.n=hf.bind(e.proxy)),$watch:e=>__VUE_OPTIONS_API__?kf.bind(e):zt}),wf=e=>e==="_"||e==="$",ho=(e,t)=>e!==ot&&!e.__isScriptSetup&&Ce(e,t),Ef={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:a,props:s,accessCache:f,type:d,appContext:y}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;let g;if(t[0]!=="$"){const z=f[t];if(z!==void 0)switch(z){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return s[t]}else{if(ho(i,t))return f[t]=1,i[t];if(a!==ot&&Ce(a,t))return f[t]=2,a[t];if((g=e.propsOptions[0])&&Ce(g,t))return f[t]=3,s[t];if(n!==ot&&Ce(n,t))return f[t]=4,n[t];(!__VUE_OPTIONS_API__||Sf)&&(f[t]=0)}}const T=Un[t];let E,L;if(T)return t==="$attrs"?(Te(e.attrs,"get",""),process.env.NODE_ENV!=="production"&&void 0):process.env.NODE_ENV!=="production"&&t==="$slots"&&Te(e,"get",t),T(e);if((E=d.__cssModules)&&(E=E[t]))return E;if(n!==ot&&Ce(n,t))return f[t]=4,n[t];if(L=y.config.globalProperties,Ce(L,t))return L[t];process.env.NODE_ENV!=="production"&&St&&(!ct(t)||t.indexOf("__v")!==0)&&(a!==ot&&wf(t[0])&&Ce(a,t)?Ee(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===St&&Ee(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:i,setupState:a,ctx:s}=e;return ho(a,t)?(a[t]=n,!0):process.env.NODE_ENV!=="production"&&a.__isScriptSetup&&Ce(a,t)?(Ee(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==ot&&Ce(i,t)?(i[t]=n,!0):Ce(e.props,t)?(process.env.NODE_ENV!=="production"&&Ee(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&Ee(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,propsOptions:s}},f){let d;return!!n[f]||e!==ot&&Ce(e,f)||ho(t,f)||(d=s[0])&&Ce(d,f)||Ce(i,f)||Ce(Un,f)||Ce(a.config.globalProperties,f)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};process.env.NODE_ENV!=="production"&&(Ef.ownKeys=e=>(Ee("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function Ss(e){return ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Sf=!0;function Of(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:a,optionsCache:s,config:{optionMergeStrategies:f}}=e.appContext,d=s.get(t);let y;return d?y=d:!a.length&&!n&&!i?y=t:(y={},a.length&&a.forEach(g=>Br(y,g,f,!0)),Br(y,t,f)),We(t)&&s.set(t,y),y}function Br(e,t,n,i=!1){const{mixins:a,extends:s}=t;s&&Br(e,s,n,!0),a&&a.forEach(f=>Br(e,f,n,!0));for(const f in t)if(i&&f==="expose")process.env.NODE_ENV!=="production"&&Ee('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const d=xf[f]||n&&n[f];e[f]=d?d(e[f],t[f]):t[f]}return e}const xf={data:Os,props:As,emits:As,methods:qn,computed:qn,beforeCreate:Le,created:Le,beforeMount:Le,mounted:Le,beforeUpdate:Le,updated:Le,beforeDestroy:Le,beforeUnmount:Le,destroyed:Le,unmounted:Le,activated:Le,deactivated:Le,errorCaptured:Le,serverPrefetch:Le,components:qn,directives:qn,watch:Cf,provide:Os,inject:Af};function Os(e,t){return t?e?function(){return Ye(Me(e)?e.call(this,this):e,Me(t)?t.call(this,this):t)}:t:e}function Af(e,t){return qn(xs(e),xs(t))}function xs(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Le(e,t){return e?[...new Set([].concat(e,t))]:t}function qn(e,t){return e?Ye(Object.create(null),e,t):t}function As(e,t){return e?ye(e)&&ye(t)?[...new Set([...e,...t])]:Ye(Object.create(null),Ss(e),Ss(t??{})):t}function Cf(e,t){if(!e)return t;if(!t)return e;const n=Ye(Object.create(null),e);for(const i in t)n[i]=Le(e[i],t[i]);return n}let Pf=null;function Tf(e,t,n=!1){const i=Kr||St;if(i||Pf){const a=i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&Me(t)?t.call(i&&i.proxy):t;process.env.NODE_ENV!=="production"&&Ee(`injection "${String(e)}" not found.`)}else process.env.NODE_ENV!=="production"&&Ee("inject() can only be used inside setup() or functional components.")}const Df={},Cs=e=>Object.getPrototypeOf(e)===Df,If=Ff,Nf=Symbol.for("v-scx"),Rf=()=>{{const e=Tf(Nf);return e||process.env.NODE_ENV!=="production"&&Ee("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Mf(e,t,n=ot){const{immediate:i,deep:a,flush:s,once:f}=n;process.env.NODE_ENV!=="production"&&!t&&(i!==void 0&&Ee('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),a!==void 0&&Ee('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),f!==void 0&&Ee('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const d=Ye({},n);process.env.NODE_ENV!=="production"&&(d.onWarn=Ee);const y=t&&i||!t&&s!=="post";let g;if(vo){if(s==="sync"){const z=Rf();g=z.__watcherHandles||(z.__watcherHandles=[])}else if(!y){const z=()=>{};return z.stop=zt,z.resume=zt,z.pause=zt,z}}const T=Kr;d.call=(z,X,le)=>ps(z,T,X,le);let E=!1;s==="post"?d.scheduler=z=>{If(z,T&&T.suspense)}:s!=="sync"&&(E=!0,d.scheduler=(z,X)=>{X?z():uo(z)}),d.augmentJob=z=>{t&&(z.flags|=4),E&&(z.flags|=2,T&&(z.id=T.uid,z.i=T))};const L=nf(e,t,d);return vo&&(g?g.push(L):y&&L()),L}function kf(e,t,n){const i=this.proxy,a=ct(e)?e.includes(".")?jf(i,e):()=>i[e]:e.bind(i,i);let s;Me(t)?s=t:(s=t.handler,n=t);const f=Gf(this),d=Mf(a,s.bind(i),n);return f(),d}function jf(e,t){const n=t.split(".");return()=>{let i=e;for(let a=0;a<n.length&&i;a++)i=i[n[a]];return i}}function Nd(){}const Lf=e=>e.__isSuspense;function Ff(e,t){t&&t.pendingBranch?ye(e)?t.effects.push(...e):t.effects.push(e):ys(e)}const Ps=Symbol.for("v-fgt"),Bf=Symbol.for("v-txt"),Vf=Symbol.for("v-cmt");let _n=null;function $f(e){return e?e.__v_isVNode===!0:!1}const Kf=(...e)=>Ds(...e),Ts=({key:e})=>e??null,Vr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ct(e)||Ue(e)||Me(e)?{i:St,r:e,k:t,f:!!n}:e:null);function Wf(e,t=null,n=null,i=0,a=null,s=e===Ps?0:1,f=!1,d=!1){const y={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ts(t),ref:t&&Vr(t),scopeId:mf,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:St};return d?(po(y,n),s&128&&e.normalize(y)):n&&(y.shapeFlag|=ct(n)?8:16),process.env.NODE_ENV!=="production"&&y.key!==y.key&&Ee("VNode created with invalid key (NaN). VNode type:",y.type),!f&&_n&&(y.patchFlag>0||s&6)&&y.patchFlag!==32&&_n.push(y),y}const Uf=process.env.NODE_ENV!=="production"?Kf:Ds;function Ds(e,t=null,n=null,i=0,a=null,s=!1){if((!e||e===_f)&&(process.env.NODE_ENV!=="production"&&!e&&Ee(`Invalid vnode type when creating vnode: ${e}.`),e=Vf),$f(e)){const d=$r(e,t,!0);return n&&po(d,n),!s&&_n&&(d.shapeFlag&6?_n[_n.indexOf(e)]=d:_n.push(d)),d.patchFlag=-2,d}if(Ms(e)&&(e=e.__vccOpts),t){t=qf(t);let{class:d,style:y}=t;d&&!ct(d)&&(t.class=qi(d)),We(y)&&(Ir(y)&&!ye(y)&&(y=Ye({},y)),t.style=Ui(y))}const f=ct(e)?1:Lf(e)?128:bf(e)?64:We(e)?4:Me(e)?2:0;return process.env.NODE_ENV!=="production"&&f&4&&Ir(e)&&(e=se(e),Ee("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
40
|
-
Component that was made reactive: `,e)),Wf(e,t,n,i,a,f,s,!0)}function qf(e){return e?Ir(e)||Cs(e)?Ye({},e):e:null}function $r(e,t,n=!1,i=!1){const{props:a,ref:s,patchFlag:f,children:d,transition:y}=e,g=t?zf(a||{},t):a,T={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Ts(g),ref:t&&t.ref?n&&s?ye(s)?s.concat(Vr(t)):[s,Vr(t)]:Vr(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&f===-1&&ye(d)?d.map(Is):d,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ps?f===-1?16:f|16:f,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:y,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$r(e.ssContent),ssFallback:e.ssFallback&&$r(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return y&&i&&Es(T,y.clone(T)),T}function Is(e){const t=$r(e);return ye(e.children)&&(t.children=e.children.map(Is)),t}function Hf(e=" ",t=0){return Uf(Bf,null,e,t)}function po(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(ye(t))n=16;else if(typeof t=="object")if(i&65){const a=t.default;a&&(a._c&&(a._d=!1),po(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!Cs(t)?t._ctx=St:a===3&&St&&(St.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Me(t)?(t={default:t,_ctx:St},n=32):(t=String(t),i&64?(n=16,t=[Hf(t)]):n=8);e.children=t,e.shapeFlag|=n}function zf(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const a in i)if(a==="class")t.class!==i.class&&(t.class=qi([t.class,i.class]));else if(a==="style")t.style=Ui([t.style,i.style]);else if(yl(a)){const s=t[a],f=i[a];f&&s!==f&&!(ye(s)&&s.includes(f))&&(t[a]=s?[].concat(s,f):f)}else a!==""&&(t[a]=i[a])}return t}let Kr=null,go;{const e=Or(),t=(n,i)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(i),s=>{a.length>1?a.forEach(f=>f(s)):a[0](s)}};go=t("__VUE_INSTANCE_SETTERS__",n=>Kr=n),t("__VUE_SSR_SETTERS__",n=>vo=n)}const Gf=e=>{const t=Kr;return go(e),e.scope.on(),()=>{e.scope.off(),go(t)}};function Yf(e){return e.vnode.shapeFlag&4}let vo=!1;process.env.NODE_ENV;function Qf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ef(Jl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Un)return Un[n](e)},has(t,n){return n in t||n in Un}})):e.proxy}const Jf=/(?:^|[-_])(\w)/g,Xf=e=>e.replace(Jf,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ns(e,t=!0){return Me(e)?e.displayName||e.name:e.name||t&&e.__name}function Rs(e,t,n=!1){let i=Ns(t);if(!i&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(i=a[1])}if(!i&&e&&e.parent){const a=s=>{for(const f in s)if(s[f]===t)return f};i=a(e.components||e.parent.type.components)||a(e.appContext.components)}return i?Xf(i):n?"App":"Anonymous"}function Ms(e){return Me(e)&&"__vccOpts"in e}function Zf(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},i={style:"color:#eb2f96"},a={__vue_custom_formatter:!0,header(E){return We(E)?E.__isVue?["div",e,"VueInstance"]:Ue(E)?["div",{},["span",e,T(E)],"<",d("_value"in E?E._value:E),">"]:vn(E)?["div",{},["span",e,Qe(E)?"ShallowReactive":"Reactive"],"<",d(E),`>${Nt(E)?" (readonly)":""}`]:Nt(E)?["div",{},["span",e,Qe(E)?"ShallowReadonly":"Readonly"],"<",d(E),">"]:null:null},hasBody(E){return E&&E.__isVue},body(E){if(E&&E.__isVue)return["div",{},...s(E.$)]}};function s(E){const L=[];E.type.props&&E.props&&L.push(f("props",se(E.props))),E.setupState!==ot&&L.push(f("setup",E.setupState)),E.data!==ot&&L.push(f("data",se(E.data)));const z=y(E,"computed");z&&L.push(f("computed",z));const X=y(E,"inject");return X&&L.push(f("injected",X)),L.push(["div",{},["span",{style:i.style+";opacity:0.66"},"$ (internal): "],["object",{object:E}]]),L}function f(E,L){return L=Ye({},L),Object.keys(L).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},E],["div",{style:"padding-left:1.25em"},...Object.keys(L).map(z=>["div",{},["span",i,z+": "],d(L[z],!1)])]]:["span",{}]}function d(E,L=!0){return typeof E=="number"?["span",t,E]:typeof E=="string"?["span",n,JSON.stringify(E)]:typeof E=="boolean"?["span",i,E]:We(E)?["object",{object:L?se(E):E}]:["span",n,String(E)]}function y(E,L){const z=E.type;if(Me(z))return;const X={};for(const le in E.ctx)g(z,le,L)&&(X[le]=E.ctx[le]);return X}function g(E,L,z){const X=E[z];if(ye(X)&&X.includes(L)||We(X)&&L in X||E.extends&&g(E.extends,L,z)||E.mixins&&E.mixins.some(le=>g(le,L,z)))return!0}function T(E){return Qe(E)?"ShallowRef":E.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(a):window.devtoolsFormatters=[a]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;/**
|
|
41
|
-
* vue v3.5.12
|
|
42
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
43
|
-
* @license MIT
|
|
44
|
-
**/function eh(){Zf()}process.env.NODE_ENV!=="production"&&eh();class yo{constructor(t){this.jsonld=t}getIdentifier(){return this.jsonld.identifier}setIdentifier(t){this.jsonld.identifier=t}getName(){return this.jsonld.name}setName(t){this.jsonld.name=t}getText(){return this.jsonld.text}setText(t){this.jsonld.text=t}get(t){return this.jsonld[t]}set(t,n){this.jsonld[t]=n}getSource(){return this.jsonld}}class wn{constructor(t="",n="",i="",a=""){this.mode="",this.headline="",this.headlineRaw="",this.document=new yo({}),this.source=i,this.syntax=a,this.html="",this.name=n,this.id=t,this.css=[],this.js=[],this.version=""}toObject(){return{id:this.id,name:this.name,source:this.source,syntax:this.syntax,html:this.html,document:this.document.getSource(),css:this.css,js:this.js,version:this.version}}fromObject(t){this.id=t.id,this.name=t.name,this.source=t.source,this.syntax=t.syntax,this.html=t.html,this.document=new yo(t.document),this.css=t.css,this.js=t.js,this.version=t.version}}var th=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,rh=(e,t,n,i)=>{for(var a=i>1?void 0:i?nh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&th(t,n,a),a},ih=(e,t)=>(n,i)=>t(n,i,e);let Hn=class{constructor(e){this.logger=e,this.logger.setModule("storage.components.defaultWikiStorage"),this.offlineSetup=!1}setConfig(e,t,n,i,a,s,f,d){this.name=e,this.baseURL=t,this.baseRestURL=n,this.realtimeURL=d==null?void 0:d.realtimeURL,this.homePage=i,this.serverRendering=a,this.designSystem=s,this.offline=f}setConfigFromObject(e){this.name=e.name,this.baseURL=e.baseURL,this.baseRestURL=e.baseRestURL,this.realtimeURL=e.realtimeURL,this.homePage=e.homePage,this.serverRendering=e.serverRendering,this.offline=e.offline,this.designSystem=e.designSystem}setupOfflineStorage(){if(this.logger.debug("Checking offline storage"),this.offline&&this.cristal){this.logger.debug("Looking for wrapping offline storage");const e=this.cristal.getContainer().get("WrappingStorage");e?(this.logger.debug("Offline local storage is ready"),e.setStorage(this.storage),e.setWikiConfig(this.storage.getWikiConfig()),this.storage=e):this.logger.debug("Failed Looking for wrapping offline storage")}else this.cristal||this.logger.debug("Cristal not initialized"),this.offline||this.logger.debug("Offline mode not activated")}isSupported(e){return e=="html"}initialize(){this.offline&&!this.offlineSetup&&(this.setupOfflineStorage(),this.offlineSetup=!0,this.storage.isStorageReady())}defaultPageName(){return"index"}getType(){return"Default"}getNewPageDefaultName(){return"newpage"}};Hn=rh([Re(),ih(0,Oe("Logger"))],Hn);var oh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,sh=(e,t,n,i)=>{for(var a=i>1?void 0:i?ah(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&oh(t,n,a),a},ks=(e,t)=>(n,i)=>t(n,i,e);let Wr=class{constructor(e){this.loggerConfig=e}setModule(e){this.module=e}debug(...e){(!this.loggerConfig||this.loggerConfig.hasLevelId(this.module,4))&&e.unshift(this.module+":"),console.debug.apply(null,e)}info(...e){e.unshift(this.module+":"),console.info.apply(null,e)}warn(...e){e.unshift(this.module+":"),console.warn.apply(null,e)}error(...e){e.unshift(this.module+":"),console.error.apply(null,e)}};Wr=sh([Re(),ks(0,Oe("LoggerConfig")),ks(0,il())],Wr);var uh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,lh=(e,t,n,i)=>{for(var a=i>1?void 0:i?ch(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&uh(t,n,a),a};let mo=class{constructor(e="error"){this.levels=new Map,this.config=new Map,this.defaultLevel=e,this.computedConfig=new Map,this.levels.set("error",1),this.levels.set("warn",2),this.levels.set("info",3),this.levels.set("debug",4)}addLevel(e,t){const n=this.levels.get(t);n!=null&&this.config.forEach(i=>{if(i.startsWith(e)){const a=this.computedConfig.get(i);(a==null||n&&n>a)&&n&&this.computedConfig.set(i,n)}})}getLevels(){return this.config}getLevel(e){let t=this.config.get(e);return t||(t=this.defaultLevel),t}getLevelId(e){const t=this.levels.get(e);return t||10}setDefaultLevel(e){this.defaultLevel=e,this.defaultLevelId=this.getLevelId(this.defaultLevel)}getDefaultLevel(){return this.defaultLevel}getDefaultLevelId(){return this.defaultLevelId?this.defaultLevelId:(this.defaultLevelId=this.getLevelId(this.defaultLevel),this.defaultLevelId)}hasLevel(e,t){let n=this.computedConfig.get(e);n||(n=this.getDefaultLevelId());const i=this.getLevelId(t);return!!(i&&n>=i)}hasLevelId(e,t){let n=this.computedConfig.get(e);n||(n=this.getDefaultLevelId());const i=t;return!!(i&&n>=i)}};mo=lh([Re()],mo);class fh{constructor(t){this.extensionList=t}getLogger(t){let n=this.container.get("Logger");return n||(n=new Wr),n.setModule(t),n}async loadExtensionManager(t){var a,s,f,d,y,g;const n="extension-manager",i="/apps/"+n+"/main.bundle.dev.js";try{if(t)(a=this.logger)==null||a.debug("Loading static extension Manager"),new gl(this.container);else{(s=this.logger)==null||s.debug("Dynamic extension Manager. Ready to import ",i);const T=await import(i);if(T!=null){(f=this.logger)==null||f.debug("Found components Init for ",n,T);const E=T.ComponentInit;new E(this.container),(d=this.logger)==null||d.debug("Succesfull components Init for ",n)}else(y=this.logger)==null||y.debug("No components to load for ",n)}}catch(T){(g=this.logger)==null||g.error("Exception while loading extension Manager from ",i,T)}}async loadExtensions(t,n){var a,s,f,d;(a=this.logger)==null||a.debug("Start app"),await this.loadExtensionManager(t);const i=this.container.get("ExtensionManager");if((s=this.logger)==null||s.debug("Extension Manager is ",i),i!=null){if(!n){i.setRemoteExtensionsConfig("/apps/","main.bundle.dev.js");for(const y in this.extensionList)i.addRemoteExtension(y,"",!0);await i.loadExtensions(this.container)}(f=this.logger)==null||f.debug("After extensions loading")}else(d=this.logger)==null||d.debug("Could not start extension Manager");return i}initializeContainer(){var n;this.container=new Jc,this.container.bind("LoggerConfig").to(mo).inSingletonScope(),this.container.bind("Logger").to(Wr);const t=this.container.get("LoggerConfig");t&&t.setDefaultLevel("debug"),this.logger=this.getLogger("index.ts"),(n=this.logger)==null||n.info("Logging initialized")}getConfigFromPathName(t){let n="";if(t.startsWith("/")){const i=t.indexOf("/",1);i!=-1&&(n=t.substring(1,i))}return(n==null||n=="")&&(n="XWiki"),n}}var js={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Er,function(){var n=function(r,o){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&(u[l]=c[l])})(r,o)},i=function(){return(i=Object.assign||function(r){for(var o,u=1,c=arguments.length;u<c;u++)for(var l in o=arguments[u])Object.prototype.hasOwnProperty.call(o,l)&&(r[l]=o[l]);return r}).apply(this,arguments)};function a(r,o,u){for(var c,l=0,h=o.length;l<h;l++)!c&&l in o||((c=c||Array.prototype.slice.call(o,0,l))[l]=o[l]);return r.concat(c||Array.prototype.slice.call(o))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Er,f=Object.keys,d=Array.isArray;function y(r,o){return typeof o!="object"||f(o).forEach(function(u){r[u]=o[u]}),r}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var g=Object.getPrototypeOf,T={}.hasOwnProperty;function E(r,o){return T.call(r,o)}function L(r,o){typeof o=="function"&&(o=o(g(r))),(typeof Reflect>"u"?f:Reflect.ownKeys)(o).forEach(function(u){X(r,u,o[u])})}var z=Object.defineProperty;function X(r,o,u,c){z(r,o,y(u&&E(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},c))}function le(r){return{from:function(o){return r.prototype=Object.create(o.prototype),X(r.prototype,"constructor",r),{extend:L.bind(null,r.prototype)}}}}var qe=Object.getOwnPropertyDescriptor,Xe=[].slice;function He(r,o,u){return Xe.call(r,o,u)}function gt(r,o){return o(r)}function ne(r){if(!r)throw new Error("Assertion Failed")}function Fe(r){s.setImmediate?setImmediate(r):setTimeout(r,0)}function Be(r,o){if(typeof o=="string"&&E(r,o))return r[o];if(!o)return r;if(typeof o!="string"){for(var u=[],c=0,l=o.length;c<l;++c){var h=Be(r,o[c]);u.push(h)}return u}var p=o.indexOf(".");if(p!==-1){var v=r[o.substr(0,p)];return v==null?void 0:Be(v,o.substr(p+1))}}function Pe(r,o,u){if(r&&o!==void 0&&!("isFrozen"in Object&&Object.isFrozen(r)))if(typeof o!="string"&&"length"in o){ne(typeof u!="string"&&"length"in u);for(var c=0,l=o.length;c<l;++c)Pe(r,o[c],u[c])}else{var h,p,v=o.indexOf(".");v!==-1?(h=o.substr(0,v),(p=o.substr(v+1))===""?u===void 0?d(r)&&!isNaN(parseInt(h))?r.splice(h,1):delete r[h]:r[h]=u:Pe(v=!(v=r[h])||!E(r,h)?r[h]={}:v,p,u)):u===void 0?d(r)&&!isNaN(parseInt(o))?r.splice(o,1):delete r[o]:r[o]=u}}function zr(r){var o,u={};for(o in r)E(r,o)&&(u[o]=r[o]);return u}var Ro=[].concat;function Gr(r){return Ro.apply([],r)}var Pt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Gr([8,16,32,64].map(function(r){return["Int","Uint","Float"].map(function(o){return o+r+"Array"})}))).filter(function(r){return s[r]}),Yr=new Set(Pt.map(function(r){return s[r]})),Zt=null;function Ot(r){return Zt=new WeakMap,r=function o(u){if(!u||typeof u!="object")return u;var c=Zt.get(u);if(c)return c;if(d(u)){c=[],Zt.set(u,c);for(var l=0,h=u.length;l<h;++l)c.push(o(u[l]))}else if(Yr.has(u.constructor))c=u;else{var p,v=g(u);for(p in c=v===Object.prototype?{}:Object.create(v),Zt.set(u,c),u)E(u,p)&&(c[p]=o(u[p]))}return c}(r),Zt=null,r}var Qr={}.toString;function en(r){return Qr.call(r).slice(8,-1)}var En=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Jr=typeof En=="symbol"?function(r){var o;return r!=null&&(o=r[En])&&o.apply(r)}:function(){return null};function vt(r,o){return o=r.indexOf(o),0<=o&&r.splice(o,1),0<=o}var xt={};function st(r){var o,u,c,l;if(arguments.length===1){if(d(r))return r.slice();if(this===xt&&typeof r=="string")return[r];if(l=Jr(r)){for(u=[];!(c=l.next()).done;)u.push(c.value);return u}if(r==null)return[r];if(typeof(o=r.length)!="number")return[r];for(u=new Array(o);o--;)u[o]=r[o];return u}for(o=arguments.length,u=new Array(o);o--;)u[o]=arguments[o];return u}var Sn=typeof Symbol<"u"?function(r){return r[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},rn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ut=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(rn),J={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 Ze(r,o){this.name=r,this.message=o}function Xr(r,o){return r+". Errors: "+Object.keys(o).map(function(u){return o[u].toString()}).filter(function(u,c,l){return l.indexOf(u)===c}).join(`
|
|
45
|
-
`)}function me(r,o,u,c){this.failures=o,this.failedKeys=c,this.successCount=u,this.message=Xr(r,o)}function kt(r,o){this.name="BulkError",this.failures=Object.keys(o).map(function(u){return o[u]}),this.failuresByPos=o,this.message=Xr(r,this.failures)}le(Ze).from(Error).extend({toString:function(){return this.name+": "+this.message}}),le(me).from(Ze),le(kt).from(Ze);var Gn=ut.reduce(function(r,o){return r[o]=o+"Error",r},{}),Zr=Ze,Q=ut.reduce(function(r,o){var u=o+"Error";function c(l,h){this.name=u,l?typeof l=="string"?(this.message="".concat(l).concat(h?`
|
|
46
|
-
`+h:""),this.inner=h||null):typeof l=="object"&&(this.message="".concat(l.name," ").concat(l.message),this.inner=l):(this.message=J[o]||u,this.inner=null)}return le(c).from(Zr),r[o]=c,r},{});Q.Syntax=SyntaxError,Q.Type=TypeError,Q.Range=RangeError;var et=rn.reduce(function(r,o){return r[o+"Error"]=Q[o],r},{}),tn=ut.reduce(function(r,o){return["Syntax","Type","Range"].indexOf(o)===-1&&(r[o+"Error"]=Q[o]),r},{});function ue(){}function jt(r){return r}function Mo(r,o){return r==null||r===jt?o:function(u){return o(r(u))}}function ft(r,o){return function(){r.apply(this,arguments),o.apply(this,arguments)}}function ei(r,o){return r===ue?o:function(){var u=r.apply(this,arguments);u!==void 0&&(arguments[0]=u);var c=this.onsuccess,l=this.onerror;this.onsuccess=null,this.onerror=null;var h=o.apply(this,arguments);return c&&(this.onsuccess=this.onsuccess?ft(c,this.onsuccess):c),l&&(this.onerror=this.onerror?ft(l,this.onerror):l),h!==void 0?h:u}}function ti(r,o){return r===ue?o:function(){r.apply(this,arguments);var u=this.onsuccess,c=this.onerror;this.onsuccess=this.onerror=null,o.apply(this,arguments),u&&(this.onsuccess=this.onsuccess?ft(u,this.onsuccess):u),c&&(this.onerror=this.onerror?ft(c,this.onerror):c)}}function ni(r,o){return r===ue?o:function(u){var c=r.apply(this,arguments);y(u,c);var l=this.onsuccess,h=this.onerror;return this.onsuccess=null,this.onerror=null,u=o.apply(this,arguments),l&&(this.onsuccess=this.onsuccess?ft(l,this.onsuccess):l),h&&(this.onerror=this.onerror?ft(h,this.onerror):h),c===void 0?u===void 0?void 0:u:y(c,u)}}function ri(r,o){return r===ue?o:function(){return o.apply(this,arguments)!==!1&&r.apply(this,arguments)}}function On(r,o){return r===ue?o:function(){var u=r.apply(this,arguments);if(u&&typeof u.then=="function"){for(var c=this,l=arguments.length,h=new Array(l);l--;)h[l]=arguments[l];return u.then(function(){return o.apply(c,h)})}return o.apply(this,arguments)}}tn.ModifyError=me,tn.DexieError=Ze,tn.BulkError=kt;var ze=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ii(r){ze=r}var nn={},oi=100,Pt=typeof Promise>"u"?[]:function(){var r=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[r,g(r),r];var o=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[o,g(o),r]}(),rn=Pt[0],ut=Pt[1],Pt=Pt[2],ut=ut&&ut.then,ht=rn&&rn.constructor,Yn=!!Pt,on=function(r,o){be.push([r,o]),Lt&&(queueMicrotask(tt),Lt=!1)},Qn=!0,Lt=!0,P=[],I=[],j=jt,K={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ue,pgp:!1,env:{},finalize:ue},F=K,be=[],pe=0,ee=[];function N(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var o=this._PSD=F;if(typeof r!="function"){if(r!==nn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Y(this,this._value))}this._state=null,this._value=null,++o.ref,function u(c,l){try{l(function(h){if(c._state===null){if(h===c)throw new TypeError("A promise cannot be resolved with itself.");var p=c._lib&&At();h&&typeof h.then=="function"?u(c,function(v,w){h instanceof N?h._then(v,w):h.then(v,w)}):(c._state=!0,c._value=h,re(c)),p&&Ft()}},Y.bind(null,c))}catch(h){Y(c,h)}}(this,r)}var H={get:function(){var r=F,o=ci;function u(c,l){var h=this,p=!r.global&&(r!==F||o!==ci),v=p&&!Vt(),w=new N(function(b,x){de(h,new G($s(c,r,p,v),$s(l,r,p,v),b,x,r))});return this._consoleTask&&(w._consoleTask=this._consoleTask),w}return u.prototype=nn,u},set:function(r){X(this,"then",r&&r.prototype===nn?H:{get:function(){return r},set:H.set})}};function G(r,o,u,c,l){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof o=="function"?o:null,this.resolve=u,this.reject=c,this.psd=l}function Y(r,o){var u,c;I.push(o),r._state===null&&(u=r._lib&&At(),o=j(o),r._state=!1,r._value=o,c=r,P.some(function(l){return l._value===c._value})||P.push(c),re(r),u&&Ft())}function re(r){var o=r._listeners;r._listeners=[];for(var u=0,c=o.length;u<c;++u)de(r,o[u]);var l=r._PSD;--l.ref||l.finalize(),pe===0&&(++pe,on(function(){--pe==0&&Jn()},[]))}function de(r,o){if(r._state!==null){var u=r._state?o.onFulfilled:o.onRejected;if(u===null)return(r._state?o.resolve:o.reject)(r._value);++o.psd.ref,++pe,on(we,[u,r,o])}else r._listeners.push(o)}function we(r,o,u){try{var c,l=o._value;!o._state&&I.length&&(I=[]),c=ze&&o._consoleTask?o._consoleTask.run(function(){return r(l)}):r(l),o._state||I.indexOf(l)!==-1||function(h){for(var p=P.length;p;)if(P[--p]._value===h._value)return P.splice(p,1)}(o),u.resolve(c)}catch(h){u.reject(h)}finally{--pe==0&&Jn(),--u.psd.ref||u.psd.finalize()}}function tt(){an(K,function(){At()&&Ft()})}function At(){var r=Qn;return Lt=Qn=!1,r}function Ft(){var r,o,u;do for(;0<be.length;)for(r=be,be=[],u=r.length,o=0;o<u;++o){var c=r[o];c[0].apply(null,c[1])}while(0<be.length);Lt=Qn=!0}function Jn(){var r=P;P=[],r.forEach(function(c){c._PSD.onunhandled.call(null,c._value,c)});for(var o=ee.slice(0),u=o.length;u;)o[--u]()}function ai(r){return new N(nn,!1,r)}function _e(r,o){var u=F;return function(){var c=At(),l=F;try{return $t(u,!0),r.apply(this,arguments)}catch(h){o&&o(h)}finally{$t(l,!1),c&&Ft()}}}L(N.prototype,{then:H,_then:function(r,o){de(this,new G(null,null,r,o,F))},catch:function(r){if(arguments.length===1)return this.then(null,r);var o=r,u=arguments[1];return typeof o=="function"?this.then(null,function(c){return(c instanceof o?u:ai)(c)}):this.then(null,function(c){return(c&&c.name===o?u:ai)(c)})},finally:function(r){return this.then(function(o){return N.resolve(r()).then(function(){return o})},function(o){return N.resolve(r()).then(function(){return ai(o)})})},timeout:function(r,o){var u=this;return r<1/0?new N(function(c,l){var h=setTimeout(function(){return l(new Q.Timeout(o))},r);u.then(c,l).finally(clearTimeout.bind(null,h))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&X(N.prototype,Symbol.toStringTag,"Dexie.Promise"),K.env=Vs(),L(N,{all:function(){var r=st.apply(null,arguments).map(li);return new N(function(o,u){r.length===0&&o([]);var c=r.length;r.forEach(function(l,h){return N.resolve(l).then(function(p){r[h]=p,--c||o(r)},u)})})},resolve:function(r){return r instanceof N?r:r&&typeof r.then=="function"?new N(function(o,u){r.then(o,u)}):new N(nn,!0,r)},reject:ai,race:function(){var r=st.apply(null,arguments).map(li);return new N(function(o,u){r.map(function(c){return N.resolve(c).then(o,u)})})},PSD:{get:function(){return F},set:function(r){return F=r}},totalEchoes:{get:function(){return ci}},newPSD:Bt,usePSD:an,scheduler:{get:function(){return on},set:function(r){on=r}},rejectionMapper:{get:function(){return j},set:function(r){j=r}},follow:function(r,o){return new N(function(u,c){return Bt(function(l,h){var p=F;p.unhandleds=[],p.onunhandled=h,p.finalize=ft(function(){var v,w=this;v=function(){w.unhandleds.length===0?l():h(w.unhandleds[0])},ee.push(function b(){v(),ee.splice(ee.indexOf(b),1)}),++pe,on(function(){--pe==0&&Jn()},[])},p.finalize),r()},o,u,c)})}}),ht&&(ht.allSettled&&X(N,"allSettled",function(){var r=st.apply(null,arguments).map(li);return new N(function(o){r.length===0&&o([]);var u=r.length,c=new Array(u);r.forEach(function(l,h){return N.resolve(l).then(function(p){return c[h]={status:"fulfilled",value:p}},function(p){return c[h]={status:"rejected",reason:p}}).then(function(){return--u||o(c)})})})}),ht.any&&typeof AggregateError<"u"&&X(N,"any",function(){var r=st.apply(null,arguments).map(li);return new N(function(o,u){r.length===0&&u(new AggregateError([]));var c=r.length,l=new Array(c);r.forEach(function(h,p){return N.resolve(h).then(function(v){return o(v)},function(v){l[p]=v,--c||u(new AggregateError(l))})})})}));var De={awaits:0,echoes:0,id:0},ud=0,si=[],ui=0,ci=0,cd=0;function Bt(r,o,u,c){var l=F,h=Object.create(l);return h.parent=l,h.ref=0,h.global=!1,h.id=++cd,K.env,h.env=Yn?{Promise:N,PromiseProp:{value:N,configurable:!0,writable:!0},all:N.all,race:N.race,allSettled:N.allSettled,any:N.any,resolve:N.resolve,reject:N.reject}:{},o&&y(h,o),++l.ref,h.finalize=function(){--this.parent.ref||this.parent.finalize()},c=an(h,r,u,c),h.ref===0&&h.finalize(),c}function xn(){return De.id||(De.id=++ud),++De.awaits,De.echoes+=oi,De.id}function Vt(){return!!De.awaits&&(--De.awaits==0&&(De.id=0),De.echoes=De.awaits*oi,!0)}function li(r){return De.echoes&&r&&r.constructor===ht?(xn(),r.then(function(o){return Vt(),o},function(o){return Vt(),xe(o)})):r}function ld(){var r=si[si.length-1];si.pop(),$t(r,!1)}function $t(r,o){var u,c=F;(o?!De.echoes||ui++&&r===F:!ui||--ui&&r===F)||queueMicrotask(o?(function(l){++ci,De.echoes&&--De.echoes!=0||(De.echoes=De.awaits=De.id=0),si.push(F),$t(l,!0)}).bind(null,r):ld),r!==F&&(F=r,c===K&&(K.env=Vs()),Yn&&(u=K.env.Promise,o=r.env,(c.global||r.global)&&(Object.defineProperty(s,"Promise",o.PromiseProp),u.all=o.all,u.race=o.race,u.resolve=o.resolve,u.reject=o.reject,o.allSettled&&(u.allSettled=o.allSettled),o.any&&(u.any=o.any))))}function Vs(){var r=s.Promise;return Yn?{Promise:r,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:r.all,race:r.race,allSettled:r.allSettled,any:r.any,resolve:r.resolve,reject:r.reject}:{}}function an(r,o,u,c,l){var h=F;try{return $t(r,!0),o(u,c,l)}finally{$t(h,!1)}}function $s(r,o,u,c){return typeof r!="function"?r:function(){var l=F;u&&xn(),$t(o,!0);try{return r.apply(this,arguments)}finally{$t(l,!1),c&&queueMicrotask(Vt)}}}function ko(r){Promise===ht&&De.echoes===0?ui===0?r():enqueueNativeMicroTask(r):setTimeout(r,0)}(""+ut).indexOf("[native code]")===-1&&(xn=Vt=ue);var xe=N.reject,sn="",Ct="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ks="String expected.",An=[],fi="__dbnames",jo="readonly",Lo="readwrite";function un(r,o){return r?o?function(){return r.apply(this,arguments)&&o.apply(this,arguments)}:r:o}var Ws={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function hi(r){return typeof r!="string"||/\./.test(r)?function(o){return o}:function(o){return o[r]===void 0&&r in o&&delete(o=Ot(o))[r],o}}function Us(){throw Q.Type()}function ce(r,o){try{var u=qs(r),c=qs(o);if(u!==c)return u==="Array"?1:c==="Array"?-1:u==="binary"?1:c==="binary"?-1:u==="string"?1:c==="string"?-1:u==="Date"?1:c!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return o<r?1:r<o?-1:0;case"binary":return function(l,h){for(var p=l.length,v=h.length,w=p<v?p:v,b=0;b<w;++b)if(l[b]!==h[b])return l[b]<h[b]?-1:1;return p===v?0:p<v?-1:1}(Hs(r),Hs(o));case"Array":return function(l,h){for(var p=l.length,v=h.length,w=p<v?p:v,b=0;b<w;++b){var x=ce(l[b],h[b]);if(x!==0)return x}return p===v?0:p<v?-1:1}(r,o)}}catch{}return NaN}function qs(r){var o=typeof r;return o!="object"?o:ArrayBuffer.isView(r)?"binary":(r=en(r),r==="ArrayBuffer"?"binary":r)}function Hs(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r)}var zs=(ve.prototype._trans=function(r,o,u){var c=this._tx||F.trans,l=this.name,h=ze&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(r==="readonly"?"read":"write"," ").concat(this.name));function p(b,x,m){if(!m.schema[l])throw new Q.NotFound("Table "+l+" not part of transaction");return o(m.idbtrans,m)}var v=At();try{var w=c&&c.db._novip===this.db._novip?c===F.trans?c._promise(r,p,u):Bt(function(){return c._promise(r,p,u)},{trans:c,transless:F.transless||F}):function b(x,m,A,_){if(x.idbdb&&(x._state.openComplete||F.letThrough||x._vip)){var O=x._createTransaction(m,A,x._dbSchema);try{O.create(),x._state.PR1398_maxLoop=3}catch(C){return C.name===Gn.InvalidState&&x.isOpen()&&0<--x._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),x.close({disableAutoOpen:!1}),x.open().then(function(){return b(x,m,A,_)})):xe(C)}return O._promise(m,function(C,S){return Bt(function(){return F.trans=O,_(C,S,O)})}).then(function(C){if(m==="readwrite")try{O.idbtrans.commit()}catch{}return m==="readonly"?C:O._completion.then(function(){return C})})}if(x._state.openComplete)return xe(new Q.DatabaseClosed(x._state.dbOpenError));if(!x._state.isBeingOpened){if(!x._state.autoOpen)return xe(new Q.DatabaseClosed);x.open().catch(ue)}return x._state.dbReadyPromise.then(function(){return b(x,m,A,_)})}(this.db,r,[this.name],p);return h&&(w._consoleTask=h,w=w.catch(function(b){return console.trace(b),xe(b)})),w}finally{v&&Ft()}},ve.prototype.get=function(r,o){var u=this;return r&&r.constructor===Object?this.where(r).first(o):r==null?xe(new Q.Type("Invalid argument to Table.get()")):this._trans("readonly",function(c){return u.core.get({trans:c,key:r}).then(function(l){return u.hook.reading.fire(l)})}).then(o)},ve.prototype.where=function(r){if(typeof r=="string")return new this.db.WhereClause(this,r);if(d(r))return new this.db.WhereClause(this,"[".concat(r.join("+"),"]"));var o=f(r);if(o.length===1)return this.where(o[0]).equals(r[o[0]]);var u=this.schema.indexes.concat(this.schema.primKey).filter(function(w){if(w.compound&&o.every(function(x){return 0<=w.keyPath.indexOf(x)})){for(var b=0;b<o.length;++b)if(o.indexOf(w.keyPath[b])===-1)return!1;return!0}return!1}).sort(function(w,b){return w.keyPath.length-b.keyPath.length})[0];if(u&&this.db._maxKey!==sn){var p=u.keyPath.slice(0,o.length);return this.where(p).equals(p.map(function(b){return r[b]}))}!u&&ze&&console.warn("The query ".concat(JSON.stringify(r)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(o.join("+"),"]"));var c=this.schema.idxByName,l=this.db._deps.indexedDB;function h(w,b){return l.cmp(w,b)===0}var v=o.reduce(function(A,b){var x=A[0],m=A[1],A=c[b],_=r[b];return[x||A,x||!A?un(m,A&&A.multi?function(O){return O=Be(O,b),d(O)&&O.some(function(C){return h(_,C)})}:function(O){return h(_,Be(O,b))}):m]},[null,null]),p=v[0],v=v[1];return p?this.where(p.name).equals(r[p.keyPath]).filter(v):u?this.filter(v):this.where(o).equals("")},ve.prototype.filter=function(r){return this.toCollection().and(r)},ve.prototype.count=function(r){return this.toCollection().count(r)},ve.prototype.offset=function(r){return this.toCollection().offset(r)},ve.prototype.limit=function(r){return this.toCollection().limit(r)},ve.prototype.each=function(r){return this.toCollection().each(r)},ve.prototype.toArray=function(r){return this.toCollection().toArray(r)},ve.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ve.prototype.orderBy=function(r){return new this.db.Collection(new this.db.WhereClause(this,d(r)?"[".concat(r.join("+"),"]"):r))},ve.prototype.reverse=function(){return this.toCollection().reverse()},ve.prototype.mapToClass=function(r){var o,u=this.db,c=this.name;function l(){return o!==null&&o.apply(this,arguments)||this}(this.schema.mappedClass=r).prototype instanceof Us&&(function(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function x(){this.constructor=w}n(w,b),w.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}(l,o=r),Object.defineProperty(l.prototype,"db",{get:function(){return u},enumerable:!1,configurable:!0}),l.prototype.table=function(){return c},r=l);for(var h=new Set,p=r.prototype;p;p=g(p))Object.getOwnPropertyNames(p).forEach(function(w){return h.add(w)});function v(w){if(!w)return w;var b,x=Object.create(r.prototype);for(b in w)if(!h.has(b))try{x[b]=w[b]}catch{}return x}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},ve.prototype.defineClass=function(){return this.mapToClass(function(r){y(this,r)})},ve.prototype.add=function(r,o){var u=this,c=this.schema.primKey,l=c.auto,h=c.keyPath,p=r;return h&&l&&(p=hi(h)(r)),this._trans("readwrite",function(v){return u.core.mutate({trans:v,type:"add",keys:o!=null?[o]:null,values:[p]})}).then(function(v){return v.numFailures?N.reject(v.failures[0]):v.lastResult}).then(function(v){if(h)try{Pe(r,h,v)}catch{}return v})},ve.prototype.update=function(r,o){return typeof r!="object"||d(r)?this.where(":id").equals(r).modify(o):(r=Be(r,this.schema.primKey.keyPath),r===void 0?xe(new Q.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(o))},ve.prototype.put=function(r,o){var u=this,c=this.schema.primKey,l=c.auto,h=c.keyPath,p=r;return h&&l&&(p=hi(h)(r)),this._trans("readwrite",function(v){return u.core.mutate({trans:v,type:"put",values:[p],keys:o!=null?[o]:null})}).then(function(v){return v.numFailures?N.reject(v.failures[0]):v.lastResult}).then(function(v){if(h)try{Pe(r,h,v)}catch{}return v})},ve.prototype.delete=function(r){var o=this;return this._trans("readwrite",function(u){return o.core.mutate({trans:u,type:"delete",keys:[r]})}).then(function(u){return u.numFailures?N.reject(u.failures[0]):void 0})},ve.prototype.clear=function(){var r=this;return this._trans("readwrite",function(o){return r.core.mutate({trans:o,type:"deleteRange",range:Ws})}).then(function(o){return o.numFailures?N.reject(o.failures[0]):void 0})},ve.prototype.bulkGet=function(r){var o=this;return this._trans("readonly",function(u){return o.core.getMany({keys:r,trans:u}).then(function(c){return c.map(function(l){return o.hook.reading.fire(l)})})})},ve.prototype.bulkAdd=function(r,o,u){var c=this,l=Array.isArray(o)?o:void 0,h=(u=u||(l?void 0:o))?u.allKeys:void 0;return this._trans("readwrite",function(p){var b=c.schema.primKey,v=b.auto,b=b.keyPath;if(b&&l)throw new Q.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(l&&l.length!==r.length)throw new Q.InvalidArgument("Arguments objects and keys must have the same length");var w=r.length,b=b&&v?r.map(hi(b)):r;return c.core.mutate({trans:p,type:"add",keys:l,values:b,wantResults:h}).then(function(O){var m=O.numFailures,A=O.results,_=O.lastResult,O=O.failures;if(m===0)return h?A:_;throw new kt("".concat(c.name,".bulkAdd(): ").concat(m," of ").concat(w," operations failed"),O)})})},ve.prototype.bulkPut=function(r,o,u){var c=this,l=Array.isArray(o)?o:void 0,h=(u=u||(l?void 0:o))?u.allKeys:void 0;return this._trans("readwrite",function(p){var b=c.schema.primKey,v=b.auto,b=b.keyPath;if(b&&l)throw new Q.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(l&&l.length!==r.length)throw new Q.InvalidArgument("Arguments objects and keys must have the same length");var w=r.length,b=b&&v?r.map(hi(b)):r;return c.core.mutate({trans:p,type:"put",keys:l,values:b,wantResults:h}).then(function(O){var m=O.numFailures,A=O.results,_=O.lastResult,O=O.failures;if(m===0)return h?A:_;throw new kt("".concat(c.name,".bulkPut(): ").concat(m," of ").concat(w," operations failed"),O)})})},ve.prototype.bulkUpdate=function(r){var o=this,u=this.core,c=r.map(function(p){return p.key}),l=r.map(function(p){return p.changes}),h=[];return this._trans("readwrite",function(p){return u.getMany({trans:p,keys:c,cache:"clone"}).then(function(v){var w=[],b=[];r.forEach(function(m,A){var _=m.key,O=m.changes,C=v[A];if(C){for(var S=0,D=Object.keys(O);S<D.length;S++){var R=D[S],M=O[R];if(R===o.schema.primKey.keyPath){if(ce(M,_)!==0)throw new Q.Constraint("Cannot update primary key in bulkUpdate()")}else Pe(C,R,M)}h.push(A),w.push(_),b.push(C)}});var x=w.length;return u.mutate({trans:p,type:"put",keys:w,values:b,updates:{keys:c,changeSpecs:l}}).then(function(m){var A=m.numFailures,_=m.failures;if(A===0)return x;for(var O=0,C=Object.keys(_);O<C.length;O++){var S,D=C[O],R=h[Number(D)];R!=null&&(S=_[D],delete _[D],_[R]=S)}throw new kt("".concat(o.name,".bulkUpdate(): ").concat(A," of ").concat(x," operations failed"),_)})})})},ve.prototype.bulkDelete=function(r){var o=this,u=r.length;return this._trans("readwrite",function(c){return o.core.mutate({trans:c,type:"delete",keys:r})}).then(function(p){var l=p.numFailures,h=p.lastResult,p=p.failures;if(l===0)return h;throw new kt("".concat(o.name,".bulkDelete(): ").concat(l," of ").concat(u," operations failed"),p)})},ve);function ve(){}function Xn(r){function o(p,v){if(v){for(var w=arguments.length,b=new Array(w-1);--w;)b[w-1]=arguments[w];return u[p].subscribe.apply(null,b),r}if(typeof p=="string")return u[p]}var u={};o.addEventType=h;for(var c=1,l=arguments.length;c<l;++c)h(arguments[c]);return o;function h(p,v,w){if(typeof p!="object"){var b;v=v||ri;var x={subscribers:[],fire:w=w||ue,subscribe:function(m){x.subscribers.indexOf(m)===-1&&(x.subscribers.push(m),x.fire=v(x.fire,m))},unsubscribe:function(m){x.subscribers=x.subscribers.filter(function(A){return A!==m}),x.fire=x.subscribers.reduce(v,w)}};return u[p]=o[p]=x}f(b=p).forEach(function(m){var A=b[m];if(d(A))h(m,b[m][0],b[m][1]);else{if(A!=="asap")throw new Q.InvalidArgument("Invalid event config");var _=h(m,jt,function(){for(var O=arguments.length,C=new Array(O);O--;)C[O]=arguments[O];_.subscribers.forEach(function(S){Fe(function(){S.apply(null,C)})})})}})}}function Zn(r,o){return le(o).from({prototype:r}),o}function Cn(r,o){return!(r.filter||r.algorithm||r.or)&&(o?r.justLimit:!r.replayFilter)}function Fo(r,o){r.filter=un(r.filter,o)}function Bo(r,o,u){var c=r.replayFilter;r.replayFilter=c?function(){return un(c(),o())}:o,r.justLimit=u&&!c}function di(r,o){if(r.isPrimKey)return o.primaryKey;var u=o.getIndexByKeyPath(r.index);if(!u)throw new Q.Schema("KeyPath "+r.index+" on object store "+o.name+" is not indexed");return u}function Gs(r,o,u){var c=di(r,o.schema);return o.openCursor({trans:u,values:!r.keysOnly,reverse:r.dir==="prev",unique:!!r.unique,query:{index:c,range:r.range}})}function pi(r,o,u,c){var l=r.replayFilter?un(r.filter,r.replayFilter()):r.filter;if(r.or){var h={},p=function(v,w,b){var x,m;l&&!l(w,b,function(A){return w.stop(A)},function(A){return w.fail(A)})||((m=""+(x=w.primaryKey))=="[object ArrayBuffer]"&&(m=""+new Uint8Array(x)),E(h,m)||(h[m]=!0,o(v,w,b)))};return Promise.all([r.or._iterate(p,u),Ys(Gs(r,c,u),r.algorithm,p,!r.keysOnly&&r.valueMapper)])}return Ys(Gs(r,c,u),un(r.algorithm,l),o,!r.keysOnly&&r.valueMapper)}function Ys(r,o,u,c){var l=_e(c?function(h,p,v){return u(c(h),p,v)}:u);return r.then(function(h){if(h)return h.start(function(){var p=function(){return h.continue()};o&&!o(h,function(v){return p=v},function(v){h.stop(v),p=ue},function(v){h.fail(v),p=ue})||l(h.value,h,function(v){return p=v}),p()})})}var Pt=Symbol(),er=(Qs.prototype.execute=function(r){if(this.add!==void 0){var o=this.add;if(d(o))return a(a([],d(r)?r:[],!0),o).sort();if(typeof o=="number")return(Number(r)||0)+o;if(typeof o=="bigint")try{return BigInt(r)+o}catch{return BigInt(0)+o}throw new TypeError("Invalid term ".concat(o))}if(this.remove!==void 0){var u=this.remove;if(d(u))return d(r)?r.filter(function(c){return!u.includes(c)}).sort():[];if(typeof u=="number")return Number(r)-u;if(typeof u=="bigint")try{return BigInt(r)-u}catch{return BigInt(0)-u}throw new TypeError("Invalid subtrahend ".concat(u))}return o=(o=this.replacePrefix)===null||o===void 0?void 0:o[0],o&&typeof r=="string"&&r.startsWith(o)?this.replacePrefix[1]+r.substring(o.length):r},Qs);function Qs(r){Object.assign(this,r)}var fd=(fe.prototype._read=function(r,o){var u=this._ctx;return u.error?u.table._trans(null,xe.bind(null,u.error)):u.table._trans("readonly",r).then(o)},fe.prototype._write=function(r){var o=this._ctx;return o.error?o.table._trans(null,xe.bind(null,o.error)):o.table._trans("readwrite",r,"locked")},fe.prototype._addAlgorithm=function(r){var o=this._ctx;o.algorithm=un(o.algorithm,r)},fe.prototype._iterate=function(r,o){return pi(this._ctx,r,o,this._ctx.table.core)},fe.prototype.clone=function(r){var o=Object.create(this.constructor.prototype),u=Object.create(this._ctx);return r&&y(u,r),o._ctx=u,o},fe.prototype.raw=function(){return this._ctx.valueMapper=null,this},fe.prototype.each=function(r){var o=this._ctx;return this._read(function(u){return pi(o,r,u,o.table.core)})},fe.prototype.count=function(r){var o=this;return this._read(function(u){var c=o._ctx,l=c.table.core;if(Cn(c,!0))return l.count({trans:u,query:{index:di(c,l.schema),range:c.range}}).then(function(p){return Math.min(p,c.limit)});var h=0;return pi(c,function(){return++h,!1},u,l).then(function(){return h})}).then(r)},fe.prototype.sortBy=function(r,o){var u=r.split(".").reverse(),c=u[0],l=u.length-1;function h(w,b){return b?h(w[u[b]],b-1):w[c]}var p=this._ctx.dir==="next"?1:-1;function v(w,b){return w=h(w,l),b=h(b,l),w<b?-p:b<w?p:0}return this.toArray(function(w){return w.sort(v)}).then(o)},fe.prototype.toArray=function(r){var o=this;return this._read(function(u){var c=o._ctx;if(c.dir==="next"&&Cn(c,!0)&&0<c.limit){var l=c.valueMapper,h=di(c,c.table.core.schema);return c.table.core.query({trans:u,limit:c.limit,values:!0,query:{index:h,range:c.range}}).then(function(v){return v=v.result,l?v.map(l):v})}var p=[];return pi(c,function(v){return p.push(v)},u,c.table.core).then(function(){return p})},r)},fe.prototype.offset=function(r){var o=this._ctx;return r<=0||(o.offset+=r,Cn(o)?Bo(o,function(){var u=r;return function(c,l){return u===0||(u===1?--u:l(function(){c.advance(u),u=0}),!1)}}):Bo(o,function(){var u=r;return function(){return--u<0}})),this},fe.prototype.limit=function(r){return this._ctx.limit=Math.min(this._ctx.limit,r),Bo(this._ctx,function(){var o=r;return function(u,c,l){return--o<=0&&c(l),0<=o}},!0),this},fe.prototype.until=function(r,o){return Fo(this._ctx,function(u,c,l){return!r(u.value)||(c(l),o)}),this},fe.prototype.first=function(r){return this.limit(1).toArray(function(o){return o[0]}).then(r)},fe.prototype.last=function(r){return this.reverse().first(r)},fe.prototype.filter=function(r){var o;return Fo(this._ctx,function(u){return r(u.value)}),(o=this._ctx).isMatch=un(o.isMatch,r),this},fe.prototype.and=function(r){return this.filter(r)},fe.prototype.or=function(r){return new this.db.WhereClause(this._ctx.table,r,this)},fe.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},fe.prototype.desc=function(){return this.reverse()},fe.prototype.eachKey=function(r){var o=this._ctx;return o.keysOnly=!o.isMatch,this.each(function(u,c){r(c.key,c)})},fe.prototype.eachUniqueKey=function(r){return this._ctx.unique="unique",this.eachKey(r)},fe.prototype.eachPrimaryKey=function(r){var o=this._ctx;return o.keysOnly=!o.isMatch,this.each(function(u,c){r(c.primaryKey,c)})},fe.prototype.keys=function(r){var o=this._ctx;o.keysOnly=!o.isMatch;var u=[];return this.each(function(c,l){u.push(l.key)}).then(function(){return u}).then(r)},fe.prototype.primaryKeys=function(r){var o=this._ctx;if(o.dir==="next"&&Cn(o,!0)&&0<o.limit)return this._read(function(c){var l=di(o,o.table.core.schema);return o.table.core.query({trans:c,values:!1,limit:o.limit,query:{index:l,range:o.range}})}).then(function(c){return c.result}).then(r);o.keysOnly=!o.isMatch;var u=[];return this.each(function(c,l){u.push(l.primaryKey)}).then(function(){return u}).then(r)},fe.prototype.uniqueKeys=function(r){return this._ctx.unique="unique",this.keys(r)},fe.prototype.firstKey=function(r){return this.limit(1).keys(function(o){return o[0]}).then(r)},fe.prototype.lastKey=function(r){return this.reverse().firstKey(r)},fe.prototype.distinct=function(){var r=this._ctx,r=r.index&&r.table.schema.idxByName[r.index];if(!r||!r.multi)return this;var o={};return Fo(this._ctx,function(l){var c=l.primaryKey.toString(),l=E(o,c);return o[c]=!0,!l}),this},fe.prototype.modify=function(r){var o=this,u=this._ctx;return this._write(function(c){var l,h,p;p=typeof r=="function"?r:(l=f(r),h=l.length,function(S){for(var D=!1,R=0;R<h;++R){var M=l[R],k=r[M],V=Be(S,M);k instanceof er?(Pe(S,M,k.execute(V)),D=!0):V!==k&&(Pe(S,M,k),D=!0)}return D});function v(S,M){var R=M.failures,M=M.numFailures;O+=S-M;for(var k=0,V=f(R);k<V.length;k++){var U=V[k];_.push(R[U])}}var w=u.table.core,b=w.schema.primaryKey,x=b.outbound,m=b.extractKey,A=o.db._options.modifyChunkSize||200,_=[],O=0,C=[];return o.clone().primaryKeys().then(function(S){function D(M){var k=Math.min(A,S.length-M);return w.getMany({trans:c,keys:S.slice(M,M+k),cache:"immutable"}).then(function(V){for(var U=[],$=[],W=x?[]:null,q=[],B=0;B<k;++B){var Z=V[B],te={value:Ot(Z),primKey:S[M+B]};p.call(te,te.value,te)!==!1&&(te.value==null?q.push(S[M+B]):x||ce(m(Z),m(te.value))===0?($.push(te.value),x&&W.push(S[M+B])):(q.push(S[M+B]),U.push(te.value)))}return Promise.resolve(0<U.length&&w.mutate({trans:c,type:"add",values:U}).then(function(ae){for(var ie in ae.failures)q.splice(parseInt(ie),1);v(U.length,ae)})).then(function(){return(0<$.length||R&&typeof r=="object")&&w.mutate({trans:c,type:"put",keys:W,values:$,criteria:R,changeSpec:typeof r!="function"&&r,isAdditionalChunk:0<M}).then(function(ae){return v($.length,ae)})}).then(function(){return(0<q.length||R&&r===Vo)&&w.mutate({trans:c,type:"delete",keys:q,criteria:R,isAdditionalChunk:0<M}).then(function(ae){return v(q.length,ae)})}).then(function(){return S.length>M+k&&D(M+A)})})}var R=Cn(u)&&u.limit===1/0&&(typeof r!="function"||r===Vo)&&{index:u.index,range:u.range};return D(0).then(function(){if(0<_.length)throw new me("Error modifying one or more objects",_,O,C);return S.length})})})},fe.prototype.delete=function(){var r=this._ctx,o=r.range;return Cn(r)&&(r.isPrimKey||o.type===3)?this._write(function(u){var c=r.table.core.schema.primaryKey,l=o;return r.table.core.count({trans:u,query:{index:c,range:l}}).then(function(h){return r.table.core.mutate({trans:u,type:"deleteRange",range:l}).then(function(p){var v=p.failures;if(p.lastResult,p.results,p=p.numFailures,p)throw new me("Could not delete some values",Object.keys(v).map(function(w){return v[w]}),h-p);return h-p})})}):this.modify(Vo)},fe);function fe(){}var Vo=function(r,o){return o.value=null};function hd(r,o){return r<o?-1:r===o?0:1}function dd(r,o){return o<r?-1:r===o?0:1}function nt(r,o,u){return r=r instanceof Xs?new r.Collection(r):r,r._ctx.error=new(u||TypeError)(o),r}function Pn(r){return new r.Collection(r,function(){return Js("")}).limit(0)}function gi(r,o,u,c){var l,h,p,v,w,b,x,m=u.length;if(!u.every(function(O){return typeof O=="string"}))return nt(r,Ks);function A(O){l=O==="next"?function(S){return S.toUpperCase()}:function(S){return S.toLowerCase()},h=O==="next"?function(S){return S.toLowerCase()}:function(S){return S.toUpperCase()},p=O==="next"?hd:dd;var C=u.map(function(S){return{lower:h(S),upper:l(S)}}).sort(function(S,D){return p(S.lower,D.lower)});v=C.map(function(S){return S.upper}),w=C.map(function(S){return S.lower}),x=(b=O)==="next"?"":c}A("next"),r=new r.Collection(r,function(){return Kt(v[0],w[m-1]+c)}),r._ondirectionchange=function(O){A(O)};var _=0;return r._addAlgorithm(function(O,C,S){var D=O.key;if(typeof D!="string")return!1;var R=h(D);if(o(R,w,_))return!0;for(var M=null,k=_;k<m;++k){var V=function(U,$,W,q,B,Z){for(var te=Math.min(U.length,q.length),ae=-1,ie=0;ie<te;++ie){var dt=$[ie];if(dt!==q[ie])return B(U[ie],W[ie])<0?U.substr(0,ie)+W[ie]+W.substr(ie+1):B(U[ie],q[ie])<0?U.substr(0,ie)+q[ie]+W.substr(ie+1):0<=ae?U.substr(0,ae)+$[ae]+W.substr(ae+1):null;B(U[ie],dt)<0&&(ae=ie)}return te<q.length&&Z==="next"?U+W.substr(U.length):te<U.length&&Z==="prev"?U.substr(0,W.length):ae<0?null:U.substr(0,ae)+q[ae]+W.substr(ae+1)}(D,R,v[k],w[k],p,b);V===null&&M===null?_=k+1:(M===null||0<p(M,V))&&(M=V)}return C(M!==null?function(){O.continue(M+x)}:S),!1}),r}function Kt(r,o,u,c){return{type:2,lower:r,upper:o,lowerOpen:u,upperOpen:c}}function Js(r){return{type:1,lower:r,upper:r}}var Xs=(Object.defineProperty(Ie.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ie.prototype.between=function(r,o,u,c){u=u!==!1,c=c===!0;try{return 0<this._cmp(r,o)||this._cmp(r,o)===0&&(u||c)&&(!u||!c)?Pn(this):new this.Collection(this,function(){return Kt(r,o,!u,!c)})}catch{return nt(this,Ct)}},Ie.prototype.equals=function(r){return r==null?nt(this,Ct):new this.Collection(this,function(){return Js(r)})},Ie.prototype.above=function(r){return r==null?nt(this,Ct):new this.Collection(this,function(){return Kt(r,void 0,!0)})},Ie.prototype.aboveOrEqual=function(r){return r==null?nt(this,Ct):new this.Collection(this,function(){return Kt(r,void 0,!1)})},Ie.prototype.below=function(r){return r==null?nt(this,Ct):new this.Collection(this,function(){return Kt(void 0,r,!1,!0)})},Ie.prototype.belowOrEqual=function(r){return r==null?nt(this,Ct):new this.Collection(this,function(){return Kt(void 0,r)})},Ie.prototype.startsWith=function(r){return typeof r!="string"?nt(this,Ks):this.between(r,r+sn,!0,!0)},Ie.prototype.startsWithIgnoreCase=function(r){return r===""?this.startsWith(r):gi(this,function(o,u){return o.indexOf(u[0])===0},[r],sn)},Ie.prototype.equalsIgnoreCase=function(r){return gi(this,function(o,u){return o===u[0]},[r],"")},Ie.prototype.anyOfIgnoreCase=function(){var r=st.apply(xt,arguments);return r.length===0?Pn(this):gi(this,function(o,u){return u.indexOf(o)!==-1},r,"")},Ie.prototype.startsWithAnyOfIgnoreCase=function(){var r=st.apply(xt,arguments);return r.length===0?Pn(this):gi(this,function(o,u){return u.some(function(c){return o.indexOf(c)===0})},r,sn)},Ie.prototype.anyOf=function(){var r=this,o=st.apply(xt,arguments),u=this._cmp;try{o.sort(u)}catch{return nt(this,Ct)}if(o.length===0)return Pn(this);var c=new this.Collection(this,function(){return Kt(o[0],o[o.length-1])});c._ondirectionchange=function(h){u=h==="next"?r._ascending:r._descending,o.sort(u)};var l=0;return c._addAlgorithm(function(h,p,v){for(var w=h.key;0<u(w,o[l]);)if(++l===o.length)return p(v),!1;return u(w,o[l])===0||(p(function(){h.continue(o[l])}),!1)}),c},Ie.prototype.notEqual=function(r){return this.inAnyRange([[-1/0,r],[r,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ie.prototype.noneOf=function(){var r=st.apply(xt,arguments);if(r.length===0)return new this.Collection(this);try{r.sort(this._ascending)}catch{return nt(this,Ct)}var o=r.reduce(function(u,c){return u?u.concat([[u[u.length-1][1],c]]):[[-1/0,c]]},null);return o.push([r[r.length-1],this.db._maxKey]),this.inAnyRange(o,{includeLowers:!1,includeUppers:!1})},Ie.prototype.inAnyRange=function(D,o){var u=this,c=this._cmp,l=this._ascending,h=this._descending,p=this._min,v=this._max;if(D.length===0)return Pn(this);if(!D.every(function(R){return R[0]!==void 0&&R[1]!==void 0&&l(R[0],R[1])<=0}))return nt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Q.InvalidArgument);var w=!o||o.includeLowers!==!1,b=o&&o.includeUppers===!0,x,m=l;function A(R,M){return m(R[0],M[0])}try{(x=D.reduce(function(R,M){for(var k=0,V=R.length;k<V;++k){var U=R[k];if(c(M[0],U[1])<0&&0<c(M[1],U[0])){U[0]=p(U[0],M[0]),U[1]=v(U[1],M[1]);break}}return k===V&&R.push(M),R},[])).sort(A)}catch{return nt(this,Ct)}var _=0,O=b?function(R){return 0<l(R,x[_][1])}:function(R){return 0<=l(R,x[_][1])},C=w?function(R){return 0<h(R,x[_][0])}:function(R){return 0<=h(R,x[_][0])},S=O,D=new this.Collection(this,function(){return Kt(x[0][0],x[x.length-1][1],!w,!b)});return D._ondirectionchange=function(R){m=R==="next"?(S=O,l):(S=C,h),x.sort(A)},D._addAlgorithm(function(R,M,k){for(var V,U=R.key;S(U);)if(++_===x.length)return M(k),!1;return!O(V=U)&&!C(V)||(u._cmp(U,x[_][1])===0||u._cmp(U,x[_][0])===0||M(function(){m===l?R.continue(x[_][0]):R.continue(x[_][1])}),!1)}),D},Ie.prototype.startsWithAnyOf=function(){var r=st.apply(xt,arguments);return r.every(function(o){return typeof o=="string"})?r.length===0?Pn(this):this.inAnyRange(r.map(function(o){return[o,o+sn]})):nt(this,"startsWithAnyOf() only works with strings")},Ie);function Ie(){}function yt(r){return _e(function(o){return tr(o),r(o.target.error),!1})}function tr(r){r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault()}var nr="storagemutated",$o="x-storagemutated-1",Wt=Xn(null,nr),pd=(mt.prototype._lock=function(){return ne(!F.global),++this._reculock,this._reculock!==1||F.global||(F.lockOwnerFor=this),this},mt.prototype._unlock=function(){if(ne(!F.global),--this._reculock==0)for(F.global||(F.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var r=this._blockedFuncs.shift();try{an(r[1],r[0])}catch{}}return this},mt.prototype._locked=function(){return this._reculock&&F.lockOwnerFor!==this},mt.prototype.create=function(r){var o=this;if(!this.mode)return this;var u=this.db.idbdb,c=this.db._state.dbOpenError;if(ne(!this.idbtrans),!r&&!u)switch(c&&c.name){case"DatabaseClosedError":throw new Q.DatabaseClosed(c);case"MissingAPIError":throw new Q.MissingAPI(c.message,c);default:throw new Q.OpenFailed(c)}if(!this.active)throw new Q.TransactionInactive;return ne(this._completion._state===null),(r=this.idbtrans=r||(this.db.core||u).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=_e(function(l){tr(l),o._reject(r.error)}),r.onabort=_e(function(l){tr(l),o.active&&o._reject(new Q.Abort(r.error)),o.active=!1,o.on("abort").fire(l)}),r.oncomplete=_e(function(){o.active=!1,o._resolve(),"mutatedParts"in r&&Wt.storagemutated.fire(r.mutatedParts)}),this},mt.prototype._promise=function(r,o,u){var c=this;if(r==="readwrite"&&this.mode!=="readwrite")return xe(new Q.ReadOnly("Transaction is readonly"));if(!this.active)return xe(new Q.TransactionInactive);if(this._locked())return new N(function(h,p){c._blockedFuncs.push([function(){c._promise(r,o,u).then(h,p)},F])});if(u)return Bt(function(){var h=new N(function(p,v){c._lock();var w=o(p,v,c);w&&w.then&&w.then(p,v)});return h.finally(function(){return c._unlock()}),h._lib=!0,h});var l=new N(function(h,p){var v=o(h,p,c);v&&v.then&&v.then(h,p)});return l._lib=!0,l},mt.prototype._root=function(){return this.parent?this.parent._root():this},mt.prototype.waitFor=function(r){var o,u=this._root(),c=N.resolve(r);u._waitingFor?u._waitingFor=u._waitingFor.then(function(){return c}):(u._waitingFor=c,u._waitingQueue=[],o=u.idbtrans.objectStore(u.storeNames[0]),function h(){for(++u._spinCount;u._waitingQueue.length;)u._waitingQueue.shift()();u._waitingFor&&(o.get(-1/0).onsuccess=h)}());var l=u._waitingFor;return new N(function(h,p){c.then(function(v){return u._waitingQueue.push(_e(h.bind(null,v)))},function(v){return u._waitingQueue.push(_e(p.bind(null,v)))}).finally(function(){u._waitingFor===l&&(u._waitingFor=null)})})},mt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Q.Abort))},mt.prototype.table=function(r){var o=this._memoizedTables||(this._memoizedTables={});if(E(o,r))return o[r];var u=this.schema[r];if(!u)throw new Q.NotFound("Table "+r+" not part of transaction");return u=new this.db.Table(r,u,this),u.core=this.db.core.table(r),o[r]=u},mt);function mt(){}function Ko(r,o,u,c,l,h,p){return{name:r,keyPath:o,unique:u,multi:c,auto:l,compound:h,src:(u&&!p?"&":"")+(c?"*":"")+(l?"++":"")+Zs(o)}}function Zs(r){return typeof r=="string"?r:r?"["+[].join.call(r,"+")+"]":""}function Wo(r,o,u){return{name:r,primKey:o,indexes:u,mappedClass:null,idxByName:(c=function(l){return[l.name,l]},u.reduce(function(l,h,p){return p=c(h,p),p&&(l[p[0]]=p[1]),l},{}))};var c}var rr=function(r){try{return r.only([[]]),rr=function(){return[[]]},[[]]}catch{return rr=function(){return sn},sn}};function Uo(r){return r==null?function(){}:typeof r=="string"?(o=r).split(".").length===1?function(u){return u[o]}:function(u){return Be(u,o)}:function(u){return Be(u,r)};var o}function eu(r){return[].slice.call(r)}var gd=0;function ir(r){return r==null?":id":typeof r=="string"?r:"[".concat(r.join("+"),"]")}function vd(r,o,w){function c(S){if(S.type===3)return null;if(S.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var _=S.lower,O=S.upper,C=S.lowerOpen,S=S.upperOpen;return _===void 0?O===void 0?null:o.upperBound(O,!!S):O===void 0?o.lowerBound(_,!!C):o.bound(_,O,!!C,!!S)}function l(A){var _,O=A.name;return{name:O,schema:A,mutate:function(C){var S=C.trans,D=C.type,R=C.keys,M=C.values,k=C.range;return new Promise(function(V,U){V=_e(V);var $=S.objectStore(O),W=$.keyPath==null,q=D==="put"||D==="add";if(!q&&D!=="delete"&&D!=="deleteRange")throw new Error("Invalid operation type: "+D);var B,Z=(R||M||{length:1}).length;if(R&&M&&R.length!==M.length)throw new Error("Given keys array must have same length as given values array.");if(Z===0)return V({numFailures:0,failures:{},results:[],lastResult:void 0});function te($e){++dt,tr($e)}var ae=[],ie=[],dt=0;if(D==="deleteRange"){if(k.type===4)return V({numFailures:dt,failures:ie,results:[],lastResult:void 0});k.type===3?ae.push(B=$.clear()):ae.push(B=$.delete(c(k)))}else{var W=q?W?[M,R]:[M,null]:[R,null],oe=W[0],ke=W[1];if(q)for(var je=0;je<Z;++je)ae.push(B=ke&&ke[je]!==void 0?$[D](oe[je],ke[je]):$[D](oe[je])),B.onerror=te;else for(je=0;je<Z;++je)ae.push(B=$[D](oe[je])),B.onerror=te}function Pi($e){$e=$e.target.result,ae.forEach(function(fn,ua){return fn.error!=null&&(ie[ua]=fn.error)}),V({numFailures:dt,failures:ie,results:D==="delete"?R:ae.map(function(fn){return fn.result}),lastResult:$e})}B.onerror=function($e){te($e),Pi($e)},B.onsuccess=Pi})},getMany:function(C){var S=C.trans,D=C.keys;return new Promise(function(R,M){R=_e(R);for(var k,V=S.objectStore(O),U=D.length,$=new Array(U),W=0,q=0,B=function(ae){ae=ae.target,$[ae._pos]=ae.result,++q===W&&R($)},Z=yt(M),te=0;te<U;++te)D[te]!=null&&((k=V.get(D[te]))._pos=te,k.onsuccess=B,k.onerror=Z,++W);W===0&&R($)})},get:function(C){var S=C.trans,D=C.key;return new Promise(function(R,M){R=_e(R);var k=S.objectStore(O).get(D);k.onsuccess=function(V){return R(V.target.result)},k.onerror=yt(M)})},query:(_=b,function(C){return new Promise(function(S,D){S=_e(S);var R,M,k,W=C.trans,V=C.values,U=C.limit,B=C.query,$=U===1/0?void 0:U,q=B.index,B=B.range,W=W.objectStore(O),q=q.isPrimaryKey?W:W.index(q.name),B=c(B);if(U===0)return S({result:[]});_?(($=V?q.getAll(B,$):q.getAllKeys(B,$)).onsuccess=function(Z){return S({result:Z.target.result})},$.onerror=yt(D)):(R=0,M=!V&&"openKeyCursor"in q?q.openKeyCursor(B):q.openCursor(B),k=[],M.onsuccess=function(Z){var te=M.result;return te?(k.push(V?te.value:te.primaryKey),++R===U?S({result:k}):void te.continue()):S({result:k})},M.onerror=yt(D))})}),openCursor:function(C){var S=C.trans,D=C.values,R=C.query,M=C.reverse,k=C.unique;return new Promise(function(V,U){V=_e(V);var q=R.index,$=R.range,W=S.objectStore(O),W=q.isPrimaryKey?W:W.index(q.name),q=M?k?"prevunique":"prev":k?"nextunique":"next",B=!D&&"openKeyCursor"in W?W.openKeyCursor(c($),q):W.openCursor(c($),q);B.onerror=yt(U),B.onsuccess=_e(function(Z){var te,ae,ie,dt,oe=B.result;oe?(oe.___id=++gd,oe.done=!1,te=oe.continue.bind(oe),ae=(ae=oe.continuePrimaryKey)&&ae.bind(oe),ie=oe.advance.bind(oe),dt=function(){throw new Error("Cursor not stopped")},oe.trans=S,oe.stop=oe.continue=oe.continuePrimaryKey=oe.advance=function(){throw new Error("Cursor not started")},oe.fail=_e(U),oe.next=function(){var ke=this,je=1;return this.start(function(){return je--?ke.continue():ke.stop()}).then(function(){return ke})},oe.start=function(ke){function je(){if(B.result)try{ke()}catch($e){oe.fail($e)}else oe.done=!0,oe.start=function(){throw new Error("Cursor behind last entry")},oe.stop()}var Pi=new Promise(function($e,fn){$e=_e($e),B.onerror=yt(fn),oe.fail=fn,oe.stop=function(ua){oe.stop=oe.continue=oe.continuePrimaryKey=oe.advance=dt,$e(ua)}});return B.onsuccess=_e(function($e){B.onsuccess=je,je()}),oe.continue=te,oe.continuePrimaryKey=ae,oe.advance=ie,je(),Pi},V(oe)):V(null)},U)})},count:function(C){var S=C.query,D=C.trans,R=S.index,M=S.range;return new Promise(function(k,V){var U=D.objectStore(O),$=R.isPrimaryKey?U:U.index(R.name),U=c(M),$=U?$.count(U):$.count();$.onsuccess=_e(function(W){return k(W.target.result)}),$.onerror=yt(V)})}}}var h,p,v,x=(p=w,v=eu((h=r).objectStoreNames),{schema:{name:h.name,tables:v.map(function(A){return p.objectStore(A)}).map(function(A){var _=A.keyPath,S=A.autoIncrement,O=d(_),C={},S={name:A.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:_==null,compound:O,keyPath:_,autoIncrement:S,unique:!0,extractKey:Uo(_)},indexes:eu(A.indexNames).map(function(D){return A.index(D)}).map(function(k){var R=k.name,M=k.unique,V=k.multiEntry,k=k.keyPath,V={name:R,compound:d(k),keyPath:k,unique:M,multiEntry:V,extractKey:Uo(k)};return C[ir(k)]=V}),getIndexByKeyPath:function(D){return C[ir(D)]}};return C[":id"]=S.primaryKey,_!=null&&(C[ir(_)]=S.primaryKey),S})},hasGetAll:0<v.length&&"getAll"in p.objectStore(v[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),w=x.schema,b=x.hasGetAll,x=w.tables.map(l),m={};return x.forEach(function(A){return m[A.name]=A}),{stack:"dbcore",transaction:r.transaction.bind(r),table:function(A){if(!m[A])throw new Error("Table '".concat(A,"' not found"));return m[A]},MIN_KEY:-1/0,MAX_KEY:rr(o),schema:w}}function yd(r,o,u,c){var l=u.IDBKeyRange;return u.indexedDB,{dbcore:(c=vd(o,l,c),r.dbcore.reduce(function(h,p){return p=p.create,i(i({},h),p(h))},c))}}function vi(r,c){var u=c.db,c=yd(r._middlewares,u,r._deps,c);r.core=c.dbcore,r.tables.forEach(function(l){var h=l.name;r.core.schema.tables.some(function(p){return p.name===h})&&(l.core=r.core.table(h),r[h]instanceof r.Table&&(r[h].core=l.core))})}function yi(r,o,u,c){u.forEach(function(l){var h=c[l];o.forEach(function(p){var v=function w(b,x){return qe(b,x)||(b=g(b))&&w(b,x)}(p,l);(!v||"value"in v&&v.value===void 0)&&(p===r.Transaction.prototype||p instanceof r.Transaction?X(p,l,{get:function(){return this.table(l)},set:function(w){z(this,l,{value:w,writable:!0,configurable:!0,enumerable:!0})}}):p[l]=new r.Table(l,h))})})}function qo(r,o){o.forEach(function(u){for(var c in u)u[c]instanceof r.Table&&delete u[c]})}function md(r,o){return r._cfg.version-o._cfg.version}function bd(r,o,u,c){var l=r._dbSchema;u.objectStoreNames.contains("$meta")&&!l.$meta&&(l.$meta=Wo("$meta",nu("")[0],[]),r._storeNames.push("$meta"));var h=r._createTransaction("readwrite",r._storeNames,l);h.create(u),h._completion.catch(c);var p=h._reject.bind(h),v=F.transless||F;Bt(function(){return F.trans=h,F.transless=v,o!==0?(vi(r,u),b=o,((w=h).storeNames.includes("$meta")?w.table("$meta").get("version").then(function(x){return x??b}):N.resolve(b)).then(function(x){return A=x,_=h,O=u,C=[],x=(m=r)._versions,S=m._dbSchema=bi(0,m.idbdb,O),(x=x.filter(function(D){return D._cfg.version>=A})).length!==0?(x.forEach(function(D){C.push(function(){var R=S,M=D._cfg.dbschema;_i(m,R,O),_i(m,M,O),S=m._dbSchema=M;var k=Ho(R,M);k.add.forEach(function(q){zo(O,q[0],q[1].primKey,q[1].indexes)}),k.change.forEach(function(q){if(q.recreate)throw new Q.Upgrade("Not yet support for changing primary key");var B=O.objectStore(q.name);q.add.forEach(function(Z){return mi(B,Z)}),q.change.forEach(function(Z){B.deleteIndex(Z.name),mi(B,Z)}),q.del.forEach(function(Z){return B.deleteIndex(Z)})});var V=D._cfg.contentUpgrade;if(V&&D._cfg.version>A){vi(m,O),_._memoizedTables={};var U=zr(M);k.del.forEach(function(q){U[q]=R[q]}),qo(m,[m.Transaction.prototype]),yi(m,[m.Transaction.prototype],f(U),U),_.schema=U;var $,W=Sn(V);return W&&xn(),k=N.follow(function(){var q;($=V(_))&&W&&(q=Vt.bind(null,null),$.then(q,q))}),$&&typeof $.then=="function"?N.resolve($):k.then(function(){return $})}}),C.push(function(R){var M,k,V=D._cfg.dbschema;M=V,k=R,[].slice.call(k.db.objectStoreNames).forEach(function(U){return M[U]==null&&k.db.deleteObjectStore(U)}),qo(m,[m.Transaction.prototype]),yi(m,[m.Transaction.prototype],m._storeNames,m._dbSchema),_.schema=m._dbSchema}),C.push(function(R){m.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(m.idbdb.version/10)===D._cfg.version?(m.idbdb.deleteObjectStore("$meta"),delete m._dbSchema.$meta,m._storeNames=m._storeNames.filter(function(M){return M!=="$meta"})):R.objectStore("$meta").put(D._cfg.version,"version"))})}),function D(){return C.length?N.resolve(C.shift()(_.idbtrans)).then(D):N.resolve()}().then(function(){tu(S,O)})):N.resolve();var m,A,_,O,C,S}).catch(p)):(f(l).forEach(function(x){zo(u,x,l[x].primKey,l[x].indexes)}),vi(r,u),void N.follow(function(){return r.on.populate.fire(h)}).catch(p));var w,b})}function _d(r,o){tu(r._dbSchema,o),o.db.version%10!=0||o.objectStoreNames.contains("$meta")||o.db.createObjectStore("$meta").add(Math.ceil(o.db.version/10-1),"version");var u=bi(0,r.idbdb,o);_i(r,r._dbSchema,o);for(var c=0,l=Ho(u,r._dbSchema).change;c<l.length;c++){var h=function(p){if(p.change.length||p.recreate)return console.warn("Unable to patch indexes of table ".concat(p.name," because it has changes on the type of index or primary key.")),{value:void 0};var v=o.objectStore(p.name);p.add.forEach(function(w){ze&&console.debug("Dexie upgrade patch: Creating missing index ".concat(p.name,".").concat(w.src)),mi(v,w)})}(l[c]);if(typeof h=="object")return h.value}}function Ho(r,o){var u,c={del:[],add:[],change:[]};for(u in r)o[u]||c.del.push(u);for(u in o){var l=r[u],h=o[u];if(l){var p={name:u,def:h,recreate:!1,del:[],add:[],change:[]};if(""+(l.primKey.keyPath||"")!=""+(h.primKey.keyPath||"")||l.primKey.auto!==h.primKey.auto)p.recreate=!0,c.change.push(p);else{var v=l.idxByName,w=h.idxByName,b=void 0;for(b in v)w[b]||p.del.push(b);for(b in w){var x=v[b],m=w[b];x?x.src!==m.src&&p.change.push(m):p.add.push(m)}(0<p.del.length||0<p.add.length||0<p.change.length)&&c.change.push(p)}}else c.add.push([u,h])}return c}function zo(r,o,u,c){var l=r.db.createObjectStore(o,u.keyPath?{keyPath:u.keyPath,autoIncrement:u.auto}:{autoIncrement:u.auto});return c.forEach(function(h){return mi(l,h)}),l}function tu(r,o){f(r).forEach(function(u){o.db.objectStoreNames.contains(u)||(ze&&console.debug("Dexie: Creating missing table",u),zo(o,u,r[u].primKey,r[u].indexes))})}function mi(r,o){r.createIndex(o.name,o.keyPath,{unique:o.unique,multiEntry:o.multi})}function bi(r,o,u){var c={};return He(o.objectStoreNames,0).forEach(function(l){for(var h=u.objectStore(l),p=Ko(Zs(b=h.keyPath),b||"",!0,!1,!!h.autoIncrement,b&&typeof b!="string",!0),v=[],w=0;w<h.indexNames.length;++w){var x=h.index(h.indexNames[w]),b=x.keyPath,x=Ko(x.name,b,!!x.unique,!!x.multiEntry,!1,b&&typeof b!="string",!1);v.push(x)}c[l]=Wo(l,p,v)}),c}function _i(r,o,u){for(var c=u.db.objectStoreNames,l=0;l<c.length;++l){var h=c[l],p=u.objectStore(h);r._hasGetAll="getAll"in p;for(var v=0;v<p.indexNames.length;++v){var w=p.indexNames[v],b=p.index(w).keyPath,x=typeof b=="string"?b:"["+He(b).join("+")+"]";!o[h]||(b=o[h].idxByName[x])&&(b.name=w,delete o[h].idxByName[x],o[h].idxByName[w]=b)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)}function nu(r){return r.split(",").map(function(o,u){var c=(o=o.trim()).replace(/([&*]|\+\+)/g,""),l=/^\[/.test(c)?c.match(/^\[(.*)\]$/)[1].split("+"):c;return Ko(c,l||null,/\&/.test(o),/\*/.test(o),/\+\+/.test(o),d(l),u===0)})}var wd=(wi.prototype._parseStoresSpec=function(r,o){f(r).forEach(function(u){if(r[u]!==null){var c=nu(r[u]),l=c.shift();if(l.unique=!0,l.multi)throw new Q.Schema("Primary key cannot be multi-valued");c.forEach(function(h){if(h.auto)throw new Q.Schema("Only primary key can be marked as autoIncrement (++)");if(!h.keyPath)throw new Q.Schema("Index must have a name and cannot be an empty string")}),o[u]=Wo(u,l,c)}})},wi.prototype.stores=function(u){var o=this.db;this._cfg.storesSource=this._cfg.storesSource?y(this._cfg.storesSource,u):u;var u=o._versions,c={},l={};return u.forEach(function(h){y(c,h._cfg.storesSource),l=h._cfg.dbschema={},h._parseStoresSpec(c,l)}),o._dbSchema=l,qo(o,[o._allTables,o,o.Transaction.prototype]),yi(o,[o._allTables,o,o.Transaction.prototype,this._cfg.tables],f(l),l),o._storeNames=f(l),this},wi.prototype.upgrade=function(r){return this._cfg.contentUpgrade=On(this._cfg.contentUpgrade||ue,r),this},wi);function wi(){}function Go(r,o){var u=r._dbNamesDB;return u||(u=r._dbNamesDB=new Tt(fi,{addons:[],indexedDB:r,IDBKeyRange:o})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Yo(r){return r&&typeof r.databases=="function"}function Qo(r){return Bt(function(){return F.letThrough=!0,r()})}function Jo(r){return!("from"in r)}var Ve=function(r,o){if(!this){var u=new Ve;return r&&"d"in r&&y(u,r),u}y(this,arguments.length?{d:1,from:r,to:1<arguments.length?o:r}:{d:0})};function or(r,o,u){var c=ce(o,u);if(!isNaN(c)){if(0<c)throw RangeError();if(Jo(r))return y(r,{from:o,to:u,d:1});var l=r.l,c=r.r;if(ce(u,r.from)<0)return l?or(l,o,u):r.l={from:o,to:u,d:1,l:null,r:null},iu(r);if(0<ce(o,r.to))return c?or(c,o,u):r.r={from:o,to:u,d:1,l:null,r:null},iu(r);ce(o,r.from)<0&&(r.from=o,r.l=null,r.d=c?c.d+1:1),0<ce(u,r.to)&&(r.to=u,r.r=null,r.d=r.l?r.l.d+1:1),u=!r.r,l&&!r.l&&ar(r,l),c&&u&&ar(r,c)}}function ar(r,o){Jo(o)||function u(c,w){var h=w.from,p=w.to,v=w.l,w=w.r;or(c,h,p),v&&u(c,v),w&&u(c,w)}(r,o)}function ru(r,o){var u=Ei(o),c=u.next();if(c.done)return!1;for(var l=c.value,h=Ei(r),p=h.next(l.from),v=p.value;!c.done&&!p.done;){if(ce(v.from,l.to)<=0&&0<=ce(v.to,l.from))return!0;ce(l.from,v.from)<0?l=(c=u.next(v.from)).value:v=(p=h.next(l.from)).value}return!1}function Ei(r){var o=Jo(r)?null:{s:0,n:r};return{next:function(u){for(var c=0<arguments.length;o;)switch(o.s){case 0:if(o.s=1,c)for(;o.n.l&&ce(u,o.n.from)<0;)o={up:o,n:o.n.l,s:1};else for(;o.n.l;)o={up:o,n:o.n.l,s:1};case 1:if(o.s=2,!c||ce(u,o.n.to)<=0)return{value:o.n,done:!1};case 2:if(o.n.r){o.s=3,o={up:o,n:o.n.r,s:0};continue}case 3:o=o.up}return{done:!0}}}}function iu(r){var o,u,c=(((o=r.r)===null||o===void 0?void 0:o.d)||0)-(((u=r.l)===null||u===void 0?void 0:u.d)||0),l=1<c?"r":c<-1?"l":"";l&&(o=l=="r"?"l":"r",u=i({},r),c=r[l],r.from=c.from,r.to=c.to,r[l]=c[l],u[l]=c[o],(r[o]=u).d=ou(u)),r.d=ou(r)}function ou(u){var o=u.r,u=u.l;return(o?u?Math.max(o.d,u.d):o.d:u?u.d:0)+1}function Si(r,o){return f(o).forEach(function(u){r[u]?ar(r[u],o[u]):r[u]=function c(l){var h,p,v={};for(h in l)E(l,h)&&(p=l[h],v[h]=!p||typeof p!="object"||Yr.has(p.constructor)?p:c(p));return v}(o[u])}),r}function Xo(r,o){return r.all||o.all||Object.keys(r).some(function(u){return o[u]&&ru(o[u],r[u])})}L(Ve.prototype,((ut={add:function(r){return ar(this,r),this},addKey:function(r){return or(this,r,r),this},addKeys:function(r){var o=this;return r.forEach(function(u){return or(o,u,u)}),this},hasKey:function(r){var o=Ei(this).next(r).value;return o&&ce(o.from,r)<=0&&0<=ce(o.to,r)}})[En]=function(){return Ei(this)},ut));var cn={},Zo={},ea=!1;function Oi(r){Si(Zo,r),ea||(ea=!0,setTimeout(function(){ea=!1,ta(Zo,!(Zo={}))},0))}function ta(r,o){o===void 0&&(o=!1);var u=new Set;if(r.all)for(var c=0,l=Object.values(cn);c<l.length;c++)au(p=l[c],r,u,o);else for(var h in r){var p,v=/^idb\:\/\/(.*)\/(.*)\//.exec(h);v&&(h=v[1],v=v[2],(p=cn["idb://".concat(h,"/").concat(v)])&&au(p,r,u,o))}u.forEach(function(w){return w()})}function au(r,o,u,c){for(var l=[],h=0,p=Object.entries(r.queries.query);h<p.length;h++){for(var v=p[h],w=v[0],b=[],x=0,m=v[1];x<m.length;x++){var A=m[x];Xo(o,A.obsSet)?A.subscribers.forEach(function(S){return u.add(S)}):c&&b.push(A)}c&&l.push([w,b])}if(c)for(var _=0,O=l;_<O.length;_++){var C=O[_],w=C[0],b=C[1];r.queries.query[w]=b}}function Ed(r){var o=r._state,u=r._deps.indexedDB;if(o.isBeingOpened||r.idbdb)return o.dbReadyPromise.then(function(){return o.dbOpenError?xe(o.dbOpenError):r});o.isBeingOpened=!0,o.dbOpenError=null,o.openComplete=!1;var c=o.openCanceller,l=Math.round(10*r.verno),h=!1;function p(){if(o.openCanceller!==c)throw new Q.DatabaseClosed("db.open() was cancelled")}function v(){return new N(function(A,_){if(p(),!u)throw new Q.MissingAPI;var O=r.name,C=o.autoSchema||!l?u.open(O):u.open(O,l);if(!C)throw new Q.MissingAPI;C.onerror=yt(_),C.onblocked=_e(r._fireOnBlocked),C.onupgradeneeded=_e(function(S){var D;x=C.transaction,o.autoSchema&&!r._options.allowEmptyDB?(C.onerror=tr,x.abort(),C.result.close(),(D=u.deleteDatabase(O)).onsuccess=D.onerror=_e(function(){_(new Q.NoSuchDatabase("Database ".concat(O," doesnt exist")))})):(x.onerror=yt(_),S=S.oldVersion>Math.pow(2,62)?0:S.oldVersion,m=S<1,r.idbdb=C.result,h&&_d(r,x),bd(r,S/10,x,_))},_),C.onsuccess=_e(function(){x=null;var S,D,R,M,k,V=r.idbdb=C.result,U=He(V.objectStoreNames);if(0<U.length)try{var $=V.transaction((M=U).length===1?M[0]:M,"readonly");if(o.autoSchema)D=V,R=$,(S=r).verno=D.version/10,R=S._dbSchema=bi(0,D,R),S._storeNames=He(D.objectStoreNames,0),yi(S,[S._allTables],f(R),R);else if(_i(r,r._dbSchema,$),((k=Ho(bi(0,(k=r).idbdb,$),k._dbSchema)).add.length||k.change.some(function(W){return W.add.length||W.change.length}))&&!h)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),V.close(),l=V.version+1,h=!0,A(v());vi(r,$)}catch{}An.push(r),V.onversionchange=_e(function(W){o.vcFired=!0,r.on("versionchange").fire(W)}),V.onclose=_e(function(W){r.on("close").fire(W)}),m&&(k=r._deps,$=O,V=k.indexedDB,k=k.IDBKeyRange,Yo(V)||$===fi||Go(V,k).put({name:$}).catch(ue)),A()},_)}).catch(function(A){switch(A==null?void 0:A.name){case"UnknownError":if(0<o.PR1398_maxLoop)return o.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),v();break;case"VersionError":if(0<l)return l=0,v()}return N.reject(A)})}var w,b=o.dbReadyResolve,x=null,m=!1;return N.race([c,(typeof navigator>"u"?N.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(A){function _(){return indexedDB.databases().finally(A)}w=setInterval(_,100),_()}).finally(function(){return clearInterval(w)}):Promise.resolve()).then(v)]).then(function(){return p(),o.onReadyBeingFired=[],N.resolve(Qo(function(){return r.on.ready.fire(r.vip)})).then(function A(){if(0<o.onReadyBeingFired.length){var _=o.onReadyBeingFired.reduce(On,ue);return o.onReadyBeingFired=[],N.resolve(Qo(function(){return _(r.vip)})).then(A)}})}).finally(function(){o.openCanceller===c&&(o.onReadyBeingFired=null,o.isBeingOpened=!1)}).catch(function(A){o.dbOpenError=A;try{x&&x.abort()}catch{}return c===o.openCanceller&&r._close(),xe(A)}).finally(function(){o.openComplete=!0,b()}).then(function(){var A;return m&&(A={},r.tables.forEach(function(_){_.schema.indexes.forEach(function(O){O.name&&(A["idb://".concat(r.name,"/").concat(_.name,"/").concat(O.name)]=new Ve(-1/0,[[[]]]))}),A["idb://".concat(r.name,"/").concat(_.name,"/")]=A["idb://".concat(r.name,"/").concat(_.name,"/:dels")]=new Ve(-1/0,[[[]]])}),Wt(nr).fire(A),ta(A,!0)),r})}function na(r){function o(h){return r.next(h)}var u=l(o),c=l(function(h){return r.throw(h)});function l(h){return function(w){var v=h(w),w=v.value;return v.done?w:w&&typeof w.then=="function"?w.then(u,c):d(w)?Promise.all(w).then(u,c):u(w)}}return l(o)()}function xi(r,o,u){for(var c=d(r)?r.slice():[r],l=0;l<u;++l)c.push(o);return c}var Sd={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(r){return i(i({},r),{table:function(o){var u=r.table(o),c=u.schema,l={},h=[];function p(m,A,_){var O=ir(m),C=l[O]=l[O]||[],S=m==null?0:typeof m=="string"?1:m.length,D=0<A,D=i(i({},_),{name:D?"".concat(O,"(virtual-from:").concat(_.name,")"):_.name,lowLevelIndex:_,isVirtual:D,keyTail:A,keyLength:S,extractKey:Uo(m),unique:!D&&_.unique});return C.push(D),D.isPrimaryKey||h.push(D),1<S&&p(S===2?m[0]:m.slice(0,S-1),A+1,_),C.sort(function(R,M){return R.keyTail-M.keyTail}),D}o=p(c.primaryKey.keyPath,0,c.primaryKey),l[":id"]=[o];for(var v=0,w=c.indexes;v<w.length;v++){var b=w[v];p(b.keyPath,0,b)}function x(m){var A,_=m.query.index;return _.isVirtual?i(i({},m),{query:{index:_.lowLevelIndex,range:(A=m.query.range,_=_.keyTail,{type:A.type===1?2:A.type,lower:xi(A.lower,A.lowerOpen?r.MAX_KEY:r.MIN_KEY,_),lowerOpen:!0,upper:xi(A.upper,A.upperOpen?r.MIN_KEY:r.MAX_KEY,_),upperOpen:!0})}}):m}return i(i({},u),{schema:i(i({},c),{primaryKey:o,indexes:h,getIndexByKeyPath:function(m){return(m=l[ir(m)])&&m[0]}}),count:function(m){return u.count(x(m))},query:function(m){return u.query(x(m))},openCursor:function(m){var A=m.query.index,_=A.keyTail,O=A.isVirtual,C=A.keyLength;return O?u.openCursor(x(m)).then(function(D){return D&&S(D)}):u.openCursor(m);function S(D){return Object.create(D,{continue:{value:function(R){R!=null?D.continue(xi(R,m.reverse?r.MAX_KEY:r.MIN_KEY,_)):m.unique?D.continue(D.key.slice(0,C).concat(m.reverse?r.MIN_KEY:r.MAX_KEY,_)):D.continue()}},continuePrimaryKey:{value:function(R,M){D.continuePrimaryKey(xi(R,r.MAX_KEY,_),M)}},primaryKey:{get:function(){return D.primaryKey}},key:{get:function(){var R=D.key;return C===1?R[0]:R.slice(0,C)}},value:{get:function(){return D.value}}})}}})}})}};function ra(r,o,u,c){return u=u||{},c=c||"",f(r).forEach(function(l){var h,p,v;E(o,l)?(h=r[l],p=o[l],typeof h=="object"&&typeof p=="object"&&h&&p?(v=en(h))!==en(p)?u[c+l]=o[l]:v==="Object"?ra(h,p,u,c+l+"."):h!==p&&(u[c+l]=o[l]):h!==p&&(u[c+l]=o[l])):u[c+l]=void 0}),f(o).forEach(function(l){E(r,l)||(u[c+l]=o[l])}),u}function ia(r,o){return o.type==="delete"?o.keys:o.keys||o.values.map(r.extractKey)}var Od={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(r){return i(i({},r),{table:function(o){var u=r.table(o),c=u.schema.primaryKey;return i(i({},u),{mutate:function(l){var h=F.trans,p=h.table(o).hook,v=p.deleting,w=p.creating,b=p.updating;switch(l.type){case"add":if(w.fire===ue)break;return h._promise("readwrite",function(){return x(l)},!0);case"put":if(w.fire===ue&&b.fire===ue)break;return h._promise("readwrite",function(){return x(l)},!0);case"delete":if(v.fire===ue)break;return h._promise("readwrite",function(){return x(l)},!0);case"deleteRange":if(v.fire===ue)break;return h._promise("readwrite",function(){return function m(A,_,O){return u.query({trans:A,values:!1,query:{index:c,range:_},limit:O}).then(function(C){var S=C.result;return x({type:"delete",keys:S,trans:A}).then(function(D){return 0<D.numFailures?Promise.reject(D.failures[0]):S.length<O?{failures:[],numFailures:0,lastResult:void 0}:m(A,i(i({},_),{lower:S[S.length-1],lowerOpen:!0}),O)})})}(l.trans,l.range,1e4)},!0)}return u.mutate(l);function x(m){var A,_,O,C=F.trans,S=m.keys||ia(c,m);if(!S)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?i(i({},m),{keys:S}):i({},m)).type!=="delete"&&(m.values=a([],m.values)),m.keys&&(m.keys=a([],m.keys)),A=u,O=S,((_=m).type==="add"?Promise.resolve([]):A.getMany({trans:_.trans,keys:O,cache:"immutable"})).then(function(D){var R=S.map(function(M,k){var V,U,$,W=D[k],q={onerror:null,onsuccess:null};return m.type==="delete"?v.fire.call(q,M,W,C):m.type==="add"||W===void 0?(V=w.fire.call(q,M,m.values[k],C),M==null&&V!=null&&(m.keys[k]=M=V,c.outbound||Pe(m.values[k],c.keyPath,M))):(V=ra(W,m.values[k]),(U=b.fire.call(q,V,M,W,C))&&($=m.values[k],Object.keys(U).forEach(function(B){E($,B)?$[B]=U[B]:Pe($,B,U[B])}))),q});return u.mutate(m).then(function(M){for(var k=M.failures,V=M.results,U=M.numFailures,M=M.lastResult,$=0;$<S.length;++$){var W=(V||S)[$],q=R[$];W==null?q.onerror&&q.onerror(k[$]):q.onsuccess&&q.onsuccess(m.type==="put"&&D[$]?m.values[$]:W)}return{failures:k,results:V,numFailures:U,lastResult:M}}).catch(function(M){return R.forEach(function(k){return k.onerror&&k.onerror(M)}),Promise.reject(M)})})}}})}})}};function su(r,o,u){try{if(!o||o.keys.length<r.length)return null;for(var c=[],l=0,h=0;l<o.keys.length&&h<r.length;++l)ce(o.keys[l],r[h])===0&&(c.push(u?Ot(o.values[l]):o.values[l]),++h);return c.length===r.length?c:null}catch{return null}}var xd={stack:"dbcore",level:-1,create:function(r){return{table:function(o){var u=r.table(o);return i(i({},u),{getMany:function(c){if(!c.cache)return u.getMany(c);var l=su(c.keys,c.trans._cache,c.cache==="clone");return l?N.resolve(l):u.getMany(c).then(function(h){return c.trans._cache={keys:c.keys,values:c.cache==="clone"?Ot(h):h},h})},mutate:function(c){return c.type!=="add"&&(c.trans._cache=null),u.mutate(c)}})}}}};function uu(r,o){return r.trans.mode==="readonly"&&!!r.subscr&&!r.trans.explicit&&r.trans.db._options.cache!=="disabled"&&!o.schema.primaryKey.outbound}function cu(r,o){switch(r){case"query":return o.values&&!o.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Ad={stack:"dbcore",level:0,name:"Observability",create:function(r){var o=r.schema.name,u=new Ve(r.MIN_KEY,r.MAX_KEY);return i(i({},r),{transaction:function(c,l,h){if(F.subscr&&l!=="readonly")throw new Q.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(F.querier));return r.transaction(c,l,h)},table:function(c){var l=r.table(c),h=l.schema,p=h.primaryKey,m=h.indexes,v=p.extractKey,w=p.outbound,b=p.autoIncrement&&m.filter(function(_){return _.compound&&_.keyPath.includes(p.keyPath)}),x=i(i({},l),{mutate:function(_){function O(B){return B="idb://".concat(o,"/").concat(c,"/").concat(B),M[B]||(M[B]=new Ve)}var C,S,D,R=_.trans,M=_.mutatedParts||(_.mutatedParts={}),k=O(""),V=O(":dels"),U=_.type,q=_.type==="deleteRange"?[_.range]:_.type==="delete"?[_.keys]:_.values.length<50?[ia(p,_).filter(function(B){return B}),_.values]:[],$=q[0],W=q[1],q=_.trans._cache;return d($)?(k.addKeys($),(q=U==="delete"||$.length===W.length?su($,q):null)||V.addKeys($),(q||W)&&(C=O,S=q,D=W,h.indexes.forEach(function(B){var Z=C(B.name||"");function te(ie){return ie!=null?B.extractKey(ie):null}function ae(ie){return B.multiEntry&&d(ie)?ie.forEach(function(dt){return Z.addKey(dt)}):Z.addKey(ie)}(S||D).forEach(function(ie,ke){var oe=S&&te(S[ke]),ke=D&&te(D[ke]);ce(oe,ke)!==0&&(oe!=null&&ae(oe),ke!=null&&ae(ke))})}))):$?(W={from:$.lower,to:$.upper},V.add(W),k.add(W)):(k.add(u),V.add(u),h.indexes.forEach(function(B){return O(B.name).add(u)})),l.mutate(_).then(function(B){return!$||_.type!=="add"&&_.type!=="put"||(k.addKeys(B.results),b&&b.forEach(function(Z){var te=_.values.map(function(ie){return Z.extractKey(ie)}),ae=Z.keyPath.findIndex(function(ie){return ie===p.keyPath});B.results.forEach(function(ie){return te[ae]=ie}),O(Z.name).addKeys(te)})),R.mutatedParts=Si(R.mutatedParts||{},M),B})}}),m=function(O){var C=O.query,O=C.index,C=C.range;return[O,new Ve((O=C.lower)!==null&&O!==void 0?O:r.MIN_KEY,(C=C.upper)!==null&&C!==void 0?C:r.MAX_KEY)]},A={get:function(_){return[p,new Ve(_.key)]},getMany:function(_){return[p,new Ve().addKeys(_.keys)]},count:m,query:m,openCursor:m};return f(A).forEach(function(_){x[_]=function(O){var C=F.subscr,S=!!C,D=uu(F,l)&&cu(_,O)?O.obsSet={}:C;if(S){var R=function(W){return W="idb://".concat(o,"/").concat(c,"/").concat(W),D[W]||(D[W]=new Ve)},M=R(""),k=R(":dels"),C=A[_](O),S=C[0],C=C[1];if((_==="query"&&S.isPrimaryKey&&!O.values?k:R(S.name||"")).add(C),!S.isPrimaryKey){if(_!=="count"){var V=_==="query"&&w&&O.values&&l.query(i(i({},O),{values:!1}));return l[_].apply(this,arguments).then(function(W){if(_==="query"){if(w&&O.values)return V.then(function(te){return te=te.result,M.addKeys(te),W});var q=O.values?W.result.map(v):W.result;(O.values?M:k).addKeys(q)}else if(_==="openCursor"){var B=W,Z=O.values;return B&&Object.create(B,{key:{get:function(){return k.addKey(B.primaryKey),B.key}},primaryKey:{get:function(){var te=B.primaryKey;return k.addKey(te),te}},value:{get:function(){return Z&&M.addKey(B.primaryKey),B.value}}})}return W})}k.add(u)}}return l[_].apply(this,arguments)}}),x}})}};function lu(r,o,u){if(u.numFailures===0)return o;if(o.type==="deleteRange")return null;var c=o.keys?o.keys.length:"values"in o&&o.values?o.values.length:1;return u.numFailures===c?null:(o=i({},o),d(o.keys)&&(o.keys=o.keys.filter(function(l,h){return!(h in u.failures)})),"values"in o&&d(o.values)&&(o.values=o.values.filter(function(l,h){return!(h in u.failures)})),o)}function oa(r,o){return u=r,((c=o).lower===void 0||(c.lowerOpen?0<ce(u,c.lower):0<=ce(u,c.lower)))&&(r=r,(o=o).upper===void 0||(o.upperOpen?ce(r,o.upper)<0:ce(r,o.upper)<=0));var u,c}function fu(r,o,A,c,l,h){if(!A||A.length===0)return r;var p=o.query.index,v=p.multiEntry,w=o.query.range,b=c.schema.primaryKey.extractKey,x=p.extractKey,m=(p.lowLevelIndex||p).extractKey,A=A.reduce(function(_,O){var C=_,S=[];if(O.type==="add"||O.type==="put")for(var D=new Ve,R=O.values.length-1;0<=R;--R){var M,k=O.values[R],V=b(k);D.hasKey(V)||(M=x(k),(v&&d(M)?M.some(function(q){return oa(q,w)}):oa(M,w))&&(D.addKey(V),S.push(k)))}switch(O.type){case"add":C=_.concat(o.values?S:S.map(function(B){return b(B)}));break;case"put":var U=new Ve().addKeys(O.values.map(function(B){return b(B)})),C=_.filter(function(B){return!U.hasKey(o.values?b(B):B)}).concat(o.values?S:S.map(function(B){return b(B)}));break;case"delete":var $=new Ve().addKeys(O.keys);C=_.filter(function(B){return!$.hasKey(o.values?b(B):B)});break;case"deleteRange":var W=O.range;C=_.filter(function(B){return!oa(b(B),W)})}return C},r);return A===r?r:(A.sort(function(_,O){return ce(m(_),m(O))||ce(b(_),b(O))}),o.limit&&o.limit<1/0&&(A.length>o.limit?A.length=o.limit:r.length===o.limit&&A.length<o.limit&&(l.dirty=!0)),h?Object.freeze(A):A)}function hu(r,o){return ce(r.lower,o.lower)===0&&ce(r.upper,o.upper)===0&&!!r.lowerOpen==!!o.lowerOpen&&!!r.upperOpen==!!o.upperOpen}function Cd(r,o){return function(u,c,l,h){if(u===void 0)return c!==void 0?-1:0;if(c===void 0)return 1;if((c=ce(u,c))===0){if(l&&h)return 0;if(l)return 1;if(h)return-1}return c}(r.lower,o.lower,r.lowerOpen,o.lowerOpen)<=0&&0<=function(u,c,l,h){if(u===void 0)return c!==void 0?1:0;if(c===void 0)return-1;if((c=ce(u,c))===0){if(l&&h)return 0;if(l)return-1;if(h)return 1}return c}(r.upper,o.upper,r.upperOpen,o.upperOpen)}function Pd(r,o,u,c){r.subscribers.add(u),c.addEventListener("abort",function(){var l,h;r.subscribers.delete(u),r.subscribers.size===0&&(l=r,h=o,setTimeout(function(){l.subscribers.size===0&&vt(h,l)},3e3))})}var Td={stack:"dbcore",level:0,name:"Cache",create:function(r){var o=r.schema.name;return i(i({},r),{transaction:function(u,c,l){var h,p,v=r.transaction(u,c,l);return c==="readwrite"&&(p=(h=new AbortController).signal,l=function(w){return function(){if(h.abort(),c==="readwrite"){for(var b=new Set,x=0,m=u;x<m.length;x++){var A=m[x],_=cn["idb://".concat(o,"/").concat(A)];if(_){var O=r.table(A),C=_.optimisticOps.filter(function(Z){return Z.trans===v});if(v._explicit&&w&&v.mutatedParts)for(var S=0,D=Object.values(_.queries.query);S<D.length;S++)for(var R=0,M=(U=D[S]).slice();R<M.length;R++)Xo(($=M[R]).obsSet,v.mutatedParts)&&(vt(U,$),$.subscribers.forEach(function(Z){return b.add(Z)}));else if(0<C.length){_.optimisticOps=_.optimisticOps.filter(function(Z){return Z.trans!==v});for(var k=0,V=Object.values(_.queries.query);k<V.length;k++)for(var U,$,W,q=0,B=(U=V[k]).slice();q<B.length;q++)($=B[q]).res!=null&&v.mutatedParts&&(w&&!$.dirty?(W=Object.isFrozen($.res),W=fu($.res,$.req,C,O,$,W),$.dirty?(vt(U,$),$.subscribers.forEach(function(Z){return b.add(Z)})):W!==$.res&&($.res=W,$.promise=N.resolve({result:W}))):($.dirty&&vt(U,$),$.subscribers.forEach(function(Z){return b.add(Z)})))}}}b.forEach(function(Z){return Z()})}}},v.addEventListener("abort",l(!1),{signal:p}),v.addEventListener("error",l(!1),{signal:p}),v.addEventListener("complete",l(!0),{signal:p})),v},table:function(u){var c=r.table(u),l=c.schema.primaryKey;return i(i({},c),{mutate:function(h){var p=F.trans;if(l.outbound||p.db._options.cache==="disabled"||p.explicit)return c.mutate(h);var v=cn["idb://".concat(o,"/").concat(u)];return v?(p=c.mutate(h),h.type!=="add"&&h.type!=="put"||!(50<=h.values.length||ia(l,h).some(function(w){return w==null}))?(v.optimisticOps.push(h),h.mutatedParts&&Oi(h.mutatedParts),p.then(function(w){0<w.numFailures&&(vt(v.optimisticOps,h),(w=lu(0,h,w))&&v.optimisticOps.push(w),h.mutatedParts&&Oi(h.mutatedParts))}),p.catch(function(){vt(v.optimisticOps,h),h.mutatedParts&&Oi(h.mutatedParts)})):p.then(function(w){var b=lu(0,i(i({},h),{values:h.values.map(function(_,m){var A,_=(A=l.keyPath)!==null&&A!==void 0&&A.includes(".")?Ot(_):i({},_);return Pe(_,l.keyPath,w.results[m]),_})}),w);v.optimisticOps.push(b),queueMicrotask(function(){return h.mutatedParts&&Oi(h.mutatedParts)})}),p):c.mutate(h)},query:function(h){if(!uu(F,c)||!cu("query",h))return c.query(h);var p=((b=F.trans)===null||b===void 0?void 0:b.db._options.cache)==="immutable",m=F,v=m.requery,w=m.signal,b=function(O,C,S,D){var R=cn["idb://".concat(O,"/").concat(C)];if(!R)return[];if(!(C=R.queries[S]))return[null,!1,R,null];var M=C[(D.query?D.query.index.name:null)||""];if(!M)return[null,!1,R,null];switch(S){case"query":var k=M.find(function(V){return V.req.limit===D.limit&&V.req.values===D.values&&hu(V.req.query.range,D.query.range)});return k?[k,!0,R,M]:[M.find(function(V){return("limit"in V.req?V.req.limit:1/0)>=D.limit&&(!D.values||V.req.values)&&Cd(V.req.query.range,D.query.range)}),!1,R,M];case"count":return k=M.find(function(V){return hu(V.req.query.range,D.query.range)}),[k,!!k,R,M]}}(o,u,"query",h),x=b[0],m=b[1],A=b[2],_=b[3];return x&&m?x.obsSet=h.obsSet:(m=c.query(h).then(function(O){var C=O.result;if(x&&(x.res=C),p){for(var S=0,D=C.length;S<D;++S)Object.freeze(C[S]);Object.freeze(C)}else O.result=Ot(C);return O}).catch(function(O){return _&&x&&vt(_,x),Promise.reject(O)}),x={obsSet:h.obsSet,promise:m,subscribers:new Set,type:"query",req:h,dirty:!1},_?_.push(x):(_=[x],(A=A||(cn["idb://".concat(o,"/").concat(u)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[h.query.index.name||""]=_)),Pd(x,_,v,w),x.promise.then(function(O){return{result:fu(O.result,h,A==null?void 0:A.optimisticOps,c,x,p)}})}})}})}};function Ai(r,o){return new Proxy(r,{get:function(u,c,l){return c==="db"?o:Reflect.get(u,c,l)}})}var Tt=(Ae.prototype.version=function(r){if(isNaN(r)||r<.1)throw new Q.Type("Given version is not a positive number");if(r=Math.round(10*r)/10,this.idbdb||this._state.isBeingOpened)throw new Q.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,r);var o=this._versions,u=o.filter(function(c){return c._cfg.version===r})[0];return u||(u=new this.Version(r),o.push(u),o.sort(md),u.stores({}),this._state.autoSchema=!1,u)},Ae.prototype._whenReady=function(r){var o=this;return this.idbdb&&(this._state.openComplete||F.letThrough||this._vip)?r():new N(function(u,c){if(o._state.openComplete)return c(new Q.DatabaseClosed(o._state.dbOpenError));if(!o._state.isBeingOpened){if(!o._state.autoOpen)return void c(new Q.DatabaseClosed);o.open().catch(ue)}o._state.dbReadyPromise.then(u,c)}).then(r)},Ae.prototype.use=function(r){var o=r.stack,u=r.create,c=r.level,l=r.name;return l&&this.unuse({stack:o,name:l}),r=this._middlewares[o]||(this._middlewares[o]=[]),r.push({stack:o,create:u,level:c??10,name:l}),r.sort(function(h,p){return h.level-p.level}),this},Ae.prototype.unuse=function(r){var o=r.stack,u=r.name,c=r.create;return o&&this._middlewares[o]&&(this._middlewares[o]=this._middlewares[o].filter(function(l){return c?l.create!==c:!!u&&l.name!==u})),this},Ae.prototype.open=function(){var r=this;return an(K,function(){return Ed(r)})},Ae.prototype._close=function(){var r=this._state,o=An.indexOf(this);if(0<=o&&An.splice(o,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}r.isBeingOpened||(r.dbReadyPromise=new N(function(u){r.dbReadyResolve=u}),r.openCanceller=new N(function(u,c){r.cancelOpen=c}))},Ae.prototype.close=function(u){var o=(u===void 0?{disableAutoOpen:!0}:u).disableAutoOpen,u=this._state;o?(u.isBeingOpened&&u.cancelOpen(new Q.DatabaseClosed),this._close(),u.autoOpen=!1,u.dbOpenError=new Q.DatabaseClosed):(this._close(),u.autoOpen=this._options.autoOpen||u.isBeingOpened,u.openComplete=!1,u.dbOpenError=null)},Ae.prototype.delete=function(r){var o=this;r===void 0&&(r={disableAutoOpen:!0});var u=0<arguments.length&&typeof arguments[0]!="object",c=this._state;return new N(function(l,h){function p(){o.close(r);var v=o._deps.indexedDB.deleteDatabase(o.name);v.onsuccess=_e(function(){var w,b,x;w=o._deps,b=o.name,x=w.indexedDB,w=w.IDBKeyRange,Yo(x)||b===fi||Go(x,w).delete(b).catch(ue),l()}),v.onerror=yt(h),v.onblocked=o._fireOnBlocked}if(u)throw new Q.InvalidArgument("Invalid closeOptions argument to db.delete()");c.isBeingOpened?c.dbReadyPromise.then(p):p()})},Ae.prototype.backendDB=function(){return this.idbdb},Ae.prototype.isOpen=function(){return this.idbdb!==null},Ae.prototype.hasBeenClosed=function(){var r=this._state.dbOpenError;return r&&r.name==="DatabaseClosed"},Ae.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Ae.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Ae.prototype,"tables",{get:function(){var r=this;return f(this._allTables).map(function(o){return r._allTables[o]})},enumerable:!1,configurable:!0}),Ae.prototype.transaction=function(){var r=(function(o,u,c){var l=arguments.length;if(l<2)throw new Q.InvalidArgument("Too few arguments");for(var h=new Array(l-1);--l;)h[l-1]=arguments[l];return c=h.pop(),[o,Gr(h),c]}).apply(this,arguments);return this._transaction.apply(this,r)},Ae.prototype._transaction=function(r,o,u){var c=this,l=F.trans;l&&l.db===this&&r.indexOf("!")===-1||(l=null);var h,p,v=r.indexOf("?")!==-1;r=r.replace("!","").replace("?","");try{if(p=o.map(function(b){if(b=b instanceof c.Table?b.name:b,typeof b!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return b}),r=="r"||r===jo)h=jo;else{if(r!="rw"&&r!=Lo)throw new Q.InvalidArgument("Invalid transaction mode: "+r);h=Lo}if(l){if(l.mode===jo&&h===Lo){if(!v)throw new Q.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");l=null}l&&p.forEach(function(b){if(l&&l.storeNames.indexOf(b)===-1){if(!v)throw new Q.SubTransaction("Table "+b+" not included in parent transaction.");l=null}}),v&&l&&!l.active&&(l=null)}}catch(b){return l?l._promise(null,function(x,m){m(b)}):xe(b)}var w=(function b(x,m,A,_,O){return N.resolve().then(function(){var C=F.transless||F,S=x._createTransaction(m,A,x._dbSchema,_);if(S.explicit=!0,C={trans:S,transless:C},_)S.idbtrans=_.idbtrans;else try{S.create(),S.idbtrans._explicit=!0,x._state.PR1398_maxLoop=3}catch(M){return M.name===Gn.InvalidState&&x.isOpen()&&0<--x._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),x.close({disableAutoOpen:!1}),x.open().then(function(){return b(x,m,A,null,O)})):xe(M)}var D,R=Sn(O);return R&&xn(),C=N.follow(function(){var M;(D=O.call(S,S))&&(R?(M=Vt.bind(null,null),D.then(M,M)):typeof D.next=="function"&&typeof D.throw=="function"&&(D=na(D)))},C),(D&&typeof D.then=="function"?N.resolve(D).then(function(M){return S.active?M:xe(new Q.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):C.then(function(){return D})).then(function(M){return _&&S._resolve(),S._completion.then(function(){return M})}).catch(function(M){return S._reject(M),xe(M)})})}).bind(null,this,h,p,l,u);return l?l._promise(h,w,"lock"):F.trans?an(F.transless,function(){return c._whenReady(w)}):this._whenReady(w)},Ae.prototype.table=function(r){if(!E(this._allTables,r))throw new Q.InvalidTable("Table ".concat(r," does not exist"));return this._allTables[r]},Ae);function Ae(r,o){var u=this;this._middlewares={},this.verno=0;var c=Ae.dependencies;this._options=o=i({addons:Ae.addons,autoOpen:!0,indexedDB:c.indexedDB,IDBKeyRange:c.IDBKeyRange,cache:"cloned"},o),this._deps={indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},c=o.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var l,h,p,v,w,b={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ue,dbReadyPromise:null,cancelOpen:ue,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:o.autoOpen};b.dbReadyPromise=new N(function(m){b.dbReadyResolve=m}),b.openCanceller=new N(function(m,A){b.cancelOpen=A}),this._state=b,this.name=r,this.on=Xn(this,"populate","blocked","versionchange","close",{ready:[On,ue]}),this.on.ready.subscribe=gt(this.on.ready.subscribe,function(m){return function(A,_){Ae.vip(function(){var O,C=u._state;C.openComplete?(C.dbOpenError||N.resolve().then(A),_&&m(A)):C.onReadyBeingFired?(C.onReadyBeingFired.push(A),_&&m(A)):(m(A),O=u,_||m(function S(){O.on.ready.unsubscribe(A),O.on.ready.unsubscribe(S)}))})}}),this.Collection=(l=this,Zn(fd.prototype,function(D,S){this.db=l;var _=Ws,O=null;if(S)try{_=S()}catch(R){O=R}var C=D._ctx,S=C.table,D=S.hook.reading.fire;this._ctx={table:S,index:C.index,isPrimKey:!C.index||S.schema.primKey.keyPath&&C.index===S.schema.primKey.name,range:_,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:O,or:C.or,valueMapper:D!==jt?D:null}})),this.Table=(h=this,Zn(zs.prototype,function(m,A,_){this.db=h,this._tx=_,this.name=m,this.schema=A,this.hook=h._allTables[m]?h._allTables[m].hook:Xn(null,{creating:[ei,ue],reading:[Mo,jt],updating:[ni,ue],deleting:[ti,ue]})})),this.Transaction=(p=this,Zn(pd.prototype,function(m,A,_,O,C){var S=this;this.db=p,this.mode=m,this.storeNames=A,this.schema=_,this.chromeTransactionDurability=O,this.idbtrans=null,this.on=Xn(this,"complete","error","abort"),this.parent=C||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 N(function(D,R){S._resolve=D,S._reject=R}),this._completion.then(function(){S.active=!1,S.on.complete.fire()},function(D){var R=S.active;return S.active=!1,S.on.error.fire(D),S.parent?S.parent._reject(D):R&&S.idbtrans&&S.idbtrans.abort(),xe(D)})})),this.Version=(v=this,Zn(wd.prototype,function(m){this.db=v,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(w=this,Zn(Xs.prototype,function(m,A,_){if(this.db=w,this._ctx={table:m,index:A===":id"?null:A,or:_},this._cmp=this._ascending=ce,this._descending=function(O,C){return ce(C,O)},this._max=function(O,C){return 0<ce(O,C)?O:C},this._min=function(O,C){return ce(O,C)<0?O:C},this._IDBKeyRange=w._deps.IDBKeyRange,!this._IDBKeyRange)throw new Q.MissingAPI})),this.on("versionchange",function(m){0<m.newVersion?console.warn("Another connection wants to upgrade database '".concat(u.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(u.name,"'. Closing db now to resume the delete request.")),u.close({disableAutoOpen:!1})}),this.on("blocked",function(m){!m.newVersion||m.newVersion<m.oldVersion?console.warn("Dexie.delete('".concat(u.name,"') was blocked")):console.warn("Upgrade '".concat(u.name,"' blocked by other connection holding version ").concat(m.oldVersion/10))}),this._maxKey=rr(o.IDBKeyRange),this._createTransaction=function(m,A,_,O){return new u.Transaction(m,A,_,u._options.chromeTransactionDurability,O)},this._fireOnBlocked=function(m){u.on("blocked").fire(m),An.filter(function(A){return A.name===u.name&&A!==u&&!A._state.vcFired}).map(function(A){return A.on("versionchange").fire(m)})},this.use(xd),this.use(Td),this.use(Ad),this.use(Sd),this.use(Od);var x=new Proxy(this,{get:function(m,A,_){if(A==="_vip")return!0;if(A==="table")return function(C){return Ai(u.table(C),x)};var O=Reflect.get(m,A,_);return O instanceof zs?Ai(O,x):A==="tables"?O.map(function(C){return Ai(C,x)}):A==="_createTransaction"?function(){return Ai(O.apply(this,arguments),x)}:O}});this.vip=x,c.forEach(function(m){return m(u)})}var Ci,ut=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Dd=(aa.prototype.subscribe=function(r,o,u){return this._subscribe(r&&typeof r!="function"?r:{next:r,error:o,complete:u})},aa.prototype[ut]=function(){return this},aa);function aa(r){this._subscribe=r}try{Ci={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Ci={indexedDB:null,IDBKeyRange:null}}function du(r){var o,u=!1,c=new Dd(function(l){var h=Sn(r),p,v=!1,w={},b={},x={get closed(){return v},unsubscribe:function(){v||(v=!0,p&&p.abort(),m&&Wt.storagemutated.unsubscribe(_))}};l.start&&l.start(x);var m=!1,A=function(){return ko(O)},_=function(C){Si(w,C),Xo(b,w)&&A()},O=function(){var C,S,D;!v&&Ci.indexedDB&&(w={},C={},p&&p.abort(),p=new AbortController,D=function(R){var M=At();try{h&&xn();var k=Bt(r,R);return k=h?k.finally(Vt):k}finally{M&&Ft()}}(S={subscr:C,signal:p.signal,requery:A,querier:r,trans:null}),Promise.resolve(D).then(function(R){u=!0,o=R,v||S.signal.aborted||(w={},function(M){for(var k in M)if(E(M,k))return;return 1}(b=C)||m||(Wt(nr,_),m=!0),ko(function(){return!v&&l.next&&l.next(R)}))},function(R){u=!1,["DatabaseClosedError","AbortError"].includes(R==null?void 0:R.name)||v||ko(function(){v||l.error&&l.error(R)})}))};return setTimeout(A,0),x});return c.hasValue=function(){return u},c.getValue=function(){return o},c}var ln=Tt;function sa(r){var o=Ut;try{Ut=!0,Wt.storagemutated.fire(r),ta(r,!0)}finally{Ut=o}}L(ln,i(i({},tn),{delete:function(r){return new ln(r,{addons:[]}).delete()},exists:function(r){return new ln(r,{addons:[]}).open().then(function(o){return o.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return o=ln.dependencies,u=o.indexedDB,o=o.IDBKeyRange,(Yo(u)?Promise.resolve(u.databases()).then(function(c){return c.map(function(l){return l.name}).filter(function(l){return l!==fi})}):Go(u,o).toCollection().primaryKeys()).then(r)}catch{return xe(new Q.MissingAPI)}var o,u},defineClass:function(){return function(r){y(this,r)}},ignoreTransaction:function(r){return F.trans?an(F.transless,r):r()},vip:Qo,async:function(r){return function(){try{var o=na(r.apply(this,arguments));return o&&typeof o.then=="function"?o:N.resolve(o)}catch(u){return xe(u)}}},spawn:function(r,o,u){try{var c=na(r.apply(u,o||[]));return c&&typeof c.then=="function"?c:N.resolve(c)}catch(l){return xe(l)}},currentTransaction:{get:function(){return F.trans||null}},waitFor:function(r,o){return o=N.resolve(typeof r=="function"?ln.ignoreTransaction(r):r).timeout(o||6e4),F.trans?F.trans.waitFor(o):o},Promise:N,debug:{get:function(){return ze},set:function(r){ii(r)}},derive:le,extend:y,props:L,override:gt,Events:Xn,on:Wt,liveQuery:du,extendObservabilitySet:Si,getByKeyPath:Be,setByKeyPath:Pe,delByKeyPath:function(r,o){typeof o=="string"?Pe(r,o,void 0):"length"in o&&[].map.call(o,function(u){Pe(r,u,void 0)})},shallowClone:zr,deepClone:Ot,getObjectDiff:ra,cmp:ce,asap:Fe,minKey:-1/0,addons:[],connections:An,errnames:Gn,dependencies:Ci,cache:cn,semVer:"4.0.8",version:"4.0.8".split(".").map(function(r){return parseInt(r)}).reduce(function(r,o,u){return r+o/Math.pow(10,2*u)})})),ln.maxKey=rr(ln.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Wt(nr,function(r){Ut||(r=new CustomEvent($o,{detail:r}),Ut=!0,dispatchEvent(r),Ut=!1)}),addEventListener($o,function(r){r=r.detail,Ut||sa(r)}));var Tn,Ut=!1,pu=function(){};return typeof BroadcastChannel<"u"&&((pu=function(){(Tn=new BroadcastChannel($o)).onmessage=function(r){return r.data&&sa(r.data)}})(),typeof Tn.unref=="function"&&Tn.unref(),Wt(nr,function(r){Ut||Tn.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Tt.disableBfCache&&r.persisted){ze&&console.debug("Dexie: handling persisted pagehide"),Tn!=null&&Tn.close();for(var o=0,u=An;o<u.length;o++)u[o].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(r){!Tt.disableBfCache&&r.persisted&&(ze&&console.debug("Dexie: handling persisted pageshow"),pu(),sa({all:new Ve(-1/0,[[]])}))})),N.rejectionMapper=function(r,o){return!r||r instanceof Ze||r instanceof TypeError||r instanceof SyntaxError||!r.name||!et[r.name]?r:(o=new et[r.name](o||r.message,r),"stack"in r&&X(o,"stack",{get:function(){return this.inner.stack}}),o)},ii(ze),i(Tt,Object.freeze({__proto__:null,Dexie:Tt,liveQuery:du,Entity:Us,cmp:ce,PropModSymbol:Pt,PropModification:er,replacePrefix:function(r,o){return new er({replacePrefix:[r,o]})},add:function(r){return new er({add:r})},remove:function(r){return new er({remove:r})},default:Tt,RangeSet:Ve,mergeRanges:ar,rangesOverlap:ru}),{default:Tt}),Tt})})(js);var hh=js.exports,bo=al(hh);const Ls=Symbol.for("Dexie"),_o=globalThis[Ls]||(globalThis[Ls]=bo);if(bo.semVer!==_o.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${bo.semVer} and ${_o.semVer}`);class dh extends _o{constructor(t){super("pages_"+t),this.version(2).stores({pages:"id, name, content, document, css, js, document.name, document.headline, document.creator"})}}var ph=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,vh=(e,t,n,i)=>{for(var a=i>1?void 0:i?gh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&ph(t,n,a),a},yh=(e,t)=>(n,i)=>t(n,i,e);let wo=class{constructor(e){this.pageStorageMap=new Map,this.logger=e,this.logger.setModule("storage.components.dexieOfflineStorage")}getPageStorage(e){let t=this.pageStorageMap.get(e);return t==null&&(t=new dh(e),this.pageStorageMap.set(e,t)),t}async getPage(e,t){try{this.logger.debug("Ready to load page from local storage",t);const n=this.getPageStorage(e);this.logger.debug("pageStorage is ready, asking for page");const i=await n.pages.get(t),a=new wn;return a.fromObject(i),a}catch(n){this.logger.debug("Exception while trying to read from local storage",n);return}}async savePage(e,t,n){try{await this.getPageStorage(e).pages.put(n.toObject(),t)}catch(i){this.logger.debug("Exception while trying to store in local storage",e,t,n,i)}}async updatePage(e,t,n){try{const i=this.getPageStorage(e);this.logger.debug("Ready to store",n),await i.pages.update(t,n.toObject())}catch(i){this.logger.debug("Exception while trying to store in local storage",e,t,n,i)}}};wo=vh([Re(),yh(0,Oe("Logger"))],wo);var mh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,_h=(e,t,n,i)=>{for(var a=i>1?void 0:i?bh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&mh(t,n,a),a},Eo=(e,t)=>(n,i)=>t(n,i,e);let So=class{constructor(e,t,n){this.logger=e,this.logger.setModule("storage.components.wrappingOfflineStorage"),this.offlineStorage=t,this.queueWorker=n}setStorage(e){this.storage=e}getStorage(){return this.storage}setWikiConfig(e){return this.storage.setWikiConfig(e)}getWikiConfig(){return this.storage.getWikiConfig()}async isStorageReady(){return this.storage.isStorageReady()}getPageRestURL(e,t){return this.storage.getPageRestURL(e,t)}getPageFromViewURL(e){return this.storage.getPageFromViewURL(e)}getImageURL(e,t){return this.storage.getImageURL(e,t)}async getPageContent(e,t,n){if(this.logger.debug("Trying to get data for page ",e),this.offlineStorage){this.logger.debug("Asking offline storage for ",e);const i=await this.offlineStorage.getPage(this.getWikiConfig().name,e+"_"+t);return i!=null&&i!=null?(this.logger.debug("Loading data from local storage for page",e),(n==null||n)&&this.queueWorker.addToQueue(this.getWikiConfig().name+":"+e+"_"+t),i):(this.logger.debug("Could not find data in local storage for page",e),this.savePageContent(e,t))}else return this.logger.debug("No offline local storage available"),this.storage.getPageContent(e,t)}getAttachments(e){return this.storage.getAttachments(e)}async savePageContent(e,t){const n=await this.storage.getPageContent(e,t);if(n)return n.id=e+"_"+t,this.logger.debug("Saving page to offline storage",e),this.offlineStorage.savePage(this.getWikiConfig().name,e+"_"+t,n),n;throw new Error("Can't save missing page.")}async updatePageContent(e,t){const n=await this.offlineStorage.getPage(this.getWikiConfig().name,e+"_"+t),i=await this.storage.getPageContent(e,t);return n&&i?(i.id=e+"_"+t,this.logger.debug("Saving page to offline storage",e),this.offlineStorage.savePage(this.getWikiConfig().name,e+"_"+t,i),!0):(n==null?void 0:n.version)!=(i==null?void 0:i.version)&&i?(i.id=e+"_"+t,this.logger.debug("Updating page to offline storage",e),this.offlineStorage.updatePage(this.getWikiConfig().name,e+"_"+t,i),!0):(this.logger.debug("Local storage not updated, because version are identical"),!1)}async getPanelContent(e,t,n){return this.storage.getPanelContent(e,t,n)}async getEditField(e,t){return await this.storage.getEditField(e,t)}save(e,t,n,i){return this.storage.save(e,t,n,i)}async saveAttachments(e,t){return this.storage.saveAttachments(e,t)}async delete(e){return this.storage.delete(e)}};So=_h([Re(),Eo(0,Oe("Logger")),Eo(1,Oe("OfflineStorage")),Eo(2,Oe("QueueWorker"))],So);let wh=class{constructor(t){t.bind("WrappingStorage").to(So).inSingletonScope(),t.bind("OfflineStorage").to(wo).inSingletonScope()}};var Eh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,Oh=(e,t,n,i)=>{for(var a=i>1?void 0:i?Sh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Eh(t,n,a),a},Ur=(e,t)=>(n,i)=>t(n,i,e);let Oo=class extends Hn{constructor(e,t,n){super(e),this.storage=t,this.cristal=n,this.storage.setWikiConfig(this),this.homePage==""&&(this.homePage="README.md")}defaultPageName(){return"README"}getType(){return"GitHub"}};Oo=Oh([Re(),Ur(0,Oe("Logger")),Ur(1,Oe("Storage")),Ur(1,Vi("GitHub")),Ur(2,Oe("CristalApp"))],Oo);var xh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Ch=(e,t,n,i)=>{for(var a=i>1?void 0:i?Ah(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&xh(t,n,a),a},Ph=(e,t)=>(n,i)=>t(n,i,e);let zn=class{constructor(e,t){this.logger=e,this.logger.setModule(t)}setWikiConfig(e){this.logger.debug("Setting wiki Config: ",e),this.wikiConfig=e}getWikiConfig(){return this.wikiConfig}};zn=Ch([Re(),Ph(0,ol())],zn);var Th=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Ih=(e,t,n,i)=>{for(var a=i>1?void 0:i?Dh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Th(t,n,a),a},Nh=(e,t)=>(n,i)=>t(n,i,e);let xo=class extends zn{constructor(e){super(e,"storage.components.githubStorage"),this.hashCode=function(t){let n=0,i,a;if(t.length===0)return""+n;for(i=0;i<t.length;i++)a=t.charCodeAt(i),n=(n<<5)-n+a,n|=0;return""+n}}async isStorageReady(){return!0}getPageRestURL(e,t){var n;return(n=this.logger)==null||n.debug("GitHub Loading page",e),this.wikiConfig.baseRestURL+e}getPageFromViewURL(e){let t=null;return e.startsWith(this.wikiConfig.baseURL)&&(t=e.replace(this.wikiConfig.baseURL,"")),t}getImageURL(e,t){const n=e.replace(/[^/]*$/,"");return`${this.wikiConfig.baseRestURL}${n}${t}`}async getPageContent(e,t){var d;(d=this.logger)==null||d.debug("GitHub Loading page",e);const n=this.getPageRestURL(e,t),a=await(await fetch(n,{cache:"no-store"})).text();let s="";t=="json"?s="":t=="md"||t=="html"?s=a:s="";const f=new wn;return f.id=e,f.name=e.split("/").pop(),f.source=s,f.syntax="md",f.css=[],f.version=this.hashCode(s),f}getAttachments(){throw new Error("unsupported")}async getPanelContent(){return new wn}async getEditField(){return""}save(){throw new Error("Save not supported")}async saveAttachments(){throw new Error("unsupported")}async delete(){throw new Error("Delete not supported")}};xo=Ih([Re(),Nh(0,Oe("Logger"))],xo);let Rh=class{constructor(t){t.bind("WikiConfig").to(Oo).whenTargetNamed("GitHub"),t.bind("Storage").to(xo).whenTargetNamed("GitHub")}};var Mh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,jh=(e,t,n,i)=>{for(var a=i>1?void 0:i?kh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Mh(t,n,a),a},qr=(e,t)=>(n,i)=>t(n,i,e);let Ao=class extends Hn{constructor(e,t,n){super(e),this.cristal=n,this.storage=t,this.storage.setWikiConfig(this)}isSupported(e){return e=="html"}defaultPageName(){return"home"}getType(){return"Nextcloud"}};Ao=jh([Re(),qr(0,Oe("Logger")),qr(1,Oe("Storage")),qr(1,Vi("Nextcloud")),qr(2,Oe("CristalApp"))],Ao);var Lh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,Bh=(e,t,n,i)=>{for(var a=i>1?void 0:i?Fh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Lh(t,n,a),a},Vh=(e,t)=>(n,i)=>t(n,i,e);const Xt="test",$h="test";let Co=class extends zn{constructor(e){super(e,"storage.components.nextcloudStorage"),this.ATTACHMENTS="attachments"}async getEditField(){return""}getImageURL(){return""}async getPageContent(e){const t=this.getWikiConfig().baseRestURL,n=this.getBaseHeaders();try{const i=await fetch(`${t}/${Xt}/.cristal/${e}/page.json`,{method:"GET",headers:n});if(i.status>=200&&i.status<300){const a=await i.json();return{...a,id:e,headline:a.name,headlineRaw:a.name}}else return}catch{return}}async getAttachments(e){const t=await fetch(this.getAttachmentsBasePath(e),{method:"PROPFIND",headers:{...this.getBaseHeaders(),Depth:"1",Accept:"application/json"}});if(t.status>=200&&t.status<300){const n=await t.text(),a=new window.DOMParser().parseFromString(n,"text/xml").getElementsByTagName("d:response"),s=[];for(let f=0;f<a.length;f++){const d=a[f];if(d.getElementsByTagName("d:getcontenttype").length>0){const y=d.getElementsByTagName("d:href")[0].textContent,g=d.getElementsByTagName("d:getcontenttype")[0].textContent,T=y.split("/"),E=`${this.getWikiConfig().baseRestURL}/${Xt}/${T.slice(5).join("/")}`,L=T[T.length-1];s.push({mimetype:g,reference:L,id:y,href:E})}}return{attachments:s}}else return}getAttachmentsBasePath(e){return`${this.getWikiConfig().baseRestURL}/${Xt}/.cristal/${e}/${this.ATTACHMENTS}`}async save(e,t,n){const i=e.split("/"),a=`${this.getWikiConfig().baseRestURL}/${Xt}/.cristal`;await this.createIntermediateDirectories(a,i),await fetch(`${a}/${i.join("/")}/page.json`,{method:"PUT",headers:this.getBaseHeaders(),body:JSON.stringify({source:t,name:n,syntax:"markdown/1.2"})})}async createIntermediateDirectories(e,t){await this.createDirectory(e);for(let n=0;n<t.length;n++)await this.createDirectory(`${e}/${t.slice(0,n+1).join("/")}`)}async saveAttachments(e,t){return Promise.all(t.map(n=>this.saveAttachment(e,n)))}async saveAttachment(e,t){const n=e.split("/"),i=`${this.getWikiConfig().baseRestURL}/${Xt}/.cristal`;await this.createIntermediateDirectories(i,[...n,this.ATTACHMENTS]);const a=this.getAttachmentsBasePath(e)+"/"+t.name,s=new FormData;s.append(t.name,t),await fetch(a,{method:"PUT",headers:this.getBaseHeaders(),body:s})}getPageFromViewURL(){return null}getPageRestURL(){return""}async getPanelContent(){return new wn}async delete(e){const t=`${this.getWikiConfig().baseRestURL}/${Xt}/.cristal`;return await fetch(`${t}/${e}`,{method:"DELETE",headers:this.getBaseHeaders()}).then(async i=>i.ok?{success:!0}:{success:!1,error:await i.text()})}async isStorageReady(){return!0}async createDirectory(e){await fetch(e,{method:"MKCOL",headers:this.getBaseHeaders()})}getBaseHeaders(){return{Authorization:`Basic ${btoa(`${Xt}:${$h}`)}`}}};Co=Bh([Re(),Vh(0,Oe("Logger"))],Co);let Kh=class{constructor(t){t.bind("WikiConfig").to(Ao).whenTargetNamed("Nextcloud"),t.bind("Storage").to(Co).whenTargetNamed("Nextcloud")}};var Wh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,qh=(e,t,n,i)=>{for(var a=i>1?void 0:i?Uh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Wh(t,n,a),a},Hr=(e,t)=>(n,i)=>t(n,i,e);let Po=class extends Hn{constructor(e,t,n){super(e),this.cristal=n,this.storage=t,this.storage.setWikiConfig(this),this.homePage==""&&(this.homePage="Main.WebHome")}isSupported(e){return e=="html"||e=="jsonld"}defaultPageName(){return"Main.WebHome"}getType(){return"XWiki"}getNewPageDefaultName(){return"NewPage.WebHome"}};Po=qh([Re(),Hr(0,Oe("Logger")),Hr(1,Oe("Storage")),Hr(1,Vi("XWiki")),Hr(2,Oe("CristalApp"))],Po);var Hh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,Gh=(e,t,n,i)=>{for(var a=i>1?void 0:i?zh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Hh(t,n,a),a},Fs=(e,t)=>(n,i)=>t(n,i,e);let To=class extends zn{constructor(e,t){super(e,"storage.components.xwikiStorage"),this.authenticationManagerProvider=t}async isStorageReady(){return!0}getPageRestURL(e,t){var n;return(n=this.logger)==null||n.debug("XWiki Loading page",e),this.wikiConfig.baseURL+this.wikiConfig.baseRestURL+"&page="+encodeURIComponent(e)+"&format="+t}getPageFromViewURL(e){let t;return e.startsWith(this.wikiConfig.baseURL)?(t=e.replace(this.wikiConfig.baseURL,"").replace("/bin","").replace("/view/","").replaceAll("%5C","%5C%5C").replaceAll(".","%5C.").replaceAll("/","."),t.endsWith(".")&&(t+="WebHome"),t=decodeURIComponent(t)):t=null,t}getImageURL(e,t){var i;e==""&&(e="Main.WebHome");const n=this.wikiConfig.baseURL+"/bin/download/"+e.replace(".","/")+"/"+t;return(i=this.logger)==null||i.debug("final image url ",n),n}async getPageContent(e,t){var g,T,E,L,z,X;(g=this.logger)==null||g.debug("XWiki Loading page",e),e==""&&(e="Main.WebHome");const n=this.getPageRestURL(e,t);(T=this.logger)==null||T.debug("XWiki Loading url",n);const a=await(await fetch(n,{cache:"no-store"})).json();let s="",f="",d={};t=="jsonld"?(d=a,this.wikiConfig.serverRendering?((E=this.logger)==null||E.debug("Using server side rendering for jsonld"),s=a.source,f=a.html):((L=this.logger)==null||L.debug("Using client side rendering for jsonld"),s=a.source,f="")):t=="html"?this.wikiConfig.serverRendering?((z=this.logger)==null||z.debug("Using server side rendering for html"),s=a.source,f=""):((X=this.logger)==null||X.debug("Using client side rendering for html"),s=a.source,f=""):(s="",f="");const y=new wn;return y.source=s,y.syntax="xwiki",y.html=f,y.document=new yo(d),y.css=a.css,y.js=a.js,y.version=y.document.get("version"),y.headlineRaw=a.headlineRaw,y.headline=a.headline,y.name=a.name,y}async getAttachments(e){return{attachments:(await(await fetch(this.buildAttachmentsURL(e),{headers:{Accept:"application/json",...await this.getCredentials()}})).json()).attachments.map(({id:a,name:s,mimeType:f,xwikiAbsoluteUrl:d})=>({id:a,reference:s,mimetype:f,href:d}))}}async getPanelContent(e,t){var f;const n=this.wikiConfig.baseURL+"/rest/cristal/panel?media=json&page="+t+"&panel="+e;(f=this.logger)==null||f.debug("XWiki Loading url",n);const a=await(await fetch(n,{cache:"no-store"})).json(),s=new wn;return s.source=a.source,s.syntax="xwiki",s.html=a.content,s.css=a.css,s.js=a.js,s}async getEditField(e,t){var n,i;try{const a=e.get("xwikiMapping")[t];let s=a.type,f=a.fieldName;s==null&&(s="document"),f==null&&(f=t);const d=this.wikiConfig.baseURL+"/bin/get/"+e.getIdentifier().replaceAll(".","/")+"?xpage=display&mode=edit&type="+s+"&property="+e.get("className")+"."+f;return(n=this.logger)==null||n.debug("XWiki Loading Field url",d),await(await fetch(d,{cache:"no-store"})).text()}catch(a){return(i=this.logger)==null||i.error("Exception looking for edit field for field",t,a),""}}async save(e,t,n){const i=this.buildSavePageURL(e,["rest","wikis","xwiki"]);await fetch(i,{method:"PUT",headers:{"Content-Type":"application/json",...await this.getCredentials()},body:JSON.stringify({content:t,title:n,syntax:"markdown/1.2"})})}async saveAttachments(e,t){return Promise.all(t.map(n=>this.saveAttachment(e,n)))}async saveAttachment(e,t){const n=new FormData;n.append(t.name,t),await fetch(this.buildAttachmentsURL(e)+"/"+t.name,{method:"PUT",body:n,headers:{...await this.getCredentials(),"Content-Type":t.type}})}async delete(e){const t=this.buildSavePageURL(e,["rest","wikis","xwiki"]);return await fetch(t,{method:"DELETE",headers:{"Content-Type":"application/json",...await this.getCredentials()}}).then(async i=>i.ok?{success:!0}:{success:!1,error:await i.text()})}async getCredentials(){var n;const e=await((n=this.authenticationManagerProvider.get())==null?void 0:n.getAuthorizationHeader()),t={};return e&&(t.Authorization=e),t}buildSavePageURL(e,t){const n=this.wikiConfig.baseURL,i=e.split(".");for(let a=0;a<i.length;a++){const s=a<i.length-1?"spaces":"pages";t.push(s),t.push(i[a])}return`${n}/${t.join("/")}`}buildAttachmentsURL(e){const t=e.split("."),n=t.length-1,i=t.splice(0,n).join("/spaces/"),a=t[n]||"WebHome";return`${this.wikiConfig.baseURL}/rest/wikis/xwiki/spaces/${i}/pages/${a}/attachments`}};To=Gh([Re(),Fs(0,Oe("Logger")),Fs(1,Oe("AuthenticationManagerProvider"))],To);let Yh=class{constructor(t){t.bind("WikiConfig").to(Po).whenTargetNamed("XWiki"),t.bind("Storage").to(To).whenTargetNamed("XWiki")}};var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Xh=(e,t,n,i)=>{for(var a=i>1?void 0:i?Jh(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&Qh(t,n,a),a},Zh=(e,t)=>(n,i)=>t(n,i,e);let Do=class{constructor(e){this.cristalApp=e}get(e){const t=e||this.cristalApp.getWikiConfig().getType();try{return this.cristalApp.getContainer().getNamed("AuthenticationManager",t)}catch(n){this.cristalApp.getLogger("authentication.api").warn(`Couldn't resolve AuthenticationManager for type=[${t}]`,n);return}}};Do=Xh([Re(),Zh(0,Oe("CristalApp"))],Do);class ed{constructor(t){t.bind("AuthenticationManagerProvider").to(Do).inSingletonScope()}}var td=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,rd=(e,t,n,i)=>{for(var a=i>1?void 0:i?nd(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&td(t,n,a),a};let Io=class{constructor(){this.availableConfigurations=new Map}getApp(){throw new Error("Method not implemented.")}getRouter(){throw new Error("Method not implemented.")}getContainer(){return this.container}setContainer(e){this.container=e}getWikiConfig(){return this.wikiConfig}setWikiConfig(e){this.wikiConfig=e}getSkinManager(){throw new Error("Method not implemented.")}switchConfig(){}setAvailableConfigurations(e){console.log(e),e.forEach((t,n)=>{const i=t==null?void 0:t.configType;if(t){const a=this.container.getNamed("WikiConfig",i);a.setConfigFromObject(t),this.availableConfigurations.set(n,a)}})}getAvailableConfigurations(){return this.availableConfigurations}run(){throw new Error("Method not implemented.")}getUIXTemplates(){throw new Error("Method not implemented.")}getMenuEntries(){throw new Error("Method not implemented.")}getCurrentPage(){throw new Error("Method not implemented.")}getCurrentContent(){throw new Error("Method not implemented.")}getCurrentSource(){throw new Error("Method not implemented.")}getCurrentSyntax(){throw new Error("Method not implemented.")}setCurrentPage(){throw new Error("Method not implemented.")}setContentRef(){throw new Error("Method not implemented.")}loadPageFromURL(){throw new Error("Method not implemented.")}loadPage(){throw new Error("Method not implemented.")}getPage(){throw new Error("Method not implemented.")}getLogger(){throw new Error("Method not implemented.")}getLoggerConfig(){throw new Error("Method not implemented.")}renderContent(){throw new Error("Method not implemented.")}};Io=rd([Re()],Io);var id=Object.defineProperty,od=Object.getOwnPropertyDescriptor,ad=(e,t,n,i)=>{for(var a=i>1?void 0:i?od(t,n):t,s=e.length-1,f;s>=0;s--)(f=e[s])&&(a=(i?f(t,n,a):f(a))||a);return i&&a&&id(t,n,a),a};let No=class{constructor(){this.initialize()}initialize(){}getStatus(){return!0}async increment(){return 0}async addToQueue(){}async getQueueSize(){return 0}};No=ad([Re()],No);class sd{constructor(){this.currentNumber=0,this.queue=[],this.initialized=!1}async start(){for(console.log("Starting worker thread"),await this.initialize();;)await this.sleep(1e3),await this.checkQueue()}setPageLoadedCallback(t){this.fct=t}sleep(t){return new Promise(n=>setTimeout(n,t))}async checkQueue(){if(this.getQueueSize()>0)if(this.initialized){const n=this.queue.pop();n&&await this.handleQueueItem(n),await this.checkQueue()}else console.log("Worker cristal code not initialized yet. Cannot process queue items.")}async handleQueueItem(t){console.log("Handling queue item code ready to process",t);try{let n=null,i=null,a=null;const s=t.indexOf(":"),f=t.lastIndexOf("_");if(s!=-1&&f!=-1){n=t.substring(0,s),i=t.substring(s+1,f),a=t.substring(f+1);const d=this.getWikiConfig(n);d==null?console.log("Could not find config for page",t):(console.log("Updating page ",i,a),await d.storage.updatePageContent(i,a)&&(console.log("Page updated. Calling back to main thread"),this.fct(t)))}else console.log("Could not process page",t)}catch(n){console.log("Exception while trying to load",t,n)}}add(t){return console.log("Worker in add"),this.currentNumber+=t,this.currentNumber}addToQueue(t){console.log("Worker in addToQueue",t),this.queue.includes(t)||this.queue.push(t)}getQueueSize(){return console.log("Worker in getQueueSize"),this.queue.length}getWikiConfig(t){const n=this.configMap.get(t);if(n==null){console.error("Failed to find wikiConfig for configName",t);return}const a=new Map(Object.entries(n)).get("configType");console.log("Looking for wikiConfig for name",t,"and type",a);let s;try{return s=this.container.getNamed("WikiConfig",a),this.cristal.setWikiConfig(s),s.setConfigFromObject(n),s.initialize(),console.debug("Found wikiConfig for",t,"and type",a,":",s),s}catch(f){console.error("Failed to find wikiConfig for name",t,"and type",a,f);return}}async initialize(){console.log("Starting initialize");const t=["storage"],i=await(await fetch("/config.json")).json();this.configMap=new Map(Object.entries(i)),console.log("Loaded json config",this.configMap);const a=new fh(t);a.initializeContainer(),this.container=a.container,console.log("Container status",this.container),this.container.bind("CristalApp").to(Io).inSingletonScope(),this.container.bind("QueueWorker").to(No).inSingletonScope(),this.cristal=this.container.get("CristalApp"),this.cristal.setContainer(this.container),console.log("Container status",this.container),new wh(a.container),new Rh(a.container),new Kh(a.container),new Yh(a.container),new ed(a.container),console.log("Loading storage components"),this.initialized=!0,console.log("Finished initialize")}}const Bs=new sd;Bs.start(),onconnect=e=>{Di(Bs,e.ports[0])},console.log("Worker code loaded")})();
|
|
47
|
-
//# sourceMappingURL=worker-DhHDiwPg.js.map
|