ss-component-new 1.1.116 → 1.1.118

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