ss-component-new 1.1.151 → 1.1.153

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 (62) hide show
  1. package/dist/array-DVGuTzCT.js +2369 -0
  2. package/dist/array-Dvk6yiUL.cjs +7 -0
  3. package/dist/{cloneDeep-Cm2ut66T.js → cloneDeep-DkKx61Bt.js} +1 -1
  4. package/dist/{cloneDeep-B6Av9vYT.cjs → cloneDeep-jcra1x7z.cjs} +1 -1
  5. package/dist/{index-BlNU-ya_.js → index-5DqH53YU.js} +5 -5
  6. package/dist/{index-CsK9LWak.cjs → index-71hKmu5h.cjs} +1 -1
  7. package/dist/{index-DqOy9nnX.js → index-B0AMEBPQ.js} +4 -4
  8. package/dist/{index-DORM2j0-.js → index-B7-Jqwz9.js} +6 -6
  9. package/dist/{index-D_JFO4Ed.js → index-B8U0GdzV.js} +7 -7
  10. package/dist/{index-DjlDuRvf.cjs → index-B98dXkAO.cjs} +1 -1
  11. package/dist/{index-YajCTD4A.cjs → index-B9fdokGA.cjs} +1 -1
  12. package/dist/{index-BgY5srT7.cjs → index-BKSi0OHm.cjs} +1 -1
  13. package/dist/{index-BQK2DuaH.js → index-BLHp5fZH.js} +9 -9
  14. package/dist/{index-ODNyDte9.js → index-BcKPBr-M.js} +5 -5
  15. package/dist/{index-GvkFEReE.js → index-BjVljKhO.js} +4 -4
  16. package/dist/{index-DXQEaxeL.cjs → index-C2BIsypS.cjs} +1 -1
  17. package/dist/{index-BUkyNn3m.cjs → index-C6cGUU8r.cjs} +1 -1
  18. package/dist/{index-BHjs6gMr.js → index-C8Lw-TCN.js} +2 -2
  19. package/dist/{index-CMue5Zek.cjs → index-CAs3FK8K.cjs} +1 -1
  20. package/dist/{index-Cy23PxmQ.cjs → index-CHo1i5eE.cjs} +1 -1
  21. package/dist/{index-1TcDjOsz.cjs → index-CJXIfiup.cjs} +1 -1
  22. package/dist/{index-DyhHmlGD.js → index-CJoQdkOx.js} +1 -1
  23. package/dist/{index-Bel0p329.js → index-CL0E9Gam.js} +4 -4
  24. package/dist/{index-dm-zOhNm.cjs → index-C_r8GGc8.cjs} +1 -1
  25. package/dist/{index-BZaGIyxe.cjs → index-CgsVgySR.cjs} +1 -1
  26. package/dist/{index-C_Ek6N_z.js → index-ChZttmPY.js} +4 -4
  27. package/dist/{index-C8mv9PET.js → index-CoOOA4wz.js} +6 -6
  28. package/dist/{index-C1sMNKRi.cjs → index-D80irpfM.cjs} +1 -1
  29. package/dist/{index-DcuEMWMM.js → index-D9v6qzb5.js} +5 -5
  30. package/dist/{index-BH36LQch.js → index-DALRKLhd.js} +1 -1
  31. package/dist/{index-BaSc02sA.cjs → index-DBWK8_Qy.cjs} +1 -1
  32. package/dist/{index-D-6CVrZh.js → index-DGpm2dGJ.js} +1 -1
  33. package/dist/{index-wsyih2HQ.cjs → index-DLNqs62G.cjs} +1 -1
  34. package/dist/{index-Nb7mXZOf.js → index-DbTjUU-p.js} +3 -3
  35. package/dist/{index-Cxz9ADeg.cjs → index-Di4SiVp7.cjs} +1 -1
  36. package/dist/{index-D9hjyDNL.cjs → index-GKfDOHK8.cjs} +1 -1
  37. package/dist/{index-Ch7zPabE.cjs → index-GXUw7ZhM.cjs} +1 -1
  38. package/dist/{index-Ckrm7F4u.js → index-Ggavcm6D.js} +1 -1
  39. package/dist/{index-LX4uBOi3.cjs → index-SSOQjT-s.cjs} +1 -1
  40. package/dist/{index-CtTbyHOu.js → index-XKycH27E.js} +6 -6
  41. package/dist/{index-CcxZZo6K.cjs → index-mYhphJy9.cjs} +1 -1
  42. package/dist/{index-DoHr_nug.js → index-zJiQeshE.js} +4 -4
  43. package/dist/{index.vue_vue_type_script_setup_true_lang-ClNwGHXE.cjs → index.vue_vue_type_script_setup_true_lang-D8vVldof.cjs} +1 -1
  44. package/dist/{index.vue_vue_type_script_setup_true_lang-CuQ3xcyC.js → index.vue_vue_type_script_setup_true_lang-DoDGe_zH.js} +2 -2
  45. package/dist/{index.vue_vue_type_style_index_0_scoped_baf99455_lang-FY_pjpOg.js → index.vue_vue_type_style_index_0_scoped_baf99455_lang-C1p9Zydy.js} +4 -4
  46. package/dist/{index.vue_vue_type_style_index_0_scoped_baf99455_lang-W4auoQ9V.cjs → index.vue_vue_type_style_index_0_scoped_baf99455_lang-CJr7pTkw.cjs} +1 -1
  47. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BAlbShP-.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-e4P-SkgO.js} +3 -3
  48. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-ClRL5aRq.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-qesRJ3oE.cjs} +1 -1
  49. package/dist/{login-DnBDEGHt.js → login-BoCu8ePJ.js} +2 -2
  50. package/dist/{login-aDjal4KC.cjs → login-CzVsdp2w.cjs} +1 -1
  51. package/dist/{main-ChEDt98s.cjs → main-Dk5mtk5Z.cjs} +1 -1
  52. package/dist/{main-Do8E5J_V.js → main-I1ls0mvf.js} +4 -4
  53. package/dist/{request-BId7xEpo.cjs → request-CmWceos-.cjs} +1 -1
  54. package/dist/{request-RC5ET7Nr.js → request-DrfWVRx3.js} +1 -1
  55. package/dist/ss-component.cjs +1 -1
  56. package/dist/ss-component.css +1 -1
  57. package/dist/ss-component.js +6 -6
  58. package/dist/ss-component2.cjs +1 -1
  59. package/dist/ss-component2.js +1 -1
  60. package/package.json +1 -1
  61. package/dist/array-C09NLiVl.cjs +0 -7
  62. package/dist/array-CqhTXR28.js +0 -2348
@@ -0,0 +1,2369 @@
1
+ import { u as ml, g as bl, s as gl } from "./index-CL0E9Gam.js";
2
+ import { ref as J, watch as ne, createElementBlock as Y, openBlock as z, createVNode as V, resolveComponent as Ye, createElementVNode as I, toDisplayString as Q, withCtx as te, createTextVNode as oe, Fragment as he, renderList as xe, createBlock as Se, resolveDynamicComponent as Pe, createCommentVNode as kl } from "vue";
3
+ import { p as ve, g as Be } from "./index-DALRKLhd.js";
4
+ import { s as De, f as Cl, a as ce, b as Al } from "./index-zJiQeshE.js";
5
+ import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { U as je, g as Ue, a as Fe, i as we, S as Ce, b as $l, c as p } from "./cloneDeep-DkKx61Bt.js";
7
+ import { _ as _l } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
8
+ import { a as Ol } from "./request-DrfWVRx3.js";
9
+ import { _ as xl } from "./index.vue_vue_type_script_setup_true_lang-DoDGe_zH.js";
10
+ import { M as Tl, S as Re, e as vl, i as Je, b as Le } from "./index-B8U0GdzV.js";
11
+ import { s as Ve, u as Dl } from "./menu-XcYMZJLY.js";
12
+ import { u as El } from "./modelComp-CP-waker.js";
13
+ var Nl = "__lodash_hash_undefined__";
14
+ function Sl(e) {
15
+ return this.__data__.set(e, Nl), this;
16
+ }
17
+ function Pl(e) {
18
+ return this.__data__.has(e);
19
+ }
20
+ function ge(e) {
21
+ var n = -1, t = e == null ? 0 : e.length;
22
+ for (this.__data__ = new Tl(); ++n < t; )
23
+ this.add(e[n]);
24
+ }
25
+ ge.prototype.add = ge.prototype.push = Sl;
26
+ ge.prototype.has = Pl;
27
+ function Bl(e, n) {
28
+ for (var t = -1, l = e == null ? 0 : e.length; ++t < l; )
29
+ if (n(e[t], t, e))
30
+ return !0;
31
+ return !1;
32
+ }
33
+ function jl(e, n) {
34
+ return e.has(n);
35
+ }
36
+ var Ul = 1, Fl = 2;
37
+ function el(e, n, t, l, s, a) {
38
+ var o = t & Ul, f = e.length, h = n.length;
39
+ if (f != h && !(o && h > f))
40
+ return !1;
41
+ var m = a.get(e), k = a.get(n);
42
+ if (m && k)
43
+ return m == n && k == e;
44
+ var A = -1, $ = !0, O = t & Fl ? new ge() : void 0;
45
+ for (a.set(e, n), a.set(n, e); ++A < f; ) {
46
+ var C = e[A], P = n[A];
47
+ if (l)
48
+ var d = o ? l(P, C, A, n, e, a) : l(C, P, A, e, n, a);
49
+ if (d !== void 0) {
50
+ if (d)
51
+ continue;
52
+ $ = !1;
53
+ break;
54
+ }
55
+ if (O) {
56
+ if (!Bl(n, function(i, u) {
57
+ if (!jl(O, u) && (C === i || s(C, i, t, l, a)))
58
+ return O.push(u);
59
+ })) {
60
+ $ = !1;
61
+ break;
62
+ }
63
+ } else if (!(C === P || s(C, P, t, l, a))) {
64
+ $ = !1;
65
+ break;
66
+ }
67
+ }
68
+ return a.delete(e), a.delete(n), $;
69
+ }
70
+ function wl(e) {
71
+ var n = -1, t = Array(e.size);
72
+ return e.forEach(function(l, s) {
73
+ t[++n] = [s, l];
74
+ }), t;
75
+ }
76
+ function Rl(e) {
77
+ var n = -1, t = Array(e.size);
78
+ return e.forEach(function(l) {
79
+ t[++n] = l;
80
+ }), t;
81
+ }
82
+ var Jl = 1, Ll = 2, Gl = "[object Boolean]", Ml = "[object Date]", Il = "[object Error]", Hl = "[object Map]", Wl = "[object Number]", Zl = "[object RegExp]", Kl = "[object Set]", ql = "[object String]", zl = "[object Symbol]", Ql = "[object ArrayBuffer]", Xl = "[object DataView]", Ge = Re ? Re.prototype : void 0, Ae = Ge ? Ge.valueOf : void 0;
83
+ function Yl(e, n, t, l, s, a, o) {
84
+ switch (t) {
85
+ case Xl:
86
+ if (e.byteLength != n.byteLength || e.byteOffset != n.byteOffset)
87
+ return !1;
88
+ e = e.buffer, n = n.buffer;
89
+ case Ql:
90
+ return !(e.byteLength != n.byteLength || !a(new je(e), new je(n)));
91
+ case Gl:
92
+ case Ml:
93
+ case Wl:
94
+ return vl(+e, +n);
95
+ case Il:
96
+ return e.name == n.name && e.message == n.message;
97
+ case Zl:
98
+ case ql:
99
+ return e == n + "";
100
+ case Hl:
101
+ var f = wl;
102
+ case Kl:
103
+ var h = l & Jl;
104
+ if (f || (f = Rl), e.size != n.size && !h)
105
+ return !1;
106
+ var m = o.get(e);
107
+ if (m)
108
+ return m == n;
109
+ l |= Ll, o.set(e, n);
110
+ var k = el(f(e), f(n), l, s, a, o);
111
+ return o.delete(e), k;
112
+ case zl:
113
+ if (Ae)
114
+ return Ae.call(e) == Ae.call(n);
115
+ }
116
+ return !1;
117
+ }
118
+ var Vl = 1, en = Object.prototype, ln = en.hasOwnProperty;
119
+ function nn(e, n, t, l, s, a) {
120
+ var o = t & Vl, f = Ue(e), h = f.length, m = Ue(n), k = m.length;
121
+ if (h != k && !o)
122
+ return !1;
123
+ for (var A = h; A--; ) {
124
+ var $ = f[A];
125
+ if (!(o ? $ in n : ln.call(n, $)))
126
+ return !1;
127
+ }
128
+ var O = a.get(e), C = a.get(n);
129
+ if (O && C)
130
+ return O == n && C == e;
131
+ var P = !0;
132
+ a.set(e, n), a.set(n, e);
133
+ for (var d = o; ++A < h; ) {
134
+ $ = f[A];
135
+ var i = e[$], u = n[$];
136
+ if (l)
137
+ var b = o ? l(u, i, $, n, e, a) : l(i, u, $, e, n, a);
138
+ if (!(b === void 0 ? i === u || s(i, u, t, l, a) : b)) {
139
+ P = !1;
140
+ break;
141
+ }
142
+ d || (d = $ == "constructor");
143
+ }
144
+ if (P && !d) {
145
+ var c = e.constructor, r = n.constructor;
146
+ c != r && "constructor" in e && "constructor" in n && !(typeof c == "function" && c instanceof c && typeof r == "function" && r instanceof r) && (P = !1);
147
+ }
148
+ return a.delete(e), a.delete(n), P;
149
+ }
150
+ var tn = 1, Me = "[object Arguments]", Ie = "[object Array]", ie = "[object Object]", an = Object.prototype, He = an.hasOwnProperty;
151
+ function sn(e, n, t, l, s, a) {
152
+ var o = Je(e), f = Je(n), h = o ? Ie : Fe(e), m = f ? Ie : Fe(n);
153
+ h = h == Me ? ie : h, m = m == Me ? ie : m;
154
+ var k = h == ie, A = m == ie, $ = h == m;
155
+ if ($ && we(e)) {
156
+ if (!we(n))
157
+ return !1;
158
+ o = !0, k = !1;
159
+ }
160
+ if ($ && !k)
161
+ return a || (a = new Ce()), o || $l(e) ? el(e, n, t, l, s, a) : Yl(e, n, h, t, l, s, a);
162
+ if (!(t & tn)) {
163
+ var O = k && He.call(e, "__wrapped__"), C = A && He.call(n, "__wrapped__");
164
+ if (O || C) {
165
+ var P = O ? e.value() : e, d = C ? n.value() : n;
166
+ return a || (a = new Ce()), s(P, d, t, l, a);
167
+ }
168
+ }
169
+ return $ ? (a || (a = new Ce()), nn(e, n, t, l, s, a)) : !1;
170
+ }
171
+ function ll(e, n, t, l, s) {
172
+ return e === n ? !0 : e == null || n == null || !Le(e) && !Le(n) ? e !== e && n !== n : sn(e, n, t, l, ll, s);
173
+ }
174
+ function rn(e, n) {
175
+ return ll(e, n);
176
+ }
177
+ const fe = [
178
+ {
179
+ key: "单选",
180
+ value: "Select"
181
+ },
182
+ {
183
+ key: "日期",
184
+ value: "Date"
185
+ },
186
+ {
187
+ key: "长文本",
188
+ value: "TextArea"
189
+ },
190
+ {
191
+ key: "上传",
192
+ value: "Upload"
193
+ }
194
+ ], on = { class: "form-content" }, cn = {
195
+ __name: "index",
196
+ props: {
197
+ itemData: {
198
+ type: Array,
199
+ default: () => []
200
+ },
201
+ childItemData: {
202
+ type: Array,
203
+ default: () => []
204
+ },
205
+ index: Number
206
+ },
207
+ emits: ["change", "contentChange"],
208
+ setup(e, { emit: n }) {
209
+ const t = e, l = n, s = J([]), a = J(!1), o = J([]), f = ml(ve), h = J(), m = (A) => {
210
+ var d, i, u, b;
211
+ const $ = (i = (d = p(t.itemData)) == null ? void 0 : d.find((c) => (c == null ? void 0 : c.key) === "formContent")) == null ? void 0 : i.contents, O = p(A.content);
212
+ let C = {};
213
+ O && ((u = Object.values(O)) == null ? void 0 : u.length) > 0 && ((b = Object.values(O)) == null || b.forEach((c, r) => {
214
+ C[$[r].key] = c;
215
+ }));
216
+ const P = {
217
+ content: C,
218
+ index: t == null ? void 0 : t.index,
219
+ buttonName: A == null ? void 0 : A.buttonName
220
+ };
221
+ l("change", P);
222
+ }, k = (A) => {
223
+ var C, P;
224
+ if (!A) return;
225
+ if (((C = Object.values(p(A))) == null ? void 0 : C.length) > 0) {
226
+ const d = (P = Object.values(p(A))) == null ? void 0 : P.map((u) => u);
227
+ let i = "";
228
+ d == null || d.forEach((u) => {
229
+ u !== "" && u !== void 0 && (i = i === "" ? u : i + "/" + u);
230
+ }), f.setSelectArray(d), f.setSelectString(i);
231
+ }
232
+ const $ = p(t.itemData), O = $ == null ? void 0 : $.map((d) => {
233
+ var i;
234
+ return (d == null ? void 0 : d.key) === "formContent" && ((i = d.contents) == null || i.map((u, b) => {
235
+ var c, r, y, _, T, v, x, F, D, E, B, S, N, g, j, w, L, H, Z;
236
+ return u.type = u != null && u.type ? u.type : (_ = (y = (r = (c = u == null ? void 0 : u.key) == null ? void 0 : c.split("$")) == null ? void 0 : r[1]) == null ? void 0 : y.split("(")) != null && _[0] ? (T = fe == null ? void 0 : fe.find((W) => {
237
+ var X, K, U, q;
238
+ return (W == null ? void 0 : W.key) === ((q = (U = (K = (X = u == null ? void 0 : u.key) == null ? void 0 : X.split("$")) == null ? void 0 : K[1]) == null ? void 0 : U.split("(")) == null ? void 0 : q[0]);
239
+ })) == null ? void 0 : T.value : "Input", u.options = u != null && u.options ? u.options : ((F = (x = (v = u == null ? void 0 : u.key) == null ? void 0 : v.split("$")) == null ? void 0 : x[1]) == null ? void 0 : F.length) > 0 ? (S = (B = Cl((E = (D = u == null ? void 0 : u.key) == null ? void 0 : D.split("$")) == null ? void 0 : E[1])) == null ? void 0 : B.split(",")) == null ? void 0 : S.map((W) => ({
240
+ label: W,
241
+ value: W
242
+ })) : [], (N = u == null ? void 0 : u.key) != null && N.includes("$") && (u.key = (j = (g = u == null ? void 0 : u.key) == null ? void 0 : g.split("$")) == null ? void 0 : j[0]), u.value = u != null && u.value ? u.value : Array.isArray((w = Object.values(A)) == null ? void 0 : w[b]) ? (H = (L = Object.values(A)) == null ? void 0 : L[b]) == null ? void 0 : H[0] : (Z = Object.values(A)) == null ? void 0 : Z[b], u;
243
+ })), d;
244
+ });
245
+ l("contentChange", {
246
+ contents: O,
247
+ index: t.index
248
+ });
249
+ };
250
+ return ne(
251
+ () => t.itemData,
252
+ () => {
253
+ var P, d, i, u, b, c, r, y, _, T;
254
+ const A = (P = p(t.itemData)) == null ? void 0 : P.find((v) => (v == null ? void 0 : v.key) === "formContent"), $ = (d = p(t.itemData)) == null ? void 0 : d.find((v) => (v == null ? void 0 : v.key) === "formButton"), O = (i = p(t.itemData)) == null ? void 0 : i.find((v) => (v == null ? void 0 : v.key) === "formFlex"), C = (u = p(t.itemData)) == null ? void 0 : u.find((v) => (v == null ? void 0 : v.key) === "formWrap");
255
+ if ((C == null ? void 0 : C.contents) === "纵向" ? a.value = !1 : a.value = !0, h.value = typeof (O == null ? void 0 : O.contents) != "boolean" ? !(!(O != null && O.contents) === "" || ((b = O == null ? void 0 : O.contents) == null ? void 0 : b.toUpperCase()) === "VERTICAL") : O == null ? void 0 : O.contents, ((c = A == null ? void 0 : A.contents) == null ? void 0 : c.length) > 0 && Array.isArray(A == null ? void 0 : A.contents)) {
256
+ const v = [];
257
+ (r = A == null ? void 0 : A.contents) == null || r.forEach((D, E) => {
258
+ var B, S, N, g, j, w, L, H, Z, W;
259
+ if ((D == null ? void 0 : D.label) !== "") {
260
+ let X = (D == null ? void 0 : D.key) ?? "", K = (D == null ? void 0 : D.type) ?? "", U = (D == null ? void 0 : D.options) ?? [];
261
+ if ((B = D == null ? void 0 : D.key) != null && B.includes("$") && (X = (S = p(D == null ? void 0 : D.key).split("$")) == null ? void 0 : S[0], ((g = (N = p(D == null ? void 0 : D.key).split("$")) == null ? void 0 : N[1]) == null ? void 0 : g.length) > 0)) {
262
+ const [q, R] = (w = (j = p(D == null ? void 0 : D.key).split("$")) == null ? void 0 : j[1]) == null ? void 0 : w.split(/[()]/);
263
+ K = ((L = fe.find((ee) => (ee == null ? void 0 : ee.key) === q)) == null ? void 0 : L.value) ?? "", ((H = R == null ? void 0 : R.split(",")) == null ? void 0 : H.length) > 0 && (U = (Z = R == null ? void 0 : R.split(",")) == null ? void 0 : Z.map((ee) => ({
264
+ label: ee,
265
+ value: ee
266
+ })));
267
+ }
268
+ v.push({
269
+ label: X ?? "",
270
+ name: "t" + E,
271
+ type: K === "" ? "Input" : K,
272
+ value: D != null && D.value ? D.value : (U == null ? void 0 : U.length) > 0 ? (W = U == null ? void 0 : U[0]) == null ? void 0 : W.value : (D == null ? void 0 : D.value) ?? "",
273
+ id: (D == null ? void 0 : D.id) ?? E,
274
+ contents: U ?? [],
275
+ width: (D == null ? void 0 : D.width) ?? 1
276
+ });
277
+ }
278
+ });
279
+ const x = (y = p(v)) == null ? void 0 : y.map((D) => D.value);
280
+ let F = "";
281
+ x == null || x.forEach((D) => {
282
+ D !== "" && D !== void 0 && (F = F === "" ? D : F + "/" + D);
283
+ }), f.setSelectArray(x), f.setSelectString(F), s.value = v;
284
+ } else
285
+ s.value = [];
286
+ if (((_ = $ == null ? void 0 : $.contents) == null ? void 0 : _.length) > 0) {
287
+ const v = [];
288
+ (T = $ == null ? void 0 : $.contents) == null || T.forEach((x, F) => {
289
+ (x == null ? void 0 : x.label) !== "" && v.push({
290
+ label: (x == null ? void 0 : x.label) ?? "",
291
+ id: (x == null ? void 0 : x.id) ?? F,
292
+ type: (x == null ? void 0 : x.type) ?? "",
293
+ background: x == null ? void 0 : x.background
294
+ });
295
+ }), o.value = v;
296
+ } else
297
+ o.value = [];
298
+ },
299
+ { deep: !0, immediate: !0 }
300
+ ), (A, $) => (z(), Y("div", on, [
301
+ V(De, {
302
+ rowContents: s.value,
303
+ buttonValue: o.value,
304
+ isRowFlex: h.value,
305
+ isEnableWrap: !1,
306
+ onOnButtonClick: m,
307
+ onChange: k,
308
+ isButtonRow: a.value
309
+ }, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
310
+ ]));
311
+ }
312
+ }, un = /* @__PURE__ */ ue(cn, [["__scopeId", "data-v-1b0ef247"]]), pn = { class: "table-operate-content" }, fn = { class: "table-operate-item" }, dn = { class: "operate-title" }, yn = { class: "operate-content" }, hn = { class: "operate-title" }, mn = { class: "operate-content" }, bn = { class: "operate-title" }, gn = { class: "operate-content" }, kn = { class: "operate-content" }, Cn = {
313
+ __name: "operate",
314
+ props: {
315
+ itemContents: {
316
+ type: Array,
317
+ default: () => []
318
+ },
319
+ originalItemContents: {
320
+ type: Array,
321
+ default: () => []
322
+ }
323
+ },
324
+ emits: ["change"],
325
+ setup(e, { emit: n }) {
326
+ const t = e, l = n, s = J([]), a = J([]), o = J([]), f = J([{
327
+ label: "按钮名称",
328
+ prop: "label",
329
+ type: "edit"
330
+ }, {
331
+ label: "按钮类型",
332
+ prop: "type",
333
+ type: "edit"
334
+ }, {
335
+ label: "按钮背景颜色",
336
+ prop: "background",
337
+ type: "edit",
338
+ columnType: "Color"
339
+ }, {
340
+ label: "操作",
341
+ prop: "operate",
342
+ type: "operate",
343
+ sortable: !1
344
+ }]), h = J([{
345
+ label: "标签名称",
346
+ prop: "label",
347
+ type: "edit"
348
+ }, {
349
+ label: "标签类型",
350
+ prop: "type",
351
+ type: "edit"
352
+ }, {
353
+ label: "按钮文字颜色",
354
+ prop: "textColor",
355
+ type: "edit",
356
+ columnType: "Color"
357
+ }, {
358
+ label: "操作",
359
+ prop: "operate",
360
+ type: "operate",
361
+ sortable: !1
362
+ }]), m = J([]), k = J(0), A = J([{
363
+ name: "isPagination",
364
+ label: "是否显示分页",
365
+ type: "Switch",
366
+ value: !0
367
+ }]), $ = [{
368
+ label: "标签名",
369
+ prop: "label",
370
+ type: "edit"
371
+ }, {
372
+ label: "属性名",
373
+ prop: "prop",
374
+ type: "edit"
375
+ }, {
376
+ label: "宽度",
377
+ prop: "width",
378
+ type: "edit",
379
+ columnType: "Number"
380
+ }, {
381
+ label: "是否固定列",
382
+ prop: "fixed",
383
+ type: "edit",
384
+ columnType: "Radio",
385
+ contents: [{
386
+ label: "left",
387
+ value: "左"
388
+ }, {
389
+ label: "right",
390
+ value: "右"
391
+ }]
392
+ }, {
393
+ label: "是否支持排序",
394
+ prop: "sortable",
395
+ type: "edit",
396
+ columnType: "Switch"
397
+ }, {
398
+ label: "文本所在位置",
399
+ prop: "align",
400
+ type: "edit",
401
+ columnType: "Radio",
402
+ contents: [{
403
+ label: "left",
404
+ value: "左"
405
+ }, {
406
+ label: "center",
407
+ value: "中"
408
+ }, {
409
+ label: "right",
410
+ value: "右"
411
+ }]
412
+ }, {
413
+ label: "溢出悬浮文字",
414
+ prop: "showOverflowTooltip",
415
+ type: "edit",
416
+ columnType: "Switch"
417
+ }, {
418
+ label: "是否不可拖动",
419
+ prop: "isNotDrag",
420
+ type: "edit",
421
+ columnType: "Switch"
422
+ }, {
423
+ label: "是否可编辑列名",
424
+ //暂不支持
425
+ prop: "isEditCol",
426
+ type: "edit",
427
+ columnType: "Switch"
428
+ }, {
429
+ label: "是否出现在附属界面",
430
+ //暂不支持
431
+ prop: "isOperate",
432
+ type: "edit",
433
+ columnType: "Switch"
434
+ }, {
435
+ label: "操作",
436
+ prop: "operate",
437
+ type: "operate",
438
+ sortable: !1
439
+ }], O = (c) => {
440
+ let r = p(s.value);
441
+ const y = r == null ? void 0 : r.find((_) => _.key === "page");
442
+ (y == null ? void 0 : y.contents) !== void 0 ? r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "page" && (_.contents = c == null ? void 0 : c.isPagination), _)) : r.push({
443
+ key: "page",
444
+ contents: c == null ? void 0 : c.isPagination
445
+ }), s.value = r;
446
+ };
447
+ ne(
448
+ () => t.originalItemContents,
449
+ () => {
450
+ var c, r, y, _, T, v, x, F, D, E, B, S, N;
451
+ !t.originalItemContents || t.originalItemContents.length === 0 || (s.value = p(t.originalItemContents), a.value = (r = (c = s.value) == null ? void 0 : c.find((g) => (g == null ? void 0 : g.key) === "header")) == null ? void 0 : r.contents, o.value = (_ = (y = s.value) == null ? void 0 : y.find((g) => (g == null ? void 0 : g.key) === "rowButton")) == null ? void 0 : _.contents, f.value = (v = (T = s.value) == null ? void 0 : T.find((g) => (g == null ? void 0 : g.key) === "extraButton")) == null ? void 0 : v.contents, A.value = (F = (x = s.value) == null ? void 0 : x.find((g) => (g == null ? void 0 : g.key) === "page")) != null && F.contents ? [{
452
+ name: "isPagination",
453
+ label: "是否显示分页",
454
+ type: "Switch",
455
+ value: (E = (D = s.value) == null ? void 0 : D.find((g) => (g == null ? void 0 : g.key) === "page")) == null ? void 0 : E.contents
456
+ }] : [{
457
+ name: "isPagination",
458
+ label: "是否显示分页",
459
+ type: "Switch",
460
+ value: !0
461
+ }], a.value = (B = a.value) == null ? void 0 : B.map((g, j) => g = {
462
+ label: (g == null ? void 0 : g.label) ?? "",
463
+ prop: (g == null ? void 0 : g.label) === "操作" ? "operate" : g == null ? void 0 : g.prop,
464
+ width: g != null && g.width ? parseInt(g.width) : "",
465
+ fixed: (g == null ? void 0 : g.fixed) ?? void 0,
466
+ sortable: (g == null ? void 0 : g.sortable) ?? !1,
467
+ align: (g == null ? void 0 : g.align) ?? "center",
468
+ showOverflowTooltip: (g == null ? void 0 : g.showOverflowTooltip) ?? !0,
469
+ isNotDrag: (g == null ? void 0 : g.isNotDrag) ?? !1,
470
+ isEditCol: (g == null ? void 0 : g.isEditCol) ?? !1,
471
+ isOperate: (g == null ? void 0 : g.isOperate) ?? !1,
472
+ id: (g == null ? void 0 : g.id) ?? j
473
+ }), o.value = (S = o.value) == null ? void 0 : S.map((g, j) => g = {
474
+ label: (g == null ? void 0 : g.label) ?? "",
475
+ type: (g == null ? void 0 : g.type) ?? "",
476
+ textColor: (g == null ? void 0 : g.textColor) ?? "#000000",
477
+ id: (g == null ? void 0 : g.id) ?? j
478
+ }), f.value = (N = f.value) == null ? void 0 : N.map((g, j) => g = {
479
+ label: (g == null ? void 0 : g.label) ?? "",
480
+ type: (g == null ? void 0 : g.type) ?? "",
481
+ background: (g == null ? void 0 : g.textColor) ?? "#FFFFFF",
482
+ id: (g == null ? void 0 : g.id) ?? j
483
+ }));
484
+ },
485
+ { deep: !0, immediate: !0 }
486
+ ), ne(
487
+ () => A.value,
488
+ () => {
489
+ var y;
490
+ let c = p(s.value);
491
+ const r = c == null ? void 0 : c.find((_) => _.key === "page");
492
+ r != null && r.contents ? c = c == null ? void 0 : c.map((_) => {
493
+ var T;
494
+ return (_ == null ? void 0 : _.key) === "page" && (_.contents = (T = A.value) == null ? void 0 : T[0].value), _;
495
+ }) : c.push({
496
+ key: "page",
497
+ contents: (y = A.value) == null ? void 0 : y[0].value
498
+ }), s.value = c;
499
+ },
500
+ { immediate: !0, deep: !0 }
501
+ );
502
+ const C = () => {
503
+ const c = p(a.value);
504
+ let r = p(s.value);
505
+ c.push({
506
+ label: "",
507
+ prop: "",
508
+ width: "",
509
+ fixed: void 0,
510
+ sortable: !1,
511
+ align: "center",
512
+ showOverflowTooltip: !0,
513
+ isNotDrag: !1,
514
+ isEditCol: !1,
515
+ isOperate: !1,
516
+ id: k.value
517
+ }), a.value = c, k.value++;
518
+ const y = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "header");
519
+ y != null && y.contents ? (y.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = c), _))) : r.push({
520
+ key: "header",
521
+ contents: c
522
+ }), s.value = r;
523
+ }, P = () => {
524
+ const c = p(o.value);
525
+ let r = p(s.value);
526
+ c.push({
527
+ label: "",
528
+ type: "",
529
+ textColor: "#000000",
530
+ id: k.value
531
+ }), o.value = c, k.value++;
532
+ const y = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "rowButton");
533
+ y != null && y.contents ? (y.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = c), _))) : r.push({
534
+ key: "rowButton",
535
+ contents: c
536
+ }), s.value = r;
537
+ }, d = () => {
538
+ const c = p(m.value);
539
+ let r = p(s.value);
540
+ c.push({
541
+ label: "",
542
+ type: "",
543
+ background: "#FFFFFF",
544
+ id: k.value
545
+ }), m.value = c, k.value++;
546
+ const y = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "extraButton");
547
+ y != null && y.contents ? (y.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = c), _))) : r.push({
548
+ key: "extraButton",
549
+ contents: c
550
+ }), s.value = r;
551
+ }, i = (c) => {
552
+ const r = p(o.value);
553
+ let y = p(s.value);
554
+ o.value = r.filter((T) => T.id !== c.id);
555
+ const _ = y == null ? void 0 : y.find((T) => T.key === "rowButton");
556
+ _ != null && _.contents && (y = y == null ? void 0 : y.map((T) => ((T == null ? void 0 : T.key) === "rowButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), s.value = y;
557
+ }, u = (c) => {
558
+ const r = p(m.value);
559
+ let y = p(s.value);
560
+ m.value = r.filter((T) => T.id !== c.id);
561
+ const _ = y == null ? void 0 : y.find((T) => T.key === "extraButton");
562
+ _ != null && _.contents && (y = y == null ? void 0 : y.map((T) => ((T == null ? void 0 : T.key) === "extraButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), s.value = y;
563
+ }, b = (c) => {
564
+ const r = p(a.value);
565
+ let y = p(s.value);
566
+ a.value = r.filter((T) => T.id !== c.id);
567
+ const _ = y == null ? void 0 : y.find((T) => T.key === "header");
568
+ _ != null && _.contents && (y = y == null ? void 0 : y.map((T) => ((T == null ? void 0 : T.key) === "header" && (T.contents = r.filter((v) => v.id !== c.id)), T))), s.value = y;
569
+ };
570
+ return ne(
571
+ () => [s.value, a.value],
572
+ () => {
573
+ let c = p(s.value);
574
+ const r = c == null ? void 0 : c.find((y) => (y == null ? void 0 : y.key) === "header");
575
+ r != null && r.contents ? (r.contents = a.value, c = c == null ? void 0 : c.map((y) => ((y == null ? void 0 : y.key) === "header" && (y.contents = a.value), y))) : c.push({
576
+ key: "header",
577
+ contents: a.value
578
+ }), l("change", c);
579
+ },
580
+ { deep: !0, immediate: !0 }
581
+ ), (c, r) => {
582
+ const y = Ye("el-button");
583
+ return z(), Y("div", pn, [
584
+ I("div", fn, [
585
+ I("div", dn, [
586
+ r[1] || (r[1] = I("div", null, Q("表头"), -1)),
587
+ V(y, {
588
+ class: "blue-operate-button",
589
+ icon: "ele-Plus",
590
+ onClick: C
591
+ }, {
592
+ default: te(() => r[0] || (r[0] = [
593
+ oe(Q("新建"))
594
+ ])),
595
+ _: 1,
596
+ __: [0]
597
+ })
598
+ ]),
599
+ I("div", yn, [
600
+ V(ce, {
601
+ columns: $,
602
+ isShowPagination: !1,
603
+ isShowEdit: !1,
604
+ isMoveColumn: !1,
605
+ tableData: a.value,
606
+ onDeleteRow: b
607
+ }, null, 8, ["tableData"])
608
+ ]),
609
+ I("div", hn, [
610
+ r[3] || (r[3] = I("div", null, Q("行内按钮"), -1)),
611
+ V(y, {
612
+ class: "blue-operate-button",
613
+ icon: "ele-Plus",
614
+ onClick: P
615
+ }, {
616
+ default: te(() => r[2] || (r[2] = [
617
+ oe(Q("新建"))
618
+ ])),
619
+ _: 1,
620
+ __: [2]
621
+ })
622
+ ]),
623
+ I("div", mn, [
624
+ V(ce, {
625
+ columns: h.value,
626
+ isShowPagination: !1,
627
+ isShowEdit: !1,
628
+ isMoveColumn: !1,
629
+ tableData: o.value,
630
+ onDeleteRow: i
631
+ }, null, 8, ["columns", "tableData"])
632
+ ]),
633
+ I("div", bn, [
634
+ r[5] || (r[5] = I("div", null, Q("表格外部按钮"), -1)),
635
+ V(y, {
636
+ class: "blue-operate-button",
637
+ icon: "ele-Plus",
638
+ onClick: d
639
+ }, {
640
+ default: te(() => r[4] || (r[4] = [
641
+ oe(Q("新建"))
642
+ ])),
643
+ _: 1,
644
+ __: [4]
645
+ })
646
+ ]),
647
+ I("div", gn, [
648
+ V(ce, {
649
+ columns: f.value,
650
+ isShowPagination: !1,
651
+ isShowEdit: !1,
652
+ isMoveColumn: !1,
653
+ tableData: m.value,
654
+ onDeleteRow: u
655
+ }, null, 8, ["columns", "tableData"])
656
+ ]),
657
+ r[6] || (r[6] = I("div", { class: "operate-title" }, [
658
+ I("div", null, Q("分页"))
659
+ ], -1)),
660
+ I("div", kn, [
661
+ V(De, {
662
+ rowContents: A.value,
663
+ onChange: O
664
+ }, null, 8, ["rowContents"])
665
+ ])
666
+ ])
667
+ ]);
668
+ };
669
+ }
670
+ }, An = /* @__PURE__ */ ue(Cn, [["__scopeId", "data-v-877911eb"]]), $n = { class: "form-operate-content" }, _n = { class: "form-operate-item" }, On = { class: "operate-title" }, xn = { class: "operate-content" }, Tn = { class: "operate-title" }, vn = { class: "operate-content" }, Dn = { class: "operate-content" }, En = {
671
+ __name: "operate",
672
+ props: {
673
+ itemContents: {
674
+ type: Array,
675
+ default: () => []
676
+ },
677
+ originalItemContents: {
678
+ type: Array,
679
+ default: () => []
680
+ }
681
+ },
682
+ emits: ["change"],
683
+ setup(e, { emit: n }) {
684
+ const t = e, l = n, s = J([{
685
+ name: "isRowFlex",
686
+ label: "是否横向布局",
687
+ type: "Switch",
688
+ value: !0
689
+ }]), a = J([{
690
+ label: "字段名称",
691
+ prop: "label",
692
+ type: "edit"
693
+ }, {
694
+ label: "字段类型",
695
+ prop: "type",
696
+ type: "edit"
697
+ }, {
698
+ label: "字段值",
699
+ prop: "key",
700
+ type: "edit"
701
+ }, {
702
+ label: "字段选项值",
703
+ prop: "options",
704
+ type: "edit"
705
+ }, {
706
+ label: "操作",
707
+ prop: "operate",
708
+ type: "operate",
709
+ sortable: !1
710
+ }]), o = J([{
711
+ label: "字段名称",
712
+ prop: "label",
713
+ type: "edit"
714
+ }, {
715
+ label: "字段类型",
716
+ prop: "type",
717
+ type: "edit"
718
+ }, {
719
+ label: "按钮背景颜色",
720
+ prop: "background",
721
+ type: "edit",
722
+ columnType: "Color"
723
+ }, {
724
+ label: "操作",
725
+ prop: "operate",
726
+ type: "operate",
727
+ sortable: !1
728
+ }]), f = J([]), h = J([]), m = J([]), k = J(0);
729
+ ne(
730
+ () => t.originalItemContents,
731
+ () => {
732
+ var d, i, u, b, c, r, y, _, T, v;
733
+ !t.originalItemContents || t.originalItemContents.length === 0 || (h.value = p(t.originalItemContents), m.value = (i = (d = h.value) == null ? void 0 : d.find((x) => (x == null ? void 0 : x.key) === "formContent")) == null ? void 0 : i.contents, f.value = (b = (u = h.value) == null ? void 0 : u.find((x) => (x == null ? void 0 : x.key) === "formButton")) == null ? void 0 : b.contents, m.value = (c = m.value) == null ? void 0 : c.map((x, F) => x = {
734
+ label: (x == null ? void 0 : x.label) ?? "",
735
+ type: (x == null ? void 0 : x.type) ?? "",
736
+ key: (x == null ? void 0 : x.key) ?? "",
737
+ options: (x == null ? void 0 : x.options) ?? "",
738
+ id: (x == null ? void 0 : x.id) ?? F
739
+ }), f.value = (r = f.value) == null ? void 0 : r.map((x, F) => x = {
740
+ label: (x == null ? void 0 : x.label) ?? "",
741
+ type: (x == null ? void 0 : x.type) ?? "",
742
+ background: (x == null ? void 0 : x.background) ?? "#000000",
743
+ id: (x == null ? void 0 : x.id) ?? F
744
+ }), s.value = (_ = (y = h.value) == null ? void 0 : y.find((x) => (x == null ? void 0 : x.key) === "formFlex")) != null && _.contents ? [{
745
+ name: "isRowFlex",
746
+ label: "是否横向布局",
747
+ type: "Switch",
748
+ value: (v = (T = h.value) == null ? void 0 : T.find((x) => (x == null ? void 0 : x.key) === "formFlex")) == null ? void 0 : v.contents
749
+ }] : [{
750
+ name: "isRowFlex",
751
+ label: "是否横向布局",
752
+ type: "Switch",
753
+ value: !0
754
+ }]);
755
+ },
756
+ { deep: !0, immediate: !0 }
757
+ );
758
+ const A = () => {
759
+ const d = p(f.value);
760
+ let i = p(h.value);
761
+ d.push({
762
+ label: "",
763
+ type: "",
764
+ background: "#000000",
765
+ id: k.value
766
+ }), f.value = d, k.value++;
767
+ const u = i == null ? void 0 : i.find((b) => (b == null ? void 0 : b.key) === "formButton");
768
+ u != null && u.contents ? (u.contents = d, i = i == null ? void 0 : i.map((b) => ((b == null ? void 0 : b.key) === "formButton" && (b.contents = d), b))) : i.push({
769
+ key: "formButton",
770
+ contents: d
771
+ }), h.value = i;
772
+ }, $ = () => {
773
+ const d = p(m.value);
774
+ let i = p(h.value);
775
+ d.push({
776
+ label: "",
777
+ type: "",
778
+ key: "",
779
+ options: "",
780
+ id: k.value
781
+ }), m.value = d, k.value++;
782
+ const u = i == null ? void 0 : i.find((b) => (b == null ? void 0 : b.key) === "formContent");
783
+ u != null && u.contents ? (u.contents = d, i = i == null ? void 0 : i.map((b) => ((b == null ? void 0 : b.key) === "formContent" && (b.contents = d), b))) : i.push({
784
+ key: "formContent",
785
+ contents: d
786
+ }), h.value = i;
787
+ }, O = (d) => {
788
+ const i = p(f.value);
789
+ let u = p(h.value);
790
+ f.value = i.filter((c) => c.id !== d.id);
791
+ const b = u == null ? void 0 : u.find((c) => c.key === "formButton");
792
+ b != null && b.contents && (u = u == null ? void 0 : u.map((c) => ((c == null ? void 0 : c.key) === "formButton" && (c.contents = i.filter((r) => r.id !== d.id)), c))), h.value = u;
793
+ }, C = (d) => {
794
+ const i = p(m.value);
795
+ let u = p(h.value);
796
+ m.value = i.filter((c) => c.id !== d.id);
797
+ const b = u == null ? void 0 : u.find((c) => c.key === "formContent");
798
+ b != null && b.contents && (u = u == null ? void 0 : u.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = i.filter((r) => r.id !== d.id)), c))), h.value = u;
799
+ }, P = (d) => {
800
+ let i = p(h.value);
801
+ const u = i == null ? void 0 : i.find((b) => b.key === "formFlex");
802
+ (u == null ? void 0 : u.contents) !== void 0 ? i = i == null ? void 0 : i.map((b) => ((b == null ? void 0 : b.key) === "formFlex" && (b.contents = d == null ? void 0 : d.isRowFlex), b)) : i.push({
803
+ key: "formFlex",
804
+ contents: d == null ? void 0 : d.isRowFlex
805
+ }), h.value = i;
806
+ };
807
+ return ne(
808
+ () => [h.value, m.value],
809
+ () => {
810
+ let d = p(h.value);
811
+ const i = d == null ? void 0 : d.find((u) => (u == null ? void 0 : u.key) === "formContent");
812
+ i != null && i.contents ? (i.contents = m.value, d = d == null ? void 0 : d.map((u) => ((u == null ? void 0 : u.key) === "formContent" && (u.contents = m.value), u))) : d.push({
813
+ key: "formContent",
814
+ contents: m.value
815
+ }), l("change", d);
816
+ },
817
+ { deep: !0, immediate: !0 }
818
+ ), (d, i) => {
819
+ const u = Ye("el-button");
820
+ return z(), Y("div", $n, [
821
+ I("div", _n, [
822
+ I("div", On, [
823
+ i[1] || (i[1] = I("div", null, Q("表单信息"), -1)),
824
+ V(u, {
825
+ class: "blue-operate-button",
826
+ icon: "ele-Plus",
827
+ onClick: $
828
+ }, {
829
+ default: te(() => i[0] || (i[0] = [
830
+ oe(Q("新建"))
831
+ ])),
832
+ _: 1,
833
+ __: [0]
834
+ })
835
+ ]),
836
+ I("div", xn, [
837
+ V(ce, {
838
+ columns: a.value,
839
+ isShowPagination: !1,
840
+ isShowEdit: !1,
841
+ isMoveColumn: !1,
842
+ tableData: m.value,
843
+ onDeleteRow: C
844
+ }, null, 8, ["columns", "tableData"])
845
+ ]),
846
+ I("div", Tn, [
847
+ i[3] || (i[3] = I("div", null, Q("表单按钮"), -1)),
848
+ V(u, {
849
+ class: "blue-operate-button",
850
+ icon: "ele-Plus",
851
+ onClick: A
852
+ }, {
853
+ default: te(() => i[2] || (i[2] = [
854
+ oe(Q("新建"))
855
+ ])),
856
+ _: 1,
857
+ __: [2]
858
+ })
859
+ ]),
860
+ I("div", vn, [
861
+ V(ce, {
862
+ columns: o.value,
863
+ isShowPagination: !1,
864
+ isShowEdit: !1,
865
+ isMoveColumn: !1,
866
+ tableData: f.value,
867
+ onDeleteRow: O
868
+ }, null, 8, ["columns", "tableData"])
869
+ ]),
870
+ i[4] || (i[4] = I("div", { class: "operate-title" }, [
871
+ I("div", null, Q("表单布局"))
872
+ ], -1)),
873
+ I("div", Dn, [
874
+ V(De, {
875
+ rowContents: s.value,
876
+ onChange: P
877
+ }, null, 8, ["rowContents"])
878
+ ])
879
+ ])
880
+ ]);
881
+ };
882
+ }
883
+ }, Nn = /* @__PURE__ */ ue(En, [["__scopeId", "data-v-a36b8468"]]), Sn = { class: "extra-content" }, Pn = { key: 0 }, Bn = { key: 1 }, jn = {
884
+ __name: "index",
885
+ props: {
886
+ itemData: {
887
+ type: Array,
888
+ default: () => []
889
+ },
890
+ childItemData: {
891
+ type: Array,
892
+ default: () => []
893
+ },
894
+ index: Number,
895
+ changedContent: {
896
+ type: Object,
897
+ default: () => {
898
+ }
899
+ }
900
+ },
901
+ emits: ["change"],
902
+ setup(e, { emit: n }) {
903
+ const t = e, l = J(0), s = J(), a = J(), o = n, f = J(!1), h = J({}), m = J({}), k = J();
904
+ ne(
905
+ () => [t.itemData],
906
+ () => {
907
+ var c;
908
+ const b = p(t.itemData);
909
+ s.value = (c = p(b)) == null ? void 0 : c.map((r) => {
910
+ var y;
911
+ if (r.key === "extra") {
912
+ let _ = [];
913
+ (y = r.value) == null || y.forEach((T) => {
914
+ var v;
915
+ _.push((v = Object.values(T)) == null ? void 0 : v[0]);
916
+ }), r.value = _;
917
+ }
918
+ return r;
919
+ });
920
+ },
921
+ { deep: !0, immediate: !0 }
922
+ );
923
+ const A = (b, c, r, y) => {
924
+ var T;
925
+ let _ = {};
926
+ ((T = b == null ? void 0 : b[0]) == null ? void 0 : T.contents) === "详情" && (f.value = !0, _[c] = b, a.value = b == null ? void 0 : b.filter((v) => (v == null ? void 0 : v.key) !== "tableContentName"), h.value = _, m.value = r, k.value = y.id);
927
+ }, $ = (b) => {
928
+ var v, x, F, D;
929
+ const c = (x = (v = Object.values(p(h.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((E) => (E == null ? void 0 : E.key) === "tableContentName"), r = (D = (F = Object.values(p(h.value))) == null ? void 0 : F[0]) == null ? void 0 : D.filter((E) => (E == null ? void 0 : E.key) !== "tableContentName"), y = r == null ? void 0 : r.map((E, B) => {
930
+ var S;
931
+ return B === b.index && (E == null ? void 0 : E.comp) === "Table" && (E.compData = (S = E.compData) == null ? void 0 : S.map((N) => {
932
+ var g, j;
933
+ return (N == null ? void 0 : N.key) === "tableContents" && (N.contents = (j = (g = b.content) == null ? void 0 : g.map((w) => {
934
+ let L = {};
935
+ for (let H in w)
936
+ H !== "id" && (L[H] = w[H]);
937
+ return L;
938
+ })) == null ? void 0 : j.map((w) => Object.values(w))), N;
939
+ })), E;
940
+ });
941
+ y.unshift(c == null ? void 0 : c[0]);
942
+ let _ = p(h.value), T = {};
943
+ for (let E in _)
944
+ T[E] = y;
945
+ h.value = T;
946
+ }, O = () => {
947
+ f.value = !1, h.value = {}, m.value = {}, k.value = void 0, l.value++;
948
+ }, C = (b) => {
949
+ var v, x, F, D;
950
+ const c = (x = (v = Object.values(p(h.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((E) => (E == null ? void 0 : E.key) === "tableContentName"), r = (D = (F = Object.values(p(h.value))) == null ? void 0 : F[0]) == null ? void 0 : D.filter((E) => (E == null ? void 0 : E.key) !== "tableContentName"), y = r == null ? void 0 : r.map((E, B) => (B === b.index && (E.compData = b.contents), E));
951
+ y.unshift(c == null ? void 0 : c[0]);
952
+ let _ = p(h.value), T = {};
953
+ for (let E in _)
954
+ T[E] = y;
955
+ h.value = T;
956
+ }, P = () => {
957
+ var c, r;
958
+ let b = {};
959
+ for (let y in m.value)
960
+ y === ((c = Object.keys(h.value)) == null ? void 0 : c[0]) ? b[y] = (r = Object.values(h.value)) == null ? void 0 : r[0] : b[y] = m.value[y];
961
+ o("change", {
962
+ buttonName: "编辑",
963
+ index: k.value,
964
+ singleContent: b
965
+ }, "methodData"), f.value = !1, h.value = {}, m.value = {}, k.value = void 0;
966
+ }, d = () => {
967
+ f.value = !1, h.value = {}, m.value = {}, k.value = void 0;
968
+ }, i = (b) => {
969
+ o("change", b, "methodData");
970
+ }, u = (b) => Gn(b);
971
+ return (b, c) => (z(), Y(he, null, [
972
+ I("div", Sn, [
973
+ (z(!0), Y(he, null, xe(s.value, (r, y) => (z(), Y("div", { key: l.value }, [
974
+ (r == null ? void 0 : r.key) === "extra" ? (z(), Y("div", Pn)) : (z(), Y("div", Bn, [
975
+ (z(), Se(Pe(u(r.comp)), {
976
+ itemData: r == null ? void 0 : r.compData,
977
+ childItemData: r == null ? void 0 : r.itemChildData,
978
+ key: y,
979
+ index: (r == null ? void 0 : r.id) ?? y,
980
+ onContentClick: A,
981
+ onChange: i
982
+ }, null, 40, ["itemData", "childItemData", "index"]))
983
+ ]))
984
+ ]))), 128))
985
+ ]),
986
+ V(Al, {
987
+ visible: f.value,
988
+ onBeforeDestroy: d
989
+ }, {
990
+ default: te(() => [
991
+ (z(!0), Y(he, null, xe(a.value, (r, y) => (z(), Y("div", {
992
+ key: y,
993
+ class: "extra-dialog"
994
+ }, [
995
+ (z(), Se(Pe(u(r.comp)), {
996
+ itemData: r == null ? void 0 : r.compData,
997
+ onChange: $,
998
+ childItemData: r == null ? void 0 : r.itemChildData,
999
+ key: y,
1000
+ onContentChange: C,
1001
+ index: (r == null ? void 0 : r.id) ?? y,
1002
+ class: "extra-component"
1003
+ }, null, 40, ["itemData", "childItemData", "index"]))
1004
+ ]))), 128))
1005
+ ]),
1006
+ footer: te(() => [
1007
+ I("div", { class: "dialog-footer" }, [
1008
+ I("div", {
1009
+ class: "cancel-button footer-button",
1010
+ onClick: O
1011
+ }, Q("取消")),
1012
+ I("div", {
1013
+ class: "confirm-button footer-button",
1014
+ onClick: P
1015
+ }, Q("确认"))
1016
+ ])
1017
+ ]),
1018
+ _: 1
1019
+ }, 8, ["visible"])
1020
+ ], 64));
1021
+ }
1022
+ }, Un = /* @__PURE__ */ ue(jn, [["__scopeId", "data-v-e3e0f29d"]]), Fn = { class: "method-content" }, wn = ["onClick"], Rn = {
1023
+ __name: "index",
1024
+ props: {
1025
+ itemData: {
1026
+ type: Array,
1027
+ default: () => []
1028
+ },
1029
+ childItemData: {
1030
+ type: Array,
1031
+ default: () => []
1032
+ },
1033
+ index: Number,
1034
+ changedContent: {
1035
+ type: Object,
1036
+ default: () => {
1037
+ }
1038
+ }
1039
+ },
1040
+ setup(e) {
1041
+ const n = J([]), t = e, l = (a, o) => {
1042
+ var h;
1043
+ const f = (h = o == null ? void 0 : o[0]) == null ? void 0 : h.children;
1044
+ return a == null ? void 0 : a.map((m) => {
1045
+ var k;
1046
+ return m = (k = m == null ? void 0 : m.map((A, $) => {
1047
+ var O;
1048
+ return {
1049
+ key: (O = f[$]) == null ? void 0 : O.label,
1050
+ value: A
1051
+ };
1052
+ })) == null ? void 0 : k.filter((A) => A.key), m;
1053
+ });
1054
+ }, s = async (a) => {
1055
+ var P, d, i, u, b, c;
1056
+ let o = {};
1057
+ if ((P = p(a.content)) == null || P.forEach((r, y) => {
1058
+ var _, T, v, x, F, D, E, B, S, N, g, j, w, L, H, Z, W;
1059
+ if ((r == null ? void 0 : r.comp) === "Table") {
1060
+ let X = (x = (v = (T = (_ = r == null ? void 0 : r.compData) == null ? void 0 : _.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : T.contents) == null ? void 0 : v[0]) == null ? void 0 : x.some((R) => R == null ? void 0 : R.children), K = (E = (D = (F = r == null ? void 0 : r.compData) == null ? void 0 : F.find((R) => (R == null ? void 0 : R.key) === "tableContents")) == null ? void 0 : D.contents) == null ? void 0 : E.map((R) => R.slice(1)), U = (j = (g = (N = (S = (B = r == null ? void 0 : r.compData) == null ? void 0 : B.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : S.contents) == null ? void 0 : N[0]) == null ? void 0 : g[0]) == null ? void 0 : j.label, q = (H = (L = (w = r == null ? void 0 : r.compData) == null ? void 0 : w.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : L.contents) == null ? void 0 : H[0];
1061
+ if (X)
1062
+ o[U] = l(K, q);
1063
+ else {
1064
+ const R = [];
1065
+ q = q.slice(1, q.length - 1), q == null || q.forEach((ee, pe) => {
1066
+ K == null || K.forEach((se) => {
1067
+ R.push({
1068
+ key: ee.label + se[0],
1069
+ value: se[pe + 1]
1070
+ });
1071
+ });
1072
+ }), o["form" + y] = R;
1073
+ }
1074
+ } else {
1075
+ const X = (W = (Z = r.compData) == null ? void 0 : Z.find((U) => (U == null ? void 0 : U.key) === "formContent")) == null ? void 0 : W.contents;
1076
+ o.form = {};
1077
+ const K = [];
1078
+ X == null || X.forEach((U) => {
1079
+ U.key !== "" && (U = {
1080
+ key: U == null ? void 0 : U.key,
1081
+ value: U == null ? void 0 : U.value
1082
+ }, K.push(U));
1083
+ }), o.form = K;
1084
+ }
1085
+ }), a.api) {
1086
+ const r = await Ol.post(a.api, {
1087
+ data: o,
1088
+ templateFileName: (d = a == null ? void 0 : a.extraContent) == null ? void 0 : d[0]
1089
+ }, {
1090
+ responseType: "blob",
1091
+ // 必须设置
1092
+ headers: {
1093
+ "Content-Type": "application/json"
1094
+ }
1095
+ });
1096
+ var f = new Blob([r.data], {
1097
+ type: "application/octet-stream;charset=UTF-8"
1098
+ }), h = r.headers["content-disposition"], m = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), k = m.exec(h), A = ((b = (u = (i = a == null ? void 0 : a.extraContent) == null ? void 0 : i[0]) == null ? void 0 : u.split(".")) == null ? void 0 : b[0]) + "." + ((c = k[1].split(".")) == null ? void 0 : c[1]), $ = document.createElement("a"), O = window.URL.createObjectURL(f), C = /^["](.*)["]$/g;
1099
+ $.style.display = "none", $.href = O, $.download = decodeURI(A.replace(C, "$1")), document.body.appendChild($), $.click(), document.body.removeChild($), window.URL.revokeObjectURL(O);
1100
+ }
1101
+ };
1102
+ return ne(
1103
+ () => t.itemData,
1104
+ async () => {
1105
+ const a = p(t.itemData), o = a == null ? void 0 : a.map(async (h) => {
1106
+ var C, P, d, i, u, b;
1107
+ const k = (C = (await Be({
1108
+ key: {
1109
+ systemKey: sessionStorage.getItem("systemKey"),
1110
+ parentTable: "",
1111
+ type: "method",
1112
+ methodName: h.method
1113
+ }
1114
+ })).data.result) == null ? void 0 : C[0], A = await Be({
1115
+ key: {
1116
+ systemKey: sessionStorage.getItem("systemKey"),
1117
+ type: "methodData",
1118
+ tableId: k.id
1119
+ }
1120
+ }), $ = await bl((P = h == null ? void 0 : h.value) == null ? void 0 : P[0], sessionStorage.getItem("systemKey"), ""), O = (d = A.data.result) == null ? void 0 : d[0];
1121
+ return {
1122
+ buttonName: (i = k == null ? void 0 : k.key) == null ? void 0 : i.methodKey,
1123
+ api: (b = (u = O == null ? void 0 : O.value) == null ? void 0 : u.tableData) == null ? void 0 : b[0],
1124
+ content: $ == null ? void 0 : $.filter((c) => c.comp !== "methodButton"),
1125
+ extraContent: p(h.value).slice(1)
1126
+ };
1127
+ }), f = await Promise.all(o);
1128
+ n.value = f;
1129
+ },
1130
+ { immediate: !0, deep: !0 }
1131
+ ), (a, o) => (z(), Y("div", Fn, [
1132
+ (z(!0), Y(he, null, xe(n.value, (f) => (z(), Y("div", null, [
1133
+ f.api !== "" ? (z(), Y("div", {
1134
+ key: 0,
1135
+ onClick: (h) => s(f),
1136
+ class: "method-buttons"
1137
+ }, Q(f.buttonName), 9, wn)) : kl("", !0)
1138
+ ]))), 256))
1139
+ ]));
1140
+ }
1141
+ }, Jn = /* @__PURE__ */ ue(Rn, [["__scopeId", "data-v-2c8ddfa4"]]), Ht = J([
1142
+ {
1143
+ name: "表格",
1144
+ type: "table",
1145
+ comp: "Table",
1146
+ icon: "Grid"
1147
+ },
1148
+ {
1149
+ name: "表单",
1150
+ type: "form",
1151
+ comp: "Form",
1152
+ icon: "Film"
1153
+ },
1154
+ {
1155
+ name: "折叠",
1156
+ type: "fold",
1157
+ comp: "Fold",
1158
+ icon: "Fold"
1159
+ },
1160
+ {
1161
+ name: "头像",
1162
+ type: "avatar",
1163
+ comp: "Avatar",
1164
+ icon: "Avatar"
1165
+ }
1166
+ ]), Ln = {
1167
+ TABLE: gl,
1168
+ FORM: un,
1169
+ TableOperate: An,
1170
+ FormOperate: Nn,
1171
+ FOLD: _l,
1172
+ CALCULATOR: Un,
1173
+ METHODBUTTON: Jn,
1174
+ AVATARUPLOAD: xl
1175
+ // 添加其他组件...
1176
+ };
1177
+ function Gn(e) {
1178
+ return Ln[e == null ? void 0 : e.toUpperCase()] || null;
1179
+ }
1180
+ const M = [
1181
+ {
1182
+ key: "FormName",
1183
+ value: "Form"
1184
+ },
1185
+ {
1186
+ key: "TableName",
1187
+ value: "Table"
1188
+ },
1189
+ {
1190
+ key: "MenuName",
1191
+ value: "Menu"
1192
+ },
1193
+ {
1194
+ key: "GroupName",
1195
+ value: "Group"
1196
+ },
1197
+ {
1198
+ key: "SystemKey",
1199
+ value: "System"
1200
+ }
1201
+ ], G = [
1202
+ {
1203
+ key: "FormDirect",
1204
+ value: "formFlex"
1205
+ },
1206
+ {
1207
+ key: "Form",
1208
+ value: "formContent"
1209
+ },
1210
+ {
1211
+ key: "FormButton",
1212
+ value: "formButton"
1213
+ },
1214
+ {
1215
+ key: "FormFlex",
1216
+ value: "formWrap"
1217
+ },
1218
+ {
1219
+ key: "TableColumns",
1220
+ value: "header"
1221
+ },
1222
+ {
1223
+ key: "TableButton",
1224
+ value: "extraButton"
1225
+ },
1226
+ {
1227
+ key: "TableLineButton",
1228
+ value: "rowButton"
1229
+ },
1230
+ {
1231
+ key: "Table",
1232
+ value: "tableContents"
1233
+ },
1234
+ {
1235
+ key: "TableIndex",
1236
+ value: "tableIndex"
1237
+ },
1238
+ {
1239
+ key: "Menus",
1240
+ value: "menuContents"
1241
+ },
1242
+ {
1243
+ key: "GroupContents",
1244
+ value: "groupContents"
1245
+ }
1246
+ ], ae = J(0), Mn = (e) => {
1247
+ const [n, t] = e.split(/=(.+)/), l = n.replace(/['"]/g, "").trim(), s = t.replace(/^['"]|['"]$/g, "");
1248
+ return { key: l, value: s };
1249
+ }, me = (e) => {
1250
+ try {
1251
+ return JSON.parse(e), !0;
1252
+ } catch {
1253
+ return !1;
1254
+ }
1255
+ }, In = (e) => e.includes("$") && e.trim().endsWith("(") ? e + ")" : e, Hn = (e) => {
1256
+ let n = e;
1257
+ const t = [];
1258
+ let l = "";
1259
+ for (const s of n)
1260
+ s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l += s.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && (t.push(l), l = "")) : t.push(s.trim());
1261
+ return t == null ? void 0 : t.filter((s) => s.includes("{"));
1262
+ }, Wn = (e) => {
1263
+ var t;
1264
+ let n = [];
1265
+ return (t = Hn(e.slice(1, -1))) == null || t.forEach((l) => {
1266
+ var a, o, f, h;
1267
+ let s = ((o = (a = l.slice(1, -1)) == null ? void 0 : a.split(",")) == null ? void 0 : o.length) ?? 1;
1268
+ (h = (f = l.slice(1, -1)) == null ? void 0 : f.split(",")) == null || h.forEach((m) => {
1269
+ var O, C, P, d, i, u, b, c, r, y, _, T, v;
1270
+ let k = m == null ? void 0 : m.split(":"), A = k != null && k[0] ? (k == null ? void 0 : k[1].split("$").length) - 1 === 1 ? ((O = k == null ? void 0 : k[0]) == null ? void 0 : O.replace(/^"(.*)"$/, "$1")) + ((C = k == null ? void 0 : k[1]) == null ? void 0 : C.replace(/^"(.*)"$/, "$1")) : Array.isArray((d = (P = k == null ? void 0 : k[1]) == null ? void 0 : P.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) && ((b = (u = (i = k == null ? void 0 : k[1]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) == null ? void 0 : u.split("(")) == null ? void 0 : b.length) > 1 ? ((c = k == null ? void 0 : k[0]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) + ((_ = (y = (r = k == null ? void 0 : k[1]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) == null ? void 0 : y.split("(")) == null ? void 0 : _[0]) + "()" : (T = k == null ? void 0 : k[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1") : "", $ = (k == null ? void 0 : k[1].split("$").length) - 1 === 0 ? (v = k == null ? void 0 : k[1]) == null ? void 0 : v.replace(/^"(.*)"$/, "$1") : "";
1271
+ ae.value++, n.push({
1272
+ id: ae.value,
1273
+ key: A,
1274
+ value: $,
1275
+ // 如果值为空,则key设为空字符串,否则保留原值
1276
+ width: s,
1277
+ extraContent: k == null ? void 0 : k[1]
1278
+ });
1279
+ });
1280
+ }), n;
1281
+ }, nl = (e) => {
1282
+ var n, t;
1283
+ try {
1284
+ const l = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
1285
+ if (p(l).split("{").length - 1 > 1) {
1286
+ let s = p(l).replace(/^\{(.*)\}$/, "[$1]");
1287
+ if (me(s) && !s.includes("$") || (s = s.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), me(s)) {
1288
+ const a = JSON.parse(s);
1289
+ let o = [];
1290
+ return a == null || a.forEach((f) => {
1291
+ var h;
1292
+ (h = Object.entries(p(f))) == null || h.forEach((m) => {
1293
+ ae.value++, o.push({
1294
+ id: ae.value,
1295
+ key: (m == null ? void 0 : m[0]) ?? "",
1296
+ value: (m == null ? void 0 : m[1]) === "" ? "" : m == null ? void 0 : m[1],
1297
+ // 如果值为空,则key设为空字符串,否则保留原值
1298
+ width: Object.keys(p(f)).length
1299
+ });
1300
+ });
1301
+ }), o;
1302
+ } else
1303
+ return l.trim().startsWith("{{") ? Wn(l.trim()) : $e(s);
1304
+ } else if (me(l)) {
1305
+ const s = JSON.parse(l);
1306
+ return Object.entries(s).map(([a, o]) => (ae.value++, {
1307
+ id: ae.value,
1308
+ key: a,
1309
+ value: o === "" ? "" : o,
1310
+ // 如果值为空,则key设为空字符串,否则保留原值
1311
+ width: 1
1312
+ }));
1313
+ } else
1314
+ return ((n = $e(l)) == null ? void 0 : n.length) === 0 ? l : (t = $e(l)) == null ? void 0 : t.map((s) => ({
1315
+ label: s.label,
1316
+ method: In(s.method)
1317
+ }));
1318
+ } catch (l) {
1319
+ return console.error("转换失败:", l), [];
1320
+ }
1321
+ }, $e = (e) => {
1322
+ e = e.trim().replace(/^\{|\}$/g, "").trim();
1323
+ const n = [];
1324
+ let t = 0;
1325
+ for (; t < e.length; ) {
1326
+ const l = e.slice(t).match(/^\s*"([^"]+)"\s*:\s*/);
1327
+ if (!l) break;
1328
+ const s = l[1];
1329
+ t += l[0].length;
1330
+ let a = "", o = 0, f = !1, h = "";
1331
+ for (let m = t; m < e.length; m++) {
1332
+ const k = e[m];
1333
+ if ((k === '"' || k === "'") && !f ? (f = !0, h = k) : k === h && f && (f = !1, h = ""), !f && ((k === "{" || k === "(" || k === "[") && o++, (k === "}" || k === ")" || k === "]") && o--, k === "," && o === 0 || m === e.length - 1)) {
1334
+ a = e.slice(t, m + 1).trim(), t = m + 1;
1335
+ break;
1336
+ }
1337
+ }
1338
+ n.push({
1339
+ label: s,
1340
+ method: a
1341
+ });
1342
+ }
1343
+ return n;
1344
+ }, Zn = (e, n) => {
1345
+ try {
1346
+ if (M != null && M.find((t) => (t == null ? void 0 : t.key) === n))
1347
+ return e.replace(/['"]/g, "").trim();
1348
+ if (p(e).split("[").length - 1 > 1) {
1349
+ const t = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1350
+ return JSON.parse(t);
1351
+ } else {
1352
+ const t = p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
1353
+ if (me(t)) {
1354
+ const l = JSON.parse(t);
1355
+ return Array.isArray(l) ? l.map((s) => ({ label: s })) : l;
1356
+ } else
1357
+ return nl(p(e));
1358
+ }
1359
+ } catch (t) {
1360
+ return console.error("解析失败:", t), e;
1361
+ }
1362
+ }, Kn = (e) => ({ [e == null ? void 0 : e.key]: Zn(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), qn = (e) => {
1363
+ try {
1364
+ if (p(e).split("[").length - 1 > 1) {
1365
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1366
+ return JSON.parse(n);
1367
+ } else
1368
+ return JSON.parse(p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((t) => ({ label: t }));
1369
+ } catch (n) {
1370
+ return console.error("解析失败:", n), e;
1371
+ }
1372
+ }, zn = (e) => {
1373
+ const n = e.match(/\(([^)]+)\)/);
1374
+ return n ? n[1] : "";
1375
+ }, Qn = (e) => {
1376
+ const n = e.match(/^([^(]+)\s*\(/);
1377
+ return n ? n[1].trim() : e;
1378
+ }, We = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((n) => n.trim()).filter((n) => n).join("/"), Xn = (e) => {
1379
+ var o, f;
1380
+ let n = [], t = [];
1381
+ const l = (o = p(e)) == null ? void 0 : o.map((h) => h == null ? void 0 : h.key), s = [...new Set((f = p(l)) == null ? void 0 : f.map((h) => zn(h)))];
1382
+ s == null || s.forEach((h) => {
1383
+ let m = e == null ? void 0 : e.filter(($) => $.key.includes(h));
1384
+ m == null || m.forEach(($) => {
1385
+ $ != null && $.key.includes("Menus") && (n.push({
1386
+ key: "GroupName",
1387
+ value: We($ == null ? void 0 : $.value)
1388
+ }), t.push(We($ == null ? void 0 : $.value)));
1389
+ });
1390
+ let k = e == null ? void 0 : e.filter(($) => $.key.includes(h) && !($ != null && $.key.includes("Menus")));
1391
+ k = k == null ? void 0 : k.map(($) => ($.key = Qn($.key), $));
1392
+ const A = {
1393
+ key: "GroupContents",
1394
+ value: k
1395
+ };
1396
+ n.push(A);
1397
+ });
1398
+ const a = {
1399
+ key: "Menus",
1400
+ value: t
1401
+ };
1402
+ return n.unshift(a), n;
1403
+ }, tl = (e) => {
1404
+ var n, t;
1405
+ if (Array.isArray(Object.keys(e)) && ((n = Object.keys(e)) == null ? void 0 : n.length) > 0) {
1406
+ let l = [];
1407
+ return (t = Object.entries(e)) == null || t.forEach(([s, a]) => {
1408
+ var f, h;
1409
+ let o = [];
1410
+ if (o.push(s), ((f = Object.keys(a)) == null ? void 0 : f.length) > 0) {
1411
+ let m = [];
1412
+ (h = tl(a)) == null || h.forEach((k) => {
1413
+ m.push(k);
1414
+ }), m == null || m.forEach((k) => {
1415
+ o.push(k);
1416
+ });
1417
+ }
1418
+ l.push(o);
1419
+ }), l;
1420
+ }
1421
+ }, Yn = (e, n) => {
1422
+ var l;
1423
+ let t = n;
1424
+ return Array.isArray(Object.keys(e)) && ((l = Object.entries(e)) == null || l.forEach(([s, a]) => {
1425
+ let o = [s];
1426
+ if (typeof a == "object" && a !== null) {
1427
+ let f = tl(a);
1428
+ f == null || f.forEach((h) => {
1429
+ o.push(h);
1430
+ });
1431
+ }
1432
+ t.push(o);
1433
+ })), t;
1434
+ }, Vn = (e) => {
1435
+ const n = {};
1436
+ return e.forEach((l) => {
1437
+ const s = l.split("/");
1438
+ let a = n;
1439
+ s.forEach((o) => {
1440
+ a[o] || (a[o] = {}), a = a[o];
1441
+ });
1442
+ }), Yn(n, []);
1443
+ }, al = (e) => Vn(e), Wt = (e) => {
1444
+ var n, t, l, s, a, o, f, h;
1445
+ try {
1446
+ const m = Ne((t = (n = p(e)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : t.replace(")", ")")), k = (s = (l = p(m)) == null ? void 0 : l.filter((C) => !C.includes("/*"))) == null ? void 0 : s.map((C) => Mn(C)), A = Xn(k), $ = [];
1447
+ if (((a = A == null ? void 0 : A.find((C) => (C == null ? void 0 : C.key) === "Menus")) == null ? void 0 : a.value.length) === 0)
1448
+ return !1;
1449
+ (o = p(A)) == null || o.forEach((C) => {
1450
+ var P, d, i, u, b;
1451
+ M != null && M.find((c) => {
1452
+ var r, y;
1453
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((y = C == null ? void 0 : C.key) == null ? void 0 : y.toUpperCase());
1454
+ }) ? $.push({
1455
+ comp: ((P = M == null ? void 0 : M.find((c) => {
1456
+ var r, y;
1457
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((y = C == null ? void 0 : C.key) == null ? void 0 : y.toUpperCase());
1458
+ })) == null ? void 0 : P.value) ?? "",
1459
+ name: (d = C == null ? void 0 : C.value) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, ""),
1460
+ compData: []
1461
+ }) : G != null && G.find((c) => {
1462
+ var r, y;
1463
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((y = C == null ? void 0 : C.key) == null ? void 0 : y.toUpperCase());
1464
+ }) && (($ == null ? void 0 : $.length) === 0 && (i = C.key) != null && i.includes("Menus") && $.push({
1465
+ comp: "Menu",
1466
+ name: "",
1467
+ compData: []
1468
+ }), (u = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && u.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
1469
+ key: (b = G == null ? void 0 : G.find((c) => {
1470
+ var r, y;
1471
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((y = C == null ? void 0 : C.key) == null ? void 0 : y.toUpperCase());
1472
+ })) == null ? void 0 : b.value,
1473
+ contents: C == null ? void 0 : C.value
1474
+ }));
1475
+ });
1476
+ let O = (f = p($)) == null ? void 0 : f.map((C) => {
1477
+ var P;
1478
+ return C != null && C.compData && (C.compData = (P = C == null ? void 0 : C.compData) == null ? void 0 : P.map((d) => {
1479
+ var i, u, b, c, r, y, _, T, v, x, F;
1480
+ if ((d == null ? void 0 : d.key) === "formFlex")
1481
+ d.contents = ((u = (i = d.contents) == null ? void 0 : i.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : u.toUpperCase()) !== "Vertical".toUpperCase();
1482
+ else if ((d == null ? void 0 : d.key) === "groupContents")
1483
+ d.contents = (b = p(d.contents)) == null ? void 0 : b.map((D) => Kn(p(D)));
1484
+ else if (Array.isArray(d == null ? void 0 : d.contents))
1485
+ d.contents = al(d.contents);
1486
+ else if (((r = (c = d == null ? void 0 : d.contents) == null ? void 0 : c.trim()) != null && r.startsWith("[") || (_ = (y = d.contents) == null ? void 0 : y.trim()) != null && _.startsWith("【")) && ((v = (T = d.contents) == null ? void 0 : T.trim()) != null && v.endsWith("]") || (F = (x = d.contents) == null ? void 0 : x.trim()) != null && F.endsWith("】")))
1487
+ d.contents = qn(p(d.contents));
1488
+ else {
1489
+ if (!d.contents) return;
1490
+ d.contents = nl(p(d.contents));
1491
+ }
1492
+ return d;
1493
+ })), C;
1494
+ });
1495
+ return O = (h = p(O)) == null ? void 0 : h.map((C) => {
1496
+ var P;
1497
+ return (C == null ? void 0 : C.comp) === "Group" && (C.compData = (P = C.compData) == null ? void 0 : P.map((d) => {
1498
+ var u;
1499
+ let i = [];
1500
+ return (u = d.contents) == null || u.forEach((b) => {
1501
+ var c, r, y, _, T, v, x, F, D, E, B, S;
1502
+ if (M != null && M.find((N) => {
1503
+ var g, j, w;
1504
+ return ((g = N == null ? void 0 : N.key) == null ? void 0 : g.toUpperCase()) === ((w = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : w.toUpperCase());
1505
+ }))
1506
+ i.push({
1507
+ comp: (c = M == null ? void 0 : M.find((N) => {
1508
+ var g, j, w;
1509
+ return ((g = N == null ? void 0 : N.key) == null ? void 0 : g.toUpperCase()) === ((w = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : w.toUpperCase());
1510
+ })) == null ? void 0 : c.value,
1511
+ name: (y = (r = Object.values(b)) == null ? void 0 : r[0]) == null ? void 0 : y.replace(/[’]|[‘]|[']/g, ""),
1512
+ compData: []
1513
+ });
1514
+ else if (G != null && G.find((N) => {
1515
+ var g, j, w;
1516
+ return ((g = N == null ? void 0 : N.key) == null ? void 0 : g.toUpperCase()) === ((w = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : w.toUpperCase());
1517
+ })) {
1518
+ if ((i == null ? void 0 : i.length) === 0) return;
1519
+ (_ = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1]) != null && _.compData && i[(i == null ? void 0 : i.length) - 1].compData.push({
1520
+ key: (T = G == null ? void 0 : G.find((N) => {
1521
+ var g, j, w;
1522
+ return ((g = N == null ? void 0 : N.key) == null ? void 0 : g.toUpperCase()) === ((w = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : w.toUpperCase());
1523
+ })) == null ? void 0 : T.value,
1524
+ contents: (v = Object.values(b)) == null ? void 0 : v[0]
1525
+ });
1526
+ } else if ((F = (x = Object.keys(b)) == null ? void 0 : x[0]) != null && F.includes("$")) {
1527
+ const N = (E = (D = Object.keys(p(b))) == null ? void 0 : D[0]) == null ? void 0 : E.split("$");
1528
+ i[(i == null ? void 0 : i.length) - 1].compData.push({
1529
+ key: (B = G == null ? void 0 : G.find((g) => {
1530
+ var j, w;
1531
+ return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((w = N == null ? void 0 : N[0]) == null ? void 0 : w.toUpperCase());
1532
+ })) == null ? void 0 : B.value,
1533
+ contents: (S = Object.values(b)) == null ? void 0 : S[0],
1534
+ selectLabel: N == null ? void 0 : N[1]
1535
+ });
1536
+ }
1537
+ return b;
1538
+ }), d.contents = i, d;
1539
+ })), C;
1540
+ }), O;
1541
+ } catch {
1542
+ return !1;
1543
+ }
1544
+ }, le = (e) => {
1545
+ try {
1546
+ return JSON.parse(e), !0;
1547
+ } catch {
1548
+ return !1;
1549
+ }
1550
+ }, Zt = (e, n) => rn(e, n), Ze = J(0), sl = (e) => {
1551
+ const n = [];
1552
+ let t = null;
1553
+ for (let l = 0; l < e.length; l++) {
1554
+ const s = e[l];
1555
+ if (Array.isArray(s))
1556
+ t && (t.children = sl(s));
1557
+ else {
1558
+ const a = { label: s };
1559
+ n.push(a), t = a;
1560
+ }
1561
+ }
1562
+ return n;
1563
+ }, rl = (e) => {
1564
+ let n = 0;
1565
+ for (const t of e)
1566
+ n++, t.children && (n += rl(t.children));
1567
+ return n;
1568
+ }, ol = (e, n, t = []) => {
1569
+ let l = 0;
1570
+ for (const s of n) {
1571
+ if (l >= e.length) break;
1572
+ const a = [...e[l]];
1573
+ if (t.push(a), l++, s.children && s.children.length > 0) {
1574
+ const o = [];
1575
+ ol(
1576
+ e.slice(l),
1577
+ s.children,
1578
+ o
1579
+ ), o.length > 0 && (a.push(o), l += rl(s.children));
1580
+ }
1581
+ }
1582
+ return t;
1583
+ }, et = (e, n) => {
1584
+ let t = [];
1585
+ return e == null || e.forEach((s) => {
1586
+ s.some((a) => Array.isArray(a)) ? t.push(...s) : t.push(s);
1587
+ }), ol(t, n);
1588
+ }, Te = (e) => {
1589
+ const n = { label: e[0].trim() };
1590
+ if (e.length > 1) {
1591
+ const t = e.slice(1);
1592
+ t.length === 1 && Array.isArray(t[0]) ? n.children = t[0].map(
1593
+ (l) => Array.isArray(l) ? Te(l) : { label: l.trim() }
1594
+ ) : n.children = t.map(
1595
+ (l) => Array.isArray(l) ? Te(l) : { label: l.trim() }
1596
+ );
1597
+ }
1598
+ return n;
1599
+ }, Ke = (e) => {
1600
+ let n = e.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
1601
+ return n = n.replace(/:}(?=,|]|}|$)/g, ':""}'), n = n.replace(/:,(?=\s*")/g, ':"",'), n = n.replace(
1602
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
1603
+ (t, l, s) => `"${l}://${s}"`
1604
+ ), n = n.replace(
1605
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
1606
+ '$1"$2"$3'
1607
+ ), n;
1608
+ }, lt = (e) => {
1609
+ var t;
1610
+ return e.some((l) => !Array.isArray(l)) ? e : (t = p(e)) == null ? void 0 : t.map((l) => {
1611
+ let s = [];
1612
+ return l.some((a) => Array.isArray(a)) ? l == null || l.forEach((a) => {
1613
+ Array.isArray(a) && s.push(Te(a));
1614
+ }) : l.some((a) => a.includes("[")) ? s.push(l) : s = l.map((a) => ({ label: a.trim() })), s;
1615
+ });
1616
+ }, cl = (e, n, t) => {
1617
+ let l = e, s = t, a = n;
1618
+ return a.children && (Array.isArray(s[s.length - 1]) ? s[s.length - 1].push(l[0]) : s.push(l[0]), l.shift(), a = a.children), Array.isArray(a) && a.forEach((o) => {
1619
+ if (o.children) {
1620
+ const f = cl(l, o, s);
1621
+ s = f[0], l = f[1];
1622
+ }
1623
+ }), [s, l];
1624
+ }, nt = (e, n) => {
1625
+ let t = e, l = [];
1626
+ return n.length > 0 ? n == null || n.forEach((s) => {
1627
+ let a = t == null ? void 0 : t[0];
1628
+ t.shift();
1629
+ const o = cl(p(t), s, a);
1630
+ a = o[0], t = o[1], l.push(a);
1631
+ }) : l = t, l;
1632
+ }, Ee = (e, n) => {
1633
+ const t = lt(p(e));
1634
+ return nt(t, n);
1635
+ }, tt = (e) => {
1636
+ const n = [];
1637
+ let t = 0;
1638
+ const l = e.length;
1639
+ for (; t < l; ) {
1640
+ const s = e[t];
1641
+ s.key === "tableColumns" && t + 1 < l && e[t + 1].key === "tableContents" ? (n.push({
1642
+ comp: "Table",
1643
+ compData: [s, e[t + 1]],
1644
+ name: ""
1645
+ }), t += 2) : (n.push(s), t += 1);
1646
+ }
1647
+ return n;
1648
+ }, ul = (e) => Ee([e], []), at = (e) => {
1649
+ const n = [];
1650
+ return e == null || e.forEach((t) => t == null ? void 0 : t.forEach((s) => {
1651
+ var a, o;
1652
+ Ze.value++, n.push({
1653
+ id: Ze.value,
1654
+ key: (a = Object.keys(s)) == null ? void 0 : a[0],
1655
+ value: (o = Object.values(s)) == null ? void 0 : o[0],
1656
+ // 如果值为空,则key设为空字符串,否则保留原值
1657
+ width: t.length
1658
+ });
1659
+ })), n;
1660
+ }, qe = (e) => {
1661
+ let n = tt(e);
1662
+ return n = n == null ? void 0 : n.map((t) => {
1663
+ var l, s, a;
1664
+ if (t.comp === "Table")
1665
+ (l = t.compData) != null && l.find((o) => (o == null ? void 0 : o.key) === "header") || (t.compData = (s = t.compData) == null ? void 0 : s.map((o) => (o.key === "tableColumns" ? o = {
1666
+ key: "header",
1667
+ contents: Ee(o.value, [])
1668
+ } : o = {
1669
+ key: o.key,
1670
+ contents: o.value
1671
+ }, o)), t.compData.push({
1672
+ key: "extraButton",
1673
+ contents: [{ label: "新增" }]
1674
+ }), t.compData.push({
1675
+ key: "rowButton",
1676
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1677
+ }));
1678
+ else if (t.key === "form") {
1679
+ const o = (a = t == null ? void 0 : t.value) == null ? void 0 : a.map((f) => (Array.isArray(f) || (f = [f]), f));
1680
+ t = {
1681
+ comp: "Form",
1682
+ compData: [
1683
+ {
1684
+ key: "formFlex",
1685
+ contents: ""
1686
+ },
1687
+ {
1688
+ key: "formContent",
1689
+ contents: at(o)
1690
+ }
1691
+ ],
1692
+ name: ""
1693
+ };
1694
+ }
1695
+ return t;
1696
+ }), n;
1697
+ }, st = (e, n) => {
1698
+ var f, h, m, k, A, $;
1699
+ const t = [], l = sl((h = (f = e == null ? void 0 : e.find((O) => O.key === "tableIndex")) == null ? void 0 : f.value) == null ? void 0 : h[0]);
1700
+ t.push({
1701
+ key: "tableIndexColumn",
1702
+ contents: n
1703
+ }), t.push({
1704
+ key: "tableIndex",
1705
+ contents: l
1706
+ });
1707
+ let s = [];
1708
+ const a = (m = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : m.value;
1709
+ a.length === 1 && !(a != null && a[0].some((O) => Array.isArray(O))) ? s = (k = a == null ? void 0 : a[0]) == null ? void 0 : k.map((O) => ({ label: O })) : s = Ee((A = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : A.value, l), t.push({
1710
+ key: "header",
1711
+ contents: s
1712
+ });
1713
+ const o = et(($ = e == null ? void 0 : e.find((O) => O.key === "tableContents")) == null ? void 0 : $.value, l);
1714
+ return t.push({
1715
+ key: "tableContents",
1716
+ contents: o
1717
+ }), t.push({
1718
+ key: "extraButton",
1719
+ contents: [{ label: "新增" }]
1720
+ }), t.push({
1721
+ key: "rowButton",
1722
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1723
+ }), t;
1724
+ }, pl = (e) => e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (n, t, l) => {
1725
+ const s = pl(l);
1726
+ return `"${t}",${s}`;
1727
+ }), de = (e) => {
1728
+ const n = e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
1729
+ return pl(n).replace(/^"(.*)"$/, "$1");
1730
+ }, rt = (e) => {
1731
+ const n = /* @__PURE__ */ new Set();
1732
+ return e.filter((t) => {
1733
+ const l = JSON.stringify(t);
1734
+ return n.has(l) ? !1 : n.add(l);
1735
+ });
1736
+ }, ze = (e) => {
1737
+ var t;
1738
+ let n = [];
1739
+ return (t = p(e)) == null || t.forEach((l) => {
1740
+ var s;
1741
+ (s = l.contents) == null || s.forEach((a) => {
1742
+ n.push(a);
1743
+ });
1744
+ }), n = rt(n), n.push({
1745
+ label: "操作"
1746
+ }), [n];
1747
+ }, ot = (e, n) => e.reduce((t, l, s) => {
1748
+ const a = Math.floor(s / n);
1749
+ return t[a] || (t[a] = []), t[a].push(l), t;
1750
+ }, []), il = (e) => e.reduce((n, t) => t.children && t.children.length > 0 ? n + il(t.children) : n + 1, 0), ct = (e, n) => {
1751
+ var l;
1752
+ let t = [];
1753
+ return (l = ot(e, il(n == null ? void 0 : n[0]) - 1)) == null || l.forEach((s) => {
1754
+ let a = [];
1755
+ s.forEach((o) => {
1756
+ var f;
1757
+ Array.isArray(o.contents) ? (f = o.contents) == null || f.forEach((h) => {
1758
+ a.push(h);
1759
+ }) : a.push(o.contents);
1760
+ }), t.push(a);
1761
+ }), [t];
1762
+ }, ut = ["方法体", "输入", "输出"], Qe = J(1), Ne = (e) => {
1763
+ let n;
1764
+ e.replaceAll(" ", `\r
1765
+ `).includes(`\r
1766
+ `) ? n = e.replaceAll(" ", `\r
1767
+ `).split(`\r
1768
+ `).filter((s) => s.trim() !== "") : n = e.replaceAll(" ", `\r
1769
+ `).split(`
1770
+ `).filter((s) => s.trim() !== "");
1771
+ const t = [];
1772
+ let l = "";
1773
+ for (const s of n)
1774
+ s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l += s.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && l[l.length - 1] !== "," && (t.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : t.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1775
+ return t;
1776
+ }, pt = (e) => {
1777
+ const [n, t] = e.split(/=(.+)/), l = n.replace(/['"]/g, "").trim(), s = t.replace(/^['"]|['"]$/g, "");
1778
+ return { key: l, value: s };
1779
+ }, ke = (e) => {
1780
+ let n;
1781
+ e.includes(":") ? n = e.split(":").filter((s) => s.trim() !== "") : n = e.split(":").filter((s) => s.trim() !== "");
1782
+ const t = [];
1783
+ let l = "";
1784
+ for (const s of n)
1785
+ s.includes("{") || l.includes("{") || s.includes("[") || l.includes("[") || s.includes("【") || l.includes("【") || s.includes("(") || l.includes("(") || s.includes("(") || l.includes("(") || s.includes("/*") || l.includes("/*") ? (l = l !== "" ? l + ":" + s.trim() : s.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && (t.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : t.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1786
+ return t;
1787
+ }, it = (e) => /^[\x00-\x7F]*$/.test(e), ft = (e) => {
1788
+ var s;
1789
+ const n = e.map((a) => {
1790
+ var f, h;
1791
+ let o = (h = (f = a.key.split("(")) == null ? void 0 : f[1]) == null ? void 0 : h.trim();
1792
+ return o.slice(0, o.length - 1);
1793
+ }), t = n == null ? void 0 : n.map((a) => {
1794
+ var f;
1795
+ return (f = ke(a)) == null ? void 0 : f.map((h) => {
1796
+ var m;
1797
+ if (h.includes("{")) {
1798
+ let k = (m = h.split(":")) == null ? void 0 : m[0];
1799
+ h = k.slice(1, k.length);
1800
+ }
1801
+ return h;
1802
+ });
1803
+ }).filter((a) => a.length !== 0), l = (s = t == null ? void 0 : t.filter((a) => a.length !== 0)) == null ? void 0 : s.map((a) => {
1804
+ let o = "";
1805
+ return a.forEach((f) => {
1806
+ f.includes("{") || (o = o === "" ? o + p(f) : o + "/" + p(f));
1807
+ }), o;
1808
+ });
1809
+ return al([...new Set(l)]);
1810
+ }, fl = (e) => {
1811
+ var t, l, s, a, o, f, h, m;
1812
+ const n = (l = (t = e.split("(")) == null ? void 0 : t[1]) == null ? void 0 : l.trim();
1813
+ return ((s = ke(n.slice(0, n.length - 1))) == null ? void 0 : s.length) > 0 ? n.slice(0, n.length - 1) : (m = (h = (f = (o = (a = e.split("(")) == null ? void 0 : a[1]) == null ? void 0 : o.trim()) == null ? void 0 : f.split(")")) == null ? void 0 : h[0]) == null ? void 0 : m.trim();
1814
+ }, dt = (e) => {
1815
+ var s;
1816
+ if (!e) return;
1817
+ const n = fl(e), t = (s = ke(n)) == null ? void 0 : s.map((a) => {
1818
+ var o;
1819
+ if (a.includes("{")) {
1820
+ let f = (o = a.split(":")) == null ? void 0 : o[0];
1821
+ a = f.slice(1, f.length);
1822
+ }
1823
+ return a;
1824
+ });
1825
+ console.log(232, t);
1826
+ let l = "";
1827
+ return t.forEach((a) => {
1828
+ a.includes("{") || (l = l === "" ? l + p(a) : l + "/" + p(a));
1829
+ }), l;
1830
+ }, yt = (e) => {
1831
+ const n = e.match(/\[(.*)\]/s);
1832
+ if (n) {
1833
+ const t = `[${n[1]}]`;
1834
+ try {
1835
+ const l = t.replace(/([^\[\],\s]+)/g, '"$1"');
1836
+ return JSON.parse(l);
1837
+ } catch (l) {
1838
+ console.error("解析失败:", l);
1839
+ }
1840
+ }
1841
+ }, ht = (e) => {
1842
+ var a;
1843
+ if (!e) return;
1844
+ const n = fl(e);
1845
+ let t = [], l = [], s = [];
1846
+ return (a = ke(n)) == null || a.forEach((o) => {
1847
+ var f;
1848
+ o.includes("[") ? t.push(yt(o)) : o.includes("{") && (it((f = o.slice(1, o.length - 1).split(":")) == null ? void 0 : f[0]) ? s.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : le(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) || o.includes("$") || l.push(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
1849
+ }), [t, l, s];
1850
+ }, mt = (e) => {
1851
+ const n = [];
1852
+ let t = "";
1853
+ for (const l of e)
1854
+ l.includes("[") || t.includes("[") || l.includes("/*") || t.includes("/*") ? (t += l.trim(), p(t).split("{").length - 1 === p(t).split("}").length - 1 && p(t).split("【").length - 1 === p(t).split("】").length - 1 && p(t).split("[").length - 1 === p(t).split("]").length - 1 && p(t).split("(").length - 1 === p(t).split(")").length - 1 && p(t).split("(").length - 1 === p(t).split(")").length - 1 && p(t).split("/*").length - 1 === p(t).split("*/").length - 1 && (n.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = "")) : n.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1855
+ return n;
1856
+ }, Xe = (e) => {
1857
+ var o, f;
1858
+ const n = [], t = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, l = e.match(t);
1859
+ if (l) {
1860
+ const h = l[1] || l[3], m = l[2] || l[4];
1861
+ if (h && m) {
1862
+ const k = `${h}/${m}`;
1863
+ n.push(k);
1864
+ }
1865
+ }
1866
+ const s = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, a = e.match(s);
1867
+ return a ? n.push(a[0].replace(/\)+$/, "")) : (e == null ? void 0 : e.split(",").length) === 2 && n.push((f = (o = e == null ? void 0 : e.split(",")) == null ? void 0 : o[1]) == null ? void 0 : f.trim()), n;
1868
+ }, _e = (e) => {
1869
+ let n = e.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
1870
+ return n = n.replace(/\[\s*,/g, '[{"": ""},'), n = n.replace(/,\s*,/g, ', {"": ""},'), n = n.replace(/,\s*\]/g, ', {"": ""}]'), n = n.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (t, l, s, a, o) => s.includes("'") ? `:${l}${s}${a}${o}` : `:${l}"${s}"${a}${o}`), n = n.replace(/:\s*([,\]}])/g, ': ""$1'), n;
1871
+ }, bt = (e) => !/\[[^\]]*\{[^\]]*\]/.test(e), gt = (e) => {
1872
+ const n = p(e).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), t = n ? `${n[2]}/${n[3]}` : null, l = e.match(/\[\{([^}]+)\}\]/), s = l == null ? void 0 : l[1].replaceAll(":", "").replaceAll("'", '"').trim();
1873
+ let a = null;
1874
+ if (s)
1875
+ try {
1876
+ a = JSON.parse(s);
1877
+ } catch (o) {
1878
+ console.error("解析数组失败:", o);
1879
+ }
1880
+ return [t, a];
1881
+ }, kt = (e) => {
1882
+ var f, h, m, k, A, $, O, C, P, d, i;
1883
+ let n = [], t = [], l = {}, s = [], a = e.trim(), o = [];
1884
+ if (a.trim().includes("输入") && a.trim().includes("输出")) {
1885
+ let u = [], b = e.trim();
1886
+ b = p(b).slice(1, p(b).length - 1);
1887
+ const c = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
1888
+ (C = b.match(c)) == null || C.forEach((r, y) => {
1889
+ var v;
1890
+ const _ = r;
1891
+ let T = [];
1892
+ (v = _.slice(1, _.length - 1).replace(":", "$:").split("$:")) == null || v.forEach((x) => {
1893
+ var F, D, E;
1894
+ if (ut.find((B) => x.includes(B)))
1895
+ if (!x.includes("=="))
1896
+ T.push({ key: "tableIndexColumn", contents: x.replaceAll("'", "") });
1897
+ else {
1898
+ let B = [];
1899
+ const S = x.replaceAll("'", "").split("==");
1900
+ B.push(S == null ? void 0 : S[0]), S != null && S[1].includes("[") ? B.push(S == null ? void 0 : S[1].trim().slice(1, (S == null ? void 0 : S[1].length) - 1).split(",")) : B.push([S == null ? void 0 : S[1]]), T.push({ key: "header", contents: [(D = (F = ul([B])) == null ? void 0 : F[0]) == null ? void 0 : D[0]] });
1901
+ }
1902
+ else {
1903
+ let B = x.trim().replaceAll(",", ",").replaceAll("'", '"');
1904
+ if (y % 3 === 0)
1905
+ B.slice(1, B.length - 1).includes("[") ? u.push({
1906
+ key: "tableIndex",
1907
+ contents: [{ label: B }]
1908
+ }) : u.push({
1909
+ key: "tableIndex",
1910
+ contents: [{ label: B.slice(1, B.length - 1) }]
1911
+ });
1912
+ else if ((B == null ? void 0 : B[0]) === "{") {
1913
+ let S = [];
1914
+ const N = B.slice(1, B.length - 1).split(":");
1915
+ if (N.every((g) => le(g.trim()))) {
1916
+ S.push({ key: "tableContentName", contents: "详情" });
1917
+ let g = [];
1918
+ N.forEach((j, w) => {
1919
+ if (w === 0) {
1920
+ const L = JSON.parse(j).map((H) => ({ label: H }));
1921
+ L.push({
1922
+ label: "操作"
1923
+ }), g.push({
1924
+ key: "header",
1925
+ contents: L
1926
+ });
1927
+ } else
1928
+ g.push({
1929
+ key: "tableContents",
1930
+ contents: JSON.parse(j)
1931
+ });
1932
+ }), g.push({
1933
+ key: "extraButton",
1934
+ contents: [{ label: "新增" }]
1935
+ }), g.push({
1936
+ key: "rowButton",
1937
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1938
+ }), S.push({
1939
+ comp: "Table",
1940
+ compData: g,
1941
+ name: ""
1942
+ }), u.push({
1943
+ key: "tableContents",
1944
+ contents: [S]
1945
+ });
1946
+ }
1947
+ } else {
1948
+ let S = B;
1949
+ S.slice(1, S.length - 1).includes("[") || S.slice(1, S.length - 1).includes("{") ? le(Ke(S.replace(/\s+/g, ""))) && ((E = JSON.parse(Ke(S.replace(/\s+/g, "")))) == null || E.map((N) => {
1950
+ if (Array.isArray(N == null ? void 0 : N[0])) {
1951
+ const g = [];
1952
+ g.push({ key: "tableContentName", contents: "详情" });
1953
+ let j = [];
1954
+ N.forEach((w) => {
1955
+ w.forEach((L) => {
1956
+ var H, Z;
1957
+ Qe.value++, j.push({
1958
+ id: Qe.value,
1959
+ key: (H = Object.keys(L)) == null ? void 0 : H[0],
1960
+ value: (Z = Object.values(L)) == null ? void 0 : Z[0],
1961
+ width: w.length
1962
+ });
1963
+ });
1964
+ }), g.push({
1965
+ comp: "Form",
1966
+ compData: [{
1967
+ key: "formFlex",
1968
+ contents: ""
1969
+ }, {
1970
+ key: "formContent",
1971
+ contents: j
1972
+ }],
1973
+ name: ""
1974
+ }), u.push({
1975
+ key: "tableContents",
1976
+ contents: [g]
1977
+ });
1978
+ } else
1979
+ u.push({
1980
+ key: "tableContents",
1981
+ contents: N == null ? void 0 : N[0]
1982
+ });
1983
+ })) : u.push({
1984
+ key: "tableContents",
1985
+ contents: S.trim().slice(1, S.length - 1)
1986
+ });
1987
+ }
1988
+ }
1989
+ }), u.push(T == null ? void 0 : T[0]);
1990
+ }), o.push({
1991
+ key: "tableIndex",
1992
+ contents: (P = u == null ? void 0 : u.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : P.map((r) => {
1993
+ var y;
1994
+ return (y = r.contents) == null ? void 0 : y[0];
1995
+ })
1996
+ }), o.push({
1997
+ key: "extraButton",
1998
+ contents: [{ label: "新增" }]
1999
+ }), o.push({
2000
+ key: "rowButton",
2001
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2002
+ }), o.push({
2003
+ key: "tableIndexColumn",
2004
+ contents: (i = (d = u == null ? void 0 : u.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : d[0]) == null ? void 0 : i.contents
2005
+ }), o.push({
2006
+ key: "header",
2007
+ contents: ze(u == null ? void 0 : u.filter((r) => (r == null ? void 0 : r.key) === "header"))
2008
+ }), o.push({
2009
+ key: "tableContents",
2010
+ contents: ct(u == null ? void 0 : u.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), ze(u == null ? void 0 : u.filter((r) => (r == null ? void 0 : r.key) === "header")))
2011
+ });
2012
+ } else {
2013
+ const u = (f = a.trim().split(",$")) == null ? void 0 : f[0];
2014
+ u[0] === "[" ? a = u.slice(1, u.length - 1) : a.includes(",$") && (a = (h = a.trim().split(",$")) == null ? void 0 : h[0]);
2015
+ let b;
2016
+ if (a.includes("$")) {
2017
+ a = p(a), l.method = (k = (m = p(a).trim()) == null ? void 0 : m.slice(1, a.length).split("(")) == null ? void 0 : k[0];
2018
+ let c;
2019
+ Xe(a.slice(1, a.length - 2)).length > 1 ? c = Xe(a.slice(1, a.length - 2)) : c = gt(a), l.value = c;
2020
+ } else
2021
+ le("[" + _e(a).replaceAll("'", '"') + "]") && !bt(_e(a).replaceAll("'", '"')) ? (a = JSON.parse("[" + _e(a).replaceAll("'", '"') + "]"), s = a) : b = ($ = (A = p(a).split("}")) == null ? void 0 : A.filter((c) => c !== "")) == null ? void 0 : $.map((c) => {
2022
+ let r = c;
2023
+ return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
2024
+ });
2025
+ (O = p(b)) == null || O.forEach((c) => {
2026
+ var r, y, _, T, v, x, F, D, E, B, S, N, g, j, w;
2027
+ if (c.includes("==")) {
2028
+ const L = (N = c == null ? void 0 : c.split(":")) == null ? void 0 : N[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), H = (g = c == null ? void 0 : c.split(":")) == null ? void 0 : g[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
2029
+ if (le(H.trim()) ? t.push(JSON.parse(H.trim())) : t.push(JSON.parse(H.replaceAll("'", '"').trim())), L[0] !== "[") {
2030
+ let Z = [];
2031
+ le("[" + de(L) + "]") ? Z.push(JSON.parse("[" + de(L) + "]")) : le("[" + de(L).replaceAll("==", ",") + "]") && Z.push(JSON.parse("[" + de(L).replaceAll("==", ",") + "]"));
2032
+ const W = p(Z);
2033
+ W.push(["操作"]), n.push(W);
2034
+ } else {
2035
+ const Z = (j = L.slice(1, L.length - 1).replaceAll(",", ",|")) == null ? void 0 : j.split("|"), W = (w = mt(Z)) == null ? void 0 : w.map((U) => ((U == null ? void 0 : U[U.length - 1]) === "," && (U = U.slice(0, U.length - 1)), U));
2036
+ let X = [];
2037
+ W == null || W.forEach((U) => {
2038
+ var R, ee, pe, se;
2039
+ let q = [];
2040
+ q.push((R = U.split("==")) == null ? void 0 : R[0].trim().replace(/^"|"$/g, "")), ((ee = U.split("==")) == null ? void 0 : ee[1].trim()[0]) === "[" ? q.push(JSON.parse((pe = U.split("==")) == null ? void 0 : pe[1].trim())) : q.push([JSON.parse((se = U.split("==")) == null ? void 0 : se[1].trim())]), X.push(q);
2041
+ });
2042
+ const K = p(X);
2043
+ K.push(["操作"]), n.push(K);
2044
+ }
2045
+ } else {
2046
+ if (le((r = c == null ? void 0 : c.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
2047
+ let L = JSON.parse((y = c == null ? void 0 : c.split(":")) == null ? void 0 : y[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
2048
+ Array.isArray(L) || (L = [L]), L.push("操作"), n.push(L);
2049
+ }
2050
+ le((v = (T = (_ = c == null ? void 0 : c.split(":")) == null ? void 0 : _[1]) == null ? void 0 : T.replace(/^"|"$/g, "'")) == null ? void 0 : v.replace(/'([^']+)'/g, '"$1"')) ? t.push(JSON.parse((x = c == null ? void 0 : c.split(":")) == null ? void 0 : x[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : le((B = (E = (D = (F = c == null ? void 0 : c.split(":")) == null ? void 0 : F[1]) == null ? void 0 : D.replace(/^"|"$/g, "'")) == null ? void 0 : E.replaceAll("'", '"')) == null ? void 0 : B.replace(/'([^']+)'/g, '"$1"')) && t.push(JSON.parse((S = c == null ? void 0 : c.split(":")) == null ? void 0 : S[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
2051
+ }
2052
+ });
2053
+ }
2054
+ return [n, t, o, l, s];
2055
+ }, Ct = (e) => {
2056
+ const n = [], t = dt(e == null ? void 0 : e.key), l = ht(e == null ? void 0 : e.key), s = kt(e == null ? void 0 : e.value), a = l == null ? void 0 : l[0], o = [...l == null ? void 0 : l[1], ...s == null ? void 0 : s[4]], f = l == null ? void 0 : l[2], h = s == null ? void 0 : s[0], m = s == null ? void 0 : s[1], k = s == null ? void 0 : s[2], A = s == null ? void 0 : s[3];
2057
+ return t && n.push({
2058
+ key: "contentPath",
2059
+ value: t
2060
+ }), (a == null ? void 0 : a.length) > 0 && n.push({
2061
+ key: "tableIndex",
2062
+ value: a
2063
+ }), A && n.push({
2064
+ key: "extraButton",
2065
+ value: A
2066
+ }), (o == null ? void 0 : o.length) > 0 && n.push({
2067
+ key: "form",
2068
+ value: o
2069
+ }), (f == null ? void 0 : f.length) > 0 && n.push({
2070
+ key: "extra",
2071
+ value: f
2072
+ }), (k == null ? void 0 : k.length) > 0 && n.push({
2073
+ comp: "Table",
2074
+ compData: k,
2075
+ name: ""
2076
+ }), (h == null ? void 0 : h.length) > 0 && n.push({
2077
+ key: "tableColumns",
2078
+ value: h
2079
+ }), (m == null ? void 0 : m.length) > 0 && n.push({
2080
+ key: "tableContents",
2081
+ value: m
2082
+ }), n;
2083
+ }, At = (e, n) => {
2084
+ const t = n.split("/");
2085
+ let l = [];
2086
+ return e == null || e.forEach((s) => {
2087
+ var f, h, m, k, A, $, O, C, P;
2088
+ const a = [], o = (h = (f = s.find((d) => d.key === "tableIndex")) == null ? void 0 : f.value) == null ? void 0 : h[0];
2089
+ if (o && !o.some((d) => Array.isArray(d))) {
2090
+ const d = (k = (m = s.find((i) => i.key === "tableColumns")) == null ? void 0 : m.value) == null ? void 0 : k[0];
2091
+ a.push({
2092
+ key: "tableIndexColumn",
2093
+ contents: t[t.length - 1]
2094
+ }), a.push({
2095
+ key: "tableIndex",
2096
+ contents: o == null ? void 0 : o.map((i) => ({ label: i }))
2097
+ }), a.push({
2098
+ key: "extraButton",
2099
+ contents: [{ label: "新增" }]
2100
+ }), a.push({
2101
+ key: "rowButton",
2102
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2103
+ }), Array.isArray(d) && d.some((i) => Array.isArray(i)) ? a.push({
2104
+ key: "header",
2105
+ contents: ul(d)
2106
+ }) : a.push({
2107
+ key: "header",
2108
+ contents: Array.isArray(d) ? d == null ? void 0 : d.map((i) => ({ label: i })) : [d].map((i) => ({ label: i }))
2109
+ }), a.push({
2110
+ key: "tableContents",
2111
+ contents: Array.isArray(d) ? ($ = (A = s.find((i) => i.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : $[0] : (P = (C = (O = s.find((i) => i.key === "tableContents")) == null ? void 0 : O.value) == null ? void 0 : C[0]) == null ? void 0 : P.map((i) => [i])
2112
+ }), l.push({
2113
+ comp: "Table",
2114
+ name: "",
2115
+ compData: a
2116
+ });
2117
+ } else o ? l.push({
2118
+ comp: "Table",
2119
+ name: "",
2120
+ compData: st(s, t[t.length - 1])
2121
+ }) : s.some((d) => d.key === "extra") ? l.push({
2122
+ comp: "calculator",
2123
+ name: "",
2124
+ compData: qe(s)
2125
+ }) : l.push(qe(s));
2126
+ }), l;
2127
+ }, $t = (e, n) => {
2128
+ var s, a;
2129
+ const t = e.map((o) => o.filter((f) => f.key !== "contentPath"));
2130
+ return {
2131
+ comp: "Group",
2132
+ compData: [{
2133
+ contents: At(t, n),
2134
+ key: "groupContents"
2135
+ }],
2136
+ name: (a = (s = e[0]) == null ? void 0 : s.find((o) => o.key === "contentPath")) == null ? void 0 : a.value
2137
+ };
2138
+ }, _t = (e) => {
2139
+ var s;
2140
+ const n = [], t = p(e).map((a) => {
2141
+ var o;
2142
+ if (a != null && a.find((f) => (f == null ? void 0 : f.key) === "contentPath"))
2143
+ return (o = a == null ? void 0 : a.find((f) => (f == null ? void 0 : f.key) === "contentPath")) == null ? void 0 : o.value;
2144
+ }).filter((a) => a !== ""), l = [...new Set(t)];
2145
+ return (s = l == null ? void 0 : l.filter((a) => a)) == null || s.forEach((a) => {
2146
+ var o;
2147
+ n.push($t((o = p(e)) == null ? void 0 : o.filter((f) => f.find((h) => h.key === "contentPath" && h.value === a)), a));
2148
+ }), n;
2149
+ }, Ot = (e) => {
2150
+ let n = [];
2151
+ n.push({
2152
+ comp: "Menu",
2153
+ compData: [{
2154
+ contents: ft(p(e)),
2155
+ key: "menuContents"
2156
+ }],
2157
+ name: ""
2158
+ });
2159
+ const t = e.map((l) => Ct(l)).filter((l) => l.length !== 0);
2160
+ return n = [...n, ..._t(t)], n;
2161
+ }, Kt = (e) => {
2162
+ var s, a, o, f, h;
2163
+ const n = (o = Ne((a = (s = p(e)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")"))) == null ? void 0 : o.filter((m) => m !== ""), t = (h = (f = p(n)) == null ? void 0 : f.filter((m) => !m.includes("/*"))) == null ? void 0 : h.map((m) => pt(m));
2164
+ return Ot(t);
2165
+ }, ye = J(0), Oe = J(0), xt = (e) => {
2166
+ const n = e.trim().replace(/^'|'$/g, ""), t = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, l = {};
2167
+ let s;
2168
+ for (; (s = t.exec(n)) !== null; ) {
2169
+ const a = s[1];
2170
+ let o = s[2].trim();
2171
+ (o.match(/\[/g) || []).length !== (o.match(/\]/g) || []).length && (o = o == null ? void 0 : o.replace(/]$/, "")), l[a] ? (l[a + Oe.value] && Oe.value++, l[a + Oe.value] = a + "=" + o) : l[a] = a + "=" + o;
2172
+ }
2173
+ return l;
2174
+ }, dl = (e) => {
2175
+ const [n, t] = e.split("=").map((a) => a.trim()), l = n.replace(/['"]/g, ""), s = t.replace(/^['"]|['"]$/g, "");
2176
+ return { key: l, value: s };
2177
+ }, Tt = (e) => {
2178
+ var o;
2179
+ let n = [];
2180
+ const [t, l] = e.split(/=(.+)/), s = t.replace(/['"]/g, "").trim(), a = l.replace(/^['"]|['"]$/g, "");
2181
+ return (o = Object.values(xt(a))) == null || o.forEach((f) => {
2182
+ n.push(dl(f));
2183
+ }), { key: s, value: n };
2184
+ }, be = (e) => {
2185
+ try {
2186
+ return JSON.parse(e), !0;
2187
+ } catch {
2188
+ return !1;
2189
+ }
2190
+ }, yl = (e) => {
2191
+ try {
2192
+ const n = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
2193
+ if (p(n).split("{").length - 1 > 1) {
2194
+ let t = p(n).replace(/^\{(.*)\}$/, "[$1]");
2195
+ if (be(t) && !t.includes("$") || (t = t.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), be(t)) {
2196
+ const l = JSON.parse(t);
2197
+ let s = [];
2198
+ return l == null || l.forEach((a) => {
2199
+ var o;
2200
+ (o = Object.entries(p(a))) == null || o.forEach((f) => {
2201
+ ye.value++, s.push({
2202
+ id: ye.value,
2203
+ key: (f == null ? void 0 : f[0]) ?? "",
2204
+ value: (f == null ? void 0 : f[1]) === "" ? "" : f == null ? void 0 : f[1],
2205
+ // 如果值为空,则key设为空字符串,否则保留原值
2206
+ width: Object.keys(p(a)).length
2207
+ });
2208
+ });
2209
+ }), s;
2210
+ } else
2211
+ return console.error("转换类型不正确:"), [];
2212
+ } else if (be(n)) {
2213
+ const t = JSON.parse(n);
2214
+ return Object.entries(t).map(([l, s]) => (ye.value++, {
2215
+ id: ye.value,
2216
+ key: l,
2217
+ value: s === "" ? "" : s,
2218
+ // 如果值为空,则key设为空字符串,否则保留原值
2219
+ width: 1
2220
+ }));
2221
+ } else
2222
+ return n;
2223
+ } catch (n) {
2224
+ return console.error("转换失败:", n), [];
2225
+ }
2226
+ }, vt = (e, n) => {
2227
+ try {
2228
+ if (M != null && M.find((t) => (t == null ? void 0 : t.key) === n))
2229
+ return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
2230
+ if (p(e).split("[").length - 1 > 1) {
2231
+ const t = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2232
+ return JSON.parse(t);
2233
+ } else {
2234
+ const t = p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
2235
+ if (be(t)) {
2236
+ const l = JSON.parse(t);
2237
+ return Array.isArray(l) ? l.map((s) => ({ label: s })) : l;
2238
+ } else
2239
+ return yl(p(e));
2240
+ }
2241
+ } catch (t) {
2242
+ return console.error("解析失败:", t), e;
2243
+ }
2244
+ }, Dt = (e) => ({ [e == null ? void 0 : e.key]: vt(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Et = (e) => {
2245
+ try {
2246
+ if (p(e).split("[").length - 1 > 1) {
2247
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2248
+ return JSON.parse(n);
2249
+ } else
2250
+ return JSON.parse(p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((t) => ({ label: t }));
2251
+ } catch (n) {
2252
+ return console.error("解析失败:", n), e;
2253
+ }
2254
+ }, hl = (e) => {
2255
+ var n, t, l, s, a, o;
2256
+ try {
2257
+ const f = Ne((t = (n = p(e)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : t.replace(")", ")")), h = (l = p(f)) == null ? void 0 : l.map((A) => {
2258
+ var O, C;
2259
+ let $ = (C = (O = p(A)) == null ? void 0 : O.split("=")) == null ? void 0 : C[0];
2260
+ return $ != null && $.includes("GroupContents") ? Tt(A) : dl(A);
2261
+ }), m = [];
2262
+ (s = p(h)) == null || s.forEach((A) => {
2263
+ var $, O, C, P, d;
2264
+ M != null && M.find((i) => {
2265
+ var u, b;
2266
+ return ((u = i == null ? void 0 : i.key) == null ? void 0 : u.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
2267
+ }) ? m.push({
2268
+ comp: (($ = M == null ? void 0 : M.find((i) => {
2269
+ var u, b;
2270
+ return ((u = i == null ? void 0 : i.key) == null ? void 0 : u.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
2271
+ })) == null ? void 0 : $.value) ?? "",
2272
+ name: (O = A == null ? void 0 : A.value) == null ? void 0 : O.replace(/[’]|[‘]|[']/g, ""),
2273
+ compData: []
2274
+ }) : G != null && G.find((i) => {
2275
+ var u, b;
2276
+ return ((u = i == null ? void 0 : i.key) == null ? void 0 : u.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
2277
+ }) && ((m == null ? void 0 : m.length) === 0 && (C = A.key) != null && C.includes("Menus") && m.push({
2278
+ comp: "Menu",
2279
+ name: "",
2280
+ compData: []
2281
+ }), (P = m == null ? void 0 : m[(m == null ? void 0 : m.length) - 1]) != null && P.compData && m[(m == null ? void 0 : m.length) - 1].compData.push({
2282
+ key: (d = G == null ? void 0 : G.find((i) => {
2283
+ var u, b;
2284
+ return ((u = i == null ? void 0 : i.key) == null ? void 0 : u.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
2285
+ })) == null ? void 0 : d.value,
2286
+ contents: A == null ? void 0 : A.value
2287
+ }));
2288
+ }), console.log("newContents", m);
2289
+ let k = (a = p(m)) == null ? void 0 : a.map((A) => {
2290
+ var $;
2291
+ return A != null && A.compData && (A.compData = ($ = A == null ? void 0 : A.compData) == null ? void 0 : $.map((O) => {
2292
+ var C, P, d, i, u, b, c, r, y, _, T;
2293
+ if ((O == null ? void 0 : O.key) === "formFlex")
2294
+ O.contents = ((P = (C = O.contents) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : P.toUpperCase()) !== "Vertical".toUpperCase();
2295
+ else if ((O == null ? void 0 : O.key) === "groupContents")
2296
+ O.contents = (d = p(O.contents)) == null ? void 0 : d.map((v) => Dt(p(v)));
2297
+ else if (((u = (i = O.contents) == null ? void 0 : i.trim()) != null && u.startsWith("[") || (c = (b = O.contents) == null ? void 0 : b.trim()) != null && c.startsWith("【")) && ((y = (r = O.contents) == null ? void 0 : r.trim()) != null && y.endsWith("]") || (T = (_ = O.contents) == null ? void 0 : _.trim()) != null && T.endsWith("】")))
2298
+ O.contents = Et(p(O.contents));
2299
+ else {
2300
+ if (!O.contents) return;
2301
+ O.contents = yl(p(O.contents));
2302
+ }
2303
+ return O;
2304
+ })), A;
2305
+ });
2306
+ return k = (o = p(k)) == null ? void 0 : o.map((A) => {
2307
+ var $;
2308
+ return (A == null ? void 0 : A.comp) === "Group" && (A.compData = ($ = A.compData) == null ? void 0 : $.map((O) => {
2309
+ var P;
2310
+ let C = [];
2311
+ return (P = O.contents) == null || P.forEach((d) => {
2312
+ var i, u, b, c, r, y, _, T, v, x, F, D;
2313
+ if (M != null && M.find((E) => {
2314
+ var B, S, N;
2315
+ return ((B = E == null ? void 0 : E.key) == null ? void 0 : B.toUpperCase()) === ((N = (S = Object.keys(d)) == null ? void 0 : S[0]) == null ? void 0 : N.toUpperCase());
2316
+ }))
2317
+ C.push({
2318
+ comp: (i = M == null ? void 0 : M.find((E) => {
2319
+ var B, S, N;
2320
+ return ((B = E == null ? void 0 : E.key) == null ? void 0 : B.toUpperCase()) === ((N = (S = Object.keys(d)) == null ? void 0 : S[0]) == null ? void 0 : N.toUpperCase());
2321
+ })) == null ? void 0 : i.value,
2322
+ name: (b = (u = Object.values(d)) == null ? void 0 : u[0]) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
2323
+ compData: []
2324
+ });
2325
+ else if (G != null && G.find((E) => {
2326
+ var B, S, N;
2327
+ return ((B = E == null ? void 0 : E.key) == null ? void 0 : B.toUpperCase()) === ((N = (S = Object.keys(d)) == null ? void 0 : S[0]) == null ? void 0 : N.toUpperCase());
2328
+ })) {
2329
+ if ((C == null ? void 0 : C.length) === 0) return;
2330
+ (c = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && c.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
2331
+ key: (r = G == null ? void 0 : G.find((E) => {
2332
+ var B, S, N;
2333
+ return ((B = E == null ? void 0 : E.key) == null ? void 0 : B.toUpperCase()) === ((N = (S = Object.keys(d)) == null ? void 0 : S[0]) == null ? void 0 : N.toUpperCase());
2334
+ })) == null ? void 0 : r.value,
2335
+ contents: (y = Object.values(d)) == null ? void 0 : y[0]
2336
+ });
2337
+ } else if ((T = (_ = Object.keys(d)) == null ? void 0 : _[0]) != null && T.includes("$")) {
2338
+ const E = (x = (v = Object.keys(p(d))) == null ? void 0 : v[0]) == null ? void 0 : x.split("$");
2339
+ C[(C == null ? void 0 : C.length) - 1].compData.push({
2340
+ key: (F = G == null ? void 0 : G.find((B) => {
2341
+ var S, N;
2342
+ return ((S = B == null ? void 0 : B.key) == null ? void 0 : S.toUpperCase()) === ((N = E == null ? void 0 : E[0]) == null ? void 0 : N.toUpperCase());
2343
+ })) == null ? void 0 : F.value,
2344
+ contents: (D = Object.values(d)) == null ? void 0 : D[0],
2345
+ selectLabel: E == null ? void 0 : E[1]
2346
+ });
2347
+ }
2348
+ return d;
2349
+ }), O.contents = C, O;
2350
+ })), A;
2351
+ }), k;
2352
+ } catch {
2353
+ return !1;
2354
+ }
2355
+ }, qt = (e) => hl(e), zt = (e) => !!hl(e), Nt = El(ve), { itemData: Qt } = Ve(Nt), St = Dl(ve), { systemKey: Xt, activeMenuPath: Yt } = Ve(St), re = J(0), Vt = (e) => e.reduce((t, l) => {
2356
+ var a, o;
2357
+ const s = Object.values(t);
2358
+ return (((a = Object.keys(t)) == null ? void 0 : a.length) === 0 || s[s.length - 1].length >= (l == null ? void 0 : l.width)) && (t[re.value] = [], re.value++), t[re.value - 1].push(l), ((o = Object.keys(t)) == null ? void 0 : o.length) === (l == null ? void 0 : l.width) && (t[re.value] = [], re.value++), t;
2359
+ }, {});
2360
+ export {
2361
+ Vt as a,
2362
+ Wt as b,
2363
+ Kt as c,
2364
+ Zt as d,
2365
+ qt as e,
2366
+ Gn as g,
2367
+ zt as i,
2368
+ Ht as s
2369
+ };