@vtj/renderer 0.10.1-alpha.3 → 0.10.1-alpha.4

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,16 +1,16 @@
1
- import { Base as Ie, BUILT_IN_COMPONENTS as De, ProjectModel as O, HistoryModel as de } from "@vtj/core";
2
- import { isUrl as He, url as R, dedupArray as Oe, isString as j, isFunction as V, logger as P, storage as L, cookie as q, toArray as ie, unRSA as ae, delay as fe, createRequest as he, jsonp as me, merge as Be, pathToRegexp as Ne, pathToRegexpMatch as Ue, formDataToJson as Le, camelCase as $, upperFirst as qe, pick as Je, request as K, loadScript as ce, Storage as ze, mapToObject as Z } from "@vtj/utils";
3
- import * as N from "vue";
4
- import { inject as ge, toRef as Ve, readonly as Ke, ref as M, customRef as We, onBeforeUnmount as Ge, getCurrentScope as Ye, onScopeDispose as Qe, getCurrentInstance as ve, watch as ye, toValue as ee, computed as _e, onMounted as Xe, defineComponent as te, h as W, createElementBlock as Ze, openBlock as et, createElementVNode as k, toDisplayString as J, defineAsyncComponent as le, watchEffect as tt } from "vue";
1
+ import { Base as De, BUILT_IN_COMPONENTS as He, ProjectModel as H, HistoryModel as pe } from "@vtj/core";
2
+ import { isUrl as Oe, url as R, dedupArray as Be, isString as j, isFunction as V, logger as P, storage as U, cookie as L, toArray as ie, unRSA as ae, delay as fe, createRequest as he, jsonp as me, merge as Ne, pathToRegexp as Ue, pathToRegexpMatch as Le, formDataToJson as qe, camelCase as $, upperFirst as Je, pick as ze, request as K, loadScript as ce, Storage as Ve, mapToObject as Z } from "@vtj/utils";
3
+ import * as B from "vue";
4
+ import { inject as ge, toRef as Ke, readonly as We, ref as C, customRef as Ge, onBeforeUnmount as Ye, getCurrentScope as Qe, onScopeDispose as Xe, getCurrentInstance as ve, watch as ye, toValue as ee, computed as _e, onMounted as Ze, defineComponent as te, h as W, createElementBlock as et, openBlock as tt, createElementVNode as k, toDisplayString as q, version as J, defineAsyncComponent as le, watchEffect as nt } from "vue";
5
5
  import { useRoute as we } 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.10.1-alpha.3
10
+ * @version 0.10.1-alpha.4
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const x = "0.10.1-alpha.3";
13
+ const Se = "0.10.1-alpha.4";
14
14
  var y = /* @__PURE__ */ ((s) => (s.Runtime = "Runtime", s.Design = "Design", s.Raw = "Raw", s.VNode = "VNode", s))(y || {});
15
15
  const ue = [
16
16
  "$el",
@@ -24,7 +24,7 @@ const ue = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], xn = [
27
+ ], Cn = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,14 +38,14 @@ const ue = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], nt = [
41
+ ], st = [
42
42
  "vIf",
43
43
  "vShow",
44
44
  "vModel",
45
45
  "vFor",
46
46
  "vBind",
47
47
  "vHtml"
48
- ], st = {
48
+ ], rt = {
49
49
  String,
50
50
  Number,
51
51
  Boolean,
@@ -53,11 +53,11 @@ const ue = [
53
53
  Object,
54
54
  Function,
55
55
  Date
56
- }, C = "VtjPage", H = "VtjHomepage", rt = "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(
56
+ }, x = "VtjPage", D = "VtjHomepage", ot = "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(
57
57
  ","
58
- ), ot = "component,slot".split(",");
59
- function I(s, e) {
60
- return s.map((t) => He(t) || t.startsWith("/") ? t : `${e}${t}`);
58
+ ), it = "component,slot".split(",");
59
+ function T(s, e) {
60
+ return s.map((t) => Oe(t) || t.startsWith("/") ? t : `${e}${t}`);
61
61
  }
62
62
  function ne(s) {
63
63
  return /\.css$/.test(s);
@@ -65,49 +65,49 @@ function ne(s) {
65
65
  function se(s) {
66
66
  return /\.js$/.test(s);
67
67
  }
68
- function it(s) {
68
+ function at(s) {
69
69
  return /\.json$/.test(s);
70
70
  }
71
- function Cn(s) {
71
+ function Mn(s) {
72
72
  return s.map(
73
- (e) => `<script src="${R.append(e, { v: x })}"><\/script>`
73
+ (e) => `<script src="${R.append(e, { v: Se })}"><\/script>`
74
74
  ).join("");
75
75
  }
76
- function Mn(s = []) {
76
+ function An(s = []) {
77
77
  return s.map(
78
- (e) => `<link rel="stylesheet" href="${R.append(e, { v: x })}" />`
78
+ (e) => `<link rel="stylesheet" href="${R.append(e, { v: Se })}" />`
79
79
  ).join("");
80
80
  }
81
- function at(s, e = !1) {
81
+ function ct(s, e = !1) {
82
82
  return e && s.endsWith(".prod.js") ? s.replace(".prod.js", ".js") : s;
83
83
  }
84
- function ct(s, e, t = !1) {
85
- const n = s.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], c = {}, l = {}, f = [], u = {};
84
+ function lt(s, e, t = !1) {
85
+ const n = s.filter((d) => !!d.enabled), r = [], o = [], a = [], i = [], c = {}, l = {}, f = [], u = {};
86
86
  return n.forEach(
87
- ({ urls: p, assetsUrl: h, library: m, assetsLibrary: d, localeLibrary: w }) => {
88
- p?.forEach((g) => {
89
- se(g) && r.push(at(g, t)), ne(g) && o.push(g);
90
- }), m && (i.push(m), c[m] = I(p || [], e), w && (l[m] = w)), h && a.push(h), d && f.push(d), m && d && (u[d] = m);
87
+ ({ urls: d, assetsUrl: h, library: m, assetsLibrary: p, localeLibrary: w }) => {
88
+ d?.forEach((g) => {
89
+ se(g) && r.push(ct(g, t)), ne(g) && o.push(g);
90
+ }), m && (i.push(m), c[m] = T(d || [], e), w && (l[m] = w)), h && a.push(h), p && f.push(p), m && p && (u[p] = m);
91
91
  }
92
92
  ), {
93
- scripts: I(r, e),
94
- css: I(o, e),
95
- materials: I(a, e),
93
+ scripts: T(r, e),
94
+ css: T(o, e),
95
+ materials: T(a, e),
96
96
  libraryExports: i,
97
- materialExports: Oe(f),
97
+ materialExports: Be(f),
98
98
  materialMapLibrary: u,
99
99
  libraryMap: c,
100
100
  libraryLocaleMap: l
101
101
  };
102
102
  }
103
- function lt(s, e) {
103
+ function ut(s, e) {
104
104
  const { name: t, parent: n, alias: r } = s;
105
105
  return n ? e[n]?.[r || t] : e[r || t];
106
106
  }
107
- function Se(s) {
107
+ function be(s) {
108
108
  return j(s) ? s : JSON.stringify(s);
109
109
  }
110
- function be(s, e, t) {
110
+ function je(s, e, t) {
111
111
  const n = s.CSSStyleSheet;
112
112
  if (n.prototype.replaceSync) {
113
113
  const r = new n();
@@ -122,9 +122,9 @@ function be(s, e, t) {
122
122
  o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
123
123
  }
124
124
  }
125
- async function ut(s, e) {
125
+ async function dt(s, e) {
126
126
  const t = await window.fetch(e).then((n) => n.text()).catch(() => "");
127
- t && be(window, s, t);
127
+ t && je(window, s, t);
128
128
  }
129
129
  function pt(s, e = window) {
130
130
  const t = e.document, n = e.document.head;
@@ -134,7 +134,7 @@ function pt(s, e = window) {
134
134
  a.rel = "stylesheet", a.id = r, a.href = r, n.appendChild(a);
135
135
  }
136
136
  }
137
- async function dt(s, e, t = window) {
137
+ async function ft(s, e, t = window) {
138
138
  const n = t.document, r = t.document.head;
139
139
  let o = t[e];
140
140
  return o ? o.default || o : new Promise((a, i) => {
@@ -148,23 +148,23 @@ async function dt(s, e, t = window) {
148
148
  }
149
149
  });
150
150
  }
151
- function ft(s) {
152
- return V(s) || V(s?.install);
153
- }
154
151
  function ht(s) {
155
- return ot.includes(s);
152
+ return V(s) || V(s?.install);
156
153
  }
157
154
  function mt(s) {
158
- return rt.includes(s);
155
+ return it.includes(s);
159
156
  }
160
- function A(s = window) {
157
+ function gt(s) {
158
+ return ot.includes(s);
159
+ }
160
+ function M(s = window) {
161
161
  const e = window.Mock;
162
162
  if (e) return e;
163
163
  const t = s.Mock;
164
164
  if (t)
165
165
  return window.Mock = t, t;
166
166
  }
167
- function F(s, e, t = !1, n = !1) {
167
+ function A(s, e, t = !1, n = !1) {
168
168
  try {
169
169
  const r = ['"use strict";', "var __self = arguments[0];"];
170
170
  r.push("return ");
@@ -179,7 +179,7 @@ function F(s, e, t = !1, n = !1) {
179
179
  }
180
180
  }
181
181
  function G(s, e, t = !1, n = !1) {
182
- const r = F(s, e, t, n);
182
+ const r = A(s, e, t, n);
183
183
  if (typeof r != "function" && (P.error(
184
184
  "parseFunction.error",
185
185
  "not a function",
@@ -192,16 +192,16 @@ function G(s, e, t = !1, n = !1) {
192
192
  function _(s) {
193
193
  return s && s.type === "JSExpression";
194
194
  }
195
- function T(s) {
195
+ function F(s) {
196
196
  return typeof s == "object" && s && s.type === "JSFunction";
197
197
  }
198
- function gt(s) {
199
- return _(s) || T(s);
198
+ function vt(s) {
199
+ return _(s) || F(s);
200
200
  }
201
- function An(s) {
202
- return gt(s) ? s.value : JSON.stringify(s);
201
+ function Fn(s) {
202
+ return vt(s) ? s.value : JSON.stringify(s);
203
203
  }
204
- const vt = {
204
+ const yt = {
205
205
  session: !1,
206
206
  authKey: "Authorization",
207
207
  storageKey: "ACCESS_STORAGE",
@@ -213,13 +213,13 @@ const vt = {
213
213
  unauthorizedMessage: "登录已经失效,请重新登录!",
214
214
  noPermissionMessage: "无权限访问该页面",
215
215
  appName: ""
216
- }, je = Symbol("access");
217
- class Fn {
216
+ }, $e = Symbol("access");
217
+ class Tn {
218
218
  options;
219
219
  data = null;
220
220
  mode = y.Raw;
221
221
  constructor(e) {
222
- this.options = Object.assign({}, vt, e), this.loadData();
222
+ this.options = Object.assign({}, yt, e), this.loadData();
223
223
  }
224
224
  connect(e) {
225
225
  const { mode: t, router: n, request: r } = e;
@@ -227,17 +227,17 @@ class Fn {
227
227
  }
228
228
  login(e) {
229
229
  const { storageKey: t, storagePrefix: n, session: r, authKey: o } = this.options;
230
- this.setData(e), this.data && (L.save(t, e, {
230
+ this.setData(e), this.data && (U.save(t, e, {
231
231
  type: "local",
232
232
  prefix: n
233
- }), r && q.set(o, this.data.token));
233
+ }), r && L.set(o, this.data.token));
234
234
  }
235
235
  clear() {
236
236
  const { storageKey: e, storagePrefix: t, session: n, authKey: r } = this.options;
237
- this.data = null, L.remove(e, {
237
+ this.data = null, U.remove(e, {
238
238
  type: "local",
239
239
  prefix: t
240
- }), n && q.remove(r);
240
+ }), n && L.remove(r);
241
241
  }
242
242
  logout() {
243
243
  this.clear(), this.toLogin();
@@ -257,7 +257,7 @@ class Fn {
257
257
  return ie(e).some((o) => n[o] || n[t + "." + o]);
258
258
  }
259
259
  install(e) {
260
- e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide(je, this));
260
+ e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide($e, this));
261
261
  }
262
262
  isAuthPath(e) {
263
263
  const { auth: t, isAuth: n } = this.options;
@@ -293,7 +293,7 @@ class Fn {
293
293
  this.data = e;
294
294
  }
295
295
  loadData() {
296
- const { storageKey: e, storagePrefix: t } = this.options, n = L.get(e, {
296
+ const { storageKey: e, storagePrefix: t } = this.options, n = U.get(e, {
297
297
  type: "local",
298
298
  prefix: t
299
299
  });
@@ -301,10 +301,10 @@ class Fn {
301
301
  }
302
302
  isLogined() {
303
303
  const { session: e, authKey: t } = this.options;
304
- return e && t ? !!q.get(t) : !!this.getToken();
304
+ return e && t ? !!L.get(t) : !!this.getToken();
305
305
  }
306
306
  hasRoutePermission(e) {
307
- if (e.name === C) {
307
+ if (e.name === x) {
308
308
  const t = e.params.id;
309
309
  return t && this.can(t);
310
310
  }
@@ -355,10 +355,10 @@ class Fn {
355
355
  );
356
356
  }
357
357
  }
358
- function yt() {
359
- return ge(je, null);
358
+ function _t() {
359
+ return ge($e, null);
360
360
  }
361
- function Tn(s = {}) {
361
+ function In(s = {}) {
362
362
  const { notify: e, loading: t, settings: n = {} } = s;
363
363
  let r = null;
364
364
  return {
@@ -387,7 +387,7 @@ function Tn(s = {}) {
387
387
  loading: t
388
388
  };
389
389
  }
390
- function _t(s, e) {
390
+ function wt(s, e) {
391
391
  const { jsonp: t, request: n } = e;
392
392
  if (s.method === "jsonp")
393
393
  return (r = {}) => t(s.url, {
@@ -395,7 +395,7 @@ function _t(s, e) {
395
395
  query: r
396
396
  });
397
397
  {
398
- const r = s.headers ? F(s.headers, {}, !0) : void 0, o = {
398
+ const r = s.headers ? A(s.headers, {}, !0) : void 0, o = {
399
399
  url: s.url,
400
400
  method: s.method,
401
401
  settings: {
@@ -403,10 +403,10 @@ function _t(s, e) {
403
403
  headers: r
404
404
  }
405
405
  };
406
- return (a, i) => (delete o.data, n.send(Be(o, i || {}, { data: a })));
406
+ return (a, i) => (delete o.data, n.send(Ne(o, i || {}, { data: a })));
407
407
  }
408
408
  }
409
- function wt(s, e) {
409
+ function St(s, e) {
410
410
  const { metaQuery: t } = e;
411
411
  if (!t) return;
412
412
  const { code: n, queryCode: r } = s;
@@ -418,47 +418,47 @@ function wt(s, e) {
418
418
  return t(n, r, o, a);
419
419
  };
420
420
  }
421
- function St(s = [], e = [], t) {
421
+ function bt(s = [], e = [], t) {
422
422
  const n = {};
423
423
  for (const r of s)
424
- n[r.id] = _t(r, t);
425
- for (const r of e)
426
424
  n[r.id] = wt(r, t);
425
+ for (const r of e)
426
+ n[r.id] = St(r, t);
427
427
  return n;
428
428
  }
429
- async function bt(s = []) {
430
- const e = A();
431
- e && ($e(), s.forEach((t) => $t(e, t)));
429
+ async function jt(s = [], e = window) {
430
+ const t = M(e);
431
+ t && (ke(e), s.forEach((n) => kt(t, n)));
432
432
  }
433
- function jt(s) {
434
- const e = T(s.mockTemplate) && s.mockTemplate.value ? G(s.mockTemplate, {}, !0) : void 0, t = A();
435
- return async (...n) => {
436
- let r = {};
437
- if (e)
433
+ function $t(s, e = window) {
434
+ const t = F(s.mockTemplate) && s.mockTemplate.value ? G(s.mockTemplate, {}, !0) : void 0, n = M(e);
435
+ return async (...r) => {
436
+ let o = {};
437
+ if (t)
438
438
  try {
439
- r = await e.apply(e, n);
440
- } catch (o) {
441
- P.warn("模拟数据模版异常", o);
439
+ o = await t.apply(t, r);
440
+ } catch (a) {
441
+ P.warn("模拟数据模版异常", a);
442
442
  }
443
- return t?.mock(r);
443
+ return n?.mock(o);
444
444
  };
445
445
  }
446
- function $t(s, e) {
446
+ function kt(s, e) {
447
447
  if (!e.mock) return;
448
448
  const { url: t, mockTemplate: n } = e;
449
449
  if (t && n) {
450
- const r = Ne(`${t}(.*)`), o = Ue(t, { decode: decodeURIComponent }), a = F(n, {}, !0);
450
+ const r = Ue(`${t}(.*)`), o = Le(t, { decode: decodeURIComponent }), a = A(n, {}, !0);
451
451
  s.mock(r, (i) => {
452
- const c = R.parse(i.url) || {}, l = i.body instanceof FormData ? Le(i.body) : i.body, f = o(i.url)?.params;
452
+ const c = R.parse(i.url) || {}, l = i.body instanceof FormData ? qe(i.body) : i.body, f = o(i.url)?.params;
453
453
  return Object.assign(i, { data: l, params: c, query: f }), s.mock(a(i));
454
454
  });
455
455
  }
456
456
  }
457
- function $e() {
458
- const s = A();
459
- s && (s._mocked = {});
457
+ function ke(s = window) {
458
+ const e = M(s);
459
+ e && (e._mocked = {});
460
460
  }
461
- class kt {
461
+ class Et {
462
462
  __id = null;
463
463
  __mode;
464
464
  __instance = null;
@@ -487,7 +487,7 @@ class kt {
487
487
  const { mode: t, dsl: n, attrs: r } = e;
488
488
  this.__mode = t, n && (this.__id = n.id || null, this.__transform = n.transform || {}), r && Object.assign(this, r);
489
489
  }
490
- setup(e, t = N) {
490
+ setup(e, t = B) {
491
491
  const n = t.getCurrentInstance();
492
492
  if (!n) return;
493
493
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = n.proxy;
@@ -525,9 +525,9 @@ class kt {
525
525
  if (e)
526
526
  if (this.__mode === y.Runtime) {
527
527
  const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
528
- return F({ type: n, value: r }, this);
528
+ return A({ type: n, value: r }, this);
529
529
  } else
530
- return F(e, this);
530
+ return A(e, this);
531
531
  }
532
532
  __ref(e = null, t) {
533
533
  if (this.__mode !== y.VNode)
@@ -559,7 +559,7 @@ class kt {
559
559
  }
560
560
  function Y(s) {
561
561
  const {
562
- Vue: e = N,
562
+ Vue: e = B,
563
563
  mode: t = y.Runtime,
564
564
  components: n = {},
565
565
  libs: r = {},
@@ -569,53 +569,53 @@ function Y(s) {
569
569
  $components: n,
570
570
  $libs: r,
571
571
  $apis: o
572
- }, l = new kt({
572
+ }, l = new Et({
573
573
  mode: t,
574
574
  dsl: i.value,
575
575
  attrs: c
576
576
  }), f = e.defineComponent({
577
577
  name: i.value.name,
578
578
  props: {
579
- ...Rt(i.value.props ?? [], l)
579
+ ...Pt(i.value.props ?? [], l)
580
580
  },
581
581
  setup(u) {
582
- l.$props = u, l.props = u, i.value.id && be(
582
+ l.$props = u, l.props = u, i.value.id && je(
583
583
  s.window || window,
584
584
  i.value.id,
585
585
  i.value.css || ""
586
- ), l.state = Pt(e, i.value.state ?? {}, l);
587
- const p = xt(e, i.value.computed ?? {}, l), h = Ct(i.value.methods ?? {}, l), m = Mt(e, i.value.inject, l), d = At(
586
+ ), l.state = xt(e, i.value.state ?? {}, l);
587
+ const d = Ct(e, i.value.computed ?? {}, l), h = Mt(i.value.methods ?? {}, l), m = At(e, i.value.inject, l), p = Ft(
588
588
  i.value.dataSources || {},
589
589
  l
590
590
  ), w = {
591
591
  ...m,
592
- ...p,
592
+ ...d,
593
593
  ...h,
594
- ...d
594
+ ...p
595
595
  };
596
- return l.setup(w, e), Ft(e, i.value.watch ?? [], l), {
596
+ return l.setup(w, e), Tt(e, i.value.watch ?? [], l), {
597
597
  vtj: l
598
598
  };
599
599
  },
600
- emits: Et(i.value.emits),
600
+ emits: Rt(i.value.emits),
601
601
  expose: ["vtj"],
602
602
  render() {
603
603
  if (!i.value.nodes) return null;
604
604
  const u = i.value.nodes || [];
605
- return u.length === 1 ? B(u[0], l, e, a) : u.map((p) => B(p, l, e, a));
605
+ return u.length === 1 ? O(u[0], l, e, a) : u.map((d) => O(d, l, e, a));
606
606
  },
607
- ...Tt(i.value.lifeCycles ?? {}, l)
607
+ ...It(i.value.lifeCycles ?? {}, l)
608
608
  });
609
609
  return {
610
610
  renderer: e.markRaw(f),
611
611
  context: l
612
612
  };
613
613
  }
614
- function Et(s = []) {
614
+ function Rt(s = []) {
615
615
  return s.map((e) => j(e) ? e : e.name);
616
616
  }
617
- function Rt(s = [], e) {
618
- const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((o) => st[o]) : void 0;
617
+ function Pt(s = [], e) {
618
+ const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((o) => rt[o]) : void 0;
619
619
  return s.map((n) => j(n) ? {
620
620
  name: n
621
621
  } : {
@@ -632,30 +632,30 @@ function Rt(s = [], e) {
632
632
  {}
633
633
  );
634
634
  }
635
- function Pt(s, e, t) {
635
+ function xt(s, e, t) {
636
636
  return s.reactive(
637
637
  Object.keys(e || {}).reduce(
638
638
  (n, r) => {
639
639
  let o = e[r];
640
- return _(o) ? o = t.__parseExpression(o) : T(o) && (o = t.__parseFunction(o)), n[r] = o, n;
640
+ return _(o) ? o = t.__parseExpression(o) : F(o) && (o = t.__parseFunction(o)), n[r] = o, n;
641
641
  },
642
642
  {}
643
643
  )
644
644
  );
645
645
  }
646
- function xt(s, e, t) {
646
+ function Ct(s, e, t) {
647
647
  return Object.entries(e ?? {}).reduce(
648
648
  (n, [r, o]) => (n[r] = s.computed(t.__parseFunction(o)), n),
649
649
  {}
650
650
  );
651
651
  }
652
- function Ct(s, e) {
652
+ function Mt(s, e) {
653
653
  return Object.entries(s ?? {}).reduce(
654
654
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
655
655
  {}
656
656
  );
657
657
  }
658
- function Mt(s, e = [], t) {
658
+ function At(s, e = [], t) {
659
659
  return e.reduce(
660
660
  (n, r) => {
661
661
  const { name: o, from: a } = r || {};
@@ -666,14 +666,14 @@ function Mt(s, e = [], t) {
666
666
  {}
667
667
  );
668
668
  }
669
- function At(s, e) {
669
+ function Ft(s, e) {
670
670
  return Object.keys(s).reduce(
671
671
  (t, n) => {
672
672
  const r = s[n];
673
673
  if (r.type === "mock")
674
- t[n] = jt(r);
674
+ t[n] = $t(r);
675
675
  else if (r.ref) {
676
- const o = e.$apis[r.ref], a = T(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
676
+ const o = e.$apis[r.ref], a = F(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
677
677
  t[n] = async (...i) => {
678
678
  const c = await o.apply(e, i);
679
679
  return a ? a(c) : c;
@@ -684,7 +684,7 @@ function At(s, e) {
684
684
  {}
685
685
  );
686
686
  }
687
- function Ft(s, e = [], t) {
687
+ function Tt(s, e = [], t) {
688
688
  e.forEach((n) => {
689
689
  s.watch(
690
690
  t.__parseExpression(n.source),
@@ -696,19 +696,19 @@ function Ft(s, e = [], t) {
696
696
  );
697
697
  });
698
698
  }
699
- function Tt(s, e) {
699
+ function It(s, e) {
700
700
  return Object.entries(s ?? {}).reduce(
701
701
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
702
702
  {}
703
703
  );
704
704
  }
705
705
  let z = [], E = {};
706
- const It = (s) => s;
707
- async function ke(s, e = window) {
706
+ const Dt = (s) => s;
707
+ async function Ee(s, e = window) {
708
708
  const { urls: t = [], library: n } = s, r = t.filter((i) => se(i));
709
709
  if (r.length === 0 || !n) return null;
710
710
  const o = t.filter((i) => ne(i));
711
- return o.length && pt(o, e), await dt(r, n, e).catch(
711
+ return o.length && pt(o, e), await ft(r, n, e).catch(
712
712
  (i) => (console.warn("loadScriptUrl error", r, n, i), null)
713
713
  );
714
714
  }
@@ -716,7 +716,7 @@ function Q(s) {
716
716
  const { getDsl: e, getDslByUrl: t, options: n } = s;
717
717
  return n.window && (z.forEach((r) => {
718
718
  delete n.window[r];
719
- }), z = []), (r, o, a = N) => {
719
+ }), z = []), (r, o, a = B) => {
720
720
  if (!o || typeof o == "string") return r;
721
721
  if (o.type === "Schema" && o.id) {
722
722
  let i = E[o.id];
@@ -748,7 +748,7 @@ function Q(s) {
748
748
  let i = o.library ? E[o.library] : null;
749
749
  return i || (o.library && z.push(o.library), i = E[o.library || Symbol()] = a.defineAsyncComponent(
750
750
  async () => {
751
- const c = await ke(o, n.window);
751
+ const c = await Ee(o, n.window);
752
752
  return c || (console.warn("getPlugin result is null", o), null);
753
753
  }
754
754
  ), i);
@@ -756,44 +756,44 @@ function Q(s) {
756
756
  return r;
757
757
  };
758
758
  }
759
- function In() {
759
+ function Dn() {
760
760
  E = {};
761
761
  }
762
- function B(s, e, t = N, n = It) {
762
+ function O(s, e, t = B, n = Dt) {
763
763
  if (!s || !s.name || s.invisible) return null;
764
- const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = s, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: p, others: h } = Ht(a);
765
- if (i && !Ot(i, e))
764
+ const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = s, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Ot(a);
765
+ if (i && !Bt(i, e))
766
766
  return null;
767
- const m = (d) => {
768
- const w = d.$components, g = (() => {
767
+ const m = (p) => {
768
+ const w = p.$components, g = (() => {
769
769
  if (s.name === "component")
770
- return Bt(d, s.props?.is);
770
+ return Nt(p, s.props?.is);
771
771
  if (s.name === "slot") return s.name;
772
772
  const b = n(s.name, s.from, t);
773
- return j(b) ? ht(b) || mt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
774
- })(), S = Nt(o, s.props ?? {}, d), Fe = Ut(t, s.events ?? {}, d);
773
+ return j(b) ? mt(b) || gt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
774
+ })(), S = Ut(o, s.props ?? {}, p), Te = Lt(t, s.events ?? {}, p);
775
775
  if (s.name === "slot")
776
- return Lt(t, s, S, d, n);
777
- u && Object.assign(S, d.__parseExpression(u.value)), l && (S.style = Object.assign(
776
+ return qt(t, s, S, p, n);
777
+ u && Object.assign(S, p.__parseExpression(u.value)), l && (S.style = Object.assign(
778
778
  S.style ?? {},
779
- Jt(l, d)
780
- )), p && Object.assign(S, zt(p, d)), f.forEach((b) => {
781
- Object.assign(S, Vt(t, b, d));
779
+ zt(l, p)
780
+ )), d && Object.assign(S, Vt(d, p)), f.forEach((b) => {
781
+ Object.assign(S, Kt(t, b, p));
782
782
  });
783
- const Te = Kt(
783
+ const Ie = Wt(
784
784
  t,
785
785
  s.children ?? [],
786
- d,
786
+ p,
787
787
  n,
788
788
  s
789
789
  );
790
- let U = t.createVNode(g, { ...S, ...Fe }, Te);
791
- const oe = r ? Dt(r, h, d) : [];
792
- return oe.length && (U = t.withDirectives(U, oe)), U;
790
+ let N = t.createVNode(g, { ...S, ...Te }, Ie);
791
+ const oe = r ? Ht(r, h, p) : [];
792
+ return oe.length && (N = t.withDirectives(N, oe)), N;
793
793
  };
794
- return c ? Yt(c, m, e) : m(e);
794
+ return c ? Qt(c, m, e) : m(e);
795
795
  }
796
- function Dt(s, e, t) {
796
+ function Ht(s, e, t) {
797
797
  const n = s.app;
798
798
  return e.map((r) => {
799
799
  const o = typeof r.name == "string" ? n.directive(r.name) : t.__parseExpression(r.name);
@@ -802,11 +802,11 @@ function Dt(s, e, t) {
802
802
  return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
803
803
  }).filter((r) => !!r);
804
804
  }
805
- function Ht(s = []) {
805
+ function Ot(s = []) {
806
806
  const e = s.find((c) => $(c.name) === "vIf"), t = s.find((c) => $(c.name) === "vFor"), n = s.find((c) => $(c.name) === "vShow"), r = s.find((c) => $(c.name) === "vBind"), o = s.find((c) => $(c.name) === "vHtml"), a = s.filter(
807
807
  (c) => $(c.name) === "vModel"
808
808
  ), i = s.filter(
809
- (c) => !nt.includes($(c.name))
809
+ (c) => !st.includes($(c.name))
810
810
  );
811
811
  return {
812
812
  vIf: e,
@@ -818,18 +818,18 @@ function Ht(s = []) {
818
818
  vHtml: o
819
819
  };
820
820
  }
821
- function Ot(s, e) {
821
+ function Bt(s, e) {
822
822
  return !!e.__parseExpression(s.value);
823
823
  }
824
- function Bt(s, e) {
824
+ function Nt(s, e) {
825
825
  return e ? _(e) ? s.__parseExpression(e) : e : "div";
826
826
  }
827
- function Nt(s, e, t) {
827
+ function Ut(s, e, t) {
828
828
  const n = X(e, t);
829
829
  return n.ref = t.__ref(s, n.ref), n;
830
830
  }
831
831
  function X(s, e) {
832
- return _(s) ? e.__parseExpression(s) : T(s) ? e.__parseFunction(s) : Array.isArray(s) ? s.map((t) => X(t, e)) : typeof s == "object" ? Object.keys(s || {}).reduce(
832
+ return _(s) ? e.__parseExpression(s) : F(s) ? e.__parseFunction(s) : Array.isArray(s) ? s.map((t) => X(t, e)) : typeof s == "object" ? Object.keys(s || {}).reduce(
833
833
  (t, n) => {
834
834
  let r = s[n];
835
835
  return t[n] = X(r, e), t;
@@ -837,7 +837,7 @@ function X(s, e) {
837
837
  {}
838
838
  ) : s;
839
839
  }
840
- function Ut(s, e, t) {
840
+ function Lt(s, e, t) {
841
841
  const n = ["passive", "capture", "once"], r = {
842
842
  capture: "Capture",
843
843
  once: "Once",
@@ -845,48 +845,48 @@ function Ut(s, e, t) {
845
845
  };
846
846
  return Object.keys(e || {}).reduce(
847
847
  (o, a) => {
848
- const i = e[a], c = Ee(i.modifiers), l = c.find((p) => n.includes(p)), f = "on" + qe(a) + (l && r[l] || ""), u = t.__parseFunction(i.handler);
848
+ const i = e[a], c = Re(i.modifiers), l = c.find((d) => n.includes(d)), f = "on" + Je(a) + (l && r[l] || ""), u = t.__parseFunction(i.handler);
849
849
  return u && (o[f] = s.withModifiers(u, c)), o;
850
850
  },
851
851
  {}
852
852
  );
853
853
  }
854
- function Ee(s = {}, e = !1) {
854
+ function Re(s = {}, e = !1) {
855
855
  const t = Object.keys(s);
856
856
  return e ? t.map((n) => "." + n) : t;
857
857
  }
858
- function Lt(s, e, t, n, r) {
859
- const { children: o } = e, a = qt(e, n), i = n.$slots?.[a.name];
858
+ function qt(s, e, t, n, r) {
859
+ const { children: o } = e, a = Jt(e, n), i = n.$slots?.[a.name];
860
860
  return i ? i(t) : o ? j(o) ? s.createTextVNode(o) : _(o) ? s.createTextVNode(
861
- Se(n.__parseExpression(o))
861
+ be(n.__parseExpression(o))
862
862
  ) : Array.isArray(o) ? o.map(
863
- (c) => B(c, n, s, r)
863
+ (c) => O(c, n, s, r)
864
864
  ) : null : null;
865
865
  }
866
- function qt(s, e) {
866
+ function Jt(s, e) {
867
867
  const { props: t } = s, n = t?.name || "default";
868
868
  return {
869
869
  name: _(n) ? e.__parseExpression(n) : n,
870
870
  params: []
871
871
  };
872
872
  }
873
- function Jt(s, e) {
873
+ function zt(s, e) {
874
874
  return e.__parseExpression(s.value) ? {} : {
875
875
  display: "none"
876
876
  };
877
877
  }
878
- function zt(s, e) {
878
+ function Vt(s, e) {
879
879
  return {
880
880
  innerHTML: e.__parseExpression(s.value) || ""
881
881
  };
882
882
  }
883
- function Vt(s, e, t) {
883
+ function Kt(s, e, t) {
884
884
  const n = {
885
885
  type: "JSFunction",
886
886
  value: e.value?.value ? `(v) => {
887
887
  ${e.value.value} = v;
888
888
  }` : "(v) => {}"
889
- }, r = t.__parseFunction(n), o = Ee(
889
+ }, r = t.__parseFunction(n), o = Re(
890
890
  _(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
891
891
  ), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
892
892
  return {
@@ -894,28 +894,28 @@ function Vt(s, e, t) {
894
894
  [`onUpdate:${a}`]: o.length && r ? s.withModifiers(r, o) : r
895
895
  };
896
896
  }
897
- function Kt(s, e, t, n, r) {
897
+ function Wt(s, e, t, n, r) {
898
898
  if (!e) return null;
899
899
  if (j(e))
900
900
  return { default: () => e };
901
901
  if (_(e))
902
902
  return {
903
- default: () => Se(t.__parseExpression(e))
903
+ default: () => be(t.__parseExpression(e))
904
904
  };
905
905
  if (Array.isArray(e) && e.length > 0) {
906
- const o = Wt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
906
+ const o = Gt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
907
907
  [`scope_${r.id}`]: i
908
908
  } : {};
909
909
  return Object.entries(o).reduce((i, [c, { nodes: l, params: f }]) => (i[c] = (u) => {
910
- const p = f.length ? Je(u ?? {}, f) : a(u);
910
+ const d = f.length ? ze(u ?? {}, f) : a(u);
911
911
  return l.map(
912
- (h) => B(h, t.__clone(p), s, n)
912
+ (h) => O(h, t.__clone(d), s, n)
913
913
  );
914
914
  }, i), {});
915
915
  }
916
916
  return null;
917
917
  }
918
- function Wt(s) {
918
+ function Gt(s) {
919
919
  const e = {
920
920
  default: {
921
921
  params: [],
@@ -923,7 +923,7 @@ function Wt(s) {
923
923
  }
924
924
  };
925
925
  for (const t of s) {
926
- const n = Gt(t.slot), r = n.name;
926
+ const n = Yt(t.slot), r = n.name;
927
927
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(n.params)) : e[r] = {
928
928
  nodes: [t],
929
929
  params: n.params
@@ -931,70 +931,70 @@ function Wt(s) {
931
931
  }
932
932
  return e;
933
933
  }
934
- function Gt(s = "default") {
934
+ function Yt(s = "default") {
935
935
  return j(s) ? { name: s, params: [] } : { params: [], ...s };
936
936
  }
937
- function Yt(s, e, t) {
937
+ function Qt(s, e, t) {
938
938
  const { value: n, iterator: r } = s, { item: o = "item", index: a = "index" } = r || {};
939
939
  let i = t.__parseExpression(n) || [];
940
940
  return Number.isInteger(i) && (i = new Array(i).fill(!0).map((c, l) => l + 1)), Array.isArray(i) ? i.map((c, l) => e(t.__clone({ [o]: c, [a]: l }))) : (console.warn("[vForRender]:", `${n?.value} is not a Arrary`), []);
941
941
  }
942
- function Qt(s) {
943
- return Ye() ? (Qe(s), !0) : !1;
942
+ function Xt(s) {
943
+ return Qe() ? (Xe(s), !0) : !1;
944
944
  }
945
- const Re = typeof window < "u" && typeof document < "u";
945
+ const Pe = typeof window < "u" && typeof document < "u";
946
946
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
947
- const Xt = (s) => s != null, Zt = () => {
947
+ const Zt = (s) => s != null, en = () => {
948
948
  };
949
- function en(s) {
949
+ function tn(s) {
950
950
  return ve();
951
951
  }
952
- function tn(s) {
952
+ function nn(s) {
953
953
  return Array.isArray(s) ? s : [s];
954
954
  }
955
- function nn(...s) {
955
+ function sn(...s) {
956
956
  if (s.length !== 1)
957
- return Ve(...s);
957
+ return Ke(...s);
958
958
  const e = s[0];
959
- return typeof e == "function" ? Ke(We(() => ({ get: e, set: Zt }))) : M(e);
959
+ return typeof e == "function" ? We(Ge(() => ({ get: e, set: en }))) : C(e);
960
960
  }
961
- function sn(s, e) {
962
- en() && Ge(s, e);
961
+ function rn(s, e) {
962
+ tn() && Ye(s, e);
963
963
  }
964
- const rn = Re ? window : void 0, on = Re ? window.document : void 0;
965
- function an(s) {
964
+ const on = Pe ? window : void 0, an = Pe ? window.document : void 0;
965
+ function cn(s) {
966
966
  var e;
967
967
  const t = ee(s);
968
968
  return (e = t?.$el) != null ? e : t;
969
969
  }
970
- function cn() {
971
- const s = M(!1), e = ve();
972
- return e && Xe(() => {
970
+ function ln() {
971
+ const s = C(!1), e = ve();
972
+ return e && Ze(() => {
973
973
  s.value = !0;
974
974
  }, e), s;
975
975
  }
976
- function ln(s) {
977
- const e = cn();
976
+ function un(s) {
977
+ const e = ln();
978
978
  return _e(() => (e.value, !!s()));
979
979
  }
980
- function un(s, e, t = {}) {
981
- const { window: n = rn, ...r } = t;
980
+ function dn(s, e, t = {}) {
981
+ const { window: n = on, ...r } = t;
982
982
  let o;
983
- const a = ln(() => n && "MutationObserver" in n), i = () => {
983
+ const a = un(() => n && "MutationObserver" in n), i = () => {
984
984
  o && (o.disconnect(), o = void 0);
985
985
  }, c = _e(() => {
986
- const p = ee(s), h = tn(p).map(an).filter(Xt);
986
+ const d = ee(s), h = nn(d).map(cn).filter(Zt);
987
987
  return new Set(h);
988
988
  }), l = ye(
989
989
  () => c.value,
990
- (p) => {
991
- i(), a.value && p.size && (o = new MutationObserver(e), p.forEach((h) => o.observe(h, r)));
990
+ (d) => {
991
+ i(), a.value && d.size && (o = new MutationObserver(e), d.forEach((h) => o.observe(h, r)));
992
992
  },
993
993
  { immediate: !0, flush: "post" }
994
994
  ), f = () => o?.takeRecords(), u = () => {
995
995
  l(), i();
996
996
  };
997
- return Qt(u), {
997
+ return Xt(u), {
998
998
  isSupported: a,
999
999
  stop: u,
1000
1000
  takeRecords: f
@@ -1003,38 +1003,38 @@ function un(s, e, t = {}) {
1003
1003
  function pn(s = null, e = {}) {
1004
1004
  var t, n, r;
1005
1005
  const {
1006
- document: o = on,
1006
+ document: o = an,
1007
1007
  restoreOnUnmount: a = (u) => u
1008
- } = e, i = (t = o?.title) != null ? t : "", c = nn((n = s ?? o?.title) != null ? n : null), l = !!(s && typeof s == "function");
1008
+ } = e, i = (t = o?.title) != null ? t : "", c = sn((n = s ?? o?.title) != null ? n : null), l = !!(s && typeof s == "function");
1009
1009
  function f(u) {
1010
1010
  if (!("titleTemplate" in e))
1011
1011
  return u;
1012
- const p = e.titleTemplate || "%s";
1013
- return typeof p == "function" ? p(u) : ee(p).replace(/%s/g, u);
1012
+ const d = e.titleTemplate || "%s";
1013
+ return typeof d == "function" ? d(u) : ee(d).replace(/%s/g, u);
1014
1014
  }
1015
1015
  return ye(
1016
1016
  c,
1017
- (u, p) => {
1018
- u !== p && o && (o.title = f(u ?? ""));
1017
+ (u, d) => {
1018
+ u !== d && o && (o.title = f(u ?? ""));
1019
1019
  },
1020
1020
  { immediate: !0 }
1021
- ), e.observe && !e.titleTemplate && o && !l && un(
1021
+ ), e.observe && !e.titleTemplate && o && !l && dn(
1022
1022
  (r = o.head) == null ? void 0 : r.querySelector("title"),
1023
1023
  () => {
1024
1024
  o && o.title !== c.value && (c.value = f(o.title));
1025
1025
  },
1026
1026
  { childList: !0 }
1027
- ), sn(() => {
1027
+ ), rn(() => {
1028
1028
  if (a) {
1029
1029
  const u = a(i, c.value || "");
1030
1030
  u != null && o && (o.title = u);
1031
1031
  }
1032
1032
  }), c;
1033
1033
  }
1034
- const pe = te({
1034
+ const de = te({
1035
1035
  name: "VtjPageContainer",
1036
1036
  async setup() {
1037
- const s = xe(), e = we(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, o = M(Symbol());
1037
+ const s = Ce(), e = we(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, o = C(Symbol());
1038
1038
  return n && (Object.assign(e.meta, n.meta || {}, { cache: n.cache }), pn(n.title || "VTJ")), {
1039
1039
  provider: s,
1040
1040
  component: r,
@@ -1052,22 +1052,25 @@ const pe = te({
1052
1052
  activated() {
1053
1053
  this.meta.cache === !1 && (this.sid = Symbol());
1054
1054
  }
1055
- }), dn = {
1055
+ }), fn = {
1056
1056
  "data-l-h6o7ki7": "",
1057
1057
  class: "vtj-startup__wrapper"
1058
- }, fn = {
1058
+ }, hn = {
1059
1059
  "data-l-h6o7ki7": "",
1060
1060
  class: "vtj-startup"
1061
- }, hn = {
1061
+ }, mn = {
1062
1062
  "data-l-h6o7ki7": "",
1063
1063
  class: "vtj-startup__name"
1064
- }, mn = { "data-l-h6o7ki7": "" }, gn = {
1064
+ }, gn = {
1065
1065
  "data-l-h6o7ki7": "",
1066
- class: "vtj-startup__tagline"
1066
+ class: "span"
1067
1067
  }, vn = {
1068
+ "data-l-h6o7ki7": "",
1069
+ class: "vtj-startup__tagline"
1070
+ }, yn = {
1068
1071
  "data-l-h6o7ki7": "",
1069
1072
  class: "vtj-startup__actions"
1070
- }, yn = /* @__PURE__ */ te({
1073
+ }, _n = /* @__PURE__ */ te({
1071
1074
  __name: "Startup",
1072
1075
  props: {
1073
1076
  name: { default: "VTJ.PRO" },
@@ -1171,13 +1174,13 @@ const pe = te({
1171
1174
  window.location.href = o;
1172
1175
  }
1173
1176
  };
1174
- return (r, o) => (et(), Ze("div", dn, [
1175
- k("div", fn, [
1176
- k("h1", hn, [
1177
- k("span", mn, J(t.name), 1)
1177
+ return (r, o) => (tt(), et("div", fn, [
1178
+ k("div", hn, [
1179
+ k("h1", mn, [
1180
+ k("span", gn, q(t.name), 1)
1178
1181
  ]),
1179
- k("div", gn, J(t.tagline), 1),
1180
- k("div", vn, [
1182
+ k("div", vn, q(t.tagline), 1),
1183
+ k("div", yn, [
1181
1184
  o[0] || (o[0] = k("span", {
1182
1185
  "data-l-h6o7ki7": "",
1183
1186
  class: "span"
@@ -1186,19 +1189,19 @@ const pe = te({
1186
1189
  "data-l-h6o7ki7": "",
1187
1190
  class: "button",
1188
1191
  onClick: n
1189
- }, J(t.actionText), 1)
1192
+ }, q(t.actionText), 1)
1190
1193
  ])
1191
1194
  ])
1192
1195
  ]));
1193
1196
  }
1194
- }), _n = te({
1197
+ }), wn = te({
1195
1198
  name: "VtjStartupContainer",
1196
1199
  render() {
1197
- return W(yn);
1200
+ return W(_n);
1198
1201
  }
1199
- }), Pe = Symbol("Provider");
1200
- var wn = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(wn || {});
1201
- class Sn extends Ie {
1202
+ }), xe = Symbol("Provider");
1203
+ var Sn = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(Sn || {});
1204
+ class bn extends De {
1202
1205
  constructor(e) {
1203
1206
  super(), this.options = e;
1204
1207
  const {
@@ -1212,10 +1215,10 @@ class Sn extends Ie {
1212
1215
  modules: l = {},
1213
1216
  router: f = null,
1214
1217
  materialPath: u = "./",
1215
- nodeEnv: p = "development"
1218
+ nodeEnv: d = "development"
1216
1219
  /* Development */
1217
1220
  } = e;
1218
- this.mode = n, this.modules = l, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, c), Object.assign(this.adapter, i);
1221
+ this.mode = n, this.modules = l, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = d, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, c), Object.assign(this.adapter, i);
1219
1222
  const { access: h, request: m } = this.adapter;
1220
1223
  h && h.connect({ mode: n, router: f, request: m }), a && n !== y.Design ? this.load(a) : this.project = a;
1221
1224
  }
@@ -1243,18 +1246,18 @@ class Sn extends Ie {
1243
1246
  } catch (o) {
1244
1247
  P.warn("模拟数据模版异常", o);
1245
1248
  }
1246
- return A()?.mock(n);
1249
+ return M()?.mock(n);
1247
1250
  };
1248
1251
  }
1249
1252
  async load(e) {
1250
1253
  const t = this.modules[`.vtj/projects/${e.id}.json`];
1251
- if (this.project = t ? await t() : await this.service.init(e), !this.project)
1254
+ if (console.log("load", this.modules, t), this.project = t ? await t() : await this.service.init(e), !this.project)
1252
1255
  throw new Error("project is null");
1253
1256
  const { apis: n = [], meta: r = [] } = this.project, o = window;
1254
- o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = St(n, r, this.adapter), $e(), bt(n), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1257
+ o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = bt(n, r, this.adapter), ke(o), jt(n, o), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1255
1258
  }
1256
1259
  initMock(e) {
1257
- const t = A(e);
1260
+ const t = M(e);
1258
1261
  t && t.setup({
1259
1262
  timeout: "50-500"
1260
1263
  });
@@ -1270,40 +1273,40 @@ class Sn extends Ie {
1270
1273
  libraryMap: l,
1271
1274
  materials: f,
1272
1275
  materialExports: u,
1273
- materialMapLibrary: p
1274
- } = ct(
1276
+ materialMapLibrary: d
1277
+ } = lt(
1275
1278
  t,
1276
1279
  a,
1277
1280
  i === "development"
1278
1281
  /* Development */
1279
1282
  );
1280
1283
  for (const h of c) {
1281
- const m = n[h], d = e[h];
1282
- if (d)
1283
- r[h] = d;
1284
+ const m = n[h], p = e[h];
1285
+ if (p)
1286
+ r[h] = p;
1284
1287
  else if (m)
1285
1288
  e[h] = r[h] = await m();
1286
1289
  else {
1287
1290
  const w = l[h] || [];
1288
1291
  for (const g of w)
1289
- ne(g) && await ut(h, R.append(g, { v: x })), se(g) && await ce(R.append(g, { v: x }));
1292
+ ne(g) && await dt(h, R.append(g, { v: J })), se(g) && await ce(R.append(g, { v: J }));
1290
1293
  r[h] = e[h];
1291
1294
  }
1292
1295
  }
1293
1296
  if (i === "development") {
1294
1297
  for (const m of f)
1295
- await ce(R.append(m, { v: x }));
1298
+ await ce(R.append(m, { v: J }));
1296
1299
  const h = this.materials || {};
1297
1300
  for (const m of u) {
1298
- const d = e[p[m]], w = De[m];
1301
+ const p = e[d[m]], w = He[m];
1299
1302
  if (w)
1300
- d && w.forEach((g) => {
1301
- o[g] = d[g];
1303
+ p && w.forEach((g) => {
1304
+ o[g] = p[g];
1302
1305
  });
1303
1306
  else {
1304
1307
  const g = h[m] ? (await h[m]()).default : e[m];
1305
- g && d && (g.components || []).forEach((S) => {
1306
- o[S.name] = lt(S, d);
1308
+ g && p && (g.components || []).forEach((S) => {
1309
+ o[S.name] = ut(S, p);
1307
1310
  });
1308
1311
  }
1309
1312
  }
@@ -1318,21 +1321,21 @@ class Sn extends Ie {
1318
1321
  routeMeta: c
1319
1322
  } = n, l = a ? "" : "/", f = {
1320
1323
  path: `${l}${i}/:id`,
1321
- name: C,
1322
- component: pe
1324
+ name: x,
1325
+ component: de
1323
1326
  }, u = {
1324
1327
  path: l,
1325
- name: H,
1326
- component: t?.homepage ? pe : r.startupComponent || _n,
1328
+ name: D,
1329
+ component: t?.homepage ? de : r.startupComponent || wn,
1327
1330
  meta: c
1328
1331
  };
1329
- e.hasRoute(C) && e.removeRoute(C), e.hasRoute(H) && e.removeRoute(H), a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1332
+ e.hasRoute(x) && e.removeRoute(x), e.hasRoute(D) && e.removeRoute(D), a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1330
1333
  }
1331
1334
  install(e) {
1332
1335
  const t = e.config.globalProperties.installed || {};
1333
1336
  for (const [n, r] of Object.entries(this.library))
1334
- !t[n] && ft(r) && (e.use(r), t[n] = !0);
1335
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Pe, this), e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (n, r, o) => {
1337
+ !t[n] && ht(r) && (e.use(r), t[n] = !0);
1338
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(xe, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (n, r, o) => {
1336
1339
  const a = r?.$options.name, i = typeof n == "string" ? n : n?.message || n?.msg || "未知错误", c = `[ ${a} ] ${i} ${o}`;
1337
1340
  console.error(
1338
1341
  "[VTJ Error]:",
@@ -1420,18 +1423,18 @@ class Sn extends Ie {
1420
1423
  });
1421
1424
  }
1422
1425
  definePluginComponent(e) {
1423
- return le(async () => await ke(e, window));
1426
+ return le(async () => await Ee(e, window));
1424
1427
  }
1425
1428
  }
1426
- function Dn(s) {
1427
- const e = new Sn(s);
1429
+ function Hn(s) {
1430
+ const e = new bn(s);
1428
1431
  return {
1429
1432
  provider: e,
1430
1433
  onReady: (n) => e.ready(n)
1431
1434
  };
1432
1435
  }
1433
- function xe(s = {}) {
1434
- const e = ge(Pe);
1436
+ function Ce(s = {}) {
1437
+ const e = ge(xe, null);
1435
1438
  if (!e)
1436
1439
  throw new Error("Can not find provider");
1437
1440
  if (e.nodeEnv === "development") {
@@ -1447,13 +1450,13 @@ function xe(s = {}) {
1447
1450
  }
1448
1451
  return e;
1449
1452
  }
1450
- const Ce = {
1453
+ const Me = {
1451
1454
  type: "json",
1452
1455
  validSuccess: !0,
1453
1456
  originResponse: !1,
1454
1457
  failMessage: !0,
1455
1458
  validate: (s) => s.data?.code === 0
1456
- }, bn = (s, e = "/__vtj__/api/:type.json") => (t, n, r) => s.send({
1459
+ }, jn = (s, e = "/__vtj__/api/:type.json") => (t, n, r) => s.send({
1457
1460
  url: e,
1458
1461
  method: "post",
1459
1462
  params: { type: t },
@@ -1462,8 +1465,8 @@ const Ce = {
1462
1465
  type: t,
1463
1466
  data: n
1464
1467
  },
1465
- settings: Ce
1466
- }), jn = (s, e = "/__vtj__/api/uploader.json") => async (t, n) => await s.send({
1468
+ settings: Me
1469
+ }), $n = (s, e = "/__vtj__/api/uploader.json") => async (t, n) => await s.send({
1467
1470
  url: e,
1468
1471
  method: "post",
1469
1472
  data: {
@@ -1471,11 +1474,11 @@ const Ce = {
1471
1474
  projectId: n
1472
1475
  },
1473
1476
  settings: {
1474
- ...Ce,
1477
+ ...Me,
1475
1478
  type: "data"
1476
1479
  }
1477
1480
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1478
- function Hn(s) {
1481
+ function On(s) {
1479
1482
  return he({
1480
1483
  settings: {
1481
1484
  type: "json",
@@ -1494,7 +1497,7 @@ class re {
1494
1497
  pluginCaches = {};
1495
1498
  uploader;
1496
1499
  constructor(e = K) {
1497
- this.api = bn(e), this.uploader = jn(e);
1500
+ this.api = jn(e), this.uploader = $n(e);
1498
1501
  }
1499
1502
  async getExtension() {
1500
1503
  console.log("BaseService.getExtension");
@@ -1569,7 +1572,7 @@ class re {
1569
1572
  return await this.api("clearStaticFiles", e).catch(() => "");
1570
1573
  }
1571
1574
  async getPluginMaterial(e) {
1572
- const { urls: t = [] } = e, n = t.filter((o) => it(o))[0];
1575
+ const { urls: t = [] } = e, n = t.filter((o) => at(o))[0];
1573
1576
  if (!n) return null;
1574
1577
  const r = this.pluginCaches[n];
1575
1578
  return r || (this.pluginCaches[n] = K.send({
@@ -1585,18 +1588,18 @@ class re {
1585
1588
  return console.log("BaseService.genSource", e), "";
1586
1589
  }
1587
1590
  }
1588
- const v = new ze({
1591
+ const v = new Ve({
1589
1592
  type: "local",
1590
1593
  expired: 0,
1591
1594
  prefix: "__VTJ_"
1592
1595
  });
1593
- class On extends re {
1596
+ class Bn extends re {
1594
1597
  init(e) {
1595
- const t = new O(e), n = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1598
+ const t = new H(e), n = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1596
1599
  return v.save(`project_${t.id}`, r), Promise.resolve(r);
1597
1600
  }
1598
1601
  saveProject(e) {
1599
- const t = new O(e);
1602
+ const t = new H(e);
1600
1603
  return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1601
1604
  }
1602
1605
  saveMaterials(e, t) {
@@ -1624,7 +1627,7 @@ class On extends re {
1624
1627
  return Promise.resolve(!0);
1625
1628
  }
1626
1629
  getHistory(e) {
1627
- const t = v.get(`history_${e}`), n = new de(t || { id: e });
1630
+ const t = v.get(`history_${e}`), n = new pe(t || { id: e });
1628
1631
  return Promise.resolve(n.toDsl());
1629
1632
  }
1630
1633
  getHistoryItem(e, t) {
@@ -1640,18 +1643,18 @@ class On extends re {
1640
1643
  }), Promise.resolve(!0);
1641
1644
  }
1642
1645
  }
1643
- class $n extends re {
1646
+ class kn extends re {
1644
1647
  projects = {};
1645
1648
  materials = {};
1646
1649
  files = {};
1647
1650
  histories = {};
1648
1651
  historyItems = {};
1649
1652
  init(e) {
1650
- const t = new O(e), n = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), n);
1653
+ const t = new H(e), n = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), n);
1651
1654
  return this.projects[r.id] = r, Promise.resolve(r);
1652
1655
  }
1653
1656
  saveProject(e) {
1654
- const t = new O(e);
1657
+ const t = new H(e);
1655
1658
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1656
1659
  }
1657
1660
  saveMaterials(e, t) {
@@ -1679,7 +1682,7 @@ class $n extends re {
1679
1682
  return Promise.resolve(!0);
1680
1683
  }
1681
1684
  getHistory(e) {
1682
- const t = this.histories[e], n = new de(t || { id: e });
1685
+ const t = this.histories[e], n = new pe(t || { id: e });
1683
1686
  return Promise.resolve(n);
1684
1687
  }
1685
1688
  getHistoryItem(e, t) {
@@ -1697,11 +1700,11 @@ class $n extends re {
1697
1700
  }), Promise.resolve(!0);
1698
1701
  }
1699
1702
  }
1700
- let D = null;
1701
- function Bn() {
1702
- return D || (D = new $n(), D);
1703
+ let I = null;
1704
+ function Nn() {
1705
+ return I || (I = new kn(), I);
1703
1706
  }
1704
- class Nn extends re {
1707
+ class Un extends re {
1705
1708
  getFileCaches = {};
1706
1709
  async getExtension() {
1707
1710
  return await this.api("getExtension", {}).catch(() => {
@@ -1758,7 +1761,7 @@ class Nn extends re {
1758
1761
  );
1759
1762
  }
1760
1763
  }
1761
- function Me(s, e, t = []) {
1764
+ function Ae(s, e, t = []) {
1762
1765
  return t.map((n) => {
1763
1766
  const { id: r, title: o, icon: a, children: i, hidden: c } = n;
1764
1767
  return {
@@ -1767,39 +1770,39 @@ function Me(s, e, t = []) {
1767
1770
  icon: a,
1768
1771
  hidden: c,
1769
1772
  url: `${s}/${e}/${r}`,
1770
- children: i && i.length ? Me(s, e, i) : void 0
1773
+ children: i && i.length ? Ae(s, e, i) : void 0
1771
1774
  };
1772
1775
  });
1773
1776
  }
1774
- function Ae(s, e) {
1777
+ function Fe(s, e) {
1775
1778
  if (!e) return s;
1776
1779
  let t = [];
1777
1780
  for (const n of s)
1778
1781
  if (n.children && n.children.length) {
1779
- const r = Ae(n.children, e);
1782
+ const r = Fe(n.children, e);
1780
1783
  r.length && (n.children = r, t.push(n));
1781
1784
  } else
1782
1785
  e.can(n.id.toString()) && t.push(n);
1783
1786
  return t;
1784
1787
  }
1785
- function Un(s) {
1788
+ function Ln(s) {
1786
1789
  const {
1787
1790
  menuPathPrefix: e = "",
1788
1791
  pageRouteName: t = "page",
1789
1792
  disableMenusFilter: n = !1
1790
- } = s || {}, r = xe(), o = we(), a = yt(), i = M(!1), c = M(!1), l = r.project;
1791
- tt(() => {
1792
- const { name: p, params: h, meta: m } = o;
1793
- if (p === C) {
1794
- const d = r.getPage(h.id);
1795
- i.value = !d?.mask, c.value = !!d?.pure;
1796
- } else if (p === H) {
1797
- const d = r.getHomepage();
1798
- i.value = !d?.mask, c.value = !!d?.pure;
1793
+ } = s || {}, r = Ce(), o = we(), a = _t(), i = C(!1), c = C(!1), l = r.project;
1794
+ nt(() => {
1795
+ const { name: d, params: h, meta: m } = o;
1796
+ if (d === x) {
1797
+ const p = r.getPage(h.id);
1798
+ i.value = !p?.mask, c.value = !!p?.pure;
1799
+ } else if (d === D) {
1800
+ const p = r.getHomepage();
1801
+ i.value = !p?.mask, c.value = !!p?.pure;
1799
1802
  } else
1800
1803
  i.value = !m.mask, c.value = !!m.pure;
1801
1804
  });
1802
- const f = Me(
1805
+ const f = Ae(
1803
1806
  e,
1804
1807
  t,
1805
1808
  l?.pages
@@ -1809,76 +1812,76 @@ function Un(s) {
1809
1812
  logo: u?.logo,
1810
1813
  themeSwitchable: u?.themeSwitchable,
1811
1814
  title: u?.title || l?.description || l?.name || "VTJ App",
1812
- menus: n ? f : Ae(f, a),
1815
+ menus: n ? f : Fe(f, a),
1813
1816
  pure: c
1814
1817
  };
1815
1818
  }
1816
1819
  export {
1817
- je as ACCESS_KEY,
1818
- Fn as Access,
1819
- ot as BUILD_IN_TAGS,
1820
- nt as BUILT_IN_DIRECTIVES,
1820
+ $e as ACCESS_KEY,
1821
+ Tn as Access,
1822
+ it as BUILD_IN_TAGS,
1823
+ st as BUILT_IN_DIRECTIVES,
1821
1824
  re as BaseService,
1822
1825
  ue as CONTEXT_HOST,
1823
- kt as Context,
1826
+ Et as Context,
1824
1827
  y as ContextMode,
1825
- st as DATA_TYPES,
1826
- H as HOMEPAGE_ROUTE_NAME,
1827
- rt as HTML_TAGS,
1828
- An as JSCodeToString,
1829
- xn as LIFE_CYCLES_LIST,
1830
- Nn as LocalService,
1831
- $n as MemoryService,
1832
- wn as NodeEnv,
1833
- C as PAGE_ROUTE_NAME,
1834
- Sn as Provider,
1835
- yn as Startup,
1836
- On as StorageService,
1837
- x as VTJ_RENDERER_VERSION,
1838
- be as adoptedStyleSheets,
1839
- In as clearLoaderCache,
1840
- Tn as createAdapter,
1841
- Cn as createAssetScripts,
1842
- Mn as createAssetsCss,
1843
- At as createDataSources,
1828
+ rt as DATA_TYPES,
1829
+ D as HOMEPAGE_ROUTE_NAME,
1830
+ ot as HTML_TAGS,
1831
+ Fn as JSCodeToString,
1832
+ Cn as LIFE_CYCLES_LIST,
1833
+ Un as LocalService,
1834
+ kn as MemoryService,
1835
+ Sn as NodeEnv,
1836
+ x as PAGE_ROUTE_NAME,
1837
+ bn as Provider,
1838
+ _n as Startup,
1839
+ Bn as StorageService,
1840
+ Se as VTJ_RENDERER_VERSION,
1841
+ je as adoptedStyleSheets,
1842
+ Dn as clearLoaderCache,
1843
+ In as createAdapter,
1844
+ Mn as createAssetScripts,
1845
+ An as createAssetsCss,
1846
+ Ft as createDataSources,
1844
1847
  Q as createLoader,
1845
- Bn as createMemoryService,
1846
- wt as createMetaApi,
1847
- jt as createMock,
1848
- Dn as createProvider,
1848
+ Nn as createMemoryService,
1849
+ St as createMetaApi,
1850
+ $t as createMock,
1851
+ Hn as createProvider,
1849
1852
  Y as createRenderer,
1850
- _t as createSchemaApi,
1851
- St as createSchemaApis,
1852
- Hn as createServiceRequest,
1853
- It as defaultLoader,
1854
- I as fillBasePath,
1855
- A as getMock,
1856
- Ee as getModifiers,
1857
- ke as getPlugin,
1858
- lt as getRawComponent,
1859
- ht as isBuiltInTag,
1853
+ wt as createSchemaApi,
1854
+ bt as createSchemaApis,
1855
+ On as createServiceRequest,
1856
+ Dt as defaultLoader,
1857
+ T as fillBasePath,
1858
+ M as getMock,
1859
+ Re as getModifiers,
1860
+ Ee as getPlugin,
1861
+ ut as getRawComponent,
1862
+ mt as isBuiltInTag,
1860
1863
  ne as isCSSUrl,
1861
- gt as isJSCode,
1864
+ vt as isJSCode,
1862
1865
  _ as isJSExpression,
1863
- T as isJSFunction,
1864
- it as isJSON,
1866
+ F as isJSFunction,
1867
+ at as isJSON,
1865
1868
  se as isJSUrl,
1866
- mt as isNativeTag,
1867
- ft as isVuePlugin,
1868
- ut as loadCss,
1869
+ gt as isNativeTag,
1870
+ ht as isVuePlugin,
1871
+ dt as loadCss,
1869
1872
  pt as loadCssUrl,
1870
- dt as loadScriptUrl,
1871
- $t as mockApi,
1872
- bt as mockApis,
1873
- $e as mockCleanup,
1874
- B as nodeRender,
1875
- ct as parseDeps,
1876
- F as parseExpression,
1873
+ ft as loadScriptUrl,
1874
+ kt as mockApi,
1875
+ jt as mockApis,
1876
+ ke as mockCleanup,
1877
+ O as nodeRender,
1878
+ lt as parseDeps,
1879
+ A as parseExpression,
1877
1880
  G as parseFunction,
1878
- Pe as providerKey,
1879
- at as removeProdFlag,
1880
- Se as toString,
1881
- yt as useAccess,
1882
- Un as useMask,
1883
- xe as useProvider
1881
+ xe as providerKey,
1882
+ ct as removeProdFlag,
1883
+ be as toString,
1884
+ _t as useAccess,
1885
+ Ln as useMask,
1886
+ Ce as useProvider
1884
1887
  };