@vtj/renderer 0.12.40 → 0.12.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import { Base as Ue, BUILT_IN_COMPONENTS as Le, ProjectModel as B, HistoryModel as ge } from "@vtj/core";
2
- import { isUrl as qe, url as C, dedupArray as Je, isString as P, isFunction as U, logger as k, storage as W, cookie as G, toArray as le, unRSA as ue, delay as ne, createRequest as ve, jsonp as ye, merge as Ke, pathToRegexp as ze, pathToRegexpMatch as Ve, formDataToJson as We, Queue as Ge, cloneDeep as pe, camelCase as b, upperFirst as Qe, pick as Ye, request as Y, loadScript as fe, Storage as Xe, mapToObject as ie } from "@vtj/utils";
3
- import * as L from "vue";
4
- import { inject as _e, defineComponent as we, h as X, ref as Z, defineAsyncComponent as de, watchEffect as Ze } from "vue";
5
- import { useRoute as Se } from "vue-router";
1
+ import { Base as qe, BUILT_IN_COMPONENTS as Je, ProjectModel as U, HistoryModel as ye } from "@vtj/core";
2
+ import { isUrl as Ke, url as k, dedupArray as ze, isString as P, isFunction as L, logger as A, storage as W, cookie as G, toArray as pe, unRSA as fe, delay as ne, createRequest as _e, jsonp as we, merge as Ve, pathToRegexp as We, pathToRegexpMatch as Ge, formDataToJson as Qe, Queue as Ye, cloneDeep as de, camelCase as E, isObject as Xe, upperFirst as Ze, pick as et, request as Y, loadScript as he, Storage as tt, mapToObject as ie } from "@vtj/utils";
3
+ import * as q from "vue";
4
+ import { inject as Se, defineComponent as $e, h as X, ref as Z, defineAsyncComponent as me, watchEffect as st } from "vue";
5
+ import { useRoute as je } from "vue-router";
6
6
  /**!
7
7
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.12.40
10
+ * @version 0.12.41
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const I = "0.12.40";
13
+ const I = "0.12.41";
14
14
  var w = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(w || {});
15
- const he = [
15
+ const ge = [
16
16
  "$el",
17
17
  "$emit",
18
18
  "$nextTick",
@@ -24,7 +24,7 @@ const he = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], is = [
27
+ ], cs = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,7 +38,7 @@ const he = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], et = [
41
+ ], rt = [
42
42
  "vIf",
43
43
  "vElseIf",
44
44
  "vElse",
@@ -47,7 +47,7 @@ const he = [
47
47
  "vFor",
48
48
  "vBind",
49
49
  "vHtml"
50
- ], tt = {
50
+ ], nt = {
51
51
  String,
52
52
  Number,
53
53
  Boolean,
@@ -55,65 +55,65 @@ const he = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, M = "VtjPage", N = "VtjHomepage", st = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
58
+ }, M = "VtjPage", B = "VtjHomepage", it = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
59
59
  ","
60
- ), rt = "component,slot".split(",");
61
- function O(r, e) {
62
- return r.map((t) => qe(t) || t.startsWith("/") ? t : `${e}${t}`);
60
+ ), ot = "component,slot".split(",");
61
+ function x(r, e) {
62
+ return r.map((t) => Ke(t) || t.startsWith("/") ? t : `${e}${t}`);
63
63
  }
64
- function q(r) {
64
+ function J(r) {
65
65
  return /\.css$/.test(r);
66
66
  }
67
- function J(r) {
67
+ function K(r) {
68
68
  return /\.js$/.test(r);
69
69
  }
70
- function nt(r) {
70
+ function at(r) {
71
71
  return /\.json$/.test(r);
72
72
  }
73
- function os(r) {
73
+ function ls(r) {
74
74
  return r.map(
75
- (e) => `<script src="${C.append(e, { v: I })}"><\/script>`
75
+ (e) => `<script src="${k.append(e, { v: I })}"><\/script>`
76
76
  ).join("");
77
77
  }
78
- function as(r = []) {
78
+ function us(r = []) {
79
79
  return r.map(
80
- (e) => `<link rel="stylesheet" href="${C.append(e, { v: I })}" />`
80
+ (e) => `<link rel="stylesheet" href="${k.append(e, { v: I })}" />`
81
81
  ).join("");
82
82
  }
83
- function it(r, e = !1) {
83
+ function ct(r, e = !1) {
84
84
  return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
85
85
  }
86
- function ot(r, e, t = !1) {
86
+ function lt(r, e, t = !1) {
87
87
  const s = r.filter((h) => !!h.enabled), n = [], i = [], a = [], o = [], p = {}, c = {}, u = [], l = {};
88
88
  return s.forEach(
89
89
  ({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: y }) => {
90
90
  h?.forEach((g) => {
91
- J(g) && n.push(it(g, t)), q(g) && i.push(g);
92
- }), d && (o.push(d), p[d] = O(h || [], e), y && (c[d] = y)), f && a.push(f), m && u.push(m), d && m && (l[m] = d);
91
+ K(g) && n.push(ct(g, t)), J(g) && i.push(g);
92
+ }), d && (o.push(d), p[d] = x(h || [], e), y && (c[d] = y)), f && a.push(f), m && u.push(m), d && m && (l[m] = d);
93
93
  }
94
94
  ), {
95
- scripts: O(n, e),
96
- css: O(i, e),
97
- materials: O(a, e),
95
+ scripts: x(n, e),
96
+ css: x(i, e),
97
+ materials: x(a, e),
98
98
  libraryExports: o,
99
- materialExports: Je(u),
99
+ materialExports: ze(u),
100
100
  materialMapLibrary: l,
101
101
  libraryMap: p,
102
102
  libraryLocaleMap: c
103
103
  };
104
104
  }
105
- function at(r, e) {
105
+ function ut(r, e) {
106
106
  const { name: t, parent: s, alias: n } = r;
107
107
  return s ? e[s]?.[n || t] : e[n || t];
108
108
  }
109
- function ct(r = []) {
110
- const e = r.filter((s) => q(s)), t = r.filter((s) => J(s));
109
+ function pt(r = []) {
110
+ const e = r.filter((s) => J(s)), t = r.filter((s) => K(s));
111
111
  return {
112
112
  css: e,
113
113
  js: t
114
114
  };
115
115
  }
116
- function lt(r, e) {
116
+ function ft(r, e) {
117
117
  const t = (c) => {
118
118
  const u = [];
119
119
  let l = 0;
@@ -133,23 +133,23 @@ function lt(r, e) {
133
133
  const g = l;
134
134
  for (; l < c.length && c[l] !== "{" && c[l] !== ";"; )
135
135
  l++;
136
- const $ = c.substring(g, l).trim(), v = $.includes("@keyframes");
136
+ const j = c.substring(g, l).trim(), v = j.includes("@keyframes");
137
137
  if (c[l] === ";")
138
138
  u.push({
139
139
  type: "simple-at-rule",
140
140
  content: c.substring(g, l + 1)
141
141
  }), l++;
142
142
  else if (c[l] === "{") {
143
- const K = l + 1;
144
- let F = 1;
145
- for (l++; l < c.length && F > 0; )
146
- c[l] === "{" ? F++ : c[l] === "}" && F--, l++;
147
- const z = c.substring(g, l), E = c.substring(K, l - 1);
143
+ const O = l + 1;
144
+ let R = 1;
145
+ for (l++; l < c.length && R > 0; )
146
+ c[l] === "{" ? R++ : c[l] === "}" && R--, l++;
147
+ const z = c.substring(g, l), b = c.substring(O, l - 1);
148
148
  u.push({
149
149
  type: v ? "keyframes" : "at-rule",
150
- rule: $,
150
+ rule: j,
151
151
  content: z,
152
- inner: E
152
+ inner: b
153
153
  });
154
154
  }
155
155
  continue;
@@ -227,11 +227,11 @@ function lt(r, e) {
227
227
  });
228
228
  }
229
229
  }
230
- function $e(r) {
230
+ function be(r) {
231
231
  return P(r) ? r : JSON.stringify(r);
232
232
  }
233
- function je(r, e, t, s = !1) {
234
- const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? lt(t, i) : t;
233
+ function Ee(r, e, t, s = !1) {
234
+ const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? ft(t, i) : t;
235
235
  if (n.prototype.replaceSync) {
236
236
  const o = new n();
237
237
  o.id = e, o.replaceSync(a);
@@ -245,11 +245,11 @@ function je(r, e, t, s = !1) {
245
245
  p ? p.innerHTML = a : (p = o.createElement("style"), p.id = e, p.innerHTML = a, o.head.appendChild(p));
246
246
  }
247
247
  }
248
- async function ut(r, e) {
248
+ async function dt(r, e) {
249
249
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
250
- t && je(window, r, t);
250
+ t && Ee(window, r, t);
251
251
  }
252
- function Ee(r, e = window) {
252
+ function Pe(r, e = window) {
253
253
  const t = e.document, s = e.document.head;
254
254
  for (const n of r)
255
255
  if (!t.getElementById(n)) {
@@ -257,7 +257,7 @@ function Ee(r, e = window) {
257
257
  a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
258
258
  }
259
259
  }
260
- async function be(r, e, t = window) {
260
+ async function Re(r, e, t = window) {
261
261
  const s = t.document, n = t.document.head;
262
262
  let i = t[e];
263
263
  return i ? i.default || i : new Promise((a, o) => {
@@ -271,14 +271,14 @@ async function be(r, e, t = window) {
271
271
  }
272
272
  });
273
273
  }
274
- function pt(r) {
275
- return U(r) || U(r?.install);
274
+ function ht(r) {
275
+ return L(r) || L(r?.install);
276
276
  }
277
- function ft(r) {
278
- return rt.includes(r);
277
+ function mt(r) {
278
+ return ot.includes(r);
279
279
  }
280
- function dt(r) {
281
- return st.includes(r);
280
+ function gt(r) {
281
+ return it.includes(r);
282
282
  }
283
283
  function D(r = window) {
284
284
  const e = window?.Mock;
@@ -287,7 +287,7 @@ function D(r = window) {
287
287
  if (t && window)
288
288
  return window.Mock = t, t;
289
289
  }
290
- function cs(r, e, t) {
290
+ function ps(r, e, t) {
291
291
  Object.assign(e.meta, t.meta);
292
292
  const s = r?._container;
293
293
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
@@ -302,13 +302,13 @@ function T(r, e, t = !1, s = !1) {
302
302
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
303
303
  return new Function("$scope", a)(e);
304
304
  } catch (n) {
305
- if (k.error("parseExpression.error", n, r, e?.__self ?? e), s)
305
+ if (A.error("parseExpression.error", n, r, e?.__self ?? e), s)
306
306
  throw n;
307
307
  }
308
308
  }
309
309
  function ee(r, e, t = !1, s = !1) {
310
310
  const n = T(r, e, t, s);
311
- if (typeof n != "function" && (k.error(
311
+ if (typeof n != "function" && (A.error(
312
312
  "parseFunction.error",
313
313
  "not a function",
314
314
  r,
@@ -317,19 +317,19 @@ function ee(r, e, t = !1, s = !1) {
317
317
  throw new Error(`"${r.value}" not a function`);
318
318
  return n;
319
319
  }
320
- function S(r) {
320
+ function $(r) {
321
321
  return r && r.type === "JSExpression";
322
322
  }
323
323
  function H(r) {
324
324
  return typeof r == "object" && r && r.type === "JSFunction";
325
325
  }
326
- function ht(r) {
327
- return S(r) || H(r);
326
+ function vt(r) {
327
+ return $(r) || H(r);
328
328
  }
329
- function ls(r) {
330
- return ht(r) ? r.value : JSON.stringify(r);
329
+ function fs(r) {
330
+ return vt(r) ? r.value : JSON.stringify(r);
331
331
  }
332
- const mt = {
332
+ const yt = {
333
333
  session: !1,
334
334
  authKey: "Authorization",
335
335
  storageKey: "ACCESS_STORAGE",
@@ -342,14 +342,14 @@ const mt = {
342
342
  noPermissionMessage: "无权限访问该页面",
343
343
  appName: "",
344
344
  statusKey: "code"
345
- }, Pe = Symbol("access");
346
- class Re {
345
+ }, Ce = Symbol("access");
346
+ class ke {
347
347
  options;
348
348
  data = null;
349
349
  mode = w.Raw;
350
350
  interceptResponse = !0;
351
351
  constructor(e) {
352
- this.options = Object.assign({}, mt, e), this.loadData();
352
+ this.options = Object.assign({}, yt, e), this.loadData();
353
353
  }
354
354
  enableIntercept() {
355
355
  this.interceptResponse = !0;
@@ -386,14 +386,14 @@ class Re {
386
386
  }
387
387
  can(e) {
388
388
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
389
- return typeof e == "function" ? e(s) : le(e).every((i) => s[i] || s[t + "." + i]);
389
+ return typeof e == "function" ? e(s) : pe(e).every((i) => s[i] || s[t + "." + i]);
390
390
  }
391
391
  some(e) {
392
392
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
393
- return le(e).some((i) => s[i] || s[t + "." + i]);
393
+ return pe(e).some((i) => s[i] || s[t + "." + i]);
394
394
  }
395
395
  install(e) {
396
- e.config.globalProperties.$access = this, e.provide(Pe, this);
396
+ e.config.globalProperties.$access = this, e.provide(Ce, this);
397
397
  }
398
398
  isAuthPath(e) {
399
399
  const { auth: t, isAuth: s } = this.options;
@@ -414,7 +414,7 @@ class Re {
414
414
  setData(e) {
415
415
  const { privateKey: t } = this.options;
416
416
  if (Array.isArray(e) && t) {
417
- const s = e.map((n) => ue(n, t));
417
+ const s = e.map((n) => fe(n, t));
418
418
  try {
419
419
  this.data = JSON.parse(s.join(""));
420
420
  } catch (n) {
@@ -424,7 +424,7 @@ class Re {
424
424
  }
425
425
  if (typeof e == "string")
426
426
  try {
427
- const s = t ? ue(e, t) : e;
427
+ const s = t ? fe(e, t) : e;
428
428
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
429
429
  } catch (s) {
430
430
  console.warn(s);
@@ -461,7 +461,7 @@ class Re {
461
461
  return t();
462
462
  {
463
463
  const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
464
- return await this.showTip(s), U(n) ? (n(), t(!1)) : P(n) ? t(n) : t(!1);
464
+ return await this.showTip(s), L(n) ? (n(), t(!1)) : P(n) ? t(n) : t(!1);
465
465
  }
466
466
  }
467
467
  t(!1), this.toLogin();
@@ -496,10 +496,10 @@ class Re {
496
496
  );
497
497
  }
498
498
  }
499
- function gt() {
500
- return _e(Pe, null);
499
+ function _t() {
500
+ return Se(Ce, null);
501
501
  }
502
- function us(r = {}) {
502
+ function ds(r = {}) {
503
503
  const {
504
504
  notify: e,
505
505
  loading: t,
@@ -511,7 +511,7 @@ function us(r = {}) {
511
511
  } = r;
512
512
  let p = null;
513
513
  return {
514
- request: ve({
514
+ request: _e({
515
515
  settings: {
516
516
  type: "form",
517
517
  validSuccess: !0,
@@ -531,18 +531,18 @@ function us(r = {}) {
531
531
  ...s
532
532
  }
533
533
  }),
534
- jsonp: ye,
534
+ jsonp: we,
535
535
  notify: e,
536
536
  loading: t,
537
537
  useTitle: a,
538
538
  startupComponent: n,
539
- access: i ? new Re({ alert: o, ...i }) : void 0
539
+ access: i ? new ke({ alert: o, ...i }) : void 0
540
540
  };
541
541
  }
542
- function ps(r = {}) {
543
- return new Re(r);
542
+ function hs(r = {}) {
543
+ return new ke(r);
544
544
  }
545
- function vt(r, e) {
545
+ function wt(r, e) {
546
546
  const { jsonp: t, request: s } = e;
547
547
  if (r.method === "jsonp")
548
548
  return (n = {}) => t(r.url, {
@@ -558,10 +558,10 @@ function vt(r, e) {
558
558
  headers: n
559
559
  }
560
560
  };
561
- return (a, o) => (delete i.data, s.send(Ke(i, o || {}, { data: a })));
561
+ return (a, o) => (delete i.data, s.send(Ve(i, o || {}, { data: a })));
562
562
  }
563
563
  }
564
- function yt(r, e) {
564
+ function St(r, e) {
565
565
  const { metaQuery: t } = e;
566
566
  if (!t) return;
567
567
  const { code: s, queryCode: n } = r;
@@ -573,19 +573,19 @@ function yt(r, e) {
573
573
  return t(s, n, i, a);
574
574
  };
575
575
  }
576
- function _t(r = [], e = [], t) {
576
+ function $t(r = [], e = [], t) {
577
577
  const s = {};
578
578
  for (const n of r)
579
- s[n.id] = vt(n, t);
579
+ s[n.id] = wt(n, t);
580
580
  for (const n of e)
581
- s[n.id] = yt(n, t);
581
+ s[n.id] = St(n, t);
582
582
  return s;
583
583
  }
584
- async function wt(r = [], e = window) {
584
+ async function jt(r = [], e = window) {
585
585
  const t = D(e);
586
- t && (Ce(e), r.forEach((s) => $t(t, s)));
586
+ t && (Ae(e), r.forEach((s) => Et(t, s)));
587
587
  }
588
- function St(r, e = window) {
588
+ function bt(r, e = window) {
589
589
  const t = H(r.mockTemplate) && r.mockTemplate.value ? ee(r.mockTemplate, {}, !0) : void 0, s = D(e);
590
590
  return async (...n) => {
591
591
  let i = {};
@@ -593,27 +593,27 @@ function St(r, e = window) {
593
593
  try {
594
594
  i = await t.apply(t, n);
595
595
  } catch (a) {
596
- k.warn("模拟数据模版异常", a);
596
+ A.warn("模拟数据模版异常", a);
597
597
  }
598
598
  return s?.mock(i);
599
599
  };
600
600
  }
601
- function $t(r, e) {
601
+ function Et(r, e) {
602
602
  if (!e.mock) return;
603
603
  const { url: t, mockTemplate: s } = e;
604
604
  if (t && s) {
605
- const n = ze(`${t}(.*)`), i = Ve(t, { decode: decodeURIComponent }), a = T(s, {}, !0);
605
+ const n = We(`${t}(.*)`), i = Ge(t, { decode: decodeURIComponent }), a = T(s, {}, !0);
606
606
  r.mock(n, (o) => {
607
- const p = C.parse(o.url) || {}, c = o.body instanceof FormData ? We(o.body) : o.body, u = i(o.url)?.params;
607
+ const p = k.parse(o.url) || {}, c = o.body instanceof FormData ? Qe(o.body) : o.body, u = i(o.url)?.params;
608
608
  return Object.assign(o, { data: c, params: p, query: u }), r.mock(a(o));
609
609
  });
610
610
  }
611
611
  }
612
- function Ce(r = window) {
612
+ function Ae(r = window) {
613
613
  const e = D(r);
614
614
  e && (e._mocked = {});
615
615
  }
616
- class jt {
616
+ class Pt {
617
617
  __id = null;
618
618
  __mode;
619
619
  __instance = null;
@@ -642,7 +642,7 @@ class jt {
642
642
  const { mode: t, dsl: s, attrs: n } = e;
643
643
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
644
644
  }
645
- setup(e, t = L) {
645
+ setup(e, t = q) {
646
646
  const s = t.getCurrentInstance();
647
647
  if (!s) return;
648
648
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -656,12 +656,12 @@ class jt {
656
656
  });
657
657
  }
658
658
  __proxy() {
659
- this.__instance && he.forEach((e) => {
659
+ this.__instance && ge.forEach((e) => {
660
660
  this[e] = this.__instance?.[e];
661
661
  });
662
662
  }
663
663
  __cleanup() {
664
- he.forEach((e) => {
664
+ ge.forEach((e) => {
665
665
  this[e] = null;
666
666
  }), this.__reset();
667
667
  }
@@ -714,7 +714,7 @@ class jt {
714
714
  }
715
715
  function te(r) {
716
716
  const {
717
- Vue: e = L,
717
+ Vue: e = q,
718
718
  mode: t = w.Runtime,
719
719
  components: s = {},
720
720
  libs: n = {},
@@ -724,7 +724,7 @@ function te(r) {
724
724
  $components: s,
725
725
  $libs: n,
726
726
  $apis: i
727
- }, c = new jt({
727
+ }, c = new Pt({
728
728
  mode: t,
729
729
  dsl: o.value,
730
730
  attrs: p
@@ -732,19 +732,19 @@ function te(r) {
732
732
  name: o.value.name,
733
733
  __scopeId: o.value.id ? `data-v-${o.value.id}` : void 0,
734
734
  props: {
735
- ...bt(o.value.props ?? [], c)
735
+ ...Ct(o.value.props ?? [], c)
736
736
  },
737
737
  setup(l) {
738
- c.$props = l, c.props = l, o.value.id && je(
738
+ c.$props = l, c.props = l, o.value.id && Ee(
739
739
  r.window || window,
740
740
  o.value.id,
741
741
  o.value.css || "",
742
742
  !0
743
- ), c.state = Pt(e, o.value.state ?? {}, c);
744
- const h = Rt(e, o.value.computed ?? {}, c), f = Ct(o.value.methods ?? {}, c), d = kt(e, o.value.inject, c);
745
- for (const [g, $] of Object.entries(d || {}))
746
- d[g] = e.inject(g, $);
747
- const m = At(
743
+ ), c.state = kt(e, o.value.state ?? {}, c);
744
+ const h = At(e, o.value.computed ?? {}, c), f = Ft(o.value.methods ?? {}, c), d = It(e, o.value.inject, c);
745
+ for (const [g, j] of Object.entries(d || {}))
746
+ d[g] = e.inject(g, j);
747
+ const m = Mt(
748
748
  o.value.dataSources || {},
749
749
  c
750
750
  ), y = {
@@ -753,38 +753,38 @@ function te(r) {
753
753
  ...f,
754
754
  ...m
755
755
  };
756
- return c.setup(y, e), Ft(e, o.value.watch ?? [], c), {
756
+ return c.setup(y, e), Dt(e, o.value.watch ?? [], c), {
757
757
  vtj: c
758
758
  };
759
759
  },
760
- emits: Et(o.value.emits),
760
+ emits: Rt(o.value.emits),
761
761
  expose: ["vtj"],
762
762
  render() {
763
763
  if (!o.value.nodes) return null;
764
764
  const l = o.value.nodes || [];
765
- return l.length === 1 ? A(l[0], c, e, a, l) : l.map(
766
- (h) => A(h, c, e, a, l)
765
+ return l.length === 1 ? F(l[0], c, e, a, l) : l.map(
766
+ (h) => F(h, c, e, a, l)
767
767
  );
768
768
  },
769
- ...It(o.value.lifeCycles ?? {}, c)
769
+ ...Tt(o.value.lifeCycles ?? {}, c)
770
770
  });
771
771
  return {
772
772
  renderer: e.markRaw(u),
773
773
  context: c
774
774
  };
775
775
  }
776
- function Et(r = []) {
776
+ function Rt(r = []) {
777
777
  return r.map((e) => P(e) ? e : e.name);
778
778
  }
779
- function bt(r = [], e) {
780
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => tt[i]) : void 0;
779
+ function Ct(r = [], e) {
780
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => nt[i]) : void 0;
781
781
  return r.map((s) => P(s) ? {
782
782
  name: s
783
783
  } : {
784
784
  name: s.name,
785
785
  type: s.type,
786
786
  required: s.required,
787
- default: S(s.default) ? e.__parseExpression(s.default) : s.default
787
+ default: $(s.default) ? e.__parseExpression(s.default) : s.default
788
788
  }).reduce(
789
789
  (s, n) => (s[n.name] = {
790
790
  type: t(n.type),
@@ -794,46 +794,46 @@ function bt(r = [], e) {
794
794
  {}
795
795
  );
796
796
  }
797
- function Pt(r, e, t) {
797
+ function kt(r, e, t) {
798
798
  return r.reactive(
799
799
  Object.keys(e || {}).reduce(
800
800
  (s, n) => {
801
801
  let i = e[n];
802
- return S(i) ? i = t.__parseExpression(i) : H(i) && (i = t.__parseFunction(i)), s[n] = i, s;
802
+ return $(i) ? i = t.__parseExpression(i) : H(i) && (i = t.__parseFunction(i)), s[n] = i, s;
803
803
  },
804
804
  {}
805
805
  )
806
806
  );
807
807
  }
808
- function Rt(r, e, t) {
808
+ function At(r, e, t) {
809
809
  return Object.entries(e ?? {}).reduce(
810
810
  (s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
811
811
  {}
812
812
  );
813
813
  }
814
- function Ct(r, e) {
814
+ function Ft(r, e) {
815
815
  return Object.entries(r ?? {}).reduce(
816
816
  (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
817
817
  {}
818
818
  );
819
819
  }
820
- function kt(r, e = [], t) {
820
+ function It(r, e = [], t) {
821
821
  return e.reduce(
822
822
  (s, n) => {
823
823
  const { name: i, from: a } = n || {};
824
824
  n.default;
825
- const o = S(a) ? t.__parseExpression(a) || i : a ?? i, p = S(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
825
+ const o = $(a) ? t.__parseExpression(a) || i : a ?? i, p = $(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
826
826
  return s[i] = r.inject(o, p), s;
827
827
  },
828
828
  {}
829
829
  );
830
830
  }
831
- function At(r, e) {
831
+ function Mt(r, e) {
832
832
  return Object.keys(r).reduce(
833
833
  (t, s) => {
834
834
  const n = r[s];
835
835
  if (n.type === "mock")
836
- t[s] = St(n);
836
+ t[s] = bt(n);
837
837
  else if (n.ref) {
838
838
  const i = e.$apis[n.ref], a = H(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
839
839
  t[s] = async (...o) => {
@@ -846,7 +846,7 @@ function At(r, e) {
846
846
  {}
847
847
  );
848
848
  }
849
- function Ft(r, e = [], t) {
849
+ function Dt(r, e = [], t) {
850
850
  e.forEach((s) => {
851
851
  r.watch(
852
852
  t.__parseExpression(s.source),
@@ -858,25 +858,25 @@ function Ft(r, e = [], t) {
858
858
  );
859
859
  });
860
860
  }
861
- function It(r, e) {
861
+ function Tt(r, e) {
862
862
  return Object.entries(r ?? {}).reduce(
863
863
  (t, [s, n]) => {
864
864
  const i = e.__parseFunction(n);
865
865
  return t[s] = async () => {
866
- await ne(0), U(i) && i();
866
+ await ne(0), L(i) && i();
867
867
  }, t;
868
868
  },
869
869
  {}
870
870
  );
871
871
  }
872
- const ke = new Ge();
873
- let Q = [], R = {};
874
- const Mt = (r) => r;
875
- async function Ae(r, e = window) {
876
- const { urls: t = [], library: s } = r, n = t.filter((o) => J(o));
872
+ const Fe = new Ye();
873
+ let Q = [], C = {};
874
+ const Ht = (r) => r;
875
+ async function Ie(r, e = window) {
876
+ const { urls: t = [], library: s } = r, n = t.filter((o) => K(o));
877
877
  if (n.length === 0 || !s) return null;
878
- const i = t.filter((o) => q(o));
879
- return i.length && Ee(i, e), await be(n, s, e).catch(
878
+ const i = t.filter((o) => J(o));
879
+ return i.length && Pe(i, e), await Re(n, s, e).catch(
880
880
  (o) => (console.warn("loadScriptUrl error", n, s, o), null)
881
881
  );
882
882
  }
@@ -884,38 +884,38 @@ function se(r) {
884
884
  const { getDsl: e, getDslByUrl: t, options: s } = r;
885
885
  return s.window && (Q.forEach((n) => {
886
886
  delete s.window[n];
887
- }), Q = []), (n, i, a = L) => {
887
+ }), Q = []), (n, i, a = q) => {
888
888
  if (!i || typeof i == "string") return n;
889
889
  if (i.type === "Schema" && i.id)
890
890
  return a.defineAsyncComponent(async () => {
891
- const o = R[i.id] || await ke.add(
891
+ const o = C[i.id] || await Fe.add(
892
892
  i.id,
893
893
  () => e(i.id)
894
894
  );
895
- return o && (o.name = n, R[i.id] = o), o ? te({
895
+ return o && (o.name = n, C[i.id] = o), o ? te({
896
896
  ...s,
897
897
  Vue: a,
898
- dsl: pe(o),
898
+ dsl: de(o),
899
899
  mode: w.Runtime,
900
900
  loader: se(r)
901
901
  }).renderer : null;
902
902
  });
903
903
  if (i.type === "UrlSchema" && i.url)
904
904
  return a.defineAsyncComponent(async () => {
905
- const o = R[i.url] || await t(i.url);
906
- return o && (o.name = n, R[i.url] = o), o ? te({
905
+ const o = C[i.url] || await t(i.url);
906
+ return o && (o.name = n, C[i.url] = o), o ? te({
907
907
  ...s,
908
908
  Vue: a,
909
- dsl: pe(o),
909
+ dsl: de(o),
910
910
  mode: w.Runtime,
911
911
  loader: se(r)
912
912
  }).renderer : null;
913
913
  });
914
914
  if (i.type === "Plugin") {
915
- let o = i.library ? R[i.library] : null;
916
- return o || (i.library && Q.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
915
+ let o = i.library ? C[i.library] : null;
916
+ return o || (i.library && Q.push(i.library), o = C[i.library || Symbol()] = a.defineAsyncComponent(
917
917
  async () => {
918
- const p = await Ae(i, s.window);
918
+ const p = await Ie(i, s.window);
919
919
  return p || (console.warn("getPlugin result is null", i), null);
920
920
  }
921
921
  ), o);
@@ -923,50 +923,56 @@ function se(r) {
923
923
  return n;
924
924
  };
925
925
  }
926
- function fs() {
927
- R = {}, ke.clearAllCache();
926
+ function ms() {
927
+ C = {}, Fe.clearAllCache();
928
928
  }
929
- function A(r, e, t = L, s = Mt, n = [], i = !1) {
929
+ function F(r, e, t = q, s = Ht, n = [], i = !1) {
930
930
  if (!r || !r.name || r.invisible) return null;
931
- const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: p = [] } = r, { vIf: c, vElseIf: u, vElse: l, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: y, others: g } = Fe(p);
931
+ const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: p = [] } = r, { vIf: c, vElseIf: u, vElse: l, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: y, others: g } = Me(p);
932
932
  if (!i && (u || l))
933
933
  return null;
934
- if (c && !Tt(c, e))
935
- return Nt(r, e, t, s, n);
936
- const $ = (v, K = 0) => {
937
- const F = v.$components, z = (() => {
934
+ if (c && !xt(c, e))
935
+ return Lt(r, e, t, s, n);
936
+ const j = (v, O = 0) => {
937
+ const R = v.$components, z = (() => {
938
938
  if (r.name === "component")
939
- return Ht(v, r.props?.is);
939
+ return Nt(v, r.props?.is);
940
940
  if (r.name === "slot") return r.name;
941
- const j = s(r.name, r.from, t);
942
- return P(j) ? ft(j) || dt(j) ? j : F[j] ?? a?.app?.component(j) ?? j : j;
943
- })(), E = Ot(o, r.props ?? {}, v), xe = xt(t, r.events ?? {}, v);
941
+ const S = s(r.name, r.from, t);
942
+ if (P(S))
943
+ return mt(S) || gt(S) ? S : R[S] ?? a?.app?.component(S) ?? S;
944
+ if (Xe(S) && r.id) {
945
+ const le = `Loader${r.id}_${O}`, ue = R[le];
946
+ return ue || (R[le] = S);
947
+ }
948
+ return S;
949
+ })(), b = Bt(o, r.props ?? {}, v), Be = Ut(t, r.events ?? {}, v);
944
950
  if (r.name === "slot")
945
- return Bt(t, r, E, v, s);
946
- m && Object.assign(E, v.__parseExpression(m.value)), f && (E.style = Object.assign(
947
- E.style ?? {},
948
- Lt(f, v)
949
- )), y && Object.assign(E, qt(y, v)), d.forEach((j) => {
950
- Object.assign(E, Jt(t, j, v));
951
+ return qt(t, r, b, v, s);
952
+ m && Object.assign(b, v.__parseExpression(m.value)), f && (b.style = Object.assign(
953
+ b.style ?? {},
954
+ Kt(f, v)
955
+ )), y && Object.assign(b, zt(y, v)), d.forEach((S) => {
956
+ Object.assign(b, Vt(t, S, v));
951
957
  });
952
- const Ne = Kt(
958
+ const Ue = Wt(
953
959
  t,
954
960
  r.children ?? [],
955
961
  v,
956
962
  s,
957
963
  r
958
- ), ae = v?.__id ? `data-v-${v.__id}` : void 0, Be = ae ? { [ae]: "" } : {};
964
+ ), ae = v?.__id ? `data-v-${v.__id}` : void 0, Le = ae ? { [ae]: "" } : {};
959
965
  let V = t.createVNode(
960
966
  z,
961
- { key: `${o}_${K}`, ...Be, ...E, ...xe },
962
- Ne
967
+ { key: `${o}_${O}`, ...Le, ...b, ...Be },
968
+ Ue
963
969
  );
964
- const ce = a ? Dt(a, g, v) : [];
970
+ const ce = a ? Ot(a, g, v) : [];
965
971
  return ce.length && (V = t.withDirectives(V, ce)), V;
966
972
  };
967
- return h ? Wt(h, $, e) : $(e);
973
+ return h ? Yt(h, j, e) : j(e);
968
974
  }
969
- function Dt(r, e, t) {
975
+ function Ot(r, e, t) {
970
976
  const s = r.app;
971
977
  return e.map((n) => {
972
978
  const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
@@ -975,13 +981,13 @@ function Dt(r, e, t) {
975
981
  return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
976
982
  }).filter((n) => !!n);
977
983
  }
978
- function Fe(r = []) {
979
- const e = r.find((u) => b(u.name) === "vIf"), t = r.find(
980
- (u) => b(u.name) === "vElseIf"
981
- ), s = r.find((u) => b(u.name) === "vElse"), n = r.find((u) => b(u.name) === "vFor"), i = r.find((u) => b(u.name) === "vShow"), a = r.find((u) => b(u.name) === "vBind"), o = r.find((u) => b(u.name) === "vHtml"), p = r.filter(
982
- (u) => b(u.name) === "vModel"
984
+ function Me(r = []) {
985
+ const e = r.find((u) => E(u.name) === "vIf"), t = r.find(
986
+ (u) => E(u.name) === "vElseIf"
987
+ ), s = r.find((u) => E(u.name) === "vElse"), n = r.find((u) => E(u.name) === "vFor"), i = r.find((u) => E(u.name) === "vShow"), a = r.find((u) => E(u.name) === "vBind"), o = r.find((u) => E(u.name) === "vHtml"), p = r.filter(
988
+ (u) => E(u.name) === "vModel"
983
989
  ), c = r.filter(
984
- (u) => !et.includes(b(u.name))
990
+ (u) => !rt.includes(E(u.name))
985
991
  );
986
992
  return {
987
993
  vIf: e,
@@ -995,18 +1001,18 @@ function Fe(r = []) {
995
1001
  vHtml: o
996
1002
  };
997
1003
  }
998
- function Tt(r, e) {
1004
+ function xt(r, e) {
999
1005
  return !!e.__parseExpression(r.value);
1000
1006
  }
1001
- function Ht(r, e) {
1002
- return e ? S(e) ? r.__parseExpression(e) : e : "div";
1007
+ function Nt(r, e) {
1008
+ return e ? $(e) ? r.__parseExpression(e) : e : "div";
1003
1009
  }
1004
- function Ot(r, e, t) {
1010
+ function Bt(r, e, t) {
1005
1011
  const s = re(e, t);
1006
1012
  return s.ref = t.__ref(r, s.ref), s;
1007
1013
  }
1008
1014
  function re(r, e) {
1009
- return S(r) ? e.__parseExpression(r) : H(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => re(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
1015
+ return $(r) ? e.__parseExpression(r) : H(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => re(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
1010
1016
  (t, s) => {
1011
1017
  let n = r[s];
1012
1018
  return t[s] = re(n, e), t;
@@ -1014,7 +1020,7 @@ function re(r, e) {
1014
1020
  {}
1015
1021
  ) : r;
1016
1022
  }
1017
- function xt(r, e, t) {
1023
+ function Ut(r, e, t) {
1018
1024
  const s = ["passive", "capture", "once"], n = {
1019
1025
  capture: "Capture",
1020
1026
  once: "Once",
@@ -1022,94 +1028,94 @@ function xt(r, e, t) {
1022
1028
  };
1023
1029
  return Object.keys(e || {}).reduce(
1024
1030
  (i, a) => {
1025
- const o = e[a], p = Ie(o.modifiers), c = p.find((h) => s.includes(h)), u = "on" + Qe(a) + (c && n[c] || ""), l = t.__parseFunction(o.handler);
1031
+ const o = e[a], p = De(o.modifiers), c = p.find((h) => s.includes(h)), u = "on" + Ze(a) + (c && n[c] || ""), l = t.__parseFunction(o.handler);
1026
1032
  return l && (i[u] = r.withModifiers(l, p)), i;
1027
1033
  },
1028
1034
  {}
1029
1035
  );
1030
1036
  }
1031
- function Nt(r, e, t, s, n = []) {
1037
+ function Lt(r, e, t, s, n = []) {
1032
1038
  let i = n.findIndex((a) => a.id === r.id);
1033
1039
  for (let a = ++i; a < n.length; a++) {
1034
- const { directives: o = [] } = n[a], { vElseIf: p, vElse: c } = Fe(o);
1040
+ const { directives: o = [] } = n[a], { vElseIf: p, vElse: c } = Me(o);
1035
1041
  if (p) {
1036
1042
  if (e.__parseExpression(p.value))
1037
- return A(n[a], e, t, s, n, !0);
1043
+ return F(n[a], e, t, s, n, !0);
1038
1044
  continue;
1039
1045
  }
1040
1046
  if (c)
1041
- return A(n[a], e, t, s, n, !0);
1047
+ return F(n[a], e, t, s, n, !0);
1042
1048
  }
1043
1049
  return null;
1044
1050
  }
1045
- function Ie(r = {}, e = !1) {
1051
+ function De(r = {}, e = !1) {
1046
1052
  const t = Object.keys(r);
1047
1053
  return e ? t.map((s) => "." + s) : t;
1048
1054
  }
1049
- function Bt(r, e, t, s, n) {
1050
- const { children: i } = e, a = Ut(e, s), o = s.$slots?.[a.name];
1051
- return o ? o(t) : i ? P(i) ? r.createTextVNode(i) : S(i) ? r.createTextVNode(
1052
- $e(s.__parseExpression(i))
1055
+ function qt(r, e, t, s, n) {
1056
+ const { children: i } = e, a = Jt(e, s), o = s.$slots?.[a.name];
1057
+ return o ? o(t) : i ? P(i) ? r.createTextVNode(i) : $(i) ? r.createTextVNode(
1058
+ be(s.__parseExpression(i))
1053
1059
  ) : Array.isArray(i) ? i.map(
1054
- (p) => A(p, s, r, n, i)
1060
+ (p) => F(p, s, r, n, i)
1055
1061
  ) : null : null;
1056
1062
  }
1057
- function Ut(r, e) {
1063
+ function Jt(r, e) {
1058
1064
  const { props: t } = r, s = t?.name || "default";
1059
1065
  return {
1060
- name: S(s) ? e.__parseExpression(s) : s,
1066
+ name: $(s) ? e.__parseExpression(s) : s,
1061
1067
  params: []
1062
1068
  };
1063
1069
  }
1064
- function Lt(r, e) {
1070
+ function Kt(r, e) {
1065
1071
  return e.__parseExpression(r.value) ? {} : {
1066
1072
  display: "none"
1067
1073
  };
1068
1074
  }
1069
- function qt(r, e) {
1075
+ function zt(r, e) {
1070
1076
  return {
1071
1077
  innerHTML: e.__parseExpression(r.value) || ""
1072
1078
  };
1073
1079
  }
1074
- function Jt(r, e, t) {
1080
+ function Vt(r, e, t) {
1075
1081
  const s = {
1076
1082
  type: "JSFunction",
1077
1083
  value: e.value?.value ? `(v) => {
1078
1084
  ${e.value.value} = v;
1079
1085
  }` : "(v) => {}"
1080
- }, n = t.__parseFunction(s), i = Ie(
1081
- S(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1082
- ), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1086
+ }, n = t.__parseFunction(s), i = De(
1087
+ $(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1088
+ ), a = $(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1083
1089
  return {
1084
1090
  [a]: t.__parseExpression(e.value),
1085
1091
  [`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
1086
1092
  };
1087
1093
  }
1088
- function Kt(r, e, t, s, n) {
1094
+ function Wt(r, e, t, s, n) {
1089
1095
  if (!e) return null;
1090
1096
  if (P(e))
1091
1097
  return { default: () => e };
1092
- if (S(e))
1098
+ if ($(e))
1093
1099
  return {
1094
- default: () => $e(t.__parseExpression(e))
1100
+ default: () => be(t.__parseExpression(e))
1095
1101
  };
1096
1102
  if (Array.isArray(e) && e.length > 0) {
1097
- const i = zt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
1103
+ const i = Gt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
1098
1104
  [`scope_${n.id}`]: o
1099
1105
  } : {};
1100
1106
  return Object.entries(i).reduce((o, [p, { nodes: c, params: u }]) => (o[p] = (l) => {
1101
- const h = u.length ? Ye(l ?? {}, u) : a(l);
1107
+ const h = u.length ? et(l ?? {}, u) : a(l);
1102
1108
  return c.map(
1103
- (f) => A(f, t.__clone(h), r, s, c)
1109
+ (f) => F(f, t.__clone(h), r, s, c)
1104
1110
  );
1105
1111
  }, o), {});
1106
1112
  }
1107
1113
  return null;
1108
1114
  }
1109
- function zt(r) {
1115
+ function Gt(r) {
1110
1116
  const e = {};
1111
1117
  for (const t of r) {
1112
- const s = Vt(t.slot), n = s.name;
1118
+ const s = Qt(t.slot), n = s.name;
1113
1119
  e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
1114
1120
  nodes: [t],
1115
1121
  params: s.params
@@ -1117,18 +1123,18 @@ function zt(r) {
1117
1123
  }
1118
1124
  return e;
1119
1125
  }
1120
- function Vt(r = "default") {
1126
+ function Qt(r = "default") {
1121
1127
  return P(r) ? { name: r, params: [] } : { params: [], ...r };
1122
1128
  }
1123
- function Wt(r, e, t) {
1129
+ function Yt(r, e, t) {
1124
1130
  const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
1125
1131
  let o = t.__parseExpression(s) || [];
1126
1132
  return Number.isInteger(o) && (o = new Array(o).fill(!0).map((p, c) => c + 1)), Array.isArray(o) ? o.map((p, c) => e(t.__clone({ [i]: p, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1127
1133
  }
1128
- const me = we({
1134
+ const ve = $e({
1129
1135
  name: "VtjPageContainer",
1130
1136
  async setup() {
1131
- const r = De(), e = Se(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = Z(Symbol());
1137
+ const r = He(), e = je(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = Z(Symbol());
1132
1138
  if (s) {
1133
1139
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1134
1140
  const { useTitle: a } = r?.adapter;
@@ -1151,14 +1157,14 @@ const me = we({
1151
1157
  activated() {
1152
1158
  this.meta.cache === !1 && (this.sid = Symbol());
1153
1159
  }
1154
- }), Gt = we({
1160
+ }), Xt = $e({
1155
1161
  name: "VtjStartupContainer",
1156
1162
  render() {
1157
1163
  return X("div", "page not found!");
1158
1164
  }
1159
- }), Me = Symbol("Provider");
1160
- var Qt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Qt || {});
1161
- class Yt extends Ue {
1165
+ }), Te = Symbol("Provider");
1166
+ var Zt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Zt || {});
1167
+ class es extends qe {
1162
1168
  // DSL缓存
1163
1169
  /**
1164
1170
  * 创建Provider实例
@@ -1190,7 +1196,7 @@ class Yt extends Ue {
1190
1196
  // 全局变量
1191
1197
  modules = {};
1192
1198
  // 异步模块加载器
1193
- adapter = { request: Y, jsonp: ye };
1199
+ adapter = { request: Y, jsonp: we };
1194
1200
  // 适配器接口
1195
1201
  apis = {};
1196
1202
  // API集合
@@ -1220,7 +1226,7 @@ class Yt extends Ue {
1220
1226
  try {
1221
1227
  s = await e.apply(e, t);
1222
1228
  } catch (i) {
1223
- k.warn("模拟数据模版异常", i);
1229
+ A.warn("模拟数据模版异常", i);
1224
1230
  }
1225
1231
  return D()?.mock(s);
1226
1232
  };
@@ -1239,7 +1245,7 @@ class Yt extends Ue {
1239
1245
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1240
1246
  throw new Error("project is null");
1241
1247
  const { apis: s = [], meta: n = [] } = this.project, i = window;
1242
- i && (i.CKEDITOR_VERSION = void 0), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = _t(s, n, this.adapter), Ce(i), wt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1248
+ i && (i.CKEDITOR_VERSION = void 0), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = $t(s, n, this.adapter), Ae(i), jt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1243
1249
  }
1244
1250
  initMock(e) {
1245
1251
  const t = D(e);
@@ -1259,7 +1265,7 @@ class Yt extends Ue {
1259
1265
  materials: u,
1260
1266
  materialExports: l,
1261
1267
  materialMapLibrary: h
1262
- } = ot(
1268
+ } = lt(
1263
1269
  t,
1264
1270
  a,
1265
1271
  o === "development"
@@ -1274,24 +1280,24 @@ class Yt extends Ue {
1274
1280
  else {
1275
1281
  const y = c[f] || [];
1276
1282
  for (const g of y)
1277
- q(g) && await ut(f, C.append(g, { v: I })), J(g) && await fe(C.append(g, { v: I }));
1283
+ J(g) && await dt(f, k.append(g, { v: I })), K(g) && await he(k.append(g, { v: I }));
1278
1284
  n[f] = e[f];
1279
1285
  }
1280
1286
  }
1281
1287
  if (o === "development") {
1282
1288
  for (const d of u)
1283
- await fe(C.append(d, { v: I }));
1289
+ await he(k.append(d, { v: I }));
1284
1290
  const f = this.materials || {};
1285
1291
  for (const d of l) {
1286
- const m = e[h[d]], y = Le[d];
1292
+ const m = e[h[d]], y = Je[d];
1287
1293
  if (y)
1288
1294
  m && y.forEach((g) => {
1289
1295
  i[g] = m[g];
1290
1296
  });
1291
1297
  else {
1292
1298
  const g = f[d] ? (await f[d]()).default : e[d];
1293
- g && m && (g.components || []).forEach(($) => {
1294
- i[$.name] = at($, m);
1299
+ g && m && (g.components || []).forEach((j) => {
1300
+ i[j.name] = ut(j, m);
1295
1301
  });
1296
1302
  }
1297
1303
  }
@@ -1307,14 +1313,14 @@ class Yt extends Ue {
1307
1313
  } = s, c = a ? "" : "/", u = {
1308
1314
  path: `${c}${o}/:id`,
1309
1315
  name: M,
1310
- component: me
1316
+ component: ve
1311
1317
  }, l = {
1312
1318
  path: c,
1313
- name: N,
1314
- component: t?.homepage ? me : n.startupComponent || Gt,
1319
+ name: B,
1320
+ component: t?.homepage ? ve : n.startupComponent || Xt,
1315
1321
  meta: p
1316
1322
  };
1317
- e.hasRoute(M) && e.removeRoute(M), e.hasRoute(N) && e.removeRoute(N), a ? (e.addRoute(a, u), e.addRoute(a, l)) : (e.addRoute(u), e.addRoute(l));
1323
+ e.hasRoute(M) && e.removeRoute(M), e.hasRoute(B) && e.removeRoute(B), a ? (e.addRoute(a, u), e.addRoute(a, l)) : (e.addRoute(u), e.addRoute(l));
1318
1324
  }
1319
1325
  /**
1320
1326
  * Vue 插件安装方法
@@ -1329,8 +1335,8 @@ class Yt extends Ue {
1329
1335
  install(e) {
1330
1336
  const t = e.config.globalProperties.installed || {};
1331
1337
  for (const [s, n] of Object.entries(this.library))
1332
- !t[s] && pt(n) && (e.use(n), t[s] = !0);
1333
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Me, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === w.Design && (e.config.errorHandler = (s, n, i) => {
1338
+ !t[s] && ht(n) && (e.use(n), t[s] = !0);
1339
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Te, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === w.Design && (e.config.errorHandler = (s, n, i) => {
1334
1340
  const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", p = `[ ${a} ] ${o} ${i}`;
1335
1341
  console.error(
1336
1342
  "[VTJ Error]:",
@@ -1422,13 +1428,13 @@ class Yt extends Ue {
1422
1428
  async getRenderComponent(e, t) {
1423
1429
  const s = this.getFile(e);
1424
1430
  if (!s)
1425
- return k.warn(`Can not find file: ${e}`), null;
1431
+ return A.warn(`Can not find file: ${e}`), null;
1426
1432
  t && t(s);
1427
1433
  const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
1428
1434
  if (i)
1429
1435
  return (await i())?.default;
1430
1436
  const a = await this.getDsl(s.id);
1431
- return a ? this.createDslRenderer(a).renderer : (k.warn(`Can not find dsl: ${e}`), null);
1437
+ return a ? this.createDslRenderer(a).renderer : (A.warn(`Can not find dsl: ${e}`), null);
1432
1438
  }
1433
1439
  /**
1434
1440
  * 定义基于URL的异步组件
@@ -1440,7 +1446,7 @@ class Yt extends Ue {
1440
1446
  * @returns Vue异步组件
1441
1447
  */
1442
1448
  defineUrlSchemaComponent(e, t) {
1443
- return de(async () => {
1449
+ return me(async () => {
1444
1450
  const s = await this.getDslByUrl(e);
1445
1451
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1446
1452
  });
@@ -1453,18 +1459,18 @@ class Yt extends Ue {
1453
1459
  * @returns Vue异步组件
1454
1460
  */
1455
1461
  definePluginComponent(e) {
1456
- return de(async () => await Ae(e, window));
1462
+ return me(async () => await Ie(e, window));
1457
1463
  }
1458
1464
  }
1459
- function ds(r) {
1460
- const e = new Yt(r);
1465
+ function gs(r) {
1466
+ const e = new es(r);
1461
1467
  return {
1462
1468
  provider: e,
1463
1469
  onReady: (s) => e.ready(s)
1464
1470
  };
1465
1471
  }
1466
- function De(r = {}) {
1467
- const e = _e(Me, null);
1472
+ function He(r = {}) {
1473
+ const e = Se(Te, null);
1468
1474
  if (!e)
1469
1475
  throw new Error("Can not find provider");
1470
1476
  if (e.nodeEnv === "development") {
@@ -1480,21 +1486,21 @@ function De(r = {}) {
1480
1486
  }
1481
1487
  return e;
1482
1488
  }
1483
- async function hs(r, e = "") {
1484
- const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } = ct(n);
1485
- if (i.length && Ee(i), a.length)
1486
- return await be(a, t).catch(
1489
+ async function vs(r, e = "") {
1490
+ const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } = pt(n);
1491
+ if (i.length && Pe(i), a.length)
1492
+ return await Re(a, t).catch(
1487
1493
  () => {
1488
1494
  }
1489
1495
  );
1490
1496
  }
1491
- const Te = {
1497
+ const Oe = {
1492
1498
  type: "json",
1493
1499
  validSuccess: !0,
1494
1500
  originResponse: !1,
1495
1501
  failMessage: !0,
1496
1502
  validate: (r) => r.data?.code === 0
1497
- }, Xt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1503
+ }, ts = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1498
1504
  url: e,
1499
1505
  method: "post",
1500
1506
  params: { type: t },
@@ -1503,8 +1509,8 @@ const Te = {
1503
1509
  type: t,
1504
1510
  data: s
1505
1511
  },
1506
- settings: Te
1507
- }), Zt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1512
+ settings: Oe
1513
+ }), ss = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1508
1514
  url: e,
1509
1515
  method: "post",
1510
1516
  data: {
@@ -1512,12 +1518,12 @@ const Te = {
1512
1518
  projectId: s
1513
1519
  },
1514
1520
  settings: {
1515
- ...Te,
1521
+ ...Oe,
1516
1522
  type: "data"
1517
1523
  }
1518
1524
  }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
1519
- function ms(r) {
1520
- return ve({
1525
+ function ys(r) {
1526
+ return _e({
1521
1527
  settings: {
1522
1528
  type: "json",
1523
1529
  validSuccess: !0,
@@ -1532,7 +1538,7 @@ function ms(r) {
1532
1538
  }
1533
1539
  class oe {
1534
1540
  constructor(e = Y) {
1535
- this.req = e, this.api = Xt(e), this.uploader = Zt(e);
1541
+ this.req = e, this.api = ts(e), this.uploader = ss(e);
1536
1542
  }
1537
1543
  api;
1538
1544
  pluginCaches = {};
@@ -1616,7 +1622,7 @@ class oe {
1616
1622
  return await this.api("clearStaticFiles", e).catch(() => "");
1617
1623
  }
1618
1624
  async getPluginMaterial(e) {
1619
- const { urls: t = [] } = e, s = t.filter((i) => nt(i))[0];
1625
+ const { urls: t = [] } = e, s = t.filter((i) => at(i))[0];
1620
1626
  if (!s) return null;
1621
1627
  const n = this.pluginCaches[s];
1622
1628
  return n || (this.pluginCaches[s] = Y.send({
@@ -1632,18 +1638,18 @@ class oe {
1632
1638
  return console.log("BaseService.genSource", e), "";
1633
1639
  }
1634
1640
  }
1635
- const _ = new Xe({
1641
+ const _ = new tt({
1636
1642
  type: "local",
1637
1643
  expired: 0,
1638
1644
  prefix: "__VTJ_"
1639
1645
  });
1640
- class gs extends oe {
1646
+ class _s extends oe {
1641
1647
  init(e) {
1642
- const t = new B(e), s = _.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1648
+ const t = new U(e), s = _.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1643
1649
  return _.save(`project_${t.id}`, n), Promise.resolve(n);
1644
1650
  }
1645
1651
  saveProject(e) {
1646
- const t = new B(e);
1652
+ const t = new U(e);
1647
1653
  return _.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1648
1654
  }
1649
1655
  saveMaterials(e, t) {
@@ -1671,7 +1677,7 @@ class gs extends oe {
1671
1677
  return Promise.resolve(!0);
1672
1678
  }
1673
1679
  getHistory(e) {
1674
- const t = _.get(`history_${e}`), s = new ge(t || { id: e });
1680
+ const t = _.get(`history_${e}`), s = new ye(t || { id: e });
1675
1681
  return Promise.resolve(s.toDsl());
1676
1682
  }
1677
1683
  getHistoryItem(e, t) {
@@ -1687,18 +1693,18 @@ class gs extends oe {
1687
1693
  }), Promise.resolve(!0);
1688
1694
  }
1689
1695
  }
1690
- class es extends oe {
1696
+ class rs extends oe {
1691
1697
  projects = {};
1692
1698
  materials = {};
1693
1699
  files = {};
1694
1700
  histories = {};
1695
1701
  historyItems = {};
1696
1702
  init(e) {
1697
- const t = new B(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1703
+ const t = new U(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1698
1704
  return this.projects[n.id] = n, Promise.resolve(n);
1699
1705
  }
1700
1706
  saveProject(e) {
1701
- const t = new B(e);
1707
+ const t = new U(e);
1702
1708
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1703
1709
  }
1704
1710
  saveMaterials(e, t) {
@@ -1726,7 +1732,7 @@ class es extends oe {
1726
1732
  return Promise.resolve(!0);
1727
1733
  }
1728
1734
  getHistory(e) {
1729
- const t = this.histories[e], s = new ge(t || { id: e });
1735
+ const t = this.histories[e], s = new ye(t || { id: e });
1730
1736
  return Promise.resolve(s);
1731
1737
  }
1732
1738
  getHistoryItem(e, t) {
@@ -1744,11 +1750,11 @@ class es extends oe {
1744
1750
  }), Promise.resolve(!0);
1745
1751
  }
1746
1752
  }
1747
- let x = null;
1748
- function vs() {
1749
- return x || (x = new es(), x);
1753
+ let N = null;
1754
+ function ws() {
1755
+ return N || (N = new rs(), N);
1750
1756
  }
1751
- class ys extends oe {
1757
+ class Ss extends oe {
1752
1758
  getFileCaches = {};
1753
1759
  async getExtension() {
1754
1760
  return await this.api("getExtension", {}).catch(() => {
@@ -1805,7 +1811,7 @@ class ys extends oe {
1805
1811
  );
1806
1812
  }
1807
1813
  }
1808
- function He(r, e, t = []) {
1814
+ function xe(r, e, t = []) {
1809
1815
  return t.map((s) => {
1810
1816
  const { id: n, title: i, icon: a, children: o, hidden: p } = s;
1811
1817
  return {
@@ -1814,39 +1820,39 @@ function He(r, e, t = []) {
1814
1820
  icon: a,
1815
1821
  hidden: p,
1816
1822
  url: `${r}/${e}/${n}`,
1817
- children: o && o.length ? He(r, e, o) : void 0
1823
+ children: o && o.length ? xe(r, e, o) : void 0
1818
1824
  };
1819
1825
  });
1820
1826
  }
1821
- function Oe(r, e) {
1827
+ function Ne(r, e) {
1822
1828
  if (!e) return r;
1823
1829
  let t = [];
1824
1830
  for (const s of r)
1825
1831
  if (s.children && s.children.length) {
1826
- const n = Oe(s.children, e);
1832
+ const n = Ne(s.children, e);
1827
1833
  n.length && (s.children = n, t.push(s));
1828
1834
  } else
1829
1835
  e.can(s.id.toString()) && t.push(s);
1830
1836
  return t;
1831
1837
  }
1832
- function _s(r) {
1838
+ function $s(r) {
1833
1839
  const {
1834
1840
  menuPathPrefix: e = "",
1835
1841
  pageRouteName: t = "page",
1836
1842
  disableMenusFilter: s = !1
1837
- } = r || {}, n = De(), i = Se(), a = gt(), o = Z(!1), p = Z(!1), c = n.project;
1838
- Ze(() => {
1843
+ } = r || {}, n = He(), i = je(), a = _t(), o = Z(!1), p = Z(!1), c = n.project;
1844
+ st(() => {
1839
1845
  const { name: h, params: f, meta: d } = i;
1840
1846
  if (h === M) {
1841
1847
  const m = n.getPage(f.id);
1842
1848
  o.value = !m?.mask, p.value = !!m?.pure;
1843
- } else if (h === N) {
1849
+ } else if (h === B) {
1844
1850
  const m = n.getHomepage();
1845
1851
  o.value = !m?.mask, p.value = !!m?.pure;
1846
1852
  } else
1847
1853
  o.value = !d.mask, p.value = !!d.pure;
1848
1854
  });
1849
- const u = He(
1855
+ const u = xe(
1850
1856
  e,
1851
1857
  t,
1852
1858
  c?.pages
@@ -1856,80 +1862,80 @@ function _s(r) {
1856
1862
  logo: l?.logo,
1857
1863
  themeSwitchable: l?.themeSwitchable,
1858
1864
  title: l?.title || c?.description || c?.name || "VTJ App",
1859
- menus: s ? u : Oe(u, a),
1865
+ menus: s ? u : Ne(u, a),
1860
1866
  pure: p
1861
1867
  };
1862
1868
  }
1863
1869
  export {
1864
- Pe as ACCESS_KEY,
1865
- Re as Access,
1866
- rt as BUILD_IN_TAGS,
1867
- et as BUILT_IN_DIRECTIVES,
1870
+ Ce as ACCESS_KEY,
1871
+ ke as Access,
1872
+ ot as BUILD_IN_TAGS,
1873
+ rt as BUILT_IN_DIRECTIVES,
1868
1874
  oe as BaseService,
1869
- he as CONTEXT_HOST,
1870
- jt as Context,
1875
+ ge as CONTEXT_HOST,
1876
+ Pt as Context,
1871
1877
  w as ContextMode,
1872
- tt as DATA_TYPES,
1873
- N as HOMEPAGE_ROUTE_NAME,
1874
- st as HTML_TAGS,
1875
- ls as JSCodeToString,
1876
- is as LIFE_CYCLES_LIST,
1877
- ys as LocalService,
1878
- es as MemoryService,
1879
- Qt as NodeEnv,
1878
+ nt as DATA_TYPES,
1879
+ B as HOMEPAGE_ROUTE_NAME,
1880
+ it as HTML_TAGS,
1881
+ fs as JSCodeToString,
1882
+ cs as LIFE_CYCLES_LIST,
1883
+ Ss as LocalService,
1884
+ rs as MemoryService,
1885
+ Zt as NodeEnv,
1880
1886
  M as PAGE_ROUTE_NAME,
1881
- Yt as Provider,
1882
- gs as StorageService,
1887
+ es as Provider,
1888
+ _s as StorageService,
1883
1889
  I as VTJ_RENDERER_VERSION,
1884
- je as adoptedStyleSheets,
1885
- fs as clearLoaderCache,
1886
- lt as compileScopedCSS,
1887
- ps as createAccess,
1888
- us as createAdapter,
1889
- os as createAssetScripts,
1890
- as as createAssetsCss,
1891
- At as createDataSources,
1890
+ Ee as adoptedStyleSheets,
1891
+ ms as clearLoaderCache,
1892
+ ft as compileScopedCSS,
1893
+ hs as createAccess,
1894
+ ds as createAdapter,
1895
+ ls as createAssetScripts,
1896
+ us as createAssetsCss,
1897
+ Mt as createDataSources,
1892
1898
  se as createLoader,
1893
- vs as createMemoryService,
1894
- yt as createMetaApi,
1895
- St as createMock,
1896
- ds as createProvider,
1899
+ ws as createMemoryService,
1900
+ St as createMetaApi,
1901
+ bt as createMock,
1902
+ gs as createProvider,
1897
1903
  te as createRenderer,
1898
- vt as createSchemaApi,
1899
- _t as createSchemaApis,
1900
- ms as createServiceRequest,
1901
- Mt as defaultLoader,
1902
- O as fillBasePath,
1904
+ wt as createSchemaApi,
1905
+ $t as createSchemaApis,
1906
+ ys as createServiceRequest,
1907
+ Ht as defaultLoader,
1908
+ x as fillBasePath,
1903
1909
  D as getMock,
1904
- Ie as getModifiers,
1905
- Ae as getPlugin,
1906
- at as getRawComponent,
1907
- ft as isBuiltInTag,
1908
- q as isCSSUrl,
1909
- ht as isJSCode,
1910
- S as isJSExpression,
1910
+ De as getModifiers,
1911
+ Ie as getPlugin,
1912
+ ut as getRawComponent,
1913
+ mt as isBuiltInTag,
1914
+ J as isCSSUrl,
1915
+ vt as isJSCode,
1916
+ $ as isJSExpression,
1911
1917
  H as isJSFunction,
1912
- nt as isJSON,
1913
- J as isJSUrl,
1914
- dt as isNativeTag,
1915
- pt as isVuePlugin,
1916
- ut as loadCss,
1917
- Ee as loadCssUrl,
1918
- hs as loadEnhance,
1919
- be as loadScriptUrl,
1920
- $t as mockApi,
1921
- wt as mockApis,
1922
- Ce as mockCleanup,
1923
- A as nodeRender,
1924
- ot as parseDeps,
1918
+ at as isJSON,
1919
+ K as isJSUrl,
1920
+ gt as isNativeTag,
1921
+ ht as isVuePlugin,
1922
+ dt as loadCss,
1923
+ Pe as loadCssUrl,
1924
+ vs as loadEnhance,
1925
+ Re as loadScriptUrl,
1926
+ Et as mockApi,
1927
+ jt as mockApis,
1928
+ Ae as mockCleanup,
1929
+ F as nodeRender,
1930
+ lt as parseDeps,
1925
1931
  T as parseExpression,
1926
1932
  ee as parseFunction,
1927
- ct as parseUrls,
1928
- Me as providerKey,
1929
- it as removeProdFlag,
1930
- cs as setupPageSetting,
1931
- $e as toString,
1932
- gt as useAccess,
1933
- _s as useMask,
1934
- De as useProvider
1933
+ pt as parseUrls,
1934
+ Te as providerKey,
1935
+ ct as removeProdFlag,
1936
+ ps as setupPageSetting,
1937
+ be as toString,
1938
+ _t as useAccess,
1939
+ $s as useMask,
1940
+ He as useProvider
1935
1941
  };