@vtj/utils 0.7.11 → 0.7.12
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/dist/index.cjs +7 -7
- package/dist/index.iife.js +20 -20
- package/dist/index.mjs +409 -400
- package/dist/index.umd.js +20 -20
- package/package.json +5 -6
- package/types/logger.d.ts +20 -2
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { omit as
|
|
1
|
+
import { omit as V, merge as N, debounce as Ye, throttle as Ze, template as Ce, uuid as et, rURL as tt } from "@vtj/base";
|
|
2
2
|
export * from "@vtj/base";
|
|
3
3
|
/**!
|
|
4
4
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
5
5
|
* @name @vtj/utils
|
|
6
6
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
7
|
-
* @version 0.7.
|
|
7
|
+
* @version 0.7.12
|
|
8
8
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const Gn = "0.7.12";
|
|
11
11
|
function _e(e, t) {
|
|
12
12
|
return function() {
|
|
13
13
|
return e.apply(t, arguments);
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
const { toString:
|
|
17
|
-
const n =
|
|
16
|
+
const { toString: nt } = Object.prototype, { getPrototypeOf: ie } = Object, q = /* @__PURE__ */ ((e) => (t) => {
|
|
17
|
+
const n = nt.call(t);
|
|
18
18
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
19
|
-
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) =>
|
|
20
|
-
function
|
|
21
|
-
return e !== null && !k(e) && e.constructor !== null && !k(e.constructor) &&
|
|
19
|
+
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => q(t) === e), M = (e) => (t) => typeof t === e, { isArray: P } = Array, k = M("undefined");
|
|
20
|
+
function rt(e) {
|
|
21
|
+
return e !== null && !k(e) && e.constructor !== null && !k(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const Pe = T("ArrayBuffer");
|
|
24
|
+
function st(e) {
|
|
25
25
|
let t;
|
|
26
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
26
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Pe(e.buffer), t;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
28
|
+
const ot = M("string"), O = M("function"), je = M("number"), J = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, B = (e) => {
|
|
29
|
+
if (q(e) !== "object")
|
|
30
30
|
return !1;
|
|
31
|
-
const t =
|
|
31
|
+
const t = ie(e);
|
|
32
32
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
33
|
-
},
|
|
33
|
+
}, at = T("Date"), ct = T("File"), ut = T("Blob"), lt = T("FileList"), ft = (e) => J(e) && O(e.pipe), dt = (e) => {
|
|
34
34
|
let t;
|
|
35
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
36
|
-
t === "object" &&
|
|
37
|
-
},
|
|
38
|
-
function
|
|
35
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = q(e)) === "formdata" || // detect form-data instance
|
|
36
|
+
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
37
|
+
}, pt = T("URLSearchParams"), ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
38
|
+
function L(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
39
39
|
if (e === null || typeof e > "u")
|
|
40
40
|
return;
|
|
41
41
|
let r, s;
|
|
42
|
-
if (typeof e != "object" && (e = [e]),
|
|
42
|
+
if (typeof e != "object" && (e = [e]), P(e))
|
|
43
43
|
for (r = 0, s = e.length; r < s; r++)
|
|
44
44
|
t.call(null, e[r], r, e);
|
|
45
45
|
else {
|
|
@@ -49,7 +49,7 @@ function F(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
49
49
|
c = o[r], t.call(null, e[c], c, e);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Ne(e, t) {
|
|
53
53
|
t = t.toLowerCase();
|
|
54
54
|
const n = Object.keys(e);
|
|
55
55
|
let r = n.length, s;
|
|
@@ -58,23 +58,23 @@ function ke(e, t) {
|
|
|
58
58
|
return s;
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
function
|
|
61
|
+
const ke = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !k(e) && e !== ke;
|
|
62
|
+
function Y() {
|
|
63
63
|
const { caseless: e } = Fe(this) && this || {}, t = {}, n = (r, s) => {
|
|
64
|
-
const o = e &&
|
|
65
|
-
B(t[o]) && B(r) ? t[o] =
|
|
64
|
+
const o = e && Ne(t, s) || s;
|
|
65
|
+
B(t[o]) && B(r) ? t[o] = Y(t[o], r) : B(r) ? t[o] = Y({}, r) : P(r) ? t[o] = r.slice() : t[o] = r;
|
|
66
66
|
};
|
|
67
67
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
68
|
-
arguments[r] &&
|
|
68
|
+
arguments[r] && L(arguments[r], n);
|
|
69
69
|
return t;
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
n &&
|
|
73
|
-
}, { allOwnKeys: r }), e),
|
|
71
|
+
const mt = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
72
|
+
n && O(s) ? e[o] = _e(s, n) : e[o] = s;
|
|
73
|
+
}, { allOwnKeys: r }), e), yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wt = (e, t, n, r) => {
|
|
74
74
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
75
75
|
value: t.prototype
|
|
76
76
|
}), n && Object.assign(e.prototype, n);
|
|
77
|
-
},
|
|
77
|
+
}, gt = (e, t, n, r) => {
|
|
78
78
|
let s, o, i;
|
|
79
79
|
const c = {};
|
|
80
80
|
if (t = t || {}, e == null)
|
|
@@ -82,55 +82,55 @@ const yt = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, o) => {
|
|
|
82
82
|
do {
|
|
83
83
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
84
84
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
85
|
-
e = n !== !1 &&
|
|
85
|
+
e = n !== !1 && ie(e);
|
|
86
86
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
87
87
|
return t;
|
|
88
|
-
},
|
|
88
|
+
}, bt = (e, t, n) => {
|
|
89
89
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
90
90
|
const r = e.indexOf(t, n);
|
|
91
91
|
return r !== -1 && r === n;
|
|
92
|
-
},
|
|
92
|
+
}, Et = (e) => {
|
|
93
93
|
if (!e)
|
|
94
94
|
return null;
|
|
95
|
-
if (
|
|
95
|
+
if (P(e))
|
|
96
96
|
return e;
|
|
97
97
|
let t = e.length;
|
|
98
|
-
if (!
|
|
98
|
+
if (!je(t))
|
|
99
99
|
return null;
|
|
100
100
|
const n = new Array(t);
|
|
101
101
|
for (; t-- > 0; )
|
|
102
102
|
n[t] = e[t];
|
|
103
103
|
return n;
|
|
104
|
-
},
|
|
104
|
+
}, St = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), Rt = (e, t) => {
|
|
105
105
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
106
106
|
let s;
|
|
107
107
|
for (; (s = r.next()) && !s.done; ) {
|
|
108
108
|
const o = s.value;
|
|
109
109
|
t.call(e, o[0], o[1]);
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ot = (e, t) => {
|
|
112
112
|
let n;
|
|
113
113
|
const r = [];
|
|
114
114
|
for (; (n = e.exec(t)) !== null; )
|
|
115
115
|
r.push(n);
|
|
116
116
|
return r;
|
|
117
|
-
},
|
|
117
|
+
}, At = T("HTMLFormElement"), Tt = (e) => e.toLowerCase().replace(
|
|
118
118
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
119
119
|
function(n, r, s) {
|
|
120
120
|
return r.toUpperCase() + s;
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = T("RegExp"), Le = (e, t) => {
|
|
123
123
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
124
|
-
|
|
124
|
+
L(n, (s, o) => {
|
|
125
125
|
let i;
|
|
126
126
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
127
127
|
}), Object.defineProperties(e, r);
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
if (
|
|
128
|
+
}, Ct = (e) => {
|
|
129
|
+
Le(e, (t, n) => {
|
|
130
|
+
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
131
131
|
return !1;
|
|
132
132
|
const r = e[n];
|
|
133
|
-
if (
|
|
133
|
+
if (O(r)) {
|
|
134
134
|
if (t.enumerable = !1, "writable" in t) {
|
|
135
135
|
t.writable = !1;
|
|
136
136
|
return;
|
|
@@ -146,21 +146,21 @@ const yt = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, o) => {
|
|
|
146
146
|
n[o] = !0;
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
|
-
return
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
DIGIT:
|
|
153
|
-
ALPHA:
|
|
154
|
-
ALPHA_DIGIT:
|
|
155
|
-
},
|
|
149
|
+
return P(e) ? r(e) : r(String(e).split(t)), n;
|
|
150
|
+
}, Pt = () => {
|
|
151
|
+
}, jt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), K = "abcdefghijklmnopqrstuvwxyz", he = "0123456789", De = {
|
|
152
|
+
DIGIT: he,
|
|
153
|
+
ALPHA: K,
|
|
154
|
+
ALPHA_DIGIT: K + K.toUpperCase() + he
|
|
155
|
+
}, Nt = (e = 16, t = De.ALPHA_DIGIT) => {
|
|
156
156
|
let n = "";
|
|
157
157
|
const { length: r } = t;
|
|
158
158
|
for (; e--; )
|
|
159
159
|
n += t[Math.random() * r | 0];
|
|
160
160
|
return n;
|
|
161
161
|
};
|
|
162
|
-
function
|
|
163
|
-
return !!(e &&
|
|
162
|
+
function kt(e) {
|
|
163
|
+
return !!(e && O(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
164
164
|
}
|
|
165
165
|
const Ft = (e) => {
|
|
166
166
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -169,8 +169,8 @@ const Ft = (e) => {
|
|
|
169
169
|
return;
|
|
170
170
|
if (!("toJSON" in r)) {
|
|
171
171
|
t[s] = r;
|
|
172
|
-
const o =
|
|
173
|
-
return
|
|
172
|
+
const o = P(r) ? [] : {};
|
|
173
|
+
return L(r, (i, c) => {
|
|
174
174
|
const f = n(i, s + 1);
|
|
175
175
|
!k(f) && (o[c] = f);
|
|
176
176
|
}), t[s] = void 0, o;
|
|
@@ -179,59 +179,59 @@ const Ft = (e) => {
|
|
|
179
179
|
return r;
|
|
180
180
|
};
|
|
181
181
|
return n(e, 0);
|
|
182
|
-
},
|
|
183
|
-
isArray:
|
|
184
|
-
isArrayBuffer:
|
|
185
|
-
isBuffer:
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
189
|
-
isNumber:
|
|
190
|
-
isBoolean:
|
|
182
|
+
}, Lt = T("AsyncFunction"), Dt = (e) => e && (J(e) || O(e)) && O(e.then) && O(e.catch), a = {
|
|
183
|
+
isArray: P,
|
|
184
|
+
isArrayBuffer: Pe,
|
|
185
|
+
isBuffer: rt,
|
|
186
|
+
isFormData: dt,
|
|
187
|
+
isArrayBufferView: st,
|
|
188
|
+
isString: ot,
|
|
189
|
+
isNumber: je,
|
|
190
|
+
isBoolean: it,
|
|
191
191
|
isObject: J,
|
|
192
192
|
isPlainObject: B,
|
|
193
193
|
isUndefined: k,
|
|
194
|
-
isDate:
|
|
195
|
-
isFile:
|
|
196
|
-
isBlob:
|
|
197
|
-
isRegExp:
|
|
198
|
-
isFunction:
|
|
199
|
-
isStream:
|
|
200
|
-
isURLSearchParams:
|
|
201
|
-
isTypedArray:
|
|
202
|
-
isFileList:
|
|
203
|
-
forEach:
|
|
204
|
-
merge:
|
|
205
|
-
extend:
|
|
206
|
-
trim:
|
|
207
|
-
stripBOM:
|
|
208
|
-
inherits:
|
|
209
|
-
toFlatObject:
|
|
210
|
-
kindOf:
|
|
194
|
+
isDate: at,
|
|
195
|
+
isFile: ct,
|
|
196
|
+
isBlob: ut,
|
|
197
|
+
isRegExp: xt,
|
|
198
|
+
isFunction: O,
|
|
199
|
+
isStream: ft,
|
|
200
|
+
isURLSearchParams: pt,
|
|
201
|
+
isTypedArray: St,
|
|
202
|
+
isFileList: lt,
|
|
203
|
+
forEach: L,
|
|
204
|
+
merge: Y,
|
|
205
|
+
extend: mt,
|
|
206
|
+
trim: ht,
|
|
207
|
+
stripBOM: yt,
|
|
208
|
+
inherits: wt,
|
|
209
|
+
toFlatObject: gt,
|
|
210
|
+
kindOf: q,
|
|
211
211
|
kindOfTest: T,
|
|
212
|
-
endsWith:
|
|
213
|
-
toArray:
|
|
212
|
+
endsWith: bt,
|
|
213
|
+
toArray: Et,
|
|
214
214
|
forEachEntry: Rt,
|
|
215
|
-
matchAll:
|
|
216
|
-
isHTMLForm:
|
|
217
|
-
hasOwnProperty:
|
|
218
|
-
hasOwnProp:
|
|
215
|
+
matchAll: Ot,
|
|
216
|
+
isHTMLForm: At,
|
|
217
|
+
hasOwnProperty: pe,
|
|
218
|
+
hasOwnProp: pe,
|
|
219
219
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
220
|
-
reduceDescriptors:
|
|
221
|
-
freezeMethods:
|
|
220
|
+
reduceDescriptors: Le,
|
|
221
|
+
freezeMethods: Ct,
|
|
222
222
|
toObjectSet: _t,
|
|
223
|
-
toCamelCase:
|
|
224
|
-
noop:
|
|
225
|
-
toFiniteNumber:
|
|
226
|
-
findKey:
|
|
227
|
-
global:
|
|
223
|
+
toCamelCase: Tt,
|
|
224
|
+
noop: Pt,
|
|
225
|
+
toFiniteNumber: jt,
|
|
226
|
+
findKey: Ne,
|
|
227
|
+
global: ke,
|
|
228
228
|
isContextDefined: Fe,
|
|
229
|
-
ALPHABET:
|
|
230
|
-
generateString:
|
|
231
|
-
isSpecCompliantForm:
|
|
229
|
+
ALPHABET: De,
|
|
230
|
+
generateString: Nt,
|
|
231
|
+
isSpecCompliantForm: kt,
|
|
232
232
|
toJSONObject: Ft,
|
|
233
|
-
isAsyncFn:
|
|
234
|
-
isThenable:
|
|
233
|
+
isAsyncFn: Lt,
|
|
234
|
+
isThenable: Dt
|
|
235
235
|
};
|
|
236
236
|
function m(e, t, n, r, s) {
|
|
237
237
|
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);
|
|
@@ -257,7 +257,7 @@ a.inherits(m, Error, {
|
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
-
const
|
|
260
|
+
const Ue = m.prototype, Be = {};
|
|
261
261
|
[
|
|
262
262
|
"ERR_BAD_OPTION_VALUE",
|
|
263
263
|
"ERR_BAD_OPTION",
|
|
@@ -273,35 +273,35 @@ const Be = m.prototype, ve = {};
|
|
|
273
273
|
"ERR_INVALID_URL"
|
|
274
274
|
// eslint-disable-next-line func-names
|
|
275
275
|
].forEach((e) => {
|
|
276
|
-
|
|
276
|
+
Be[e] = { value: e };
|
|
277
277
|
});
|
|
278
|
-
Object.defineProperties(m,
|
|
279
|
-
Object.defineProperty(
|
|
278
|
+
Object.defineProperties(m, Be);
|
|
279
|
+
Object.defineProperty(Ue, "isAxiosError", { value: !0 });
|
|
280
280
|
m.from = (e, t, n, r, s, o) => {
|
|
281
|
-
const i = Object.create(
|
|
281
|
+
const i = Object.create(Ue);
|
|
282
282
|
return a.toFlatObject(e, i, function(f) {
|
|
283
283
|
return f !== Error.prototype;
|
|
284
284
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
285
285
|
};
|
|
286
|
-
const
|
|
287
|
-
function
|
|
286
|
+
const Ut = null;
|
|
287
|
+
function Z(e) {
|
|
288
288
|
return a.isPlainObject(e) || a.isArray(e);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ve(e) {
|
|
291
291
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function me(e, t, n) {
|
|
294
294
|
return e ? e.concat(t).map(function(s, o) {
|
|
295
|
-
return s =
|
|
295
|
+
return s = ve(s), !n && o ? "[" + s + "]" : s;
|
|
296
296
|
}).join(n ? "." : "") : t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
return a.isArray(e) && !e.some(
|
|
298
|
+
function Bt(e) {
|
|
299
|
+
return a.isArray(e) && !e.some(Z);
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const vt = a.toFlatObject(a, {}, null, function(t) {
|
|
302
302
|
return /^is[A-Z]/.test(t);
|
|
303
303
|
});
|
|
304
|
-
function
|
|
304
|
+
function z(e, t, n) {
|
|
305
305
|
if (!a.isObject(e))
|
|
306
306
|
throw new TypeError("target must be an object");
|
|
307
307
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -328,34 +328,34 @@ function W(e, t, n) {
|
|
|
328
328
|
if (p && !E && typeof p == "object") {
|
|
329
329
|
if (a.endsWith(h, "{}"))
|
|
330
330
|
h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
|
|
331
|
-
else if (a.isArray(p) &&
|
|
332
|
-
return h =
|
|
331
|
+
else if (a.isArray(p) && Bt(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (g = a.toArray(p)))
|
|
332
|
+
return h = ve(h), g.forEach(function(S, $) {
|
|
333
333
|
!(a.isUndefined(S) || S === null) && t.append(
|
|
334
334
|
// eslint-disable-next-line no-nested-ternary
|
|
335
|
-
i === !0 ?
|
|
335
|
+
i === !0 ? me([h], $, o) : i === null ? h : h + "[]",
|
|
336
336
|
d(S)
|
|
337
337
|
);
|
|
338
338
|
}), !1;
|
|
339
339
|
}
|
|
340
|
-
return
|
|
340
|
+
return Z(p) ? !0 : (t.append(me(E, h, o), d(p)), !1);
|
|
341
341
|
}
|
|
342
|
-
const u = [], y = Object.assign(
|
|
342
|
+
const u = [], y = Object.assign(vt, {
|
|
343
343
|
defaultVisitor: l,
|
|
344
344
|
convertValue: d,
|
|
345
|
-
isVisitable:
|
|
345
|
+
isVisitable: Z
|
|
346
346
|
});
|
|
347
347
|
function w(p, h) {
|
|
348
348
|
if (!a.isUndefined(p)) {
|
|
349
349
|
if (u.indexOf(p) !== -1)
|
|
350
350
|
throw Error("Circular reference detected in " + h.join("."));
|
|
351
|
-
u.push(p), a.forEach(p, function(g,
|
|
351
|
+
u.push(p), a.forEach(p, function(g, R) {
|
|
352
352
|
(!(a.isUndefined(g) || g === null) && s.call(
|
|
353
353
|
t,
|
|
354
354
|
g,
|
|
355
|
-
a.isString(
|
|
355
|
+
a.isString(R) ? R.trim() : R,
|
|
356
356
|
h,
|
|
357
357
|
y
|
|
358
|
-
)) === !0 && w(g, h ? h.concat(
|
|
358
|
+
)) === !0 && w(g, h ? h.concat(R) : [R]);
|
|
359
359
|
}), u.pop();
|
|
360
360
|
}
|
|
361
361
|
}
|
|
@@ -363,7 +363,7 @@ function W(e, t, n) {
|
|
|
363
363
|
throw new TypeError("data must be an object");
|
|
364
364
|
return w(e), t;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function ye(e) {
|
|
367
367
|
const t = {
|
|
368
368
|
"!": "%21",
|
|
369
369
|
"'": "%27",
|
|
@@ -377,36 +377,36 @@ function ge(e) {
|
|
|
377
377
|
return t[r];
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
this._pairs = [], e &&
|
|
380
|
+
function ae(e, t) {
|
|
381
|
+
this._pairs = [], e && z(e, this, t);
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
|
|
383
|
+
const Ie = ae.prototype;
|
|
384
|
+
Ie.append = function(t, n) {
|
|
385
385
|
this._pairs.push([t, n]);
|
|
386
386
|
};
|
|
387
|
-
|
|
387
|
+
Ie.toString = function(t) {
|
|
388
388
|
const n = t ? function(r) {
|
|
389
|
-
return t.call(this, r,
|
|
390
|
-
} :
|
|
389
|
+
return t.call(this, r, ye);
|
|
390
|
+
} : ye;
|
|
391
391
|
return this._pairs.map(function(s) {
|
|
392
392
|
return n(s[0]) + "=" + n(s[1]);
|
|
393
393
|
}, "").join("&");
|
|
394
394
|
};
|
|
395
|
-
function
|
|
395
|
+
function It(e) {
|
|
396
396
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function He(e, t, n) {
|
|
399
399
|
if (!t)
|
|
400
400
|
return e;
|
|
401
|
-
const r = n && n.encode ||
|
|
401
|
+
const r = n && n.encode || It, s = n && n.serialize;
|
|
402
402
|
let o;
|
|
403
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
403
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ae(t, n).toString(r), o) {
|
|
404
404
|
const i = e.indexOf("#");
|
|
405
405
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
406
406
|
}
|
|
407
407
|
return e;
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class we {
|
|
410
410
|
constructor() {
|
|
411
411
|
this.handlers = [];
|
|
412
412
|
}
|
|
@@ -460,39 +460,39 @@ class be {
|
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const qe = {
|
|
464
464
|
silentJSONParsing: !0,
|
|
465
465
|
forcedJSONParsing: !0,
|
|
466
466
|
clarifyTimeoutError: !1
|
|
467
|
-
},
|
|
467
|
+
}, Ht = typeof URLSearchParams < "u" ? URLSearchParams : ae, qt = typeof FormData < "u" ? FormData : null, Mt = typeof Blob < "u" ? Blob : null, Jt = {
|
|
468
468
|
isBrowser: !0,
|
|
469
469
|
classes: {
|
|
470
|
-
URLSearchParams:
|
|
471
|
-
FormData:
|
|
472
|
-
Blob:
|
|
470
|
+
URLSearchParams: Ht,
|
|
471
|
+
FormData: qt,
|
|
472
|
+
Blob: Mt
|
|
473
473
|
},
|
|
474
474
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
475
|
-
},
|
|
476
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
475
|
+
}, Me = typeof window < "u" && typeof document < "u", zt = ((e) => Me && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Wt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
476
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
477
477
|
__proto__: null,
|
|
478
|
-
hasBrowserEnv:
|
|
479
|
-
hasStandardBrowserEnv:
|
|
480
|
-
hasStandardBrowserWebWorkerEnv:
|
|
478
|
+
hasBrowserEnv: Me,
|
|
479
|
+
hasStandardBrowserEnv: zt,
|
|
480
|
+
hasStandardBrowserWebWorkerEnv: Wt
|
|
481
481
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
482
|
-
|
|
482
|
+
...$t,
|
|
483
483
|
...Jt
|
|
484
484
|
};
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Vt(e, t) {
|
|
486
|
+
return z(e, new A.classes.URLSearchParams(), Object.assign({
|
|
487
487
|
visitor: function(n, r, s, o) {
|
|
488
488
|
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
489
489
|
}
|
|
490
490
|
}, t));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Kt(e) {
|
|
493
493
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Gt(e) {
|
|
496
496
|
const t = {}, n = Object.keys(e);
|
|
497
497
|
let r;
|
|
498
498
|
const s = n.length;
|
|
@@ -507,17 +507,17 @@ function Je(e) {
|
|
|
507
507
|
if (i === "__proto__")
|
|
508
508
|
return !0;
|
|
509
509
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
510
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
510
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Gt(s[i])), !c);
|
|
511
511
|
}
|
|
512
512
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
513
513
|
const n = {};
|
|
514
514
|
return a.forEachEntry(e, (r, s) => {
|
|
515
|
-
t(
|
|
515
|
+
t(Kt(r), s, n, 0);
|
|
516
516
|
}), n;
|
|
517
517
|
}
|
|
518
518
|
return null;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Xt(e, t, n) {
|
|
521
521
|
if (a.isString(e))
|
|
522
522
|
try {
|
|
523
523
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -527,8 +527,8 @@ function Qt(e, t, n) {
|
|
|
527
527
|
}
|
|
528
528
|
return (n || JSON.stringify)(e);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
transitional:
|
|
530
|
+
const ce = {
|
|
531
|
+
transitional: qe,
|
|
532
532
|
adapter: ["xhr", "http"],
|
|
533
533
|
transformRequest: [function(t, n) {
|
|
534
534
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
@@ -543,20 +543,20 @@ const le = {
|
|
|
543
543
|
let c;
|
|
544
544
|
if (o) {
|
|
545
545
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
546
|
-
return
|
|
546
|
+
return Vt(t, this.formSerializer).toString();
|
|
547
547
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
548
548
|
const f = this.env && this.env.FormData;
|
|
549
|
-
return
|
|
549
|
+
return z(
|
|
550
550
|
c ? { "files[]": t } : t,
|
|
551
551
|
f && new f(),
|
|
552
552
|
this.formSerializer
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
556
|
+
return o || s ? (n.setContentType("application/json", !1), Xt(t)) : t;
|
|
557
557
|
}],
|
|
558
558
|
transformResponse: [function(t) {
|
|
559
|
-
const n = this.transitional ||
|
|
559
|
+
const n = this.transitional || ce.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
560
560
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
561
561
|
const i = !(n && n.silentJSONParsing) && s;
|
|
562
562
|
try {
|
|
@@ -592,9 +592,9 @@ const le = {
|
|
|
592
592
|
}
|
|
593
593
|
};
|
|
594
594
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
595
|
-
|
|
595
|
+
ce.headers[e] = {};
|
|
596
596
|
});
|
|
597
|
-
const
|
|
597
|
+
const ue = ce, Qt = a.toObjectSet([
|
|
598
598
|
"age",
|
|
599
599
|
"authorization",
|
|
600
600
|
"content-length",
|
|
@@ -612,29 +612,29 @@ const fe = le, Yt = a.toObjectSet([
|
|
|
612
612
|
"referer",
|
|
613
613
|
"retry-after",
|
|
614
614
|
"user-agent"
|
|
615
|
-
]),
|
|
615
|
+
]), Yt = (e) => {
|
|
616
616
|
const t = {};
|
|
617
617
|
let n, r, s;
|
|
618
618
|
return e && e.split(`
|
|
619
619
|
`).forEach(function(i) {
|
|
620
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
620
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Qt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
621
621
|
}), t;
|
|
622
|
-
},
|
|
622
|
+
}, ge = Symbol("internals");
|
|
623
623
|
function j(e) {
|
|
624
624
|
return e && String(e).trim().toLowerCase();
|
|
625
625
|
}
|
|
626
626
|
function v(e) {
|
|
627
627
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(v) : String(e);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Zt(e) {
|
|
630
630
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
631
631
|
let r;
|
|
632
632
|
for (; r = n.exec(e); )
|
|
633
633
|
t[r[1]] = r[2];
|
|
634
634
|
return t;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
637
|
-
function
|
|
636
|
+
const en = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
637
|
+
function G(e, t, n, r, s) {
|
|
638
638
|
if (a.isFunction(r))
|
|
639
639
|
return r.call(this, t, n);
|
|
640
640
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -644,10 +644,10 @@ function X(e, t, n, r, s) {
|
|
|
644
644
|
return r.test(t);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function tn(e) {
|
|
648
648
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function nn(e, t) {
|
|
651
651
|
const n = a.toCamelCase(" " + t);
|
|
652
652
|
["get", "set", "has"].forEach((r) => {
|
|
653
653
|
Object.defineProperty(e, r + n, {
|
|
@@ -658,7 +658,7 @@ function rn(e, t) {
|
|
|
658
658
|
});
|
|
659
659
|
});
|
|
660
660
|
}
|
|
661
|
-
class
|
|
661
|
+
class W {
|
|
662
662
|
constructor(t) {
|
|
663
663
|
t && this.set(t);
|
|
664
664
|
}
|
|
@@ -672,7 +672,7 @@ class $ {
|
|
|
672
672
|
(!u || s[u] === void 0 || d === !0 || d === void 0 && s[u] !== !1) && (s[u || f] = v(c));
|
|
673
673
|
}
|
|
674
674
|
const i = (c, f) => a.forEach(c, (d, l) => o(d, l, f));
|
|
675
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
675
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !en(t) ? i(Yt(t), n) : t != null && o(n, t, r), this;
|
|
676
676
|
}
|
|
677
677
|
get(t, n) {
|
|
678
678
|
if (t = j(t), t) {
|
|
@@ -682,7 +682,7 @@ class $ {
|
|
|
682
682
|
if (!n)
|
|
683
683
|
return s;
|
|
684
684
|
if (n === !0)
|
|
685
|
-
return
|
|
685
|
+
return Zt(s);
|
|
686
686
|
if (a.isFunction(n))
|
|
687
687
|
return n.call(this, s, r);
|
|
688
688
|
if (a.isRegExp(n))
|
|
@@ -694,7 +694,7 @@ class $ {
|
|
|
694
694
|
has(t, n) {
|
|
695
695
|
if (t = j(t), t) {
|
|
696
696
|
const r = a.findKey(this, t);
|
|
697
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
697
|
+
return !!(r && this[r] !== void 0 && (!n || G(this, this[r], r, n)));
|
|
698
698
|
}
|
|
699
699
|
return !1;
|
|
700
700
|
}
|
|
@@ -704,7 +704,7 @@ class $ {
|
|
|
704
704
|
function o(i) {
|
|
705
705
|
if (i = j(i), i) {
|
|
706
706
|
const c = a.findKey(r, i);
|
|
707
|
-
c && (!n ||
|
|
707
|
+
c && (!n || G(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -714,7 +714,7 @@ class $ {
|
|
|
714
714
|
let r = n.length, s = !1;
|
|
715
715
|
for (; r--; ) {
|
|
716
716
|
const o = n[r];
|
|
717
|
-
(!t ||
|
|
717
|
+
(!t || G(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
718
718
|
}
|
|
719
719
|
return s;
|
|
720
720
|
}
|
|
@@ -726,7 +726,7 @@ class $ {
|
|
|
726
726
|
n[i] = v(s), delete n[o];
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
-
const c = t ?
|
|
729
|
+
const c = t ? tn(o) : String(o).trim();
|
|
730
730
|
c !== o && delete n[o], n[c] = v(s), r[c] = !0;
|
|
731
731
|
}), this;
|
|
732
732
|
}
|
|
@@ -757,18 +757,18 @@ class $ {
|
|
|
757
757
|
return n.forEach((s) => r.set(s)), r;
|
|
758
758
|
}
|
|
759
759
|
static accessor(t) {
|
|
760
|
-
const r = (this[
|
|
760
|
+
const r = (this[ge] = this[ge] = {
|
|
761
761
|
accessors: {}
|
|
762
762
|
}).accessors, s = this.prototype;
|
|
763
763
|
function o(i) {
|
|
764
764
|
const c = j(i);
|
|
765
|
-
r[c] || (
|
|
765
|
+
r[c] || (nn(s, i), r[c] = !0);
|
|
766
766
|
}
|
|
767
767
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
|
|
771
|
-
a.reduceDescriptors(
|
|
770
|
+
W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
771
|
+
a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
|
|
772
772
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
773
773
|
return {
|
|
774
774
|
get: () => e,
|
|
@@ -777,16 +777,16 @@ a.reduceDescriptors($.prototype, ({ value: e }, t) => {
|
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
779
|
});
|
|
780
|
-
a.freezeMethods(
|
|
781
|
-
const x =
|
|
782
|
-
function
|
|
783
|
-
const n = this ||
|
|
780
|
+
a.freezeMethods(W);
|
|
781
|
+
const x = W;
|
|
782
|
+
function X(e, t) {
|
|
783
|
+
const n = this || ue, r = t || n, s = x.from(r.headers);
|
|
784
784
|
let o = r.data;
|
|
785
785
|
return a.forEach(e, function(c) {
|
|
786
786
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
787
787
|
}), s.normalize(), o;
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function ze(e) {
|
|
790
790
|
return !!(e && e.__CANCEL__);
|
|
791
791
|
}
|
|
792
792
|
function D(e, t, n) {
|
|
@@ -795,7 +795,7 @@ function D(e, t, n) {
|
|
|
795
795
|
a.inherits(D, m, {
|
|
796
796
|
__CANCEL__: !0
|
|
797
797
|
});
|
|
798
|
-
function
|
|
798
|
+
function rn(e, t, n) {
|
|
799
799
|
const r = n.config.validateStatus;
|
|
800
800
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
801
801
|
"Request failed with status code " + n.status,
|
|
@@ -805,7 +805,7 @@ function sn(e, t, n) {
|
|
|
805
805
|
n
|
|
806
806
|
));
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const sn = A.hasStandardBrowserEnv ? (
|
|
809
809
|
// Standard browser envs support document.cookie
|
|
810
810
|
{
|
|
811
811
|
write(e, t, n, r, s, o) {
|
|
@@ -832,16 +832,16 @@ const on = A.hasStandardBrowserEnv ? (
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
);
|
|
835
|
-
function
|
|
835
|
+
function on(e) {
|
|
836
836
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function an(e, t) {
|
|
839
839
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
return e && !
|
|
841
|
+
function We(e, t) {
|
|
842
|
+
return e && !on(t) ? an(e, t) : t;
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const cn = A.hasStandardBrowserEnv ? (
|
|
845
845
|
// Standard browser envs have full support of the APIs needed to test
|
|
846
846
|
// whether the request URL is of the same origin as current location.
|
|
847
847
|
function() {
|
|
@@ -873,11 +873,11 @@ const un = A.hasStandardBrowserEnv ? (
|
|
|
873
873
|
};
|
|
874
874
|
}()
|
|
875
875
|
);
|
|
876
|
-
function
|
|
876
|
+
function un(e) {
|
|
877
877
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
878
878
|
return t && t[1] || "";
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function ln(e, t) {
|
|
881
881
|
e = e || 10;
|
|
882
882
|
const n = new Array(e), r = new Array(e);
|
|
883
883
|
let s = 0, o = 0, i;
|
|
@@ -893,9 +893,9 @@ function fn(e, t) {
|
|
|
893
893
|
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
894
894
|
};
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function be(e, t) {
|
|
897
897
|
let n = 0;
|
|
898
|
-
const r =
|
|
898
|
+
const r = ln(50, 250);
|
|
899
899
|
return (s) => {
|
|
900
900
|
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, f = r(c), d = o <= i;
|
|
901
901
|
n = o;
|
|
@@ -911,7 +911,7 @@ function Se(e, t) {
|
|
|
911
911
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
const
|
|
914
|
+
const fn = typeof XMLHttpRequest < "u", dn = fn && function(e) {
|
|
915
915
|
return new Promise(function(n, r) {
|
|
916
916
|
let s = e.data;
|
|
917
917
|
const o = x.from(e.headers).normalize();
|
|
@@ -933,8 +933,8 @@ const dn = typeof XMLHttpRequest < "u", pn = dn && function(e) {
|
|
|
933
933
|
const h = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
934
934
|
o.set("Authorization", "Basic " + btoa(h + ":" + E));
|
|
935
935
|
}
|
|
936
|
-
const y =
|
|
937
|
-
u.open(e.method.toUpperCase(),
|
|
936
|
+
const y = We(e.baseURL, e.url);
|
|
937
|
+
u.open(e.method.toUpperCase(), He(y, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
938
938
|
function w() {
|
|
939
939
|
if (!u)
|
|
940
940
|
return;
|
|
@@ -948,7 +948,7 @@ const dn = typeof XMLHttpRequest < "u", pn = dn && function(e) {
|
|
|
948
948
|
config: e,
|
|
949
949
|
request: u
|
|
950
950
|
};
|
|
951
|
-
|
|
951
|
+
rn(function(S) {
|
|
952
952
|
n(S), d();
|
|
953
953
|
}, function(S) {
|
|
954
954
|
r(S), d();
|
|
@@ -962,34 +962,34 @@ const dn = typeof XMLHttpRequest < "u", pn = dn && function(e) {
|
|
|
962
962
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
963
963
|
}, u.ontimeout = function() {
|
|
964
964
|
let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
965
|
-
const g = e.transitional ||
|
|
965
|
+
const g = e.transitional || qe;
|
|
966
966
|
e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new m(
|
|
967
967
|
E,
|
|
968
968
|
g.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
969
969
|
e,
|
|
970
970
|
u
|
|
971
971
|
)), u = null;
|
|
972
|
-
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 &&
|
|
973
|
-
const h = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
972
|
+
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && cn(y))) {
|
|
973
|
+
const h = e.xsrfHeaderName && e.xsrfCookieName && sn.read(e.xsrfCookieName);
|
|
974
974
|
h && o.set(e.xsrfHeaderName, h);
|
|
975
975
|
}
|
|
976
976
|
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(E, g) {
|
|
977
977
|
u.setRequestHeader(g, E);
|
|
978
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
978
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", be(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", be(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (h) => {
|
|
979
979
|
u && (r(!h || h.type ? new D(null, e, u) : h), u.abort(), u = null);
|
|
980
980
|
}, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
|
|
981
|
-
const p =
|
|
981
|
+
const p = un(y);
|
|
982
982
|
if (p && A.protocols.indexOf(p) === -1) {
|
|
983
983
|
r(new m("Unsupported protocol " + p + ":", m.ERR_BAD_REQUEST, e));
|
|
984
984
|
return;
|
|
985
985
|
}
|
|
986
986
|
u.send(s || null);
|
|
987
987
|
});
|
|
988
|
-
},
|
|
989
|
-
http:
|
|
990
|
-
xhr:
|
|
988
|
+
}, ee = {
|
|
989
|
+
http: Ut,
|
|
990
|
+
xhr: dn
|
|
991
991
|
};
|
|
992
|
-
a.forEach(
|
|
992
|
+
a.forEach(ee, (e, t) => {
|
|
993
993
|
if (e) {
|
|
994
994
|
try {
|
|
995
995
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -998,7 +998,7 @@ a.forEach(te, (e, t) => {
|
|
|
998
998
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
999
999
|
}
|
|
1000
1000
|
});
|
|
1001
|
-
const
|
|
1001
|
+
const Ee = (e) => `- ${e}`, pn = (e) => a.isFunction(e) || e === null || e === !1, $e = {
|
|
1002
1002
|
getAdapter: (e) => {
|
|
1003
1003
|
e = a.isArray(e) ? e : [e];
|
|
1004
1004
|
const { length: t } = e;
|
|
@@ -1007,7 +1007,7 @@ const Oe = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1007
1007
|
for (let o = 0; o < t; o++) {
|
|
1008
1008
|
n = e[o];
|
|
1009
1009
|
let i;
|
|
1010
|
-
if (r = n, !
|
|
1010
|
+
if (r = n, !pn(n) && (r = ee[(i = String(n)).toLowerCase()], r === void 0))
|
|
1011
1011
|
throw new m(`Unknown adapter '${i}'`);
|
|
1012
1012
|
if (r)
|
|
1013
1013
|
break;
|
|
@@ -1018,8 +1018,8 @@ const Oe = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1018
1018
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1019
1019
|
);
|
|
1020
1020
|
let i = t ? o.length > 1 ? `since :
|
|
1021
|
-
` + o.map(
|
|
1022
|
-
`) : " " +
|
|
1021
|
+
` + o.map(Ee).join(`
|
|
1022
|
+
`) : " " + Ee(o[0]) : "as no adapter specified";
|
|
1023
1023
|
throw new m(
|
|
1024
1024
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1025
1025
|
"ERR_NOT_SUPPORT"
|
|
@@ -1027,32 +1027,32 @@ const Oe = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return r;
|
|
1029
1029
|
},
|
|
1030
|
-
adapters:
|
|
1030
|
+
adapters: ee
|
|
1031
1031
|
};
|
|
1032
|
-
function
|
|
1032
|
+
function Q(e) {
|
|
1033
1033
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1034
1034
|
throw new D(null, e);
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
return
|
|
1036
|
+
function Se(e) {
|
|
1037
|
+
return Q(e), e.headers = x.from(e.headers), e.data = X.call(
|
|
1038
1038
|
e,
|
|
1039
1039
|
e.transformRequest
|
|
1040
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1041
|
-
return
|
|
1040
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $e.getAdapter(e.adapter || ue.adapter)(e).then(function(r) {
|
|
1041
|
+
return Q(e), r.data = X.call(
|
|
1042
1042
|
e,
|
|
1043
1043
|
e.transformResponse,
|
|
1044
1044
|
r
|
|
1045
1045
|
), r.headers = x.from(r.headers), r;
|
|
1046
1046
|
}, function(r) {
|
|
1047
|
-
return
|
|
1047
|
+
return ze(r) || (Q(e), r && r.response && (r.response.data = X.call(
|
|
1048
1048
|
e,
|
|
1049
1049
|
e.transformResponse,
|
|
1050
1050
|
r.response
|
|
1051
1051
|
), r.response.headers = x.from(r.response.headers))), Promise.reject(r);
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
-
const
|
|
1055
|
-
function
|
|
1054
|
+
const Re = (e) => e instanceof x ? e.toJSON() : e;
|
|
1055
|
+
function _(e, t) {
|
|
1056
1056
|
t = t || {};
|
|
1057
1057
|
const n = {};
|
|
1058
1058
|
function r(d, l, u) {
|
|
@@ -1111,23 +1111,23 @@ function P(e, t) {
|
|
|
1111
1111
|
socketPath: i,
|
|
1112
1112
|
responseEncoding: i,
|
|
1113
1113
|
validateStatus: c,
|
|
1114
|
-
headers: (d, l) => s(
|
|
1114
|
+
headers: (d, l) => s(Re(d), Re(l), !0)
|
|
1115
1115
|
};
|
|
1116
1116
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1117
1117
|
const u = f[l] || s, y = u(e[l], t[l], l);
|
|
1118
1118
|
a.isUndefined(y) && u !== c || (n[l] = y);
|
|
1119
1119
|
}), n;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1121
|
+
const Ve = "1.6.7", le = {};
|
|
1122
1122
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1123
|
-
|
|
1123
|
+
le[e] = function(r) {
|
|
1124
1124
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1125
1125
|
};
|
|
1126
1126
|
});
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1127
|
+
const Oe = {};
|
|
1128
|
+
le.transitional = function(t, n, r) {
|
|
1129
1129
|
function s(o, i) {
|
|
1130
|
-
return "[Axios v" +
|
|
1130
|
+
return "[Axios v" + Ve + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1131
1131
|
}
|
|
1132
1132
|
return (o, i, c) => {
|
|
1133
1133
|
if (t === !1)
|
|
@@ -1135,7 +1135,7 @@ de.transitional = function(t, n, r) {
|
|
|
1135
1135
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1136
1136
|
m.ERR_DEPRECATED
|
|
1137
1137
|
);
|
|
1138
|
-
return n && !
|
|
1138
|
+
return n && !Oe[i] && (Oe[i] = !0, console.warn(
|
|
1139
1139
|
s(
|
|
1140
1140
|
i,
|
|
1141
1141
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1143,7 +1143,7 @@ de.transitional = function(t, n, r) {
|
|
|
1143
1143
|
)), t ? t(o, i, c) : !0;
|
|
1144
1144
|
};
|
|
1145
1145
|
};
|
|
1146
|
-
function
|
|
1146
|
+
function hn(e, t, n) {
|
|
1147
1147
|
if (typeof e != "object")
|
|
1148
1148
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1149
1149
|
const r = Object.keys(e);
|
|
@@ -1160,15 +1160,15 @@ function mn(e, t, n) {
|
|
|
1160
1160
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
const
|
|
1164
|
-
assertOptions:
|
|
1165
|
-
validators:
|
|
1166
|
-
}, C =
|
|
1163
|
+
const te = {
|
|
1164
|
+
assertOptions: hn,
|
|
1165
|
+
validators: le
|
|
1166
|
+
}, C = te.validators;
|
|
1167
1167
|
class H {
|
|
1168
1168
|
constructor(t) {
|
|
1169
1169
|
this.defaults = t, this.interceptors = {
|
|
1170
|
-
request: new
|
|
1171
|
-
response: new
|
|
1170
|
+
request: new we(),
|
|
1171
|
+
response: new we()
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
1174
|
/**
|
|
@@ -1194,15 +1194,15 @@ class H {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
_request(t, n) {
|
|
1197
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1197
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _(this.defaults, n);
|
|
1198
1198
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1199
|
-
r !== void 0 &&
|
|
1199
|
+
r !== void 0 && te.assertOptions(r, {
|
|
1200
1200
|
silentJSONParsing: C.transitional(C.boolean),
|
|
1201
1201
|
forcedJSONParsing: C.transitional(C.boolean),
|
|
1202
1202
|
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1203
1203
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1204
1204
|
serialize: s
|
|
1205
|
-
} :
|
|
1205
|
+
} : te.assertOptions(s, {
|
|
1206
1206
|
encode: C.function,
|
|
1207
1207
|
serialize: C.function
|
|
1208
1208
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1227,7 +1227,7 @@ class H {
|
|
|
1227
1227
|
});
|
|
1228
1228
|
let l, u = 0, y;
|
|
1229
1229
|
if (!f) {
|
|
1230
|
-
const p = [
|
|
1230
|
+
const p = [Se.bind(this), void 0];
|
|
1231
1231
|
for (p.unshift.apply(p, c), p.push.apply(p, d), y = p.length, l = Promise.resolve(n); u < y; )
|
|
1232
1232
|
l = l.then(p[u++], p[u++]);
|
|
1233
1233
|
return l;
|
|
@@ -1244,7 +1244,7 @@ class H {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
try {
|
|
1247
|
-
l =
|
|
1247
|
+
l = Se.call(this, w);
|
|
1248
1248
|
} catch (p) {
|
|
1249
1249
|
return Promise.reject(p);
|
|
1250
1250
|
}
|
|
@@ -1253,14 +1253,14 @@ class H {
|
|
|
1253
1253
|
return l;
|
|
1254
1254
|
}
|
|
1255
1255
|
getUri(t) {
|
|
1256
|
-
t =
|
|
1257
|
-
const n =
|
|
1258
|
-
return
|
|
1256
|
+
t = _(this.defaults, t);
|
|
1257
|
+
const n = We(t.baseURL, t.url);
|
|
1258
|
+
return He(n, t.params, t.paramsSerializer);
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1262
1262
|
H.prototype[t] = function(n, r) {
|
|
1263
|
-
return this.request(
|
|
1263
|
+
return this.request(_(r || {}, {
|
|
1264
1264
|
method: t,
|
|
1265
1265
|
url: n,
|
|
1266
1266
|
data: (r || {}).data
|
|
@@ -1270,7 +1270,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1270
1270
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1271
1271
|
function n(r) {
|
|
1272
1272
|
return function(o, i, c) {
|
|
1273
|
-
return this.request(
|
|
1273
|
+
return this.request(_(c || {}, {
|
|
1274
1274
|
method: t,
|
|
1275
1275
|
headers: r ? {
|
|
1276
1276
|
"Content-Type": "multipart/form-data"
|
|
@@ -1283,7 +1283,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1283
1283
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1284
1284
|
});
|
|
1285
1285
|
const I = H;
|
|
1286
|
-
class
|
|
1286
|
+
class fe {
|
|
1287
1287
|
constructor(t) {
|
|
1288
1288
|
if (typeof t != "function")
|
|
1289
1289
|
throw new TypeError("executor must be a function.");
|
|
@@ -1344,23 +1344,23 @@ class pe {
|
|
|
1344
1344
|
static source() {
|
|
1345
1345
|
let t;
|
|
1346
1346
|
return {
|
|
1347
|
-
token: new
|
|
1347
|
+
token: new fe(function(s) {
|
|
1348
1348
|
t = s;
|
|
1349
1349
|
}),
|
|
1350
1350
|
cancel: t
|
|
1351
1351
|
};
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
const
|
|
1355
|
-
function
|
|
1354
|
+
const mn = fe;
|
|
1355
|
+
function yn(e) {
|
|
1356
1356
|
return function(n) {
|
|
1357
1357
|
return e.apply(null, n);
|
|
1358
1358
|
};
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function wn(e) {
|
|
1361
1361
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1362
1362
|
}
|
|
1363
|
-
const
|
|
1363
|
+
const ne = {
|
|
1364
1364
|
Continue: 100,
|
|
1365
1365
|
SwitchingProtocols: 101,
|
|
1366
1366
|
Processing: 102,
|
|
@@ -1425,42 +1425,42 @@ const re = {
|
|
|
1425
1425
|
NotExtended: 510,
|
|
1426
1426
|
NetworkAuthenticationRequired: 511
|
|
1427
1427
|
};
|
|
1428
|
-
Object.entries(
|
|
1429
|
-
|
|
1428
|
+
Object.entries(ne).forEach(([e, t]) => {
|
|
1429
|
+
ne[t] = e;
|
|
1430
1430
|
});
|
|
1431
|
-
const
|
|
1432
|
-
function
|
|
1431
|
+
const gn = ne;
|
|
1432
|
+
function Ke(e) {
|
|
1433
1433
|
const t = new I(e), n = _e(I.prototype.request, t);
|
|
1434
1434
|
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1435
|
-
return
|
|
1435
|
+
return Ke(_(e, s));
|
|
1436
1436
|
}, n;
|
|
1437
1437
|
}
|
|
1438
|
-
const b =
|
|
1438
|
+
const b = Ke(ue);
|
|
1439
1439
|
b.Axios = I;
|
|
1440
1440
|
b.CanceledError = D;
|
|
1441
|
-
b.CancelToken =
|
|
1442
|
-
b.isCancel =
|
|
1443
|
-
b.VERSION =
|
|
1444
|
-
b.toFormData =
|
|
1441
|
+
b.CancelToken = mn;
|
|
1442
|
+
b.isCancel = ze;
|
|
1443
|
+
b.VERSION = Ve;
|
|
1444
|
+
b.toFormData = z;
|
|
1445
1445
|
b.AxiosError = m;
|
|
1446
1446
|
b.Cancel = b.CanceledError;
|
|
1447
1447
|
b.all = function(t) {
|
|
1448
1448
|
return Promise.all(t);
|
|
1449
1449
|
};
|
|
1450
|
-
b.spread =
|
|
1451
|
-
b.isAxiosError =
|
|
1452
|
-
b.mergeConfig =
|
|
1450
|
+
b.spread = yn;
|
|
1451
|
+
b.isAxiosError = wn;
|
|
1452
|
+
b.mergeConfig = _;
|
|
1453
1453
|
b.AxiosHeaders = x;
|
|
1454
1454
|
b.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1455
|
-
b.getAdapter =
|
|
1456
|
-
b.HttpStatusCode =
|
|
1455
|
+
b.getAdapter = $e.getAdapter;
|
|
1456
|
+
b.HttpStatusCode = gn;
|
|
1457
1457
|
b.default = b;
|
|
1458
|
-
const
|
|
1458
|
+
const bn = {
|
|
1459
1459
|
form: "application/x-www-form-urlencoded",
|
|
1460
1460
|
json: "application/json",
|
|
1461
1461
|
data: "multipart/form-data"
|
|
1462
|
-
},
|
|
1463
|
-
class
|
|
1462
|
+
}, En = ["put", "post", "patch"], Ae = "Local-Request-Id", Sn = 200, Rn = 500;
|
|
1463
|
+
class On {
|
|
1464
1464
|
axios;
|
|
1465
1465
|
settings;
|
|
1466
1466
|
records = {};
|
|
@@ -1470,7 +1470,7 @@ class An {
|
|
|
1470
1470
|
showError;
|
|
1471
1471
|
constructor(t = {}) {
|
|
1472
1472
|
this.settings = t.settings || {};
|
|
1473
|
-
const n =
|
|
1473
|
+
const n = V(t, [
|
|
1474
1474
|
"settings"
|
|
1475
1475
|
]);
|
|
1476
1476
|
this.axios = b.create(
|
|
@@ -1483,14 +1483,14 @@ class An {
|
|
|
1483
1483
|
},
|
|
1484
1484
|
n
|
|
1485
1485
|
)
|
|
1486
|
-
), this.setupSkipWarn(this.settings), this.showLoading =
|
|
1486
|
+
), this.setupSkipWarn(this.settings), this.showLoading = Ye(this.openLoading.bind(this), Sn), this.showError = Ze(this._showError.bind(this), Rn, {
|
|
1487
1487
|
leading: !0,
|
|
1488
1488
|
trailing: !1
|
|
1489
1489
|
});
|
|
1490
1490
|
}
|
|
1491
1491
|
setConfig(t = {}) {
|
|
1492
1492
|
this.settings = N(this.settings, t.settings || {});
|
|
1493
|
-
const n =
|
|
1493
|
+
const n = V(t, [
|
|
1494
1494
|
"settings"
|
|
1495
1495
|
]);
|
|
1496
1496
|
this.axios.defaults = N(this.axios.defaults, n), this.setupSkipWarn(this.settings);
|
|
@@ -1507,11 +1507,11 @@ class An {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
createHeaders(t, n, r) {
|
|
1509
1509
|
const s = n.injectHeaders ? typeof n.headers == "function" ? n.headers(t, r, n) : n.headers || {} : {}, o = {
|
|
1510
|
-
"Content-Type":
|
|
1510
|
+
"Content-Type": bn[n.type || "form"],
|
|
1511
1511
|
...r.headers,
|
|
1512
1512
|
...s
|
|
1513
1513
|
};
|
|
1514
|
-
return n.skipWarn && (o[
|
|
1514
|
+
return n.skipWarn && (o[Ae] = t), o;
|
|
1515
1515
|
}
|
|
1516
1516
|
isJsonType(t) {
|
|
1517
1517
|
return Object.entries(t).some(([n, r]) => n.toLowerCase() === "content-type" && String(r).includes("application/json"));
|
|
@@ -1528,7 +1528,7 @@ class An {
|
|
|
1528
1528
|
const { type: o, skipWarn: i } = t, { name: c = "skipWarn" } = i || {};
|
|
1529
1529
|
let { data: f, params: d, method: l = "get" } = n;
|
|
1530
1530
|
const u = s ? { [c]: !0 } : {};
|
|
1531
|
-
return
|
|
1531
|
+
return En.includes(l.toLowerCase()) ? (f = Object.assign(f || {}, u), f = o !== "json" || !this.isJsonType(r) ? this.toFormData(f, o) : f) : d = {
|
|
1532
1532
|
...f,
|
|
1533
1533
|
...d,
|
|
1534
1534
|
...u
|
|
@@ -1539,7 +1539,7 @@ class An {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
createUrl(t) {
|
|
1541
1541
|
const { url: n, query: r } = t;
|
|
1542
|
-
return r ?
|
|
1542
|
+
return r ? Ce(n)(r) : n;
|
|
1543
1543
|
}
|
|
1544
1544
|
openLoading(t) {
|
|
1545
1545
|
const { loading: n, showLoading: r } = t;
|
|
@@ -1568,9 +1568,9 @@ class An {
|
|
|
1568
1568
|
return !!t.promise;
|
|
1569
1569
|
}
|
|
1570
1570
|
send(t = {}, n = !1) {
|
|
1571
|
-
const r = N({}, this.settings, t.settings || {}), s =
|
|
1571
|
+
const r = N({}, this.settings, t.settings || {}), s = V(t, [
|
|
1572
1572
|
"settings"
|
|
1573
|
-
]), o =
|
|
1573
|
+
]), o = et(!1), i = b.CancelToken.source();
|
|
1574
1574
|
this.records[o] = { settings: r, config: s, source: i };
|
|
1575
1575
|
const c = this.createUrl(s), f = this.createHeaders(o, r, s), { data: d, params: l } = this.createSendData(
|
|
1576
1576
|
r,
|
|
@@ -1604,7 +1604,7 @@ class An {
|
|
|
1604
1604
|
return;
|
|
1605
1605
|
const { code: n, executor: r, callback: s, complete: o } = t.skipWarn;
|
|
1606
1606
|
this.stopSkipWarn = this.useResponse((i) => {
|
|
1607
|
-
const f = (i.config.headers || {})[
|
|
1607
|
+
const f = (i.config.headers || {})[Ae], d = this.records[f];
|
|
1608
1608
|
if (!d)
|
|
1609
1609
|
return i;
|
|
1610
1610
|
const { data: l } = i;
|
|
@@ -1627,8 +1627,8 @@ class An {
|
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
const t = new
|
|
1630
|
+
function An(e = {}) {
|
|
1631
|
+
const t = new On(e), n = t.send.bind(t), r = t.cancel.bind(t), s = t.setConfig.bind(t), o = t.useRequest.bind(t), i = t.useResponse.bind(t);
|
|
1632
1632
|
return Object.assign(n, {
|
|
1633
1633
|
...t,
|
|
1634
1634
|
instance: t,
|
|
@@ -1639,25 +1639,25 @@ function Tn(e = {}) {
|
|
|
1639
1639
|
useResponse: i
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
1642
|
-
const
|
|
1642
|
+
const Tn = An({
|
|
1643
1643
|
settings: {
|
|
1644
1644
|
injectHeaders: !0,
|
|
1645
1645
|
loading: !0,
|
|
1646
1646
|
originResponse: !0
|
|
1647
1647
|
}
|
|
1648
1648
|
});
|
|
1649
|
-
function
|
|
1649
|
+
function xn(e) {
|
|
1650
1650
|
const t = typeof e == "string" ? { url: e } : e;
|
|
1651
|
-
return (n, r) =>
|
|
1651
|
+
return (n, r) => Tn.send(N(t, r || {}, { data: n }));
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function Xn(e) {
|
|
1654
1654
|
const t = {};
|
|
1655
1655
|
for (const [n, r] of Object.entries(e))
|
|
1656
|
-
t[n] =
|
|
1656
|
+
t[n] = xn(r);
|
|
1657
1657
|
return t;
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1660
|
-
class
|
|
1659
|
+
const F = typeof window < "u", Qn = (e) => F ? window.requestAnimationFrame(e) : setTimeout(e, 16), Yn = (e) => F ? window.cancelAnimationFrame(e) : clearTimeout(e);
|
|
1660
|
+
class Cn {
|
|
1661
1661
|
options = {
|
|
1662
1662
|
type: "cache",
|
|
1663
1663
|
expired: 0,
|
|
@@ -1667,8 +1667,8 @@ class Pn {
|
|
|
1667
1667
|
types;
|
|
1668
1668
|
constructor(t = {}) {
|
|
1669
1669
|
this.types = {
|
|
1670
|
-
local:
|
|
1671
|
-
session:
|
|
1670
|
+
local: F ? window.localStorage : this.caches,
|
|
1671
|
+
session: F ? window.sessionStorage : this.caches,
|
|
1672
1672
|
cache: this.caches
|
|
1673
1673
|
}, this.config(t);
|
|
1674
1674
|
}
|
|
@@ -1706,12 +1706,12 @@ class Pn {
|
|
|
1706
1706
|
r === this.caches ? this.caches = {} : r.clear();
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
|
-
const
|
|
1709
|
+
const Zn = new Cn();
|
|
1710
1710
|
var _n = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1711
|
-
function
|
|
1711
|
+
function Ge(e) {
|
|
1712
1712
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1713
1713
|
}
|
|
1714
|
-
var
|
|
1714
|
+
var re = { exports: {} };
|
|
1715
1715
|
(function(e, t) {
|
|
1716
1716
|
(function(n, r) {
|
|
1717
1717
|
r(t, e);
|
|
@@ -1738,49 +1738,49 @@ var se = { exports: {} };
|
|
|
1738
1738
|
function f(d) {
|
|
1739
1739
|
var l = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1], u = d, y = l.timeout || s.timeout, w = l.jsonpCallback || s.jsonpCallback, p = void 0;
|
|
1740
1740
|
return new Promise(function(h, E) {
|
|
1741
|
-
var g = l.jsonpCallbackFunction || o(),
|
|
1742
|
-
window[g] = function(
|
|
1741
|
+
var g = l.jsonpCallbackFunction || o(), R = w + "_" + g;
|
|
1742
|
+
window[g] = function($) {
|
|
1743
1743
|
h({
|
|
1744
1744
|
ok: !0,
|
|
1745
1745
|
// keep consistent with fetch API
|
|
1746
1746
|
json: function() {
|
|
1747
|
-
return Promise.resolve(
|
|
1747
|
+
return Promise.resolve($);
|
|
1748
1748
|
}
|
|
1749
|
-
}), p && clearTimeout(p), c(
|
|
1749
|
+
}), p && clearTimeout(p), c(R), i(g);
|
|
1750
1750
|
}, u += u.indexOf("?") === -1 ? "?" : "&";
|
|
1751
1751
|
var S = document.createElement("script");
|
|
1752
|
-
S.setAttribute("src", "" + u + w + "=" + g), l.charset && S.setAttribute("charset", l.charset), l.nonce && S.setAttribute("nonce", l.nonce), l.referrerPolicy && S.setAttribute("referrerPolicy", l.referrerPolicy), l.crossorigin && S.setAttribute("crossorigin", "true"), S.id =
|
|
1753
|
-
E(new Error("JSONP request to " + d + " timed out")), i(g), c(
|
|
1752
|
+
S.setAttribute("src", "" + u + w + "=" + g), l.charset && S.setAttribute("charset", l.charset), l.nonce && S.setAttribute("nonce", l.nonce), l.referrerPolicy && S.setAttribute("referrerPolicy", l.referrerPolicy), l.crossorigin && S.setAttribute("crossorigin", "true"), S.id = R, document.getElementsByTagName("head")[0].appendChild(S), p = setTimeout(function() {
|
|
1753
|
+
E(new Error("JSONP request to " + d + " timed out")), i(g), c(R), window[g] = function() {
|
|
1754
1754
|
i(g);
|
|
1755
1755
|
};
|
|
1756
1756
|
}, y), S.onerror = function() {
|
|
1757
|
-
E(new Error("JSONP request to " + d + " failed")), i(g), c(
|
|
1757
|
+
E(new Error("JSONP request to " + d + " failed")), i(g), c(R), p && clearTimeout(p);
|
|
1758
1758
|
};
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
1761
|
r.exports = f;
|
|
1762
1762
|
});
|
|
1763
|
-
})(
|
|
1764
|
-
var
|
|
1765
|
-
const
|
|
1766
|
-
function
|
|
1767
|
-
if (
|
|
1763
|
+
})(re, re.exports);
|
|
1764
|
+
var Pn = re.exports;
|
|
1765
|
+
const jn = /* @__PURE__ */ Ge(Pn);
|
|
1766
|
+
function Nn(e) {
|
|
1767
|
+
if (F) {
|
|
1768
1768
|
const { protocol: t, host: n, pathname: r } = location;
|
|
1769
1769
|
return `${t}//${n}${e ? r : ""}`;
|
|
1770
1770
|
} else
|
|
1771
1771
|
return null;
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1774
|
-
const t = e.match(
|
|
1773
|
+
function kn(e = "") {
|
|
1774
|
+
const t = e.match(tt);
|
|
1775
1775
|
return t ? t[0] : "";
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function Xe(e) {
|
|
1778
1778
|
const t = [];
|
|
1779
1779
|
for (const n in e)
|
|
1780
1780
|
Object.prototype.hasOwnProperty.call(e, n) && t.push([n, encodeURIComponent(e[n])].join("="));
|
|
1781
1781
|
return t.join("&");
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function se(e, t, n) {
|
|
1784
1784
|
const r = {};
|
|
1785
1785
|
e = (e || location.search).replace(/^[^]*\?/, ""), t = t || "&", n = n || "=";
|
|
1786
1786
|
let s;
|
|
@@ -1792,85 +1792,75 @@ function oe(e, t, n) {
|
|
|
1792
1792
|
s[1] !== e && (r[decodeURIComponent(s[1])] = decodeURIComponent(s[2] || ""));
|
|
1793
1793
|
return r;
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1796
|
-
t = typeof t == "string" ?
|
|
1797
|
-
const n = e.split("?")[0], r =
|
|
1795
|
+
function Qe(e, t) {
|
|
1796
|
+
t = typeof t == "string" ? se(t) : t;
|
|
1797
|
+
const n = e.split("?")[0], r = se(e), s = Object.assign({}, r, t), o = Xe(s);
|
|
1798
1798
|
return o ? [n, o].join("?") : e;
|
|
1799
1799
|
}
|
|
1800
|
-
const
|
|
1800
|
+
const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1801
1801
|
__proto__: null,
|
|
1802
|
-
append:
|
|
1803
|
-
getCurrentHost:
|
|
1804
|
-
getHost:
|
|
1805
|
-
parse:
|
|
1806
|
-
stringify:
|
|
1802
|
+
append: Qe,
|
|
1803
|
+
getCurrentHost: Nn,
|
|
1804
|
+
getHost: kn,
|
|
1805
|
+
parse: se,
|
|
1806
|
+
stringify: Xe
|
|
1807
1807
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1808
|
-
async function
|
|
1808
|
+
async function tr(e, t = {}) {
|
|
1809
1809
|
const { query: n = {} } = t;
|
|
1810
|
-
e.includes("${") && (e =
|
|
1811
|
-
const r =
|
|
1812
|
-
return await (await
|
|
1810
|
+
e.includes("${") && (e = Ce(e)(n || {}));
|
|
1811
|
+
const r = Qe(e, n);
|
|
1812
|
+
return await (await jn(r, t)).json();
|
|
1813
1813
|
}
|
|
1814
1814
|
var Fn = function(t, n, r) {
|
|
1815
1815
|
var s = document.head || document.getElementsByTagName("head")[0], o = document.createElement("script");
|
|
1816
1816
|
typeof n == "function" && (r = n, n = {}), n = n || {}, r = r || function() {
|
|
1817
|
-
}, o.type = n.type || "text/javascript", o.charset = n.charset || "utf8", o.async = "async" in n ? !!n.async : !0, o.src = t, n.attrs &&
|
|
1818
|
-
var i = "onload" in o ?
|
|
1819
|
-
i(o, r), o.onload ||
|
|
1817
|
+
}, o.type = n.type || "text/javascript", o.charset = n.charset || "utf8", o.async = "async" in n ? !!n.async : !0, o.src = t, n.attrs && Ln(o, n.attrs), n.text && (o.text = "" + n.text);
|
|
1818
|
+
var i = "onload" in o ? Te : Dn;
|
|
1819
|
+
i(o, r), o.onload || Te(o, r), s.appendChild(o);
|
|
1820
1820
|
};
|
|
1821
|
-
function
|
|
1821
|
+
function Ln(e, t) {
|
|
1822
1822
|
for (var n in t)
|
|
1823
1823
|
e.setAttribute(n, t[n]);
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function Te(e, t) {
|
|
1826
1826
|
e.onload = function() {
|
|
1827
1827
|
this.onerror = this.onload = null, t(null, e);
|
|
1828
1828
|
}, e.onerror = function() {
|
|
1829
1829
|
this.onerror = this.onload = null, t(new Error("Failed to load " + this.src), e);
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function Dn(e, t) {
|
|
1833
1833
|
e.onreadystatechange = function() {
|
|
1834
1834
|
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, t(null, e));
|
|
1835
1835
|
};
|
|
1836
1836
|
}
|
|
1837
|
-
const
|
|
1838
|
-
function
|
|
1837
|
+
const Un = /* @__PURE__ */ Ge(Fn);
|
|
1838
|
+
function nr(e, t = {}) {
|
|
1839
1839
|
return new Promise((n, r) => {
|
|
1840
1840
|
const { library: s } = t;
|
|
1841
|
-
|
|
1841
|
+
Un(e, t, (o, i) => {
|
|
1842
1842
|
o ? r(o) : n(s ? window[s] : void 0);
|
|
1843
1843
|
});
|
|
1844
1844
|
});
|
|
1845
1845
|
}
|
|
1846
|
-
|
|
1847
|
-
return
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
1852
|
-
}
|
|
1853
|
-
return e;
|
|
1854
|
-
}, q.apply(this, arguments);
|
|
1855
|
-
}, ie = { debug: -1, log: 0, info: 0, warn: 1, error: 2 }, vn = function(e, t, n, r) {
|
|
1856
|
-
return function() {
|
|
1857
|
-
for (var s = [], o = 0; o < arguments.length; o++)
|
|
1858
|
-
s[o] = arguments[o];
|
|
1859
|
-
if (t && ie[t] <= ie[e] && console[e].apply && (r === "*" || n.startsWith(r)))
|
|
1860
|
-
return console[e].apply(console, In(s, n));
|
|
1846
|
+
const xe = { debug: -1, log: 0, info: 0, warn: 1, error: 2 }, Bn = function(e, t, n, r) {
|
|
1847
|
+
return function(...s) {
|
|
1848
|
+
if (t && xe[t] <= xe[e] && // @ts-ignore
|
|
1849
|
+
console[e].apply && (r === "*" || n.startsWith(r)))
|
|
1850
|
+
return console[e].apply(console, vn(s, n));
|
|
1861
1851
|
};
|
|
1862
1852
|
};
|
|
1863
|
-
function
|
|
1864
|
-
return t !== "*" && (typeof e[0] == "string" ? e[0] =
|
|
1853
|
+
function vn(e, t) {
|
|
1854
|
+
return t !== "*" && (typeof e[0] == "string" ? e[0] = `[${t}] ${e[0]}` : e = ["[" + t + "]"].concat(e)), e;
|
|
1865
1855
|
}
|
|
1866
|
-
function
|
|
1856
|
+
function In(e, t) {
|
|
1867
1857
|
if (!e)
|
|
1868
1858
|
return {
|
|
1869
1859
|
targetLevel: t.level,
|
|
1870
1860
|
targetBizName: t.bizName
|
|
1871
1861
|
};
|
|
1872
1862
|
if (~e.indexOf(":")) {
|
|
1873
|
-
|
|
1863
|
+
const n = e.split(":");
|
|
1874
1864
|
return {
|
|
1875
1865
|
targetLevel: n[0],
|
|
1876
1866
|
targetBizName: n[1]
|
|
@@ -1881,25 +1871,44 @@ function Hn(e, t) {
|
|
|
1881
1871
|
targetBizName: "*"
|
|
1882
1872
|
};
|
|
1883
1873
|
}
|
|
1884
|
-
|
|
1874
|
+
const Hn = {
|
|
1885
1875
|
level: "warn",
|
|
1886
1876
|
bizName: "*"
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
}
|
|
1898
|
-
)
|
|
1899
|
-
|
|
1900
|
-
|
|
1877
|
+
};
|
|
1878
|
+
class qn {
|
|
1879
|
+
config;
|
|
1880
|
+
options;
|
|
1881
|
+
constructor(t) {
|
|
1882
|
+
this.options = { ...Hn, ...t };
|
|
1883
|
+
const n = typeof location < "u" ? location : {}, r = (/__(?:logConf|logLevel)__=([^#/&]*)/.exec(
|
|
1884
|
+
n.href
|
|
1885
|
+
) || [])[1];
|
|
1886
|
+
this.config = In(r, t);
|
|
1887
|
+
}
|
|
1888
|
+
_log(t) {
|
|
1889
|
+
const { targetLevel: n, targetBizName: r } = this.config, { bizName: s } = this.options;
|
|
1890
|
+
return Bn(t, n, s, r);
|
|
1891
|
+
}
|
|
1892
|
+
debug(...t) {
|
|
1893
|
+
return this._log("debug")(...t);
|
|
1894
|
+
}
|
|
1895
|
+
log(...t) {
|
|
1896
|
+
return this._log("log")(...t);
|
|
1897
|
+
}
|
|
1898
|
+
info(...t) {
|
|
1899
|
+
return this._log("info")(...t);
|
|
1900
|
+
}
|
|
1901
|
+
warn(...t) {
|
|
1902
|
+
return this._log("warn")(...t);
|
|
1903
|
+
}
|
|
1904
|
+
error(...t) {
|
|
1905
|
+
return this._log("warn")(...t);
|
|
1906
|
+
}
|
|
1901
1907
|
}
|
|
1902
|
-
|
|
1908
|
+
function Mn(e) {
|
|
1909
|
+
return new qn(e);
|
|
1910
|
+
}
|
|
1911
|
+
const rr = Mn({ level: "log", bizName: "VTJ" });
|
|
1903
1912
|
/*! js-cookie v3.0.5 | MIT */
|
|
1904
1913
|
function U(e) {
|
|
1905
1914
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1920,7 +1929,7 @@ var Jn = {
|
|
|
1920
1929
|
);
|
|
1921
1930
|
}
|
|
1922
1931
|
};
|
|
1923
|
-
function
|
|
1932
|
+
function oe(e, t) {
|
|
1924
1933
|
function n(s, o, i) {
|
|
1925
1934
|
if (!(typeof document > "u")) {
|
|
1926
1935
|
i = U({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -1958,10 +1967,10 @@ function ae(e, t) {
|
|
|
1958
1967
|
);
|
|
1959
1968
|
},
|
|
1960
1969
|
withAttributes: function(s) {
|
|
1961
|
-
return
|
|
1970
|
+
return oe(this.converter, U({}, this.attributes, s));
|
|
1962
1971
|
},
|
|
1963
1972
|
withConverter: function(s) {
|
|
1964
|
-
return
|
|
1973
|
+
return oe(U({}, this.converter, s), this.attributes);
|
|
1965
1974
|
}
|
|
1966
1975
|
},
|
|
1967
1976
|
{
|
|
@@ -1970,41 +1979,41 @@ function ae(e, t) {
|
|
|
1970
1979
|
}
|
|
1971
1980
|
);
|
|
1972
1981
|
}
|
|
1973
|
-
var
|
|
1974
|
-
function
|
|
1975
|
-
|
|
1982
|
+
var de = oe(Jn, { path: "/" });
|
|
1983
|
+
function zn(e, t, n) {
|
|
1984
|
+
de.set(e, t, n);
|
|
1976
1985
|
}
|
|
1977
|
-
function
|
|
1978
|
-
return
|
|
1986
|
+
function Wn(e) {
|
|
1987
|
+
return de.get(e);
|
|
1979
1988
|
}
|
|
1980
|
-
function
|
|
1981
|
-
|
|
1989
|
+
function $n(e, t) {
|
|
1990
|
+
de.remove(e, t);
|
|
1982
1991
|
}
|
|
1983
|
-
const
|
|
1992
|
+
const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1984
1993
|
__proto__: null,
|
|
1985
|
-
get:
|
|
1986
|
-
remove:
|
|
1987
|
-
set:
|
|
1994
|
+
get: Wn,
|
|
1995
|
+
remove: $n,
|
|
1996
|
+
set: zn
|
|
1988
1997
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1989
1998
|
export {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1999
|
+
Ae as LOCAL_REQUEST_ID,
|
|
2000
|
+
qn as Logger,
|
|
2001
|
+
On as Request,
|
|
2002
|
+
Cn as Storage,
|
|
2003
|
+
Gn as VTJ_UTILS_VERSION,
|
|
1995
2004
|
b as axios,
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2005
|
+
Yn as cAF,
|
|
2006
|
+
sr as cookie,
|
|
2007
|
+
xn as createApi,
|
|
2008
|
+
Xn as createApis,
|
|
2009
|
+
An as createRequest,
|
|
2010
|
+
Mn as getLogger,
|
|
2011
|
+
F as isClient,
|
|
2012
|
+
tr as jsonp,
|
|
2013
|
+
nr as loadScript,
|
|
2014
|
+
rr as logger,
|
|
2015
|
+
Qn as rAF,
|
|
2016
|
+
Tn as request,
|
|
2017
|
+
Zn as storage,
|
|
2018
|
+
er as url
|
|
2010
2019
|
};
|