ss-component-new 1.1.8 → 1.1.10

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.
@@ -0,0 +1,3278 @@
1
+ import { ref as U, watch as oe, resolveComponent as Oe, createBlock as ye, openBlock as J, withCtx as X, renderSlot as Tt, createElementVNode as j, toDisplayString as z, onMounted as Sn, createElementBlock as V, createVNode as I, Fragment as Te, renderList as Ae, normalizeStyle as At, createSlots as On, createCommentVNode as Ht, createTextVNode as Se, unref as Vt, resolveDynamicComponent as pt } from "vue";
2
+ import { g as Tn, a as An, _ as le, d as xn, s as De, c as E, E as Dn, u as Nn } from "./menu-3a4UTvU1.js";
3
+ import { u as ht } from "./modelComp-BLx5jS0f.js";
4
+ import { s as me, a as Ie, E as _e } from "./index-B6eq-MSC.js";
5
+ const xt = (e, t) => {
6
+ const n = e.storage || sessionStorage, o = e.key || t.$id;
7
+ if (e.paths) {
8
+ const r = e.paths.reduce((s, a) => (s[a] = t.$state[a], s), {});
9
+ n.setItem(o, JSON.stringify(r));
10
+ } else
11
+ n.setItem(o, JSON.stringify(t.$state));
12
+ };
13
+ var Fn = ({ options: e, store: t }) => {
14
+ var n, o, r, s;
15
+ if ((n = e.persist) != null && n.enabled) {
16
+ const a = [{
17
+ key: t.$id,
18
+ storage: sessionStorage
19
+ }], l = (r = (o = e.persist) == null ? void 0 : o.strategies) != null && r.length ? (s = e.persist) == null ? void 0 : s.strategies : a;
20
+ l.forEach((d) => {
21
+ const f = d.storage || sessionStorage, h = d.key || t.$id, i = f.getItem(h);
22
+ i && (t.$patch(JSON.parse(i)), xt(d, t));
23
+ }), t.$subscribe(() => {
24
+ l.forEach((d) => {
25
+ xt(d, t);
26
+ });
27
+ });
28
+ }
29
+ };
30
+ const de = Tn() || An();
31
+ de.use(Fn);
32
+ const Pn = { class: "dialog-title" }, Bn = {
33
+ __name: "index",
34
+ props: {
35
+ title: {
36
+ type: String,
37
+ default: ""
38
+ },
39
+ dialogWidth: {
40
+ type: Number,
41
+ default: 600
42
+ },
43
+ visible: {
44
+ type: Boolean,
45
+ default: !1
46
+ }
47
+ },
48
+ emits: ["beforeDestroy"],
49
+ setup(e, { emit: t }) {
50
+ const n = e, o = t, r = U(!1), s = () => {
51
+ o("beforeDestroy");
52
+ };
53
+ return oe(
54
+ () => n == null ? void 0 : n.visible,
55
+ () => {
56
+ r.value = n == null ? void 0 : n.visible;
57
+ },
58
+ { deep: !0, immediate: !0 }
59
+ ), (a, l) => {
60
+ const d = Oe("el-dialog");
61
+ return J(), ye(d, {
62
+ modelValue: r.value,
63
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => r.value = f),
64
+ width: n == null ? void 0 : n.dialogWidth,
65
+ "before-close": s
66
+ }, {
67
+ default: X(() => [
68
+ Tt(a.$slots, "default", {}, void 0, !0)
69
+ ]),
70
+ header: X(() => [
71
+ j("div", Pn, z(n == null ? void 0 : n.title), 1)
72
+ ]),
73
+ footer: X(() => [
74
+ Tt(a.$slots, "footer", {}, void 0, !0)
75
+ ]),
76
+ _: 3
77
+ }, 8, ["modelValue", "width"]);
78
+ };
79
+ }
80
+ }, Un = /* @__PURE__ */ le(Bn, [["__scopeId", "data-v-c7bb41bc"]]), It = xn("formToTableComp", {
81
+ state: () => ({
82
+ selectArray: [],
83
+ selectString: ""
84
+ }),
85
+ actions: {
86
+ setSelectArray(e) {
87
+ this.selectArray = e;
88
+ },
89
+ setSelectString(e) {
90
+ this.selectString = e;
91
+ }
92
+ }
93
+ }), $n = { class: "table-content" }, jn = { class: "extra-header" }, Ln = ["onClick"], qn = ["onClick"], Mn = {
94
+ key: 0,
95
+ class: "dialog-footer"
96
+ }, Jn = {
97
+ __name: "index",
98
+ props: {
99
+ itemData: {
100
+ type: Array,
101
+ default: () => []
102
+ },
103
+ childItemData: {
104
+ type: Array,
105
+ default: () => []
106
+ },
107
+ index: Number
108
+ },
109
+ emits: ["change", "contentChange"],
110
+ setup(e, { emit: t }) {
111
+ const n = e, o = t, r = U([]), s = U([]), a = U(""), l = U(), d = U(!0), f = U(0), h = U(!1), i = U(""), R = U(!1), S = U([]), b = U(!1), A = U([]), u = U([]), p = U(), y = It(de), { selectString: w } = De(y), g = U(720), m = () => {
112
+ R.value = !1;
113
+ }, k = (C, $) => {
114
+ var F, T;
115
+ a.value = "", b.value = !0, d.value = !0, C === "删除" ? (o("change", (F = E(s.value)) == null ? void 0 : F.filter((N) => (N == null ? void 0 : N.id) === ($ == null ? void 0 : $.id))), s.value = (T = E(s.value)) == null ? void 0 : T.filter((N) => (N == null ? void 0 : N.id) !== ($ == null ? void 0 : $.id))) : C === "新增" ? (i.value = "新增", _(""), R.value = !0) : C === "编辑" ? (i.value = "编辑", _($), R.value = !0) : C === "详情" && (i.value = "详情", _($), b.value = !1, d.value = !1, R.value = !0), P();
116
+ }, _ = (C) => {
117
+ var F;
118
+ const $ = [];
119
+ (F = E(r.value)) == null || F.forEach((T, N) => {
120
+ T.label !== "" && (T == null ? void 0 : T.label) !== "操作" && $.push({
121
+ label: (T == null ? void 0 : T.label) ?? "",
122
+ name: (T == null ? void 0 : T.prop) ?? "t" + N,
123
+ type: !(T != null && T.type) || (T == null ? void 0 : T.type) === "" ? "Input" : T == null ? void 0 : T.type,
124
+ value: (C == null ? void 0 : C[T == null ? void 0 : T.prop]) ?? "",
125
+ id: (T == null ? void 0 : T.id) ?? N,
126
+ contents: (T == null ? void 0 : T.options) ?? [],
127
+ width: 1
128
+ });
129
+ }), C === "" || !C || (a.value = C == null ? void 0 : C.id), u.value = $;
130
+ };
131
+ Sn(() => {
132
+ });
133
+ const O = () => {
134
+ let C = E(s.value);
135
+ a.value === "" ? (f.value++, C.push(Object.assign(p.value, { id: f.value }))) : C = C == null ? void 0 : C.map(($) => (($ == null ? void 0 : $.id) === a.value && ($ = Object.assign($, p.value)), $)), s.value = C, P(), R.value = !1, o("change", C == null ? void 0 : C[C.length - 1]);
136
+ }, P = () => {
137
+ let C = E(n.itemData);
138
+ C = C == null ? void 0 : C.map(($) => (($ == null ? void 0 : $.key) === "tableContents" && ($.contents = s.value), $)), o("contentChange", {
139
+ contents: C,
140
+ index: n.index
141
+ });
142
+ }, D = (C) => {
143
+ p.value = C;
144
+ };
145
+ return oe(
146
+ () => [n.itemData, w.value],
147
+ () => {
148
+ var ve, we, ke, Ee, pe, Y, Pe, re, se, vt, wt, kt, Et, Ct, _t, Rt, St, Ot;
149
+ const C = (ve = E(n.itemData)) == null ? void 0 : ve.filter((L) => (L == null ? void 0 : L.key) === "header"), $ = (we = E(n.itemData)) == null ? void 0 : we.find((L) => (L == null ? void 0 : L.key) === "page"), F = (ke = E(n.itemData)) == null ? void 0 : ke.find((L) => (L == null ? void 0 : L.key) === "rowButton"), T = (Ee = E(n.itemData)) == null ? void 0 : Ee.find((L) => (L == null ? void 0 : L.key) === "extraButton"), N = (pe = E(n.itemData)) == null ? void 0 : pe.filter((L) => (L == null ? void 0 : L.key) === "tableContents"), q = (Y = E(n.itemData)) == null ? void 0 : Y.filter((L) => (L == null ? void 0 : L.key) === "tableIndex");
150
+ h.value = ($ == null ? void 0 : $.contents) ?? !0;
151
+ let v = [];
152
+ w.value === "" ? v = C == null ? void 0 : C[0] : v = C == null ? void 0 : C.find((L) => (L == null ? void 0 : L.selectLabel) === "(" + w.value + ")");
153
+ let M = [];
154
+ if (w.value === "" ? M = q == null ? void 0 : q[0] : M = q == null ? void 0 : q.find((L) => (L == null ? void 0 : L.selectLabel) === "(" + w.value + ")"), ((Pe = v == null ? void 0 : v.contents) == null ? void 0 : Pe.length) > 0) {
155
+ const L = [];
156
+ M != null && M.contents && ((re = M == null ? void 0 : M.contents) == null ? void 0 : re.length) !== 0 && L.push({
157
+ label: "",
158
+ prop: "index",
159
+ sortable: !1
160
+ }), (se = v == null ? void 0 : v.contents) == null || se.forEach((x, te) => {
161
+ (x == null ? void 0 : x.label) !== "" && L.push({
162
+ label: (x == null ? void 0 : x.label) ?? "",
163
+ prop: (x == null ? void 0 : x.label) === "操作" ? "operate" : (x == null ? void 0 : x.prop) ?? "a" + te,
164
+ width: x != null && x.width ? parseInt(x.width) : "",
165
+ fixed: (x == null ? void 0 : x.fixed) ?? void 0,
166
+ sortable: (x == null ? void 0 : x.sortable) ?? !1,
167
+ align: (x == null ? void 0 : x.align) ?? "center",
168
+ showOverflowTooltip: (x == null ? void 0 : x.showOverflowTooltip) ?? !0,
169
+ isNotDrag: (x == null ? void 0 : x.isNotDrag) ?? !1,
170
+ isEditCol: (x == null ? void 0 : x.isEditCol) ?? !1,
171
+ isOperate: (x == null ? void 0 : x.isOperate) ?? !1,
172
+ id: (x == null ? void 0 : x.id) ?? te,
173
+ type: (x == null ? void 0 : x.label) === "操作" ? "operate" : void 0
174
+ });
175
+ }), r.value = L;
176
+ let Be = (wt = (vt = E(r.value)) == null ? void 0 : vt.filter((x) => (x == null ? void 0 : x.type) !== "operate")) == null ? void 0 : wt.map((x, te) => ({
177
+ prop: (x == null ? void 0 : x.prop) ?? "a" + te
178
+ })), ae = [];
179
+ if (w.value === "" ? ae = N == null ? void 0 : N[0] : ae = N == null ? void 0 : N.find((x) => (x == null ? void 0 : x.selectLabel) === "(" + w.value + ")"), ((kt = ae == null ? void 0 : ae.contents) == null ? void 0 : kt.length) !== 0) {
180
+ let x = E(ae == null ? void 0 : ae.contents);
181
+ M != null && M.contents && ((Et = M == null ? void 0 : M.contents) == null ? void 0 : Et.length) !== 0 && (x = (Ct = E(x)) == null ? void 0 : Ct.map((he, et) => {
182
+ var Ce, Ue;
183
+ return he.unshift(((Ue = (Ce = M == null ? void 0 : M.contents) == null ? void 0 : Ce[et]) == null ? void 0 : Ue.label) ?? ""), he;
184
+ }));
185
+ const te = [];
186
+ x == null || x.forEach((he, et) => {
187
+ let Ce = {};
188
+ Be == null || Be.forEach((Ue, Rn) => {
189
+ Ce[Ue.prop] = he[Rn];
190
+ }), te.push(Object.assign(Ce, { id: et }));
191
+ }), s.value = te;
192
+ } else {
193
+ let x = (_t = E(Be)) == null ? void 0 : _t.reduce((te, he) => (te[he.prop] = "测试数据", te), {});
194
+ l.value = x, s.value = [Object.assign({}, l.value, { id: f.value })];
195
+ }
196
+ } else
197
+ r.value = [], s.value = [];
198
+ ((Rt = F == null ? void 0 : F.contents) == null ? void 0 : Rt.length) > 0 ? S.value = F == null ? void 0 : F.contents : S.value = [], ((St = T == null ? void 0 : T.contents) == null ? void 0 : St.length) > 0 ? A.value = T == null ? void 0 : T.contents : A.value = [], f.value = ((Ot = s == null ? void 0 : s.value) == null ? void 0 : Ot.length) ?? 0;
199
+ },
200
+ { deep: !0, immediate: !0 }
201
+ ), (C, $) => {
202
+ var F;
203
+ return J(), V("div", $n, [
204
+ j("div", jn, [
205
+ (J(!0), V(Te, null, Ae(A.value, (T, N) => (J(), V("div", {
206
+ class: "extra-contents",
207
+ key: N
208
+ }, [
209
+ j("div", {
210
+ class: "extra-content",
211
+ style: At({ background: T == null ? void 0 : T.background }),
212
+ onClick: (q) => k(T == null ? void 0 : T.label, "")
213
+ }, z(T == null ? void 0 : T.label), 13, Ln)
214
+ ]))), 128))
215
+ ]),
216
+ (J(), ye(me, {
217
+ columns: r.value,
218
+ key: r.value,
219
+ tableData: s.value,
220
+ isShowPagination: h.value,
221
+ isShowEdit: !1,
222
+ isShowDelete: !1
223
+ }, On({ _: 2 }, [
224
+ ((F = S.value) == null ? void 0 : F.length) > 0 ? {
225
+ name: "actions",
226
+ fn: X(({ item: T }) => [
227
+ (J(!0), V(Te, null, Ae(S.value, (N, q) => (J(), V("div", { key: q }, [
228
+ j("div", {
229
+ style: At({ color: N == null ? void 0 : N.textColor }),
230
+ class: "extra-button-label",
231
+ onClick: (v) => k(N == null ? void 0 : N.label, T)
232
+ }, z(N == null ? void 0 : N.label), 13, qn)
233
+ ]))), 128))
234
+ ]),
235
+ key: "0"
236
+ } : void 0
237
+ ]), 1032, ["columns", "tableData", "isShowPagination"])),
238
+ I(Un, {
239
+ title: i.value,
240
+ visible: R.value,
241
+ width: g.value,
242
+ onBeforeDestroy: m
243
+ }, {
244
+ default: X(() => [
245
+ I(Ie, {
246
+ rowContents: u.value,
247
+ isEnableWrap: !1,
248
+ onChange: D,
249
+ isEdit: d.value
250
+ }, null, 8, ["rowContents", "isEdit"])
251
+ ]),
252
+ footer: X(() => [
253
+ b.value ? (J(), V("div", Mn, [
254
+ j("div", {
255
+ onClick: $[0] || ($[0] = (T) => R.value = !1),
256
+ class: "cancel-button"
257
+ }, z("取消")),
258
+ j("div", {
259
+ class: "ok-button",
260
+ onClick: O
261
+ }, z("确认"))
262
+ ])) : Ht("", !0)
263
+ ]),
264
+ _: 1
265
+ }, 8, ["title", "visible", "width"])
266
+ ]);
267
+ };
268
+ }
269
+ }, zn = /* @__PURE__ */ le(Jn, [["__scopeId", "data-v-5c7bc30a"]]), Hn = [
270
+ {
271
+ key: "单选",
272
+ value: "Select"
273
+ },
274
+ {
275
+ key: "日期",
276
+ value: "Date"
277
+ }
278
+ ], Vn = { class: "form-content" }, In = {
279
+ __name: "index",
280
+ props: {
281
+ itemData: {
282
+ type: Array,
283
+ default: () => []
284
+ },
285
+ childItemData: {
286
+ type: Array,
287
+ default: () => []
288
+ },
289
+ index: Number
290
+ },
291
+ emits: ["change", "contentChange"],
292
+ setup(e, { emit: t }) {
293
+ const n = e, o = t, r = U([]), s = U(!1), a = U([]), l = It(de), d = U(), f = (i) => {
294
+ var u, p, y, w;
295
+ const R = (p = (u = E(n.itemData)) == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "formContent")) == null ? void 0 : p.contents, S = E(i.content);
296
+ let b = {};
297
+ ((y = Object.values(S)) == null ? void 0 : y.length) > 0 && ((w = Object.values(S)) == null || w.forEach((g, m) => {
298
+ b[R[m].key] = g;
299
+ }));
300
+ const A = {
301
+ content: b,
302
+ index: n == null ? void 0 : n.index,
303
+ buttonName: i == null ? void 0 : i.buttonName
304
+ };
305
+ o("change", A);
306
+ }, h = (i) => {
307
+ var b, A;
308
+ if (((b = Object.values(E(i))) == null ? void 0 : b.length) > 0) {
309
+ const u = (A = Object.values(E(i))) == null ? void 0 : A.map((y) => y);
310
+ let p = "";
311
+ u == null || u.forEach((y) => {
312
+ y !== "" && y !== void 0 && (p = p === "" ? y : p + "/" + y);
313
+ }), l.setSelectArray(u), l.setSelectString(p);
314
+ }
315
+ const R = E(n.itemData), S = R == null ? void 0 : R.map((u) => {
316
+ var p;
317
+ return (u == null ? void 0 : u.key) === "formContent" && ((p = u.contents) == null || p.map((y, w) => {
318
+ var g, m, k, _, O;
319
+ return y != null && y.key.includes("$") && (y.key = (g = y == null ? void 0 : y.key.split("$")) == null ? void 0 : g[0]), y.value = Array.isArray((m = Object.values(i)) == null ? void 0 : m[w]) ? (_ = (k = Object.values(i)) == null ? void 0 : k[w]) == null ? void 0 : _[0] : (O = Object.values(i)) == null ? void 0 : O[w], y;
320
+ })), u;
321
+ });
322
+ o("contentChange", {
323
+ contents: S,
324
+ index: n.index
325
+ });
326
+ };
327
+ return oe(
328
+ () => n.itemData,
329
+ () => {
330
+ var A, u, p, y, w, g, m, k, _;
331
+ const i = (A = E(n.itemData)) == null ? void 0 : A.find((O) => (O == null ? void 0 : O.key) === "formContent"), R = (u = E(n.itemData)) == null ? void 0 : u.find((O) => (O == null ? void 0 : O.key) === "formButton"), S = (p = E(n.itemData)) == null ? void 0 : p.find((O) => (O == null ? void 0 : O.key) === "formFlex"), b = (y = E(n.itemData)) == null ? void 0 : y.find((O) => (O == null ? void 0 : O.key) === "formWrap");
332
+ if ((b == null ? void 0 : b.contents) === "纵向" ? s.value = !1 : s.value = !0, d.value = (S == null ? void 0 : S.contents) ?? !0, ((w = i == null ? void 0 : i.contents) == null ? void 0 : w.length) > 0) {
333
+ const O = [];
334
+ (g = i == null ? void 0 : i.contents) == null || g.forEach((C, $) => {
335
+ var F, T, N, q, v, M, ve, we, ke;
336
+ if ((C == null ? void 0 : C.label) !== "") {
337
+ let Ee = (C == null ? void 0 : C.key) ?? "", pe = (C == null ? void 0 : C.type) ?? "", Y = (C == null ? void 0 : C.options) ?? [];
338
+ if (C != null && C.key.includes("$") && (Ee = (F = E(C == null ? void 0 : C.key).split("$")) == null ? void 0 : F[0], ((N = (T = E(C == null ? void 0 : C.key).split("$")) == null ? void 0 : T[1]) == null ? void 0 : N.length) > 0)) {
339
+ const [Pe, re] = (v = (q = E(C == null ? void 0 : C.key).split("$")) == null ? void 0 : q[1]) == null ? void 0 : v.split(/[()]/);
340
+ pe = ((M = Hn.find((se) => (se == null ? void 0 : se.key) === Pe)) == null ? void 0 : M.value) ?? "", ((ve = re == null ? void 0 : re.split(",")) == null ? void 0 : ve.length) > 0 && (Y = (we = re == null ? void 0 : re.split(",")) == null ? void 0 : we.map((se) => ({
341
+ label: se,
342
+ value: se
343
+ })));
344
+ }
345
+ O.push({
346
+ label: Ee ?? "",
347
+ name: "t" + $,
348
+ type: pe === "" ? "Input" : pe,
349
+ value: (Y == null ? void 0 : Y.length) > 0 ? (ke = Y == null ? void 0 : Y[0]) == null ? void 0 : ke.value : (C == null ? void 0 : C.value) ?? "",
350
+ id: (C == null ? void 0 : C.id) ?? $,
351
+ contents: Y ?? [],
352
+ width: (C == null ? void 0 : C.width) ?? 1
353
+ });
354
+ }
355
+ });
356
+ const P = (m = E(O)) == null ? void 0 : m.map((C) => C.value);
357
+ let D = "";
358
+ P == null || P.forEach((C) => {
359
+ C !== "" && C !== void 0 && (D = D === "" ? C : D + "/" + C);
360
+ }), l.setSelectArray(P), l.setSelectString(D), r.value = O;
361
+ } else
362
+ r.value = [];
363
+ if (((k = R == null ? void 0 : R.contents) == null ? void 0 : k.length) > 0) {
364
+ const O = [];
365
+ (_ = R == null ? void 0 : R.contents) == null || _.forEach((P, D) => {
366
+ (P == null ? void 0 : P.label) !== "" && O.push({
367
+ label: (P == null ? void 0 : P.label) ?? "",
368
+ id: (P == null ? void 0 : P.id) ?? D,
369
+ type: (P == null ? void 0 : P.type) ?? "",
370
+ background: P == null ? void 0 : P.background
371
+ });
372
+ }), a.value = O;
373
+ } else
374
+ a.value = [];
375
+ },
376
+ { deep: !0, immediate: !0 }
377
+ ), (i, R) => (J(), V("div", Vn, [
378
+ I(Ie, {
379
+ rowContents: r.value,
380
+ buttonValue: a.value,
381
+ isRowFlex: d.value,
382
+ isEnableWrap: !0,
383
+ onOnButtonClick: f,
384
+ onChange: h,
385
+ isButtonRow: s.value
386
+ }, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
387
+ ]));
388
+ }
389
+ }, Wn = /* @__PURE__ */ le(In, [["__scopeId", "data-v-9c8bb442"]]), Kn = { class: "table-operate-content" }, Gn = { class: "table-operate-item" }, Xn = { class: "operate-title" }, Zn = { class: "operate-content" }, Qn = { class: "operate-title" }, Yn = { class: "operate-content" }, eo = { class: "operate-title" }, to = { class: "operate-content" }, no = { class: "operate-content" }, oo = {
390
+ __name: "operate",
391
+ props: {
392
+ itemContents: {
393
+ type: Array,
394
+ default: () => []
395
+ },
396
+ originalItemContents: {
397
+ type: Array,
398
+ default: () => []
399
+ }
400
+ },
401
+ emits: ["change"],
402
+ setup(e, { emit: t }) {
403
+ const n = e, o = t, r = U([]), s = U([]), a = U([]), l = U([{
404
+ label: "按钮名称",
405
+ prop: "label",
406
+ type: "edit"
407
+ }, {
408
+ label: "按钮类型",
409
+ prop: "type",
410
+ type: "edit"
411
+ }, {
412
+ label: "按钮背景颜色",
413
+ prop: "background",
414
+ type: "edit",
415
+ columnType: "Color"
416
+ }, {
417
+ label: "操作",
418
+ prop: "operate",
419
+ type: "operate",
420
+ sortable: !1
421
+ }]), d = U([{
422
+ label: "标签名称",
423
+ prop: "label",
424
+ type: "edit"
425
+ }, {
426
+ label: "标签类型",
427
+ prop: "type",
428
+ type: "edit"
429
+ }, {
430
+ label: "按钮文字颜色",
431
+ prop: "textColor",
432
+ type: "edit",
433
+ columnType: "Color"
434
+ }, {
435
+ label: "操作",
436
+ prop: "operate",
437
+ type: "operate",
438
+ sortable: !1
439
+ }]), f = U([]), h = U(0), i = U([{
440
+ name: "isPagination",
441
+ label: "是否显示分页",
442
+ type: "Switch",
443
+ value: !0
444
+ }]), R = [{
445
+ label: "标签名",
446
+ prop: "label",
447
+ type: "edit"
448
+ }, {
449
+ label: "属性名",
450
+ prop: "prop",
451
+ type: "edit"
452
+ }, {
453
+ label: "宽度",
454
+ prop: "width",
455
+ type: "edit",
456
+ columnType: "Number"
457
+ }, {
458
+ label: "是否固定列",
459
+ prop: "fixed",
460
+ type: "edit",
461
+ columnType: "Radio",
462
+ contents: [{
463
+ label: "left",
464
+ value: "左"
465
+ }, {
466
+ label: "right",
467
+ value: "右"
468
+ }]
469
+ }, {
470
+ label: "是否支持排序",
471
+ prop: "sortable",
472
+ type: "edit",
473
+ columnType: "Switch"
474
+ }, {
475
+ label: "文本所在位置",
476
+ prop: "align",
477
+ type: "edit",
478
+ columnType: "Radio",
479
+ contents: [{
480
+ label: "left",
481
+ value: "左"
482
+ }, {
483
+ label: "center",
484
+ value: "中"
485
+ }, {
486
+ label: "right",
487
+ value: "右"
488
+ }]
489
+ }, {
490
+ label: "溢出悬浮文字",
491
+ prop: "showOverflowTooltip",
492
+ type: "edit",
493
+ columnType: "Switch"
494
+ }, {
495
+ label: "是否不可拖动",
496
+ prop: "isNotDrag",
497
+ type: "edit",
498
+ columnType: "Switch"
499
+ }, {
500
+ label: "是否可编辑列名",
501
+ //暂不支持
502
+ prop: "isEditCol",
503
+ type: "edit",
504
+ columnType: "Switch"
505
+ }, {
506
+ label: "是否出现在附属界面",
507
+ //暂不支持
508
+ prop: "isOperate",
509
+ type: "edit",
510
+ columnType: "Switch"
511
+ }, {
512
+ label: "操作",
513
+ prop: "operate",
514
+ type: "operate",
515
+ sortable: !1
516
+ }], S = (g) => {
517
+ let m = E(r.value);
518
+ const k = m == null ? void 0 : m.find((_) => _.key === "page");
519
+ (k == null ? void 0 : k.contents) !== void 0 ? m = m == null ? void 0 : m.map((_) => ((_ == null ? void 0 : _.key) === "page" && (_.contents = g == null ? void 0 : g.isPagination), _)) : m.push({
520
+ key: "page",
521
+ contents: g == null ? void 0 : g.isPagination
522
+ }), r.value = m;
523
+ };
524
+ oe(
525
+ () => n.originalItemContents,
526
+ () => {
527
+ var g, m, k, _, O, P, D, C, $, F, T, N, q;
528
+ !n.originalItemContents || n.originalItemContents.length === 0 || (r.value = E(n.originalItemContents), s.value = (m = (g = r.value) == null ? void 0 : g.find((v) => (v == null ? void 0 : v.key) === "header")) == null ? void 0 : m.contents, a.value = (_ = (k = r.value) == null ? void 0 : k.find((v) => (v == null ? void 0 : v.key) === "rowButton")) == null ? void 0 : _.contents, l.value = (P = (O = r.value) == null ? void 0 : O.find((v) => (v == null ? void 0 : v.key) === "extraButton")) == null ? void 0 : P.contents, i.value = (C = (D = r.value) == null ? void 0 : D.find((v) => (v == null ? void 0 : v.key) === "page")) != null && C.contents ? [{
529
+ name: "isPagination",
530
+ label: "是否显示分页",
531
+ type: "Switch",
532
+ value: (F = ($ = r.value) == null ? void 0 : $.find((v) => (v == null ? void 0 : v.key) === "page")) == null ? void 0 : F.contents
533
+ }] : [{
534
+ name: "isPagination",
535
+ label: "是否显示分页",
536
+ type: "Switch",
537
+ value: !0
538
+ }], s.value = (T = s.value) == null ? void 0 : T.map((v, M) => v = {
539
+ label: (v == null ? void 0 : v.label) ?? "",
540
+ prop: (v == null ? void 0 : v.label) === "操作" ? "operate" : v == null ? void 0 : v.prop,
541
+ width: v != null && v.width ? parseInt(v.width) : "",
542
+ fixed: (v == null ? void 0 : v.fixed) ?? void 0,
543
+ sortable: (v == null ? void 0 : v.sortable) ?? !1,
544
+ align: (v == null ? void 0 : v.align) ?? "center",
545
+ showOverflowTooltip: (v == null ? void 0 : v.showOverflowTooltip) ?? !0,
546
+ isNotDrag: (v == null ? void 0 : v.isNotDrag) ?? !1,
547
+ isEditCol: (v == null ? void 0 : v.isEditCol) ?? !1,
548
+ isOperate: (v == null ? void 0 : v.isOperate) ?? !1,
549
+ id: (v == null ? void 0 : v.id) ?? M
550
+ }), a.value = (N = a.value) == null ? void 0 : N.map((v, M) => v = {
551
+ label: (v == null ? void 0 : v.label) ?? "",
552
+ type: (v == null ? void 0 : v.type) ?? "",
553
+ textColor: (v == null ? void 0 : v.textColor) ?? "#000000",
554
+ id: (v == null ? void 0 : v.id) ?? M
555
+ }), l.value = (q = l.value) == null ? void 0 : q.map((v, M) => v = {
556
+ label: (v == null ? void 0 : v.label) ?? "",
557
+ type: (v == null ? void 0 : v.type) ?? "",
558
+ background: (v == null ? void 0 : v.textColor) ?? "#FFFFFF",
559
+ id: (v == null ? void 0 : v.id) ?? M
560
+ }));
561
+ },
562
+ { deep: !0, immediate: !0 }
563
+ ), oe(
564
+ () => i.value,
565
+ () => {
566
+ var k;
567
+ let g = E(r.value);
568
+ const m = g == null ? void 0 : g.find((_) => _.key === "page");
569
+ m != null && m.contents ? g = g == null ? void 0 : g.map((_) => {
570
+ var O;
571
+ return (_ == null ? void 0 : _.key) === "page" && (_.contents = (O = i.value) == null ? void 0 : O[0].value), _;
572
+ }) : g.push({
573
+ key: "page",
574
+ contents: (k = i.value) == null ? void 0 : k[0].value
575
+ }), r.value = g;
576
+ },
577
+ { immediate: !0, deep: !0 }
578
+ );
579
+ const b = () => {
580
+ const g = E(s.value);
581
+ let m = E(r.value);
582
+ g.push({
583
+ label: "",
584
+ prop: "",
585
+ width: "",
586
+ fixed: void 0,
587
+ sortable: !1,
588
+ align: "center",
589
+ showOverflowTooltip: !0,
590
+ isNotDrag: !1,
591
+ isEditCol: !1,
592
+ isOperate: !1,
593
+ id: h.value
594
+ }), s.value = g, h.value++;
595
+ const k = m == null ? void 0 : m.find((_) => (_ == null ? void 0 : _.key) === "header");
596
+ k != null && k.contents ? (k.contents = g, m = m == null ? void 0 : m.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = g), _))) : m.push({
597
+ key: "header",
598
+ contents: g
599
+ }), r.value = m;
600
+ }, A = () => {
601
+ const g = E(a.value);
602
+ let m = E(r.value);
603
+ g.push({
604
+ label: "",
605
+ type: "",
606
+ textColor: "#000000",
607
+ id: h.value
608
+ }), a.value = g, h.value++;
609
+ const k = m == null ? void 0 : m.find((_) => (_ == null ? void 0 : _.key) === "rowButton");
610
+ k != null && k.contents ? (k.contents = g, m = m == null ? void 0 : m.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = g), _))) : m.push({
611
+ key: "rowButton",
612
+ contents: g
613
+ }), r.value = m;
614
+ }, u = () => {
615
+ const g = E(f.value);
616
+ let m = E(r.value);
617
+ g.push({
618
+ label: "",
619
+ type: "",
620
+ background: "#FFFFFF",
621
+ id: h.value
622
+ }), f.value = g, h.value++;
623
+ const k = m == null ? void 0 : m.find((_) => (_ == null ? void 0 : _.key) === "extraButton");
624
+ k != null && k.contents ? (k.contents = g, m = m == null ? void 0 : m.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = g), _))) : m.push({
625
+ key: "extraButton",
626
+ contents: g
627
+ }), r.value = m;
628
+ }, p = (g) => {
629
+ const m = E(a.value);
630
+ let k = E(r.value);
631
+ a.value = m.filter((O) => O.id !== g.id);
632
+ const _ = k == null ? void 0 : k.find((O) => O.key === "rowButton");
633
+ _ != null && _.contents && (k = k == null ? void 0 : k.map((O) => ((O == null ? void 0 : O.key) === "rowButton" && (O.contents = m.filter((P) => P.id !== g.id)), O))), r.value = k;
634
+ }, y = (g) => {
635
+ const m = E(f.value);
636
+ let k = E(r.value);
637
+ f.value = m.filter((O) => O.id !== g.id);
638
+ const _ = k == null ? void 0 : k.find((O) => O.key === "extraButton");
639
+ _ != null && _.contents && (k = k == null ? void 0 : k.map((O) => ((O == null ? void 0 : O.key) === "extraButton" && (O.contents = m.filter((P) => P.id !== g.id)), O))), r.value = k;
640
+ }, w = (g) => {
641
+ const m = E(s.value);
642
+ let k = E(r.value);
643
+ s.value = m.filter((O) => O.id !== g.id);
644
+ const _ = k == null ? void 0 : k.find((O) => O.key === "header");
645
+ _ != null && _.contents && (k = k == null ? void 0 : k.map((O) => ((O == null ? void 0 : O.key) === "header" && (O.contents = m.filter((P) => P.id !== g.id)), O))), r.value = k;
646
+ };
647
+ return oe(
648
+ () => [r.value, s.value],
649
+ () => {
650
+ let g = E(r.value);
651
+ const m = g == null ? void 0 : g.find((k) => (k == null ? void 0 : k.key) === "header");
652
+ m != null && m.contents ? (m.contents = s.value, g = g == null ? void 0 : g.map((k) => ((k == null ? void 0 : k.key) === "header" && (k.contents = s.value), k))) : g.push({
653
+ key: "header",
654
+ contents: s.value
655
+ }), o("change", g);
656
+ },
657
+ { deep: !0, immediate: !0 }
658
+ ), (g, m) => {
659
+ const k = Oe("el-button");
660
+ return J(), V("div", Kn, [
661
+ j("div", Gn, [
662
+ j("div", Xn, [
663
+ m[1] || (m[1] = j("div", null, z("表头"), -1)),
664
+ I(k, {
665
+ class: "blue-operate-button",
666
+ icon: "ele-Plus",
667
+ onClick: b
668
+ }, {
669
+ default: X(() => m[0] || (m[0] = [
670
+ Se(z("新建"))
671
+ ])),
672
+ _: 1
673
+ })
674
+ ]),
675
+ j("div", Zn, [
676
+ I(me, {
677
+ columns: R,
678
+ isShowPagination: !1,
679
+ isShowEdit: !1,
680
+ isMoveColumn: !1,
681
+ tableData: s.value,
682
+ onDeleteRow: w
683
+ }, null, 8, ["tableData"])
684
+ ]),
685
+ j("div", Qn, [
686
+ m[3] || (m[3] = j("div", null, z("行内按钮"), -1)),
687
+ I(k, {
688
+ class: "blue-operate-button",
689
+ icon: "ele-Plus",
690
+ onClick: A
691
+ }, {
692
+ default: X(() => m[2] || (m[2] = [
693
+ Se(z("新建"))
694
+ ])),
695
+ _: 1
696
+ })
697
+ ]),
698
+ j("div", Yn, [
699
+ I(me, {
700
+ columns: d.value,
701
+ isShowPagination: !1,
702
+ isShowEdit: !1,
703
+ isMoveColumn: !1,
704
+ tableData: a.value,
705
+ onDeleteRow: p
706
+ }, null, 8, ["columns", "tableData"])
707
+ ]),
708
+ j("div", eo, [
709
+ m[5] || (m[5] = j("div", null, z("表格外部按钮"), -1)),
710
+ I(k, {
711
+ class: "blue-operate-button",
712
+ icon: "ele-Plus",
713
+ onClick: u
714
+ }, {
715
+ default: X(() => m[4] || (m[4] = [
716
+ Se(z("新建"))
717
+ ])),
718
+ _: 1
719
+ })
720
+ ]),
721
+ j("div", to, [
722
+ I(me, {
723
+ columns: l.value,
724
+ isShowPagination: !1,
725
+ isShowEdit: !1,
726
+ isMoveColumn: !1,
727
+ tableData: f.value,
728
+ onDeleteRow: y
729
+ }, null, 8, ["columns", "tableData"])
730
+ ]),
731
+ m[6] || (m[6] = j("div", { class: "operate-title" }, [
732
+ j("div", null, z("分页"))
733
+ ], -1)),
734
+ j("div", no, [
735
+ I(Ie, {
736
+ rowContents: i.value,
737
+ onChange: S
738
+ }, null, 8, ["rowContents"])
739
+ ])
740
+ ])
741
+ ]);
742
+ };
743
+ }
744
+ }, ro = /* @__PURE__ */ le(oo, [["__scopeId", "data-v-877911eb"]]), so = { class: "form-operate-content" }, ao = { class: "form-operate-item" }, lo = { class: "operate-title" }, io = { class: "operate-content" }, co = { class: "operate-title" }, uo = { class: "operate-content" }, fo = { class: "operate-content" }, po = {
745
+ __name: "operate",
746
+ props: {
747
+ itemContents: {
748
+ type: Array,
749
+ default: () => []
750
+ },
751
+ originalItemContents: {
752
+ type: Array,
753
+ default: () => []
754
+ }
755
+ },
756
+ emits: ["change"],
757
+ setup(e, { emit: t }) {
758
+ const n = e, o = t, r = U([{
759
+ name: "isRowFlex",
760
+ label: "是否横向布局",
761
+ type: "Switch",
762
+ value: !0
763
+ }]), s = U([{
764
+ label: "字段名称",
765
+ prop: "label",
766
+ type: "edit"
767
+ }, {
768
+ label: "字段类型",
769
+ prop: "type",
770
+ type: "edit"
771
+ }, {
772
+ label: "字段值",
773
+ prop: "key",
774
+ type: "edit"
775
+ }, {
776
+ label: "字段选项值",
777
+ prop: "options",
778
+ type: "edit"
779
+ }, {
780
+ label: "操作",
781
+ prop: "operate",
782
+ type: "operate",
783
+ sortable: !1
784
+ }]), a = U([{
785
+ label: "字段名称",
786
+ prop: "label",
787
+ type: "edit"
788
+ }, {
789
+ label: "字段类型",
790
+ prop: "type",
791
+ type: "edit"
792
+ }, {
793
+ label: "按钮背景颜色",
794
+ prop: "background",
795
+ type: "edit",
796
+ columnType: "Color"
797
+ }, {
798
+ label: "操作",
799
+ prop: "operate",
800
+ type: "operate",
801
+ sortable: !1
802
+ }]), l = U([]), d = U([]), f = U([]), h = U(0);
803
+ oe(
804
+ () => n.originalItemContents,
805
+ () => {
806
+ var u, p, y, w, g, m, k, _, O, P;
807
+ !n.originalItemContents || n.originalItemContents.length === 0 || (d.value = E(n.originalItemContents), f.value = (p = (u = d.value) == null ? void 0 : u.find((D) => (D == null ? void 0 : D.key) === "formContent")) == null ? void 0 : p.contents, l.value = (w = (y = d.value) == null ? void 0 : y.find((D) => (D == null ? void 0 : D.key) === "formButton")) == null ? void 0 : w.contents, f.value = (g = f.value) == null ? void 0 : g.map((D, C) => D = {
808
+ label: (D == null ? void 0 : D.label) ?? "",
809
+ type: (D == null ? void 0 : D.type) ?? "",
810
+ key: (D == null ? void 0 : D.key) ?? "",
811
+ options: (D == null ? void 0 : D.options) ?? "",
812
+ id: (D == null ? void 0 : D.id) ?? C
813
+ }), l.value = (m = l.value) == null ? void 0 : m.map((D, C) => D = {
814
+ label: (D == null ? void 0 : D.label) ?? "",
815
+ type: (D == null ? void 0 : D.type) ?? "",
816
+ background: (D == null ? void 0 : D.background) ?? "#000000",
817
+ id: (D == null ? void 0 : D.id) ?? C
818
+ }), r.value = (_ = (k = d.value) == null ? void 0 : k.find((D) => (D == null ? void 0 : D.key) === "formFlex")) != null && _.contents ? [{
819
+ name: "isRowFlex",
820
+ label: "是否横向布局",
821
+ type: "Switch",
822
+ value: (P = (O = d.value) == null ? void 0 : O.find((D) => (D == null ? void 0 : D.key) === "formFlex")) == null ? void 0 : P.contents
823
+ }] : [{
824
+ name: "isRowFlex",
825
+ label: "是否横向布局",
826
+ type: "Switch",
827
+ value: !0
828
+ }]);
829
+ },
830
+ { deep: !0, immediate: !0 }
831
+ );
832
+ const i = () => {
833
+ const u = E(l.value);
834
+ let p = E(d.value);
835
+ u.push({
836
+ label: "",
837
+ type: "",
838
+ background: "#000000",
839
+ id: h.value
840
+ }), l.value = u, h.value++;
841
+ const y = p == null ? void 0 : p.find((w) => (w == null ? void 0 : w.key) === "formButton");
842
+ y != null && y.contents ? (y.contents = u, p = p == null ? void 0 : p.map((w) => ((w == null ? void 0 : w.key) === "formButton" && (w.contents = u), w))) : p.push({
843
+ key: "formButton",
844
+ contents: u
845
+ }), d.value = p;
846
+ }, R = () => {
847
+ const u = E(f.value);
848
+ let p = E(d.value);
849
+ u.push({
850
+ label: "",
851
+ type: "",
852
+ key: "",
853
+ options: "",
854
+ id: h.value
855
+ }), f.value = u, h.value++;
856
+ const y = p == null ? void 0 : p.find((w) => (w == null ? void 0 : w.key) === "formContent");
857
+ y != null && y.contents ? (y.contents = u, p = p == null ? void 0 : p.map((w) => ((w == null ? void 0 : w.key) === "formContent" && (w.contents = u), w))) : p.push({
858
+ key: "formContent",
859
+ contents: u
860
+ }), d.value = p;
861
+ }, S = (u) => {
862
+ const p = E(l.value);
863
+ let y = E(d.value);
864
+ l.value = p.filter((g) => g.id !== u.id);
865
+ const w = y == null ? void 0 : y.find((g) => g.key === "formButton");
866
+ w != null && w.contents && (y = y == null ? void 0 : y.map((g) => ((g == null ? void 0 : g.key) === "formButton" && (g.contents = p.filter((m) => m.id !== u.id)), g))), d.value = y;
867
+ }, b = (u) => {
868
+ const p = E(f.value);
869
+ let y = E(d.value);
870
+ f.value = p.filter((g) => g.id !== u.id);
871
+ const w = y == null ? void 0 : y.find((g) => g.key === "formContent");
872
+ w != null && w.contents && (y = y == null ? void 0 : y.map((g) => ((g == null ? void 0 : g.key) === "formContent" && (g.contents = p.filter((m) => m.id !== u.id)), g))), d.value = y;
873
+ }, A = (u) => {
874
+ let p = E(d.value);
875
+ const y = p == null ? void 0 : p.find((w) => w.key === "formFlex");
876
+ (y == null ? void 0 : y.contents) !== void 0 ? p = p == null ? void 0 : p.map((w) => ((w == null ? void 0 : w.key) === "formFlex" && (w.contents = u == null ? void 0 : u.isRowFlex), w)) : p.push({
877
+ key: "formFlex",
878
+ contents: u == null ? void 0 : u.isRowFlex
879
+ }), d.value = p;
880
+ };
881
+ return oe(
882
+ () => [d.value, f.value],
883
+ () => {
884
+ let u = E(d.value);
885
+ const p = u == null ? void 0 : u.find((y) => (y == null ? void 0 : y.key) === "formContent");
886
+ p != null && p.contents ? (p.contents = f.value, u = u == null ? void 0 : u.map((y) => ((y == null ? void 0 : y.key) === "formContent" && (y.contents = f.value), y))) : u.push({
887
+ key: "formContent",
888
+ contents: f.value
889
+ }), o("change", u);
890
+ },
891
+ { deep: !0, immediate: !0 }
892
+ ), (u, p) => {
893
+ const y = Oe("el-button");
894
+ return J(), V("div", so, [
895
+ j("div", ao, [
896
+ j("div", lo, [
897
+ p[1] || (p[1] = j("div", null, z("表单信息"), -1)),
898
+ I(y, {
899
+ class: "blue-operate-button",
900
+ icon: "ele-Plus",
901
+ onClick: R
902
+ }, {
903
+ default: X(() => p[0] || (p[0] = [
904
+ Se(z("新建"))
905
+ ])),
906
+ _: 1
907
+ })
908
+ ]),
909
+ j("div", io, [
910
+ I(me, {
911
+ columns: s.value,
912
+ isShowPagination: !1,
913
+ isShowEdit: !1,
914
+ isMoveColumn: !1,
915
+ tableData: f.value,
916
+ onDeleteRow: b
917
+ }, null, 8, ["columns", "tableData"])
918
+ ]),
919
+ j("div", co, [
920
+ p[3] || (p[3] = j("div", null, z("表单按钮"), -1)),
921
+ I(y, {
922
+ class: "blue-operate-button",
923
+ icon: "ele-Plus",
924
+ onClick: i
925
+ }, {
926
+ default: X(() => p[2] || (p[2] = [
927
+ Se(z("新建"))
928
+ ])),
929
+ _: 1
930
+ })
931
+ ]),
932
+ j("div", uo, [
933
+ I(me, {
934
+ columns: a.value,
935
+ isShowPagination: !1,
936
+ isShowEdit: !1,
937
+ isMoveColumn: !1,
938
+ tableData: l.value,
939
+ onDeleteRow: S
940
+ }, null, 8, ["columns", "tableData"])
941
+ ]),
942
+ p[4] || (p[4] = j("div", { class: "operate-title" }, [
943
+ j("div", null, z("表单布局"))
944
+ ], -1)),
945
+ j("div", fo, [
946
+ I(Ie, {
947
+ rowContents: r.value,
948
+ onChange: A
949
+ }, null, 8, ["rowContents"])
950
+ ])
951
+ ])
952
+ ]);
953
+ };
954
+ }
955
+ }, ho = /* @__PURE__ */ le(po, [["__scopeId", "data-v-a36b8468"]]), mo = U([
956
+ {
957
+ name: "表格",
958
+ type: "table",
959
+ comp: "Table",
960
+ icon: "Grid"
961
+ },
962
+ {
963
+ name: "表单",
964
+ type: "form",
965
+ comp: "Form",
966
+ icon: "Film"
967
+ }
968
+ ]), yo = {
969
+ Table: zn,
970
+ Form: Wn,
971
+ TableOperate: ro,
972
+ FormOperate: ho
973
+ // 添加其他组件...
974
+ };
975
+ function Wt(e) {
976
+ return yo[e] || null;
977
+ }
978
+ const bo = { class: "type-select" }, go = ["onClick"], vo = { class: "list-icon" }, wo = {
979
+ __name: "index",
980
+ setup(e) {
981
+ const t = ht(de), { itemData: n } = De(t), o = (s) => Dn[s], r = (s) => {
982
+ const a = E(n.value);
983
+ a.push({
984
+ comp: s.comp,
985
+ name: s.name,
986
+ compData: []
987
+ }), t.setItemData(a);
988
+ };
989
+ return (s, a) => (J(), V("div", bo, [
990
+ (J(!0), V(Te, null, Ae(Vt(mo), (l, d) => (J(), V("div", {
991
+ class: "type-list",
992
+ key: d
993
+ }, [
994
+ j("div", {
995
+ class: "list-content",
996
+ onClick: (f) => r(l)
997
+ }, [
998
+ j("div", vo, [
999
+ (J(), ye(pt(o(l.icon))))
1000
+ ]),
1001
+ j("div", null, z(l.name), 1)
1002
+ ], 8, go)
1003
+ ]))), 128))
1004
+ ]));
1005
+ }
1006
+ }, ks = /* @__PURE__ */ le(wo, [["__scopeId", "data-v-fe4aecc8"]]), ko = { class: "fill-content" }, Eo = { class: "operate-content" }, Co = { class: "collapse-title" }, _o = { class: "comp-child" }, Ro = {
1007
+ __name: "index",
1008
+ setup(e) {
1009
+ const t = ht(de), { itemData: n, originalData: o } = De(t), r = U([]), s = U([]);
1010
+ oe(
1011
+ () => n.value,
1012
+ () => {
1013
+ var d;
1014
+ !n.value || ((d = n.value) == null ? void 0 : d.length) === 0 || (r.value = E(n.value));
1015
+ },
1016
+ { deep: !0, immediate: !0 }
1017
+ );
1018
+ const a = (d) => Wt(d), l = (d, f, h) => {
1019
+ if (!d || d.length === 0) return;
1020
+ let i = E(n.value);
1021
+ const R = E(f);
1022
+ R.compData = d, i = i == null ? void 0 : i.map((S, b) => (b === h && (S = R), S)), t.setItemData(i);
1023
+ };
1024
+ return (d, f) => {
1025
+ const h = Oe("el-collapse-item"), i = Oe("el-collapse");
1026
+ return J(), V("div", ko, [
1027
+ f[1] || (f[1] = j("div", { class: "fill-operate" }, z("操作栏"), -1)),
1028
+ j("div", Eo, [
1029
+ I(i, {
1030
+ modelValue: s.value,
1031
+ "onUpdate:modelValue": f[0] || (f[0] = (R) => s.value = R),
1032
+ class: "collapse-content"
1033
+ }, {
1034
+ default: X(() => [
1035
+ (J(!0), V(Te, null, Ae(r.value, (R, S) => (J(), ye(h, {
1036
+ key: S,
1037
+ name: S
1038
+ }, {
1039
+ title: X(() => [
1040
+ j("div", Co, z(R.name), 1)
1041
+ ]),
1042
+ default: X(() => {
1043
+ var b, A;
1044
+ return [
1045
+ j("div", _o, [
1046
+ (J(), ye(pt(a(R.comp + "Operate")), {
1047
+ itemContents: R == null ? void 0 : R.compData,
1048
+ originalItemContents: (A = (b = Vt(o)) == null ? void 0 : b.find((u, p) => p === S)) == null ? void 0 : A.compData,
1049
+ onChange: (u) => l(u, R, S)
1050
+ }, null, 40, ["itemContents", "originalItemContents", "onChange"]))
1051
+ ])
1052
+ ];
1053
+ }),
1054
+ _: 2
1055
+ }, 1032, ["name"]))), 128))
1056
+ ]),
1057
+ _: 1
1058
+ }, 8, ["modelValue"])
1059
+ ])
1060
+ ]);
1061
+ };
1062
+ }
1063
+ }, Es = /* @__PURE__ */ le(Ro, [["__scopeId", "data-v-a216b035"]]), So = {
1064
+ key: 0,
1065
+ class: "show-content"
1066
+ }, Oo = {
1067
+ __name: "index",
1068
+ setup(e) {
1069
+ const t = ht(de), { itemData: n } = De(t), o = U([]);
1070
+ oe(
1071
+ () => n.value,
1072
+ () => {
1073
+ var s;
1074
+ !n.value || ((s = n.value) == null ? void 0 : s.length) === 0 || (o.value = E(n.value));
1075
+ },
1076
+ { deep: !0, immediate: !0 }
1077
+ );
1078
+ const r = (s) => Wt(s);
1079
+ return (s, a) => {
1080
+ var l;
1081
+ return ((l = o.value) == null ? void 0 : l.length) > 0 ? (J(), V("div", So, [
1082
+ (J(!0), V(Te, null, Ae(o.value, (d, f) => (J(), V("div", {
1083
+ class: "item-content",
1084
+ key: f
1085
+ }, [
1086
+ j("div", null, z(d.name), 1),
1087
+ (J(), ye(pt(r(d.comp)), {
1088
+ itemData: d == null ? void 0 : d.compData,
1089
+ childItemData: d == null ? void 0 : d.itemChildData,
1090
+ key: f
1091
+ }, null, 8, ["itemData", "childItemData"]))
1092
+ ]))), 128))
1093
+ ])) : Ht("", !0);
1094
+ };
1095
+ }
1096
+ }, Cs = /* @__PURE__ */ le(Oo, [["__scopeId", "data-v-79320497"]]), G = [
1097
+ {
1098
+ key: "FormName",
1099
+ value: "Form"
1100
+ },
1101
+ {
1102
+ key: "TableName",
1103
+ value: "Table"
1104
+ },
1105
+ {
1106
+ key: "MenuName",
1107
+ value: "Menu"
1108
+ },
1109
+ {
1110
+ key: "GroupName",
1111
+ value: "Group"
1112
+ },
1113
+ {
1114
+ key: "SystemKey",
1115
+ value: "System"
1116
+ }
1117
+ ], K = [
1118
+ {
1119
+ key: "FormDirect",
1120
+ value: "formFlex"
1121
+ },
1122
+ {
1123
+ key: "Form",
1124
+ value: "formContent"
1125
+ },
1126
+ {
1127
+ key: "FormButton",
1128
+ value: "formButton"
1129
+ },
1130
+ {
1131
+ key: "FormFlex",
1132
+ value: "formWrap"
1133
+ },
1134
+ {
1135
+ key: "TableColumns",
1136
+ value: "header"
1137
+ },
1138
+ {
1139
+ key: "TableButton",
1140
+ value: "extraButton"
1141
+ },
1142
+ {
1143
+ key: "LineButton",
1144
+ value: "rowButton"
1145
+ },
1146
+ {
1147
+ key: "Table",
1148
+ value: "tableContents"
1149
+ },
1150
+ {
1151
+ key: "TableIndex",
1152
+ value: "tableIndex"
1153
+ },
1154
+ {
1155
+ key: "Menus",
1156
+ value: "menuContents"
1157
+ },
1158
+ {
1159
+ key: "GroupContents",
1160
+ value: "groupContents"
1161
+ }
1162
+ ], $e = U(0), To = (e) => {
1163
+ const t = e.split(`\r
1164
+ `).filter((r) => r.trim() !== ""), n = [];
1165
+ let o = "";
1166
+ for (const r of t)
1167
+ r.includes("{") || o.includes("{") || r.includes("[") || o.includes("[") || r.includes("【") || o.includes("【") || r.includes("(") || o.includes("(") || r.includes("(") || o.includes("(") ? (o += r.trim(), E(o).split("{").length - 1 === E(o).split("}").length - 1 && E(o).split("【").length - 1 === E(o).split("】").length - 1 && E(o).split("[").length - 1 === E(o).split("]").length - 1 && E(o).split("(").length - 1 === E(o).split(")").length - 1 && E(o).split("(").length - 1 === E(o).split(")").length - 1 && (n.push(o), o = "")) : n.push(r.trim());
1168
+ return n;
1169
+ }, Ao = (e) => {
1170
+ 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, o = {};
1171
+ let r;
1172
+ for (; (r = n.exec(t)) !== null; ) {
1173
+ const s = r[1];
1174
+ let a = r[2].trim();
1175
+ (a.match(/\[/g) || []).length !== (a.match(/\]/g) || []).length && (a = a == null ? void 0 : a.replace(/]$/, "")), o[s] = s + "=" + a;
1176
+ }
1177
+ return o;
1178
+ }, Kt = (e) => {
1179
+ const [t, n] = e.split("=").map((s) => s.trim()), o = t.replace(/['"]/g, ""), r = n.replace(/^['"]|['"]$/g, "");
1180
+ return console.log("parseKeyValue:", o, r), { key: o, value: r };
1181
+ }, xo = (e) => {
1182
+ var a;
1183
+ let t = [];
1184
+ const [n, o] = e.split(/=(.+)/), r = n.replace(/['"]/g, "").trim(), s = o.replace(/^['"]|['"]$/g, "");
1185
+ return (a = Object.values(Ao(s))) == null || a.forEach((l) => {
1186
+ t.push(Kt(l));
1187
+ }), { key: r, value: t };
1188
+ }, Le = (e) => {
1189
+ try {
1190
+ return JSON.parse(e), !0;
1191
+ } catch {
1192
+ return !1;
1193
+ }
1194
+ }, Gt = (e) => {
1195
+ try {
1196
+ const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
1197
+ if (E(t).split("{").length - 1 > 1) {
1198
+ let n = E(t).replace(/^\{(.*)\}$/, "[$1]");
1199
+ if (Le(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Le(n)) {
1200
+ const o = JSON.parse(n);
1201
+ let r = [];
1202
+ return o == null || o.forEach((s) => {
1203
+ var a;
1204
+ (a = Object.entries(E(s))) == null || a.forEach((l) => {
1205
+ $e.value++, r.push({
1206
+ id: $e.value,
1207
+ key: (l == null ? void 0 : l[0]) ?? "",
1208
+ value: (l == null ? void 0 : l[1]) === "" ? "" : l == null ? void 0 : l[1],
1209
+ // 如果值为空,则key设为空字符串,否则保留原值
1210
+ width: Object.keys(E(s)).length
1211
+ });
1212
+ });
1213
+ }), r;
1214
+ } else
1215
+ return console.error("转换类型不正确:"), [];
1216
+ } else if (Le(t)) {
1217
+ const n = JSON.parse(t);
1218
+ return Object.entries(n).map(([o, r]) => ($e.value++, {
1219
+ id: $e.value,
1220
+ key: o,
1221
+ value: r === "" ? "" : r,
1222
+ // 如果值为空,则key设为空字符串,否则保留原值
1223
+ width: 1
1224
+ }));
1225
+ } else
1226
+ return t;
1227
+ } catch (t) {
1228
+ return console.error("转换失败:", t), [];
1229
+ }
1230
+ }, Do = (e, t) => {
1231
+ try {
1232
+ if (G != null && G.find((n) => (n == null ? void 0 : n.key) === t))
1233
+ return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
1234
+ if (E(e).split("[").length - 1 > 1) {
1235
+ const n = E(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1236
+ return JSON.parse(n);
1237
+ } else {
1238
+ const n = E(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
1239
+ if (Le(n)) {
1240
+ const o = JSON.parse(n);
1241
+ return Array.isArray(o) ? o.map((r) => ({ label: r })) : o;
1242
+ } else
1243
+ return Gt(E(e));
1244
+ }
1245
+ } catch (n) {
1246
+ return console.error("解析失败:", n), e;
1247
+ }
1248
+ }, No = (e) => ({ [e == null ? void 0 : e.key]: Do(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Fo = (e) => {
1249
+ try {
1250
+ if (E(e).split("[").length - 1 > 1) {
1251
+ const t = E(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1252
+ return JSON.parse(t);
1253
+ } else
1254
+ return JSON.parse(E(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
1255
+ } catch (t) {
1256
+ return console.error("解析失败:", t), e;
1257
+ }
1258
+ }, _s = (e) => {
1259
+ var s, a, l, d, f, h;
1260
+ const t = To((a = (s = E(e)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")")), n = (l = E(t)) == null ? void 0 : l.map((i) => {
1261
+ var S, b;
1262
+ let R = (b = (S = E(i)) == null ? void 0 : S.split("=")) == null ? void 0 : b[0];
1263
+ return R != null && R.includes("GroupContents") ? xo(i) : Kt(i);
1264
+ }), o = [];
1265
+ console.log("transContents", n), (d = E(n)) == null || d.forEach((i) => {
1266
+ var R, S, b, A, u;
1267
+ G != null && G.find((p) => {
1268
+ var y, w;
1269
+ return ((y = p == null ? void 0 : p.key) == null ? void 0 : y.toUpperCase()) === ((w = i == null ? void 0 : i.key) == null ? void 0 : w.toUpperCase());
1270
+ }) ? o.push({
1271
+ comp: ((R = G == null ? void 0 : G.find((p) => {
1272
+ var y, w;
1273
+ return ((y = p == null ? void 0 : p.key) == null ? void 0 : y.toUpperCase()) === ((w = i == null ? void 0 : i.key) == null ? void 0 : w.toUpperCase());
1274
+ })) == null ? void 0 : R.value) ?? "",
1275
+ name: (S = i == null ? void 0 : i.value) == null ? void 0 : S.replace(/[’]|[‘]|[']/g, ""),
1276
+ compData: []
1277
+ }) : K != null && K.find((p) => {
1278
+ var y, w;
1279
+ return ((y = p == null ? void 0 : p.key) == null ? void 0 : y.toUpperCase()) === ((w = i == null ? void 0 : i.key) == null ? void 0 : w.toUpperCase());
1280
+ }) && ((o == null ? void 0 : o.length) === 0 && (b = i.key) != null && b.includes("Menus") && o.push({
1281
+ comp: "Menu",
1282
+ name: "",
1283
+ compData: []
1284
+ }), (A = o == null ? void 0 : o[(o == null ? void 0 : o.length) - 1]) != null && A.compData && o[(o == null ? void 0 : o.length) - 1].compData.push({
1285
+ key: (u = K == null ? void 0 : K.find((p) => {
1286
+ var y, w;
1287
+ return ((y = p == null ? void 0 : p.key) == null ? void 0 : y.toUpperCase()) === ((w = i == null ? void 0 : i.key) == null ? void 0 : w.toUpperCase());
1288
+ })) == null ? void 0 : u.value,
1289
+ contents: i == null ? void 0 : i.value
1290
+ }));
1291
+ }), console.log("newContents", o);
1292
+ let r = (f = E(o)) == null ? void 0 : f.map((i) => {
1293
+ var R;
1294
+ return i != null && i.compData && (i.compData = (R = i == null ? void 0 : i.compData) == null ? void 0 : R.map((S) => {
1295
+ var b, A, u, p, y, w, g, m, k, _, O;
1296
+ if ((S == null ? void 0 : S.key) === "formFlex")
1297
+ S.contents = ((A = (b = S.contents) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : A.toUpperCase()) !== "Vertical".toUpperCase();
1298
+ else if ((S == null ? void 0 : S.key) === "groupContents")
1299
+ S.contents = (u = E(S.contents)) == null ? void 0 : u.map((P) => No(E(P)));
1300
+ else if (((y = (p = S.contents) == null ? void 0 : p.trim()) != null && y.startsWith("[") || (g = (w = S.contents) == null ? void 0 : w.trim()) != null && g.startsWith("【")) && ((k = (m = S.contents) == null ? void 0 : m.trim()) != null && k.endsWith("]") || (O = (_ = S.contents) == null ? void 0 : _.trim()) != null && O.endsWith("】")))
1301
+ S.contents = Fo(E(S.contents));
1302
+ else {
1303
+ if (!S.contents) return;
1304
+ S.contents = Gt(E(S.contents));
1305
+ }
1306
+ return S;
1307
+ })), i;
1308
+ });
1309
+ return r = (h = E(r)) == null ? void 0 : h.map((i) => {
1310
+ var R;
1311
+ return (i == null ? void 0 : i.comp) === "Group" && (i.compData = (R = i.compData) == null ? void 0 : R.map((S) => {
1312
+ var A;
1313
+ let b = [];
1314
+ return (A = S.contents) == null || A.forEach((u) => {
1315
+ var p, y, w, g, m, k, _, O, P, D, C, $;
1316
+ if (G != null && G.find((F) => {
1317
+ var T, N, q;
1318
+ return ((T = F == null ? void 0 : F.key) == null ? void 0 : T.toUpperCase()) === ((q = (N = Object.keys(u)) == null ? void 0 : N[0]) == null ? void 0 : q.toUpperCase());
1319
+ }))
1320
+ b.push({
1321
+ comp: (p = G == null ? void 0 : G.find((F) => {
1322
+ var T, N, q;
1323
+ return ((T = F == null ? void 0 : F.key) == null ? void 0 : T.toUpperCase()) === ((q = (N = Object.keys(u)) == null ? void 0 : N[0]) == null ? void 0 : q.toUpperCase());
1324
+ })) == null ? void 0 : p.value,
1325
+ name: (w = (y = Object.values(u)) == null ? void 0 : y[0]) == null ? void 0 : w.replace(/[’]|[‘]|[']/g, ""),
1326
+ compData: []
1327
+ });
1328
+ else if (K != null && K.find((F) => {
1329
+ var T, N, q;
1330
+ return ((T = F == null ? void 0 : F.key) == null ? void 0 : T.toUpperCase()) === ((q = (N = Object.keys(u)) == null ? void 0 : N[0]) == null ? void 0 : q.toUpperCase());
1331
+ })) {
1332
+ if ((b == null ? void 0 : b.length) === 0) return;
1333
+ (g = b == null ? void 0 : b[(b == null ? void 0 : b.length) - 1]) != null && g.compData && b[(b == null ? void 0 : b.length) - 1].compData.push({
1334
+ key: (m = K == null ? void 0 : K.find((F) => {
1335
+ var T, N, q;
1336
+ return ((T = F == null ? void 0 : F.key) == null ? void 0 : T.toUpperCase()) === ((q = (N = Object.keys(u)) == null ? void 0 : N[0]) == null ? void 0 : q.toUpperCase());
1337
+ })) == null ? void 0 : m.value,
1338
+ contents: (k = Object.values(u)) == null ? void 0 : k[0]
1339
+ });
1340
+ } else if ((O = (_ = Object.keys(u)) == null ? void 0 : _[0]) != null && O.includes("$")) {
1341
+ const F = (D = (P = Object.keys(E(u))) == null ? void 0 : P[0]) == null ? void 0 : D.split("$");
1342
+ b[(b == null ? void 0 : b.length) - 1].compData.push({
1343
+ key: (C = K == null ? void 0 : K.find((T) => {
1344
+ var N, q;
1345
+ return ((N = T == null ? void 0 : T.key) == null ? void 0 : N.toUpperCase()) === ((q = F == null ? void 0 : F[0]) == null ? void 0 : q.toUpperCase());
1346
+ })) == null ? void 0 : C.value,
1347
+ contents: ($ = Object.values(u)) == null ? void 0 : $[0],
1348
+ selectLabel: F == null ? void 0 : F[1]
1349
+ });
1350
+ }
1351
+ return u;
1352
+ }), S.contents = b, S;
1353
+ })), i;
1354
+ }), r;
1355
+ };
1356
+ function Xt(e, t) {
1357
+ return function() {
1358
+ return e.apply(t, arguments);
1359
+ };
1360
+ }
1361
+ const { toString: Po } = Object.prototype, { getPrototypeOf: mt } = Object, { iterator: We, toStringTag: Zt } = Symbol, Ke = /* @__PURE__ */ ((e) => (t) => {
1362
+ const n = Po.call(t);
1363
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1364
+ })(/* @__PURE__ */ Object.create(null)), ee = (e) => (e = e.toLowerCase(), (t) => Ke(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: be } = Array, xe = Ge("undefined");
1365
+ function Bo(e) {
1366
+ return e !== null && !xe(e) && e.constructor !== null && !xe(e.constructor) && Z(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1367
+ }
1368
+ const Qt = ee("ArrayBuffer");
1369
+ function Uo(e) {
1370
+ let t;
1371
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Qt(e.buffer), t;
1372
+ }
1373
+ const $o = Ge("string"), Z = Ge("function"), Yt = Ge("number"), Xe = (e) => e !== null && typeof e == "object", jo = (e) => e === !0 || e === !1, qe = (e) => {
1374
+ if (Ke(e) !== "object")
1375
+ return !1;
1376
+ const t = mt(e);
1377
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Zt in e) && !(We in e);
1378
+ }, Lo = ee("Date"), qo = ee("File"), Mo = ee("Blob"), Jo = ee("FileList"), zo = (e) => Xe(e) && Z(e.pipe), Ho = (e) => {
1379
+ let t;
1380
+ return e && (typeof FormData == "function" && e instanceof FormData || Z(e.append) && ((t = Ke(e)) === "formdata" || // detect form-data instance
1381
+ t === "object" && Z(e.toString) && e.toString() === "[object FormData]"));
1382
+ }, Vo = ee("URLSearchParams"), [Io, Wo, Ko, Go] = ["ReadableStream", "Request", "Response", "Headers"].map(ee), Xo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1383
+ function Ne(e, t, { allOwnKeys: n = !1 } = {}) {
1384
+ if (e === null || typeof e > "u")
1385
+ return;
1386
+ let o, r;
1387
+ if (typeof e != "object" && (e = [e]), be(e))
1388
+ for (o = 0, r = e.length; o < r; o++)
1389
+ t.call(null, e[o], o, e);
1390
+ else {
1391
+ const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length;
1392
+ let l;
1393
+ for (o = 0; o < a; o++)
1394
+ l = s[o], t.call(null, e[l], l, e);
1395
+ }
1396
+ }
1397
+ function en(e, t) {
1398
+ t = t.toLowerCase();
1399
+ const n = Object.keys(e);
1400
+ let o = n.length, r;
1401
+ for (; o-- > 0; )
1402
+ if (r = n[o], t === r.toLowerCase())
1403
+ return r;
1404
+ return null;
1405
+ }
1406
+ const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, tn = (e) => !xe(e) && e !== ie;
1407
+ function st() {
1408
+ const { caseless: e } = tn(this) && this || {}, t = {}, n = (o, r) => {
1409
+ const s = e && en(t, r) || r;
1410
+ qe(t[s]) && qe(o) ? t[s] = st(t[s], o) : qe(o) ? t[s] = st({}, o) : be(o) ? t[s] = o.slice() : t[s] = o;
1411
+ };
1412
+ for (let o = 0, r = arguments.length; o < r; o++)
1413
+ arguments[o] && Ne(arguments[o], n);
1414
+ return t;
1415
+ }
1416
+ const Zo = (e, t, n, { allOwnKeys: o } = {}) => (Ne(t, (r, s) => {
1417
+ n && Z(r) ? e[s] = Xt(r, n) : e[s] = r;
1418
+ }, { allOwnKeys: o }), e), Qo = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Yo = (e, t, n, o) => {
1419
+ e.prototype = Object.create(t.prototype, o), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1420
+ value: t.prototype
1421
+ }), n && Object.assign(e.prototype, n);
1422
+ }, er = (e, t, n, o) => {
1423
+ let r, s, a;
1424
+ const l = {};
1425
+ if (t = t || {}, e == null) return t;
1426
+ do {
1427
+ for (r = Object.getOwnPropertyNames(e), s = r.length; s-- > 0; )
1428
+ a = r[s], (!o || o(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
1429
+ e = n !== !1 && mt(e);
1430
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
1431
+ return t;
1432
+ }, tr = (e, t, n) => {
1433
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
1434
+ const o = e.indexOf(t, n);
1435
+ return o !== -1 && o === n;
1436
+ }, nr = (e) => {
1437
+ if (!e) return null;
1438
+ if (be(e)) return e;
1439
+ let t = e.length;
1440
+ if (!Yt(t)) return null;
1441
+ const n = new Array(t);
1442
+ for (; t-- > 0; )
1443
+ n[t] = e[t];
1444
+ return n;
1445
+ }, or = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && mt(Uint8Array)), rr = (e, t) => {
1446
+ const o = (e && e[We]).call(e);
1447
+ let r;
1448
+ for (; (r = o.next()) && !r.done; ) {
1449
+ const s = r.value;
1450
+ t.call(e, s[0], s[1]);
1451
+ }
1452
+ }, sr = (e, t) => {
1453
+ let n;
1454
+ const o = [];
1455
+ for (; (n = e.exec(t)) !== null; )
1456
+ o.push(n);
1457
+ return o;
1458
+ }, ar = ee("HTMLFormElement"), lr = (e) => e.toLowerCase().replace(
1459
+ /[-_\s]([a-z\d])(\w*)/g,
1460
+ function(n, o, r) {
1461
+ return o.toUpperCase() + r;
1462
+ }
1463
+ ), Dt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ir = ee("RegExp"), nn = (e, t) => {
1464
+ const n = Object.getOwnPropertyDescriptors(e), o = {};
1465
+ Ne(n, (r, s) => {
1466
+ let a;
1467
+ (a = t(r, s, e)) !== !1 && (o[s] = a || r);
1468
+ }), Object.defineProperties(e, o);
1469
+ }, cr = (e) => {
1470
+ nn(e, (t, n) => {
1471
+ if (Z(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1472
+ return !1;
1473
+ const o = e[n];
1474
+ if (Z(o)) {
1475
+ if (t.enumerable = !1, "writable" in t) {
1476
+ t.writable = !1;
1477
+ return;
1478
+ }
1479
+ t.set || (t.set = () => {
1480
+ throw Error("Can not rewrite read-only method '" + n + "'");
1481
+ });
1482
+ }
1483
+ });
1484
+ }, ur = (e, t) => {
1485
+ const n = {}, o = (r) => {
1486
+ r.forEach((s) => {
1487
+ n[s] = !0;
1488
+ });
1489
+ };
1490
+ return be(e) ? o(e) : o(String(e).split(t)), n;
1491
+ }, fr = () => {
1492
+ }, dr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1493
+ function pr(e) {
1494
+ return !!(e && Z(e.append) && e[Zt] === "FormData" && e[We]);
1495
+ }
1496
+ const hr = (e) => {
1497
+ const t = new Array(10), n = (o, r) => {
1498
+ if (Xe(o)) {
1499
+ if (t.indexOf(o) >= 0)
1500
+ return;
1501
+ if (!("toJSON" in o)) {
1502
+ t[r] = o;
1503
+ const s = be(o) ? [] : {};
1504
+ return Ne(o, (a, l) => {
1505
+ const d = n(a, r + 1);
1506
+ !xe(d) && (s[l] = d);
1507
+ }), t[r] = void 0, s;
1508
+ }
1509
+ }
1510
+ return o;
1511
+ };
1512
+ return n(e, 0);
1513
+ }, mr = ee("AsyncFunction"), yr = (e) => e && (Xe(e) || Z(e)) && Z(e.then) && Z(e.catch), on = ((e, t) => e ? setImmediate : t ? ((n, o) => (ie.addEventListener("message", ({ source: r, data: s }) => {
1514
+ r === ie && s === n && o.length && o.shift()();
1515
+ }, !1), (r) => {
1516
+ o.push(r), ie.postMessage(n, "*");
1517
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1518
+ typeof setImmediate == "function",
1519
+ Z(ie.postMessage)
1520
+ ), br = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || on, gr = (e) => e != null && Z(e[We]), c = {
1521
+ isArray: be,
1522
+ isArrayBuffer: Qt,
1523
+ isBuffer: Bo,
1524
+ isFormData: Ho,
1525
+ isArrayBufferView: Uo,
1526
+ isString: $o,
1527
+ isNumber: Yt,
1528
+ isBoolean: jo,
1529
+ isObject: Xe,
1530
+ isPlainObject: qe,
1531
+ isReadableStream: Io,
1532
+ isRequest: Wo,
1533
+ isResponse: Ko,
1534
+ isHeaders: Go,
1535
+ isUndefined: xe,
1536
+ isDate: Lo,
1537
+ isFile: qo,
1538
+ isBlob: Mo,
1539
+ isRegExp: ir,
1540
+ isFunction: Z,
1541
+ isStream: zo,
1542
+ isURLSearchParams: Vo,
1543
+ isTypedArray: or,
1544
+ isFileList: Jo,
1545
+ forEach: Ne,
1546
+ merge: st,
1547
+ extend: Zo,
1548
+ trim: Xo,
1549
+ stripBOM: Qo,
1550
+ inherits: Yo,
1551
+ toFlatObject: er,
1552
+ kindOf: Ke,
1553
+ kindOfTest: ee,
1554
+ endsWith: tr,
1555
+ toArray: nr,
1556
+ forEachEntry: rr,
1557
+ matchAll: sr,
1558
+ isHTMLForm: ar,
1559
+ hasOwnProperty: Dt,
1560
+ hasOwnProp: Dt,
1561
+ // an alias to avoid ESLint no-prototype-builtins detection
1562
+ reduceDescriptors: nn,
1563
+ freezeMethods: cr,
1564
+ toObjectSet: ur,
1565
+ toCamelCase: lr,
1566
+ noop: fr,
1567
+ toFiniteNumber: dr,
1568
+ findKey: en,
1569
+ global: ie,
1570
+ isContextDefined: tn,
1571
+ isSpecCompliantForm: pr,
1572
+ toJSONObject: hr,
1573
+ isAsyncFn: mr,
1574
+ isThenable: yr,
1575
+ setImmediate: on,
1576
+ asap: br,
1577
+ isIterable: gr
1578
+ };
1579
+ function B(e, t, n, o, r) {
1580
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), o && (this.request = o), r && (this.response = r, this.status = r.status ? r.status : null);
1581
+ }
1582
+ c.inherits(B, Error, {
1583
+ toJSON: function() {
1584
+ return {
1585
+ // Standard
1586
+ message: this.message,
1587
+ name: this.name,
1588
+ // Microsoft
1589
+ description: this.description,
1590
+ number: this.number,
1591
+ // Mozilla
1592
+ fileName: this.fileName,
1593
+ lineNumber: this.lineNumber,
1594
+ columnNumber: this.columnNumber,
1595
+ stack: this.stack,
1596
+ // Axios
1597
+ config: c.toJSONObject(this.config),
1598
+ code: this.code,
1599
+ status: this.status
1600
+ };
1601
+ }
1602
+ });
1603
+ const rn = B.prototype, sn = {};
1604
+ [
1605
+ "ERR_BAD_OPTION_VALUE",
1606
+ "ERR_BAD_OPTION",
1607
+ "ECONNABORTED",
1608
+ "ETIMEDOUT",
1609
+ "ERR_NETWORK",
1610
+ "ERR_FR_TOO_MANY_REDIRECTS",
1611
+ "ERR_DEPRECATED",
1612
+ "ERR_BAD_RESPONSE",
1613
+ "ERR_BAD_REQUEST",
1614
+ "ERR_CANCELED",
1615
+ "ERR_NOT_SUPPORT",
1616
+ "ERR_INVALID_URL"
1617
+ // eslint-disable-next-line func-names
1618
+ ].forEach((e) => {
1619
+ sn[e] = { value: e };
1620
+ });
1621
+ Object.defineProperties(B, sn);
1622
+ Object.defineProperty(rn, "isAxiosError", { value: !0 });
1623
+ B.from = (e, t, n, o, r, s) => {
1624
+ const a = Object.create(rn);
1625
+ return c.toFlatObject(e, a, function(d) {
1626
+ return d !== Error.prototype;
1627
+ }, (l) => l !== "isAxiosError"), B.call(a, e.message, t, n, o, r), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
1628
+ };
1629
+ const vr = null;
1630
+ function at(e) {
1631
+ return c.isPlainObject(e) || c.isArray(e);
1632
+ }
1633
+ function an(e) {
1634
+ return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
1635
+ }
1636
+ function Nt(e, t, n) {
1637
+ return e ? e.concat(t).map(function(r, s) {
1638
+ return r = an(r), !n && s ? "[" + r + "]" : r;
1639
+ }).join(n ? "." : "") : t;
1640
+ }
1641
+ function wr(e) {
1642
+ return c.isArray(e) && !e.some(at);
1643
+ }
1644
+ const kr = c.toFlatObject(c, {}, null, function(t) {
1645
+ return /^is[A-Z]/.test(t);
1646
+ });
1647
+ function Ze(e, t, n) {
1648
+ if (!c.isObject(e))
1649
+ throw new TypeError("target must be an object");
1650
+ t = t || new FormData(), n = c.toFlatObject(n, {
1651
+ metaTokens: !0,
1652
+ dots: !1,
1653
+ indexes: !1
1654
+ }, !1, function(A, u) {
1655
+ return !c.isUndefined(u[A]);
1656
+ });
1657
+ const o = n.metaTokens, r = n.visitor || h, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
1658
+ if (!c.isFunction(r))
1659
+ throw new TypeError("visitor must be a function");
1660
+ function f(b) {
1661
+ if (b === null) return "";
1662
+ if (c.isDate(b))
1663
+ return b.toISOString();
1664
+ if (!d && c.isBlob(b))
1665
+ throw new B("Blob is not supported. Use a Buffer instead.");
1666
+ return c.isArrayBuffer(b) || c.isTypedArray(b) ? d && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
1667
+ }
1668
+ function h(b, A, u) {
1669
+ let p = b;
1670
+ if (b && !u && typeof b == "object") {
1671
+ if (c.endsWith(A, "{}"))
1672
+ A = o ? A : A.slice(0, -2), b = JSON.stringify(b);
1673
+ else if (c.isArray(b) && wr(b) || (c.isFileList(b) || c.endsWith(A, "[]")) && (p = c.toArray(b)))
1674
+ return A = an(A), p.forEach(function(w, g) {
1675
+ !(c.isUndefined(w) || w === null) && t.append(
1676
+ // eslint-disable-next-line no-nested-ternary
1677
+ a === !0 ? Nt([A], g, s) : a === null ? A : A + "[]",
1678
+ f(w)
1679
+ );
1680
+ }), !1;
1681
+ }
1682
+ return at(b) ? !0 : (t.append(Nt(u, A, s), f(b)), !1);
1683
+ }
1684
+ const i = [], R = Object.assign(kr, {
1685
+ defaultVisitor: h,
1686
+ convertValue: f,
1687
+ isVisitable: at
1688
+ });
1689
+ function S(b, A) {
1690
+ if (!c.isUndefined(b)) {
1691
+ if (i.indexOf(b) !== -1)
1692
+ throw Error("Circular reference detected in " + A.join("."));
1693
+ i.push(b), c.forEach(b, function(p, y) {
1694
+ (!(c.isUndefined(p) || p === null) && r.call(
1695
+ t,
1696
+ p,
1697
+ c.isString(y) ? y.trim() : y,
1698
+ A,
1699
+ R
1700
+ )) === !0 && S(p, A ? A.concat(y) : [y]);
1701
+ }), i.pop();
1702
+ }
1703
+ }
1704
+ if (!c.isObject(e))
1705
+ throw new TypeError("data must be an object");
1706
+ return S(e), t;
1707
+ }
1708
+ function Ft(e) {
1709
+ const t = {
1710
+ "!": "%21",
1711
+ "'": "%27",
1712
+ "(": "%28",
1713
+ ")": "%29",
1714
+ "~": "%7E",
1715
+ "%20": "+",
1716
+ "%00": "\0"
1717
+ };
1718
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(o) {
1719
+ return t[o];
1720
+ });
1721
+ }
1722
+ function yt(e, t) {
1723
+ this._pairs = [], e && Ze(e, this, t);
1724
+ }
1725
+ const ln = yt.prototype;
1726
+ ln.append = function(t, n) {
1727
+ this._pairs.push([t, n]);
1728
+ };
1729
+ ln.toString = function(t) {
1730
+ const n = t ? function(o) {
1731
+ return t.call(this, o, Ft);
1732
+ } : Ft;
1733
+ return this._pairs.map(function(r) {
1734
+ return n(r[0]) + "=" + n(r[1]);
1735
+ }, "").join("&");
1736
+ };
1737
+ function Er(e) {
1738
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1739
+ }
1740
+ function cn(e, t, n) {
1741
+ if (!t)
1742
+ return e;
1743
+ const o = n && n.encode || Er;
1744
+ c.isFunction(n) && (n = {
1745
+ serialize: n
1746
+ });
1747
+ const r = n && n.serialize;
1748
+ let s;
1749
+ if (r ? s = r(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new yt(t, n).toString(o), s) {
1750
+ const a = e.indexOf("#");
1751
+ a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1752
+ }
1753
+ return e;
1754
+ }
1755
+ class Pt {
1756
+ constructor() {
1757
+ this.handlers = [];
1758
+ }
1759
+ /**
1760
+ * Add a new interceptor to the stack
1761
+ *
1762
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1763
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1764
+ *
1765
+ * @return {Number} An ID used to remove interceptor later
1766
+ */
1767
+ use(t, n, o) {
1768
+ return this.handlers.push({
1769
+ fulfilled: t,
1770
+ rejected: n,
1771
+ synchronous: o ? o.synchronous : !1,
1772
+ runWhen: o ? o.runWhen : null
1773
+ }), this.handlers.length - 1;
1774
+ }
1775
+ /**
1776
+ * Remove an interceptor from the stack
1777
+ *
1778
+ * @param {Number} id The ID that was returned by `use`
1779
+ *
1780
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1781
+ */
1782
+ eject(t) {
1783
+ this.handlers[t] && (this.handlers[t] = null);
1784
+ }
1785
+ /**
1786
+ * Clear all interceptors from the stack
1787
+ *
1788
+ * @returns {void}
1789
+ */
1790
+ clear() {
1791
+ this.handlers && (this.handlers = []);
1792
+ }
1793
+ /**
1794
+ * Iterate over all the registered interceptors
1795
+ *
1796
+ * This method is particularly useful for skipping over any
1797
+ * interceptors that may have become `null` calling `eject`.
1798
+ *
1799
+ * @param {Function} fn The function to call for each interceptor
1800
+ *
1801
+ * @returns {void}
1802
+ */
1803
+ forEach(t) {
1804
+ c.forEach(this.handlers, function(o) {
1805
+ o !== null && t(o);
1806
+ });
1807
+ }
1808
+ }
1809
+ const un = {
1810
+ silentJSONParsing: !0,
1811
+ forcedJSONParsing: !0,
1812
+ clarifyTimeoutError: !1
1813
+ }, Cr = typeof URLSearchParams < "u" ? URLSearchParams : yt, _r = typeof FormData < "u" ? FormData : null, Rr = typeof Blob < "u" ? Blob : null, Sr = {
1814
+ isBrowser: !0,
1815
+ classes: {
1816
+ URLSearchParams: Cr,
1817
+ FormData: _r,
1818
+ Blob: Rr
1819
+ },
1820
+ protocols: ["http", "https", "file", "blob", "url", "data"]
1821
+ }, bt = typeof window < "u" && typeof document < "u", lt = typeof navigator == "object" && navigator || void 0, Or = bt && (!lt || ["ReactNative", "NativeScript", "NS"].indexOf(lt.product) < 0), Tr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1822
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ar = bt && window.location.href || "http://localhost", xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1823
+ __proto__: null,
1824
+ hasBrowserEnv: bt,
1825
+ hasStandardBrowserEnv: Or,
1826
+ hasStandardBrowserWebWorkerEnv: Tr,
1827
+ navigator: lt,
1828
+ origin: Ar
1829
+ }, Symbol.toStringTag, { value: "Module" })), W = {
1830
+ ...xr,
1831
+ ...Sr
1832
+ };
1833
+ function Dr(e, t) {
1834
+ return Ze(e, new W.classes.URLSearchParams(), Object.assign({
1835
+ visitor: function(n, o, r, s) {
1836
+ return W.isNode && c.isBuffer(n) ? (this.append(o, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1837
+ }
1838
+ }, t));
1839
+ }
1840
+ function Nr(e) {
1841
+ return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1842
+ }
1843
+ function Fr(e) {
1844
+ const t = {}, n = Object.keys(e);
1845
+ let o;
1846
+ const r = n.length;
1847
+ let s;
1848
+ for (o = 0; o < r; o++)
1849
+ s = n[o], t[s] = e[s];
1850
+ return t;
1851
+ }
1852
+ function fn(e) {
1853
+ function t(n, o, r, s) {
1854
+ let a = n[s++];
1855
+ if (a === "__proto__") return !0;
1856
+ const l = Number.isFinite(+a), d = s >= n.length;
1857
+ return a = !a && c.isArray(r) ? r.length : a, d ? (c.hasOwnProp(r, a) ? r[a] = [r[a], o] : r[a] = o, !l) : ((!r[a] || !c.isObject(r[a])) && (r[a] = []), t(n, o, r[a], s) && c.isArray(r[a]) && (r[a] = Fr(r[a])), !l);
1858
+ }
1859
+ if (c.isFormData(e) && c.isFunction(e.entries)) {
1860
+ const n = {};
1861
+ return c.forEachEntry(e, (o, r) => {
1862
+ t(Nr(o), r, n, 0);
1863
+ }), n;
1864
+ }
1865
+ return null;
1866
+ }
1867
+ function Pr(e, t, n) {
1868
+ if (c.isString(e))
1869
+ try {
1870
+ return (t || JSON.parse)(e), c.trim(e);
1871
+ } catch (o) {
1872
+ if (o.name !== "SyntaxError")
1873
+ throw o;
1874
+ }
1875
+ return (n || JSON.stringify)(e);
1876
+ }
1877
+ const Fe = {
1878
+ transitional: un,
1879
+ adapter: ["xhr", "http", "fetch"],
1880
+ transformRequest: [function(t, n) {
1881
+ const o = n.getContentType() || "", r = o.indexOf("application/json") > -1, s = c.isObject(t);
1882
+ if (s && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
1883
+ return r ? JSON.stringify(fn(t)) : t;
1884
+ if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
1885
+ return t;
1886
+ if (c.isArrayBufferView(t))
1887
+ return t.buffer;
1888
+ if (c.isURLSearchParams(t))
1889
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1890
+ let l;
1891
+ if (s) {
1892
+ if (o.indexOf("application/x-www-form-urlencoded") > -1)
1893
+ return Dr(t, this.formSerializer).toString();
1894
+ if ((l = c.isFileList(t)) || o.indexOf("multipart/form-data") > -1) {
1895
+ const d = this.env && this.env.FormData;
1896
+ return Ze(
1897
+ l ? { "files[]": t } : t,
1898
+ d && new d(),
1899
+ this.formSerializer
1900
+ );
1901
+ }
1902
+ }
1903
+ return s || r ? (n.setContentType("application/json", !1), Pr(t)) : t;
1904
+ }],
1905
+ transformResponse: [function(t) {
1906
+ const n = this.transitional || Fe.transitional, o = n && n.forcedJSONParsing, r = this.responseType === "json";
1907
+ if (c.isResponse(t) || c.isReadableStream(t))
1908
+ return t;
1909
+ if (t && c.isString(t) && (o && !this.responseType || r)) {
1910
+ const a = !(n && n.silentJSONParsing) && r;
1911
+ try {
1912
+ return JSON.parse(t);
1913
+ } catch (l) {
1914
+ if (a)
1915
+ throw l.name === "SyntaxError" ? B.from(l, B.ERR_BAD_RESPONSE, this, null, this.response) : l;
1916
+ }
1917
+ }
1918
+ return t;
1919
+ }],
1920
+ /**
1921
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1922
+ * timeout is not created.
1923
+ */
1924
+ timeout: 0,
1925
+ xsrfCookieName: "XSRF-TOKEN",
1926
+ xsrfHeaderName: "X-XSRF-TOKEN",
1927
+ maxContentLength: -1,
1928
+ maxBodyLength: -1,
1929
+ env: {
1930
+ FormData: W.classes.FormData,
1931
+ Blob: W.classes.Blob
1932
+ },
1933
+ validateStatus: function(t) {
1934
+ return t >= 200 && t < 300;
1935
+ },
1936
+ headers: {
1937
+ common: {
1938
+ Accept: "application/json, text/plain, */*",
1939
+ "Content-Type": void 0
1940
+ }
1941
+ }
1942
+ };
1943
+ c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1944
+ Fe.headers[e] = {};
1945
+ });
1946
+ const Br = c.toObjectSet([
1947
+ "age",
1948
+ "authorization",
1949
+ "content-length",
1950
+ "content-type",
1951
+ "etag",
1952
+ "expires",
1953
+ "from",
1954
+ "host",
1955
+ "if-modified-since",
1956
+ "if-unmodified-since",
1957
+ "last-modified",
1958
+ "location",
1959
+ "max-forwards",
1960
+ "proxy-authorization",
1961
+ "referer",
1962
+ "retry-after",
1963
+ "user-agent"
1964
+ ]), Ur = (e) => {
1965
+ const t = {};
1966
+ let n, o, r;
1967
+ return e && e.split(`
1968
+ `).forEach(function(a) {
1969
+ r = a.indexOf(":"), n = a.substring(0, r).trim().toLowerCase(), o = a.substring(r + 1).trim(), !(!n || t[n] && Br[n]) && (n === "set-cookie" ? t[n] ? t[n].push(o) : t[n] = [o] : t[n] = t[n] ? t[n] + ", " + o : o);
1970
+ }), t;
1971
+ }, Bt = Symbol("internals");
1972
+ function Re(e) {
1973
+ return e && String(e).trim().toLowerCase();
1974
+ }
1975
+ function Me(e) {
1976
+ return e === !1 || e == null ? e : c.isArray(e) ? e.map(Me) : String(e);
1977
+ }
1978
+ function $r(e) {
1979
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1980
+ let o;
1981
+ for (; o = n.exec(e); )
1982
+ t[o[1]] = o[2];
1983
+ return t;
1984
+ }
1985
+ const jr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1986
+ function tt(e, t, n, o, r) {
1987
+ if (c.isFunction(o))
1988
+ return o.call(this, t, n);
1989
+ if (r && (t = n), !!c.isString(t)) {
1990
+ if (c.isString(o))
1991
+ return t.indexOf(o) !== -1;
1992
+ if (c.isRegExp(o))
1993
+ return o.test(t);
1994
+ }
1995
+ }
1996
+ function Lr(e) {
1997
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, o) => n.toUpperCase() + o);
1998
+ }
1999
+ function qr(e, t) {
2000
+ const n = c.toCamelCase(" " + t);
2001
+ ["get", "set", "has"].forEach((o) => {
2002
+ Object.defineProperty(e, o + n, {
2003
+ value: function(r, s, a) {
2004
+ return this[o].call(this, t, r, s, a);
2005
+ },
2006
+ configurable: !0
2007
+ });
2008
+ });
2009
+ }
2010
+ let Q = class {
2011
+ constructor(t) {
2012
+ t && this.set(t);
2013
+ }
2014
+ set(t, n, o) {
2015
+ const r = this;
2016
+ function s(l, d, f) {
2017
+ const h = Re(d);
2018
+ if (!h)
2019
+ throw new Error("header name must be a non-empty string");
2020
+ const i = c.findKey(r, h);
2021
+ (!i || r[i] === void 0 || f === !0 || f === void 0 && r[i] !== !1) && (r[i || d] = Me(l));
2022
+ }
2023
+ const a = (l, d) => c.forEach(l, (f, h) => s(f, h, d));
2024
+ if (c.isPlainObject(t) || t instanceof this.constructor)
2025
+ a(t, n);
2026
+ else if (c.isString(t) && (t = t.trim()) && !jr(t))
2027
+ a(Ur(t), n);
2028
+ else if (c.isObject(t) && c.isIterable(t)) {
2029
+ let l = {}, d, f;
2030
+ for (const h of t) {
2031
+ if (!c.isArray(h))
2032
+ throw TypeError("Object iterator must return a key-value pair");
2033
+ l[f = h[0]] = (d = l[f]) ? c.isArray(d) ? [...d, h[1]] : [d, h[1]] : h[1];
2034
+ }
2035
+ a(l, n);
2036
+ } else
2037
+ t != null && s(n, t, o);
2038
+ return this;
2039
+ }
2040
+ get(t, n) {
2041
+ if (t = Re(t), t) {
2042
+ const o = c.findKey(this, t);
2043
+ if (o) {
2044
+ const r = this[o];
2045
+ if (!n)
2046
+ return r;
2047
+ if (n === !0)
2048
+ return $r(r);
2049
+ if (c.isFunction(n))
2050
+ return n.call(this, r, o);
2051
+ if (c.isRegExp(n))
2052
+ return n.exec(r);
2053
+ throw new TypeError("parser must be boolean|regexp|function");
2054
+ }
2055
+ }
2056
+ }
2057
+ has(t, n) {
2058
+ if (t = Re(t), t) {
2059
+ const o = c.findKey(this, t);
2060
+ return !!(o && this[o] !== void 0 && (!n || tt(this, this[o], o, n)));
2061
+ }
2062
+ return !1;
2063
+ }
2064
+ delete(t, n) {
2065
+ const o = this;
2066
+ let r = !1;
2067
+ function s(a) {
2068
+ if (a = Re(a), a) {
2069
+ const l = c.findKey(o, a);
2070
+ l && (!n || tt(o, o[l], l, n)) && (delete o[l], r = !0);
2071
+ }
2072
+ }
2073
+ return c.isArray(t) ? t.forEach(s) : s(t), r;
2074
+ }
2075
+ clear(t) {
2076
+ const n = Object.keys(this);
2077
+ let o = n.length, r = !1;
2078
+ for (; o--; ) {
2079
+ const s = n[o];
2080
+ (!t || tt(this, this[s], s, t, !0)) && (delete this[s], r = !0);
2081
+ }
2082
+ return r;
2083
+ }
2084
+ normalize(t) {
2085
+ const n = this, o = {};
2086
+ return c.forEach(this, (r, s) => {
2087
+ const a = c.findKey(o, s);
2088
+ if (a) {
2089
+ n[a] = Me(r), delete n[s];
2090
+ return;
2091
+ }
2092
+ const l = t ? Lr(s) : String(s).trim();
2093
+ l !== s && delete n[s], n[l] = Me(r), o[l] = !0;
2094
+ }), this;
2095
+ }
2096
+ concat(...t) {
2097
+ return this.constructor.concat(this, ...t);
2098
+ }
2099
+ toJSON(t) {
2100
+ const n = /* @__PURE__ */ Object.create(null);
2101
+ return c.forEach(this, (o, r) => {
2102
+ o != null && o !== !1 && (n[r] = t && c.isArray(o) ? o.join(", ") : o);
2103
+ }), n;
2104
+ }
2105
+ [Symbol.iterator]() {
2106
+ return Object.entries(this.toJSON())[Symbol.iterator]();
2107
+ }
2108
+ toString() {
2109
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
2110
+ `);
2111
+ }
2112
+ getSetCookie() {
2113
+ return this.get("set-cookie") || [];
2114
+ }
2115
+ get [Symbol.toStringTag]() {
2116
+ return "AxiosHeaders";
2117
+ }
2118
+ static from(t) {
2119
+ return t instanceof this ? t : new this(t);
2120
+ }
2121
+ static concat(t, ...n) {
2122
+ const o = new this(t);
2123
+ return n.forEach((r) => o.set(r)), o;
2124
+ }
2125
+ static accessor(t) {
2126
+ const o = (this[Bt] = this[Bt] = {
2127
+ accessors: {}
2128
+ }).accessors, r = this.prototype;
2129
+ function s(a) {
2130
+ const l = Re(a);
2131
+ o[l] || (qr(r, a), o[l] = !0);
2132
+ }
2133
+ return c.isArray(t) ? t.forEach(s) : s(t), this;
2134
+ }
2135
+ };
2136
+ Q.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2137
+ c.reduceDescriptors(Q.prototype, ({ value: e }, t) => {
2138
+ let n = t[0].toUpperCase() + t.slice(1);
2139
+ return {
2140
+ get: () => e,
2141
+ set(o) {
2142
+ this[n] = o;
2143
+ }
2144
+ };
2145
+ });
2146
+ c.freezeMethods(Q);
2147
+ function nt(e, t) {
2148
+ const n = this || Fe, o = t || n, r = Q.from(o.headers);
2149
+ let s = o.data;
2150
+ return c.forEach(e, function(l) {
2151
+ s = l.call(n, s, r.normalize(), t ? t.status : void 0);
2152
+ }), r.normalize(), s;
2153
+ }
2154
+ function dn(e) {
2155
+ return !!(e && e.__CANCEL__);
2156
+ }
2157
+ function ge(e, t, n) {
2158
+ B.call(this, e ?? "canceled", B.ERR_CANCELED, t, n), this.name = "CanceledError";
2159
+ }
2160
+ c.inherits(ge, B, {
2161
+ __CANCEL__: !0
2162
+ });
2163
+ function pn(e, t, n) {
2164
+ const o = n.config.validateStatus;
2165
+ !n.status || !o || o(n.status) ? e(n) : t(new B(
2166
+ "Request failed with status code " + n.status,
2167
+ [B.ERR_BAD_REQUEST, B.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
2168
+ n.config,
2169
+ n.request,
2170
+ n
2171
+ ));
2172
+ }
2173
+ function Mr(e) {
2174
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
2175
+ return t && t[1] || "";
2176
+ }
2177
+ function Jr(e, t) {
2178
+ e = e || 10;
2179
+ const n = new Array(e), o = new Array(e);
2180
+ let r = 0, s = 0, a;
2181
+ return t = t !== void 0 ? t : 1e3, function(d) {
2182
+ const f = Date.now(), h = o[s];
2183
+ a || (a = f), n[r] = d, o[r] = f;
2184
+ let i = s, R = 0;
2185
+ for (; i !== r; )
2186
+ R += n[i++], i = i % e;
2187
+ if (r = (r + 1) % e, r === s && (s = (s + 1) % e), f - a < t)
2188
+ return;
2189
+ const S = h && f - h;
2190
+ return S ? Math.round(R * 1e3 / S) : void 0;
2191
+ };
2192
+ }
2193
+ function zr(e, t) {
2194
+ let n = 0, o = 1e3 / t, r, s;
2195
+ const a = (f, h = Date.now()) => {
2196
+ n = h, r = null, s && (clearTimeout(s), s = null), e.apply(null, f);
2197
+ };
2198
+ return [(...f) => {
2199
+ const h = Date.now(), i = h - n;
2200
+ i >= o ? a(f, h) : (r = f, s || (s = setTimeout(() => {
2201
+ s = null, a(r);
2202
+ }, o - i)));
2203
+ }, () => r && a(r)];
2204
+ }
2205
+ const ze = (e, t, n = 3) => {
2206
+ let o = 0;
2207
+ const r = Jr(50, 250);
2208
+ return zr((s) => {
2209
+ const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - o, f = r(d), h = a <= l;
2210
+ o = a;
2211
+ const i = {
2212
+ loaded: a,
2213
+ total: l,
2214
+ progress: l ? a / l : void 0,
2215
+ bytes: d,
2216
+ rate: f || void 0,
2217
+ estimated: f && l && h ? (l - a) / f : void 0,
2218
+ event: s,
2219
+ lengthComputable: l != null,
2220
+ [t ? "download" : "upload"]: !0
2221
+ };
2222
+ e(i);
2223
+ }, n);
2224
+ }, Ut = (e, t) => {
2225
+ const n = e != null;
2226
+ return [(o) => t[0]({
2227
+ lengthComputable: n,
2228
+ total: e,
2229
+ loaded: o
2230
+ }), t[1]];
2231
+ }, $t = (e) => (...t) => c.asap(() => e(...t)), Hr = W.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, W.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
2232
+ new URL(W.origin),
2233
+ W.navigator && /(msie|trident)/i.test(W.navigator.userAgent)
2234
+ ) : () => !0, Vr = W.hasStandardBrowserEnv ? (
2235
+ // Standard browser envs support document.cookie
2236
+ {
2237
+ write(e, t, n, o, r, s) {
2238
+ const a = [e + "=" + encodeURIComponent(t)];
2239
+ c.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), c.isString(o) && a.push("path=" + o), c.isString(r) && a.push("domain=" + r), s === !0 && a.push("secure"), document.cookie = a.join("; ");
2240
+ },
2241
+ read(e) {
2242
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
2243
+ return t ? decodeURIComponent(t[3]) : null;
2244
+ },
2245
+ remove(e) {
2246
+ this.write(e, "", Date.now() - 864e5);
2247
+ }
2248
+ }
2249
+ ) : (
2250
+ // Non-standard browser env (web workers, react-native) lack needed support.
2251
+ {
2252
+ write() {
2253
+ },
2254
+ read() {
2255
+ return null;
2256
+ },
2257
+ remove() {
2258
+ }
2259
+ }
2260
+ );
2261
+ function Ir(e) {
2262
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
2263
+ }
2264
+ function Wr(e, t) {
2265
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
2266
+ }
2267
+ function hn(e, t, n) {
2268
+ let o = !Ir(t);
2269
+ return e && (o || n == !1) ? Wr(e, t) : t;
2270
+ }
2271
+ const jt = (e) => e instanceof Q ? { ...e } : e;
2272
+ function fe(e, t) {
2273
+ t = t || {};
2274
+ const n = {};
2275
+ function o(f, h, i, R) {
2276
+ return c.isPlainObject(f) && c.isPlainObject(h) ? c.merge.call({ caseless: R }, f, h) : c.isPlainObject(h) ? c.merge({}, h) : c.isArray(h) ? h.slice() : h;
2277
+ }
2278
+ function r(f, h, i, R) {
2279
+ if (c.isUndefined(h)) {
2280
+ if (!c.isUndefined(f))
2281
+ return o(void 0, f, i, R);
2282
+ } else return o(f, h, i, R);
2283
+ }
2284
+ function s(f, h) {
2285
+ if (!c.isUndefined(h))
2286
+ return o(void 0, h);
2287
+ }
2288
+ function a(f, h) {
2289
+ if (c.isUndefined(h)) {
2290
+ if (!c.isUndefined(f))
2291
+ return o(void 0, f);
2292
+ } else return o(void 0, h);
2293
+ }
2294
+ function l(f, h, i) {
2295
+ if (i in t)
2296
+ return o(f, h);
2297
+ if (i in e)
2298
+ return o(void 0, f);
2299
+ }
2300
+ const d = {
2301
+ url: s,
2302
+ method: s,
2303
+ data: s,
2304
+ baseURL: a,
2305
+ transformRequest: a,
2306
+ transformResponse: a,
2307
+ paramsSerializer: a,
2308
+ timeout: a,
2309
+ timeoutMessage: a,
2310
+ withCredentials: a,
2311
+ withXSRFToken: a,
2312
+ adapter: a,
2313
+ responseType: a,
2314
+ xsrfCookieName: a,
2315
+ xsrfHeaderName: a,
2316
+ onUploadProgress: a,
2317
+ onDownloadProgress: a,
2318
+ decompress: a,
2319
+ maxContentLength: a,
2320
+ maxBodyLength: a,
2321
+ beforeRedirect: a,
2322
+ transport: a,
2323
+ httpAgent: a,
2324
+ httpsAgent: a,
2325
+ cancelToken: a,
2326
+ socketPath: a,
2327
+ responseEncoding: a,
2328
+ validateStatus: l,
2329
+ headers: (f, h, i) => r(jt(f), jt(h), i, !0)
2330
+ };
2331
+ return c.forEach(Object.keys(Object.assign({}, e, t)), function(h) {
2332
+ const i = d[h] || r, R = i(e[h], t[h], h);
2333
+ c.isUndefined(R) && i !== l || (n[h] = R);
2334
+ }), n;
2335
+ }
2336
+ const mn = (e) => {
2337
+ const t = fe({}, e);
2338
+ let { data: n, withXSRFToken: o, xsrfHeaderName: r, xsrfCookieName: s, headers: a, auth: l } = t;
2339
+ t.headers = a = Q.from(a), t.url = cn(hn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && a.set(
2340
+ "Authorization",
2341
+ "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
2342
+ );
2343
+ let d;
2344
+ if (c.isFormData(n)) {
2345
+ if (W.hasStandardBrowserEnv || W.hasStandardBrowserWebWorkerEnv)
2346
+ a.setContentType(void 0);
2347
+ else if ((d = a.getContentType()) !== !1) {
2348
+ const [f, ...h] = d ? d.split(";").map((i) => i.trim()).filter(Boolean) : [];
2349
+ a.setContentType([f || "multipart/form-data", ...h].join("; "));
2350
+ }
2351
+ }
2352
+ if (W.hasStandardBrowserEnv && (o && c.isFunction(o) && (o = o(t)), o || o !== !1 && Hr(t.url))) {
2353
+ const f = r && s && Vr.read(s);
2354
+ f && a.set(r, f);
2355
+ }
2356
+ return t;
2357
+ }, Kr = typeof XMLHttpRequest < "u", Gr = Kr && function(e) {
2358
+ return new Promise(function(n, o) {
2359
+ const r = mn(e);
2360
+ let s = r.data;
2361
+ const a = Q.from(r.headers).normalize();
2362
+ let { responseType: l, onUploadProgress: d, onDownloadProgress: f } = r, h, i, R, S, b;
2363
+ function A() {
2364
+ S && S(), b && b(), r.cancelToken && r.cancelToken.unsubscribe(h), r.signal && r.signal.removeEventListener("abort", h);
2365
+ }
2366
+ let u = new XMLHttpRequest();
2367
+ u.open(r.method.toUpperCase(), r.url, !0), u.timeout = r.timeout;
2368
+ function p() {
2369
+ if (!u)
2370
+ return;
2371
+ const w = Q.from(
2372
+ "getAllResponseHeaders" in u && u.getAllResponseHeaders()
2373
+ ), m = {
2374
+ data: !l || l === "text" || l === "json" ? u.responseText : u.response,
2375
+ status: u.status,
2376
+ statusText: u.statusText,
2377
+ headers: w,
2378
+ config: e,
2379
+ request: u
2380
+ };
2381
+ pn(function(_) {
2382
+ n(_), A();
2383
+ }, function(_) {
2384
+ o(_), A();
2385
+ }, m), u = null;
2386
+ }
2387
+ "onloadend" in u ? u.onloadend = p : u.onreadystatechange = function() {
2388
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(p);
2389
+ }, u.onabort = function() {
2390
+ u && (o(new B("Request aborted", B.ECONNABORTED, e, u)), u = null);
2391
+ }, u.onerror = function() {
2392
+ o(new B("Network Error", B.ERR_NETWORK, e, u)), u = null;
2393
+ }, u.ontimeout = function() {
2394
+ let g = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
2395
+ const m = r.transitional || un;
2396
+ r.timeoutErrorMessage && (g = r.timeoutErrorMessage), o(new B(
2397
+ g,
2398
+ m.clarifyTimeoutError ? B.ETIMEDOUT : B.ECONNABORTED,
2399
+ e,
2400
+ u
2401
+ )), u = null;
2402
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in u && c.forEach(a.toJSON(), function(g, m) {
2403
+ u.setRequestHeader(m, g);
2404
+ }), c.isUndefined(r.withCredentials) || (u.withCredentials = !!r.withCredentials), l && l !== "json" && (u.responseType = r.responseType), f && ([R, b] = ze(f, !0), u.addEventListener("progress", R)), d && u.upload && ([i, S] = ze(d), u.upload.addEventListener("progress", i), u.upload.addEventListener("loadend", S)), (r.cancelToken || r.signal) && (h = (w) => {
2405
+ u && (o(!w || w.type ? new ge(null, e, u) : w), u.abort(), u = null);
2406
+ }, r.cancelToken && r.cancelToken.subscribe(h), r.signal && (r.signal.aborted ? h() : r.signal.addEventListener("abort", h)));
2407
+ const y = Mr(r.url);
2408
+ if (y && W.protocols.indexOf(y) === -1) {
2409
+ o(new B("Unsupported protocol " + y + ":", B.ERR_BAD_REQUEST, e));
2410
+ return;
2411
+ }
2412
+ u.send(s || null);
2413
+ });
2414
+ }, Xr = (e, t) => {
2415
+ const { length: n } = e = e ? e.filter(Boolean) : [];
2416
+ if (t || n) {
2417
+ let o = new AbortController(), r;
2418
+ const s = function(f) {
2419
+ if (!r) {
2420
+ r = !0, l();
2421
+ const h = f instanceof Error ? f : this.reason;
2422
+ o.abort(h instanceof B ? h : new ge(h instanceof Error ? h.message : h));
2423
+ }
2424
+ };
2425
+ let a = t && setTimeout(() => {
2426
+ a = null, s(new B(`timeout ${t} of ms exceeded`, B.ETIMEDOUT));
2427
+ }, t);
2428
+ const l = () => {
2429
+ e && (a && clearTimeout(a), a = null, e.forEach((f) => {
2430
+ f.unsubscribe ? f.unsubscribe(s) : f.removeEventListener("abort", s);
2431
+ }), e = null);
2432
+ };
2433
+ e.forEach((f) => f.addEventListener("abort", s));
2434
+ const { signal: d } = o;
2435
+ return d.unsubscribe = () => c.asap(l), d;
2436
+ }
2437
+ }, Zr = function* (e, t) {
2438
+ let n = e.byteLength;
2439
+ if (n < t) {
2440
+ yield e;
2441
+ return;
2442
+ }
2443
+ let o = 0, r;
2444
+ for (; o < n; )
2445
+ r = o + t, yield e.slice(o, r), o = r;
2446
+ }, Qr = async function* (e, t) {
2447
+ for await (const n of Yr(e))
2448
+ yield* Zr(n, t);
2449
+ }, Yr = async function* (e) {
2450
+ if (e[Symbol.asyncIterator]) {
2451
+ yield* e;
2452
+ return;
2453
+ }
2454
+ const t = e.getReader();
2455
+ try {
2456
+ for (; ; ) {
2457
+ const { done: n, value: o } = await t.read();
2458
+ if (n)
2459
+ break;
2460
+ yield o;
2461
+ }
2462
+ } finally {
2463
+ await t.cancel();
2464
+ }
2465
+ }, Lt = (e, t, n, o) => {
2466
+ const r = Qr(e, t);
2467
+ let s = 0, a, l = (d) => {
2468
+ a || (a = !0, o && o(d));
2469
+ };
2470
+ return new ReadableStream({
2471
+ async pull(d) {
2472
+ try {
2473
+ const { done: f, value: h } = await r.next();
2474
+ if (f) {
2475
+ l(), d.close();
2476
+ return;
2477
+ }
2478
+ let i = h.byteLength;
2479
+ if (n) {
2480
+ let R = s += i;
2481
+ n(R);
2482
+ }
2483
+ d.enqueue(new Uint8Array(h));
2484
+ } catch (f) {
2485
+ throw l(f), f;
2486
+ }
2487
+ },
2488
+ cancel(d) {
2489
+ return l(d), r.return();
2490
+ }
2491
+ }, {
2492
+ highWaterMark: 2
2493
+ });
2494
+ }, Qe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yn = Qe && typeof ReadableStream == "function", es = Qe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bn = (e, ...t) => {
2495
+ try {
2496
+ return !!e(...t);
2497
+ } catch {
2498
+ return !1;
2499
+ }
2500
+ }, ts = yn && bn(() => {
2501
+ let e = !1;
2502
+ const t = new Request(W.origin, {
2503
+ body: new ReadableStream(),
2504
+ method: "POST",
2505
+ get duplex() {
2506
+ return e = !0, "half";
2507
+ }
2508
+ }).headers.has("Content-Type");
2509
+ return e && !t;
2510
+ }), qt = 64 * 1024, it = yn && bn(() => c.isReadableStream(new Response("").body)), He = {
2511
+ stream: it && ((e) => e.body)
2512
+ };
2513
+ Qe && ((e) => {
2514
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2515
+ !He[t] && (He[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, o) => {
2516
+ throw new B(`Response type '${t}' is not supported`, B.ERR_NOT_SUPPORT, o);
2517
+ });
2518
+ });
2519
+ })(new Response());
2520
+ const ns = async (e) => {
2521
+ if (e == null)
2522
+ return 0;
2523
+ if (c.isBlob(e))
2524
+ return e.size;
2525
+ if (c.isSpecCompliantForm(e))
2526
+ return (await new Request(W.origin, {
2527
+ method: "POST",
2528
+ body: e
2529
+ }).arrayBuffer()).byteLength;
2530
+ if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
2531
+ return e.byteLength;
2532
+ if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
2533
+ return (await es(e)).byteLength;
2534
+ }, os = async (e, t) => {
2535
+ const n = c.toFiniteNumber(e.getContentLength());
2536
+ return n ?? ns(t);
2537
+ }, rs = Qe && (async (e) => {
2538
+ let {
2539
+ url: t,
2540
+ method: n,
2541
+ data: o,
2542
+ signal: r,
2543
+ cancelToken: s,
2544
+ timeout: a,
2545
+ onDownloadProgress: l,
2546
+ onUploadProgress: d,
2547
+ responseType: f,
2548
+ headers: h,
2549
+ withCredentials: i = "same-origin",
2550
+ fetchOptions: R
2551
+ } = mn(e);
2552
+ f = f ? (f + "").toLowerCase() : "text";
2553
+ let S = Xr([r, s && s.toAbortSignal()], a), b;
2554
+ const A = S && S.unsubscribe && (() => {
2555
+ S.unsubscribe();
2556
+ });
2557
+ let u;
2558
+ try {
2559
+ if (d && ts && n !== "get" && n !== "head" && (u = await os(h, o)) !== 0) {
2560
+ let m = new Request(t, {
2561
+ method: "POST",
2562
+ body: o,
2563
+ duplex: "half"
2564
+ }), k;
2565
+ if (c.isFormData(o) && (k = m.headers.get("content-type")) && h.setContentType(k), m.body) {
2566
+ const [_, O] = Ut(
2567
+ u,
2568
+ ze($t(d))
2569
+ );
2570
+ o = Lt(m.body, qt, _, O);
2571
+ }
2572
+ }
2573
+ c.isString(i) || (i = i ? "include" : "omit");
2574
+ const p = "credentials" in Request.prototype;
2575
+ b = new Request(t, {
2576
+ ...R,
2577
+ signal: S,
2578
+ method: n.toUpperCase(),
2579
+ headers: h.normalize().toJSON(),
2580
+ body: o,
2581
+ duplex: "half",
2582
+ credentials: p ? i : void 0
2583
+ });
2584
+ let y = await fetch(b);
2585
+ const w = it && (f === "stream" || f === "response");
2586
+ if (it && (l || w && A)) {
2587
+ const m = {};
2588
+ ["status", "statusText", "headers"].forEach((P) => {
2589
+ m[P] = y[P];
2590
+ });
2591
+ const k = c.toFiniteNumber(y.headers.get("content-length")), [_, O] = l && Ut(
2592
+ k,
2593
+ ze($t(l), !0)
2594
+ ) || [];
2595
+ y = new Response(
2596
+ Lt(y.body, qt, _, () => {
2597
+ O && O(), A && A();
2598
+ }),
2599
+ m
2600
+ );
2601
+ }
2602
+ f = f || "text";
2603
+ let g = await He[c.findKey(He, f) || "text"](y, e);
2604
+ return !w && A && A(), await new Promise((m, k) => {
2605
+ pn(m, k, {
2606
+ data: g,
2607
+ headers: Q.from(y.headers),
2608
+ status: y.status,
2609
+ statusText: y.statusText,
2610
+ config: e,
2611
+ request: b
2612
+ });
2613
+ });
2614
+ } catch (p) {
2615
+ throw A && A(), p && p.name === "TypeError" && /Load failed|fetch/i.test(p.message) ? Object.assign(
2616
+ new B("Network Error", B.ERR_NETWORK, e, b),
2617
+ {
2618
+ cause: p.cause || p
2619
+ }
2620
+ ) : B.from(p, p && p.code, e, b);
2621
+ }
2622
+ }), ct = {
2623
+ http: vr,
2624
+ xhr: Gr,
2625
+ fetch: rs
2626
+ };
2627
+ c.forEach(ct, (e, t) => {
2628
+ if (e) {
2629
+ try {
2630
+ Object.defineProperty(e, "name", { value: t });
2631
+ } catch {
2632
+ }
2633
+ Object.defineProperty(e, "adapterName", { value: t });
2634
+ }
2635
+ });
2636
+ const Mt = (e) => `- ${e}`, ss = (e) => c.isFunction(e) || e === null || e === !1, gn = {
2637
+ getAdapter: (e) => {
2638
+ e = c.isArray(e) ? e : [e];
2639
+ const { length: t } = e;
2640
+ let n, o;
2641
+ const r = {};
2642
+ for (let s = 0; s < t; s++) {
2643
+ n = e[s];
2644
+ let a;
2645
+ if (o = n, !ss(n) && (o = ct[(a = String(n)).toLowerCase()], o === void 0))
2646
+ throw new B(`Unknown adapter '${a}'`);
2647
+ if (o)
2648
+ break;
2649
+ r[a || "#" + s] = o;
2650
+ }
2651
+ if (!o) {
2652
+ const s = Object.entries(r).map(
2653
+ ([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
2654
+ );
2655
+ let a = t ? s.length > 1 ? `since :
2656
+ ` + s.map(Mt).join(`
2657
+ `) : " " + Mt(s[0]) : "as no adapter specified";
2658
+ throw new B(
2659
+ "There is no suitable adapter to dispatch the request " + a,
2660
+ "ERR_NOT_SUPPORT"
2661
+ );
2662
+ }
2663
+ return o;
2664
+ },
2665
+ adapters: ct
2666
+ };
2667
+ function ot(e) {
2668
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2669
+ throw new ge(null, e);
2670
+ }
2671
+ function Jt(e) {
2672
+ return ot(e), e.headers = Q.from(e.headers), e.data = nt.call(
2673
+ e,
2674
+ e.transformRequest
2675
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gn.getAdapter(e.adapter || Fe.adapter)(e).then(function(o) {
2676
+ return ot(e), o.data = nt.call(
2677
+ e,
2678
+ e.transformResponse,
2679
+ o
2680
+ ), o.headers = Q.from(o.headers), o;
2681
+ }, function(o) {
2682
+ return dn(o) || (ot(e), o && o.response && (o.response.data = nt.call(
2683
+ e,
2684
+ e.transformResponse,
2685
+ o.response
2686
+ ), o.response.headers = Q.from(o.response.headers))), Promise.reject(o);
2687
+ });
2688
+ }
2689
+ const vn = "1.9.0", Ye = {};
2690
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2691
+ Ye[e] = function(o) {
2692
+ return typeof o === e || "a" + (t < 1 ? "n " : " ") + e;
2693
+ };
2694
+ });
2695
+ const zt = {};
2696
+ Ye.transitional = function(t, n, o) {
2697
+ function r(s, a) {
2698
+ return "[Axios v" + vn + "] Transitional option '" + s + "'" + a + (o ? ". " + o : "");
2699
+ }
2700
+ return (s, a, l) => {
2701
+ if (t === !1)
2702
+ throw new B(
2703
+ r(a, " has been removed" + (n ? " in " + n : "")),
2704
+ B.ERR_DEPRECATED
2705
+ );
2706
+ return n && !zt[a] && (zt[a] = !0, console.warn(
2707
+ r(
2708
+ a,
2709
+ " has been deprecated since v" + n + " and will be removed in the near future"
2710
+ )
2711
+ )), t ? t(s, a, l) : !0;
2712
+ };
2713
+ };
2714
+ Ye.spelling = function(t) {
2715
+ return (n, o) => (console.warn(`${o} is likely a misspelling of ${t}`), !0);
2716
+ };
2717
+ function as(e, t, n) {
2718
+ if (typeof e != "object")
2719
+ throw new B("options must be an object", B.ERR_BAD_OPTION_VALUE);
2720
+ const o = Object.keys(e);
2721
+ let r = o.length;
2722
+ for (; r-- > 0; ) {
2723
+ const s = o[r], a = t[s];
2724
+ if (a) {
2725
+ const l = e[s], d = l === void 0 || a(l, s, e);
2726
+ if (d !== !0)
2727
+ throw new B("option " + s + " must be " + d, B.ERR_BAD_OPTION_VALUE);
2728
+ continue;
2729
+ }
2730
+ if (n !== !0)
2731
+ throw new B("Unknown option " + s, B.ERR_BAD_OPTION);
2732
+ }
2733
+ }
2734
+ const Je = {
2735
+ assertOptions: as,
2736
+ validators: Ye
2737
+ }, ne = Je.validators;
2738
+ let ce = class {
2739
+ constructor(t) {
2740
+ this.defaults = t || {}, this.interceptors = {
2741
+ request: new Pt(),
2742
+ response: new Pt()
2743
+ };
2744
+ }
2745
+ /**
2746
+ * Dispatch a request
2747
+ *
2748
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2749
+ * @param {?Object} config
2750
+ *
2751
+ * @returns {Promise} The Promise to be fulfilled
2752
+ */
2753
+ async request(t, n) {
2754
+ try {
2755
+ return await this._request(t, n);
2756
+ } catch (o) {
2757
+ if (o instanceof Error) {
2758
+ let r = {};
2759
+ Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
2760
+ const s = r.stack ? r.stack.replace(/^.+\n/, "") : "";
2761
+ try {
2762
+ o.stack ? s && !String(o.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (o.stack += `
2763
+ ` + s) : o.stack = s;
2764
+ } catch {
2765
+ }
2766
+ }
2767
+ throw o;
2768
+ }
2769
+ }
2770
+ _request(t, n) {
2771
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = fe(this.defaults, n);
2772
+ const { transitional: o, paramsSerializer: r, headers: s } = n;
2773
+ o !== void 0 && Je.assertOptions(o, {
2774
+ silentJSONParsing: ne.transitional(ne.boolean),
2775
+ forcedJSONParsing: ne.transitional(ne.boolean),
2776
+ clarifyTimeoutError: ne.transitional(ne.boolean)
2777
+ }, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
2778
+ serialize: r
2779
+ } : Je.assertOptions(r, {
2780
+ encode: ne.function,
2781
+ serialize: ne.function
2782
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Je.assertOptions(n, {
2783
+ baseUrl: ne.spelling("baseURL"),
2784
+ withXsrfToken: ne.spelling("withXSRFToken")
2785
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2786
+ let a = s && c.merge(
2787
+ s.common,
2788
+ s[n.method]
2789
+ );
2790
+ s && c.forEach(
2791
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2792
+ (b) => {
2793
+ delete s[b];
2794
+ }
2795
+ ), n.headers = Q.concat(a, s);
2796
+ const l = [];
2797
+ let d = !0;
2798
+ this.interceptors.request.forEach(function(A) {
2799
+ typeof A.runWhen == "function" && A.runWhen(n) === !1 || (d = d && A.synchronous, l.unshift(A.fulfilled, A.rejected));
2800
+ });
2801
+ const f = [];
2802
+ this.interceptors.response.forEach(function(A) {
2803
+ f.push(A.fulfilled, A.rejected);
2804
+ });
2805
+ let h, i = 0, R;
2806
+ if (!d) {
2807
+ const b = [Jt.bind(this), void 0];
2808
+ for (b.unshift.apply(b, l), b.push.apply(b, f), R = b.length, h = Promise.resolve(n); i < R; )
2809
+ h = h.then(b[i++], b[i++]);
2810
+ return h;
2811
+ }
2812
+ R = l.length;
2813
+ let S = n;
2814
+ for (i = 0; i < R; ) {
2815
+ const b = l[i++], A = l[i++];
2816
+ try {
2817
+ S = b(S);
2818
+ } catch (u) {
2819
+ A.call(this, u);
2820
+ break;
2821
+ }
2822
+ }
2823
+ try {
2824
+ h = Jt.call(this, S);
2825
+ } catch (b) {
2826
+ return Promise.reject(b);
2827
+ }
2828
+ for (i = 0, R = f.length; i < R; )
2829
+ h = h.then(f[i++], f[i++]);
2830
+ return h;
2831
+ }
2832
+ getUri(t) {
2833
+ t = fe(this.defaults, t);
2834
+ const n = hn(t.baseURL, t.url, t.allowAbsoluteUrls);
2835
+ return cn(n, t.params, t.paramsSerializer);
2836
+ }
2837
+ };
2838
+ c.forEach(["delete", "get", "head", "options"], function(t) {
2839
+ ce.prototype[t] = function(n, o) {
2840
+ return this.request(fe(o || {}, {
2841
+ method: t,
2842
+ url: n,
2843
+ data: (o || {}).data
2844
+ }));
2845
+ };
2846
+ });
2847
+ c.forEach(["post", "put", "patch"], function(t) {
2848
+ function n(o) {
2849
+ return function(s, a, l) {
2850
+ return this.request(fe(l || {}, {
2851
+ method: t,
2852
+ headers: o ? {
2853
+ "Content-Type": "multipart/form-data"
2854
+ } : {},
2855
+ url: s,
2856
+ data: a
2857
+ }));
2858
+ };
2859
+ }
2860
+ ce.prototype[t] = n(), ce.prototype[t + "Form"] = n(!0);
2861
+ });
2862
+ let ls = class wn {
2863
+ constructor(t) {
2864
+ if (typeof t != "function")
2865
+ throw new TypeError("executor must be a function.");
2866
+ let n;
2867
+ this.promise = new Promise(function(s) {
2868
+ n = s;
2869
+ });
2870
+ const o = this;
2871
+ this.promise.then((r) => {
2872
+ if (!o._listeners) return;
2873
+ let s = o._listeners.length;
2874
+ for (; s-- > 0; )
2875
+ o._listeners[s](r);
2876
+ o._listeners = null;
2877
+ }), this.promise.then = (r) => {
2878
+ let s;
2879
+ const a = new Promise((l) => {
2880
+ o.subscribe(l), s = l;
2881
+ }).then(r);
2882
+ return a.cancel = function() {
2883
+ o.unsubscribe(s);
2884
+ }, a;
2885
+ }, t(function(s, a, l) {
2886
+ o.reason || (o.reason = new ge(s, a, l), n(o.reason));
2887
+ });
2888
+ }
2889
+ /**
2890
+ * Throws a `CanceledError` if cancellation has been requested.
2891
+ */
2892
+ throwIfRequested() {
2893
+ if (this.reason)
2894
+ throw this.reason;
2895
+ }
2896
+ /**
2897
+ * Subscribe to the cancel signal
2898
+ */
2899
+ subscribe(t) {
2900
+ if (this.reason) {
2901
+ t(this.reason);
2902
+ return;
2903
+ }
2904
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
2905
+ }
2906
+ /**
2907
+ * Unsubscribe from the cancel signal
2908
+ */
2909
+ unsubscribe(t) {
2910
+ if (!this._listeners)
2911
+ return;
2912
+ const n = this._listeners.indexOf(t);
2913
+ n !== -1 && this._listeners.splice(n, 1);
2914
+ }
2915
+ toAbortSignal() {
2916
+ const t = new AbortController(), n = (o) => {
2917
+ t.abort(o);
2918
+ };
2919
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2920
+ }
2921
+ /**
2922
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2923
+ * cancels the `CancelToken`.
2924
+ */
2925
+ static source() {
2926
+ let t;
2927
+ return {
2928
+ token: new wn(function(r) {
2929
+ t = r;
2930
+ }),
2931
+ cancel: t
2932
+ };
2933
+ }
2934
+ };
2935
+ function is(e) {
2936
+ return function(n) {
2937
+ return e.apply(null, n);
2938
+ };
2939
+ }
2940
+ function cs(e) {
2941
+ return c.isObject(e) && e.isAxiosError === !0;
2942
+ }
2943
+ const ut = {
2944
+ Continue: 100,
2945
+ SwitchingProtocols: 101,
2946
+ Processing: 102,
2947
+ EarlyHints: 103,
2948
+ Ok: 200,
2949
+ Created: 201,
2950
+ Accepted: 202,
2951
+ NonAuthoritativeInformation: 203,
2952
+ NoContent: 204,
2953
+ ResetContent: 205,
2954
+ PartialContent: 206,
2955
+ MultiStatus: 207,
2956
+ AlreadyReported: 208,
2957
+ ImUsed: 226,
2958
+ MultipleChoices: 300,
2959
+ MovedPermanently: 301,
2960
+ Found: 302,
2961
+ SeeOther: 303,
2962
+ NotModified: 304,
2963
+ UseProxy: 305,
2964
+ Unused: 306,
2965
+ TemporaryRedirect: 307,
2966
+ PermanentRedirect: 308,
2967
+ BadRequest: 400,
2968
+ Unauthorized: 401,
2969
+ PaymentRequired: 402,
2970
+ Forbidden: 403,
2971
+ NotFound: 404,
2972
+ MethodNotAllowed: 405,
2973
+ NotAcceptable: 406,
2974
+ ProxyAuthenticationRequired: 407,
2975
+ RequestTimeout: 408,
2976
+ Conflict: 409,
2977
+ Gone: 410,
2978
+ LengthRequired: 411,
2979
+ PreconditionFailed: 412,
2980
+ PayloadTooLarge: 413,
2981
+ UriTooLong: 414,
2982
+ UnsupportedMediaType: 415,
2983
+ RangeNotSatisfiable: 416,
2984
+ ExpectationFailed: 417,
2985
+ ImATeapot: 418,
2986
+ MisdirectedRequest: 421,
2987
+ UnprocessableEntity: 422,
2988
+ Locked: 423,
2989
+ FailedDependency: 424,
2990
+ TooEarly: 425,
2991
+ UpgradeRequired: 426,
2992
+ PreconditionRequired: 428,
2993
+ TooManyRequests: 429,
2994
+ RequestHeaderFieldsTooLarge: 431,
2995
+ UnavailableForLegalReasons: 451,
2996
+ InternalServerError: 500,
2997
+ NotImplemented: 501,
2998
+ BadGateway: 502,
2999
+ ServiceUnavailable: 503,
3000
+ GatewayTimeout: 504,
3001
+ HttpVersionNotSupported: 505,
3002
+ VariantAlsoNegotiates: 506,
3003
+ InsufficientStorage: 507,
3004
+ LoopDetected: 508,
3005
+ NotExtended: 510,
3006
+ NetworkAuthenticationRequired: 511
3007
+ };
3008
+ Object.entries(ut).forEach(([e, t]) => {
3009
+ ut[t] = e;
3010
+ });
3011
+ function kn(e) {
3012
+ const t = new ce(e), n = Xt(ce.prototype.request, t);
3013
+ return c.extend(n, ce.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
3014
+ return kn(fe(e, r));
3015
+ }, n;
3016
+ }
3017
+ const H = kn(Fe);
3018
+ H.Axios = ce;
3019
+ H.CanceledError = ge;
3020
+ H.CancelToken = ls;
3021
+ H.isCancel = dn;
3022
+ H.VERSION = vn;
3023
+ H.toFormData = Ze;
3024
+ H.AxiosError = B;
3025
+ H.Cancel = H.CanceledError;
3026
+ H.all = function(t) {
3027
+ return Promise.all(t);
3028
+ };
3029
+ H.spread = is;
3030
+ H.isAxiosError = cs;
3031
+ H.mergeConfig = fe;
3032
+ H.AxiosHeaders = Q;
3033
+ H.formToJSON = (e) => fn(c.isHTMLForm(e) ? new FormData(e) : e);
3034
+ H.getAdapter = gn.getAdapter;
3035
+ H.HttpStatusCode = ut;
3036
+ H.default = H;
3037
+ const {
3038
+ Axios: Os,
3039
+ AxiosError: Ts,
3040
+ CanceledError: As,
3041
+ isCancel: xs,
3042
+ CancelToken: Ds,
3043
+ VERSION: Ns,
3044
+ all: Fs,
3045
+ Cancel: Ps,
3046
+ isAxiosError: Bs,
3047
+ spread: Us,
3048
+ toFormData: $s,
3049
+ AxiosHeaders: js,
3050
+ HttpStatusCode: Ls,
3051
+ formToJSON: qs,
3052
+ getAdapter: Ms,
3053
+ mergeConfig: Js
3054
+ } = H;
3055
+ /*! js-cookie v3.0.5 | MIT */
3056
+ function je(e) {
3057
+ for (var t = 1; t < arguments.length; t++) {
3058
+ var n = arguments[t];
3059
+ for (var o in n)
3060
+ e[o] = n[o];
3061
+ }
3062
+ return e;
3063
+ }
3064
+ var us = {
3065
+ read: function(e) {
3066
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3067
+ },
3068
+ write: function(e) {
3069
+ return encodeURIComponent(e).replace(
3070
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3071
+ decodeURIComponent
3072
+ );
3073
+ }
3074
+ };
3075
+ function ft(e, t) {
3076
+ function n(r, s, a) {
3077
+ if (!(typeof document > "u")) {
3078
+ a = je({}, t, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires && (a.expires = a.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3079
+ var l = "";
3080
+ for (var d in a)
3081
+ a[d] && (l += "; " + d, a[d] !== !0 && (l += "=" + a[d].split(";")[0]));
3082
+ return document.cookie = r + "=" + e.write(s, r) + l;
3083
+ }
3084
+ }
3085
+ function o(r) {
3086
+ if (!(typeof document > "u" || arguments.length && !r)) {
3087
+ for (var s = document.cookie ? document.cookie.split("; ") : [], a = {}, l = 0; l < s.length; l++) {
3088
+ var d = s[l].split("="), f = d.slice(1).join("=");
3089
+ try {
3090
+ var h = decodeURIComponent(d[0]);
3091
+ if (a[h] = e.read(f, h), r === h)
3092
+ break;
3093
+ } catch {
3094
+ }
3095
+ }
3096
+ return r ? a[r] : a;
3097
+ }
3098
+ }
3099
+ return Object.create(
3100
+ {
3101
+ set: n,
3102
+ get: o,
3103
+ remove: function(r, s) {
3104
+ n(
3105
+ r,
3106
+ "",
3107
+ je({}, s, {
3108
+ expires: -1
3109
+ })
3110
+ );
3111
+ },
3112
+ withAttributes: function(r) {
3113
+ return ft(this.converter, je({}, this.attributes, r));
3114
+ },
3115
+ withConverter: function(r) {
3116
+ return ft(je({}, this.converter, r), this.attributes);
3117
+ }
3118
+ },
3119
+ {
3120
+ attributes: { value: Object.freeze(t) },
3121
+ converter: { value: Object.freeze(e) }
3122
+ }
3123
+ );
3124
+ }
3125
+ ft(us, { path: "/" });
3126
+ const ue = {
3127
+ // 查看 v2.4.3版本更新日志
3128
+ setKey(e) {
3129
+ return `ss-component-new:${e}`;
3130
+ },
3131
+ // 设置永久缓存
3132
+ set(e, t) {
3133
+ window.localStorage.setItem(ue.setKey(e), JSON.stringify(t));
3134
+ },
3135
+ // 获取永久缓存
3136
+ get(e) {
3137
+ let t = window.localStorage.getItem(ue.setKey(e));
3138
+ return JSON.parse(t);
3139
+ },
3140
+ // 移除永久缓存
3141
+ remove(e) {
3142
+ window.localStorage.removeItem(ue.setKey(e));
3143
+ },
3144
+ // 移除全部永久缓存
3145
+ clear() {
3146
+ window.localStorage.clear();
3147
+ }
3148
+ }, En = /* @__PURE__ */ new Map();
3149
+ console.log("import.meta.env.VITE_API_URL", "http://139.196.154.85:20013");
3150
+ const gt = H.create({
3151
+ baseURL: "http://139.196.154.85:20013",
3152
+ timeout: 5e4
3153
+ //headers: { 'Content-Type': 'application/json' }, 这个会导致生成代码的上传文件 file为空
3154
+ }), Ve = "access-token", dt = `x-${Ve}`;
3155
+ gt.interceptors.request.use(
3156
+ (e) => {
3157
+ var r;
3158
+ const t = new AbortController();
3159
+ e.signal = t.signal;
3160
+ const n = e.url || "";
3161
+ En.set(n, t);
3162
+ const o = ue.get(Ve);
3163
+ if (o) {
3164
+ e.headers.Authorization = `Bearer ${o}`;
3165
+ const s = ds(o), a = ps(s.exp);
3166
+ if (/* @__PURE__ */ new Date() >= a) {
3167
+ const l = ue.get(dt);
3168
+ l && (e.headers["X-Authorization"] = `Bearer ${l}`);
3169
+ }
3170
+ if (((r = e.method) == null ? void 0 : r.toLowerCase()) === "get" && e.data) {
3171
+ let l = e.url + "?" + fs(e.data);
3172
+ l = l.slice(0, -1), e.data = {}, e.url = l;
3173
+ }
3174
+ }
3175
+ return e;
3176
+ },
3177
+ (e) => Promise.reject(e)
3178
+ );
3179
+ gt.interceptors.response.use(
3180
+ (e) => {
3181
+ const t = e.config.url || "";
3182
+ En.delete(t);
3183
+ var n = e.status, o = e.data;
3184
+ if (n === 401)
3185
+ throw new Error(e.statusText || "Request Error.");
3186
+ if (n >= 400)
3187
+ throw new Error(e.statusText || "Request Error.");
3188
+ if (o && o.hasOwnProperty("errors") && o.errors)
3189
+ throw new Error(JSON.stringify(o.errors || "Request Error."));
3190
+ var r = e.headers[Ve], s = e.headers[dt];
3191
+ if (r === "invalid_token")
3192
+ throw new Error(e.statusText || "Request Error.");
3193
+ if (s && r && (ue.set(Ve, r), ue.set(dt, s)), o.code === 401)
3194
+ throw new Error(e.statusText || "Request Error.");
3195
+ if (o.code === void 0)
3196
+ return Promise.resolve(e);
3197
+ if (o.code !== 200) {
3198
+ var a;
3199
+ throw o.message && typeof o.message == "object" ? a = JSON.stringify(o.message) : a = o.message, _e({
3200
+ dangerouslyUseHTMLString: !0,
3201
+ message: a,
3202
+ type: "error"
3203
+ }), new Error(a);
3204
+ }
3205
+ return e;
3206
+ },
3207
+ (e) => {
3208
+ var t, n;
3209
+ if (e.response && e.response.status === 401)
3210
+ throw new Error(res.statusText || "Request Error.");
3211
+ return e.message.indexOf("timeout") != -1 ? _e.error("网络超时") : e.message == "Network Error" ? _e.error("网络连接错误") : (t = e.response) != null && t.data ? _e.error((n = e.response) == null ? void 0 : n.statusText) : _e.error("接口路径找不到"), Promise.reject(e);
3212
+ }
3213
+ );
3214
+ function fs(e) {
3215
+ let t = "";
3216
+ for (const r of Object.keys(e)) {
3217
+ const s = e[r];
3218
+ var n = encodeURIComponent(r) + "=";
3219
+ if (s !== null && s !== "" && typeof s < "u")
3220
+ if (typeof s == "object") {
3221
+ for (const a of Object.keys(s))
3222
+ if (s[a] !== null && s[a] !== "" && typeof s[a] < "u") {
3223
+ let l = r + "[" + a + "]";
3224
+ var o = encodeURIComponent(l) + "=";
3225
+ t += o + encodeURIComponent(s[a]) + "&";
3226
+ }
3227
+ } else
3228
+ t += n + encodeURIComponent(s) + "&";
3229
+ }
3230
+ return t;
3231
+ }
3232
+ function ds(e) {
3233
+ e = e.replace(/_/g, "/").replace(/-/g, "+");
3234
+ var t = decodeURIComponent(escape(window.atob(e.split(".")[1])));
3235
+ return JSON.parse(t);
3236
+ }
3237
+ function ps(e) {
3238
+ return new Date(e * 1e3);
3239
+ }
3240
+ function hs(e) {
3241
+ return gt({
3242
+ url: "/api/insofData/get",
3243
+ method: "post",
3244
+ data: e
3245
+ });
3246
+ }
3247
+ const ms = Nn(de), { systemKey: Cn, activeMenuPath: _n } = De(ms), rt = U(0), zs = (e) => e.reduce((n, o) => {
3248
+ var s;
3249
+ const r = Object.values(n);
3250
+ return (((s = Object.keys(n)) == null ? void 0 : s.length) === 0 || r[r.length - 1].length >= (o == null ? void 0 : o.width)) && (n[rt.value] = [], rt.value++), n[rt.value - 1].push(o), n;
3251
+ }, {}), ys = (e) => {
3252
+ const t = `${Cn.value}/${_n.value}`;
3253
+ hs({
3254
+ key: {
3255
+ compKey: t
3256
+ }
3257
+ }).then((n) => {
3258
+ var o, r, s, a, l, d, f, h, i;
3259
+ if (((o = n == null ? void 0 : n.data) == null ? void 0 : o.code) === 200 && (r = n.data) != null && r.result && ((a = (s = n.data) == null ? void 0 : s.result) == null ? void 0 : a.length) > 0) {
3260
+ const R = (h = (f = (d = (l = n.data) == null ? void 0 : l.result[0]) == null ? void 0 : d.value.compData) == null ? void 0 : f.find((b) => b.comp === "Table")) == null ? void 0 : h.compData, S = R && ((i = R == null ? void 0 : R.find((b) => b.key === "tableContents")) == null ? void 0 : i.contents);
3261
+ return console.log("verifySubmitTypeByQuery", R, S, e), S == null ? void 0 : S.find((b) => b.id == e);
3262
+ }
3263
+ });
3264
+ }, Hs = (e, t) => {
3265
+ const n = `${Cn.value}/${_n.value}`, o = ys(675214142873669);
3266
+ console.log("submitData", e, n, t, o);
3267
+ };
3268
+ export {
3269
+ Cs as a,
3270
+ Es as b,
3271
+ zs as c,
3272
+ _s as e,
3273
+ Wt as g,
3274
+ ks as m,
3275
+ de as p,
3276
+ Hs as s,
3277
+ It as u
3278
+ };