@stonecrop/desktop 0.2.39 โ 0.2.41
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/desktop.js +2113 -1955
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +22 -22
- package/dist/desktop.umd.cjs.map +1 -1
- package/package.json +5 -5
package/dist/desktop.umd.cjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(H,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(H=typeof globalThis<"u"?globalThis:H||self,r(H["@stonecrop/desktop"]={},H.Vue))})(this,function(H,r){"use strict";const Yo={class:"action-menu-icon"},Qo=["onclick"],Xo={key:1},Zo=["onClick"],er={class:"dropdown-container"},tr={class:"dropdown"},nr=["onclick"],or=["href"],rr={class:"dropdown-item"},ar=r.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=r.ref(e.elements),n=r.ref(!1),o=r.ref(null),a=r.ref(!1),s=r.ref(!1);r.onMounted(()=>{c()});const c=()=>{for(const d of t.value)d.elementType==="dropdown"&&(d.show=!1)},i=()=>{a.value=!0,o.value=setTimeout(()=>{a.value&&(n.value=!0)},500)},l=()=>{a.value=!1,s.value=!1,clearTimeout(o.value),n.value=!1},p=d=>{const u=!t.value[d].show;c(),t.value[d].show=u};return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([{"open-set":n.value,"hovered-and-closed":s.value},"action-set collapse"]),onMouseover:i,onMouseleave:l},[r.createElementVNode("div",Yo,[r.createElementVNode("div",{id:"chevron",onClick:u[0]||(u[0]=f=>s.value=!s.value)},u[1]||(u[1]=[r.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),r.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),u[2]||(u[2]=r.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.value,(f,h)=>(r.openBlock(),r.createElementBlock("div",{class:"action-element",key:f.label},[f.elementType=="button"?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:f.action,class:"button-default"},r.toDisplayString(f.label),9,Qo)):r.createCommentVNode("",!0),f.elementType=="dropdown"?(r.openBlock(),r.createElementBlock("div",Xo,[r.createElementVNode("button",{class:"button-default",onClick:g=>p(h)},r.toDisplayString(f.label),9,Zo),r.withDirectives(r.createElementVNode("div",er,[r.createElementVNode("div",tr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.actions,g=>(r.openBlock(),r.createElementBlock("div",{key:g.label},[g.action!=null?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:g.action,class:"dropdown-item"},r.toDisplayString(g.label),9,nr)):g.link!=null?(r.openBlock(),r.createElementBlock("a",{key:1,href:g.link},[r.createElementVNode("button",rr,r.toDisplayString(g.label),1)],8,or)):r.createCommentVNode("",!0)]))),128))])],512),[[r.vShow,f.show]])])):r.createCommentVNode("",!0)]))),128))],34))}}),rt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Yt=rt(ar,[["__scopeId","data-v-4fb5c934"]]),sr={};function ir(e,t){return r.openBlock(),r.createElementBlock("dialog")}const Qt=rt(sr,[["render",ir]]),cr=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const lr={class:"aform"},ur=r.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=r.ref(e.data||{}),a=c=>{let i={};for(const[l,p]of Object.entries(c))["component","fieldtype"].includes(l)||(i[l]=p),l==="rows"&&p&&p.length===0&&(i.rows=o.value[c.fieldname]);return i},s=r.computed({get:()=>e.modelValue.map((c,i)=>r.computed({get(){return c.value},set:l=>{e.modelValue[i].value=l,n("update:modelValue",e.modelValue)}})),set:()=>{}});return(c,i)=>(r.openBlock(),r.createElementBlock("form",lr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.modelValue,(l,p)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.component),r.mergeProps({key:p,schema:l,modelValue:s.value[p].value,"onUpdate:modelValue":d=>s.value[p].value=d,data:o.value[l.fieldname],readonly:c.readonly,ref_for:!0},a(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),dr=cr(ur,[["__scopeId","data-v-15ed36be"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;var pr=Object.defineProperty,fr=(e,t,n)=>t in e?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t,n)=>fr(e,typeof t!="symbol"?t+"":t,n);function at(e){this.message=e||""}at.prototype=Object.create(Error.prototype,{constructor:{value:at},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Xt=class nt{constructor(t,n,o,a,s){if(G(this,"name","Stonecrop"),G(this,"registry"),G(this,"schema"),G(this,"workflow"),G(this,"actions"),G(this,"store"),nt._root)return nt._root;nt._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=a,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 at(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,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:s}=this.workflow;this.workflow.transition(s,{type:n}),a.length>0&&a.forEach(c=>{new Function(c)(o)})}};G(Xt,"_root");let hr=Xt;var Zt=!1;function Le(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 st(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function mr(){return en().__VUE_DEVTOOLS_GLOBAL_HOOK__}function en(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const gr=typeof Proxy=="function",yr="devtools-plugin:setup",wr="plugin:settings:set";let ke,it;function br(){var e;return ke!==void 0||(typeof window<"u"&&window.performance?(ke=!0,it=window.performance):typeof globalThis<"u"&&!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance?(ke=!0,it=globalThis.perf_hooks.performance):ke=!1),ke}function vr(){return br()?it.now():Date.now()}class Er{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const c in t.settings){const i=t.settings[c];o[c]=i.defaultValue}const a=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},o);try{const c=localStorage.getItem(a),i=JSON.parse(c);Object.assign(s,i)}catch{}this.fallbacks={getSettings(){return s},setSettings(c){try{localStorage.setItem(a,JSON.stringify(c))}catch{}s=c},now(){return vr()}},n&&n.on(wr,(c,i)=>{c===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(c,i)=>this.target?this.target.on[i]:(...l)=>{this.onQueue.push({method:i,args:l})}}),this.proxiedTarget=new Proxy({},{get:(c,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...l)=>(this.targetQueue.push({method:i,args:l,resolve:()=>{}}),this.fallbacks[i](...l)):(...l)=>new Promise(p=>{this.targetQueue.push({method:i,args:l,resolve:p})})})}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 ct(e,t){const n=e,o=en(),a=mr(),s=gr&&n.enableEarlyProxy;if(a&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))a.emit(yr,e,t);else{const c=s?new Er(n,a):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:c}),c&&t(c.proxiedTarget)}}/*!
|
|
2
2
|
* pinia v2.2.2
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/let
|
|
6
|
-
${
|
|
7
|
-
Only state can be modified.`);
|
|
5
|
+
*/let $e;const Se=e=>$e=e,tn=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ue(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 de=typeof window<"u",nn=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 _r(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 lt(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){an(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function on(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Me(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const Ue=typeof navigator=="object"?navigator:{userAgent:""},rn=/Macintosh/.test(Ue.userAgent)&&/AppleWebKit/.test(Ue.userAgent)&&!/Safari/.test(Ue.userAgent),an=de?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!rn?kr:"msSaveOrOpenBlob"in Ue?$r:Sr:()=>{};function kr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?on(o.href)?lt(e,t,n):(o.target="_blank",Me(o)):Me(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Me(o)},0))}function $r(e,t="download",n){if(typeof e=="string")if(on(e))lt(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Me(o)})}else navigator.msSaveOrOpenBlob(_r(e,n),t)}function Sr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return lt(e,t,n);const a=e.type==="application/octet-stream",s=/constructor/i.test(String(nn.HTMLElement))||"safari"in nn,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&s||rn)&&typeof FileReader<"u"){const i=new FileReader;i.onloadend=function(){let l=i.result;if(typeof l!="string")throw o=null,new Error("Wrong reader.result type");l=c?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=l:location.assign(l),o=null},i.readAsDataURL(e)}else{const i=URL.createObjectURL(e);o?o.location.assign(i):location.href=i,o=null,setTimeout(function(){URL.revokeObjectURL(i)},4e4)}}function T(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 ut(e){return"_a"in e&&"install"in e}function sn(){if(!("clipboard"in navigator))return T("Your browser doesn't support the Clipboard API","error"),!0}function cn(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(T('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Or(e){if(!sn())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),T("Global state copied to clipboard.")}catch(t){if(cn(t))return;T("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Nr(e){if(!sn())try{ln(e,JSON.parse(await navigator.clipboard.readText())),T("Global state pasted from clipboard.")}catch(t){if(cn(t))return;T("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function xr(e){try{an(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){T("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let ee;function Cr(){ee||(ee=document.createElement("input"),ee.type="file",ee.accept=".json");function e(){return new Promise((t,n)=>{ee.onchange=async()=>{const o=ee.files;if(!o)return t(null);const a=o.item(0);return t(a?{text:await a.text(),file:a}:null)},ee.oncancel=()=>t(null),ee.onerror=n,ee.click()})}return e}async function Ir(e){try{const t=await Cr()();if(!t)return;const{text:n,file:o}=t;ln(e,JSON.parse(n)),T(`Global state imported from "${o.name}".`)}catch(t){T("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function ln(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function J(e){return{_custom:{display:e}}}const un="๐ Pinia (root)",We="_root";function Pr(e){return ut(e)?{id:We,label:un}:{id:e.$id,label:e.$id}}function Dr(e){if(ut(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const s=o.get(a);return{editable:!1,key:a,value:s._getters.reduce((c,i)=>(c[i]=s[i],c),{})}})}}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 Vr(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 Rr(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 ze=[],pe="pinia:mutations",L="pinia",{assign:Ar}=Object,Fe=e=>"๐ "+e;function Tr(e,t){ct({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ze,app:e},n=>{typeof n.now!="function"&&T("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:pe,label:"Pinia ๐",color:15064968}),n.addInspector({id:L,label:"Pinia ๐",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Or(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Nr(t),n.sendInspectorTree(L),n.sendInspectorState(L)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{xr(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ir(t),n.sendInspectorTree(L),n.sendInspectorState(L)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const a=t._s.get(o);a?typeof a.$reset!="function"?T(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(a.$reset(),T(`Store "${o}" reset.`)):T(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,a)=>{const s=o.componentInstance&&o.componentInstance.proxy;if(s&&s._pStores){const c=o.componentInstance.proxy._pStores;Object.values(c).forEach(i=>{o.instanceData.state.push({type:Fe(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:r.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((l,p)=>(l[p]=i.$state[p],l),{})}),i._getters&&i._getters.length&&o.instanceData.state.push({type:Fe(i.$id),key:"getters",editable:!1,value:i._getters.reduce((l,p)=>{try{l[p]=i[p]}catch(d){l[p]=d}return l},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===L){let a=[t];a=a.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?a.filter(s=>"$id"in s?s.$id.toLowerCase().includes(o.filter.toLowerCase()):un.toLowerCase().includes(o.filter.toLowerCase())):a).map(Pr)}}),globalThis.$pinia=t,n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===L){const a=o.nodeId===We?t:t._s.get(o.nodeId);if(!a)return;a&&(o.nodeId!==We&&(globalThis.$store=r.toRaw(a)),o.state=Dr(a))}}),n.on.editInspectorState((o,a)=>{if(o.app===e&&o.inspectorId===L){const s=o.nodeId===We?t:t._s.get(o.nodeId);if(!s)return T(`store "${o.nodeId}" not found`,"error");const{path:c}=o;ut(s)?c.unshift("state"):(c.length!==1||!s._customProperties.has(c[0])||c[0]in s.$state)&&c.unshift("$state"),me=!1,o.set(s,c,o.state.value),me=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("๐")){const a=o.type.replace(/^๐\s*/,""),s=t._s.get(a);if(!s)return T(`store "${a}" not found`,"error");const{path:c}=o;if(c[0]!=="state")return T(`Invalid path for store "${a}":
|
|
6
|
+
${c}
|
|
7
|
+
Only state can be modified.`);c[0]="$state",me=!1,o.set(s,c,o.state.value),me=!0}})})}function jr(e,t){ze.includes(Fe(t.$id))||ze.push(Fe(t.$id)),ct({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ze,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:c,onError:i,name:l,args:p})=>{const d=dn++;n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ซ "+l,subtitle:"start",data:{store:J(t.$id),action:J(l),args:p},groupId:d}}),c(u=>{se=void 0,n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ฌ "+l,subtitle:"end",data:{store:J(t.$id),action:J(l),args:p,result:u},groupId:d}})}),i(u=>{se=void 0,n.addTimelineEvent({layerId:pe,event:{time:o(),logType:"error",title:"๐ฅ "+l,subtitle:"end",data:{store:J(t.$id),action:J(l),args:p,error:u},groupId:d}})})},!0),t._customProperties.forEach(c=>{r.watch(()=>r.unref(t[c]),(i,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(L),me&&n.addTimelineEvent({layerId:pe,event:{time:o(),title:"Change",subtitle:c,data:{newValue:i,oldValue:l},groupId:se}})},{deep:!0})}),t.$subscribe(({events:c,type:i},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(L),!me)return;const p={time:o(),title:Rr(i),data:Ar({store:J(t.$id)},Vr(c)),groupId:se};i===Q.patchFunction?p.subtitle="โคต๏ธ":i===Q.patchObject?p.subtitle="๐งฉ":c&&!Array.isArray(c)&&(p.subtitle=c.type),c&&(p.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),n.addTimelineEvent({layerId:pe,event:p})},{detached:!0,flush:"sync"});const a=t._hotUpdate;t._hotUpdate=r.markRaw(c=>{a(c),n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ฅ "+t.$id,subtitle:"HMR update",data:{store:J(t.$id),info:J("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L),n.getSettings().logStoreChanges&&T(`Disposed "${t.$id}" store ๐`)},n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L),n.getSettings().logStoreChanges&&T(`"${t.$id}" store installed ๐`)})}let dn=0,se;function pn(e,t,n){const o=t.reduce((a,s)=>(a[s]=r.toRaw(e)[s],a),{});for(const a in o)e[a]=function(){const s=dn,c=n?new Proxy(e,{get(...l){return se=s,Reflect.get(...l)},set(...l){return se=s,Reflect.set(...l)}}):e;se=s;const i=o[a].apply(c,arguments);return se=void 0,i}}function Br({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){pn(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;r.toRaw(t)._hotUpdate=function(a){o.apply(this,arguments),pn(t,Object.keys(a._hmrPayload.actions),!!t._isOptionsAPI)}}jr(e,t)}}function Lr(){const e=r.effectScope(!0),t=e.run(()=>r.ref({}));let n=[],o=[];const a=r.markRaw({install(s){Se(a),a._a=s,s.provide(tn,a),s.config.globalProperties.$pinia=a,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de&&Tr(s,a),o.forEach(c=>n.push(c)),o=[]},use(s){return!this._a&&!Zt?o.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"&&typeof Proxy<"u"&&a.use(Br),a}function fn(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const a=e[n];ue(a)&&ue(o)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=fn(a,o):e[n]=o}return e}const hn=()=>{};function mn(e,t,n,o=hn){e.push(t);const a=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&r.getCurrentScope()&&r.onScopeDispose(a),a}function ge(e,...t){e.slice().forEach(n=>{n(...t)})}const Mr=e=>e(),gn=Symbol(),dt=Symbol();function pt(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],a=e[n];ue(a)&&ue(o)&&e.hasOwnProperty(n)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=pt(a,o):e[n]=o}return e}const Ur=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Wr(e){return!ue(e)||!e.hasOwnProperty(Ur)}const{assign:q}=Object;function yn(e){return!!(r.isRef(e)&&e.effect)}function wn(e,t,n,o){const{state:a,actions:s,getters:c}=t,i=n.state.value[e];let l;function p(){!i&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=a?a():{});const d=process.env.NODE_ENV!=="production"&&o?r.toRefs(r.ref(a?a():{}).value):r.toRefs(n.state.value[e]);return q(d,s,Object.keys(c||{}).reduce((u,f)=>(process.env.NODE_ENV!=="production"&&f in d&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),u[f]=r.markRaw(r.computed(()=>{Se(n);const h=n._s.get(e);return c[f].call(h,h)})),u),{}))}return l=ft(e,p,t,n,o,!0),l}function ft(e,t,n={},o,a,s){let c;const i=q({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const l={deep:!0};process.env.NODE_ENV!=="production"&&!Zt&&(l.onTrigger=E=>{p?h=E:p==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(E):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let p,d,u=[],f=[],h;const g=o.state.value[e];!s&&!g&&(process.env.NODE_ENV==="production"||!a)&&(o.state.value[e]={});const w=r.ref({});let O;function $(E){let v;p=d=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof E=="function"?(E(o.state.value[e]),v={type:Q.patchFunction,storeId:e,events:h}):(pt(o.state.value[e],E),v={type:Q.patchObject,payload:E,storeId:e,events:h});const V=O=Symbol();r.nextTick().then(()=>{O===V&&(p=!0)}),d=!0,ge(u,v,o.state.value[e])}const _=s?function(){const{state:E}=n,v=E?E():{};this.$patch(V=>{q(V,v)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:hn;function I(){c.stop(),u=[],f=[],o._s.delete(e)}const j=(E,v="")=>{if(gn in E)return E[dt]=v,E;const V=function(){Se(o);const F=Array.from(arguments),Y=[],je=[];function Be(M){Y.push(M)}function et(M){je.push(M)}ge(f,{args:F,name:V[dt],store:S,after:Be,onError:et});let Z;try{Z=E.apply(this&&this.$id===e?this:S,F)}catch(M){throw ge(je,M),M}return Z instanceof Promise?Z.then(M=>(ge(Y,M),M)).catch(M=>(ge(je,M),Promise.reject(M))):(ge(Y,Z),Z)};return V[gn]=!0,V[dt]=v,V},U=r.markRaw({actions:{},getters:{},state:[],hotState:w}),K={_p:o,$id:e,$onAction:mn.bind(null,f),$patch:$,$reset:_,$subscribe(E,v={}){const V=mn(u,E,v.detached,()=>F()),F=c.run(()=>r.watch(()=>o.state.value[e],Y=>{(v.flush==="sync"?d:p)&&E({storeId:e,type:Q.direct,events:h},Y)},q({},l,v)));return V},$dispose:I},S=r.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de?q({_hmrPayload:U,_customProperties:r.markRaw(new Set)},K):K);o._s.set(e,S);const X=(o._a&&o._a.runWithContext||Mr)(()=>o._e.run(()=>(c=r.effectScope()).run(()=>t({action:j}))));for(const E in X){const v=X[E];if(r.isRef(v)&&!yn(v)||r.isReactive(v))process.env.NODE_ENV!=="production"&&a?Le(w.value,E,r.toRef(X,E)):s||(g&&Wr(v)&&(r.isRef(v)?v.value=g[E]:pt(v,g[E])),o.state.value[e][E]=v),process.env.NODE_ENV!=="production"&&U.state.push(E);else if(typeof v=="function"){const V=process.env.NODE_ENV!=="production"&&a?v:j(v,E);X[E]=V,process.env.NODE_ENV!=="production"&&(U.actions[E]=v),i.actions[E]=v}else process.env.NODE_ENV!=="production"&&yn(v)&&(U.getters[E]=s?n.getters[E]:v,de&&(X._getters||(X._getters=r.markRaw([]))).push(E))}if(q(S,X),q(r.toRaw(S),X),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&a?w.value:o.state.value[e],set:E=>{if(process.env.NODE_ENV!=="production"&&a)throw new Error("cannot set hotState");$(v=>{q(v,E)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=r.markRaw(E=>{S._hotUpdating=!0,E._hmrPayload.state.forEach(v=>{if(v in S.$state){const V=E.$state[v],F=S.$state[v];typeof V=="object"&&ue(V)&&ue(F)?fn(V,F):E.$state[v]=F}Le(S,v,r.toRef(E.$state,v))}),Object.keys(S.$state).forEach(v=>{v in E.$state||st(S,v)}),p=!1,d=!1,o.state.value[e]=r.toRef(E._hmrPayload,"hotState"),d=!0,r.nextTick().then(()=>{p=!0});for(const v in E._hmrPayload.actions){const V=E[v];Le(S,v,j(V,v))}for(const v in E._hmrPayload.getters){const V=E._hmrPayload.getters[v],F=s?r.computed(()=>(Se(o),V.call(S,S))):V;Le(S,v,F)}Object.keys(S._hmrPayload.getters).forEach(v=>{v in E._hmrPayload.getters||st(S,v)}),Object.keys(S._hmrPayload.actions).forEach(v=>{v in E._hmrPayload.actions||st(S,v)}),S._hmrPayload=E._hmrPayload,S._getters=E._getters,S._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de){const E={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(S,v,q({value:S[v]},E))})}return o._p.forEach(E=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de){const v=c.run(()=>E({store:S,app:o._a,pinia:o,options:i}));Object.keys(v||{}).forEach(V=>S._customProperties.add(V)),q(S,v)}else q(S,c.run(()=>E({store:S,app:o._a,pinia:o,options:i})))}),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 "${
|
|
9
|
+
Found in store "${S.$id}".`),g&&s&&n.hydrate&&n.hydrate(S.$state,g),p=!0,d=!0,S}function zr(e,t,n){let o,a;const s=typeof t=="function";o=e,a=s?n:t;function c(i,l){const p=r.hasInjectionContext();if(i=(process.env.NODE_ENV==="test"&&$e&&$e._testing?null:i)||(p?r.inject(tn,null):null),i&&Se(i),process.env.NODE_ENV!=="production"&&!$e)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.`);
|
|
11
|
+
This will fail in production.`);i=$e,i._s.has(o)||(s?ft(o,t,a,i):wn(o,a,i),process.env.NODE_ENV!=="production"&&(c._pinia=i));const d=i._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const u="__hot:"+o,f=s?ft(u,t,a,i,!0):wn(u,q({},a),i,!0);l._hotUpdate(f),delete i.state.value[u],i._s.delete(u)}if(process.env.NODE_ENV!=="production"&&de){const u=r.getCurrentInstance();if(u&&u.proxy&&!l){const f=u.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[o]=d}}return d}return c.$id=o,c}const Fr=zr("data",()=>{const e=r.ref([]),t=r.ref({});return{records:e,record:t}});function bn(e){e||(e=r.inject("$registry"));const t=Fr(),n=r.ref(new hr(e,t)),o=r.ref(!1);return r.onBeforeMount(async()=>{var a,s;const c=e.router.currentRoute.value,i=(a=c.params.records)==null?void 0:a.toString().toLowerCase(),l=(s=c.params.record)==null?void 0:s.toString().toLowerCase();if(!i&&!l)return;const p=await e.getMeta(i);e.addDoctype(p),n.value.setup(p),i&&(l?await n.value.getRecord(p,l):await n.value.getRecords(p)),n.value.runAction(p,"LOAD",l?[l]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}G(class ot{constructor(t,n){if(G(this,"name"),G(this,"router"),G(this,"registry"),G(this,"getMeta"),ot._root)return ot._root;ot._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})}},"_root");/*!
|
|
12
12
|
* vue-router v4.4.5
|
|
13
13
|
* (c) 2024 Eduardo San Martin Morote
|
|
14
14
|
* @license MIT
|
|
15
|
-
*/const te=typeof document<"u";function
|
|
15
|
+
*/const te=typeof document<"u";function vn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Hr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&vn(e.default)}const P=Object.assign;function ht(e,t){const n={};for(const o in t){const a=t[o];n[o]=z(a)?a.map(e):e(a)}return n}const Oe=()=>{},z=Array.isArray;function N(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const En=/#/g,Gr=/&/g,qr=/\//g,Jr=/=/g,Kr=/\?/g,_n=/\+/g,Yr=/%5B/g,Qr=/%5D/g,kn=/%5E/g,Xr=/%60/g,$n=/%7B/g,Zr=/%7C/g,Sn=/%7D/g,ea=/%20/g;function mt(e){return encodeURI(""+e).replace(Zr,"|").replace(Yr,"[").replace(Qr,"]")}function ta(e){return mt(e).replace($n,"{").replace(Sn,"}").replace(kn,"^")}function gt(e){return mt(e).replace(_n,"%2B").replace(ea,"+").replace(En,"%23").replace(Gr,"%26").replace(Xr,"`").replace($n,"{").replace(Sn,"}").replace(kn,"^")}function na(e){return gt(e).replace(Jr,"%3D")}function oa(e){return mt(e).replace(En,"%23").replace(Kr,"%3F")}function ra(e){return e==null?"":oa(e).replace(qr,"%2F")}function ye(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&N(`Error decoding "${e}". Using original value`)}return""+e}const aa=/\/$/,sa=e=>e.replace(aa,"");function yt(e,t,n="/"){let o,a={},s="",c="";const i=t.indexOf("#");let l=t.indexOf("?");return i<l&&i>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,i>-1?i:t.length),a=e(s)),i>-1&&(o=o||t.slice(0,i),c=t.slice(i,t.length)),o=la(o??t,n),{fullPath:o+(s&&"?")+s+c,path:o,query:a,hash:ye(c)}}function ia(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function On(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Nn(e,t,n){const o=t.matched.length-1,a=n.matched.length-1;return o>-1&&o===a&&ie(t.matched[o],n.matched[a])&&xn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ie(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function xn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!ca(e[n],t[n]))return!1;return!0}function ca(e,t){return z(e)?Cn(e,t):z(t)?Cn(t,e):e===t}function Cn(e,t){return z(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function la(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("/"),o=e.split("/"),a=o[o.length-1];(a===".."||a===".")&&o.push("");let s=n.length-1,c,i;for(c=0;c<o.length;c++)if(i=o[c],i!==".")if(i==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(c).join("/")}const ce={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ne;(function(e){e.pop="pop",e.push="push"})(Ne||(Ne={}));var xe;(function(e){e.back="back",e.forward="forward",e.unknown=""})(xe||(xe={}));function ua(e){if(!e)if(te){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sa(e)}const da=/^[^#]+#/;function pa(e,t){return e.replace(da,"#")+t}function fa(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const He=()=>({left:window.scrollX,top:window.scrollY});function ha(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const s=document.querySelector(e.el);if(o&&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 a=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!a){process.env.NODE_ENV!=="production"&&N(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=fa(a,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 In(e,t){return(history.state?history.state.position-t:-1)+e}const wt=new Map;function ma(e,t){wt.set(e,t)}function ga(e){const t=wt.get(e);return wt.delete(e),t}let ya=()=>location.protocol+"//"+location.host;function Pn(e,t){const{pathname:n,search:o,hash:a}=t,s=e.indexOf("#");if(s>-1){let c=a.includes(e.slice(s))?e.slice(s).length:1,i=a.slice(c);return i[0]!=="/"&&(i="/"+i),On(i,"")}return On(n,e)+o+a}function wa(e,t,n,o){let a=[],s=[],c=null;const i=({state:f})=>{const h=Pn(e,location),g=n.value,w=t.value;let O=0;if(f){if(n.value=h,t.value=f,c&&c===g){c=null;return}O=w?f.position-w.position:0}else o(h);a.forEach($=>{$(n.value,g,{delta:O,type:Ne.pop,direction:O?O>0?xe.forward:xe.back:xe.unknown})})};function l(){c=n.value}function p(f){a.push(f);const h=()=>{const g=a.indexOf(f);g>-1&&a.splice(g,1)};return s.push(h),h}function d(){const{history:f}=window;f.state&&f.replaceState(P({},f.state,{scroll:He()}),"")}function u(){for(const f of s)f();s=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:l,listen:p,destroy:u}}function Dn(e,t,n,o=!1,a=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:a?He():null}}function ba(e){const{history:t,location:n}=window,o={value:Pn(e,n)},a={value:t.state};a.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,p,d){const u=e.indexOf("#"),f=u>-1?(n.host&&document.querySelector("base")?e:e.slice(u))+l:ya()+e+l;try{t[d?"replaceState":"pushState"](p,"",f),a.value=p}catch(h){process.env.NODE_ENV!=="production"?N("Error with push/replace State",h):console.error(h),n[d?"replace":"assign"](f)}}function c(l,p){const d=P({},t.state,Dn(a.value.back,l,a.value.forward,!0),p,{position:a.value.position});s(l,d,!0),o.value=l}function i(l,p){const d=P({},a.value,t.state,{forward:l,scroll:He()});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(
|
|
19
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(d.current,d,!0);const u=P({},Dn(o.value,l,null),{position:d.position+1},p);s(l,u,!1),o.value=l}return{location:o,state:a,push:i,replace:c}}function va(e){e=ua(e);const t=ba(e),n=wa(e,t.state,t.location,t.replace);function o(s,c=!0){c||n.pauseListeners(),history.go(s)}const a=P({location:"",base:e,go:o,createHref:pa.bind(null,e)},t,n);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function Ge(e){return typeof e=="string"||e&&typeof e=="object"}function Vn(e){return typeof e=="string"||typeof e=="symbol"}const bt=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 Ea={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 "${
|
|
23
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(
|
|
22
|
+
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ka(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 we(e,t){return process.env.NODE_ENV!=="production"?P(new Error(Ea[e](t)),{type:e,[bt]:!0},t):P(new Error,{type:e,[bt]:!0},t)}function ne(e,t){return e instanceof Error&&bt in e&&(t==null||!!(e.type&t))}const _a=["params","query","hash"];function ka(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of _a)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const An="[^/]+?",$a={sensitive:!1,strict:!1,start:!0,end:!0},Sa=/[.+*?^${}()[\]/\\]/g;function Oa(e,t){const n=P({},$a,t),o=[];let a=n.start?"^":"";const s=[];for(const p of e){const d=p.length?[]:[90];n.strict&&!p.length&&(a+="/");for(let u=0;u<p.length;u++){const f=p[u];let h=40+(n.sensitive?.25:0);if(f.type===0)u||(a+="/"),a+=f.value.replace(Sa,"\\$&"),h+=40;else if(f.type===1){const{value:g,repeatable:w,optional:O,regexp:$}=f;s.push({name:g,repeatable:w,optional:O});const _=$||An;if(_!==An){h+=10;try{new RegExp(`(${_})`)}catch(j){throw new Error(`Invalid custom RegExp for param "${g}" (${_}): `+j.message)}}let I=w?`((?:${_})(?:/(?:${_}))*)`:`(${_})`;u||(I=O&&p.length<2?`(?:/${I})`:"/"+I),O&&(I+="?"),a+=I,h+=20,O&&(h+=-8),w&&(h+=-20),_===".*"&&(h+=-50)}d.push(h)}o.push(d)}if(n.strict&&n.end){const p=o.length-1;o[p][o[p].length-1]+=.7000000000000001}n.strict||(a+="/?"),n.end?a+="$":n.strict&&(a+="(?:/|$)");const c=new RegExp(a,n.sensitive?"":"i");function i(p){const d=p.match(c),u={};if(!d)return null;for(let f=1;f<d.length;f++){const h=d[f]||"",g=s[f-1];u[g.name]=h&&g.repeatable?h.split("/"):h}return u}function l(p){let d="",u=!1;for(const f of e){(!u||!d.endsWith("/"))&&(d+="/"),u=!1;for(const h of f)if(h.type===0)d+=h.value;else if(h.type===1){const{value:g,repeatable:w,optional:O}=h,$=g in p?p[g]:"";if(z($)&&!w)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const _=z($)?$.join("/"):$;if(!_)if(O)f.length<2&&(d.endsWith("/")?d=d.slice(0,-1):u=!0);else throw new Error(`Missing required param "${g}"`);d+=_}}return d||"/"}return{re:c,score:o,keys:s,parse:i,stringify:l}}function Na(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;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 Tn(e,t){let n=0;const o=e.score,a=t.score;for(;n<o.length&&n<a.length;){const s=Na(o[n],a[n]);if(s)return s;n++}if(Math.abs(a.length-o.length)===1){if(jn(o))return 1;if(jn(a))return-1}return a.length-o.length}function jn(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const xa={type:0,value:""},Ca=/[a-zA-Z0-9_]/;function Ia(e){if(!e)return[[]];if(e==="/")return[[xa]];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})/"${p}": ${h}`)}let n=0,o=n;const a=[];let s;function c(){s&&a.push(s),s=[]}let i=0,l,p="",d="";function u(){p&&(n===0?s.push({type:0,value:p}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:p,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),p="")}function f(){p+=l}for(;i<e.length;){if(l=e[i++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(p&&u(),c()):l===":"?(u(),n=1):f();break;case 4:f(),n=o;break;case 1:l==="("?n=2:Ca.test(l)?f():(u(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&i--);break;case 2:l===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+l:n=3:d+=l;break;case 3:u(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&i--,d="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${p}"`),u(),c(),a}function Pa(e,t,n){const o=Oa(Ia(e.path),n);if(process.env.NODE_ENV!=="production"){const s=new Set;for(const c of o.keys)s.has(c.name)&&N(`Found duplicated params with name "${c.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),s.add(c.name)}const a=P(o,{record:e,parent:t,children:[],alias:[]});return t&&!a.record.aliasOf==!t.record.aliasOf&&t.children.push(a),a}function Da(e,t){const n=[],o=new Map;t=Un({strict:!1,end:!0,sensitive:!1},t);function a(u){return o.get(u)}function s(u,f,h){const g=!h,w=Ln(u);process.env.NODE_ENV!=="production"&&Ta(w,f),w.aliasOf=h&&h.record;const O=Un(t,u),$=[w];if("alias"in u){const j=typeof u.alias=="string"?[u.alias]:u.alias;for(const U of j)$.push(Ln(P({},w,{components:h?h.record.components:w.components,path:U,aliasOf:h?h.record:w})))}let _,I;for(const j of $){const{path:U}=j;if(f&&U[0]!=="/"){const K=f.record.path,S=K[K.length-1]==="/"?"":"/";j.path=f.record.path+(U&&S+U)}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(_=Pa(j,f,O),process.env.NODE_ENV!=="production"&&f&&U[0]==="/"&&ja(_,f),h?(h.alias.push(_),process.env.NODE_ENV!=="production"&&Aa(h,_)):(I=I||_,I!==_&&I.alias.push(_),g&&u.name&&!Mn(_)&&c(u.name)),Wn(_)&&l(_),w.children){const K=w.children;for(let S=0;S<K.length;S++)s(K[S],_,h&&h.children[S])}h=h||_}return I?()=>{c(I)}:Oe}function c(u){if(Vn(u)){const f=o.get(u);f&&(o.delete(u),n.splice(n.indexOf(f),1),f.children.forEach(c),f.alias.forEach(c))}else{const f=n.indexOf(u);f>-1&&(n.splice(f,1),u.record.name&&o.delete(u.record.name),u.children.forEach(c),u.alias.forEach(c))}}function i(){return n}function l(u){const f=Ba(u,n);n.splice(f,0,u),u.record.name&&!Mn(u)&&o.set(u.record.name,u)}function p(u,f){let h,g={},w,O;if("name"in u&&u.name){if(h=o.get(u.name),!h)throw we(1,{location:u});if(process.env.NODE_ENV!=="production"){const I=Object.keys(u.params||{}).filter(j=>!h.keys.find(U=>U.name===j));I.length&&N(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}O=h.record.name,g=P(Bn(f.params,h.keys.filter(I=>!I.optional).concat(h.parent?h.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),u.params&&Bn(u.params,h.keys.map(I=>I.name))),w=h.stringify(g)}else if(u.path!=null)w=u.path,process.env.NODE_ENV!=="production"&&!w.startsWith("/")&&N(`The Matcher cannot resolve relative paths but received "${w}". Unless you directly called \`matcher.resolve("${w}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),h=n.find(I=>I.re.test(w)),h&&(g=h.parse(w),O=h.record.name);else{if(h=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!h)throw we(1,{location:u,currentLocation:f});O=h.record.name,g=P({},f.params,u.params),w=h.stringify(g)}const $=[];let _=h;for(;_;)$.unshift(_.record),_=_.parent;return{name:O,path:w,params:g,matched:$,meta:Ra($)}}e.forEach(u=>s(u));function d(){n.length=0,o.clear()}return{addRoute:s,resolve:p,removeRoute:c,clearRoutes:d,getRoutes:i,getRecordMatcher:a}}function Bn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Ln(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Va(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 Va(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Mn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ra(e){return e.reduce((t,n)=>P(t,n.meta),{})}function Un(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function vt(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Aa(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(vt.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(vt.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 Ta(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 ja(e,t){for(const n of t.keys)if(!e.keys.find(vt.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 Ba(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;Tn(e,t[s])<0?o=s:n=s+1}const a=La(e);return a&&(o=t.lastIndexOf(a,o-1),process.env.NODE_ENV!=="production"&&o<0&&N(`Finding ancestor route "${a.record.path}" failed for "${e.record.path}"`)),o}function La(e){let t=e;for(;t=t.parent;)if(Wn(t)&&Tn(e,t)===0)return t}function Wn({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ma(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const a=n[o].replace(_n," "),s=a.indexOf("="),c=ye(s<0?a:a.slice(0,s)),i=s<0?null:ye(a.slice(s+1));if(c in t){let l=t[c];z(l)||(l=t[c]=[l]),l.push(i)}else t[c]=i}return t}function zn(e){let t="";for(let n in e){const o=e[n];if(n=na(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(z(o)?o.map(a=>a&>(a)):[o&>(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Ua(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=z(o)?o.map(a=>a==null?null:""+a):o==null?o:""+o)}return t}const Wa=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Fn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Et=Symbol(process.env.NODE_ENV!=="production"?"router":""),Hn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),_t=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Ce(){let e=[];function t(o){return e.push(o),()=>{const a=e.indexOf(o);a>-1&&e.splice(a,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function le(e,t,n,o,a,s=c=>c()){const c=o&&(o.enterCallbacks[a]=o.enterCallbacks[a]||[]);return()=>new Promise((i,l)=>{const p=f=>{f===!1?l(we(4,{from:n,to:t})):f instanceof Error?l(f):Ge(f)?l(we(2,{from:t,to:f})):(c&&o.enterCallbacks[a]===c&&typeof f=="function"&&c.push(f),i())},d=s(()=>e.call(o&&o.instances[a],t,n,process.env.NODE_ENV!=="production"?za(p,t,n):p));let u=Promise.resolve(d);if(e.length<3&&(u=u.then(p)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`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
|
|
26
|
-
- to:`,
|
|
27
|
-
- previous to:`,
|
|
28
|
-
- props:`,e):
|
|
29
|
-
- to:`,
|
|
30
|
-
- props:`,e)),
|
|
25
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)u=u.then(h=>p._called?h:(N(f),Promise.reject(new Error("Invalid navigation guard"))));else if(d!==void 0&&!p._called){N(f),l(new Error("Invalid navigation guard"));return}}u.catch(f=>l(f))})}function za(e,t,n){let o=0;return function(){o++===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,o===1&&e.apply(null,arguments)}}function kt(e,t,n,o,a=s=>s()){const s=[];for(const c of e){process.env.NODE_ENV!=="production"&&!c.components&&!c.children.length&&N(`Record with path "${c.path}" is either missing a "component(s)" or "children" property.`);for(const i in c.components){let l=c.components[i];if(process.env.NODE_ENV!=="production"){if(!l||typeof l!="object"&&typeof l!="function")throw N(`Component "${i}" in record with path "${c.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){N(`Component "${i}" in record with path "${c.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 p=l;l=()=>p}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__warnedDefineAsync=!0,N(`Component "${i}" in record with path "${c.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!c.instances[i]))if(vn(l)){const p=(l.__vccOpts||l)[t];p&&s.push(le(p,n,o,c,i,a))}else{let p=l();process.env.NODE_ENV!=="production"&&!("catch"in p)&&(N(`Component "${i}" in record with path "${c.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.`),p=Promise.resolve(p)),s.push(()=>p.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${i}" at "${c.path}"`);const u=Hr(d)?d.default:d;c.mods[i]=d,c.components[i]=u;const f=(u.__vccOpts||u)[t];return f&&le(f,n,o,c,i,a)()}))}}}return s}function Gn(e){const t=r.inject(Et),n=r.inject(Hn);let o=!1,a=null;const s=r.computed(()=>{const d=r.unref(e.to);return process.env.NODE_ENV!=="production"&&(!o||d!==a)&&(Ge(d)||(o?N(`Invalid value for prop "to" in useLink()
|
|
26
|
+
- to:`,d,`
|
|
27
|
+
- previous to:`,a,`
|
|
28
|
+
- props:`,e):N(`Invalid value for prop "to" in useLink()
|
|
29
|
+
- to:`,d,`
|
|
30
|
+
- props:`,e)),a=d,o=!0),t.resolve(d)}),c=r.computed(()=>{const{matched:d}=s.value,{length:u}=d,f=d[u-1],h=n.matched;if(!f||!h.length)return-1;const g=h.findIndex(ie.bind(null,f));if(g>-1)return g;const w=qn(d[u-2]);return u>1&&qn(f)===w&&h[h.length-1].path!==w?h.findIndex(ie.bind(null,d[u-2])):g}),i=r.computed(()=>c.value>-1&&qa(n.params,s.value.params)),l=r.computed(()=>c.value>-1&&c.value===n.matched.length-1&&xn(n.params,s.value.params));function p(d={}){return Ga(d)?t[r.unref(e.replace)?"replace":"push"](r.unref(e.to)).catch(Oe):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&te){const d=r.getCurrentInstance();if(d){const u={route:s.value,isActive:i.value,isExactActive:l.value,error:null};d.__vrl_devtools=d.__vrl_devtools||[],d.__vrl_devtools.push(u),r.watchEffect(()=>{u.route=s.value,u.isActive=i.value,u.isExactActive=l.value,u.error=Ge(r.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:s,href:r.computed(()=>s.value.href),isActive:i,isExactActive:l,navigate:p}}const Fa=r.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=r.reactive(Gn(e)),{options:o}=r.inject(Et),a=r.computed(()=>({[Jn(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Jn(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:r.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},s)}}}),Ha=Fa;function Ga(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 qa(e,t){for(const n in t){const o=t[n],a=e[n];if(typeof o=="string"){if(o!==a)return!1}else if(!z(a)||a.length!==o.length||o.some((s,c)=>s!==a[c]))return!1}return!0}function qn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Jn=(e,t,n)=>e??t??n,Ja=r.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"&&Ya();const o=r.inject(_t),a=r.computed(()=>e.route||o.value),s=r.inject(Fn,0),c=r.computed(()=>{let p=r.unref(s);const{matched:d}=a.value;let u;for(;(u=d[p])&&!u.components;)p++;return p}),i=r.computed(()=>a.value.matched[c.value]);r.provide(Fn,r.computed(()=>c.value+1)),r.provide(Wa,i),r.provide(_t,a);const l=r.ref();return r.watch(()=>[l.value,i.value,e.name],([p,d,u],[f,h,g])=>{d&&(d.instances[u]=p,h&&h!==d&&p&&p===f&&(d.leaveGuards.size||(d.leaveGuards=h.leaveGuards),d.updateGuards.size||(d.updateGuards=h.updateGuards))),p&&d&&(!h||!ie(d,h)||!f)&&(d.enterCallbacks[u]||[]).forEach(w=>w(p))},{flush:"post"}),()=>{const p=a.value,d=e.name,u=i.value,f=u&&u.components[d];if(!f)return Kn(n.default,{Component:f,route:p});const h=u.props[d],g=h?h===!0?p.params:typeof h=="function"?h(p):h:null,w=r.h(f,P({},g,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(u.instances[d]=null)},ref:l}));if(process.env.NODE_ENV!=="production"&&te&&w.ref){const O={depth:c.value,name:u.name,path:u.path,meta:u.meta};(z(w.ref)?w.ref.map($=>$.i):[w.ref.i]).forEach($=>{$.__vrv_devtools=O})}return Kn(n.default,{Component:w,route:p})||w}}});function Kn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ka=Ja;function Ya(){const e=r.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 o=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
|
<${o}>
|
|
35
35
|
<component :is="Component" />
|
|
36
36
|
</${o}>
|
|
37
|
-
</router-view>`)}}function
|
|
38
|
-
- Location:`,m)
|
|
37
|
+
</router-view>`)}}function Ie(e,t){const n=P({},e,{matched:e.matched.map(o=>is(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function qe(e){return{_custom:{display:e}}}let Qa=0;function Xa(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Qa++;ct({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},a=>{typeof a.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."),a.on.inspectComponent((d,u)=>{d.instanceData&&d.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ie(t.currentRoute.value,"Current Route")})}),a.on.visitComponentTree(({treeNode:d,componentInstance:u})=>{if(u.__vrv_devtools){const f=u.__vrv_devtools;d.tags.push({label:(f.name?`${f.name.toString()}: `:"")+f.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:Yn})}z(u.__vrl_devtools)&&(u.__devtoolsApi=a,u.__vrl_devtools.forEach(f=>{let h=f.route.path,g=Zn,w="",O=0;f.error?(h=f.error,g=os,O=rs):f.isExactActive?(g=Xn,w="This is exactly active"):f.isActive&&(g=Qn,w="This link is active"),d.tags.push({label:h,textColor:O,tooltip:w,backgroundColor:g})}))}),r.watch(t.currentRoute,()=>{l(),a.notifyComponentUpdate(),a.sendInspectorTree(i),a.sendInspectorState(i)});const s="router:navigations:"+o;a.addTimelineLayer({id:s,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((d,u)=>{a.addTimelineEvent({layerId:s,event:{title:"Error during Navigation",subtitle:u.fullPath,logType:"error",time:a.now(),data:{error:d},groupId:u.meta.__navigationId}})});let c=0;t.beforeEach((d,u)=>{const f={guard:qe("beforeEach"),from:Ie(u,"Current Location during this navigation"),to:Ie(d,"Target location")};Object.defineProperty(d.meta,"__navigationId",{value:c++}),a.addTimelineEvent({layerId:s,event:{time:a.now(),title:"Start of navigation",subtitle:d.fullPath,data:f,groupId:d.meta.__navigationId}})}),t.afterEach((d,u,f)=>{const h={guard:qe("afterEach")};f?(h.failure={_custom:{type:Error,readOnly:!0,display:f?f.message:"",tooltip:"Navigation Failure",value:f}},h.status=qe("โ")):h.status=qe("โ
"),h.from=Ie(u,"Current Location during this navigation"),h.to=Ie(d,"Target location"),a.addTimelineEvent({layerId:s,event:{title:"End of navigation",subtitle:d.fullPath,time:a.now(),data:h,logType:f?"warning":"default",groupId:d.meta.__navigationId}})});const i="router-inspector:"+o;a.addInspector({id:i,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!p)return;const d=p;let u=n.getRoutes().filter(f=>!f.parent||!f.parent.record.components);u.forEach(no),d.filter&&(u=u.filter(f=>$t(f,d.filter.toLowerCase()))),u.forEach(f=>to(f,t.currentRoute.value)),d.rootNodes=u.map(eo)}let p;a.on.getInspectorTree(d=>{p=d,d.app===e&&d.inspectorId===i&&l()}),a.on.getInspectorState(d=>{if(d.app===e&&d.inspectorId===i){const u=n.getRoutes().find(f=>f.record.__vd_id===d.nodeId);u&&(d.state={options:es(u)})}}),a.sendInspectorTree(i),a.sendInspectorState(i)})}function Za(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function es(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(o=>`${o.name}${Za(o)}`).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(o=>o.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(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Yn=15485081,Qn=2450411,Xn=8702998,ts=2282478,Zn=16486972,ns=6710886,os=16704226,rs=12131356;function eo(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:ts}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Zn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Yn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Xn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Qn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:ns});let o=n.__vd_id;return o==null&&(o=String(as++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(eo)}}let as=0;const ss=/^\/(.*)\/([a-z]*)$/;function to(e,t){const n=t.matched.length&&ie(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>ie(o,e.record))),e.children.forEach(o=>to(o,t))}function no(e){e.__vd_match=!1,e.children.forEach(no)}function $t(e,t){const n=String(e.re).match(ss);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(s=>$t(s,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),a=ye(o);return!t.startsWith("/")&&(a.includes(t)||o.includes(t))||a.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(s=>$t(s,t))}function is(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function cs(e){const t=Da(e.routes,e),n=e.parseQuery||Ma,o=e.stringifyQuery||zn,a=e.history;if(process.env.NODE_ENV!=="production"&&!a)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const s=Ce(),c=Ce(),i=Ce(),l=r.shallowRef(ce);let p=ce;te&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=ht.bind(null,m=>""+m),u=ht.bind(null,ra),f=ht.bind(null,ye);function h(m,b){let y,k;return Vn(m)?(y=t.getRecordMatcher(m),process.env.NODE_ENV!=="production"&&!y&&N(`Parent route "${String(m)}" not found when adding child route`,b),k=b):k=m,t.addRoute(k,y)}function g(m){const b=t.getRecordMatcher(m);b?t.removeRoute(b):process.env.NODE_ENV!=="production"&&N(`Cannot remove non-existent route "${String(m)}"`)}function w(){return t.getRoutes().map(m=>m.record)}function O(m){return!!t.getRecordMatcher(m)}function $(m,b){if(b=P({},b||l.value),typeof m=="string"){const x=yt(n,m,b.path),R=t.resolve({path:x.path},b),he=a.createHref(x.fullPath);return process.env.NODE_ENV!=="production"&&(he.startsWith("//")?N(`Location "${m}" resolved to "${he}". A resolved location cannot start with multiple slashes.`):R.matched.length||N(`No match found for location with path "${m}"`)),P(x,R,{params:f(R.params),hash:ye(x.hash),redirectedFrom:void 0,href:he})}if(process.env.NODE_ENV!=="production"&&!Ge(m))return N(`router.resolve() was passed an invalid location. This will fail in production.
|
|
38
|
+
- Location:`,m),$({});let y;if(m.path!=null)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&N(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),y=P({},m,{path:yt(n,m.path,b.path).path});else{const x=P({},m.params);for(const R in x)x[R]==null&&delete x[R];y=P({},m,{params:u(x)}),b.params=u(b.params)}const k=t.resolve(y,b),D=m.hash||"";process.env.NODE_ENV!=="production"&&D&&!D.startsWith("#")&&N(`A \`hash\` should always start with the character "#". Replace "${D}" with "#${D}".`),k.params=d(f(k.params));const A=ia(o,P({},m,{hash:ta(D),path:k.path})),C=a.createHref(A);return process.env.NODE_ENV!=="production"&&(C.startsWith("//")?N(`Location "${m}" resolved to "${C}". A resolved location cannot start with multiple slashes.`):k.matched.length||N(`No match found for location with path "${m.path!=null?m.path:m}"`)),P({fullPath:A,hash:D,query:o===zn?Ua(m.query):m.query||{}},k,{redirectedFrom:void 0,href:C})}function _(m){return typeof m=="string"?yt(n,m,l.value.path):P({},m)}function I(m,b){if(p!==m)return we(8,{from:b,to:m})}function j(m){return S(m)}function U(m){return j(P(_(m),{replace:!0}))}function K(m){const b=m.matched[m.matched.length-1];if(b&&b.redirect){const{redirect:y}=b;let k=typeof y=="function"?y(m):y;if(typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=_(k):{path:k},k.params={}),process.env.NODE_ENV!=="production"&&k.path==null&&!("name"in k))throw N(`Invalid redirect found:
|
|
39
39
|
${JSON.stringify(k,null,2)}
|
|
40
|
-
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return P({query:m.query,hash:m.hash,params:k.path!=null?{}:m.params},k)}}function
|
|
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"))):$(P({replace:C},S(W.to),{state:typeof W.to=="object"?P({},D,W.to.state):D,force:T}),w||R)}else W=H(R,k,!0,C,D);return V(R,k,W),W})}function X(m,w){const y=I(m,w);return y?Promise.reject(y):Promise.resolve()}function E(m){const w=Ze.values().next().value;return w&&typeof w.runWithContext=="function"?w.runWithContext(m):m()}function b(m,w){let y;const[k,D,T]=ns(m,w);y=Et(k.reverse(),"beforeRouteLeave",m,w);for(const x of k)x.leaveGuards.forEach(R=>{y.push(le(R,m,w))});const C=X.bind(null,m,w);return y.push(C),Ee(y).then(()=>{y=[];for(const x of s.list())y.push(le(x,m,w));return y.push(C),Ee(y)}).then(()=>{y=Et(D,"beforeRouteUpdate",m,w);for(const x of D)x.updateGuards.forEach(R=>{y.push(le(R,m,w))});return y.push(C),Ee(y)}).then(()=>{y=[];for(const x of T)if(x.beforeEnter)if(F(x.beforeEnter))for(const R of x.beforeEnter)y.push(le(R,m,w));else y.push(le(x.beforeEnter,m,w));return y.push(C),Ee(y)}).then(()=>(m.matched.forEach(x=>x.enterCallbacks={}),y=Et(T,"beforeRouteEnter",m,w,E),y.push(C),Ee(y))).then(()=>{y=[];for(const x of i.list())y.push(le(x,m,w));return y.push(C),Ee(y)}).catch(x=>ne(x,8)?x:Promise.reject(x))}function V(m,w,y){c.list().forEach(k=>E(()=>k(m,w,y)))}function H(m,w,y,k,D){const T=I(m,w);if(T)return T;const C=w===ce,x=te?history.state:{};y&&(k||C?r.replace(m.fullPath,P({scroll:C&&x&&x.scroll},D)):r.push(m.fullPath,D)),u.value=m,Wo(m,w,y,C),Ft()}let Y;function Ae(){Y||(Y=r.listen((m,w,y)=>{const k=_(m),D=K(k);if(D){$(P(D,{replace:!0}),k).catch(Se);return}d=k;const T=u.value;te&&ca(Nn(T.fullPath,y.delta),He()),b(k,T).catch(C=>ne(C,12)?C:ne(C,2)?($(C.to,k).then(x=>{ne(x,20)&&!y.delta&&y.type===Ne.pop&&r.go(-1,!1)}).catch(Se),Promise.reject()):(y.delta&&r.go(-y.delta,!1),M(C,k,T))).then(C=>{C=C||H(k,T,!1),C&&(y.delta&&!ne(C,8)?r.go(-y.delta,!1):y.type===Ne.pop&&ne(C,20)&&r.go(-1,!1)),V(k,T,C)}).catch(Se)}))}let je=xe(),Xe=xe(),Z;function M(m,w,y){Ft(m);const k=Xe.list();return k.length?k.forEach(D=>D(m,w,y)):(process.env.NODE_ENV!=="production"&&O("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function ic(){return Z&&u.value!==ce?Promise.resolve():new Promise((m,w)=>{je.add([m,w])})}function Ft(m){return Z||(Z=!m,Ae(),je.list().forEach(([w,y])=>m?y(m):w()),je.reset()),m}function Wo(m,w,y,k){const{scrollBehavior:D}=e;if(!te||!D)return Promise.resolve();const T=!y&&la(Nn(m.fullPath,0))||(k||!y)&&history.state&&history.state.scroll||null;return a.nextTick().then(()=>D(m,w,T)).then(C=>C&&ia(C)).catch(C=>M(C,m,w))}const Ht=m=>r.go(m);let zt;const Ze=new Set,cc={currentRoute:u,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:v,resolve:_,options:e,push:j,replace:U,go:Ht,back:()=>Ht(-1),forward:()=>Ht(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:Xe.add,isReady:ic,install(m){const w=this;m.component("RouterLink",Ba),m.component("RouterView",Wa),m.config.globalProperties.$router=w,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>a.unref(u)}),te&&!zt&&u.value===ce&&(zt=!0,j(r.location).catch(D=>{process.env.NODE_ENV!=="production"&&O("Unexpected error when starting the router:",D)}));const y={};for(const D in ce)Object.defineProperty(y,D,{get:()=>u.value[D],enumerable:!0});m.provide(bt,w),m.provide(Un,a.shallowReactive(y)),m.provide(vt,u);const k=m.unmount;Ze.add(m),m.unmount=function(){Ze.delete(m),Ze.size<1&&(d=ce,Y&&Y(),Y=null,u.value=ce,zt=!1,Z=!1),k()},process.env.NODE_ENV!=="production"&&te&&za(m,w,t)}};function Ee(m){return m.reduce((w,y)=>w.then(()=>E(y)),Promise.resolve())}return cc}function ns(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const c=t.matched[i];c&&(e.matched.find(d=>ie(d,c))?o.push(c):n.push(c));const u=e.matched[i];u&&(t.matched.find(d=>ie(d,u))||r.push(u))}return[n,o,r]}ts({history:fa(),routes:[]});function os(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var be=Promise.resolve();function Zn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function rs(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function kt(){return Math.random().toString(36).substring(2)}var eo=0,$t=0;function Ge(){var e=new Date().getTime();return e===eo?($t++,e*1e3+$t):(eo=e,$t=0,e*1e3)}var as=Ge,ss="native";function is(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function cs(e){e.bc.close(),e.subFns=[]}function ls(e,t){try{return e.bc.postMessage(t,!1),be}catch(n){return Promise.reject(n)}}function us(e,t){e.messagesCallback=t}function ds(){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 ps(){return 150}var fs={create:is,close:cs,onMessage:us,postMessage:ls,canBeUsed:ds,type:ss,averageResponseTime:ps,microSeconds:as},to=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,no()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,hs(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function hs(e){for(var t=no()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],s=o[1];if(s<t)e.map.delete(r);else return}}function no(){return new Date().getTime()}function St(){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 ms=Ge,gs="pubkey.broadcast-channel-0-",oe="messages",Je={durability:"relaxed"},ys="idb";function oo(){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 Nt(e){e.commit&&e.commit()}function ws(e){var t=oo(),n=gs+e,o=t.open(n);return o.onupgradeneeded=function(r){var s=r.target.result;s.createObjectStore(oe,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,s){o.onerror=function(i){return s(i)},o.onsuccess=function(){r(o.result)}})}function bs(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},s=e.transaction([oe],"readwrite",Je);return new Promise(function(i,c){s.oncomplete=function(){return i()},s.onerror=function(d){return c(d)};var u=s.objectStore(oe);u.add(r),Nt(s)})}function vs(e,t){var n=e.transaction(oe,"readonly",Je),o=n.objectStore(oe),r=[],s=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(s);return new Promise(function(u,d){i.onerror=function(l){return d(l)},i.onsuccess=function(l){u(l.target.result)}})}function c(){try{return s=IDBKeyRange.bound(t+1,1/0),o.openCursor(s)}catch{return o.openCursor()}}return new Promise(function(u,d){var l=c();l.onerror=function(p){return d(p)},l.onsuccess=function(p){var f=p.target.result;f?f.value.id<t+1?f.continue(t+1):(r.push(f.value),f.continue()):(Nt(n),u(r))}})}function Es(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(oe,"readwrite",Je),o=n.objectStore(oe);return Promise.all(t.map(function(r){var s=o.delete(r);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function _s(e,t){var n=new Date().getTime()-t,o=e.transaction(oe,"readonly",Je),r=o.objectStore(oe),s=[];return new Promise(function(i){r.openCursor().onsuccess=function(c){var u=c.target.result;if(u){var d=u.value;d.time<n?(s.push(d),u.continue()):(Nt(o),i(s))}else i(s)}})}function ks(e){return _s(e.db,e.options.idb.ttl).then(function(t){return Es(e,t.map(function(n){return n.id}))})}function $s(e,t){return t=St(t),ws(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:kt(),eMIs:new to(t.idb.ttl*2),writeBlockPromise:be,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},ro(o),o})}function ro(e){e.closed||ao(e).then(function(){return Zn(e.options.idb.fallbackInterval)}).then(function(){return ro(e)})}function Ss(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function ao(e){return e.closed||!e.messagesCallback?be:vs(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ss(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),be})}function Ns(e){e.closed=!0,e.db.close()}function Os(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return bs(e.db,e.uuid,t)}).then(function(){rs(0,10)===0&&ks(e)}),e.writeBlockPromise}function xs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,ao(e)}function Cs(){return!!oo()}function Is(e){return e.idb.fallbackInterval*2}var Ps={create:$s,close:Ns,onMessage:xs,postMessage:Os,canBeUsed:Cs,type:ys,averageResponseTime:Is,microSeconds:ms},Ds=Ge,Vs="pubkey.broadcastChannel-",Rs="localstorage";function so(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function io(e){return Vs+e}function Ts(e,t){return new Promise(function(n){Zn().then(function(){var o=io(e.channelName),r={token:kt(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(r);so().setItem(o,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=s,window.dispatchEvent(i),n()})})}function As(e,t){var n=io(e),o=function(r){r.key===n&&t(JSON.parse(r.newValue))};return window.addEventListener("storage",o),o}function js(e){window.removeEventListener("storage",e)}function Bs(e,t){if(t=St(t),!co())throw new Error("BroadcastChannel: localstorage cannot be used");var n=kt(),o=new to(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=As(e,function(s){r.messagesCallback&&s.uuid!==n&&(!s.token||o.has(s.token)||s.data.time&&s.data.time<r.messagesCallbackTime||(o.add(s.token),r.messagesCallback(s.data)))}),r}function Ls(e){js(e.listener)}function Ms(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function co(){var e=so();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Us(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var Ws={create:Bs,close:Ls,onMessage:Ms,postMessage:Ts,canBeUsed:co,type:Rs,averageResponseTime:Us,microSeconds:Ds},Fs=Ge,Hs="simulate",Ot=new Set;function zs(e){var t={name:e,messagesCallback:null};return Ot.add(t),t}function qs(e){Ot.delete(e)}function Gs(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Ot);o.filter(function(r){return r.name===e.name}).filter(function(r){return r!==e}).filter(function(r){return!!r.messagesCallback}).forEach(function(r){return r.messagesCallback(t)}),n()},5)})}function Js(e,t){e.messagesCallback=t}function Ks(){return!0}function Ys(){return 5}var Qs={create:zs,close:qs,onMessage:Js,postMessage:Gs,canBeUsed:Ks,type:Hs,averageResponseTime:Ys,microSeconds:Fs},lo=[fs,Ps,Ws];function Xs(e){var t=[].concat(e.methods,lo).filter(Boolean);if(e.type){if(e.type==="simulate")return Qs;var n=t.find(function(r){return r.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(r){return r.type!=="idb"}));var o=t.find(function(r){return r.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(lo.map(function(r){return r.type})))}var uo=new Set,Zs=0,xt=function(e,t){this.id=Zs++,uo.add(this),this.name=e,this.options=St(t),this.method=Xs(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,ei(this)};xt._pubkey=!0,xt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return po(this,"message",e)},postInternal:function(e){return po(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};mo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,ho(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};ho(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});mo(this,e,n)},close:function(){var e=this;if(!this.closed){uo.delete(this),this.closed=!0;var t=this._prepP?this._prepP:be;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function po(e,t,n){var o=e.method.microSeconds(),r={time:o,type:t,data:n},s=e._prepP?e._prepP:be;return s.then(function(){var i=e.method.postMessage(e._state,r);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function ei(e){var t=e.method.create(e.name,e.options);os(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function fo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function ho(e,t,n){e._addEL[t].push(n),ti(e)}function mo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ni(e)}function ti(e){if(!e._iL&&fo(e)){var t=function(o){e._addEL[o.type].forEach(function(r){var s=1e5,i=r.time-s;o.time>=i&&r.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 ni(e){if(e._iL&&!fo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Ct=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function go(e){return Object(e)!==e}const oi=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ri(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===oi}function ai(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(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 ve(e){let t="",n=0;const o=e.length;for(let r=0;r<o;r+=1){const s=e[r],i=si(s);i&&(t+=e.slice(n,r)+i,n=r+1)}return`"${n===0?e:t+e.slice(n)}"`}const It=-1,yo=-2,wo=-3,bo=-4,vo=-5,Pt=-6;function Eo(e,t){return ii(JSON.parse(e))}function ii(e,t){if(typeof e=="number")return r(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function r(s,i=!1){if(s===It)return;if(s===wo)return NaN;if(s===bo)return 1/0;if(s===vo)return-1/0;if(s===Pt)return-0;if(i)throw new Error("Invalid input");if(s in o)return o[s];const c=n[s];if(!c||typeof c!="object")o[s]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const u=c[0];switch(u){case"Date":o[s]=new Date(c[1]);break;case"Set":const d=new Set;o[s]=d;for(let f=1;f<c.length;f+=1)d.add(r(c[f]));break;case"Map":const l=new Map;o[s]=l;for(let f=1;f<c.length;f+=2)l.set(r(c[f]),r(c[f+1]));break;case"RegExp":o[s]=new RegExp(c[1],c[2]);break;case"Object":o[s]=Object(c[1]);break;case"BigInt":o[s]=BigInt(c[1]);break;case"null":const p=Object.create(null);o[s]=p;for(let f=1;f<c.length;f+=2)p[c[f]]=r(c[f+1]);break;default:throw new Error(`Unknown type ${u}`)}}else{const u=new Array(c.length);o[s]=u;for(let d=0;d<c.length;d+=1){const l=c[d];l!==yo&&(u[d]=r(l))}}else{const u={};o[s]=u;for(const d in c){const l=c[d];u[d]=r(l)}}return o[s]}return r(0)}function _o(e,t){const n=[],o=new Map,r=[];for(const d in t)r.push({key:d,fn:t[d]});const s=[];let i=0;function c(d){if(typeof d=="function")throw new Ct("Cannot stringify a function",s);if(o.has(d))return o.get(d);if(d===void 0)return It;if(Number.isNaN(d))return wo;if(d===1/0)return bo;if(d===-1/0)return vo;if(d===0&&1/d<0)return Pt;const l=i++;o.set(d,l);for(const{key:f,fn:h}of r){const g=h(d);if(g)return n[l]=`["${f}",${c(g)}]`,l}let p="";if(go(d))p=Dt(d);else switch(ai(d)){case"Number":case"String":case"Boolean":p=`["Object",${Dt(d)}]`;break;case"BigInt":p=`["BigInt",${d}]`;break;case"Date":p=`["Date","${isNaN(d.getDate())?"":d.toISOString()}"]`;break;case"RegExp":const{source:f,flags:h}=d;p=h?`["RegExp",${ve(f)},"${h}"]`:`["RegExp",${ve(f)}]`;break;case"Array":p="[";for(let g=0;g<d.length;g+=1)g>0&&(p+=","),g in d?(s.push(`[${g}]`),p+=c(d[g]),s.pop()):p+=yo;p+="]";break;case"Set":p='["Set"';for(const g of d)p+=`,${c(g)}`;p+="]";break;case"Map":p='["Map"';for(const[g,v]of d)s.push(`.get(${go(g)?Dt(g):"..."})`),p+=`,${c(g)},${c(v)}`,s.pop();p+="]";break;default:if(!ri(d))throw new Ct("Cannot stringify arbitrary non-POJOs",s);if(Object.getOwnPropertySymbols(d).length>0)throw new Ct("Cannot stringify POJOs with symbolic keys",s);if(Object.getPrototypeOf(d)===null){p='["null"';for(const g in d)s.push(`.${g}`),p+=`,${ve(g)},${c(d[g])}`,s.pop();p+="]"}else{p="{";let g=!1;for(const v in d)g&&(p+=","),g=!0,s.push(`.${v}`),p+=`${ve(v)}:${c(d[v])}`,s.pop();p+="}"}}return n[l]=p,l}const u=c(e);return u<0?`${u}`:`[${n.join(",")}]`}function Dt(e){const t=typeof e;return t==="string"?ve(e):e instanceof String?ve(e.toString()):e===void 0?It.toString():e===0&&1/e<0?Pt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ci(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,s=new xt(r,{type:o}),i=!1,c=0;a.watch(()=>t[e],l=>{i||(c=Date.now(),s.postMessage({timestamp:c,state:Eo(_o(l))})),i=!1},{deep:!0}),s.onmessage=l=>{if(l===void 0){s.postMessage({timestamp:c,state:Eo(_o(t[e]))});return}l.timestamp<=c||(i=!0,c=l.timestamp,t[e]=l.state)};let u=()=>s.postMessage(void 0),d=()=>s.close();return n&&u(),{sync:u,unshare:d}}var li=(e,t)=>Object.keys(t).includes(e),ui=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var s,i;let c=((s=r==null?void 0:r.share)==null?void 0:s.enable)??t,u=((i=r==null?void 0:r.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(d=>{var l;u.includes(d)||!li(d,o.$state)||ci(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Dr().use(ui({enable:!0,initialize:!0}));const ko=a.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=mn(),o=a.ref([]);return a.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((s,i)=>{const u=t.value.store.record[s.fieldname];r[i].value=u}),o.value=r}}),(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(rr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value=i)},null,8,["modelValue"])):a.createCommentVNode("",!0)}});var di=Object.defineProperty,pi=(e,t,n)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fe=(e,t,n)=>pi(e,typeof t!="symbol"?t+"":t,n);function $o(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Vt(e){return typeof e=="function"?e():a.unref(e)}const fi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hi=e=>e!=null,mi=Object.prototype.toString,gi=e=>mi.call(e)==="[object Object]",yi=()=>{},Ie=fi?window:void 0;function Pe(e){var t;const n=Vt(e);return(t=n==null?void 0:n.$el)!=null?t:n}function De(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Ie):[t,n,o,r]=e,!t)return yi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,p,f,h)=>(l.addEventListener(p,f,h),()=>l.removeEventListener(p,f,h)),u=a.watch(()=>[Pe(t),Vt(r)],([l,p])=>{if(i(),!l)return;const f=gi(p)?{...p}:p;s.push(...n.flatMap(h=>o.map(g=>c(l,h,g,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),i()};return $o(d),d}function wi(){const e=a.ref(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function bi(e){const t=wi();return a.computed(()=>(t.value,!!e()))}function vi(e,t,n={}){const{window:o=Ie,...r}=n;let s;const i=bi(()=>o&&"MutationObserver"in o),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.computed(()=>{const f=Vt(e),h=(Array.isArray(f)?f:[f]).map(Pe).filter(hi);return new Set(h)}),d=a.watch(()=>u.value,f=>{c(),i.value&&f.size&&(s=new MutationObserver(t),f.forEach(h=>s.observe(h,r)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),p=()=>{d(),c()};return $o(p),{isSupported:i,stop:p,takeRecords:l}}function Ei(e={}){var t;const{window:n=Ie,deep:o=!0,triggerOnRemoval:r=!1}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var d;let l=s==null?void 0:s.activeElement;if(o)for(;l!=null&&l.shadowRoot;)l=(d=l==null?void 0:l.shadowRoot)==null?void 0:d.activeElement;return l},c=a.ref(),u=()=>{c.value=i()};return n&&(De(n,"blur",d=>{d.relatedTarget===null&&u()},!0),De(n,"focus",u,!0)),r&&vi(s,d=>{d.filter(l=>l.removedNodes.length).map(l=>Array.from(l.removedNodes)).flat().forEach(l=>{l===c.value&&u()})},{childList:!0,subtree:!0}),u(),c}const _i="focusin",ki="focusout";function $i(e,t={}){const{window:n=Ie}=t,o=a.computed(()=>Pe(e)),r=a.ref(!1),s=a.computed(()=>r.value),i=Ei(t);return!n||!i.value?{focused:s}:(De(o,_i,()=>r.value=!0),De(o,ki,()=>r.value=!1),{focused:s})}function Si(e,{window:t=Ie,scrollTarget:n}={}){const o=a.ref(!1),r=()=>{if(!t)return;const s=t.document,i=Pe(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||s.documentElement.clientHeight)&&c.left<=(t.innerWidth||s.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return a.watch(()=>Pe(e),()=>r(),{immediate:!0,flush:"post"}),t&&De(n||t,"scroll",r,{capture:!1,passive:!0}),o}const re=e=>{let t=Si(e).value;return t=t&&e.offsetHeight>0,t},ae=e=>e.tabIndex>=0,So=e=>{const t=e.target;return Rt(t)},Rt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Rt(n):n},Ni=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.firstElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.firstElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Tt(o):o},No=e=>{const t=e.target;return Tt(t)},Tt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Tt(n):n},Oi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.lastElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.lastElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Rt(o):o},Oo=e=>{const t=e.target;return At(t)},At=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ae(n)||!re(n))?At(n):n},xo=e=>{const t=e.target;return jt(t)},jt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ae(n)||!re(n))?jt(n):n},Co=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ae(t)||!re(t))?jt(t):t},Io=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ae(t)||!re(t))?At(t):t},Ke=["alt","control","shift","meta"],xi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Bt={"keydown.up":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Oo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=xo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Ni(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Oi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=No(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=So(e);t&&t.focus()}},"keydown.home":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=xo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Po(e){const t=i=>{let c=null;return i.parent&&(typeof i.parent=="string"?c=document.querySelector(i.parent):i.parent instanceof HTMLElement?c=i.parent:c=i.parent.value),c},n=i=>{const c=t(i);let u=[];if(typeof i.selectors=="string")u=c?Array.from(c.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const d of i.selectors)d instanceof HTMLElement?u.push(d):u.push(d.$el);else if(i.selectors instanceof HTMLElement)u.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const d of i.selectors.value)d instanceof HTMLElement?u.push(d):u.push(d.$el);else u.push(i.selectors.value);return u},o=i=>{const c=t(i);let u=[];return i.selectors?u=n(i):c&&(u=Array.from(c.children).filter(d=>ae(d)&&re(d))),u},r=i=>c=>{const u=xi[c.key]||c.key.toLowerCase();if(Ke.includes(u))return;const d=i.handlers||Bt;for(const l of Object.keys(d)){const[p,...f]=l.split(".");if(p==="keydown"&&f.includes(u)){const h=d[l],g=f.filter(N=>Ke.includes(N)),v=Ke.some(N=>{const _=N.charAt(0).toUpperCase()+N.slice(1);return c.getModifierState(_)});if(g.length>0){if(v){for(const N of Ke)if(f.includes(N)){const _=N.charAt(0).toUpperCase()+N.slice(1);c.getModifierState(_)&&h(c)}}}else v||h(c)}}},s=[];a.onMounted(()=>{for(const i of e){const c=t(i),u=o(i),d=r(i),l=c?[c]:u;for(const p of l){const{focused:f}=$i(a.ref(p)),h=a.watch(f,g=>{g?p.addEventListener("keydown",d):p.removeEventListener("keydown",d)});s.push(h)}}}),a.onBeforeUnmount(()=>{for(const i of s)i()})}const Ci=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Ii={key:1},Pi=a.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0}},setup(e){var t;const n=a.inject(e.tableid),o=a.useTemplateRef("cell"),r=a.ref(""),s=a.ref(!1),i=n.table,c=n.columns[e.colIndex],u=n.rows[e.rowIndex],d=a.computed(()=>{const _=n.cellData(e.colIndex,e.rowIndex),S=c.format;return S?typeof S=="function"?S(_,{table:i,row:u,column:c}):typeof S=="string"?Function(`"use strict";return (${S})`)()(_,{table:i,row:u,column:c}):_:_}),l=()=>{if(c.mask,c.modalComponent){const _=o.value.getBoundingClientRect();n.modal.visible=!0,n.modal.colIndex=e.colIndex,n.modal.rowIndex=e.rowIndex,n.modal.parent=o.value,n.modal.top=_.top+_.height,n.modal.left=_.left,n.modal.width=f.value,typeof c.modalComponent=="function"?n.modal.component=c.modalComponent({table:i,row:u,column:c}):n.modal.component=c.modalComponent,n.modal.componentProps=c.modalComponentExtraProps}};if(e.addNavigation){let _={...Bt,"keydown.f2":l,"keydown.alt.up":l,"keydown.alt.down":l,"keydown.alt.left":l,"keydown.alt.right":l};typeof e.addNavigation=="object"&&(_={..._,...e.addNavigation}),Po([{selectors:o,handlers:_}])}const p=a.computed(()=>c.align||"center"),f=a.computed(()=>c.width||"40ch"),h=()=>{o.value&&(r.value=o.value.textContent)},g=()=>{o.value&&o.value.textContent!==r.value&&(r.value=o.value.textContent,o.value.dispatchEvent(new Event("change")),s.value=!0,c.format||n.setCellData(e.rowIndex,e.colIndex,r.value))},v=(_,S)=>S&&_===0&&S>0?`${S}ch`:"inherit",N={textAlign:p.value,width:f.value,backgroundColor:s.value?"var(--cell-modified-color)":"inherit",fontWeight:s.value?"bold":"inherit",paddingLeft:v(e.colIndex,(t=n.display[e.rowIndex])==null?void 0:t.indent)};return(_,S)=>(a.openBlock(),a.createElementBlock("td",{ref:"cell","data-colindex":_.colIndex,"data-rowindex":_.rowIndex,"data-editable":a.unref(n).columns[_.colIndex].edit,contenteditable:a.unref(n).columns[_.colIndex].edit,tabindex:_.tabIndex,spellcheck:!1,style:N,onFocus:h,onPaste:g,onBlur:g,onInput:g,onClick:l,onMousedown:l,class:"atable__cell"},[a.unref(n).columns[_.colIndex].cellComponent?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(n).columns[_.colIndex].cellComponent),a.mergeProps({key:0,value:d.value},a.unref(n).columns[_.colIndex].cellComponentProps),null,16,["value"])):(a.openBlock(),a.createElementBlock("span",Ii,a.toDisplayString(d.value),1))],40,Ci))}}),Di=["tabindex"],Vi={key:0,tabIndex:-1,class:"list-index"},Ri=a.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=a.inject(e.tableid),n=a.useTemplateRef("rowEl"),o=a.computed(()=>t.config.view!=="tree"||t.display[e.rowIndex].isRoot||t.display[e.rowIndex].open),r=a.computed(()=>t.config.view!=="tree"?"":t.display[e.rowIndex].isRoot||t.display[e.rowIndex].isParent?t.display[e.rowIndex].childrenOpen?"-":"+":""),s=i=>{t.toggleRowExpand(i)};if(e.addNavigation){let i=Bt;typeof e.addNavigation=="object"&&(i={...i,...e.addNavigation}),Po([{selectors:n,handlers:i}])}return(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("tr",{ref:"rowEl",tabindex:i.tabIndex,class:"table-row"},[a.renderSlot(i.$slots,"index",{},()=>[a.unref(t).config.view==="list"?(a.openBlock(),a.createElementBlock("td",Vi,a.toDisplayString(i.rowIndex+1),1)):a.unref(t).config.view==="tree"?(a.openBlock(),a.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:c[0]||(c[0]=u=>s(i.rowIndex))},a.toDisplayString(r.value),1)):a.createCommentVNode("",!0)]),a.renderSlot(i.$slots,"default")],8,Di)),[[a.vShow,o.value]])}});function Do(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Ve(e){return typeof e=="function"?e():a.unref(e)}const Vo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ti=Object.prototype.toString,Ai=e=>Ti.call(e)==="[object Object]",Re=()=>{},Lt=ji();function ji(){var e,t;return Vo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}const Ro={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function Bi(...e){if(e.length!==1)return a.toRef(...e);const t=e[0];return typeof t=="function"?a.readonly(a.customRef(()=>({get:t,set:Re}))):a.ref(t)}function Te(e){var t;const n=Ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const To=Vo?window:void 0;function Ye(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=To):[t,n,o,r]=e,!t)return Re;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,p,f,h)=>(l.addEventListener(p,f,h),()=>l.removeEventListener(p,f,h)),u=a.watch(()=>[Te(t),Ve(r)],([l,p])=>{if(i(),!l)return;const f=Ai(p)?{...p}:p;s.push(...n.flatMap(h=>o.map(g=>c(l,h,g,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),i()};return Do(d),d}let Ao=!1;function jo(e,t,n={}){const{window:o=To,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return Re;Lt&&!Ao&&(Ao=!0,Array.from(o.document.body.children).forEach(l=>l.addEventListener("click",Re)),o.document.documentElement.addEventListener("click",Re));let c=!0;const u=l=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(f=>f===l.target||l.composedPath().includes(f));{const f=Te(p);return f&&(l.target===f||l.composedPath().includes(f))}}),d=[Ye(o,"click",l=>{const p=Te(e);if(!(!p||p===l.target||l.composedPath().includes(p))){if(l.detail===0&&(c=!u(l)),!c){c=!0;return}t(l)}},{passive:!0,capture:s}),Ye(o,"pointerdown",l=>{const p=Te(e);c=!u(l)&&!!(p&&!l.composedPath().includes(p))},{passive:!0}),i&&Ye(o,"blur",l=>{setTimeout(()=>{var p;const f=Te(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(f!=null&&f.contains(o.document.activeElement))&&t(l)},0)})].filter(Boolean);return()=>d.forEach(l=>l())}const Li={[Ro.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=jo(e,t.value,{capture:n});else{const[o,r]=t.value;e.__onClickOutside_stop=jo(e,o,Object.assign({capture:n},r))}},[Ro.unmounted](e){e.__onClickOutside_stop()}};function Mt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:Bo(n)}}function Mi(e){const t=e||window.event,n=t.target;return Bo(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ut=new WeakMap;function Ui(e,t=!1){const n=a.ref(t);let o=null,r="";a.watch(Bi(e),c=>{const u=Mt(Ve(c));if(u){const d=u;if(Ut.get(d)||Ut.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(r=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const s=()=>{const c=Mt(Ve(e));!c||n.value||(Lt&&(o=Ye(c,"touchmove",u=>{Mi(u)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=Mt(Ve(e));!c||!n.value||(Lt&&(o==null||o()),c.style.overflow=r,Ut.delete(c),n.value=!1)};return Do(i),a.computed({get(){return n.value},set(c){c?s():i()}})}function Wi(){let e=!1;const t=a.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const r=Ui(n,o.value);a.watch(t,s=>r.value=s)}}Wi();for(var B=[],Wt=0;Wt<256;++Wt)B.push((Wt+256).toString(16).slice(1));function Fi(e,t=0){return(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase()}var Qe,Hi=new Uint8Array(16);function zi(){if(!Qe&&(Qe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Hi)}var qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Lo={randomUUID:qi};function Gi(e,t,n){if(Lo.randomUUID&&!t&&!e)return Lo.randomUUID();e=e||{};var o=e.random||(e.rng||zi)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Fi(o)}class Ji{constructor(t,n,o,r,s,i){fe(this,"id"),fe(this,"rows"),fe(this,"columns"),fe(this,"config"),fe(this,"table"),fe(this,"display"),fe(this,"modal"),this.id=t||Gi(),this.rows=o,this.columns=a.reactive(n),this.config=a.reactive(r),this.table=s||a.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=a.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,s]of this.rows.entries())t[`${n}:${r}`]=s[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const s=this.rows[r];s.parent&&o.add(s.parent),n[r]={childrenOpen:!1,expanded:!1,indent:s.indent||null,isParent:o.has(r),isRoot:s.parent===null||s.parent===void 0,modified:!1,open:s.parent===null||s.parent===void 0,parent:s.parent}}return a.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return a.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Ki={key:0,id:"resizable"},Yi={class:"atable-header-row",tabindex:"-1"},Qi={key:0,id:"header-index"},Xi=a.defineComponent({__name:"ATableHeader",props:{columns:{},tableid:{}},setup(e){const t=a.inject(e.tableid),n=o=>({minWidth:o.width||"40ch",textAlign:o.align||"center",width:t.config.fullWidth?"auto":null});return(o,r)=>o.columns.length?(a.openBlock(),a.createElementBlock("thead",Ki,[a.createElementVNode("tr",Yi,[a.unref(t).zeroColumn?(a.openBlock(),a.createElementBlock("th",Qi)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.columns,(s,i)=>(a.openBlock(),a.createElementBlock("th",{key:s.name,tabindex:"-1",style:a.normalizeStyle(n(s))},[a.renderSlot(o.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(s.label||String.fromCharCode(i+97).toUpperCase()),1)])],4))),128))])])):a.createCommentVNode("",!0)}}),Zi=a.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(a.openBlock(),a.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[a.renderSlot(n.$slots,"default")],32))}}),ec=a.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=e.modelValue?e.modelValue:e.rows,r=new Ji(e.id,e.columns,o,e.config);a.provide(r.id,r),a.watch(()=>r.rows,i=>{n("update:modelValue",i)},{deep:!0});const s=i=>{var c;i.target instanceof Node&&(c=r.modal.parent)!=null&&c.contains(i.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("keydown",i=>{if(i.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const c=r.modal.parent;c&&a.nextTick().then(()=>{c.focus()})}}),(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("table",{class:"atable",style:a.normalizeStyle({width:a.unref(r).config.fullWidth?"100%":"auto"})},[a.renderSlot(i.$slots,"header",{data:a.unref(r)},()=>[a.createVNode(Xi,{columns:a.unref(r).columns,tableid:a.unref(r).id},null,8,["columns","tableid"])]),a.createElementVNode("tbody",null,[a.renderSlot(i.$slots,"body",{data:a.unref(r)},()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).rows,(u,d)=>(a.openBlock(),a.createBlock(Ri,{key:u.id,row:u,rowIndex:d,tableid:a.unref(r).id},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).columns,(l,p)=>(a.openBlock(),a.createBlock(Pi,{key:l.name,tableid:a.unref(r).id,col:l,spellcheck:"false",rowIndex:d,colIndex:p+(a.unref(r).zeroColumn?0:-1),component:l.cellComponent,style:a.normalizeStyle({textAlign:(l==null?void 0:l.align)||"center",minWidth:(l==null?void 0:l.width)||"40ch",width:a.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))])]),a.renderSlot(i.$slots,"footer",{data:a.unref(r)}),a.renderSlot(i.$slots,"modal",{data:a.unref(r)},()=>[a.withDirectives(a.createVNode(Zi,{colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id,style:a.normalizeStyle({left:a.unref(r).modal.left+"px",top:a.unref(r).modal.top+"px",maxWidth:a.unref(r).modal.width+"px"})},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(r).modal.component),a.mergeProps({key:`${a.unref(r).modal.rowIndex}:${a.unref(r).modal.colIndex}`,colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id},a.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[a.vShow,a.unref(r).modal.visible]])])],4)),[[a.unref(Li),s]])}}),Mo=a.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=mn(),o={view:"list"};return(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(ec),{key:0,columns:a.unref(t).schema.schema.toArray(),rows:a.unref(t).store.records,config:o},null,8,["columns","rows"])):a.createCommentVNode("",!0)}}),tc={class:"tabs"},nc={tabindex:"0"},oc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},rc={tabindex:"0"},ac={style:{width:"11pt"}},Uo=nt(a.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=a.ref(!0),n=a.ref(!1),o=a.ref(""),r=a.useTemplateRef("searchinput"),s=a.computed(()=>t.value?"unrotated":"rotated"),i=()=>{t.value=!t.value},c=async()=>{n.value=!n.value,await a.nextTick(()=>{r.value.focus()})},u=p=>{p.preventDefault(),p.stopPropagation()},d=async p=>{p.preventDefault(),p.stopPropagation(),await c()},l=()=>{};return(p,f)=>{const h=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("footer",null,[a.createElementVNode("ul",tc,[a.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:a.withKeys(i,["enter"])},[a.createElementVNode("a",nc,[a.createElementVNode("div",{class:a.normalizeClass(s.value)},"ร",2)])],32),a.createElementVNode("li",{class:"hometab",onClick:l,onKeydown:a.withKeys(l,["enter"]),style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createVNode(h,{to:"/home",tabindex:"0"},{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock("svg",oc,f[5]||(f[5]=[a.createElementVNode("g",null,[a.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
40
|
+
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return P({query:m.query,hash:m.hash,params:k.path!=null?{}:m.params},k)}}function S(m,b){const y=p=$(m),k=l.value,D=m.state,A=m.force,C=m.replace===!0,x=K(y);if(x)return S(P(_(x),{state:typeof x=="object"?P({},D,x.state):D,force:A,replace:C}),b||y);const R=y;R.redirectedFrom=b;let he;return!A&&Nn(o,k,y)&&(he=we(16,{to:R,from:k}),Ko(k,k,!0,!1)),(he?Promise.resolve(he):v(R,k)).catch(W=>ne(W)?ne(W,2)?W:qt(W):M(W,R,k)).then(W=>{if(W){if(ne(W,2))return process.env.NODE_ENV!=="production"&&Nn(o,$(W.to),R)&&b&&(b._count=b._count?b._count+1:1)>30?(N(`Detected a possibly infinite redirection in a navigation guard when going from "${k.fullPath}" to "${R.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(P({replace:C},_(W.to),{state:typeof W.to=="object"?P({},D,W.to.state):D,force:A}),b||R)}else W=F(R,k,!0,C,D);return V(R,k,W),W})}function X(m,b){const y=I(m,b);return y?Promise.reject(y):Promise.resolve()}function E(m){const b=tt.values().next().value;return b&&typeof b.runWithContext=="function"?b.runWithContext(m):m()}function v(m,b){let y;const[k,D,A]=ls(m,b);y=kt(k.reverse(),"beforeRouteLeave",m,b);for(const x of k)x.leaveGuards.forEach(R=>{y.push(le(R,m,b))});const C=X.bind(null,m,b);return y.push(C),_e(y).then(()=>{y=[];for(const x of s.list())y.push(le(x,m,b));return y.push(C),_e(y)}).then(()=>{y=kt(D,"beforeRouteUpdate",m,b);for(const x of D)x.updateGuards.forEach(R=>{y.push(le(R,m,b))});return y.push(C),_e(y)}).then(()=>{y=[];for(const x of A)if(x.beforeEnter)if(z(x.beforeEnter))for(const R of x.beforeEnter)y.push(le(R,m,b));else y.push(le(x.beforeEnter,m,b));return y.push(C),_e(y)}).then(()=>(m.matched.forEach(x=>x.enterCallbacks={}),y=kt(A,"beforeRouteEnter",m,b,E),y.push(C),_e(y))).then(()=>{y=[];for(const x of c.list())y.push(le(x,m,b));return y.push(C),_e(y)}).catch(x=>ne(x,8)?x:Promise.reject(x))}function V(m,b,y){i.list().forEach(k=>E(()=>k(m,b,y)))}function F(m,b,y,k,D){const A=I(m,b);if(A)return A;const C=b===ce,x=te?history.state:{};y&&(k||C?a.replace(m.fullPath,P({scroll:C&&x&&x.scroll},D)):a.push(m.fullPath,D)),l.value=m,Ko(m,b,y,C),qt()}let Y;function je(){Y||(Y=a.listen((m,b,y)=>{const k=$(m),D=K(k);if(D){S(P(D,{replace:!0}),k).catch(Oe);return}p=k;const A=l.value;te&&ma(In(A.fullPath,y.delta),He()),v(k,A).catch(C=>ne(C,12)?C:ne(C,2)?(S(C.to,k).then(x=>{ne(x,20)&&!y.delta&&y.type===Ne.pop&&a.go(-1,!1)}).catch(Oe),Promise.reject()):(y.delta&&a.go(-y.delta,!1),M(C,k,A))).then(C=>{C=C||F(k,A,!1),C&&(y.delta&&!ne(C,8)?a.go(-y.delta,!1):y.type===Ne.pop&&ne(C,20)&&a.go(-1,!1)),V(k,A,C)}).catch(Oe)}))}let Be=Ce(),et=Ce(),Z;function M(m,b,y){qt(m);const k=et.list();return k.length?k.forEach(D=>D(m,b,y)):(process.env.NODE_ENV!=="production"&&N("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function _c(){return Z&&l.value!==ce?Promise.resolve():new Promise((m,b)=>{Be.add([m,b])})}function qt(m){return Z||(Z=!m,je(),Be.list().forEach(([b,y])=>m?y(m):b()),Be.reset()),m}function Ko(m,b,y,k){const{scrollBehavior:D}=e;if(!te||!D)return Promise.resolve();const A=!y&&ga(In(m.fullPath,0))||(k||!y)&&history.state&&history.state.scroll||null;return r.nextTick().then(()=>D(m,b,A)).then(C=>C&&ha(C)).catch(C=>M(C,m,b))}const Jt=m=>a.go(m);let Kt;const tt=new Set,kc={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:O,getRoutes:w,resolve:$,options:e,push:j,replace:U,go:Jt,back:()=>Jt(-1),forward:()=>Jt(1),beforeEach:s.add,beforeResolve:c.add,afterEach:i.add,onError:et.add,isReady:_c,install(m){const b=this;m.component("RouterLink",Ha),m.component("RouterView",Ka),m.config.globalProperties.$router=b,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>r.unref(l)}),te&&!Kt&&l.value===ce&&(Kt=!0,j(a.location).catch(D=>{process.env.NODE_ENV!=="production"&&N("Unexpected error when starting the router:",D)}));const y={};for(const D in ce)Object.defineProperty(y,D,{get:()=>l.value[D],enumerable:!0});m.provide(Et,b),m.provide(Hn,r.shallowReactive(y)),m.provide(_t,l);const k=m.unmount;tt.add(m),m.unmount=function(){tt.delete(m),tt.size<1&&(p=ce,Y&&Y(),Y=null,l.value=ce,Kt=!1,Z=!1),k()},process.env.NODE_ENV!=="production"&&te&&Xa(m,b,t)}};function _e(m){return m.reduce((b,y)=>b.then(()=>E(y)),Promise.resolve())}return kc}function ls(e,t){const n=[],o=[],a=[],s=Math.max(t.matched.length,e.matched.length);for(let c=0;c<s;c++){const i=t.matched[c];i&&(e.matched.find(p=>ie(p,i))?o.push(i):n.push(i));const l=e.matched[c];l&&(t.matched.find(p=>ie(p,l))||a.push(l))}return[n,o,a]}cs({history:va(),routes:[]});function us(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var be=Promise.resolve();function oo(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function ds(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function St(){return Math.random().toString(36).substring(2)}var ro=0,Ot=0;function Je(){var e=new Date().getTime();return e===ro?(Ot++,e*1e3+Ot):(ro=e,Ot=0,e*1e3)}var ps=Je,fs="native";function hs(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ms(e){e.bc.close(),e.subFns=[]}function gs(e,t){try{return e.bc.postMessage(t,!1),be}catch(n){return Promise.reject(n)}}function ys(e,t){e.messagesCallback=t}function ws(){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 bs(){return 150}var vs={create:hs,close:ms,onMessage:ys,postMessage:gs,canBeUsed:ws,type:fs,averageResponseTime:bs,microSeconds:ps},ao=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,so()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,Es(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function Es(e){for(var t=so()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var a=o[0],s=o[1];if(s<t)e.map.delete(a);else return}}function so(){return new Date().getTime()}function Nt(){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 _s=Je,ks="pubkey.broadcast-channel-0-",oe="messages",Ke={durability:"relaxed"},$s="idb";function io(){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 xt(e){e.commit&&e.commit()}function Ss(e){var t=io(),n=ks+e,o=t.open(n);return o.onupgradeneeded=function(a){var s=a.target.result;s.createObjectStore(oe,{keyPath:"id",autoIncrement:!0})},new Promise(function(a,s){o.onerror=function(c){return s(c)},o.onsuccess=function(){a(o.result)}})}function Os(e,t,n){var o=new Date().getTime(),a={uuid:t,time:o,data:n},s=e.transaction([oe],"readwrite",Ke);return new Promise(function(c,i){s.oncomplete=function(){return c()},s.onerror=function(p){return i(p)};var l=s.objectStore(oe);l.add(a),xt(s)})}function Ns(e,t){var n=e.transaction(oe,"readonly",Ke),o=n.objectStore(oe),a=[],s=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var c=o.getAll(s);return new Promise(function(l,p){c.onerror=function(d){return p(d)},c.onsuccess=function(d){l(d.target.result)}})}function i(){try{return s=IDBKeyRange.bound(t+1,1/0),o.openCursor(s)}catch{return o.openCursor()}}return new Promise(function(l,p){var d=i();d.onerror=function(u){return p(u)},d.onsuccess=function(u){var f=u.target.result;f?f.value.id<t+1?f.continue(t+1):(a.push(f.value),f.continue()):(xt(n),l(a))}})}function xs(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(oe,"readwrite",Ke),o=n.objectStore(oe);return Promise.all(t.map(function(a){var s=o.delete(a);return new Promise(function(c){s.onsuccess=function(){return c()}})}))}function Cs(e,t){var n=new Date().getTime()-t,o=e.transaction(oe,"readonly",Ke),a=o.objectStore(oe),s=[];return new Promise(function(c){a.openCursor().onsuccess=function(i){var l=i.target.result;if(l){var p=l.value;p.time<n?(s.push(p),l.continue()):(xt(o),c(s))}else c(s)}})}function Is(e){return Cs(e.db,e.options.idb.ttl).then(function(t){return xs(e,t.map(function(n){return n.id}))})}function Ps(e,t){return t=Nt(t),Ss(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:St(),eMIs:new ao(t.idb.ttl*2),writeBlockPromise:be,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},co(o),o})}function co(e){e.closed||lo(e).then(function(){return oo(e.options.idb.fallbackInterval)}).then(function(){return co(e)})}function Ds(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function lo(e){return e.closed||!e.messagesCallback?be:Ns(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ds(o,e)}).sort(function(o,a){return o.time-a.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),be})}function Vs(e){e.closed=!0,e.db.close()}function Rs(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Os(e.db,e.uuid,t)}).then(function(){ds(0,10)===0&&Is(e)}),e.writeBlockPromise}function As(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,lo(e)}function Ts(){return!!io()}function js(e){return e.idb.fallbackInterval*2}var Bs={create:Ps,close:Vs,onMessage:As,postMessage:Rs,canBeUsed:Ts,type:$s,averageResponseTime:js,microSeconds:_s},Ls=Je,Ms="pubkey.broadcastChannel-",Us="localstorage";function uo(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function po(e){return Ms+e}function Ws(e,t){return new Promise(function(n){oo().then(function(){var o=po(e.channelName),a={token:St(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(a);uo().setItem(o,s);var c=document.createEvent("Event");c.initEvent("storage",!0,!0),c.key=o,c.newValue=s,window.dispatchEvent(c),n()})})}function zs(e,t){var n=po(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Fs(e){window.removeEventListener("storage",e)}function Hs(e,t){if(t=Nt(t),!fo())throw new Error("BroadcastChannel: localstorage cannot be used");var n=St(),o=new ao(t.localstorage.removeTimeout),a={channelName:e,uuid:n,eMIs:o};return a.listener=zs(e,function(s){a.messagesCallback&&s.uuid!==n&&(!s.token||o.has(s.token)||s.data.time&&s.data.time<a.messagesCallbackTime||(o.add(s.token),a.messagesCallback(s.data)))}),a}function Gs(e){Fs(e.listener)}function qs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function fo(){var e=uo();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 Ks={create:Hs,close:Gs,onMessage:qs,postMessage:Ws,canBeUsed:fo,type:Us,averageResponseTime:Js,microSeconds:Ls},Ys=Je,Qs="simulate",Ct=new Set;function Xs(e){var t={name:e,messagesCallback:null};return Ct.add(t),t}function Zs(e){Ct.delete(e)}function ei(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Ct);o.filter(function(a){return a.name===e.name}).filter(function(a){return a!==e}).filter(function(a){return!!a.messagesCallback}).forEach(function(a){return a.messagesCallback(t)}),n()},5)})}function ti(e,t){e.messagesCallback=t}function ni(){return!0}function oi(){return 5}var ri={create:Xs,close:Zs,onMessage:ti,postMessage:ei,canBeUsed:ni,type:Qs,averageResponseTime:oi,microSeconds:Ys},ho=[vs,Bs,Ks];function ai(e){var t=[].concat(e.methods,ho).filter(Boolean);if(e.type){if(e.type==="simulate")return ri;var n=t.find(function(a){return a.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(a){return a.type!=="idb"}));var o=t.find(function(a){return a.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(ho.map(function(a){return a.type})))}var mo=new Set,si=0,It=function(e,t){this.id=si++,mo.add(this),this.name=e,this.options=Nt(t),this.method=ai(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,ii(this)};It._pubkey=!0,It.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return go(this,"message",e)},postInternal:function(e){return go(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};bo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,wo(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};wo(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});bo(this,e,n)},close:function(){var e=this;if(!this.closed){mo.delete(this),this.closed=!0;var t=this._prepP?this._prepP:be;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function go(e,t,n){var o=e.method.microSeconds(),a={time:o,type:t,data:n},s=e._prepP?e._prepP:be;return s.then(function(){var c=e.method.postMessage(e._state,a);return e._uMP.add(c),c.catch().then(function(){return e._uMP.delete(c)}),c})}function ii(e){var t=e.method.create(e.name,e.options);us(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function yo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function wo(e,t,n){e._addEL[t].push(n),ci(e)}function bo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),li(e)}function ci(e){if(!e._iL&&yo(e)){var t=function(o){e._addEL[o.type].forEach(function(a){var s=1e5,c=a.time-s;o.time>=c&&a.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 li(e){if(e._iL&&!yo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Pt=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function vo(e){return Object(e)!==e}const ui=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function di(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===ui}function pi(e){return Object.prototype.toString.call(e).slice(8,-1)}function fi(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 ve(e){let t="",n=0;const o=e.length;for(let a=0;a<o;a+=1){const s=e[a],c=fi(s);c&&(t+=e.slice(n,a)+c,n=a+1)}return`"${n===0?e:t+e.slice(n)}"`}const Dt=-1,Eo=-2,_o=-3,ko=-4,$o=-5,Vt=-6;function So(e,t){return hi(JSON.parse(e))}function hi(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function a(s,c=!1){if(s===Dt)return;if(s===_o)return NaN;if(s===ko)return 1/0;if(s===$o)return-1/0;if(s===Vt)return-0;if(c)throw new Error("Invalid input");if(s in o)return o[s];const i=n[s];if(!i||typeof i!="object")o[s]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const l=i[0];switch(l){case"Date":o[s]=new Date(i[1]);break;case"Set":const p=new Set;o[s]=p;for(let f=1;f<i.length;f+=1)p.add(a(i[f]));break;case"Map":const d=new Map;o[s]=d;for(let f=1;f<i.length;f+=2)d.set(a(i[f]),a(i[f+1]));break;case"RegExp":o[s]=new RegExp(i[1],i[2]);break;case"Object":o[s]=Object(i[1]);break;case"BigInt":o[s]=BigInt(i[1]);break;case"null":const u=Object.create(null);o[s]=u;for(let f=1;f<i.length;f+=2)u[i[f]]=a(i[f+1]);break;default:throw new Error(`Unknown type ${l}`)}}else{const l=new Array(i.length);o[s]=l;for(let p=0;p<i.length;p+=1){const d=i[p];d!==Eo&&(l[p]=a(d))}}else{const l={};o[s]=l;for(const p in i){const d=i[p];l[p]=a(d)}}return o[s]}return a(0)}function Oo(e,t){const n=[],o=new Map,a=[];for(const p in t)a.push({key:p,fn:t[p]});const s=[];let c=0;function i(p){if(typeof p=="function")throw new Pt("Cannot stringify a function",s);if(o.has(p))return o.get(p);if(p===void 0)return Dt;if(Number.isNaN(p))return _o;if(p===1/0)return ko;if(p===-1/0)return $o;if(p===0&&1/p<0)return Vt;const d=c++;o.set(p,d);for(const{key:f,fn:h}of a){const g=h(p);if(g)return n[d]=`["${f}",${i(g)}]`,d}let u="";if(vo(p))u=Rt(p);else switch(pi(p)){case"Number":case"String":case"Boolean":u=`["Object",${Rt(p)}]`;break;case"BigInt":u=`["BigInt",${p}]`;break;case"Date":u=`["Date","${isNaN(p.getDate())?"":p.toISOString()}"]`;break;case"RegExp":const{source:f,flags:h}=p;u=h?`["RegExp",${ve(f)},"${h}"]`:`["RegExp",${ve(f)}]`;break;case"Array":u="[";for(let g=0;g<p.length;g+=1)g>0&&(u+=","),g in p?(s.push(`[${g}]`),u+=i(p[g]),s.pop()):u+=Eo;u+="]";break;case"Set":u='["Set"';for(const g of p)u+=`,${i(g)}`;u+="]";break;case"Map":u='["Map"';for(const[g,w]of p)s.push(`.get(${vo(g)?Rt(g):"..."})`),u+=`,${i(g)},${i(w)}`,s.pop();u+="]";break;default:if(!di(p))throw new Pt("Cannot stringify arbitrary non-POJOs",s);if(Object.getOwnPropertySymbols(p).length>0)throw new Pt("Cannot stringify POJOs with symbolic keys",s);if(Object.getPrototypeOf(p)===null){u='["null"';for(const g in p)s.push(`.${g}`),u+=`,${ve(g)},${i(p[g])}`,s.pop();u+="]"}else{u="{";let g=!1;for(const w in p)g&&(u+=","),g=!0,s.push(`.${w}`),u+=`${ve(w)}:${i(p[w])}`,s.pop();u+="}"}}return n[d]=u,d}const l=i(e);return l<0?`${l}`:`[${n.join(",")}]`}function Rt(e){const t=typeof e;return t==="string"?ve(e):e instanceof String?ve(e.toString()):e===void 0?Dt.toString():e===0&&1/e<0?Vt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function mi(e,t,{initialize:n,type:o}){let a=`${t.$id}-${e.toString()}`,s=new It(a,{type:o}),c=!1,i=0;r.watch(()=>t[e],d=>{c||(i=Date.now(),s.postMessage({timestamp:i,state:So(Oo(d))})),c=!1},{deep:!0}),s.onmessage=d=>{if(d===void 0){s.postMessage({timestamp:i,state:So(Oo(t[e]))});return}d.timestamp<=i||(c=!0,i=d.timestamp,t[e]=d.state)};let l=()=>s.postMessage(void 0),p=()=>s.close();return n&&l(),{sync:l,unshare:p}}var gi=(e,t)=>Object.keys(t).includes(e),yi=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:a})=>{var s,c;let i=((s=a==null?void 0:a.share)==null?void 0:s.enable)??t,l=((c=a==null?void 0:a.share)==null?void 0:c.omit)??[];!i||Object.keys(o.$state).forEach(p=>{var d;l.includes(p)||!gi(p,o.$state)||mi(p,o,{initialize:((d=a==null?void 0:a.share)==null?void 0:d.initialize)??e,type:n})})};Lr().use(yi({enable:!0,initialize:!0}));const No=r.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=bn(),o=r.ref([]);return r.watch(n,()=>{if(n.value){let a=t.value.schema.schema.toArray();a.forEach((s,c)=>{const l=t.value.store.record[s.fieldname];a[c].value=l}),o.value=a}}),(a,s)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(dr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=c=>o.value=c)},null,8,["modelValue"])):r.createCommentVNode("",!0)}});var wi=Object.defineProperty,bi=(e,t,n)=>t in e?wi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fe=(e,t,n)=>bi(e,typeof t!="symbol"?t+"":t,n);function xo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function At(e){return typeof e=="function"?e():r.unref(e)}const vi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ei=e=>e!=null,_i=Object.prototype.toString,ki=e=>_i.call(e)==="[object Object]",$i=()=>{},Pe=vi?window:void 0;function De(e){var t;const n=At(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ve(...e){let t,n,o,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,a]=e,t=Pe):[t,n,o,a]=e,!t)return $i;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],c=()=>{s.forEach(d=>d()),s.length=0},i=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),l=r.watch(()=>[De(t),At(a)],([d,u])=>{if(c(),!d)return;const f=ki(u)?{...u}:u;s.push(...n.flatMap(h=>o.map(g=>i(d,h,g,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),c()};return xo(p),p}function Si(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Oi(e){const t=Si();return r.computed(()=>(t.value,!!e()))}function Ni(e,t,n={}){const{window:o=Pe,...a}=n;let s;const c=Oi(()=>o&&"MutationObserver"in o),i=()=>{s&&(s.disconnect(),s=void 0)},l=r.computed(()=>{const f=At(e),h=(Array.isArray(f)?f:[f]).map(De).filter(Ei);return new Set(h)}),p=r.watch(()=>l.value,f=>{i(),c.value&&f.size&&(s=new MutationObserver(t),f.forEach(h=>s.observe(h,a)))},{immediate:!0,flush:"post"}),d=()=>s==null?void 0:s.takeRecords(),u=()=>{p(),i()};return xo(u),{isSupported:c,stop:u,takeRecords:d}}function xi(e={}){var t;const{window:n=Pe,deep:o=!0,triggerOnRemoval:a=!1}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,c=()=>{var p;let d=s==null?void 0:s.activeElement;if(o)for(;d!=null&&d.shadowRoot;)d=(p=d==null?void 0:d.shadowRoot)==null?void 0:p.activeElement;return d},i=r.ref(),l=()=>{i.value=c()};return n&&(Ve(n,"blur",p=>{p.relatedTarget===null&&l()},!0),Ve(n,"focus",l,!0)),a&&Ni(s,p=>{p.filter(d=>d.removedNodes.length).map(d=>Array.from(d.removedNodes)).flat().forEach(d=>{d===i.value&&l()})},{childList:!0,subtree:!0}),l(),i}const Ci="focusin",Ii="focusout";function Pi(e,t={}){const{window:n=Pe}=t,o=r.computed(()=>De(e)),a=r.ref(!1),s=r.computed(()=>a.value),c=xi(t);return!n||!c.value?{focused:s}:(Ve(o,Ci,()=>a.value=!0),Ve(o,Ii,()=>a.value=!1),{focused:s})}function Di(e,{window:t=Pe,scrollTarget:n}={}){const o=r.ref(!1),a=()=>{if(!t)return;const s=t.document,c=De(e);if(!c)o.value=!1;else{const i=c.getBoundingClientRect();o.value=i.top<=(t.innerHeight||s.documentElement.clientHeight)&&i.left<=(t.innerWidth||s.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return r.watch(()=>De(e),()=>a(),{immediate:!0,flush:"post"}),t&&Ve(n||t,"scroll",a,{capture:!1,passive:!0}),o}const re=e=>{let t=Di(e).value;return t=t&&e.offsetHeight>0,t},ae=e=>e.tabIndex>=0,Co=e=>{const t=e.target;return Tt(t)},Tt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(n=a)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Tt(n):n},Vi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const a=(t=n.parentElement)==null?void 0:t.parentElement;if(a){const s=a.firstElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const a=n.parentElement;if(a){const s=a.firstElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?jt(o):o},Io=e=>{const t=e.target;return jt(t)},jt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(n=a)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?jt(n):n},Ri=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const a=(t=n.parentElement)==null?void 0:t.parentElement;if(a){const s=a.lastElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const a=n.parentElement;if(a){const s=a.lastElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Tt(o):o},Po=e=>{const t=e.target;return Bt(t)},Bt=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ae(n)||!re(n))?Bt(n):n},Do=e=>{const t=e.target;return Lt(t)},Lt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ae(n)||!re(n))?Lt(n):n},Vo=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ae(t)||!re(t))?Lt(t):t},Ro=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ae(t)||!re(t))?Bt(t):t},Ye=["alt","control","shift","meta"],Ai={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Mt={"keydown.up":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Po(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Do(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Vi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Ri(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Vo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Ro(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Ro(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Io(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Co(e);t&&t.focus()}},"keydown.home":e=>{const t=Vo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Do(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Po(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ao(e){const t=c=>{let i=null;return c.parent&&(typeof c.parent=="string"?i=document.querySelector(c.parent):c.parent instanceof HTMLElement?i=c.parent:i=c.parent.value),i},n=c=>{const i=t(c);let l=[];if(typeof c.selectors=="string")l=i?Array.from(i.querySelectorAll(c.selectors)):Array.from(document.querySelectorAll(c.selectors));else if(Array.isArray(c.selectors))for(const p of c.selectors)p instanceof HTMLElement?l.push(p):l.push(p.$el);else if(c.selectors instanceof HTMLElement)l.push(c.selectors);else if(Array.isArray(c.selectors.value))for(const p of c.selectors.value)p instanceof HTMLElement?l.push(p):l.push(p.$el);else l.push(c.selectors.value);return l},o=c=>{const i=t(c);let l=[];return c.selectors?l=n(c):i&&(l=Array.from(i.children).filter(p=>ae(p)&&re(p))),l},a=c=>i=>{const l=Ai[i.key]||i.key.toLowerCase();if(Ye.includes(l))return;const p=c.handlers||Mt;for(const d of Object.keys(p)){const[u,...f]=d.split(".");if(u==="keydown"&&f.includes(l)){const h=p[d],g=f.filter(O=>Ye.includes(O)),w=Ye.some(O=>{const $=O.charAt(0).toUpperCase()+O.slice(1);return i.getModifierState($)});if(g.length>0){if(w){for(const O of Ye)if(f.includes(O)){const $=O.charAt(0).toUpperCase()+O.slice(1);i.getModifierState($)&&h(i)}}}else w||h(i)}}},s=[];r.onMounted(()=>{for(const c of e){const i=t(c),l=o(c),p=a(c),d=i?[i]:l;for(const u of d){const{focused:f}=Pi(r.ref(u)),h=r.watch(f,g=>{g?u.addEventListener("keydown",p):u.removeEventListener("keydown",p)});s.push(h)}}}),r.onBeforeUnmount(()=>{for(const c of s)c()})}function Ut(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Qe(e){return typeof e=="function"?e():r.unref(e)}const Ti=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ji=e=>e!=null,Bi=Object.prototype.toString,Li=e=>Bi.call(e)==="[object Object]",Mi=()=>{};function Ui(e){return r.getCurrentInstance()}function Wi(e,t=!0,n){Ui()?r.onMounted(e,n):t?e():r.nextTick(e)}const Wt=Ti?window:void 0;function Ee(e){var t;const n=Qe(e);return(t=n==null?void 0:n.$el)!=null?t:n}function To(...e){let t,n,o,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,a]=e,t=Wt):[t,n,o,a]=e,!t)return Mi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],c=()=>{s.forEach(d=>d()),s.length=0},i=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),l=r.watch(()=>[Ee(t),Qe(a)],([d,u])=>{if(c(),!d)return;const f=Li(u)?{...u}:u;s.push(...n.flatMap(h=>o.map(g=>i(d,h,g,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),c()};return Ut(p),p}function zi(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function jo(e){const t=zi();return r.computed(()=>(t.value,!!e()))}function Bo(e,t,n={}){const{window:o=Wt,...a}=n;let s;const c=jo(()=>o&&"MutationObserver"in o),i=()=>{s&&(s.disconnect(),s=void 0)},l=r.computed(()=>{const f=Qe(e),h=(Array.isArray(f)?f:[f]).map(Ee).filter(ji);return new Set(h)}),p=r.watch(()=>l.value,f=>{i(),c.value&&f.size&&(s=new MutationObserver(t),f.forEach(h=>s.observe(h,a)))},{immediate:!0,flush:"post"}),d=()=>s==null?void 0:s.takeRecords(),u=()=>{p(),i()};return Ut(u),{isSupported:c,stop:u,takeRecords:d}}function Fi(e,t,n={}){const{window:o=Wt,...a}=n;let s;const c=jo(()=>o&&"ResizeObserver"in o),i=()=>{s&&(s.disconnect(),s=void 0)},l=r.computed(()=>{const u=Qe(e);return Array.isArray(u)?u.map(f=>Ee(f)):[Ee(u)]}),p=r.watch(l,u=>{if(i(),c.value&&o){s=new ResizeObserver(t);for(const f of u)f&&s.observe(f,a)}},{immediate:!0,flush:"post"}),d=()=>{i(),p()};return Ut(d),{isSupported:c,stop:d}}function Hi(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:a=!0,immediate:s=!0,updateTiming:c="sync"}=t,i=r.ref(0),l=r.ref(0),p=r.ref(0),d=r.ref(0),u=r.ref(0),f=r.ref(0),h=r.ref(0),g=r.ref(0);function w(){const $=Ee(e);if(!$){n&&(i.value=0,l.value=0,p.value=0,d.value=0,u.value=0,f.value=0,h.value=0,g.value=0);return}const _=$.getBoundingClientRect();i.value=_.height,l.value=_.bottom,p.value=_.left,d.value=_.right,u.value=_.top,f.value=_.width,h.value=_.x,g.value=_.y}function O(){c==="sync"?w():c==="next-frame"&&requestAnimationFrame(()=>w())}return Fi(e,O),r.watch(()=>Ee(e),$=>!$&&O()),Bo(e,O,{attributeFilter:["style","class"]}),a&&To("scroll",O,{capture:!0,passive:!0}),o&&To("resize",O,{passive:!0}),Wi(()=>{s&&O()}),{height:i,bottom:l,left:p,right:d,top:u,width:f,x:h,y:g,update:O}}const Gi=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],qi={key:1},Ji=r.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean}},setup(e){var t;const n=r.inject(e.tableid),o=r.useTemplateRef("cell"),a=r.ref(""),s=r.ref(!1),c=n.table,i=n.columns[e.colIndex],l=n.rows[e.rowIndex],p=r.computed(()=>i.align||"center"),d=r.computed(()=>i.width||"40ch"),u=r.computed(()=>{const $=n.cellData(e.colIndex,e.rowIndex),_=i.format;return _?typeof _=="function"?_($,{table:c,row:l,column:i}):typeof _=="string"?Function(`"use strict";return (${_})`)()($,{table:c,row:l,column:i}):$:$}),f=()=>{if(i.mask,i.modalComponent){const{top:$,left:_,height:I}=Hi(o);n.modal.visible=!0,n.modal.colIndex=e.colIndex,n.modal.rowIndex=e.rowIndex,n.modal.parent=o.value,n.modal.top=$.value+I.value,n.modal.left=_.value,n.modal.width=d.value,typeof i.modalComponent=="function"?n.modal.component=i.modalComponent({table:c,row:l,column:i}):n.modal.component=i.modalComponent,n.modal.componentProps=i.modalComponentExtraProps}};if(e.addNavigation){let $={...Mt,"keydown.f2":f,"keydown.alt.up":f,"keydown.alt.down":f,"keydown.alt.left":f,"keydown.alt.right":f};typeof e.addNavigation=="object"&&($={...$,...e.addNavigation}),Ao([{selectors:o,handlers:$}])}const h=()=>{o.value&&(a.value=o.value.textContent)},g=()=>{o.value&&o.value.textContent!==a.value&&(a.value=o.value.textContent,o.value.dispatchEvent(new Event("change")),s.value=!0,i.format||n.setCellData(e.rowIndex,e.colIndex,a.value))},w=($,_)=>_&&$===0&&_>0?`${_}ch`:"inherit",O={textAlign:p.value,width:d.value,backgroundColor:s.value?"var(--cell-modified-color)":"inherit",fontWeight:s.value?"bold":"inherit",paddingLeft:w(e.colIndex,(t=n.display[e.rowIndex])==null?void 0:t.indent)};return($,_)=>(r.openBlock(),r.createElementBlock("td",{ref:"cell","data-colindex":$.colIndex,"data-rowindex":$.rowIndex,"data-editable":r.unref(i).edit,contenteditable:r.unref(i).edit,tabindex:$.tabIndex,spellcheck:!1,style:O,onFocus:h,onPaste:g,onBlur:g,onInput:g,onClick:f,onMousedown:f,class:r.normalizeClass(["atable__cell",$.pinned?"sticky-column":""])},[r.unref(i).cellComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(i).cellComponent),r.mergeProps({key:0,value:u.value},r.unref(i).cellComponentProps),null,16,["value"])):(r.openBlock(),r.createElementBlock("span",qi,r.toDisplayString(u.value),1))],42,Gi))}}),Ki=["tabindex"],Yi=r.defineComponent({__name:"ARow",props:{rowIndex:{},tableid:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=r.inject(e.tableid),n=r.useTemplateRef("rowEl"),o=r.computed(()=>t.columns.some(i=>i.pinned)),a=r.computed(()=>t.config.view!=="tree"||t.display[e.rowIndex].isRoot||t.display[e.rowIndex].open),s=r.computed(()=>t.config.view!=="tree"?"":t.display[e.rowIndex].isRoot||t.display[e.rowIndex].isParent?t.display[e.rowIndex].childrenOpen?"-":"+":""),c=i=>{t.toggleRowExpand(i)};if(e.addNavigation){let i=Mt;typeof e.addNavigation=="object"&&(i={...i,...e.addNavigation}),Ao([{selectors:n,handlers:i}])}return(i,l)=>r.withDirectives((r.openBlock(),r.createElementBlock("tr",{ref:"rowEl",tabindex:i.tabIndex,class:"table-row"},[r.renderSlot(i.$slots,"index",{},()=>[r.unref(t).config.view==="list"?(r.openBlock(),r.createElementBlock("td",{key:0,tabIndex:-1,class:r.normalizeClass(["list-index",o.value?"sticky-index":""])},r.toDisplayString(i.rowIndex+1),3)):r.unref(t).config.view==="tree"?(r.openBlock(),r.createElementBlock("td",{key:1,tabIndex:-1,class:r.normalizeClass(["tree-index",o.value?"sticky-index":""]),onClick:l[0]||(l[0]=p=>c(i.rowIndex))},r.toDisplayString(s.value),3)):r.createCommentVNode("",!0)]),r.renderSlot(i.$slots,"default")],8,Ki)),[[r.vShow,a.value]])}});function Lo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Re(e){return typeof e=="function"?e():r.unref(e)}const Mo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Qi=Object.prototype.toString,Xi=e=>Qi.call(e)==="[object Object]",Ae=()=>{},zt=Zi();function Zi(){var e,t;return Mo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}const Uo={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function ec(...e){if(e.length!==1)return r.toRef(...e);const t=e[0];return typeof t=="function"?r.readonly(r.customRef(()=>({get:t,set:Ae}))):r.ref(t)}function Te(e){var t;const n=Re(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Wo=Mo?window:void 0;function Xe(...e){let t,n,o,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,a]=e,t=Wo):[t,n,o,a]=e,!t)return Ae;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],c=()=>{s.forEach(d=>d()),s.length=0},i=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),l=r.watch(()=>[Te(t),Re(a)],([d,u])=>{if(c(),!d)return;const f=Xi(u)?{...u}:u;s.push(...n.flatMap(h=>o.map(g=>i(d,h,g,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),c()};return Lo(p),p}let zo=!1;function Fo(e,t,n={}){const{window:o=Wo,ignore:a=[],capture:s=!0,detectIframe:c=!1}=n;if(!o)return Ae;zt&&!zo&&(zo=!0,Array.from(o.document.body.children).forEach(d=>d.addEventListener("click",Ae)),o.document.documentElement.addEventListener("click",Ae));let i=!0;const l=d=>a.some(u=>{if(typeof u=="string")return Array.from(o.document.querySelectorAll(u)).some(f=>f===d.target||d.composedPath().includes(f));{const f=Te(u);return f&&(d.target===f||d.composedPath().includes(f))}}),p=[Xe(o,"click",d=>{const u=Te(e);if(!(!u||u===d.target||d.composedPath().includes(u))){if(d.detail===0&&(i=!l(d)),!i){i=!0;return}t(d)}},{passive:!0,capture:s}),Xe(o,"pointerdown",d=>{const u=Te(e);i=!l(d)&&!!(u&&!d.composedPath().includes(u))},{passive:!0}),c&&Xe(o,"blur",d=>{setTimeout(()=>{var u;const f=Te(e);((u=o.document.activeElement)==null?void 0:u.tagName)==="IFRAME"&&!(f!=null&&f.contains(o.document.activeElement))&&t(d)},0)})].filter(Boolean);return()=>p.forEach(d=>d())}const tc={[Uo.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=Fo(e,t.value,{capture:n});else{const[o,a]=t.value;e.__onClickOutside_stop=Fo(e,o,Object.assign({capture:n},a))}},[Uo.unmounted](e){e.__onClickOutside_stop()}};function Ft(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Ho(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:Ho(n)}}function nc(e){const t=e||window.event,n=t.target;return Ho(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ht=new WeakMap;function oc(e,t=!1){const n=r.ref(t);let o=null,a="";r.watch(ec(e),i=>{const l=Ft(Re(i));if(l){const p=l;if(Ht.get(p)||Ht.set(p,p.style.overflow),p.style.overflow!=="hidden"&&(a=p.style.overflow),p.style.overflow==="hidden")return n.value=!0;if(n.value)return p.style.overflow="hidden"}},{immediate:!0});const s=()=>{const i=Ft(Re(e));!i||n.value||(zt&&(o=Xe(i,"touchmove",l=>{nc(l)},{passive:!1})),i.style.overflow="hidden",n.value=!0)},c=()=>{const i=Ft(Re(e));!i||!n.value||(zt&&(o==null||o()),i.style.overflow=a,Ht.delete(i),n.value=!1)};return Lo(c),r.computed({get(){return n.value},set(i){i?s():c()}})}function rc(){let e=!1;const t=r.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const a=oc(n,o.value);r.watch(t,s=>a.value=s)}}rc();for(var B=[],Gt=0;Gt<256;++Gt)B.push((Gt+256).toString(16).slice(1));function ac(e,t=0){return(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase()}var Ze,sc=new Uint8Array(16);function ic(){if(!Ze&&(Ze=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ze))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ze(sc)}var cc=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Go={randomUUID:cc};function lc(e,t,n){if(Go.randomUUID&&!t&&!e)return Go.randomUUID();e=e||{};var o=e.random||(e.rng||ic)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ac(o)}class uc{constructor(t,n,o,a,s,c){fe(this,"id"),fe(this,"rows"),fe(this,"columns"),fe(this,"config"),fe(this,"table"),fe(this,"display"),fe(this,"modal"),this.id=t||lc(),this.rows=o,this.columns=r.reactive(n),this.config=r.reactive(a),this.table=s||r.reactive(this.createTableObject()),this.display=this.createDisplayObject(c),this.modal=r.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[a,s]of this.rows.entries())t[`${n}:${a}`]=s[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let a=this.rows.length-1;a>=0;a--){const s=this.rows[a];s.parent&&o.add(s.parent),n[a]={childrenOpen:!1,expanded:!1,indent:s.indent||null,isParent:o.has(a),isRoot:s.parent===null||s.parent===void 0,modified:!1,open:s.parent===null||s.parent===void 0,parent:s.parent}}return r.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return r.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const a=this.columns[n];return this.rows[t][a.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const dc={key:0,id:"resizable"},pc={class:"atable-header-row",tabindex:"-1"},fc=r.defineComponent({__name:"ATableHeader",props:{columns:{},tableid:{}},setup(e){const t=r.inject(e.tableid),n=r.computed(()=>t.columns.some(a=>a.pinned)),o=a=>({minWidth:a.width||"40ch",textAlign:a.align||"center",width:t.config.fullWidth?"auto":null});return(a,s)=>a.columns.length?(r.openBlock(),r.createElementBlock("thead",dc,[r.createElementVNode("tr",pc,[r.unref(t).zeroColumn?(r.openBlock(),r.createElementBlock("th",{key:0,id:"header-index",class:r.normalizeClass(n.value?"sticky-index":"")},null,2)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.columns,(c,i)=>(r.openBlock(),r.createElementBlock("th",{key:c.name,tabindex:"-1",style:r.normalizeStyle(o(c)),class:r.normalizeClass(c.pinned?"sticky-column":"")},[r.renderSlot(a.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(c.label||String.fromCharCode(i+97).toUpperCase()),1)])],6))),128))])])):r.createCommentVNode("",!0)}}),hc=r.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[r.renderSlot(n.$slots,"default")],32))}}),mc=r.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=r.useTemplateRef("table"),a=e.modelValue?e.modelValue:e.rows,s=new uc(e.id,e.columns,a,e.config);r.provide(s.id,s),r.watch(()=>s.rows,l=>{n("update:modelValue",l)},{deep:!0}),r.onMounted(()=>{e.columns.some(l=>l.pinned)&&(c(),s.config.view==="tree"&&Bo(o,c,{childList:!0,subtree:!0}))});const c=()=>{const l=o.value,p=l.rows[0],d=l.rows[1],u=p?Array.from(p.cells):[];for(const[f,h]of u.entries()){const g=d.cells[f];g&&(h.style.width=`${g.offsetWidth}px`)}for(const f of l.rows){let h=0;const g=[];for(const w of f.cells)(w.classList.contains("sticky-column")||w.classList.contains("sticky-index"))&&(w.style.left=`${h}px`,h+=w.offsetWidth,g.push(w));g.length>0&&g[g.length-1].classList.add("sticky-column-edge")}},i=l=>{var p;l.target instanceof Node&&(p=s.modal.parent)!=null&&p.contains(l.target)||s.modal.visible&&(s.modal.visible=!1)};return window.addEventListener("keydown",l=>{if(l.key==="Escape"&&s.modal.visible){s.modal.visible=!1;const p=s.modal.parent;p&&r.nextTick().then(()=>{p.focus()})}}),(l,p)=>r.withDirectives((r.openBlock(),r.createElementBlock("table",{ref:"table",class:"atable",style:r.normalizeStyle({width:r.unref(s).config.fullWidth?"100%":"auto"})},[r.renderSlot(l.$slots,"header",{data:r.unref(s)},()=>[r.createVNode(fc,{columns:r.unref(s).columns,tableid:r.unref(s).id},null,8,["columns","tableid"])]),r.createElementVNode("tbody",null,[r.renderSlot(l.$slots,"body",{data:r.unref(s)},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s).rows,(d,u)=>(r.openBlock(),r.createBlock(Yi,{key:d.id,row:d,rowIndex:u,tableid:r.unref(s).id},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(s).columns,(f,h)=>(r.openBlock(),r.createBlock(Ji,{key:f.name,tableid:r.unref(s).id,col:f,spellcheck:"false",pinned:f.pinned,rowIndex:u,colIndex:h+(r.unref(s).zeroColumn?0:-1),component:f.cellComponent,style:r.normalizeStyle({textAlign:(f==null?void 0:f.align)||"center",minWidth:(f==null?void 0:f.width)||"40ch",width:r.unref(s).config.fullWidth?"auto":null})},null,8,["tableid","col","pinned","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))])]),r.renderSlot(l.$slots,"footer",{data:r.unref(s)}),r.renderSlot(l.$slots,"modal",{data:r.unref(s)},()=>[r.withDirectives(r.createVNode(hc,{colIndex:r.unref(s).modal.colIndex,rowIndex:r.unref(s).modal.rowIndex,tableid:r.unref(s).id,style:r.normalizeStyle({left:r.unref(s).modal.left+"px",top:r.unref(s).modal.top+"px",maxWidth:r.unref(s).modal.width+"px"})},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(s).modal.component),r.mergeProps({key:`${r.unref(s).modal.rowIndex}:${r.unref(s).modal.colIndex}`,colIndex:r.unref(s).modal.colIndex,rowIndex:r.unref(s).modal.rowIndex,tableid:r.unref(s).id},r.unref(s).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[r.vShow,r.unref(s).modal.visible]])])],4)),[[r.unref(tc),i]])}}),qo=r.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=bn(),o={view:"list"};return(a,s)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(mc),{key:0,columns:r.unref(t).schema.schema.toArray(),rows:r.unref(t).store.records,config:o},null,8,["columns","rows"])):r.createCommentVNode("",!0)}}),gc={class:"tabs"},yc={tabindex:"0"},wc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},bc={tabindex:"0"},vc={style:{width:"11pt"}},Jo=rt(r.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=r.ref(!0),n=r.ref(!1),o=r.ref(""),a=r.useTemplateRef("searchinput"),s=r.computed(()=>t.value?"unrotated":"rotated"),c=()=>{t.value=!t.value},i=async()=>{n.value=!n.value,await r.nextTick(()=>{a.value.focus()})},l=u=>{u.preventDefault(),u.stopPropagation()},p=async u=>{u.preventDefault(),u.stopPropagation(),await i()},d=()=>{};return(u,f)=>{const h=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("footer",null,[r.createElementVNode("ul",gc,[r.createElementVNode("li",{class:"hidebreadcrumbs",onClick:c,onKeydown:r.withKeys(c,["enter"])},[r.createElementVNode("a",yc,[r.createElementVNode("div",{class:r.normalizeClass(s.value)},"ร",2)])],32),r.createElementVNode("li",{class:"hometab",onClick:d,onKeydown:r.withKeys(d,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{to:"/home",tabindex:"0"},{default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("svg",wc,f[5]||(f[5]=[r.createElementVNode("g",null,[r.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
43
43
|
c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276
|
|
44
44
|
c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129
|
|
45
45
|
v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0
|
|
@@ -47,5 +47,5 @@ ${JSON.stringify(k,null,2)}
|
|
|
47
47
|
c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863
|
|
48
48
|
c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511
|
|
49
49
|
c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129
|
|
50
|
-
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),
|
|
50
|
+
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),r.createElementVNode("li",{class:"searchtab",onClick:i,onKeydown:r.withKeys(i,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createElementVNode("a",bc,[r.createElementVNode("span",{style:r.normalizeStyle({display:n.value?"none":"block"})},[(r.openBlock(),r.createElementBlock("svg",vc,f[6]||(f[6]=[r.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[r.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1)])))],4),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=g=>o.value=g),ref:"searchinput",style:r.normalizeStyle({display:n.value?"block":"none"}),onClick:f[1]||(f[1]=g=>l(g)),onInput:f[2]||(f[2]=g=>l(g)),onBlur:f[3]||(f[3]=g=>p(g)),onKeydown:f[4]||(f[4]=r.withKeys(g=>p(g),["enter"])),type:"text"},null,36),[[r.vModelText,o.value]])])],36),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.breadcrumbs,g=>(r.openBlock(),r.createElementBlock("li",{key:g.title,style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{tabindex:"0",to:g.to},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(g.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-a650f215"]]),Ec={install:e=>{e.component("ActionSet",Yt),e.component("CommandPalette",Qt),e.component("Doctype",No),e.component("Records",qo),e.component("SheetNav",Jo)}};H.ActionSet=Yt,H.CommandPalette=Qt,H.Doctype=No,H.Records=qo,H.SheetNav=Jo,H.StonecropDesktop=Ec,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|
|
51
51
|
//# sourceMappingURL=desktop.umd.cjs.map
|