@stonecrop/stonecrop 0.2.63 โ 0.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/src/index.d.ts +5 -5
- package/dist/src/stores/data.d.ts +2 -2
- package/dist/src/types/index.d.ts +8 -8
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stonecrop.js +667 -652
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.tsbuildinfo +1 -1
- package/dist/stonecrop.umd.cjs +17 -17
- package/dist/stonecrop.umd.cjs.map +1 -1
- package/package.json +14 -13
- package/src/index.ts +5 -5
- package/src/types/index.ts +8 -9
- package/dist/stonecrop/src/tsdoc-metadata.json +0 -11
- package/dist/stonecrop.d.ts +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.7.2"}
|
package/dist/stonecrop.umd.cjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
(function(B,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(B=typeof globalThis<"u"?globalThis:B||self,m(B["@stonecrop/stonecrop"]={},B.Vue))})(this,function(B,m){"use strict";var
|
|
2
|
-
* pinia v2.
|
|
1
|
+
(function(B,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(B=typeof globalThis<"u"?globalThis:B||self,m(B["@stonecrop/stonecrop"]={},B.Vue))})(this,function(B,m){"use strict";var li=Object.defineProperty;var fi=(B,m,ne)=>m in B?li(B,m,{enumerable:!0,configurable:!0,writable:!0,value:ne}):B[m]=ne;var L=(B,m,ne)=>fi(B,typeof m!="symbol"?m+"":m,ne);function ne(e){this.message=e||""}ne.prototype=Object.create(Error.prototype,{constructor:{value:ne},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Ee=class Ee{constructor(t,n,r,o,s){L(this,"name","Stonecrop");L(this,"registry");L(this,"schema");L(this,"workflow");L(this,"actions");L(this,"store");if(Ee._root)return Ee._root;Ee._root=this,this.registry=t,this.store=n,this.schema=r,this.workflow=o,this.actions=s}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new ne(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,r){const s=this.registry.registry[t.slug].actions.get(n),{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),s.length>0&&s.forEach(a=>{new Function(a)(r)})}};L(Ee,"_root");let Ge=Ee;var Ot=!1;function Ce(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function ze(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function tr(){return Nt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Nt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const nr=typeof Proxy=="function",rr="devtools-plugin:setup",or="plugin:settings:set";let he,qe;function sr(){var e;return he!==void 0||(typeof window<"u"&&window.performance?(he=!0,qe=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(he=!0,qe=globalThis.perf_hooks.performance):he=!1),he}function ir(){return sr()?qe.now():Date.now()}class ar{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return ir()}},n&&n.on(or,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(l=>{this.targetQueue.push({method:a,args:c,resolve:l})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Je(e,t){const n=e,r=Nt(),o=tr(),s=nr&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(rr,e,t);else{const i=s?new ar(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*!
|
|
2
|
+
* pinia v2.3.0
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/let Oe;const Ne=e=>Oe=e,kt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function
|
|
5
|
+
*/let Oe;const Ne=e=>Oe=e,kt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ce(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Q;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Q||(Q={}));const re=typeof window<"u",Pt=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function cr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Ke(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){It(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Rt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Te(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Ae=typeof navigator=="object"?navigator:{userAgent:""},$t=/Macintosh/.test(Ae.userAgent)&&/AppleWebKit/.test(Ae.userAgent)&&!/Safari/.test(Ae.userAgent),It=re?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!$t?ur:"msSaveOrOpenBlob"in Ae?lr:fr:()=>{};function ur(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Rt(r.href)?Ke(e,t,n):(r.target="_blank",Te(r)):Te(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Te(r)},0))}function lr(e,t="download",n){if(typeof e=="string")if(Rt(e))Ke(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Te(r)})}else navigator.msSaveOrOpenBlob(cr(e,n),t)}function fr(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Ke(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Pt.HTMLElement))||"safari"in Pt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||$t)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let c=a.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function V(e,t){const n="๐ "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Qe(e){return"_a"in e&&"install"in e}function Ct(){if(!("clipboard"in navigator))return V("Your browser doesn't support the Clipboard API","error"),!0}function Tt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(V('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function dr(e){if(!Ct())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),V("Global state copied to clipboard.")}catch(t){if(Tt(t))return;V("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function pr(e){if(!Ct())try{At(e,JSON.parse(await navigator.clipboard.readText())),V("Global state pasted from clipboard.")}catch(t){if(Tt(t))return;V("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function hr(e){try{It(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){V("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Y;function mr(){Y||(Y=document.createElement("input"),Y.type="file",Y.accept=".json");function e(){return new Promise((t,n)=>{Y.onchange=async()=>{const r=Y.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Y.oncancel=()=>t(null),Y.onerror=n,Y.click()})}return e}async function gr(e){try{const n=await mr()();if(!n)return;const{text:r,file:o}=n;At(e,JSON.parse(r)),V(`Global state imported from "${o.name}".`)}catch(t){V("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function At(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function J(e){return{_custom:{display:e}}}const Dt="๐ Pinia (root)",De="_root";function vr(e){return Qe(e)?{id:De,label:Dt}:{id:e.$id,label:e.$id}}function yr(e){if(Qe(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,c)=>(a[c]=i[c],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function _r(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:J(e.type),key:J(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Er(e){switch(e){case Q.direct:return"mutation";case Q.patchFunction:return"$patch";case Q.patchObject:return"$patch";default:return"unknown"}}let me=!0;const Me=[],ue="pinia:mutations",U="pinia",{assign:wr}=Object,Ve=e=>"๐ "+e;function br(e,t){Je({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Me,app:e},n=>{typeof n.now!="function"&&V("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:ue,label:"Pinia ๐",color:15064968}),n.addInspector({id:U,label:"Pinia ๐",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{dr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await pr(t),n.sendInspectorTree(U),n.sendInspectorState(U)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{hr(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await gr(t),n.sendInspectorTree(U),n.sendInspectorState(U)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?V(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),V(`Store "${r}" reset.`)):V(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:Ve(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:m.toRaw(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:Ve(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(f){c[l]=f}return c},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===U){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Dt.toLowerCase().includes(r.filter.toLowerCase())):o).map(vr)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===U){const o=r.nodeId===De?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==De&&(globalThis.$store=m.toRaw(o)),r.state=yr(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===U){const s=r.nodeId===De?t:t._s.get(r.nodeId);if(!s)return V(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Qe(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),me=!1,r.set(s,i,r.state.value),me=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("๐")){const o=r.type.replace(/^๐\s*/,""),s=t._s.get(o);if(!s)return V(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return V(`Invalid path for store "${o}":
|
|
6
6
|
${i}
|
|
7
|
-
Only state can be modified.`);i[0]="$state",me=!1,r.set(s,i,r.state.value),me=!0}})})}function Sr(e,t){Me.includes(Ve(t.$id))||Me.push(Ve(t.$id)),Je({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Me,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:c,args:l})=>{const f=Mt++;n.addTimelineEvent({layerId:
|
|
7
|
+
Only state can be modified.`);i[0]="$state",me=!1,r.set(s,i,r.state.value),me=!0}})})}function Sr(e,t){Me.includes(Ve(t.$id))||Me.push(Ve(t.$id)),Je({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Me,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:c,args:l})=>{const f=Mt++;n.addTimelineEvent({layerId:ue,event:{time:r(),title:"๐ซ "+c,subtitle:"start",data:{store:J(t.$id),action:J(c),args:l},groupId:f}}),i(u=>{oe=void 0,n.addTimelineEvent({layerId:ue,event:{time:r(),title:"๐ฌ "+c,subtitle:"end",data:{store:J(t.$id),action:J(c),args:l,result:u},groupId:f}})}),a(u=>{oe=void 0,n.addTimelineEvent({layerId:ue,event:{time:r(),logType:"error",title:"๐ฅ "+c,subtitle:"end",data:{store:J(t.$id),action:J(c),args:l,error:u},groupId:f}})})},!0),t._customProperties.forEach(i=>{m.watch(()=>m.unref(t[i]),(a,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(U),me&&n.addTimelineEvent({layerId:ue,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:c},groupId:oe}})},{deep:!0})}),t.$subscribe(({events:i,type:a},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(U),!me)return;const l={time:r(),title:Er(a),data:wr({store:J(t.$id)},_r(i)),groupId:oe};a===Q.patchFunction?l.subtitle="โคต๏ธ":a===Q.patchObject?l.subtitle="๐งฉ":i&&!Array.isArray(i)&&(l.subtitle=i.type),i&&(l.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ue,event:l})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=m.markRaw(i=>{o(i),n.addTimelineEvent({layerId:ue,event:{time:r(),title:"๐ฅ "+t.$id,subtitle:"HMR update",data:{store:J(t.$id),info:J("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(U),n.sendInspectorState(U)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(U),n.sendInspectorState(U),n.getSettings().logStoreChanges&&V(`Disposed "${t.$id}" store ๐`)},n.notifyComponentUpdate(),n.sendInspectorTree(U),n.sendInspectorState(U),n.getSettings().logStoreChanges&&V(`"${t.$id}" store installed ๐`)})}let Mt=0,oe;function Vt(e,t,n){const r=t.reduce((o,s)=>(o[s]=m.toRaw(e)[s],o),{});for(const o in r)e[o]=function(){const s=Mt,i=n?new Proxy(e,{get(...c){return oe=s,Reflect.get(...c)},set(...c){return oe=s,Reflect.set(...c)}}):e;oe=s;const a=r[o].apply(i,arguments);return oe=void 0,a}}function Or({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Vt(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;m.toRaw(t)._hotUpdate=function(o){r.apply(this,arguments),Vt(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}Sr(e,t)}}function Nr(){const e=m.effectScope(!0),t=e.run(()=>m.ref({}));let n=[],r=[];const o=m.markRaw({install(s){Ne(o),o._a=s,s.provide(kt,o),s.config.globalProperties.$pinia=o,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re&&br(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Ot?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re&&typeof Proxy<"u"&&o.use(Or),o}function jt(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];ce(o)&&ce(r)&&!m.isRef(r)&&!m.isReactive(r)?e[n]=jt(o,r):e[n]=r}return e}const xt=()=>{};function Lt(e,t,n,r=xt){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&m.getCurrentScope()&&m.onScopeDispose(o),o}function ge(e,...t){e.slice().forEach(n=>{n(...t)})}const kr=e=>e(),Bt=Symbol(),Ye=Symbol();function Xe(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];ce(o)&&ce(r)&&e.hasOwnProperty(n)&&!m.isRef(r)&&!m.isReactive(r)?e[n]=Xe(o,r):e[n]=r}return e}const Pr=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Rr(e){return!ce(e)||!e.hasOwnProperty(Pr)}const{assign:z}=Object;function Ut(e){return!!(m.isRef(e)&&e.effect)}function Ft(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let c;function l(){!a&&(process.env.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const f=process.env.NODE_ENV!=="production"&&r?m.toRefs(m.ref(o?o():{}).value):m.toRefs(n.state.value[e]);return z(f,s,Object.keys(i||{}).reduce((u,d)=>(process.env.NODE_ENV!=="production"&&d in f&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`),u[d]=m.markRaw(m.computed(()=>{Ne(n);const h=n._s.get(e);return i[d].call(h,h)})),u),{}))}return c=Ze(e,l,t,n,r,!0),c}function Ze(e,t,n={},r,o,s){let i;const a=z({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!Ot&&(c.onTrigger=_=>{l?h=_:l==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(_):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,f,u=[],d=[],h;const b=r.state.value[e];!s&&!b&&(process.env.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=m.ref({});let w;function I(_){let y;l=f=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof _=="function"?(_(r.state.value[e]),y={type:Q.patchFunction,storeId:e,events:h}):(Xe(r.state.value[e],_),y={type:Q.patchObject,payload:_,storeId:e,events:h});const A=w=Symbol();m.nextTick().then(()=>{w===A&&(l=!0)}),f=!0,ge(u,y,r.state.value[e])}const P=s?function(){const{state:y}=n,A=y?y():{};this.$patch(x=>{z(x,A)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:xt;function R(){i.stop(),u=[],d=[],r._s.delete(e)}const j=(_,y="")=>{if(Bt in _)return _[Ye]=y,_;const A=function(){Ne(r);const x=Array.from(arguments),fe=[],de=[];function He(W){fe.push(W)}function be(W){de.push(W)}ge(d,{args:x,name:A[Ye],store:S,after:He,onError:be});let te;try{te=_.apply(this&&this.$id===e?this:S,x)}catch(W){throw ge(de,W),W}return te instanceof Promise?te.then(W=>(ge(fe,W),W)).catch(W=>(ge(de,W),Promise.reject(W))):(ge(fe,te),te)};return A[Bt]=!0,A[Ye]=y,A},F=m.markRaw({actions:{},getters:{},state:[],hotState:O}),K={_p:r,$id:e,$onAction:Lt.bind(null,d),$patch:I,$reset:P,$subscribe(_,y={}){const A=Lt(u,_,y.detached,()=>x()),x=i.run(()=>m.watch(()=>r.state.value[e],fe=>{(y.flush==="sync"?f:l)&&_({storeId:e,type:Q.direct,events:h},fe)},z({},c,y)));return A},$dispose:R},S=m.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re?z({_hmrPayload:F,_customProperties:m.markRaw(new Set)},K):K);r._s.set(e,S);const q=(r._a&&r._a.runWithContext||kr)(()=>r._e.run(()=>(i=m.effectScope()).run(()=>t({action:j}))));for(const _ in q){const y=q[_];if(m.isRef(y)&&!Ut(y)||m.isReactive(y))process.env.NODE_ENV!=="production"&&o?Ce(O.value,_,m.toRef(q,_)):s||(b&&Rr(y)&&(m.isRef(y)?y.value=b[_]:Xe(y,b[_])),r.state.value[e][_]=y),process.env.NODE_ENV!=="production"&&F.state.push(_);else if(typeof y=="function"){const A=process.env.NODE_ENV!=="production"&&o?y:j(y,_);q[_]=A,process.env.NODE_ENV!=="production"&&(F.actions[_]=y),a.actions[_]=y}else process.env.NODE_ENV!=="production"&&Ut(y)&&(F.getters[_]=s?n.getters[_]:y,re&&(q._getters||(q._getters=m.markRaw([]))).push(_))}if(z(S,q),z(m.toRaw(S),q),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:_=>{if(process.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");I(y=>{z(y,_)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=m.markRaw(_=>{S._hotUpdating=!0,_._hmrPayload.state.forEach(y=>{if(y in S.$state){const A=_.$state[y],x=S.$state[y];typeof A=="object"&&ce(A)&&ce(x)?jt(A,x):_.$state[y]=x}Ce(S,y,m.toRef(_.$state,y))}),Object.keys(S.$state).forEach(y=>{y in _.$state||ze(S,y)}),l=!1,f=!1,r.state.value[e]=m.toRef(_._hmrPayload,"hotState"),f=!0,m.nextTick().then(()=>{l=!0});for(const y in _._hmrPayload.actions){const A=_[y];Ce(S,y,j(A,y))}for(const y in _._hmrPayload.getters){const A=_._hmrPayload.getters[y],x=s?m.computed(()=>(Ne(r),A.call(S,S))):A;Ce(S,y,x)}Object.keys(S._hmrPayload.getters).forEach(y=>{y in _._hmrPayload.getters||ze(S,y)}),Object.keys(S._hmrPayload.actions).forEach(y=>{y in _._hmrPayload.actions||ze(S,y)}),S._hmrPayload=_._hmrPayload,S._getters=_._getters,S._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re){const _={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(y=>{Object.defineProperty(S,y,z({value:S[y]},_))})}return r._p.forEach(_=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re){const y=i.run(()=>_({store:S,app:r._a,pinia:r,options:a}));Object.keys(y||{}).forEach(A=>S._customProperties.add(A)),z(S,y)}else z(S,i.run(()=>_({store:S,app:r._a,pinia:r,options:a})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[๐]: The "state" must be a plain object. It cannot be
|
|
8
8
|
state: () => new MyClass()
|
|
9
|
-
Found in store "${S.$id}".`),b&&s&&n.hydrate&&n.hydrate(S.$state,b),l=!0,f=!0,S}function $r(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,c){const l=m.hasInjectionContext();if(a=(process.env.NODE_ENV==="test"&&Oe&&Oe._testing?null:a)||(l?m.inject(kt,null):null),a&&Ne(a),process.env.NODE_ENV!=="production"&&!Oe)throw new Error(`[๐]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
9
|
+
Found in store "${S.$id}".`),b&&s&&n.hydrate&&n.hydrate(S.$state,b),l=!0,f=!0,S}/*! #__NO_SIDE_EFFECTS__ */function $r(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,c){const l=m.hasInjectionContext();if(a=(process.env.NODE_ENV==="test"&&Oe&&Oe._testing?null:a)||(l?m.inject(kt,null):null),a&&Ne(a),process.env.NODE_ENV!=="production"&&!Oe)throw new Error(`[๐]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
10
10
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
11
|
-
This will fail in production.`);a=Oe,a._s.has(r)||(s?Ze(r,t,o,a):Ft(r,o,a),process.env.NODE_ENV!=="production"&&(i._pinia=a));const f=a._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const u="__hot:"+r,d=s?Ze(u,t,o,a,!0):Ft(u,z({},o),a,!0);c._hotUpdate(d),delete a.state.value[u],a._s.delete(u)}if(process.env.NODE_ENV!=="production"&&
|
|
12
|
-
* vue-router v4.
|
|
11
|
+
This will fail in production.`);a=Oe,a._s.has(r)||(s?Ze(r,t,o,a):Ft(r,o,a),process.env.NODE_ENV!=="production"&&(i._pinia=a));const f=a._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const u="__hot:"+r,d=s?Ze(u,t,o,a,!0):Ft(u,z({},o),a,!0);c._hotUpdate(d),delete a.state.value[u],a._s.delete(u)}if(process.env.NODE_ENV!=="production"&&re){const u=m.getCurrentInstance();if(u&&u.proxy&&!c){const d=u.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[r]=f}}return f}return i.$id=r,i}const Ir=$r("data",()=>{const e=m.ref([]),t=m.ref({});return{records:e,record:t}});function Cr(e){e||(e=m.inject("$registry"));const t=Ir(),n=m.ref(new Ge(e,t)),r=m.ref(!1);return m.onBeforeMount(async()=>{var c,l;const o=e.router.currentRoute.value,s=(c=o.params.records)==null?void 0:c.toString().toLowerCase(),i=(l=o.params.record)==null?void 0:l.toString().toLowerCase();if(!s&&!i)return;const a=await e.getMeta(s);e.addDoctype(a),n.value.setup(a),s&&(i?await n.value.getRecord(a,i):await n.value.getRecords(a)),n.value.runAction(a,"LOAD",i?[i]:void 0),r.value=!0}),{stonecrop:n,isReady:r}}class Tr{constructor(t,n,r,o,s){L(this,"doctype");L(this,"schema");L(this,"workflow");L(this,"actions");L(this,"component");this.doctype=t,this.schema=n,this.workflow=r,this.actions=o,this.component=s}get slug(){return this.doctype.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}get __typename(){return this.doctype}}const we=class we{constructor(t,n){L(this,"name");L(this,"router");L(this,"registry");L(this,"getMeta");if(we._root)return we._root;we._root=this,this.name="Registry",this.router=t,this.registry={},this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),this.router.hasRoute(t.doctype)||this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}};L(we,"_root");let je=we;/*!
|
|
12
|
+
* vue-router v4.5.0
|
|
13
13
|
* (c) 2024 Eduardo San Martin Morote
|
|
14
14
|
* @license MIT
|
|
15
|
-
*/const X=typeof document<"u";function Ht(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ar(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ht(e.default)}const C=Object.assign;function et(e,t){const n={};for(const r in t){const o=t[r];n[r]=
|
|
15
|
+
*/const X=typeof document<"u";function Ht(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ar(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ht(e.default)}const C=Object.assign;function et(e,t){const n={};for(const r in t){const o=t[r];n[r]=G(o)?o.map(e):e(o)}return n}const ke=()=>{},G=Array.isArray;function N(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Wt=/#/g,Dr=/&/g,Mr=/\//g,Vr=/=/g,jr=/\?/g,Gt=/\+/g,xr=/%5B/g,Lr=/%5D/g,zt=/%5E/g,Br=/%60/g,qt=/%7B/g,Ur=/%7C/g,Jt=/%7D/g,Fr=/%20/g;function tt(e){return encodeURI(""+e).replace(Ur,"|").replace(xr,"[").replace(Lr,"]")}function Hr(e){return tt(e).replace(qt,"{").replace(Jt,"}").replace(zt,"^")}function nt(e){return tt(e).replace(Gt,"%2B").replace(Fr,"+").replace(Wt,"%23").replace(Dr,"%26").replace(Br,"`").replace(qt,"{").replace(Jt,"}").replace(zt,"^")}function Wr(e){return nt(e).replace(Vr,"%3D")}function Gr(e){return tt(e).replace(Wt,"%23").replace(jr,"%3F")}function zr(e){return e==null?"":Gr(e).replace(Mr,"%2F")}function ve(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&N(`Error decoding "${e}". Using original value`)}return""+e}const qr=/\/$/,Jr=e=>e.replace(qr,"");function rt(e,t,n="/"){let r,o={},s="",i="";const a=t.indexOf("#");let c=t.indexOf("?");return a<c&&a>=0&&(c=-1),c>-1&&(r=t.slice(0,c),s=t.slice(c+1,a>-1?a:t.length),o=e(s)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Yr(r??t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:ve(i)}}function Kr(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Kt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Qt(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&se(t.matched[r],n.matched[o])&&Yt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function se(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Yt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Qr(e[n],t[n]))return!1;return!0}function Qr(e,t){return G(e)?Xt(e,t):G(t)?Xt(t,e):e===t}function Xt(e,t){return G(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Yr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return N(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i).join("/")}const ie={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Pe;(function(e){e.pop="pop",e.push="push"})(Pe||(Pe={}));var Re;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Re||(Re={}));function Xr(e){if(!e)if(X){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Jr(e)}const Zr=/^[^#]+#/;function eo(e,t){return e.replace(Zr,"#")+t}function to(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const xe=()=>({left:window.scrollX,top:window.scrollY});function no(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const s=document.querySelector(e.el);if(r&&s){N(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{N(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){process.env.NODE_ENV!=="production"&&N(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=to(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Zt(e,t){return(history.state?history.state.position-t:-1)+e}const ot=new Map;function ro(e,t){ot.set(e,t)}function oo(e){const t=ot.get(e);return ot.delete(e),t}let so=()=>location.protocol+"//"+location.host;function en(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let a=o.includes(e.slice(s))?e.slice(s).length:1,c=o.slice(a);return c[0]!=="/"&&(c="/"+c),Kt(c,"")}return Kt(n,e)+r+o}function io(e,t,n,r){let o=[],s=[],i=null;const a=({state:d})=>{const h=en(e,location),b=n.value,O=t.value;let w=0;if(d){if(n.value=h,t.value=d,i&&i===b){i=null;return}w=O?d.position-O.position:0}else r(h);o.forEach(I=>{I(n.value,b,{delta:w,type:Pe.pop,direction:w?w>0?Re.forward:Re.back:Re.unknown})})};function c(){i=n.value}function l(d){o.push(d);const h=()=>{const b=o.indexOf(d);b>-1&&o.splice(b,1)};return s.push(h),h}function f(){const{history:d}=window;d.state&&d.replaceState(C({},d.state,{scroll:xe()}),"")}function u(){for(const d of s)d();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:l,destroy:u}}function tn(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?xe():null}}function ao(e){const{history:t,location:n}=window,r={value:en(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(c,l,f){const u=e.indexOf("#"),d=u>-1?(n.host&&document.querySelector("base")?e:e.slice(u))+c:so()+e+c;try{t[f?"replaceState":"pushState"](l,"",d),o.value=l}catch(h){process.env.NODE_ENV!=="production"?N("Error with push/replace State",h):console.error(h),n[f?"replace":"assign"](d)}}function i(c,l){const f=C({},t.state,tn(o.value.back,c,o.value.forward,!0),l,{position:o.value.position});s(c,f,!0),r.value=c}function a(c,l){const f=C({},o.value,t.state,{forward:c,scroll:xe()});process.env.NODE_ENV!=="production"&&!t.state&&N(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
16
16
|
|
|
17
17
|
history.replaceState(history.state, '', url)
|
|
18
18
|
|
|
19
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(f.current,f,!0);const u=C({},tn(r.value,c,null),{position:f.position+1},l);s(c,u,!1),r.value=c}return{location:r,state:o,push:a,replace:i}}function co(e){e=Xr(e);const t=ao(e),n=io(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=C({location:"",base:e,go:r,createHref:eo.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Le(e){return typeof e=="string"||e&&typeof e=="object"}function nn(e){return typeof e=="string"||typeof e=="symbol"}const st=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var rn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(rn||(rn={}));const
|
|
19
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(f.current,f,!0);const u=C({},tn(r.value,c,null),{position:f.position+1},l);s(c,u,!1),r.value=c}return{location:r,state:o,push:a,replace:i}}function co(e){e=Xr(e);const t=ao(e),n=io(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=C({location:"",base:e,go:r,createHref:eo.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Le(e){return typeof e=="string"||e&&typeof e=="object"}function nn(e){return typeof e=="string"||typeof e=="symbol"}const st=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var rn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(rn||(rn={}));const uo={1({location:e,currentLocation:t}){return`No match for
|
|
20
20
|
${JSON.stringify(e)}${t?`
|
|
21
21
|
while being at
|
|
22
|
-
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${fo(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ye(e,t){return process.env.NODE_ENV!=="production"?C(new Error(
|
|
23
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(P=Eo(j,d,w),process.env.NODE_ENV!=="production"&&d&&F[0]==="/"&&
|
|
22
|
+
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${fo(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ye(e,t){return process.env.NODE_ENV!=="production"?C(new Error(uo[e](t)),{type:e,[st]:!0},t):C(new Error,{type:e,[st]:!0},t)}function Z(e,t){return e instanceof Error&&st in e&&(t==null||!!(e.type&t))}const lo=["params","query","hash"];function fo(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of lo)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const on="[^/]+?",po={sensitive:!1,strict:!1,start:!0,end:!0},ho=/[.+*?^${}()[\]/\\]/g;function mo(e,t){const n=C({},po,t),r=[];let o=n.start?"^":"";const s=[];for(const l of e){const f=l.length?[]:[90];n.strict&&!l.length&&(o+="/");for(let u=0;u<l.length;u++){const d=l[u];let h=40+(n.sensitive?.25:0);if(d.type===0)u||(o+="/"),o+=d.value.replace(ho,"\\$&"),h+=40;else if(d.type===1){const{value:b,repeatable:O,optional:w,regexp:I}=d;s.push({name:b,repeatable:O,optional:w});const P=I||on;if(P!==on){h+=10;try{new RegExp(`(${P})`)}catch(j){throw new Error(`Invalid custom RegExp for param "${b}" (${P}): `+j.message)}}let R=O?`((?:${P})(?:/(?:${P}))*)`:`(${P})`;u||(R=w&&l.length<2?`(?:/${R})`:"/"+R),w&&(R+="?"),o+=R,h+=20,w&&(h+=-8),O&&(h+=-20),P===".*"&&(h+=-50)}f.push(h)}r.push(f)}if(n.strict&&n.end){const l=r.length-1;r[l][r[l].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function a(l){const f=l.match(i),u={};if(!f)return null;for(let d=1;d<f.length;d++){const h=f[d]||"",b=s[d-1];u[b.name]=h&&b.repeatable?h.split("/"):h}return u}function c(l){let f="",u=!1;for(const d of e){(!u||!f.endsWith("/"))&&(f+="/"),u=!1;for(const h of d)if(h.type===0)f+=h.value;else if(h.type===1){const{value:b,repeatable:O,optional:w}=h,I=b in l?l[b]:"";if(G(I)&&!O)throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);const P=G(I)?I.join("/"):I;if(!P)if(w)d.length<2&&(f.endsWith("/")?f=f.slice(0,-1):u=!0);else throw new Error(`Missing required param "${b}"`);f+=P}}return f||"/"}return{re:i,score:r,keys:s,parse:a,stringify:c}}function go(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function sn(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=go(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(an(r))return 1;if(an(o))return-1}return o.length-r.length}function an(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const vo={type:0,value:""},yo=/[a-zA-Z0-9_]/;function _o(e){if(!e)return[[]];if(e==="/")return[[vo]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${l}": ${h}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let a=0,c,l="",f="";function u(){l&&(n===0?s.push({type:0,value:l}):n===1||n===2||n===3?(s.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),l="")}function d(){l+=c}for(;a<e.length;){if(c=e[a++],c==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:c==="/"?(l&&u(),i()):c===":"?(u(),n=1):d();break;case 4:d(),n=r;break;case 1:c==="("?n=2:yo.test(c)?d():(u(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&a--);break;case 2:c===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+c:n=3:f+=c;break;case 3:u(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&a--,f="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),u(),i(),o}function Eo(e,t,n){const r=mo(_o(e.path),n);if(process.env.NODE_ENV!=="production"){const s=new Set;for(const i of r.keys)s.has(i.name)&&N(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),s.add(i.name)}const o=C(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function wo(e,t){const n=[],r=new Map;t=fn({strict:!1,end:!0,sensitive:!1},t);function o(u){return r.get(u)}function s(u,d,h){const b=!h,O=un(u);process.env.NODE_ENV!=="production"&&No(O,d),O.aliasOf=h&&h.record;const w=fn(t,u),I=[O];if("alias"in u){const j=typeof u.alias=="string"?[u.alias]:u.alias;for(const F of j)I.push(un(C({},O,{components:h?h.record.components:O.components,path:F,aliasOf:h?h.record:O})))}let P,R;for(const j of I){const{path:F}=j;if(d&&F[0]!=="/"){const K=d.record.path,S=K[K.length-1]==="/"?"":"/";j.path=d.record.path+(F&&S+F)}if(process.env.NODE_ENV!=="production"&&j.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
23
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(P=Eo(j,d,w),process.env.NODE_ENV!=="production"&&d&&F[0]==="/"&&Po(P,d),h?(h.alias.push(P),process.env.NODE_ENV!=="production"&&Oo(h,P)):(R=R||P,R!==P&&R.alias.push(P),b&&u.name&&!ln(P)&&(process.env.NODE_ENV!=="production"&&ko(u,d),i(u.name))),dn(P)&&c(P),O.children){const K=O.children;for(let S=0;S<K.length;S++)s(K[S],P,h&&h.children[S])}h=h||P}return R?()=>{i(R)}:ke}function i(u){if(nn(u)){const d=r.get(u);d&&(r.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(i),d.alias.forEach(i))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&r.delete(u.record.name),u.children.forEach(i),u.alias.forEach(i))}}function a(){return n}function c(u){const d=Ro(u,n);n.splice(d,0,u),u.record.name&&!ln(u)&&r.set(u.record.name,u)}function l(u,d){let h,b={},O,w;if("name"in u&&u.name){if(h=r.get(u.name),!h)throw ye(1,{location:u});if(process.env.NODE_ENV!=="production"){const R=Object.keys(u.params||{}).filter(j=>!h.keys.find(F=>F.name===j));R.length&&N(`Discarded invalid param(s) "${R.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}w=h.record.name,b=C(cn(d.params,h.keys.filter(R=>!R.optional).concat(h.parent?h.parent.keys.filter(R=>R.optional):[]).map(R=>R.name)),u.params&&cn(u.params,h.keys.map(R=>R.name))),O=h.stringify(b)}else if(u.path!=null)O=u.path,process.env.NODE_ENV!=="production"&&!O.startsWith("/")&&N(`The Matcher cannot resolve relative paths but received "${O}". Unless you directly called \`matcher.resolve("${O}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),h=n.find(R=>R.re.test(O)),h&&(b=h.parse(O),w=h.record.name);else{if(h=d.name?r.get(d.name):n.find(R=>R.re.test(d.path)),!h)throw ye(1,{location:u,currentLocation:d});w=h.record.name,b=C({},d.params,u.params),O=h.stringify(b)}const I=[];let P=h;for(;P;)I.unshift(P.record),P=P.parent;return{name:w,path:O,params:b,matched:I,meta:So(I)}}e.forEach(u=>s(u));function f(){n.length=0,r.clear()}return{addRoute:s,resolve:l,removeRoute:i,clearRoutes:f,getRoutes:a,getRecordMatcher:o}}function cn(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function un(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bo(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function bo(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ln(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function So(e){return e.reduce((t,n)=>C(t,n.meta),{})}function fn(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function it(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Oo(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(it.bind(null,n)))return N(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(it.bind(null,n)))return N(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function No(e,t){t&&t.record.name&&!e.name&&!e.path&&N(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function ko(e,t){for(let n=t;n;n=n.parent)if(n.record.name===e.name)throw new Error(`A route named "${String(e.name)}" has been added as a ${t===n?"child":"descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`)}function Po(e,t){for(const n of t.keys)if(!e.keys.find(it.bind(null,n)))return N(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function Ro(e,t){let n=0,r=t.length;for(;n!==r;){const s=n+r>>1;sn(e,t[s])<0?r=s:n=s+1}const o=$o(e);return o&&(r=t.lastIndexOf(o,r-1),process.env.NODE_ENV!=="production"&&r<0&&N(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)),r}function $o(e){let t=e;for(;t=t.parent;)if(dn(t)&&sn(e,t)===0)return t}function dn({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Io(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(Gt," "),i=s.indexOf("="),a=ve(i<0?s:s.slice(0,i)),c=i<0?null:ve(s.slice(i+1));if(a in t){let l=t[a];G(l)||(l=t[a]=[l]),l.push(c)}else t[a]=c}return t}function pn(e){let t="";for(let n in e){const r=e[n];if(n=Wr(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(G(r)?r.map(s=>s&&nt(s)):[r&&nt(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Co(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=G(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const To=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),hn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),at=Symbol(process.env.NODE_ENV!=="production"?"router":""),mn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),ct=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function $e(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ae(e,t,n,r,o,s=i=>i()){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((a,c)=>{const l=d=>{d===!1?c(ye(4,{from:n,to:t})):d instanceof Error?c(d):Le(d)?c(ye(2,{from:t,to:d})):(i&&r.enterCallbacks[o]===i&&typeof d=="function"&&i.push(d),a())},f=s(()=>e.call(r&&r.instances[o],t,n,process.env.NODE_ENV!=="production"?Ao(l,t,n):l));let u=Promise.resolve(f);if(e.length<3&&(u=u.then(l)),process.env.NODE_ENV!=="production"&&e.length>2){const d=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
|
|
24
24
|
${e.toString()}
|
|
25
|
-
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof f=="object"&&"then"in f)u=u.then(h=>l._called?h:(N(d),Promise.reject(new Error("Invalid navigation guard"))));else if(f!==void 0&&!l._called){N(d),c(new Error("Invalid navigation guard"));return}}u.catch(d=>c(d))})}function
|
|
25
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof f=="object"&&"then"in f)u=u.then(h=>l._called?h:(N(d),Promise.reject(new Error("Invalid navigation guard"))));else if(f!==void 0&&!l._called){N(d),c(new Error("Invalid navigation guard"));return}}u.catch(d=>c(d))})}function Ao(e,t,n){let r=0;return function(){r++===1&&N(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function ut(e,t,n,r,o=s=>s()){const s=[];for(const i of e){process.env.NODE_ENV!=="production"&&!i.components&&!i.children.length&&N(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);for(const a in i.components){let c=i.components[a];if(process.env.NODE_ENV!=="production"){if(!c||typeof c!="object"&&typeof c!="function")throw N(`Component "${a}" in record with path "${i.path}" is not a valid component. Received "${String(c)}".`),new Error("Invalid route component");if("then"in c){N(`Component "${a}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const l=c;c=()=>l}else c.__asyncLoader&&!c.__warnedDefineAsync&&(c.__warnedDefineAsync=!0,N(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Ht(c)){const f=(c.__vccOpts||c)[t];f&&s.push(ae(f,n,r,i,a,o))}else{let l=c();process.env.NODE_ENV!=="production"&&!("catch"in l)&&(N(`Component "${a}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),l=Promise.resolve(l)),s.push(()=>l.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const u=Ar(f)?f.default:f;i.mods[a]=f,i.components[a]=u;const h=(u.__vccOpts||u)[t];return h&&ae(h,n,r,i,a,o)()}))}}}return s}function gn(e){const t=m.inject(at),n=m.inject(mn);let r=!1,o=null;const s=m.computed(()=>{const f=m.unref(e.to);return process.env.NODE_ENV!=="production"&&(!r||f!==o)&&(Le(f)||(r?N(`Invalid value for prop "to" in useLink()
|
|
26
26
|
- to:`,f,`
|
|
27
27
|
- previous to:`,o,`
|
|
28
28
|
- props:`,e):N(`Invalid value for prop "to" in useLink()
|
|
29
29
|
- to:`,f,`
|
|
30
|
-
- props:`,e)),o=f,r=!0),t.resolve(f)}),i=m.computed(()=>{const{matched:f}=s.value,{length:u}=f,d=f[u-1],h=n.matched;if(!d||!h.length)return-1;const b=h.findIndex(
|
|
30
|
+
- props:`,e)),o=f,r=!0),t.resolve(f)}),i=m.computed(()=>{const{matched:f}=s.value,{length:u}=f,d=f[u-1],h=n.matched;if(!d||!h.length)return-1;const b=h.findIndex(se.bind(null,d));if(b>-1)return b;const O=vn(f[u-2]);return u>1&&vn(d)===O&&h[h.length-1].path!==O?h.findIndex(se.bind(null,f[u-2])):b}),a=m.computed(()=>i.value>-1&&jo(n.params,s.value.params)),c=m.computed(()=>i.value>-1&&i.value===n.matched.length-1&&Yt(n.params,s.value.params));function l(f={}){if(Vo(f)){const u=t[m.unref(e.replace)?"replace":"push"](m.unref(e.to)).catch(ke);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}if(process.env.NODE_ENV!=="production"&&X){const f=m.getCurrentInstance();if(f){const u={route:s.value,isActive:a.value,isExactActive:c.value,error:null};f.__vrl_devtools=f.__vrl_devtools||[],f.__vrl_devtools.push(u),m.watchEffect(()=>{u.route=s.value,u.isActive=a.value,u.isExactActive=c.value,u.error=Le(m.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:s,href:m.computed(()=>s.value.href),isActive:a,isExactActive:c,navigate:l}}function Do(e){return e.length===1?e[0]:e}const Mo=m.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:gn,setup(e,{slots:t}){const n=m.reactive(gn(e)),{options:r}=m.inject(at),o=m.computed(()=>({[yn(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[yn(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&Do(t.default(n));return e.custom?s:m.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}});function Vo(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jo(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!G(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function vn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const yn=(e,t,n)=>e??t??n,xo=m.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Bo();const r=m.inject(ct),o=m.computed(()=>e.route||r.value),s=m.inject(hn,0),i=m.computed(()=>{let l=m.unref(s);const{matched:f}=o.value;let u;for(;(u=f[l])&&!u.components;)l++;return l}),a=m.computed(()=>o.value.matched[i.value]);m.provide(hn,m.computed(()=>i.value+1)),m.provide(To,a),m.provide(ct,o);const c=m.ref();return m.watch(()=>[c.value,a.value,e.name],([l,f,u],[d,h,b])=>{f&&(f.instances[u]=l,h&&h!==f&&l&&l===d&&(f.leaveGuards.size||(f.leaveGuards=h.leaveGuards),f.updateGuards.size||(f.updateGuards=h.updateGuards))),l&&f&&(!h||!se(f,h)||!d)&&(f.enterCallbacks[u]||[]).forEach(O=>O(l))},{flush:"post"}),()=>{const l=o.value,f=e.name,u=a.value,d=u&&u.components[f];if(!d)return _n(n.default,{Component:d,route:l});const h=u.props[f],b=h?h===!0?l.params:typeof h=="function"?h(l):h:null,O=I=>{I.component.isUnmounted&&(u.instances[f]=null)},w=m.h(d,C({},b,t,{onVnodeUnmounted:O,ref:c}));if(process.env.NODE_ENV!=="production"&&X&&w.ref){const I={depth:i.value,name:u.name,path:u.path,meta:u.meta};(G(w.ref)?w.ref.map(R=>R.i):[w.ref.i]).forEach(R=>{R.__vrv_devtools=I})}return _n(n.default,{Component:w,route:l})||w}}});function _n(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Lo=xo;function Bo(){const e=m.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const r=t==="KeepAlive"?"keep-alive":"transition";N(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
31
31
|
Use slot props instead:
|
|
32
32
|
|
|
33
33
|
<router-view v-slot="{ Component }">
|
|
34
34
|
<${r}>
|
|
35
35
|
<component :is="Component" />
|
|
36
36
|
</${r}>
|
|
37
|
-
</router-view>`)}}function Ie(e,t){const n=C({},e,{matched:e.matched.map(r=>
|
|
38
|
-
- Location:`,p),I({});let g;if(p.path!=null)process.env.NODE_ENV!=="production"&&"params"in p&&!("name"in p)&&Object.keys(p.params).length&&N(`Path "${p.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),g=C({},p,{path:rt(n,p.path,v.path).path});else{const k=C({},p.params);for(const D in k)k[D]==null&&delete k[D];g=C({},p,{params:u(k)}),v.params=u(v.params)}const E=t.resolve(g,v),T=p.hash||"";process.env.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&N(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),E.params=f(d(E.params));const M=Kr(r,C({},p,{hash:Hr(T),path:E.path})),$=o.createHref(M);return process.env.NODE_ENV!=="production"&&($.startsWith("//")?N(`Location "${p}" resolved to "${$}". A resolved location cannot start with multiple slashes.`):E.matched.length||N(`No match found for location with path "${p.path!=null?p.path:p}"`)),C({fullPath:M,hash:T,query:r===pn?
|
|
37
|
+
</router-view>`)}}function Ie(e,t){const n=C({},e,{matched:e.matched.map(r=>Yo(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Be(e){return{_custom:{display:e}}}let Uo=0;function Fo(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=Uo++;Je({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{typeof o.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),o.on.inspectComponent((f,u)=>{f.instanceData&&f.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ie(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:f,componentInstance:u})=>{if(u.__vrv_devtools){const d=u.__vrv_devtools;f.tags.push({label:(d.name?`${d.name.toString()}: `:"")+d.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:En})}G(u.__vrl_devtools)&&(u.__devtoolsApi=o,u.__vrl_devtools.forEach(d=>{let h=d.route.path,b=Sn,O="",w=0;d.error?(h=d.error,b=qo,w=Jo):d.isExactActive?(b=bn,O="This is exactly active"):d.isActive&&(b=wn,O="This link is active"),f.tags.push({label:h,textColor:w,tooltip:O,backgroundColor:b})}))}),m.watch(t.currentRoute,()=>{c(),o.notifyComponentUpdate(),o.sendInspectorTree(a),o.sendInspectorState(a)});const s="router:navigations:"+r;o.addTimelineLayer({id:s,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((f,u)=>{o.addTimelineEvent({layerId:s,event:{title:"Error during Navigation",subtitle:u.fullPath,logType:"error",time:o.now(),data:{error:f},groupId:u.meta.__navigationId}})});let i=0;t.beforeEach((f,u)=>{const d={guard:Be("beforeEach"),from:Ie(u,"Current Location during this navigation"),to:Ie(f,"Target location")};Object.defineProperty(f.meta,"__navigationId",{value:i++}),o.addTimelineEvent({layerId:s,event:{time:o.now(),title:"Start of navigation",subtitle:f.fullPath,data:d,groupId:f.meta.__navigationId}})}),t.afterEach((f,u,d)=>{const h={guard:Be("afterEach")};d?(h.failure={_custom:{type:Error,readOnly:!0,display:d?d.message:"",tooltip:"Navigation Failure",value:d}},h.status=Be("โ")):h.status=Be("โ
"),h.from=Ie(u,"Current Location during this navigation"),h.to=Ie(f,"Target location"),o.addTimelineEvent({layerId:s,event:{title:"End of navigation",subtitle:f.fullPath,time:o.now(),data:h,logType:d?"warning":"default",groupId:f.meta.__navigationId}})});const a="router-inspector:"+r;o.addInspector({id:a,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function c(){if(!l)return;const f=l;let u=n.getRoutes().filter(d=>!d.parent||!d.parent.record.components);u.forEach(kn),f.filter&&(u=u.filter(d=>lt(d,f.filter.toLowerCase()))),u.forEach(d=>Nn(d,t.currentRoute.value)),f.rootNodes=u.map(On)}let l;o.on.getInspectorTree(f=>{l=f,f.app===e&&f.inspectorId===a&&c()}),o.on.getInspectorState(f=>{if(f.app===e&&f.inspectorId===a){const d=n.getRoutes().find(h=>h.record.__vd_id===f.nodeId);d&&(f.state={options:Wo(d)})}}),o.sendInspectorTree(a),o.sendInspectorState(a)})}function Ho(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function Wo(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${Ho(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const En=15485081,wn=2450411,bn=8702998,Go=2282478,Sn=16486972,zo=6710886,qo=16704226,Jo=12131356;function On(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Go}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Sn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:En}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:bn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:wn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:zo});let r=n.__vd_id;return r==null&&(r=String(Ko++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(On)}}let Ko=0;const Qo=/^\/(.*)\/([a-z]*)$/;function Nn(e,t){const n=t.matched.length&&se(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>se(r,e.record))),e.children.forEach(r=>Nn(r,t))}function kn(e){e.__vd_match=!1,e.children.forEach(kn)}function lt(e,t){const n=String(e.re).match(Qo);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(i=>lt(i,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),s=ve(o);return!t.startsWith("/")&&(s.includes(t)||o.includes(t))||s.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(i=>lt(i,t))}function Yo(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function Xo(e){const t=wo(e.routes,e),n=e.parseQuery||Io,r=e.stringifyQuery||pn,o=e.history;if(process.env.NODE_ENV!=="production"&&!o)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const s=$e(),i=$e(),a=$e(),c=m.shallowRef(ie);let l=ie;X&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=et.bind(null,p=>""+p),u=et.bind(null,zr),d=et.bind(null,ve);function h(p,v){let g,E;return nn(p)?(g=t.getRecordMatcher(p),process.env.NODE_ENV!=="production"&&!g&&N(`Parent route "${String(p)}" not found when adding child route`,v),E=v):E=p,t.addRoute(E,g)}function b(p){const v=t.getRecordMatcher(p);v?t.removeRoute(v):process.env.NODE_ENV!=="production"&&N(`Cannot remove non-existent route "${String(p)}"`)}function O(){return t.getRoutes().map(p=>p.record)}function w(p){return!!t.getRecordMatcher(p)}function I(p,v){if(v=C({},v||c.value),typeof p=="string"){const k=rt(n,p,v.path),D=t.resolve({path:k.path},v),pe=o.createHref(k.fullPath);return process.env.NODE_ENV!=="production"&&(pe.startsWith("//")?N(`Location "${p}" resolved to "${pe}". A resolved location cannot start with multiple slashes.`):D.matched.length||N(`No match found for location with path "${p}"`)),C(k,D,{params:d(D.params),hash:ve(k.hash),redirectedFrom:void 0,href:pe})}if(process.env.NODE_ENV!=="production"&&!Le(p))return N(`router.resolve() was passed an invalid location. This will fail in production.
|
|
38
|
+
- Location:`,p),I({});let g;if(p.path!=null)process.env.NODE_ENV!=="production"&&"params"in p&&!("name"in p)&&Object.keys(p.params).length&&N(`Path "${p.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),g=C({},p,{path:rt(n,p.path,v.path).path});else{const k=C({},p.params);for(const D in k)k[D]==null&&delete k[D];g=C({},p,{params:u(k)}),v.params=u(v.params)}const E=t.resolve(g,v),T=p.hash||"";process.env.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&N(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),E.params=f(d(E.params));const M=Kr(r,C({},p,{hash:Hr(T),path:E.path})),$=o.createHref(M);return process.env.NODE_ENV!=="production"&&($.startsWith("//")?N(`Location "${p}" resolved to "${$}". A resolved location cannot start with multiple slashes.`):E.matched.length||N(`No match found for location with path "${p.path!=null?p.path:p}"`)),C({fullPath:M,hash:T,query:r===pn?Co(p.query):p.query||{}},E,{redirectedFrom:void 0,href:$})}function P(p){return typeof p=="string"?rt(n,p,c.value.path):C({},p)}function R(p,v){if(l!==p)return ye(8,{from:v,to:p})}function j(p){return S(p)}function F(p){return j(C(P(p),{replace:!0}))}function K(p){const v=p.matched[p.matched.length-1];if(v&&v.redirect){const{redirect:g}=v;let E=typeof g=="function"?g(p):g;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=P(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&E.path==null&&!("name"in E))throw N(`Invalid redirect found:
|
|
39
39
|
${JSON.stringify(E,null,2)}
|
|
40
40
|
when navigating to "${p.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return C({query:p.query,hash:p.hash,params:E.path!=null?{}:p.params},E)}}function S(p,v){const g=l=I(p),E=c.value,T=p.state,M=p.force,$=p.replace===!0,k=K(g);if(k)return S(C(P(k),{state:typeof k=="object"?C({},T,k.state):T,force:M,replace:$}),v||g);const D=g;D.redirectedFrom=v;let pe;return!M&&Qt(r,E,g)&&(pe=ye(16,{to:D,from:E}),Zn(E,E,!0,!1)),(pe?Promise.resolve(pe):_(D,E)).catch(H=>Z(H)?Z(H,2)?H:wt(H):te(H,D,E)).then(H=>{if(H){if(Z(H,2))return process.env.NODE_ENV!=="production"&&Qt(r,I(H.to),D)&&v&&(v._count=v._count?v._count+1:1)>30?(N(`Detected a possibly infinite redirection in a navigation guard when going from "${E.fullPath}" to "${D.fullPath}". Aborting to avoid a Stack Overflow.
|
|
41
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S(C({replace:$},P(H.to),{state:typeof H.to=="object"?C({},T,H.to.state):T,force:M}),v||D)}else H=A(D,E,!0,$,T);return y(D,E,H),H})}function Xn(p,v){const g=R(p,v);return g?Promise.reject(g):Promise.resolve()}function q(p){const v=Ge.values().next().value;return v&&typeof v.runWithContext=="function"?v.runWithContext(p):p()}function _(p,v){let g;const[E,T,M]=Yo(p,v);g=lt(E.reverse(),"beforeRouteLeave",p,v);for(const k of E)k.leaveGuards.forEach(D=>{g.push(ie(D,p,v))});const $=Xn.bind(null,p,v);return g.push($),Se(g).then(()=>{g=[];for(const k of s.list())g.push(ie(k,p,v));return g.push($),Se(g)}).then(()=>{g=lt(T,"beforeRouteUpdate",p,v);for(const k of T)k.updateGuards.forEach(D=>{g.push(ie(D,p,v))});return g.push($),Se(g)}).then(()=>{g=[];for(const k of M)if(k.beforeEnter)if(W(k.beforeEnter))for(const D of k.beforeEnter)g.push(ie(D,p,v));else g.push(ie(k.beforeEnter,p,v));return g.push($),Se(g)}).then(()=>(p.matched.forEach(k=>k.enterCallbacks={}),g=lt(M,"beforeRouteEnter",p,v,q),g.push($),Se(g))).then(()=>{g=[];for(const k of i.list())g.push(ie(k,p,v));return g.push($),Se(g)}).catch(k=>Z(k,8)?k:Promise.reject(k))}function y(p,v,g){a.list().forEach(E=>q(()=>E(p,v,g)))}function A(p,v,g,E,T){const M=R(p,v);if(M)return M;const $=v===se,k=X?history.state:{};g&&(E||$?o.replace(p.fullPath,C({scroll:$&&k&&k.scroll},T)):o.push(p.fullPath,T)),c.value=p,Zn(p,v,g,$),wt()}let x;function fe(){x||(x=o.listen((p,v,g)=>{if(!er.listening)return;const E=I(p),T=K(E);if(T){S(C(T,{replace:!0}),E).catch(ke);return}l=E;const M=c.value;X&&ro(Zt(M.fullPath,g.delta),xe()),_(E,M).catch($=>Z($,12)?$:Z($,2)?(S($.to,E).then(k=>{Z(k,20)&&!g.delta&&g.type===Pe.pop&&o.go(-1,!1)}).catch(ke),Promise.reject()):(g.delta&&o.go(-g.delta,!1),te($,E,M))).then($=>{$=$||A(E,M,!1),$&&(g.delta&&!Z($,8)?o.go(-g.delta,!1):g.type===Pe.pop&&Z($,20)&&o.go(-1,!1)),y(E,M,$)}).catch(ke)}))}let de=$e(),He=$e(),be;function te(p,v,g){wt(p);const E=He.list();return E.length?E.forEach(T=>T(p,v,g)):(process.env.NODE_ENV!=="production"&&N("uncaught error during route navigation:"),console.error(p)),Promise.reject(p)}function G(){return be&&c.value!==se?Promise.resolve():new Promise((p,v)=>{de.add([p,v])})}function wt(p){return be||(be=!p,fe(),de.list().forEach(([v,g])=>p?g(p):v()),de.reset()),p}function Zn(p,v,g,E){const{scrollBehavior:T}=e;if(!X||!T)return Promise.resolve();const M=!g&&oo(Zt(p.fullPath,0))||(E||!g)&&history.state&&history.state.scroll||null;return m.nextTick().then(()=>T(p,v,M)).then($=>$&&no($)).catch($=>te($,p,v))}const bt=p=>o.go(p);let St;const Ge=new Set,er={currentRoute:c,listening:!0,addRoute:h,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:w,getRoutes:O,resolve:I,options:e,push:j,replace:F,go:bt,back:()=>bt(-1),forward:()=>bt(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:He.add,isReady:G,install(p){const v=this;p.component("RouterLink",Ao),p.component("RouterView",jo),p.config.globalProperties.$router=v,Object.defineProperty(p.config.globalProperties,"$route",{enumerable:!0,get:()=>m.unref(c)}),X&&!St&&c.value===se&&(St=!0,j(o.location).catch(T=>{process.env.NODE_ENV!=="production"&&N("Unexpected error when starting the router:",T)}));const g={};for(const T in se)Object.defineProperty(g,T,{get:()=>c.value[T],enumerable:!0});p.provide(at,v),p.provide(mn,m.shallowReactive(g)),p.provide(ct,c);const E=p.unmount;Ge.add(p),p.unmount=function(){Ge.delete(p),Ge.size<1&&(l=se,x&&x(),x=null,c.value=se,St=!1,be=!1),E()},process.env.NODE_ENV!=="production"&&X&&Bo(p,v,t)}};function Se(p){return p.reduce((v,g)=>v.then(()=>q(g)),Promise.resolve())}return er}function Yo(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(l=>oe(l,a))?r.push(a):n.push(a));const c=e.matched[i];c&&(t.matched.find(l=>oe(l,c))||o.push(c))}return[n,r,o]}const Xo=Qo({history:co(),routes:[]});function Zo(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function Pn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function es(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function ft(){return Math.random().toString(36).substring(2)}var Rn=0,dt=0;function Ue(){var e=new Date().getTime();return e===Rn?(dt++,e*1e3+dt):(Rn=e,dt=0,e*1e3)}var ts=Ue,ns="native";function rs(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function os(e){e.bc.close(),e.subFns=[]}function ss(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function is(e,t){e.messagesCallback=t}function as(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function cs(){return 150}var ls={create:rs,close:os,onMessage:is,postMessage:ss,canBeUsed:as,type:ns,averageResponseTime:cs,microSeconds:ts},$n=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,In()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,us(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function us(e){for(var t=In()-e.ttl,n=e.map[Symbol.iterator]();;){var r=n.next().value;if(!r)return;var o=r[0],s=r[1];if(s<t)e.map.delete(o);else return}}function In(){return new Date().getTime()}function pt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var fs=Ue,ds="pubkey.broadcast-channel-0-",ee="messages",Fe={durability:"relaxed"},ps="idb";function Cn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function ht(e){e.commit&&e.commit()}function hs(e){var t=Cn(),n=ds+e,r=t.open(n);return r.onupgradeneeded=function(o){var s=o.target.result;s.createObjectStore(ee,{keyPath:"id",autoIncrement:!0})},new Promise(function(o,s){r.onerror=function(i){return s(i)},r.onsuccess=function(){o(r.result)}})}function ms(e,t,n){var r=new Date().getTime(),o={uuid:t,time:r,data:n},s=e.transaction([ee],"readwrite",Fe);return new Promise(function(i,a){s.oncomplete=function(){return i()},s.onerror=function(l){return a(l)};var c=s.objectStore(ee);c.add(o),ht(s)})}function gs(e,t){var n=e.transaction(ee,"readonly",Fe),r=n.objectStore(ee),o=[],s=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(s);return new Promise(function(c,l){i.onerror=function(f){return l(f)},i.onsuccess=function(f){c(f.target.result)}})}function a(){try{return s=IDBKeyRange.bound(t+1,1/0),r.openCursor(s)}catch{return r.openCursor()}}return new Promise(function(c,l){var f=a();f.onerror=function(u){return l(u)},f.onsuccess=function(u){var d=u.target.result;d?d.value.id<t+1?d.continue(t+1):(o.push(d.value),d.continue()):(ht(n),c(o))}})}function vs(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(ee,"readwrite",Fe),r=n.objectStore(ee);return Promise.all(t.map(function(o){var s=r.delete(o);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function ys(e,t){var n=new Date().getTime()-t,r=e.transaction(ee,"readonly",Fe),o=r.objectStore(ee),s=[];return new Promise(function(i){o.openCursor().onsuccess=function(a){var c=a.target.result;if(c){var l=c.value;l.time<n?(s.push(l),c.continue()):(ht(r),i(s))}else i(s)}})}function _s(e){return ys(e.db,e.options.idb.ttl).then(function(t){return vs(e,t.map(function(n){return n.id}))})}function Es(e,t){return t=pt(t),hs(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:ft(),eMIs:new $n(t.idb.ttl*2),writeBlockPromise:ue,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},Tn(r),r})}function Tn(e){e.closed||An(e).then(function(){return Pn(e.options.idb.fallbackInterval)}).then(function(){return Tn(e)})}function ws(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function An(e){return e.closed||!e.messagesCallback?ue:gs(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return ws(r,e)}).sort(function(r,o){return r.time-o.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),ue})}function bs(e){e.closed=!0,e.db.close()}function Ss(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return ms(e.db,e.uuid,t)}).then(function(){es(0,10)===0&&_s(e)}),e.writeBlockPromise}function Os(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,An(e)}function Ns(){return!!Cn()}function ks(e){return e.idb.fallbackInterval*2}var Ps={create:Es,close:bs,onMessage:Os,postMessage:Ss,canBeUsed:Ns,type:ps,averageResponseTime:ks,microSeconds:fs},Rs=Ue,$s="pubkey.broadcastChannel-",Is="localstorage";function Dn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Mn(e){return $s+e}function Cs(e,t){return new Promise(function(n){Pn().then(function(){var r=Mn(e.channelName),o={token:ft(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(o);Dn().setItem(r,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=r,i.newValue=s,window.dispatchEvent(i),n()})})}function Ts(e,t){var n=Mn(e),r=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",r),r}function As(e){window.removeEventListener("storage",e)}function Ds(e,t){if(t=pt(t),!Vn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=ft(),r=new $n(t.localstorage.removeTimeout),o={channelName:e,uuid:n,eMIs:r};return o.listener=Ts(e,function(s){o.messagesCallback&&s.uuid!==n&&(!s.token||r.has(s.token)||s.data.time&&s.data.time<o.messagesCallbackTime||(r.add(s.token),o.messagesCallback(s.data)))}),o}function Ms(e){As(e.listener)}function Vs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Vn(){var e=Dn();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function js(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var xs={create:Ds,close:Ms,onMessage:Vs,postMessage:Cs,canBeUsed:Vn,type:Is,averageResponseTime:js,microSeconds:Rs},Ls=Ue,Bs="simulate",mt=new Set;function Us(e){var t={name:e,messagesCallback:null};return mt.add(t),t}function Fs(e){mt.delete(e)}function Hs(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(mt);r.filter(function(o){return o.name===e.name}).filter(function(o){return o!==e}).filter(function(o){return!!o.messagesCallback}).forEach(function(o){return o.messagesCallback(t)}),n()},5)})}function Gs(e,t){e.messagesCallback=t}function Ws(){return!0}function zs(){return 5}var qs={create:Us,close:Fs,onMessage:Gs,postMessage:Hs,canBeUsed:Ws,type:Bs,averageResponseTime:zs,microSeconds:Ls},jn=[ls,Ps,xs];function Js(e){var t=[].concat(e.methods,jn).filter(Boolean);if(e.type){if(e.type==="simulate")return qs;var n=t.find(function(o){return o.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(o){return o.type!=="idb"}));var r=t.find(function(o){return o.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(jn.map(function(o){return o.type})))}var xn=new Set,Ks=0,gt=function(t,n){this.id=Ks++,xn.add(this),this.name=t,Ln&&(n=Ln),this.options=pt(n),this.method=Js(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,Qs(this)};gt._pubkey=!0;var Ln;gt.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return Bn(this,"message",t)},postInternal:function(t){return Bn(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};Hn(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,Fn(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),o={time:r,fn:n};Fn(this,t,o)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(o){return o.fn===n});Hn(this,t,r)},close:function(){var t=this;if(!this.closed){xn.delete(this),this.closed=!0;var n=this._prepP?this._prepP:ue;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Bn(e,t,n){var r=e.method.microSeconds(),o={time:r,type:t,data:n},s=e._prepP?e._prepP:ue;return s.then(function(){var i=e.method.postMessage(e._state,o);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function Qs(e){var t=e.method.create(e.name,e.options);Zo(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function Un(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function Fn(e,t,n){e._addEL[t].push(n),Ys(e)}function Hn(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),Xs(e)}function Ys(e){if(!e._iL&&Un(e)){var t=function(o){e._addEL[o.type].forEach(function(s){var i=1e5,a=s.time-i;o.time>=a&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function Xs(e){if(e._iL&&!Un(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class vt extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function Gn(e){return Object(e)!==e}const Zs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ei(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Zs}function ti(e){return Object.prototype.toString.call(e).slice(8,-1)}function ni(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
-
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function _e(e){let t="",n=0;const r=e.length;for(let o=0;o<r;o+=1){const s=e[o],i=
|
|
41
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S(C({replace:$},P(H.to),{state:typeof H.to=="object"?C({},T,H.to.state):T,force:M}),v||D)}else H=A(D,E,!0,$,T);return y(D,E,H),H})}function Xn(p,v){const g=R(p,v);return g?Promise.reject(g):Promise.resolve()}function q(p){const v=We.values().next().value;return v&&typeof v.runWithContext=="function"?v.runWithContext(p):p()}function _(p,v){let g;const[E,T,M]=Zo(p,v);g=ut(E.reverse(),"beforeRouteLeave",p,v);for(const k of E)k.leaveGuards.forEach(D=>{g.push(ae(D,p,v))});const $=Xn.bind(null,p,v);return g.push($),Se(g).then(()=>{g=[];for(const k of s.list())g.push(ae(k,p,v));return g.push($),Se(g)}).then(()=>{g=ut(T,"beforeRouteUpdate",p,v);for(const k of T)k.updateGuards.forEach(D=>{g.push(ae(D,p,v))});return g.push($),Se(g)}).then(()=>{g=[];for(const k of M)if(k.beforeEnter)if(G(k.beforeEnter))for(const D of k.beforeEnter)g.push(ae(D,p,v));else g.push(ae(k.beforeEnter,p,v));return g.push($),Se(g)}).then(()=>(p.matched.forEach(k=>k.enterCallbacks={}),g=ut(M,"beforeRouteEnter",p,v,q),g.push($),Se(g))).then(()=>{g=[];for(const k of i.list())g.push(ae(k,p,v));return g.push($),Se(g)}).catch(k=>Z(k,8)?k:Promise.reject(k))}function y(p,v,g){a.list().forEach(E=>q(()=>E(p,v,g)))}function A(p,v,g,E,T){const M=R(p,v);if(M)return M;const $=v===ie,k=X?history.state:{};g&&(E||$?o.replace(p.fullPath,C({scroll:$&&k&&k.scroll},T)):o.push(p.fullPath,T)),c.value=p,Zn(p,v,g,$),wt()}let x;function fe(){x||(x=o.listen((p,v,g)=>{if(!er.listening)return;const E=I(p),T=K(E);if(T){S(C(T,{replace:!0,force:!0}),E).catch(ke);return}l=E;const M=c.value;X&&ro(Zt(M.fullPath,g.delta),xe()),_(E,M).catch($=>Z($,12)?$:Z($,2)?(S(C(P($.to),{force:!0}),E).then(k=>{Z(k,20)&&!g.delta&&g.type===Pe.pop&&o.go(-1,!1)}).catch(ke),Promise.reject()):(g.delta&&o.go(-g.delta,!1),te($,E,M))).then($=>{$=$||A(E,M,!1),$&&(g.delta&&!Z($,8)?o.go(-g.delta,!1):g.type===Pe.pop&&Z($,20)&&o.go(-1,!1)),y(E,M,$)}).catch(ke)}))}let de=$e(),He=$e(),be;function te(p,v,g){wt(p);const E=He.list();return E.length?E.forEach(T=>T(p,v,g)):(process.env.NODE_ENV!=="production"&&N("uncaught error during route navigation:"),console.error(p)),Promise.reject(p)}function W(){return be&&c.value!==ie?Promise.resolve():new Promise((p,v)=>{de.add([p,v])})}function wt(p){return be||(be=!p,fe(),de.list().forEach(([v,g])=>p?g(p):v()),de.reset()),p}function Zn(p,v,g,E){const{scrollBehavior:T}=e;if(!X||!T)return Promise.resolve();const M=!g&&oo(Zt(p.fullPath,0))||(E||!g)&&history.state&&history.state.scroll||null;return m.nextTick().then(()=>T(p,v,M)).then($=>$&&no($)).catch($=>te($,p,v))}const bt=p=>o.go(p);let St;const We=new Set,er={currentRoute:c,listening:!0,addRoute:h,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:w,getRoutes:O,resolve:I,options:e,push:j,replace:F,go:bt,back:()=>bt(-1),forward:()=>bt(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:He.add,isReady:W,install(p){const v=this;p.component("RouterLink",Mo),p.component("RouterView",Lo),p.config.globalProperties.$router=v,Object.defineProperty(p.config.globalProperties,"$route",{enumerable:!0,get:()=>m.unref(c)}),X&&!St&&c.value===ie&&(St=!0,j(o.location).catch(T=>{process.env.NODE_ENV!=="production"&&N("Unexpected error when starting the router:",T)}));const g={};for(const T in ie)Object.defineProperty(g,T,{get:()=>c.value[T],enumerable:!0});p.provide(at,v),p.provide(mn,m.shallowReactive(g)),p.provide(ct,c);const E=p.unmount;We.add(p),p.unmount=function(){We.delete(p),We.size<1&&(l=ie,x&&x(),x=null,c.value=ie,St=!1,be=!1),E()},process.env.NODE_ENV!=="production"&&X&&Fo(p,v,t)}};function Se(p){return p.reduce((v,g)=>v.then(()=>q(g)),Promise.resolve())}return er}function Zo(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(l=>se(l,a))?r.push(a):n.push(a));const c=e.matched[i];c&&(t.matched.find(l=>se(l,c))||o.push(c))}return[n,r,o]}const es=Xo({history:co(),routes:[]});function ts(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var le=Promise.resolve();function Pn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function ns(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function ft(){return Math.random().toString(36).substring(2)}var Rn=0,dt=0;function Ue(){var e=new Date().getTime();return e===Rn?(dt++,e*1e3+dt):(Rn=e,dt=0,e*1e3)}var rs=Ue,os="native";function ss(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function is(e){e.bc.close(),e.subFns=[]}function as(e,t){try{return e.bc.postMessage(t,!1),le}catch(n){return Promise.reject(n)}}function cs(e,t){e.messagesCallback=t}function us(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function ls(){return 150}var fs={create:ss,close:is,onMessage:cs,postMessage:as,canBeUsed:us,type:os,averageResponseTime:ls,microSeconds:rs},$n=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,In()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,ds(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function ds(e){for(var t=In()-e.ttl,n=e.map[Symbol.iterator]();;){var r=n.next().value;if(!r)return;var o=r[0],s=r[1];if(s<t)e.map.delete(o);else return}}function In(){return new Date().getTime()}function pt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ps=Ue,hs="pubkey.broadcast-channel-0-",ee="messages",Fe={durability:"relaxed"},ms="idb";function Cn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function ht(e){e.commit&&e.commit()}function gs(e){var t=Cn(),n=hs+e,r=t.open(n);return r.onupgradeneeded=function(o){var s=o.target.result;s.createObjectStore(ee,{keyPath:"id",autoIncrement:!0})},new Promise(function(o,s){r.onerror=function(i){return s(i)},r.onsuccess=function(){o(r.result)}})}function vs(e,t,n){var r=new Date().getTime(),o={uuid:t,time:r,data:n},s=e.transaction([ee],"readwrite",Fe);return new Promise(function(i,a){s.oncomplete=function(){return i()},s.onerror=function(l){return a(l)};var c=s.objectStore(ee);c.add(o),ht(s)})}function ys(e,t){var n=e.transaction(ee,"readonly",Fe),r=n.objectStore(ee),o=[],s=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(s);return new Promise(function(c,l){i.onerror=function(f){return l(f)},i.onsuccess=function(f){c(f.target.result)}})}function a(){try{return s=IDBKeyRange.bound(t+1,1/0),r.openCursor(s)}catch{return r.openCursor()}}return new Promise(function(c,l){var f=a();f.onerror=function(u){return l(u)},f.onsuccess=function(u){var d=u.target.result;d?d.value.id<t+1?d.continue(t+1):(o.push(d.value),d.continue()):(ht(n),c(o))}})}function _s(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(ee,"readwrite",Fe),r=n.objectStore(ee);return Promise.all(t.map(function(o){var s=r.delete(o);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function Es(e,t){var n=new Date().getTime()-t,r=e.transaction(ee,"readonly",Fe),o=r.objectStore(ee),s=[];return new Promise(function(i){o.openCursor().onsuccess=function(a){var c=a.target.result;if(c){var l=c.value;l.time<n?(s.push(l),c.continue()):(ht(r),i(s))}else i(s)}})}function ws(e){return Es(e.db,e.options.idb.ttl).then(function(t){return _s(e,t.map(function(n){return n.id}))})}function bs(e,t){return t=pt(t),gs(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:ft(),eMIs:new $n(t.idb.ttl*2),writeBlockPromise:le,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},Tn(r),r})}function Tn(e){e.closed||An(e).then(function(){return Pn(e.options.idb.fallbackInterval)}).then(function(){return Tn(e)})}function Ss(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function An(e){return e.closed||!e.messagesCallback?le:ys(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return Ss(r,e)}).sort(function(r,o){return r.time-o.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),le})}function Os(e){e.closed=!0,e.db.close()}function Ns(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return vs(e.db,e.uuid,t)}).then(function(){ns(0,10)===0&&ws(e)}),e.writeBlockPromise}function ks(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,An(e)}function Ps(){return!!Cn()}function Rs(e){return e.idb.fallbackInterval*2}var $s={create:bs,close:Os,onMessage:ks,postMessage:Ns,canBeUsed:Ps,type:ms,averageResponseTime:Rs,microSeconds:ps},Is=Ue,Cs="pubkey.broadcastChannel-",Ts="localstorage";function Dn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Mn(e){return Cs+e}function As(e,t){return new Promise(function(n){Pn().then(function(){var r=Mn(e.channelName),o={token:ft(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(o);Dn().setItem(r,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=r,i.newValue=s,window.dispatchEvent(i),n()})})}function Ds(e,t){var n=Mn(e),r=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",r),r}function Ms(e){window.removeEventListener("storage",e)}function Vs(e,t){if(t=pt(t),!Vn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=ft(),r=new $n(t.localstorage.removeTimeout),o={channelName:e,uuid:n,eMIs:r};return o.listener=Ds(e,function(s){o.messagesCallback&&s.uuid!==n&&(!s.token||r.has(s.token)||s.data.time&&s.data.time<o.messagesCallbackTime||(r.add(s.token),o.messagesCallback(s.data)))}),o}function js(e){Ms(e.listener)}function xs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Vn(){var e=Dn();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Ls(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var Bs={create:Vs,close:js,onMessage:xs,postMessage:As,canBeUsed:Vn,type:Ts,averageResponseTime:Ls,microSeconds:Is},Us=Ue,Fs="simulate",mt=new Set;function Hs(e){var t={name:e,messagesCallback:null};return mt.add(t),t}function Ws(e){mt.delete(e)}function Gs(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(mt);r.filter(function(o){return o.name===e.name}).filter(function(o){return o!==e}).filter(function(o){return!!o.messagesCallback}).forEach(function(o){return o.messagesCallback(t)}),n()},5)})}function zs(e,t){e.messagesCallback=t}function qs(){return!0}function Js(){return 5}var Ks={create:Hs,close:Ws,onMessage:zs,postMessage:Gs,canBeUsed:qs,type:Fs,averageResponseTime:Js,microSeconds:Us},jn=[fs,$s,Bs];function Qs(e){var t=[].concat(e.methods,jn).filter(Boolean);if(e.type){if(e.type==="simulate")return Ks;var n=t.find(function(o){return o.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(o){return o.type!=="idb"}));var r=t.find(function(o){return o.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(jn.map(function(o){return o.type})))}var xn=new Set,Ys=0,gt=function(t,n){this.id=Ys++,xn.add(this),this.name=t,Ln&&(n=Ln),this.options=pt(n),this.method=Qs(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,Xs(this)};gt._pubkey=!0;var Ln;gt.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return Bn(this,"message",t)},postInternal:function(t){return Bn(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};Hn(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,Fn(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),o={time:r,fn:n};Fn(this,t,o)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(o){return o.fn===n});Hn(this,t,r)},close:function(){var t=this;if(!this.closed){xn.delete(this),this.closed=!0;var n=this._prepP?this._prepP:le;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Bn(e,t,n){var r=e.method.microSeconds(),o={time:r,type:t,data:n},s=e._prepP?e._prepP:le;return s.then(function(){var i=e.method.postMessage(e._state,o);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function Xs(e){var t=e.method.create(e.name,e.options);ts(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function Un(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function Fn(e,t,n){e._addEL[t].push(n),Zs(e)}function Hn(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),ei(e)}function Zs(e){if(!e._iL&&Un(e)){var t=function(o){e._addEL[o.type].forEach(function(s){var i=1e5,a=s.time-i;o.time>=a&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ei(e){if(e._iL&&!Un(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}class vt extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function Wn(e){return Object(e)!==e}const ti=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ni(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ti}function ri(e){return Object.prototype.toString.call(e).slice(8,-1)}function oi(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function _e(e){let t="",n=0;const r=e.length;for(let o=0;o<r;o+=1){const s=e[o],i=oi(s);i&&(t+=e.slice(n,o)+i,n=o+1)}return`"${n===0?e:t+e.slice(n)}"`}const yt=-1,Gn=-2,zn=-3,qn=-4,Jn=-5,_t=-6;function Kn(e,t){return si(JSON.parse(e))}function si(e,t){if(typeof e=="number")return o(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function o(s,i=!1){if(s===yt)return;if(s===zn)return NaN;if(s===qn)return 1/0;if(s===Jn)return-1/0;if(s===_t)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const a=n[s];if(!a||typeof a!="object")r[s]=a;else if(Array.isArray(a))if(typeof a[0]=="string"){const c=a[0];switch(c){case"Date":r[s]=new Date(a[1]);break;case"Set":const l=new Set;r[s]=l;for(let d=1;d<a.length;d+=1)l.add(o(a[d]));break;case"Map":const f=new Map;r[s]=f;for(let d=1;d<a.length;d+=2)f.set(o(a[d]),o(a[d+1]));break;case"RegExp":r[s]=new RegExp(a[1],a[2]);break;case"Object":r[s]=Object(a[1]);break;case"BigInt":r[s]=BigInt(a[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let d=1;d<a.length;d+=2)u[a[d]]=o(a[d+1]);break;default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(a.length);r[s]=c;for(let l=0;l<a.length;l+=1){const f=a[l];f!==Gn&&(c[l]=o(f))}}else{const c={};r[s]=c;for(const l in a){const f=a[l];c[l]=o(f)}}return r[s]}return o(0)}function Qn(e,t){const n=[],r=new Map,o=[];for(const l in t)o.push({key:l,fn:t[l]});const s=[];let i=0;function a(l){if(typeof l=="function")throw new vt("Cannot stringify a function",s);if(r.has(l))return r.get(l);if(l===void 0)return yt;if(Number.isNaN(l))return zn;if(l===1/0)return qn;if(l===-1/0)return Jn;if(l===0&&1/l<0)return _t;const f=i++;r.set(l,f);for(const{key:d,fn:h}of o){const b=h(l);if(b)return n[f]=`["${d}",${a(b)}]`,f}let u="";if(Wn(l))u=Et(l);else switch(ri(l)){case"Number":case"String":case"Boolean":u=`["Object",${Et(l)}]`;break;case"BigInt":u=`["BigInt",${l}]`;break;case"Date":u=`["Date","${!isNaN(l.getDate())?l.toISOString():""}"]`;break;case"RegExp":const{source:b,flags:O}=l;u=O?`["RegExp",${_e(b)},"${O}"]`:`["RegExp",${_e(b)}]`;break;case"Array":u="[";for(let w=0;w<l.length;w+=1)w>0&&(u+=","),w in l?(s.push(`[${w}]`),u+=a(l[w]),s.pop()):u+=Gn;u+="]";break;case"Set":u='["Set"';for(const w of l)u+=`,${a(w)}`;u+="]";break;case"Map":u='["Map"';for(const[w,I]of l)s.push(`.get(${Wn(w)?Et(w):"..."})`),u+=`,${a(w)},${a(I)}`,s.pop();u+="]";break;default:if(!ni(l))throw new vt("Cannot stringify arbitrary non-POJOs",s);if(Object.getOwnPropertySymbols(l).length>0)throw new vt("Cannot stringify POJOs with symbolic keys",s);if(Object.getPrototypeOf(l)===null){u='["null"';for(const w in l)s.push(`.${w}`),u+=`,${_e(w)},${a(l[w])}`,s.pop();u+="]"}else{u="{";let w=!1;for(const I in l)w&&(u+=","),w=!0,s.push(`.${I}`),u+=`${_e(I)}:${a(l[I])}`,s.pop();u+="}"}}return n[f]=u,f}const c=a(e);return c<0?`${c}`:`[${n.join(",")}]`}function Et(e){const t=typeof e;return t==="string"?_e(e):e instanceof String?_e(e.toString()):e===void 0?yt.toString():e===0&&1/e<0?_t.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ii(e,t,{initialize:n,type:r}){let o=`${t.$id}-${e.toString()}`,s=new gt(o,{type:r}),i=!1,a=0;m.watch(()=>t[e],f=>{i||(a=Date.now(),s.postMessage({timestamp:a,state:Kn(Qn(f))})),i=!1},{deep:!0}),s.onmessage=f=>{if(f===void 0){s.postMessage({timestamp:a,state:Kn(Qn(t[e]))});return}f.timestamp<=a||(i=!0,a=f.timestamp,t[e]=f.state)};let c=()=>s.postMessage(void 0),l=()=>s.close();return n&&c(),{sync:c,unshare:l}}var ai=(e,t)=>Object.keys(t).includes(e),ci=({initialize:e=!0,enable:t=!0,type:n})=>({store:r,options:o})=>{var a,c;let s=((a=o==null?void 0:o.share)==null?void 0:a.enable)??t,i=((c=o==null?void 0:o.share)==null?void 0:c.omit)??[];!s||Object.keys(r.$state).forEach(l=>{var f;i.includes(l)||!ai(l,r.$state)||ii(l,r,{initialize:((f=o==null?void 0:o.share)==null?void 0:f.initialize)??e,type:n})})};const Yn=Nr();Yn.use(ci({enable:!0,initialize:!0}));const ui={install:(e,t)=>{const n=(t==null?void 0:t.router)||es,r=new je(n,t==null?void 0:t.getMeta);if(e.use(n),e.use(Yn),e.provide("$registry",r),t!=null&&t.components)for(const[o,s]of Object.entries(t.components))e.component(o,s)}};B.DoctypeMeta=Tr,B.Registry=je,B.Stonecrop=ui,B.useStonecrop=Cr,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|
|
43
43
|
//# sourceMappingURL=stonecrop.umd.cjs.map
|