@vtj/renderer 0.12.27 → 0.12.29

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,17 +1,17 @@
1
- import { Base as xe, BUILT_IN_COMPONENTS as Oe, ProjectModel as N, HistoryModel as pe } from "@vtj/core";
2
- import { isUrl as Ne, url as C, dedupArray as Be, isString as E, isFunction as V, logger as k, storage as J, cookie as K, toArray as re, unRSA as ie, delay as de, createRequest as fe, jsonp as he, merge as Ue, pathToRegexp as Le, pathToRegexpMatch as qe, formDataToJson as Je, cloneDeep as oe, camelCase as j, upperFirst as Ke, pick as ze, request as W, loadScript as ae, Storage as Ve, mapToObject as te } from "@vtj/utils";
3
- import * as B from "vue";
4
- import { inject as me, defineComponent as ve, h as G, ref as Y, defineAsyncComponent as ce, watchEffect as We } from "vue";
5
- import { useRoute as ge } from "vue-router";
1
+ import { Base as Oe, BUILT_IN_COMPONENTS as xe, ProjectModel as N, HistoryModel as pe } from "@vtj/core";
2
+ import { isUrl as Ne, url as C, dedupArray as Ue, isString as R, isFunction as V, logger as A, storage as J, cookie as K, toArray as re, unRSA as ie, delay as de, createRequest as fe, jsonp as he, merge as Be, pathToRegexp as Le, pathToRegexpMatch as qe, formDataToJson as Je, cloneDeep as oe, camelCase as j, upperFirst as Ke, pick as ze, request as W, loadScript as ae, Storage as Ve, mapToObject as te } from "@vtj/utils";
3
+ import * as U from "vue";
4
+ import { inject as me, defineComponent as ge, h as G, ref as Y, defineAsyncComponent as ce, watchEffect as We } from "vue";
5
+ import { useRoute as ve } 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.27
10
+ * @version 0.12.29
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const A = "0.12.27";
14
- var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
13
+ const F = "0.12.29";
14
+ var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
15
15
  const le = [
16
16
  "$el",
17
17
  "$emit",
@@ -55,13 +55,13 @@ const le = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, I = "VtjPage", O = "VtjHomepage", Qe = "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(
58
+ }, M = "VtjPage", x = "VtjHomepage", Qe = "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(
59
59
  ","
60
60
  ), Xe = "component,slot".split(",");
61
61
  function D(n, e) {
62
62
  return n.map((t) => Ne(t) || t.startsWith("/") ? t : `${e}${t}`);
63
63
  }
64
- function U(n) {
64
+ function B(n) {
65
65
  return /\.css$/.test(n);
66
66
  }
67
67
  function L(n) {
@@ -72,31 +72,31 @@ function Ze(n) {
72
72
  }
73
73
  function ts(n) {
74
74
  return n.map(
75
- (e) => `<script src="${C.append(e, { v: A })}"><\/script>`
75
+ (e) => `<script src="${C.append(e, { v: F })}"><\/script>`
76
76
  ).join("");
77
77
  }
78
78
  function ss(n = []) {
79
79
  return n.map(
80
- (e) => `<link rel="stylesheet" href="${C.append(e, { v: A })}" />`
80
+ (e) => `<link rel="stylesheet" href="${C.append(e, { v: F })}" />`
81
81
  ).join("");
82
82
  }
83
83
  function et(n, e = !1) {
84
84
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
85
85
  }
86
86
  function tt(n, e, t = !1) {
87
- const s = n.filter((m) => !!m.enabled), r = [], i = [], a = [], o = [], c = {}, l = {}, u = [], p = {};
87
+ const s = n.filter((h) => !!h.enabled), r = [], i = [], a = [], o = [], c = {}, l = {}, u = [], p = {};
88
88
  return s.forEach(
89
- ({ urls: m, assetsUrl: f, library: d, assetsLibrary: h, localeLibrary: _ }) => {
90
- m?.forEach((v) => {
91
- L(v) && r.push(et(v, t)), U(v) && i.push(v);
92
- }), d && (o.push(d), c[d] = D(m || [], e), _ && (l[d] = _)), f && a.push(f), h && u.push(h), d && h && (p[h] = d);
89
+ ({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: v }) => {
90
+ h?.forEach((g) => {
91
+ L(g) && r.push(et(g, t)), B(g) && i.push(g);
92
+ }), d && (o.push(d), c[d] = D(h || [], e), v && (l[d] = v)), f && a.push(f), m && u.push(m), d && m && (p[m] = d);
93
93
  }
94
94
  ), {
95
95
  scripts: D(r, e),
96
96
  css: D(i, e),
97
97
  materials: D(a, e),
98
98
  libraryExports: o,
99
- materialExports: Be(u),
99
+ materialExports: Ue(u),
100
100
  materialMapLibrary: p,
101
101
  libraryMap: c,
102
102
  libraryLocaleMap: l
@@ -107,20 +107,46 @@ function st(n, e) {
107
107
  return s ? e[s]?.[r || t] : e[r || t];
108
108
  }
109
109
  function nt(n = []) {
110
- const e = n.filter((s) => U(s)), t = n.filter((s) => L(s));
110
+ const e = n.filter((s) => B(s)), t = n.filter((s) => L(s));
111
111
  return {
112
112
  css: e,
113
113
  js: t
114
114
  };
115
115
  }
116
- function ye(n) {
117
- return E(n) ? n : JSON.stringify(n);
118
- }
119
116
  function rt(n, e) {
120
- return n.replace(/::v-deep\(/g, ":deep(").replace(/(\s*)>>>(\s*)/g, "$1:deep($2)").replace(
117
+ const t = /(@(keyframes|media)\s*([^{]*)){([\s\S]*?}\s*})/g, s = [];
118
+ let o = n.replace(
119
+ t,
120
+ (c, l, u, p, h) => (s.push({ type: u, name: p.trim(), conditions: p, content: h }), "/* AT_RULE_PLACEHOLDER */")
121
+ ).replace(/::v-deep\(/g, ":deep(").replace(/(\s*)>>>(\s*)/g, "$1:deep($2)").replace(
121
122
  /([\w-.:\s[\]>+~]+?):deep\(([^)]+)\)/g,
122
- (s, r, i) => `${r.replace(/(\s*)$/, `[${e}]$1`)} ${i}`
123
- ).replace(/([^{}]+)(?=\s*{)/g, (s) => s.split(",").map((r) => r.includes(`[${e}]`) ? r.trim() : r.trim().replace(/(.*?)([^\s>+~]+)$/, `$1$2[${e}]`)).join(", "));
123
+ (c, l, u) => `${l.replace(/(\s*)$/, `[${e}]$1`)} ${u}`
124
+ ).replace(/([^{}]+)(?=\s*{)/g, (c) => c.split(",").map((l) => {
125
+ const u = l.trim();
126
+ return u.includes(`[${e}]`) ? u : u.replace(
127
+ /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
128
+ (p, h, f, d) => `${h}[${e}]${f}${d}`
129
+ );
130
+ }).join(", "));
131
+ return s.forEach(({ type: c, conditions: l, content: u }) => {
132
+ let p = u;
133
+ c === "media" && (p = p.replace(
134
+ /([^{}]+)(?=\s*{)/g,
135
+ (h) => h.split(",").map((f) => {
136
+ const d = f.trim();
137
+ return d.includes(`[${e}]`) ? d : d.replace(
138
+ /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
139
+ (m, v, g, E) => `${v}[${e}]${g}${E}`
140
+ );
141
+ }).join(", ")
142
+ )), o = o.replace(
143
+ "/* AT_RULE_PLACEHOLDER */",
144
+ `@${c} ${l}{${p}}`
145
+ );
146
+ }), o.replace(/}}/g, "}");
147
+ }
148
+ function ye(n) {
149
+ return R(n) ? n : JSON.stringify(n);
124
150
  }
125
151
  function _e(n, e, t, s = !1) {
126
152
  const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? rt(t, i) : t;
@@ -172,7 +198,7 @@ function at(n) {
172
198
  function ct(n) {
173
199
  return Qe.includes(n);
174
200
  }
175
- function M(n = window) {
201
+ function I(n = window) {
176
202
  const e = window?.Mock;
177
203
  if (e) return e;
178
204
  const t = n?.Mock;
@@ -194,13 +220,13 @@ function H(n, e, t = !1, s = !1) {
194
220
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
195
221
  return new Function("$scope", a)(e);
196
222
  } catch (r) {
197
- if (k.error("parseExpression.error", r, n, e?.__self ?? e), s)
223
+ if (A.error("parseExpression.error", r, n, e?.__self ?? e), s)
198
224
  throw r;
199
225
  }
200
226
  }
201
227
  function Q(n, e, t = !1, s = !1) {
202
228
  const r = H(n, e, t, s);
203
- if (typeof r != "function" && (k.error(
229
+ if (typeof r != "function" && (A.error(
204
230
  "parseFunction.error",
205
231
  "not a function",
206
232
  n,
@@ -235,10 +261,10 @@ const ut = {
235
261
  appName: "",
236
262
  statusKey: "code"
237
263
  }, $e = Symbol("access");
238
- class je {
264
+ class Ee {
239
265
  options;
240
266
  data = null;
241
- mode = y.Raw;
267
+ mode = _.Raw;
242
268
  interceptResponse = !0;
243
269
  constructor(e) {
244
270
  this.options = Object.assign({}, ut, e), this.loadData();
@@ -251,7 +277,7 @@ class je {
251
277
  }
252
278
  connect(e) {
253
279
  const { mode: t, router: s, request: r } = e;
254
- this.mode = t, s && this.mode === y.Raw && this.setGuard(s), r && this.setRequest(r);
280
+ this.mode = t, s && this.mode === _.Raw && this.setGuard(s), r && this.setRequest(r);
255
281
  }
256
282
  login(e) {
257
283
  const { storageKey: t, storagePrefix: s, session: r, authKey: i } = this.options;
@@ -336,7 +362,7 @@ class je {
336
362
  return e && t ? !!K.get(t) : !!this.getToken();
337
363
  }
338
364
  hasRoutePermission(e) {
339
- if (e.name === I) {
365
+ if (e.name === M) {
340
366
  const t = e.params.id;
341
367
  return t && this.can(t);
342
368
  }
@@ -353,7 +379,7 @@ class je {
353
379
  return t();
354
380
  {
355
381
  const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
356
- return await this.showTip(s), V(r) ? (r(), t(!1)) : E(r) ? t(r) : t(!1);
382
+ return await this.showTip(s), V(r) ? (r(), t(!1)) : R(r) ? t(r) : t(!1);
357
383
  }
358
384
  }
359
385
  t(!1), this.toLogin();
@@ -428,11 +454,11 @@ function is(n = {}) {
428
454
  loading: t,
429
455
  useTitle: a,
430
456
  startupComponent: r,
431
- access: i ? new je({ alert: o, ...i }) : void 0
457
+ access: i ? new Ee({ alert: o, ...i }) : void 0
432
458
  };
433
459
  }
434
460
  function os(n = {}) {
435
- return new je(n);
461
+ return new Ee(n);
436
462
  }
437
463
  function dt(n, e) {
438
464
  const { jsonp: t, request: s } = e;
@@ -450,7 +476,7 @@ function dt(n, e) {
450
476
  headers: r
451
477
  }
452
478
  };
453
- return (a, o) => (delete i.data, s.send(Ue(i, o || {}, { data: a })));
479
+ return (a, o) => (delete i.data, s.send(Be(i, o || {}, { data: a })));
454
480
  }
455
481
  }
456
482
  function ft(n, e) {
@@ -474,23 +500,23 @@ function ht(n = [], e = [], t) {
474
500
  return s;
475
501
  }
476
502
  async function mt(n = [], e = window) {
477
- const t = M(e);
478
- t && (Ee(e), n.forEach((s) => gt(t, s)));
503
+ const t = I(e);
504
+ t && (je(e), n.forEach((s) => vt(t, s)));
479
505
  }
480
- function vt(n, e = window) {
481
- const t = T(n.mockTemplate) && n.mockTemplate.value ? Q(n.mockTemplate, {}, !0) : void 0, s = M(e);
506
+ function gt(n, e = window) {
507
+ const t = T(n.mockTemplate) && n.mockTemplate.value ? Q(n.mockTemplate, {}, !0) : void 0, s = I(e);
482
508
  return async (...r) => {
483
509
  let i = {};
484
510
  if (t)
485
511
  try {
486
512
  i = await t.apply(t, r);
487
513
  } catch (a) {
488
- k.warn("模拟数据模版异常", a);
514
+ A.warn("模拟数据模版异常", a);
489
515
  }
490
516
  return s?.mock(i);
491
517
  };
492
518
  }
493
- function gt(n, e) {
519
+ function vt(n, e) {
494
520
  if (!e.mock) return;
495
521
  const { url: t, mockTemplate: s } = e;
496
522
  if (t && s) {
@@ -501,8 +527,8 @@ function gt(n, e) {
501
527
  });
502
528
  }
503
529
  }
504
- function Ee(n = window) {
505
- const e = M(n);
530
+ function je(n = window) {
531
+ const e = I(n);
506
532
  e && (e._mocked = {});
507
533
  }
508
534
  class yt {
@@ -534,7 +560,7 @@ class yt {
534
560
  const { mode: t, dsl: s, attrs: r } = e;
535
561
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
536
562
  }
537
- setup(e, t = B) {
563
+ setup(e, t = U) {
538
564
  const s = t.getCurrentInstance();
539
565
  if (!s) return;
540
566
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -562,7 +588,7 @@ class yt {
562
588
  }
563
589
  __parseFunction(e) {
564
590
  if (e)
565
- if (this.__mode === y.Runtime) {
591
+ if (this.__mode === _.Runtime) {
566
592
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
567
593
  return Q({ type: s, value: r }, this);
568
594
  } else
@@ -570,14 +596,14 @@ class yt {
570
596
  }
571
597
  __parseExpression(e) {
572
598
  if (e)
573
- if (this.__mode === y.Runtime) {
599
+ if (this.__mode === _.Runtime) {
574
600
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
575
601
  return H({ type: s, value: r }, this);
576
602
  } else
577
603
  return H(e, this);
578
604
  }
579
605
  __ref(e = null, t) {
580
- if (this.__mode !== y.VNode)
606
+ if (this.__mode !== _.VNode)
581
607
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
582
608
  await de(0);
583
609
  let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
@@ -585,7 +611,7 @@ class yt {
585
611
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
586
612
  return;
587
613
  }
588
- return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, y.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
614
+ return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
589
615
  };
590
616
  }
591
617
  __getRefEl(e, t, s) {
@@ -606,8 +632,8 @@ class yt {
606
632
  }
607
633
  function X(n) {
608
634
  const {
609
- Vue: e = B,
610
- mode: t = y.Runtime,
635
+ Vue: e = U,
636
+ mode: t = _.Runtime,
611
637
  components: s = {},
612
638
  libs: r = {},
613
639
  apis: i = {},
@@ -633,19 +659,19 @@ function X(n) {
633
659
  o.value.css || "",
634
660
  !0
635
661
  ), l.state = St(e, o.value.state ?? {}, l);
636
- const m = $t(e, o.value.computed ?? {}, l), f = jt(o.value.methods ?? {}, l), d = Et(e, o.value.inject, l);
637
- for (const [v, P] of Object.entries(d || {}))
638
- d[v] = e.inject(v, P);
639
- const h = Pt(
662
+ const h = $t(e, o.value.computed ?? {}, l), f = Et(o.value.methods ?? {}, l), d = jt(e, o.value.inject, l);
663
+ for (const [g, E] of Object.entries(d || {}))
664
+ d[g] = e.inject(g, E);
665
+ const m = Rt(
640
666
  o.value.dataSources || {},
641
667
  l
642
- ), _ = {
668
+ ), v = {
643
669
  ...d,
644
- ...m,
670
+ ...h,
645
671
  ...f,
646
- ...h
672
+ ...m
647
673
  };
648
- return l.setup(_, e), Rt(e, o.value.watch ?? [], l), {
674
+ return l.setup(v, e), Pt(e, o.value.watch ?? [], l), {
649
675
  vtj: l
650
676
  };
651
677
  },
@@ -654,8 +680,8 @@ function X(n) {
654
680
  render() {
655
681
  if (!o.value.nodes) return null;
656
682
  const p = o.value.nodes || [];
657
- return p.length === 1 ? F(p[0], l, e, a, p) : p.map(
658
- (m) => F(m, l, e, a, p)
683
+ return p.length === 1 ? k(p[0], l, e, a, p) : p.map(
684
+ (h) => k(h, l, e, a, p)
659
685
  );
660
686
  },
661
687
  ...bt(o.value.lifeCycles ?? {}, l)
@@ -666,11 +692,11 @@ function X(n) {
666
692
  };
667
693
  }
668
694
  function _t(n = []) {
669
- return n.map((e) => E(e) ? e : e.name);
695
+ return n.map((e) => R(e) ? e : e.name);
670
696
  }
671
697
  function wt(n = [], e) {
672
698
  const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ye[i]) : void 0;
673
- return n.map((s) => E(s) ? {
699
+ return n.map((s) => R(s) ? {
674
700
  name: s
675
701
  } : {
676
702
  name: s.name,
@@ -703,13 +729,13 @@ function $t(n, e, t) {
703
729
  {}
704
730
  );
705
731
  }
706
- function jt(n, e) {
732
+ function Et(n, e) {
707
733
  return Object.entries(n ?? {}).reduce(
708
734
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
709
735
  {}
710
736
  );
711
737
  }
712
- function Et(n, e = [], t) {
738
+ function jt(n, e = [], t) {
713
739
  return e.reduce(
714
740
  (s, r) => {
715
741
  const { name: i, from: a } = r || {};
@@ -720,12 +746,12 @@ function Et(n, e = [], t) {
720
746
  {}
721
747
  );
722
748
  }
723
- function Pt(n, e) {
749
+ function Rt(n, e) {
724
750
  return Object.keys(n).reduce(
725
751
  (t, s) => {
726
752
  const r = n[s];
727
753
  if (r.type === "mock")
728
- t[s] = vt(r);
754
+ t[s] = gt(r);
729
755
  else if (r.ref) {
730
756
  const i = e.$apis[r.ref], a = T(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
731
757
  t[s] = async (...o) => {
@@ -738,7 +764,7 @@ function Pt(n, e) {
738
764
  {}
739
765
  );
740
766
  }
741
- function Rt(n, e = [], t) {
767
+ function Pt(n, e = [], t) {
742
768
  e.forEach((s) => {
743
769
  n.watch(
744
770
  t.__parseExpression(s.source),
@@ -758,10 +784,10 @@ function bt(n, e) {
758
784
  }
759
785
  let z = [], b = {};
760
786
  const Ct = (n) => n;
761
- async function Pe(n, e = window) {
787
+ async function Re(n, e = window) {
762
788
  const { urls: t = [], library: s } = n, r = t.filter((o) => L(o));
763
789
  if (r.length === 0 || !s) return null;
764
- const i = t.filter((o) => U(o));
790
+ const i = t.filter((o) => B(o));
765
791
  return i.length && we(i, e), await Se(r, s, e).catch(
766
792
  (o) => (console.warn("loadScriptUrl error", r, s, o), null)
767
793
  );
@@ -770,7 +796,7 @@ function Z(n) {
770
796
  const { getDsl: e, getDslByUrl: t, options: s } = n;
771
797
  return s.window && (z.forEach((r) => {
772
798
  delete s.window[r];
773
- }), z = []), (r, i, a = B) => {
799
+ }), z = []), (r, i, a = U) => {
774
800
  if (!i || typeof i == "string") return r;
775
801
  if (i.type === "Schema" && i.id)
776
802
  return a.defineAsyncComponent(async () => {
@@ -779,7 +805,7 @@ function Z(n) {
779
805
  ...s,
780
806
  Vue: a,
781
807
  dsl: oe(o),
782
- mode: y.Runtime,
808
+ mode: _.Runtime,
783
809
  loader: Z(n)
784
810
  }).renderer : null;
785
811
  });
@@ -790,7 +816,7 @@ function Z(n) {
790
816
  ...s,
791
817
  Vue: a,
792
818
  dsl: oe(o),
793
- mode: y.Runtime,
819
+ mode: _.Runtime,
794
820
  loader: Z(n)
795
821
  }).renderer : null;
796
822
  });
@@ -798,7 +824,7 @@ function Z(n) {
798
824
  let o = i.library ? b[i.library] : null;
799
825
  return o || (i.library && z.push(i.library), o = b[i.library || Symbol()] = a.defineAsyncComponent(
800
826
  async () => {
801
- const c = await Pe(i, s.window);
827
+ const c = await Re(i, s.window);
802
828
  return c || (console.warn("getPlugin result is null", i), null);
803
829
  }
804
830
  ), o);
@@ -809,43 +835,43 @@ function Z(n) {
809
835
  function as() {
810
836
  b = {};
811
837
  }
812
- function F(n, e, t = B, s = Ct, r = [], i = !1) {
838
+ function k(n, e, t = U, s = Ct, r = [], i = !1) {
813
839
  if (!n || !n.name || n.invisible) return null;
814
- const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: c = [] } = n, { vIf: l, vElseIf: u, vElse: p, vFor: m, vShow: f, vModels: d, vBind: h, vHtml: _, others: v } = Re(c);
840
+ const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: c = [] } = n, { vIf: l, vElseIf: u, vElse: p, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: v, others: g } = Pe(c);
815
841
  if (!i && (u || p))
816
842
  return null;
817
- if (l && !Ft(l, e))
843
+ if (l && !kt(l, e))
818
844
  return Ht(n, e, t, s, r);
819
- const P = (S) => {
820
- const Me = S.$components, He = (() => {
845
+ const E = (S) => {
846
+ const Ie = S.$components, He = (() => {
821
847
  if (n.name === "component")
822
- return At(S, n.props?.is);
848
+ return Ft(S, n.props?.is);
823
849
  if (n.name === "slot") return n.name;
824
850
  const $ = s(n.name, n.from, t);
825
- return E($) ? at($) || ct($) ? $ : Me[$] ?? a?.app?.component($) ?? $ : $;
826
- })(), R = It(o, n.props ?? {}, S), Te = Mt(t, n.events ?? {}, S);
851
+ return R($) ? at($) || ct($) ? $ : Ie[$] ?? a?.app?.component($) ?? $ : $;
852
+ })(), P = Mt(o, n.props ?? {}, S), Te = It(t, n.events ?? {}, S);
827
853
  if (n.name === "slot")
828
- return Tt(t, n, R, S, s);
829
- h && Object.assign(R, S.__parseExpression(h.value)), f && (R.style = Object.assign(
830
- R.style ?? {},
831
- xt(f, S)
832
- )), _ && Object.assign(R, Ot(_, S)), d.forEach(($) => {
833
- Object.assign(R, Nt(t, $, S));
854
+ return Tt(t, n, P, S, s);
855
+ m && Object.assign(P, S.__parseExpression(m.value)), f && (P.style = Object.assign(
856
+ P.style ?? {},
857
+ Ot(f, S)
858
+ )), v && Object.assign(P, xt(v, S)), d.forEach(($) => {
859
+ Object.assign(P, Nt(t, $, S));
834
860
  });
835
- const De = Bt(
861
+ const De = Ut(
836
862
  t,
837
863
  n.children ?? [],
838
864
  S,
839
865
  s,
840
866
  n
841
867
  );
842
- let q = t.createVNode(He, { ...R, ...Te }, De);
843
- const ne = a ? kt(a, v, S) : [];
868
+ let q = t.createVNode(He, { ...P, ...Te }, De);
869
+ const ne = a ? At(a, g, S) : [];
844
870
  return ne.length && (q = t.withDirectives(q, ne)), q;
845
871
  };
846
- return m ? qt(m, P, e) : P(e);
872
+ return h ? qt(h, E, e) : E(e);
847
873
  }
848
- function kt(n, e, t) {
874
+ function At(n, e, t) {
849
875
  const s = n.app;
850
876
  return e.map((r) => {
851
877
  const i = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
@@ -854,7 +880,7 @@ function kt(n, e, t) {
854
880
  return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
855
881
  }).filter((r) => !!r);
856
882
  }
857
- function Re(n = []) {
883
+ function Pe(n = []) {
858
884
  const e = n.find((u) => j(u.name) === "vIf"), t = n.find(
859
885
  (u) => j(u.name) === "vElseIf"
860
886
  ), s = n.find((u) => j(u.name) === "vElse"), r = n.find((u) => j(u.name) === "vFor"), i = n.find((u) => j(u.name) === "vShow"), a = n.find((u) => j(u.name) === "vBind"), o = n.find((u) => j(u.name) === "vHtml"), c = n.filter(
@@ -874,13 +900,13 @@ function Re(n = []) {
874
900
  vHtml: o
875
901
  };
876
902
  }
877
- function Ft(n, e) {
903
+ function kt(n, e) {
878
904
  return !!e.__parseExpression(n.value);
879
905
  }
880
- function At(n, e) {
906
+ function Ft(n, e) {
881
907
  return e ? w(e) ? n.__parseExpression(e) : e : "div";
882
908
  }
883
- function It(n, e, t) {
909
+ function Mt(n, e, t) {
884
910
  const s = ee(e, t);
885
911
  return s.ref = t.__ref(n, s.ref), s;
886
912
  }
@@ -893,7 +919,7 @@ function ee(n, e) {
893
919
  {}
894
920
  ) : n;
895
921
  }
896
- function Mt(n, e, t) {
922
+ function It(n, e, t) {
897
923
  const s = ["passive", "capture", "once"], r = {
898
924
  capture: "Capture",
899
925
  once: "Once",
@@ -901,7 +927,7 @@ function Mt(n, e, t) {
901
927
  };
902
928
  return Object.keys(e || {}).reduce(
903
929
  (i, a) => {
904
- const o = e[a], c = be(o.modifiers), l = c.find((m) => s.includes(m)), u = "on" + Ke(a) + (l && r[l] || ""), p = t.__parseFunction(o.handler);
930
+ const o = e[a], c = be(o.modifiers), l = c.find((h) => s.includes(h)), u = "on" + Ke(a) + (l && r[l] || ""), p = t.__parseFunction(o.handler);
905
931
  return p && (i[u] = n.withModifiers(p, c)), i;
906
932
  },
907
933
  {}
@@ -910,14 +936,14 @@ function Mt(n, e, t) {
910
936
  function Ht(n, e, t, s, r = []) {
911
937
  let i = r.findIndex((a) => a.id === n.id);
912
938
  for (let a = ++i; a < r.length; a++) {
913
- const { directives: o = [] } = r[a], { vElseIf: c, vElse: l } = Re(o);
939
+ const { directives: o = [] } = r[a], { vElseIf: c, vElse: l } = Pe(o);
914
940
  if (c) {
915
941
  if (e.__parseExpression(c.value))
916
- return F(r[a], e, t, s, r, !0);
942
+ return k(r[a], e, t, s, r, !0);
917
943
  continue;
918
944
  }
919
945
  if (l)
920
- return F(r[a], e, t, s, r, !0);
946
+ return k(r[a], e, t, s, r, !0);
921
947
  }
922
948
  return null;
923
949
  }
@@ -927,10 +953,10 @@ function be(n = {}, e = !1) {
927
953
  }
928
954
  function Tt(n, e, t, s, r) {
929
955
  const { children: i } = e, a = Dt(e, s), o = s.$slots?.[a.name];
930
- return o ? o(t) : i ? E(i) ? n.createTextVNode(i) : w(i) ? n.createTextVNode(
956
+ return o ? o(t) : i ? R(i) ? n.createTextVNode(i) : w(i) ? n.createTextVNode(
931
957
  ye(s.__parseExpression(i))
932
958
  ) : Array.isArray(i) ? i.map(
933
- (c) => F(c, s, n, r, i)
959
+ (c) => k(c, s, n, r, i)
934
960
  ) : null : null;
935
961
  }
936
962
  function Dt(n, e) {
@@ -940,12 +966,12 @@ function Dt(n, e) {
940
966
  params: []
941
967
  };
942
968
  }
943
- function xt(n, e) {
969
+ function Ot(n, e) {
944
970
  return e.__parseExpression(n.value) ? {} : {
945
971
  display: "none"
946
972
  };
947
973
  }
948
- function Ot(n, e) {
974
+ function xt(n, e) {
949
975
  return {
950
976
  innerHTML: e.__parseExpression(n.value) || ""
951
977
  };
@@ -964,28 +990,28 @@ function Nt(n, e, t) {
964
990
  [`onUpdate:${a}`]: i.length && r ? n.withModifiers(r, i) : r
965
991
  };
966
992
  }
967
- function Bt(n, e, t, s, r) {
993
+ function Ut(n, e, t, s, r) {
968
994
  if (!e) return null;
969
- if (E(e))
995
+ if (R(e))
970
996
  return { default: () => e };
971
997
  if (w(e))
972
998
  return {
973
999
  default: () => ye(t.__parseExpression(e))
974
1000
  };
975
1001
  if (Array.isArray(e) && e.length > 0) {
976
- const i = Ut(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
1002
+ const i = Bt(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
977
1003
  [`scope_${r.id}`]: o
978
1004
  } : {};
979
1005
  return Object.entries(i).reduce((o, [c, { nodes: l, params: u }]) => (o[c] = (p) => {
980
- const m = u.length ? ze(p ?? {}, u) : a(p);
1006
+ const h = u.length ? ze(p ?? {}, u) : a(p);
981
1007
  return l.map(
982
- (f) => F(f, t.__clone(m), n, s, l)
1008
+ (f) => k(f, t.__clone(h), n, s, l)
983
1009
  );
984
1010
  }, o), {});
985
1011
  }
986
1012
  return null;
987
1013
  }
988
- function Ut(n) {
1014
+ function Bt(n) {
989
1015
  const e = {
990
1016
  default: {
991
1017
  params: [],
@@ -1002,17 +1028,17 @@ function Ut(n) {
1002
1028
  return e;
1003
1029
  }
1004
1030
  function Lt(n = "default") {
1005
- return E(n) ? { name: n, params: [] } : { params: [], ...n };
1031
+ return R(n) ? { name: n, params: [] } : { params: [], ...n };
1006
1032
  }
1007
1033
  function qt(n, e, t) {
1008
1034
  const { value: s, iterator: r } = n, { item: i = "item", index: a = "index" } = r || {};
1009
1035
  let o = t.__parseExpression(s) || [];
1010
1036
  return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1011
1037
  }
1012
- const ue = ve({
1038
+ const ue = ge({
1013
1039
  name: "VtjPageContainer",
1014
1040
  async setup() {
1015
- const n = ke(), e = ge(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, i = Y(Symbol());
1041
+ const n = Ae(), e = ve(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, i = Y(Symbol());
1016
1042
  if (s) {
1017
1043
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1018
1044
  const { useTitle: a } = n?.adapter;
@@ -1035,14 +1061,14 @@ const ue = ve({
1035
1061
  activated() {
1036
1062
  this.meta.cache === !1 && (this.sid = Symbol());
1037
1063
  }
1038
- }), Jt = ve({
1064
+ }), Jt = ge({
1039
1065
  name: "VtjStartupContainer",
1040
1066
  render() {
1041
1067
  return G("div", "page not found!");
1042
1068
  }
1043
1069
  }), Ce = Symbol("Provider");
1044
1070
  var Kt = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(Kt || {});
1045
- class zt extends xe {
1071
+ class zt extends Oe {
1046
1072
  // DSL缓存
1047
1073
  /**
1048
1074
  * 创建Provider实例
@@ -1052,7 +1078,7 @@ class zt extends xe {
1052
1078
  super(), this.options = e;
1053
1079
  const {
1054
1080
  service: t,
1055
- mode: s = y.Raw,
1081
+ mode: s = _.Raw,
1056
1082
  dependencies: r,
1057
1083
  materials: i,
1058
1084
  project: a = {},
@@ -1061,12 +1087,12 @@ class zt extends xe {
1061
1087
  modules: l = {},
1062
1088
  router: u = null,
1063
1089
  materialPath: p = "./",
1064
- nodeEnv: m = "development"
1090
+ nodeEnv: h = "development"
1065
1091
  /* Development */
1066
1092
  } = e;
1067
- this.mode = s, this.modules = l, this.service = t, this.router = u, this.materialPath = p, this.nodeEnv = m, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1093
+ this.mode = s, this.modules = l, this.service = t, this.router = u, this.materialPath = p, this.nodeEnv = h, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1068
1094
  const { access: f, request: d } = this.adapter;
1069
- f && f.connect({ mode: s, router: u, request: d }), a && s !== y.Design ? this.load(a) : this.project = a;
1095
+ f && f.connect({ mode: s, router: u, request: d }), a && s !== _.Design ? this.load(a) : this.project = a;
1070
1096
  }
1071
1097
  mode;
1072
1098
  // 当前运行模式(设计/源码/预览等)
@@ -1104,9 +1130,9 @@ class zt extends xe {
1104
1130
  try {
1105
1131
  s = await e.apply(e, t);
1106
1132
  } catch (i) {
1107
- k.warn("模拟数据模版异常", i);
1133
+ A.warn("模拟数据模版异常", i);
1108
1134
  }
1109
- return M()?.mock(s);
1135
+ return I()?.mock(s);
1110
1136
  };
1111
1137
  }
1112
1138
  /**
@@ -1123,10 +1149,10 @@ class zt extends xe {
1123
1149
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1124
1150
  throw new Error("project is null");
1125
1151
  const { apis: s = [], meta: r = [] } = this.project, i = window;
1126
- i && (i.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ht(s, r, this.adapter), Ee(i), mt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1152
+ i && (i.CKEDITOR_VERSION = void 0), this.mode === _.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ht(s, r, this.adapter), je(i), mt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1127
1153
  }
1128
1154
  initMock(e) {
1129
- const t = M(e);
1155
+ const t = I(e);
1130
1156
  t && t.setup({
1131
1157
  timeout: "50-500"
1132
1158
  });
@@ -1142,7 +1168,7 @@ class zt extends xe {
1142
1168
  libraryMap: l,
1143
1169
  materials: u,
1144
1170
  materialExports: p,
1145
- materialMapLibrary: m
1171
+ materialMapLibrary: h
1146
1172
  } = tt(
1147
1173
  t,
1148
1174
  a,
@@ -1150,32 +1176,32 @@ class zt extends xe {
1150
1176
  /* Development */
1151
1177
  );
1152
1178
  for (const f of c) {
1153
- const d = s[f], h = e[f];
1154
- if (h)
1155
- r[f] = h;
1179
+ const d = s[f], m = e[f];
1180
+ if (m)
1181
+ r[f] = m;
1156
1182
  else if (d)
1157
1183
  e[f] = r[f] = await d();
1158
1184
  else {
1159
- const _ = l[f] || [];
1160
- for (const v of _)
1161
- U(v) && await it(f, C.append(v, { v: A })), L(v) && await ae(C.append(v, { v: A }));
1185
+ const v = l[f] || [];
1186
+ for (const g of v)
1187
+ B(g) && await it(f, C.append(g, { v: F })), L(g) && await ae(C.append(g, { v: F }));
1162
1188
  r[f] = e[f];
1163
1189
  }
1164
1190
  }
1165
1191
  if (o === "development") {
1166
1192
  for (const d of u)
1167
- await ae(C.append(d, { v: A }));
1193
+ await ae(C.append(d, { v: F }));
1168
1194
  const f = this.materials || {};
1169
1195
  for (const d of p) {
1170
- const h = e[m[d]], _ = Oe[d];
1171
- if (_)
1172
- h && _.forEach((v) => {
1173
- i[v] = h[v];
1196
+ const m = e[h[d]], v = xe[d];
1197
+ if (v)
1198
+ m && v.forEach((g) => {
1199
+ i[g] = m[g];
1174
1200
  });
1175
1201
  else {
1176
- const v = f[d] ? (await f[d]()).default : e[d];
1177
- v && h && (v.components || []).forEach((P) => {
1178
- i[P.name] = st(P, h);
1202
+ const g = f[d] ? (await f[d]()).default : e[d];
1203
+ g && m && (g.components || []).forEach((E) => {
1204
+ i[E.name] = st(E, m);
1179
1205
  });
1180
1206
  }
1181
1207
  }
@@ -1190,15 +1216,15 @@ class zt extends xe {
1190
1216
  routeMeta: c
1191
1217
  } = s, l = a ? "" : "/", u = {
1192
1218
  path: `${l}${o}/:id`,
1193
- name: I,
1219
+ name: M,
1194
1220
  component: ue
1195
1221
  }, p = {
1196
1222
  path: l,
1197
- name: O,
1223
+ name: x,
1198
1224
  component: t?.homepage ? ue : r.startupComponent || Jt,
1199
1225
  meta: c
1200
1226
  };
1201
- e.hasRoute(I) && e.removeRoute(I), e.hasRoute(O) && e.removeRoute(O), a ? (e.addRoute(a, u), e.addRoute(a, p)) : (e.addRoute(u), e.addRoute(p));
1227
+ e.hasRoute(M) && e.removeRoute(M), e.hasRoute(x) && e.removeRoute(x), a ? (e.addRoute(a, u), e.addRoute(a, p)) : (e.addRoute(u), e.addRoute(p));
1202
1228
  }
1203
1229
  /**
1204
1230
  * Vue 插件安装方法
@@ -1214,7 +1240,7 @@ class zt extends xe {
1214
1240
  const t = e.config.globalProperties.installed || {};
1215
1241
  for (const [s, r] of Object.entries(this.library))
1216
1242
  !t[s] && ot(r) && (e.use(r), t[s] = !0);
1217
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ce, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, r, i) => {
1243
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ce, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, r, i) => {
1218
1244
  const a = r?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1219
1245
  console.error(
1220
1246
  "[VTJ Error]:",
@@ -1306,13 +1332,13 @@ class zt extends xe {
1306
1332
  async getRenderComponent(e, t) {
1307
1333
  const s = this.getFile(e);
1308
1334
  if (!s)
1309
- return k.warn(`Can not find file: ${e}`), null;
1335
+ return A.warn(`Can not find file: ${e}`), null;
1310
1336
  t && t(s);
1311
1337
  const r = `.vtj/vue/${e}.vue`, i = this.modules[r] || this.modules[`/src/pages/${e}.vue`];
1312
1338
  if (i)
1313
1339
  return (await i())?.default;
1314
1340
  const a = await this.getDsl(s.id);
1315
- return a ? this.createDslRenderer(a).renderer : (k.warn(`Can not find dsl: ${e}`), null);
1341
+ return a ? this.createDslRenderer(a).renderer : (A.warn(`Can not find dsl: ${e}`), null);
1316
1342
  }
1317
1343
  /**
1318
1344
  * 定义基于URL的异步组件
@@ -1337,7 +1363,7 @@ class zt extends xe {
1337
1363
  * @returns Vue异步组件
1338
1364
  */
1339
1365
  definePluginComponent(e) {
1340
- return ce(async () => await Pe(e, window));
1366
+ return ce(async () => await Re(e, window));
1341
1367
  }
1342
1368
  }
1343
1369
  function cs(n) {
@@ -1347,7 +1373,7 @@ function cs(n) {
1347
1373
  onReady: (s) => e.ready(s)
1348
1374
  };
1349
1375
  }
1350
- function ke(n = {}) {
1376
+ function Ae(n = {}) {
1351
1377
  const e = me(Ce, null);
1352
1378
  if (!e)
1353
1379
  throw new Error("Can not find provider");
@@ -1372,7 +1398,7 @@ async function ls(n, e = "") {
1372
1398
  }
1373
1399
  );
1374
1400
  }
1375
- const Fe = {
1401
+ const ke = {
1376
1402
  type: "json",
1377
1403
  validSuccess: !0,
1378
1404
  originResponse: !1,
@@ -1387,7 +1413,7 @@ const Fe = {
1387
1413
  type: t,
1388
1414
  data: s
1389
1415
  },
1390
- settings: Fe
1416
+ settings: ke
1391
1417
  }), Wt = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1392
1418
  url: e,
1393
1419
  method: "post",
@@ -1396,7 +1422,7 @@ const Fe = {
1396
1422
  projectId: s
1397
1423
  },
1398
1424
  settings: {
1399
- ...Fe,
1425
+ ...ke,
1400
1426
  type: "data"
1401
1427
  }
1402
1428
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
@@ -1516,58 +1542,58 @@ class se {
1516
1542
  return console.log("BaseService.genSource", e), "";
1517
1543
  }
1518
1544
  }
1519
- const g = new Ve({
1545
+ const y = new Ve({
1520
1546
  type: "local",
1521
1547
  expired: 0,
1522
1548
  prefix: "__VTJ_"
1523
1549
  });
1524
1550
  class ps extends se {
1525
1551
  init(e) {
1526
- const t = new N(e), s = g.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1527
- return g.save(`project_${t.id}`, r), Promise.resolve(r);
1552
+ const t = new N(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1553
+ return y.save(`project_${t.id}`, r), Promise.resolve(r);
1528
1554
  }
1529
1555
  saveProject(e) {
1530
1556
  const t = new N(e);
1531
- return g.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1557
+ return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1532
1558
  }
1533
1559
  saveMaterials(e, t) {
1534
- return g.save(`materials_${e.id}`, te(t)), Promise.resolve(!0);
1560
+ return y.save(`materials_${e.id}`, te(t)), Promise.resolve(!0);
1535
1561
  }
1536
1562
  saveFile(e) {
1537
- return g.save(`file_${e.id}`, e), Promise.resolve(!0);
1563
+ return y.save(`file_${e.id}`, e), Promise.resolve(!0);
1538
1564
  }
1539
1565
  getFile(e) {
1540
- const t = g.get(`file_${e}`);
1566
+ const t = y.get(`file_${e}`);
1541
1567
  return t ? Promise.resolve(t) : Promise.reject(null);
1542
1568
  }
1543
1569
  removeFile(e) {
1544
- return g.remove(`file_${e}`), Promise.resolve(!0);
1570
+ return y.remove(`file_${e}`), Promise.resolve(!0);
1545
1571
  }
1546
1572
  saveHistory(e) {
1547
- return g.save(`history_${e.id}`, e), Promise.resolve(!0);
1573
+ return y.save(`history_${e.id}`, e), Promise.resolve(!0);
1548
1574
  }
1549
1575
  removeHistory(e) {
1550
- const t = g.get(`history_${e}`);
1576
+ const t = y.get(`history_${e}`);
1551
1577
  if (t) {
1552
1578
  const r = (t.items || []).map((i) => i.id);
1553
- this.removeHistoryItem(e, r), g.remove(`history_${e}`);
1579
+ this.removeHistoryItem(e, r), y.remove(`history_${e}`);
1554
1580
  }
1555
1581
  return Promise.resolve(!0);
1556
1582
  }
1557
1583
  getHistory(e) {
1558
- const t = g.get(`history_${e}`), s = new pe(t || { id: e });
1584
+ const t = y.get(`history_${e}`), s = new pe(t || { id: e });
1559
1585
  return Promise.resolve(s.toDsl());
1560
1586
  }
1561
1587
  getHistoryItem(e, t) {
1562
- const s = g.get(`history_${e}_${t}`);
1588
+ const s = y.get(`history_${e}_${t}`);
1563
1589
  return Promise.resolve(s);
1564
1590
  }
1565
1591
  saveHistoryItem(e, t) {
1566
- return g.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1592
+ return y.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1567
1593
  }
1568
1594
  removeHistoryItem(e, t) {
1569
1595
  return t.forEach((s) => {
1570
- g.remove(`history_${e}_${s}`);
1596
+ y.remove(`history_${e}_${s}`);
1571
1597
  }), Promise.resolve(!0);
1572
1598
  }
1573
1599
  }
@@ -1628,9 +1654,9 @@ class Gt extends se {
1628
1654
  }), Promise.resolve(!0);
1629
1655
  }
1630
1656
  }
1631
- let x = null;
1657
+ let O = null;
1632
1658
  function ds() {
1633
- return x || (x = new Gt(), x);
1659
+ return O || (O = new Gt(), O);
1634
1660
  }
1635
1661
  class fs extends se {
1636
1662
  getFileCaches = {};
@@ -1689,7 +1715,7 @@ class fs extends se {
1689
1715
  );
1690
1716
  }
1691
1717
  }
1692
- function Ae(n, e, t = []) {
1718
+ function Fe(n, e, t = []) {
1693
1719
  return t.map((s) => {
1694
1720
  const { id: r, title: i, icon: a, children: o, hidden: c } = s;
1695
1721
  return {
@@ -1698,16 +1724,16 @@ function Ae(n, e, t = []) {
1698
1724
  icon: a,
1699
1725
  hidden: c,
1700
1726
  url: `${n}/${e}/${r}`,
1701
- children: o && o.length ? Ae(n, e, o) : void 0
1727
+ children: o && o.length ? Fe(n, e, o) : void 0
1702
1728
  };
1703
1729
  });
1704
1730
  }
1705
- function Ie(n, e) {
1731
+ function Me(n, e) {
1706
1732
  if (!e) return n;
1707
1733
  let t = [];
1708
1734
  for (const s of n)
1709
1735
  if (s.children && s.children.length) {
1710
- const r = Ie(s.children, e);
1736
+ const r = Me(s.children, e);
1711
1737
  r.length && (s.children = r, t.push(s));
1712
1738
  } else
1713
1739
  e.can(s.id.toString()) && t.push(s);
@@ -1718,19 +1744,19 @@ function hs(n) {
1718
1744
  menuPathPrefix: e = "",
1719
1745
  pageRouteName: t = "page",
1720
1746
  disableMenusFilter: s = !1
1721
- } = n || {}, r = ke(), i = ge(), a = pt(), o = Y(!1), c = Y(!1), l = r.project;
1747
+ } = n || {}, r = Ae(), i = ve(), a = pt(), o = Y(!1), c = Y(!1), l = r.project;
1722
1748
  We(() => {
1723
- const { name: m, params: f, meta: d } = i;
1724
- if (m === I) {
1725
- const h = r.getPage(f.id);
1726
- o.value = !h?.mask, c.value = !!h?.pure;
1727
- } else if (m === O) {
1728
- const h = r.getHomepage();
1729
- o.value = !h?.mask, c.value = !!h?.pure;
1749
+ const { name: h, params: f, meta: d } = i;
1750
+ if (h === M) {
1751
+ const m = r.getPage(f.id);
1752
+ o.value = !m?.mask, c.value = !!m?.pure;
1753
+ } else if (h === x) {
1754
+ const m = r.getHomepage();
1755
+ o.value = !m?.mask, c.value = !!m?.pure;
1730
1756
  } else
1731
1757
  o.value = !d.mask, c.value = !!d.pure;
1732
1758
  });
1733
- const u = Ae(
1759
+ const u = Fe(
1734
1760
  e,
1735
1761
  t,
1736
1762
  l?.pages
@@ -1740,43 +1766,42 @@ function hs(n) {
1740
1766
  logo: p?.logo,
1741
1767
  themeSwitchable: p?.themeSwitchable,
1742
1768
  title: p?.title || l?.description || l?.name || "VTJ App",
1743
- menus: s ? u : Ie(u, a),
1769
+ menus: s ? u : Me(u, a),
1744
1770
  pure: c
1745
1771
  };
1746
1772
  }
1747
1773
  export {
1748
1774
  $e as ACCESS_KEY,
1749
- je as Access,
1775
+ Ee as Access,
1750
1776
  Xe as BUILD_IN_TAGS,
1751
1777
  Ge as BUILT_IN_DIRECTIVES,
1752
1778
  se as BaseService,
1753
1779
  le as CONTEXT_HOST,
1754
1780
  yt as Context,
1755
- y as ContextMode,
1781
+ _ as ContextMode,
1756
1782
  Ye as DATA_TYPES,
1757
- O as HOMEPAGE_ROUTE_NAME,
1783
+ x as HOMEPAGE_ROUTE_NAME,
1758
1784
  Qe as HTML_TAGS,
1759
1785
  rs as JSCodeToString,
1760
1786
  es as LIFE_CYCLES_LIST,
1761
1787
  fs as LocalService,
1762
1788
  Gt as MemoryService,
1763
1789
  Kt as NodeEnv,
1764
- I as PAGE_ROUTE_NAME,
1790
+ M as PAGE_ROUTE_NAME,
1765
1791
  zt as Provider,
1766
1792
  ps as StorageService,
1767
- A as VTJ_RENDERER_VERSION,
1793
+ F as VTJ_RENDERER_VERSION,
1768
1794
  _e as adoptedStyleSheets,
1769
1795
  as as clearLoaderCache,
1770
- rt as compileScopedCSS,
1771
1796
  os as createAccess,
1772
1797
  is as createAdapter,
1773
1798
  ts as createAssetScripts,
1774
1799
  ss as createAssetsCss,
1775
- Pt as createDataSources,
1800
+ Rt as createDataSources,
1776
1801
  Z as createLoader,
1777
1802
  ds as createMemoryService,
1778
1803
  ft as createMetaApi,
1779
- vt as createMock,
1804
+ gt as createMock,
1780
1805
  cs as createProvider,
1781
1806
  X as createRenderer,
1782
1807
  dt as createSchemaApi,
@@ -1784,12 +1809,12 @@ export {
1784
1809
  us as createServiceRequest,
1785
1810
  Ct as defaultLoader,
1786
1811
  D as fillBasePath,
1787
- M as getMock,
1812
+ I as getMock,
1788
1813
  be as getModifiers,
1789
- Pe as getPlugin,
1814
+ Re as getPlugin,
1790
1815
  st as getRawComponent,
1791
1816
  at as isBuiltInTag,
1792
- U as isCSSUrl,
1817
+ B as isCSSUrl,
1793
1818
  lt as isJSCode,
1794
1819
  w as isJSExpression,
1795
1820
  T as isJSFunction,
@@ -1801,10 +1826,10 @@ export {
1801
1826
  we as loadCssUrl,
1802
1827
  ls as loadEnhance,
1803
1828
  Se as loadScriptUrl,
1804
- gt as mockApi,
1829
+ vt as mockApi,
1805
1830
  mt as mockApis,
1806
- Ee as mockCleanup,
1807
- F as nodeRender,
1831
+ je as mockCleanup,
1832
+ k as nodeRender,
1808
1833
  tt as parseDeps,
1809
1834
  H as parseExpression,
1810
1835
  Q as parseFunction,
@@ -1815,5 +1840,5 @@ export {
1815
1840
  ye as toString,
1816
1841
  pt as useAccess,
1817
1842
  hs as useMask,
1818
- ke as useProvider
1843
+ Ae as useProvider
1819
1844
  };