@vtj/pro 0.13.5 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/element-plus/index.css +1 -1
- package/dist/@vtj/materials/deps/element-plus/index.full.min.js +14 -14
- package/dist/@vtj/materials/deps/element-plus/zh-cn.js +1 -1
- package/dist/assets/@vueuse-DVRMGY2i.js +1 -0
- package/dist/assets/{Editor-CB0KftiD-By_32Ujv.js → Editor-DvPraWPS-DVIa-dH9.js} +20 -23
- package/dist/assets/{auth-psKlP-CJ.js → auth-Cb5eVVFH.js} +1 -1
- package/dist/assets/element-plus-CREUIdLM.js +13 -0
- package/dist/assets/element-plus-DeBM2g7b.css +1 -0
- package/dist/assets/{index-C3Cxidv4.js → index-B400aUIE.js} +2 -2
- package/dist/assets/{index-CwGivVdb.js → index-BZFnsMNX.js} +1 -1
- package/dist/assets/{page-Rl2hhoBn.js → page-DgVEmXN0.js} +1 -1
- package/dist/assets/{preview-12ze-NrO.js → preview-OjVE1J10.js} +1 -1
- package/dist/assets/{utils-C1-srlyI.js → utils-DlWGrX5e.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/uni/assets/{index-htZ_ESWo.js → index-Nz89M53d.js} +5 -5
- package/dist/uni/index.html +1 -1
- package/package.json +11 -11
- package/src/pages.json +1 -18
- package/dist/assets/@vueuse-Dny5oXqb.js +0 -1
- package/dist/assets/element-plus-BDrMc9HI.js +0 -13
- package/dist/assets/element-plus-T7bR7-T0.css +0 -1
- package/src/.vtj/files/15wbe42b.json +0 -19
- package/src/.vtj/files/45tm4w8w2.json +0 -785
- package/src/.vtj/files/7pfjupgg3.json +0 -31
- package/src/.vtj/histories/45tm4w8w2/13zdytpv.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/23ze4qdv.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/33ze4uyg.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/43ze4v0a.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/53ze4yr0.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/63ze54qg.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/73ze54s3.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/7pfjwd2jd.json +0 -35
- package/src/.vtj/histories/45tm4w8w2/83ze5c52.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/93ze5ys5.json +0 -789
- package/src/.vtj/histories/45tm4w8w2/esnfbzdxu.json +0 -46
- package/src/.vtj/histories/45tm4w8w2.json +0 -49
- package/src/.vtj/histories/7pfjupgg3/lvvarp9dz.json +0 -35
- package/src/.vtj/histories/7pfjupgg3.json +0 -9
- package/src/.vtj/logs/error-1744330931963.json +0 -1043
- package/src/.vtj/materials/@vtj/pro.json +0 -3639
- package/src/.vtj/projects/@vtj/pro.json +0 -258
- package/src/pages/45tm4w8w2.vue +0 -15
- package/src/pages/7pfjupgg3.vue +0 -15
- /package/dist/assets/{Editor-CB0KftiD-BC8kfPTs.css → Editor-DvPraWPS-BC8kfPTs.css} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{d as _,K as p,u as s,an as d,o as m,L as u,aB as f,T as h,aw as v}from"./vue-ipWmmxHk.js";import{z as g,d as y}from"./element-plus-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BZFnsMNX.js","./vue-router-CezURGfh.js","./vue-ipWmmxHk.js","./@vueuse-DVRMGY2i.js","./Editor-DvPraWPS-DVIa-dH9.js","./monaco-editor-B8sWZqMY.js","./monaco-editor-Cpw7ccEV.css","./element-plus-CREUIdLM.js","./lodash-es-BL-d_OSa.js","./@element-plus-icons-vue-BPBtkHoV.js","./shared-Bnc4f-Fv.js","./dayjs-DO-COJPZ.js","./element-plus-DeBM2g7b.css","./vxe-Bet8YtVU.js","./vxe-BAb1d5vW.css","./html2canvas-CIV5arX1.js","./mockjs-C_nrLZIY.js","./marked-BQZxLJfc.js","./Editor-DvPraWPS-BC8kfPTs.css","./utils-DlWGrX5e.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-CrVHlN_5.css","./preview-OjVE1J10.js","./page-DgVEmXN0.js","./uni-page-Bs0TAzEa.js","./uni-page-Diqmj53r.css","./auth-Cb5eVVFH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as _,K as p,u as s,an as d,o as m,L as u,aB as f,T as h,aw as v}from"./vue-ipWmmxHk.js";import{z as g,d as y}from"./element-plus-CREUIdLM.js";import{_ as r}from"./monaco-editor-B8sWZqMY.js";import{createRouter as E,createWebHashHistory as L}from"./vue-router-CezURGfh.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-DVRMGY2i.js";import"./@element-plus-icons-vue-BPBtkHoV.js";import"./shared-Bnc4f-Fv.js";import"./dayjs-DO-COJPZ.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const O=_({__name:"app",setup(l){return(o,a)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),P=[{path:"/",name:"home",component:()=>r(()=>import("./index-BZFnsMNX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>r(()=>import("./preview-OjVE1J10.js"),__vite__mapDeps([22,5,6,1,2,7,8,3,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>r(()=>import("./page-DgVEmXN0.js"),__vite__mapDeps([23,5,6,1,2,7,8,3,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"pages",component:()=>r(()=>import("./uni-page-Bs0TAzEa.js"),__vite__mapDeps([24,1,2,20,25]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>r(()=>import("./auth-Cb5eVVFH.js"),__vite__mapDeps([26,7,2,8,3,9,10,11,12,13,14,4,5,6,1,15,16,17,18,20]),import.meta.url)}],w=E({history:L(),routes:P}),c=v(O);c.use(w);c.mount("#app");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var V=Object.defineProperty;var
|
|
1
|
+
var V=Object.defineProperty;var x=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?V(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))W.call(e,t)&&E(o,t,e[t]);if(x)for(var t of x(e))b.call(e,t)&&E(o,t,e[t]);return o};var d=(o,e,t)=>new Promise((_,i)=>{var l=n=>{try{r(t.next(n))}catch(c){i(c)}},a=n=>{try{r(t.throw(n))}catch(c){i(c)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(o,e)).next())});import{useRoute as z}from"./vue-router-CezURGfh.js";import{v as I}from"./@vueuse-DVRMGY2i.js";import{k as J,A as U,j as D,E as G,v as P,c as K,i as A}from"./Editor-DvPraWPS-DVIa-dH9.js";import"./element-plus-CREUIdLM.js";import"./vxe-Bet8YtVU.js";import{E as L,a as C,n as k,l as M}from"./utils-DlWGrX5e.js";import{d as O,e as Q,az as S,f as X,c as Y,o as Z}from"./vue-ipWmmxHk.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-B8sWZqMY.js";import"./@element-plus-icons-vue-BPBtkHoV.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-C_nrLZIY.js";import"./dayjs-DO-COJPZ.js";import"./marked-BQZxLJfc.js";import"./lodash-es-BL-d_OSa.js";import"./shared-Bnc4f-Fv.js";const te=O({__name:"index",setup(o){return d(this,null,function*(){let e,t;const _=z(),i=Q(),l=new J(U(k)),a=([e,t]=S(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),r=D({loading:M,notify:k,useTitle:I,alert:C,access:a==null?void 0:a.access}),n=G(g({alert:C},a==null?void 0:a.__ACCESS__)),c=a?([e,t]=S(()=>new L(a).load()),e=yield e,t(),e):{},{__BASE_PATH__:h="/",history:B="hash",base:$="/",pageRouteName:y="page",remote:F,auth:R,checkVersion:T=!0,enhance:j}=a||{},q=()=>B==="hash",H=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);P.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${h}__vtj__/`?h:p;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const N=a.pageBasePath?`/${y}`:"",v=`${H($)}${u?`pages${N}`:y}/${f.id}`;m=q()?`${m}#/${v}`:`${m}${v}`}window.open(m,"VTJProject")}}}),P.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const w=new K(g({container:i,service:l,materialPath:h,pageBasePath:$==="/"?"":$,adapter:r,access:n,remote:F,auth:R,checkVersion:T,enhance:j},c));return w.ready(()=>d(null,null,function*(){yield A(300),w.openFile(_.query.id)})),X(()=>_.query.id,s=>d(null,null,function*(){yield A(300),w.openFile(s)})),(s,u)=>(Z(),Y("div",{class:"designer",ref_key:"container",ref:i},null,512))})}}),ge=ee(te,[["__scopeId","data-v-79f08aff"]]);export{ge as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CezURGfh.js","./vue-ipWmmxHk.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var w=Object.defineProperty;var P=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,v=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&A(o,e,t[e]);if(P)for(var e of P(t))R.call(t,e)&&A(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,
|
|
2
|
+
var w=Object.defineProperty;var P=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,v=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&A(o,e,t[e]);if(P)for(var e of P(t))R.call(t,e)&&A(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as C}from"./monaco-editor-B8sWZqMY.js";import{useRoute as g}from"./vue-router-CezURGfh.js";import"./element-plus-CREUIdLM.js";import"./vxe-Bet8YtVU.js";import{k as T,A as k,j as V,P as S,_ as B,T as D,S as I}from"./Editor-DvPraWPS-DVIa-dH9.js";import{a as O,n as E,l as j,E as L}from"./utils-DlWGrX5e.js";import{v as z}from"./@vueuse-DVRMGY2i.js";import{d as H,az as h,e as K,f as N,K as b,O as q,P as F,o as G,h as J}from"./vue-ipWmmxHk.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-BPBtkHoV.js";import"./shared-Bnc4f-Fv.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-C_nrLZIY.js";import"./marked-BQZxLJfc.js";const it=H({__name:"page",setup(o){return c(this,null,function*(){let t,e;const _=new T(k(E)),s=([t,e]=h(()=>_.getExtension().catch(()=>null)),t=yield t,e(),t),u=V({loading:j,notify:E,useTitle:z,alert:O,access:s==null?void 0:s.access}),d=s?([t,e]=h(()=>new L(s).load()),t=yield t,e(),t):{},{__BASE_PATH__:p="/"}=s||{},{provider:r,onReady:i}=S({mode:B.Runtime,service:_,materialPath:p,adapter:v(v({},u),d.adapter),dependencies:{Vue:()=>C(()=>import("./vue-ipWmmxHk.js").then(a=>a.aA),[],import.meta.url),VueRouter:()=>C(()=>import("./vue-router-CezURGfh.js"),__vite__mapDeps([0,1]),import.meta.url)}}),l=g(),f=K(),n=J(),y=a=>c(null,null,function*(){f.value=yield r.getRenderComponent(l.params.id.toString(),m=>{I(a,l,m)})});return i(()=>c(null,null,function*(){const a=n==null?void 0:n.appContext.app;a&&(a.use(D),a.use(r),y(a))})),N(()=>l.params.id,a=>c(null,null,function*(){if(a){const m=n==null?void 0:n.appContext.app;if(!m)return;y(m)}})),(a,m)=>f.value?(G(),b(F(f.value),{key:0})):q("",!0)})}});export{it as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CezURGfh.js","./vue-ipWmmxHk.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var y=Object.defineProperty;var C=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var h=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))R.call(e,t)&&h(o,t,e[t]);if(C)for(var t of C(e))x.call(e,t)&&h(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,s)=>{var _=a=>{try{i(t.next(a))}catch(p){s(p)}},n=a=>{try{i(t.throw(a))}catch(p){s(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,n);i((t=t.apply(o,e)).next())});import{_ as w}from"./monaco-editor-B8sWZqMY.js";import{useRoute as T}from"./vue-router-CezURGfh.js";import"./element-plus-
|
|
2
|
+
var y=Object.defineProperty;var C=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var h=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))R.call(e,t)&&h(o,t,e[t]);if(C)for(var t of C(e))x.call(e,t)&&h(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,s)=>{var _=a=>{try{i(t.next(a))}catch(p){s(p)}},n=a=>{try{i(t.throw(a))}catch(p){s(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,n);i((t=t.apply(o,e)).next())});import{_ as w}from"./monaco-editor-B8sWZqMY.js";import{useRoute as T}from"./vue-router-CezURGfh.js";import"./element-plus-CREUIdLM.js";import"./vxe-Bet8YtVU.js";import{k,A as V,j as g,P as S,_ as B,C as D,T as I,S as O}from"./Editor-DvPraWPS-DVIa-dH9.js";import{a as j,n as A,l as L,E as z}from"./utils-DlWGrX5e.js";import{v as H}from"./@vueuse-DVRMGY2i.js";import{d as K,az as E,e as N,K as b,O as q,P as F,o as G,h as J}from"./vue-ipWmmxHk.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-BPBtkHoV.js";import"./shared-Bnc4f-Fv.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-C_nrLZIY.js";import"./marked-BQZxLJfc.js";const pe=K({__name:"preview",setup(o){return f(this,null,function*(){let e,t;const c=new k(V(A)),s=([e,t]=E(()=>c.getExtension().catch(()=>null)),e=yield e,t(),e||{}),_=g({loading:L,notify:A,useTitle:H,alert:j,access:s==null?void 0:s.access}),n=s?([e,t]=E(()=>new z(s).load()),e=yield e,t(),e):{},{__BASE_PATH__:i="/"}=s||{},{provider:a,onReady:p}=S({mode:B.Runtime,service:c,materialPath:i,adapter:d(d({},_),n.adapter),dependencies:{Vue:()=>w(()=>import("./vue-ipWmmxHk.js").then(m=>m.aA),[],import.meta.url),VueRouter:()=>w(()=>import("./vue-router-CezURGfh.js"),__vite__mapDeps([0,1]),import.meta.url)}}),v=T(),u=N(),l=J();return p(()=>f(null,null,function*(){const m=yield D(s.enhance),r=l==null?void 0:l.appContext.app;r&&(n.install&&n.install(r),m&&r.use(m,a),r.use(I),r.use(a),u.value=yield a.getRenderComponent(v.params.id.toString(),P=>{O(r,v,P)}))})),(m,r)=>u.value?(G(),b(F(u.value),{key:0})):q("",!0)})}});export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=Object.defineProperty;var g=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var u=(t,a,s)=>a in t?S(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,E=(t,a)=>{for(var s in a||(a={}))d.call(a,s)&&u(t,s,a[s]);if(g)for(var s of g(a))I.call(a,s)&&u(t,s,a[s]);return t};var _=(t,a,s)=>u(t,typeof a!="symbol"?a+"":a,s);var p=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},c=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,c);i((s=s.apply(t,a)).next())});import{aA as T}from"./vue-ipWmmxHk.js";import{J as O,r as V,b as m,w as A,a as h,m as b,d as P,W as R,M as y,c as M,t as N,q as B
|
|
1
|
+
var S=Object.defineProperty;var g=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var u=(t,a,s)=>a in t?S(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,E=(t,a)=>{for(var s in a||(a={}))d.call(a,s)&&u(t,s,a[s]);if(g)for(var s of g(a))I.call(a,s)&&u(t,s,a[s]);return t};var _=(t,a,s)=>u(t,typeof a!="symbol"?a+"":a,s);var p=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},c=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,c);i((s=s.apply(t,a)).next())});import{aA as T}from"./vue-ipWmmxHk.js";import{J as O,r as V,b as m,w as A,a as h,m as b,d as P,W as R,M as y,c as M,t as N,q as B,G as L,$ as x,F as D,e as H,f as w,U as K,H as j,K as k,u as G,z as W,g as U,h as Y,Y as v,l as F,n as $,o as J,p as z,s as C,I as X,x as q,y as Q,B as Z,D as aa,L as sa,N as ea,O as ta,Q as ra,R as na,V as ia,X as oa,Z as la,a0 as _a,a1 as Ea,a2 as ca,a3 as ua,a4 as ga,a5 as pa,a6 as fa,a7 as Sa,a8 as da,a9 as Ia,aa as Ta,ab as Oa,ac as Va,ad as ma,ae as Aa,af as ha,ag as ba,ah as Pa,ai as Ra,aj as ya,ak as Ma,al as Na,am as Ba,an as La,ao as xa,ap as Da,v as Ha,aq as wa,ar as Ka,as as ja,at as ka,au as Ga,av as Wa,aw as Ua,ax as Ya,ay as va,az as Fa,aA as $a}from"./Editor-DvPraWPS-DVIa-dH9.js";import{E as Ja,a as za,b as Ca,c as Xa}from"./element-plus-CREUIdLM.js";const qa=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:O,ActionMenu:V,Assets:m,Binder:A,Box:h,Designer:b,DevTools:P,EVENT_MODIFIERS:R,Editor:y,Engine:M,EventBinder:N,GET_TOKENS_LINK:B,Icon:L,Item:x,KEYBOARD_EVENT_LIST:D,MAX_TOKENS:H,MOBILE_SIZE:w,MOUSE_EVENT_LIST:K,NAME_REGEX:j,NPM_REGISTRY_URL:k,OpenApi:G,PAD_SIZE:W,Panel:U,REPORT_API:Y,RegionType:v,RegionWrapper:F,Renderer:$,SAVE_BLOCK_FILE_FINISH:J,SESSION_ID_KEY:z,STATE_KEY:C,SetterView:X,SetterWrapper:q,Simulator:Q,Skeleton:Z,SkeletonWrapper:aa,SlotsPicker:sa,State:ea,Tabs:ta,VERSION_REGEX:ra,VTJ_DESIGNER_VERSION:na,VUE_DEVTOOLS_FRAME_STATE_KEY:ia,VUE_DEVTOOLS_OVERLAY_PATH:oa,VUE_DEVTOOLS_PATH:la,VariableBinder:_a,Viewer:Ea,Viewport:ca,WidgetGroup:ua,WidgetWrapper:ga,alert:pa,builtInDeps:fa,builtInMaterials:Sa,builtInSetters:da,builtInWidgets:Ia,confirm:Ta,createSlotsPicker:Oa,defaultSetter:Va,depsManager:ma,engineKey:Aa,expressionValidate:ha,getClassProperties:ba,message:Pa,normalizedStyle:Ra,notify:ya,proxyContext:Ma,readJsonFile:Na,regions:Ba,setterManager:La,setters:xa,useEngine:Da,widgetManager:Ha,widgets:wa},Symbol.toStringTag,{value:"Module"}));class es{constructor(a){_(this,"urls",[]);_(this,"library","");_(this,"params",[]);_(this,"__BASE_PATH__","/");this.config=a;const s=E(E(E({},Wa),qa),Ga),o={Vue:T,__VTJ_PRO__:s,VtjUtils:ka,VtjIcons:ja,VtjUI:Ka,ElementPlus:Ja};for(const[l,f]of Object.entries(o))window[l]=f;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:c=[],library:i,params:r=[]}=n||{};i&&(this.urls=c,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return p(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Ua(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Ya(e)).map(e=>`${s}${e}`);if(va(o),n.length){const e=yield Fa(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask"];return $a(this.config,a)}}function ts(){return Xa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function rs(t,a="",s="warning"){Ca({title:a,message:t,type:s})}function ns(t,a){return za.alert(t,a)}export{es as E,ns as a,ts as l,rs as n};
|
package/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta http-equiv="Expires" content="0"/>
|
|
10
10
|
<title>低代码设计器 - VTJ.PRO</title>
|
|
11
11
|
<script>
|
|
12
|
-
var __BUILD_TIME__ = '
|
|
12
|
+
var __BUILD_TIME__ = '1754670751520';
|
|
13
13
|
(function () {
|
|
14
14
|
const regex = /<!--{{(\d*)}}-->/;
|
|
15
15
|
window.fetch('?t=' + Date.now()).then(async (res) => {
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
});
|
|
26
26
|
})();
|
|
27
27
|
</script>
|
|
28
|
-
<!--{{
|
|
28
|
+
<!--{{1754670751520}}-->
|
|
29
29
|
|
|
30
|
-
<script type="module" crossorigin src="./assets/index-
|
|
30
|
+
<script type="module" crossorigin src="./assets/index-B400aUIE.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="./assets/vue-ipWmmxHk.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="./assets/lodash-es-BL-d_OSa.js">
|
|
33
|
-
<link rel="modulepreload" crossorigin href="./assets/@vueuse-
|
|
33
|
+
<link rel="modulepreload" crossorigin href="./assets/@vueuse-DVRMGY2i.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="./assets/@element-plus-icons-vue-BPBtkHoV.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="./assets/shared-Bnc4f-Fv.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="./assets/dayjs-DO-COJPZ.js">
|
|
37
|
-
<link rel="modulepreload" crossorigin href="./assets/element-plus-
|
|
37
|
+
<link rel="modulepreload" crossorigin href="./assets/element-plus-CREUIdLM.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="./assets/monaco-editor-B8sWZqMY.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="./assets/vue-router-CezURGfh.js">
|
|
40
|
-
<link rel="stylesheet" crossorigin href="./assets/element-plus-
|
|
40
|
+
<link rel="stylesheet" crossorigin href="./assets/element-plus-DeBM2g7b.css">
|
|
41
41
|
<link rel="stylesheet" crossorigin href="./assets/monaco-editor-Cpw7ccEV.css">
|
|
42
42
|
<link rel="stylesheet" crossorigin href="./assets/index-1XTA0ffa.css">
|
|
43
43
|
|
|
@@ -51,7 +51,7 @@ version: 2.9.0
|
|
|
51
51
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
52
52
|
* @name @vtj/core
|
|
53
53
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
54
|
-
* @version 0.13.
|
|
54
|
+
* @version 0.13.7
|
|
55
55
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
56
56
|
*/const qd="VueMaterial",zd="VueRouterMaterial",Wd={[qd]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[zd]:["RouterView","RouterLink"]};let Kd=class{constructor(){z(this,"listeners",[]);z(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const t of this.listeners)t();this.listeners=[]}ready(t){this.isReady?t():this.listeners.push(t)}resetReady(){this.isReady=!1}};var Jd=Object.defineProperty,Yd=(e,t,r)=>t in e?Jd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lt=(e,t,r)=>Yd(e,typeof t!="symbol"?t+"":t,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),e.call(this,t,r,n)}})();const Gd=e=>typeof e=="symbol";new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Gd));function _o(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zd}=Object.prototype,{getPrototypeOf:gn}=Object,{iterator:Xe,toStringTag:Eo}=Symbol,tr=(e=>t=>{const r=Zd.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),yt=e=>(e=e.toLowerCase(),t=>tr(t)===e),er=e=>t=>typeof t===e,{isArray:ae}=Array,be=er("undefined");function Qd(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const So=yt("ArrayBuffer");function Xd(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&So(e.buffer),t}const tm=er("string"),ot=er("function"),xo=er("number"),rr=e=>e!==null&&typeof e=="object",em=e=>e===!0||e===!1,ke=e=>{if(tr(e)!=="object")return!1;const t=gn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Eo in e)&&!(Xe in e)},rm=yt("Date"),nm=yt("File"),im=yt("Blob"),sm=yt("FileList"),om=e=>rr(e)&&ot(e.pipe),am=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ot(e.append)&&((t=tr(e))==="formdata"||t==="object"&&ot(e.toString)&&e.toString()==="[object FormData]"))},um=yt("URLSearchParams"),[cm,lm,fm,hm]=["ReadableStream","Request","Response","Headers"].map(yt),pm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),ae(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(n=0;n<o;n++)a=s[n],t.call(null,e[a],a,e)}}function To(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Ut=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ro=e=>!be(e)&&e!==Ut;function Hr(){const{caseless:e}=Ro(this)&&this||{},t={},r=(n,i)=>{const s=e&&To(t,i)||i;ke(t[s])&&ke(n)?t[s]=Hr(t[s],n):ke(n)?t[s]=Hr({},n):ae(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Se(arguments[n],r);return t}const dm=(e,t,r,{allOwnKeys:n}={})=>(Se(t,(i,s)=>{r&&ot(i)?e[s]=_o(i,r):e[s]=i},{allOwnKeys:n}),e),mm=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gm=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},ym=(e,t,r,n)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&gn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},vm=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},bm=e=>{if(!e)return null;if(ae(e))return e;let t=e.length;if(!xo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},wm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gn(Uint8Array)),_m=(e,t)=>{const r=(e&&e[Xe]).call(e);let n;for(;(n=r.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},Em=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Sm=yt("HTMLFormElement"),xm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),ji=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Tm=yt("RegExp"),Ao=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Se(r,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(n[s]=o||i)}),Object.defineProperties(e,n)},Rm=e=>{Ao(e,(t,r)=>{if(ot(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ot(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Am=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return ae(e)?n(e):n(String(e).split(t)),r},$m=()=>{},Om=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function jm(e){return!!(e&&ot(e.append)&&e[Eo]==="FormData"&&e[Xe])}const Dm=e=>{const t=new Array(10),r=(n,i)=>{if(rr(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const s=ae(n)?[]:{};return Se(n,(o,a)=>{const l=r(o,i+1);!be(l)&&(s[a]=l)}),t[i]=void 0,s}}return n};return r(e,0)},Bm=yt("AsyncFunction"),Cm=e=>e&&(rr(e)||ot(e))&&ot(e.then)&&ot(e.catch),$o=((e,t)=>e?setImmediate:t?((r,n)=>(Ut.addEventListener("message",({source:i,data:s})=>{i===Ut&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ut.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ot(Ut.postMessage)),Nm=typeof queueMicrotask<"u"?queueMicrotask.bind(Ut):typeof process<"u"&&process.nextTick||$o,Im=e=>e!=null&&ot(e[Xe]),R={isArray:ae,isArrayBuffer:So,isBuffer:Qd,isFormData:am,isArrayBufferView:Xd,isString:tm,isNumber:xo,isBoolean:em,isObject:rr,isPlainObject:ke,isReadableStream:cm,isRequest:lm,isResponse:fm,isHeaders:hm,isUndefined:be,isDate:rm,isFile:nm,isBlob:im,isRegExp:Tm,isFunction:ot,isStream:om,isURLSearchParams:um,isTypedArray:wm,isFileList:sm,forEach:Se,merge:Hr,extend:dm,trim:pm,stripBOM:mm,inherits:gm,toFlatObject:ym,kindOf:tr,kindOfTest:yt,endsWith:vm,toArray:bm,forEachEntry:_m,matchAll:Em,isHTMLForm:Sm,hasOwnProperty:ji,hasOwnProp:ji,reduceDescriptors:Ao,freezeMethods:Rm,toObjectSet:Am,toCamelCase:xm,noop:$m,toFiniteNumber:Om,findKey:To,global:Ut,isContextDefined:Ro,isSpecCompliantForm:jm,toJSONObject:Dm,isAsyncFn:Bm,isThenable:Cm,setImmediate:$o,asap:Nm,isIterable:Im};function W(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Oo=W.prototype,jo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jo[e]={value:e}});Object.defineProperties(W,jo);Object.defineProperty(Oo,"isAxiosError",{value:!0});W.from=(e,t,r,n,i,s)=>{const o=Object.create(Oo);return R.toFlatObject(e,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),W.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Pm=null;function qr(e){return R.isPlainObject(e)||R.isArray(e)}function Do(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Di(e,t,r){return e?e.concat(t).map(function(n,i){return n=Do(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function km(e){return R.isArray(e)&&!e.some(qr)}const Fm=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function nr(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,d){return!R.isUndefined(d[p])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,o=r.indexes,a=(r.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(R.isDate(p))return p.toISOString();if(R.isBoolean(p))return p.toString();if(!a&&R.isBlob(p))throw new W("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(p)||R.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,d,m){let b=p;if(p&&!m&&typeof p=="object"){if(R.endsWith(d,"{}"))d=n?d:d.slice(0,-2),p=JSON.stringify(p);else if(R.isArray(p)&&km(p)||(R.isFileList(p)||R.endsWith(d,"[]"))&&(b=R.toArray(p)))return d=Do(d),b.forEach(function(_,y){!(R.isUndefined(_)||_===null)&&t.append(o===!0?Di([d],y,s):o===null?d:d+"[]",l(_))}),!1}return qr(p)?!0:(t.append(Di(m,d,s),l(p)),!1)}const c=[],f=Object.assign(Fm,{defaultVisitor:u,convertValue:l,isVisitable:qr});function h(p,d){if(!R.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+d.join("."));c.push(p),R.forEach(p,function(m,b){(!(R.isUndefined(m)||m===null)&&i.call(t,m,R.isString(b)?b.trim():b,d,f))===!0&&h(m,d?d.concat(b):[b])}),c.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Bi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function yn(e,t){this._pairs=[],e&&nr(e,this,t)}const Bo=yn.prototype;Bo.append=function(e,t){this._pairs.push([e,t])};Bo.toString=function(e){const t=e?function(r){return e.call(this,r,Bi)}:Bi;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function Mm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Co(e,t,r){if(!t)return e;const n=r&&r.encode||Mm;R.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(t,r):s=R.isURLSearchParams(t)?t.toString():new yn(t,r).toString(n),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}let Ci=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}};const No={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Um=typeof URLSearchParams<"u"?URLSearchParams:yn,Lm=typeof FormData<"u"?FormData:null,Vm=typeof Blob<"u"?Blob:null,Hm={isBrowser:!0,classes:{URLSearchParams:Um,FormData:Lm,Blob:Vm},protocols:["http","https","file","blob","url","data"]},vn=typeof window<"u"&&typeof document<"u",zr=typeof navigator=="object"&&navigator||void 0,qm=vn&&(!zr||["ReactNative","NativeScript","NS"].indexOf(zr.product)<0),zm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wm=vn&&window.location.href||"http://localhost",Km=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vn,hasStandardBrowserEnv:qm,hasStandardBrowserWebWorkerEnv:zm,navigator:zr,origin:Wm},Symbol.toStringTag,{value:"Module"})),rt=V(V({},Km),Hm);function Jm(e,t){return nr(e,new rt.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return rt.isNode&&R.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Ym(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gm(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function Io(e){function t(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=r.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&R.isArray(i[o])&&(i[o]=Gm(i[o])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const r={};return R.forEachEntry(e,(n,i)=>{t(Ym(n),i,r,0)}),r}return null}function Zm(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const xe={transitional:No,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return n?JSON.stringify(Io(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Jm(e,this.formSerializer).toString();if((s=R.isFileList(e))||r.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return nr(s?{"files[]":e}:e,o&&new o,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),Zm(e)):e}],transformResponse:[function(e){const t=this.transitional||xe.transitional,r=t&&t.forcedJSONParsing,n=this.responseType==="json";if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(r&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(s){if(i)throw s.name==="SyntaxError"?W.from(s,W.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{xe.headers[e]={}});const Qm=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xm=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
57
57
|
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&Qm[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Ni=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function Fe(e){return e===!1||e==null?e:R.isArray(e)?e.map(Fe):String(e)}function tg(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const eg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function wr(e,t,r,n,i){if(R.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!R.isString(t)){if(R.isString(n))return t.indexOf(n)!==-1;if(R.isRegExp(n))return n.test(t)}}function rg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function ng(e,t){const r=R.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}let at=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(a,l,u){const c=pe(l);if(!c)throw new Error("header name must be a non-empty string");const f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Fe(a))}const o=(a,l)=>R.forEach(a,(u,c)=>s(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(R.isString(t)&&(t=t.trim())&&!eg(t))o(Xm(t),r);else if(R.isObject(t)&&R.isIterable(t)){let a={},l,u;for(const c of t){if(!R.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?R.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=pe(t),t){const n=R.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return tg(i);if(R.isFunction(r))return r.call(this,i,n);if(R.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=pe(t),t){const n=R.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||wr(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=pe(o),o){const a=R.findKey(n,o);a&&(!r||wr(n,n[a],a,r))&&(delete n[a],i=!0)}}return R.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||wr(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return R.forEach(this,(i,s)=>{const o=R.findKey(n,s);if(o){r[o]=Fe(i),delete r[s];return}const a=t?rg(s):String(s).trim();a!==s&&delete r[s],r[a]=Fe(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return R.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&R.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
@@ -62,18 +62,18 @@ version: 2.9.0
|
|
|
62
62
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
63
63
|
* @name @vtj/renderer
|
|
64
64
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
65
|
-
* @version 0.13.
|
|
65
|
+
* @version 0.13.7
|
|
66
66
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
67
|
-
*/const Rr="0.13.
|
|
67
|
+
*/const Rr="0.13.7";var et=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(et||{});const Ji=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Qg=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],Xg={String,Number,Boolean,Array,Object,Function,Date},Ve="VtjPage",Ar="VtjHomepage",t0="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(","),e0="component,slot".split(",");function Ne(e,t){return e.map(r=>po(r)||r.startsWith("/")?r:`${t}${r}`)}function or(e){return/\.css$/.test(e)}function ar(e){return/\.js$/.test(e)}function r0(e){return/\.json$/.test(e)}function n0(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function i0(e,t,r=!1){const n=e.filter(h=>!!h.enabled),i=[],s=[],o=[],a=[],l={},u={},c=[],f={};return n.forEach(({urls:h,assetsUrl:p,library:d,assetsLibrary:m,localeLibrary:b})=>{h==null||h.forEach(_=>{ar(_)&&i.push(n0(_,r)),or(_)&&s.push(_)}),d&&(a.push(d),l[d]=Ne(h||[],t),b&&(u[d]=b)),p&&o.push(p),m&&c.push(m),d&&m&&(f[m]=d)}),{scripts:Ne(i,t),css:Ne(s,t),materials:Ne(o,t),libraryExports:a,materialExports:jd(c),materialMapLibrary:f,libraryMap:l,libraryLocaleMap:u}}function s0(e,t){var s;const{name:r,parent:n,alias:i}=e;return n?(s=t[n])==null?void 0:s[i||r]:t[i||r]}function o0(e=[]){const t=e.filter(n=>or(n)),r=e.filter(n=>ar(n));return{css:t,js:r}}function a0(e,t){const r=u=>{const c=[];let f=0;for(;f<u.length;){if(/\s/.test(u[f])){f++;continue}if(u.substring(f,f+2)==="/*"){const _=u.indexOf("*/",f+2);if(_!==-1){f=_+2;continue}}if(u[f]==="@"){const _=f;for(;f<u.length&&u[f]!=="{"&&u[f]!==";";)f++;const y=u.substring(_,f).trim(),v=y.includes("@keyframes");if(u[f]===";")c.push({type:"simple-at-rule",content:u.substring(_,f+1)}),f++;else if(u[f]==="{"){const w=f+1;let S=1;for(f++;f<u.length&&S>0;)u[f]==="{"?S++:u[f]==="}"&&S--,f++;const g=u.substring(_,f),x=u.substring(w,f-1);c.push({type:v?"keyframes":"at-rule",rule:y,content:g,inner:x})}continue}const h=f;for(;f<u.length&&u[f]!=="{";)f++;if(f>=u.length)break;const p=u.substring(h,f).trim();if(!p){f++;continue}const d=f+1;let m=1;for(f++;f<u.length&&m>0;)u[f]==="{"?m++:u[f]==="}"&&m--,f++;const b=u.substring(d,f-1);c.push({type:"rule",selector:p,content:b.trim()})}return c},n=u=>{const c=u.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(c)},i=u=>u.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(c,f,h)=>{const p=f.trim(),d=h.trim();return p?`${p}[${t}] ${d}`:d}),s=u=>{const c=u.trim();if(!c||c.includes(`[${t}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(c)||n(c))return c;const f=c.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(f){const[,h,p=""]=f,d=h.trim();return d?`${d}[${t}]${p}`:c}return`${c}[${t}]`},o=u=>i(u).split(",").map(c=>s(c)).filter(c=>c.trim()).join(", "),a=u=>u.map(c=>{switch(c.type){case"simple-at-rule":return c.content;case"keyframes":return c.content;case"at-rule":try{const h=r(c.inner),p=a(h);return`${c.rule} { ${p} }`}catch(h){return c.content}case"rule":if(!c.selector||!c.content)return"";const f=o(c.selector);return f.trim()?`${f} { ${c.content} }`:"";default:return""}}).filter(c=>c.trim()).join(" "),l=u=>u.replace(/\s*{\s*/g," { ").replace(/\s*}\s*/g," } ").replace(/\s*;\s*/g,"; ").replace(/\s*,\s*/g,", ").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s*}\s*}/g," } }").trim();try{const u=e.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
|
|
68
68
|
`),c=r(u),f=a(c);return l(f)}catch(u){return console.error("CSS scoping failed:",u),console.error("Input CSS:",e),e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,c=>c).replace(/([^{}@]+)(?=\s*{)/g,c=>{const f=c.trim();return!f||f.startsWith("@")||f.includes(`[${t}]`)||n(f)?c:`${f}[${t}]`})}}function Zo(e){return Dt(e)?e:JSON.stringify(e)}function ur(e,t,r,n=!1){const i=e.CSSStyleSheet,s=n?`data-v-${t}`:t,o=n?a0(r,s):r;if(i.prototype.replaceSync){const a=new i;a.id=t,a.replaceSync(o);const l=e.document,u=l.adoptedStyleSheets,c=Array.from(u).filter(f=>f.id!==t);l.adoptedStyleSheets=[...c,a]}else{const a=e.document;let l=a.getElementById(t);l?l.innerHTML=o:(l=a.createElement("style"),l.id=t,l.innerHTML=o,a.head.appendChild(l))}}function u0(e,t){return k(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&ur(window,e,r)})}function Qo(e,t=window){const r=t.document,n=t.document.head;for(const i of e)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function Xo(n,i){return k(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((l,u)=>{for(const c of e){const f=s.createElement("script");f.src=c,f.onload=()=>{a=r[t],a?l(a.default||a):u(null)},f.onerror=h=>{u(h)},o.appendChild(f)}})})}function c0(e){return Ht(e)||Ht(e==null?void 0:e.install)}function l0(e){return e0.includes(e)}function f0(e){return t0.includes(e)}function we(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function _e(e,t,r=!1,n=!1,i=!1){var s;try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let a=(e.value||"").trim();i||(a=a.replace(/this(\W|$)/g,(u,c)=>`__self${c}`)),a=o.join(`
|
|
69
69
|
`)+a;const l=i?`
|
|
70
70
|
${a}
|
|
71
71
|
`:`with(${r?"{}":"$scope || {}"}) { ${a} }`;return new Function("$scope",l)(t)}catch(o){if(re.error("parseExpression.error",o,e,(s=t==null?void 0:t.__self)!=null?s:t),n)throw o}}function ht(e,t,r=!1,n=!1,i=!1){var o;const s=_e(e,t,r,n,i);if(typeof s!="function"&&(re.error("parseFunction.error","not a function",e,(o=t==null?void 0:t.__self)!=null?o:t),n))throw new Error(`"${e.value}" not a function`);return s}function mt(e){return e&&e.type==="JSExpression"}function pt(e){return typeof e=="object"&&e&&e.type==="JSFunction"}const h0={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},p0=Symbol("access");class ta{constructor(t){z(this,"options");z(this,"data",null);z(this,"mode",et.Raw);z(this,"interceptResponse",!0);this.options=Object.assign({},h0,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode!==et.Design&&this.setGuard(n),i&&this.setRequest(i)}login(t){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(t),this.data&&(Sr.save(r,t,{type:"local",prefix:n}),i&&Tr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,Sr.remove(t,{type:"local",prefix:r}),n&&Tr.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var t;return this.data||this.loadData(),(t=this.data)==null?void 0:t.token}can(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return typeof t=="function"?t(n):Oi(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return Oi(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access=this,t.provide(p0,this)}isAuthPath(t){const{auth:r,isAuth:n}=this.options;if(n)return n(t);if(t.path&&typeof r=="string"){const i=r.split("#")[1]||r;return t.path===i}return!1}toLogin(){const{auth:t,redirectParam:r}=this.options;if(!t)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof t=="function"?t(n):location.href=r?`${t}${n}`:t}setData(t){const{privateKey:r}=this.options;if(Array.isArray(t)&&r){const n=t.map(i=>$i(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof t=="string")try{const n=r?$i(t,r):t;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=t}loadData(){const{storageKey:t,storagePrefix:r}=this.options,n=Sr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Tr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===Ve){const r=t.params.id;return r&&this.can(r)}return t.meta.__vtj__?this.can(t.meta.__vtj__):!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return k(this,null,function*(){if(this.isWhiteList(t)||this.isAuthPath(t))return r();if(this.isLogined()){if(this.hasRoutePermission(t))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),Ht(i)?(i(),r(!1)):Dt(i)?r(i):r(!1)}}r(!1),yield ze(0),this.toLogin()})}isWhiteList(t){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>t.fullPath.startsWith(n)):r(t):!1}isUnauthorized(t){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return t.status===r||((i=t.data)==null?void 0:i[n])===r}showUnauthorizedAlert(t){return k(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return k(this,null,function*(){var n;const{alert:r}=this.options;return r?(yield ze(150),yield(n=r(t,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!1)):(window.alert(t),!1)})}setRequest(t){t.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),t.useResponse(r=>k(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>k(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function d0(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,useTitle:o,alert:a}=e;let l=null;return{request:bn({settings:V({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:u=>{var c,f;return((c=u.data)==null?void 0:c.code)===0||!!((f=u.data)!=null&&f.success)},failMessage:!0,showError:u=>{t&&t(u||"未知错误")},showLoading:()=>{l&&l.close(),r&&(l=r())},hideLoading:()=>{l&&(l.close(),l=null)}},n)}),jsonp:Go,notify:t,loading:r,useTitle:o,alert:a,startupComponent:i,access:s?new ta(V({alert:a},s)):void 0}}function m0(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,tt(V({},e.jsonpOptions),{query:i}));{const i=e.headers?_e(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:tt(V({},e.settings),{headers:i})};return(o,a)=>(delete s.data,n.send(de(s,a||{},{data:o})))}}function g0(e,t){const{metaQuery:r}=t;if(!r)return;const{code:n,queryCode:i}=e;return(s,o)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,o)}}function y0(e=[],t=[],r){const n={};for(const i of e)n[i.id]=m0(i,r);for(const i of t)n[i.id]=g0(i,r);return n}function v0(){return k(this,arguments,function*(e=[],t=window){const r=we(t);r&&(ea(t),e.forEach(n=>w0(r,n)))})}function b0(e,t=window){const r=pt(e.mockTemplate)&&e.mockTemplate.value?ht(e.mockTemplate,{},!0):void 0,n=we(t);return(...i)=>k(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){re.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function w0(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=mn(`${r}(.*)`),s=Id(r,{decode:decodeURIComponent}),o=_e(n,{},!0);e.mock(i,a=>{var f;const l=Le.parse(a.url)||{},u=a.body instanceof FormData?Bg(a.body):a.body,c=(f=s(a.url))==null?void 0:f.params;return Object.assign(a,{data:u,params:l,query:c}),e.mock(o(a))})}}function ea(e=window){const t=we(e);t&&(t._mocked={})}class _0{constructor(t){z(this,"__id",null);z(this,"__mode");z(this,"__instance",null);z(this,"__contextRefs",{});z(this,"__refs",{});z(this,"context",{});z(this,"state",{});z(this,"props",{});z(this,"$props",{});z(this,"$refs",{});z(this,"$el",null);z(this,"$emit",null);z(this,"$nextTick",null);z(this,"$parent",null);z(this,"$root",null);z(this,"$attrs",null);z(this,"$slots",null);z(this,"$watch",null);z(this,"$options",null);z(this,"$forceUpdate",null);z(this,"$components",{});z(this,"$libs",{});z(this,"$apis",{});z(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=t;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(t,r=Je){const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const i=n.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,t||{}),this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{this.__reset()})}__proxy(){this.__instance&&Ji.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){Ji.forEach(t=>{this[t]=null}),this.__reset()}__reset(){this.__refs={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(t){var r;if(t)if(this.__mode===et.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return ht({type:i,value:s},this)}else return ht(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===et.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return _e({type:i,value:s},this)}else return _e(t,this)}__ref(t=null,r){if(this.__mode!==et.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>k(this,null,function*(){var s,o;yield ze(0);let i=(n==null?void 0:n.$vtjEl)||(n==null?void 0:n.$el)||((o=(s=n==null?void 0:n._)==null?void 0:s.vnode)==null?void 0:o.el)||n;if(!i){typeof r=="string"&&(delete this.$refs[r],t&&delete this.__refs[t]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=t,et.Design===this.__mode&&(i.__context__=this,i.draggable=!0),t&&(this.__refs[t]=this.__getRefEl(this.__refs,t,n)),typeof r=="function"?r(n):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,n)),n})}__getRefEl(t,r,n){const i=t[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(t={}){const r=V(V({},this.context),t),n=tt(V({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function Xr(e){var f,h;const{Vue:t=Je,mode:r=et.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,a=t.computed(()=>e.dsl),l={$components:n,$libs:i,$apis:s},u=new _0({mode:r,dsl:a.value,attrs:l}),c=t.defineComponent(V({name:a.value.name,__scopeId:a.value.id?`data-v-${a.value.id}`:void 0,props:V({},S0((f=a.value.props)!=null?f:[],u)),setup(p){var v,w,S,g;u.$props=p,u.props=p,a.value.id&&ur(e.window||window,a.value.id,a.value.css||"",!0),u.state=x0(t,(v=a.value.state)!=null?v:{},u);const d=T0(t,(w=a.value.computed)!=null?w:{},u),m=R0((S=a.value.methods)!=null?S:{},u),b=A0(t,a.value.inject,u);for(const[x,A]of Object.entries(b||{}))b[x]=t.inject(x,A);const _=$0(a.value.dataSources||{},u),y=V(V(V(V({},b),d),m),_);return u.setup(y,t),O0(t,(g=a.value.watch)!=null?g:[],u),{vtj:u}},emits:E0(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?ie(p[0],u,t,o,p):p.map(d=>ie(d,u,t,o,p))}},j0((h=a.value.lifeCycles)!=null?h:{},u)));return{renderer:t.markRaw(c),context:u}}function E0(e=[]){return e.map(t=>Dt(t)?t:t.name)}function S0(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>Xg[i]):void 0;return e.map(n=>Dt(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:mt(n.default)?t.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function x0(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return mt(s)?s=r.__parseExpression(s):pt(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function T0(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function R0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function A0(e,t=[],r){return t.reduce((n,i)=>{var u;const{name:s,from:o}=i||{};i.default;const a=mt(o)?r.__parseExpression(o)||s:o!=null?o:s,l=mt(i.default)?r.__parseExpression(i.default):(u=i.default)!=null?u:null;return n[s]=e.inject(a,l),n},{})}function $0(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=b0(i);else if(i.ref){const s=t.$apis[i.ref],o=pt(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...a)=>k(null,null,function*(){const l=yield s.apply(t,a);return o?o(l):l})}return r},{})}function O0(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function j0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>{const s=t.__parseFunction(i);return r[n]=()=>k(null,null,function*(){yield ze(0),Ht(s)&&s()}),r},{})}const D0=new Hd;let $r=[],Zt={};const B0=e=>e;function ra(r){return k(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>ar(a));if(s.length===0||!i)return null;const o=n.filter(a=>or(a));return o.length&&Qo(o,t),yield Xo(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function tn(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&($r.forEach(i=>{delete n.window[i]}),$r=[]),(i,s,o=Je)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id)return o.defineAsyncComponent(()=>k(null,null,function*(){const a=Zt[s.id]||(yield D0.add(s.id,()=>t(s.id)));return a&&(a.name=i,Zt[s.id]=a),a?Xr(tt(V({},n),{Vue:o,dsl:ni(a),mode:et.Runtime,loader:tn(e)})).renderer:null}));if(s.type==="UrlSchema"&&s.url)return o.defineAsyncComponent(()=>k(null,null,function*(){const a=Zt[s.url]||(yield r(s.url));return a&&(a.name=i,Zt[s.url]=a),a?Xr(tt(V({},n),{Vue:o,dsl:ni(a),mode:et.Runtime,loader:tn(e)})).renderer:null}));if(s.type==="Plugin"){let a=s.library?Zt[s.library]:null;return a||(s.library&&$r.push(s.library),a=Zt[s.library||Symbol()]=o.defineAsyncComponent(()=>k(null,null,function*(){return(yield ra(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function ie(e,t,r=Je,n=B0,i=[],s=!1){var v;if(!e||!e.name||e.invisible)return null;const o=(v=r.getCurrentInstance())==null?void 0:v.appContext,{id:a=null,directives:l=[]}=e,{vIf:u,vElseIf:c,vElse:f,vFor:h,vShow:p,vModels:d,vBind:m,vHtml:b,others:_}=na(l);if(!s&&(c||f))return null;if(u&&!N0(u,t))return F0(e,t,r,n,i);const y=(w,S=0)=>{var j,N,L,M;const g=w.$components,x=(()=>{var q,$,D,C;if(e.name==="component")return I0(w,(q=e.props)==null?void 0:q.is);if(e.name==="slot")return e.name;const H=n(e.name,e.from,r);if(Dt(H))return l0(H)||f0(H)?H:(C=(D=g[H])!=null?D:($=o==null?void 0:o.app)==null?void 0:$.component(H))!=null?C:H;if(ct(H)&&e.id){const I=`Loader${e.id}_${S}`;return g[I]||(g[I]=H)}return H})(),A=P0(a,(j=e.props)!=null?j:{},w),U=k0(r,(N=e.events)!=null?N:{},w);if(e.name==="slot")return M0(r,e,A,w,n);m&&Object.assign(A,w.__parseExpression(m.value)),p&&(A.style=Object.assign((L=A.style)!=null?L:{},L0(p,w))),b&&Object.assign(A,V0(b,w)),d.forEach(H=>{Object.assign(A,H0(r,H,w))});const E=q0(r,(M=e.children)!=null?M:[],w,n,e),T=w!=null&&w.__id?`data-v-${w.__id}`:void 0,F=T?{[T]:""}:{};let B=r.createVNode(x,V(V(V({key:`${a}_${S}`},F),A),U),E);const P=o?C0(o,_,w):[];return P.length&&(B=r.withDirectives(B,P)),B};return h?K0(h,y,t):y(t)}function C0(e,t,r){const n=e.app;return t.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const o=[s];return i.value&&o.push(r.__parseExpression(i.value)),i.arg&&o.push(i.arg),i.modifiers&&o.push(i.modifiers),o}).filter(i=>!!i)}function na(e=[]){const t=e.find(c=>Et(c.name)==="vIf"),r=e.find(c=>Et(c.name)==="vElseIf"),n=e.find(c=>Et(c.name)==="vElse"),i=e.find(c=>Et(c.name)==="vFor"),s=e.find(c=>Et(c.name)==="vShow"),o=e.find(c=>Et(c.name)==="vBind"),a=e.find(c=>Et(c.name)==="vHtml"),l=e.filter(c=>Et(c.name)==="vModel"),u=e.filter(c=>!Qg.includes(Et(c.name)));return{vIf:t,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:l,vBind:o,others:u,vHtml:a}}function N0(e,t){return!!t.__parseExpression(e.value)}function I0(e,t){return t?mt(t)?e.__parseExpression(t):t:"div"}function P0(e,t,r){const n=en(t,r);return n.ref=r.__ref(e,n.ref),n}function en(e,t){return mt(e)?t.__parseExpression(e):pt(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>en(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=en(i,t),r},{}):e}function k0(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const a=t[o],l=ia(a.modifiers),u=l.find(h=>n.includes(h)),c="on"+Os(o)+(u&&i[u]||""),f=r.__parseFunction(a.handler);return f&&(s[c]=e.withModifiers(f,l)),s},{})}function F0(e,t,r,n,i=[]){let s=i.findIndex(o=>o.id===e.id);for(let o=++s;o<i.length;o++){const{directives:a=[]}=i[o],{vElseIf:l,vElse:u}=na(a);if(l){if(t.__parseExpression(l.value))return ie(i[o],t,r,n,i,!0);continue}if(u)return ie(i[o],t,r,n,i,!0)}return null}function ia(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function M0(e,t,r,n,i){var l;const{children:s}=t,o=U0(t,n),a=(l=n.$slots)==null?void 0:l[o.name];return a?a(r):s?Dt(s)?e.createTextVNode(s):mt(s)?e.createTextVNode(Zo(n.__parseExpression(s))):Array.isArray(s)?s.map(u=>ie(u,n,e,i,s)):null:null}function U0(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:mt(n)?t.__parseExpression(n):n,params:[]}}function L0(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function V0(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function H0(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
|
|
72
72
|
${t.value.value} = v;
|
|
73
|
-
}`:"(v) => {}"},i=r.__parseFunction(n),s=ia(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function q0(e,t,r,n,i){if(!t)return null;if(Dt(t))return{default:()=>t};if(mt(t))return{default:()=>Zo(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=z0(t),o=(a,l)=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?l?{[l]:a}:{[`scope_${i.id}`]:a}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((a,[l,{nodes:u,params:c,scope:f}])=>(a[l]=h=>{const p=c.length?Dd(h!=null?h:{},c):o(h,f);return u.map(d=>ie(d,r.__clone(p),e,n,u))},a),{})}return null}function z0(e){const t={};for(const r of e){const n=W0(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function W0(e="default"){return Dt(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function K0(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((l,u)=>u+1)),Array.isArray(a)?a.map((l,u)=>t(r.__clone({[s]:l,[o]:u}),u)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Or=Zi({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=ny(),t=va(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=ga(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Dr(e,tt(V({},t),{key:r})):Dr("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),J0=Zi({name:"VtjStartupContainer",render(){return Dr("div","page not found!")}});function rn(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:a,children:l,hidden:u,layout:c}=i;if(c){const f=rn(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:a,hidden:u,url:`${e}/${t}/${s}`,children:l&&l.length?rn(e,t,l):void 0};n.push(f)}}return n}function jr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:a,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:a,meta:tt(V(V({title:n},l),i),{__vtj__:r})}}function nn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:a}=e,l=[];for(const u of n){const{id:c,title:f,dir:h,layout:p,children:d,meta:m}=u;if(h){const b=nn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]});l.push(...b)}else if(p){const b=nn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:tt(V(V({title:f},o),m),{__vtj__:c}),children:b};l.push(_),l.push(jr(u,e))}else if(l.push(jr(u,e)),a===c){const b=jr(u,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function Y0(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:a={},adapter:l,mode:u}=t,{Pinia:c}=a;ur(s,"global-css",r||""),c&&n&&G0(n,o,c),Q0(o,l,e),!l.access&&e.access&&Z0(e.access,o,u,l),X0(o,e),i&&ty(i,o)}function G0(e,t,r){const n=r.createPinia();if(t.use(n),pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function Z0(e,t,r,n){if(pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),{alert:s,request:o}=n,a=new ta(V({alert:s},i(t))),l=t.config.globalProperties.$router;a.connect({mode:r,router:l,request:o}),t.use(a)}}function Q0(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&pt(n)&&n.value){const o=ht(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&pt(i)&&i.value){const o=ht(i,{},!1,!1,!0);t.request.useRequest(a=>o(a,e))}if(s&&pt(s)&&s.value){const o=ht(s,{},!1,!1,!0);t.request.useResponse(a=>o(a,e))}}function X0(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&pt(r)&&r.value){const s=ht(r,{},!1,!1,!0);i&&i.beforeEach((o,a,l)=>s(o,a,l,e))}if(n&&pt(n)&&n.value){const s=ht(n,{},!1,!1,!0);i&&i.afterEach((o,a,l)=>s(o,a,l,e))}}function ty(e,t){pt(e)&&e.value&&ht(e,{},!1,!1,!0)(t)}const sa=Symbol("Provider");class ey extends Kd{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:Yr,jsonp:Go});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=et.Raw,dependencies:s,materials:o,project:a={},adapter:l={},globals:u={},modules:c={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,l);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==et.Design?this.load(a):this.project=a}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){re.warn("模拟数据模版异常",o)}return(s=we())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,a=window;a&&(a.CKEDITOR_VERSION=void 0),this.mode===et.Raw?yield this.loadDependencies(a):yield this.loadAssets(a),this.initMock(a),this.apis=y0(s,o,this.adapter),ea(a),v0(s,a),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=we(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return k(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return k(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:l}=this,{libraryExports:u,libraryMap:c,materials:f,materialExports:h,materialMapLibrary:p}=i0(n,a,l==="development");for(const d of u){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const _=c[d]||[];for(const y of _)or(y)&&(yield u0(y,Le.append(y,{v:Rr}))),ar(y)&&(yield Wi(Le.append(y,{v:Rr})));s[d]=r[d]}}if(l==="development"){for(const m of f)yield Wi(Le.append(m,{v:Rr}));const d=this.materials||{};for(const m of h){const b=r[p[m]],_=Wd[m];if(_)b&&_.forEach(y=>{o[y]=b[y]});else{const y=d[m]?(yield d[m]()).default:r[m];y&&b&&(y.components||[]).forEach(v=>{o[v.name]=s0(v,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:l=o,routeMeta:u}=i,c=a?"":"/",f={path:`${c}${l}/:id`,name:Ve,component:Or},h={path:c,name:Ar,component:n!=null&&n.homepage?Or:s.startupComponent||J0,meta:u};if(r.hasRoute(Ve)&&r.removeRoute(Ve),r.hasRoute(Ar)&&r.removeRoute(Ar),i.enableStaticRoute){const p=(n==null?void 0:n.pages)||[];nn({name:l,prefix:c,pages:p,component:Or,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{a?r.addRoute(a,d):r.addRoute(d)}),n!=null&&n.homepage||(a?r.addRoute(a,h):r.addRoute(h))}else a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){var i,s;const n=r.config.globalProperties.installed||{};for(const[o,a]of Object.entries(this.library))!n[o]&&c0(a)&&(r.use(a),n[o]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(sa,this),r.config.globalProperties.$provider=this,((i=this.project)==null?void 0:i.platform)!=="uniapp"&&this.initGlobals(((s=this.project)==null?void 0:s.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.options.enhance&&r.use(this.options.enhance,this),this.mode===et.Design&&(r.config.errorHandler=(o,a,l)=>{const u=a==null?void 0:a.$options.name,c=typeof o=="string"?o:(o==null?void 0:o.message)||(o==null?void 0:o.msg)||"未知错误",f=`[ ${u} ] ${c} ${l}`;console.error("[VTJ Error]:",{err:o,instance:a,info:l},o==null?void 0:o.stack),this.adapter.notify&&this.adapter.notify(f,"组件渲染错误","error")}),r.config.globalProperties.installed=n}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const l=i(s,a.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return rn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),u=tn({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return Xr(tt(V({},l),{dsl:r,loader:u}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return re.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===et.Raw){const{vtjRawDir:a=".vtj/vue"}=this.options,l=`${a}/${r}.vue`,u=this.modules[l]||this.modules[`/src/pages/${r}.vue`];if(u)return(o=yield u())==null?void 0:o.default}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(re.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Sn(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Sn(()=>k(null,null,function*(){return yield ra(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);Y0(r,i)}}function ry(e){const t=new ey(e);return{provider:t,onReady:r=>t.ready(r)}}function ny(e={}){const t=ya(sa,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function iy(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(a=>t+a),{css:s,js:o}=o0(i);if(s.length&&Qo(s),o.length)return yield Xo(o,r).catch(()=>{})})}const oa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},sy=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:oa}),oy=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:tt(V({},oa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function ay(e){return bn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class uy{constructor(t=Yr){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=sy(t),this.uploader=oy(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>r0(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Yr.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Wo({type:"local",expired:0,prefix:"__VTJ_"});class cy extends uy{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Od(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
73
|
+
}`:"(v) => {}"},i=r.__parseFunction(n),s=ia(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function q0(e,t,r,n,i){if(!t)return null;if(Dt(t))return{default:()=>t};if(mt(t))return{default:()=>Zo(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=z0(t),o=(a,l)=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?l?{[l]:a}:{[`scope_${i.id}`]:a}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((a,[l,{nodes:u,params:c,scope:f}])=>(a[l]=h=>{const p=c.length?Dd(h!=null?h:{},c):o(h,f);return u.map(d=>ie(d,r.__clone(p),e,n,u))},a),{})}return null}function z0(e){const t={};for(const r of e){const n=W0(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function W0(e="default"){return Dt(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function K0(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((l,u)=>u+1)),Array.isArray(a)?a.map((l,u)=>t(r.__clone({[s]:l,[o]:u}),u)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Or=Zi({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=ny(),t=va(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=ga(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Dr(e,tt(V({},t),{key:r})):Dr("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),J0=Zi({name:"VtjStartupContainer",render(){return Dr("div","page not found!")}});function rn(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:a,children:l,hidden:u,layout:c}=i;if(c){const f=rn(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:a,hidden:u,url:`${e}/${t}/${s}`,children:l&&l.length?rn(e,t,l):void 0};n.push(f)}}return n}function jr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:a,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:a,meta:tt(V(V({title:n},l),i),{__vtj__:r})}}function nn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:a}=e,l=[];for(const u of n){const{id:c,title:f,dir:h,layout:p,children:d,meta:m}=u;if(h){const b=nn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]});l.push(...b)}else if(p){const b=nn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:tt(V(V({title:f},o),m),{__vtj__:c}),children:b};l.push(_),l.push(jr(u,e))}else if(l.push(jr(u,e)),a===c){const b=jr(u,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function Y0(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:a={},adapter:l,mode:u}=t,{Pinia:c}=a;ur(s,"global-css",r||""),c&&n&&G0(n,o,c),Q0(o,l,e),!l.access&&e.access&&Z0(e.access,o,u,l),X0(o,e),i&&ty(i,o)}function G0(e,t,r){const n=r.createPinia();if(t.use(n),pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function Z0(e,t,r,n){if(pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),{alert:s,request:o}=n,a=new ta(V({alert:s,storagePrefix:"__VTJ_APP_"},i(t))),l=t.config.globalProperties.$router;a.connect({mode:r,router:l,request:o}),t.use(a)}}function Q0(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&pt(n)&&n.value){const o=ht(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&pt(i)&&i.value){const o=ht(i,{},!1,!1,!0);t.request.useRequest(a=>o(a,e))}if(s&&pt(s)&&s.value){const o=ht(s,{},!1,!1,!0);t.request.useResponse(a=>o(a,e))}}function X0(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&pt(r)&&r.value){const s=ht(r,{},!1,!1,!0);i&&i.beforeEach((o,a,l)=>s(o,a,l,e))}if(n&&pt(n)&&n.value){const s=ht(n,{},!1,!1,!0);i&&i.afterEach((o,a,l)=>s(o,a,l,e))}}function ty(e,t){pt(e)&&e.value&&ht(e,{},!1,!1,!0)(t)}const sa=Symbol("Provider");class ey extends Kd{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:Yr,jsonp:Go});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=et.Raw,dependencies:s,materials:o,project:a={},adapter:l={},globals:u={},modules:c={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,l);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==et.Design?this.load(a):this.project=a}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){re.warn("模拟数据模版异常",o)}return(s=we())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,a=window;a&&(a.CKEDITOR_VERSION=void 0),this.mode===et.Raw?yield this.loadDependencies(a):yield this.loadAssets(a),this.initMock(a),this.apis=y0(s,o,this.adapter),ea(a),v0(s,a),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=we(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return k(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return k(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:l}=this,{libraryExports:u,libraryMap:c,materials:f,materialExports:h,materialMapLibrary:p}=i0(n,a,l==="development");for(const d of u){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const _=c[d]||[];for(const y of _)or(y)&&(yield u0(y,Le.append(y,{v:Rr}))),ar(y)&&(yield Wi(Le.append(y,{v:Rr})));s[d]=r[d]}}if(l==="development"){for(const m of f)yield Wi(Le.append(m,{v:Rr}));const d=this.materials||{};for(const m of h){const b=r[p[m]],_=Wd[m];if(_)b&&_.forEach(y=>{o[y]=b[y]});else{const y=d[m]?(yield d[m]()).default:r[m];y&&b&&(y.components||[]).forEach(v=>{o[v.name]=s0(v,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:l=o,routeMeta:u}=i,c=a?"":"/",f={path:`${c}${l}/:id`,name:Ve,component:Or},h={path:c,name:Ar,component:n!=null&&n.homepage?Or:s.startupComponent||J0,meta:u};if(r.hasRoute(Ve)&&r.removeRoute(Ve),r.hasRoute(Ar)&&r.removeRoute(Ar),i.enableStaticRoute){const p=(n==null?void 0:n.pages)||[];nn({name:l,prefix:c,pages:p,component:Or,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{a?r.addRoute(a,d):r.addRoute(d)}),n!=null&&n.homepage||(a?r.addRoute(a,h):r.addRoute(h))}else a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){var i,s;const n=r.config.globalProperties.installed||{};for(const[o,a]of Object.entries(this.library))!n[o]&&c0(a)&&(r.use(a),n[o]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(sa,this),r.config.globalProperties.$provider=this,((i=this.project)==null?void 0:i.platform)!=="uniapp"&&this.initGlobals(((s=this.project)==null?void 0:s.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.options.enhance&&r.use(this.options.enhance,this),this.mode===et.Design&&(r.config.errorHandler=(o,a,l)=>{const u=a==null?void 0:a.$options.name,c=typeof o=="string"?o:(o==null?void 0:o.message)||(o==null?void 0:o.msg)||"未知错误",f=`[ ${u} ] ${c} ${l}`;console.error("[VTJ Error]:",{err:o,instance:a,info:l},o==null?void 0:o.stack),this.adapter.notify&&this.adapter.notify(f,"组件渲染错误","error")}),r.config.globalProperties.installed=n}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const l=i(s,a.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return rn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),u=tn({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return Xr(tt(V({},l),{dsl:r,loader:u}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return re.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===et.Raw){const{vtjRawDir:a=".vtj/vue"}=this.options,l=`${a}/${r}.vue`,u=this.modules[l]||this.modules[`/src/pages/${r}.vue`];if(u)return(o=yield u())==null?void 0:o.default}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(re.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Sn(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Sn(()=>k(null,null,function*(){return yield ra(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);Y0(r,i)}}function ry(e){const t=new ey(e);return{provider:t,onReady:r=>t.ready(r)}}function ny(e={}){const t=ya(sa,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function iy(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(a=>t+a),{css:s,js:o}=o0(i);if(s.length&&Qo(s),o.length)return yield Xo(o,r).catch(()=>{})})}const oa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},sy=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:oa}),oy=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:tt(V({},oa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function ay(e){return bn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class uy{constructor(t=Yr){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=sy(t),this.uploader=oy(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>r0(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Yr.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Wo({type:"local",expired:0,prefix:"__VTJ_"});class cy extends uy{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Od(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
74
74
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
75
75
|
* @name @vtj/uni
|
|
76
76
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
77
|
-
* @version 0.13.
|
|
77
|
+
* @version 0.13.7
|
|
78
78
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
79
79
|
*/const ly=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],Yi="/pages",fy="VTJ",hy="__UNI__1FC118B",py="VTJ移动跨端项目",dy="1.0.0",my="100",gy=!1,yy={},vy={enable:!1},by="3",wy={name:fy,appid:hy,description:py,versionName:dy,versionCode:my,transformPx:gy,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:yy,"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:vy,vueVersion:by},_y=[],Ey={navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},Sy={autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}},xy={pages:_y,globalStyle:Ey,easycom:Sy};function Ty(e){let{manifestJson:t={},pagesJson:r={},routes:n=[]}=e;const i=n.map(s=>{const{path:o,style:a,needLogin:l}=s;return{path:o,style:a,needLogin:l}});return tt(V({},e),{manifestJson:Object.assign({},wy,t),pagesJson:Object.assign({},xy,r,{pages:i})})}const sn={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function aa(e){const t={},r={black:"#000000",white:"#ffffff"};for(const n in e)sn[n]&&(t[sn[n]]=n==="navigationBarTextStyle"?r[e[n]]||r.black:e[n]);return t}function Ry(e){const t={};for(const r in e)sn[r]||(t[r]=e[r]);return t}function Ay(e){var t,r;return((r=(t=e.h5)==null?void 0:t.router)==null?void 0:r.mode)||"hash"}function $y(e){var t,r,n;return{topWindow:!!((t=e.topWindow)!=null&&t.path),leftWindow:!!((r=e.leftWindow)!=null&&r.path),rightWindow:!!((n=e.rightWindow)!=null&&n.path)}}function Oy(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;return!!(r!=null&&r.enablePullDownRefresh||n.find(i=>{var s;return!!((s=i.style)!=null&&s.enablePullDownRefresh)}))}function jy(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;let i=!1;return(r==null?void 0:r.navigationStyle)==="custom"?(i=!0,n.find(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="default"})&&(i=!1)):n.every(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="custom"})&&(i=!0),i}function Dy(e){var a;const t=jy(e),r={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:n={}}=e,{globalStyle:i,pages:s=[]}=n;if(t)return r;r.navigationBar=!0;const o=(a=i==null?void 0:i.h5)==null?void 0:a.titleNView;return s.find(l=>{var u,c,f;return!!((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)!=null&&f.buttons.length)})&&(r.navigationBarButtons=!0),(o!=null&&o.searchInput||s.find(l=>{var u,c,f;return!!((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)!=null&&f.searchInput)}))&&(r.navigationBarSearchInput=!0),((o==null?void 0:o.type)==="transparent"||s.find(l=>{var u,c,f;return((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)==null?void 0:f.type)==="transparent"}))&&(r.navigationBarTransparent=!0),r}function By(e,t=window){var h,p,d,m;const{pagesJson:r={},manifestJson:n={}}=e,{topWindow:i,leftWindow:s,rightWindow:o}=$y(r),{navigationBar:a,navigationBarButtons:l,navigationBarSearchInput:u,navigationBarTransparent:c}=Dy(e),f={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:Ay(n),__UNI_FEATURE_PAGES__:!!((h=r.pages)!=null&&h.length),__UNI_FEATURE_TABBAR__:!!((d=(p=r.tabBar)==null?void 0:p.list)!=null&&d.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((m=r.tabBar)!=null&&m.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:s,__UNI_FEATURE_RIGHTWINDOW__:o,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:a,__UNI_FEATURE_PULL_DOWN_REFRESH__:Oy(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:l,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:u,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:c};Object.entries(f).forEach(([b,_])=>{t[b]=_})}const Cy="4.57";function Ny(e,t=window){var f,h;const{pagesJson:r={},manifestJson:n={}}=e,{easycom:i={}}=r,{appid:s="",name:o="",versionCode:a="",versionName:l=""}=n,u=r.globalStyle,c=((f=n.h5)==null?void 0:f.router)||{};t.__uniConfig={easycom:i,globalStyle:tt(V({},Ry(u)),{navigationBar:aa(u),isNVue:!1}),compilerVersion:Cy,appId:s,appName:o,appVersion:l,appVersionCode:String(a),async:V({loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0},((h=n.h5)==null?void 0:h.async)||{}),debug:!1,networkTimeout:V({request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},n.networkTimeout||{}),sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:V({mode:"hash",base:"/",assets:"assets",routerBase:c.base||"/"},c),darkmode:!1,themeConfig:{},tabBar:r.tabBar?V({position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0},r.tabBar):void 0}}function Iy(e,t=window){const{UniServiceJSBridge:r,UniViewJSBridge:n,getApp:i,uni:s,getCurrentPages:o,upx2px:a,setupPage:l}=e;t.UniServiceJSBridge=r,t.UniViewJSBridge=n,t.getApp=i,t.uni=s,t.wx=s,t.getCurrentPages=o,t.upx2px=a,t.__setupPage=u=>l(u)}function Py(e,t,r){const{openBlock:n,createBlock:i,withCtx:s,createVNode:o}=e,{PageComponent:a,setupPage:l,getApp:u}=t;return{mpType:"page",setup(){return k(this,null,function*(){var m,b;const f=((b=(m=u())==null?void 0:m.$route)==null?void 0:b.query)||{},{loader:h,component:p}=r,d=h?yield h(r):p||{};return()=>(n(),i(a,null,{page:s(()=>[o(l(d),Object.assign({},f,{ref:"page"}),null,512)]),_:1}))})}}}function ky(e,t,r){var p;const{path:n,style:i={},meta:s={},home:o,id:a}=t,l=((p=e.tabBar)==null?void 0:p.list)||[],u=l.findIndex(d=>{var m;return d.pagePath===n||((m=d.pagePath)==null?void 0:m.endsWith(a))}),c=l[u],f=!!c,h=r===0;return V({isTabBar:f,tabBarIndex:u,isQuit:o!=null?o:h,isEntry:o!=null?o:h,navigationBar:V({type:"default"},aa(i)),isNVue:!1,route:c?c.pagePath:n},s)}function Fy(e,t,r,n,i=window){const s=r.map((o,a)=>{const l=ky(n,o,a),u=Py(e,t,o),{path:c}=o;return{path:c,alias:c,meta:l,component:{render(){return e.h(e.Suspense,[e.h(u)])}}}});i.__uniRoutes=s,i.__uniLayout={}}function My(e,t,r=window){ur(r,String(e),t)}function Uy(e,t){t&&["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(r=>{const n=t[r];e.component(r,n)})}function Ly(e){const t=Ty(e),{Vue:r,App:n,UniH5:i,routes:s=[],pagesJson:o={},manifestJson:a={},window:l,css:u=""}=t;if(!i)return r.createApp(n);const{plugin:c,setupApp:f}=i;By(t,l),Ny(t,l),Iy(i,l),Fy(r,i,s,o,l),My(a.appid||Date.now(),u,l);const h=r.createApp(f(n));return h.use(Uy,i),h.use(c),h}function Vy(e,t){const r={};return Object.entries(e).forEach(([n,i])=>{ly.includes(n)&&i&&(r[n]=t(i))}),r}function Gi(e,t){return()=>k(null,null,function*(){const r=yield e.getDsl(t);if(r){const{renderer:n}=e.createDslRenderer(r);return n}return null})}function Hy(n){return k(this,arguments,function*(e,t=!1,r=Yi){var a,l,u;const i=((a=e.project)==null?void 0:a.pages)||[],s=[];for(const c of i){const f=((l=e.project)==null?void 0:l.homepage)===c.id;s.push({id:c.id,path:`${r}/${c.id}`,loader:Gi(e,c.id),style:V({navigationBarTitleText:c.title},c.style),needLogin:c.needLogin,home:f})}const o=s.find(c=>!!c.home)||s[0];if(o){const c=r===Yi?"/":r;s.unshift(tt(V({},o),{path:c}))}if(t){const c=((u=e.project)==null?void 0:u.blocks)||[];for(const f of c)s.push({id:f.id,path:`${r}/${f.id}`,loader:Gi(e,f.id),style:{navigationStyle:"custom"}})}return s})}function qy(){var e;return(e=window.uni)!=null&&e.showLoading&&window.uni.showLoading({title:"加载中...",mask:!0}),{close:()=>{var t;(t=window.uni)!=null&&t.hideLoading&&window.uni.hideLoading()}}}function ua(e,t="",r="warning"){return k(this,null,function*(){var n;return(n=window.uni)!=null&&n.showModal?window.uni.showModal({title:t,content:e,showCancel:!1}):Promise.reject(new Error("window.uni.showModal is undefined"))})}function zy(e=et.Runtime){return e===et.Runtime?Object.assign({}):Object.assign({})}const Wy=d0({loading:qy,notify:ua}),ca=new cy(ay(ua)),Ky=zy(),{provider:Jy,onReady:Yy}=ry({nodeEnv:"production",mode:et.Runtime,modules:Ky,materialPath:"../",adapter:Wy,service:ca,dependencies:{Vue:()=>Tn(()=>import("./@dcloudio-uni-h5-vue-DyFeQ9wv.js").then(e=>e.z),__vite__mapDeps([0,1,2]),import.meta.url),VueRouter:()=>Tn(()=>import("./vue-router-XhWA3gbh.js"),__vite__mapDeps([3,0,1,2]),import.meta.url)}}),Gy=e=>k(null,null,function*(){const t=(yield ca.getExtension().catch(()=>null))||{},r=top||window,n=yield iy(t.enhance,r.location.pathname),{Vue:i,UniH5:s}=window,o=e.project;if(!o)return;const a=o.uniConfig||{},l=Vy(a,d=>ht(d,window,!1,!0)),{manifestJson:u,pagesJson:c,css:f}=a,h=yield Hy(e,!0),p=Ly({Vue:i,App:l,UniH5:s,routes:h,css:f,manifestJson:u,pagesJson:c});p.use(e),n&&p.use(n,e),p.mount(document.body)});Yy(()=>Gy(Jy));
|
package/dist/uni/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<title></title>
|
|
14
14
|
<!--preload-links-->
|
|
15
15
|
<!--app-context-->
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-Nz89M53d.js"></script>
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vue-BK7aLblh.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-shared-VStmjWbh.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-h5-vue-DyFeQ9wv.js">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/pro",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"低代码引擎",
|
|
7
7
|
"LowCode Engine",
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vtj/core": "~0.13.
|
|
25
|
-
"@vtj/
|
|
26
|
-
"@vtj/
|
|
27
|
-
"@vtj/materials": "~0.13.
|
|
28
|
-
"@vtj/
|
|
29
|
-
"@vtj/
|
|
24
|
+
"@vtj/core": "~0.13.7",
|
|
25
|
+
"@vtj/renderer": "~0.13.7",
|
|
26
|
+
"@vtj/designer": "~0.13.7",
|
|
27
|
+
"@vtj/materials": "~0.13.7",
|
|
28
|
+
"@vtj/uni": "~0.13.7",
|
|
29
|
+
"@vtj/local": "~0.13.7"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"vue": "~3.5.5",
|
|
33
33
|
"vue-router": "~4.5.0",
|
|
34
|
+
"@vtj/charts": "~0.13.7",
|
|
35
|
+
"@vtj/ui": "~0.13.7",
|
|
34
36
|
"@vtj/cli": "~0.12.10",
|
|
35
|
-
"@vtj/icons": "~0.13.
|
|
36
|
-
"@vtj/
|
|
37
|
-
"@vtj/ui": "~0.13.5",
|
|
38
|
-
"@vtj/utils": "~0.13.5"
|
|
37
|
+
"@vtj/icons": "~0.13.7",
|
|
38
|
+
"@vtj/utils": "~0.13.7"
|
|
39
39
|
},
|
|
40
40
|
"exports": {
|
|
41
41
|
"./vite": {
|
package/src/pages.json
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"pages": [
|
|
3
|
-
{
|
|
4
|
-
"path": "pages/45tm4w8w2",
|
|
5
|
-
"style": {
|
|
6
|
-
"navigationBarTitleText": "aaa"
|
|
7
|
-
},
|
|
8
|
-
"needLogin": false,
|
|
9
|
-
"vtj": true
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"path": "pages/7pfjupgg3",
|
|
13
|
-
"style": {
|
|
14
|
-
"navigationBarTitleText": "bbb"
|
|
15
|
-
},
|
|
16
|
-
"needLogin": false,
|
|
17
|
-
"vtj": true
|
|
18
|
-
}
|
|
19
|
-
],
|
|
2
|
+
"pages": [],
|
|
20
3
|
"globalStyle": {
|
|
21
4
|
"navigationBarTextStyle": "black",
|
|
22
5
|
"navigationBarTitleText": "uni-app",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Ue=Object.defineProperty,Ke=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable;var pe=(e,t,n)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))me.call(t,n)&&pe(e,n,t[n]);if(K)for(var n of K(t))he.call(t,n)&&pe(e,n,t[n]);return e},Y=(e,t)=>Ke(e,qe(t));var G=(e,t)=>{var n={};for(var o in e)me.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&K)for(var o of K(e))t.indexOf(o)<0&&he.call(e,o)&&(n[o]=e[o]);return n};import{g as $e,b as Me,s as C,w as We,r as ee,e as b,f as R,u as Ae,h as U,i as ue,n as ae,j as le,k as x,t as Ze,l as et,m as tt,p as S,q as Ie,v as nt}from"./vue-ipWmmxHk.js";var ot=Object.defineProperty,rt=Object.defineProperties,st=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ye=(e,t,n)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,at=(e,t)=>{for(var n in t||(t={}))it.call(t,n)&&ye(e,n,t[n]);if(ge)for(var n of ge(t))ut.call(t,n)&&ye(e,n,t[n]);return e},lt=(e,t)=>rt(e,st(t));function fn(e,t){var n;const o=C();return We(()=>{o.value=e()},lt(at({},t),{flush:(n=void 0)!=null?n:"sync"})),ee(o)}var we;const te=typeof window!="undefined",ct=e=>typeof e!="undefined",ie=e=>typeof e=="function",ft=e=>typeof e=="string",Q=()=>{},dt=te&&((we=window==null?void 0:window.navigator)==null?void 0:we.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function H(e){return typeof e=="function"?e():Ae(e)}function De(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return n}function vt(e,t={}){let n,o,s=Q;const r=i=>{clearTimeout(i),s(),s=Q};return i=>{const a=H(e),f=H(t.maxWait);return n&&r(n),a<=0||f!==void 0&&f<=0?(o&&(r(o),o=null),Promise.resolve(i())):new Promise((v,l)=>{s=t.rejectOnCancel?l:v,f&&!o&&(o=setTimeout(()=>{n&&r(n),o=null,v(i())},f)),n=setTimeout(()=>{o&&r(o),o=null,v(i())},a)})}}function pt(e,t=!0,n=!0,o=!1){let s=0,r,u=!0,i=Q,a;const f=()=>{r&&(clearTimeout(r),r=void 0,i(),i=Q)};return l=>{const c=H(e),d=Date.now()-s,p=()=>a=l();return f(),c<=0?(s=Date.now(),p()):(d>c&&(n||!u)?(s=Date.now(),p()):t&&(a=new Promise((g,h)=>{i=o?h:g,r=setTimeout(()=>{s=Date.now(),u=!0,g(p()),f()},Math.max(0,c-d))})),!n&&!r&&(r=setTimeout(()=>u=!0,c)),u=!1,a)}}function mt(e){return e}function ht(e,t){let n,o,s;const r=b(!0),u=()=>{r.value=!0,s()};R(e,u,{flush:"sync"});const i=ie(t)?t:t.get,a=ie(t)?void 0:t.set,f=le((v,l)=>(o=v,s=l,{get(){return r.value&&(n=i(),r.value=!1),o(),n},set(c){a==null||a(c)}}));return Object.isExtensible(f)&&(f.trigger=u),f}function ne(e){return $e()?(Me(e),!0):!1}function gt(e,t=200,n={}){return De(vt(t,n),e)}function dn(e,t=200,n={}){const o=b(e.value),s=gt(()=>{o.value=e.value},t,n);return R(e,()=>s()),o}function vn(e,t=200,n=!1,o=!0,s=!1){return De(pt(t,n,o,s),e)}function ce(e,t=!0){U()?ue(e):t?e():ae(e)}function pn(e,t,n={}){const{immediate:o=!0}=n,s=b(!1);let r=null;function u(){r&&(clearTimeout(r),r=null)}function i(){s.value=!1,u()}function a(...f){u(),s.value=!0,r=setTimeout(()=>{s.value=!1,r=null,e(...f)},H(t))}return o&&(s.value=!0,te&&a()),ne(i),{isPending:ee(s),start:a,stop:i}}function L(e){var t;const n=H(e);return(t=n==null?void 0:n.$el)!=null?t:n}const B=te?window:void 0,yt=te?window.document:void 0;function F(...e){let t,n,o,s;if(ft(e[0])||Array.isArray(e[0])?([n,o,s]=e,t=B):[t,n,o,s]=e,!t)return Q;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],u=()=>{r.forEach(v=>v()),r.length=0},i=(v,l,c,d)=>(v.addEventListener(l,c,d),()=>v.removeEventListener(l,c,d)),a=R(()=>[L(t),H(s)],([v,l])=>{u(),v&&r.push(...n.flatMap(c=>o.map(d=>i(v,c,d,l))))},{immediate:!0,flush:"post"}),f=()=>{a(),u()};return ne(f),f}let be=!1;function mn(e,t,n={}){const{window:o=B,ignore:s=[],capture:r=!0,detectIframe:u=!1}=n;if(!o)return;dt&&!be&&(be=!0,Array.from(o.document.body.children).forEach(c=>c.addEventListener("click",Q)));let i=!0;const a=c=>s.some(d=>{if(typeof d=="string")return Array.from(o.document.querySelectorAll(d)).some(p=>p===c.target||c.composedPath().includes(p));{const p=L(d);return p&&(c.target===p||c.composedPath().includes(p))}}),v=[F(o,"click",c=>{const d=L(e);if(!(!d||d===c.target||c.composedPath().includes(d))){if(c.detail===0&&(i=!a(c)),!i){i=!0;return}t(c)}},{passive:!0,capture:r}),F(o,"pointerdown",c=>{const d=L(e);d&&(i=!c.composedPath().includes(d)&&!a(c))},{passive:!0}),u&&F(o,"blur",c=>{var d;const p=L(e);((d=o.document.activeElement)==null?void 0:d.tagName)==="IFRAME"&&!(p!=null&&p.contains(o.document.activeElement))&&t(c)})].filter(Boolean);return()=>v.forEach(c=>c())}function hn(e={}){var t;const{window:n=B}=e,o=(t=e.document)!=null?t:n==null?void 0:n.document,s=ht(()=>null,()=>o==null?void 0:o.activeElement);return n&&(F(n,"blur",r=>{r.relatedTarget===null&&s.trigger()},!0),F(n,"focus",s.trigger,!0)),s}function Le(e,t=!1){const n=b(),o=()=>n.value=!!e();return o(),ce(o,t),n}function wt(e){return JSON.parse(JSON.stringify(e))}const Oe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},_e="__vueuse_ssr_handlers__";Oe[_e]=Oe[_e]||{};function gn(e,t,{window:n=B,initialValue:o=""}={}){const s=b(o),r=x(()=>{var u;return L(t)||((u=n==null?void 0:n.document)==null?void 0:u.documentElement)});return R([r,()=>H(e)],([u,i])=>{var a;if(u&&n){const f=(a=n.getComputedStyle(u).getPropertyValue(i))==null?void 0:a.trim();s.value=f||o}},{immediate:!0}),R(s,u=>{var i;(i=r.value)!=null&&i.style&&r.value.style.setProperty(H(e),u)}),s}function yn({document:e=yt}={}){if(!e)return b("visible");const t=b(e.visibilityState);return F(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var Se=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,_t=(e,t)=>{var n={};for(var o in e)bt.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Se)for(var o of Se(e))t.indexOf(o)<0&&Ot.call(e,o)&&(n[o]=e[o]);return n};function ze(e,t,n={}){const o=n,{window:s=B}=o,r=_t(o,["window"]);let u;const i=Le(()=>s&&"ResizeObserver"in s),a=()=>{u&&(u.disconnect(),u=void 0)},f=R(()=>L(e),l=>{a(),i.value&&s&&l&&(u=new ResizeObserver(t),u.observe(l,r))},{immediate:!0,flush:"post"}),v=()=>{a(),f()};return ne(v),{isSupported:i,stop:v}}function wn(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:r=!0}=t,u=b(0),i=b(0),a=b(0),f=b(0),v=b(0),l=b(0),c=b(0),d=b(0);function p(){const g=L(e);if(!g){n&&(u.value=0,i.value=0,a.value=0,f.value=0,v.value=0,l.value=0,c.value=0,d.value=0);return}const h=g.getBoundingClientRect();u.value=h.height,i.value=h.bottom,a.value=h.left,f.value=h.right,v.value=h.top,l.value=h.width,c.value=h.x,d.value=h.y}return ze(e,p),R(()=>L(e),g=>!g&&p()),s&&F("scroll",p,{capture:!0,passive:!0}),o&&F("resize",p,{passive:!0}),ce(()=>{r&&p()}),{height:u,bottom:i,left:a,right:f,top:v,width:l,x:c,y:d,update:p}}function bn(e,t={width:0,height:0},n={}){const{window:o=B,box:s="content-box"}=n,r=x(()=>{var a,f;return(f=(a=L(e))==null?void 0:a.namespaceURI)==null?void 0:f.includes("svg")}),u=b(t.width),i=b(t.height);return ze(e,([a])=>{const f=s==="border-box"?a.borderBoxSize:s==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;if(o&&r.value){const v=L(e);if(v){const l=o.getComputedStyle(v);u.value=parseFloat(l.width),i.value=parseFloat(l.height)}}else if(f){const v=Array.isArray(f)?f:[f];u.value=v.reduce((l,{inlineSize:c})=>l+c,0),i.value=v.reduce((l,{blockSize:c})=>l+c,0)}else u.value=a.contentRect.width,i.value=a.contentRect.height},n),R(()=>L(e),a=>{u.value=a?t.width:0,i.value=a?t.height:0}),{width:u,height:i}}var Ee=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,xt=(e,t)=>{var n={};for(var o in e)St.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Ee)for(var o of Ee(e))t.indexOf(o)<0&&Et.call(e,o)&&(n[o]=e[o]);return n};function On(e,t,n={}){const o=n,{window:s=B}=o,r=xt(o,["window"]);let u;const i=Le(()=>s&&"MutationObserver"in s),a=()=>{u&&(u.disconnect(),u=void 0)},f=R(()=>L(e),l=>{a(),i.value&&s&&l&&(u=new MutationObserver(t),u.observe(l,r))},{immediate:!0}),v=()=>{a(),f()};return ne(v),{isSupported:i,stop:v}}var xe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(xe||(xe={}));var Pt=Object.defineProperty,Pe=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Te=(e,t,n)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rt=(e,t)=>{for(var n in t||(t={}))Tt.call(t,n)&&Te(e,n,t[n]);if(Pe)for(var n of Pe(t))Ct.call(t,n)&&Te(e,n,t[n]);return e};const $t={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Rt({linear:mt},$t);function _n(e,t,n,o={}){var s,r,u;const{clone:i=!1,passive:a=!1,eventName:f,deep:v=!1,defaultValue:l}=o,c=U(),d=n||(c==null?void 0:c.emit)||((s=c==null?void 0:c.$emit)==null?void 0:s.bind(c))||((u=(r=c==null?void 0:c.proxy)==null?void 0:r.$emit)==null?void 0:u.bind(c==null?void 0:c.proxy));let p=f;t||(t="modelValue"),p=f||p||`update:${t.toString()}`;const g=y=>i?ie(i)?i(y):wt(y):y,h=()=>ct(e[t])?g(e[t]):l;if(a){const y=h(),O=b(y);return R(()=>e[t],E=>O.value=g(E)),R(O,E=>{(E!==e[t]||v)&&d(p,E)},{deep:v}),O}else return x({get(){return h()},set(y){d(p,y)}})}function Sn({window:e=B}={}){if(!e)return b(!1);const t=b(e.document.hasFocus());return F(e,"blur",()=>{t.value=!1}),F(e,"focus",()=>{t.value=!0}),t}function En(e={}){const{window:t=B,initialWidth:n=1/0,initialHeight:o=1/0,listenOrientation:s=!0,includeScrollbar:r=!0}=e,u=b(n),i=b(o),a=()=>{t&&(r?(u.value=t.innerWidth,i.value=t.innerHeight):(u.value=t.document.documentElement.clientWidth,i.value=t.document.documentElement.clientHeight))};return a(),ce(a),F("resize",a,{passive:!0}),s&&F("orientationchange",a,{passive:!0}),{width:u,height:i}}function oe(e){return $e()?(Me(e),!0):!1}const se=new WeakMap,Mt=(...e)=>{var t;const n=e[0],o=(t=U())==null?void 0:t.proxy;if(o==null&&!Ie())throw new Error("injectLocal must be called in setup");return o&&se.has(o)&&n in se.get(o)?se.get(o)[n]:nt(...e)},fe=typeof window!="undefined"&&typeof document!="undefined";typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const Wt=e=>e!=null,At=Object.prototype.toString,It=e=>At.call(e)==="[object Object]",Dt=()=>{};function de(...e){if(e.length!==1)return Ze(...e);const t=e[0];return typeof t=="function"?ee(le(()=>({get:t,set:Dt}))):b(t)}function Lt(e,t){function n(...o){return new Promise((s,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(s).catch(r)})}return n}const Fe=e=>e();function zt(e=Fe,t={}){const{initialState:n="active"}=t,o=de(n==="active");function s(){o.value=!1}function r(){o.value=!0}const u=(...i)=>{o.value&&e(...i)};return{isActive:ee(o),pause:s,resume:r,eventFilter:u}}function Ce(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function J(e){return Array.isArray(e)?e:[e]}function Ft(e){return U()}function kt(e,t,n={}){const r=n,{eventFilter:o=Fe}=r,s=G(r,["eventFilter"]);return R(e,Lt(o,t),s)}function Nt(e,t,n={}){const l=n,{eventFilter:o,initialState:s="active"}=l,r=G(l,["eventFilter","initialState"]),{eventFilter:u,pause:i,resume:a,isActive:f}=zt(o,{initialState:s});return{stop:kt(e,t,Y(V({},r),{eventFilter:u})),pause:i,resume:a,isActive:f}}function Vt(e,t={}){if(!et(e))return tt(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=le(()=>({get(){return e.value[o]},set(s){var r;if((r=S(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const i=[...e.value];i[o]=s,e.value=i}else{const i=Y(V({},e.value),{[o]:s});Object.setPrototypeOf(i,Object.getPrototypeOf(e.value)),e.value=i}else e.value[o]=s}}));return n}function re(e,t=!0,n){Ft()?ue(e,n):t?e():ae(e)}function jt(e,t,n){return R(e,t,Y(V({},n),{immediate:!0}))}const N=fe?window:void 0,Bt=fe?window.document:void 0;function j(e){var t;const n=S(e);return(t=n==null?void 0:n.$el)!=null?t:n}function z(...e){const t=[],n=()=>{t.forEach(i=>i()),t.length=0},o=(i,a,f,v)=>(i.addEventListener(a,f,v),()=>i.removeEventListener(a,f,v)),s=x(()=>{const i=J(S(e[0])).filter(a=>a!=null);return i.every(a=>typeof a!="string")?i:void 0}),r=jt(()=>{var i,a;return[(a=(i=s.value)==null?void 0:i.map(f=>j(f)))!=null?a:[N].filter(f=>f!=null),J(S(s.value?e[1]:e[0])),J(Ae(s.value?e[2]:e[1])),S(s.value?e[3]:e[2])]},([i,a,f,v])=>{if(n(),!(i!=null&&i.length)||!(a!=null&&a.length)||!(f!=null&&f.length))return;const l=It(v)?V({},v):v;t.push(...i.flatMap(c=>a.flatMap(d=>f.map(p=>o(c,d,p,l)))))},{flush:"post"}),u=()=>{r(),n()};return oe(n),u}function Ht(){const e=C(!1),t=U();return t&&ue(()=>{e.value=!0},t),e}function ve(e){const t=Ht();return x(()=>(t.value,!!e()))}function ke(e,t,n={}){const c=n,{window:o=N}=c,s=G(c,["window"]);let r;const u=ve(()=>o&&"MutationObserver"in o),i=()=>{r&&(r.disconnect(),r=void 0)},a=x(()=>{const d=S(e),p=J(d).map(j).filter(Wt);return new Set(p)}),f=R(()=>a.value,d=>{i(),u.value&&d.size&&(r=new MutationObserver(t),d.forEach(p=>r.observe(p,s)))},{immediate:!0,flush:"post"}),v=()=>r==null?void 0:r.takeRecords(),l=()=>{f(),i()};return oe(l),{isSupported:u,stop:l,takeRecords:v}}const Xt=Symbol("vueuse-ssr-width");function Yt(){const e=Ie()?Mt(Xt,null):null;return typeof e=="number"?e:void 0}function Qt(e,t={}){const{window:n=N,ssrWidth:o=Yt()}=t,s=ve(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=C(typeof o=="number"),u=C(),i=C(!1),a=f=>{i.value=f.matches};return We(()=>{if(r.value){r.value=!s.value;const f=S(e).split(",");i.value=f.some(v=>{const l=v.includes("not all"),c=v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(c||d);return c&&p&&(p=o>=Ce(c[1])),d&&p&&(p=o<=Ce(d[1])),l?!p:p});return}s.value&&(u.value=n.matchMedia(S(e)),i.value=u.value.matches)}),z(u,"change",a,{passive:!0}),x(()=>i.value)}const q=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Z="__vueuse_ssr_handlers__",Gt=Jt();function Jt(){return Z in q||(q[Z]=q[Z]||{}),q[Z]}function Ne(e,t){return Gt[e]||t}function Ut(e){return Qt("(prefers-color-scheme: dark)",e)}function Kt(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const qt={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Re="vueuse-storage";function Zt(e,t,n,o={}){var s;const{flush:r="pre",deep:u=!0,listenToStorageChanges:i=!0,writeDefaults:a=!0,mergeDefaults:f=!1,shallow:v,window:l=N,eventFilter:c,onError:d=w=>{console.error(w)},initOnMounted:p}=o,g=(v?C:b)(typeof t=="function"?t():t),h=x(()=>S(e));if(!n)try{n=Ne("getDefaultStorage",()=>{var w;return(w=N)==null?void 0:w.localStorage})()}catch(w){d(w)}if(!n)return g;const y=S(t),O=Kt(y),E=(s=o.serializer)!=null?s:qt[O],{pause:M,resume:$}=Nt(g,()=>W(g.value),{flush:r,deep:u,eventFilter:c});R(h,()=>D(),{flush:r});let I=!1;const m=w=>{p&&!I||D(w)},_=w=>{p&&!I||X(w)};l&&i&&(n instanceof Storage?z(l,"storage",m,{passive:!0}):z(l,Re,_)),p?re(()=>{I=!0,D()}):D();function P(w,A){if(l){const k={key:h.value,oldValue:w,newValue:A,storageArea:n};l.dispatchEvent(n instanceof Storage?new StorageEvent("storage",k):new CustomEvent(Re,{detail:k}))}}function W(w){try{const A=n.getItem(h.value);if(w==null)P(A,null),n.removeItem(h.value);else{const k=E.write(w);A!==k&&(n.setItem(h.value,k),P(A,k))}}catch(A){d(A)}}function T(w){const A=w?w.newValue:n.getItem(h.value);if(A==null)return a&&y!=null&&n.setItem(h.value,E.write(y)),y;if(!w&&f){const k=E.read(A);return typeof f=="function"?f(k,y):O==="object"&&!Array.isArray(k)?V(V({},y),k):k}else return typeof A!="string"?A:E.read(A)}function D(w){if(!(w&&w.storageArea!==n)){if(w&&w.key==null){g.value=y;return}if(!(w&&w.key!==h.value)){M();try{(w==null?void 0:w.newValue)!==E.write(g.value)&&(g.value=T(w))}catch(A){d(A)}finally{w?ae($):$()}}}}function X(w){D(w.detail)}return g}const en="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function tn(e={}){const{selector:t="html",attribute:n="class",initialValue:o="auto",window:s=N,storage:r,storageKey:u="vueuse-color-scheme",listenToStorageChanges:i=!0,storageRef:a,emitAuto:f,disableTransition:v=!0}=e,l=V({auto:"",light:"light",dark:"dark"},e.modes||{}),c=Ut({window:s}),d=x(()=>c.value?"dark":"light"),p=a||(u==null?de(o):Zt(u,o,r,{window:s,listenToStorageChanges:i})),g=x(()=>p.value==="auto"?d.value:p.value),h=Ne("updateHTMLAttrs",(M,$,I)=>{const m=typeof M=="string"?s==null?void 0:s.document.querySelector(M):j(M);if(!m)return;const _=new Set,P=new Set;let W=null;if($==="class"){const D=I.split(/\s/g);Object.values(l).flatMap(X=>(X||"").split(/\s/g)).filter(Boolean).forEach(X=>{D.includes(X)?_.add(X):P.add(X)})}else W={key:$,value:I};if(_.size===0&&P.size===0&&W===null)return;let T;v&&(T=s.document.createElement("style"),T.appendChild(document.createTextNode(en)),s.document.head.appendChild(T));for(const D of _)m.classList.add(D);for(const D of P)m.classList.remove(D);W&&m.setAttribute(W.key,W.value),v&&(s.getComputedStyle(T).opacity,document.head.removeChild(T))});function y(M){var $;h(t,n,($=l[M])!=null?$:M)}function O(M){e.onChanged?e.onChanged(M,y):y(M)}R(g,O,{flush:"post",immediate:!0}),re(()=>O(g.value));const E=x({get(){return f?p.value:g.value},set(M){p.value=M}});return Object.assign(E,{store:p,system:d,state:g})}function xn(e={}){const{valueDark:t="dark",valueLight:n=""}=e,o=tn(Y(V({},e),{onChanged:(u,i)=>{var a;e.onChanged?(a=e.onChanged)==null||a.call(e,u==="dark",i,u):i(u)},modes:{dark:t,light:n}})),s=x(()=>o.system.value);return x({get(){return o.value==="dark"},set(u){const i=u?"dark":"light";s.value===i?o.value="auto":o.value=i}})}function Pn(e,t={}){var n;const{pointerTypes:o,preventDefault:s,stopPropagation:r,exact:u,onMove:i,onEnd:a,onStart:f,initialValue:v,axis:l="both",draggingElement:c=N,containerElement:d,handle:p=e,buttons:g=[0]}=t,h=b((n=S(v))!=null?n:{x:0,y:0}),y=b(),O=m=>o?o.includes(m.pointerType):!0,E=m=>{S(s)&&m.preventDefault(),S(r)&&m.stopPropagation()},M=m=>{var _;if(!S(g).includes(m.button)||S(t.disabled)||!O(m)||S(u)&&m.target!==S(e))return;const P=S(d),W=(_=P==null?void 0:P.getBoundingClientRect)==null?void 0:_.call(P),T=S(e).getBoundingClientRect(),D={x:m.clientX-(P?T.left-W.left+P.scrollLeft:T.left),y:m.clientY-(P?T.top-W.top+P.scrollTop:T.top)};(f==null?void 0:f(D,m))!==!1&&(y.value=D,E(m))},$=m=>{if(S(t.disabled)||!O(m)||!y.value)return;const _=S(d),P=S(e).getBoundingClientRect();let{x:W,y:T}=h.value;(l==="x"||l==="both")&&(W=m.clientX-y.value.x,_&&(W=Math.min(Math.max(0,W),_.scrollWidth-P.width))),(l==="y"||l==="both")&&(T=m.clientY-y.value.y,_&&(T=Math.min(Math.max(0,T),_.scrollHeight-P.height))),h.value={x:W,y:T},i==null||i(h.value,m),E(m)},I=m=>{S(t.disabled)||!O(m)||y.value&&(y.value=void 0,a==null||a(h.value,m),E(m))};if(fe){const m=()=>{var _;return{capture:(_=t.capture)!=null?_:!0,passive:!S(s)}};z(p,"pointerdown",M,m),z(c,"pointermove",$,m),z(c,"pointerup",I,m)}return Y(V({},Vt(h)),{position:h,isDragging:x(()=>!!y.value),style:x(()=>`left:${h.value.x}px;top:${h.value.y}px;`)})}function Ve(e,t,n={}){const l=n,{window:o=N}=l,s=G(l,["window"]);let r;const u=ve(()=>o&&"ResizeObserver"in o),i=()=>{r&&(r.disconnect(),r=void 0)},a=x(()=>{const c=S(e);return Array.isArray(c)?c.map(d=>j(d)):[j(c)]}),f=R(a,c=>{if(i(),u.value&&o){r=new ResizeObserver(t);for(const d of c)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),v=()=>{i(),f()};return oe(v),{isSupported:u,stop:v}}function nn(e,t={width:0,height:0},n={}){const{window:o=N,box:s="content-box"}=n,r=x(()=>{var l,c;return(c=(l=j(e))==null?void 0:l.namespaceURI)==null?void 0:c.includes("svg")}),u=C(t.width),i=C(t.height),{stop:a}=Ve(e,([l])=>{const c=s==="border-box"?l.borderBoxSize:s==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(o&&r.value){const d=j(e);if(d){const p=d.getBoundingClientRect();u.value=p.width,i.value=p.height}}else if(c){const d=J(c);u.value=d.reduce((p,{inlineSize:g})=>p+g,0),i.value=d.reduce((p,{blockSize:g})=>p+g,0)}else u.value=l.contentRect.width,i.value=l.contentRect.height},n);re(()=>{const l=j(e);l&&(u.value="offsetWidth"in l?l.offsetWidth:t.width,i.value="offsetHeight"in l?l.offsetHeight:t.height)});const f=R(()=>j(e),l=>{u.value=l?t.width:0,i.value=l?t.height:0});function v(){a(),f()}return{width:u,height:i,stop:v}}const on={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function rn(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:s={x:0,y:0},window:r=N,target:u=r,scroll:i=!0,eventFilter:a}=e;let f=null,v=0,l=0;const c=C(s.x),d=C(s.y),p=C(null),g=typeof t=="function"?t:on[t],h=m=>{const _=g(m);f=m,_&&([c.value,d.value]=_,p.value="mouse"),r&&(v=r.scrollX,l=r.scrollY)},y=m=>{if(m.touches.length>0){const _=g(m.touches[0]);_&&([c.value,d.value]=_,p.value="touch")}},O=()=>{if(!f||!r)return;const m=g(f);f instanceof MouseEvent&&m&&(c.value=m[0]+r.scrollX-v,d.value=m[1]+r.scrollY-l)},E=()=>{c.value=s.x,d.value=s.y},M=a?m=>a(()=>h(m),{}):m=>h(m),$=a?m=>a(()=>y(m),{}):m=>y(m),I=a?()=>a(()=>O(),{}):()=>O();if(u){const m={passive:!0};z(u,["mousemove","dragover"],M,m),n&&t!=="movement"&&(z(u,["touchstart","touchmove"],$,m),o&&z(u,"touchend",E,m)),i&&t==="page"&&z(r,"scroll",I,m)}return{x:c,y:d,sourceType:p}}function Tn(e,t={}){const{windowResize:n=!0,windowScroll:o=!0,handleOutside:s=!0,window:r=N}=t,u=t.type||"page",{x:i,y:a,sourceType:f}=rn(t),v=C(e!=null?e:r==null?void 0:r.document.body),l=C(0),c=C(0),d=C(0),p=C(0),g=C(0),h=C(0),y=C(!0);function O(){if(!r)return;const $=j(v);if(!$||!($ instanceof Element))return;const{left:I,top:m,width:_,height:P}=$.getBoundingClientRect();d.value=I+(u==="page"?r.pageXOffset:0),p.value=m+(u==="page"?r.pageYOffset:0),g.value=P,h.value=_;const W=i.value-d.value,T=a.value-p.value;y.value=_===0||P===0||W<0||T<0||W>_||T>P,s&&(l.value=W,c.value=T)}const E=[];function M(){E.forEach($=>$()),E.length=0}if(re(()=>{O()}),r){const{stop:$}=Ve(v,O),{stop:I}=ke(v,O,{attributeFilter:["style","class"]}),m=R([v,i,a],O);E.push($,I,m),z(document,"mouseleave",()=>y.value=!0,{passive:!0}),o&&E.push(z("scroll",O,{capture:!0,passive:!0})),n&&E.push(z("resize",O,{passive:!0}))}return{x:i,y:a,sourceType:f,elementX:l,elementY:c,elementPositionX:d,elementPositionY:p,elementHeight:g,elementWidth:h,isOutside:y,stop:M}}function Cn(e=null,t={}){var n,o,s;const{document:r=Bt,restoreOnUnmount:u=l=>l}=t,i=(n=r==null?void 0:r.title)!=null?n:"",a=de((o=e!=null?e:r==null?void 0:r.title)!=null?o:null),f=!!(e&&typeof e=="function");function v(l){if(!("titleTemplate"in t))return l;const c=t.titleTemplate||"%s";return typeof c=="function"?c(l):S(c).replace(/%s/g,l)}return R(a,(l,c)=>{l!==c&&r&&(r.title=v(l!=null?l:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&r&&!f&&ke((s=r.head)==null?void 0:s.querySelector("title"),()=>{r&&r.title!==a.value&&(a.value=v(r.title))},{childList:!0}),oe(()=>{if(u){const l=u(i,a.value||"");l!=null&&r&&(r.title=l)}}),a}function Rn(e,t){const{containerStyle:n,wrapperProps:o,scrollTo:s,calculateRange:r,currentList:u,containerRef:i}="itemHeight"in t?an(t,e):un(t,e);return{list:u,scrollTo:s,containerProps:{ref:i,onScroll:()=>{r()},style:n},wrapperProps:o}}function je(e){const t=C(null),n=nn(t),o=b([]),s=C(e);return{state:b({start:0,end:10}),source:s,currentList:o,size:n,containerRef:t}}function Be(e,t,n){return o=>{if(typeof n=="number")return Math.ceil(o/n);const{start:s=0}=e.value;let r=0,u=0;for(let i=s;i<t.value.length;i++){const a=n(i);if(r+=a,u=i,r>o)break}return u-s}}function He(e,t){return n=>{if(typeof t=="number")return Math.floor(n/t)+1;let o=0,s=0;for(let r=0;r<e.value.length;r++){const u=t(r);if(o+=u,o>=n){s=r;break}}return s+1}}function Xe(e,t,n,o,{containerRef:s,state:r,currentList:u,source:i}){return()=>{const a=s.value;if(a){const f=n(e==="vertical"?a.scrollTop:a.scrollLeft),v=o(e==="vertical"?a.clientHeight:a.clientWidth),l=f-t,c=f+v+t;r.value={start:l<0?0:l,end:c>i.value.length?i.value.length:c},u.value=i.value.slice(r.value.start,r.value.end).map((d,p)=>({data:d,index:p+r.value.start}))}}}function Ye(e,t){return n=>typeof e=="number"?n*e:t.value.slice(0,n).reduce((s,r,u)=>s+e(u),0)}function Qe(e,t,n,o){R([e.width,e.height,t,n],()=>{o()})}function Ge(e,t){return x(()=>typeof e=="number"?t.value.length*e:t.value.reduce((n,o,s)=>n+e(s),0))}const sn={horizontal:"scrollLeft",vertical:"scrollTop"};function Je(e,t,n,o){return s=>{o.value&&(o.value[sn[e]]=n(s),t())}}function un(e,t){const n=je(t),{state:o,source:s,currentList:r,size:u,containerRef:i}=n,a={overflowX:"auto"},{itemWidth:f,overscan:v=5}=e,l=Be(o,s,f),c=He(s,f),d=Xe("horizontal",v,c,l,n),p=Ye(f,s),g=x(()=>p(o.value.start)),h=Ge(f,s);Qe(u,t,i,d);const y=Je("horizontal",d,p,i),O=x(()=>({style:{height:"100%",width:`${h.value-g.value}px`,marginLeft:`${g.value}px`,display:"flex"}}));return{scrollTo:y,calculateRange:d,wrapperProps:O,containerStyle:a,currentList:r,containerRef:i}}function an(e,t){const n=je(t),{state:o,source:s,currentList:r,size:u,containerRef:i}=n,a={overflowY:"auto"},{itemHeight:f,overscan:v=5}=e,l=Be(o,s,f),c=He(s,f),d=Xe("vertical",v,c,l,n),p=Ye(f,s),g=x(()=>p(o.value.start)),h=Ge(f,s);Qe(u,t,i,d);const y=Je("vertical",d,p,i),O=x(()=>({style:{width:"100%",height:`${h.value-g.value}px`,marginTop:`${g.value}px`}}));return{calculateRange:d,scrollTo:y,containerStyle:a,wrapperProps:O,currentList:r,containerRef:i}}export{xn as A,wn as a,F as b,fn as c,ze as d,L as e,vn as f,gn as g,pn as h,te as i,dt as j,On as k,yn as l,Sn as m,_n as n,mn as o,hn as p,bn as q,dn as r,Cn as s,ne as t,En as u,Pn as v,Tn as w,z as x,Rn as y,nn as z};
|