@lx-frontend/multi-ajax 0.2.4 → 0.2.5
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/build/scripts/axios/dist/axios.js +2966 -0
- package/build/scripts/axios/dist/browser/axios.cjs +3193 -0
- package/build/scripts/axios/dist/esm/axios.js +3215 -0
- package/build/scripts/axios/dist/esm/axios.min.js +1160 -0
- package/build/scripts/patch-axios-post-install.js +8 -34
- package/build/utils.js +23 -2
- package/package.json +1 -1
- /package/build/scripts/{patch-content.txt → axios/lib/platform/browser/index.js} +0 -0
|
@@ -0,0 +1,1160 @@
|
|
|
1
|
+
function e(e, t) {
|
|
2
|
+
return function () {
|
|
3
|
+
return e.apply(t, arguments)
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const {toString: t} = Object.prototype, {getPrototypeOf: n} = Object, r = (o = Object.create(null), e => {
|
|
8
|
+
const n = t.call(e);
|
|
9
|
+
return o[n] || (o[n] = n.slice(8, -1).toLowerCase())
|
|
10
|
+
});
|
|
11
|
+
var o;
|
|
12
|
+
const s = e => (e = e.toLowerCase(), t => r(t) === e), i = e => t => typeof t === e, {isArray: a} = Array,
|
|
13
|
+
c = i("undefined");
|
|
14
|
+
const u = s("ArrayBuffer");
|
|
15
|
+
const l = i("string"), f = i("function"), d = i("number"), p = e => null !== e && "object" == typeof e, h = e => {
|
|
16
|
+
if ("object" !== r(e)) return !1;
|
|
17
|
+
const t = n(e);
|
|
18
|
+
return !(null !== t && t !== Object.prototype && null !== Object.getPrototypeOf(t) || Symbol.toStringTag in e || Symbol.iterator in e)
|
|
19
|
+
}, m = s("Date"), y = s("File"), g = s("Blob"), b = s("FileList"), E = s("URLSearchParams");
|
|
20
|
+
|
|
21
|
+
function w(e, t, {allOwnKeys: n = !1} = {}) {
|
|
22
|
+
if (null == e) return;
|
|
23
|
+
let r, o;
|
|
24
|
+
if ("object" != typeof e && (e = [e]), a(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else {
|
|
25
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = o.length;
|
|
26
|
+
let i;
|
|
27
|
+
for (r = 0; r < s; r++) i = o[r], t.call(null, e[i], i, e)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function O(e, t) {
|
|
32
|
+
t = t.toLowerCase();
|
|
33
|
+
const n = Object.keys(e);
|
|
34
|
+
let r, o = n.length;
|
|
35
|
+
for (; o-- > 0;) if (r = n[o], t === r.toLowerCase()) return r;
|
|
36
|
+
return null
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const S = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : global,
|
|
40
|
+
R = e => !c(e) && e !== S;
|
|
41
|
+
const A = (T = "undefined" != typeof Uint8Array && n(Uint8Array), e => T && e instanceof T);
|
|
42
|
+
var T;
|
|
43
|
+
const N = s("HTMLFormElement"), C = (({hasOwnProperty: e}) => (t, n) => e.call(t, n))(Object.prototype),
|
|
44
|
+
j = s("RegExp"), v = (e, t) => {
|
|
45
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
46
|
+
w(n, ((n, o) => {
|
|
47
|
+
!1 !== t(n, o, e) && (r[o] = n)
|
|
48
|
+
})), Object.defineProperties(e, r)
|
|
49
|
+
}, x = "abcdefghijklmnopqrstuvwxyz",
|
|
50
|
+
P = {DIGIT: "0123456789", ALPHA: x, ALPHA_DIGIT: x + x.toUpperCase() + "0123456789"};
|
|
51
|
+
const U = {
|
|
52
|
+
isArray: a,
|
|
53
|
+
isArrayBuffer: u,
|
|
54
|
+
isBuffer: function (e) {
|
|
55
|
+
return null !== e && !c(e) && null !== e.constructor && !c(e.constructor) && f(e.constructor.isBuffer) && e.constructor.isBuffer(e)
|
|
56
|
+
},
|
|
57
|
+
isFormData: e => {
|
|
58
|
+
const n = "[object FormData]";
|
|
59
|
+
return e && ("function" == typeof FormData && e instanceof FormData || t.call(e) === n || f(e.toString) && e.toString() === n)
|
|
60
|
+
},
|
|
61
|
+
isArrayBufferView: function (e) {
|
|
62
|
+
let t;
|
|
63
|
+
return t = "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && u(e.buffer), t
|
|
64
|
+
},
|
|
65
|
+
isString: l,
|
|
66
|
+
isNumber: d,
|
|
67
|
+
isBoolean: e => !0 === e || !1 === e,
|
|
68
|
+
isObject: p,
|
|
69
|
+
isPlainObject: h,
|
|
70
|
+
isUndefined: c,
|
|
71
|
+
isDate: m,
|
|
72
|
+
isFile: y,
|
|
73
|
+
isBlob: g,
|
|
74
|
+
isRegExp: j,
|
|
75
|
+
isFunction: f,
|
|
76
|
+
isStream: e => p(e) && f(e.pipe),
|
|
77
|
+
isURLSearchParams: E,
|
|
78
|
+
isTypedArray: A,
|
|
79
|
+
isFileList: b,
|
|
80
|
+
forEach: w,
|
|
81
|
+
merge: function e() {
|
|
82
|
+
const {caseless: t} = R(this) && this || {}, n = {}, r = (r, o) => {
|
|
83
|
+
const s = t && O(n, o) || o;
|
|
84
|
+
h(n[s]) && h(r) ? n[s] = e(n[s], r) : h(r) ? n[s] = e({}, r) : a(r) ? n[s] = r.slice() : n[s] = r
|
|
85
|
+
};
|
|
86
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && w(arguments[e], r);
|
|
87
|
+
return n
|
|
88
|
+
},
|
|
89
|
+
extend: (t, n, r, {allOwnKeys: o} = {}) => (w(n, ((n, o) => {
|
|
90
|
+
r && f(n) ? t[o] = e(n, r) : t[o] = n
|
|
91
|
+
}), {allOwnKeys: o}), t),
|
|
92
|
+
trim: e => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""),
|
|
93
|
+
stripBOM: e => (65279 === e.charCodeAt(0) && (e = e.slice(1)), e),
|
|
94
|
+
inherits: (e, t, n, r) => {
|
|
95
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {value: t.prototype}), n && Object.assign(e.prototype, n)
|
|
96
|
+
},
|
|
97
|
+
toFlatObject: (e, t, r, o) => {
|
|
98
|
+
let s, i, a;
|
|
99
|
+
const c = {};
|
|
100
|
+
if (t = t || {}, null == e) return t;
|
|
101
|
+
do {
|
|
102
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0;) a = s[i], o && !o(a, e, t) || c[a] || (t[a] = e[a], c[a] = !0);
|
|
103
|
+
e = !1 !== r && n(e)
|
|
104
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
105
|
+
return t
|
|
106
|
+
},
|
|
107
|
+
kindOf: r,
|
|
108
|
+
kindOfTest: s,
|
|
109
|
+
endsWith: (e, t, n) => {
|
|
110
|
+
e = String(e), (void 0 === n || n > e.length) && (n = e.length), n -= t.length;
|
|
111
|
+
const r = e.indexOf(t, n);
|
|
112
|
+
return -1 !== r && r === n
|
|
113
|
+
},
|
|
114
|
+
toArray: e => {
|
|
115
|
+
if (!e) return null;
|
|
116
|
+
if (a(e)) return e;
|
|
117
|
+
let t = e.length;
|
|
118
|
+
if (!d(t)) return null;
|
|
119
|
+
const n = new Array(t);
|
|
120
|
+
for (; t-- > 0;) n[t] = e[t];
|
|
121
|
+
return n
|
|
122
|
+
},
|
|
123
|
+
forEachEntry: (e, t) => {
|
|
124
|
+
const n = (e && e[Symbol.iterator]).call(e);
|
|
125
|
+
let r;
|
|
126
|
+
for (; (r = n.next()) && !r.done;) {
|
|
127
|
+
const n = r.value;
|
|
128
|
+
t.call(e, n[0], n[1])
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
matchAll: (e, t) => {
|
|
132
|
+
let n;
|
|
133
|
+
const r = [];
|
|
134
|
+
for (; null !== (n = e.exec(t));) r.push(n);
|
|
135
|
+
return r
|
|
136
|
+
},
|
|
137
|
+
isHTMLForm: N,
|
|
138
|
+
hasOwnProperty: C,
|
|
139
|
+
hasOwnProp: C,
|
|
140
|
+
reduceDescriptors: v,
|
|
141
|
+
freezeMethods: e => {
|
|
142
|
+
v(e, ((t, n) => {
|
|
143
|
+
if (f(e) && -1 !== ["arguments", "caller", "callee"].indexOf(n)) return !1;
|
|
144
|
+
const r = e[n];
|
|
145
|
+
f(r) && (t.enumerable = !1, "writable" in t ? t.writable = !1 : t.set || (t.set = () => {
|
|
146
|
+
throw Error("Can not rewrite read-only method '" + n + "'")
|
|
147
|
+
}))
|
|
148
|
+
}))
|
|
149
|
+
},
|
|
150
|
+
toObjectSet: (e, t) => {
|
|
151
|
+
const n = {}, r = e => {
|
|
152
|
+
e.forEach((e => {
|
|
153
|
+
n[e] = !0
|
|
154
|
+
}))
|
|
155
|
+
};
|
|
156
|
+
return a(e) ? r(e) : r(String(e).split(t)), n
|
|
157
|
+
},
|
|
158
|
+
toCamelCase: e => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, (function (e, t, n) {
|
|
159
|
+
return t.toUpperCase() + n
|
|
160
|
+
})),
|
|
161
|
+
noop: () => {
|
|
162
|
+
},
|
|
163
|
+
toFiniteNumber: (e, t) => (e = +e, Number.isFinite(e) ? e : t),
|
|
164
|
+
findKey: O,
|
|
165
|
+
global: S,
|
|
166
|
+
isContextDefined: R,
|
|
167
|
+
ALPHABET: P,
|
|
168
|
+
generateString: (e = 16, t = P.ALPHA_DIGIT) => {
|
|
169
|
+
let n = "";
|
|
170
|
+
const {length: r} = t;
|
|
171
|
+
for (; e--;) n += t[Math.random() * r | 0];
|
|
172
|
+
return n
|
|
173
|
+
},
|
|
174
|
+
isSpecCompliantForm: function (e) {
|
|
175
|
+
return !!(e && f(e.append) && "FormData" === e[Symbol.toStringTag] && e[Symbol.iterator])
|
|
176
|
+
},
|
|
177
|
+
toJSONObject: e => {
|
|
178
|
+
const t = new Array(10), n = (e, r) => {
|
|
179
|
+
if (p(e)) {
|
|
180
|
+
if (t.indexOf(e) >= 0) return;
|
|
181
|
+
if (!("toJSON" in e)) {
|
|
182
|
+
t[r] = e;
|
|
183
|
+
const o = a(e) ? [] : {};
|
|
184
|
+
return w(e, ((e, t) => {
|
|
185
|
+
const s = n(e, r + 1);
|
|
186
|
+
!c(s) && (o[t] = s)
|
|
187
|
+
})), t[r] = void 0, o
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return e
|
|
191
|
+
};
|
|
192
|
+
return n(e, 0)
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
function _(e, t, n, r, o) {
|
|
197
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (new Error).stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
U.inherits(_, Error, {
|
|
201
|
+
toJSON: function () {
|
|
202
|
+
return {
|
|
203
|
+
message: this.message,
|
|
204
|
+
name: this.name,
|
|
205
|
+
description: this.description,
|
|
206
|
+
number: this.number,
|
|
207
|
+
fileName: this.fileName,
|
|
208
|
+
lineNumber: this.lineNumber,
|
|
209
|
+
columnNumber: this.columnNumber,
|
|
210
|
+
stack: this.stack,
|
|
211
|
+
config: U.toJSONObject(this.config),
|
|
212
|
+
code: this.code,
|
|
213
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const F = _.prototype, B = {};
|
|
218
|
+
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((e => {
|
|
219
|
+
B[e] = {value: e}
|
|
220
|
+
})), Object.defineProperties(_, B), Object.defineProperty(F, "isAxiosError", {value: !0}), _.from = (e, t, n, r, o, s) => {
|
|
221
|
+
const i = Object.create(F);
|
|
222
|
+
return U.toFlatObject(e, i, (function (e) {
|
|
223
|
+
return e !== Error.prototype
|
|
224
|
+
}), (e => "isAxiosError" !== e)), _.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
function L(e) {
|
|
228
|
+
return U.isPlainObject(e) || U.isArray(e)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function D(e) {
|
|
232
|
+
return U.endsWith(e, "[]") ? e.slice(0, -2) : e
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function k(e, t, n) {
|
|
236
|
+
return e ? e.concat(t).map((function (e, t) {
|
|
237
|
+
return e = D(e), !n && t ? "[" + e + "]" : e
|
|
238
|
+
})).join(n ? "." : "") : t
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const q = U.toFlatObject(U, {}, null, (function (e) {
|
|
242
|
+
return /^is[A-Z]/.test(e)
|
|
243
|
+
}));
|
|
244
|
+
|
|
245
|
+
function I(e, t, n) {
|
|
246
|
+
if (!U.isObject(e)) throw new TypeError("target must be an object");
|
|
247
|
+
t = t || new FormData;
|
|
248
|
+
const r = (n = U.toFlatObject(n, {metaTokens: !0, dots: !1, indexes: !1}, !1, (function (e, t) {
|
|
249
|
+
return !U.isUndefined(t[e])
|
|
250
|
+
}))).metaTokens, o = n.visitor || u, s = n.dots, i = n.indexes,
|
|
251
|
+
a = (n.Blob || "undefined" != typeof Blob && Blob) && U.isSpecCompliantForm(t);
|
|
252
|
+
if (!U.isFunction(o)) throw new TypeError("visitor must be a function");
|
|
253
|
+
|
|
254
|
+
function c(e) {
|
|
255
|
+
if (null === e) return "";
|
|
256
|
+
if (U.isDate(e)) return e.toISOString();
|
|
257
|
+
if (!a && U.isBlob(e)) throw new _("Blob is not supported. Use a Buffer instead.");
|
|
258
|
+
return U.isArrayBuffer(e) || U.isTypedArray(e) ? a && "function" == typeof Blob ? new Blob([e]) : Buffer.from(e) : e
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function u(e, n, o) {
|
|
262
|
+
let a = e;
|
|
263
|
+
if (e && !o && "object" == typeof e) if (U.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e); else if (U.isArray(e) && function (e) {
|
|
264
|
+
return U.isArray(e) && !e.some(L)
|
|
265
|
+
}(e) || (U.isFileList(e) || U.endsWith(n, "[]")) && (a = U.toArray(e))) return n = D(n), a.forEach((function (e, r) {
|
|
266
|
+
!U.isUndefined(e) && null !== e && t.append(!0 === i ? k([n], r, s) : null === i ? n : n + "[]", c(e))
|
|
267
|
+
})), !1;
|
|
268
|
+
return !!L(e) || (t.append(k(o, n, s), c(e)), !1)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const l = [], f = Object.assign(q, {defaultVisitor: u, convertValue: c, isVisitable: L});
|
|
272
|
+
if (!U.isObject(e)) throw new TypeError("data must be an object");
|
|
273
|
+
return function e(n, r) {
|
|
274
|
+
if (!U.isUndefined(n)) {
|
|
275
|
+
if (-1 !== l.indexOf(n)) throw Error("Circular reference detected in " + r.join("."));
|
|
276
|
+
l.push(n), U.forEach(n, (function (n, s) {
|
|
277
|
+
!0 === (!(U.isUndefined(n) || null === n) && o.call(t, n, U.isString(s) ? s.trim() : s, r, f)) && e(n, r ? r.concat(s) : [s])
|
|
278
|
+
})), l.pop()
|
|
279
|
+
}
|
|
280
|
+
}(e), t
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function M(e) {
|
|
284
|
+
const t = {"!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0"};
|
|
285
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, (function (e) {
|
|
286
|
+
return t[e]
|
|
287
|
+
}))
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function z(e, t) {
|
|
291
|
+
this._pairs = [], e && I(e, this, t)
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const H = z.prototype;
|
|
295
|
+
|
|
296
|
+
function J(e) {
|
|
297
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]")
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function V(e, t, n) {
|
|
301
|
+
if (!t) return e;
|
|
302
|
+
const r = n && n.encode || J, o = n && n.serialize;
|
|
303
|
+
let s;
|
|
304
|
+
if (s = o ? o(t, n) : U.isURLSearchParams(t) ? t.toString() : new z(t, n).toString(r), s) {
|
|
305
|
+
const t = e.indexOf("#");
|
|
306
|
+
-1 !== t && (e = e.slice(0, t)), e += (-1 === e.indexOf("?") ? "?" : "&") + s
|
|
307
|
+
}
|
|
308
|
+
return e
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
H.append = function (e, t) {
|
|
312
|
+
this._pairs.push([e, t])
|
|
313
|
+
}, H.toString = function (e) {
|
|
314
|
+
const t = e ? function (t) {
|
|
315
|
+
return e.call(this, t, M)
|
|
316
|
+
} : M;
|
|
317
|
+
return this._pairs.map((function (e) {
|
|
318
|
+
return t(e[0]) + "=" + t(e[1])
|
|
319
|
+
}), "").join("&")
|
|
320
|
+
};
|
|
321
|
+
const W = class {
|
|
322
|
+
constructor() {
|
|
323
|
+
this.handlers = []
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
use(e, t, n) {
|
|
327
|
+
return this.handlers.push({
|
|
328
|
+
fulfilled: e,
|
|
329
|
+
rejected: t,
|
|
330
|
+
synchronous: !!n && n.synchronous,
|
|
331
|
+
runWhen: n ? n.runWhen : null
|
|
332
|
+
}), this.handlers.length - 1
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
eject(e) {
|
|
336
|
+
this.handlers[e] && (this.handlers[e] = null)
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
clear() {
|
|
340
|
+
this.handlers && (this.handlers = [])
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
forEach(e) {
|
|
344
|
+
U.forEach(this.handlers, (function (t) {
|
|
345
|
+
null !== t && e(t)
|
|
346
|
+
}))
|
|
347
|
+
}
|
|
348
|
+
}, K = {silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1}, G = {
|
|
349
|
+
isBrowser: !0,
|
|
350
|
+
classes: {
|
|
351
|
+
URLSearchParams: "undefined" != typeof URLSearchParams ? URLSearchParams : z,
|
|
352
|
+
FormData: "undefined" != typeof FormData ? FormData : null,
|
|
353
|
+
Blob: "undefined" != typeof Blob ? Blob : null
|
|
354
|
+
},
|
|
355
|
+
isStandardBrowserEnv: (() => {
|
|
356
|
+
if (typeof wx !== 'undefined' && typeof wx.request === 'function') return false
|
|
357
|
+
let e;
|
|
358
|
+
return ("undefined" == typeof navigator || "ReactNative" !== (e = navigator.product) && "NativeScript" !== e && "NS" !== e) && ("undefined" != typeof window && "undefined" != typeof document)
|
|
359
|
+
})(),
|
|
360
|
+
isStandardBrowserWebWorkerEnv: "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && "function" == typeof self.importScripts,
|
|
361
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
function $(e) {
|
|
365
|
+
function t(e, n, r, o) {
|
|
366
|
+
let s = e[o++];
|
|
367
|
+
const i = Number.isFinite(+s), a = o >= e.length;
|
|
368
|
+
if (s = !s && U.isArray(r) ? r.length : s, a) return U.hasOwnProp(r, s) ? r[s] = [r[s], n] : r[s] = n, !i;
|
|
369
|
+
r[s] && U.isObject(r[s]) || (r[s] = []);
|
|
370
|
+
return t(e, n, r[s], o) && U.isArray(r[s]) && (r[s] = function (e) {
|
|
371
|
+
const t = {}, n = Object.keys(e);
|
|
372
|
+
let r;
|
|
373
|
+
const o = n.length;
|
|
374
|
+
let s;
|
|
375
|
+
for (r = 0; r < o; r++) s = n[r], t[s] = e[s];
|
|
376
|
+
return t
|
|
377
|
+
}(r[s])), !i
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (U.isFormData(e) && U.isFunction(e.entries)) {
|
|
381
|
+
const n = {};
|
|
382
|
+
return U.forEachEntry(e, ((e, r) => {
|
|
383
|
+
t(function (e) {
|
|
384
|
+
return U.matchAll(/\w+|\[(\w*)]/g, e).map((e => "[]" === e[0] ? "" : e[1] || e[0]))
|
|
385
|
+
}(e), r, n, 0)
|
|
386
|
+
})), n
|
|
387
|
+
}
|
|
388
|
+
return null
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const X = {"Content-Type": void 0};
|
|
392
|
+
const Q = {
|
|
393
|
+
transitional: K,
|
|
394
|
+
adapter: ["xhr", "http"],
|
|
395
|
+
transformRequest: [function (e, t) {
|
|
396
|
+
const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = U.isObject(e);
|
|
397
|
+
o && U.isHTMLForm(e) && (e = new FormData(e));
|
|
398
|
+
if (U.isFormData(e)) return r && r ? JSON.stringify($(e)) : e;
|
|
399
|
+
if (U.isArrayBuffer(e) || U.isBuffer(e) || U.isStream(e) || U.isFile(e) || U.isBlob(e)) return e;
|
|
400
|
+
if (U.isArrayBufferView(e)) return e.buffer;
|
|
401
|
+
if (U.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
402
|
+
let s;
|
|
403
|
+
if (o) {
|
|
404
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return function (e, t) {
|
|
405
|
+
return I(e, new G.classes.URLSearchParams, Object.assign({
|
|
406
|
+
visitor: function (e, t, n, r) {
|
|
407
|
+
return G.isNode && U.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments)
|
|
408
|
+
}
|
|
409
|
+
}, t))
|
|
410
|
+
}(e, this.formSerializer).toString();
|
|
411
|
+
if ((s = U.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
412
|
+
const t = this.env && this.env.FormData;
|
|
413
|
+
return I(s ? {"files[]": e} : e, t && new t, this.formSerializer)
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return o || r ? (t.setContentType("application/json", !1), function (e, t, n) {
|
|
417
|
+
if (U.isString(e)) try {
|
|
418
|
+
return (t || JSON.parse)(e), U.trim(e)
|
|
419
|
+
} catch (e) {
|
|
420
|
+
if ("SyntaxError" !== e.name) throw e
|
|
421
|
+
}
|
|
422
|
+
return (n || JSON.stringify)(e)
|
|
423
|
+
}(e)) : e
|
|
424
|
+
}],
|
|
425
|
+
transformResponse: [function (e) {
|
|
426
|
+
const t = this.transitional || Q.transitional, n = t && t.forcedJSONParsing, r = "json" === this.responseType;
|
|
427
|
+
if (e && U.isString(e) && (n && !this.responseType || r)) {
|
|
428
|
+
const n = !(t && t.silentJSONParsing) && r;
|
|
429
|
+
try {
|
|
430
|
+
return JSON.parse(e)
|
|
431
|
+
} catch (e) {
|
|
432
|
+
if (n) {
|
|
433
|
+
if ("SyntaxError" === e.name) throw _.from(e, _.ERR_BAD_RESPONSE, this, null, this.response);
|
|
434
|
+
throw e
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return e
|
|
439
|
+
}],
|
|
440
|
+
timeout: 0,
|
|
441
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
442
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
443
|
+
maxContentLength: -1,
|
|
444
|
+
maxBodyLength: -1,
|
|
445
|
+
env: {FormData: G.classes.FormData, Blob: G.classes.Blob},
|
|
446
|
+
validateStatus: function (e) {
|
|
447
|
+
return e >= 200 && e < 300
|
|
448
|
+
},
|
|
449
|
+
headers: {common: {Accept: "application/json, text/plain, */*"}}
|
|
450
|
+
};
|
|
451
|
+
U.forEach(["delete", "get", "head"], (function (e) {
|
|
452
|
+
Q.headers[e] = {}
|
|
453
|
+
})), U.forEach(["post", "put", "patch"], (function (e) {
|
|
454
|
+
Q.headers[e] = U.merge(X)
|
|
455
|
+
}));
|
|
456
|
+
const Z = Q,
|
|
457
|
+
Y = U.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]),
|
|
458
|
+
ee = Symbol("internals");
|
|
459
|
+
|
|
460
|
+
function te(e) {
|
|
461
|
+
return e && String(e).trim().toLowerCase()
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function ne(e) {
|
|
465
|
+
return !1 === e || null == e ? e : U.isArray(e) ? e.map(ne) : String(e)
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function re(e, t, n, r, o) {
|
|
469
|
+
return U.isFunction(r) ? r.call(this, t, n) : (o && (t = n), U.isString(t) ? U.isString(r) ? -1 !== t.indexOf(r) : U.isRegExp(r) ? r.test(t) : void 0 : void 0)
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
class oe {
|
|
473
|
+
constructor(e) {
|
|
474
|
+
e && this.set(e)
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
set(e, t, n) {
|
|
478
|
+
const r = this;
|
|
479
|
+
|
|
480
|
+
function o(e, t, n) {
|
|
481
|
+
const o = te(t);
|
|
482
|
+
if (!o) throw new Error("header name must be a non-empty string");
|
|
483
|
+
const s = U.findKey(r, o);
|
|
484
|
+
(!s || void 0 === r[s] || !0 === n || void 0 === n && !1 !== r[s]) && (r[s || t] = ne(e))
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const s = (e, t) => U.forEach(e, ((e, n) => o(e, n, t)));
|
|
488
|
+
return U.isPlainObject(e) || e instanceof this.constructor ? s(e, t) : U.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z]+$/.test(e.trim()) ? s((e => {
|
|
489
|
+
const t = {};
|
|
490
|
+
let n, r, o;
|
|
491
|
+
return e && e.split("\n").forEach((function (e) {
|
|
492
|
+
o = e.indexOf(":"), n = e.substring(0, o).trim().toLowerCase(), r = e.substring(o + 1).trim(), !n || t[n] && Y[n] || ("set-cookie" === n ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r)
|
|
493
|
+
})), t
|
|
494
|
+
})(e), t) : null != e && o(t, e, n), this
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
get(e, t) {
|
|
498
|
+
if (e = te(e)) {
|
|
499
|
+
const n = U.findKey(this, e);
|
|
500
|
+
if (n) {
|
|
501
|
+
const e = this[n];
|
|
502
|
+
if (!t) return e;
|
|
503
|
+
if (!0 === t) return function (e) {
|
|
504
|
+
const t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
505
|
+
let r;
|
|
506
|
+
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
507
|
+
return t
|
|
508
|
+
}(e);
|
|
509
|
+
if (U.isFunction(t)) return t.call(this, e, n);
|
|
510
|
+
if (U.isRegExp(t)) return t.exec(e);
|
|
511
|
+
throw new TypeError("parser must be boolean|regexp|function")
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
has(e, t) {
|
|
517
|
+
if (e = te(e)) {
|
|
518
|
+
const n = U.findKey(this, e);
|
|
519
|
+
return !(!n || void 0 === this[n] || t && !re(0, this[n], n, t))
|
|
520
|
+
}
|
|
521
|
+
return !1
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
delete(e, t) {
|
|
525
|
+
const n = this;
|
|
526
|
+
let r = !1;
|
|
527
|
+
|
|
528
|
+
function o(e) {
|
|
529
|
+
if (e = te(e)) {
|
|
530
|
+
const o = U.findKey(n, e);
|
|
531
|
+
!o || t && !re(0, n[o], o, t) || (delete n[o], r = !0)
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
return U.isArray(e) ? e.forEach(o) : o(e), r
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
clear(e) {
|
|
539
|
+
const t = Object.keys(this);
|
|
540
|
+
let n = t.length, r = !1;
|
|
541
|
+
for (; n--;) {
|
|
542
|
+
const o = t[n];
|
|
543
|
+
e && !re(0, this[o], o, e, !0) || (delete this[o], r = !0)
|
|
544
|
+
}
|
|
545
|
+
return r
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
normalize(e) {
|
|
549
|
+
const t = this, n = {};
|
|
550
|
+
return U.forEach(this, ((r, o) => {
|
|
551
|
+
const s = U.findKey(n, o);
|
|
552
|
+
if (s) return t[s] = ne(r), void delete t[o];
|
|
553
|
+
const i = e ? function (e) {
|
|
554
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, ((e, t, n) => t.toUpperCase() + n))
|
|
555
|
+
}(o) : String(o).trim();
|
|
556
|
+
i !== o && delete t[o], t[i] = ne(r), n[i] = !0
|
|
557
|
+
})), this
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
concat(...e) {
|
|
561
|
+
return this.constructor.concat(this, ...e)
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
toJSON(e) {
|
|
565
|
+
const t = Object.create(null);
|
|
566
|
+
return U.forEach(this, ((n, r) => {
|
|
567
|
+
null != n && !1 !== n && (t[r] = e && U.isArray(n) ? n.join(", ") : n)
|
|
568
|
+
})), t
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
[Symbol.iterator]() {
|
|
572
|
+
return Object.entries(this.toJSON())[Symbol.iterator]()
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
toString() {
|
|
576
|
+
return Object.entries(this.toJSON()).map((([e, t]) => e + ": " + t)).join("\n")
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
get [Symbol.toStringTag]() {
|
|
580
|
+
return "AxiosHeaders"
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
static from(e) {
|
|
584
|
+
return e instanceof this ? e : new this(e)
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
static concat(e, ...t) {
|
|
588
|
+
const n = new this(e);
|
|
589
|
+
return t.forEach((e => n.set(e))), n
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
static accessor(e) {
|
|
593
|
+
const t = (this[ee] = this[ee] = {accessors: {}}).accessors, n = this.prototype;
|
|
594
|
+
|
|
595
|
+
function r(e) {
|
|
596
|
+
const r = te(e);
|
|
597
|
+
t[r] || (!function (e, t) {
|
|
598
|
+
const n = U.toCamelCase(" " + t);
|
|
599
|
+
["get", "set", "has"].forEach((r => {
|
|
600
|
+
Object.defineProperty(e, r + n, {
|
|
601
|
+
value: function (e, n, o) {
|
|
602
|
+
return this[r].call(this, t, e, n, o)
|
|
603
|
+
}, configurable: !0
|
|
604
|
+
})
|
|
605
|
+
}))
|
|
606
|
+
}(n, e), t[r] = !0)
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
return U.isArray(e) ? e.forEach(r) : r(e), this
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), U.freezeMethods(oe.prototype), U.freezeMethods(oe);
|
|
614
|
+
const se = oe;
|
|
615
|
+
|
|
616
|
+
function ie(e, t) {
|
|
617
|
+
const n = this || Z, r = t || n, o = se.from(r.headers);
|
|
618
|
+
let s = r.data;
|
|
619
|
+
return U.forEach(e, (function (e) {
|
|
620
|
+
s = e.call(n, s, o.normalize(), t ? t.status : void 0)
|
|
621
|
+
})), o.normalize(), s
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
function ae(e) {
|
|
625
|
+
return !(!e || !e.__CANCEL__)
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
function ce(e, t, n) {
|
|
629
|
+
_.call(this, null == e ? "canceled" : e, _.ERR_CANCELED, t, n), this.name = "CanceledError"
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
U.inherits(ce, _, {__CANCEL__: !0});
|
|
633
|
+
const ue = G.isStandardBrowserEnv ? {
|
|
634
|
+
write: function (e, t, n, r, o, s) {
|
|
635
|
+
const i = [];
|
|
636
|
+
i.push(e + "=" + encodeURIComponent(t)), U.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), U.isString(r) && i.push("path=" + r), U.isString(o) && i.push("domain=" + o), !0 === s && i.push("secure"), document.cookie = i.join("; ")
|
|
637
|
+
}, read: function (e) {
|
|
638
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
639
|
+
return t ? decodeURIComponent(t[3]) : null
|
|
640
|
+
}, remove: function (e) {
|
|
641
|
+
this.write(e, "", Date.now() - 864e5)
|
|
642
|
+
}
|
|
643
|
+
} : {
|
|
644
|
+
write: function () {
|
|
645
|
+
}, read: function () {
|
|
646
|
+
return null
|
|
647
|
+
}, remove: function () {
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
function le(e, t) {
|
|
652
|
+
return e && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t) ? function (e, t) {
|
|
653
|
+
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e
|
|
654
|
+
}(e, t) : t
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
const fe = G.isStandardBrowserEnv ? function () {
|
|
658
|
+
const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a");
|
|
659
|
+
let n;
|
|
660
|
+
|
|
661
|
+
function r(n) {
|
|
662
|
+
let r = n;
|
|
663
|
+
return e && (t.setAttribute("href", r), r = t.href), t.setAttribute("href", r), {
|
|
664
|
+
href: t.href,
|
|
665
|
+
protocol: t.protocol ? t.protocol.replace(/:$/, "") : "",
|
|
666
|
+
host: t.host,
|
|
667
|
+
search: t.search ? t.search.replace(/^\?/, "") : "",
|
|
668
|
+
hash: t.hash ? t.hash.replace(/^#/, "") : "",
|
|
669
|
+
hostname: t.hostname,
|
|
670
|
+
port: t.port,
|
|
671
|
+
pathname: "/" === t.pathname.charAt(0) ? t.pathname : "/" + t.pathname
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
return n = r(window.location.href), function (e) {
|
|
676
|
+
const t = U.isString(e) ? r(e) : e;
|
|
677
|
+
return t.protocol === n.protocol && t.host === n.host
|
|
678
|
+
}
|
|
679
|
+
}() : function () {
|
|
680
|
+
return !0
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
function de(e, t) {
|
|
684
|
+
let n = 0;
|
|
685
|
+
const r = function (e, t) {
|
|
686
|
+
e = e || 10;
|
|
687
|
+
const n = new Array(e), r = new Array(e);
|
|
688
|
+
let o, s = 0, i = 0;
|
|
689
|
+
return t = void 0 !== t ? t : 1e3, function (a) {
|
|
690
|
+
const c = Date.now(), u = r[i];
|
|
691
|
+
o || (o = c), n[s] = a, r[s] = c;
|
|
692
|
+
let l = i, f = 0;
|
|
693
|
+
for (; l !== s;) f += n[l++], l %= e;
|
|
694
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), c - o < t) return;
|
|
695
|
+
const d = u && c - u;
|
|
696
|
+
return d ? Math.round(1e3 * f / d) : void 0
|
|
697
|
+
}
|
|
698
|
+
}(50, 250);
|
|
699
|
+
return o => {
|
|
700
|
+
const s = o.loaded, i = o.lengthComputable ? o.total : void 0, a = s - n, c = r(a);
|
|
701
|
+
n = s;
|
|
702
|
+
const u = {
|
|
703
|
+
loaded: s,
|
|
704
|
+
total: i,
|
|
705
|
+
progress: i ? s / i : void 0,
|
|
706
|
+
bytes: a,
|
|
707
|
+
rate: c || void 0,
|
|
708
|
+
estimated: c && i && s <= i ? (i - s) / c : void 0,
|
|
709
|
+
event: o
|
|
710
|
+
};
|
|
711
|
+
u[t ? "download" : "upload"] = !0, e(u)
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
const pe = {
|
|
716
|
+
http: null, xhr: "undefined" != typeof XMLHttpRequest && function (e) {
|
|
717
|
+
return new Promise((function (t, n) {
|
|
718
|
+
let r = e.data;
|
|
719
|
+
const o = se.from(e.headers).normalize(), s = e.responseType;
|
|
720
|
+
let i;
|
|
721
|
+
|
|
722
|
+
function a() {
|
|
723
|
+
e.cancelToken && e.cancelToken.unsubscribe(i), e.signal && e.signal.removeEventListener("abort", i)
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
U.isFormData(r) && (G.isStandardBrowserEnv || G.isStandardBrowserWebWorkerEnv) && o.setContentType(!1);
|
|
727
|
+
let c = new XMLHttpRequest;
|
|
728
|
+
if (e.auth) {
|
|
729
|
+
const t = e.auth.username || "", n = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
730
|
+
o.set("Authorization", "Basic " + btoa(t + ":" + n))
|
|
731
|
+
}
|
|
732
|
+
const u = le(e.baseURL, e.url);
|
|
733
|
+
|
|
734
|
+
function l() {
|
|
735
|
+
if (!c) return;
|
|
736
|
+
const r = se.from("getAllResponseHeaders" in c && c.getAllResponseHeaders());
|
|
737
|
+
!function (e, t, n) {
|
|
738
|
+
const r = n.config.validateStatus;
|
|
739
|
+
n.status && r && !r(n.status) ? t(new _("Request failed with status code " + n.status, [_.ERR_BAD_REQUEST, _.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : e(n)
|
|
740
|
+
}((function (e) {
|
|
741
|
+
t(e), a()
|
|
742
|
+
}), (function (e) {
|
|
743
|
+
n(e), a()
|
|
744
|
+
}), {
|
|
745
|
+
data: s && "text" !== s && "json" !== s ? c.response : c.responseText,
|
|
746
|
+
status: c.status,
|
|
747
|
+
statusText: c.statusText,
|
|
748
|
+
headers: r,
|
|
749
|
+
config: e,
|
|
750
|
+
request: c
|
|
751
|
+
}), c = null
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
if (c.open(e.method.toUpperCase(), V(u, e.params, e.paramsSerializer), !0), c.timeout = e.timeout, "onloadend" in c ? c.onloadend = l : c.onreadystatechange = function () {
|
|
755
|
+
c && 4 === c.readyState && (0 !== c.status || c.responseURL && 0 === c.responseURL.indexOf("file:")) && setTimeout(l)
|
|
756
|
+
}, c.onabort = function () {
|
|
757
|
+
c && (n(new _("Request aborted", _.ECONNABORTED, e, c)), c = null)
|
|
758
|
+
}, c.onerror = function () {
|
|
759
|
+
n(new _("Network Error", _.ERR_NETWORK, e, c)), c = null
|
|
760
|
+
}, c.ontimeout = function () {
|
|
761
|
+
let t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
762
|
+
const r = e.transitional || K;
|
|
763
|
+
e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(new _(t, r.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED, e, c)), c = null
|
|
764
|
+
}, G.isStandardBrowserEnv) {
|
|
765
|
+
const t = (e.withCredentials || fe(u)) && e.xsrfCookieName && ue.read(e.xsrfCookieName);
|
|
766
|
+
t && o.set(e.xsrfHeaderName, t)
|
|
767
|
+
}
|
|
768
|
+
void 0 === r && o.setContentType(null), "setRequestHeader" in c && U.forEach(o.toJSON(), (function (e, t) {
|
|
769
|
+
c.setRequestHeader(t, e)
|
|
770
|
+
})), U.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), s && "json" !== s && (c.responseType = e.responseType), "function" == typeof e.onDownloadProgress && c.addEventListener("progress", de(e.onDownloadProgress, !0)), "function" == typeof e.onUploadProgress && c.upload && c.upload.addEventListener("progress", de(e.onUploadProgress)), (e.cancelToken || e.signal) && (i = t => {
|
|
771
|
+
c && (n(!t || t.type ? new ce(null, e, c) : t), c.abort(), c = null)
|
|
772
|
+
}, e.cancelToken && e.cancelToken.subscribe(i), e.signal && (e.signal.aborted ? i() : e.signal.addEventListener("abort", i)));
|
|
773
|
+
const f = function (e) {
|
|
774
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
775
|
+
return t && t[1] || ""
|
|
776
|
+
}(u);
|
|
777
|
+
f && -1 === G.protocols.indexOf(f) ? n(new _("Unsupported protocol " + f + ":", _.ERR_BAD_REQUEST, e)) : c.send(r || null)
|
|
778
|
+
}))
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
U.forEach(pe, ((e, t) => {
|
|
782
|
+
if (e) {
|
|
783
|
+
try {
|
|
784
|
+
Object.defineProperty(e, "name", {value: t})
|
|
785
|
+
} catch (e) {
|
|
786
|
+
}
|
|
787
|
+
Object.defineProperty(e, "adapterName", {value: t})
|
|
788
|
+
}
|
|
789
|
+
}));
|
|
790
|
+
const he = e => {
|
|
791
|
+
e = U.isArray(e) ? e : [e];
|
|
792
|
+
const {length: t} = e;
|
|
793
|
+
let n, r;
|
|
794
|
+
for (let o = 0; o < t && (n = e[o], !(r = U.isString(n) ? pe[n.toLowerCase()] : n)); o++) ;
|
|
795
|
+
if (!r) {
|
|
796
|
+
if (!1 === r) throw new _(`Adapter ${n} is not supported by the environment`, "ERR_NOT_SUPPORT");
|
|
797
|
+
throw new Error(U.hasOwnProp(pe, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`)
|
|
798
|
+
}
|
|
799
|
+
if (!U.isFunction(r)) throw new TypeError("adapter is not a function");
|
|
800
|
+
return r
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
function me(e) {
|
|
804
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new ce(null, e)
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
function ye(e) {
|
|
808
|
+
me(e), e.headers = se.from(e.headers), e.data = ie.call(e, e.transformRequest), -1 !== ["post", "put", "patch"].indexOf(e.method) && e.headers.setContentType("application/x-www-form-urlencoded", !1);
|
|
809
|
+
return he(e.adapter || Z.adapter)(e).then((function (t) {
|
|
810
|
+
return me(e), t.data = ie.call(e, e.transformResponse, t), t.headers = se.from(t.headers), t
|
|
811
|
+
}), (function (t) {
|
|
812
|
+
return ae(t) || (me(e), t && t.response && (t.response.data = ie.call(e, e.transformResponse, t.response), t.response.headers = se.from(t.response.headers))), Promise.reject(t)
|
|
813
|
+
}))
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
const ge = e => e instanceof se ? e.toJSON() : e;
|
|
817
|
+
|
|
818
|
+
function be(e, t) {
|
|
819
|
+
t = t || {};
|
|
820
|
+
const n = {};
|
|
821
|
+
|
|
822
|
+
function r(e, t, n) {
|
|
823
|
+
return U.isPlainObject(e) && U.isPlainObject(t) ? U.merge.call({caseless: n}, e, t) : U.isPlainObject(t) ? U.merge({}, t) : U.isArray(t) ? t.slice() : t
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function o(e, t, n) {
|
|
827
|
+
return U.isUndefined(t) ? U.isUndefined(e) ? void 0 : r(void 0, e, n) : r(e, t, n)
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
function s(e, t) {
|
|
831
|
+
if (!U.isUndefined(t)) return r(void 0, t)
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
function i(e, t) {
|
|
835
|
+
return U.isUndefined(t) ? U.isUndefined(e) ? void 0 : r(void 0, e) : r(void 0, t)
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function a(n, o, s) {
|
|
839
|
+
return s in t ? r(n, o) : s in e ? r(void 0, n) : void 0
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
const c = {
|
|
843
|
+
url: s,
|
|
844
|
+
method: s,
|
|
845
|
+
data: s,
|
|
846
|
+
baseURL: i,
|
|
847
|
+
transformRequest: i,
|
|
848
|
+
transformResponse: i,
|
|
849
|
+
paramsSerializer: i,
|
|
850
|
+
timeout: i,
|
|
851
|
+
timeoutMessage: i,
|
|
852
|
+
withCredentials: i,
|
|
853
|
+
adapter: i,
|
|
854
|
+
responseType: i,
|
|
855
|
+
xsrfCookieName: i,
|
|
856
|
+
xsrfHeaderName: i,
|
|
857
|
+
onUploadProgress: i,
|
|
858
|
+
onDownloadProgress: i,
|
|
859
|
+
decompress: i,
|
|
860
|
+
maxContentLength: i,
|
|
861
|
+
maxBodyLength: i,
|
|
862
|
+
beforeRedirect: i,
|
|
863
|
+
transport: i,
|
|
864
|
+
httpAgent: i,
|
|
865
|
+
httpsAgent: i,
|
|
866
|
+
cancelToken: i,
|
|
867
|
+
socketPath: i,
|
|
868
|
+
responseEncoding: i,
|
|
869
|
+
validateStatus: a,
|
|
870
|
+
headers: (e, t) => o(ge(e), ge(t), !0)
|
|
871
|
+
};
|
|
872
|
+
return U.forEach(Object.keys(e).concat(Object.keys(t)), (function (r) {
|
|
873
|
+
const s = c[r] || o, i = s(e[r], t[r], r);
|
|
874
|
+
U.isUndefined(i) && s !== a || (n[r] = i)
|
|
875
|
+
})), n
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
const Ee = {};
|
|
879
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach(((e, t) => {
|
|
880
|
+
Ee[e] = function (n) {
|
|
881
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e
|
|
882
|
+
}
|
|
883
|
+
}));
|
|
884
|
+
const we = {};
|
|
885
|
+
Ee.transitional = function (e, t, n) {
|
|
886
|
+
function r(e, t) {
|
|
887
|
+
return "[Axios v1.3.4] Transitional option '" + e + "'" + t + (n ? ". " + n : "")
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
return (n, o, s) => {
|
|
891
|
+
if (!1 === e) throw new _(r(o, " has been removed" + (t ? " in " + t : "")), _.ERR_DEPRECATED);
|
|
892
|
+
return t && !we[o] && (we[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))), !e || e(n, o, s)
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
const Oe = {
|
|
896
|
+
assertOptions: function (e, t, n) {
|
|
897
|
+
if ("object" != typeof e) throw new _("options must be an object", _.ERR_BAD_OPTION_VALUE);
|
|
898
|
+
const r = Object.keys(e);
|
|
899
|
+
let o = r.length;
|
|
900
|
+
for (; o-- > 0;) {
|
|
901
|
+
const s = r[o], i = t[s];
|
|
902
|
+
if (i) {
|
|
903
|
+
const t = e[s], n = void 0 === t || i(t, s, e);
|
|
904
|
+
if (!0 !== n) throw new _("option " + s + " must be " + n, _.ERR_BAD_OPTION_VALUE)
|
|
905
|
+
} else if (!0 !== n) throw new _("Unknown option " + s, _.ERR_BAD_OPTION)
|
|
906
|
+
}
|
|
907
|
+
}, validators: Ee
|
|
908
|
+
}, Se = Oe.validators;
|
|
909
|
+
|
|
910
|
+
class Re {
|
|
911
|
+
constructor(e) {
|
|
912
|
+
this.defaults = e, this.interceptors = {request: new W, response: new W}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
request(e, t) {
|
|
916
|
+
"string" == typeof e ? (t = t || {}).url = e : t = e || {}, t = be(this.defaults, t);
|
|
917
|
+
const {transitional: n, paramsSerializer: r, headers: o} = t;
|
|
918
|
+
let s;
|
|
919
|
+
void 0 !== n && Oe.assertOptions(n, {
|
|
920
|
+
silentJSONParsing: Se.transitional(Se.boolean),
|
|
921
|
+
forcedJSONParsing: Se.transitional(Se.boolean),
|
|
922
|
+
clarifyTimeoutError: Se.transitional(Se.boolean)
|
|
923
|
+
}, !1), void 0 !== r && Oe.assertOptions(r, {
|
|
924
|
+
encode: Se.function,
|
|
925
|
+
serialize: Se.function
|
|
926
|
+
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase(), s = o && U.merge(o.common, o[t.method]), s && U.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (e => {
|
|
927
|
+
delete o[e]
|
|
928
|
+
})), t.headers = se.concat(s, o);
|
|
929
|
+
const i = [];
|
|
930
|
+
let a = !0;
|
|
931
|
+
this.interceptors.request.forEach((function (e) {
|
|
932
|
+
"function" == typeof e.runWhen && !1 === e.runWhen(t) || (a = a && e.synchronous, i.unshift(e.fulfilled, e.rejected))
|
|
933
|
+
}));
|
|
934
|
+
const c = [];
|
|
935
|
+
let u;
|
|
936
|
+
this.interceptors.response.forEach((function (e) {
|
|
937
|
+
c.push(e.fulfilled, e.rejected)
|
|
938
|
+
}));
|
|
939
|
+
let l, f = 0;
|
|
940
|
+
if (!a) {
|
|
941
|
+
const e = [ye.bind(this), void 0];
|
|
942
|
+
for (e.unshift.apply(e, i), e.push.apply(e, c), l = e.length, u = Promise.resolve(t); f < l;) u = u.then(e[f++], e[f++]);
|
|
943
|
+
return u
|
|
944
|
+
}
|
|
945
|
+
l = i.length;
|
|
946
|
+
let d = t;
|
|
947
|
+
for (f = 0; f < l;) {
|
|
948
|
+
const e = i[f++], t = i[f++];
|
|
949
|
+
try {
|
|
950
|
+
d = e(d)
|
|
951
|
+
} catch (e) {
|
|
952
|
+
t.call(this, e);
|
|
953
|
+
break
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
try {
|
|
957
|
+
u = ye.call(this, d)
|
|
958
|
+
} catch (e) {
|
|
959
|
+
return Promise.reject(e)
|
|
960
|
+
}
|
|
961
|
+
for (f = 0, l = c.length; f < l;) u = u.then(c[f++], c[f++]);
|
|
962
|
+
return u
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
getUri(e) {
|
|
966
|
+
return V(le((e = be(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer)
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
U.forEach(["delete", "get", "head", "options"], (function (e) {
|
|
971
|
+
Re.prototype[e] = function (t, n) {
|
|
972
|
+
return this.request(be(n || {}, {method: e, url: t, data: (n || {}).data}))
|
|
973
|
+
}
|
|
974
|
+
})), U.forEach(["post", "put", "patch"], (function (e) {
|
|
975
|
+
function t(t) {
|
|
976
|
+
return function (n, r, o) {
|
|
977
|
+
return this.request(be(o || {}, {
|
|
978
|
+
method: e,
|
|
979
|
+
headers: t ? {"Content-Type": "multipart/form-data"} : {},
|
|
980
|
+
url: n,
|
|
981
|
+
data: r
|
|
982
|
+
}))
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
Re.prototype[e] = t(), Re.prototype[e + "Form"] = t(!0)
|
|
987
|
+
}));
|
|
988
|
+
const Ae = Re;
|
|
989
|
+
|
|
990
|
+
class Te {
|
|
991
|
+
constructor(e) {
|
|
992
|
+
if ("function" != typeof e) throw new TypeError("executor must be a function.");
|
|
993
|
+
let t;
|
|
994
|
+
this.promise = new Promise((function (e) {
|
|
995
|
+
t = e
|
|
996
|
+
}));
|
|
997
|
+
const n = this;
|
|
998
|
+
this.promise.then((e => {
|
|
999
|
+
if (!n._listeners) return;
|
|
1000
|
+
let t = n._listeners.length;
|
|
1001
|
+
for (; t-- > 0;) n._listeners[t](e);
|
|
1002
|
+
n._listeners = null
|
|
1003
|
+
})), this.promise.then = e => {
|
|
1004
|
+
let t;
|
|
1005
|
+
const r = new Promise((e => {
|
|
1006
|
+
n.subscribe(e), t = e
|
|
1007
|
+
})).then(e);
|
|
1008
|
+
return r.cancel = function () {
|
|
1009
|
+
n.unsubscribe(t)
|
|
1010
|
+
}, r
|
|
1011
|
+
}, e((function (e, r, o) {
|
|
1012
|
+
n.reason || (n.reason = new ce(e, r, o), t(n.reason))
|
|
1013
|
+
}))
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
throwIfRequested() {
|
|
1017
|
+
if (this.reason) throw this.reason
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
subscribe(e) {
|
|
1021
|
+
this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e]
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
unsubscribe(e) {
|
|
1025
|
+
if (!this._listeners) return;
|
|
1026
|
+
const t = this._listeners.indexOf(e);
|
|
1027
|
+
-1 !== t && this._listeners.splice(t, 1)
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
static source() {
|
|
1031
|
+
let e;
|
|
1032
|
+
return {
|
|
1033
|
+
token: new Te((function (t) {
|
|
1034
|
+
e = t
|
|
1035
|
+
})), cancel: e
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
const Ne = Te;
|
|
1041
|
+
const Ce = {
|
|
1042
|
+
Continue: 100,
|
|
1043
|
+
SwitchingProtocols: 101,
|
|
1044
|
+
Processing: 102,
|
|
1045
|
+
EarlyHints: 103,
|
|
1046
|
+
Ok: 200,
|
|
1047
|
+
Created: 201,
|
|
1048
|
+
Accepted: 202,
|
|
1049
|
+
NonAuthoritativeInformation: 203,
|
|
1050
|
+
NoContent: 204,
|
|
1051
|
+
ResetContent: 205,
|
|
1052
|
+
PartialContent: 206,
|
|
1053
|
+
MultiStatus: 207,
|
|
1054
|
+
AlreadyReported: 208,
|
|
1055
|
+
ImUsed: 226,
|
|
1056
|
+
MultipleChoices: 300,
|
|
1057
|
+
MovedPermanently: 301,
|
|
1058
|
+
Found: 302,
|
|
1059
|
+
SeeOther: 303,
|
|
1060
|
+
NotModified: 304,
|
|
1061
|
+
UseProxy: 305,
|
|
1062
|
+
Unused: 306,
|
|
1063
|
+
TemporaryRedirect: 307,
|
|
1064
|
+
PermanentRedirect: 308,
|
|
1065
|
+
BadRequest: 400,
|
|
1066
|
+
Unauthorized: 401,
|
|
1067
|
+
PaymentRequired: 402,
|
|
1068
|
+
Forbidden: 403,
|
|
1069
|
+
NotFound: 404,
|
|
1070
|
+
MethodNotAllowed: 405,
|
|
1071
|
+
NotAcceptable: 406,
|
|
1072
|
+
ProxyAuthenticationRequired: 407,
|
|
1073
|
+
RequestTimeout: 408,
|
|
1074
|
+
Conflict: 409,
|
|
1075
|
+
Gone: 410,
|
|
1076
|
+
LengthRequired: 411,
|
|
1077
|
+
PreconditionFailed: 412,
|
|
1078
|
+
PayloadTooLarge: 413,
|
|
1079
|
+
UriTooLong: 414,
|
|
1080
|
+
UnsupportedMediaType: 415,
|
|
1081
|
+
RangeNotSatisfiable: 416,
|
|
1082
|
+
ExpectationFailed: 417,
|
|
1083
|
+
ImATeapot: 418,
|
|
1084
|
+
MisdirectedRequest: 421,
|
|
1085
|
+
UnprocessableEntity: 422,
|
|
1086
|
+
Locked: 423,
|
|
1087
|
+
FailedDependency: 424,
|
|
1088
|
+
TooEarly: 425,
|
|
1089
|
+
UpgradeRequired: 426,
|
|
1090
|
+
PreconditionRequired: 428,
|
|
1091
|
+
TooManyRequests: 429,
|
|
1092
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1093
|
+
UnavailableForLegalReasons: 451,
|
|
1094
|
+
InternalServerError: 500,
|
|
1095
|
+
NotImplemented: 501,
|
|
1096
|
+
BadGateway: 502,
|
|
1097
|
+
ServiceUnavailable: 503,
|
|
1098
|
+
GatewayTimeout: 504,
|
|
1099
|
+
HttpVersionNotSupported: 505,
|
|
1100
|
+
VariantAlsoNegotiates: 506,
|
|
1101
|
+
InsufficientStorage: 507,
|
|
1102
|
+
LoopDetected: 508,
|
|
1103
|
+
NotExtended: 510,
|
|
1104
|
+
NetworkAuthenticationRequired: 511
|
|
1105
|
+
};
|
|
1106
|
+
Object.entries(Ce).forEach((([e, t]) => {
|
|
1107
|
+
Ce[t] = e
|
|
1108
|
+
}));
|
|
1109
|
+
const je = Ce;
|
|
1110
|
+
const ve = function t(n) {
|
|
1111
|
+
const r = new Ae(n), o = e(Ae.prototype.request, r);
|
|
1112
|
+
return U.extend(o, Ae.prototype, r, {allOwnKeys: !0}), U.extend(o, r, null, {allOwnKeys: !0}), o.create = function (e) {
|
|
1113
|
+
return t(be(n, e))
|
|
1114
|
+
}, o
|
|
1115
|
+
}(Z);
|
|
1116
|
+
ve.Axios = Ae, ve.CanceledError = ce, ve.CancelToken = Ne, ve.isCancel = ae, ve.VERSION = "1.3.4", ve.toFormData = I, ve.AxiosError = _, ve.Cancel = ve.CanceledError, ve.all = function (e) {
|
|
1117
|
+
return Promise.all(e)
|
|
1118
|
+
}, ve.spread = function (e) {
|
|
1119
|
+
return function (t) {
|
|
1120
|
+
return e.apply(null, t)
|
|
1121
|
+
}
|
|
1122
|
+
}, ve.isAxiosError = function (e) {
|
|
1123
|
+
return U.isObject(e) && !0 === e.isAxiosError
|
|
1124
|
+
}, ve.mergeConfig = be, ve.AxiosHeaders = se, ve.formToJSON = e => $(U.isHTMLForm(e) ? new FormData(e) : e), ve.HttpStatusCode = je, ve.default = ve;
|
|
1125
|
+
const xe = ve, {
|
|
1126
|
+
Axios: Pe,
|
|
1127
|
+
AxiosError: Ue,
|
|
1128
|
+
CanceledError: _e,
|
|
1129
|
+
isCancel: Fe,
|
|
1130
|
+
CancelToken: Be,
|
|
1131
|
+
VERSION: Le,
|
|
1132
|
+
all: De,
|
|
1133
|
+
Cancel: ke,
|
|
1134
|
+
isAxiosError: qe,
|
|
1135
|
+
spread: Ie,
|
|
1136
|
+
toFormData: Me,
|
|
1137
|
+
AxiosHeaders: ze,
|
|
1138
|
+
HttpStatusCode: He,
|
|
1139
|
+
formToJSON: Je,
|
|
1140
|
+
mergeConfig: Ve
|
|
1141
|
+
} = xe;
|
|
1142
|
+
export {
|
|
1143
|
+
Pe as Axios,
|
|
1144
|
+
Ue as AxiosError,
|
|
1145
|
+
ze as AxiosHeaders,
|
|
1146
|
+
ke as Cancel,
|
|
1147
|
+
Be as CancelToken,
|
|
1148
|
+
_e as CanceledError,
|
|
1149
|
+
He as HttpStatusCode,
|
|
1150
|
+
Le as VERSION,
|
|
1151
|
+
De as all,
|
|
1152
|
+
xe as default,
|
|
1153
|
+
Je as formToJSON,
|
|
1154
|
+
qe as isAxiosError,
|
|
1155
|
+
Fe as isCancel,
|
|
1156
|
+
Ve as mergeConfig,
|
|
1157
|
+
Ie as spread,
|
|
1158
|
+
Me as toFormData
|
|
1159
|
+
};
|
|
1160
|
+
//# sourceMappingURL=axios.min.js.map
|