ss-component-new 1.1.30 → 1.1.32

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