@vancone/console-component 0.1.1-beta.51 → 0.1.1-beta.53

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.
@@ -4,11 +4,11 @@
4
4
  * @license MIT
5
5
  */let Ie;const Te=t=>Ie=t,_t=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function we(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var me;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(me||(me={}));const Ce=typeof window!="undefined",bt=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 vo(t,{autoBom:o=!1}={}){return o&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\uFEFF",t],{type:t.type}):t}function ve(t,o,n){const r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Ct(r.response,o,n)},r.onerror=function(){console.error("could not download file")},r.send()}function yt(t){const o=new XMLHttpRequest;o.open("HEAD",t,!1);try{o.send()}catch(n){}return o.status>=200&&o.status<=299}function Re(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(o){const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}const Le=typeof navigator=="object"?navigator:{userAgent:""},wt=/Macintosh/.test(Le.userAgent)&&/AppleWebKit/.test(Le.userAgent)&&!/Safari/.test(Le.userAgent),Ct=Ce?typeof HTMLAnchorElement!="undefined"&&"download"in HTMLAnchorElement.prototype&&!wt?en:"msSaveOrOpenBlob"in Le?tn:on:()=>{};function en(t,o="download",n){const r=document.createElement("a");r.download=o,r.rel="noopener",typeof t=="string"?(r.href=t,r.origin!==location.origin?yt(r.href)?ve(t,o,n):(r.target="_blank",Re(r)):Re(r)):(r.href=URL.createObjectURL(t),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Re(r)},0))}function tn(t,o="download",n){if(typeof t=="string")if(yt(t))ve(t,o,n);else{const r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){Re(r)})}else navigator.msSaveOrOpenBlob(vo(t,n),o)}function on(t,o,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return ve(t,o,n);const a=t.type==="application/octet-stream",l=/constructor/i.test(String(bt.HTMLElement))||"safari"in bt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||a&&l||wt)&&typeof FileReader!="undefined"){const s=new FileReader;s.onloadend=function(){let c=s.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),r=null},s.readAsDataURL(t)}else{const s=URL.createObjectURL(t);r?r.location.assign(s):location.href=s,r=null,setTimeout(function(){URL.revokeObjectURL(s)},4e4)}}function te(t,o){const n="🍍 "+t;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,o):o==="error"?console.error(n):o==="warn"?console.warn(n):console.log(n)}function et(t){return"_a"in t&&"install"in t}function kt(){if(!("clipboard"in navigator))return te("Your browser doesn't support the Clipboard API","error"),!0}function Vt(t){return t instanceof Error&&t.message.toLowerCase().includes("document is not focused")?(te('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}function nn(t){return he(this,null,function*(){if(!kt())try{yield navigator.clipboard.writeText(JSON.stringify(t.state.value)),te("Global state copied to clipboard.")}catch(o){if(Vt(o))return;te("Failed to serialize the state. Check the console for more details.","error"),console.error(o)}})}function rn(t){return he(this,null,function*(){if(!kt())try{Nt(t,JSON.parse(yield navigator.clipboard.readText())),te("Global state pasted from clipboard.")}catch(o){if(Vt(o))return;te("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(o)}})}function an(t){return he(this,null,function*(){try{Ct(new Blob([JSON.stringify(t.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(o){te("Failed to export the state as JSON. Check the console for more details.","error"),console.error(o)}})}let ue;function ln(){ue||(ue=document.createElement("input"),ue.type="file",ue.accept=".json");function t(){return new Promise((o,n)=>{ue.onchange=()=>he(this,null,function*(){const r=ue.files;if(!r)return o(null);const a=r.item(0);return o(a?{text:yield a.text(),file:a}:null)}),ue.oncancel=()=>o(null),ue.onerror=n,ue.click()})}return t}function sn(t){return he(this,null,function*(){try{const n=yield ln()();if(!n)return;const{text:r,file:a}=n;Nt(t,JSON.parse(r)),te(`Global state imported from "${a.name}".`)}catch(o){te("Failed to import the state from JSON. Check the console for more details.","error"),console.error(o)}})}function Nt(t,o){for(const n in o){const r=t.state.value[n];r?Object.assign(r,o[n]):t.state.value[n]=o[n]}}function pe(t){return{_custom:{display:t}}}const xt="🍍 Pinia (root)",Ge="_root";function cn(t){return et(t)?{id:Ge,label:xt}:{id:t.$id,label:t.$id}}function dn(t){if(et(t)){const n=Array.from(t._s.keys()),r=t._s;return{state:n.map(l=>({editable:!0,key:l,value:t.state.value[l]})),getters:n.filter(l=>r.get(l)._getters).map(l=>{const i=r.get(l);return{editable:!1,key:l,value:i._getters.reduce((s,c)=>(s[c]=i[c],s),{})}})}}const o={state:Object.keys(t.$state).map(n=>({editable:!0,key:n,value:t.$state[n]}))};return t._getters&&t._getters.length&&(o.getters=t._getters.map(n=>({editable:!1,key:n,value:t[n]}))),t._customProperties.size&&(o.customProperties=Array.from(t._customProperties).map(n=>({editable:!0,key:n,value:t[n]}))),o}function pn(t){return t?Array.isArray(t)?t.reduce((o,n)=>(o.keys.push(n.key),o.operations.push(n.type),o.oldValue[n.key]=n.oldValue,o.newValue[n.key]=n.newValue,o),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:pe(t.type),key:pe(t.key),oldValue:t.oldValue,newValue:t.newValue}:{}}function fn(t){switch(t){case me.direct:return"mutation";case me.patchFunction:return"$patch";case me.patchObject:return"$patch";default:return"unknown"}}let Se=!0;const je=[],ke="pinia:mutations",oe="pinia",{assign:mn}=Object,ze=t=>"🍍 "+t;function un(t,o){gt({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:je,app:t},n=>{typeof n.now!="function"&&te("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:ke,label:"Pinia 🍍",color:15064968}),n.addInspector({id:oe,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{nn(o)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:()=>he(this,null,function*(){yield rn(o),n.sendInspectorTree(oe),n.sendInspectorState(oe)}),tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{an(o)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:()=>he(this,null,function*(){yield sn(o),n.sendInspectorTree(oe),n.sendInspectorState(oe)}),tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const a=o._s.get(r);a?typeof a.$reset!="function"?te(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(a.$reset(),te(`Store "${r}" reset.`)):te(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,a)=>{const l=r.componentInstance&&r.componentInstance.proxy;if(l&&l._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(s=>{r.instanceData.state.push({type:ze(s.$id),key:"state",editable:!0,value:s._isOptionsAPI?{_custom:{value:e.toRaw(s.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>s.$reset()}]}}:Object.keys(s.$state).reduce((c,u)=>(c[u]=s.$state[u],c),{})}),s._getters&&s._getters.length&&r.instanceData.state.push({type:ze(s.$id),key:"getters",editable:!1,value:s._getters.reduce((c,u)=>{try{c[u]=s[u]}catch(b){c[u]=b}return c},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===t&&r.inspectorId===oe){let a=[o];a=a.concat(Array.from(o._s.values())),r.rootNodes=(r.filter?a.filter(l=>"$id"in l?l.$id.toLowerCase().includes(r.filter.toLowerCase()):xt.toLowerCase().includes(r.filter.toLowerCase())):a).map(cn)}}),globalThis.$pinia=o,n.on.getInspectorState(r=>{if(r.app===t&&r.inspectorId===oe){const a=r.nodeId===Ge?o:o._s.get(r.nodeId);if(!a)return;a&&(r.nodeId!==Ge&&(globalThis.$store=e.toRaw(a)),r.state=dn(a))}}),n.on.editInspectorState((r,a)=>{if(r.app===t&&r.inspectorId===oe){const l=r.nodeId===Ge?o:o._s.get(r.nodeId);if(!l)return te(`store "${r.nodeId}" not found`,"error");const{path:i}=r;et(l)?i.unshift("state"):(i.length!==1||!l._customProperties.has(i[0])||i[0]in l.$state)&&i.unshift("$state"),Se=!1,r.set(l,i,r.state.value),Se=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const a=r.type.replace(/^🍍\s*/,""),l=o._s.get(a);if(!l)return te(`store "${a}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return te(`Invalid path for store "${a}":
6
6
  ${i}
7
- Only state can be modified.`);i[0]="$state",Se=!1,r.set(l,i,r.state.value),Se=!0}})})}function hn(t,o){je.includes(ze(o.$id))||je.push(ze(o.$id)),gt({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:je,app:t,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;o.$onAction(({after:i,onError:s,name:c,args:u})=>{const b=Et++;n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🛫 "+c,subtitle:"start",data:{store:pe(o.$id),action:pe(c),args:u},groupId:b}}),i(w=>{be=void 0,n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🛬 "+c,subtitle:"end",data:{store:pe(o.$id),action:pe(c),args:u,result:w},groupId:b}})}),s(w=>{be=void 0,n.addTimelineEvent({layerId:ke,event:{time:r(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:pe(o.$id),action:pe(c),args:u,error:w},groupId:b}})})},!0),o._customProperties.forEach(i=>{e.watch(()=>e.unref(o[i]),(s,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(oe),Se&&n.addTimelineEvent({layerId:ke,event:{time:r(),title:"Change",subtitle:i,data:{newValue:s,oldValue:c},groupId:be}})},{deep:!0})}),o.$subscribe(({events:i,type:s},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(oe),!Se)return;const u={time:r(),title:fn(s),data:mn({store:pe(o.$id)},pn(i)),groupId:be};s===me.patchFunction?u.subtitle="⤵️":s===me.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ke,event:u})},{detached:!0,flush:"sync"});const a=o._hotUpdate;o._hotUpdate=e.markRaw(i=>{a(i),n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🔥 "+o.$id,subtitle:"HMR update",data:{store:pe(o.$id),info:pe("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe)});const{$dispose:l}=o;o.$dispose=()=>{l(),n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe),n.getSettings().logStoreChanges&&te(`Disposed "${o.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe),n.getSettings().logStoreChanges&&te(`"${o.$id}" store installed 🆕`)})}let Et=0,be;function St(t,o,n){const r=o.reduce((a,l)=>(a[l]=e.toRaw(t)[l],a),{});for(const a in r)t[a]=function(){const l=Et,i=n?new Proxy(t,{get(...c){return be=l,Reflect.get(...c)},set(...c){return be=l,Reflect.set(...c)}}):t;be=l;const s=r[a].apply(i,arguments);return be=void 0,s}}function gn({app:t,store:o,options:n}){if(!o.$id.startsWith("__hot:")){if(o._isOptionsAPI=!!n.state,!o._p._testing){St(o,Object.keys(n.actions),o._isOptionsAPI);const r=o._hotUpdate;e.toRaw(o)._hotUpdate=function(a){r.apply(this,arguments),St(o,Object.keys(a._hmrPayload.actions),!!o._isOptionsAPI)}}hn(t,o)}}function _n(){const t=e.effectScope(!0),o=t.run(()=>e.ref({}));let n=[],r=[];const a=e.markRaw({install(l){Te(a),a._a=l,l.provide(_t,a),l.config.globalProperties.$pinia=a,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce&&un(l,a),r.forEach(i=>n.push(i)),r=[]},use(l){return!this._a&&!ut?r.push(l):n.push(l),this},_p:n,_a:null,_e:t,_s:new Map,state:o});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy!="undefined"&&a.use(gn),a}function Bt(t,o){for(const n in o){const r=o[n];if(!(n in t))continue;const a=t[n];we(a)&&we(r)&&!e.isRef(r)&&!e.isReactive(r)?t[n]=Bt(a,r):t[n]=r}return t}const $t=()=>{};function Ot(t,o,n,r=$t){t.push(o);const a=()=>{const l=t.indexOf(o);l>-1&&(t.splice(l,1),r())};return!n&&e.getCurrentScope()&&e.onScopeDispose(a),a}function Be(t,...o){t.slice().forEach(n=>{n(...o)})}const bn=t=>t(),Pt=Symbol(),tt=Symbol();function ot(t,o){t instanceof Map&&o instanceof Map?o.forEach((n,r)=>t.set(r,n)):t instanceof Set&&o instanceof Set&&o.forEach(t.add,t);for(const n in o){if(!o.hasOwnProperty(n))continue;const r=o[n],a=t[n];we(a)&&we(r)&&t.hasOwnProperty(n)&&!e.isRef(r)&&!e.isReactive(r)?t[n]=ot(a,r):t[n]=r}return t}const yn=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function wn(t){return!we(t)||!t.hasOwnProperty(yn)}const{assign:ce}=Object;function It(t){return!!(e.isRef(t)&&t.effect)}function Tt(t,o,n,r){const{state:a,actions:l,getters:i}=o,s=n.state.value[t];let c;function u(){!s&&(process.env.NODE_ENV==="production"||!r)&&(n.state.value[t]=a?a():{});const b=process.env.NODE_ENV!=="production"&&r?e.toRefs(e.ref(a?a():{}).value):e.toRefs(n.state.value[t]);return ce(b,l,Object.keys(i||{}).reduce((w,x)=>(process.env.NODE_ENV!=="production"&&x in b&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${x}" in store "${t}".`),w[x]=e.markRaw(e.computed(()=>{Te(n);const E=n._s.get(t);return i[x].call(E,E)})),w),{}))}return c=nt(t,u,o,n,r,!0),c}function nt(t,o,n={},r,a,l){let i;const s=ce({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!ut&&(c.onTrigger=f=>{u?E=f:u==!1&&!p._hotUpdating&&(Array.isArray(E)?E.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,b,w=[],x=[],E;const j=r.state.value[t];!l&&!j&&(process.env.NODE_ENV==="production"||!a)&&(r.state.value[t]={});const I=e.ref({});let H;function U(f){let d;u=b=!1,process.env.NODE_ENV!=="production"&&(E=[]),typeof f=="function"?(f(r.state.value[t]),d={type:me.patchFunction,storeId:t,events:E}):(ot(r.state.value[t],f),d={type:me.patchObject,payload:f,storeId:t,events:E});const y=H=Symbol();e.nextTick().then(()=>{H===y&&(u=!0)}),b=!0,Be(w,d,r.state.value[t])}const Y=l?function(){const{state:d}=n,y=d?d():{};this.$patch(C=>{ce(C,y)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:$t;function V(){i.stop(),w=[],x=[],r._s.delete(t)}const G=(f,d="")=>{if(Pt in f)return f[tt]=d,f;const y=function(){Te(r);const C=Array.from(arguments),$=[],T=[];function O(R){$.push(R)}function g(R){T.push(R)}Be(x,{args:C,name:y[tt],store:p,after:O,onError:g});let D;try{D=f.apply(this&&this.$id===t?this:p,C)}catch(R){throw Be(T,R),R}return D instanceof Promise?D.then(R=>(Be($,R),R)).catch(R=>(Be(T,R),Promise.reject(R))):(Be($,D),D)};return y[Pt]=!0,y[tt]=d,y},h=e.markRaw({actions:{},getters:{},state:[],hotState:I}),N={_p:r,$id:t,$onAction:Ot.bind(null,x),$patch:U,$reset:Y,$subscribe(f,d={}){const y=Ot(w,f,d.detached,()=>C()),C=i.run(()=>e.watch(()=>r.state.value[t],$=>{(d.flush==="sync"?b:u)&&f({storeId:t,type:me.direct,events:E},$)},ce({},c,d)));return y},$dispose:V},p=e.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce?ce({_hmrPayload:h,_customProperties:e.markRaw(new Set)},N):N);r._s.set(t,p);const P=(r._a&&r._a.runWithContext||bn)(()=>r._e.run(()=>(i=e.effectScope()).run(()=>o({action:G}))));for(const f in P){const d=P[f];if(e.isRef(d)&&!It(d)||e.isReactive(d))process.env.NODE_ENV!=="production"&&a?Fe(I.value,f,e.toRef(P,f)):l||(j&&wn(d)&&(e.isRef(d)?d.value=j[f]:ot(d,j[f])),r.state.value[t][f]=d),process.env.NODE_ENV!=="production"&&h.state.push(f);else if(typeof d=="function"){const y=process.env.NODE_ENV!=="production"&&a?d:G(d,f);P[f]=y,process.env.NODE_ENV!=="production"&&(h.actions[f]=d),s.actions[f]=d}else process.env.NODE_ENV!=="production"&&It(d)&&(h.getters[f]=l?n.getters[f]:d,Ce&&(P._getters||(P._getters=e.markRaw([]))).push(f))}if(ce(p,P),ce(e.toRaw(p),P),Object.defineProperty(p,"$state",{get:()=>process.env.NODE_ENV!=="production"&&a?I.value:r.state.value[t],set:f=>{if(process.env.NODE_ENV!=="production"&&a)throw new Error("cannot set hotState");U(d=>{ce(d,f)})}}),process.env.NODE_ENV!=="production"&&(p._hotUpdate=e.markRaw(f=>{p._hotUpdating=!0,f._hmrPayload.state.forEach(d=>{if(d in p.$state){const y=f.$state[d],C=p.$state[d];typeof y=="object"&&we(y)&&we(C)?Bt(y,C):f.$state[d]=C}Fe(p,d,e.toRef(f.$state,d))}),Object.keys(p.$state).forEach(d=>{d in f.$state||Xe(p,d)}),u=!1,b=!1,r.state.value[t]=e.toRef(f._hmrPayload,"hotState"),b=!0,e.nextTick().then(()=>{u=!0});for(const d in f._hmrPayload.actions){const y=f[d];Fe(p,d,G(y,d))}for(const d in f._hmrPayload.getters){const y=f._hmrPayload.getters[d],C=l?e.computed(()=>(Te(r),y.call(p,p))):y;Fe(p,d,C)}Object.keys(p._hmrPayload.getters).forEach(d=>{d in f._hmrPayload.getters||Xe(p,d)}),Object.keys(p._hmrPayload.actions).forEach(d=>{d in f._hmrPayload.actions||Xe(p,d)}),p._hmrPayload=f._hmrPayload,p._getters=f._getters,p._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(d=>{Object.defineProperty(p,d,ce({value:p[d]},f))})}return r._p.forEach(f=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce){const d=i.run(()=>f({store:p,app:r._a,pinia:r,options:s}));Object.keys(d||{}).forEach(y=>p._customProperties.add(y)),ce(p,d)}else ce(p,i.run(()=>f({store:p,app:r._a,pinia:r,options:s})))}),process.env.NODE_ENV!=="production"&&p.$state&&typeof p.$state=="object"&&typeof p.$state.constructor=="function"&&!p.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
7
+ Only state can be modified.`);i[0]="$state",Se=!1,r.set(l,i,r.state.value),Se=!0}})})}function hn(t,o){je.includes(ze(o.$id))||je.push(ze(o.$id)),gt({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:je,app:t,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;o.$onAction(({after:i,onError:s,name:c,args:u})=>{const b=Et++;n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🛫 "+c,subtitle:"start",data:{store:pe(o.$id),action:pe(c),args:u},groupId:b}}),i(w=>{be=void 0,n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🛬 "+c,subtitle:"end",data:{store:pe(o.$id),action:pe(c),args:u,result:w},groupId:b}})}),s(w=>{be=void 0,n.addTimelineEvent({layerId:ke,event:{time:r(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:pe(o.$id),action:pe(c),args:u,error:w},groupId:b}})})},!0),o._customProperties.forEach(i=>{e.watch(()=>e.unref(o[i]),(s,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(oe),Se&&n.addTimelineEvent({layerId:ke,event:{time:r(),title:"Change",subtitle:i,data:{newValue:s,oldValue:c},groupId:be}})},{deep:!0})}),o.$subscribe(({events:i,type:s},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(oe),!Se)return;const u={time:r(),title:fn(s),data:mn({store:pe(o.$id)},pn(i)),groupId:be};s===me.patchFunction?u.subtitle="⤵️":s===me.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ke,event:u})},{detached:!0,flush:"sync"});const a=o._hotUpdate;o._hotUpdate=e.markRaw(i=>{a(i),n.addTimelineEvent({layerId:ke,event:{time:r(),title:"🔥 "+o.$id,subtitle:"HMR update",data:{store:pe(o.$id),info:pe("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe)});const{$dispose:l}=o;o.$dispose=()=>{l(),n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe),n.getSettings().logStoreChanges&&te(`Disposed "${o.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(oe),n.sendInspectorState(oe),n.getSettings().logStoreChanges&&te(`"${o.$id}" store installed 🆕`)})}let Et=0,be;function St(t,o,n){const r=o.reduce((a,l)=>(a[l]=e.toRaw(t)[l],a),{});for(const a in r)t[a]=function(){const l=Et,i=n?new Proxy(t,{get(...c){return be=l,Reflect.get(...c)},set(...c){return be=l,Reflect.set(...c)}}):t;be=l;const s=r[a].apply(i,arguments);return be=void 0,s}}function gn({app:t,store:o,options:n}){if(!o.$id.startsWith("__hot:")){if(o._isOptionsAPI=!!n.state,!o._p._testing){St(o,Object.keys(n.actions),o._isOptionsAPI);const r=o._hotUpdate;e.toRaw(o)._hotUpdate=function(a){r.apply(this,arguments),St(o,Object.keys(a._hmrPayload.actions),!!o._isOptionsAPI)}}hn(t,o)}}function _n(){const t=e.effectScope(!0),o=t.run(()=>e.ref({}));let n=[],r=[];const a=e.markRaw({install(l){Te(a),a._a=l,l.provide(_t,a),l.config.globalProperties.$pinia=a,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce&&un(l,a),r.forEach(i=>n.push(i)),r=[]},use(l){return!this._a&&!ut?r.push(l):n.push(l),this},_p:n,_a:null,_e:t,_s:new Map,state:o});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy!="undefined"&&a.use(gn),a}function Bt(t,o){for(const n in o){const r=o[n];if(!(n in t))continue;const a=t[n];we(a)&&we(r)&&!e.isRef(r)&&!e.isReactive(r)?t[n]=Bt(a,r):t[n]=r}return t}const $t=()=>{};function Ot(t,o,n,r=$t){t.push(o);const a=()=>{const l=t.indexOf(o);l>-1&&(t.splice(l,1),r())};return!n&&e.getCurrentScope()&&e.onScopeDispose(a),a}function Be(t,...o){t.slice().forEach(n=>{n(...o)})}const bn=t=>t(),Pt=Symbol(),tt=Symbol();function ot(t,o){t instanceof Map&&o instanceof Map?o.forEach((n,r)=>t.set(r,n)):t instanceof Set&&o instanceof Set&&o.forEach(t.add,t);for(const n in o){if(!o.hasOwnProperty(n))continue;const r=o[n],a=t[n];we(a)&&we(r)&&t.hasOwnProperty(n)&&!e.isRef(r)&&!e.isReactive(r)?t[n]=ot(a,r):t[n]=r}return t}const yn=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function wn(t){return!we(t)||!t.hasOwnProperty(yn)}const{assign:ce}=Object;function It(t){return!!(e.isRef(t)&&t.effect)}function Tt(t,o,n,r){const{state:a,actions:l,getters:i}=o,s=n.state.value[t];let c;function u(){!s&&(process.env.NODE_ENV==="production"||!r)&&(n.state.value[t]=a?a():{});const b=process.env.NODE_ENV!=="production"&&r?e.toRefs(e.ref(a?a():{}).value):e.toRefs(n.state.value[t]);return ce(b,l,Object.keys(i||{}).reduce((w,x)=>(process.env.NODE_ENV!=="production"&&x in b&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${x}" in store "${t}".`),w[x]=e.markRaw(e.computed(()=>{Te(n);const E=n._s.get(t);return i[x].call(E,E)})),w),{}))}return c=nt(t,u,o,n,r,!0),c}function nt(t,o,n={},r,a,l){let i;const s=ce({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!ut&&(c.onTrigger=f=>{u?E=f:u==!1&&!p._hotUpdating&&(Array.isArray(E)?E.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,b,w=[],x=[],E;const j=r.state.value[t];!l&&!j&&(process.env.NODE_ENV==="production"||!a)&&(r.state.value[t]={});const I=e.ref({});let H;function U(f){let d;u=b=!1,process.env.NODE_ENV!=="production"&&(E=[]),typeof f=="function"?(f(r.state.value[t]),d={type:me.patchFunction,storeId:t,events:E}):(ot(r.state.value[t],f),d={type:me.patchObject,payload:f,storeId:t,events:E});const y=H=Symbol();e.nextTick().then(()=>{H===y&&(u=!0)}),b=!0,Be(w,d,r.state.value[t])}const Y=l?function(){const{state:d}=n,y=d?d():{};this.$patch(C=>{ce(C,y)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:$t;function V(){i.stop(),w=[],x=[],r._s.delete(t)}const G=(f,d="")=>{if(Pt in f)return f[tt]=d,f;const y=function(){Te(r);const C=Array.from(arguments),$=[],T=[];function O(A){$.push(A)}function g(A){T.push(A)}Be(x,{args:C,name:y[tt],store:p,after:O,onError:g});let D;try{D=f.apply(this&&this.$id===t?this:p,C)}catch(A){throw Be(T,A),A}return D instanceof Promise?D.then(A=>(Be($,A),A)).catch(A=>(Be(T,A),Promise.reject(A))):(Be($,D),D)};return y[Pt]=!0,y[tt]=d,y},h=e.markRaw({actions:{},getters:{},state:[],hotState:I}),N={_p:r,$id:t,$onAction:Ot.bind(null,x),$patch:U,$reset:Y,$subscribe(f,d={}){const y=Ot(w,f,d.detached,()=>C()),C=i.run(()=>e.watch(()=>r.state.value[t],$=>{(d.flush==="sync"?b:u)&&f({storeId:t,type:me.direct,events:E},$)},ce({},c,d)));return y},$dispose:V},p=e.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce?ce({_hmrPayload:h,_customProperties:e.markRaw(new Set)},N):N);r._s.set(t,p);const P=(r._a&&r._a.runWithContext||bn)(()=>r._e.run(()=>(i=e.effectScope()).run(()=>o({action:G}))));for(const f in P){const d=P[f];if(e.isRef(d)&&!It(d)||e.isReactive(d))process.env.NODE_ENV!=="production"&&a?Fe(I.value,f,e.toRef(P,f)):l||(j&&wn(d)&&(e.isRef(d)?d.value=j[f]:ot(d,j[f])),r.state.value[t][f]=d),process.env.NODE_ENV!=="production"&&h.state.push(f);else if(typeof d=="function"){const y=process.env.NODE_ENV!=="production"&&a?d:G(d,f);P[f]=y,process.env.NODE_ENV!=="production"&&(h.actions[f]=d),s.actions[f]=d}else process.env.NODE_ENV!=="production"&&It(d)&&(h.getters[f]=l?n.getters[f]:d,Ce&&(P._getters||(P._getters=e.markRaw([]))).push(f))}if(ce(p,P),ce(e.toRaw(p),P),Object.defineProperty(p,"$state",{get:()=>process.env.NODE_ENV!=="production"&&a?I.value:r.state.value[t],set:f=>{if(process.env.NODE_ENV!=="production"&&a)throw new Error("cannot set hotState");U(d=>{ce(d,f)})}}),process.env.NODE_ENV!=="production"&&(p._hotUpdate=e.markRaw(f=>{p._hotUpdating=!0,f._hmrPayload.state.forEach(d=>{if(d in p.$state){const y=f.$state[d],C=p.$state[d];typeof y=="object"&&we(y)&&we(C)?Bt(y,C):f.$state[d]=C}Fe(p,d,e.toRef(f.$state,d))}),Object.keys(p.$state).forEach(d=>{d in f.$state||Xe(p,d)}),u=!1,b=!1,r.state.value[t]=e.toRef(f._hmrPayload,"hotState"),b=!0,e.nextTick().then(()=>{u=!0});for(const d in f._hmrPayload.actions){const y=f[d];Fe(p,d,G(y,d))}for(const d in f._hmrPayload.getters){const y=f._hmrPayload.getters[d],C=l?e.computed(()=>(Te(r),y.call(p,p))):y;Fe(p,d,C)}Object.keys(p._hmrPayload.getters).forEach(d=>{d in f._hmrPayload.getters||Xe(p,d)}),Object.keys(p._hmrPayload.actions).forEach(d=>{d in f._hmrPayload.actions||Xe(p,d)}),p._hmrPayload=f._hmrPayload,p._getters=f._getters,p._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(d=>{Object.defineProperty(p,d,ce({value:p[d]},f))})}return r._p.forEach(f=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Ce){const d=i.run(()=>f({store:p,app:r._a,pinia:r,options:s}));Object.keys(d||{}).forEach(y=>p._customProperties.add(y)),ce(p,d)}else ce(p,i.run(()=>f({store:p,app:r._a,pinia:r,options:s})))}),process.env.NODE_ENV!=="production"&&p.$state&&typeof p.$state=="object"&&typeof p.$state.constructor=="function"&&!p.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
8
8
  state: () => new MyClass()
9
9
  Found in store "${p.$id}".`),j&&l&&n.hydrate&&n.hydrate(p.$state,j),u=!0,b=!0,p}/*! #__NO_SIDE_EFFECTS__ */function Cn(t,o,n){let r,a;const l=typeof o=="function";r=t,a=l?n:o;function i(s,c){const u=e.hasInjectionContext();if(s=(process.env.NODE_ENV==="test"&&Ie&&Ie._testing?null:s)||(u?e.inject(_t,null):null),s&&Te(s),process.env.NODE_ENV!=="production"&&!Ie)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.`);s=Ie,s._s.has(r)||(l?nt(r,o,a,s):Tt(r,a,s),process.env.NODE_ENV!=="production"&&(i._pinia=s));const b=s._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const w="__hot:"+r,x=l?nt(w,o,a,s,!0):Tt(w,ce({},a),s,!0);c._hotUpdate(x),delete s.state.value[w],s._s.delete(w)}if(process.env.NODE_ENV!=="production"&&Ce){const w=e.getCurrentInstance();if(w&&w.proxy&&!c){const x=w.proxy,E="_pStores"in x?x._pStores:x._pStores={};E[r]=b}}return b}return i.$id=r,i}const kn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Vn=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Nn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function xn(t,o){if(t==="__proto__"||t==="constructor"&&o&&typeof o=="object"&&"prototype"in o){En(t);return}return o}function En(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function Sn(t,o={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!Nn.test(t)){if(o.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(kn.test(t)||Vn.test(t)){if(o.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,xn)}return JSON.parse(t)}catch(r){if(o.strict)throw r;return t}}function Bn(t,o){if(t==null)return;let n=t;for(let r=0;r<o.length;r++){if(n==null||n[o[r]]==null)return;n=n[o[r]]}return n}function rt(t,o,n){if(n.length===0)return o;const r=n[0];return n.length>1&&(o=rt(typeof t!="object"||t===null||!Object.prototype.hasOwnProperty.call(t,r)?Number.isInteger(Number(n[1]))?[]:{}:t[r],o,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(t)?t.slice()[r]:Object.assign({},t,{[r]:o})}function Dt(t,o){if(t==null||o.length===0)return t;if(o.length===1){if(t==null)return t;if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.slice.call(t,0).splice(o[0],1);const n={};for(const r in t)n[r]=t[r];return delete n[o[0]],n}if(t[o[0]]==null){if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.concat.call([],t);const n={};for(const r in t)n[r]=t[r];return n}return rt(t,Dt(t[o[0]],Array.prototype.slice.call(o,1)),[o[0]])}function Mt(t,o){return o.map(n=>n.split(".")).map(n=>[n,Bn(t,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>rt(n,r[1],r[0]),{})}function Ut(t,o){return o.map(n=>n.split(".")).reduce((n,r)=>Dt(n,r),t)}function At(t,{storage:o,serializer:n,key:r,debug:a,pick:l,omit:i,beforeHydrate:s,afterHydrate:c},u,b=!0){try{b&&(s==null||s(u));const w=o.getItem(r);if(w){const x=n.deserialize(w),E=l?Mt(x,l):x,j=i?Ut(E,i):E;t.$patch(j)}b&&(c==null||c(u))}catch(w){a&&console.error("[pinia-plugin-persistedstate]",w)}}function Ft(t,{storage:o,serializer:n,key:r,debug:a,pick:l,omit:i}){try{const s=l?Mt(t,l):t,c=i?Ut(s,i):s,u=n.serialize(c);o.setItem(r,u)}catch(s){a&&console.error("[pinia-plugin-persistedstate]",s)}}function $n(t,o,n){const{pinia:r,store:a,options:{persist:l=n}}=t;if(!l)return;if(!(a.$id in r.state.value)){const c=r._s.get(a.$id.replace("__hot:",""));c&&Promise.resolve().then(()=>c.$persist());return}const s=(Array.isArray(l)?l:l===!0?[{}]:[l]).map(o);a.$hydrate=({runHooks:c=!0}={})=>{s.forEach(u=>{At(a,u,t,c)})},a.$persist=()=>{s.forEach(c=>{Ft(a.$state,c)})},s.forEach(c=>{At(a,c,t),a.$subscribe((u,b)=>Ft(b,c),{detached:!0})})}function On(t={}){return function(o){var n;$n(o,r=>{var a,l,i,s,c,u,b;return{key:(t.key?t.key:w=>w)((a=r.key)!=null?a:o.store.$id),debug:(i=(l=r.debug)!=null?l:t.debug)!=null?i:!1,serializer:(c=(s=r.serializer)!=null?s:t.serializer)!=null?c:{serialize:w=>JSON.stringify(w),deserialize:w=>Sn(w)},storage:(b=(u=r.storage)!=null?u:t.storage)!=null?b:window.localStorage,beforeHydrate:r.beforeHydrate,afterHydrate:r.afterHydrate,pick:r.pick,omit:r.omit}},(n=t.auto)!=null?n:!1)}}var Pn=On();const qe=_n();qe.use(Pn);const at=Cn("console",{state:()=>({menu:{collapsed:!0},account:{id:"",userId:""}}),persist:!0}),In={key:0,class:"menu-wrapper"},lt=Q(e.defineComponent({__name:"SideMenu",props:{menuCollapsed:{type:Boolean}},emits:["update:menuCollapsed"],setup(t,{emit:o}){at(qe);const n=q.useRoute(),r=e.computed(()=>{var l;const a=n.meta.activeMenu;if(a==="{model}"){let i=n.params.app?`${n.params.app}/${n.params.model}`:n.params.model;return"/"+((l=mt[n.params.model])!=null?l:i)}else return a});return(a,l)=>{const i=e.resolveComponent("el-menu");return e.unref(Qe).length>0?(e.openBlock(),e.createElementBlock("div",In,[e.createVNode(i,{class:"menu","default-active":r.value,router:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Qe),s=>(e.openBlock(),e.createBlock(Ho,{key:s.path,menu:s},null,8,["menu"]))),128))]),_:1},8,["default-active"])])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-c70ca2ba"]]),Tn={class:"container"},Rt=e.defineComponent({__name:"ConsoleApp",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const o=at(qe),n=q.useRoute(),r=e.ref(o.menu.collapsed),a=e.ref(),l=t;return(i,s)=>{const c=e.resolveComponent("router-view"),u=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Ke,{key:0,title:l.title,helpDocUrl:l.helpDocUrl,headerProjectConfig:l.headerProjectConfig},null,8,["title","helpDocUrl","headerProjectConfig"])):e.createCommentVNode("",!0),e.createElementVNode("div",Tn,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(lt,{key:0,menuCollapsed:r.value,"onUpdate:menuCollapsed":s[0]||(s[0]=b=>r.value=b)},null,8,["menuCollapsed"])):e.createCommentVNode("",!0),e.createVNode(u,{class:"main-scrollbar"},{default:e.withCtx(()=>[e.createElementVNode("main",{ref_key:"mainWrapperRef",ref:a,class:"main-wrapper"},[e.createVNode(c)],512)]),_:1})])],64)}}}),Dn={xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800"};function Mn(t,o){return e.openBlock(),e.createElementBlock("svg",Dn,o[0]||(o[0]=[e.createStaticVNode('<defs><linearGradient id="a" x1="399.126" x2="399.126" y1="159.978" y2="715.47" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4f2fb"></stop><stop offset="1" stop-color="#e1eef5"></stop></linearGradient><linearGradient id="b" x1="481.607" x2="481.607" y1="594.251" y2="423.306" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".362" stop-color="#b4c9db"></stop><stop offset=".898" stop-color="#ecf0f9"></stop></linearGradient><linearGradient id="c" x1="114.87" x2="114.87" y1="540.843" y2="403.668" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="d" x1="114.872" x2="114.872" y1="418.9" y2="570.033" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="e" x1="615.999" x2="615.999" y1="449.321" y2="360.996" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="f" x1="616" x2="616" y1="370.804" y2="468.116" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="g" x1="672.709" x2="672.709" y1="544.867" y2="510.536" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="h" x1="672.77" x2="672.77" y1="514.871" y2="570.135" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="i" x1="461.917" x2="427.163" y1="86.714" y2="146.91" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffdb80"></stop><stop offset="1" stop-color="#ffbb24"></stop></linearGradient><linearGradient id="j" x1="419.58" x2="419.58" y1="117.18" y2="174.634" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f9fafe"></stop><stop offset="1" stop-color="#e5edf7"></stop></linearGradient><linearGradient id="k" x1="-1967.352" x2="-2213.626" y1="525.737" y2="279.463" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#d5e1f2"></stop></linearGradient><linearGradient id="l" x1="-1980.099" x2="-2214.789" y1="526.438" y2="291.748" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#b6cadc"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="m" x1="441.358" x2="329.96" y1="472.657" y2="361.259" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#bccde1"></stop></linearGradient><linearGradient id="n" x1="569.328" x2="454.912" y1="597.606" y2="483.19" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#afc5d8"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="o" x1="562.331" x2="453.712" y1="598.807" y2="490.188" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#c7d4e5"></stop><stop offset=".687" stop-color="#e8eff8"></stop></linearGradient><linearGradient id="p" x1="219.375" x2="219.375" y1="553.783" y2="478.333" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffb32c"></stop></linearGradient><linearGradient id="q" x1="220.421" x2="220.421" y1="465.465" y2="489.367" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4ae98"></stop><stop offset="1" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="r" x1="-840.016" x2="-828.333" y1="946.367" y2="864.11" gradientTransform="rotate(-8.082 -3028.264 -6569.32)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="s" x1="-7035.52" x2="-7023.838" y1="66.46" y2="-15.798" gradientTransform="scale(-1 1)rotate(-8.082 -118.132 -47761.005)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="t" x1="219.375" x2="219.375" y1="526.535" y2="574.482" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#275c89"></stop><stop offset="1" stop-color="#013f7c"></stop></linearGradient><linearGradient id="u" x1="6174.812" x2="6157.838" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="v" x1="196.36" x2="283.925" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#18264b"></stop><stop offset=".652" stop-color="#2d3c65"></stop></linearGradient><linearGradient id="w" x1="176.617" x2="176.617" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="x" x1="238.667" x2="255.641" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="y" x1="158.041" x2="245.606" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#445677"></stop><stop offset="1" stop-color="#293861"></stop></linearGradient><linearGradient id="z" x1="265.35" x2="265.35" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="A" x1="236.065" x2="204.828" y1="459.983" y2="459.983" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="B" x1="200.53" x2="236.795" y1="447.908" y2="447.908" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4f5c7c"></stop><stop offset="1" stop-color="#274168"></stop></linearGradient></defs><path fill="url(#a)" d="M482.38 201.33c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S6.01 528.01 61.8 609.36s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84"></path><path fill="url(#b)" d="M393.48 423.31h216.44l-22.53 49.03s59.19 57.86-14.13 121.91c-134.28-44.17-221.74-37.1-219.98-38.87 1.77-1.77 40.2-132.07 40.2-132.07"></path><path fill="url(#c)" d="M115.65 403.91s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.38-33.22-28.18-104.13-28.18-104.13"></path><path fill="url(#d)" d="M114.87 570.03c-.55 0-1-.45-1-1V419.9c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .56-.45 1-1 1"></path><path fill="url(#e)" d="M616.5 361.15s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06"></path><path fill="url(#f)" d="M616 468.12c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64.36 0 .64.29.64.64v96.02c0 .35-.28.64-.64.64"></path><path fill="url(#g)" d="M689.88 527.7c0 9.48-7.69 17.17-17.17 17.17s-17.17-7.69-17.17-17.17 7.69-17.17 17.17-17.17 17.17 7.69 17.17 17.17"></path><path fill="url(#h)" d="M672.77 570.13c-.29 0-.53-.24-.53-.53v-54.2c0-.29.24-.53.53-.53s.53.24.53.53v54.21c0 .29-.24.52-.53.52"></path><path fill="url(#i)" d="M479.29 116.81c0 19.19-15.56 34.75-34.75 34.75s-34.75-15.56-34.75-34.75 15.56-34.75 34.75-34.75 34.75 15.56 34.75 34.75"></path><path fill="url(#j)" d="M464.32 135.76h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44s-8.7-19.44-19.43-19.44"></path><path fill="url(#k)" d="M235.65 388.64c0-24.52-.03-49.03.01-73.54.02-14.37 4.24-18.36 17.97-20.53 41.87-6.61 82.03-18.72 117.91-42.29 10.38-6.82 18.3-7.59 29.06-.47 34.85 23.06 73.26 37.11 114.55 42.8 13.12 1.81 16.84 5.88 16.85 19.25.04 45.72-.4 91.44.18 137.15.34 26.77-8.17 49.99-24.02 70.73-31.46 41.17-74.88 63.76-122.21 80.03-2.5.86-5.83.67-8.36-.23-38.47-13.74-74.58-31.84-104.15-61.09-22.97-22.73-37.84-49.56-37.79-83.22.03-22.87 0-45.73 0-68.59"></path><path fill="url(#l)" d="M234.76 396.09c0-23.21-.03-46.42.01-69.63.02-13.61 4.06-17.38 17.23-19.43 40.15-6.26 78.67-17.72 113.07-40.04 9.95-6.46 17.55-7.18 27.86-.44 33.42 21.83 70.25 35.14 109.84 40.52 12.58 1.71 16.14 5.56 16.15 18.22.03 43.28-.38 86.57.18 129.84.33 25.34-7.83 47.33-23.03 66.96-30.17 38.98-71.81 60.36-117.19 75.77-2.4.81-5.59.64-8.01-.22-36.89-13.01-71.52-30.14-99.87-57.84-22.03-21.52-36.28-46.91-36.23-78.78.02-21.65 0-43.29-.01-64.93"></path><path fill="url(#m)" d="M398.42 430.39c23.18-5.61 40.41-26.11 40.41-50.49 0-28.68-23.85-52.01-53.17-52.01s-53.17 23.33-53.17 52.01c0 24.38 17.24 44.88 40.41 50.49v85.2h25.52v-36.38h32.67v-24.96h-32.67zM358 379.91c0-14.91 12.41-27.05 27.65-27.05S413.3 365 413.3 379.91s-12.41 27.05-27.65 27.05S358 394.82 358 379.91"></path><path fill="#fff" d="M394.5 433.67c21.8-5.39 38.01-25.1 38.01-48.54 0-27.58-22.43-50.01-50.01-50.01s-50.01 22.43-50.01 50.01c0 23.44 16.21 43.15 38.01 48.54v81.92h24v-34.98h30.73v-24H394.5zm-38.01-48.54c0-14.34 11.67-26.01 26.01-26.01s26.01 11.67 26.01 26.01-11.67 26.01-26.01 26.01-26.01-11.67-26.01-26.01"></path><path fill="url(#n)" d="M593.02 540.4c0 44.68-36.22 80.9-80.9 80.9s-80.9-36.22-80.9-80.9 36.22-80.9 80.9-80.9 80.9 36.22 80.9 80.9"></path><path fill="url(#o)" d="M584.83 544.5c0 42.42-34.39 76.81-76.81 76.81s-76.81-34.39-76.81-76.81 34.39-76.81 76.81-76.81 76.81 34.39 76.81 76.81"></path><path fill="#fff" d="m525.32 542.26 23.01-23.01c4.44-4.44 4.44-11.63 0-16.06-4.44-4.44-11.63-4.44-16.06 0l-23.01 23.01-23.01-23.01c-4.44-4.44-11.63-4.44-16.06 0-4.44 4.44-4.44 11.63 0 16.06l23.01 23.01-23.01 23.01c-4.44 4.44-4.44 11.63 0 16.06 2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33l23.01-23.01 23.01 23.01c2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33c4.44-4.44 4.44-11.63 0-16.06z"></path><path fill="url(#p)" d="M211.59 478.69s-18.31-2.53-24.25 5.88c-5.95 8.41-8.12 29.95-8.12 29.95l13.78-.73-1.16 25.09 25.42 14.9 36.22-19.48-5.51-22.73 11.57-3.02s-3.45-32.99-19.55-28.12c-8.27.89-10.88.74-10.88.74s-2.18 6.94-9.65 6.35-7.87-8.83-7.87-8.83"></path><path fill="url(#q)" d="m213.42 468.32-3.8 16.97c-.18.8.24 1.61.99 1.92 1.97.8 5.9 2.16 9.95 2.16 4.2 0 8.16-2.3 9.98-3.53.63-.42.89-1.21.65-1.93l-5.82-17.31a1.68 1.68 0 0 0-1.88-1.12l-8.72 1.55c-.67.12-1.2.63-1.35 1.29"></path><path fill="url(#r)" d="M190.69 481.63c5.33-1.77 12.55-.59 12.85 11.37.29 11.95-11.42 31-7.22 37.63 4.25 6.71 13.34 16.25 19.12 21.68-1.34 6.38-4.98 11.75-4.98 11.75s-21.31-9.83-30.59-19.68-4.6-32.43-.3-48.5c3.24-12.12 11.12-14.25 11.12-14.25"></path><path fill="url(#s)" d="M246.53 481.63c-5.33-1.77-12.55-.59-12.85 11.37-.29 11.95 11.42 31 7.22 37.63-4.25 6.71-13.34 16.25-19.12 21.68 1.34 6.38 4.98 11.75 4.98 11.75s21.31-9.83 30.59-19.68 4.6-32.43.3-48.5c-3.24-12.12-11.12-14.25-11.12-14.25"></path><path fill="url(#t)" d="M193.27 574.48h51.74c2.34 0 4.44-1.78 5.25-4.45l10.43-34.31c1.35-4.45-1.35-9.19-5.25-9.19h-72.12c-3.86 0-6.57 4.65-5.28 9.09l9.96 34.31c.79 2.73 2.9 4.55 5.27 4.55"></path><path fill="#fff" d="M191.21 590.26s-.8-1.76-1.41-1.95c-.62-.19-9.46-.54-12.69-1.38s-12.54-2.16-16.52 1.61c-3.47 3.29-4.62 10.97.67 15.39 1.98 1.72 3.93 2.23 11.28 1.89s18-.27 20.34-3.67c-.09-5.63-1.67-11.89-1.67-11.89"></path><path fill="url(#u)" d="M199.42 588.31s-8.54 1.92-11.6 1.64c-3.05-.28-.5 12.02-.5 12.02s8.16.56 15.37-1.52c2.44-9.43-3.27-12.14-3.27-12.14"></path><path fill="url(#v)" d="m196.36 587.86 4.44 13.81s95.43-12.57 81.79-43.54c-11.4-25.89-86.23 29.73-86.23 29.73"></path><path fill="url(#w)" d="M190.1 588.93s3.5 1.37 3.94 6.24-1 8.15-8.43 9.05-9.32.56-13.98.68c-4.66.11-11.43.56-12.43-8.3s8.06-11.12 17.46-8.86c2.95.57 13.44 1.19 13.44 1.19"></path><path fill="#fff" d="M250.76 590.26s.8-1.76 1.41-1.95c.62-.19 9.46-.54 12.69-1.38s11.9-2.23 16.28 1.51c4.06 3.47 4.33 11.14-.3 15.37-1.98 1.72-4.07 2.35-11.42 2.01s-18-.27-20.34-3.67c.09-5.63 1.68-11.89 1.68-11.89"></path><path fill="url(#x)" d="M242.55 588.31s8.54 1.92 11.6 1.64.5 12.02.5 12.02-8.16.56-15.37-1.52c-2.45-9.43 3.27-12.14 3.27-12.14"></path><path fill="url(#y)" d="m245.61 587.86-4.44 13.81s-95.43-12.57-81.79-43.54c11.4-25.89 86.23 29.73 86.23 29.73"></path><path fill="url(#z)" d="M251.87 588.93s-3.5 1.37-3.94 6.24 1 8.15 8.43 9.05 9.32.56 13.98.68c4.66.11 11.43.56 12.43-8.3s-8.06-11.12-17.46-8.86c-2.96.57-13.44 1.19-13.44 1.19"></path><path fill="url(#A)" d="M235.39 461.53c.57-.81.93-2.88.46-3.48-.84-.68-1.63-.29-2.23.3.14-4.94-.31-9.05-.42-10.09-.31-3.03-3.39-8.58-13.46-8.58s-12.03 7.27-12.03 7.27-.66 5.14-.46 11.38c-.6-.57-1.39-.95-2.21-.28-.46.61-.1 2.68.46 3.48.57.81.93 2.73 1.03 3.79.1 1.01-.63 3.69 2.02 3.35 1.58 6.33 7.99 11.61 11.96 11.61 4.35 0 10.13-5.32 11.77-11.62 2.71.37 1.97-2.33 2.07-3.35.12-1.05.48-2.97 1.04-3.78"></path><path fill="url(#B)" d="M227 437.52s-1.97-6.19-9.5-4.71c-7.54 1.48-8.05 5.04-11 5.18-5.05.24-9.09 6.53-2.61 13.19 2.88 2.97.45 4.24 1.82 6.87s1.36 5.18 1.36 5.18 2.41-7.69.82-10.97c-.82-1.69 2.81-2.15 7.33-1.75s11.65-1.09 12.21-4.17c1.34 6.31 2.67 6.97 4.37 7.93s1.8 8.58 1.8 8.58.3-5.6 1.48-6.87c.98-2.07 2.88-10.2.73-12.17s-.35-8.29-8.81-6.29"></path>',33)]))}const Un={render:Mn},An={},Fn={class:"wrapper"},Rn={class:"content"};function Ln(t,o){const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fn,[o[4]||(o[4]=e.createElementVNode("img",{src:Un},null,-1)),e.createElementVNode("div",Rn,[o[3]||(o[3]=e.createElementVNode("h1",null,"You have no permission to access the page.",-1)),e.createVNode(n,{type:"primary"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("Apply")])),_:1}),e.createVNode(n,{onClick:o[0]||(o[0]=r=>t.$router.go(-1))},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("Go Back")])),_:1})])])}const Lt=Q(An,[["render",Ln],["__scopeId","data-v-0155b361"]]),Gn={};function jn(t,o){const n=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(n)}const Gt=Q(Gn,[["render",jn]]),zn={class:"card-wrapper"},qn=["onClick"],Hn={class:"card-inner-wrapper"},Wn={class:"card-title"},Yn={class:"icon"},st=Q(e.defineComponent({__name:"TabCard",props:{cards:{},tableRef:{}},setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=t,l=e.ref(a.cards[0].key);function i(s){s.disabled||(l.value=s.key,a.tableRef.updateConfigAndRefresh(s.model),r.push({path:n.path,query:Kt(Ye({},n.query),{tab:s.key})}))}return e.onMounted(()=>{let s;if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){l.value=c.key,s=c;break}}e.nextTick(()=>{a.tableRef&&a.cards&&a.cards.length>0&&a.tableRef.updateConfigAndRefresh((s!=null?s:a.cards[0]).model)})}),e.watch(()=>a.cards,s=>{if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){l.value=c.key;break}}else s&&s.length>0&&(l.value=s[0].key,a.tableRef.updateConfigAndRefresh(a.cards[0].model))},{deep:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",zn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.cards,u=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{"card-selected":l.value===u.key}]),onClick:b=>i(u)},[e.createElementVNode("div",Hn,[e.createElementVNode("div",Wn,[e.createElementVNode("div",Yn,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0,class:"svg-icon"})):e.createCommentVNode("",!0)]),e.createElementVNode("span",{style:e.normalizeStyle({color:u.disabled?"#aaa":"black"})},e.toDisplayString(e.unref(o)(u.label)),5)]),e.createElementVNode("span",null,e.toDisplayString(u.count),1)])],10,qn))),256))]))}}),[["__scopeId","data-v-047a86e6"]]),$e=t=>{const o=Object.keys(t);let n={};o.forEach(r=>{n[r]=void 0}),Object.assign(t,n)},Jn={key:1,class:"view-span"},jt=Q(e.defineComponent({__name:"FormView",props:{id:{},sessionId:{},mode:{},model:{},disableInline:{type:Boolean},closeDialogFunc:{type:Function},afterSubmitFunc:{type:Function}},emits:["update:id"],setup(t,{expose:o,emit:n}){const{t:r}=Pe.global,a=t,l=e.reactive({}),i=e.ref(!1),s=e.ref(),c=e.reactive({});e.ref(!0);const u=h=>a.mode==="view"&&(V(h,void 0)||V(h,"input")||V(h,"select")||V(h,"password")||V(h,"input-number")||V(h,"date")||V(h,"time")||V(h,"datetime")),b=e.computed(()=>a.model.fields?a.model.fields.filter(h=>{var k,P,f,d;let N=h.visible!==!1&&((k=h.formItem)==null?void 0:k.visible)!==!1;if(a.mode!=="view"&&((P=h.formItem)==null?void 0:P.editable)===!1||a.mode==="view"&&((f=h.formItem)==null?void 0:f.type)==="password")return!1;let p=(d=h.formItem)==null?void 0:d.showCondition;if(p&&p.field&&p.value!==void 0){if(p.operator===void 0||p.operator==="==")return l[p.field]===p.value;if(p.operator==="!=")return l[p.field]!==p.value;if(p.operator===">")return l[p.field]>p.value;if(p.operator==="<")return l[p.field]<p.value}return N}):[]);e.watch([()=>a.id,()=>a.sessionId],()=>{console.log(`FormView.watch: id = ${a.id}, sessionId = ${a.sessionId}`),x()},{immediate:!0});function w(){console.log("FormView.initFormFields: begin");const h=a.model.fields;let N={};h==null||h.forEach(p=>{var k,P,f,d,y,C,$,T,O,g,D,R,_;if(l[p.prop]=null,p.visible!==!1&&((k=p.formItem)==null?void 0:k.visible)!==!1){if(((P=p.formItem)==null?void 0:P.defaultValue)!==void 0?l[p.prop]=(f=p.formItem)==null?void 0:f.defaultValue:l[p.prop]=void 0,a.mode!=="view"){let L=(d=p.formItem)==null?void 0:d.validationRule;L!==void 0&&(N[p.prop]=L),$e(c),Object.assign(c,N)}const m=p.formItem,S=m==null?void 0:m.type,M=(y=m==null?void 0:m.select)==null?void 0:y.useDatableDict,A=(C=m==null?void 0:m.select)==null?void 0:C.dictId,W=($=m==null?void 0:m.select)==null?void 0:$.api,X=(T=m==null?void 0:m.select)==null?void 0:T.valueMappingField,ne=(O=m==null?void 0:m.select)==null?void 0:O.labelMappingField;if(S==="select"){if(M){let F=`${e.computed(()=>window.location.href.indexOf("localhost")>0?"http://localhost.vancone.com:8080":"https://datable.vancone.com/agent/public/0001").value}/api/datable/agent/metadata/dict?dictId=${A}`;const J=(g=m==null?void 0:m.select)==null?void 0:g.queryParamName,K=(D=m==null?void 0:m.select)==null?void 0:D.queryParamValueField;J&&(F=`${F}?${J}=${a.id}`),K||de(F,"GET",{}).then(({data:Z})=>{var ae;if((ae=p.formItem)!=null&&ae.select){let re=[];Array.isArray(Z.data)?re=Z.data:Z.data.list&&Array.isArray(Z.data.list)&&(re=Z.data.list),p.formItem.select.options=re.map(Ve=>({value:Ve.dbOrdinal,label:Ve.value}))}})}else if(W){let L=W;const F=(R=m==null?void 0:m.select)==null?void 0:R.queryParamName,J=(_=m==null?void 0:m.select)==null?void 0:_.queryParamValueField;F&&(L=`${L}?${F}=${a.id}`),J||de(L,"GET",{}).then(({data:K})=>{var Z;if((Z=p.formItem)!=null&&Z.select){let ae=[];Array.isArray(K.data)?ae=K.data:K.data.list&&Array.isArray(K.data.list)&&(ae=K.data.list),p.formItem.select.options=ae.map(re=>({value:X?re[X]:re.value,label:ne?re[ne]:re.label}))}})}}}})}function x(){console.log(`Refresh form view data: id = ${a.id}, model = `,a.model),j(),w(),(a.mode==="update"||a.mode==="view")&&a.id!==void 0&&a.id!==""&&a.model.api!==""&&(i.value=!0,de(`${a.model.api}/${a.id}`,"GET",{}).then(({data:h})=>{$e(l),Object.assign(l,h.data),a.model.fields.forEach(N=>{N.formItem&&N.formItem.type==="select"&&l[N.prop]!==void 0&&G(N)}),i.value=!1}))}function E(){return new Promise((h,N)=>{var k,P,f,d;((P=(k=a.model.formConfig)==null?void 0:k.functions)==null?void 0:P.beforeSubmit)!==void 0&&Object.assign(l,(d=(f=a.model.formConfig)==null?void 0:f.functions)==null?void 0:d.beforeSubmit(l));let p=a.mode==="create"?"POST":"PUT";a.model.api&&de(a.model.api,p,l).then(({data:y})=>{var C,$,T,O;y.code===0&&(a.closeDialogFunc&&a.closeDialogFunc(),(($=(C=a.model.formConfig)==null?void 0:C.functions)==null?void 0:$.afterSubmit)!==void 0&&((O=(T=a.model.formConfig)==null?void 0:T.functions)==null||O.afterSubmit(y.data)),a.afterSubmitFunc&&a.afterSubmitFunc(),h())})})}function j(){var h;console.log("FormView.reset: begin"),(h=s.value)==null||h.resetFields()}function I(h){const N="i18n(",p=")",k=h.label;return k?k.startsWith(N)&&k.endsWith(p)?r(k.slice(N.length,-p.length)):k:h.prop.slice(0,1).toUpperCase()+h.prop.slice(1).toLowerCase()}function H(h){var N,p,k,P,f,d;if(h){if(V(h,"select")){const y=(p=(N=h.tableColumn)==null?void 0:N.functions)==null?void 0:p.transformValue;if(y)return y(l[h.prop]);const C=(P=(k=h.formItem)==null?void 0:k.select)==null?void 0:P.viewModeLabelField;if(C)return l[C];const $=(d=(f=h.formItem)==null?void 0:f.select)==null?void 0:d.options;if($){for(let T of $)if(T.value===l[h.prop])return T.label}}return l[h.prop]}}function U(h){var N;return((N=h.formItem)==null?void 0:N.updatable)===!1&&a.mode==="update"}function Y(h,N){var k,P;const p=(P=(k=N.formItem)==null?void 0:k.type)!=null?P:"input";switch(h){case"input":return a.mode==="view"?!1:p==="input"||p==="password";case"select":return!0;default:return console.log("Error: unrecognized form component type: ",h),!0}}function V(h,N){var p;return((p=h.formItem)==null?void 0:p.type)===N}function G(h){var N;for(let p of a.model.fields){const k=(N=p.formItem)==null?void 0:N.select;if(!(!p.formItem||p.formItem.type!=="select"||!k||!k.queryParamValueField)&&k.queryParamValueField===h.prop){const P=k.api;if(P){let f=P;const d=k.queryParamName;d&&(f=`${f}?${d}=${l[k.queryParamValueField]}`),de(f,"GET",{}).then(({data:y})=>{if(k){let C=[];Array.isArray(y.data)?C=y.data:y.data.list&&Array.isArray(y.data.list)&&(C=y.data.list),k.options=C.map($=>({value:k.valueMappingField?$[k.valueMappingField]:$.value,label:k.labelMappingField?$[k.labelMappingField]:$.label}))}})}}}}return o({refresh:x,reset:j,submit:E,formData:l}),(h,N)=>{const p=e.resolveComponent("el-input"),k=e.resolveComponent("el-switch"),P=e.resolveComponent("el-date-picker"),f=e.resolveComponent("el-time-picker"),d=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),C=e.resolveComponent("el-input-number"),$=e.resolveComponent("el-form-item"),T=e.resolveComponent("el-form"),O=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(T,{ref_key:"formRef",ref:s,model:l,rules:c,"validate-on-rule-change":!1,"label-width":"auto","label-position":"left","require-asterisk-position":"right",inline:!a.disableInline},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,g=>(e.openBlock(),e.createBlock($,{class:"form-item",style:e.normalizeStyle({width:a.disableInline?"100%":"calc(50% - 32px)"}),prop:g.prop,label:I(g)},{default:e.withCtx(()=>{var D,R,_,m,S,M,A,W,X,ne,L,F,J,K,Z,ae,re,Ve,He,We;return[Y("input",g)?(e.openBlock(),e.createBlock(p,{key:0,type:V(g,"password")?"password":"text",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,placeholder:(D=g.formItem)==null?void 0:D.placeholder,disabled:U(g)},null,8,["type","modelValue","onUpdate:modelValue","placeholder","disabled"])):e.createCommentVNode("",!0),u(g)?(e.openBlock(),e.createElementBlock("span",Jn,e.toDisplayString(H(g)),1)):e.createCommentVNode("",!0),V(g,"switch")?(e.openBlock(),e.createBlock(k,{key:2,modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"date")&&h.mode!=="view"?(e.openBlock(),e.createBlock(P,{key:3,style:{width:"100%"},type:"date","value-format":"YYYY-MM-DD",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"time")&&h.mode!=="view"?(e.openBlock(),e.createBlock(f,{key:4,style:{width:"100%"},modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"datetime")&&h.mode!=="view"?(e.openBlock(),e.createBlock(P,{key:5,style:{width:"100%"},type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"select")&&h.mode!=="view"?(e.openBlock(),e.createBlock(y,{key:6,multiple:(_=(R=g.formItem)==null?void 0:R.select)==null?void 0:_.multiple,"collapse-tags":(S=(m=g.formItem)==null?void 0:m.select)==null?void 0:S.multiple,filterable:(A=(M=g.formItem)==null?void 0:M.select)==null?void 0:A.allowCreate,"allow-create":(X=(W=g.formItem)==null?void 0:W.select)==null?void 0:X.allowCreate,"default-first-option":(L=(ne=g.formItem)==null?void 0:ne.select)==null?void 0:L.allowCreate,modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:U(g),onChange:v=>G(g)},{default:e.withCtx(()=>{var v,Me;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Me=(v=g.formItem)==null?void 0:v.select)==null?void 0:Me.options,Ue=>(e.openBlock(),e.createBlock(d,{value:Ue.value,label:Ue.label},null,8,["value","label"]))),256))]}),_:2},1032,["multiple","collapse-tags","filterable","allow-create","default-first-option","modelValue","onUpdate:modelValue","disabled","onChange"])):e.createCommentVNode("",!0),V(g,"input-number")&&h.mode!=="view"?(e.openBlock(),e.createBlock(C,{key:7,style:{width:"100%"},modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,min:(K=(J=(F=g.formItem)==null?void 0:F.inputNumber)==null?void 0:J.min)!=null?K:Number.NEGATIVE_INFINITY,max:(re=(ae=(Z=g.formItem)==null?void 0:Z.inputNumber)==null?void 0:ae.max)!=null?re:Number.POSITIVE_INFINITY,step:(We=(He=(Ve=g.formItem)==null?void 0:Ve.inputNumber)==null?void 0:He.step)!=null?We:1,"value-on-clear":-10},null,8,["modelValue","onUpdate:modelValue","min","max","step"])):e.createCommentVNode("",!0)]}),_:2},1032,["style","prop","label"]))),256))]),_:1},8,["model","rules","inline"])),[[O,i.value]])}}}),[["__scopeId","data-v-b66c7ec9"]]),Kn={class:"console-dialog__body"},Qn={key:0,class:"process-view"},Xn={class:"operation-button-wrapper"},zt=e.defineComponent({__name:"FormDialog",props:{id:{},mode:{},model:{},visible:{type:Boolean},showProcess:{type:Boolean},afterSubmitFunc:{type:Function}},emits:["update:visible","update:id"],setup(t,{expose:o,emit:n}){const{t:r}=_e.useI18n(),a=t,l=e.ref(0),i=n,s=e.ref();e.watch(()=>a.visible,()=>{a.visible&&l.value++});function c(){s.value&&s.value.refresh()}function u(){i("update:visible",!1),s.value.reset()}function b(){s.value.submit()}return o({close:u,refresh:c}),(w,x)=>{const E=e.resolveComponent("el-step"),j=e.resolveComponent("el-steps"),I=e.resolveComponent("el-button"),H=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(H,{class:"console-dialog",title:"Edit","align-center":"","model-value":a.visible,width:"800px",onClose:u},{footer:e.withCtx(()=>{var U;return[e.createElementVNode("div",{class:"dialog-footer",style:e.normalizeStyle({width:a.showProcess?"calc(100% - 350px)":"auto"})},[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((U=a.model.formConfig)==null?void 0:U.dialogButtons,Y=>(e.openBlock(),e.createBlock(I,{onClick:V=>Y.function(s.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)(Y.label)),1)]),_:2},1032,["onClick"]))),256))]),e.createElementVNode("div",null,[e.createVNode(I,{onClick:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.cancel")),1)]),_:1}),e.createVNode(I,{type:"primary",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.save")),1)]),_:1})])],4)]}),default:e.withCtx(()=>[e.createElementVNode("div",Kn,[e.createVNode(jt,{class:"form-view",style:e.normalizeStyle({width:w.showProcess?"calc(100% - 280px)":"100%"}),ref_key:"formViewRef",ref:s,id:a.id,sessionId:l.value,mode:a.mode,model:a.model,afterSubmitFunc:a.afterSubmitFunc,closeDialogFunc:u,disableInline:a.showProcess},null,8,["style","id","sessionId","mode","model","afterSubmitFunc","disableInline"]),w.showProcess?(e.openBlock(),e.createElementBlock("div",Qn,[x[0]||(x[0]=e.createElementVNode("h1",null,"流程动态",-1)),e.createVNode(j,{style:{height:"90%"},direction:"vertical",active:1},{default:e.withCtx(()=>[e.createVNode(E,{title:"Step 1"}),e.createVNode(E,{title:"Step 2"})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),Zn={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function vn(t,o){return e.openBlock(),e.createElementBlock("svg",Zn,o[0]||(o[0]=[e.createElementVNode("path",{fill:"#888a8d",d:"M192 672a16 16 0 0 1 16 16v128h604.992V688a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v160a64 64 0 0 1-56.512 63.552l-7.488.448H176a64 64 0 0 1-64-64V688a16 16 0 0 1 16-16zm268.032-505.664v2.56l-.128 13.248v89.024l.064 46.08V718.72A18.176 18.176 0 0 1 443.2 736h-62.08a18.176 18.176 0 0 1-17.216-16.768V334.464h-1.28l-130.432 129.28a16 16 0 0 1-22.592-.128l-.32-.256L164.544 416a16 16 0 0 1 .448-22.4l86.08-84.736a18.2 18.2 0 0 1 2.688-3.2l142.72-139.648c7.04-6.784 56.512-6.656 63.488.32zm184.832-5.312c9.152.448 16.512 7.68 17.216 16.768v384.704h1.344L793.792 433.28a16 16 0 0 1 22.592.128l.256.256 44.736 47.36a16 16 0 0 1-.448 22.4l-86.08 84.736a18.2 18.2 0 0 1-2.624 3.2l-142.72 139.648c-7.104 6.784-56.512 6.656-63.488-.32v-2.56l.064-13.312V579.84l-.064-17.28V178.304a18.176 18.176 0 0 1 16.768-17.216h62.08z"},null,-1)]))}const er={render:vn},tr={class:"toolbar"},or={class:"tool-buttons"},nr={class:"tool-buttons"},rr={key:2},De=Q(e.defineComponent({__name:"TableView",props:{model:{}},setup(t,{expose:o}){const{t:n}=Pe.global,r=t,a=e.reactive([]),l=e.reactive({}),i=e.ref(""),s=e.ref(!1),c=q.useRouter(),u=e.ref(""),b=e.reactive([]),w=e.reactive([]),x=e.ref(),E=e.ref([]),j=e.ref("create"),I=e.ref(!0),H=e.ref(!1),U=e.ref(""),Y=e.reactive({pageSize:10,pageNo:1,totalElements:0});let V={};const G=e.computed(()=>a.filter(_=>{var m,S;return((m=_.formItem)==null?void 0:m.type)!=="password"&&_.visible!==!1&&((S=_.tableColumn)==null?void 0:S.visible)!==!1}));function h(_,m){var W,X,ne,L;let S=m.row[_.prop];const M=(X=(W=_.tableColumn)==null?void 0:W.functions)==null?void 0:X.transformValue,A=(ne=_.tableColumn)==null?void 0:ne.transformValueMappings;if(M)S=M(S);else if(A&&A.length>0){for(let F of A)if(S===F.value){S=n(F.label);break}}else if(((L=_.formItem)==null?void 0:L.type)==="select"){const F=_.formItem.select;if(F){if(F.viewModeLabelField)S=m.row[F.viewModeLabelField];else if(F.options&&F.options.length>0){for(let J of F.options)if(J.value===m.row[_.prop]){S=J.label;break}}else if(F.useDatableDict&&F.dictId){if(V[F.dictId]===void 0){let K=`${e.computed(()=>window.location.href.indexOf("localhost")>0?"http://localhost.vancone.com:8080":"https://datable.vancone.com/agent/public/0001").value}/api/datable/agent/metadata/dict?dictId=${F.dictId}`;de(K,"GET",{}).then(({data:Z})=>{let ae=[];Array.isArray(Z.data)?ae=Z.data:Z.data.list&&Array.isArray(Z.data.list)&&(ae=Z.data.list),V[F.dictId]=ae;for(let re of V[F.dictId])if(re.dbOrdinal==S){S=re.value;break}})}else for(let J of V[F.dictId])if(J.dbOrdinal==S){S=J.value;break}}}}return S}function N(_,m){var S,M;return _.label?n(_.label):(M=(S=_.functions)==null?void 0:S.transformLabel)==null?void 0:M.call(S,m.$index,m.row)}function p(_){$e(r.model),Object.assign(r.model,_)}function k(){var m,S,M;if(I.value=!0,!r.model||!r.model.api)return;$e(l),Object.assign(l,(m=r.model.tableConfig)!=null?m:{}),l.display=(S=l.display)!=null?S:{},l.display.advancedSearch!==!0&&(l.display.advancedSearch=!1),l.display.fileTaskButton!==!0&&(l.display.fileTaskButton=!1),l.display.pagination!==!1&&(l.display.pagination=!0),l.display.pane!==!1&&(l.display.pane=!0),l.display.searchBox!==!1&&(l.display.searchBox=!0),a.splice(0,a.length,...r.model.fields),i.value=(M=r.model.route)!=null?M:"";let _=Ye({},l.queryParams);_.pageSize=Y.pageSize,_.pageNo=Y.pageNo,_.search=u.value,de(r.model.api,"GET",_).then(({data:A})=>{const{list:W,totalCount:X}=A.data;b.splice(0,b.length,...W),Y.totalElements=X,I.value=!1})}function P(){var _,m;l.createPageRoutePath!==void 0?c.push(l.createPageRoutePath):((_=l.functions)==null?void 0:_.create)!==void 0?(m=l.functions)==null||m.create():(j.value="create",U.value="",s.value=!0)}function f(_,m){r.model.api&&de(r.model.api,"DELETE",m.id).then(({data:S})=>{S.code===0&&(s.value=!1,k())})}function d(){ge.ElMessageBox.confirm("The selected items will be deleted. Continue?",n("common.table.warning"),{confirmButtonText:n("common.basic.confirm"),cancelButtonText:n("common.basic.cancel"),type:"warning"}).then(()=>{var _,m;if(((_=l.functions)==null?void 0:_.batchDelete)!==void 0)(m=l.functions)==null||m.batchDelete(E.value);else{const S=E.value.map(M=>M.id);ie.delete(`${r.model.api}/${S.join(",")}`).then(({data:M})=>{M.code===0&&(s.value=!1,k())})}x.value.clearSelection()}).catch(()=>{x.value.clearSelection()})}function y(_){Y.pageSize=_,k()}function C(_){Y.pageNo=_,k()}function $(_,m){l.editPageRoutePath!==void 0?c.push({path:l.editPageRoutePath,query:{id:m.id}}):(U.value=m.id,j.value="update",s.value=!0)}function T(){var S;let _=((S=r.model.api)!=null&&S.startsWith("http")?"":window.location.origin)+r.model.api+"/export";const m=l.queryParams;m!==void 0&&Object.keys(m).length>0&&(_+="?",Object.entries(l.queryParams).map(M=>{_+=`${M[0]}=${M[1]}&`})),window.open(_)}function O(_){E.value=_}function g(_){const m="i18n(",S=")",M=_.label;return M?M.startsWith(m)&&M.endsWith(S)?n(M.slice(m.length,-S.length)):M:_.prop.slice(0,1).toUpperCase()+_.prop.slice(1).toLowerCase()}function D(_){_?(H.value=!0,w.splice(0,w.length,...b),b.splice(0,b.length,...E.value)):(H.value=!1,b.splice(0,b.length,...w))}function R(){var W;if(E.value.length===0){ge.ElMessageBox.alert("Select rows before printing","Print",{confirmButtonText:"OK"});return}let _="";G.value.forEach(X=>{_+=`<th>${g(X)}</th>`});let m="";E.value.forEach(X=>{m+="<tr>",G.value.forEach(ne=>{m+=`<td>${X[ne.prop]}</td>`}),m+="</tr>"});let S=`<table><tr>${_}</tr>${m}</table>`;const M=document.createElement("iframe");M.style.display="none",document.body.appendChild(M);const A=M.contentDocument||((W=M.contentWindow)==null?void 0:W.document);A==null||A.open(),A==null||A.write(`
11
+ This will fail in production.`);s=Ie,s._s.has(r)||(l?nt(r,o,a,s):Tt(r,a,s),process.env.NODE_ENV!=="production"&&(i._pinia=s));const b=s._s.get(r);if(process.env.NODE_ENV!=="production"&&c){const w="__hot:"+r,x=l?nt(w,o,a,s,!0):Tt(w,ce({},a),s,!0);c._hotUpdate(x),delete s.state.value[w],s._s.delete(w)}if(process.env.NODE_ENV!=="production"&&Ce){const w=e.getCurrentInstance();if(w&&w.proxy&&!c){const x=w.proxy,E="_pStores"in x?x._pStores:x._pStores={};E[r]=b}}return b}return i.$id=r,i}const kn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Vn=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Nn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function xn(t,o){if(t==="__proto__"||t==="constructor"&&o&&typeof o=="object"&&"prototype"in o){En(t);return}return o}function En(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function Sn(t,o={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!Nn.test(t)){if(o.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(kn.test(t)||Vn.test(t)){if(o.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,xn)}return JSON.parse(t)}catch(r){if(o.strict)throw r;return t}}function Bn(t,o){if(t==null)return;let n=t;for(let r=0;r<o.length;r++){if(n==null||n[o[r]]==null)return;n=n[o[r]]}return n}function rt(t,o,n){if(n.length===0)return o;const r=n[0];return n.length>1&&(o=rt(typeof t!="object"||t===null||!Object.prototype.hasOwnProperty.call(t,r)?Number.isInteger(Number(n[1]))?[]:{}:t[r],o,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(t)?t.slice()[r]:Object.assign({},t,{[r]:o})}function Dt(t,o){if(t==null||o.length===0)return t;if(o.length===1){if(t==null)return t;if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.slice.call(t,0).splice(o[0],1);const n={};for(const r in t)n[r]=t[r];return delete n[o[0]],n}if(t[o[0]]==null){if(Number.isInteger(o[0])&&Array.isArray(t))return Array.prototype.concat.call([],t);const n={};for(const r in t)n[r]=t[r];return n}return rt(t,Dt(t[o[0]],Array.prototype.slice.call(o,1)),[o[0]])}function Mt(t,o){return o.map(n=>n.split(".")).map(n=>[n,Bn(t,n)]).filter(n=>n[1]!==void 0).reduce((n,r)=>rt(n,r[1],r[0]),{})}function Ut(t,o){return o.map(n=>n.split(".")).reduce((n,r)=>Dt(n,r),t)}function At(t,{storage:o,serializer:n,key:r,debug:a,pick:l,omit:i,beforeHydrate:s,afterHydrate:c},u,b=!0){try{b&&(s==null||s(u));const w=o.getItem(r);if(w){const x=n.deserialize(w),E=l?Mt(x,l):x,j=i?Ut(E,i):E;t.$patch(j)}b&&(c==null||c(u))}catch(w){a&&console.error("[pinia-plugin-persistedstate]",w)}}function Ft(t,{storage:o,serializer:n,key:r,debug:a,pick:l,omit:i}){try{const s=l?Mt(t,l):t,c=i?Ut(s,i):s,u=n.serialize(c);o.setItem(r,u)}catch(s){a&&console.error("[pinia-plugin-persistedstate]",s)}}function $n(t,o,n){const{pinia:r,store:a,options:{persist:l=n}}=t;if(!l)return;if(!(a.$id in r.state.value)){const c=r._s.get(a.$id.replace("__hot:",""));c&&Promise.resolve().then(()=>c.$persist());return}const s=(Array.isArray(l)?l:l===!0?[{}]:[l]).map(o);a.$hydrate=({runHooks:c=!0}={})=>{s.forEach(u=>{At(a,u,t,c)})},a.$persist=()=>{s.forEach(c=>{Ft(a.$state,c)})},s.forEach(c=>{At(a,c,t),a.$subscribe((u,b)=>Ft(b,c),{detached:!0})})}function On(t={}){return function(o){var n;$n(o,r=>{var a,l,i,s,c,u,b;return{key:(t.key?t.key:w=>w)((a=r.key)!=null?a:o.store.$id),debug:(i=(l=r.debug)!=null?l:t.debug)!=null?i:!1,serializer:(c=(s=r.serializer)!=null?s:t.serializer)!=null?c:{serialize:w=>JSON.stringify(w),deserialize:w=>Sn(w)},storage:(b=(u=r.storage)!=null?u:t.storage)!=null?b:window.localStorage,beforeHydrate:r.beforeHydrate,afterHydrate:r.afterHydrate,pick:r.pick,omit:r.omit}},(n=t.auto)!=null?n:!1)}}var Pn=On();const qe=_n();qe.use(Pn);const at=Cn("console",{state:()=>({menu:{collapsed:!0},account:{id:"",userId:""}}),persist:!0}),In={key:0,class:"menu-wrapper"},lt=Q(e.defineComponent({__name:"SideMenu",props:{menuCollapsed:{type:Boolean}},emits:["update:menuCollapsed"],setup(t,{emit:o}){at(qe);const n=q.useRoute(),r=e.computed(()=>{var l;const a=n.meta.activeMenu;if(a==="{model}"){let i=n.params.app?`${n.params.app}/${n.params.model}`:n.params.model;return"/"+((l=mt[n.params.model])!=null?l:i)}else return a});return(a,l)=>{const i=e.resolveComponent("el-menu");return e.unref(Qe).length>0?(e.openBlock(),e.createElementBlock("div",In,[e.createVNode(i,{class:"menu","default-active":r.value,router:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Qe),s=>(e.openBlock(),e.createBlock(Ho,{key:s.path,menu:s},null,8,["menu"]))),128))]),_:1},8,["default-active"])])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-c70ca2ba"]]),Tn={class:"container"},Rt=e.defineComponent({__name:"ConsoleApp",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const o=at(qe),n=q.useRoute(),r=e.ref(o.menu.collapsed),a=e.ref(),l=t;return(i,s)=>{const c=e.resolveComponent("router-view"),u=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(Ke,{key:0,title:l.title,helpDocUrl:l.helpDocUrl,headerProjectConfig:l.headerProjectConfig},null,8,["title","helpDocUrl","headerProjectConfig"])):e.createCommentVNode("",!0),e.createElementVNode("div",Tn,[e.unref(n).query.embedded!=="true"?(e.openBlock(),e.createBlock(lt,{key:0,menuCollapsed:r.value,"onUpdate:menuCollapsed":s[0]||(s[0]=b=>r.value=b)},null,8,["menuCollapsed"])):e.createCommentVNode("",!0),e.createVNode(u,{class:"main-scrollbar"},{default:e.withCtx(()=>[e.createElementVNode("main",{ref_key:"mainWrapperRef",ref:a,class:"main-wrapper"},[e.createVNode(c)],512)]),_:1})])],64)}}}),Dn={xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800"};function Mn(t,o){return e.openBlock(),e.createElementBlock("svg",Dn,o[0]||(o[0]=[e.createStaticVNode('<defs><linearGradient id="a" x1="399.126" x2="399.126" y1="159.978" y2="715.47" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4f2fb"></stop><stop offset="1" stop-color="#e1eef5"></stop></linearGradient><linearGradient id="b" x1="481.607" x2="481.607" y1="594.251" y2="423.306" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".362" stop-color="#b4c9db"></stop><stop offset=".898" stop-color="#ecf0f9"></stop></linearGradient><linearGradient id="c" x1="114.87" x2="114.87" y1="540.843" y2="403.668" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="d" x1="114.872" x2="114.872" y1="418.9" y2="570.033" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="e" x1="615.999" x2="615.999" y1="449.321" y2="360.996" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="f" x1="616" x2="616" y1="370.804" y2="468.116" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="g" x1="672.709" x2="672.709" y1="544.867" y2="510.536" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".227" stop-color="#d0dceb"></stop><stop offset=".789" stop-color="#ecf1fb"></stop></linearGradient><linearGradient id="h" x1="672.77" x2="672.77" y1="514.871" y2="570.135" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ecf1fb"></stop><stop offset=".818" stop-color="#b6c9dd"></stop></linearGradient><linearGradient id="i" x1="461.917" x2="427.163" y1="86.714" y2="146.91" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffdb80"></stop><stop offset="1" stop-color="#ffbb24"></stop></linearGradient><linearGradient id="j" x1="419.58" x2="419.58" y1="117.18" y2="174.634" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f9fafe"></stop><stop offset="1" stop-color="#e5edf7"></stop></linearGradient><linearGradient id="k" x1="-1967.352" x2="-2213.626" y1="525.737" y2="279.463" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#d5e1f2"></stop></linearGradient><linearGradient id="l" x1="-1980.099" x2="-2214.789" y1="526.438" y2="291.748" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#b6cadc"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="m" x1="441.358" x2="329.96" y1="472.657" y2="361.259" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#9fb6cc"></stop><stop offset="1" stop-color="#bccde1"></stop></linearGradient><linearGradient id="n" x1="569.328" x2="454.912" y1="597.606" y2="483.19" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset=".15" stop-color="#afc5d8"></stop><stop offset="1" stop-color="#dfe8f9"></stop></linearGradient><linearGradient id="o" x1="562.331" x2="453.712" y1="598.807" y2="490.188" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#c7d4e5"></stop><stop offset=".687" stop-color="#e8eff8"></stop></linearGradient><linearGradient id="p" x1="219.375" x2="219.375" y1="553.783" y2="478.333" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffb32c"></stop></linearGradient><linearGradient id="q" x1="220.421" x2="220.421" y1="465.465" y2="489.367" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4ae98"></stop><stop offset="1" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="r" x1="-840.016" x2="-828.333" y1="946.367" y2="864.11" gradientTransform="rotate(-8.082 -3028.264 -6569.32)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="s" x1="-7035.52" x2="-7023.838" y1="66.46" y2="-15.798" gradientTransform="scale(-1 1)rotate(-8.082 -118.132 -47761.005)" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fad96e"></stop><stop offset="1" stop-color="#ffa91f"></stop></linearGradient><linearGradient id="t" x1="219.375" x2="219.375" y1="526.535" y2="574.482" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#275c89"></stop><stop offset="1" stop-color="#013f7c"></stop></linearGradient><linearGradient id="u" x1="6174.812" x2="6157.838" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="v" x1="196.36" x2="283.925" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#18264b"></stop><stop offset=".652" stop-color="#2d3c65"></stop></linearGradient><linearGradient id="w" x1="176.617" x2="176.617" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="x" x1="238.667" x2="255.641" y1="595.174" y2="595.174" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="y" x1="158.041" x2="245.606" y1="576.466" y2="576.466" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#445677"></stop><stop offset="1" stop-color="#293861"></stop></linearGradient><linearGradient id="z" x1="265.35" x2="265.35" y1="604.946" y2="586.928" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4673bc"></stop><stop offset=".652" stop-color="#6a94e0"></stop></linearGradient><linearGradient id="A" x1="236.065" x2="204.828" y1="459.983" y2="459.983" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#f4b9a4"></stop><stop offset=".652" stop-color="#fad1bb"></stop></linearGradient><linearGradient id="B" x1="200.53" x2="236.795" y1="447.908" y2="447.908" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#4f5c7c"></stop><stop offset="1" stop-color="#274168"></stop></linearGradient></defs><path fill="url(#a)" d="M482.38 201.33c-38.37 30.29-120.74 33.81-181.17-2.22s-172-31.38-202.22 34.87 37.19 131.33 12.78 178.98S6.01 528.01 61.8 609.36s126.6 60.62 169.22 52.45c84.17-16.13 189.79 115.67 308.62 16.13 68.47-57.35 170.44 42.09 210.17-81.36 32.78-101.86-85.67-139.5-49.97-208.03 37.96-72.88 30.67-159.24-10.46-201.06-38.31-38.96-140.75-38.46-207 13.84"></path><path fill="url(#b)" d="M393.48 423.31h216.44l-22.53 49.03s59.19 57.86-14.13 121.91c-134.28-44.17-221.74-37.1-219.98-38.87 1.77-1.77 40.2-132.07 40.2-132.07"></path><path fill="url(#c)" d="M115.65 403.91s-.22-.57-.52.04c-2.7 5.49-27.15 64.96-29.09 110.86 0 0-4.08 26.37 30.11 26.02 28.54-.29 27.78-24.6 27.68-32.79-.38-33.22-28.18-104.13-28.18-104.13"></path><path fill="url(#d)" d="M114.87 570.03c-.55 0-1-.45-1-1V419.9c0-.55.45-1 1-1s1 .45 1 1v149.13c0 .56-.45 1-1 1"></path><path fill="url(#e)" d="M616.5 361.15s-.14-.37-.33.03c-1.74 3.53-17.48 41.83-18.73 71.38 0 0-2.63 16.98 19.39 16.76 18.38-.18 17.89-15.84 17.82-21.11-.25-21.4-18.15-67.06-18.15-67.06"></path><path fill="url(#f)" d="M616 468.12c-.36 0-.64-.29-.64-.64v-96.02c0-.36.29-.64.64-.64.36 0 .64.29.64.64v96.02c0 .35-.28.64-.64.64"></path><path fill="url(#g)" d="M689.88 527.7c0 9.48-7.69 17.17-17.17 17.17s-17.17-7.69-17.17-17.17 7.69-17.17 17.17-17.17 17.17 7.69 17.17 17.17"></path><path fill="url(#h)" d="M672.77 570.13c-.29 0-.53-.24-.53-.53v-54.2c0-.29.24-.53.53-.53s.53.24.53.53v54.21c0 .29-.24.52-.53.52"></path><path fill="url(#i)" d="M479.29 116.81c0 19.19-15.56 34.75-34.75 34.75s-34.75-15.56-34.75-34.75 15.56-34.75 34.75-34.75 34.75 15.56 34.75 34.75"></path><path fill="url(#j)" d="M464.32 135.76h-34.57c-2.23-10.61-11.65-18.58-22.93-18.58s-20.69 7.97-22.93 18.58h-9.05c-10.73 0-19.44 8.7-19.44 19.44 0 10.73 8.7 19.44 19.44 19.44h89.47c10.73 0 19.44-8.7 19.44-19.44s-8.7-19.44-19.43-19.44"></path><path fill="url(#k)" d="M235.65 388.64c0-24.52-.03-49.03.01-73.54.02-14.37 4.24-18.36 17.97-20.53 41.87-6.61 82.03-18.72 117.91-42.29 10.38-6.82 18.3-7.59 29.06-.47 34.85 23.06 73.26 37.11 114.55 42.8 13.12 1.81 16.84 5.88 16.85 19.25.04 45.72-.4 91.44.18 137.15.34 26.77-8.17 49.99-24.02 70.73-31.46 41.17-74.88 63.76-122.21 80.03-2.5.86-5.83.67-8.36-.23-38.47-13.74-74.58-31.84-104.15-61.09-22.97-22.73-37.84-49.56-37.79-83.22.03-22.87 0-45.73 0-68.59"></path><path fill="url(#l)" d="M234.76 396.09c0-23.21-.03-46.42.01-69.63.02-13.61 4.06-17.38 17.23-19.43 40.15-6.26 78.67-17.72 113.07-40.04 9.95-6.46 17.55-7.18 27.86-.44 33.42 21.83 70.25 35.14 109.84 40.52 12.58 1.71 16.14 5.56 16.15 18.22.03 43.28-.38 86.57.18 129.84.33 25.34-7.83 47.33-23.03 66.96-30.17 38.98-71.81 60.36-117.19 75.77-2.4.81-5.59.64-8.01-.22-36.89-13.01-71.52-30.14-99.87-57.84-22.03-21.52-36.28-46.91-36.23-78.78.02-21.65 0-43.29-.01-64.93"></path><path fill="url(#m)" d="M398.42 430.39c23.18-5.61 40.41-26.11 40.41-50.49 0-28.68-23.85-52.01-53.17-52.01s-53.17 23.33-53.17 52.01c0 24.38 17.24 44.88 40.41 50.49v85.2h25.52v-36.38h32.67v-24.96h-32.67zM358 379.91c0-14.91 12.41-27.05 27.65-27.05S413.3 365 413.3 379.91s-12.41 27.05-27.65 27.05S358 394.82 358 379.91"></path><path fill="#fff" d="M394.5 433.67c21.8-5.39 38.01-25.1 38.01-48.54 0-27.58-22.43-50.01-50.01-50.01s-50.01 22.43-50.01 50.01c0 23.44 16.21 43.15 38.01 48.54v81.92h24v-34.98h30.73v-24H394.5zm-38.01-48.54c0-14.34 11.67-26.01 26.01-26.01s26.01 11.67 26.01 26.01-11.67 26.01-26.01 26.01-26.01-11.67-26.01-26.01"></path><path fill="url(#n)" d="M593.02 540.4c0 44.68-36.22 80.9-80.9 80.9s-80.9-36.22-80.9-80.9 36.22-80.9 80.9-80.9 80.9 36.22 80.9 80.9"></path><path fill="url(#o)" d="M584.83 544.5c0 42.42-34.39 76.81-76.81 76.81s-76.81-34.39-76.81-76.81 34.39-76.81 76.81-76.81 76.81 34.39 76.81 76.81"></path><path fill="#fff" d="m525.32 542.26 23.01-23.01c4.44-4.44 4.44-11.63 0-16.06-4.44-4.44-11.63-4.44-16.06 0l-23.01 23.01-23.01-23.01c-4.44-4.44-11.63-4.44-16.06 0-4.44 4.44-4.44 11.63 0 16.06l23.01 23.01-23.01 23.01c-4.44 4.44-4.44 11.63 0 16.06 2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33l23.01-23.01 23.01 23.01c2.22 2.22 5.13 3.33 8.03 3.33s5.81-1.11 8.03-3.33c4.44-4.44 4.44-11.63 0-16.06z"></path><path fill="url(#p)" d="M211.59 478.69s-18.31-2.53-24.25 5.88c-5.95 8.41-8.12 29.95-8.12 29.95l13.78-.73-1.16 25.09 25.42 14.9 36.22-19.48-5.51-22.73 11.57-3.02s-3.45-32.99-19.55-28.12c-8.27.89-10.88.74-10.88.74s-2.18 6.94-9.65 6.35-7.87-8.83-7.87-8.83"></path><path fill="url(#q)" d="m213.42 468.32-3.8 16.97c-.18.8.24 1.61.99 1.92 1.97.8 5.9 2.16 9.95 2.16 4.2 0 8.16-2.3 9.98-3.53.63-.42.89-1.21.65-1.93l-5.82-17.31a1.68 1.68 0 0 0-1.88-1.12l-8.72 1.55c-.67.12-1.2.63-1.35 1.29"></path><path fill="url(#r)" d="M190.69 481.63c5.33-1.77 12.55-.59 12.85 11.37.29 11.95-11.42 31-7.22 37.63 4.25 6.71 13.34 16.25 19.12 21.68-1.34 6.38-4.98 11.75-4.98 11.75s-21.31-9.83-30.59-19.68-4.6-32.43-.3-48.5c3.24-12.12 11.12-14.25 11.12-14.25"></path><path fill="url(#s)" d="M246.53 481.63c-5.33-1.77-12.55-.59-12.85 11.37-.29 11.95 11.42 31 7.22 37.63-4.25 6.71-13.34 16.25-19.12 21.68 1.34 6.38 4.98 11.75 4.98 11.75s21.31-9.83 30.59-19.68 4.6-32.43.3-48.5c-3.24-12.12-11.12-14.25-11.12-14.25"></path><path fill="url(#t)" d="M193.27 574.48h51.74c2.34 0 4.44-1.78 5.25-4.45l10.43-34.31c1.35-4.45-1.35-9.19-5.25-9.19h-72.12c-3.86 0-6.57 4.65-5.28 9.09l9.96 34.31c.79 2.73 2.9 4.55 5.27 4.55"></path><path fill="#fff" d="M191.21 590.26s-.8-1.76-1.41-1.95c-.62-.19-9.46-.54-12.69-1.38s-12.54-2.16-16.52 1.61c-3.47 3.29-4.62 10.97.67 15.39 1.98 1.72 3.93 2.23 11.28 1.89s18-.27 20.34-3.67c-.09-5.63-1.67-11.89-1.67-11.89"></path><path fill="url(#u)" d="M199.42 588.31s-8.54 1.92-11.6 1.64c-3.05-.28-.5 12.02-.5 12.02s8.16.56 15.37-1.52c2.44-9.43-3.27-12.14-3.27-12.14"></path><path fill="url(#v)" d="m196.36 587.86 4.44 13.81s95.43-12.57 81.79-43.54c-11.4-25.89-86.23 29.73-86.23 29.73"></path><path fill="url(#w)" d="M190.1 588.93s3.5 1.37 3.94 6.24-1 8.15-8.43 9.05-9.32.56-13.98.68c-4.66.11-11.43.56-12.43-8.3s8.06-11.12 17.46-8.86c2.95.57 13.44 1.19 13.44 1.19"></path><path fill="#fff" d="M250.76 590.26s.8-1.76 1.41-1.95c.62-.19 9.46-.54 12.69-1.38s11.9-2.23 16.28 1.51c4.06 3.47 4.33 11.14-.3 15.37-1.98 1.72-4.07 2.35-11.42 2.01s-18-.27-20.34-3.67c.09-5.63 1.68-11.89 1.68-11.89"></path><path fill="url(#x)" d="M242.55 588.31s8.54 1.92 11.6 1.64.5 12.02.5 12.02-8.16.56-15.37-1.52c-2.45-9.43 3.27-12.14 3.27-12.14"></path><path fill="url(#y)" d="m245.61 587.86-4.44 13.81s-95.43-12.57-81.79-43.54c11.4-25.89 86.23 29.73 86.23 29.73"></path><path fill="url(#z)" d="M251.87 588.93s-3.5 1.37-3.94 6.24 1 8.15 8.43 9.05 9.32.56 13.98.68c4.66.11 11.43.56 12.43-8.3s-8.06-11.12-17.46-8.86c-2.96.57-13.44 1.19-13.44 1.19"></path><path fill="url(#A)" d="M235.39 461.53c.57-.81.93-2.88.46-3.48-.84-.68-1.63-.29-2.23.3.14-4.94-.31-9.05-.42-10.09-.31-3.03-3.39-8.58-13.46-8.58s-12.03 7.27-12.03 7.27-.66 5.14-.46 11.38c-.6-.57-1.39-.95-2.21-.28-.46.61-.1 2.68.46 3.48.57.81.93 2.73 1.03 3.79.1 1.01-.63 3.69 2.02 3.35 1.58 6.33 7.99 11.61 11.96 11.61 4.35 0 10.13-5.32 11.77-11.62 2.71.37 1.97-2.33 2.07-3.35.12-1.05.48-2.97 1.04-3.78"></path><path fill="url(#B)" d="M227 437.52s-1.97-6.19-9.5-4.71c-7.54 1.48-8.05 5.04-11 5.18-5.05.24-9.09 6.53-2.61 13.19 2.88 2.97.45 4.24 1.82 6.87s1.36 5.18 1.36 5.18 2.41-7.69.82-10.97c-.82-1.69 2.81-2.15 7.33-1.75s11.65-1.09 12.21-4.17c1.34 6.31 2.67 6.97 4.37 7.93s1.8 8.58 1.8 8.58.3-5.6 1.48-6.87c.98-2.07 2.88-10.2.73-12.17s-.35-8.29-8.81-6.29"></path>',33)]))}const Un={render:Mn},An={},Fn={class:"wrapper"},Rn={class:"content"};function Ln(t,o){const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fn,[o[4]||(o[4]=e.createElementVNode("img",{src:Un},null,-1)),e.createElementVNode("div",Rn,[o[3]||(o[3]=e.createElementVNode("h1",null,"You have no permission to access the page.",-1)),e.createVNode(n,{type:"primary"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("Apply")])),_:1}),e.createVNode(n,{onClick:o[0]||(o[0]=r=>t.$router.go(-1))},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("Go Back")])),_:1})])])}const Lt=Q(An,[["render",Ln],["__scopeId","data-v-0155b361"]]),Gn={};function jn(t,o){const n=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(n)}const Gt=Q(Gn,[["render",jn]]),zn={class:"card-wrapper"},qn=["onClick"],Hn={class:"card-inner-wrapper"},Wn={class:"card-title"},Yn={class:"icon"},st=Q(e.defineComponent({__name:"TabCard",props:{cards:{},tableRef:{}},setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=t,l=e.ref(a.cards[0].key);function i(s){s.disabled||(l.value=s.key,a.tableRef.updateConfigAndRefresh(s.model),r.push({path:n.path,query:Kt(Ye({},n.query),{tab:s.key})}))}return e.onMounted(()=>{let s;if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){l.value=c.key,s=c;break}}e.nextTick(()=>{a.tableRef&&a.cards&&a.cards.length>0&&a.tableRef.updateConfigAndRefresh((s!=null?s:a.cards[0]).model)})}),e.watch(()=>a.cards,s=>{if(n.query.tab!==void 0){for(let c of a.cards)if(c.key===n.query.tab){l.value=c.key;break}}else s&&s.length>0&&(l.value=s[0].key,a.tableRef.updateConfigAndRefresh(a.cards[0].model))},{deep:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",zn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.cards,u=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{"card-selected":l.value===u.key}]),onClick:b=>i(u)},[e.createElementVNode("div",Hn,[e.createElementVNode("div",Wn,[e.createElementVNode("div",Yn,[u.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{key:0,class:"svg-icon"})):e.createCommentVNode("",!0)]),e.createElementVNode("span",{style:e.normalizeStyle({color:u.disabled?"#aaa":"black"})},e.toDisplayString(e.unref(o)(u.label)),5)]),e.createElementVNode("span",null,e.toDisplayString(u.count),1)])],10,qn))),256))]))}}),[["__scopeId","data-v-047a86e6"]]),$e=t=>{const o=Object.keys(t);let n={};o.forEach(r=>{n[r]=void 0}),Object.assign(t,n)},Jn={key:1,class:"view-span"},jt=Q(e.defineComponent({__name:"FormView",props:{id:{},sessionId:{},mode:{},model:{},disableInline:{type:Boolean},closeDialogFunc:{type:Function},afterSubmitFunc:{type:Function}},emits:["update:id"],setup(t,{expose:o,emit:n}){const{t:r}=Pe.global,a=t,l=e.reactive({}),i=e.ref(!1),s=e.ref(),c=e.reactive({});e.ref(!0);const u=h=>a.mode==="view"&&(V(h,void 0)||V(h,"input")||V(h,"select")||V(h,"password")||V(h,"input-number")||V(h,"date")||V(h,"time")||V(h,"datetime")),b=e.computed(()=>a.model.fields?a.model.fields.filter(h=>{var k,P,f,d;let N=h.visible!==!1&&((k=h.formItem)==null?void 0:k.visible)!==!1;if(a.mode!=="view"&&((P=h.formItem)==null?void 0:P.editable)===!1||a.mode==="view"&&((f=h.formItem)==null?void 0:f.type)==="password")return!1;let p=(d=h.formItem)==null?void 0:d.showCondition;if(p&&p.field&&p.value!==void 0){if(p.operator===void 0||p.operator==="==")return l[p.field]===p.value;if(p.operator==="!=")return l[p.field]!==p.value;if(p.operator===">")return l[p.field]>p.value;if(p.operator==="<")return l[p.field]<p.value}return N}):[]);e.watch([()=>a.id,()=>a.sessionId],()=>{console.log(`FormView.watch: id = ${a.id}, sessionId = ${a.sessionId}`),x()},{immediate:!0});function w(){console.log("FormView.initFormFields: begin");const h=a.model.fields;let N={};h==null||h.forEach(p=>{var k,P,f,d,y,C,$,T,O,g,D,A,_;if(l[p.prop]=null,p.visible!==!1&&((k=p.formItem)==null?void 0:k.visible)!==!1){if(((P=p.formItem)==null?void 0:P.defaultValue)!==void 0?l[p.prop]=(f=p.formItem)==null?void 0:f.defaultValue:l[p.prop]=void 0,a.mode!=="view"){let L=(d=p.formItem)==null?void 0:d.validationRule;L!==void 0&&(N[p.prop]=L),$e(c),Object.assign(c,N)}const m=p.formItem,S=m==null?void 0:m.type,M=(y=m==null?void 0:m.select)==null?void 0:y.useDatableDict,F=(C=m==null?void 0:m.select)==null?void 0:C.dictId,W=($=m==null?void 0:m.select)==null?void 0:$.api,X=(T=m==null?void 0:m.select)==null?void 0:T.valueMappingField,ne=(O=m==null?void 0:m.select)==null?void 0:O.labelMappingField;if(S==="select"){if(M){let R=`${e.computed(()=>window.location.href.indexOf("localhost")>0?"http://localhost.vancone.com:8080":"https://datable.vancone.com/agent/public/0001").value}/api/datable/agent/metadata/dict?dictId=${F}`;const J=(g=m==null?void 0:m.select)==null?void 0:g.queryParamName,K=(D=m==null?void 0:m.select)==null?void 0:D.queryParamValueField;J&&(R=`${R}?${J}=${a.id}`),K||de(R,"GET",{}).then(({data:Z})=>{var ae;if((ae=p.formItem)!=null&&ae.select){let re=[];Array.isArray(Z.data)?re=Z.data:Z.data.list&&Array.isArray(Z.data.list)&&(re=Z.data.list),p.formItem.select.options=re.map(Ve=>({value:Ve.dbOrdinal,label:Ve.value}))}})}else if(W){let L=W;const R=(A=m==null?void 0:m.select)==null?void 0:A.queryParamName,J=(_=m==null?void 0:m.select)==null?void 0:_.queryParamValueField;R&&(L=`${L}?${R}=${a.id}`),J||de(L,"GET",{}).then(({data:K})=>{var Z;if((Z=p.formItem)!=null&&Z.select){let ae=[];Array.isArray(K.data)?ae=K.data:K.data.list&&Array.isArray(K.data.list)&&(ae=K.data.list),p.formItem.select.options=ae.map(re=>({value:X?re[X]:re.value,label:ne?re[ne]:re.label}))}})}}}})}function x(){console.log(`Refresh form view data: id = ${a.id}, model = `,a.model),j(),w(),(a.mode==="update"||a.mode==="view")&&a.id!==void 0&&a.id!==""&&a.model.api!==""&&(i.value=!0,de(`${a.model.api}/${a.id}`,"GET",{}).then(({data:h})=>{$e(l),Object.assign(l,h.data),a.model.fields.forEach(N=>{N.formItem&&N.formItem.type==="select"&&l[N.prop]!==void 0&&G(N)}),i.value=!1}))}function E(){return new Promise((h,N)=>{var k,P,f,d;((P=(k=a.model.formConfig)==null?void 0:k.functions)==null?void 0:P.beforeSubmit)!==void 0&&Object.assign(l,(d=(f=a.model.formConfig)==null?void 0:f.functions)==null?void 0:d.beforeSubmit(l));let p=a.mode==="create"?"POST":"PUT";a.model.api&&de(a.model.api,p,l).then(({data:y})=>{var C,$,T,O;y.code===0&&(a.closeDialogFunc&&a.closeDialogFunc(),(($=(C=a.model.formConfig)==null?void 0:C.functions)==null?void 0:$.afterSubmit)!==void 0&&((O=(T=a.model.formConfig)==null?void 0:T.functions)==null||O.afterSubmit(y.data)),a.afterSubmitFunc&&a.afterSubmitFunc(),h())})})}function j(){var h;console.log("FormView.reset: begin"),(h=s.value)==null||h.resetFields()}function I(h){const N="i18n(",p=")",k=h.label;return k?k.startsWith(N)&&k.endsWith(p)?r(k.slice(N.length,-p.length)):k:h.prop.slice(0,1).toUpperCase()+h.prop.slice(1).toLowerCase()}function H(h){var N,p,k,P,f,d;if(h){if(V(h,"select")){const y=(p=(N=h.tableColumn)==null?void 0:N.functions)==null?void 0:p.transformValue;if(y)return y(l[h.prop]);const C=(P=(k=h.formItem)==null?void 0:k.select)==null?void 0:P.viewModeLabelField;if(C)return l[C];const $=(d=(f=h.formItem)==null?void 0:f.select)==null?void 0:d.options;if($){for(let T of $)if(T.value===l[h.prop])return T.label}}return l[h.prop]}}function U(h){var N;return((N=h.formItem)==null?void 0:N.updatable)===!1&&a.mode==="update"}function Y(h,N){var k,P;const p=(P=(k=N.formItem)==null?void 0:k.type)!=null?P:"input";switch(h){case"input":return a.mode==="view"?!1:p==="input"||p==="password";case"select":return!0;default:return console.log("Error: unrecognized form component type: ",h),!0}}function V(h,N){var p;return((p=h.formItem)==null?void 0:p.type)===N}function G(h){var N;for(let p of a.model.fields){const k=(N=p.formItem)==null?void 0:N.select;if(!(!p.formItem||p.formItem.type!=="select"||!k||!k.queryParamValueField)&&k.queryParamValueField===h.prop){const P=k.api;if(P){let f=P;const d=k.queryParamName;d&&(f=`${f}?${d}=${l[k.queryParamValueField]}`),de(f,"GET",{}).then(({data:y})=>{if(k){let C=[];Array.isArray(y.data)?C=y.data:y.data.list&&Array.isArray(y.data.list)&&(C=y.data.list),k.options=C.map($=>({value:k.valueMappingField?$[k.valueMappingField]:$.value,label:k.labelMappingField?$[k.labelMappingField]:$.label}))}})}}}}return o({refresh:x,reset:j,submit:E,formData:l}),(h,N)=>{const p=e.resolveComponent("el-input"),k=e.resolveComponent("el-switch"),P=e.resolveComponent("el-date-picker"),f=e.resolveComponent("el-time-picker"),d=e.resolveComponent("el-option"),y=e.resolveComponent("el-select"),C=e.resolveComponent("el-input-number"),$=e.resolveComponent("el-form-item"),T=e.resolveComponent("el-form"),O=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(T,{ref_key:"formRef",ref:s,model:l,rules:c,"validate-on-rule-change":!1,"label-width":"auto","label-position":"left","require-asterisk-position":"right",inline:!a.disableInline},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,g=>(e.openBlock(),e.createBlock($,{class:"form-item",style:e.normalizeStyle({width:a.disableInline?"100%":"calc(50% - 32px)"}),prop:g.prop,label:I(g)},{default:e.withCtx(()=>{var D,A,_,m,S,M,F,W,X,ne,L,R,J,K,Z,ae,re,Ve,He,We;return[Y("input",g)?(e.openBlock(),e.createBlock(p,{key:0,type:V(g,"password")?"password":"text",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,placeholder:(D=g.formItem)==null?void 0:D.placeholder,disabled:U(g)},null,8,["type","modelValue","onUpdate:modelValue","placeholder","disabled"])):e.createCommentVNode("",!0),u(g)?(e.openBlock(),e.createElementBlock("span",Jn,e.toDisplayString(H(g)),1)):e.createCommentVNode("",!0),V(g,"switch")?(e.openBlock(),e.createBlock(k,{key:2,modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"date")&&h.mode!=="view"?(e.openBlock(),e.createBlock(P,{key:3,style:{width:"100%"},type:"date","value-format":"YYYY-MM-DD",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"time")&&h.mode!=="view"?(e.openBlock(),e.createBlock(f,{key:4,style:{width:"100%"},modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"datetime")&&h.mode!=="view"?(e.openBlock(),e.createBlock(P,{key:5,style:{width:"100%"},type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss",modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:h.mode==="view"},null,8,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0),V(g,"select")&&h.mode!=="view"?(e.openBlock(),e.createBlock(y,{key:6,multiple:(_=(A=g.formItem)==null?void 0:A.select)==null?void 0:_.multiple,"collapse-tags":(S=(m=g.formItem)==null?void 0:m.select)==null?void 0:S.multiple,filterable:(F=(M=g.formItem)==null?void 0:M.select)==null?void 0:F.allowCreate,"allow-create":(X=(W=g.formItem)==null?void 0:W.select)==null?void 0:X.allowCreate,"default-first-option":(L=(ne=g.formItem)==null?void 0:ne.select)==null?void 0:L.allowCreate,modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,disabled:U(g),onChange:v=>G(g)},{default:e.withCtx(()=>{var v,Me;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Me=(v=g.formItem)==null?void 0:v.select)==null?void 0:Me.options,Ue=>(e.openBlock(),e.createBlock(d,{value:Ue.value,label:Ue.label},null,8,["value","label"]))),256))]}),_:2},1032,["multiple","collapse-tags","filterable","allow-create","default-first-option","modelValue","onUpdate:modelValue","disabled","onChange"])):e.createCommentVNode("",!0),V(g,"input-number")&&h.mode!=="view"?(e.openBlock(),e.createBlock(C,{key:7,style:{width:"100%"},modelValue:l[g.prop],"onUpdate:modelValue":v=>l[g.prop]=v,min:(K=(J=(R=g.formItem)==null?void 0:R.inputNumber)==null?void 0:J.min)!=null?K:Number.NEGATIVE_INFINITY,max:(re=(ae=(Z=g.formItem)==null?void 0:Z.inputNumber)==null?void 0:ae.max)!=null?re:Number.POSITIVE_INFINITY,step:(We=(He=(Ve=g.formItem)==null?void 0:Ve.inputNumber)==null?void 0:He.step)!=null?We:1,"value-on-clear":-10},null,8,["modelValue","onUpdate:modelValue","min","max","step"])):e.createCommentVNode("",!0)]}),_:2},1032,["style","prop","label"]))),256))]),_:1},8,["model","rules","inline"])),[[O,i.value]])}}}),[["__scopeId","data-v-b66c7ec9"]]),Kn={class:"console-dialog__body"},Qn={key:0,class:"process-view"},Xn={class:"operation-button-wrapper"},zt=e.defineComponent({__name:"FormDialog",props:{id:{},mode:{},model:{},visible:{type:Boolean},showProcess:{type:Boolean},afterSubmitFunc:{type:Function}},emits:["update:visible","update:id"],setup(t,{expose:o,emit:n}){const{t:r}=_e.useI18n(),a=t,l=e.ref(0),i=n,s=e.ref();e.watch(()=>a.visible,()=>{a.visible&&l.value++});function c(){s.value&&s.value.refresh()}function u(){i("update:visible",!1),s.value.reset()}function b(){s.value.submit()}return o({close:u,refresh:c}),(w,x)=>{const E=e.resolveComponent("el-step"),j=e.resolveComponent("el-steps"),I=e.resolveComponent("el-button"),H=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(H,{class:"console-dialog",title:"Edit","align-center":"","model-value":a.visible,width:"800px",onClose:u},{footer:e.withCtx(()=>{var U;return[e.createElementVNode("div",{class:"dialog-footer",style:e.normalizeStyle({width:a.showProcess?"calc(100% - 350px)":"auto"})},[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((U=a.model.formConfig)==null?void 0:U.dialogButtons,Y=>(e.openBlock(),e.createBlock(I,{onClick:V=>Y.function(s.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)(Y.label)),1)]),_:2},1032,["onClick"]))),256))]),e.createElementVNode("div",null,[e.createVNode(I,{onClick:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.cancel")),1)]),_:1}),e.createVNode(I,{type:"primary",onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("common.basic.save")),1)]),_:1})])],4)]}),default:e.withCtx(()=>[e.createElementVNode("div",Kn,[e.createVNode(jt,{class:"form-view",style:e.normalizeStyle({width:w.showProcess?"calc(100% - 280px)":"100%"}),ref_key:"formViewRef",ref:s,id:a.id,sessionId:l.value,mode:a.mode,model:a.model,afterSubmitFunc:a.afterSubmitFunc,closeDialogFunc:u,disableInline:a.showProcess},null,8,["style","id","sessionId","mode","model","afterSubmitFunc","disableInline"]),w.showProcess?(e.openBlock(),e.createElementBlock("div",Qn,[x[0]||(x[0]=e.createElementVNode("h1",null,"流程动态",-1)),e.createVNode(j,{style:{height:"90%"},direction:"vertical",active:1},{default:e.withCtx(()=>[e.createVNode(E,{title:"Step 1"}),e.createVNode(E,{title:"Step 2"})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),Zn={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function vn(t,o){return e.openBlock(),e.createElementBlock("svg",Zn,o[0]||(o[0]=[e.createElementVNode("path",{fill:"#888a8d",d:"M192 672a16 16 0 0 1 16 16v128h604.992V688a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v160a64 64 0 0 1-56.512 63.552l-7.488.448H176a64 64 0 0 1-64-64V688a16 16 0 0 1 16-16zm268.032-505.664v2.56l-.128 13.248v89.024l.064 46.08V718.72A18.176 18.176 0 0 1 443.2 736h-62.08a18.176 18.176 0 0 1-17.216-16.768V334.464h-1.28l-130.432 129.28a16 16 0 0 1-22.592-.128l-.32-.256L164.544 416a16 16 0 0 1 .448-22.4l86.08-84.736a18.2 18.2 0 0 1 2.688-3.2l142.72-139.648c7.04-6.784 56.512-6.656 63.488.32zm184.832-5.312c9.152.448 16.512 7.68 17.216 16.768v384.704h1.344L793.792 433.28a16 16 0 0 1 22.592.128l.256.256 44.736 47.36a16 16 0 0 1-.448 22.4l-86.08 84.736a18.2 18.2 0 0 1-2.624 3.2l-142.72 139.648c-7.104 6.784-56.512 6.656-63.488-.32v-2.56l.064-13.312V579.84l-.064-17.28V178.304a18.176 18.176 0 0 1 16.768-17.216h62.08z"},null,-1)]))}const er={render:vn},tr={class:"toolbar"},or={class:"tool-buttons"},nr={class:"tool-buttons"},rr={key:2},De=Q(e.defineComponent({__name:"TableView",props:{model:{}},setup(t,{expose:o}){const{t:n}=Pe.global,r=t,a=e.reactive([]),l=e.reactive({}),i=e.ref(""),s=e.ref(!1),c=q.useRouter(),u=e.ref(""),b=e.reactive([]),w=e.reactive([]),x=e.ref(),E=e.ref([]),j=e.ref("create"),I=e.ref(!0),H=e.ref(!1),U=e.ref(""),Y=e.reactive({pageSize:10,pageNo:1,totalElements:0});let V={};const G=e.computed(()=>a.filter(_=>{var m,S;return((m=_.formItem)==null?void 0:m.type)!=="password"&&_.visible!==!1&&((S=_.tableColumn)==null?void 0:S.visible)!==!1}));function h(_,m){var W,X,ne,L;let S=m.row[_.prop];const M=(X=(W=_.tableColumn)==null?void 0:W.functions)==null?void 0:X.transformValue,F=(ne=_.tableColumn)==null?void 0:ne.transformValueMappings;if(M)S=M(S);else if(F&&F.length>0){for(let R of F)if(S===R.value){S=n(R.label);break}}else if(((L=_.formItem)==null?void 0:L.type)==="select"){const R=_.formItem.select;if(R){if(R.viewModeLabelField)S=m.row[R.viewModeLabelField];else if(R.options&&R.options.length>0){for(let J of R.options)if(J.value===m.row[_.prop]){S=J.label;break}}else if(R.useDatableDict&&R.dictId){if(V[R.dictId]===void 0){let K=`${e.computed(()=>window.location.href.indexOf("localhost")>0?"http://localhost.vancone.com:8080":"https://datable.vancone.com/agent/public/0001").value}/api/datable/agent/metadata/dict?dictId=${R.dictId}`;de(K,"GET",{}).then(({data:Z})=>{let ae=[];Array.isArray(Z.data)?ae=Z.data:Z.data.list&&Array.isArray(Z.data.list)&&(ae=Z.data.list),V[R.dictId]=ae;for(let re of V[R.dictId])if(re.dbOrdinal==S){S=re.value;break}})}else for(let J of V[R.dictId])if(J.dbOrdinal==S){S=J.value;break}}}}return S}function N(_,m){var S,M;return _.label?n(_.label):(M=(S=_.functions)==null?void 0:S.transformLabel)==null?void 0:M.call(S,m.$index,m.row)}function p(_){$e(r.model),Object.assign(r.model,_)}function k(){var m,S,M;if(I.value=!0,!r.model||!r.model.api)return;$e(l),Object.assign(l,(m=r.model.tableConfig)!=null?m:{}),l.display=(S=l.display)!=null?S:{},l.display.advancedSearch!==!0&&(l.display.advancedSearch=!1),l.display.fileTaskButton!==!0&&(l.display.fileTaskButton=!1),l.display.pagination!==!1&&(l.display.pagination=!0),l.display.pane!==!1&&(l.display.pane=!0),l.display.searchBox!==!1&&(l.display.searchBox=!0),a.splice(0,a.length,...r.model.fields),i.value=(M=r.model.route)!=null?M:"";let _=Ye({},l.queryParams);_.pageSize=Y.pageSize,_.pageNo=Y.pageNo,_.search=u.value,de(r.model.api,"GET",_).then(({data:F})=>{const{list:W,totalCount:X}=F.data;b.splice(0,b.length,...W),Y.totalElements=X,I.value=!1})}function P(){var _,m;l.createPageRoutePath!==void 0?c.push(l.createPageRoutePath):((_=l.functions)==null?void 0:_.create)!==void 0?(m=l.functions)==null||m.create():(j.value="create",U.value="",s.value=!0)}function f(_,m){r.model.api&&de(r.model.api,"DELETE",m.id).then(({data:S})=>{S.code===0&&(s.value=!1,k())})}function d(){ge.ElMessageBox.confirm("The selected items will be deleted. Continue?",n("common.table.warning"),{confirmButtonText:n("common.basic.confirm"),cancelButtonText:n("common.basic.cancel"),type:"warning"}).then(()=>{var _,m;if(((_=l.functions)==null?void 0:_.batchDelete)!==void 0)(m=l.functions)==null||m.batchDelete(E.value);else{const S=E.value.map(M=>M.id);ie.delete(`${r.model.api}/${S.join(",")}`).then(({data:M})=>{M.code===0&&(s.value=!1,k())})}x.value.clearSelection()}).catch(()=>{x.value.clearSelection()})}function y(_){Y.pageSize=_,k()}function C(_){Y.pageNo=_,k()}function $(_,m){l.editPageRoutePath!==void 0?c.push({path:l.editPageRoutePath,query:{id:m.id}}):(U.value=m.id,j.value="update",s.value=!0)}function T(){var S;let _=((S=r.model.api)!=null&&S.startsWith("http")?"":window.location.origin)+r.model.api+"/export";const m=l.queryParams;m!==void 0&&Object.keys(m).length>0&&(_+="?",Object.entries(l.queryParams).map(M=>{_+=`${M[0]}=${M[1]}&`})),window.open(_)}function O(_){E.value=_}function g(_){const m="i18n(",S=")",M=_.label;return M?M.startsWith(m)&&M.endsWith(S)?n(M.slice(m.length,-S.length)):M:_.prop.slice(0,1).toUpperCase()+_.prop.slice(1).toLowerCase()}function D(_){_?(H.value=!0,w.splice(0,w.length,...b),b.splice(0,b.length,...E.value)):(H.value=!1,b.splice(0,b.length,...w))}function A(){var W;if(E.value.length===0){ge.ElMessageBox.alert("Select rows before printing","Print",{confirmButtonText:"OK"});return}let _="";G.value.forEach(X=>{_+=`<th>${g(X)}</th>`});let m="";E.value.forEach(X=>{m+="<tr>",G.value.forEach(ne=>{m+=`<td>${X[ne.prop]}</td>`}),m+="</tr>"});let S=`<table><tr>${_}</tr>${m}</table>`;const M=document.createElement("iframe");M.style.display="none",document.body.appendChild(M);const F=M.contentDocument||((W=M.contentWindow)==null?void 0:W.document);F==null||F.open(),F==null||F.write(`
12
12
  <!DOCTYPE html>
13
13
  <html>
14
14
  <head>
@@ -57,4 +57,4 @@ This will fail in production.`);s=Ie,s._s.has(r)||(l?nt(r,o,a,s):Tt(r,a,s),proce
57
57
  <\/script>
58
58
  </body>
59
59
  </html>
60
- `),A==null||A.close()}return e.watch(()=>r.model,()=>{k()},{deep:!0,immediate:!0}),o({multipleSelection:E,refresh:k,updateConfigAndRefresh:p}),(_,m)=>{var v,Me,Ue;const S=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-badge"),A=e.resolveComponent("el-button"),W=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),ne=e.resolveComponent("el-dropdown"),L=e.resolveComponent("el-icon"),F=e.resolveComponent("el-tooltip"),J=e.resolveComponent("el-input"),K=e.resolveComponent("el-table-column"),Z=e.resolveComponent("router-link"),ae=e.resolveComponent("el-tag"),re=e.resolveComponent("el-popconfirm"),Ve=e.resolveComponent("el-table"),He=e.resolveComponent("el-pagination"),We=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"table-view-wrapper":(v=l.display)==null?void 0:v.pane})},[e.createElementVNode("div",tr,[e.createElementVNode("div",or,[l.selectMode?(e.openBlock(),e.createBlock(M,{key:0,value:E.value.length,type:"primary",class:"selected-badge"},{default:e.withCtx(()=>[e.createVNode(S,{class:"selected-checkbox",border:!0,label:e.unref(n)("common.table.viewSelected"),onChange:D},null,8,["label"])]),_:1},8,["value"])):e.createCommentVNode("",!0),!l.selectMode&&!l.readOnly&&l.creatable!==!1?(e.openBlock(),e.createBlock(A,{key:1,type:"primary",onClick:P},{default:e.withCtx(()=>{var le,z;return[e.createTextVNode(e.toDisplayString(((le=l.labels)==null?void 0:le.create)!=null?e.unref(n)((z=l.labels)==null?void 0:z.create):e.unref(n)("common.table.create")),1)]}),_:1})):e.createCommentVNode("",!0),!l.selectMode&&!l.readOnly&&l.deletable!==!1?(e.openBlock(),e.createBlock(A,{key:2,disabled:E.value.length==0,type:"danger",plain:"",onClick:d},{default:e.withCtx(()=>{var le,z;return[e.createTextVNode(e.toDisplayString(((le=l.labels)==null?void 0:le.delete)!=null?e.unref(n)((z=l.labels)==null?void 0:z.delete):e.unref(n)("common.table.delete")),1)]}),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(A,{icon:e.unref(ee.Refresh),style:{width:"28px"},onClick:k},null,8,["icon"]),(Me=l.display)!=null&&Me.fileTaskButton?(e.openBlock(),e.createBlock(ne,{key:3,placement:"bottom-start",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(W,{icon:e.unref(ee.Upload),disabled:!0},{default:e.withCtx(()=>m[3]||(m[3]=[e.createTextVNode("导入")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Download),divided:"",disabled:!0},{default:e.withCtx(()=>m[4]||(m[4]=[e.createTextVNode("导出选中内容")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Download),onClick:T},{default:e.withCtx(()=>m[5]||(m[5]=[e.createTextVNode("导出查询结果")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Document),divided:"",disabled:!0},{default:e.withCtx(()=>m[6]||(m[6]=[e.createTextVNode("任务中心")])),_:1},8,["icon"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(A,{style:{width:"28px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(er))]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(ne,{placement:"bottom-start",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(W,{icon:e.unref(ee.Printer),onClick:R},{default:e.withCtx(()=>m[7]||(m[7]=[e.createTextVNode("打印")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Setting),disabled:!0},{default:e.withCtx(()=>m[8]||(m[8]=[e.createTextVNode("表格设置")])),_:1},8,["icon"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(A,{icon:e.unref(ee.MoreFilled),style:{width:"28px"}},null,8,["icon"])]),_:1}),l.tooltip?(e.openBlock(),e.createBlock(F,{key:4,effect:"dark",content:e.unref(n)(l.tooltip),placement:"right"},{default:e.withCtx(()=>[e.createVNode(L,{style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.QuestionFilled))]),_:1})]),_:1},8,["content"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nr,[e.createVNode(J,{placeholder:`${e.unref(n)("common.table.search")}...`,modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=le=>u.value=le)},{append:e.withCtx(()=>[e.createVNode(A,{style:{"margin-left":"-20px"},icon:e.unref(ee.Search),onClick:k},null,8,["icon"])]),_:1},8,["placeholder","modelValue"]),(Ue=l.display)!=null&&Ue.advancedSearch?(e.openBlock(),e.createBlock(A,{key:0,type:"text"},{default:e.withCtx(()=>m[9]||(m[9]=[e.createTextVNode("高级搜索")])),_:1})):e.createCommentVNode("",!0)])]),e.withDirectives((e.openBlock(),e.createBlock(Ve,{border:!0,ref_key:"tableRef",ref:x,data:b,onSelectionChange:O,class:"table"},{default:e.withCtx(()=>{var le;return[l.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K,{key:0,type:"selection",width:"50"})),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,z=>{var ye;return e.openBlock(),e.createBlock(K,{prop:z.prop,label:g(z),width:(ye=z.tableColumn)==null?void 0:ye.width,"show-overflow-tooltip":""},{default:e.withCtx(Ne=>{var xe,Ae,Wt;return[(xe=z.tableColumn)!=null&&xe.link?(e.openBlock(),e.createBlock(Z,{key:0,class:"router-link",to:`/${i.value}/detail?id=${Ne.row.id}`},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h(z,Ne)),1)]),_:2},1032,["to"])):(Ae=z.tableColumn)!=null&&Ae.routerLink?(e.openBlock(),e.createBlock(Z,{key:1,class:"router-link",to:z.tableColumn.routerLink.replace("{id}",Ne.row.id)},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h(z,Ne)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",rr,e.toDisplayString(h(z,Ne)),1)),((Wt=z.tableColumn)==null?void 0:Wt.type)==="tag"?(e.openBlock(),e.createBlock(ae,{key:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Ne.row[z.prop]),1)]),_:2},1024)):e.createCommentVNode("",!0)]}),_:2},1032,["prop","label","width"])}),256)),l.operations===void 0&&!((le=l.selectMode)!=null&&le)&&!l.readOnly?(e.openBlock(),e.createBlock(K,{key:1,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(z=>[l.updatable!==!1?(e.openBlock(),e.createBlock(A,{key:0,link:"",type:"primary",class:"operation-button",onClick:ye=>$(z.$index,z.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.edit")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),e.createVNode(re,{title:"Are you sure to delete this?",onConfirm:ye=>f(z.$index,z.row)},{reference:e.withCtx(()=>[l.deletable!==!1?(e.openBlock(),e.createBlock(A,{key:0,link:"",type:"primary",class:"operation-button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.delete")),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["onConfirm"])]),_:1},8,["label"])):e.createCommentVNode("",!0),l.operations!==void 0&&!l.readOnly?(e.openBlock(),e.createBlock(K,{key:2,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(z=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.operations,ye=>(e.openBlock(),e.createBlock(A,{class:"operation-button",link:"",type:"primary",key:ye.label,onClick:Ne=>{var xe,Ae;return((Ae=(xe=ye.functions)==null?void 0:xe.click)==null?void 0:Ae.call(xe,z.$index,z.row))&&k()}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N(ye,z)),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["label"])):e.createCommentVNode("",!0)]}),_:1},8,["data"])),[[We,I.value]]),H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(He,{key:0,size:"small",background:"",onSizeChange:y,onCurrentChange:C,currentPage:Y.pageNo,"onUpdate:currentPage":m[1]||(m[1]=le=>Y.pageNo=le),"page-sizes":[10,20,50,100],"page-size":Y.pageSize,layout:"total, sizes, prev, pager, next",total:Y.totalElements},null,8,["currentPage","page-size","total"])),e.createVNode(zt,{model:_.model,mode:j.value,id:U.value,afterSubmitFunc:k,visible:s.value,"onUpdate:visible":m[2]||(m[2]=le=>s.value=le)},null,8,["model","mode","id","visible"])],2)}}}),[["__scopeId","data-v-b44508a2"]]),ar={class:"nav-bar"},lr={style:{"font-size":"16px"}},sr={key:0,class:"info-card-wrapper"},ir={class:"icon-wrapper"},cr={class:"info-wrapper"},dr={class:"title-wrapper"},pr={class:"tabs-wrapper"},fr={class:"dialog-footer"},qt=Q(e.defineComponent({__name:"DetailPage",setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=e.computed(()=>n.query.id),l=e.ref(!1),i=e.ref(!1),s=e.ref("view"),c=e.ref(),u=e.ref(-1),b=e.ref(),w=e.ref(),x=e.ref("summary"),E=e.ref(""),j=e.ref(""),I=e.ref(""),H=e.ref(0),U=e.reactive({api:"",fields:[]}),Y=e.reactive([]);let V=[];e.watch([()=>r.currentRoute.value,se],()=>{p()},{immediate:!0,deep:!0});function G(f){u.value=parseInt(f.index)-1}function h(){var C;let f=(C=V[u.value].api)==null?void 0:C.replace("/select","");f=f==null?void 0:f.substring(f.lastIndexOf("/"));const d=U.api+"/"+a.value+f,y=w.value.multipleSelection.map($=>$.id);de(d,"POST",y).then(()=>{b.value.refresh(),i.value=!1})}function N(f,d,y){var T;y.functions||(y.functions={}),y.functions.create=()=>{i.value=!0,w.value&&w.value.refresh()};let C=fe.cloneDeep(d);C.tableConfig||(C.tableConfig={}),C.tableConfig.selectMode=!0,C.tableConfig.queryParams={},f.queryParamName&&(C.tableConfig.queryParams[f.queryParamName]=a.value);for(var $ in C.fields)C.fields[$].tableColumn&&(T=C.fields[$].tableColumn)!=null&&T.link&&(C.fields[$].tableColumn.link=!1);V.push(C),y.labels={create:"common.table.add",delete:"common.table.remove"},y.functions.batchDelete=O=>{var _;let g=(_=V[u.value].api)==null?void 0:_.replace("/select","");g=g==null?void 0:g.substring(g.lastIndexOf("/"));const D=U.api+"/"+a.value+g,R=O.map(m=>m.id);ie.delete(`${D}/${R.join(",")}`).then(({data:m})=>{m.code===0&&b.value.refresh()})},y.operations=[{label:"common.table.remove",functions:{click:(O,g)=>{var _;let D=(_=V[u.value].api)==null?void 0:_.replace("/select","");D=D==null?void 0:D.substring(D.lastIndexOf("/"));const R=U.api+"/"+a.value+D;de(R,"DELETE",g.id).then(()=>{b.value.refresh()})}}}],C.api+="/select"}function p(){var C,$,T;Y.splice(0);const f=n.params.model;if(se.value[f]===void 0){console.warn("Detail page model not exist:",f);return}else console.debug("Detail page model found:",f,se.value[f]);$e(U);const d=fe.cloneDeep(se.value[f]);Object.assign(U,d),H.value++,u.value=-1,x.value="summary";const y=($=(C=U.pageConfig)==null?void 0:C.detailPage)==null?void 0:$.tabs;if(y)for(let O of y){const g=fe.cloneDeep(se.value[O.modelKey]);if(Y.push(g),O.type==="table"){g.tableConfig||(g.tableConfig={});let D=g.tableConfig;D.display={pane:!1},O.modelRelationType==="associated"?N(O,g,D):O.modelRelationType==="child"&&(V.push({fields:[]}),g.formConfig===void 0&&(g.formConfig={}),g.formConfig.functions===void 0&&(g.formConfig.functions={}),O.queryParamName&&(g.formConfig.functions.beforeSubmit=R=>{R[O.queryParamName]=a.value;const _=g.formConfig.functions.beforeSubmit;_!==void 0&&_()})),D.queryParams||(D.queryParams={}),O.queryParamName&&(D.queryParams[O.queryParamName]=a.value),O.queryParams&&Object.assign(D.queryParams,O.queryParams),D.readOnly=(T=O.readOnly)!=null?T:!1,O.includeFields&&(g.fields=g.fields.filter(R=>{var _;return(_=O.includeFields)==null?void 0:_.includes(R.prop)})),O.excludeFields&&(g.fields=g.fields.filter(R=>{var _;return!((_=O.excludeFields)!=null&&_.includes(R.prop))})),O.tooltip&&(D.tooltip=O.tooltip)}}}e.watch([()=>{var f,d;return(d=(f=U.pageConfig)==null?void 0:f.detailPage)==null?void 0:d.infoCard},()=>{var f;return(f=c.value)==null?void 0:f.formData}],f=>{e.nextTick(()=>{var y,C,$;const d=(C=(y=U.pageConfig)==null?void 0:y.detailPage)==null?void 0:C.infoCard;d&&(E.value=d.titleFieldProp?c.value.formData[d.titleFieldProp]:"",j.value=d.subtitleFieldProp?c.value.formData[d.subtitleFieldProp]:"",I.value=d.tagFieldProp?c.value.formData[d.tagFieldProp]:"",($=U.fields)==null||$.forEach(T=>{var O,g;if(T.prop===d.tagFieldProp){const D=(g=(O=T.tableColumn)==null?void 0:O.functions)==null?void 0:g.transformValue;D&&(I.value=D(I.value))}}))})},{immediate:!0,deep:!0});function k(){l.value=!0}function P(){c.value.refresh()}return(f,d)=>{var S,M,A,W,X,ne;const y=e.resolveComponent("el-page-header"),C=e.resolveComponent("el-button"),$=e.resolveComponent("el-icon"),T=e.resolveComponent("el-dropdown-item"),O=e.resolveComponent("el-dropdown-menu"),g=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-tag"),R=e.resolveComponent("el-tab-pane"),_=e.resolveComponent("el-tabs"),m=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ar,[e.createVNode(y,{onClick:d[0]||(d[0]=L=>e.unref(r).back())},{title:e.withCtx(()=>d[5]||(d[5]=[e.createElementVNode("span",null,null,-1)])),content:e.withCtx(()=>{var L;return[e.createElementVNode("span",lr,e.toDisplayString(e.unref(o)((L=U==null?void 0:U.name)!=null?L:"")),1)]}),_:1}),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.edit")),1)]),_:1}),((M=(S=U.pageConfig)==null?void 0:S.detailPage)==null?void 0:M.operationButtons)!==void 0?(e.openBlock(),e.createBlock(g,{key:0},{dropdown:e.withCtx(()=>[e.createVNode(O,null,{default:e.withCtx(()=>{var L,F;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((F=(L=U.pageConfig)==null?void 0:L.detailPage)==null?void 0:F.operationButtons,J=>(e.openBlock(),e.createBlock(T,{onClick:K=>J.function(c.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)(J.label)),1)]),_:2},1032,["onClick"]))),256))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(C,{style:{margin:"0 10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.more")),1),e.createVNode($,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.ArrowDown))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(C,{onClick:P,style:{"border-color":"#bbb",width:"30px"}},{default:e.withCtx(()=>[e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Refresh))]),_:1})]),_:1})])]),(W=(A=U.pageConfig)==null?void 0:A.detailPage)!=null&&W.infoCard?(e.openBlock(),e.createElementBlock("div",sr,[e.createElementVNode("div",ir,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((X=U.pageConfig.detailPage.infoCard.icon)!=null?X:""),{class:"icon"}))]),e.createElementVNode("div",cr,[e.createElementVNode("div",dr,[e.createElementVNode("h1",null,e.toDisplayString(E.value),1),((ne=I.value)==null?void 0:ne.length)>0?(e.openBlock(),e.createBlock(D,{key:0,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(j.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",pr,[e.createVNode(_,{modelValue:x.value,"onUpdate:modelValue":d[1]||(d[1]=L=>x.value=L),onTabClick:G},{default:e.withCtx(()=>{var L,F;return[e.createVNode(R,{label:e.unref(o)("common.basic.summary"),name:"summary"},{default:e.withCtx(()=>[e.createVNode(jt,{ref_key:"formViewRef",ref:c,id:a.value,sessionId:H.value,mode:s.value,model:U},null,8,["id","sessionId","mode","model"])]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((F=(L=U.pageConfig)==null?void 0:L.detailPage)==null?void 0:F.tabs,J=>{var K;return e.openBlock(),e.createBlock(R,{label:e.unref(o)((K=J.name)!=null?K:"")},null,8,["label"])}),256))]}),_:1},8,["modelValue"]),u.value>=0?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"tabPaneTableRef",ref:b,model:Y[u.value]},null,8,["model"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:i.value,"onUpdate:modelValue":d[3]||(d[3]=L=>i.value=L),title:e.unref(o)("common.table.select"),width:"800px"},{footer:e.withCtx(()=>[e.createElementVNode("span",fr,[e.createVNode(C,{onClick:d[2]||(d[2]=L=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.cancel")),1)]),_:1}),e.createVNode(C,{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.save")),1)]),_:1})])]),default:e.withCtx(()=>[u.value>=0?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"selectTableRef",ref:w,model:e.unref(V)[u.value]},null,8,["model"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]),e.createVNode(zt,{id:a.value,mode:"update",visible:l.value,"onUpdate:visible":d[4]||(d[4]=L=>l.value=L),model:U,afterSubmitFunc:P},null,8,["id","visible","model"])],64)}}}),[["__scopeId","data-v-8d3a22aa"]]),mr={class:"page-title"},Ht=Q(e.defineComponent({__name:"TablePage",setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=e.ref(),l=e.ref([]),i=e.reactive({api:"",fields:[]}),s=e.reactive(Ye({},i));function c(){var b,w,x,E,j;l.value=[],i.pageConfig&&((w=(b=i.pageConfig)==null?void 0:b.tablePage)!=null&&w.tabViewAttributes)&&(l.value=(j=(E=(x=i.pageConfig)==null?void 0:x.tablePage)==null?void 0:E.tabViewAttributes)==null?void 0:j.map(I=>{let H;return I.modelKey&&se.value[I.modelKey]?H=fe.cloneDeep(se.value[I.modelKey]):H=fe.cloneDeep(i),I.queryParams&&(H.tableConfig||(H.tableConfig={}),H.tableConfig.queryParams=I.queryParams),I.fields&&(H.fields=I.fields),I.modelKey&&(H.breadcrumbRoute=i.route),{key:I.key,label:I.label,icon:I.icon,disabled:I.disabled,model:H}}))}function u(){var x,E;console.log("TablePage.init: loading model:",n.params.model),console.log("TablePage.init: current model list",se.value);const b=n.params.model;if(se.value[b]===void 0){console.warn("TablePage.init: model not found",b,se.value);return}$e(i);const w=fe.cloneDeep(se.value[b]);Object.assign(i,w),(E=(x=i.pageConfig)==null?void 0:x.tablePage)!=null&&E.tabViewAttributes||Object.assign(s,i),c()}return e.watch([()=>r.currentRoute.value,se],()=>{u()},{immediate:!0,deep:!0}),(b,w)=>{var E;const x=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",mr,e.toDisplayString(e.unref(o)((E=i.name)!=null?E:"")),1),e.createVNode(x,null,{default:e.withCtx(()=>{var j,I;return[(I=(j=i.pageConfig)==null?void 0:j.tablePage)!=null&&I.tabViewAttributes?(e.openBlock(),e.createBlock(st,{key:0,class:"tabs-wrapper",cards:l.value,tableRef:a.value},null,8,["cards","tableRef"])):e.createCommentVNode("",!0)]}),_:1}),e.createVNode(De,{class:"table-wrapper",ref_key:"tableRef",ref:a,model:s},null,8,["model"])],64)}}}),[["__scopeId","data-v-1a472785"]]),ur=[it,Rt,Ke,Lt,Gt,lt,st,De,qt,Ht],hr=t=>{t&&t.component&&ur.forEach(o=>{console.log("component",o.__name,o),t.component(o.__name,o)})};B.Building=it,B.ConsoleApp=Rt,B.DetailPage=qt,B.Header=Ke,B.NoPermission=Lt,B.Secondary=Gt,B.SideMenu=lt,B.TabCard=st,B.TablePage=Ht,B.TableView=De,B.activeMenuMapping=mt,B.default=hr,B.en=pt,B.i18n=Pe,B.menuList=Qe,B.modelList=se,B.pinia=qe,B.useConsoleStore=at,B.zh=ft,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
60
+ `),F==null||F.close()}return e.watch(()=>r.model,()=>{k()},{deep:!0,immediate:!0}),o({multipleSelection:E,refresh:k,updateConfigAndRefresh:p}),(_,m)=>{var v,Me,Ue;const S=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-badge"),F=e.resolveComponent("el-button"),W=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),ne=e.resolveComponent("el-dropdown"),L=e.resolveComponent("el-icon"),R=e.resolveComponent("el-tooltip"),J=e.resolveComponent("el-input"),K=e.resolveComponent("el-table-column"),Z=e.resolveComponent("router-link"),ae=e.resolveComponent("el-tag"),re=e.resolveComponent("el-popconfirm"),Ve=e.resolveComponent("el-table"),He=e.resolveComponent("el-pagination"),We=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"table-view-wrapper":(v=l.display)==null?void 0:v.pane})},[e.createElementVNode("div",tr,[e.createElementVNode("div",or,[l.selectMode?(e.openBlock(),e.createBlock(M,{key:0,value:E.value.length,type:"primary",class:"selected-badge"},{default:e.withCtx(()=>[e.createVNode(S,{class:"selected-checkbox",border:!0,label:e.unref(n)("common.table.viewSelected"),onChange:D},null,8,["label"])]),_:1},8,["value"])):e.createCommentVNode("",!0),!l.selectMode&&!l.readOnly&&l.creatable!==!1?(e.openBlock(),e.createBlock(F,{key:1,type:"primary",onClick:P},{default:e.withCtx(()=>{var le,z;return[e.createTextVNode(e.toDisplayString(((le=l.labels)==null?void 0:le.create)!=null?e.unref(n)((z=l.labels)==null?void 0:z.create):e.unref(n)("common.table.create")),1)]}),_:1})):e.createCommentVNode("",!0),!l.selectMode&&!l.readOnly&&l.deletable!==!1?(e.openBlock(),e.createBlock(F,{key:2,disabled:E.value.length==0,type:"danger",plain:"",onClick:d},{default:e.withCtx(()=>{var le,z;return[e.createTextVNode(e.toDisplayString(((le=l.labels)==null?void 0:le.delete)!=null?e.unref(n)((z=l.labels)==null?void 0:z.delete):e.unref(n)("common.table.delete")),1)]}),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(F,{icon:e.unref(ee.Refresh),style:{width:"28px"},onClick:k},null,8,["icon"]),(Me=l.display)!=null&&Me.fileTaskButton?(e.openBlock(),e.createBlock(ne,{key:3,placement:"bottom-start",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(W,{icon:e.unref(ee.Upload),disabled:!0},{default:e.withCtx(()=>m[3]||(m[3]=[e.createTextVNode("导入")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Download),divided:"",disabled:!0},{default:e.withCtx(()=>m[4]||(m[4]=[e.createTextVNode("导出选中内容")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Download),onClick:T},{default:e.withCtx(()=>m[5]||(m[5]=[e.createTextVNode("导出查询结果")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Document),divided:"",disabled:!0},{default:e.withCtx(()=>m[6]||(m[6]=[e.createTextVNode("任务中心")])),_:1},8,["icon"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(F,{style:{width:"28px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(er))]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(ne,{placement:"bottom-start",trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(W,{icon:e.unref(ee.Printer),onClick:A},{default:e.withCtx(()=>m[7]||(m[7]=[e.createTextVNode("打印")])),_:1},8,["icon"]),e.createVNode(W,{icon:e.unref(ee.Setting),disabled:!0},{default:e.withCtx(()=>m[8]||(m[8]=[e.createTextVNode("表格设置")])),_:1},8,["icon"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(F,{icon:e.unref(ee.MoreFilled),style:{width:"28px"}},null,8,["icon"])]),_:1}),l.tooltip?(e.openBlock(),e.createBlock(R,{key:4,effect:"dark",content:e.unref(n)(l.tooltip),placement:"right"},{default:e.withCtx(()=>[e.createVNode(L,{style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.QuestionFilled))]),_:1})]),_:1},8,["content"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nr,[e.createVNode(J,{placeholder:`${e.unref(n)("common.table.search")}...`,modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=le=>u.value=le)},{append:e.withCtx(()=>[e.createVNode(F,{style:{"margin-left":"-20px"},icon:e.unref(ee.Search),onClick:k},null,8,["icon"])]),_:1},8,["placeholder","modelValue"]),(Ue=l.display)!=null&&Ue.advancedSearch?(e.openBlock(),e.createBlock(F,{key:0,type:"text"},{default:e.withCtx(()=>m[9]||(m[9]=[e.createTextVNode("高级搜索")])),_:1})):e.createCommentVNode("",!0)])]),e.withDirectives((e.openBlock(),e.createBlock(Ve,{border:!0,ref_key:"tableRef",ref:x,data:b,onSelectionChange:O,class:"table"},{default:e.withCtx(()=>{var le;return[l.readOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K,{key:0,type:"selection",width:"50"})),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,z=>{var ye;return e.openBlock(),e.createBlock(K,{prop:z.prop,label:g(z),width:(ye=z.tableColumn)==null?void 0:ye.width,"show-overflow-tooltip":""},{default:e.withCtx(Ne=>{var xe,Ae,Wt;return[(xe=z.tableColumn)!=null&&xe.link?(e.openBlock(),e.createBlock(Z,{key:0,class:"router-link",to:`/${i.value}/detail?id=${Ne.row.id}`},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h(z,Ne)),1)]),_:2},1032,["to"])):(Ae=z.tableColumn)!=null&&Ae.routerLink?(e.openBlock(),e.createBlock(Z,{key:1,class:"router-link",to:z.tableColumn.routerLink.replace("{id}",Ne.row.id)},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h(z,Ne)),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",rr,e.toDisplayString(h(z,Ne)),1)),((Wt=z.tableColumn)==null?void 0:Wt.type)==="tag"?(e.openBlock(),e.createBlock(ae,{key:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Ne.row[z.prop]),1)]),_:2},1024)):e.createCommentVNode("",!0)]}),_:2},1032,["prop","label","width"])}),256)),l.operations===void 0&&!((le=l.selectMode)!=null&&le)&&!l.readOnly?(e.openBlock(),e.createBlock(K,{key:1,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(z=>[l.updatable!==!1?(e.openBlock(),e.createBlock(F,{key:0,link:"",type:"primary",class:"operation-button",onClick:ye=>$(z.$index,z.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.edit")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),e.createVNode(re,{title:"Are you sure to delete this?",onConfirm:ye=>f(z.$index,z.row)},{reference:e.withCtx(()=>[l.deletable!==!1?(e.openBlock(),e.createBlock(F,{key:0,link:"",type:"primary",class:"operation-button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("common.table.delete")),1)]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["onConfirm"])]),_:1},8,["label"])):e.createCommentVNode("",!0),l.operations!==void 0&&!l.readOnly?(e.openBlock(),e.createBlock(K,{key:2,label:e.unref(n)("common.table.operation"),width:"120"},{default:e.withCtx(z=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.operations,ye=>(e.openBlock(),e.createBlock(F,{class:"operation-button",link:"",type:"primary",key:ye.label,onClick:Ne=>{var xe,Ae;return((Ae=(xe=ye.functions)==null?void 0:xe.click)==null?void 0:Ae.call(xe,z.$index,z.row))&&k()}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N(ye,z)),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["label"])):e.createCommentVNode("",!0)]}),_:1},8,["data"])),[[We,I.value]]),H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(He,{key:0,size:"small",background:"",onSizeChange:y,onCurrentChange:C,currentPage:Y.pageNo,"onUpdate:currentPage":m[1]||(m[1]=le=>Y.pageNo=le),"page-sizes":[10,20,50,100],"page-size":Y.pageSize,layout:"total, sizes, prev, pager, next",total:Y.totalElements},null,8,["currentPage","page-size","total"])),e.createVNode(zt,{model:_.model,mode:j.value,id:U.value,afterSubmitFunc:k,visible:s.value,"onUpdate:visible":m[2]||(m[2]=le=>s.value=le)},null,8,["model","mode","id","visible"])],2)}}}),[["__scopeId","data-v-b44508a2"]]),ar={class:"nav-bar"},lr={style:{"font-size":"16px"}},sr={key:0,class:"info-card-wrapper"},ir={class:"icon-wrapper"},cr={class:"info-wrapper"},dr={class:"title-wrapper"},pr={class:"tabs-wrapper"},fr={class:"dialog-footer"},qt=Q(e.defineComponent({__name:"DetailPage",setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=e.computed(()=>n.query.id),l=e.ref(!1),i=e.ref(!1),s=e.ref("view"),c=e.ref(),u=e.ref(-1),b=e.ref(),w=e.ref(),x=e.ref("summary"),E=e.ref(""),j=e.ref(""),I=e.ref(""),H=e.ref(0),U=e.reactive({api:"",fields:[]}),Y=e.reactive([]);let V=[];e.watch([()=>r.currentRoute.value,se],()=>{p()},{immediate:!0,deep:!0});function G(f){u.value=parseInt(f.index)-1}function h(){var C;let f=(C=V[u.value].api)==null?void 0:C.replace("/select","");f=f==null?void 0:f.substring(f.lastIndexOf("/"));const d=U.api+"/"+a.value+f,y=w.value.multipleSelection.map($=>$.id);de(d,"POST",y).then(()=>{b.value.refresh(),i.value=!1})}function N(f,d,y){var T;y.functions||(y.functions={}),y.functions.create=()=>{i.value=!0,w.value&&w.value.refresh()};let C=fe.cloneDeep(d);C.tableConfig||(C.tableConfig={}),C.tableConfig.selectMode=!0,C.tableConfig.queryParams={},f.queryParamName&&(C.tableConfig.queryParams[f.queryParamName]=a.value);for(var $ in C.fields)C.fields[$].tableColumn&&(T=C.fields[$].tableColumn)!=null&&T.link&&(C.fields[$].tableColumn.link=!1);V.push(C),y.labels={create:"common.table.add",delete:"common.table.remove"},y.functions.batchDelete=O=>{var _;let g=(_=V[u.value].api)==null?void 0:_.replace("/select","");g=g==null?void 0:g.substring(g.lastIndexOf("/"));const D=U.api+"/"+a.value+g,A=O.map(m=>m.id);ie.delete(`${D}/${A.join(",")}`).then(({data:m})=>{m.code===0&&b.value.refresh()})},y.operations=[{label:"common.table.remove",functions:{click:(O,g)=>{var _;let D=(_=V[u.value].api)==null?void 0:_.replace("/select","");D=D==null?void 0:D.substring(D.lastIndexOf("/"));const A=U.api+"/"+a.value+D;de(A,"DELETE",g.id).then(()=>{b.value.refresh()})}}}],C.api+="/select"}function p(){var C,$,T;Y.splice(0);const f=n.params.model;if(se.value[f]===void 0){console.warn("Detail page model not exist:",f);return}else console.debug("Detail page model found:",f,se.value[f]);$e(U);const d=fe.cloneDeep(se.value[f]);Object.assign(U,d),H.value++,u.value=-1,x.value="summary";const y=($=(C=U.pageConfig)==null?void 0:C.detailPage)==null?void 0:$.tabs;if(y)for(let O of y){const g=fe.cloneDeep(se.value[O.modelKey]);if(Y.push(g),O.type==="table"){g.tableConfig||(g.tableConfig={});let D=g.tableConfig;if(D.display={pane:!1},O.modelRelationType==="associated")N(O,g,D);else if(O.modelRelationType==="child"){V.push({fields:[]}),g.formConfig===void 0&&(g.formConfig={}),g.formConfig.functions===void 0&&(g.formConfig.functions={});const A=g.formConfig.functions.beforeSubmit;O.queryParamName&&(g.formConfig.functions.beforeSubmit=_=>{_[O.queryParamName]=a.value,A!==void 0&&A(_)})}D.queryParams||(D.queryParams={}),O.queryParamName&&(D.queryParams[O.queryParamName]=a.value),O.queryParams&&Object.assign(D.queryParams,O.queryParams),D.readOnly=(T=O.readOnly)!=null?T:!1,O.includeFields&&(g.fields=g.fields.filter(A=>{var _;return(_=O.includeFields)==null?void 0:_.includes(A.prop)})),O.excludeFields&&(g.fields=g.fields.filter(A=>{var _;return!((_=O.excludeFields)!=null&&_.includes(A.prop))})),O.tooltip&&(D.tooltip=O.tooltip)}}}e.watch([()=>{var f,d;return(d=(f=U.pageConfig)==null?void 0:f.detailPage)==null?void 0:d.infoCard},()=>{var f;return(f=c.value)==null?void 0:f.formData}],f=>{e.nextTick(()=>{var y,C,$;const d=(C=(y=U.pageConfig)==null?void 0:y.detailPage)==null?void 0:C.infoCard;d&&(E.value=d.titleFieldProp?c.value.formData[d.titleFieldProp]:"",j.value=d.subtitleFieldProp?c.value.formData[d.subtitleFieldProp]:"",I.value=d.tagFieldProp?c.value.formData[d.tagFieldProp]:"",($=U.fields)==null||$.forEach(T=>{var O,g;if(T.prop===d.tagFieldProp){const D=(g=(O=T.tableColumn)==null?void 0:O.functions)==null?void 0:g.transformValue;D&&(I.value=D(I.value))}}))})},{immediate:!0,deep:!0});function k(){l.value=!0}function P(){c.value.refresh()}return(f,d)=>{var S,M,F,W,X,ne;const y=e.resolveComponent("el-page-header"),C=e.resolveComponent("el-button"),$=e.resolveComponent("el-icon"),T=e.resolveComponent("el-dropdown-item"),O=e.resolveComponent("el-dropdown-menu"),g=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-tag"),A=e.resolveComponent("el-tab-pane"),_=e.resolveComponent("el-tabs"),m=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ar,[e.createVNode(y,{onClick:d[0]||(d[0]=L=>e.unref(r).back())},{title:e.withCtx(()=>d[5]||(d[5]=[e.createElementVNode("span",null,null,-1)])),content:e.withCtx(()=>{var L;return[e.createElementVNode("span",lr,e.toDisplayString(e.unref(o)((L=U==null?void 0:U.name)!=null?L:"")),1)]}),_:1}),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.table.edit")),1)]),_:1}),((M=(S=U.pageConfig)==null?void 0:S.detailPage)==null?void 0:M.operationButtons)!==void 0?(e.openBlock(),e.createBlock(g,{key:0},{dropdown:e.withCtx(()=>[e.createVNode(O,null,{default:e.withCtx(()=>{var L,R;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((R=(L=U.pageConfig)==null?void 0:L.detailPage)==null?void 0:R.operationButtons,J=>(e.openBlock(),e.createBlock(T,{onClick:K=>J.function(c.value.formData)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)(J.label)),1)]),_:2},1032,["onClick"]))),256))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(C,{style:{margin:"0 10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.more")),1),e.createVNode($,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.ArrowDown))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(C,{onClick:P,style:{"border-color":"#bbb",width:"30px"}},{default:e.withCtx(()=>[e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Refresh))]),_:1})]),_:1})])]),(W=(F=U.pageConfig)==null?void 0:F.detailPage)!=null&&W.infoCard?(e.openBlock(),e.createElementBlock("div",sr,[e.createElementVNode("div",ir,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((X=U.pageConfig.detailPage.infoCard.icon)!=null?X:""),{class:"icon"}))]),e.createElementVNode("div",cr,[e.createElementVNode("div",dr,[e.createElementVNode("h1",null,e.toDisplayString(E.value),1),((ne=I.value)==null?void 0:ne.length)>0?(e.openBlock(),e.createBlock(D,{key:0,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(j.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",pr,[e.createVNode(_,{modelValue:x.value,"onUpdate:modelValue":d[1]||(d[1]=L=>x.value=L),onTabClick:G},{default:e.withCtx(()=>{var L,R;return[e.createVNode(A,{label:e.unref(o)("common.basic.summary"),name:"summary"},{default:e.withCtx(()=>[e.createVNode(jt,{ref_key:"formViewRef",ref:c,id:a.value,sessionId:H.value,mode:s.value,model:U},null,8,["id","sessionId","mode","model"])]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((R=(L=U.pageConfig)==null?void 0:L.detailPage)==null?void 0:R.tabs,J=>{var K;return e.openBlock(),e.createBlock(A,{label:e.unref(o)((K=J.name)!=null?K:"")},null,8,["label"])}),256))]}),_:1},8,["modelValue"]),u.value>=0?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"tabPaneTableRef",ref:b,model:Y[u.value]},null,8,["model"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:i.value,"onUpdate:modelValue":d[3]||(d[3]=L=>i.value=L),title:e.unref(o)("common.table.select"),width:"800px"},{footer:e.withCtx(()=>[e.createElementVNode("span",fr,[e.createVNode(C,{onClick:d[2]||(d[2]=L=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.cancel")),1)]),_:1}),e.createVNode(C,{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.basic.save")),1)]),_:1})])]),default:e.withCtx(()=>[u.value>=0?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"selectTableRef",ref:w,model:e.unref(V)[u.value]},null,8,["model"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]),e.createVNode(zt,{id:a.value,mode:"update",visible:l.value,"onUpdate:visible":d[4]||(d[4]=L=>l.value=L),model:U,afterSubmitFunc:P},null,8,["id","visible","model"])],64)}}}),[["__scopeId","data-v-8b860aa4"]]),mr={class:"page-title"},Ht=Q(e.defineComponent({__name:"TablePage",setup(t){const{t:o}=_e.useI18n(),n=q.useRoute(),r=q.useRouter(),a=e.ref(),l=e.ref([]),i=e.reactive({api:"",fields:[]}),s=e.reactive(Ye({},i));function c(){var b,w,x,E,j;l.value=[],i.pageConfig&&((w=(b=i.pageConfig)==null?void 0:b.tablePage)!=null&&w.tabViewAttributes)&&(l.value=(j=(E=(x=i.pageConfig)==null?void 0:x.tablePage)==null?void 0:E.tabViewAttributes)==null?void 0:j.map(I=>{let H;return I.modelKey&&se.value[I.modelKey]?H=fe.cloneDeep(se.value[I.modelKey]):H=fe.cloneDeep(i),I.queryParams&&(H.tableConfig||(H.tableConfig={}),H.tableConfig.queryParams=I.queryParams),I.fields&&(H.fields=I.fields),I.modelKey&&(H.breadcrumbRoute=i.route),{key:I.key,label:I.label,icon:I.icon,disabled:I.disabled,model:H}}))}function u(){var x,E;console.log("TablePage.init: loading model:",n.params.model),console.log("TablePage.init: current model list",se.value);const b=n.params.model;if(se.value[b]===void 0){console.warn("TablePage.init: model not found",b,se.value);return}$e(i);const w=fe.cloneDeep(se.value[b]);Object.assign(i,w),(E=(x=i.pageConfig)==null?void 0:x.tablePage)!=null&&E.tabViewAttributes||Object.assign(s,i),c()}return e.watch([()=>r.currentRoute.value,se],()=>{u()},{immediate:!0,deep:!0}),(b,w)=>{var E;const x=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("h1",mr,e.toDisplayString(e.unref(o)((E=i.name)!=null?E:"")),1),e.createVNode(x,null,{default:e.withCtx(()=>{var j,I;return[(I=(j=i.pageConfig)==null?void 0:j.tablePage)!=null&&I.tabViewAttributes?(e.openBlock(),e.createBlock(st,{key:0,class:"tabs-wrapper",cards:l.value,tableRef:a.value},null,8,["cards","tableRef"])):e.createCommentVNode("",!0)]}),_:1}),e.createVNode(De,{class:"table-wrapper",ref_key:"tableRef",ref:a,model:s},null,8,["model"])],64)}}}),[["__scopeId","data-v-1a472785"]]),ur=[it,Rt,Ke,Lt,Gt,lt,st,De,qt,Ht],hr=t=>{t&&t.component&&ur.forEach(o=>{console.log("component",o.__name,o),t.component(o.__name,o)})};B.Building=it,B.ConsoleApp=Rt,B.DetailPage=qt,B.Header=Ke,B.NoPermission=Lt,B.Secondary=Gt,B.SideMenu=lt,B.TabCard=st,B.TablePage=Ht,B.TableView=De,B.activeMenuMapping=mt,B.default=hr,B.en=pt,B.i18n=Pe,B.menuList=Qe,B.modelList=se,B.pinia=qe,B.useConsoleStore=at,B.zh=ft,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});