@vtj/pro 0.10.1-alpha.6 → 0.10.1
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/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 +3 -3
- package/dist/@vtj/materials/assets/vant/index.umd.js +5 -5
- 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/uni-ui/index.umd.js +1 -1
- package/dist/@vtj/materials/deps/uni-ui/style.css +1 -1
- package/dist/assets/{auth-B_gzqO3o.js → auth-D3GaYvzO.js} +1 -1
- package/dist/assets/extension-Cy1PiOYQ.js +167 -0
- package/dist/assets/{extension-BwvqFU2h.css → extension-DdnSz_qB.css} +1 -1
- package/dist/assets/{index-QSwZgIeX.js → index-2LuQbUz1.js} +8 -8
- package/dist/assets/{index-X_BrTcrp.js → index-B-SdtZ0x.js} +1 -1
- package/dist/assets/{page-DJiOQ-P1.js → page-BvWxZGeA.js} +1 -1
- package/dist/assets/{preview-0hIFoiB4.js → preview-By1ByDwY.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/uni/assets/{index-BDaGI-XL.js → index-BjN3Vd-8.js} +2 -2
- package/dist/uni/index.html +1 -1
- package/package.json +12 -12
- package/dist/assets/extension-TjdQrOvB.js +0 -167
- package/src/App.vue +0 -2
- package/src/manifest.json +0 -72
- package/src/pages/45tg1jdo9.vue +0 -17
- package/src/pages.json +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B-SdtZ0x.js","./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js","./element-plus-HvLQb0Ih.js","./lodash-es-BL-d_OSa.js","./@vueuse-ZjnzVW6R.js","./@element-plus-icons-vue-CRZvKNrz.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-BGoW7lnC.css","./vxe-prHpAmaX.js","./vxe-BAb1d5vW.css","./extension-Cy1PiOYQ.js","./monaco-editor-BfuwkNVi.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BEvXV3hb.js","./extension-DdnSz_qB.css","./utils-CwbD7XwC.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-qxxdDj8s.css","./preview-By1ByDwY.js","./page-BvWxZGeA.js","./uni-page-ByIXJ059.js","./uni-page-Diqmj53r.css","./auth-D3GaYvzO.js","./auth-rAe8S_7e.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Tl=Object.defineProperty,$l=Object.defineProperties;var Ol=Object.getOwnPropertyDescriptors;var vr=Object.getOwnPropertySymbols;var Es=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable;var me=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Al=e=>{throw TypeError(e)};var xn=(e,t,r)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))Es.call(t,r)&&xn(e,r,t[r]);if(vr)for(var r of vr(t))Ss.call(t,r)&&xn(e,r,t[r]);return e},st=(e,t)=>$l(e,Ol(t));var Tn=(e,t)=>{var r={};for(var n in e)Es.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vr)for(var n of vr(e))t.indexOf(n)<0&&Ss.call(e,n)&&(r[n]=e[n]);return r};var A=(e,t,r)=>xn(e,typeof t!="symbol"?t+"":t,r);var L=(e,t,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(c){i(c)}},o=u=>{try{a(r.throw(u))}catch(c){i(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(e,t)).next())}),Gt=function(e,t){this[0]=e,this[1]=t},$n=(e,t,r)=>{var n=(o,a,u,c)=>{try{var l=r[o](a),f=(a=l.value)instanceof Gt,p=l.done;Promise.resolve(f?a[0]:a).then(h=>f?n(o==="return"?o:"next",a[1]?{done:h.done,value:h.value}:h,u,c):u({value:h,done:p})).catch(h=>n("throw",h,u,c))}catch(h){c(h)}},i=o=>s[o]=a=>new Promise((u,c)=>n(o,a,u,c)),s={};return r=r.apply(e,t),s[me("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},On=e=>{var t=e[me("asyncIterator")],r=!1,n,i={};return t==null?(t=e[me("iterator")](),n=s=>i[s]=o=>t[s](o)):(t=t.call(e),n=s=>i[s]=o=>{if(r){if(r=!1,s==="throw")throw o;return o}return r=!0,{done:!1,value:new Gt(new Promise(a=>{var u=t[s](o);u instanceof Object||Al("Object expected"),a(u)}),1)}}),i[me("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},xs=(e,t,r)=>(t=e[me("asyncIterator")])?t.call(e):(e=e[me("iterator")](),t={},r=(n,i)=>(i=e[n])&&(t[n]=s=>new Promise((o,a,u)=>(s=i.call(e,s),u=s.done,Promise.resolve(s.value).then(c=>o({value:c,done:u}),a)))),r("next"),r("return"),t);import{d as tn,ay as en,az as An,aA as Ts,c as jl,o as Yn,a as Zt,R as jn,v as ta,e as tr,w as Rl,ah as Gn,f as ea,p as Dl,r as Cl,j as Pl,k as ra,m as Ci,Z as kl,g as Nl,b as Bl,h as na,i as Il,K as $s,u as Os,ai as Ml,L as As,aB as Fl,T as Ll,av as Vl}from"./vue-DpQa2Qs4.js";import{useRoute as ia,createRouter as Hl,createWebHashHistory as Ul}from"./vue-router-Dv428VRb.js";import{z as zl,E as ql}from"./element-plus-HvLQb0Ih.js";import{_ as Ve}from"./monaco-editor-BfuwkNVi.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-ZjnzVW6R.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Kl={ENV_TYPE:"live",NODE_ENV:"production"},Jl=typeof global=="object"&&global&&global.Object===Object&&global;const sa=Jl;var Wl=typeof self=="object"&&self&&self.Object===Object&&self,Yl=sa||Wl||Function("return this")();const At=Yl;var Gl=At.Symbol;const Ct=Gl;var oa=Object.prototype,Zl=oa.hasOwnProperty,Ql=oa.toString,He=Ct?Ct.toStringTag:void 0;function Xl(e){var t=Zl.call(e,He),r=e[He];try{e[He]=void 0;var n=!0}catch(s){}var i=Ql.call(e);return n&&(t?e[He]=r:delete e[He]),i}var tf=Object.prototype,ef=tf.toString;function rf(e){return ef.call(e)}var nf="[object Null]",sf="[object Undefined]",js=Ct?Ct.toStringTag:void 0;function Et(e){return e==null?e===void 0?sf:nf:js&&js in Object(e)?Xl(e):rf(e)}function at(e){return e!=null&&typeof e=="object"}var of="[object Symbol]";function ur(e){return typeof e=="symbol"||at(e)&&Et(e)==of}function aa(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var af=Array.isArray;const pt=af;var Rs=Ct?Ct.prototype:void 0,Ds=Rs?Rs.toString:void 0;function ca(e){if(typeof e=="string")return e;if(pt(e))return aa(e,ca)+"";if(ur(e))return Ds?Ds.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var cf=/\s/;function uf(e){for(var t=e.length;t--&&cf.test(e.charAt(t)););return t}var lf=/^\s+/;function ff(e){return e&&e.slice(0,uf(e)+1).replace(lf,"")}function ct(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cs=NaN,hf=/^[-+]0x[0-9a-f]+$/i,pf=/^0b[01]+$/i,df=/^0o[0-7]+$/i,mf=parseInt;function Ps(e){if(typeof e=="number")return e;if(ur(e))return Cs;if(ct(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ct(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ff(e);var r=pf.test(e);return r||df.test(e)?mf(e.slice(2),r?2:8):hf.test(e)?Cs:+e}function Pi(e){return e}var gf="[object AsyncFunction]",vf="[object Function]",yf="[object GeneratorFunction]",bf="[object Proxy]";function ce(e){if(!ct(e))return!1;var t=Et(e);return t==vf||t==yf||t==gf||t==bf}var _f=At["__core-js_shared__"];const Rn=_f;var ks=function(){var e=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function wf(e){return!!ks&&ks in e}var Ef=Function.prototype,Sf=Ef.toString;function fe(e){if(e!=null){try{return Sf.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var xf=/[\\^$.*+?()[\]{}|]/g,Tf=/^\[object .+?Constructor\]$/,$f=Function.prototype,Of=Object.prototype,Af=$f.toString,jf=Of.hasOwnProperty,Rf=RegExp("^"+Af.call(jf).replace(xf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Df(e){if(!ct(e)||wf(e))return!1;var t=ce(e)?Rf:Tf;return t.test(fe(e))}function Cf(e,t){return e==null?void 0:e[t]}function he(e,t){var r=Cf(e,t);return Df(r)?r:void 0}var Pf=he(At,"WeakMap");const Zn=Pf;var Ns=Object.create,kf=function(){function e(){}return function(t){if(!ct(t))return{};if(Ns)return Ns(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Nf=kf;function ua(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Bf(){}function If(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Mf=800,Ff=16,Lf=Date.now;function Vf(e){var t=0,r=0;return function(){var n=Lf(),i=Ff-(n-r);if(r=n,i>0){if(++t>=Mf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Hf(e){return function(){return e}}var Uf=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const Ur=Uf;var zf=Ur?function(e,t){return Ur(e,"toString",{configurable:!0,enumerable:!1,value:Hf(t),writable:!0})}:Pi;const qf=zf;var Kf=Vf(qf);const Jf=Kf;function Wf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Yf=9007199254740991,Gf=/^(?:0|[1-9]\d*)$/;function rn(e,t){var r=typeof e;return t=t!=null?t:Yf,!!t&&(r=="number"||r!="symbol"&&Gf.test(e))&&e>-1&&e%1==0&&e<t}function nn(e,t,r){t=="__proto__"&&Ur?Ur(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ke(e,t){return e===t||e!==e&&t!==t}var Zf=Object.prototype,Qf=Zf.hasOwnProperty;function ki(e,t,r){var n=e[t];(!(Qf.call(e,t)&&ke(n,r))||r===void 0&&!(t in e))&&nn(e,t,r)}function la(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?nn(r,a,u):ki(r,a,u)}return r}var Bs=Math.max;function Xf(e,t,r){return t=Bs(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Bs(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),ua(e,this,a)}}function fa(e,t){return Jf(Xf(e,t,Pi),e+"")}var th=9007199254740991;function Ni(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=th}function lr(e){return e!=null&&Ni(e.length)&&!ce(e)}function ha(e,t,r){if(!ct(r))return!1;var n=typeof t;return(n=="number"?lr(r)&&rn(t,r.length):n=="string"&&t in r)?ke(r[t],e):!1}function pa(e){return fa(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&ha(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var eh=Object.prototype;function Bi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||eh;return e===r}function rh(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var nh="[object Arguments]";function Is(e){return at(e)&&Et(e)==nh}var da=Object.prototype,ih=da.hasOwnProperty,sh=da.propertyIsEnumerable,oh=Is(function(){return arguments}())?Is:function(e){return at(e)&&ih.call(e,"callee")&&!sh.call(e,"callee")};const zr=oh;function ah(){return!1}var ma=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ms=ma&&typeof module=="object"&&module&&!module.nodeType&&module,ch=Ms&&Ms.exports===ma,Fs=ch?At.Buffer:void 0,uh=Fs?Fs.isBuffer:void 0,lh=uh||ah;const Ae=lh;var fh="[object Arguments]",hh="[object Array]",ph="[object Boolean]",dh="[object Date]",mh="[object Error]",gh="[object Function]",vh="[object Map]",yh="[object Number]",bh="[object Object]",_h="[object RegExp]",wh="[object Set]",Eh="[object String]",Sh="[object WeakMap]",xh="[object ArrayBuffer]",Th="[object DataView]",$h="[object Float32Array]",Oh="[object Float64Array]",Ah="[object Int8Array]",jh="[object Int16Array]",Rh="[object Int32Array]",Dh="[object Uint8Array]",Ch="[object Uint8ClampedArray]",Ph="[object Uint16Array]",kh="[object Uint32Array]",X={};X[$h]=X[Oh]=X[Ah]=X[jh]=X[Rh]=X[Dh]=X[Ch]=X[Ph]=X[kh]=!0,X[fh]=X[hh]=X[xh]=X[ph]=X[Th]=X[dh]=X[mh]=X[gh]=X[vh]=X[yh]=X[bh]=X[_h]=X[wh]=X[Eh]=X[Sh]=!1;function Nh(e){return at(e)&&Ni(e.length)&&!!X[Et(e)]}function fr(e){return function(t){return e(t)}}var ga=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ge=ga&&typeof module=="object"&&module&&!module.nodeType&&module,Bh=Ge&&Ge.exports===ga,Dn=Bh&&sa.process,Ih=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||Dn&&Dn.binding&&Dn.binding("util")}catch(t){}}();const Pt=Ih;var Ls=Pt&&Pt.isTypedArray,Mh=Ls?fr(Ls):Nh;const Ii=Mh;var Fh=Object.prototype,Lh=Fh.hasOwnProperty;function va(e,t){var r=pt(e),n=!r&&zr(e),i=!r&&!n&&Ae(e),s=!r&&!n&&!i&&Ii(e),o=r||n||i||s,a=o?rh(e.length,String):[],u=a.length;for(var c in e)(t||Lh.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||rn(c,u)))&&a.push(c);return a}function ya(e,t){return function(r){return e(t(r))}}var Vh=ya(Object.keys,Object);const Hh=Vh;var Uh=Object.prototype,zh=Uh.hasOwnProperty;function qh(e){if(!Bi(e))return Hh(e);var t=[];for(var r in Object(e))zh.call(e,r)&&r!="constructor"&&t.push(r);return t}function sn(e){return lr(e)?va(e):qh(e)}function Kh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Jh=Object.prototype,Wh=Jh.hasOwnProperty;function Yh(e){if(!ct(e))return Kh(e);var t=Bi(e),r=[];for(var n in e)n=="constructor"&&(t||!Wh.call(e,n))||r.push(n);return r}function Mi(e){return lr(e)?va(e,!0):Yh(e)}var Gh=pa(function(e,t,r,n){la(t,Mi(t),e,n)});const Vs=Gh;var Zh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qh=/^\w*$/;function Fi(e,t){if(pt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ur(e)?!0:Qh.test(e)||!Zh.test(e)||t!=null&&e in Object(t)}var Xh=he(Object,"create");const er=Xh;function tp(){this.__data__=er?er(null):{},this.size=0}function ep(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rp="__lodash_hash_undefined__",np=Object.prototype,ip=np.hasOwnProperty;function sp(e){var t=this.__data__;if(er){var r=t[e];return r===rp?void 0:r}return ip.call(t,e)?t[e]:void 0}var op=Object.prototype,ap=op.hasOwnProperty;function cp(e){var t=this.__data__;return er?t[e]!==void 0:ap.call(t,e)}var up="__lodash_hash_undefined__";function lp(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=er&&t===void 0?up:t,this}function ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ee.prototype.clear=tp,ee.prototype.delete=ep,ee.prototype.get=sp,ee.prototype.has=cp,ee.prototype.set=lp;function fp(){this.__data__=[],this.size=0}function on(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var hp=Array.prototype,pp=hp.splice;function dp(e){var t=this.__data__,r=on(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():pp.call(t,r,1),--this.size,!0}function mp(e){var t=this.__data__,r=on(t,e);return r<0?void 0:t[r][1]}function gp(e){return on(this.__data__,e)>-1}function vp(e,t){var r=this.__data__,n=on(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function It(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}It.prototype.clear=fp,It.prototype.delete=dp,It.prototype.get=mp,It.prototype.has=gp,It.prototype.set=vp;var yp=he(At,"Map");const rr=yp;function bp(){this.size=0,this.__data__={hash:new ee,map:new(rr||It),string:new ee}}function _p(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function an(e,t){var r=e.__data__;return _p(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wp(e){var t=an(this,e).delete(e);return this.size-=t?1:0,t}function Ep(e){return an(this,e).get(e)}function Sp(e){return an(this,e).has(e)}function xp(e,t){var r=an(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Mt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mt.prototype.clear=bp,Mt.prototype.delete=wp,Mt.prototype.get=Ep,Mt.prototype.has=Sp,Mt.prototype.set=xp;var Tp="Expected a function";function Li(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Tp);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Li.Cache||Mt),r}Li.Cache=Mt;var $p=500;function Op(e){var t=Li(e,function(n){return r.size===$p&&r.clear(),n}),r=t.cache;return t}var Ap=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jp=/\\(\\)?/g,Rp=Op(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ap,function(r,n,i,s){t.push(i?s.replace(jp,"$1"):n||r)}),t});const Dp=Rp;function pe(e){return e==null?"":ca(e)}function Vi(e,t){return pt(e)?e:Fi(e,t)?[e]:Dp(pe(e))}function hr(e){if(typeof e=="string"||ur(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ba(e,t){t=Vi(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hr(t[r++])];return r&&r==n?e:void 0}function _a(e,t,r){var n=e==null?void 0:ba(e,t);return n===void 0?r:n}function Cp(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Pp=ya(Object.getPrototypeOf,Object);const wa=Pp;var kp="[object Object]",Np=Function.prototype,Bp=Object.prototype,Ea=Np.toString,Ip=Bp.hasOwnProperty,Mp=Ea.call(Object);function Hi(e){if(!at(e)||Et(e)!=kp)return!1;var t=wa(e);if(t===null)return!0;var r=Ip.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ea.call(r)==Mp}var Fp="[object DOMException]",Lp="[object Error]";function Sa(e){if(!at(e))return!1;var t=Et(e);return t==Lp||t==Fp||typeof e.message=="string"&&typeof e.name=="string"&&!Hi(e)}var Vp=fa(function(e,t){try{return ua(e,void 0,t)}catch(r){return Sa(r)?r:new Error(r)}});const Hp=Vp;function Up(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function zp(e,t,r){var n=e.length;return r=r===void 0?n:r,Up(e,t,r)}var qp="\\ud800-\\udfff",Kp="\\u0300-\\u036f",Jp="\\ufe20-\\ufe2f",Wp="\\u20d0-\\u20ff",Yp=Kp+Jp+Wp,Gp="\\ufe0e\\ufe0f",Zp="\\u200d",Qp=RegExp("["+Zp+qp+Yp+Gp+"]");function xa(e){return Qp.test(e)}function Xp(e){return e.split("")}var Ta="\\ud800-\\udfff",td="\\u0300-\\u036f",ed="\\ufe20-\\ufe2f",rd="\\u20d0-\\u20ff",nd=td+ed+rd,id="\\ufe0e\\ufe0f",sd="["+Ta+"]",Qn="["+nd+"]",Xn="\\ud83c[\\udffb-\\udfff]",od="(?:"+Qn+"|"+Xn+")",$a="[^"+Ta+"]",Oa="(?:\\ud83c[\\udde6-\\uddff]){2}",Aa="[\\ud800-\\udbff][\\udc00-\\udfff]",ad="\\u200d",ja=od+"?",Ra="["+id+"]?",cd="(?:"+ad+"(?:"+[$a,Oa,Aa].join("|")+")"+Ra+ja+")*",ud=Ra+ja+cd,ld="(?:"+[$a+Qn+"?",Qn,Oa,Aa,sd].join("|")+")",fd=RegExp(Xn+"(?="+Xn+")|"+ld+ud,"g");function hd(e){return e.match(fd)||[]}function pd(e){return xa(e)?hd(e):Xp(e)}function Da(e){return function(t){t=pe(t);var r=xa(t)?pd(t):void 0,n=r?r[0]:t.charAt(0),i=r?zp(r,1).join(""):t.slice(1);return n[e]()+i}}var dd=Da("toUpperCase");const cn=dd;function md(e){return cn(pe(e).toLowerCase())}function gd(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n;++i<s;)r=t(r,e[i],i,e);return r}function Ca(e){return function(t){return e==null?void 0:e[t]}}var vd={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yd=Ca(vd);const bd=yd;var _d=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wd="\\u0300-\\u036f",Ed="\\ufe20-\\ufe2f",Sd="\\u20d0-\\u20ff",xd=wd+Ed+Sd,Td="["+xd+"]",$d=RegExp(Td,"g");function Od(e){return e=pe(e),e&&e.replace(_d,bd).replace($d,"")}var Ad=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function jd(e){return e.match(Ad)||[]}var Rd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Dd(e){return Rd.test(e)}var Pa="\\ud800-\\udfff",Cd="\\u0300-\\u036f",Pd="\\ufe20-\\ufe2f",kd="\\u20d0-\\u20ff",Nd=Cd+Pd+kd,ka="\\u2700-\\u27bf",Na="a-z\\xdf-\\xf6\\xf8-\\xff",Bd="\\xac\\xb1\\xd7\\xf7",Id="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Md="\\u2000-\\u206f",Fd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ba="A-Z\\xc0-\\xd6\\xd8-\\xde",Ld="\\ufe0e\\ufe0f",Ia=Bd+Id+Md+Fd,Ma="['’]",Hs="["+Ia+"]",Vd="["+Nd+"]",Fa="\\d+",Hd="["+ka+"]",La="["+Na+"]",Va="[^"+Pa+Ia+Fa+ka+Na+Ba+"]",Ud="\\ud83c[\\udffb-\\udfff]",zd="(?:"+Vd+"|"+Ud+")",qd="[^"+Pa+"]",Ha="(?:\\ud83c[\\udde6-\\uddff]){2}",Ua="[\\ud800-\\udbff][\\udc00-\\udfff]",be="["+Ba+"]",Kd="\\u200d",Us="(?:"+La+"|"+Va+")",Jd="(?:"+be+"|"+Va+")",zs="(?:"+Ma+"(?:d|ll|m|re|s|t|ve))?",qs="(?:"+Ma+"(?:D|LL|M|RE|S|T|VE))?",za=zd+"?",qa="["+Ld+"]?",Wd="(?:"+Kd+"(?:"+[qd,Ha,Ua].join("|")+")"+qa+za+")*",Yd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Gd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zd=qa+za+Wd,Qd="(?:"+[Hd,Ha,Ua].join("|")+")"+Zd,Xd=RegExp([be+"?"+La+"+"+zs+"(?="+[Hs,be,"$"].join("|")+")",Jd+"+"+qs+"(?="+[Hs,be+Us,"$"].join("|")+")",be+"?"+Us+"+"+zs,be+"+"+qs,Gd,Yd,Fa,Qd].join("|"),"g");function tm(e){return e.match(Xd)||[]}function em(e,t,r){return e=pe(e),t=t,t===void 0?Dd(e)?tm(e):jd(e):e.match(t)||[]}var rm="['’]",nm=RegExp(rm,"g");function Ui(e){return function(t){return gd(em(Od(t).replace(nm,"")),e,"")}}var im=Ui(function(e,t,r){return t=t.toLowerCase(),e+(r?md(t):t)});const Nt=im;function sm(){this.__data__=new It,this.size=0}function om(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function am(e){return this.__data__.get(e)}function cm(e){return this.__data__.has(e)}var um=200;function lm(e,t){var r=this.__data__;if(r instanceof It){var n=r.__data__;if(!rr||n.length<um-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Mt(n)}return r.set(e,t),this.size=r.size,this}function Ot(e){var t=this.__data__=new It(e);this.size=t.size}Ot.prototype.clear=sm,Ot.prototype.delete=om,Ot.prototype.get=am,Ot.prototype.has=cm,Ot.prototype.set=lm;var Ka=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ks=Ka&&typeof module=="object"&&module&&!module.nodeType&&module,fm=Ks&&Ks.exports===Ka,Js=fm?At.Buffer:void 0,Ws=Js?Js.allocUnsafe:void 0;function Ja(e,t){if(t)return e.slice();var r=e.length,n=Ws?Ws(r):new e.constructor(r);return e.copy(n),n}function hm(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function pm(){return[]}var dm=Object.prototype,mm=dm.propertyIsEnumerable,Ys=Object.getOwnPropertySymbols,gm=Ys?function(e){return e==null?[]:(e=Object(e),hm(Ys(e),function(t){return mm.call(e,t)}))}:pm;const vm=gm;function ym(e,t,r){var n=t(e);return pt(e)?n:Cp(n,r(e))}function ti(e){return ym(e,sn,vm)}var bm=he(At,"DataView");const ei=bm;var _m=he(At,"Promise");const ri=_m;var wm=he(At,"Set");const ni=wm;var Gs="[object Map]",Em="[object Object]",Zs="[object Promise]",Qs="[object Set]",Xs="[object WeakMap]",to="[object DataView]",Sm=fe(ei),xm=fe(rr),Tm=fe(ri),$m=fe(ni),Om=fe(Zn),Xt=Et;(ei&&Xt(new ei(new ArrayBuffer(1)))!=to||rr&&Xt(new rr)!=Gs||ri&&Xt(ri.resolve())!=Zs||ni&&Xt(new ni)!=Qs||Zn&&Xt(new Zn)!=Xs)&&(Xt=function(e){var t=Et(e),r=t==Em?e.constructor:void 0,n=r?fe(r):"";if(n)switch(n){case Sm:return to;case xm:return Gs;case Tm:return Zs;case $m:return Qs;case Om:return Xs}return t});const nr=Xt;var Am=Object.prototype,jm=Am.hasOwnProperty;function Rm(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&jm.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Dm=At.Uint8Array;const qr=Dm;function zi(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t}function Cm(e,t){var r=zi(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Pm=/\w*$/;function km(e){var t=new e.constructor(e.source,Pm.exec(e));return t.lastIndex=e.lastIndex,t}var eo=Ct?Ct.prototype:void 0,ro=eo?eo.valueOf:void 0;function Nm(e){return ro?Object(ro.call(e)):{}}function Wa(e,t){var r=t?zi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Bm="[object Boolean]",Im="[object Date]",Mm="[object Map]",Fm="[object Number]",Lm="[object RegExp]",Vm="[object Set]",Hm="[object String]",Um="[object Symbol]",zm="[object ArrayBuffer]",qm="[object DataView]",Km="[object Float32Array]",Jm="[object Float64Array]",Wm="[object Int8Array]",Ym="[object Int16Array]",Gm="[object Int32Array]",Zm="[object Uint8Array]",Qm="[object Uint8ClampedArray]",Xm="[object Uint16Array]",tg="[object Uint32Array]";function eg(e,t,r){var n=e.constructor;switch(t){case zm:return zi(e);case Bm:case Im:return new n(+e);case qm:return Cm(e);case Km:case Jm:case Wm:case Ym:case Gm:case Zm:case Qm:case Xm:case tg:return Wa(e,r);case Mm:return new n;case Fm:case Hm:return new n(e);case Lm:return km(e);case Vm:return new n;case Um:return Nm(e)}}function Ya(e){return typeof e.constructor=="function"&&!Bi(e)?Nf(wa(e)):{}}var rg="[object Map]";function ng(e){return at(e)&&nr(e)==rg}var no=Pt&&Pt.isMap,ig=no?fr(no):ng;const sg=ig;var og="[object Set]";function ag(e){return at(e)&&nr(e)==og}var io=Pt&&Pt.isSet,cg=io?fr(io):ag;const ug=cg;var lg=1,Ga="[object Arguments]",fg="[object Array]",hg="[object Boolean]",pg="[object Date]",dg="[object Error]",Za="[object Function]",mg="[object GeneratorFunction]",gg="[object Map]",vg="[object Number]",Qa="[object Object]",yg="[object RegExp]",bg="[object Set]",_g="[object String]",wg="[object Symbol]",Eg="[object WeakMap]",Sg="[object ArrayBuffer]",xg="[object DataView]",Tg="[object Float32Array]",$g="[object Float64Array]",Og="[object Int8Array]",Ag="[object Int16Array]",jg="[object Int32Array]",Rg="[object Uint8Array]",Dg="[object Uint8ClampedArray]",Cg="[object Uint16Array]",Pg="[object Uint32Array]",Q={};Q[Ga]=Q[fg]=Q[Sg]=Q[xg]=Q[hg]=Q[pg]=Q[Tg]=Q[$g]=Q[Og]=Q[Ag]=Q[jg]=Q[gg]=Q[vg]=Q[Qa]=Q[yg]=Q[bg]=Q[_g]=Q[wg]=Q[Rg]=Q[Dg]=Q[Cg]=Q[Pg]=!0,Q[dg]=Q[Za]=Q[Eg]=!1;function jr(e,t,r,n,i,s){var o,a=t≶if(o!==void 0)return o;if(!ct(e))return e;var u=pt(e);if(u)o=Rm(e);else{var c=nr(e),l=c==Za||c==mg;if(Ae(e))return Ja(e,a);if(c==Qa||c==Ga||l&&!i)o=l?{}:Ya(e);else{if(!Q[c])return i?e:{};o=eg(e,c,a)}}s||(s=new Ot);var f=s.get(e);if(f)return f;s.set(e,o),ug(e)?e.forEach(function(m){o.add(jr(m,t,r,m,e,s))}):sg(e)&&e.forEach(function(m,d){o.set(d,jr(m,t,r,d,e,s))});var p=ti,h=u?void 0:p(e);return Wf(h||e,function(m,d){h&&(d=m,m=e[d]),ki(o,d,jr(m,t,r,d,e,s))}),o}var kg=1,Ng=4;function ir(e){return jr(e,kg|Ng)}var Bg="__lodash_hash_undefined__";function Ig(e){return this.__data__.set(e,Bg),this}function Mg(e){return this.__data__.has(e)}function Rr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Mt;++t<r;)this.add(e[t])}Rr.prototype.add=Rr.prototype.push=Ig,Rr.prototype.has=Mg;function Fg(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Lg(e,t){return e.has(t)}var Vg=1,Hg=2;function Xa(e,t,r,n,i,s){var o=r&Vg,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,h=r&Hg?new Rr:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var m=e[f],d=t[f];if(n)var b=o?n(d,m,f,t,e,s):n(m,d,f,e,t,s);if(b!==void 0){if(b)continue;p=!1;break}if(h){if(!Fg(t,function(E,g){if(!Lg(h,g)&&(m===E||i(m,E,r,n,s)))return h.push(g)})){p=!1;break}}else if(!(m===d||i(m,d,r,n,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Ug(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function zg(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var qg=1,Kg=2,Jg="[object Boolean]",Wg="[object Date]",Yg="[object Error]",Gg="[object Map]",Zg="[object Number]",Qg="[object RegExp]",Xg="[object Set]",tv="[object String]",ev="[object Symbol]",rv="[object ArrayBuffer]",nv="[object DataView]",so=Ct?Ct.prototype:void 0,Cn=so?so.valueOf:void 0;function iv(e,t,r,n,i,s,o){switch(r){case nv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rv:return!(e.byteLength!=t.byteLength||!s(new qr(e),new qr(t)));case Jg:case Wg:case Zg:return ke(+e,+t);case Yg:return e.name==t.name&&e.message==t.message;case Qg:case tv:return e==t+"";case Gg:var a=Ug;case Xg:var u=n&qg;if(a||(a=zg),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=Kg,o.set(e,t);var l=Xa(a(e),a(t),n,i,s,o);return o.delete(e),l;case ev:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}var sv=1,ov=Object.prototype,av=ov.hasOwnProperty;function cv(e,t,r,n,i,s){var o=r&sv,a=ti(e),u=a.length,c=ti(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var p=a[f];if(!(o?p in t:av.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var d=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<u;){p=a[f];var E=e[p],g=t[p];if(n)var y=o?n(g,E,p,t,e,s):n(E,g,p,e,t,s);if(!(y===void 0?E===g||i(E,g,r,n,s):y)){d=!1;break}b||(b=p=="constructor")}if(d&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(d=!1)}return s.delete(e),s.delete(t),d}var uv=1,oo="[object Arguments]",ao="[object Array]",yr="[object Object]",lv=Object.prototype,co=lv.hasOwnProperty;function fv(e,t,r,n,i,s){var o=pt(e),a=pt(t),u=o?ao:nr(e),c=a?ao:nr(t);u=u==oo?yr:u,c=c==oo?yr:c;var l=u==yr,f=c==yr,p=u==c;if(p&&Ae(e)){if(!Ae(t))return!1;o=!0,l=!1}if(p&&!l)return s||(s=new Ot),o||Ii(e)?Xa(e,t,r,n,i,s):iv(e,t,u,r,n,i,s);if(!(r&uv)){var h=l&&co.call(e,"__wrapped__"),m=f&&co.call(t,"__wrapped__");if(h||m){var d=h?e.value():e,b=m?t.value():t;return s||(s=new Ot),i(d,b,r,n,s)}}return p?(s||(s=new Ot),cv(e,t,r,n,i,s)):!1}function un(e,t,r,n,i){return e===t?!0:e==null||t==null||!at(e)&&!at(t)?e!==e&&t!==t:fv(e,t,r,n,un,i)}var hv=1,pv=2;function dv(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var a=o[0],u=e[a],c=o[1];if(o[2]){if(u===void 0&&!(a in e))return!1}else{var l=new Ot,f;if(!(f===void 0?un(c,u,hv|pv,n,l):f))return!1}}return!0}function tc(e){return e===e&&!ct(e)}function mv(e){for(var t=sn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,tc(i)]}return t}function ec(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function gv(e){var t=mv(e);return t.length==1&&t[0][2]?ec(t[0][0],t[0][1]):function(r){return r===e||dv(r,e,t)}}function vv(e,t){return e!=null&&t in Object(e)}function yv(e,t,r){t=Vi(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=hr(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&Ni(i)&&rn(o,i)&&(pt(e)||zr(e)))}function bv(e,t){return e!=null&&yv(e,t,vv)}var _v=1,wv=2;function Ev(e,t){return Fi(e)&&tc(t)?ec(hr(e),t):function(r){var n=_a(r,e);return n===void 0&&n===t?bv(r,e):un(t,n,_v|wv)}}function Sv(e){return function(t){return t==null?void 0:t[e]}}function xv(e){return function(t){return ba(t,e)}}function Tv(e){return Fi(e)?Sv(hr(e)):xv(e)}function $v(e){return typeof e=="function"?e:e==null?Pi:typeof e=="object"?pt(e)?Ev(e[0],e[1]):gv(e):Tv(e)}function Ov(e,t,r,n){for(var i=-1,s=e==null?0:e.length;++i<s;){var o=e[i];t(n,o,r(o),e)}return n}function Av(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var u=o[++i];if(r(s[u],u,s)===!1)break}return t}}var jv=Av();const rc=jv;function Rv(e,t){return e&&rc(e,t,sn)}function Dv(e,t){return function(r,n){if(r==null)return r;if(!lr(r))return e(r,n);for(var i=r.length,s=-1,o=Object(r);++s<i&&n(o[s],s,o)!==!1;);return r}}var Cv=Dv(Rv);const Pv=Cv;function kv(e,t,r,n){return Pv(e,function(i,s,o){t(n,i,r(i),o)}),n}function Nv(e,t){return function(r,n){var i=pt(r)?Ov:kv,s={};return i(r,e,$v(n),s)}}var Bv=function(){return At.Date.now()};const Pn=Bv;var Iv="Expected a function",Mv=Math.max,Fv=Math.min;function qi(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Iv);t=Ps(t)||0,ct(r)&&(l=!!r.leading,f="maxWait"in r,s=f?Mv(Ps(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function h(v){var x=n,O=i;return n=i=void 0,c=v,o=e.apply(O,x),o}function m(v){return c=v,a=setTimeout(E,t),l?h(v):o}function d(v){var x=v-u,O=v-c,V=t-x;return f?Fv(V,s-O):V}function b(v){var x=v-u,O=v-c;return u===void 0||x>=t||x<0||f&&O>=s}function E(){var v=Pn();if(b(v))return g(v);a=setTimeout(E,d(v))}function g(v){return a=void 0,p&&n?h(v):(n=i=void 0,o)}function y(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function _(){return a===void 0?o:g(Pn())}function S(){var v=Pn(),x=b(v);if(n=arguments,i=this,u=v,x){if(a===void 0)return m(u);if(f)return clearTimeout(a),a=setTimeout(E,t),h(u)}return a===void 0&&(a=setTimeout(E,t)),o}return S.cancel=y,S.flush=_,S}function ii(e,t,r){(r!==void 0&&!ke(e[t],r)||r===void 0&&!(t in e))&&nn(e,t,r)}function Lv(e){return at(e)&&lr(e)}function si(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Vv(e){return la(e,Mi(e))}function Hv(e,t,r,n,i,s,o){var a=si(e,r),u=si(t,r),c=o.get(u);if(c){ii(e,r,c);return}var l=s?s(a,u,r+"",e,t,o):void 0,f=l===void 0;if(f){var p=pt(u),h=!p&&Ae(u),m=!p&&!h&&Ii(u);l=u,p||h||m?pt(a)?l=a:Lv(a)?l=If(a):h?(f=!1,l=Ja(u,!0)):m?(f=!1,l=Wa(u,!0)):l=[]:Hi(u)||zr(u)?(l=a,zr(a)?l=Vv(a):(!ct(a)||ce(a))&&(l=Ya(u))):f=!1}f&&(o.set(u,l),i(l,u,n,s,o),o.delete(u)),ii(e,r,l)}function nc(e,t,r,n,i){e!==t&&rc(t,function(s,o){if(i||(i=new Ot),ct(s))Hv(e,t,o,r,nc,n,i);else{var a=n?n(si(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ii(e,o,a)}},Mi)}var Uv={"&":"&","<":"<",">":">",'"':""","'":"'"},zv=Ca(Uv);const qv=zv;var ic=/[&<>"']/g,Kv=RegExp(ic.source);function Jv(e){return e=pe(e),e&&Kv.test(e)?e.replace(ic,qv):e}var Wv=Object.prototype,Yv=Wv.hasOwnProperty,Gv=Nv(function(e,t,r){Yv.call(e,r)?e[r].push(t):nn(e,r,[t])});const sc=Gv;var Zv="[object String]";function bt(e){return typeof e=="string"||!pt(e)&&at(e)&&Et(e)==Zv}function Qv(e,t){return aa(t,function(r){return e[r]})}var Xv="[object ArrayBuffer]";function ty(e){return at(e)&&Et(e)==Xv}var uo=Pt&&Pt.isArrayBuffer,ey=uo?fr(uo):ty;const ry=ey;var ny="[object Boolean]";function iy(e){return e===!0||e===!1||at(e)&&Et(e)==ny}var sy="[object Date]";function oy(e){return at(e)&&Et(e)==sy}var lo=Pt&&Pt.isDate,ay=lo?fr(lo):oy;const cy=ay;function uy(e,t){return un(e,t)}var ly="[object Number]";function oc(e){return typeof e=="number"||at(e)&&Et(e)==ly}function fy(e){return oc(e)&&e!=+e}function hy(e){return e===null}function py(e){return e===void 0}var dy=Ui(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const my=dy;var gy=Da("toLowerCase");const vy=gy;var yy=pa(function(e,t,r){nc(e,t,r)});const Dt=yy;function by(e,t,r,n){if(!ct(e))return e;t=Vi(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=hr(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=a[u];c=void 0,c===void 0&&(c=ct(l)?l:rn(t[i+1])?[]:{})}ki(a,u,c),a=a[u]}return e}function _y(e,t,r){return e==null?e:by(e,t,r)}var wy=Ui(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});const Ey=wy;var ac=Object.prototype,Sy=ac.hasOwnProperty;function fo(e,t,r,n){return e===void 0||ke(e,ac[r])&&!Sy.call(n,r)?t:e}var xy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Ty(e){return"\\"+xy[e]}var $y=/<%=([\s\S]+?)%>/g;const cc=$y;var Oy=/<%-([\s\S]+?)%>/g;const Ay=Oy;var jy=/<%([\s\S]+?)%>/g;const Ry=jy;var Dy={escape:Ay,evaluate:Ry,interpolate:cc,variable:"",imports:{_:{escape:Jv}}};const ho=Dy;var Cy="Invalid `variable` option passed into `_.template`",Py=/\b__p \+= '';/g,ky=/\b(__p \+=) '' \+/g,Ny=/(__e\(.*?\)|\b__t\)) \+\n'';/g,By=/[()=,{}\[\]\/\s]/,Iy=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,br=/($^)/,My=/['\n\r\u2028\u2029\\]/g,Fy=Object.prototype,po=Fy.hasOwnProperty;function uc(e,t,r){var n=ho.imports._.templateSettings||ho;r&&ha(e,t,r)&&(t=void 0),e=pe(e),t=Vs({},t,n,fo);var i=Vs({},t.imports,n.imports,fo),s=sn(i),o=Qv(i,s),a,u,c=0,l=t.interpolate||br,f="__p += '",p=RegExp((t.escape||br).source+"|"+l.source+"|"+(l===cc?Iy:br).source+"|"+(t.evaluate||br).source+"|$","g"),h=po.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
|
|
3
3
|
`:"";e.replace(p,function(b,E,g,y,_,S){return g||(g=y),f+=e.slice(c,S).replace(My,Ty),E&&(a=!0,f+=`' +
|
|
4
4
|
__e(`+E+`) +
|
|
@@ -51,15 +51,15 @@ 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.10.1
|
|
54
|
+
* @version 0.10.1
|
|
55
55
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
56
|
-
*/const e1="0.10.1-alpha.6",r1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",n1=[Zi,Qi],i1={vue:"Vue","vue-router":"VueRouter"},Kc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},s1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let o1=class{},Jc=class{constructor(){A(this,"listeners",[]);A(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}},Pr=class Wc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Wc(n,i),r),{})}},kr=class Yc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Yc(i),r),{})}},Ke=class Gc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Gc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Jr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Pr.parse(a),this.events=kr.parse(u),this.directives=Ke.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Pr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new kr(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||M.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||M.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||M.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||M.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||M.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||M.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||M.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Pr.toDsl(u),directives:Ke.toDsl(c),events:kr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||M.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||M.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let re=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Jr(i))),r||M.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||kc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||M.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||M.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||M.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||M.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||M.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||M.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||M.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||M.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||M.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||M.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||M.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||M.emit(G,this))}}cloneNode(t,r=!1){const n=ts(t.toDsl()),i=new Jr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",hi="EVENT_PROJECT_ACTIVED",pi="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",Ee="EVENT_PROJECT_BLOCKS_CHANGE",di="EVENT_PROJECT_APIS_CHANGE",mi="EVENT_PROJECT_META_CHANGE",Zc="EVENT_PROJECT_PUBLISH",Qc="EVENT_PROJECT_FILE_PUBLISH",Xc="EVENT_PROJECT_GEN_SOURCE",Xe=class Xe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Xe.attrs){const i=t[n];i&&(this[n]=i)}r||M.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Xe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>ir(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>ir(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(hi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(hi,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};M.emit(pi,o),M.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};M.emit(pi,s),M.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new re({id:t.id,name:oi(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};M.emit(Je,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield xe(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Je,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(Je,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield xe(1e3);const n=gt(),i=t.name,s=t.title,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};M.emit(Ee,u),M.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};M.emit(Je,o),M.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=oi(t.name);t.id=n,t.type="block",t.dsl=new re({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(Ee,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield xe(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Ee,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};M.emit(Ee,c),M.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};M.emit(Ee,a),M.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};M.emit(di,s),M.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};M.emit(di,i),M.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};M.emit(mi,s),M.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};M.emit(mi,i),M.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(Qc,r):M.emit(Zc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(Xc,t)}};A(Xe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ue=Xe;const We="EVENT_HISTORY_CHANGE",Nr="EVENT_HISTORY_LOAD";let Xi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:ir(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||M.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||M.emit(Nr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||M.emit(We,{model:this,type:"clear",data:r})}};const M=Uc();function a1(e){return e instanceof re}function c1(e){return e instanceof Jr}function u1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=ir(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function l1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const b2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Kc,BUILT_IN_LIBRARAY_MAP:i1,BUILT_IN_MATERIALS:n1,BUILT_IN_NAME:r1,BUILT_IN_TAGS:s1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:Jc,BlockModel:re,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:Nr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:hi,EVENT_PROJECT_APIS_CHANGE:di,EVENT_PROJECT_BLOCKS_CHANGE:Ee,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:pi,EVENT_PROJECT_FILE_PUBLISH:Qc,EVENT_PROJECT_GEN_SOURCE:Xc,EVENT_PROJECT_META_CHANGE:mi,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Zc,EventModel:kr,HistoryModel:Xi,NodeModel:Jr,ProjectModel:ue,PropModel:Pr,Service:o1,VTJ_CORE_VERSION:e1,cloneDsl:ts,createNodeFrom:l1,emitter:M,isBlock:a1,isBlockSchema:u1,isNode:c1},Symbol.toStringTag,{value:"Module"}));var f1=Object.defineProperty,h1=(e,t,r)=>t in e?f1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>h1(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)}})();/**!
|
|
56
|
+
*/const e1="0.10.1",r1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",n1=[Zi,Qi],i1={vue:"Vue","vue-router":"VueRouter"},Kc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},s1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let o1=class{},Jc=class{constructor(){A(this,"listeners",[]);A(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}},Pr=class Wc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Wc(n,i),r),{})}},kr=class Yc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Yc(i),r),{})}},Ke=class Gc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Gc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Jr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Pr.parse(a),this.events=kr.parse(u),this.directives=Ke.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Pr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new kr(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||M.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||M.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||M.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||M.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||M.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||M.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||M.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Pr.toDsl(u),directives:Ke.toDsl(c),events:kr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||M.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||M.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let re=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Jr(i))),r||M.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||kc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||M.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||M.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||M.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||M.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||M.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||M.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||M.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||M.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||M.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||M.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||M.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||M.emit(G,this))}}cloneNode(t,r=!1){const n=ts(t.toDsl()),i=new Jr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",hi="EVENT_PROJECT_ACTIVED",pi="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",Ee="EVENT_PROJECT_BLOCKS_CHANGE",di="EVENT_PROJECT_APIS_CHANGE",mi="EVENT_PROJECT_META_CHANGE",Zc="EVENT_PROJECT_PUBLISH",Qc="EVENT_PROJECT_FILE_PUBLISH",Xc="EVENT_PROJECT_GEN_SOURCE",Xe=class Xe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Xe.attrs){const i=t[n];i&&(this[n]=i)}r||M.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Xe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>ir(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>ir(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(hi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(hi,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};M.emit(pi,o),M.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};M.emit(pi,s),M.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new re({id:t.id,name:oi(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};M.emit(Je,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield xe(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Je,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(Je,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield xe(1e3);const n=gt(),i=t.name,s=t.title,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};M.emit(Ee,u),M.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};M.emit(Je,o),M.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=oi(t.name);t.id=n,t.type="block",t.dsl=new re({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(Ee,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield xe(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Ee,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};M.emit(Ee,c),M.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};M.emit(Ee,a),M.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};M.emit(di,s),M.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};M.emit(di,i),M.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};M.emit(mi,s),M.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};M.emit(mi,i),M.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(Qc,r):M.emit(Zc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(Xc,t)}};A(Xe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ue=Xe;const We="EVENT_HISTORY_CHANGE",Nr="EVENT_HISTORY_LOAD";let Xi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:ir(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||M.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||M.emit(Nr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||M.emit(We,{model:this,type:"clear",data:r})}};const M=Uc();function a1(e){return e instanceof re}function c1(e){return e instanceof Jr}function u1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=ir(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function l1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const b2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Kc,BUILT_IN_LIBRARAY_MAP:i1,BUILT_IN_MATERIALS:n1,BUILT_IN_NAME:r1,BUILT_IN_TAGS:s1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:Jc,BlockModel:re,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:Nr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:hi,EVENT_PROJECT_APIS_CHANGE:di,EVENT_PROJECT_BLOCKS_CHANGE:Ee,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:pi,EVENT_PROJECT_FILE_PUBLISH:Qc,EVENT_PROJECT_GEN_SOURCE:Xc,EVENT_PROJECT_META_CHANGE:mi,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Zc,EventModel:kr,HistoryModel:Xi,NodeModel:Jr,ProjectModel:ue,PropModel:Pr,Service:o1,VTJ_CORE_VERSION:e1,cloneDsl:ts,createNodeFrom:l1,emitter:M,isBlock:a1,isBlockSchema:u1,isNode:c1},Symbol.toStringTag,{value:"Module"}));var f1=Object.defineProperty,h1=(e,t,r)=>t in e?f1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>h1(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)}})();/**!
|
|
57
57
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
58
58
|
* @name @vtj/utils
|
|
59
59
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
60
|
-
* @version 0.10.1
|
|
60
|
+
* @version 0.10.1
|
|
61
61
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
62
|
-
*/const p1="0.10.1
|
|
62
|
+
*/const p1="0.10.1";/**
|
|
63
63
|
* @vue/shared v3.5.13
|
|
64
64
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
65
65
|
* @license MIT
|
|
@@ -72,9 +72,9 @@ version: 2.9.0
|
|
|
72
72
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
73
73
|
* @name @vtj/renderer
|
|
74
74
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
75
|
-
* @version 0.10.1
|
|
75
|
+
* @version 0.10.1
|
|
76
76
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
77
|
-
*/const hs="0.10.1
|
|
77
|
+
*/const hs="0.10.1";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const Ri=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],G_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],qu=["vIf","vShow","vModel","vFor","vBind","vHtml"],Ku={String,Number,Boolean,Array,Object,Function,Date},Oe="VtjPage",Qe="VtjHomepage",Ju="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".split(","),Wu="component,slot".split(",");function Ye(e,t){return e.map(r=>Ac(r)||r.startsWith("/")?r:`${t}${r}`)}function wn(e){return/\.css$/.test(e)}function En(e){return/\.js$/.test(e)}function Yu(e){return/\.json$/.test(e)}function Z_(e){return e.map(t=>`<script src="${oe.append(t,{v:hs})}"><\/script>`).join("")}function Q_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${oe.append(t,{v:hs})}" />`).join("")}function Gu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Zu(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:m,assetsLibrary:d,localeLibrary:b})=>{p==null||p.forEach(E=>{En(E)&&i.push(Gu(E,r)),wn(E)&&s.push(E)}),m&&(a.push(m),u[m]=Ye(p||[],t),b&&(c[m]=b)),h&&o.push(h),d&&l.push(d),m&&d&&(f[d]=m)}),{scripts:Ye(i,t),css:Ye(s,t),materials:Ye(o,t),libraryExports:a,materialExports:Ic(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Qu(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 ps(e){return bt(e)?e:JSON.stringify(e)}function ds(e,t,r){const n=e.CSSStyleSheet;if(n.prototype.replaceSync){const i=new n;i.id=t,i.replaceSync(r);const s=e.document,o=s.adoptedStyleSheets,a=Array.from(o).filter(u=>u.id!==t);s.adoptedStyleSheets=[...a,i]}else{const i=e.document;let s=i.getElementById(t);s?s.innerHTML=r:(s=i.createElement("style"),s.id=t,s.innerHTML=r,i.head.appendChild(s))}}function Xu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&ds(window,e,r)})}function tl(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 el(n,i){return L(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((u,c)=>{for(const l of e){const f=s.createElement("script");f.src=l,f.onload=()=>{a=r[t],a?u(a.default||a):c(null)},f.onerror=p=>{c(p)},o.appendChild(f)}})})}function rl(e){return ce(e)||ce(e==null?void 0:e.install)}function nl(e){return Wu.includes(e)}function il(e){return Ju.includes(e)}function Ce(e=window){const t=window.Mock;if(t)return t;const r=e.Mock;if(r)return window.Mock=r,r}function Pe(e,t,r=!1,n=!1){var i;try{const s=['"use strict";',"var __self = arguments[0];"];s.push("return ");let o=(e.value||"").trim();o=o.replace(/this(\W|$)/g,(u,c)=>`__self${c}`),o=s.join(`
|
|
78
78
|
`)+o;const a=`with(${r?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(t)}catch(s){if(ae.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Zr(e,t,r=!1,n=!1){var s;const i=Pe(e,t,r,n);if(typeof i!="function"&&(ae.error("parseFunction.error","not a function",e,(s=t==null?void 0:t.__self)!=null?s:t),n))throw new Error(`"${e.value}" not a function`);return i}function wt(e){return e&&e.type==="JSExpression"}function Me(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function sl(e){return wt(e)||Me(e)}function X_(e){return sl(e)?e.value:JSON.stringify(e)}const tw={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},ms=Symbol("access");class ol{constructor(t){A(this,"options");A(this,"data",null);A(this,"mode",ht.Raw);this.options=Object.assign({},tw,t),this.loadData()}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode===ht.Raw&&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&&(Lr.save(r,t,{type:"local",prefix:n}),i&&Hr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,Lr.remove(t,{type:"local",prefix:r}),n&&Hr.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):li(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return li(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this,t.provide(ms,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=>ui(i,r));this.data=JSON.parse(n.join(""));return}if(typeof t=="string")try{const n=r?ui(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=Lr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Hr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===Oe){const r=t.params.id;return r&&this.can(r)}return!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return L(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),ce(i)?(i(),r(!1)):bt(i)?r(i):r(!1)}}r(!1),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){const{unauthorizedCode:r=401}=this.options;return t.status===r||t.data.code===r}showUnauthorizedAlert(t){return L(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return L(this,null,function*(){const{alert:r}=this.options;return r?(yield xe(150),yield r(t,{title:"提示",type:"warning"}).catch(()=>!1)):!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=>L(this,null,function*(){return yield this.showUnauthorizedAlert(r),r}),r=>L(this,null,function*(){const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function al(){return ta(ms,null)}function ew(e={}){const{notify:t,loading:r,settings:n={}}=e;let i=null;return{request:_n({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:s=>{var o,a;return((o=s.data)==null?void 0:o.code)===0||!!((a=s.data)!=null&&a.success)},failMessage:!0,showError:s=>{t&&t(s||"未知错误")},showLoading:()=>{i&&i.close(),r&&(i=r())},hideLoading:()=>{i&&(i.close(),i=null)}},n)}),jsonp:us,notify:t,loading:r}}function cl(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,st(z({},e.jsonpOptions),{query:i}));{const i=e.headers?Pe(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:st(z({},e.settings),{headers:i})};return(o,a)=>(delete s.data,n.send(Dt(s,a||{},{data:o})))}}function ul(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 ll(e=[],t=[],r){const n={};for(const i of e)n[i.id]=cl(i,r);for(const i of t)n[i.id]=ul(i,r);return n}function fl(){return L(this,arguments,function*(e=[],t=window){const r=Ce(t);r&&(gs(t),e.forEach(n=>pl(r,n)))})}function hl(e,t=window){const r=Me(e.mockTemplate)&&e.mockTemplate.value?Zr(e.mockTemplate,{},!0):void 0,n=Ce(t);return(...i)=>L(this,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){ae.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function pl(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=hn(`${r}(.*)`),s=qc(r,{decode:decodeURIComponent}),o=Pe(n,{},!0);e.mock(i,a=>{var f;const u=oe.parse(a.url)||{},c=a.body instanceof FormData?Fu(a.body):a.body,l=(f=s(a.url))==null?void 0:f.params;return Object.assign(a,{data:c,params:u,query:l}),e.mock(o(a))})}}function gs(e=window){const t=Ce(e);t&&(t._mocked={})}class dl{constructor(t){A(this,"__id",null);A(this,"__mode");A(this,"__instance",null);A(this,"__contextRefs",{});A(this,"__refs",{});A(this,"context",{});A(this,"state",{});A(this,"props",{});A(this,"$props",{});A(this,"$refs",{});A(this,"$el",null);A(this,"$emit",null);A(this,"$nextTick",null);A(this,"$parent",null);A(this,"$root",null);A(this,"$attrs",null);A(this,"$slots",null);A(this,"$watch",null);A(this,"$options",null);A(this,"$forceUpdate",null);A(this,"$components",{});A(this,"$libs",{});A(this,"$apis",{});A(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=en){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&&Ri.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){Ri.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===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Zr({type:i,value:s},this)}else return Zr(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Pe({type:i,value:s},this)}else return Pe(t,this)}__ref(t=null,r){if(this.__mode!==ht.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>L(this,null,function*(){var s,o;yield xe(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,ht.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=z(z({},this.context),t),n=st(z({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function Qr(e){var f,p;const{Vue:t=en,mode:r=ht.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,a=t.computed(()=>e.dsl),u={$components:n,$libs:i,$apis:s},c=new dl({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},nw((f=a.value.props)!=null?f:[],c)),setup(h){var y,_,S,v;c.$props=h,c.props=h,a.value.id&&ds(e.window||window,a.value.id,a.value.css||""),c.state=iw(t,(y=a.value.state)!=null?y:{},c);const m=sw(t,(_=a.value.computed)!=null?_:{},c),d=ow((S=a.value.methods)!=null?S:{},c),b=aw(t,a.value.inject,c),E=ml(a.value.dataSources||{},c),g=z(z(z(z({},b),m),d),E);return c.setup(g,t),cw(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:rw(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const h=a.value.nodes||[];return h.length===1?cr(h[0],c,t,o):h.map(m=>cr(m,c,t,o))}},uw((p=a.value.lifeCycles)!=null?p:{},c)));return{renderer:t.markRaw(l),context:c}}function rw(e=[]){return e.map(t=>bt(t)?t:t.name)}function nw(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>Ku[i]):void 0;return e.map(n=>bt(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:wt(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 iw(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Me(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function sw(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function ow(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function aw(e,t=[],r){return t.reduce((n,i)=>{var c;const{name:s,from:o}=i||{};i.default;const a=wt(o)?r.__parseExpression(o)||s:o!=null?o:s,u=wt(i.default)?r.__parseExpression(i.default):(c=i.default)!=null?c:null;return n[s]=e.inject(a,u),n},{})}function ml(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=hl(i);else if(i.ref){const s=t.$apis[i.ref],o=Me(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...a)=>L(this,null,function*(){const u=yield s.apply(t,a);return o?o(u):u})}return r},{})}function cw(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function uw(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Jn=[],te={};const gl=e=>e;function vs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>En(a));if(s.length===0||!i)return null;const o=n.filter(a=>wn(a));return o.length&&tl(o,t),yield el(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function Xr(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Jn.forEach(i=>{delete n.window[i]}),Jn=[]),(i,s,o=en)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=te[s.id];return a||(a=te[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Qr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=te[s.url];return a||(a=te[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Qr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?te[s.library]:null;return a||(s.library&&Jn.push(s.library),a=te[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield vs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function lw(){te={}}function cr(e,t,r=en,n=gl){var d;if(!e||!e.name||e.invisible)return null;const i=(d=r.getCurrentInstance())==null?void 0:d.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:p,others:h}=hw(o);if(a&&!pw(a,t))return null;const m=b=>{var O,V,w,T;const E=b.$components,g=(()=>{var C,I,D,k;if(e.name==="component")return dw(b,(C=e.props)==null?void 0:C.is);if(e.name==="slot")return e.name;const F=n(e.name,e.from,r);return bt(F)?nl(F)||il(F)?F:(k=(D=E[F])!=null?D:(I=i==null?void 0:i.app)==null?void 0:I.component(F))!=null?k:F:F})(),y=mw(s,(O=e.props)!=null?O:{},b),_=gw(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return vw(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},bw(c,b))),p&&Object.assign(y,_w(p,b)),l.forEach(F=>{Object.assign(y,ww(r,F,b))});const S=Ew(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?fw(i,h,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?Tw(u,m,t):m(t)}function fw(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 hw(e=[]){const t=e.find(u=>Nt(u.name)==="vIf"),r=e.find(u=>Nt(u.name)==="vFor"),n=e.find(u=>Nt(u.name)==="vShow"),i=e.find(u=>Nt(u.name)==="vBind"),s=e.find(u=>Nt(u.name)==="vHtml"),o=e.filter(u=>Nt(u.name)==="vModel"),a=e.filter(u=>!qu.includes(Nt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function pw(e,t){return!!t.__parseExpression(e.value)}function dw(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function mw(e,t,r){const n=Di(t,r);return n.ref=r.__ref(e,n.ref),n}function Di(e,t){return wt(e)?t.__parseExpression(e):Me(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Di(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Di(i,t),r},{}):e}function gw(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],u=ys(a.modifiers),c=u.find(p=>n.includes(p)),l="on"+cn(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function ys(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function vw(e,t,r,n,i){var u;const{children:s}=t,o=yw(t,n),a=(u=n.$slots)==null?void 0:u[o.name];return a?a(r):s?bt(s)?e.createTextVNode(s):wt(s)?e.createTextVNode(ps(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>cr(c,n,e,i)):null:null}function yw(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function bw(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function _w(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function ww(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
|
|
79
79
|
${t.value.value} = v;
|
|
80
80
|
}`:"(v) => {}"},i=r.__parseFunction(n),s=ys(wt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=wt(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 Ew(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>ps(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=Sw(t),o=a=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?{[`scope_${i.id}`]:a}:{};return Object.entries(s).reduce((a,[u,{nodes:c,params:l}])=>(a[u]=f=>{const p=l.length?Mc(f!=null?f:{},l):o(f);return c.map(h=>cr(h,r.__clone(p),e,n))},a),{})}return null}function Sw(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=xw(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params)):t[i]={nodes:[r],params:n.params}}return t}function xw(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function Tw(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((u,c)=>c+1)),Array.isArray(a)?a.map((u,c)=>t(r.__clone({[s]:u,[o]:c}))):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}function $w(e){return Nl()?(Bl(e),!0):!1}const vl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ow=e=>e!=null,Aw=()=>{};function jw(e){return na()}function Rw(e){return Array.isArray(e)?e:[e]}function Dw(...e){if(e.length!==1)return Dl(...e);const t=e[0];return typeof t=="function"?Cl(Pl(()=>({get:t,set:Aw}))):tr(t)}function Cw(e,t){jw()&&kl(e,t)}const Pw=vl?window:void 0,kw=vl?window.document:void 0;function Nw(e){var t;const r=Ci(e);return(t=r==null?void 0:r.$el)!=null?t:r}function Bw(){const e=tr(!1),t=na();return t&&Il(()=>{e.value=!0},t),e}function Iw(e){const t=Bw();return ra(()=>(t.value,!!e()))}function Mw(e,t,r={}){const p=r,{window:n=Pw}=p,i=Tn(p,["window"]);let s;const o=Iw(()=>n&&"MutationObserver"in n),a=()=>{s&&(s.disconnect(),s=void 0)},u=ra(()=>{const h=Ci(e),m=Rw(h).map(Nw).filter(Ow);return new Set(m)}),c=ea(()=>u.value,h=>{a(),o.value&&h.size&&(s=new MutationObserver(t),h.forEach(m=>s.observe(m,i)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),f=()=>{c(),a()};return $w(f),{isSupported:o,stop:f,takeRecords:l}}function Fw(e=null,t={}){var r,n,i;const{document:s=kw,restoreOnUnmount:o=f=>f}=t,a=(r=s==null?void 0:s.title)!=null?r:"",u=Dw((n=e!=null?e:s==null?void 0:s.title)!=null?n:null),c=!!(e&&typeof e=="function");function l(f){if(!("titleTemplate"in t))return f;const p=t.titleTemplate||"%s";return typeof p=="function"?p(f):Ci(p).replace(/%s/g,f)}return ea(u,(f,p)=>{f!==p&&s&&(s.title=l(f!=null?f:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&s&&!c&&Mw((i=s.head)==null?void 0:i.querySelector("title"),()=>{s&&s.title!==u.value&&(u.value=l(s.title))},{childList:!0}),Cw(()=>{if(o){const f=o(a,u.value||"");f!=null&&s&&(s.title=f)}}),u}const Xo=tn({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=_s(),t=ia(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=tr(Symbol());return n&&(Object.assign(t.meta,n.meta||{},{cache:n.cache}),Fw(n.title||"VTJ")),{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?Gn(e,st(z({},t),{key:r})):Gn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Lw={"data-l-h6o7ki7":"",class:"vtj-startup__wrapper"},Vw={"data-l-h6o7ki7":"",class:"vtj-startup"},Hw={"data-l-h6o7ki7":"",class:"vtj-startup__name"},Uw={"data-l-h6o7ki7":"",class:"span"},zw={"data-l-h6o7ki7":"",class:"vtj-startup__tagline"},qw={"data-l-h6o7ki7":"",class:"vtj-startup__actions"},yl=tn({__name:"Startup",props:{name:{default:"VTJ.PRO"},tagline:{default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{default:"开始设计"},link:{}},setup(e){((n,i)=>{let s=document.getElementById("h6o7ki7");s||(s=document.createElement("style"),s.id="h6o7ki7",document.head.appendChild(s),s.innerHTML=i)})("h6o7ki7",`
|
|
@@ -158,4 +158,4 @@ version: 2.9.0
|
|
|
158
158
|
}
|
|
159
159
|
.vtj-startup__actions .button[data-l-h6o7ki7]:hover{
|
|
160
160
|
opacity: 0.7;
|
|
161
|
-
}`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Yn(),jl("div",Lw,[Zt("div",Vw,[Zt("h1",Hw,[Zt("span",Uw,jn(t.name),1)]),Zt("div",zw,jn(t.tagline),1),Zt("div",qw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":"",class:"span"},"设置项目主页后,将替换此页面显示",-1)),Zt("span",{"data-l-h6o7ki7":"",class:"button",onClick:r},jn(t.actionText),1)])])]))}}),Kw=tn({name:"VtjStartupContainer",render(){return Gn(yl)}}),bs=Symbol("Provider");var bl=(e=>(e.Production="production",e.Development="development",e))(bl||{});class _l extends Jc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:ar,jsonp:us});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ae.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=ll(i,s,this.adapter),gs(o),fl(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(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 L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:p,materialMapLibrary:h}=Zu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)wn(g)&&(yield Xu(m,oe.append(g,{v:An}))),En(g)&&(yield Ai(oe.append(g,{v:An})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Ai(oe.append(d,{v:An}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Kc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Qu(y,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:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:Oe,component:Xo},p={path:l,name:Qe,component:n!=null&&n.homepage?Xo:s.startupComponent||Kw,meta:c};r.hasRoute(Oe)&&r.removeRoute(Oe),r.hasRoute(Qe)&&r.removeRoute(Qe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&rl(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(bs,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}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 u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null))})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Qr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Ts(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Ts(()=>L(this,null,function*(){return yield vs(r,window)}))}}function Jw(e){const t=new _l(e);return{provider:t,onReady:r=>t.ready(r)}}function _s(e={}){const t=ta(bs,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,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}const wl={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Ww=(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:wl}),Yw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},wl),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function Gw(e){return _n({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 Sn{constructor(t=ar){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Ww(t),this.uploader=Yw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>Yu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=ar.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new cs({type:"local",expired:0,prefix:"__VTJ_"});class Zw extends Sn{init(t){const r=new ue(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ue(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,fn(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Xi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class El extends Sn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ue(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ue(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=fn(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Xi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Wn=null;function Qw(){return Wn||(Wn=new El,Wn)}class Xw extends Sn{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:fn(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function Sl(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?Sl(e,t,a):void 0}})}function xl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=xl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function t2(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=_s(),s=ia(),o=al(),a=tr(!1),u=tr(!1),c=i.project;Rl(()=>{const{name:p,params:h,meta:m}=s;if(p===Oe){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Qe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=Sl(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:xl(l,o),pure:u}}const H2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ms,Access:ol,BUILD_IN_TAGS:Wu,BUILT_IN_DIRECTIVES:qu,BaseService:Sn,CONTEXT_HOST:Ri,Context:dl,ContextMode:ht,DATA_TYPES:Ku,HOMEPAGE_ROUTE_NAME:Qe,HTML_TAGS:Ju,JSCodeToString:X_,LIFE_CYCLES_LIST:G_,LocalService:Xw,MemoryService:El,NodeEnv:bl,PAGE_ROUTE_NAME:Oe,Provider:_l,Startup:yl,StorageService:Zw,VTJ_RENDERER_VERSION:hs,adoptedStyleSheets:ds,clearLoaderCache:lw,createAdapter:ew,createAssetScripts:Z_,createAssetsCss:Q_,createDataSources:ml,createLoader:Xr,createMemoryService:Qw,createMetaApi:ul,createMock:hl,createProvider:Jw,createRenderer:Qr,createSchemaApi:cl,createSchemaApis:ll,createServiceRequest:Gw,defaultLoader:gl,fillBasePath:Ye,getMock:Ce,getModifiers:ys,getPlugin:vs,getRawComponent:Qu,isBuiltInTag:nl,isCSSUrl:wn,isJSCode:sl,isJSExpression:wt,isJSFunction:Me,isJSON:Yu,isJSUrl:En,isNativeTag:il,isVuePlugin:rl,loadCss:Xu,loadCssUrl:tl,loadScriptUrl:el,mockApi:pl,mockApis:fl,mockCleanup:gs,nodeRender:cr,parseDeps:Zu,parseExpression:Pe,parseFunction:Zr,providerKey:bs,removeProdFlag:Gu,toString:ps,useAccess:al,useMask:t2,useProvider:_s},Symbol.toStringTag,{value:"Module"})),e2=tn({__name:"app",setup(e){return(t,r)=>{const n=Ml("router-view");return Yn(),$s(Os(ql),{locale:Os(zl)},{default:As(()=>[(Yn(),$s(Fl,null,{default:As(()=>[Ll(n)]),_:1}))]),_:1},8,["locale"])}}}),r2=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-X_BrTcrp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-0hIFoiB4.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-DJiOQ-P1.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-ByIXJ059.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-B_gzqO3o.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],n2=Hl({history:Ul(),routes:r2}),i2="RRO_IDE_ACCESS_STORAGE__",ws=Vl(e2),s2=new ol({storageKey:i2});ws.use(s2);ws.use(n2);ws.mount("#app");export{Xc as $,i2 as A,Qc as B,G as C,pi as D,nt as E,W_ as F,We as G,Jw as H,ew as I,ce as J,R0 as K,_a as L,re as M,J_ as N,Gw as O,us as P,Xi as Q,_y as R,my as S,ol as T,Xw as U,Nr as V,Zi as W,oi as X,D0 as Y,ct as Z,Qi as _,Lr as a,r1 as a0,sc as a1,a1 as a2,Zu as a3,Q_ as a4,Z_ as a5,i1 as a6,Qu as a7,ll as a8,gs as a9,fl as aa,Jr as ab,qi as ac,lw as ad,wt as ae,Me as af,T_ as ag,Pe as ah,Zr as ai,Ke as aj,qu as ak,l1 as al,X_ as am,G_ as an,Ku as ao,hl as ap,$_ as aq,N0 as ar,Hi as as,H2 as at,b2 as au,V2 as av,wn as aw,En as ax,tl as ay,el as az,Ic as b,Dt as c,A_ as d,gt as e,ir as f,ds as g,ae as h,Jc as i,Ac as j,_l as k,ue as l,uy as m,xe as n,bt as o,M as p,it as q,Ee as r,Je as s,hi as t,li as u,Nt as v,Zc as w,j_ as x,ht as y,Bc as z};
|
|
161
|
+
}`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Yn(),jl("div",Lw,[Zt("div",Vw,[Zt("h1",Hw,[Zt("span",Uw,jn(t.name),1)]),Zt("div",zw,jn(t.tagline),1),Zt("div",qw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":"",class:"span"},"设置项目主页后,将替换此页面显示",-1)),Zt("span",{"data-l-h6o7ki7":"",class:"button",onClick:r},jn(t.actionText),1)])])]))}}),Kw=tn({name:"VtjStartupContainer",render(){return Gn(yl)}}),bs=Symbol("Provider");var bl=(e=>(e.Production="production",e.Development="development",e))(bl||{});class _l extends Jc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:ar,jsonp:us});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ae.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=ll(i,s,this.adapter),gs(o),fl(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(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 L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:p,materialMapLibrary:h}=Zu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)wn(g)&&(yield Xu(m,oe.append(g,{v:An}))),En(g)&&(yield Ai(oe.append(g,{v:An})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Ai(oe.append(d,{v:An}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Kc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Qu(y,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:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:Oe,component:Xo},p={path:l,name:Qe,component:n!=null&&n.homepage?Xo:s.startupComponent||Kw,meta:c};r.hasRoute(Oe)&&r.removeRoute(Oe),r.hasRoute(Qe)&&r.removeRoute(Qe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&rl(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(bs,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}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 u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null))})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Qr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Ts(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Ts(()=>L(this,null,function*(){return yield vs(r,window)}))}}function Jw(e){const t=new _l(e);return{provider:t,onReady:r=>t.ready(r)}}function _s(e={}){const t=ta(bs,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,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}const wl={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Ww=(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:wl}),Yw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},wl),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function Gw(e){return _n({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 Sn{constructor(t=ar){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Ww(t),this.uploader=Yw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>Yu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=ar.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new cs({type:"local",expired:0,prefix:"__VTJ_"});class Zw extends Sn{init(t){const r=new ue(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ue(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,fn(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Xi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class El extends Sn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ue(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ue(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=fn(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Xi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Wn=null;function Qw(){return Wn||(Wn=new El,Wn)}class Xw extends Sn{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:fn(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function Sl(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?Sl(e,t,a):void 0}})}function xl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=xl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function t2(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=_s(),s=ia(),o=al(),a=tr(!1),u=tr(!1),c=i.project;Rl(()=>{const{name:p,params:h,meta:m}=s;if(p===Oe){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Qe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=Sl(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:xl(l,o),pure:u}}const H2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ms,Access:ol,BUILD_IN_TAGS:Wu,BUILT_IN_DIRECTIVES:qu,BaseService:Sn,CONTEXT_HOST:Ri,Context:dl,ContextMode:ht,DATA_TYPES:Ku,HOMEPAGE_ROUTE_NAME:Qe,HTML_TAGS:Ju,JSCodeToString:X_,LIFE_CYCLES_LIST:G_,LocalService:Xw,MemoryService:El,NodeEnv:bl,PAGE_ROUTE_NAME:Oe,Provider:_l,Startup:yl,StorageService:Zw,VTJ_RENDERER_VERSION:hs,adoptedStyleSheets:ds,clearLoaderCache:lw,createAdapter:ew,createAssetScripts:Z_,createAssetsCss:Q_,createDataSources:ml,createLoader:Xr,createMemoryService:Qw,createMetaApi:ul,createMock:hl,createProvider:Jw,createRenderer:Qr,createSchemaApi:cl,createSchemaApis:ll,createServiceRequest:Gw,defaultLoader:gl,fillBasePath:Ye,getMock:Ce,getModifiers:ys,getPlugin:vs,getRawComponent:Qu,isBuiltInTag:nl,isCSSUrl:wn,isJSCode:sl,isJSExpression:wt,isJSFunction:Me,isJSON:Yu,isJSUrl:En,isNativeTag:il,isVuePlugin:rl,loadCss:Xu,loadCssUrl:tl,loadScriptUrl:el,mockApi:pl,mockApis:fl,mockCleanup:gs,nodeRender:cr,parseDeps:Zu,parseExpression:Pe,parseFunction:Zr,providerKey:bs,removeProdFlag:Gu,toString:ps,useAccess:al,useMask:t2,useProvider:_s},Symbol.toStringTag,{value:"Module"})),e2=tn({__name:"app",setup(e){return(t,r)=>{const n=Ml("router-view");return Yn(),$s(Os(ql),{locale:Os(zl)},{default:As(()=>[(Yn(),$s(Fl,null,{default:As(()=>[Ll(n)]),_:1}))]),_:1},8,["locale"])}}}),r2=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-B-SdtZ0x.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-By1ByDwY.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-BvWxZGeA.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-ByIXJ059.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-D3GaYvzO.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],n2=Hl({history:Ul(),routes:r2}),i2="RRO_IDE_ACCESS_STORAGE__",ws=Vl(e2),s2=new ol({storageKey:i2});ws.use(s2);ws.use(n2);ws.mount("#app");export{Xc as $,i2 as A,Qc as B,G as C,pi as D,nt as E,W_ as F,We as G,Jw as H,ew as I,ce as J,R0 as K,_a as L,re as M,J_ as N,Gw as O,us as P,Xi as Q,_y as R,my as S,ol as T,Xw as U,Nr as V,Zi as W,oi as X,D0 as Y,ct as Z,Qi as _,Lr as a,r1 as a0,sc as a1,a1 as a2,Zu as a3,Q_ as a4,Z_ as a5,i1 as a6,Qu as a7,ll as a8,gs as a9,fl as aa,Jr as ab,qi as ac,lw as ad,wt as ae,Me as af,T_ as ag,Pe as ah,Zr as ai,Ke as aj,qu as ak,l1 as al,X_ as am,G_ as an,Ku as ao,hl as ap,$_ as aq,N0 as ar,Hi as as,H2 as at,b2 as au,V2 as av,wn as aw,En as ax,tl as ay,el as az,Ic as b,Dt as c,A_ as d,gt as e,ir as f,ds as g,ae as h,Jc as i,Ac as j,_l as k,ue as l,uy as m,xe as n,bt as o,M as p,it as q,Ee as r,Je as s,hi as t,li as u,Nt as v,Zc as w,j_ as x,ht as y,Bc as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=Object.defineProperty,F=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(n,e,t)=>e in n?k(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,w=(n,e)=>{for(var t in e||(e={}))q.call(e,t)&&E(n,t,e[t]);if(y)for(var t of y(e))H.call(e,t)&&E(n,t,e[t]);return n},v=(n,e)=>F(n,U(e));var P=(n,e,t)=>new Promise((u,i)=>{var m=s=>{try{r(t.next(s))}catch(a){i(a)}},l=s=>{try{r(t.throw(s))}catch(a){i(a)}},r=s=>s.done?u(s.value):Promise.resolve(s.value).then(m,l);r((t=t.apply(n,e)).next())});import{useRoute as K}from"./vue-router-Dv428VRb.js";import{I as W,U as j,O as G,T as J,A as M}from"./index-
|
|
1
|
+
var k=Object.defineProperty,F=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(n,e,t)=>e in n?k(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,w=(n,e)=>{for(var t in e||(e={}))q.call(e,t)&&E(n,t,e[t]);if(y)for(var t of y(e))H.call(e,t)&&E(n,t,e[t]);return n},v=(n,e)=>F(n,U(e));var P=(n,e,t)=>new Promise((u,i)=>{var m=s=>{try{r(t.next(s))}catch(a){i(a)}},l=s=>{try{r(t.throw(s))}catch(a){i(a)}},r=s=>s.done?u(s.value):Promise.resolve(s.value).then(m,l);r((t=t.apply(n,e)).next())});import{useRoute as K}from"./vue-router-Dv428VRb.js";import{I as W,U as j,O as G,T as J,A as M}from"./index-2LuQbUz1.js";import{a as N}from"./element-plus-HvLQb0Ih.js";import"./vxe-prHpAmaX.js";import{u as A,I as V,E as Y}from"./extension-Cy1PiOYQ.js";import{n as C,l as z}from"./utils-CwbD7XwC.js";import{d as D,e as L,aC as B,f as Q,c as X,o as Z}from"./vue-DpQa2Qs4.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-BfuwkNVi.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-ZjnzVW6R.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const te=D({__name:"index",setup(n){return P(this,null,function*(){let e,t;const u=W({loading:z,notify:C}),i=K(),m=L(),l=new j(G(C)),r=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),{options:s,adapters:a}=r?([e,t]=B(()=>new Y(r).load()),e=yield e,t(),e):{},{__BASE_PATH__:d="/",history:I="hash",base:g="/",pageRouteName:O="page"}=r||{},$=a==null?void 0:a.access,S=a==null?void 0:a.remote,T=$?new J(w({alert:N.alert,storageKey:M},$)):void 0,b=()=>I==="hash",R=o=>o==="/"?"":(o.startsWith("/")&&(o=o.substring(1)),o.endsWith("/")||(o=o+"/"),o);A.set("Switcher",{props:{onClick:o=>{const _=o.platform==="uniapp",c=location.pathname;let p=c===`${d}__vtj__/`?d:c;const f=o.currentFile;if(f&&f.type==="page"&&o.homepage!==f.id){const x=`${R(g)}${_?"pages":O}/${f.id}`;p=b()?`${p}#/${x}`:`${p}${x}`}window.open(p,"VTJProject")}}}),A.set("Previewer",{props:{path:(o,_)=>{const c=location.pathname;return _.platform==="uniapp"?`${c}uni/#/pages/${o.id}`:`${c}#/preview/${o.id}`}}});const h=new V(v(w({container:m,service:l,materialPath:d,pageBasePath:g==="/"?"":g},s),{adapter:Object.assign(u,{access:T,remote:S},(s==null?void 0:s.adapter)||{})}));return h.ready(()=>{h.openFile(i.query.id)}),Q(()=>i.query.id,o=>{h.openFile(o)}),(o,_)=>(Z(),X("div",{class:"designer",ref_key:"container",ref:m},null,512))})}}),$e=ee(te,[["__scopeId","data-v-fbbd9127"]]);export{$e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&A(o,e,t[e]);if(O)for(var e of O(t))V.call(t,e)&&A(o,e,t[e]);return o},l=(o,t)=>T(o,I(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=s=>{try{a(e.next(s))}catch(m){i(m)}},c=s=>{try{a(e.throw(s))}catch(m){i(m)}},a=s=>s.done?_(s.value):Promise.resolve(s.value).then(p,c);a((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-BfuwkNVi.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{I as k,U as D,O as H,T as K,A as b,H as j,y as U}from"./index-
|
|
2
|
+
var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&A(o,e,t[e]);if(O)for(var e of O(t))V.call(t,e)&&A(o,e,t[e]);return o},l=(o,t)=>T(o,I(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=s=>{try{a(e.next(s))}catch(m){i(m)}},c=s=>{try{a(e.throw(s))}catch(m){i(m)}},a=s=>s.done?_(s.value):Promise.resolve(s.value).then(p,c);a((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-BfuwkNVi.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{I as k,U as D,O as H,T as K,A as b,H as j,y as U}from"./index-2LuQbUz1.js";import{a as G}from"./element-plus-HvLQb0Ih.js";import"./vxe-prHpAmaX.js";import{E as M,B as N}from"./extension-Cy1PiOYQ.js";import{n as R,l as Y}from"./utils-CwbD7XwC.js";import{d as q,aC as w,e as z,h as F,K as J,O as Q,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-ZjnzVW6R.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const lt=q({__name:"page",setup(o){return E(this,null,function*(){let t,e;const _=k({loading:Y,notify:R}),i=new D(H(R)),p=([t,e]=w(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:a}=p?([t,e]=w(()=>new M(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:s="/"}=p||{},m=a==null?void 0:a.access,x=a==null?void 0:a.remote,f=m?new K(l(g({},m),{alert:G.alert,storageKey:b})):void 0,{provider:y,onReady:h}=j(l(g({mode:U.Runtime,service:i,materialPath:s,adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{})},c||{}),{dependencies:{Vue:()=>P(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>P(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=z(),d=F();return h(()=>E(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(N),r.use(y)),u.value=yield y.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const C=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&C.classList.add("is-page"),(n==null?void 0:n.pure)&&C.classList.add("is-pure")})})),(r,n)=>u.value?(X(),J(W(u.value),{key:0})):Q("",!0)})}});export{lt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var O=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&O(o,e,t[e]);if(C)for(var e of C(t))V.call(t,e)&&O(o,e,t[e]);return o},w=(o,t)=>T(o,I(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=s=>{try{a(e.next(s))}catch(m){i(m)}},c=s=>{try{a(e.throw(s))}catch(m){i(m)}},a=s=>s.done?_(s.value):Promise.resolve(s.value).then(p,c);a((e=e.apply(o,t)).next())});import{_ as A}from"./monaco-editor-BfuwkNVi.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{a as k}from"./element-plus-HvLQb0Ih.js";import"./vxe-prHpAmaX.js";import{E as D,B as H}from"./extension-
|
|
2
|
+
var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var O=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&O(o,e,t[e]);if(C)for(var e of C(t))V.call(t,e)&&O(o,e,t[e]);return o},w=(o,t)=>T(o,I(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=s=>{try{a(e.next(s))}catch(m){i(m)}},c=s=>{try{a(e.throw(s))}catch(m){i(m)}},a=s=>s.done?_(s.value):Promise.resolve(s.value).then(p,c);a((e=e.apply(o,t)).next())});import{_ as A}from"./monaco-editor-BfuwkNVi.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{a as k}from"./element-plus-HvLQb0Ih.js";import"./vxe-prHpAmaX.js";import{E as D,B as H}from"./extension-Cy1PiOYQ.js";import{I as K,U as b,O as j,T as U,A as G,H as M,y as N}from"./index-2LuQbUz1.js";import{n as P,l as Y}from"./utils-CwbD7XwC.js";import{d as q,aC as R,e as z,h as F,K as J,O as Q,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-ZjnzVW6R.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const gt=q({__name:"preview",setup(o){return g(this,null,function*(){let t,e;const _=K({loading:Y,notify:P}),i=new b(j(P)),p=([t,e]=R(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:a}=p?([t,e]=R(()=>new D(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:s="/"}=p||{},m=a==null?void 0:a.access,x=a==null?void 0:a.remote,f=m?new U(l({alert:k.alert,storageKey:G},m)):void 0,{provider:E,onReady:h}=M(w(l({mode:N.Runtime,service:i,materialPath:s},c||{}),{adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{}),dependencies:{Vue:()=>A(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>A(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=z(),d=F();return h(()=>g(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(H),r.use(E)),u.value=yield E.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const y=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&y.classList.add("is-page"),(n==null?void 0:n.pure)&&y.classList.add("is-pure")})})),(r,n)=>u.value?(X(),J(W(u.value),{key:0})):Q("",!0)})}});export{gt as default};
|
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__ = '1740470090931';
|
|
13
13
|
(function () {
|
|
14
14
|
const regex = /<!--{{(\d*)}}-->/;
|
|
15
15
|
window.fetch('?t=' + Date.now()).then(async (res) => {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
});
|
|
26
26
|
})();
|
|
27
27
|
</script>
|
|
28
|
-
<!--{{
|
|
28
|
+
<!--{{1740470090931}}-->
|
|
29
29
|
|
|
30
|
-
<script type="module" crossorigin src="./assets/index-
|
|
30
|
+
<script type="module" crossorigin src="./assets/index-2LuQbUz1.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="./assets/vue-DpQa2Qs4.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="./assets/vue-router-Dv428VRb.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/lodash-es-BL-d_OSa.js">
|
|
@@ -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.10.1
|
|
54
|
+
* @version 0.10.1
|
|
55
55
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
56
56
|
*/const lp="VueMaterial",fp="VueRouterMaterial",hp={[lp]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[fp]:["RouterView","RouterLink"]};class pp{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 dp=Object.defineProperty,mp=(e,t,r)=>t in e?dp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ut=(e,t,r)=>mp(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 gp=e=>typeof e=="symbol";new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(gp));function Xo(e,t){return function(){return e.apply(t,arguments)}}const{toString:yp}=Object.prototype,{getPrototypeOf:rn}=Object,Je=(e=>t=>{const r=yp.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),dt=e=>(e=e.toLowerCase(),t=>Je(t)===e),Ye=e=>t=>typeof t===e,{isArray:te}=Array,de=Ye("undefined");function vp(e){return e!==null&&!de(e)&&e.constructor!==null&&!de(e.constructor)&&st(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Qo=dt("ArrayBuffer");function bp(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Qo(e.buffer),t}const _p=Ye("string"),st=Ye("function"),ts=Ye("number"),Ke=e=>e!==null&&typeof e=="object",wp=e=>e===!0||e===!1,Be=e=>{if(Je(e)!=="object")return!1;const t=rn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ep=dt("Date"),Sp=dt("File"),xp=dt("Blob"),Tp=dt("FileList"),Rp=e=>Ke(e)&&st(e.pipe),Op=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||st(e.append)&&((t=Je(e))==="formdata"||t==="object"&&st(e.toString)&&e.toString()==="[object FormData]"))},$p=dt("URLSearchParams"),[Ap,Dp,jp,Bp]=["ReadableStream","Request","Response","Headers"].map(dt),Cp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ve(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),te(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(n=0;n<s;n++)a=o[n],t.call(null,e[a],a,e)}}function es(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 Nt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rs=e=>!de(e)&&e!==Nt;function Cr(){const{caseless:e}=rs(this)&&this||{},t={},r=(n,i)=>{const o=e&&es(t,i)||i;Be(t[o])&&Be(n)?t[o]=Cr(t[o],n):Be(n)?t[o]=Cr({},n):te(n)?t[o]=n.slice():t[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ve(arguments[n],r);return t}const Np=(e,t,r,{allOwnKeys:n}={})=>(ve(t,(i,o)=>{r&&st(i)?e[o]=Xo(i,r):e[o]=i},{allOwnKeys:n}),e),kp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ip=(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)},Fp=(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&rn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Pp=(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},Mp=e=>{if(!e)return null;if(te(e))return e;let t=e.length;if(!ts(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Lp=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&rn(Uint8Array)),Up=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},Vp=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Hp=dt("HTMLFormElement"),qp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),pi=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),zp=dt("RegExp"),ns=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ve(r,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(n[o]=s||i)}),Object.defineProperties(e,n)},Wp=e=>{ns(e,(t,r)=>{if(st(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(st(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+"'")})}})},Jp=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return te(e)?n(e):n(String(e).split(t)),r},Yp=()=>{},Kp=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,pr="abcdefghijklmnopqrstuvwxyz",di="0123456789",is={DIGIT:di,ALPHA:pr,ALPHA_DIGIT:pr+pr.toUpperCase()+di},Gp=(e=16,t=is.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Zp(e){return!!(e&&st(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Xp=e=>{const t=new Array(10),r=(n,i)=>{if(Ke(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const o=te(n)?[]:{};return ve(n,(s,a)=>{const c=r(s,i+1);!de(c)&&(o[a]=c)}),t[i]=void 0,o}}return n};return r(e,0)},Qp=dt("AsyncFunction"),td=e=>e&&(Ke(e)||st(e))&&st(e.then)&&st(e.catch),os=((e,t)=>e?setImmediate:t?((r,n)=>(Nt.addEventListener("message",({source:i,data:o})=>{i===Nt&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Nt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",st(Nt.postMessage)),ed=typeof queueMicrotask<"u"?queueMicrotask.bind(Nt):typeof process<"u"&&process.nextTick||os,R={isArray:te,isArrayBuffer:Qo,isBuffer:vp,isFormData:Op,isArrayBufferView:bp,isString:_p,isNumber:ts,isBoolean:wp,isObject:Ke,isPlainObject:Be,isReadableStream:Ap,isRequest:Dp,isResponse:jp,isHeaders:Bp,isUndefined:de,isDate:Ep,isFile:Sp,isBlob:xp,isRegExp:zp,isFunction:st,isStream:Rp,isURLSearchParams:$p,isTypedArray:Lp,isFileList:Tp,forEach:ve,merge:Cr,extend:Np,trim:Cp,stripBOM:kp,inherits:Ip,toFlatObject:Fp,kindOf:Je,kindOfTest:dt,endsWith:Pp,toArray:Mp,forEachEntry:Up,matchAll:Vp,isHTMLForm:Hp,hasOwnProperty:pi,hasOwnProp:pi,reduceDescriptors:ns,freezeMethods:Wp,toObjectSet:Jp,toCamelCase:qp,noop:Yp,toFiniteNumber:Kp,findKey:es,global:Nt,isContextDefined:rs,ALPHABET:is,generateString:Gp,isSpecCompliantForm:Zp,toJSONObject:Xp,isAsyncFn:Qp,isThenable:td,setImmediate:os,asap:ed};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 ss=W.prototype,as={};["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=>{as[e]={value:e}});Object.defineProperties(W,as);Object.defineProperty(ss,"isAxiosError",{value:!0});W.from=(e,t,r,n,i,o)=>{const s=Object.create(ss);return R.toFlatObject(e,s,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),W.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const rd=null;function Nr(e){return R.isPlainObject(e)||R.isArray(e)}function us(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function mi(e,t,r){return e?e.concat(t).map(function(n,i){return n=us(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function nd(e){return R.isArray(e)&&!e.some(Nr)}const id=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function Ge(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(h,d){return!R.isUndefined(d[h])});const n=r.metaTokens,i=r.visitor||u,o=r.dots,s=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 c(h){if(h===null)return"";if(R.isDate(h))return h.toISOString();if(!a&&R.isBlob(h))throw new W("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(h)||R.isTypedArray(h)?a&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,d,m){let b=h;if(h&&!m&&typeof h=="object"){if(R.endsWith(d,"{}"))d=n?d:d.slice(0,-2),h=JSON.stringify(h);else if(R.isArray(h)&&nd(h)||(R.isFileList(h)||R.endsWith(d,"[]"))&&(b=R.toArray(h)))return d=us(d),b.forEach(function(E,y){!(R.isUndefined(E)||E===null)&&t.append(s===!0?mi([d],y,o):s===null?d:d+"[]",c(E))}),!1}return Nr(h)?!0:(t.append(mi(m,d,o),c(h)),!1)}const l=[],f=Object.assign(id,{defaultVisitor:u,convertValue:c,isVisitable:Nr});function p(h,d){if(!R.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));l.push(h),R.forEach(h,function(m,b){(!(R.isUndefined(m)||m===null)&&i.call(t,m,R.isString(b)?b.trim():b,d,f))===!0&&p(m,d?d.concat(b):[b])}),l.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return p(e),t}function gi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nn(e,t){this._pairs=[],e&&Ge(e,this,t)}const cs=nn.prototype;cs.append=function(e,t){this._pairs.push([e,t])};cs.toString=function(e){const t=e?function(r){return e.call(this,r,gi)}:gi;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function od(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ls(e,t,r){if(!t)return e;const n=r&&r.encode||od;R.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(t,r):o=R.isURLSearchParams(t)?t.toString():new nn(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}let yi=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 fs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sd=typeof URLSearchParams<"u"?URLSearchParams:nn,ad=typeof FormData<"u"?FormData:null,ud=typeof Blob<"u"?Blob:null,cd={isBrowser:!0,classes:{URLSearchParams:sd,FormData:ad,Blob:ud},protocols:["http","https","file","blob","url","data"]},on=typeof window<"u"&&typeof document<"u",kr=typeof navigator=="object"&&navigator||void 0,ld=on&&(!kr||["ReactNative","NativeScript","NS"].indexOf(kr.product)<0),fd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hd=on&&window.location.href||"http://localhost",pd=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:on,hasStandardBrowserEnv:ld,hasStandardBrowserWebWorkerEnv:fd,navigator:kr,origin:hd},Symbol.toStringTag,{value:"Module"})),tt=V(V({},pd),cd);function dd(e,t){return Ge(e,new tt.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return tt.isNode&&R.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function md(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gd(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}function hs(e){function t(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=r.length;return s=!s&&R.isArray(i)?i.length:s,c?(R.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],o)&&R.isArray(i[s])&&(i[s]=gd(i[s])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const r={};return R.forEachEntry(e,(n,i)=>{t(md(n),i,r,0)}),r}return null}function yd(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 be={transitional:fs,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(hs(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 o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dd(e,this.formSerializer).toString();if((o=R.isFileList(e))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Ge(o?{"files[]":e}:e,s&&new s,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),yd(e)):e}],transformResponse:[function(e){const t=this.transitional||be.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(o){if(i)throw o.name==="SyntaxError"?W.from(o,W.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.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=>{be.headers[e]={}});const vd=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"]),bd=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
57
57
|
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&vd[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},vi=Symbol("internals");function se(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ce):String(e)}function _d(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 wd=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dr(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 Ed(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Sd(e,t){const r=R.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,s){return this[n].call(this,t,i,o,s)},configurable:!0})})}let ot=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(a,c,u){const l=se(c);if(!l)throw new Error("header name must be a non-empty string");const f=R.findKey(i,l);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Ce(a))}const s=(a,c)=>R.forEach(a,(u,l)=>o(u,l,c));if(R.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(R.isString(t)&&(t=t.trim())&&!wd(t))s(bd(t),r);else if(R.isHeaders(t))for(const[a,c]of t.entries())o(c,a,n);else t!=null&&o(r,t,n);return this}get(t,r){if(t=se(t),t){const n=R.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return _d(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=se(t),t){const n=R.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||dr(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(s){if(s=se(s),s){const a=R.findKey(n,s);a&&(!r||dr(n,n[a],a,r))&&(delete n[a],i=!0)}}return R.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||dr(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return R.forEach(this,(i,o)=>{const s=R.findKey(n,o);if(s){r[s]=Ce(i),delete r[o];return}const a=t?Ed(o):String(o).trim();a!==o&&delete r[o],r[a]=Ce(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(`
|
|
@@ -146,6 +146,6 @@ version: 2.9.0
|
|
|
146
146
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
147
147
|
* @name @vtj/uni
|
|
148
148
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
149
|
-
* @version 0.10.1
|
|
149
|
+
* @version 0.10.1
|
|
150
150
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
151
151
|
*/const Pg=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],Ni="/pages",Mg="VTJ",Lg="__UNI__1FC118B",Ug="VTJ移动跨端项目",Vg="1.0.0",Hg="100",qg=!1,zg={},Wg={enable:!1},Jg="3",Yg={name:Mg,appid:Lg,description:Ug,versionName:Vg,versionCode:Hg,transformPx:qg,"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:zg,"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:Wg,vueVersion:Jg},Kg=[],Gg={navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},Zg={autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}},Xg={pages:Kg,globalStyle:Gg,easycom:Zg};function Qg(e){let{manifestJson:t={},pagesJson:r={},routes:n=[]}=e;const i=n.map(o=>{const{path:s,style:a,needLogin:c}=o;return{path:s,style:a,needLogin:c}});return Q(V({},e),{manifestJson:Object.assign({},Yg,t),pagesJson:Object.assign({},Xg,r,{pages:i})})}const Wr={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function ks(e){const t={},r={black:"#000000",white:"#ffffff"};for(const n in e)Wr[n]&&(t[Wr[n]]=n==="navigationBarTextStyle"?r[e[n]]||r.black:e[n]);return t}function t0(e){const t={};for(const r in e)Wr[r]||(t[r]=e[r]);return t}function e0(e){var t,r;return((r=(t=e.h5)==null?void 0:t.router)==null?void 0:r.mode)||"hash"}function r0(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 n0(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;return!!(r!=null&&r.enablePullDownRefresh||n.find(i=>{var o;return!!((o=i.style)!=null&&o.enablePullDownRefresh)}))}function i0(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(o=>{var s;return((s=o.style)==null?void 0:s.navigationStyle)==="default"})&&(i=!1)):n.every(o=>{var s;return((s=o.style)==null?void 0:s.navigationStyle)==="custom"})&&(i=!0),i}function o0(e){var a;const t=i0(e),r={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:n={}}=e,{globalStyle:i,pages:o=[]}=n;if(t)return r;r.navigationBar=!0;const s=(a=i==null?void 0:i.h5)==null?void 0:a.titleNView;return o.find(c=>{var u,l,f;return!!((f=(l=(u=c.style)==null?void 0:u.h5)==null?void 0:l.titleNView)!=null&&f.buttons.length)})&&(r.navigationBarButtons=!0),(s!=null&&s.searchInput||o.find(c=>{var u,l,f;return!!((f=(l=(u=c.style)==null?void 0:u.h5)==null?void 0:l.titleNView)!=null&&f.searchInput)}))&&(r.navigationBarSearchInput=!0),((s==null?void 0:s.type)==="transparent"||o.find(c=>{var u,l,f;return((f=(l=(u=c.style)==null?void 0:u.h5)==null?void 0:l.titleNView)==null?void 0:f.type)==="transparent"}))&&(r.navigationBarTransparent=!0),r}function s0(e,t=window){var p,h,d,m;const{pagesJson:r={},manifestJson:n={}}=e,{topWindow:i,leftWindow:o,rightWindow:s}=r0(r),{navigationBar:a,navigationBarButtons:c,navigationBarSearchInput:u,navigationBarTransparent:l}=o0(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__:e0(n),__UNI_FEATURE_PAGES__:!!((p=r.pages)!=null&&p.length),__UNI_FEATURE_TABBAR__:!!((d=(h=r.tabBar)==null?void 0:h.list)!=null&&d.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((m=r.tabBar)!=null&&m.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:o,__UNI_FEATURE_RIGHTWINDOW__:s,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:a,__UNI_FEATURE_PULL_DOWN_REFRESH__:n0(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:c,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:u,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:l};Object.entries(f).forEach(([b,E])=>{t[b]=E})}const a0="4.45";function u0(e,t=window){var f,p;const{pagesJson:r={},manifestJson:n={}}=e,{easycom:i={}}=r,{appid:o="",name:s="",versionCode:a="",versionName:c=""}=n,u=r.globalStyle,l=((f=n.h5)==null?void 0:f.router)||{};t.__uniConfig={easycom:i,globalStyle:Q(V({},t0(u)),{navigationBar:ks(u),isNVue:!1}),compilerVersion:a0,appId:o,appName:s,appVersion:c,appVersionCode:String(a),async:V({loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0},((p=n.h5)==null?void 0:p.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:l.base||"/"},l),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 c0(e,t=window){const{UniServiceJSBridge:r,UniViewJSBridge:n,getApp:i,uni:o,getCurrentPages:s,upx2px:a,setupPage:c}=e;t.UniServiceJSBridge=r,t.UniViewJSBridge=n,t.getApp=i,t.uni=o,t.wx=o,t.getCurrentPages=s,t.upx2px=a,t.__setupPage=u=>c(u)}function l0(e,t,r){const{defineAsyncComponent:n,openBlock:i,createBlock:o,withCtx:s,createVNode:a}=e,{PageComponent:c,setupPage:u,getApp:l}=t;return{mpType:"page",setup(){var h,d;const f=((d=(h=l())==null?void 0:h.$route)==null?void 0:d.query)||{},p=typeof r=="function"?n(r):r;return()=>(i(),o(c,null,{page:s(()=>[a(u(p),Object.assign({},f,{ref:"page"}),null,512)]),_:1}))}}}function f0(e,t,r){var l;const{path:n,style:i={},meta:o={},home:s}=t,a=(((l=e.tabBar)==null?void 0:l.list)||[]).findIndex(f=>f.pagePath===n),c=a>-1,u=r===0;return V({isTabBar:c,tabBarIndex:a,isQuit:s!=null?s:u,isEntry:s!=null?s:u,navigationBar:V({type:"default"},ks(i)),isNVue:!1,route:n},o)}function h0(e,t,r,n,i=window){const o=r.map((s,a)=>{const c=f0(n,s,a),u=l0(e,t,s.component),{path:l}=s;return{path:l,alias:l,meta:c,component:u}});i.__uniRoutes=o,i.__uniLayout={}}function p0(e,t,r=window){cn(r,String(e),t)}function d0(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 m0(e){const t=Qg(e),{Vue:r,App:n,UniH5:i,routes:o=[],pagesJson:s={},manifestJson:a={},window:c,css:u=""}=t,{plugin:l,setupApp:f}=i;s0(t,c),u0(t,c),c0(i,c),h0(r,i,o,s,c),p0(a.appid||Date.now(),u,c);const p=r.createApp(f(n));return p.use(d0,i),p.use(l),p}function g0(e,t){const r={};return Object.entries(e).forEach(([n,i])=>{Pg.includes(n)&&i&&(r[n]=t(i))}),r}function y0(n){return L(this,arguments,function*(e,t=!1,r=Ni){var a,c,u;const i=((a=e.project)==null?void 0:a.pages)||[],o=[];for(const l of i){const f=yield e.getDsl(l.id);if(!f)continue;const{renderer:p}=e.createDslRenderer(f),h=((c=e.project)==null?void 0:c.homepage)===l.id;o.push({id:l.id,path:`${r}/${l.id}`,component:p,style:V({navigationBarTitleText:l.title},l.style),needLogin:l.needLogin,home:h})}const s=o.find(l=>!!l.home)||o[0];if(s){const l=r===Ni?"/":r;o.unshift(Q(V({},s),{path:l}))}if(t){const l=((u=e.project)==null?void 0:u.blocks)||[];for(const f of l){const p=yield e.getDsl(f.id);if(!p)continue;const{renderer:h}=e.createDslRenderer(p);o.push({id:f.id,path:`${r}/${f.id}`,component:h,style:{navigationStyle:"custom"}})}}return o})}function v0(){if(window.uni)return window.uni.showLoading({title:"加载中...",mask:!0}),{close:()=>{window.uni.hideLoading()}}}function Is(e,t="",r="warning"){window.uni&&window.uni.showModal({title:t,content:e,showCancel:!1})}function b0(e=nt.Runtime){return e===nt.Runtime?Object.assign({}):Object.assign({})}const _0=Am({loading:v0,notify:Is}),w0=new Fg(kg(Is)),E0=b0(),{provider:S0,onReady:x0}=jg({nodeEnv:"production",mode:nt.Runtime,modules:E0,materialPath:"../",adapter:_0,service:w0,dependencies:{Vue:()=>gn(()=>import("./@dcloudio-uni-h5-vue-Vtb9ks0b.js").then(e=>e.B),__vite__mapDeps([0,1,2]),import.meta.url),VueRouter:()=>gn(()=>import("./vue-router-CkCKZZ3K.js"),__vite__mapDeps([3,0,1,2]),import.meta.url)}}),T0=e=>L(void 0,null,function*(){var c;const{Vue:t,UniH5:r}=window,n=e.project;if(!n)return;const i=g0(n.uniConfig||{},u=>Le(u,window,!1,!0)),o=((c=n.uniConfig)==null?void 0:c.css)||"",s=yield y0(e,!0),a=m0({Vue:t,App:i,UniH5:r,routes:s,css:o});a.use(e),a.mount(document.body)});x0(()=>T0(S0));
|
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-BjN3Vd-8.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-Vtb9ks0b.js">
|