ss-component-new 1.1.115 → 1.1.116

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