epic-designer-gold 0.0.19 → 0.0.20

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.
Files changed (31) hide show
  1. package/dist/{attributeView-xFHazPhU.cjs → attributeView-CBU2cmHF.cjs} +1 -1
  2. package/dist/{attributeView-B9F_UkWB.js → attributeView-ukvra0JR.js} +1 -1
  3. package/dist/{eventView-B17FncUM.js → eventView-CxT-MCmM.js} +1 -1
  4. package/dist/{eventView-DcUUt0wC.cjs → eventView-DPBh2jJb.cjs} +1 -1
  5. package/dist/{index-LveNbnCD.js → index-Boh9Xc_a.js} +1 -1
  6. package/dist/{index-D7JjJy3L.cjs → index-Bp5jwkKr.cjs} +1 -1
  7. package/dist/index-C7VIh0HN.js +4 -0
  8. package/dist/{index-BPJ67Apd.js → index-CGN7CLXA.js} +1 -1
  9. package/dist/{index-QM5lUp_E.cjs → index-CYS9fPUv.cjs} +1 -1
  10. package/dist/index-CgHkcwzW.cjs +10 -0
  11. package/dist/{index-DJ9FhHey.js → index-CrK_IhiA.js} +1 -1
  12. package/dist/{index-CILvmkry.cjs → index-D3mt_EWz.cjs} +1 -1
  13. package/dist/{index-h3vbgf9-.cjs → index-DCLSI4pq.cjs} +1 -1
  14. package/dist/{index-5T_iXdMV.cjs → index-DK8A_Wv1.cjs} +1 -1
  15. package/dist/{index-Cm3Jcpcv.cjs → index-DL78CTyg.cjs} +1 -1
  16. package/dist/{index-Z9miUEWt.js → index-DMYNC73J.js} +1 -1
  17. package/dist/{index-D38KoL_8.js → index-Dz7IFRkI.js} +1 -1
  18. package/dist/{index-Cn31n9Ni.js → index-O79tvUa3.js} +1 -1
  19. package/dist/{index-CBD1g29V.js → index-YMEmD-hy.js} +1 -1
  20. package/dist/{index-Cs7FieAs.js → index-Z9U61tAn.js} +485 -515
  21. package/dist/{index-CqegmH7K.js → index-aHQ5toGq.js} +1 -1
  22. package/dist/{index-BvgsMQ0r.cjs → index-bo3mlsNv.cjs} +1 -1
  23. package/dist/{index-X5HbU9iP.cjs → index-c0bxi-CF.cjs} +1 -1
  24. package/dist/{index-BmnjsvG9.cjs → index-jOD8Jnq_.cjs} +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/{styleView-CGX70aZc.cjs → styleView-CCzd_7fc.cjs} +1 -1
  28. package/dist/{styleView-B_GTo5jT.js → styleView-OSZZjuEF.js} +1 -1
  29. package/package.json +1 -1
  30. package/dist/index-Cy_xP_CE.js +0 -4
  31. package/dist/index-w0VNJWNM.cjs +0 -10
@@ -1,6 +1,6 @@
1
- import { ref as I, reactive as X, defineComponent as j, openBlock as M, createBlock as z, unref as _, mergeProps as ve, withCtx as P, renderSlot as R, getCurrentInstance as ae, inject as H, watch as O, useAttrs as _e, provide as $, shallowRef as Pe, computed as U, watchEffect as ie, onUnmounted as Ae, resolveComponent as Oe, resolveDynamicComponent as Ve, createVNode as T, createCommentVNode as De, useSlots as Fe, createElementBlock as ye, Suspense as ke, createElementVNode as L, Fragment as Me, renderList as Re, nextTick as te, effectScope as $e, isRef as Ne, getCurrentScope as Be, onScopeDispose as Ue, onMounted as we, normalizeClass as Te, toRaw as Se } from "vue";
2
- import { p as F, a as ge, l as Y, E as pe } from "./axios-ITY6Uw7A.js";
3
- function ce(e = 10) {
1
+ import { ref as A, reactive as Q, defineComponent as Y, openBlock as R, createBlock as z, unref as C, mergeProps as he, withCtx as P, renderSlot as $, getCurrentInstance as ae, inject as K, watch as O, useAttrs as _e, provide as N, shallowRef as Pe, computed as T, watchEffect as se, onUnmounted as Se, resolveComponent as Oe, resolveDynamicComponent as Ve, createVNode as L, createCommentVNode as Ae, useSlots as Fe, createElementBlock as ve, Suspense as De, createElementVNode as J, Fragment as Me, renderList as Re, nextTick as j, effectScope as $e, isRef as Ne, getCurrentScope as Be, onScopeDispose as Ue, onMounted as ye, normalizeClass as Te, toRaw as we } from "vue";
2
+ import { p as F, a as be, l as G, E as fe } from "./axios-ITY6Uw7A.js";
3
+ function le(e = 10) {
4
4
  const a = "abcdefghijklmnopqrstuvwxyz0123456789";
5
5
  let n = "";
6
6
  for (let o = 0; o < e; o++) {
@@ -9,44 +9,44 @@ function ce(e = 10) {
9
9
  }
10
10
  return n;
11
11
  }
12
- function ze(e) {
12
+ function Le(e) {
13
13
  return e.charAt(0).toUpperCase() + e.slice(1);
14
14
  }
15
- function N(e, a = /* @__PURE__ */ new WeakMap()) {
15
+ function B(e, a = /* @__PURE__ */ new WeakMap()) {
16
16
  if (typeof e != "object" || e === null)
17
17
  return e;
18
18
  if (a.has(e))
19
19
  return a.get(e);
20
20
  if (Array.isArray(e)) {
21
- const o = e.map((t) => N(t, a));
21
+ const o = e.map((t) => B(t, a));
22
22
  return a.set(e, o), o;
23
23
  }
24
24
  const n = {};
25
25
  return a.set(e, n), Object.keys(e).forEach((o) => {
26
- n[o] = N(e[o], a);
26
+ n[o] = B(e[o], a);
27
27
  }), n;
28
28
  }
29
29
  function Ot(e) {
30
- const [a] = We([N(e)], (n) => {
30
+ const [a] = We([B(e)], (n) => {
31
31
  var t, r;
32
32
  const o = {
33
33
  ...n,
34
- id: `${n.type}_${ce(8)}`
34
+ id: `${n.type}_${le(8)}`
35
35
  };
36
36
  return (o.field || o.input) && !((r = (t = F.getComponentConfingByType(o.type)) == null ? void 0 : t.editConstraints) != null && r.fixedField) && (o.field = o.id), o;
37
37
  });
38
38
  return a;
39
39
  }
40
- function J(e, a, n = !0) {
40
+ function W(e, a, n = !0) {
41
41
  for (const [o, t] of Object.entries(a)) {
42
42
  let r = e == null ? void 0 : e[o];
43
- r && t && typeof r == "object" && typeof t == "object" ? (Array.isArray(r) && !Array.isArray(t) ? r = e[o] = {} : !Array.isArray(r) && Array.isArray(t) && (r = e[o] = []), J(r, t, n)) : e[o] = t;
43
+ r && t && typeof r == "object" && typeof t == "object" ? (Array.isArray(r) && !Array.isArray(t) ? r = e[o] = {} : !Array.isArray(r) && Array.isArray(t) && (r = e[o] = []), W(r, t, n)) : e[o] = t;
44
44
  }
45
45
  n && Object.keys(e).reverse().forEach((o) => {
46
46
  a.hasOwnProperty(o) || (Array.isArray(e) ? e.splice(Number(o), 1) : delete e[o]);
47
47
  });
48
48
  }
49
- function Ie(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
49
+ function Ee(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
50
50
  const t = (r) => {
51
51
  if (Array.isArray(r))
52
52
  return r.map(t);
@@ -54,16 +54,16 @@ function Ie(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
54
54
  if (o.has(r))
55
55
  return "[Circular]";
56
56
  o.set(r, !0);
57
- const l = Object.keys(r).sort(), c = {};
57
+ const l = Object.keys(r).sort(), i = {};
58
58
  return l.forEach((u) => {
59
- n.includes(u) || (c[u] = t(r[u]));
60
- }), o.delete(r), c;
59
+ n.includes(u) || (i[u] = t(r[u]));
60
+ }), o.delete(r), i;
61
61
  } else
62
62
  return r;
63
63
  };
64
64
  return JSON.stringify(t(e)) === JSON.stringify(t(a));
65
65
  }
66
- function Le(e, a) {
66
+ function ze(e, a) {
67
67
  const n = [];
68
68
  let o = !1;
69
69
  function t(r) {
@@ -72,7 +72,7 @@ function Le(e, a) {
72
72
  ;
73
73
  if (!o && r.slots)
74
74
  for (let l in r.slots)
75
- for (let c = 0; c < r.slots[l].length && (t(r.slots[l][c]), !o); c++)
75
+ for (let i = 0; i < r.slots[l].length && (t(r.slots[l][i]), !o); i++)
76
76
  ;
77
77
  o || n.pop();
78
78
  }
@@ -121,8 +121,8 @@ function oe(e, a, n = !1, o) {
121
121
  for (; r.length; ) {
122
122
  const l = r.pop();
123
123
  if (l != null && l.children && (!o || o(l)) && r.push(...l.children), l != null && l.slots && (!o || o(l)))
124
- for (let c in l.slots)
125
- r.push(...l.slots[c]);
124
+ for (let i in l.slots)
125
+ r.push(...l.slots[i]);
126
126
  if (a(l) && (t.push(l), n))
127
127
  return l;
128
128
  }
@@ -135,7 +135,7 @@ function We(e, a, n) {
135
135
  if (t != null && t.children && (!n || n(t)) && o.push(...t.children), t != null && t.slots && (!n || n(t)))
136
136
  for (let r in t.slots)
137
137
  o.push(...t.slots[r]);
138
- J(t, a(t));
138
+ W(t, a(t));
139
139
  }
140
140
  return e;
141
141
  }
@@ -159,9 +159,9 @@ function $t(e, a) {
159
159
  if (r != null && r.slots)
160
160
  for (let l in r.slots) {
161
161
  t = r.slots[l];
162
- for (let c = 0; c < t.length; c++)
163
- if (t[c].id === a)
164
- return o = c, !0;
162
+ for (let i = 0; i < t.length; i++)
163
+ if (t[i].id === a)
164
+ return o = i, !0;
165
165
  }
166
166
  return !1;
167
167
  }
@@ -205,7 +205,7 @@ function Nt(e) {
205
205
  size: e.config.size || "middle"
206
206
  },
207
207
  children: [],
208
- id: "form_" + ce()
208
+ id: "form_" + le()
209
209
  }
210
210
  ],
211
211
  componentProps: {
@@ -221,7 +221,7 @@ function Nt(e) {
221
221
  }
222
222
  function ne(e, a) {
223
223
  return e.map((n) => {
224
- var u, w, f;
224
+ var u, w, d;
225
225
  let o = n.type ?? "";
226
226
  const t = n.options ?? {}, r = (s, b) => {
227
227
  o === s && (o = b, t.defaultValue && (t.defaultValue = JSON.parse(t.defaultValue)));
@@ -230,7 +230,7 @@ function ne(e, a) {
230
230
  const { minRows: s, maxRows: b } = t;
231
231
  t.autoSize = { minRows: s, maxRows: b }, delete t.minRows, delete t.maxRows;
232
232
  }
233
- o === "number" && !t.precision && delete t.precision, t.width && (t.style = { width: t.width }, delete t.width), o === "grid" && (o = "row"), a && a.type === "grid" && (o = "col", t.span = n.span, n.key = ce());
233
+ o === "number" && !t.precision && delete t.precision, t.width && (t.style = { width: t.width }, delete t.width), o === "grid" && (o = "row"), a && a.type === "grid" && (o = "col", t.span = n.span, n.key = le());
234
234
  const l = {
235
235
  label: n.label,
236
236
  type: o,
@@ -255,7 +255,7 @@ function ne(e, a) {
255
255
  "color-picker",
256
256
  "upload-file",
257
257
  "upload-image"
258
- ].includes(o) && (l.input = !0, ((w = (u = n.rules) == null ? void 0 : u[0]) == null ? void 0 : w.required) === !1 && n.rules.shift(), ((f = n.rules) == null ? void 0 : f.length) > 0 && (l.rules = n.rules)), n.list && (l.children = ne(n.list, n)), n.columns && (l.children = ne(n.columns, n)), n.trs && (l.children = ne(n.trs, n)), n.tds && (l.children = ne(n.tds, n)), l;
258
+ ].includes(o) && (l.input = !0, ((w = (u = n.rules) == null ? void 0 : u[0]) == null ? void 0 : w.required) === !1 && n.rules.shift(), ((d = n.rules) == null ? void 0 : d.length) > 0 && (l.rules = n.rules)), n.list && (l.children = ne(n.list, n)), n.columns && (l.children = ne(n.columns, n)), n.trs && (l.children = ne(n.trs, n)), n.tds && (l.children = ne(n.tds, n)), l;
259
259
  });
260
260
  }
261
261
  function Bt(e, a) {
@@ -266,106 +266,106 @@ function Bt(e, a) {
266
266
  }, a);
267
267
  };
268
268
  }
269
- function Ee() {
270
- const e = I({}), a = I({}), n = I(!1), o = I([]), t = X({});
269
+ function ke() {
270
+ const e = A({}), a = A({}), n = A(!1), o = A([]), t = Q({});
271
271
  function r(m) {
272
272
  return e.value[m];
273
273
  }
274
274
  function l(m, g) {
275
275
  e.value[m] = g;
276
276
  }
277
- function c(m) {
277
+ function i(m) {
278
278
  delete e.value[m];
279
279
  }
280
280
  function u(m, g = !1) {
281
- const h = Object.entries(F.publicMethods).reduce(
282
- (x, [V, B]) => (x[V] = B.handler, x),
281
+ const y = Object.entries(F.publicMethods).reduce(
282
+ (E, [V, U]) => (E[V] = U.handler, E),
283
283
  {}
284
284
  );
285
285
  try {
286
286
  new Function(`const epic = this;${m}`).bind({
287
- ...h,
287
+ ...y,
288
288
  getComponent: r,
289
289
  find: r,
290
290
  defineExpose: w,
291
- publicMethods: h,
291
+ publicMethods: y,
292
292
  pluginManager: F
293
293
  })();
294
- } catch (x) {
295
- g && console.error("[epic:自定义函数]异常:", x);
294
+ } catch (E) {
295
+ g && console.error("[epic:自定义函数]异常:", E);
296
296
  }
297
297
  }
298
298
  function w(m) {
299
299
  m != null && (a.value = m);
300
300
  }
301
- function f(m, ...g) {
301
+ function d(m, ...g) {
302
302
  if (!m || m.length === 0) {
303
303
  console.warn("未提供任何动作");
304
304
  return;
305
305
  }
306
- m.forEach((h) => {
307
- const x = h.args ? JSON.parse(h.args) : g;
308
- switch (h.type) {
306
+ m.forEach((y) => {
307
+ const E = y.args ? JSON.parse(y.args) : g;
308
+ switch (y.type) {
309
309
  case "public":
310
- s(h, x);
310
+ s(y, E);
311
311
  break;
312
312
  case "custom":
313
- b(h, x);
313
+ b(y, E);
314
314
  break;
315
315
  case "component":
316
- d(h, x);
316
+ c(y, E);
317
317
  break;
318
318
  default:
319
- console.warn(`未知的动作类型: ${h.type}`);
319
+ console.warn(`未知的动作类型: ${y.type}`);
320
320
  break;
321
321
  }
322
322
  });
323
323
  }
324
324
  function s(m, g) {
325
- var h;
325
+ var y;
326
326
  try {
327
- (h = F.publicMethods[m.methodName]) == null || h.handler(...g);
328
- } catch (x) {
329
- console.error(`[Epic:公共函数(${m.methodName})]执行异常:`, x);
327
+ (y = F.publicMethods[m.methodName]) == null || y.handler(...g);
328
+ } catch (E) {
329
+ console.error(`[Epic:公共函数(${m.methodName})]执行异常:`, E);
330
330
  }
331
331
  }
332
332
  function b(m, g) {
333
- var h, x;
333
+ var y, E;
334
334
  try {
335
- (x = (h = a.value)[m.methodName]) == null || x.call(h, ...g);
335
+ (E = (y = a.value)[m.methodName]) == null || E.call(y, ...g);
336
336
  } catch (V) {
337
337
  console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`, V);
338
338
  }
339
339
  }
340
- function d(m, g) {
341
- const h = m.componentId != null && r(m.componentId);
342
- if (!h) {
340
+ function c(m, g) {
341
+ const y = m.componentId != null && r(m.componentId);
342
+ if (!y) {
343
343
  console.warn(`[Epic:组件${m.componentId}]未找到`);
344
344
  return;
345
345
  }
346
346
  try {
347
- h[m.methodName](...g);
348
- } catch (x) {
349
- console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`, x);
347
+ y[m.methodName](...g);
348
+ } catch (E) {
349
+ console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`, E);
350
350
  }
351
351
  }
352
- function p(m = !0) {
352
+ function v(m = !0) {
353
353
  n.value = m;
354
354
  }
355
- function v(m) {
355
+ function p(m) {
356
356
  const g = oe(m, () => !0);
357
- o.value = g.map((h) => h.id);
357
+ o.value = g.map((y) => y.id);
358
358
  }
359
- function S(m, g = "default") {
359
+ function h(m, g = "default") {
360
360
  if (t[g]) {
361
- const h = t[g];
362
- J(m, h);
361
+ const y = t[g];
362
+ W(m, y);
363
363
  }
364
364
  t[g] = m;
365
365
  }
366
- function A(m, g = "default") {
366
+ function x(m, g = "default") {
367
367
  if (t[g]) {
368
- J(t[g], m, !1);
368
+ W(t[g], m, !1);
369
369
  return;
370
370
  }
371
371
  t[g] = m;
@@ -376,25 +376,25 @@ function Ee() {
376
376
  isDesignMode: n,
377
377
  defaultComponentIds: o,
378
378
  forms: t,
379
- addFormData: S,
380
- setFormData: A,
379
+ addFormData: h,
380
+ setFormData: x,
381
381
  getComponentInstance: r,
382
382
  // 简化查询函数, 推荐使用
383
383
  find: r,
384
384
  addComponentInstance: l,
385
- removeComponentInstance: c,
385
+ removeComponentInstance: i,
386
386
  setMethods: u,
387
- doActions: f,
388
- setDesignMode: p,
389
- setDefaultComponentIds: v
387
+ doActions: d,
388
+ setDesignMode: v,
389
+ setDefaultComponentIds: p
390
390
  };
391
391
  }
392
392
  function He() {
393
- const e = I([]), a = I([]), n = I(null);
393
+ const e = A([]), a = A([]), n = A(null);
394
394
  let o = 0;
395
395
  function t(u, w = "插入组件") {
396
- const f = Date.now();
397
- o + 150 > f || (o = f, n.value != null && (e.value.push(n.value), a.value.splice(0, a.value.length)), n.value = {
396
+ const d = Date.now();
397
+ o + 150 > d || (o = d, n.value != null && (e.value.push(n.value), a.value.splice(0, a.value.length)), n.value = {
398
398
  type: w,
399
399
  componentSchema: JSON.stringify(u)
400
400
  }, e.value.length > 60 && e.value.unshift());
@@ -411,7 +411,7 @@ function He() {
411
411
  const u = a.value.pop();
412
412
  return n.value != null && e.value.push(n.value), n.value = u, JSON.parse(u.componentSchema);
413
413
  }
414
- function c() {
414
+ function i() {
415
415
  e.value = [], a.value = [], n.value = null;
416
416
  }
417
417
  return {
@@ -421,10 +421,10 @@ function He() {
421
421
  push: t,
422
422
  undo: r,
423
423
  redo: l,
424
- reset: c
424
+ reset: i
425
425
  };
426
426
  }
427
- const Ke = /* @__PURE__ */ j({
427
+ const Ke = /* @__PURE__ */ Y({
428
428
  __name: "dynamicFormItem",
429
429
  props: {
430
430
  hasFormItem: { type: Boolean },
@@ -432,22 +432,22 @@ const Ke = /* @__PURE__ */ j({
432
432
  },
433
433
  emits: ["updateFormItemRef"],
434
434
  setup(e, { emit: a }) {
435
- const n = F.getComponent("form-item"), o = e, t = a, r = I(), l = () => {
435
+ const n = F.getComponent("form-item"), o = e, t = a, r = A(), l = () => {
436
436
  t("updateFormItemRef", r.value);
437
437
  };
438
- return (c, u) => o.hasFormItem ? (M(), z(_(n), ve({
438
+ return (i, u) => o.hasFormItem ? (R(), z(C(n), he({
439
439
  key: 0,
440
440
  ref_key: "formItemRef",
441
441
  ref: r,
442
442
  onVnodeMounted: l
443
443
  }, o.formItemProps), {
444
444
  default: P(() => [
445
- R(c.$slots, "default")
445
+ $(i.$slots, "default")
446
446
  ]),
447
447
  _: 3
448
- }, 16, ["onVnodeMounted"])) : R(c.$slots, "default", { key: 1 });
448
+ }, 16, ["onVnodeMounted"])) : $(i.$slots, "default", { key: 1 });
449
449
  }
450
- }), qe = /* @__PURE__ */ j({
450
+ }), qe = /* @__PURE__ */ Y({
451
451
  name: "ENode",
452
452
  __name: "node",
453
453
  props: {
@@ -461,130 +461,130 @@ const Ke = /* @__PURE__ */ j({
461
461
  },
462
462
  emits: ["update:modelValue", "change", "update:dynamicId"],
463
463
  setup(e, { emit: a }) {
464
- const { proxy: n } = ae(), o = e, t = I(null);
465
- let r = H("formData", X({}));
466
- const l = H("slots", {}), c = H("pageManager", {}), u = H("disabled", { value: !1 }), w = H("ruleFieldPrefix", null), f = H("resetFormData", !1);
467
- let s = X(N(o.componentSchema));
468
- p();
469
- async function b(i) {
470
- if (["cascader", "checkbox", "select", "radio"].includes(i.type) && i.componentProps.dynamicId && o.sourceDateUrl) {
471
- const k = (await ge({
464
+ const { proxy: n } = ae(), o = e, t = A(null);
465
+ let r = K("formData", Q({}));
466
+ const l = K("slots", {}), i = K("pageManager", {}), u = K("disabled", { value: !1 }), w = K("ruleFieldPrefix", null), d = K("resetFormData", !1);
467
+ let s = Q(B(o.componentSchema));
468
+ v();
469
+ async function b(f) {
470
+ if (["cascader", "checkbox", "select", "radio"].includes(f.type) && f.componentProps.dynamicId && o.sourceDateUrl) {
471
+ const D = (await be({
472
472
  // || "http://192.168.28.205:3000/dev-api/data-source
473
473
  url: o.sourceDateUrl,
474
474
  method: "get",
475
475
  params: {
476
- id: i.componentProps.dynamicId
476
+ id: f.componentProps.dynamicId
477
477
  }
478
478
  })).data.data;
479
- let E = await ge({
480
- url: k.url,
481
- method: k.method,
482
- data: JSON.parse(k.body),
483
- params: JSON.parse(k.params),
484
- headers: JSON.parse(k.headers)
479
+ let I = await be({
480
+ url: D.url,
481
+ method: D.method,
482
+ data: JSON.parse(D.body),
483
+ params: JSON.parse(D.params),
484
+ headers: JSON.parse(D.headers)
485
485
  });
486
- if (k && (k != null && k.dataPath)) {
487
- const G = k.dataPath.split(".").reduce((Q, Ce) => Q[Ce], E.data);
488
- i.componentProps.options = d(G).map((Q) => ({
489
- label: Q[k.dataKey],
490
- value: Q[k.dataValue]
486
+ if (D && (D != null && D.dataPath)) {
487
+ const xe = D.dataPath.split(".").reduce((re, Ce) => re[Ce], I.data);
488
+ f.componentProps.options = c(xe).map((re) => ({
489
+ label: re[D.dataKey],
490
+ value: re[D.dataValue]
491
491
  }));
492
492
  } else
493
- i.componentProps.options = d(E.data).map((W) => ({
494
- label: W[k.dataKey],
495
- value: W[k.dataValue]
493
+ f.componentProps.options = c(I.data).map((te) => ({
494
+ label: te[D.dataKey],
495
+ value: te[D.dataValue]
496
496
  }));
497
- return i;
497
+ return f;
498
498
  }
499
- return i;
499
+ return f;
500
500
  }
501
- function d(i) {
502
- return i && Object.prototype.toString.call(i) === "[object Array]" ? i : [];
501
+ function c(f) {
502
+ return f && Object.prototype.toString.call(f) === "[object Array]" ? f : [];
503
503
  }
504
504
  O(
505
505
  () => o.componentSchema,
506
- (i) => {
507
- Ie(s, i, ["children"]) || (J(s, N(i)), p());
506
+ (f) => {
507
+ Ee(s, f, ["children"]) || (W(s, B(f)), v());
508
508
  },
509
509
  {
510
510
  deep: !0
511
511
  }
512
512
  );
513
- function p() {
514
- c.isDesignMode.value && typeof s.field == "string" && (s.field += "-design-mode");
513
+ function v() {
514
+ i.isDesignMode.value && typeof s.field == "string" && (s.field += "-design-mode");
515
515
  }
516
- (o.resetFormData || f) && (r = {});
517
- const v = a, S = I(), A = I(), m = (i) => {
518
- A.value = i;
516
+ (o.resetFormData || d) && (r = {});
517
+ const p = a, h = A(), x = A(), m = (f) => {
518
+ x.value = f;
519
519
  }, g = _e();
520
- Object.keys(g).length && $("nodeAttrs", g);
521
- const h = Pe(null), x = U(() => {
522
- var i, C;
523
- return (i = s.componentProps) != null && i.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((C = s.show) == null ? void 0 : C.call(s, { values: r })) ?? !0;
524
- }), V = U(() => {
525
- var k;
526
- const i = x.value && ((k = s.rules) == null ? void 0 : k.map((E) => ({
527
- ...E,
528
- validator: E.validator && c.funcs.value[E.validator]
520
+ Object.keys(g).length && N("nodeAttrs", g);
521
+ const y = Pe(null), E = T(() => {
522
+ var f, k;
523
+ return (f = s.componentProps) != null && f.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((k = s.show) == null ? void 0 : k.call(s, { values: r })) ?? !0;
524
+ }), V = T(() => {
525
+ var D;
526
+ const f = E.value && ((D = s.rules) == null ? void 0 : D.map((I) => ({
527
+ ...I,
528
+ validator: I.validator && i.funcs.value[I.validator]
529
529
  // 自定义校验函数
530
530
  })));
531
- let C = s.field;
532
- o.ruleField ? C = o.ruleField : w && s.field && (C = N(w), C.push(s.field));
533
- const D = {
531
+ let k = s.field;
532
+ o.ruleField ? k = o.ruleField : w && s.field && (k = B(w), k.push(s.field));
533
+ const _ = {
534
534
  ...s,
535
- rules: i,
536
- rule: i,
537
- field: C
535
+ rules: f,
536
+ rule: f,
537
+ field: k
538
538
  };
539
- return D.children && delete D.children, D;
540
- }), B = U(() => {
541
- var D, k;
542
- const i = ((D = q.value) == null ? void 0 : D.bindModel) ?? "modelValue", C = {};
543
- return s.on && Object.keys(s.on).forEach((E) => {
544
- C[`on${ze(E)}`] = (...W) => c.doActions(s.on[E], ...W);
539
+ return _.children && delete _.children, _;
540
+ }), U = T(() => {
541
+ var _, D;
542
+ const f = ((_ = Z.value) == null ? void 0 : _.bindModel) ?? "modelValue", k = {};
543
+ return s.on && Object.keys(s.on).forEach((I) => {
544
+ k[`on${Le(I)}`] = (...te) => i.doActions(s.on[I], ...te);
545
545
  }), {
546
546
  ...o,
547
547
  ...s.componentProps,
548
- disabled: (u == null ? void 0 : u.value) || ((k = s.componentProps) == null ? void 0 : k.disabled),
549
- bindModel: i,
550
- ...C
548
+ disabled: (u == null ? void 0 : u.value) || ((D = s.componentProps) == null ? void 0 : D.disabled),
549
+ bindModel: f,
550
+ ...k
551
551
  };
552
- }), q = U(() => F.getComponentConfingByType(s.type) ?? null);
553
- ie(() => {
552
+ }), Z = T(() => F.getComponentConfingByType(s.type) ?? null);
553
+ se(() => {
554
554
  t.value = o.modelValue ?? r[s.field ?? ""];
555
555
  }), O(
556
556
  () => t.value,
557
557
  () => {
558
- t.value !== (o.modelValue ?? r[s.field ?? ""]) && Z(t.value);
558
+ t.value !== (o.modelValue ?? r[s.field ?? ""]) && H(t.value);
559
559
  }
560
560
  ), O(
561
- () => S.value,
561
+ () => h.value,
562
562
  () => {
563
- re();
563
+ ee();
564
564
  },
565
565
  { immediate: !0 }
566
566
  );
567
- function re() {
568
- var C;
569
- const i = S.value || n;
570
- s.id && i && (s.input && (i.setValue = Z, i.getValue = () => r[s.field] || o.modelValue), i.setAttr = (D, k) => (s.componentProps || (s.componentProps = {}), s.componentProps[D] = k), i.getAttr = (D) => s.componentProps[D], c.addComponentInstance(s.id, i), (C = q.value) != null && C.defaultSchema.input && s.noFormItem !== !0 && A.value && c.addComponentInstance(s.id + "formItem", A.value));
567
+ function ee() {
568
+ var k;
569
+ const f = h.value || n;
570
+ s.id && f && (s.input && (f.setValue = H, f.getValue = () => r[s.field] || o.modelValue), f.setAttr = (_, D) => (s.componentProps || (s.componentProps = {}), s.componentProps[_] = D), f.getAttr = (_) => s.componentProps[_], i.addComponentInstance(s.id, f), (k = Z.value) != null && k.defaultSchema.input && s.noFormItem !== !0 && x.value && i.addComponentInstance(s.id + "formItem", x.value));
571
571
  }
572
- function se() {
573
- var i;
574
- s.id && (c.removeComponentInstance(s.id), (i = q.value) != null && i.defaultSchema.input && s.noFormItem !== !0 && c.removeComponentInstance(s.id + "formItem"));
572
+ function ue() {
573
+ var f;
574
+ s.id && (i.removeComponentInstance(s.id), (f = Z.value) != null && f.defaultSchema.input && s.noFormItem !== !0 && i.removeComponentInstance(s.id + "formItem"));
575
575
  }
576
- async function fe() {
577
- var C, D, k;
578
- if (s = await b(s), typeof ((C = s.componentProps) == null ? void 0 : C.defaultValue) < "u") {
579
- const E = c.isDesignMode.value ? (D = s.componentProps) == null ? void 0 : D.defaultValue : r[s.field] ?? ((k = s.componentProps) == null ? void 0 : k.defaultValue);
580
- Z(N(E));
576
+ async function de() {
577
+ var k, _, D;
578
+ if (s = await b(s), typeof ((k = s.componentProps) == null ? void 0 : k.defaultValue) < "u") {
579
+ const I = i.isDesignMode.value ? (_ = s.componentProps) == null ? void 0 : _.defaultValue : r[s.field] ?? ((D = s.componentProps) == null ? void 0 : D.defaultValue);
580
+ H(B(I));
581
581
  }
582
582
  if (s.type === "slot") {
583
- const E = s.slotName;
584
- if (!E) return;
585
- h.value = j({
583
+ const I = s.slotName;
584
+ if (!I) return;
585
+ y.value = Y({
586
586
  setup() {
587
- return () => R(l, E, {
587
+ return () => $(l, I, {
588
588
  componentSchema: s,
589
589
  model: r
590
590
  });
@@ -592,143 +592,143 @@ const Ke = /* @__PURE__ */ j({
592
592
  });
593
593
  return;
594
594
  }
595
- const i = F.getComponent(s.type);
596
- if (!i) {
595
+ const f = F.getComponent(s.type);
596
+ if (!f) {
597
597
  console.error(`组件${s.type}未注册`);
598
598
  return;
599
599
  }
600
- if (typeof i == "function") {
601
- const E = await i();
602
- h.value = E.default ?? E;
600
+ if (typeof f == "function") {
601
+ const I = await f();
602
+ y.value = I.default ?? I;
603
603
  } else
604
- h.value = i;
604
+ y.value = f;
605
605
  }
606
- function Z(i) {
607
- v("update:modelValue", i), v("change", i), s.field && (r[s.field] = i);
606
+ function H(f) {
607
+ p("update:modelValue", f), p("change", f), s.field && (r[s.field] = f);
608
608
  }
609
- function le(i) {
610
- v("update:dynamicId", i);
609
+ function S(f) {
610
+ p("update:dynamicId", f);
611
611
  }
612
- let y = null;
612
+ let M = null;
613
613
  return O(
614
614
  () => s,
615
- async (i) => {
616
- const C = JSON.stringify({
617
- ...i,
615
+ async (f) => {
616
+ const k = JSON.stringify({
617
+ ...f,
618
618
  children: void 0,
619
619
  componentProps: {
620
- ...i.componentProps,
620
+ ...f.componentProps,
621
621
  options: null
622
622
  }
623
623
  });
624
- if (C === y)
624
+ if (k === M)
625
625
  return !1;
626
- y = C, fe();
626
+ M = k, de();
627
627
  },
628
628
  {
629
629
  immediate: !0,
630
630
  deep: !0
631
631
  }
632
- ), Ae(se), (i, C) => {
633
- var k;
634
- const D = Oe("ENode");
635
- return h.value && x.value ? (M(), z(Ke, {
632
+ ), Se(ue), (f, k) => {
633
+ var D;
634
+ const _ = Oe("ENode");
635
+ return y.value && E.value ? (R(), z(Ke, {
636
636
  key: 0,
637
- hasFormItem: _(s).noFormItem !== !0 && ((k = q.value) == null ? void 0 : k.defaultSchema.input),
637
+ hasFormItem: C(s).noFormItem !== !0 && ((D = Z.value) == null ? void 0 : D.defaultSchema.input),
638
638
  formItemProps: V.value,
639
639
  onUpdateFormItemRef: m
640
640
  }, {
641
641
  default: P(() => [
642
- (M(), z(Ve(h.value), ve({
642
+ (R(), z(Ve(y.value), he({
643
643
  ref_key: "componentInstance",
644
- ref: S,
645
- onVnodeMounted: re,
646
- model: _(r)
647
- }, { ...B.value }, {
648
- [B.value.bindModel]: t.value,
649
- ["onUpdate:" + B.value.bindModel]: C[0] || (C[0] = (E) => t.value = E),
650
- [`onUpdate:${B.value.bindModel}` || ""]: Z,
651
- "onUpdate:dynamicId": le
644
+ ref: h,
645
+ onVnodeMounted: ee,
646
+ model: C(r)
647
+ }, { ...U.value }, {
648
+ [U.value.bindModel]: t.value,
649
+ ["onUpdate:" + U.value.bindModel]: k[0] || (k[0] = (I) => t.value = I),
650
+ [`onUpdate:${U.value.bindModel}` || ""]: H,
651
+ "onUpdate:dynamicId": S
652
652
  }), {
653
- node: P((E) => [
654
- T(D, ve(E, {
653
+ node: P((I) => [
654
+ L(_, he(I, {
655
655
  sourceDateUrl: o.sourceDateUrl
656
656
  }), null, 16, ["sourceDateUrl"])
657
657
  ]),
658
658
  "edit-node": P(() => [
659
- R(i.$slots, "edit-node")
659
+ $(f.$slots, "edit-node")
660
660
  ]),
661
661
  _: 3
662
662
  }, 16, ["model"]))
663
663
  ]),
664
664
  _: 3
665
- }, 8, ["hasFormItem", "formItemProps"])) : De("", !0);
665
+ }, 8, ["hasFormItem", "formItemProps"])) : Ae("", !0);
666
666
  };
667
667
  }
668
668
  });
669
669
  function Ze() {
670
- const e = I(!1), a = Ee(), n = I({});
670
+ const e = A(!1), a = ke(), n = A({});
671
671
  function o() {
672
- return new Promise((d) => {
672
+ return new Promise((c) => {
673
673
  if (e.value)
674
- d();
674
+ c();
675
675
  else {
676
- const p = O(e, () => {
677
- p(), d();
676
+ const v = O(e, () => {
677
+ v(), c();
678
678
  });
679
679
  }
680
680
  });
681
681
  }
682
- async function t(d = "default") {
683
- var v;
682
+ async function t(c = "default") {
683
+ var p;
684
684
  await o();
685
- const p = (v = n.value) == null ? void 0 : v[d];
686
- if (!p) throw new Error(`表单 [name=${d}] 不存在`);
687
- return p;
685
+ const v = (p = n.value) == null ? void 0 : p[c];
686
+ if (!v) throw new Error(`表单 [name=${c}] 不存在`);
687
+ return v;
688
688
  }
689
- async function r(d, p) {
690
- const v = await t(d);
691
- return N(await p(v));
689
+ async function r(c, v) {
690
+ const p = await t(c);
691
+ return B(await v(p));
692
692
  }
693
- async function l(d = "default") {
694
- return await r(d, (p) => p.getData());
693
+ async function l(c = "default") {
694
+ return await r(c, (v) => v.getData());
695
695
  }
696
- function c(d, p = "default") {
697
- var S;
698
- a.setFormData(d, p);
699
- const v = (S = n.value) == null ? void 0 : S[p];
700
- v == null || v.clearValidate();
696
+ function i(c, v = "default") {
697
+ var h;
698
+ a.setFormData(c, v);
699
+ const p = (h = n.value) == null ? void 0 : h[v];
700
+ p == null || p.clearValidate();
701
701
  }
702
- async function u(d = "default") {
703
- return await r(d, async (p) => (await p.validate(), await p.getData()));
702
+ async function u(c = "default") {
703
+ return await r(c, async (v) => (await v.validate(), await v.getData()));
704
704
  }
705
- async function w(d) {
705
+ async function w(c) {
706
706
  await o();
707
- const p = {};
708
- for (const v in n.value) {
709
- const S = n.value[v];
710
- S && (p[v] = N(await d(S)));
707
+ const v = {};
708
+ for (const p in n.value) {
709
+ const h = n.value[p];
710
+ h && (v[p] = B(await c(h)));
711
711
  }
712
- return p;
712
+ return v;
713
713
  }
714
- async function f() {
715
- return await w((d) => d.getData());
714
+ async function d() {
715
+ return await w((c) => c.getData());
716
716
  }
717
- function s(d) {
718
- for (const p in d)
719
- c(d[p], p);
717
+ function s(c) {
718
+ for (const v in c)
719
+ i(c[v], v);
720
720
  }
721
721
  async function b() {
722
- return await w(async (d) => (await d.validate(), await d.getData()));
722
+ return await w(async (c) => (await c.validate(), await c.getData()));
723
723
  }
724
724
  return {
725
725
  ready: e,
726
726
  pageManager: a,
727
727
  forms: n,
728
728
  getData: l,
729
- setData: c,
729
+ setData: i,
730
730
  validate: u,
731
- getForms: f,
731
+ getForms: d,
732
732
  setForms: s,
733
733
  validateAll: b,
734
734
  getFormInstance: t
@@ -737,7 +737,7 @@ function Ze() {
737
737
  const Ge = {
738
738
  key: 0,
739
739
  class: "epic-loading-box"
740
- }, Qe = { class: "epic-builder-main" }, Ye = { class: "epic-loading-box" }, Xe = /* @__PURE__ */ j({
740
+ }, Qe = { class: "epic-builder-main" }, Ye = { class: "epic-loading-box" }, Xe = /* @__PURE__ */ Y({
741
741
  __name: "builder",
742
742
  props: {
743
743
  pageSchema: {},
@@ -747,42 +747,42 @@ const Ge = {
747
747
  },
748
748
  emits: ["ready"],
749
749
  setup(e, { expose: a, emit: n }) {
750
- const o = Y(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: c, getData: u, setData: w, validate: f, getForms: s, setForms: b, validateAll: d, getFormInstance: p } = Ze(), v = e, S = X({
750
+ const o = G(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: i, getData: u, setData: w, validate: d, getForms: s, setForms: b, validateAll: c, getFormInstance: v } = Ze(), p = e, h = Q({
751
751
  schemas: []
752
752
  });
753
753
  O(
754
- () => v.pageSchema,
755
- (h) => {
756
- J(S, h);
754
+ () => p.pageSchema,
755
+ (y) => {
756
+ W(h, y);
757
757
  },
758
758
  {
759
759
  immediate: !0,
760
760
  deep: !0
761
761
  }
762
762
  ), O(
763
- () => v.formData,
764
- (h) => {
765
- h && w(h);
763
+ () => p.formData,
764
+ (y) => {
765
+ y && w(y);
766
766
  },
767
767
  {
768
768
  immediate: !0,
769
769
  deep: !0
770
770
  }
771
771
  ), O(
772
- () => S.script,
773
- (h) => {
774
- h && l.setMethods(h, !0);
772
+ () => h.script,
773
+ (y) => {
774
+ y && l.setMethods(y, !0);
775
775
  },
776
776
  {
777
777
  immediate: !0
778
778
  }
779
- ), $("slots", Fe()), $("pageManager", l), $("forms", c), $("pageSchema", S), $(
779
+ ), N("slots", Fe()), N("pageManager", l), N("forms", i), N("pageSchema", h), N(
780
780
  "disabled",
781
- U(() => v.disabled)
781
+ T(() => p.disabled)
782
782
  );
783
- const A = ae(), m = A == null ? void 0 : A.proxy;
783
+ const x = ae(), m = x == null ? void 0 : x.proxy;
784
784
  function g() {
785
- te(() => {
785
+ j(() => {
786
786
  r.value = !0, t("ready", l), m && l.addComponentInstance("builder", m);
787
787
  });
788
788
  }
@@ -791,34 +791,34 @@ const Ge = {
791
791
  pageManager: l,
792
792
  getData: u,
793
793
  setData: w,
794
- validate: f,
794
+ validate: d,
795
795
  getForms: s,
796
796
  setForms: b,
797
- validateAll: d,
798
- getFormInstance: p
799
- }), (h, x) => _(F).initialized.value ? (M(), z(ke, {
797
+ validateAll: c,
798
+ getFormInstance: v
799
+ }), (y, E) => C(F).initialized.value ? (R(), z(De, {
800
800
  key: 1,
801
801
  onResolve: g
802
802
  }, {
803
803
  default: P(() => [
804
- L("div", Qe, [
805
- (M(!0), ye(Me, null, Re(S.schemas, (V, B) => (M(), z(_(qe), {
806
- key: B,
807
- sourceDateUrl: v.sourceDateUrl,
804
+ J("div", Qe, [
805
+ (R(!0), ve(Me, null, Re(h.schemas, (V, U) => (R(), z(C(qe), {
806
+ key: U,
807
+ sourceDateUrl: p.sourceDateUrl,
808
808
  componentSchema: V
809
809
  }, null, 8, ["sourceDateUrl", "componentSchema"]))), 128))
810
810
  ])
811
811
  ]),
812
812
  fallback: P(() => [
813
- L("div", Ye, [
814
- T(_(o))
813
+ J("div", Ye, [
814
+ L(C(o))
815
815
  ])
816
816
  ]),
817
817
  _: 1
818
- })) : (M(), ye("div", Ge));
818
+ })) : (R(), ve("div", Ge));
819
819
  }
820
820
  });
821
- function be(e) {
821
+ function ge(e) {
822
822
  return Be() ? (Ue(e), !0) : !1;
823
823
  }
824
824
  function je(e) {
@@ -826,10 +826,10 @@ function je(e) {
826
826
  const t = () => {
827
827
  a -= 1, o && a <= 0 && (o.stop(), n = void 0, o = void 0);
828
828
  };
829
- return (...r) => (a += 1, o || (o = $e(!0), n = o.run(() => e(...r))), be(t), n);
829
+ return (...r) => (a += 1, o || (o = $e(!0), n = o.run(() => e(...r))), ge(t), n);
830
830
  }
831
- function ee(e) {
832
- return typeof e == "function" ? e() : _(e);
831
+ function X(e) {
832
+ return typeof e == "function" ? e() : C(e);
833
833
  }
834
834
  const et = typeof window < "u" && typeof document < "u";
835
835
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -839,208 +839,208 @@ function rt(e) {
839
839
  return ae();
840
840
  }
841
841
  function st(e, a = !0, n) {
842
- rt() ? we(e, n) : a ? e() : te(e);
842
+ rt() ? ye(e, n) : a ? e() : j(e);
843
843
  }
844
844
  function lt(e = !1, a = {}) {
845
845
  const {
846
846
  truthyValue: n = !0,
847
847
  falsyValue: o = !1
848
- } = a, t = Ne(e), r = I(e);
849
- function l(c) {
848
+ } = a, t = Ne(e), r = A(e);
849
+ function l(i) {
850
850
  if (arguments.length)
851
- return r.value = c, r.value;
851
+ return r.value = i, r.value;
852
852
  {
853
- const u = ee(n);
854
- return r.value = r.value === u ? ee(o) : u, r.value;
853
+ const u = X(n);
854
+ return r.value = r.value === u ? X(o) : u, r.value;
855
855
  }
856
856
  }
857
857
  return t ? l : [r, l];
858
858
  }
859
859
  function Ut(e, a, n) {
860
- const o = O(e, (...t) => (te(() => o()), a(...t)), n);
860
+ const o = O(e, (...t) => (j(() => o()), a(...t)), n);
861
861
  return o;
862
862
  }
863
- const ue = et ? window : void 0;
864
- function K(e) {
863
+ const ie = et ? window : void 0;
864
+ function q(e) {
865
865
  var a;
866
- const n = ee(e);
866
+ const n = X(e);
867
867
  return (a = n == null ? void 0 : n.$el) != null ? a : n;
868
868
  }
869
869
  function it(...e) {
870
870
  let a, n, o, t;
871
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, t] = e, a = ue) : [a, n, o, t] = e, !a)
871
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, t] = e, a = ie) : [a, n, o, t] = e, !a)
872
872
  return at;
873
873
  Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
874
874
  const r = [], l = () => {
875
- r.forEach((f) => f()), r.length = 0;
876
- }, c = (f, s, b, d) => (f.addEventListener(s, b, d), () => f.removeEventListener(s, b, d)), u = O(
877
- () => [K(a), ee(t)],
878
- ([f, s]) => {
879
- if (l(), !f)
875
+ r.forEach((d) => d()), r.length = 0;
876
+ }, i = (d, s, b, c) => (d.addEventListener(s, b, c), () => d.removeEventListener(s, b, c)), u = O(
877
+ () => [q(a), X(t)],
878
+ ([d, s]) => {
879
+ if (l(), !d)
880
880
  return;
881
881
  const b = ot(s) ? { ...s } : s;
882
882
  r.push(
883
- ...n.flatMap((d) => o.map((p) => c(f, d, p, b)))
883
+ ...n.flatMap((c) => o.map((v) => i(d, c, v, b)))
884
884
  );
885
885
  },
886
886
  { immediate: !0, flush: "post" }
887
887
  ), w = () => {
888
888
  u(), l();
889
889
  };
890
- return be(w), w;
890
+ return ge(w), w;
891
891
  }
892
892
  function ct(e) {
893
893
  return typeof e == "function" ? e : typeof e == "string" ? (a) => a.key === e : Array.isArray(e) ? (a) => e.includes(a.key) : () => !0;
894
894
  }
895
- function xe(...e) {
895
+ function Ie(...e) {
896
896
  let a, n, o = {};
897
897
  e.length === 3 ? (a = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (a = !0, n = e[0], o = e[1]) : (a = e[0], n = e[1]) : (a = !0, n = e[0]);
898
898
  const {
899
- target: t = ue,
899
+ target: t = ie,
900
900
  eventName: r = "keydown",
901
901
  passive: l = !1,
902
- dedupe: c = !1
902
+ dedupe: i = !1
903
903
  } = o, u = ct(a);
904
- return it(t, r, (f) => {
905
- f.repeat && ee(c) || u(f) && n(f);
904
+ return it(t, r, (d) => {
905
+ d.repeat && X(i) || u(d) && n(d);
906
906
  }, l);
907
907
  }
908
- function me(e, a, n = {}) {
909
- return xe(e, a, { ...n, eventName: "keydown" });
908
+ function pe(e, a, n = {}) {
909
+ return Ie(e, a, { ...n, eventName: "keydown" });
910
910
  }
911
- function he(e, a, n = {}) {
912
- return xe(e, a, { ...n, eventName: "keyup" });
911
+ function me(e, a, n = {}) {
912
+ return Ie(e, a, { ...n, eventName: "keyup" });
913
913
  }
914
914
  function ut() {
915
- const e = I(!1), a = ae();
916
- return a && we(() => {
915
+ const e = A(!1), a = ae();
916
+ return a && ye(() => {
917
917
  e.value = !0;
918
918
  }, a), e;
919
919
  }
920
920
  function dt(e) {
921
921
  const a = ut();
922
- return U(() => (a.value, !!e()));
922
+ return T(() => (a.value, !!e()));
923
923
  }
924
924
  function ft(e) {
925
925
  return JSON.parse(JSON.stringify(e));
926
926
  }
927
927
  function pt(e, a, n = {}) {
928
- const { window: o = ue, ...t } = n;
928
+ const { window: o = ie, ...t } = n;
929
929
  let r;
930
- const l = dt(() => o && "ResizeObserver" in o), c = () => {
930
+ const l = dt(() => o && "ResizeObserver" in o), i = () => {
931
931
  r && (r.disconnect(), r = void 0);
932
- }, u = U(() => {
933
- const s = ee(e);
934
- return Array.isArray(s) ? s.map((b) => K(b)) : [K(s)];
932
+ }, u = T(() => {
933
+ const s = X(e);
934
+ return Array.isArray(s) ? s.map((b) => q(b)) : [q(s)];
935
935
  }), w = O(
936
936
  u,
937
937
  (s) => {
938
- if (c(), l.value && o) {
938
+ if (i(), l.value && o) {
939
939
  r = new ResizeObserver(a);
940
940
  for (const b of s)
941
941
  b && r.observe(b, t);
942
942
  }
943
943
  },
944
944
  { immediate: !0, flush: "post" }
945
- ), f = () => {
946
- c(), w();
945
+ ), d = () => {
946
+ i(), w();
947
947
  };
948
- return be(f), {
948
+ return ge(d), {
949
949
  isSupported: l,
950
- stop: f
950
+ stop: d
951
951
  };
952
952
  }
953
953
  function Tt(e, a = { width: 0, height: 0 }, n = {}) {
954
- const { window: o = ue, box: t = "content-box" } = n, r = U(() => {
954
+ const { window: o = ie, box: t = "content-box" } = n, r = T(() => {
955
955
  var s, b;
956
- return (b = (s = K(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : b.includes("svg");
957
- }), l = I(a.width), c = I(a.height), { stop: u } = pt(
956
+ return (b = (s = q(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : b.includes("svg");
957
+ }), l = A(a.width), i = A(a.height), { stop: u } = pt(
958
958
  e,
959
959
  ([s]) => {
960
960
  const b = t === "border-box" ? s.borderBoxSize : t === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
961
961
  if (o && r.value) {
962
- const d = K(e);
963
- if (d) {
964
- const p = d.getBoundingClientRect();
965
- l.value = p.width, c.value = p.height;
962
+ const c = q(e);
963
+ if (c) {
964
+ const v = c.getBoundingClientRect();
965
+ l.value = v.width, i.value = v.height;
966
966
  }
967
967
  } else if (b) {
968
- const d = Array.isArray(b) ? b : [b];
969
- l.value = d.reduce((p, { inlineSize: v }) => p + v, 0), c.value = d.reduce((p, { blockSize: v }) => p + v, 0);
968
+ const c = Array.isArray(b) ? b : [b];
969
+ l.value = c.reduce((v, { inlineSize: p }) => v + p, 0), i.value = c.reduce((v, { blockSize: p }) => v + p, 0);
970
970
  } else
971
- l.value = s.contentRect.width, c.value = s.contentRect.height;
971
+ l.value = s.contentRect.width, i.value = s.contentRect.height;
972
972
  },
973
973
  n
974
974
  );
975
975
  st(() => {
976
- const s = K(e);
977
- s && (l.value = "offsetWidth" in s ? s.offsetWidth : a.width, c.value = "offsetHeight" in s ? s.offsetHeight : a.height);
976
+ const s = q(e);
977
+ s && (l.value = "offsetWidth" in s ? s.offsetWidth : a.width, i.value = "offsetHeight" in s ? s.offsetHeight : a.height);
978
978
  });
979
979
  const w = O(
980
- () => K(e),
980
+ () => q(e),
981
981
  (s) => {
982
- l.value = s ? a.width : 0, c.value = s ? a.height : 0;
982
+ l.value = s ? a.width : 0, i.value = s ? a.height : 0;
983
983
  }
984
984
  );
985
- function f() {
985
+ function d() {
986
986
  u(), w();
987
987
  }
988
988
  return {
989
989
  width: l,
990
- height: c,
991
- stop: f
990
+ height: i,
991
+ stop: d
992
992
  };
993
993
  }
994
- function zt(e, a, n, o = {}) {
994
+ function Lt(e, a, n, o = {}) {
995
995
  var t, r, l;
996
996
  const {
997
- clone: c = !1,
997
+ clone: i = !1,
998
998
  passive: u = !1,
999
999
  eventName: w,
1000
- deep: f = !1,
1000
+ deep: d = !1,
1001
1001
  defaultValue: s,
1002
1002
  shouldEmit: b
1003
- } = o, d = ae(), p = n || (d == null ? void 0 : d.emit) || ((t = d == null ? void 0 : d.$emit) == null ? void 0 : t.bind(d)) || ((l = (r = d == null ? void 0 : d.proxy) == null ? void 0 : r.$emit) == null ? void 0 : l.bind(d == null ? void 0 : d.proxy));
1004
- let v = w;
1005
- a || (a = "modelValue"), v = v || `update:${a.toString()}`;
1006
- const S = (g) => c ? typeof c == "function" ? c(g) : ft(g) : g, A = () => tt(e[a]) ? S(e[a]) : s, m = (g) => {
1007
- b ? b(g) && p(v, g) : p(v, g);
1003
+ } = o, c = ae(), v = n || (c == null ? void 0 : c.emit) || ((t = c == null ? void 0 : c.$emit) == null ? void 0 : t.bind(c)) || ((l = (r = c == null ? void 0 : c.proxy) == null ? void 0 : r.$emit) == null ? void 0 : l.bind(c == null ? void 0 : c.proxy));
1004
+ let p = w;
1005
+ a || (a = "modelValue"), p = p || `update:${a.toString()}`;
1006
+ const h = (g) => i ? typeof i == "function" ? i(g) : ft(g) : g, x = () => tt(e[a]) ? h(e[a]) : s, m = (g) => {
1007
+ b ? b(g) && v(p, g) : v(p, g);
1008
1008
  };
1009
1009
  if (u) {
1010
- const g = A(), h = I(g);
1011
- let x = !1;
1010
+ const g = x(), y = A(g);
1011
+ let E = !1;
1012
1012
  return O(
1013
1013
  () => e[a],
1014
1014
  (V) => {
1015
- x || (x = !0, h.value = S(V), te(() => x = !1));
1015
+ E || (E = !0, y.value = h(V), j(() => E = !1));
1016
1016
  }
1017
1017
  ), O(
1018
- h,
1018
+ y,
1019
1019
  (V) => {
1020
- !x && (V !== e[a] || f) && m(V);
1020
+ !E && (V !== e[a] || d) && m(V);
1021
1021
  },
1022
- { deep: f }
1023
- ), h;
1022
+ { deep: d }
1023
+ ), y;
1024
1024
  } else
1025
- return U({
1025
+ return T({
1026
1026
  get() {
1027
- return A();
1027
+ return x();
1028
1028
  },
1029
1029
  set(g) {
1030
1030
  m(g);
1031
1031
  }
1032
1032
  });
1033
1033
  }
1034
- function Lt() {
1035
- const { isDark: e } = de(), a = lt(e);
1034
+ function zt() {
1035
+ const { isDark: e } = ce(), a = lt(e);
1036
1036
  return {
1037
1037
  isDark: e,
1038
1038
  toggleDark: a
1039
1039
  };
1040
1040
  }
1041
1041
  function mt() {
1042
- const e = I(!1);
1043
- return we(() => {
1042
+ const e = A(!1);
1043
+ return ye(() => {
1044
1044
  ht(e), vt(e);
1045
1045
  }), O(
1046
1046
  () => e.value,
@@ -1066,12 +1066,12 @@ function vt(e) {
1066
1066
  n.observe(a, {
1067
1067
  attributes: !0,
1068
1068
  attributeFilter: ["class"]
1069
- }), Ae(() => {
1069
+ }), Se(() => {
1070
1070
  n.disconnect();
1071
1071
  });
1072
1072
  }
1073
1073
  function yt() {
1074
- const e = I(1), a = I(!1), { isDark: n } = mt(), { pressSpace: o, pressShift: t, pressCtrl: r } = gt();
1074
+ const e = A(1), a = A(!1), { isDark: n } = mt(), { pressSpace: o, pressShift: t, pressCtrl: r } = gt();
1075
1075
  return {
1076
1076
  canvasScale: e,
1077
1077
  pressSpace: o,
@@ -1081,25 +1081,25 @@ function yt() {
1081
1081
  isDark: n
1082
1082
  };
1083
1083
  }
1084
- const de = je(yt);
1084
+ const ce = je(yt);
1085
1085
  function gt() {
1086
- const e = I(!1), a = I(!1), n = I(!1);
1087
- return me(" ", () => {
1086
+ const e = A(!1), a = A(!1), n = A(!1);
1087
+ return pe(" ", () => {
1088
1088
  e.value = !0;
1089
- }), he(" ", () => {
1089
+ }), me(" ", () => {
1090
1090
  e.value = !1;
1091
- }), me("Shift", (o) => {
1091
+ }), pe("Shift", (o) => {
1092
1092
  o.preventDefault(), a.value = !0;
1093
- }), he("Shift", () => {
1093
+ }), me("Shift", () => {
1094
1094
  a.value = !1;
1095
- }), me("Control", (o) => {
1095
+ }), pe("Control", (o) => {
1096
1096
  o.preventDefault(), n.value = !0;
1097
- }), he("Control", () => {
1097
+ }), me("Control", () => {
1098
1098
  n.value = !1;
1099
1099
  }), { pressSpace: e, pressShift: a, pressCtrl: n };
1100
1100
  }
1101
1101
  function Jt(e) {
1102
- const { pressSpace: a } = de(), n = new Image(1, 1);
1102
+ const { pressSpace: a } = ce(), n = new Image(1, 1);
1103
1103
  n.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
1104
1104
  let o = 0, t = 0;
1105
1105
  function r(u) {
@@ -1109,16 +1109,16 @@ function Jt(e) {
1109
1109
  function l(u) {
1110
1110
  if (u.preventDefault(), !u.x || !u.y || !a.value)
1111
1111
  return;
1112
- const w = u.x - o, f = u.y - t;
1113
- o = u.x, t = u.y, e.value && (e.value.scrollTop -= f, e.value.scrollLeft -= w);
1112
+ const w = u.x - o, d = u.y - t;
1113
+ o = u.x, t = u.y, e.value && (e.value.scrollTop -= d, e.value.scrollLeft -= w);
1114
1114
  }
1115
- function c() {
1115
+ function i() {
1116
1116
  a.value = !1;
1117
1117
  }
1118
- return { handleElementDragStart: r, handleElementDrag: l, handleElementDragEnd: c };
1118
+ return { handleElementDragStart: r, handleElementDrag: l, handleElementDragEnd: i };
1119
1119
  }
1120
1120
  function Wt(e) {
1121
- const { pressCtrl: a, canvasScale: n, disabledZoom: o } = de();
1121
+ const { pressCtrl: a, canvasScale: n, disabledZoom: o } = ce();
1122
1122
  function t(r) {
1123
1123
  if (!a.value || o.value)
1124
1124
  return;
@@ -1146,57 +1146,57 @@ function Ht(e, a = 16.66) {
1146
1146
  stopTimedQuery: t
1147
1147
  };
1148
1148
  }
1149
- const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, St = /* @__PURE__ */ j({
1149
+ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, St = /* @__PURE__ */ Y({
1150
1150
  __name: "index",
1151
1151
  setup(e, { expose: a }) {
1152
- const n = F.getComponent("monacoEditor"), o = F.getComponent("modal"), t = I(null), r = I(!1), l = I(!1), c = I({}), u = H("pageSchema"), w = I(null), f = I("");
1152
+ const n = F.getComponent("monacoEditor"), o = F.getComponent("modal"), t = A(null), r = A(!1), l = A(!1), i = A({}), u = K("pageSchema"), w = A(null), d = A("");
1153
1153
  function s() {
1154
1154
  l.value = !1;
1155
1155
  }
1156
1156
  function b() {
1157
1157
  r.value = !1;
1158
1158
  }
1159
- function d() {
1160
- r.value = !0, f.value = ce();
1159
+ function c() {
1160
+ r.value = !0, d.value = le();
1161
1161
  }
1162
- async function p() {
1162
+ async function v() {
1163
1163
  try {
1164
- let v = await w.value.validateAll();
1165
- if (!Object.keys(v).length) {
1164
+ let p = await w.value.validateAll();
1165
+ if (!Object.keys(p).length) {
1166
1166
  alert("请添加表单组件后再尝试!");
1167
1167
  return;
1168
1168
  }
1169
- Object.keys(v).length === 1 && (v = v.default), c.value = JSON.stringify(v, null, 2), te(() => {
1170
- var S;
1171
- (S = t.value) == null || S.setValue(c.value);
1169
+ Object.keys(p).length === 1 && (p = p.default), i.value = JSON.stringify(p, null, 2), j(() => {
1170
+ var h;
1171
+ (h = t.value) == null || h.setValue(i.value);
1172
1172
  }), l.value = !0;
1173
- } catch (v) {
1174
- console.error(v);
1173
+ } catch (p) {
1174
+ console.error(p);
1175
1175
  }
1176
1176
  }
1177
1177
  return a({
1178
- handleOpen: d
1179
- }), (v, S) => (M(), z(_(o), {
1178
+ handleOpen: c
1179
+ }), (p, h) => (R(), z(C(o), {
1180
1180
  modelValue: r.value,
1181
- "onUpdate:modelValue": S[1] || (S[1] = (A) => r.value = A),
1181
+ "onUpdate:modelValue": h[1] || (h[1] = (x) => r.value = x),
1182
1182
  title: "预览",
1183
1183
  class: "w-900px",
1184
1184
  width: "900px",
1185
1185
  onClose: b,
1186
- onOk: p,
1186
+ onOk: v,
1187
1187
  okText: "表单数据"
1188
1188
  }, {
1189
1189
  default: P(() => [
1190
- L("div", wt, [
1191
- (M(), z(_(Xe), {
1192
- key: f.value,
1190
+ J("div", wt, [
1191
+ (R(), z(C(Xe), {
1192
+ key: d.value,
1193
1193
  ref_key: "kb",
1194
1194
  ref: w,
1195
- "page-schema": _(u)
1195
+ "page-schema": C(u)
1196
1196
  }, null, 8, ["page-schema"])),
1197
- T(_(o), {
1197
+ L(C(o), {
1198
1198
  modelValue: l.value,
1199
- "onUpdate:modelValue": S[0] || (S[0] = (A) => l.value = A),
1199
+ "onUpdate:modelValue": h[0] || (h[0] = (x) => l.value = x),
1200
1200
  title: "表单数据",
1201
1201
  class: "w-860px",
1202
1202
  width: "860px",
@@ -1204,14 +1204,14 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
1204
1204
  onOk: s
1205
1205
  }, {
1206
1206
  default: P(() => [
1207
- L("div", bt, [
1208
- T(_(n), {
1207
+ J("div", bt, [
1208
+ L(C(n), {
1209
1209
  ref_key: "monacoEditorRef",
1210
1210
  ref: t,
1211
1211
  autoToggleTheme: "",
1212
1212
  readOnly: "",
1213
1213
  class: "h-full editor",
1214
- "model-value": c.value
1214
+ "model-value": i.value
1215
1215
  }, null, 8, ["model-value"])
1216
1216
  ])
1217
1217
  ]),
@@ -1225,7 +1225,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
1225
1225
  }), At = {
1226
1226
  key: 0,
1227
1227
  class: "epic-loading-box"
1228
- }, Dt = { class: "epic-designer-main" }, kt = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ j({
1228
+ }, Dt = { class: "epic-designer-main" }, Et = { class: "epic-header-container" }, kt = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ Y({
1229
1229
  __name: "designer",
1230
1230
  props: {
1231
1231
  disabledZoom: { type: Boolean, default: !1 },
@@ -1248,7 +1248,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
1248
1248
  "updateSourceData"
1249
1249
  ],
1250
1250
  setup(e, { expose: a, emit: n }) {
1251
- const o = Y(() => import("./index-C-XUgjda.js")), t = Y(() => import("./index-ASoFJnMl.js")), r = Y(() => import("./index-BPJ67Apd.js")), l = Y(() => import("./index-ooVzYa5L.js")), c = Y(() => import("./index-DgcFxYFp.js")), u = Ee(), w = He(), f = e;
1251
+ const o = G(() => import("./index-C-XUgjda.js")), t = G(() => import("./index-ASoFJnMl.js")), r = G(() => import("./index-CGN7CLXA.js")), l = G(() => import("./index-ooVzYa5L.js")), i = G(() => import("./index-DgcFxYFp.js")), u = ke(), w = He(), d = e;
1252
1252
  let s = {
1253
1253
  schemas: [
1254
1254
  {
@@ -1295,182 +1295,152 @@ defineExpose({
1295
1295
  test
1296
1296
  })`
1297
1297
  };
1298
- ie(async () => {
1299
- if (f.defaultSchema) {
1300
- s = f.defaultSchema;
1298
+ se(async () => {
1299
+ if (d.defaultSchema) {
1300
+ s = d.defaultSchema;
1301
1301
  return;
1302
1302
  }
1303
- console.log("%c [ updateSourceId ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.updateSourceId), console.log("%c [ source ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.source), f.source && F.setSourceData(f.source), f.formMode && (s.schemas = F.formSchemas), console.log("%c [ ]-152", "font-size:13px; background:pink; color:#bf2c9f;", s.schemas), f.updateSourceId && (s.schemas = await b(s.schemas), console.log(
1304
- "%c [ innerDefaultSchema.schemas ]-155",
1305
- "font-size:13px; background:pink; color:#bf2c9f;",
1306
- s.schemas
1307
- ));
1303
+ console.log("%c [ updateSourceId ]-141", "font-size:13px; background:pink; color:#bf2c9f;", d.updateSourceId), console.log("%c [ source ]-141", "font-size:13px; background:pink; color:#bf2c9f;", d.source), d.source && F.setSourceData(d.source), d.formMode && (s.schemas = F.formSchemas), d.updateSourceId && (s.schemas = await b(s.schemas));
1308
1304
  });
1309
- async function b(y) {
1310
- return y.map(async (i) => {
1311
- if (console.log("%c [ el ]-165", "font-size:13px; background:pink; color:#bf2c9f;", i), i && i.children && i.children.length && b(i.children), ["cascader", "checkbox", "select", "radio"].includes(i.type) && i.componentProps.dynamicId && f.updateSourceId === i.componentProps.dynamicId) {
1312
- const D = f.source.find((E) => E.id === f.updateSourceId);
1313
- let k = await ge({
1314
- url: D.url,
1315
- method: D.method,
1316
- data: JSON.parse(D.body),
1317
- params: JSON.parse(D.params),
1318
- headers: JSON.parse(D.headers)
1319
- });
1320
- if (D && (D != null && D.dataPath)) {
1321
- const W = D.dataPath.split(".").reduce((G, Q) => G[Q], k.data);
1322
- i.componentProps.options = d(W).map((G) => ({
1323
- label: G[D.dataKey],
1324
- value: G[D.dataValue]
1325
- }));
1326
- } else
1327
- i.componentProps.options = d(k.data).map((E) => ({
1328
- label: E[D.dataKey],
1329
- value: E[D.dataValue]
1330
- }));
1331
- }
1332
- return i;
1333
- });
1334
- }
1335
- function d(y) {
1336
- return y && Object.prototype.toString.call(y) === "[object Array]" ? y : [];
1305
+ async function b(S) {
1306
+ return S.map(async (M) => (console.log("%c [ el ]-158", "font-size:13px; background:pink; color:#bf2c9f;", M), M && M.children && M.children.length && b(M.children), M));
1337
1307
  }
1338
1308
  u.setDesignMode(), u.setDefaultComponentIds(s.schemas);
1339
- const p = n, v = I(null), S = X({
1309
+ const c = n, v = A(null), p = Q({
1340
1310
  checkedNode: null,
1341
1311
  hoverNode: null,
1342
1312
  disableHover: !1,
1343
1313
  matched: []
1344
- }), A = X({
1314
+ }), h = Q({
1345
1315
  schemas: [],
1346
1316
  script: s.script
1347
- }), { disabledZoom: m } = de();
1348
- ie(() => {
1349
- m.value = f.disabledZoom;
1350
- }), ie(() => {
1351
- const y = A.script;
1352
- y && y !== "" && u.setMethods(y);
1353
- }), $("pageSchema", A), $("revoke", w), $("pageManager", u), $(
1317
+ }), { disabledZoom: x } = ce();
1318
+ se(() => {
1319
+ x.value = d.disabledZoom;
1320
+ }), se(() => {
1321
+ const S = h.script;
1322
+ S && S !== "" && u.setMethods(S);
1323
+ }), N("pageSchema", h), N("revoke", w), N("pageManager", u), N(
1354
1324
  "designerProps",
1355
- U(() => f)
1356
- ), $("designer", {
1357
- setCheckedNode: h,
1358
- setHoverNode: x,
1359
- setDisableHover: B,
1360
- handleToggleDeviceMode: Z,
1361
- reset: se,
1362
- state: S
1363
- }), pe.on("saveSourceData", (y) => {
1364
- p("saveSourceData", y);
1365
- }), pe.on("deleteSourceData", (y) => {
1366
- p("deleteSourceData", y);
1367
- }), pe.on("updateSourceData", (y) => {
1368
- p("updateSourceData", y);
1325
+ T(() => d)
1326
+ ), N("designer", {
1327
+ setCheckedNode: g,
1328
+ setHoverNode: y,
1329
+ setDisableHover: V,
1330
+ handleToggleDeviceMode: de,
1331
+ reset: ee,
1332
+ state: p
1333
+ }), fe.on("saveSourceData", (S) => {
1334
+ c("saveSourceData", S);
1335
+ }), fe.on("deleteSourceData", (S) => {
1336
+ c("deleteSourceData", S);
1337
+ }), fe.on("updateSourceData", (S) => {
1338
+ c("updateSourceData", S);
1369
1339
  });
1370
- function g() {
1371
- A.schemas = N(s.schemas), h(A.schemas[0]), w.push(A.schemas, "初始化撤销功能");
1340
+ function m() {
1341
+ h.schemas = B(s.schemas), g(h.schemas[0]), w.push(h.schemas, "初始化撤销功能");
1372
1342
  }
1373
- async function h(y = A.schemas[0]) {
1374
- S.checkedNode = y, S.matched = Le(A.schemas, y.id);
1343
+ async function g(S = h.schemas[0]) {
1344
+ p.checkedNode = S, p.matched = ze(h.schemas, S.id);
1375
1345
  }
1376
- async function x(y = null) {
1377
- var i;
1378
- if (!y || S.disableHover)
1379
- return S.hoverNode = null, !1;
1380
- if ((y == null ? void 0 : y.id) === ((i = S.hoverNode) == null ? void 0 : i.id))
1346
+ async function y(S = null) {
1347
+ var M;
1348
+ if (!S || p.disableHover)
1349
+ return p.hoverNode = null, !1;
1350
+ if ((S == null ? void 0 : S.id) === ((M = p.hoverNode) == null ? void 0 : M.id))
1381
1351
  return !1;
1382
- S.hoverNode = y;
1352
+ p.hoverNode = S;
1383
1353
  }
1384
- function V() {
1385
- te(() => {
1386
- p("ready", { pageManager: u });
1354
+ function E() {
1355
+ j(() => {
1356
+ c("ready", { pageManager: u });
1387
1357
  });
1388
1358
  }
1389
- async function B(y = !1) {
1390
- S.disableHover = y;
1359
+ async function V(S = !1) {
1360
+ p.disableHover = S;
1391
1361
  }
1392
- function q(y) {
1393
- J(A, N(y));
1362
+ function U(S) {
1363
+ W(h, B(S));
1394
1364
  }
1395
- function re() {
1396
- return Se(A);
1365
+ function Z() {
1366
+ return we(h);
1397
1367
  }
1398
- function se() {
1399
- Ie(A.schemas, s.schemas) && A.script === s.script || (J(A.schemas, s.schemas), A.script = s.script, h(A.schemas[0]), w.push(A.schemas, "重置操作"), p("reset", A));
1368
+ function ee() {
1369
+ Ee(h.schemas, s.schemas) && h.script === s.script || (W(h.schemas, s.schemas), h.script = s.script, g(h.schemas[0]), w.push(h.schemas, "重置操作"), c("reset", h));
1400
1370
  }
1401
- function fe() {
1402
- p("save", Se(A));
1371
+ function ue() {
1372
+ c("save", we(h));
1403
1373
  }
1404
- function Z(y) {
1405
- p("toggleDeviceMode", y);
1374
+ function de(S) {
1375
+ c("toggleDeviceMode", S);
1406
1376
  }
1407
- function le() {
1408
- console.log("%c [ ]-385", "font-size:13px; background:pink; color:#bf2c9f;", f), v.value.handleOpen();
1377
+ function H() {
1378
+ console.log("%c [ ]-385", "font-size:13px; background:pink; color:#bf2c9f;", d), v.value.handleOpen();
1409
1379
  }
1410
- return g(), a({
1380
+ return m(), a({
1411
1381
  revoke: w,
1412
- setData: q,
1413
- getData: re,
1414
- reset: se,
1415
- preview: le
1416
- }), (y, i) => _(F).initialized.value ? (M(), z(ke, {
1382
+ setData: U,
1383
+ getData: Z,
1384
+ reset: ee,
1385
+ preview: H
1386
+ }), (S, M) => C(F).initialized.value ? (R(), z(De, {
1417
1387
  key: 1,
1418
- onResolve: V
1388
+ onResolve: E
1419
1389
  }, {
1420
1390
  default: P(() => [
1421
- L("div", Dt, [
1422
- L("div", kt, [
1423
- R(y.$slots, "header", {}, () => [
1424
- f.hiddenHeader ? De("", !0) : (M(), z(_(o), {
1391
+ J("div", Dt, [
1392
+ J("div", Et, [
1393
+ $(S.$slots, "header", {}, () => [
1394
+ d.hiddenHeader ? Ae("", !0) : (R(), z(C(o), {
1425
1395
  key: 0,
1426
- onPreview: le,
1427
- onSave: fe
1396
+ onPreview: H,
1397
+ onSave: ue
1428
1398
  }, {
1429
1399
  header: P(() => [
1430
- R(y.$slots, "header-prefix")
1400
+ $(S.$slots, "header-prefix")
1431
1401
  ]),
1432
1402
  prefix: P(() => [
1433
- R(y.$slots, "header-prefix")
1403
+ $(S.$slots, "header-prefix")
1434
1404
  ]),
1435
1405
  title: P(() => [
1436
- R(y.$slots, "header-title")
1406
+ $(S.$slots, "header-title")
1437
1407
  ]),
1438
1408
  "right-prefix": P(() => [
1439
- R(y.$slots, "header-right-prefix")
1409
+ $(S.$slots, "header-right-prefix")
1440
1410
  ]),
1441
1411
  "right-action": P(() => [
1442
- R(y.$slots, "header-right-action")
1412
+ $(S.$slots, "header-right-action")
1443
1413
  ]),
1444
1414
  "right-suffix": P(() => [
1445
- R(y.$slots, "header-right-suffix")
1415
+ $(S.$slots, "header-right-suffix")
1446
1416
  ]),
1447
1417
  _: 3
1448
1418
  }))
1449
1419
  ])
1450
1420
  ]),
1451
- L("div", {
1452
- class: Te(["epic-split-view-container", { "hidden-header": y.hiddenHeader }])
1421
+ J("div", {
1422
+ class: Te(["epic-split-view-container", { "hidden-header": S.hiddenHeader }])
1453
1423
  }, [
1454
- T(_(t)),
1455
- T(_(r)),
1456
- T(_(l))
1424
+ L(C(t)),
1425
+ L(C(r)),
1426
+ L(C(l))
1457
1427
  ], 2),
1458
- T(St, {
1428
+ L(St, {
1459
1429
  ref_key: "previewRef",
1460
1430
  ref: v
1461
1431
  }, null, 512)
1462
1432
  ])
1463
1433
  ]),
1464
1434
  fallback: P(() => [
1465
- L("div", It, [
1466
- T(_(c))
1435
+ J("div", kt, [
1436
+ L(C(i))
1467
1437
  ])
1468
1438
  ]),
1469
1439
  _: 3
1470
- })) : (M(), ye("div", At));
1440
+ })) : (R(), ve("div", At));
1471
1441
  }
1472
- }), Et = {
1473
- component: async () => await import("./index-Cn31n9Ni.js"),
1442
+ }), It = {
1443
+ component: async () => await import("./index-O79tvUa3.js"),
1474
1444
  defaultSchema: {
1475
1445
  label: "代码编辑器",
1476
1446
  type: "monacoEditor",
@@ -1520,16 +1490,16 @@ defineExpose({
1520
1490
  }
1521
1491
  };
1522
1492
  function Ct(e) {
1523
- e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-Z9miUEWt.js")), e.component("EActionEditor", async () => await import("./index-D38KoL_8.js")), e.component("ERuleEditor", async () => await import("./index-LveNbnCD.js")), e.component("EOptionsEditor", async () => await import("./index-DJ9FhHey.js")), e.component("ENode", async () => await import("./index-Cy_xP_CE.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
1493
+ e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-DMYNC73J.js")), e.component("EActionEditor", async () => await import("./index-Dz7IFRkI.js")), e.component("ERuleEditor", async () => await import("./index-Boh9Xc_a.js")), e.component("EOptionsEditor", async () => await import("./index-CrK_IhiA.js")), e.component("ENode", async () => await import("./index-C7VIh0HN.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
1524
1494
  id: "component_view",
1525
1495
  title: "组件",
1526
1496
  icon: "icon--epic--extension-outline",
1527
- component: async () => await import("./index-CqegmH7K.js")
1497
+ component: async () => await import("./index-aHQ5toGq.js")
1528
1498
  }), e.registerActivitybar({
1529
1499
  id: "sound_code_view",
1530
1500
  title: "源码",
1531
1501
  icon: "icon--epic--sdk-outline-rounded",
1532
- component: async () => await import("./index-CBD1g29V.js")
1502
+ component: async () => await import("./index-YMEmD-hy.js")
1533
1503
  }), e.registerActivitybar({
1534
1504
  id: "outline_view",
1535
1505
  title: "大纲",
@@ -1538,16 +1508,16 @@ function Ct(e) {
1538
1508
  }), e.registerRightSidebar({
1539
1509
  id: "attribute_view",
1540
1510
  title: "属性",
1541
- component: async () => await import("./attributeView-B9F_UkWB.js")
1511
+ component: async () => await import("./attributeView-ukvra0JR.js")
1542
1512
  }), e.registerRightSidebar({
1543
1513
  id: "style_view",
1544
1514
  title: "样式",
1545
- component: async () => await import("./styleView-B_GTo5jT.js")
1515
+ component: async () => await import("./styleView-OSZZjuEF.js")
1546
1516
  }), e.registerRightSidebar({
1547
1517
  id: "event_view",
1548
1518
  title: "事件",
1549
- component: async () => await import("./eventView-B17FncUM.js")
1550
- }), [Et, xt].forEach((n) => {
1519
+ component: async () => await import("./eventView-CxT-MCmM.js")
1520
+ }), [It, xt].forEach((n) => {
1551
1521
  e.registerComponent(n);
1552
1522
  });
1553
1523
  }
@@ -1557,7 +1527,7 @@ export {
1557
1527
  oe as B,
1558
1528
  We as C,
1559
1529
  ne as D,
1560
- ze as E,
1530
+ Le as E,
1561
1531
  gt as F,
1562
1532
  mt as G,
1563
1533
  ht as H,
@@ -1566,27 +1536,27 @@ export {
1566
1536
  Ht as a,
1567
1537
  pt as b,
1568
1538
  Nt as c,
1569
- J as d,
1539
+ W as d,
1570
1540
  Jt as e,
1571
1541
  $t as f,
1572
1542
  Ot as g,
1573
1543
  Tt as h,
1574
1544
  Wt as i,
1575
1545
  Bt as j,
1576
- ce as k,
1546
+ le as k,
1577
1547
  Rt as l,
1578
- N as m,
1579
- zt as n,
1580
- Ie as o,
1548
+ B as m,
1549
+ Lt as n,
1550
+ Ee as o,
1581
1551
  Vt as p,
1582
- Lt as q,
1552
+ zt as q,
1583
1553
  Xe as r,
1584
1554
  Ft as s,
1585
1555
  Kt as t,
1586
- de as u,
1587
- Ee as v,
1556
+ ce as u,
1557
+ ke as v,
1588
1558
  Ut as w,
1589
1559
  He as x,
1590
- Le as y,
1560
+ ze as y,
1591
1561
  Mt as z
1592
1562
  };