@das-fed/utils 1.0.0 → 1.0.2
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.
- package/api-services/index.js +6840 -19720
- package/api-services/modules/app-manage.js +6966 -6
- package/api-services/modules/authentication.js +6966 -6
- package/api-services/modules/bems.js +6970 -11
- package/api-services/modules/contract.js +6966 -6
- package/api-services/modules/duty-manage.js +6970 -10
- package/api-services/modules/enterpriseright.js +6966 -6
- package/api-services/modules/file.js +7108 -353
- package/api-services/modules/gateway-edge.js +6966 -6
- package/api-services/modules/index.js +7163 -437
- package/api-services/modules/iot.js +6979 -19
- package/api-services/modules/justauth.js +6967 -7
- package/api-services/modules/knowledge.js +6966 -6
- package/api-services/modules/link.js +6966 -6
- package/api-services/modules/permission.js +6966 -6
- package/api-services/modules/platformManage.js +6974 -14
- package/api-services/modules/portal.js +6966 -6
- package/api-services/modules/space-manage.js +6966 -6
- package/api-services/modules/super-admin.js +6969 -9
- package/api-services/modules/supplier.js +6968 -8
- package/api-services/modules/supplychain-manage.js +6966 -6
- package/api-services/modules/systemConfiguration.js +6966 -6
- package/api-services/modules/tool.js +6966 -6
- package/api-services/src/create-service.js +6840 -19720
- package/api-services/src/sso.js +1711 -157
- package/api-services/src/util.js +1466 -19
- package/atob/index.js +9 -10
- package/common-info/getIframeUrl.js +14 -11
- package/common-info/index.js +194 -269
- package/common-info/setInfoFromUrl.js +60 -128
- package/common-tools/arr-tools.js +6 -13
- package/common-tools/date-format.js +18 -21
- package/common-tools/get-url-params.js +47 -88
- package/common-tools/handle-data.js +3 -4
- package/common-tools/index.js +108 -204
- package/common-tools/nest-tree-format.js +22 -49
- package/common-tools/obj-tools.js +17 -18
- package/common-tools/setHtmlMinWH.js +6 -10
- package/common-tools/throttled.js +7 -16
- package/config/index.js +8 -25
- package/curring-http/index.js +5150 -17289
- package/directive/auth.js +205 -97
- package/directive/clickOutside.js +25 -49
- package/directive/hoverInside.js +18 -35
- package/directive/index.js +238 -159
- package/directive/utils.js +6 -11
- package/dom-check-in/index.js +7 -15
- package/dom-watcher/index.js +7 -8
- package/hooks/popup-manager/use-zindex.js +17 -36
- package/index.js +242 -191
- package/load-js/index.js +14 -20
- package/oss/index.js +15 -15
- package/package.json +7 -11
- package/pinyin-first-character/index.js +25011 -12217
- package/process-engine-info/index.js +8 -10
- package/pure-image-src/index.js +3 -29
- package/set-personal-info/index.js +1566 -16
- package/size-watcher/index.js +17 -24
- package/style/index.js +62 -103
- package/style/math.js +16 -31
- package/style/style.js +49 -72
- package/token-tools/index.js +1594 -152
- package/vue/hooks/use-model-value.js +9 -10
- package/vue/index.js +9 -10
- package/webSocket-service/index.js +162 -135
- package/with-install/index.js +5 -7
|
@@ -1,24 +1,1574 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ref as Me } from "vue";
|
|
2
|
+
function be(e, t) {
|
|
3
|
+
return function() {
|
|
4
|
+
return e.apply(t, arguments);
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
const { toString: ze } = Object.prototype, { getPrototypeOf: te } = Object, H = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = ze.call(t);
|
|
9
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), g = (e) => (e = e.toLowerCase(), (t) => H(t) === e), q = (e) => (t) => typeof t === e, { isArray: P } = Array, F = q("undefined");
|
|
11
|
+
function Je(e) {
|
|
12
|
+
return e !== null && !F(e) && e.constructor !== null && !F(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
|
+
}
|
|
14
|
+
const Se = g("ArrayBuffer");
|
|
15
|
+
function $e(e) {
|
|
16
|
+
let t;
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Se(e.buffer), t;
|
|
18
|
+
}
|
|
19
|
+
const ve = q("string"), R = q("function"), Re = q("number"), M = (e) => e !== null && typeof e == "object", Ve = (e) => e === !0 || e === !1, L = (e) => {
|
|
20
|
+
if (H(e) !== "object")
|
|
21
|
+
return !1;
|
|
22
|
+
const t = te(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
24
|
+
}, We = g("Date"), Ke = g("File"), Ge = g("Blob"), Xe = g("FileList"), Qe = (e) => M(e) && R(e.pipe), Ze = (e) => {
|
|
25
|
+
let t;
|
|
26
|
+
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = H(e)) === "formdata" || // detect form-data instance
|
|
27
|
+
t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
|
|
28
|
+
}, Ye = g("URLSearchParams"), et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
29
|
+
function B(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
30
|
+
if (e === null || typeof e > "u")
|
|
31
|
+
return;
|
|
32
|
+
let r, s;
|
|
33
|
+
if (typeof e != "object" && (e = [e]), P(e))
|
|
34
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
35
|
+
t.call(null, e[r], r, e);
|
|
36
|
+
else {
|
|
37
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
38
|
+
let c;
|
|
39
|
+
for (r = 0; r < o; r++)
|
|
40
|
+
c = i[r], t.call(null, e[c], c, e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function Oe(e, t) {
|
|
44
|
+
t = t.toLowerCase();
|
|
45
|
+
const n = Object.keys(e);
|
|
46
|
+
let r = n.length, s;
|
|
47
|
+
for (; r-- > 0; )
|
|
48
|
+
if (s = n[r], t === s.toLowerCase())
|
|
49
|
+
return s;
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ae = (e) => !F(e) && e !== ge;
|
|
53
|
+
function K() {
|
|
54
|
+
const { caseless: e } = Ae(this) && this || {}, t = {}, n = (r, s) => {
|
|
55
|
+
const i = e && Oe(t, s) || s;
|
|
56
|
+
L(t[i]) && L(r) ? t[i] = K(t[i], r) : L(r) ? t[i] = K({}, r) : P(r) ? t[i] = r.slice() : t[i] = r;
|
|
57
|
+
};
|
|
58
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
59
|
+
arguments[r] && B(arguments[r], n);
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
const tt = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
|
|
63
|
+
n && R(s) ? e[i] = be(s, n) : e[i] = s;
|
|
64
|
+
}, { allOwnKeys: r }), e), nt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), rt = (e, t, n, r) => {
|
|
65
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
66
|
+
value: t.prototype
|
|
67
|
+
}), n && Object.assign(e.prototype, n);
|
|
68
|
+
}, st = (e, t, n, r) => {
|
|
69
|
+
let s, i, o;
|
|
70
|
+
const c = {};
|
|
71
|
+
if (t = t || {}, e == null)
|
|
72
|
+
return t;
|
|
73
|
+
do {
|
|
74
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
75
|
+
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
76
|
+
e = n !== !1 && te(e);
|
|
77
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
78
|
+
return t;
|
|
79
|
+
}, ot = (e, t, n) => {
|
|
80
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
81
|
+
const r = e.indexOf(t, n);
|
|
82
|
+
return r !== -1 && r === n;
|
|
83
|
+
}, it = (e) => {
|
|
84
|
+
if (!e)
|
|
85
|
+
return null;
|
|
86
|
+
if (P(e))
|
|
87
|
+
return e;
|
|
88
|
+
let t = e.length;
|
|
89
|
+
if (!Re(t))
|
|
90
|
+
return null;
|
|
91
|
+
const n = new Array(t);
|
|
92
|
+
for (; t-- > 0; )
|
|
93
|
+
n[t] = e[t];
|
|
94
|
+
return n;
|
|
95
|
+
}, at = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && te(Uint8Array)), ct = (e, t) => {
|
|
96
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
97
|
+
let s;
|
|
98
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
99
|
+
const i = s.value;
|
|
100
|
+
t.call(e, i[0], i[1]);
|
|
101
|
+
}
|
|
102
|
+
}, ut = (e, t) => {
|
|
103
|
+
let n;
|
|
104
|
+
const r = [];
|
|
105
|
+
for (; (n = e.exec(t)) !== null; )
|
|
106
|
+
r.push(n);
|
|
107
|
+
return r;
|
|
108
|
+
}, lt = g("HTMLFormElement"), ft = (e) => e.toLowerCase().replace(
|
|
109
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
110
|
+
function(n, r, s) {
|
|
111
|
+
return r.toUpperCase() + s;
|
|
112
|
+
}
|
|
113
|
+
), ce = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), dt = g("RegExp"), Te = (e, t) => {
|
|
114
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
115
|
+
B(n, (s, i) => {
|
|
116
|
+
let o;
|
|
117
|
+
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
118
|
+
}), Object.defineProperties(e, r);
|
|
119
|
+
}, pt = (e) => {
|
|
120
|
+
Te(e, (t, n) => {
|
|
121
|
+
if (R(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
|
+
return !1;
|
|
123
|
+
const r = e[n];
|
|
124
|
+
if (R(r)) {
|
|
125
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
126
|
+
t.writable = !1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
t.set || (t.set = () => {
|
|
130
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}, ht = (e, t) => {
|
|
135
|
+
const n = {}, r = (s) => {
|
|
136
|
+
s.forEach((i) => {
|
|
137
|
+
n[i] = !0;
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
return P(e) ? r(e) : r(String(e).split(t)), n;
|
|
141
|
+
}, mt = () => {
|
|
142
|
+
}, yt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), $ = "abcdefghijklmnopqrstuvwxyz", ue = "0123456789", Ce = {
|
|
143
|
+
DIGIT: ue,
|
|
144
|
+
ALPHA: $,
|
|
145
|
+
ALPHA_DIGIT: $ + $.toUpperCase() + ue
|
|
146
|
+
}, wt = (e = 16, t = Ce.ALPHA_DIGIT) => {
|
|
147
|
+
let n = "";
|
|
148
|
+
const { length: r } = t;
|
|
149
|
+
for (; e--; )
|
|
150
|
+
n += t[Math.random() * r | 0];
|
|
151
|
+
return n;
|
|
152
|
+
};
|
|
153
|
+
function Et(e) {
|
|
154
|
+
return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
|
+
}
|
|
156
|
+
const bt = (e) => {
|
|
157
|
+
const t = new Array(10), n = (r, s) => {
|
|
158
|
+
if (M(r)) {
|
|
159
|
+
if (t.indexOf(r) >= 0)
|
|
160
|
+
return;
|
|
161
|
+
if (!("toJSON" in r)) {
|
|
162
|
+
t[s] = r;
|
|
163
|
+
const i = P(r) ? [] : {};
|
|
164
|
+
return B(r, (o, c) => {
|
|
165
|
+
const f = n(o, s + 1);
|
|
166
|
+
!F(f) && (i[c] = f);
|
|
167
|
+
}), t[s] = void 0, i;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return r;
|
|
171
|
+
};
|
|
172
|
+
return n(e, 0);
|
|
173
|
+
}, St = g("AsyncFunction"), Rt = (e) => e && (M(e) || R(e)) && R(e.then) && R(e.catch), a = {
|
|
174
|
+
isArray: P,
|
|
175
|
+
isArrayBuffer: Se,
|
|
176
|
+
isBuffer: Je,
|
|
177
|
+
isFormData: Ze,
|
|
178
|
+
isArrayBufferView: $e,
|
|
179
|
+
isString: ve,
|
|
180
|
+
isNumber: Re,
|
|
181
|
+
isBoolean: Ve,
|
|
182
|
+
isObject: M,
|
|
183
|
+
isPlainObject: L,
|
|
184
|
+
isUndefined: F,
|
|
185
|
+
isDate: We,
|
|
186
|
+
isFile: Ke,
|
|
187
|
+
isBlob: Ge,
|
|
188
|
+
isRegExp: dt,
|
|
189
|
+
isFunction: R,
|
|
190
|
+
isStream: Qe,
|
|
191
|
+
isURLSearchParams: Ye,
|
|
192
|
+
isTypedArray: at,
|
|
193
|
+
isFileList: Xe,
|
|
194
|
+
forEach: B,
|
|
195
|
+
merge: K,
|
|
196
|
+
extend: tt,
|
|
197
|
+
trim: et,
|
|
198
|
+
stripBOM: nt,
|
|
199
|
+
inherits: rt,
|
|
200
|
+
toFlatObject: st,
|
|
201
|
+
kindOf: H,
|
|
202
|
+
kindOfTest: g,
|
|
203
|
+
endsWith: ot,
|
|
204
|
+
toArray: it,
|
|
205
|
+
forEachEntry: ct,
|
|
206
|
+
matchAll: ut,
|
|
207
|
+
isHTMLForm: lt,
|
|
208
|
+
hasOwnProperty: ce,
|
|
209
|
+
hasOwnProp: ce,
|
|
210
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
211
|
+
reduceDescriptors: Te,
|
|
212
|
+
freezeMethods: pt,
|
|
213
|
+
toObjectSet: ht,
|
|
214
|
+
toCamelCase: ft,
|
|
215
|
+
noop: mt,
|
|
216
|
+
toFiniteNumber: yt,
|
|
217
|
+
findKey: Oe,
|
|
218
|
+
global: ge,
|
|
219
|
+
isContextDefined: Ae,
|
|
220
|
+
ALPHABET: Ce,
|
|
221
|
+
generateString: wt,
|
|
222
|
+
isSpecCompliantForm: Et,
|
|
223
|
+
toJSONObject: bt,
|
|
224
|
+
isAsyncFn: St,
|
|
225
|
+
isThenable: Rt
|
|
226
|
+
};
|
|
227
|
+
function m(e, t, n, r, s) {
|
|
228
|
+
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), s && (this.response = s);
|
|
229
|
+
}
|
|
230
|
+
a.inherits(m, Error, {
|
|
231
|
+
toJSON: function() {
|
|
232
|
+
return {
|
|
233
|
+
// Standard
|
|
234
|
+
message: this.message,
|
|
235
|
+
name: this.name,
|
|
236
|
+
// Microsoft
|
|
237
|
+
description: this.description,
|
|
238
|
+
number: this.number,
|
|
239
|
+
// Mozilla
|
|
240
|
+
fileName: this.fileName,
|
|
241
|
+
lineNumber: this.lineNumber,
|
|
242
|
+
columnNumber: this.columnNumber,
|
|
243
|
+
stack: this.stack,
|
|
244
|
+
// Axios
|
|
245
|
+
config: a.toJSONObject(this.config),
|
|
246
|
+
code: this.code,
|
|
247
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
const xe = m.prototype, Ne = {};
|
|
252
|
+
[
|
|
253
|
+
"ERR_BAD_OPTION_VALUE",
|
|
254
|
+
"ERR_BAD_OPTION",
|
|
255
|
+
"ECONNABORTED",
|
|
256
|
+
"ETIMEDOUT",
|
|
257
|
+
"ERR_NETWORK",
|
|
258
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
259
|
+
"ERR_DEPRECATED",
|
|
260
|
+
"ERR_BAD_RESPONSE",
|
|
261
|
+
"ERR_BAD_REQUEST",
|
|
262
|
+
"ERR_CANCELED",
|
|
263
|
+
"ERR_NOT_SUPPORT",
|
|
264
|
+
"ERR_INVALID_URL"
|
|
265
|
+
// eslint-disable-next-line func-names
|
|
266
|
+
].forEach((e) => {
|
|
267
|
+
Ne[e] = { value: e };
|
|
268
|
+
});
|
|
269
|
+
Object.defineProperties(m, Ne);
|
|
270
|
+
Object.defineProperty(xe, "isAxiosError", { value: !0 });
|
|
271
|
+
m.from = (e, t, n, r, s, i) => {
|
|
272
|
+
const o = Object.create(xe);
|
|
273
|
+
return a.toFlatObject(e, o, function(f) {
|
|
274
|
+
return f !== Error.prototype;
|
|
275
|
+
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
276
|
+
};
|
|
277
|
+
const Ot = null;
|
|
278
|
+
function G(e) {
|
|
279
|
+
return a.isPlainObject(e) || a.isArray(e);
|
|
280
|
+
}
|
|
281
|
+
function Pe(e) {
|
|
282
|
+
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
283
|
+
}
|
|
284
|
+
function le(e, t, n) {
|
|
285
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
286
|
+
return s = Pe(s), !n && i ? "[" + s + "]" : s;
|
|
287
|
+
}).join(n ? "." : "") : t;
|
|
288
|
+
}
|
|
289
|
+
function gt(e) {
|
|
290
|
+
return a.isArray(e) && !e.some(G);
|
|
291
|
+
}
|
|
292
|
+
const At = a.toFlatObject(a, {}, null, function(t) {
|
|
293
|
+
return /^is[A-Z]/.test(t);
|
|
294
|
+
});
|
|
295
|
+
function z(e, t, n) {
|
|
296
|
+
if (!a.isObject(e))
|
|
297
|
+
throw new TypeError("target must be an object");
|
|
298
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
299
|
+
metaTokens: !0,
|
|
300
|
+
dots: !1,
|
|
301
|
+
indexes: !1
|
|
302
|
+
}, !1, function(p, E) {
|
|
303
|
+
return !a.isUndefined(E[p]);
|
|
304
|
+
});
|
|
305
|
+
const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
306
|
+
if (!a.isFunction(s))
|
|
307
|
+
throw new TypeError("visitor must be a function");
|
|
308
|
+
function h(d) {
|
|
309
|
+
if (d === null)
|
|
310
|
+
return "";
|
|
311
|
+
if (a.isDate(d))
|
|
312
|
+
return d.toISOString();
|
|
313
|
+
if (!f && a.isBlob(d))
|
|
314
|
+
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
315
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
316
|
+
}
|
|
317
|
+
function l(d, p, E) {
|
|
318
|
+
let b = d;
|
|
319
|
+
if (d && !E && typeof d == "object") {
|
|
320
|
+
if (a.endsWith(p, "{}"))
|
|
321
|
+
p = r ? p : p.slice(0, -2), d = JSON.stringify(d);
|
|
322
|
+
else if (a.isArray(d) && gt(d) || (a.isFileList(d) || a.endsWith(p, "[]")) && (b = a.toArray(d)))
|
|
323
|
+
return p = Pe(p), b.forEach(function(C, qe) {
|
|
324
|
+
!(a.isUndefined(C) || C === null) && t.append(
|
|
325
|
+
// eslint-disable-next-line no-nested-ternary
|
|
326
|
+
o === !0 ? le([p], qe, i) : o === null ? p : p + "[]",
|
|
327
|
+
h(C)
|
|
328
|
+
);
|
|
329
|
+
}), !1;
|
|
330
|
+
}
|
|
331
|
+
return G(d) ? !0 : (t.append(le(E, p, i), h(d)), !1);
|
|
332
|
+
}
|
|
333
|
+
const u = [], w = Object.assign(At, {
|
|
334
|
+
defaultVisitor: l,
|
|
335
|
+
convertValue: h,
|
|
336
|
+
isVisitable: G
|
|
337
|
+
});
|
|
338
|
+
function S(d, p) {
|
|
339
|
+
if (!a.isUndefined(d)) {
|
|
340
|
+
if (u.indexOf(d) !== -1)
|
|
341
|
+
throw Error("Circular reference detected in " + p.join("."));
|
|
342
|
+
u.push(d), a.forEach(d, function(b, T) {
|
|
343
|
+
(!(a.isUndefined(b) || b === null) && s.call(
|
|
344
|
+
t,
|
|
345
|
+
b,
|
|
346
|
+
a.isString(T) ? T.trim() : T,
|
|
347
|
+
p,
|
|
348
|
+
w
|
|
349
|
+
)) === !0 && S(b, p ? p.concat(T) : [T]);
|
|
350
|
+
}), u.pop();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (!a.isObject(e))
|
|
354
|
+
throw new TypeError("data must be an object");
|
|
355
|
+
return S(e), t;
|
|
356
|
+
}
|
|
357
|
+
function fe(e) {
|
|
358
|
+
const t = {
|
|
359
|
+
"!": "%21",
|
|
360
|
+
"'": "%27",
|
|
361
|
+
"(": "%28",
|
|
362
|
+
")": "%29",
|
|
363
|
+
"~": "%7E",
|
|
364
|
+
"%20": "+",
|
|
365
|
+
"%00": "\0"
|
|
366
|
+
};
|
|
367
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
368
|
+
return t[r];
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
function ne(e, t) {
|
|
372
|
+
this._pairs = [], e && z(e, this, t);
|
|
373
|
+
}
|
|
374
|
+
const Ue = ne.prototype;
|
|
375
|
+
Ue.append = function(t, n) {
|
|
376
|
+
this._pairs.push([t, n]);
|
|
377
|
+
};
|
|
378
|
+
Ue.toString = function(t) {
|
|
379
|
+
const n = t ? function(r) {
|
|
380
|
+
return t.call(this, r, fe);
|
|
381
|
+
} : fe;
|
|
382
|
+
return this._pairs.map(function(s) {
|
|
383
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
384
|
+
}, "").join("&");
|
|
385
|
+
};
|
|
386
|
+
function Tt(e) {
|
|
387
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
388
|
+
}
|
|
389
|
+
function Fe(e, t, n) {
|
|
390
|
+
if (!t)
|
|
391
|
+
return e;
|
|
392
|
+
const r = n && n.encode || Tt, s = n && n.serialize;
|
|
393
|
+
let i;
|
|
394
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ne(t, n).toString(r), i) {
|
|
395
|
+
const o = e.indexOf("#");
|
|
396
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
397
|
+
}
|
|
398
|
+
return e;
|
|
399
|
+
}
|
|
400
|
+
class de {
|
|
401
|
+
constructor() {
|
|
402
|
+
this.handlers = [];
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Add a new interceptor to the stack
|
|
406
|
+
*
|
|
407
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
408
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
409
|
+
*
|
|
410
|
+
* @return {Number} An ID used to remove interceptor later
|
|
411
|
+
*/
|
|
412
|
+
use(t, n, r) {
|
|
413
|
+
return this.handlers.push({
|
|
414
|
+
fulfilled: t,
|
|
415
|
+
rejected: n,
|
|
416
|
+
synchronous: r ? r.synchronous : !1,
|
|
417
|
+
runWhen: r ? r.runWhen : null
|
|
418
|
+
}), this.handlers.length - 1;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Remove an interceptor from the stack
|
|
422
|
+
*
|
|
423
|
+
* @param {Number} id The ID that was returned by `use`
|
|
424
|
+
*
|
|
425
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
426
|
+
*/
|
|
427
|
+
eject(t) {
|
|
428
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Clear all interceptors from the stack
|
|
432
|
+
*
|
|
433
|
+
* @returns {void}
|
|
434
|
+
*/
|
|
435
|
+
clear() {
|
|
436
|
+
this.handlers && (this.handlers = []);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Iterate over all the registered interceptors
|
|
440
|
+
*
|
|
441
|
+
* This method is particularly useful for skipping over any
|
|
442
|
+
* interceptors that may have become `null` calling `eject`.
|
|
443
|
+
*
|
|
444
|
+
* @param {Function} fn The function to call for each interceptor
|
|
445
|
+
*
|
|
446
|
+
* @returns {void}
|
|
447
|
+
*/
|
|
448
|
+
forEach(t) {
|
|
449
|
+
a.forEach(this.handlers, function(r) {
|
|
450
|
+
r !== null && t(r);
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const Be = {
|
|
455
|
+
silentJSONParsing: !0,
|
|
456
|
+
forcedJSONParsing: !0,
|
|
457
|
+
clarifyTimeoutError: !1
|
|
458
|
+
}, Ct = typeof URLSearchParams < "u" ? URLSearchParams : ne, xt = typeof FormData < "u" ? FormData : null, Nt = typeof Blob < "u" ? Blob : null, Pt = {
|
|
459
|
+
isBrowser: !0,
|
|
460
|
+
classes: {
|
|
461
|
+
URLSearchParams: Ct,
|
|
462
|
+
FormData: xt,
|
|
463
|
+
Blob: Nt
|
|
464
|
+
},
|
|
465
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
466
|
+
}, _e = typeof window < "u" && typeof document < "u", Ut = ((e) => _e && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Ft = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
467
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
468
|
+
__proto__: null,
|
|
469
|
+
hasBrowserEnv: _e,
|
|
470
|
+
hasStandardBrowserEnv: Ut,
|
|
471
|
+
hasStandardBrowserWebWorkerEnv: Ft
|
|
472
|
+
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
473
|
+
...Bt,
|
|
474
|
+
...Pt
|
|
475
|
+
};
|
|
476
|
+
function _t(e, t) {
|
|
477
|
+
return z(e, new O.classes.URLSearchParams(), Object.assign({
|
|
478
|
+
visitor: function(n, r, s, i) {
|
|
479
|
+
return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
480
|
+
}
|
|
481
|
+
}, t));
|
|
482
|
+
}
|
|
483
|
+
function kt(e) {
|
|
484
|
+
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
485
|
+
}
|
|
486
|
+
function Lt(e) {
|
|
487
|
+
const t = {}, n = Object.keys(e);
|
|
488
|
+
let r;
|
|
489
|
+
const s = n.length;
|
|
490
|
+
let i;
|
|
491
|
+
for (r = 0; r < s; r++)
|
|
492
|
+
i = n[r], t[i] = e[i];
|
|
493
|
+
return t;
|
|
494
|
+
}
|
|
495
|
+
function ke(e) {
|
|
496
|
+
function t(n, r, s, i) {
|
|
497
|
+
let o = n[i++];
|
|
498
|
+
if (o === "__proto__")
|
|
499
|
+
return !0;
|
|
500
|
+
const c = Number.isFinite(+o), f = i >= n.length;
|
|
501
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Lt(s[o])), !c);
|
|
502
|
+
}
|
|
503
|
+
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
|
+
const n = {};
|
|
505
|
+
return a.forEachEntry(e, (r, s) => {
|
|
506
|
+
t(kt(r), s, n, 0);
|
|
507
|
+
}), n;
|
|
508
|
+
}
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
function jt(e, t, n) {
|
|
512
|
+
if (a.isString(e))
|
|
513
|
+
try {
|
|
514
|
+
return (t || JSON.parse)(e), a.trim(e);
|
|
515
|
+
} catch (r) {
|
|
516
|
+
if (r.name !== "SyntaxError")
|
|
517
|
+
throw r;
|
|
518
|
+
}
|
|
519
|
+
return (n || JSON.stringify)(e);
|
|
520
|
+
}
|
|
521
|
+
const re = {
|
|
522
|
+
transitional: Be,
|
|
523
|
+
adapter: ["xhr", "http"],
|
|
524
|
+
transformRequest: [function(t, n) {
|
|
525
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
526
|
+
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
527
|
+
return s ? JSON.stringify(ke(t)) : t;
|
|
528
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
529
|
+
return t;
|
|
530
|
+
if (a.isArrayBufferView(t))
|
|
531
|
+
return t.buffer;
|
|
532
|
+
if (a.isURLSearchParams(t))
|
|
533
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
534
|
+
let c;
|
|
535
|
+
if (i) {
|
|
536
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
+
return _t(t, this.formSerializer).toString();
|
|
538
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
|
+
const f = this.env && this.env.FormData;
|
|
540
|
+
return z(
|
|
541
|
+
c ? { "files[]": t } : t,
|
|
542
|
+
f && new f(),
|
|
543
|
+
this.formSerializer
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return i || s ? (n.setContentType("application/json", !1), jt(t)) : t;
|
|
548
|
+
}],
|
|
549
|
+
transformResponse: [function(t) {
|
|
550
|
+
const n = this.transitional || re.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
551
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
552
|
+
const o = !(n && n.silentJSONParsing) && s;
|
|
553
|
+
try {
|
|
554
|
+
return JSON.parse(t);
|
|
555
|
+
} catch (c) {
|
|
556
|
+
if (o)
|
|
557
|
+
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return t;
|
|
561
|
+
}],
|
|
562
|
+
/**
|
|
563
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
564
|
+
* timeout is not created.
|
|
565
|
+
*/
|
|
566
|
+
timeout: 0,
|
|
567
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
568
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
569
|
+
maxContentLength: -1,
|
|
570
|
+
maxBodyLength: -1,
|
|
571
|
+
env: {
|
|
572
|
+
FormData: O.classes.FormData,
|
|
573
|
+
Blob: O.classes.Blob
|
|
574
|
+
},
|
|
575
|
+
validateStatus: function(t) {
|
|
576
|
+
return t >= 200 && t < 300;
|
|
577
|
+
},
|
|
578
|
+
headers: {
|
|
579
|
+
common: {
|
|
580
|
+
Accept: "application/json, text/plain, */*",
|
|
581
|
+
"Content-Type": void 0
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
+
re.headers[e] = {};
|
|
587
|
+
});
|
|
588
|
+
const se = re, It = a.toObjectSet([
|
|
589
|
+
"age",
|
|
590
|
+
"authorization",
|
|
591
|
+
"content-length",
|
|
592
|
+
"content-type",
|
|
593
|
+
"etag",
|
|
594
|
+
"expires",
|
|
595
|
+
"from",
|
|
596
|
+
"host",
|
|
597
|
+
"if-modified-since",
|
|
598
|
+
"if-unmodified-since",
|
|
599
|
+
"last-modified",
|
|
600
|
+
"location",
|
|
601
|
+
"max-forwards",
|
|
602
|
+
"proxy-authorization",
|
|
603
|
+
"referer",
|
|
604
|
+
"retry-after",
|
|
605
|
+
"user-agent"
|
|
606
|
+
]), Dt = (e) => {
|
|
607
|
+
const t = {};
|
|
608
|
+
let n, r, s;
|
|
609
|
+
return e && e.split(`
|
|
610
|
+
`).forEach(function(o) {
|
|
611
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && It[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
|
+
}), t;
|
|
613
|
+
}, pe = Symbol("internals");
|
|
614
|
+
function U(e) {
|
|
615
|
+
return e && String(e).trim().toLowerCase();
|
|
616
|
+
}
|
|
617
|
+
function j(e) {
|
|
618
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(j) : String(e);
|
|
619
|
+
}
|
|
620
|
+
function Ht(e) {
|
|
621
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
|
+
let r;
|
|
623
|
+
for (; r = n.exec(e); )
|
|
624
|
+
t[r[1]] = r[2];
|
|
625
|
+
return t;
|
|
626
|
+
}
|
|
627
|
+
const qt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
|
+
function v(e, t, n, r, s) {
|
|
629
|
+
if (a.isFunction(r))
|
|
630
|
+
return r.call(this, t, n);
|
|
631
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
632
|
+
if (a.isString(r))
|
|
633
|
+
return t.indexOf(r) !== -1;
|
|
634
|
+
if (a.isRegExp(r))
|
|
635
|
+
return r.test(t);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
function Mt(e) {
|
|
639
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
|
+
}
|
|
641
|
+
function zt(e, t) {
|
|
642
|
+
const n = a.toCamelCase(" " + t);
|
|
643
|
+
["get", "set", "has"].forEach((r) => {
|
|
644
|
+
Object.defineProperty(e, r + n, {
|
|
645
|
+
value: function(s, i, o) {
|
|
646
|
+
return this[r].call(this, t, s, i, o);
|
|
647
|
+
},
|
|
648
|
+
configurable: !0
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
class J {
|
|
653
|
+
constructor(t) {
|
|
654
|
+
t && this.set(t);
|
|
655
|
+
}
|
|
656
|
+
set(t, n, r) {
|
|
657
|
+
const s = this;
|
|
658
|
+
function i(c, f, h) {
|
|
659
|
+
const l = U(f);
|
|
660
|
+
if (!l)
|
|
661
|
+
throw new Error("header name must be a non-empty string");
|
|
662
|
+
const u = a.findKey(s, l);
|
|
663
|
+
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || f] = j(c));
|
|
664
|
+
}
|
|
665
|
+
const o = (c, f) => a.forEach(c, (h, l) => i(h, l, f));
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !qt(t) ? o(Dt(t), n) : t != null && i(n, t, r), this;
|
|
667
|
+
}
|
|
668
|
+
get(t, n) {
|
|
669
|
+
if (t = U(t), t) {
|
|
670
|
+
const r = a.findKey(this, t);
|
|
671
|
+
if (r) {
|
|
672
|
+
const s = this[r];
|
|
673
|
+
if (!n)
|
|
674
|
+
return s;
|
|
675
|
+
if (n === !0)
|
|
676
|
+
return Ht(s);
|
|
677
|
+
if (a.isFunction(n))
|
|
678
|
+
return n.call(this, s, r);
|
|
679
|
+
if (a.isRegExp(n))
|
|
680
|
+
return n.exec(s);
|
|
681
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
has(t, n) {
|
|
686
|
+
if (t = U(t), t) {
|
|
687
|
+
const r = a.findKey(this, t);
|
|
688
|
+
return !!(r && this[r] !== void 0 && (!n || v(this, this[r], r, n)));
|
|
689
|
+
}
|
|
690
|
+
return !1;
|
|
691
|
+
}
|
|
692
|
+
delete(t, n) {
|
|
693
|
+
const r = this;
|
|
694
|
+
let s = !1;
|
|
695
|
+
function i(o) {
|
|
696
|
+
if (o = U(o), o) {
|
|
697
|
+
const c = a.findKey(r, o);
|
|
698
|
+
c && (!n || v(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
702
|
+
}
|
|
703
|
+
clear(t) {
|
|
704
|
+
const n = Object.keys(this);
|
|
705
|
+
let r = n.length, s = !1;
|
|
706
|
+
for (; r--; ) {
|
|
707
|
+
const i = n[r];
|
|
708
|
+
(!t || v(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
709
|
+
}
|
|
710
|
+
return s;
|
|
711
|
+
}
|
|
712
|
+
normalize(t) {
|
|
713
|
+
const n = this, r = {};
|
|
714
|
+
return a.forEach(this, (s, i) => {
|
|
715
|
+
const o = a.findKey(r, i);
|
|
716
|
+
if (o) {
|
|
717
|
+
n[o] = j(s), delete n[i];
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
const c = t ? Mt(i) : String(i).trim();
|
|
721
|
+
c !== i && delete n[i], n[c] = j(s), r[c] = !0;
|
|
722
|
+
}), this;
|
|
723
|
+
}
|
|
724
|
+
concat(...t) {
|
|
725
|
+
return this.constructor.concat(this, ...t);
|
|
726
|
+
}
|
|
727
|
+
toJSON(t) {
|
|
728
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
729
|
+
return a.forEach(this, (r, s) => {
|
|
730
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
731
|
+
}), n;
|
|
732
|
+
}
|
|
733
|
+
[Symbol.iterator]() {
|
|
734
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
735
|
+
}
|
|
736
|
+
toString() {
|
|
737
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
738
|
+
`);
|
|
739
|
+
}
|
|
740
|
+
get [Symbol.toStringTag]() {
|
|
741
|
+
return "AxiosHeaders";
|
|
742
|
+
}
|
|
743
|
+
static from(t) {
|
|
744
|
+
return t instanceof this ? t : new this(t);
|
|
745
|
+
}
|
|
746
|
+
static concat(t, ...n) {
|
|
747
|
+
const r = new this(t);
|
|
748
|
+
return n.forEach((s) => r.set(s)), r;
|
|
749
|
+
}
|
|
750
|
+
static accessor(t) {
|
|
751
|
+
const r = (this[pe] = this[pe] = {
|
|
752
|
+
accessors: {}
|
|
753
|
+
}).accessors, s = this.prototype;
|
|
754
|
+
function i(o) {
|
|
755
|
+
const c = U(o);
|
|
756
|
+
r[c] || (zt(s, o), r[c] = !0);
|
|
757
|
+
}
|
|
758
|
+
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
J.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
762
|
+
a.reduceDescriptors(J.prototype, ({ value: e }, t) => {
|
|
763
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
|
+
return {
|
|
765
|
+
get: () => e,
|
|
766
|
+
set(r) {
|
|
767
|
+
this[n] = r;
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
});
|
|
771
|
+
a.freezeMethods(J);
|
|
772
|
+
const A = J;
|
|
773
|
+
function V(e, t) {
|
|
774
|
+
const n = this || se, r = t || n, s = A.from(r.headers);
|
|
775
|
+
let i = r.data;
|
|
776
|
+
return a.forEach(e, function(c) {
|
|
777
|
+
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
778
|
+
}), s.normalize(), i;
|
|
779
|
+
}
|
|
780
|
+
function Le(e) {
|
|
781
|
+
return !!(e && e.__CANCEL__);
|
|
782
|
+
}
|
|
783
|
+
function _(e, t, n) {
|
|
784
|
+
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
785
|
+
}
|
|
786
|
+
a.inherits(_, m, {
|
|
787
|
+
__CANCEL__: !0
|
|
788
|
+
});
|
|
789
|
+
function Jt(e, t, n) {
|
|
790
|
+
const r = n.config.validateStatus;
|
|
791
|
+
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
|
+
"Request failed with status code " + n.status,
|
|
793
|
+
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
794
|
+
n.config,
|
|
795
|
+
n.request,
|
|
796
|
+
n
|
|
797
|
+
));
|
|
798
|
+
}
|
|
799
|
+
const $t = O.hasStandardBrowserEnv ? (
|
|
800
|
+
// Standard browser envs support document.cookie
|
|
801
|
+
{
|
|
802
|
+
write(e, t, n, r, s, i) {
|
|
803
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
804
|
+
a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
805
|
+
},
|
|
806
|
+
read(e) {
|
|
807
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
808
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
809
|
+
},
|
|
810
|
+
remove(e) {
|
|
811
|
+
this.write(e, "", Date.now() - 864e5);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
) : (
|
|
815
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
816
|
+
{
|
|
817
|
+
write() {
|
|
818
|
+
},
|
|
819
|
+
read() {
|
|
820
|
+
return null;
|
|
821
|
+
},
|
|
822
|
+
remove() {
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
function vt(e) {
|
|
827
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
|
+
}
|
|
829
|
+
function Vt(e, t) {
|
|
830
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
|
+
}
|
|
832
|
+
function je(e, t) {
|
|
833
|
+
return e && !vt(t) ? Vt(e, t) : t;
|
|
834
|
+
}
|
|
835
|
+
const Wt = O.hasStandardBrowserEnv ? (
|
|
836
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
837
|
+
// whether the request URL is of the same origin as current location.
|
|
838
|
+
function() {
|
|
839
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
840
|
+
let r;
|
|
841
|
+
function s(i) {
|
|
842
|
+
let o = i;
|
|
843
|
+
return t && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), {
|
|
844
|
+
href: n.href,
|
|
845
|
+
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
846
|
+
host: n.host,
|
|
847
|
+
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
848
|
+
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
849
|
+
hostname: n.hostname,
|
|
850
|
+
port: n.port,
|
|
851
|
+
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
return r = s(window.location.href), function(o) {
|
|
855
|
+
const c = a.isString(o) ? s(o) : o;
|
|
856
|
+
return c.protocol === r.protocol && c.host === r.host;
|
|
857
|
+
};
|
|
858
|
+
}()
|
|
859
|
+
) : (
|
|
860
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
861
|
+
/* @__PURE__ */ function() {
|
|
862
|
+
return function() {
|
|
863
|
+
return !0;
|
|
864
|
+
};
|
|
865
|
+
}()
|
|
866
|
+
);
|
|
867
|
+
function Kt(e) {
|
|
868
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
|
+
return t && t[1] || "";
|
|
870
|
+
}
|
|
871
|
+
function Gt(e, t) {
|
|
872
|
+
e = e || 10;
|
|
873
|
+
const n = new Array(e), r = new Array(e);
|
|
874
|
+
let s = 0, i = 0, o;
|
|
875
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
876
|
+
const h = Date.now(), l = r[i];
|
|
877
|
+
o || (o = h), n[s] = f, r[s] = h;
|
|
878
|
+
let u = i, w = 0;
|
|
879
|
+
for (; u !== s; )
|
|
880
|
+
w += n[u++], u = u % e;
|
|
881
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), h - o < t)
|
|
882
|
+
return;
|
|
883
|
+
const S = l && h - l;
|
|
884
|
+
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
function he(e, t) {
|
|
888
|
+
let n = 0;
|
|
889
|
+
const r = Gt(50, 250);
|
|
890
|
+
return (s) => {
|
|
891
|
+
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, f = r(c), h = i <= o;
|
|
892
|
+
n = i;
|
|
893
|
+
const l = {
|
|
894
|
+
loaded: i,
|
|
895
|
+
total: o,
|
|
896
|
+
progress: o ? i / o : void 0,
|
|
897
|
+
bytes: c,
|
|
898
|
+
rate: f || void 0,
|
|
899
|
+
estimated: f && o && h ? (o - i) / f : void 0,
|
|
900
|
+
event: s
|
|
901
|
+
};
|
|
902
|
+
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
const Xt = typeof XMLHttpRequest < "u", Qt = Xt && function(e) {
|
|
906
|
+
return new Promise(function(n, r) {
|
|
907
|
+
let s = e.data;
|
|
908
|
+
const i = A.from(e.headers).normalize();
|
|
909
|
+
let { responseType: o, withXSRFToken: c } = e, f;
|
|
910
|
+
function h() {
|
|
911
|
+
e.cancelToken && e.cancelToken.unsubscribe(f), e.signal && e.signal.removeEventListener("abort", f);
|
|
912
|
+
}
|
|
913
|
+
let l;
|
|
914
|
+
if (a.isFormData(s)) {
|
|
915
|
+
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
916
|
+
i.setContentType(!1);
|
|
917
|
+
else if ((l = i.getContentType()) !== !1) {
|
|
918
|
+
const [p, ...E] = l ? l.split(";").map((b) => b.trim()).filter(Boolean) : [];
|
|
919
|
+
i.setContentType([p || "multipart/form-data", ...E].join("; "));
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
let u = new XMLHttpRequest();
|
|
923
|
+
if (e.auth) {
|
|
924
|
+
const p = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
925
|
+
i.set("Authorization", "Basic " + btoa(p + ":" + E));
|
|
926
|
+
}
|
|
927
|
+
const w = je(e.baseURL, e.url);
|
|
928
|
+
u.open(e.method.toUpperCase(), Fe(w, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
|
+
function S() {
|
|
930
|
+
if (!u)
|
|
931
|
+
return;
|
|
932
|
+
const p = A.from(
|
|
933
|
+
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
|
+
), b = {
|
|
935
|
+
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
936
|
+
status: u.status,
|
|
937
|
+
statusText: u.statusText,
|
|
938
|
+
headers: p,
|
|
939
|
+
config: e,
|
|
940
|
+
request: u
|
|
941
|
+
};
|
|
942
|
+
Jt(function(C) {
|
|
943
|
+
n(C), h();
|
|
944
|
+
}, function(C) {
|
|
945
|
+
r(C), h();
|
|
946
|
+
}, b), u = null;
|
|
947
|
+
}
|
|
948
|
+
if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
|
|
949
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
950
|
+
}, u.onabort = function() {
|
|
951
|
+
u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
|
|
952
|
+
}, u.onerror = function() {
|
|
953
|
+
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
954
|
+
}, u.ontimeout = function() {
|
|
955
|
+
let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
+
const b = e.transitional || Be;
|
|
957
|
+
e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new m(
|
|
958
|
+
E,
|
|
959
|
+
b.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
|
+
e,
|
|
961
|
+
u
|
|
962
|
+
)), u = null;
|
|
963
|
+
}, O.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && Wt(w))) {
|
|
964
|
+
const p = e.xsrfHeaderName && e.xsrfCookieName && $t.read(e.xsrfCookieName);
|
|
965
|
+
p && i.set(e.xsrfHeaderName, p);
|
|
966
|
+
}
|
|
967
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(E, b) {
|
|
968
|
+
u.setRequestHeader(b, E);
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", he(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", he(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (p) => {
|
|
970
|
+
u && (r(!p || p.type ? new _(null, e, u) : p), u.abort(), u = null);
|
|
971
|
+
}, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
|
|
972
|
+
const d = Kt(w);
|
|
973
|
+
if (d && O.protocols.indexOf(d) === -1) {
|
|
974
|
+
r(new m("Unsupported protocol " + d + ":", m.ERR_BAD_REQUEST, e));
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
u.send(s || null);
|
|
978
|
+
});
|
|
979
|
+
}, X = {
|
|
980
|
+
http: Ot,
|
|
981
|
+
xhr: Qt
|
|
982
|
+
};
|
|
983
|
+
a.forEach(X, (e, t) => {
|
|
984
|
+
if (e) {
|
|
985
|
+
try {
|
|
986
|
+
Object.defineProperty(e, "name", { value: t });
|
|
987
|
+
} catch {
|
|
988
|
+
}
|
|
989
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
const me = (e) => `- ${e}`, Zt = (e) => a.isFunction(e) || e === null || e === !1, Ie = {
|
|
993
|
+
getAdapter: (e) => {
|
|
994
|
+
e = a.isArray(e) ? e : [e];
|
|
995
|
+
const { length: t } = e;
|
|
996
|
+
let n, r;
|
|
997
|
+
const s = {};
|
|
998
|
+
for (let i = 0; i < t; i++) {
|
|
999
|
+
n = e[i];
|
|
1000
|
+
let o;
|
|
1001
|
+
if (r = n, !Zt(n) && (r = X[(o = String(n)).toLowerCase()], r === void 0))
|
|
1002
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1003
|
+
if (r)
|
|
1004
|
+
break;
|
|
1005
|
+
s[o || "#" + i] = r;
|
|
1006
|
+
}
|
|
1007
|
+
if (!r) {
|
|
1008
|
+
const i = Object.entries(s).map(
|
|
1009
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
|
+
);
|
|
1011
|
+
let o = t ? i.length > 1 ? `since :
|
|
1012
|
+
` + i.map(me).join(`
|
|
1013
|
+
`) : " " + me(i[0]) : "as no adapter specified";
|
|
1014
|
+
throw new m(
|
|
1015
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1016
|
+
"ERR_NOT_SUPPORT"
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
return r;
|
|
1020
|
+
},
|
|
1021
|
+
adapters: X
|
|
1022
|
+
};
|
|
1023
|
+
function W(e) {
|
|
1024
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
|
+
throw new _(null, e);
|
|
1026
|
+
}
|
|
1027
|
+
function ye(e) {
|
|
1028
|
+
return W(e), e.headers = A.from(e.headers), e.data = V.call(
|
|
1029
|
+
e,
|
|
1030
|
+
e.transformRequest
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ie.getAdapter(e.adapter || se.adapter)(e).then(function(r) {
|
|
1032
|
+
return W(e), r.data = V.call(
|
|
1033
|
+
e,
|
|
1034
|
+
e.transformResponse,
|
|
1035
|
+
r
|
|
1036
|
+
), r.headers = A.from(r.headers), r;
|
|
1037
|
+
}, function(r) {
|
|
1038
|
+
return Le(r) || (W(e), r && r.response && (r.response.data = V.call(
|
|
1039
|
+
e,
|
|
1040
|
+
e.transformResponse,
|
|
1041
|
+
r.response
|
|
1042
|
+
), r.response.headers = A.from(r.response.headers))), Promise.reject(r);
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
const we = (e) => e instanceof A ? e.toJSON() : e;
|
|
1046
|
+
function N(e, t) {
|
|
1047
|
+
t = t || {};
|
|
1048
|
+
const n = {};
|
|
1049
|
+
function r(h, l, u) {
|
|
1050
|
+
return a.isPlainObject(h) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, h, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1051
|
+
}
|
|
1052
|
+
function s(h, l, u) {
|
|
1053
|
+
if (a.isUndefined(l)) {
|
|
1054
|
+
if (!a.isUndefined(h))
|
|
1055
|
+
return r(void 0, h, u);
|
|
1056
|
+
} else
|
|
1057
|
+
return r(h, l, u);
|
|
1058
|
+
}
|
|
1059
|
+
function i(h, l) {
|
|
1060
|
+
if (!a.isUndefined(l))
|
|
1061
|
+
return r(void 0, l);
|
|
1062
|
+
}
|
|
1063
|
+
function o(h, l) {
|
|
1064
|
+
if (a.isUndefined(l)) {
|
|
1065
|
+
if (!a.isUndefined(h))
|
|
1066
|
+
return r(void 0, h);
|
|
1067
|
+
} else
|
|
1068
|
+
return r(void 0, l);
|
|
1069
|
+
}
|
|
1070
|
+
function c(h, l, u) {
|
|
1071
|
+
if (u in t)
|
|
1072
|
+
return r(h, l);
|
|
1073
|
+
if (u in e)
|
|
1074
|
+
return r(void 0, h);
|
|
1075
|
+
}
|
|
1076
|
+
const f = {
|
|
1077
|
+
url: i,
|
|
1078
|
+
method: i,
|
|
1079
|
+
data: i,
|
|
1080
|
+
baseURL: o,
|
|
1081
|
+
transformRequest: o,
|
|
1082
|
+
transformResponse: o,
|
|
1083
|
+
paramsSerializer: o,
|
|
1084
|
+
timeout: o,
|
|
1085
|
+
timeoutMessage: o,
|
|
1086
|
+
withCredentials: o,
|
|
1087
|
+
withXSRFToken: o,
|
|
1088
|
+
adapter: o,
|
|
1089
|
+
responseType: o,
|
|
1090
|
+
xsrfCookieName: o,
|
|
1091
|
+
xsrfHeaderName: o,
|
|
1092
|
+
onUploadProgress: o,
|
|
1093
|
+
onDownloadProgress: o,
|
|
1094
|
+
decompress: o,
|
|
1095
|
+
maxContentLength: o,
|
|
1096
|
+
maxBodyLength: o,
|
|
1097
|
+
beforeRedirect: o,
|
|
1098
|
+
transport: o,
|
|
1099
|
+
httpAgent: o,
|
|
1100
|
+
httpsAgent: o,
|
|
1101
|
+
cancelToken: o,
|
|
1102
|
+
socketPath: o,
|
|
1103
|
+
responseEncoding: o,
|
|
1104
|
+
validateStatus: c,
|
|
1105
|
+
headers: (h, l) => s(we(h), we(l), !0)
|
|
1106
|
+
};
|
|
1107
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1108
|
+
const u = f[l] || s, w = u(e[l], t[l], l);
|
|
1109
|
+
a.isUndefined(w) && u !== c || (n[l] = w);
|
|
1110
|
+
}), n;
|
|
1111
|
+
}
|
|
1112
|
+
const De = "1.6.7", oe = {};
|
|
1113
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
+
oe[e] = function(r) {
|
|
1115
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
|
+
};
|
|
1117
|
+
});
|
|
1118
|
+
const Ee = {};
|
|
1119
|
+
oe.transitional = function(t, n, r) {
|
|
1120
|
+
function s(i, o) {
|
|
1121
|
+
return "[Axios v" + De + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1122
|
+
}
|
|
1123
|
+
return (i, o, c) => {
|
|
1124
|
+
if (t === !1)
|
|
1125
|
+
throw new m(
|
|
1126
|
+
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1127
|
+
m.ERR_DEPRECATED
|
|
1128
|
+
);
|
|
1129
|
+
return n && !Ee[o] && (Ee[o] = !0, console.warn(
|
|
1130
|
+
s(
|
|
1131
|
+
o,
|
|
1132
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1133
|
+
)
|
|
1134
|
+
)), t ? t(i, o, c) : !0;
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
function Yt(e, t, n) {
|
|
1138
|
+
if (typeof e != "object")
|
|
1139
|
+
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
|
+
const r = Object.keys(e);
|
|
1141
|
+
let s = r.length;
|
|
1142
|
+
for (; s-- > 0; ) {
|
|
1143
|
+
const i = r[s], o = t[i];
|
|
1144
|
+
if (o) {
|
|
1145
|
+
const c = e[i], f = c === void 0 || o(c, i, e);
|
|
1146
|
+
if (f !== !0)
|
|
1147
|
+
throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1150
|
+
if (n !== !0)
|
|
1151
|
+
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
const Q = {
|
|
1155
|
+
assertOptions: Yt,
|
|
1156
|
+
validators: oe
|
|
1157
|
+
}, x = Q.validators;
|
|
1158
|
+
class D {
|
|
1159
|
+
constructor(t) {
|
|
1160
|
+
this.defaults = t, this.interceptors = {
|
|
1161
|
+
request: new de(),
|
|
1162
|
+
response: new de()
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Dispatch a request
|
|
1167
|
+
*
|
|
1168
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1169
|
+
* @param {?Object} config
|
|
1170
|
+
*
|
|
1171
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1172
|
+
*/
|
|
1173
|
+
async request(t, n) {
|
|
1174
|
+
try {
|
|
1175
|
+
return await this._request(t, n);
|
|
1176
|
+
} catch (r) {
|
|
1177
|
+
if (r instanceof Error) {
|
|
1178
|
+
let s;
|
|
1179
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1180
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1181
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1182
|
+
` + i) : r.stack = i;
|
|
1183
|
+
}
|
|
1184
|
+
throw r;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
_request(t, n) {
|
|
1188
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = N(this.defaults, n);
|
|
1189
|
+
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1190
|
+
r !== void 0 && Q.assertOptions(r, {
|
|
1191
|
+
silentJSONParsing: x.transitional(x.boolean),
|
|
1192
|
+
forcedJSONParsing: x.transitional(x.boolean),
|
|
1193
|
+
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1194
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1195
|
+
serialize: s
|
|
1196
|
+
} : Q.assertOptions(s, {
|
|
1197
|
+
encode: x.function,
|
|
1198
|
+
serialize: x.function
|
|
1199
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1200
|
+
let o = i && a.merge(
|
|
1201
|
+
i.common,
|
|
1202
|
+
i[n.method]
|
|
1203
|
+
);
|
|
1204
|
+
i && a.forEach(
|
|
1205
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1206
|
+
(d) => {
|
|
1207
|
+
delete i[d];
|
|
1208
|
+
}
|
|
1209
|
+
), n.headers = A.concat(o, i);
|
|
1210
|
+
const c = [];
|
|
1211
|
+
let f = !0;
|
|
1212
|
+
this.interceptors.request.forEach(function(p) {
|
|
1213
|
+
typeof p.runWhen == "function" && p.runWhen(n) === !1 || (f = f && p.synchronous, c.unshift(p.fulfilled, p.rejected));
|
|
1214
|
+
});
|
|
1215
|
+
const h = [];
|
|
1216
|
+
this.interceptors.response.forEach(function(p) {
|
|
1217
|
+
h.push(p.fulfilled, p.rejected);
|
|
1218
|
+
});
|
|
1219
|
+
let l, u = 0, w;
|
|
1220
|
+
if (!f) {
|
|
1221
|
+
const d = [ye.bind(this), void 0];
|
|
1222
|
+
for (d.unshift.apply(d, c), d.push.apply(d, h), w = d.length, l = Promise.resolve(n); u < w; )
|
|
1223
|
+
l = l.then(d[u++], d[u++]);
|
|
1224
|
+
return l;
|
|
1225
|
+
}
|
|
1226
|
+
w = c.length;
|
|
1227
|
+
let S = n;
|
|
1228
|
+
for (u = 0; u < w; ) {
|
|
1229
|
+
const d = c[u++], p = c[u++];
|
|
1230
|
+
try {
|
|
1231
|
+
S = d(S);
|
|
1232
|
+
} catch (E) {
|
|
1233
|
+
p.call(this, E);
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
try {
|
|
1238
|
+
l = ye.call(this, S);
|
|
1239
|
+
} catch (d) {
|
|
1240
|
+
return Promise.reject(d);
|
|
1241
|
+
}
|
|
1242
|
+
for (u = 0, w = h.length; u < w; )
|
|
1243
|
+
l = l.then(h[u++], h[u++]);
|
|
1244
|
+
return l;
|
|
1245
|
+
}
|
|
1246
|
+
getUri(t) {
|
|
1247
|
+
t = N(this.defaults, t);
|
|
1248
|
+
const n = je(t.baseURL, t.url);
|
|
1249
|
+
return Fe(n, t.params, t.paramsSerializer);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1253
|
+
D.prototype[t] = function(n, r) {
|
|
1254
|
+
return this.request(N(r || {}, {
|
|
1255
|
+
method: t,
|
|
1256
|
+
url: n,
|
|
1257
|
+
data: (r || {}).data
|
|
1258
|
+
}));
|
|
1259
|
+
};
|
|
1260
|
+
});
|
|
1261
|
+
a.forEach(["post", "put", "patch"], function(t) {
|
|
1262
|
+
function n(r) {
|
|
1263
|
+
return function(i, o, c) {
|
|
1264
|
+
return this.request(N(c || {}, {
|
|
1265
|
+
method: t,
|
|
1266
|
+
headers: r ? {
|
|
1267
|
+
"Content-Type": "multipart/form-data"
|
|
1268
|
+
} : {},
|
|
1269
|
+
url: i,
|
|
1270
|
+
data: o
|
|
1271
|
+
}));
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
D.prototype[t] = n(), D.prototype[t + "Form"] = n(!0);
|
|
1275
|
+
});
|
|
1276
|
+
const I = D;
|
|
1277
|
+
class ie {
|
|
1278
|
+
constructor(t) {
|
|
1279
|
+
if (typeof t != "function")
|
|
1280
|
+
throw new TypeError("executor must be a function.");
|
|
1281
|
+
let n;
|
|
1282
|
+
this.promise = new Promise(function(i) {
|
|
1283
|
+
n = i;
|
|
1284
|
+
});
|
|
1285
|
+
const r = this;
|
|
1286
|
+
this.promise.then((s) => {
|
|
1287
|
+
if (!r._listeners)
|
|
1288
|
+
return;
|
|
1289
|
+
let i = r._listeners.length;
|
|
1290
|
+
for (; i-- > 0; )
|
|
1291
|
+
r._listeners[i](s);
|
|
1292
|
+
r._listeners = null;
|
|
1293
|
+
}), this.promise.then = (s) => {
|
|
1294
|
+
let i;
|
|
1295
|
+
const o = new Promise((c) => {
|
|
1296
|
+
r.subscribe(c), i = c;
|
|
1297
|
+
}).then(s);
|
|
1298
|
+
return o.cancel = function() {
|
|
1299
|
+
r.unsubscribe(i);
|
|
1300
|
+
}, o;
|
|
1301
|
+
}, t(function(i, o, c) {
|
|
1302
|
+
r.reason || (r.reason = new _(i, o, c), n(r.reason));
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1307
|
+
*/
|
|
1308
|
+
throwIfRequested() {
|
|
1309
|
+
if (this.reason)
|
|
1310
|
+
throw this.reason;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Subscribe to the cancel signal
|
|
1314
|
+
*/
|
|
1315
|
+
subscribe(t) {
|
|
1316
|
+
if (this.reason) {
|
|
1317
|
+
t(this.reason);
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Unsubscribe from the cancel signal
|
|
1324
|
+
*/
|
|
1325
|
+
unsubscribe(t) {
|
|
1326
|
+
if (!this._listeners)
|
|
1327
|
+
return;
|
|
1328
|
+
const n = this._listeners.indexOf(t);
|
|
1329
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1333
|
+
* cancels the `CancelToken`.
|
|
1334
|
+
*/
|
|
1335
|
+
static source() {
|
|
1336
|
+
let t;
|
|
1337
|
+
return {
|
|
1338
|
+
token: new ie(function(s) {
|
|
1339
|
+
t = s;
|
|
1340
|
+
}),
|
|
1341
|
+
cancel: t
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
const en = ie;
|
|
1346
|
+
function tn(e) {
|
|
1347
|
+
return function(n) {
|
|
1348
|
+
return e.apply(null, n);
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
function nn(e) {
|
|
1352
|
+
return a.isObject(e) && e.isAxiosError === !0;
|
|
1353
|
+
}
|
|
1354
|
+
const Z = {
|
|
1355
|
+
Continue: 100,
|
|
1356
|
+
SwitchingProtocols: 101,
|
|
1357
|
+
Processing: 102,
|
|
1358
|
+
EarlyHints: 103,
|
|
1359
|
+
Ok: 200,
|
|
1360
|
+
Created: 201,
|
|
1361
|
+
Accepted: 202,
|
|
1362
|
+
NonAuthoritativeInformation: 203,
|
|
1363
|
+
NoContent: 204,
|
|
1364
|
+
ResetContent: 205,
|
|
1365
|
+
PartialContent: 206,
|
|
1366
|
+
MultiStatus: 207,
|
|
1367
|
+
AlreadyReported: 208,
|
|
1368
|
+
ImUsed: 226,
|
|
1369
|
+
MultipleChoices: 300,
|
|
1370
|
+
MovedPermanently: 301,
|
|
1371
|
+
Found: 302,
|
|
1372
|
+
SeeOther: 303,
|
|
1373
|
+
NotModified: 304,
|
|
1374
|
+
UseProxy: 305,
|
|
1375
|
+
Unused: 306,
|
|
1376
|
+
TemporaryRedirect: 307,
|
|
1377
|
+
PermanentRedirect: 308,
|
|
1378
|
+
BadRequest: 400,
|
|
1379
|
+
Unauthorized: 401,
|
|
1380
|
+
PaymentRequired: 402,
|
|
1381
|
+
Forbidden: 403,
|
|
1382
|
+
NotFound: 404,
|
|
1383
|
+
MethodNotAllowed: 405,
|
|
1384
|
+
NotAcceptable: 406,
|
|
1385
|
+
ProxyAuthenticationRequired: 407,
|
|
1386
|
+
RequestTimeout: 408,
|
|
1387
|
+
Conflict: 409,
|
|
1388
|
+
Gone: 410,
|
|
1389
|
+
LengthRequired: 411,
|
|
1390
|
+
PreconditionFailed: 412,
|
|
1391
|
+
PayloadTooLarge: 413,
|
|
1392
|
+
UriTooLong: 414,
|
|
1393
|
+
UnsupportedMediaType: 415,
|
|
1394
|
+
RangeNotSatisfiable: 416,
|
|
1395
|
+
ExpectationFailed: 417,
|
|
1396
|
+
ImATeapot: 418,
|
|
1397
|
+
MisdirectedRequest: 421,
|
|
1398
|
+
UnprocessableEntity: 422,
|
|
1399
|
+
Locked: 423,
|
|
1400
|
+
FailedDependency: 424,
|
|
1401
|
+
TooEarly: 425,
|
|
1402
|
+
UpgradeRequired: 426,
|
|
1403
|
+
PreconditionRequired: 428,
|
|
1404
|
+
TooManyRequests: 429,
|
|
1405
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1406
|
+
UnavailableForLegalReasons: 451,
|
|
1407
|
+
InternalServerError: 500,
|
|
1408
|
+
NotImplemented: 501,
|
|
1409
|
+
BadGateway: 502,
|
|
1410
|
+
ServiceUnavailable: 503,
|
|
1411
|
+
GatewayTimeout: 504,
|
|
1412
|
+
HttpVersionNotSupported: 505,
|
|
1413
|
+
VariantAlsoNegotiates: 506,
|
|
1414
|
+
InsufficientStorage: 507,
|
|
1415
|
+
LoopDetected: 508,
|
|
1416
|
+
NotExtended: 510,
|
|
1417
|
+
NetworkAuthenticationRequired: 511
|
|
1418
|
+
};
|
|
1419
|
+
Object.entries(Z).forEach(([e, t]) => {
|
|
1420
|
+
Z[t] = e;
|
|
1421
|
+
});
|
|
1422
|
+
const rn = Z;
|
|
1423
|
+
function He(e) {
|
|
1424
|
+
const t = new I(e), n = be(I.prototype.request, t);
|
|
1425
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1426
|
+
return He(N(e, s));
|
|
1427
|
+
}, n;
|
|
1428
|
+
}
|
|
1429
|
+
const y = He(se);
|
|
1430
|
+
y.Axios = I;
|
|
1431
|
+
y.CanceledError = _;
|
|
1432
|
+
y.CancelToken = en;
|
|
1433
|
+
y.isCancel = Le;
|
|
1434
|
+
y.VERSION = De;
|
|
1435
|
+
y.toFormData = z;
|
|
1436
|
+
y.AxiosError = m;
|
|
1437
|
+
y.Cancel = y.CanceledError;
|
|
1438
|
+
y.all = function(t) {
|
|
1439
|
+
return Promise.all(t);
|
|
7
1440
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1441
|
+
y.spread = tn;
|
|
1442
|
+
y.isAxiosError = nn;
|
|
1443
|
+
y.mergeConfig = N;
|
|
1444
|
+
y.AxiosHeaders = A;
|
|
1445
|
+
y.formToJSON = (e) => ke(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1446
|
+
y.getAdapter = Ie.getAdapter;
|
|
1447
|
+
y.HttpStatusCode = rn;
|
|
1448
|
+
y.default = y;
|
|
1449
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
1450
|
+
function k(e) {
|
|
1451
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1452
|
+
var n = arguments[t];
|
|
1453
|
+
for (var r in n)
|
|
1454
|
+
e[r] = n[r];
|
|
1455
|
+
}
|
|
1456
|
+
return e;
|
|
1457
|
+
}
|
|
1458
|
+
var sn = {
|
|
1459
|
+
read: function(e) {
|
|
1460
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1461
|
+
},
|
|
1462
|
+
write: function(e) {
|
|
1463
|
+
return encodeURIComponent(e).replace(
|
|
1464
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
1465
|
+
decodeURIComponent
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
function Y(e, t) {
|
|
1470
|
+
function n(s, i, o) {
|
|
1471
|
+
if (!(typeof document > "u")) {
|
|
1472
|
+
o = k({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1473
|
+
var c = "";
|
|
1474
|
+
for (var f in o)
|
|
1475
|
+
o[f] && (c += "; " + f, o[f] !== !0 && (c += "=" + o[f].split(";")[0]));
|
|
1476
|
+
return document.cookie = s + "=" + e.write(i, s) + c;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
function r(s) {
|
|
1480
|
+
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
1481
|
+
for (var i = document.cookie ? document.cookie.split("; ") : [], o = {}, c = 0; c < i.length; c++) {
|
|
1482
|
+
var f = i[c].split("="), h = f.slice(1).join("=");
|
|
1483
|
+
try {
|
|
1484
|
+
var l = decodeURIComponent(f[0]);
|
|
1485
|
+
if (o[l] = e.read(h, l), s === l)
|
|
1486
|
+
break;
|
|
1487
|
+
} catch {
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
return s ? o[s] : o;
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
return Object.create(
|
|
1494
|
+
{
|
|
1495
|
+
set: n,
|
|
1496
|
+
get: r,
|
|
1497
|
+
remove: function(s, i) {
|
|
1498
|
+
n(
|
|
1499
|
+
s,
|
|
1500
|
+
"",
|
|
1501
|
+
k({}, i, {
|
|
1502
|
+
expires: -1
|
|
1503
|
+
})
|
|
1504
|
+
);
|
|
1505
|
+
},
|
|
1506
|
+
withAttributes: function(s) {
|
|
1507
|
+
return Y(this.converter, k({}, this.attributes, s));
|
|
1508
|
+
},
|
|
1509
|
+
withConverter: function(s) {
|
|
1510
|
+
return Y(k({}, this.converter, s), this.attributes);
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
attributes: { value: Object.freeze(t) },
|
|
1515
|
+
converter: { value: Object.freeze(e) }
|
|
1516
|
+
}
|
|
1517
|
+
);
|
|
1518
|
+
}
|
|
1519
|
+
var ee = Y(sn, { path: "/" });
|
|
1520
|
+
const on = (e) => {
|
|
1521
|
+
var t = encodeURIComponent(e);
|
|
1522
|
+
return t = btoa(t), t;
|
|
1523
|
+
}, ae = () => {
|
|
1524
|
+
let t = { ...(window == null ? void 0 : window.config) || {} };
|
|
1525
|
+
t.rootContainer || (t.rootContainer = "#app"), t.baseURL || (t.baseURL = location.origin), t.ossBaseURL || (t.ossBaseURL = "/oss"), t.ossBaseURL.startsWith("/") && (t.ossBaseURL = `${t.baseURL}/oss`), t.ssoBaseURL || (t.ssoBaseURL = t.baseURL);
|
|
1526
|
+
let { microAppName: n, publicPath: r, mainAppName: s } = t;
|
|
1527
|
+
return n && !0 && !r && (r = `/${n}/`.replace(/\/\//g, "/")), r || (r = "/"), t.publicPath = r, t.autoOssBucket || (t.autoOssBucket = s || n), t;
|
|
1528
|
+
};
|
|
1529
|
+
Me(!1);
|
|
1530
|
+
ae();
|
|
1531
|
+
on("das123"), +/* @__PURE__ */ new Date();
|
|
1532
|
+
const an = () => {
|
|
1533
|
+
const e = new URL(location.href).searchParams, t = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
1534
|
+
if (t) {
|
|
1535
|
+
const n = JSON.stringify({ access_token: t });
|
|
1536
|
+
sessionStorage.setItem("accessToken", t), sessionStorage.setItem("tokenInfo", n), ee.set("accessToken", t), ee.set("accessTokenInfo", n);
|
|
1537
|
+
}
|
|
1538
|
+
}, cn = () => {
|
|
1539
|
+
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), t = new URL(location.href).searchParams, n = t.get("project") || t.get("projectId") || "";
|
|
1540
|
+
if (!n)
|
|
1541
|
+
return;
|
|
1542
|
+
const r = t.get("projectParent") || t.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", s = t.get("projectName") || (e == null ? void 0 : e.name) || "";
|
|
1543
|
+
sessionStorage.setItem("project", n), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: n, name: s, parentId: r }));
|
|
1544
|
+
}, un = () => ee.get("accessToken") ?? "", ln = () => {
|
|
1545
|
+
const e = ae(), t = (e == null ? void 0 : e.infoStrict) ?? !0;
|
|
1546
|
+
let n = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
1547
|
+
return t || e.projectInfo && (n = e.projectInfo), {
|
|
1548
|
+
id: (n == null ? void 0 : n.id) ?? "",
|
|
1549
|
+
parentId: (n == null ? void 0 : n.parentId) ?? "",
|
|
1550
|
+
name: (n == null ? void 0 : n.name) ?? "",
|
|
1551
|
+
tenantId: (n == null ? void 0 : n.tenant) ?? ""
|
|
1552
|
+
};
|
|
1553
|
+
};
|
|
1554
|
+
un() || an();
|
|
1555
|
+
cn();
|
|
1556
|
+
const fn = {
|
|
1557
|
+
personalInfo: "/api/personal-center/personal-server/v1/info"
|
|
1558
|
+
}, pn = async (e) => {
|
|
1559
|
+
var n;
|
|
1560
|
+
const t = await y.create().get(fn.personalInfo, {
|
|
1561
|
+
baseURL: ae().baseURL,
|
|
11
1562
|
params: {
|
|
12
|
-
project:
|
|
1563
|
+
project: ((n = ln()) == null ? void 0 : n.id) || "",
|
|
13
1564
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
14
1565
|
},
|
|
15
1566
|
headers: {
|
|
16
|
-
Authorization: `Bearer ${
|
|
1567
|
+
Authorization: `Bearer ${e}`
|
|
17
1568
|
}
|
|
18
1569
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1570
|
+
t != null && t.data && sessionStorage.setItem("userInfo", JSON.stringify(t.data));
|
|
1571
|
+
};
|
|
1572
|
+
export {
|
|
1573
|
+
pn as setPersonalInfo
|
|
22
1574
|
};
|
|
23
|
-
|
|
24
|
-
export { setPersonalInfo };
|