@acrool/react-fetcher 0.0.2-alpha.14 → 0.0.2-alpha.16
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/acrool-react-fetcher.es.js +643 -647
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var zt = Object.defineProperty;
|
|
2
|
-
var Jt = (e, t,
|
|
3
|
-
var $ = (e, t,
|
|
4
|
-
import Wt, { createContext as ft, useContext as Vt, useState as We,
|
|
2
|
+
var Jt = (e, t, n) => t in e ? zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $ = (e, t, n) => Jt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import Wt, { createContext as ft, useContext as Vt, useState as We, useLayoutEffect as Yt } from "react";
|
|
5
5
|
function dt(e) {
|
|
6
6
|
return new Promise((t) => {
|
|
7
7
|
setTimeout(() => {
|
|
@@ -9,30 +9,30 @@ function dt(e) {
|
|
|
9
9
|
}, e);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const pt = 400,
|
|
13
|
-
const s = e[
|
|
14
|
-
if (
|
|
12
|
+
const pt = 400, Kt = (e) => "File" in window && e instanceof File, Xt = (e) => "Blob" in window && e instanceof Blob, ht = (e, t = ["variables"]) => e && Object.keys(e).reduce((n, r) => {
|
|
13
|
+
const s = e[r];
|
|
14
|
+
if (Kt(s) || Xt(s))
|
|
15
15
|
return {
|
|
16
|
-
variables: { ...
|
|
17
|
-
map: [...
|
|
18
|
-
values: [...
|
|
16
|
+
variables: { ...n.variables, [r]: null },
|
|
17
|
+
map: [...n.map, t.concat(r).join(".")],
|
|
18
|
+
values: [...n.values, s]
|
|
19
19
|
};
|
|
20
20
|
if (s && typeof s == "object") {
|
|
21
|
-
const o = ht(s, t.concat(
|
|
21
|
+
const o = ht(s, t.concat(r));
|
|
22
22
|
return {
|
|
23
|
-
variables: { ...
|
|
24
|
-
map: [...
|
|
25
|
-
values: [...
|
|
23
|
+
variables: { ...n.variables, [r]: o.variables },
|
|
24
|
+
map: [...n.map, ...o.map],
|
|
25
|
+
values: [...n.values, ...o.values]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
...
|
|
30
|
-
variables: { ...
|
|
31
|
-
values:
|
|
29
|
+
...n,
|
|
30
|
+
variables: { ...n.variables, [r]: s },
|
|
31
|
+
values: n.values
|
|
32
32
|
};
|
|
33
|
-
}, { variables: {}, map: [], values: [] }),
|
|
34
|
-
let
|
|
35
|
-
const o =
|
|
33
|
+
}, { variables: {}, map: [], values: [] }), Wr = (e, t) => async (n) => {
|
|
34
|
+
let r, s;
|
|
35
|
+
const o = n == null ? void 0 : n.fetchOptions, i = n == null ? void 0 : n.variables;
|
|
36
36
|
let c = !1;
|
|
37
37
|
if (i) {
|
|
38
38
|
const p = ht(i);
|
|
@@ -46,19 +46,19 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
46
46
|
{ name: "map", value: JSON.stringify(T) },
|
|
47
47
|
...p.values.map((R, m) => ({ name: m, value: R }))
|
|
48
48
|
];
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
r = new FormData(), h.forEach((R) => {
|
|
50
|
+
r.append(R.name.toString(), R.value);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
c || (s = "application/json",
|
|
54
|
+
c || (s = "application/json", r = JSON.stringify({ query: t, variables: i }));
|
|
55
55
|
const d = "", l = {
|
|
56
56
|
"Content-Type": s,
|
|
57
57
|
"Apollo-Require-Preflight": "true",
|
|
58
58
|
"X-Requested-With": "XMLHttpRequest",
|
|
59
59
|
...o == null ? void 0 : o.headers
|
|
60
60
|
}, [u] = await Promise.all([
|
|
61
|
-
e.post(d,
|
|
61
|
+
e.post(d, r, {
|
|
62
62
|
...o,
|
|
63
63
|
headers: l
|
|
64
64
|
}),
|
|
@@ -66,9 +66,9 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
66
66
|
]);
|
|
67
67
|
return u.data.data;
|
|
68
68
|
};
|
|
69
|
-
function
|
|
70
|
-
const t = new FormData(),
|
|
71
|
-
for (const [o, i] of Object.entries(
|
|
69
|
+
function Gt(e) {
|
|
70
|
+
const t = new FormData(), n = (r, s = "") => {
|
|
71
|
+
for (const [o, i] of Object.entries(r)) {
|
|
72
72
|
const c = s ? `${s}[${o}]` : o;
|
|
73
73
|
if (i instanceof File)
|
|
74
74
|
t.append(c, i);
|
|
@@ -76,20 +76,20 @@ function Zt(e) {
|
|
|
76
76
|
const d = i.type.split("/")[1] || "bin", l = `${o}.${d}`;
|
|
77
77
|
t.append(c, i, l);
|
|
78
78
|
} else Array.isArray(i) ? i.forEach((d, l) => {
|
|
79
|
-
typeof d == "object" && d !== null ?
|
|
80
|
-
}) : typeof i == "object" && i !== null ?
|
|
79
|
+
typeof d == "object" && d !== null ? n(d, `${c}[${l}]`) : t.append(`${c}[${l}]`, d);
|
|
80
|
+
}) : typeof i == "object" && i !== null ? n(i, c) : i != null && t.append(c, i);
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
return
|
|
83
|
+
return n(e), t;
|
|
84
84
|
}
|
|
85
|
-
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {}),
|
|
86
|
-
const
|
|
85
|
+
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {}), Zt = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.DELETE = "DELETE", e.PATCH = "PATCH", e))(Zt || {});
|
|
86
|
+
const Qt = (e, t = {}) => [de.formData, de.formUrlDecode].includes(e) ? Gt(t) : JSON.stringify(t), en = (e) => de.json, Vr = (e, t, n = en) => async (r) => {
|
|
87
87
|
var u, p;
|
|
88
|
-
const s = (t == null ? void 0 : t.method) || "", o = (u =
|
|
88
|
+
const s = (t == null ? void 0 : t.method) || "", o = (u = r == null ? void 0 : r.fetchOptions) == null ? void 0 : u.fetchOptions, i = r == null ? void 0 : r.params, c = ((p = o == null ? void 0 : o.headers) == null ? void 0 : p.contentType) ?? n(s.toUpperCase()), d = {
|
|
89
89
|
url: t.url,
|
|
90
90
|
method: s,
|
|
91
91
|
params: i,
|
|
92
|
-
data:
|
|
92
|
+
data: Qt(c, r == null ? void 0 : r.body),
|
|
93
93
|
...o,
|
|
94
94
|
headers: {
|
|
95
95
|
...o == null ? void 0 : o.headers,
|
|
@@ -112,11 +112,11 @@ var ce = { exports: {} }, G = {};
|
|
|
112
112
|
* LICENSE file in the root directory of this source tree.
|
|
113
113
|
*/
|
|
114
114
|
var Ve;
|
|
115
|
-
function
|
|
115
|
+
function tn() {
|
|
116
116
|
if (Ve) return G;
|
|
117
117
|
Ve = 1;
|
|
118
118
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
119
|
-
function r
|
|
119
|
+
function n(r, s, o) {
|
|
120
120
|
var i = null;
|
|
121
121
|
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
122
122
|
o = {};
|
|
@@ -125,13 +125,13 @@ function rr() {
|
|
|
125
125
|
} else o = s;
|
|
126
126
|
return s = o.ref, {
|
|
127
127
|
$$typeof: e,
|
|
128
|
-
type:
|
|
128
|
+
type: r,
|
|
129
129
|
key: i,
|
|
130
130
|
ref: s !== void 0 ? s : null,
|
|
131
131
|
props: o
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
return G.Fragment = t, G.jsx =
|
|
134
|
+
return G.Fragment = t, G.jsx = n, G.jsxs = n, G;
|
|
135
135
|
}
|
|
136
136
|
var Z = {};
|
|
137
137
|
/**
|
|
@@ -144,7 +144,7 @@ var Z = {};
|
|
|
144
144
|
* LICENSE file in the root directory of this source tree.
|
|
145
145
|
*/
|
|
146
146
|
var Ye;
|
|
147
|
-
function
|
|
147
|
+
function nn() {
|
|
148
148
|
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
149
149
|
function e(f) {
|
|
150
150
|
if (f == null) return null;
|
|
@@ -160,7 +160,7 @@ function nr() {
|
|
|
160
160
|
return "StrictMode";
|
|
161
161
|
case g:
|
|
162
162
|
return "Suspense";
|
|
163
|
-
case
|
|
163
|
+
case P:
|
|
164
164
|
return "SuspenseList";
|
|
165
165
|
case v:
|
|
166
166
|
return "Activity";
|
|
@@ -192,7 +192,7 @@ function nr() {
|
|
|
192
192
|
function t(f) {
|
|
193
193
|
return "" + f;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function n(f) {
|
|
196
196
|
try {
|
|
197
197
|
t(f);
|
|
198
198
|
var w = !1;
|
|
@@ -209,7 +209,7 @@ function nr() {
|
|
|
209
209
|
), t(f);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function r(f) {
|
|
213
213
|
if (f === R) return "<>";
|
|
214
214
|
if (typeof f == "object" && f !== null && f.$$typeof === B)
|
|
215
215
|
return "<...>";
|
|
@@ -315,7 +315,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
315
315
|
k
|
|
316
316
|
), Je[k + C] = !0);
|
|
317
317
|
}
|
|
318
|
-
if (k = null, _ !== void 0 && (
|
|
318
|
+
if (k = null, _ !== void 0 && (n(_), k = "" + _), i(w) && (n(w.key), k = "" + w.key), "key" in w) {
|
|
319
319
|
_ = {};
|
|
320
320
|
for (var Ae in w)
|
|
321
321
|
Ae !== "key" && (_[Ae] = w[Ae]);
|
|
@@ -337,7 +337,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
337
337
|
function p(f) {
|
|
338
338
|
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
339
339
|
}
|
|
340
|
-
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"),
|
|
340
|
+
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), H = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Mt = Array.isArray, ge = console.createTask ? console.createTask : function() {
|
|
341
341
|
return null;
|
|
342
342
|
};
|
|
343
343
|
b = {
|
|
@@ -348,7 +348,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
348
348
|
var $e, Me = {}, He = b["react-stack-bottom-frame"].bind(
|
|
349
349
|
b,
|
|
350
350
|
o
|
|
351
|
-
)(), ze = ge(
|
|
351
|
+
)(), ze = ge(r(o)), Je = {};
|
|
352
352
|
Z.Fragment = R, Z.jsx = function(f, w, _, C, M) {
|
|
353
353
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
354
354
|
return u(
|
|
@@ -359,7 +359,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
359
359
|
C,
|
|
360
360
|
M,
|
|
361
361
|
q ? Error("react-stack-top-frame") : He,
|
|
362
|
-
q ? ge(
|
|
362
|
+
q ? ge(r(f)) : ze
|
|
363
363
|
);
|
|
364
364
|
}, Z.jsxs = function(f, w, _, C, M) {
|
|
365
365
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
@@ -371,17 +371,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
371
371
|
C,
|
|
372
372
|
M,
|
|
373
373
|
q ? Error("react-stack-top-frame") : He,
|
|
374
|
-
q ? ge(
|
|
374
|
+
q ? ge(r(f)) : ze
|
|
375
375
|
);
|
|
376
376
|
};
|
|
377
377
|
}()), Z;
|
|
378
378
|
}
|
|
379
379
|
var Ke;
|
|
380
|
-
function
|
|
381
|
-
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports =
|
|
380
|
+
function rn() {
|
|
381
|
+
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports = tn() : ce.exports = nn()), ce.exports;
|
|
382
382
|
}
|
|
383
|
-
var mt =
|
|
384
|
-
const
|
|
383
|
+
var mt = rn();
|
|
384
|
+
const re = [
|
|
385
385
|
"color: #fff",
|
|
386
386
|
"display: inline-block",
|
|
387
387
|
"font-size: 11px",
|
|
@@ -395,52 +395,52 @@ const ne = [
|
|
|
395
395
|
warning: "#d7a000",
|
|
396
396
|
danger: "#ec2127"
|
|
397
397
|
};
|
|
398
|
-
function oe(e, t, ...
|
|
399
|
-
console.log(`%c ${e}`, t, ...
|
|
398
|
+
function oe(e, t, ...n) {
|
|
399
|
+
console.log(`%c ${e}`, t, ...n);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const
|
|
401
|
+
function sn(e, ...t) {
|
|
402
|
+
const n = re.concat([
|
|
403
403
|
`background-color: ${se.primary}`
|
|
404
404
|
]).join(";");
|
|
405
|
-
oe(e,
|
|
405
|
+
oe(e, n, ...t);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
407
|
+
function on(e, ...t) {
|
|
408
|
+
const n = re.concat([
|
|
409
409
|
`background-color: ${se.success}`
|
|
410
410
|
]).join(";");
|
|
411
|
-
oe(e,
|
|
411
|
+
oe(e, n, ...t);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const
|
|
413
|
+
function an(e, ...t) {
|
|
414
|
+
const n = re.concat([
|
|
415
415
|
`background-color: ${se.info}`
|
|
416
416
|
]).join(";");
|
|
417
|
-
oe(e,
|
|
417
|
+
oe(e, n, ...t);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
419
|
+
function cn(e, ...t) {
|
|
420
|
+
const n = re.concat([
|
|
421
421
|
`background-color: ${se.warning}`
|
|
422
422
|
]).join(";");
|
|
423
|
-
oe(e,
|
|
423
|
+
oe(e, n, ...t);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
425
|
+
function ln(e, ...t) {
|
|
426
|
+
const n = re.concat([
|
|
427
427
|
`background-color: ${se.danger}`
|
|
428
428
|
]).join(";");
|
|
429
|
-
oe(e,
|
|
429
|
+
oe(e, n, ...t);
|
|
430
430
|
}
|
|
431
431
|
const U = {
|
|
432
|
-
primary:
|
|
433
|
-
success:
|
|
434
|
-
info:
|
|
435
|
-
warning:
|
|
436
|
-
danger:
|
|
432
|
+
primary: sn,
|
|
433
|
+
success: on,
|
|
434
|
+
info: an,
|
|
435
|
+
warning: cn,
|
|
436
|
+
danger: ln
|
|
437
437
|
};
|
|
438
438
|
function Ue(e, t) {
|
|
439
|
-
const
|
|
439
|
+
const n = {
|
|
440
440
|
isZero: (t == null ? void 0 : t.isZero) ?? !0,
|
|
441
441
|
isFalse: (t == null ? void 0 : t.isFalse) ?? !0
|
|
442
442
|
};
|
|
443
|
-
return e == null ||
|
|
443
|
+
return e == null || n.isFalse && (e === !1 || e === "false") || n.isZero && (e === 0 || e === "0") || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0;
|
|
444
444
|
}
|
|
445
445
|
function Xe(e, t) {
|
|
446
446
|
return !Ue(e, {
|
|
@@ -449,13 +449,13 @@ function Xe(e, t) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
class te extends Error {
|
|
452
|
-
constructor(
|
|
453
|
-
super(
|
|
452
|
+
constructor(n) {
|
|
453
|
+
super(n.message);
|
|
454
454
|
$(this, "code");
|
|
455
455
|
$(this, "devInfo");
|
|
456
456
|
$(this, "args");
|
|
457
457
|
$(this, "path");
|
|
458
|
-
this.response =
|
|
458
|
+
this.response = n, this.code = n.code, this.args = n.args, this.path = n.path, this.initName();
|
|
459
459
|
}
|
|
460
460
|
initName() {
|
|
461
461
|
this.name = this.constructor.name;
|
|
@@ -478,28 +478,24 @@ const Rt = ft({
|
|
|
478
478
|
refreshTokens: async () => {
|
|
479
479
|
U.warning("AuthStateContext", "refreshToken not yet ready");
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
481
|
+
}), un = () => Vt(Rt), Yr = ({
|
|
482
482
|
children: e,
|
|
483
483
|
onGetTokens: t,
|
|
484
|
-
onSetTokens:
|
|
485
|
-
onRefreshTokens:
|
|
484
|
+
onSetTokens: n,
|
|
485
|
+
onRefreshTokens: r,
|
|
486
486
|
onForceLogout: s
|
|
487
487
|
}) => {
|
|
488
|
-
const [o, i] = We(0), [c, d] = We(
|
|
489
|
-
Yt(() => {
|
|
490
|
-
d(Xe(t()));
|
|
491
|
-
}, []);
|
|
492
|
-
const l = (b) => {
|
|
488
|
+
const [o, i] = We(0), [c, d] = We(() => Xe(t())), l = (b) => {
|
|
493
489
|
let T;
|
|
494
|
-
typeof b == "function" ? T = b(t()) : T = b,
|
|
490
|
+
typeof b == "function" ? T = b(t()) : T = b, n(T), d(Xe(T)), i(Date.now());
|
|
495
491
|
}, u = () => {
|
|
496
492
|
l(null), s && s();
|
|
497
493
|
}, p = async () => {
|
|
498
494
|
var T;
|
|
499
495
|
const b = (T = t()) == null ? void 0 : T.refreshToken;
|
|
500
|
-
if (!(!b || !
|
|
496
|
+
if (!(!b || !r))
|
|
501
497
|
try {
|
|
502
|
-
const h = await
|
|
498
|
+
const h = await r(b);
|
|
503
499
|
if (Ue(h))
|
|
504
500
|
throw new te({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
505
501
|
l(h);
|
|
@@ -566,14 +562,14 @@ const Rt = ft({
|
|
|
566
562
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
567
563
|
}
|
|
568
564
|
};
|
|
569
|
-
class
|
|
570
|
-
constructor(
|
|
571
|
-
super(
|
|
565
|
+
class fn extends Error {
|
|
566
|
+
constructor(n) {
|
|
567
|
+
super(n.message);
|
|
572
568
|
$(this, "code");
|
|
573
569
|
$(this, "devInfo");
|
|
574
570
|
$(this, "args");
|
|
575
571
|
$(this, "path");
|
|
576
|
-
this.response =
|
|
572
|
+
this.response = n, this.code = n.code, this.args = n.args, this.path = n.path, this.initName();
|
|
577
573
|
}
|
|
578
574
|
initName() {
|
|
579
575
|
this.name = this.constructor.name;
|
|
@@ -587,22 +583,22 @@ class fr extends Error {
|
|
|
587
583
|
};
|
|
588
584
|
}
|
|
589
585
|
}
|
|
590
|
-
const
|
|
591
|
-
var t,
|
|
592
|
-
return (
|
|
586
|
+
const Kr = (e) => {
|
|
587
|
+
var t, n, r, s;
|
|
588
|
+
return (n = (t = e == null ? void 0 : e.data) == null ? void 0 : t.errors) != null && n[0] ? (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.errors) == null ? void 0 : s[0] : {
|
|
593
589
|
message: "Axios error",
|
|
594
590
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
595
591
|
};
|
|
596
|
-
},
|
|
592
|
+
}, dn = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
597
593
|
message: "Axios error",
|
|
598
594
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
599
595
|
};
|
|
600
596
|
let Q = !1, _e = [];
|
|
601
|
-
const
|
|
597
|
+
const pn = ft(null), Xr = ({
|
|
602
598
|
children: e,
|
|
603
599
|
axiosInstance: t,
|
|
604
|
-
locale:
|
|
605
|
-
getResponseFormatError:
|
|
600
|
+
locale: n = "en-US",
|
|
601
|
+
getResponseFormatError: r = dn,
|
|
606
602
|
onError: s,
|
|
607
603
|
checkIsRefreshTokenRequest: o,
|
|
608
604
|
authorizationPrefix: i = "Bearer",
|
|
@@ -614,8 +610,8 @@ const pr = ft(null), Gn = ({
|
|
|
614
610
|
updateTokens: u,
|
|
615
611
|
refreshTokens: p,
|
|
616
612
|
forceLogout: b
|
|
617
|
-
} =
|
|
618
|
-
|
|
613
|
+
} = un();
|
|
614
|
+
Yt(() => {
|
|
619
615
|
const E = t.interceptors.request.use(R), O = t.interceptors.response.use(m, A);
|
|
620
616
|
return () => {
|
|
621
617
|
t.interceptors.request.eject(E), t.interceptors.response.eject(O);
|
|
@@ -627,8 +623,8 @@ const pr = ft(null), Gn = ({
|
|
|
627
623
|
O(E);
|
|
628
624
|
_e = [];
|
|
629
625
|
}, h = (E, O) => (g) => {
|
|
630
|
-
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((
|
|
631
|
-
|
|
626
|
+
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((P) => {
|
|
627
|
+
P ? (g.pendingRequest = !0, E(t(g))) : O(new te({
|
|
632
628
|
message: S(401),
|
|
633
629
|
code: "UNAUTHORIZED",
|
|
634
630
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
@@ -636,10 +632,10 @@ const pr = ft(null), Gn = ({
|
|
|
636
632
|
});
|
|
637
633
|
}, R = (E) => new Promise((O, g) => {
|
|
638
634
|
var v, V;
|
|
639
|
-
E.headers["Accept-Language"] =
|
|
640
|
-
const
|
|
641
|
-
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) &&
|
|
642
|
-
h(O, g)(E), g(new
|
|
635
|
+
E.headers["Accept-Language"] = n;
|
|
636
|
+
const P = (v = l()) == null ? void 0 : v.accessToken;
|
|
637
|
+
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) && P && (E.headers.Authorization = [i, P].filter((H) => H).join(" ")), !(E && o ? o(E) : !1) && Q) {
|
|
638
|
+
h(O, g)(E), g(new fn({
|
|
643
639
|
message: "Token refreshing, so request save queues not send",
|
|
644
640
|
code: "REFRESH_TOKEN"
|
|
645
641
|
}));
|
|
@@ -647,13 +643,13 @@ const pr = ft(null), Gn = ({
|
|
|
647
643
|
}
|
|
648
644
|
O(E);
|
|
649
645
|
}), m = (E) => (d && U.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), S = (E) => {
|
|
650
|
-
const O = (c == null ? void 0 : c[
|
|
646
|
+
const O = (c == null ? void 0 : c[n]) || Ge[n] || Ge["en-US"];
|
|
651
647
|
return (O == null ? void 0 : O[E]) || `Error: ${E}`;
|
|
652
648
|
}, A = (E) => {
|
|
653
|
-
const O = E.response, g = E.config,
|
|
654
|
-
d && U.warning("[FetcherProvider] interceptorsResponseError", { status:
|
|
649
|
+
const O = E.response, g = E.config, P = E.status, N = r(O);
|
|
650
|
+
d && U.warning("[FetcherProvider] interceptorsResponseError", { status: P, responseFirstError: N }), s && s(N);
|
|
655
651
|
const B = g && o ? o(g) : !1;
|
|
656
|
-
if (O && g && (
|
|
652
|
+
if (O && g && (P === 401 || N.code === "UNAUTHENTICATED")) {
|
|
657
653
|
const v = l();
|
|
658
654
|
return d && U.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || g.pendingRequest ? (Q = !1, d && U.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new te(N))) : (Q || (Q = !0, d && U.warning("[FetcherProvider] refreshTokens"), p().then(() => {
|
|
659
655
|
d && U.info("[FetcherProvider] refreshTokens success"), T(!0);
|
|
@@ -666,7 +662,7 @@ const pr = ft(null), Gn = ({
|
|
|
666
662
|
return Promise.reject(new te(N));
|
|
667
663
|
};
|
|
668
664
|
return /* @__PURE__ */ mt.jsx(
|
|
669
|
-
|
|
665
|
+
pn.Provider,
|
|
670
666
|
{
|
|
671
667
|
value: t,
|
|
672
668
|
children: e
|
|
@@ -678,226 +674,226 @@ function Et(e, t) {
|
|
|
678
674
|
return e.apply(t, arguments);
|
|
679
675
|
};
|
|
680
676
|
}
|
|
681
|
-
const { toString:
|
|
682
|
-
const
|
|
683
|
-
return e[
|
|
684
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: K } = Array,
|
|
685
|
-
function
|
|
686
|
-
return e !== null && !
|
|
677
|
+
const { toString: hn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: me, toStringTag: bt } = Symbol, Re = /* @__PURE__ */ ((e) => (t) => {
|
|
678
|
+
const n = hn.call(t);
|
|
679
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
680
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: K } = Array, ne = Ee("undefined");
|
|
681
|
+
function mn(e) {
|
|
682
|
+
return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
687
683
|
}
|
|
688
684
|
const yt = D("ArrayBuffer");
|
|
689
|
-
function
|
|
685
|
+
function Rn(e) {
|
|
690
686
|
let t;
|
|
691
687
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yt(e.buffer), t;
|
|
692
688
|
}
|
|
693
|
-
const
|
|
689
|
+
const En = Ee("string"), j = Ee("function"), wt = Ee("number"), be = (e) => e !== null && typeof e == "object", bn = (e) => e === !0 || e === !1, le = (e) => {
|
|
694
690
|
if (Re(e) !== "object")
|
|
695
691
|
return !1;
|
|
696
692
|
const t = De(e);
|
|
697
693
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(bt in e) && !(me in e);
|
|
698
|
-
},
|
|
694
|
+
}, yn = D("Date"), wn = D("File"), Tn = D("Blob"), gn = D("FileList"), Sn = (e) => be(e) && j(e.pipe), On = (e) => {
|
|
699
695
|
let t;
|
|
700
696
|
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
|
|
701
697
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
702
|
-
},
|
|
703
|
-
function ie(e, t, { allOwnKeys:
|
|
698
|
+
}, An = D("URLSearchParams"), [_n, xn, Pn, Nn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Cn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
699
|
+
function ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
704
700
|
if (e === null || typeof e > "u")
|
|
705
701
|
return;
|
|
706
|
-
let
|
|
702
|
+
let r, s;
|
|
707
703
|
if (typeof e != "object" && (e = [e]), K(e))
|
|
708
|
-
for (
|
|
709
|
-
t.call(null, e[
|
|
704
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
705
|
+
t.call(null, e[r], r, e);
|
|
710
706
|
else {
|
|
711
|
-
const o =
|
|
707
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
712
708
|
let c;
|
|
713
|
-
for (
|
|
714
|
-
c = o[
|
|
709
|
+
for (r = 0; r < i; r++)
|
|
710
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
715
711
|
}
|
|
716
712
|
}
|
|
717
713
|
function Tt(e, t) {
|
|
718
714
|
t = t.toLowerCase();
|
|
719
|
-
const
|
|
720
|
-
let
|
|
721
|
-
for (;
|
|
722
|
-
if (s = r
|
|
715
|
+
const n = Object.keys(e);
|
|
716
|
+
let r = n.length, s;
|
|
717
|
+
for (; r-- > 0; )
|
|
718
|
+
if (s = n[r], t === s.toLowerCase())
|
|
723
719
|
return s;
|
|
724
720
|
return null;
|
|
725
721
|
}
|
|
726
|
-
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !
|
|
722
|
+
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !ne(e) && e !== z;
|
|
727
723
|
function Ce() {
|
|
728
|
-
const { caseless: e } = gt(this) && this || {}, t = {},
|
|
724
|
+
const { caseless: e } = gt(this) && this || {}, t = {}, n = (r, s) => {
|
|
729
725
|
const o = e && Tt(t, s) || s;
|
|
730
|
-
le(t[o]) && le(
|
|
726
|
+
le(t[o]) && le(r) ? t[o] = Ce(t[o], r) : le(r) ? t[o] = Ce({}, r) : K(r) ? t[o] = r.slice() : t[o] = r;
|
|
731
727
|
};
|
|
732
|
-
for (let
|
|
733
|
-
arguments[
|
|
728
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
729
|
+
arguments[r] && ie(arguments[r], n);
|
|
734
730
|
return t;
|
|
735
731
|
}
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
}, { allOwnKeys:
|
|
739
|
-
e.prototype = Object.create(t.prototype,
|
|
732
|
+
const kn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
733
|
+
n && j(s) ? e[o] = Et(s, n) : e[o] = s;
|
|
734
|
+
}, { allOwnKeys: r }), e), Fn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), vn = (e, t, n, r) => {
|
|
735
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
740
736
|
value: t.prototype
|
|
741
|
-
}),
|
|
742
|
-
},
|
|
737
|
+
}), n && Object.assign(e.prototype, n);
|
|
738
|
+
}, jn = (e, t, n, r) => {
|
|
743
739
|
let s, o, i;
|
|
744
740
|
const c = {};
|
|
745
741
|
if (t = t || {}, e == null) return t;
|
|
746
742
|
do {
|
|
747
743
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
748
|
-
i = s[o], (!
|
|
749
|
-
e =
|
|
750
|
-
} while (e && (!
|
|
744
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
745
|
+
e = n !== !1 && De(e);
|
|
746
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
751
747
|
return t;
|
|
752
|
-
},
|
|
753
|
-
e = String(e), (
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
},
|
|
748
|
+
}, Ln = (e, t, n) => {
|
|
749
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
750
|
+
const r = e.indexOf(t, n);
|
|
751
|
+
return r !== -1 && r === n;
|
|
752
|
+
}, Un = (e) => {
|
|
757
753
|
if (!e) return null;
|
|
758
754
|
if (K(e)) return e;
|
|
759
755
|
let t = e.length;
|
|
760
756
|
if (!wt(t)) return null;
|
|
761
|
-
const
|
|
757
|
+
const n = new Array(t);
|
|
762
758
|
for (; t-- > 0; )
|
|
763
|
-
|
|
764
|
-
return
|
|
765
|
-
},
|
|
766
|
-
const
|
|
759
|
+
n[t] = e[t];
|
|
760
|
+
return n;
|
|
761
|
+
}, Dn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Bn = (e, t) => {
|
|
762
|
+
const r = (e && e[me]).call(e);
|
|
767
763
|
let s;
|
|
768
|
-
for (; (s =
|
|
764
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
769
765
|
const o = s.value;
|
|
770
766
|
t.call(e, o[0], o[1]);
|
|
771
767
|
}
|
|
772
|
-
},
|
|
773
|
-
let
|
|
774
|
-
const
|
|
775
|
-
for (; (
|
|
776
|
-
|
|
777
|
-
return
|
|
778
|
-
},
|
|
768
|
+
}, qn = (e, t) => {
|
|
769
|
+
let n;
|
|
770
|
+
const r = [];
|
|
771
|
+
for (; (n = e.exec(t)) !== null; )
|
|
772
|
+
r.push(n);
|
|
773
|
+
return r;
|
|
774
|
+
}, In = D("HTMLFormElement"), $n = (e) => e.toLowerCase().replace(
|
|
779
775
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
780
|
-
function(
|
|
781
|
-
return
|
|
776
|
+
function(n, r, s) {
|
|
777
|
+
return r.toUpperCase() + s;
|
|
782
778
|
}
|
|
783
|
-
), Ze = (({ hasOwnProperty: e }) => (t,
|
|
784
|
-
const
|
|
785
|
-
ie(
|
|
779
|
+
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Mn = D("RegExp"), St = (e, t) => {
|
|
780
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
781
|
+
ie(n, (s, o) => {
|
|
786
782
|
let i;
|
|
787
|
-
(i = t(s, o, e)) !== !1 && (
|
|
788
|
-
}), Object.defineProperties(e,
|
|
789
|
-
},
|
|
790
|
-
St(e, (t,
|
|
791
|
-
if (j(e) && ["arguments", "caller", "callee"].indexOf(
|
|
783
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
784
|
+
}), Object.defineProperties(e, r);
|
|
785
|
+
}, Hn = (e) => {
|
|
786
|
+
St(e, (t, n) => {
|
|
787
|
+
if (j(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
792
788
|
return !1;
|
|
793
|
-
const
|
|
794
|
-
if (j(
|
|
789
|
+
const r = e[n];
|
|
790
|
+
if (j(r)) {
|
|
795
791
|
if (t.enumerable = !1, "writable" in t) {
|
|
796
792
|
t.writable = !1;
|
|
797
793
|
return;
|
|
798
794
|
}
|
|
799
795
|
t.set || (t.set = () => {
|
|
800
|
-
throw Error("Can not rewrite read-only method '" +
|
|
796
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
801
797
|
});
|
|
802
798
|
}
|
|
803
799
|
});
|
|
804
|
-
},
|
|
805
|
-
const
|
|
800
|
+
}, zn = (e, t) => {
|
|
801
|
+
const n = {}, r = (s) => {
|
|
806
802
|
s.forEach((o) => {
|
|
807
|
-
|
|
803
|
+
n[o] = !0;
|
|
808
804
|
});
|
|
809
805
|
};
|
|
810
|
-
return K(e) ?
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
|
-
function
|
|
806
|
+
return K(e) ? r(e) : r(String(e).split(t)), n;
|
|
807
|
+
}, Jn = () => {
|
|
808
|
+
}, Wn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
809
|
+
function Vn(e) {
|
|
814
810
|
return !!(e && j(e.append) && e[bt] === "FormData" && e[me]);
|
|
815
811
|
}
|
|
816
|
-
const
|
|
817
|
-
const t = new Array(10),
|
|
818
|
-
if (be(
|
|
819
|
-
if (t.indexOf(
|
|
812
|
+
const Yn = (e) => {
|
|
813
|
+
const t = new Array(10), n = (r, s) => {
|
|
814
|
+
if (be(r)) {
|
|
815
|
+
if (t.indexOf(r) >= 0)
|
|
820
816
|
return;
|
|
821
|
-
if (!("toJSON" in
|
|
822
|
-
t[s] =
|
|
823
|
-
const o = K(
|
|
824
|
-
return ie(
|
|
825
|
-
const d =
|
|
826
|
-
!
|
|
817
|
+
if (!("toJSON" in r)) {
|
|
818
|
+
t[s] = r;
|
|
819
|
+
const o = K(r) ? [] : {};
|
|
820
|
+
return ie(r, (i, c) => {
|
|
821
|
+
const d = n(i, s + 1);
|
|
822
|
+
!ne(d) && (o[c] = d);
|
|
827
823
|
}), t[s] = void 0, o;
|
|
828
824
|
}
|
|
829
825
|
}
|
|
830
|
-
return
|
|
826
|
+
return r;
|
|
831
827
|
};
|
|
832
|
-
return
|
|
833
|
-
},
|
|
834
|
-
s === z && o ===
|
|
828
|
+
return n(e, 0);
|
|
829
|
+
}, Kn = D("AsyncFunction"), Xn = (e) => e && (be(e) || j(e)) && j(e.then) && j(e.catch), Ot = ((e, t) => e ? setImmediate : t ? ((n, r) => (z.addEventListener("message", ({ source: s, data: o }) => {
|
|
830
|
+
s === z && o === n && r.length && r.shift()();
|
|
835
831
|
}, !1), (s) => {
|
|
836
|
-
|
|
837
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
832
|
+
r.push(s), z.postMessage(n, "*");
|
|
833
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
838
834
|
typeof setImmediate == "function",
|
|
839
835
|
j(z.postMessage)
|
|
840
|
-
),
|
|
836
|
+
), Gn = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || Ot, Zn = (e) => e != null && j(e[me]), a = {
|
|
841
837
|
isArray: K,
|
|
842
838
|
isArrayBuffer: yt,
|
|
843
|
-
isBuffer:
|
|
844
|
-
isFormData:
|
|
845
|
-
isArrayBufferView:
|
|
846
|
-
isString:
|
|
839
|
+
isBuffer: mn,
|
|
840
|
+
isFormData: On,
|
|
841
|
+
isArrayBufferView: Rn,
|
|
842
|
+
isString: En,
|
|
847
843
|
isNumber: wt,
|
|
848
|
-
isBoolean:
|
|
844
|
+
isBoolean: bn,
|
|
849
845
|
isObject: be,
|
|
850
846
|
isPlainObject: le,
|
|
851
|
-
isReadableStream:
|
|
852
|
-
isRequest:
|
|
853
|
-
isResponse:
|
|
854
|
-
isHeaders:
|
|
855
|
-
isUndefined:
|
|
856
|
-
isDate:
|
|
857
|
-
isFile:
|
|
858
|
-
isBlob:
|
|
859
|
-
isRegExp:
|
|
847
|
+
isReadableStream: _n,
|
|
848
|
+
isRequest: xn,
|
|
849
|
+
isResponse: Pn,
|
|
850
|
+
isHeaders: Nn,
|
|
851
|
+
isUndefined: ne,
|
|
852
|
+
isDate: yn,
|
|
853
|
+
isFile: wn,
|
|
854
|
+
isBlob: Tn,
|
|
855
|
+
isRegExp: Mn,
|
|
860
856
|
isFunction: j,
|
|
861
|
-
isStream:
|
|
862
|
-
isURLSearchParams:
|
|
863
|
-
isTypedArray:
|
|
864
|
-
isFileList:
|
|
857
|
+
isStream: Sn,
|
|
858
|
+
isURLSearchParams: An,
|
|
859
|
+
isTypedArray: Dn,
|
|
860
|
+
isFileList: gn,
|
|
865
861
|
forEach: ie,
|
|
866
862
|
merge: Ce,
|
|
867
|
-
extend:
|
|
868
|
-
trim:
|
|
869
|
-
stripBOM:
|
|
870
|
-
inherits:
|
|
871
|
-
toFlatObject:
|
|
863
|
+
extend: kn,
|
|
864
|
+
trim: Cn,
|
|
865
|
+
stripBOM: Fn,
|
|
866
|
+
inherits: vn,
|
|
867
|
+
toFlatObject: jn,
|
|
872
868
|
kindOf: Re,
|
|
873
869
|
kindOfTest: D,
|
|
874
|
-
endsWith:
|
|
875
|
-
toArray:
|
|
876
|
-
forEachEntry:
|
|
877
|
-
matchAll:
|
|
878
|
-
isHTMLForm:
|
|
870
|
+
endsWith: Ln,
|
|
871
|
+
toArray: Un,
|
|
872
|
+
forEachEntry: Bn,
|
|
873
|
+
matchAll: qn,
|
|
874
|
+
isHTMLForm: In,
|
|
879
875
|
hasOwnProperty: Ze,
|
|
880
876
|
hasOwnProp: Ze,
|
|
881
877
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
882
878
|
reduceDescriptors: St,
|
|
883
|
-
freezeMethods:
|
|
884
|
-
toObjectSet:
|
|
885
|
-
toCamelCase: $
|
|
886
|
-
noop:
|
|
887
|
-
toFiniteNumber:
|
|
879
|
+
freezeMethods: Hn,
|
|
880
|
+
toObjectSet: zn,
|
|
881
|
+
toCamelCase: $n,
|
|
882
|
+
noop: Jn,
|
|
883
|
+
toFiniteNumber: Wn,
|
|
888
884
|
findKey: Tt,
|
|
889
885
|
global: z,
|
|
890
886
|
isContextDefined: gt,
|
|
891
|
-
isSpecCompliantForm:
|
|
892
|
-
toJSONObject:
|
|
893
|
-
isAsyncFn:
|
|
894
|
-
isThenable:
|
|
887
|
+
isSpecCompliantForm: Vn,
|
|
888
|
+
toJSONObject: Yn,
|
|
889
|
+
isAsyncFn: Kn,
|
|
890
|
+
isThenable: Xn,
|
|
895
891
|
setImmediate: Ot,
|
|
896
|
-
asap:
|
|
897
|
-
isIterable:
|
|
892
|
+
asap: Gn,
|
|
893
|
+
isIterable: Zn
|
|
898
894
|
};
|
|
899
|
-
function y(e, t,
|
|
900
|
-
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),
|
|
895
|
+
function y(e, t, n, r, s) {
|
|
896
|
+
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, this.status = s.status ? s.status : null);
|
|
901
897
|
}
|
|
902
898
|
a.inherits(y, Error, {
|
|
903
899
|
toJSON: function() {
|
|
@@ -940,41 +936,41 @@ const At = y.prototype, _t = {};
|
|
|
940
936
|
});
|
|
941
937
|
Object.defineProperties(y, _t);
|
|
942
938
|
Object.defineProperty(At, "isAxiosError", { value: !0 });
|
|
943
|
-
y.from = (e, t,
|
|
939
|
+
y.from = (e, t, n, r, s, o) => {
|
|
944
940
|
const i = Object.create(At);
|
|
945
941
|
return a.toFlatObject(e, i, function(d) {
|
|
946
942
|
return d !== Error.prototype;
|
|
947
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t,
|
|
943
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
948
944
|
};
|
|
949
|
-
const
|
|
945
|
+
const Qn = null;
|
|
950
946
|
function ke(e) {
|
|
951
947
|
return a.isPlainObject(e) || a.isArray(e);
|
|
952
948
|
}
|
|
953
|
-
function
|
|
949
|
+
function xt(e) {
|
|
954
950
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
955
951
|
}
|
|
956
|
-
function Qe(e, t,
|
|
952
|
+
function Qe(e, t, n) {
|
|
957
953
|
return e ? e.concat(t).map(function(s, o) {
|
|
958
|
-
return s =
|
|
959
|
-
}).join(
|
|
954
|
+
return s = xt(s), !n && o ? "[" + s + "]" : s;
|
|
955
|
+
}).join(n ? "." : "") : t;
|
|
960
956
|
}
|
|
961
|
-
function
|
|
957
|
+
function er(e) {
|
|
962
958
|
return a.isArray(e) && !e.some(ke);
|
|
963
959
|
}
|
|
964
|
-
const
|
|
960
|
+
const tr = a.toFlatObject(a, {}, null, function(t) {
|
|
965
961
|
return /^is[A-Z]/.test(t);
|
|
966
962
|
});
|
|
967
|
-
function ye(e, t,
|
|
963
|
+
function ye(e, t, n) {
|
|
968
964
|
if (!a.isObject(e))
|
|
969
965
|
throw new TypeError("target must be an object");
|
|
970
|
-
t = t || new FormData(),
|
|
966
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
971
967
|
metaTokens: !0,
|
|
972
968
|
dots: !1,
|
|
973
969
|
indexes: !1
|
|
974
970
|
}, !1, function(R, m) {
|
|
975
971
|
return !a.isUndefined(m[R]);
|
|
976
972
|
});
|
|
977
|
-
const
|
|
973
|
+
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
978
974
|
if (!a.isFunction(s))
|
|
979
975
|
throw new TypeError("visitor must be a function");
|
|
980
976
|
function l(h) {
|
|
@@ -989,9 +985,9 @@ function ye(e, t, r) {
|
|
|
989
985
|
let S = h;
|
|
990
986
|
if (h && !m && typeof h == "object") {
|
|
991
987
|
if (a.endsWith(R, "{}"))
|
|
992
|
-
R =
|
|
993
|
-
else if (a.isArray(h) &&
|
|
994
|
-
return R =
|
|
988
|
+
R = r ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
989
|
+
else if (a.isArray(h) && er(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (S = a.toArray(h)))
|
|
990
|
+
return R = xt(R), S.forEach(function(E, O) {
|
|
995
991
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
996
992
|
// eslint-disable-next-line no-nested-ternary
|
|
997
993
|
i === !0 ? Qe([R], O, o) : i === null ? R : R + "[]",
|
|
@@ -1001,7 +997,7 @@ function ye(e, t, r) {
|
|
|
1001
997
|
}
|
|
1002
998
|
return ke(h) ? !0 : (t.append(Qe(m, R, o), l(h)), !1);
|
|
1003
999
|
}
|
|
1004
|
-
const p = [], b = Object.assign(
|
|
1000
|
+
const p = [], b = Object.assign(tr, {
|
|
1005
1001
|
defaultVisitor: u,
|
|
1006
1002
|
convertValue: l,
|
|
1007
1003
|
isVisitable: ke
|
|
@@ -1035,38 +1031,38 @@ function et(e) {
|
|
|
1035
1031
|
"%20": "+",
|
|
1036
1032
|
"%00": "\0"
|
|
1037
1033
|
};
|
|
1038
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
1039
|
-
return t[
|
|
1034
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
1035
|
+
return t[r];
|
|
1040
1036
|
});
|
|
1041
1037
|
}
|
|
1042
1038
|
function Be(e, t) {
|
|
1043
1039
|
this._pairs = [], e && ye(e, this, t);
|
|
1044
1040
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
this._pairs.push([t,
|
|
1041
|
+
const Pt = Be.prototype;
|
|
1042
|
+
Pt.append = function(t, n) {
|
|
1043
|
+
this._pairs.push([t, n]);
|
|
1048
1044
|
};
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1051
|
-
return t.call(this,
|
|
1045
|
+
Pt.toString = function(t) {
|
|
1046
|
+
const n = t ? function(r) {
|
|
1047
|
+
return t.call(this, r, et);
|
|
1052
1048
|
} : et;
|
|
1053
1049
|
return this._pairs.map(function(s) {
|
|
1054
|
-
return
|
|
1050
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
1055
1051
|
}, "").join("&");
|
|
1056
1052
|
};
|
|
1057
|
-
function
|
|
1053
|
+
function nr(e) {
|
|
1058
1054
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1059
1055
|
}
|
|
1060
|
-
function Nt(e, t,
|
|
1056
|
+
function Nt(e, t, n) {
|
|
1061
1057
|
if (!t)
|
|
1062
1058
|
return e;
|
|
1063
|
-
const
|
|
1064
|
-
a.isFunction(
|
|
1065
|
-
serialize:
|
|
1059
|
+
const r = n && n.encode || nr;
|
|
1060
|
+
a.isFunction(n) && (n = {
|
|
1061
|
+
serialize: n
|
|
1066
1062
|
});
|
|
1067
|
-
const s =
|
|
1063
|
+
const s = n && n.serialize;
|
|
1068
1064
|
let o;
|
|
1069
|
-
if (s ? o = s(t,
|
|
1065
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Be(t, n).toString(r), o) {
|
|
1070
1066
|
const i = e.indexOf("#");
|
|
1071
1067
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1072
1068
|
}
|
|
@@ -1084,12 +1080,12 @@ class tt {
|
|
|
1084
1080
|
*
|
|
1085
1081
|
* @return {Number} An ID used to remove interceptor later
|
|
1086
1082
|
*/
|
|
1087
|
-
use(t,
|
|
1083
|
+
use(t, n, r) {
|
|
1088
1084
|
return this.handlers.push({
|
|
1089
1085
|
fulfilled: t,
|
|
1090
|
-
rejected:
|
|
1091
|
-
synchronous:
|
|
1092
|
-
runWhen:
|
|
1086
|
+
rejected: n,
|
|
1087
|
+
synchronous: r ? r.synchronous : !1,
|
|
1088
|
+
runWhen: r ? r.runWhen : null
|
|
1093
1089
|
}), this.handlers.length - 1;
|
|
1094
1090
|
}
|
|
1095
1091
|
/**
|
|
@@ -1121,8 +1117,8 @@ class tt {
|
|
|
1121
1117
|
* @returns {void}
|
|
1122
1118
|
*/
|
|
1123
1119
|
forEach(t) {
|
|
1124
|
-
a.forEach(this.handlers, function(
|
|
1125
|
-
|
|
1120
|
+
a.forEach(this.handlers, function(r) {
|
|
1121
|
+
r !== null && t(r);
|
|
1126
1122
|
});
|
|
1127
1123
|
}
|
|
1128
1124
|
}
|
|
@@ -1130,75 +1126,75 @@ const Ct = {
|
|
|
1130
1126
|
silentJSONParsing: !0,
|
|
1131
1127
|
forcedJSONParsing: !0,
|
|
1132
1128
|
clarifyTimeoutError: !1
|
|
1133
|
-
},
|
|
1129
|
+
}, rr = typeof URLSearchParams < "u" ? URLSearchParams : Be, sr = typeof FormData < "u" ? FormData : null, or = typeof Blob < "u" ? Blob : null, ir = {
|
|
1134
1130
|
isBrowser: !0,
|
|
1135
1131
|
classes: {
|
|
1136
|
-
URLSearchParams:
|
|
1137
|
-
FormData:
|
|
1138
|
-
Blob:
|
|
1132
|
+
URLSearchParams: rr,
|
|
1133
|
+
FormData: sr,
|
|
1134
|
+
Blob: or
|
|
1139
1135
|
},
|
|
1140
1136
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1141
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1142
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1137
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, ar = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), cr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1138
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lr = qe && window.location.href || "http://localhost", ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1143
1139
|
__proto__: null,
|
|
1144
1140
|
hasBrowserEnv: qe,
|
|
1145
|
-
hasStandardBrowserEnv:
|
|
1146
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1141
|
+
hasStandardBrowserEnv: ar,
|
|
1142
|
+
hasStandardBrowserWebWorkerEnv: cr,
|
|
1147
1143
|
navigator: Fe,
|
|
1148
|
-
origin:
|
|
1144
|
+
origin: lr
|
|
1149
1145
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1150
|
-
...
|
|
1151
|
-
...
|
|
1146
|
+
...ur,
|
|
1147
|
+
...ir
|
|
1152
1148
|
};
|
|
1153
|
-
function
|
|
1149
|
+
function fr(e, t) {
|
|
1154
1150
|
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1155
|
-
visitor: function(
|
|
1156
|
-
return F.isNode && a.isBuffer(
|
|
1151
|
+
visitor: function(n, r, s, o) {
|
|
1152
|
+
return F.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1157
1153
|
}
|
|
1158
1154
|
}, t));
|
|
1159
1155
|
}
|
|
1160
|
-
function
|
|
1156
|
+
function dr(e) {
|
|
1161
1157
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1162
1158
|
}
|
|
1163
|
-
function
|
|
1164
|
-
const t = {},
|
|
1165
|
-
let
|
|
1166
|
-
const s =
|
|
1159
|
+
function pr(e) {
|
|
1160
|
+
const t = {}, n = Object.keys(e);
|
|
1161
|
+
let r;
|
|
1162
|
+
const s = n.length;
|
|
1167
1163
|
let o;
|
|
1168
|
-
for (
|
|
1169
|
-
o = r
|
|
1164
|
+
for (r = 0; r < s; r++)
|
|
1165
|
+
o = n[r], t[o] = e[o];
|
|
1170
1166
|
return t;
|
|
1171
1167
|
}
|
|
1172
1168
|
function kt(e) {
|
|
1173
|
-
function t(
|
|
1174
|
-
let i =
|
|
1169
|
+
function t(n, r, s, o) {
|
|
1170
|
+
let i = n[o++];
|
|
1175
1171
|
if (i === "__proto__") return !0;
|
|
1176
|
-
const c = Number.isFinite(+i), d = o >=
|
|
1177
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i],
|
|
1172
|
+
const c = Number.isFinite(+i), d = o >= n.length;
|
|
1173
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (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] = pr(s[i])), !c);
|
|
1178
1174
|
}
|
|
1179
1175
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1180
|
-
const
|
|
1181
|
-
return a.forEachEntry(e, (
|
|
1182
|
-
t(
|
|
1183
|
-
}),
|
|
1176
|
+
const n = {};
|
|
1177
|
+
return a.forEachEntry(e, (r, s) => {
|
|
1178
|
+
t(dr(r), s, n, 0);
|
|
1179
|
+
}), n;
|
|
1184
1180
|
}
|
|
1185
1181
|
return null;
|
|
1186
1182
|
}
|
|
1187
|
-
function
|
|
1183
|
+
function hr(e, t, n) {
|
|
1188
1184
|
if (a.isString(e))
|
|
1189
1185
|
try {
|
|
1190
1186
|
return (t || JSON.parse)(e), a.trim(e);
|
|
1191
|
-
} catch (
|
|
1192
|
-
if (
|
|
1193
|
-
throw
|
|
1187
|
+
} catch (r) {
|
|
1188
|
+
if (r.name !== "SyntaxError")
|
|
1189
|
+
throw r;
|
|
1194
1190
|
}
|
|
1195
|
-
return (
|
|
1191
|
+
return (n || JSON.stringify)(e);
|
|
1196
1192
|
}
|
|
1197
1193
|
const ae = {
|
|
1198
1194
|
transitional: Ct,
|
|
1199
1195
|
adapter: ["xhr", "http", "fetch"],
|
|
1200
|
-
transformRequest: [function(t,
|
|
1201
|
-
const
|
|
1196
|
+
transformRequest: [function(t, n) {
|
|
1197
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
1202
1198
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
1203
1199
|
return s ? JSON.stringify(kt(t)) : t;
|
|
1204
1200
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
@@ -1206,12 +1202,12 @@ const ae = {
|
|
|
1206
1202
|
if (a.isArrayBufferView(t))
|
|
1207
1203
|
return t.buffer;
|
|
1208
1204
|
if (a.isURLSearchParams(t))
|
|
1209
|
-
return
|
|
1205
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1210
1206
|
let c;
|
|
1211
1207
|
if (o) {
|
|
1212
|
-
if (
|
|
1213
|
-
return
|
|
1214
|
-
if ((c = a.isFileList(t)) ||
|
|
1208
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1209
|
+
return fr(t, this.formSerializer).toString();
|
|
1210
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1215
1211
|
const d = this.env && this.env.FormData;
|
|
1216
1212
|
return ye(
|
|
1217
1213
|
c ? { "files[]": t } : t,
|
|
@@ -1220,14 +1216,14 @@ const ae = {
|
|
|
1220
1216
|
);
|
|
1221
1217
|
}
|
|
1222
1218
|
}
|
|
1223
|
-
return o || s ? (
|
|
1219
|
+
return o || s ? (n.setContentType("application/json", !1), hr(t)) : t;
|
|
1224
1220
|
}],
|
|
1225
1221
|
transformResponse: [function(t) {
|
|
1226
|
-
const
|
|
1222
|
+
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
1227
1223
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
1228
1224
|
return t;
|
|
1229
|
-
if (t && a.isString(t) && (
|
|
1230
|
-
const i = !(
|
|
1225
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
1226
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
1231
1227
|
try {
|
|
1232
1228
|
return JSON.parse(t);
|
|
1233
1229
|
} catch (c) {
|
|
@@ -1263,7 +1259,7 @@ const ae = {
|
|
|
1263
1259
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1264
1260
|
ae.headers[e] = {};
|
|
1265
1261
|
});
|
|
1266
|
-
const
|
|
1262
|
+
const mr = a.toObjectSet([
|
|
1267
1263
|
"age",
|
|
1268
1264
|
"authorization",
|
|
1269
1265
|
"content-length",
|
|
@@ -1281,47 +1277,47 @@ const Rn = a.toObjectSet([
|
|
|
1281
1277
|
"referer",
|
|
1282
1278
|
"retry-after",
|
|
1283
1279
|
"user-agent"
|
|
1284
|
-
]),
|
|
1280
|
+
]), Rr = (e) => {
|
|
1285
1281
|
const t = {};
|
|
1286
|
-
let
|
|
1282
|
+
let n, r, s;
|
|
1287
1283
|
return e && e.split(`
|
|
1288
1284
|
`).forEach(function(i) {
|
|
1289
|
-
s = i.indexOf(":"),
|
|
1285
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && mr[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1290
1286
|
}), t;
|
|
1291
|
-
},
|
|
1287
|
+
}, nt = Symbol("internals");
|
|
1292
1288
|
function ee(e) {
|
|
1293
1289
|
return e && String(e).trim().toLowerCase();
|
|
1294
1290
|
}
|
|
1295
1291
|
function ue(e) {
|
|
1296
1292
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1297
1293
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
1300
|
-
let
|
|
1301
|
-
for (;
|
|
1302
|
-
t[
|
|
1294
|
+
function Er(e) {
|
|
1295
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1296
|
+
let r;
|
|
1297
|
+
for (; r = n.exec(e); )
|
|
1298
|
+
t[r[1]] = r[2];
|
|
1303
1299
|
return t;
|
|
1304
1300
|
}
|
|
1305
|
-
const
|
|
1306
|
-
function
|
|
1307
|
-
if (a.isFunction(
|
|
1308
|
-
return
|
|
1309
|
-
if (s && (t =
|
|
1310
|
-
if (a.isString(
|
|
1311
|
-
return t.indexOf(
|
|
1312
|
-
if (a.isRegExp(
|
|
1313
|
-
return
|
|
1301
|
+
const br = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1302
|
+
function xe(e, t, n, r, s) {
|
|
1303
|
+
if (a.isFunction(r))
|
|
1304
|
+
return r.call(this, t, n);
|
|
1305
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
1306
|
+
if (a.isString(r))
|
|
1307
|
+
return t.indexOf(r) !== -1;
|
|
1308
|
+
if (a.isRegExp(r))
|
|
1309
|
+
return r.test(t);
|
|
1314
1310
|
}
|
|
1315
1311
|
}
|
|
1316
|
-
function
|
|
1317
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
1312
|
+
function yr(e) {
|
|
1313
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1318
1314
|
}
|
|
1319
|
-
function
|
|
1320
|
-
const
|
|
1321
|
-
["get", "set", "has"].forEach((
|
|
1322
|
-
Object.defineProperty(e,
|
|
1315
|
+
function wr(e, t) {
|
|
1316
|
+
const n = a.toCamelCase(" " + t);
|
|
1317
|
+
["get", "set", "has"].forEach((r) => {
|
|
1318
|
+
Object.defineProperty(e, r + n, {
|
|
1323
1319
|
value: function(s, o, i) {
|
|
1324
|
-
return this[
|
|
1320
|
+
return this[r].call(this, t, s, o, i);
|
|
1325
1321
|
},
|
|
1326
1322
|
configurable: !0
|
|
1327
1323
|
});
|
|
@@ -1331,7 +1327,7 @@ let L = class {
|
|
|
1331
1327
|
constructor(t) {
|
|
1332
1328
|
t && this.set(t);
|
|
1333
1329
|
}
|
|
1334
|
-
set(t,
|
|
1330
|
+
set(t, n, r) {
|
|
1335
1331
|
const s = this;
|
|
1336
1332
|
function o(c, d, l) {
|
|
1337
1333
|
const u = ee(d);
|
|
@@ -1342,9 +1338,9 @@ let L = class {
|
|
|
1342
1338
|
}
|
|
1343
1339
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1344
1340
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1345
|
-
i(t,
|
|
1346
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1347
|
-
i(
|
|
1341
|
+
i(t, n);
|
|
1342
|
+
else if (a.isString(t) && (t = t.trim()) && !br(t))
|
|
1343
|
+
i(Rr(t), n);
|
|
1348
1344
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1349
1345
|
let c = {}, d, l;
|
|
1350
1346
|
for (const u of t) {
|
|
@@ -1352,81 +1348,81 @@ let L = class {
|
|
|
1352
1348
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1353
1349
|
c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
|
|
1354
1350
|
}
|
|
1355
|
-
i(c,
|
|
1351
|
+
i(c, n);
|
|
1356
1352
|
} else
|
|
1357
|
-
t != null && o(
|
|
1353
|
+
t != null && o(n, t, r);
|
|
1358
1354
|
return this;
|
|
1359
1355
|
}
|
|
1360
|
-
get(t,
|
|
1356
|
+
get(t, n) {
|
|
1361
1357
|
if (t = ee(t), t) {
|
|
1362
|
-
const
|
|
1363
|
-
if (
|
|
1364
|
-
const s = this[
|
|
1365
|
-
if (!
|
|
1358
|
+
const r = a.findKey(this, t);
|
|
1359
|
+
if (r) {
|
|
1360
|
+
const s = this[r];
|
|
1361
|
+
if (!n)
|
|
1366
1362
|
return s;
|
|
1367
|
-
if (
|
|
1368
|
-
return
|
|
1369
|
-
if (a.isFunction(
|
|
1370
|
-
return
|
|
1371
|
-
if (a.isRegExp(
|
|
1372
|
-
return
|
|
1363
|
+
if (n === !0)
|
|
1364
|
+
return Er(s);
|
|
1365
|
+
if (a.isFunction(n))
|
|
1366
|
+
return n.call(this, s, r);
|
|
1367
|
+
if (a.isRegExp(n))
|
|
1368
|
+
return n.exec(s);
|
|
1373
1369
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1374
1370
|
}
|
|
1375
1371
|
}
|
|
1376
1372
|
}
|
|
1377
|
-
has(t,
|
|
1373
|
+
has(t, n) {
|
|
1378
1374
|
if (t = ee(t), t) {
|
|
1379
|
-
const
|
|
1380
|
-
return !!(
|
|
1375
|
+
const r = a.findKey(this, t);
|
|
1376
|
+
return !!(r && this[r] !== void 0 && (!n || xe(this, this[r], r, n)));
|
|
1381
1377
|
}
|
|
1382
1378
|
return !1;
|
|
1383
1379
|
}
|
|
1384
|
-
delete(t,
|
|
1385
|
-
const
|
|
1380
|
+
delete(t, n) {
|
|
1381
|
+
const r = this;
|
|
1386
1382
|
let s = !1;
|
|
1387
1383
|
function o(i) {
|
|
1388
1384
|
if (i = ee(i), i) {
|
|
1389
|
-
const c = a.findKey(
|
|
1390
|
-
c && (!
|
|
1385
|
+
const c = a.findKey(r, i);
|
|
1386
|
+
c && (!n || xe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
1391
1387
|
}
|
|
1392
1388
|
}
|
|
1393
1389
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1394
1390
|
}
|
|
1395
1391
|
clear(t) {
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
for (;
|
|
1399
|
-
const o = r
|
|
1400
|
-
(!t ||
|
|
1392
|
+
const n = Object.keys(this);
|
|
1393
|
+
let r = n.length, s = !1;
|
|
1394
|
+
for (; r--; ) {
|
|
1395
|
+
const o = n[r];
|
|
1396
|
+
(!t || xe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1401
1397
|
}
|
|
1402
1398
|
return s;
|
|
1403
1399
|
}
|
|
1404
1400
|
normalize(t) {
|
|
1405
|
-
const
|
|
1401
|
+
const n = this, r = {};
|
|
1406
1402
|
return a.forEach(this, (s, o) => {
|
|
1407
|
-
const i = a.findKey(
|
|
1403
|
+
const i = a.findKey(r, o);
|
|
1408
1404
|
if (i) {
|
|
1409
|
-
|
|
1405
|
+
n[i] = ue(s), delete n[o];
|
|
1410
1406
|
return;
|
|
1411
1407
|
}
|
|
1412
|
-
const c = t ?
|
|
1413
|
-
c !== o && delete
|
|
1408
|
+
const c = t ? yr(o) : String(o).trim();
|
|
1409
|
+
c !== o && delete n[o], n[c] = ue(s), r[c] = !0;
|
|
1414
1410
|
}), this;
|
|
1415
1411
|
}
|
|
1416
1412
|
concat(...t) {
|
|
1417
1413
|
return this.constructor.concat(this, ...t);
|
|
1418
1414
|
}
|
|
1419
1415
|
toJSON(t) {
|
|
1420
|
-
const
|
|
1421
|
-
return a.forEach(this, (
|
|
1422
|
-
|
|
1423
|
-
}),
|
|
1416
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1417
|
+
return a.forEach(this, (r, s) => {
|
|
1418
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
1419
|
+
}), n;
|
|
1424
1420
|
}
|
|
1425
1421
|
[Symbol.iterator]() {
|
|
1426
1422
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1427
1423
|
}
|
|
1428
1424
|
toString() {
|
|
1429
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
1425
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1430
1426
|
`);
|
|
1431
1427
|
}
|
|
1432
1428
|
getSetCookie() {
|
|
@@ -1438,96 +1434,96 @@ let L = class {
|
|
|
1438
1434
|
static from(t) {
|
|
1439
1435
|
return t instanceof this ? t : new this(t);
|
|
1440
1436
|
}
|
|
1441
|
-
static concat(t, ...
|
|
1442
|
-
const
|
|
1443
|
-
return
|
|
1437
|
+
static concat(t, ...n) {
|
|
1438
|
+
const r = new this(t);
|
|
1439
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1444
1440
|
}
|
|
1445
1441
|
static accessor(t) {
|
|
1446
|
-
const
|
|
1442
|
+
const r = (this[nt] = this[nt] = {
|
|
1447
1443
|
accessors: {}
|
|
1448
1444
|
}).accessors, s = this.prototype;
|
|
1449
1445
|
function o(i) {
|
|
1450
1446
|
const c = ee(i);
|
|
1451
|
-
|
|
1447
|
+
r[c] || (wr(s, i), r[c] = !0);
|
|
1452
1448
|
}
|
|
1453
1449
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1454
1450
|
}
|
|
1455
1451
|
};
|
|
1456
1452
|
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1457
1453
|
a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
1458
|
-
let
|
|
1454
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1459
1455
|
return {
|
|
1460
1456
|
get: () => e,
|
|
1461
|
-
set(
|
|
1462
|
-
this[
|
|
1457
|
+
set(r) {
|
|
1458
|
+
this[n] = r;
|
|
1463
1459
|
}
|
|
1464
1460
|
};
|
|
1465
1461
|
});
|
|
1466
1462
|
a.freezeMethods(L);
|
|
1467
|
-
function
|
|
1468
|
-
const
|
|
1469
|
-
let o =
|
|
1463
|
+
function Pe(e, t) {
|
|
1464
|
+
const n = this || ae, r = t || n, s = L.from(r.headers);
|
|
1465
|
+
let o = r.data;
|
|
1470
1466
|
return a.forEach(e, function(c) {
|
|
1471
|
-
o = c.call(
|
|
1467
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1472
1468
|
}), s.normalize(), o;
|
|
1473
1469
|
}
|
|
1474
1470
|
function Ft(e) {
|
|
1475
1471
|
return !!(e && e.__CANCEL__);
|
|
1476
1472
|
}
|
|
1477
|
-
function X(e, t,
|
|
1478
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t,
|
|
1473
|
+
function X(e, t, n) {
|
|
1474
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1479
1475
|
}
|
|
1480
1476
|
a.inherits(X, y, {
|
|
1481
1477
|
__CANCEL__: !0
|
|
1482
1478
|
});
|
|
1483
|
-
function vt(e, t,
|
|
1484
|
-
const
|
|
1485
|
-
!
|
|
1486
|
-
"Request failed with status code " +
|
|
1487
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1479
|
+
function vt(e, t, n) {
|
|
1480
|
+
const r = n.config.validateStatus;
|
|
1481
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
1482
|
+
"Request failed with status code " + n.status,
|
|
1483
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1484
|
+
n.config,
|
|
1485
|
+
n.request,
|
|
1486
|
+
n
|
|
1491
1487
|
));
|
|
1492
1488
|
}
|
|
1493
|
-
function
|
|
1489
|
+
function Tr(e) {
|
|
1494
1490
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1495
1491
|
return t && t[1] || "";
|
|
1496
1492
|
}
|
|
1497
|
-
function
|
|
1493
|
+
function gr(e, t) {
|
|
1498
1494
|
e = e || 10;
|
|
1499
|
-
const
|
|
1495
|
+
const n = new Array(e), r = new Array(e);
|
|
1500
1496
|
let s = 0, o = 0, i;
|
|
1501
1497
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1502
|
-
const l = Date.now(), u =
|
|
1503
|
-
i || (i = l),
|
|
1498
|
+
const l = Date.now(), u = r[o];
|
|
1499
|
+
i || (i = l), n[s] = d, r[s] = l;
|
|
1504
1500
|
let p = o, b = 0;
|
|
1505
1501
|
for (; p !== s; )
|
|
1506
|
-
b +=
|
|
1502
|
+
b += n[p++], p = p % e;
|
|
1507
1503
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
1508
1504
|
return;
|
|
1509
1505
|
const T = u && l - u;
|
|
1510
1506
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1511
1507
|
};
|
|
1512
1508
|
}
|
|
1513
|
-
function
|
|
1514
|
-
let
|
|
1509
|
+
function Sr(e, t) {
|
|
1510
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
1515
1511
|
const i = (l, u = Date.now()) => {
|
|
1516
|
-
|
|
1512
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
1517
1513
|
};
|
|
1518
1514
|
return [(...l) => {
|
|
1519
|
-
const u = Date.now(), p = u -
|
|
1520
|
-
p >=
|
|
1515
|
+
const u = Date.now(), p = u - n;
|
|
1516
|
+
p >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
1521
1517
|
o = null, i(s);
|
|
1522
|
-
},
|
|
1518
|
+
}, r - p)));
|
|
1523
1519
|
}, () => s && i(s)];
|
|
1524
1520
|
}
|
|
1525
|
-
const pe = (e, t,
|
|
1526
|
-
let
|
|
1527
|
-
const s =
|
|
1528
|
-
return
|
|
1529
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i -
|
|
1530
|
-
|
|
1521
|
+
const pe = (e, t, n = 3) => {
|
|
1522
|
+
let r = 0;
|
|
1523
|
+
const s = gr(50, 250);
|
|
1524
|
+
return Sr((o) => {
|
|
1525
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - r, l = s(d), u = i <= c;
|
|
1526
|
+
r = i;
|
|
1531
1527
|
const p = {
|
|
1532
1528
|
loaded: i,
|
|
1533
1529
|
total: c,
|
|
@@ -1540,23 +1536,23 @@ const pe = (e, t, r = 3) => {
|
|
|
1540
1536
|
[t ? "download" : "upload"]: !0
|
|
1541
1537
|
};
|
|
1542
1538
|
e(p);
|
|
1543
|
-
},
|
|
1544
|
-
},
|
|
1545
|
-
const
|
|
1546
|
-
return [(
|
|
1547
|
-
lengthComputable:
|
|
1539
|
+
}, n);
|
|
1540
|
+
}, rt = (e, t) => {
|
|
1541
|
+
const n = e != null;
|
|
1542
|
+
return [(r) => t[0]({
|
|
1543
|
+
lengthComputable: n,
|
|
1548
1544
|
total: e,
|
|
1549
|
-
loaded:
|
|
1545
|
+
loaded: r
|
|
1550
1546
|
}), t[1]];
|
|
1551
|
-
}, st = (e) => (...t) => a.asap(() => e(...t)),
|
|
1547
|
+
}, st = (e) => (...t) => a.asap(() => e(...t)), Or = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, F.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1552
1548
|
new URL(F.origin),
|
|
1553
1549
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1554
|
-
) : () => !0,
|
|
1550
|
+
) : () => !0, Ar = F.hasStandardBrowserEnv ? (
|
|
1555
1551
|
// Standard browser envs support document.cookie
|
|
1556
1552
|
{
|
|
1557
|
-
write(e, t,
|
|
1553
|
+
write(e, t, n, r, s, o) {
|
|
1558
1554
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1559
|
-
a.isNumber(
|
|
1555
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
1560
1556
|
},
|
|
1561
1557
|
read(e) {
|
|
1562
1558
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1578,44 +1574,44 @@ const pe = (e, t, r = 3) => {
|
|
|
1578
1574
|
}
|
|
1579
1575
|
}
|
|
1580
1576
|
);
|
|
1581
|
-
function
|
|
1577
|
+
function _r(e) {
|
|
1582
1578
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1583
1579
|
}
|
|
1584
|
-
function
|
|
1580
|
+
function xr(e, t) {
|
|
1585
1581
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1586
1582
|
}
|
|
1587
|
-
function jt(e, t,
|
|
1588
|
-
let
|
|
1589
|
-
return e && (
|
|
1583
|
+
function jt(e, t, n) {
|
|
1584
|
+
let r = !_r(t);
|
|
1585
|
+
return e && (r || n == !1) ? xr(e, t) : t;
|
|
1590
1586
|
}
|
|
1591
1587
|
const ot = (e) => e instanceof L ? { ...e } : e;
|
|
1592
1588
|
function W(e, t) {
|
|
1593
1589
|
t = t || {};
|
|
1594
|
-
const
|
|
1595
|
-
function
|
|
1590
|
+
const n = {};
|
|
1591
|
+
function r(l, u, p, b) {
|
|
1596
1592
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: b }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1597
1593
|
}
|
|
1598
1594
|
function s(l, u, p, b) {
|
|
1599
1595
|
if (a.isUndefined(u)) {
|
|
1600
1596
|
if (!a.isUndefined(l))
|
|
1601
|
-
return
|
|
1602
|
-
} else return
|
|
1597
|
+
return r(void 0, l, p, b);
|
|
1598
|
+
} else return r(l, u, p, b);
|
|
1603
1599
|
}
|
|
1604
1600
|
function o(l, u) {
|
|
1605
1601
|
if (!a.isUndefined(u))
|
|
1606
|
-
return
|
|
1602
|
+
return r(void 0, u);
|
|
1607
1603
|
}
|
|
1608
1604
|
function i(l, u) {
|
|
1609
1605
|
if (a.isUndefined(u)) {
|
|
1610
1606
|
if (!a.isUndefined(l))
|
|
1611
|
-
return
|
|
1612
|
-
} else return
|
|
1607
|
+
return r(void 0, l);
|
|
1608
|
+
} else return r(void 0, u);
|
|
1613
1609
|
}
|
|
1614
1610
|
function c(l, u, p) {
|
|
1615
1611
|
if (p in t)
|
|
1616
|
-
return
|
|
1612
|
+
return r(l, u);
|
|
1617
1613
|
if (p in e)
|
|
1618
|
-
return
|
|
1614
|
+
return r(void 0, l);
|
|
1619
1615
|
}
|
|
1620
1616
|
const d = {
|
|
1621
1617
|
url: o,
|
|
@@ -1650,18 +1646,18 @@ function W(e, t) {
|
|
|
1650
1646
|
};
|
|
1651
1647
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1652
1648
|
const p = d[u] || s, b = p(e[u], t[u], u);
|
|
1653
|
-
a.isUndefined(b) && p !== c || (
|
|
1654
|
-
}),
|
|
1649
|
+
a.isUndefined(b) && p !== c || (n[u] = b);
|
|
1650
|
+
}), n;
|
|
1655
1651
|
}
|
|
1656
1652
|
const Lt = (e) => {
|
|
1657
1653
|
const t = W({}, e);
|
|
1658
|
-
let { data:
|
|
1654
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1659
1655
|
t.headers = i = L.from(i), t.url = Nt(jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1660
1656
|
"Authorization",
|
|
1661
1657
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1662
1658
|
);
|
|
1663
1659
|
let d;
|
|
1664
|
-
if (a.isFormData(
|
|
1660
|
+
if (a.isFormData(n)) {
|
|
1665
1661
|
if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
|
|
1666
1662
|
i.setContentType(void 0);
|
|
1667
1663
|
else if ((d = i.getContentType()) !== !1) {
|
|
@@ -1669,13 +1665,13 @@ const Lt = (e) => {
|
|
|
1669
1665
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1670
1666
|
}
|
|
1671
1667
|
}
|
|
1672
|
-
if (F.hasStandardBrowserEnv && (
|
|
1673
|
-
const l = s && o &&
|
|
1668
|
+
if (F.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Or(t.url))) {
|
|
1669
|
+
const l = s && o && Ar.read(o);
|
|
1674
1670
|
l && i.set(s, l);
|
|
1675
1671
|
}
|
|
1676
1672
|
return t;
|
|
1677
|
-
},
|
|
1678
|
-
return new Promise(function(
|
|
1673
|
+
}, Pr = typeof XMLHttpRequest < "u", Nr = Pr && function(e) {
|
|
1674
|
+
return new Promise(function(n, r) {
|
|
1679
1675
|
const s = Lt(e);
|
|
1680
1676
|
let o = s.data;
|
|
1681
1677
|
const i = L.from(s.headers).normalize();
|
|
@@ -1699,21 +1695,21 @@ const Lt = (e) => {
|
|
|
1699
1695
|
request: m
|
|
1700
1696
|
};
|
|
1701
1697
|
vt(function(N) {
|
|
1702
|
-
r(N), R();
|
|
1703
|
-
}, function(N) {
|
|
1704
1698
|
n(N), R();
|
|
1699
|
+
}, function(N) {
|
|
1700
|
+
r(N), R();
|
|
1705
1701
|
}, g), m = null;
|
|
1706
1702
|
}
|
|
1707
1703
|
"onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
|
|
1708
1704
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1709
1705
|
}, m.onabort = function() {
|
|
1710
|
-
m && (
|
|
1706
|
+
m && (r(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
|
|
1711
1707
|
}, m.onerror = function() {
|
|
1712
|
-
|
|
1708
|
+
r(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1713
1709
|
}, m.ontimeout = function() {
|
|
1714
1710
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1715
1711
|
const g = s.transitional || Ct;
|
|
1716
|
-
s.timeoutErrorMessage && (O = s.timeoutErrorMessage),
|
|
1712
|
+
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
|
|
1717
1713
|
O,
|
|
1718
1714
|
g.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1719
1715
|
e,
|
|
@@ -1722,24 +1718,24 @@ const Lt = (e) => {
|
|
|
1722
1718
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, g) {
|
|
1723
1719
|
m.setRequestHeader(g, O);
|
|
1724
1720
|
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = pe(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = pe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1725
|
-
m && (
|
|
1721
|
+
m && (r(!E || E.type ? new X(null, e, m) : E), m.abort(), m = null);
|
|
1726
1722
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1727
|
-
const A =
|
|
1723
|
+
const A = Tr(s.url);
|
|
1728
1724
|
if (A && F.protocols.indexOf(A) === -1) {
|
|
1729
|
-
|
|
1725
|
+
r(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1730
1726
|
return;
|
|
1731
1727
|
}
|
|
1732
1728
|
m.send(o || null);
|
|
1733
1729
|
});
|
|
1734
|
-
},
|
|
1735
|
-
const { length:
|
|
1736
|
-
if (t ||
|
|
1737
|
-
let
|
|
1730
|
+
}, Cr = (e, t) => {
|
|
1731
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1732
|
+
if (t || n) {
|
|
1733
|
+
let r = new AbortController(), s;
|
|
1738
1734
|
const o = function(l) {
|
|
1739
1735
|
if (!s) {
|
|
1740
1736
|
s = !0, c();
|
|
1741
1737
|
const u = l instanceof Error ? l : this.reason;
|
|
1742
|
-
|
|
1738
|
+
r.abort(u instanceof y ? u : new X(u instanceof Error ? u.message : u));
|
|
1743
1739
|
}
|
|
1744
1740
|
};
|
|
1745
1741
|
let i = t && setTimeout(() => {
|
|
@@ -1751,22 +1747,22 @@ const Lt = (e) => {
|
|
|
1751
1747
|
}), e = null);
|
|
1752
1748
|
};
|
|
1753
1749
|
e.forEach((l) => l.addEventListener("abort", o));
|
|
1754
|
-
const { signal: d } =
|
|
1750
|
+
const { signal: d } = r;
|
|
1755
1751
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1756
1752
|
}
|
|
1757
|
-
},
|
|
1758
|
-
let
|
|
1759
|
-
if (
|
|
1753
|
+
}, kr = function* (e, t) {
|
|
1754
|
+
let n = e.byteLength;
|
|
1755
|
+
if (n < t) {
|
|
1760
1756
|
yield e;
|
|
1761
1757
|
return;
|
|
1762
1758
|
}
|
|
1763
|
-
let
|
|
1764
|
-
for (;
|
|
1765
|
-
s =
|
|
1766
|
-
},
|
|
1767
|
-
for await (const
|
|
1768
|
-
yield*
|
|
1769
|
-
},
|
|
1759
|
+
let r = 0, s;
|
|
1760
|
+
for (; r < n; )
|
|
1761
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1762
|
+
}, Fr = async function* (e, t) {
|
|
1763
|
+
for await (const n of vr(e))
|
|
1764
|
+
yield* kr(n, t);
|
|
1765
|
+
}, vr = async function* (e) {
|
|
1770
1766
|
if (e[Symbol.asyncIterator]) {
|
|
1771
1767
|
yield* e;
|
|
1772
1768
|
return;
|
|
@@ -1774,18 +1770,18 @@ const Lt = (e) => {
|
|
|
1774
1770
|
const t = e.getReader();
|
|
1775
1771
|
try {
|
|
1776
1772
|
for (; ; ) {
|
|
1777
|
-
const { done:
|
|
1778
|
-
if (
|
|
1773
|
+
const { done: n, value: r } = await t.read();
|
|
1774
|
+
if (n)
|
|
1779
1775
|
break;
|
|
1780
|
-
yield
|
|
1776
|
+
yield r;
|
|
1781
1777
|
}
|
|
1782
1778
|
} finally {
|
|
1783
1779
|
await t.cancel();
|
|
1784
1780
|
}
|
|
1785
|
-
}, it = (e, t,
|
|
1786
|
-
const s =
|
|
1781
|
+
}, it = (e, t, n, r) => {
|
|
1782
|
+
const s = Fr(e, t);
|
|
1787
1783
|
let o = 0, i, c = (d) => {
|
|
1788
|
-
i || (i = !0,
|
|
1784
|
+
i || (i = !0, r && r(d));
|
|
1789
1785
|
};
|
|
1790
1786
|
return new ReadableStream({
|
|
1791
1787
|
async pull(d) {
|
|
@@ -1796,9 +1792,9 @@ const Lt = (e) => {
|
|
|
1796
1792
|
return;
|
|
1797
1793
|
}
|
|
1798
1794
|
let p = u.byteLength;
|
|
1799
|
-
if (
|
|
1795
|
+
if (n) {
|
|
1800
1796
|
let b = o += p;
|
|
1801
|
-
|
|
1797
|
+
n(b);
|
|
1802
1798
|
}
|
|
1803
1799
|
d.enqueue(new Uint8Array(u));
|
|
1804
1800
|
} catch (l) {
|
|
@@ -1811,13 +1807,13 @@ const Lt = (e) => {
|
|
|
1811
1807
|
}, {
|
|
1812
1808
|
highWaterMark: 2
|
|
1813
1809
|
});
|
|
1814
|
-
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function",
|
|
1810
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function", jr = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dt = (e, ...t) => {
|
|
1815
1811
|
try {
|
|
1816
1812
|
return !!e(...t);
|
|
1817
1813
|
} catch {
|
|
1818
1814
|
return !1;
|
|
1819
1815
|
}
|
|
1820
|
-
},
|
|
1816
|
+
}, Lr = Ut && Dt(() => {
|
|
1821
1817
|
let e = !1;
|
|
1822
1818
|
const t = new Request(F.origin, {
|
|
1823
1819
|
body: new ReadableStream(),
|
|
@@ -1832,12 +1828,12 @@ const Lt = (e) => {
|
|
|
1832
1828
|
};
|
|
1833
1829
|
we && ((e) => {
|
|
1834
1830
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1835
|
-
!he[t] && (he[t] = a.isFunction(e[t]) ? (
|
|
1836
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT,
|
|
1831
|
+
!he[t] && (he[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1832
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1837
1833
|
});
|
|
1838
1834
|
});
|
|
1839
1835
|
})(new Response());
|
|
1840
|
-
const
|
|
1836
|
+
const Ur = async (e) => {
|
|
1841
1837
|
if (e == null)
|
|
1842
1838
|
return 0;
|
|
1843
1839
|
if (a.isBlob(e))
|
|
@@ -1850,15 +1846,15 @@ const Dn = async (e) => {
|
|
|
1850
1846
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1851
1847
|
return e.byteLength;
|
|
1852
1848
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1853
|
-
return (await
|
|
1854
|
-
},
|
|
1855
|
-
const
|
|
1856
|
-
return
|
|
1857
|
-
},
|
|
1849
|
+
return (await jr(e)).byteLength;
|
|
1850
|
+
}, Dr = async (e, t) => {
|
|
1851
|
+
const n = a.toFiniteNumber(e.getContentLength());
|
|
1852
|
+
return n ?? Ur(t);
|
|
1853
|
+
}, Br = we && (async (e) => {
|
|
1858
1854
|
let {
|
|
1859
1855
|
url: t,
|
|
1860
|
-
method:
|
|
1861
|
-
data:
|
|
1856
|
+
method: n,
|
|
1857
|
+
data: r,
|
|
1862
1858
|
signal: s,
|
|
1863
1859
|
cancelToken: o,
|
|
1864
1860
|
timeout: i,
|
|
@@ -1870,24 +1866,24 @@ const Dn = async (e) => {
|
|
|
1870
1866
|
fetchOptions: b
|
|
1871
1867
|
} = Lt(e);
|
|
1872
1868
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1873
|
-
let T =
|
|
1869
|
+
let T = Cr([s, o && o.toAbortSignal()], i), h;
|
|
1874
1870
|
const R = T && T.unsubscribe && (() => {
|
|
1875
1871
|
T.unsubscribe();
|
|
1876
1872
|
});
|
|
1877
1873
|
let m;
|
|
1878
1874
|
try {
|
|
1879
|
-
if (d &&
|
|
1875
|
+
if (d && Lr && n !== "get" && n !== "head" && (m = await Dr(u, r)) !== 0) {
|
|
1880
1876
|
let g = new Request(t, {
|
|
1881
1877
|
method: "POST",
|
|
1882
|
-
body:
|
|
1878
|
+
body: r,
|
|
1883
1879
|
duplex: "half"
|
|
1884
|
-
}),
|
|
1885
|
-
if (a.isFormData(
|
|
1886
|
-
const [N, B] =
|
|
1880
|
+
}), P;
|
|
1881
|
+
if (a.isFormData(r) && (P = g.headers.get("content-type")) && u.setContentType(P), g.body) {
|
|
1882
|
+
const [N, B] = rt(
|
|
1887
1883
|
m,
|
|
1888
1884
|
pe(st(d))
|
|
1889
1885
|
);
|
|
1890
|
-
|
|
1886
|
+
r = it(g.body, at, N, B);
|
|
1891
1887
|
}
|
|
1892
1888
|
}
|
|
1893
1889
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1895,9 +1891,9 @@ const Dn = async (e) => {
|
|
|
1895
1891
|
h = new Request(t, {
|
|
1896
1892
|
...b,
|
|
1897
1893
|
signal: T,
|
|
1898
|
-
method:
|
|
1894
|
+
method: n.toUpperCase(),
|
|
1899
1895
|
headers: u.normalize().toJSON(),
|
|
1900
|
-
body:
|
|
1896
|
+
body: r,
|
|
1901
1897
|
duplex: "half",
|
|
1902
1898
|
credentials: S ? p : void 0
|
|
1903
1899
|
});
|
|
@@ -1908,8 +1904,8 @@ const Dn = async (e) => {
|
|
|
1908
1904
|
["status", "statusText", "headers"].forEach((v) => {
|
|
1909
1905
|
g[v] = A[v];
|
|
1910
1906
|
});
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1907
|
+
const P = a.toFiniteNumber(A.headers.get("content-length")), [N, B] = c && rt(
|
|
1908
|
+
P,
|
|
1913
1909
|
pe(st(c), !0)
|
|
1914
1910
|
) || [];
|
|
1915
1911
|
A = new Response(
|
|
@@ -1921,8 +1917,8 @@ const Dn = async (e) => {
|
|
|
1921
1917
|
}
|
|
1922
1918
|
l = l || "text";
|
|
1923
1919
|
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1924
|
-
return !E && R && R(), await new Promise((g,
|
|
1925
|
-
vt(g,
|
|
1920
|
+
return !E && R && R(), await new Promise((g, P) => {
|
|
1921
|
+
vt(g, P, {
|
|
1926
1922
|
data: O,
|
|
1927
1923
|
headers: L.from(A.headers),
|
|
1928
1924
|
status: A.status,
|
|
@@ -1940,9 +1936,9 @@ const Dn = async (e) => {
|
|
|
1940
1936
|
) : y.from(S, S && S.code, e, h);
|
|
1941
1937
|
}
|
|
1942
1938
|
}), je = {
|
|
1943
|
-
http:
|
|
1944
|
-
xhr:
|
|
1945
|
-
fetch:
|
|
1939
|
+
http: Qn,
|
|
1940
|
+
xhr: Nr,
|
|
1941
|
+
fetch: Br
|
|
1946
1942
|
};
|
|
1947
1943
|
a.forEach(je, (e, t) => {
|
|
1948
1944
|
if (e) {
|
|
@@ -1953,22 +1949,22 @@ a.forEach(je, (e, t) => {
|
|
|
1953
1949
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1954
1950
|
}
|
|
1955
1951
|
});
|
|
1956
|
-
const ct = (e) => `- ${e}`,
|
|
1952
|
+
const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !1, Bt = {
|
|
1957
1953
|
getAdapter: (e) => {
|
|
1958
1954
|
e = a.isArray(e) ? e : [e];
|
|
1959
1955
|
const { length: t } = e;
|
|
1960
|
-
let
|
|
1956
|
+
let n, r;
|
|
1961
1957
|
const s = {};
|
|
1962
1958
|
for (let o = 0; o < t; o++) {
|
|
1963
|
-
|
|
1959
|
+
n = e[o];
|
|
1964
1960
|
let i;
|
|
1965
|
-
if (
|
|
1961
|
+
if (r = n, !qr(n) && (r = je[(i = String(n)).toLowerCase()], r === void 0))
|
|
1966
1962
|
throw new y(`Unknown adapter '${i}'`);
|
|
1967
|
-
if (
|
|
1963
|
+
if (r)
|
|
1968
1964
|
break;
|
|
1969
|
-
s[i || "#" + o] =
|
|
1965
|
+
s[i || "#" + o] = r;
|
|
1970
1966
|
}
|
|
1971
|
-
if (!
|
|
1967
|
+
if (!r) {
|
|
1972
1968
|
const o = Object.entries(s).map(
|
|
1973
1969
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1974
1970
|
);
|
|
@@ -1980,7 +1976,7 @@ const ct = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1980
1976
|
"ERR_NOT_SUPPORT"
|
|
1981
1977
|
);
|
|
1982
1978
|
}
|
|
1983
|
-
return
|
|
1979
|
+
return r;
|
|
1984
1980
|
},
|
|
1985
1981
|
adapters: je
|
|
1986
1982
|
};
|
|
@@ -1989,70 +1985,70 @@ function Ne(e) {
|
|
|
1989
1985
|
throw new X(null, e);
|
|
1990
1986
|
}
|
|
1991
1987
|
function lt(e) {
|
|
1992
|
-
return Ne(e), e.headers = L.from(e.headers), e.data =
|
|
1988
|
+
return Ne(e), e.headers = L.from(e.headers), e.data = Pe.call(
|
|
1993
1989
|
e,
|
|
1994
1990
|
e.transformRequest
|
|
1995
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || ae.adapter)(e).then(function(
|
|
1996
|
-
return Ne(e),
|
|
1991
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || ae.adapter)(e).then(function(r) {
|
|
1992
|
+
return Ne(e), r.data = Pe.call(
|
|
1997
1993
|
e,
|
|
1998
1994
|
e.transformResponse,
|
|
1999
|
-
|
|
2000
|
-
),
|
|
2001
|
-
}, function(
|
|
2002
|
-
return Ft(
|
|
1995
|
+
r
|
|
1996
|
+
), r.headers = L.from(r.headers), r;
|
|
1997
|
+
}, function(r) {
|
|
1998
|
+
return Ft(r) || (Ne(e), r && r.response && (r.response.data = Pe.call(
|
|
2003
1999
|
e,
|
|
2004
2000
|
e.transformResponse,
|
|
2005
|
-
|
|
2006
|
-
),
|
|
2001
|
+
r.response
|
|
2002
|
+
), r.response.headers = L.from(r.response.headers))), Promise.reject(r);
|
|
2007
2003
|
});
|
|
2008
2004
|
}
|
|
2009
2005
|
const qt = "1.9.0", Te = {};
|
|
2010
2006
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2011
|
-
Te[e] = function(
|
|
2012
|
-
return typeof
|
|
2007
|
+
Te[e] = function(r) {
|
|
2008
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2013
2009
|
};
|
|
2014
2010
|
});
|
|
2015
2011
|
const ut = {};
|
|
2016
|
-
Te.transitional = function(t,
|
|
2012
|
+
Te.transitional = function(t, n, r) {
|
|
2017
2013
|
function s(o, i) {
|
|
2018
|
-
return "[Axios v" + qt + "] Transitional option '" + o + "'" + i + (
|
|
2014
|
+
return "[Axios v" + qt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
2019
2015
|
}
|
|
2020
2016
|
return (o, i, c) => {
|
|
2021
2017
|
if (t === !1)
|
|
2022
2018
|
throw new y(
|
|
2023
|
-
s(i, " has been removed" + (
|
|
2019
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
2024
2020
|
y.ERR_DEPRECATED
|
|
2025
2021
|
);
|
|
2026
|
-
return
|
|
2022
|
+
return n && !ut[i] && (ut[i] = !0, console.warn(
|
|
2027
2023
|
s(
|
|
2028
2024
|
i,
|
|
2029
|
-
" has been deprecated since v" +
|
|
2025
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2030
2026
|
)
|
|
2031
2027
|
)), t ? t(o, i, c) : !0;
|
|
2032
2028
|
};
|
|
2033
2029
|
};
|
|
2034
2030
|
Te.spelling = function(t) {
|
|
2035
|
-
return (
|
|
2031
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2036
2032
|
};
|
|
2037
|
-
function
|
|
2033
|
+
function Ir(e, t, n) {
|
|
2038
2034
|
if (typeof e != "object")
|
|
2039
2035
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2040
|
-
const
|
|
2041
|
-
let s =
|
|
2036
|
+
const r = Object.keys(e);
|
|
2037
|
+
let s = r.length;
|
|
2042
2038
|
for (; s-- > 0; ) {
|
|
2043
|
-
const o =
|
|
2039
|
+
const o = r[s], i = t[o];
|
|
2044
2040
|
if (i) {
|
|
2045
2041
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
2046
2042
|
if (d !== !0)
|
|
2047
2043
|
throw new y("option " + o + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
2048
2044
|
continue;
|
|
2049
2045
|
}
|
|
2050
|
-
if (
|
|
2046
|
+
if (n !== !0)
|
|
2051
2047
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2052
2048
|
}
|
|
2053
2049
|
}
|
|
2054
2050
|
const fe = {
|
|
2055
|
-
assertOptions:
|
|
2051
|
+
assertOptions: Ir,
|
|
2056
2052
|
validators: Te
|
|
2057
2053
|
}, I = fe.validators;
|
|
2058
2054
|
let J = class {
|
|
@@ -2070,53 +2066,53 @@ let J = class {
|
|
|
2070
2066
|
*
|
|
2071
2067
|
* @returns {Promise} The Promise to be fulfilled
|
|
2072
2068
|
*/
|
|
2073
|
-
async request(t,
|
|
2069
|
+
async request(t, n) {
|
|
2074
2070
|
try {
|
|
2075
|
-
return await this._request(t,
|
|
2076
|
-
} catch (
|
|
2077
|
-
if (
|
|
2071
|
+
return await this._request(t, n);
|
|
2072
|
+
} catch (r) {
|
|
2073
|
+
if (r instanceof Error) {
|
|
2078
2074
|
let s = {};
|
|
2079
2075
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2080
2076
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2081
2077
|
try {
|
|
2082
|
-
|
|
2083
|
-
` + o) :
|
|
2078
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2079
|
+
` + o) : r.stack = o;
|
|
2084
2080
|
} catch {
|
|
2085
2081
|
}
|
|
2086
2082
|
}
|
|
2087
|
-
throw
|
|
2083
|
+
throw r;
|
|
2088
2084
|
}
|
|
2089
2085
|
}
|
|
2090
|
-
_request(t,
|
|
2091
|
-
typeof t == "string" ? (
|
|
2092
|
-
const { transitional:
|
|
2093
|
-
|
|
2086
|
+
_request(t, n) {
|
|
2087
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = W(this.defaults, n);
|
|
2088
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2089
|
+
r !== void 0 && fe.assertOptions(r, {
|
|
2094
2090
|
silentJSONParsing: I.transitional(I.boolean),
|
|
2095
2091
|
forcedJSONParsing: I.transitional(I.boolean),
|
|
2096
2092
|
clarifyTimeoutError: I.transitional(I.boolean)
|
|
2097
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
2093
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2098
2094
|
serialize: s
|
|
2099
2095
|
} : fe.assertOptions(s, {
|
|
2100
2096
|
encode: I.function,
|
|
2101
2097
|
serialize: I.function
|
|
2102
|
-
}, !0)),
|
|
2098
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), fe.assertOptions(n, {
|
|
2103
2099
|
baseUrl: I.spelling("baseURL"),
|
|
2104
2100
|
withXsrfToken: I.spelling("withXSRFToken")
|
|
2105
|
-
}, !0),
|
|
2101
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2106
2102
|
let i = o && a.merge(
|
|
2107
2103
|
o.common,
|
|
2108
|
-
o[
|
|
2104
|
+
o[n.method]
|
|
2109
2105
|
);
|
|
2110
2106
|
o && a.forEach(
|
|
2111
2107
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2112
2108
|
(h) => {
|
|
2113
2109
|
delete o[h];
|
|
2114
2110
|
}
|
|
2115
|
-
),
|
|
2111
|
+
), n.headers = L.concat(i, o);
|
|
2116
2112
|
const c = [];
|
|
2117
2113
|
let d = !0;
|
|
2118
2114
|
this.interceptors.request.forEach(function(R) {
|
|
2119
|
-
typeof R.runWhen == "function" && R.runWhen(
|
|
2115
|
+
typeof R.runWhen == "function" && R.runWhen(n) === !1 || (d = d && R.synchronous, c.unshift(R.fulfilled, R.rejected));
|
|
2120
2116
|
});
|
|
2121
2117
|
const l = [];
|
|
2122
2118
|
this.interceptors.response.forEach(function(R) {
|
|
@@ -2125,12 +2121,12 @@ let J = class {
|
|
|
2125
2121
|
let u, p = 0, b;
|
|
2126
2122
|
if (!d) {
|
|
2127
2123
|
const h = [lt.bind(this), void 0];
|
|
2128
|
-
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(
|
|
2124
|
+
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(n); p < b; )
|
|
2129
2125
|
u = u.then(h[p++], h[p++]);
|
|
2130
2126
|
return u;
|
|
2131
2127
|
}
|
|
2132
2128
|
b = c.length;
|
|
2133
|
-
let T =
|
|
2129
|
+
let T = n;
|
|
2134
2130
|
for (p = 0; p < b; ) {
|
|
2135
2131
|
const h = c[p++], R = c[p++];
|
|
2136
2132
|
try {
|
|
@@ -2151,25 +2147,25 @@ let J = class {
|
|
|
2151
2147
|
}
|
|
2152
2148
|
getUri(t) {
|
|
2153
2149
|
t = W(this.defaults, t);
|
|
2154
|
-
const
|
|
2155
|
-
return Nt(
|
|
2150
|
+
const n = jt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2151
|
+
return Nt(n, t.params, t.paramsSerializer);
|
|
2156
2152
|
}
|
|
2157
2153
|
};
|
|
2158
2154
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2159
|
-
J.prototype[t] = function(
|
|
2160
|
-
return this.request(W(
|
|
2155
|
+
J.prototype[t] = function(n, r) {
|
|
2156
|
+
return this.request(W(r || {}, {
|
|
2161
2157
|
method: t,
|
|
2162
|
-
url:
|
|
2163
|
-
data: (
|
|
2158
|
+
url: n,
|
|
2159
|
+
data: (r || {}).data
|
|
2164
2160
|
}));
|
|
2165
2161
|
};
|
|
2166
2162
|
});
|
|
2167
2163
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
2168
|
-
function r
|
|
2164
|
+
function n(r) {
|
|
2169
2165
|
return function(o, i, c) {
|
|
2170
2166
|
return this.request(W(c || {}, {
|
|
2171
2167
|
method: t,
|
|
2172
|
-
headers:
|
|
2168
|
+
headers: r ? {
|
|
2173
2169
|
"Content-Type": "multipart/form-data"
|
|
2174
2170
|
} : {},
|
|
2175
2171
|
url: o,
|
|
@@ -2177,33 +2173,33 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2177
2173
|
}));
|
|
2178
2174
|
};
|
|
2179
2175
|
}
|
|
2180
|
-
J.prototype[t] =
|
|
2176
|
+
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
2181
2177
|
});
|
|
2182
|
-
let
|
|
2178
|
+
let $r = class It {
|
|
2183
2179
|
constructor(t) {
|
|
2184
2180
|
if (typeof t != "function")
|
|
2185
2181
|
throw new TypeError("executor must be a function.");
|
|
2186
|
-
let
|
|
2182
|
+
let n;
|
|
2187
2183
|
this.promise = new Promise(function(o) {
|
|
2188
|
-
|
|
2184
|
+
n = o;
|
|
2189
2185
|
});
|
|
2190
|
-
const
|
|
2186
|
+
const r = this;
|
|
2191
2187
|
this.promise.then((s) => {
|
|
2192
|
-
if (!
|
|
2193
|
-
let o =
|
|
2188
|
+
if (!r._listeners) return;
|
|
2189
|
+
let o = r._listeners.length;
|
|
2194
2190
|
for (; o-- > 0; )
|
|
2195
|
-
|
|
2196
|
-
|
|
2191
|
+
r._listeners[o](s);
|
|
2192
|
+
r._listeners = null;
|
|
2197
2193
|
}), this.promise.then = (s) => {
|
|
2198
2194
|
let o;
|
|
2199
2195
|
const i = new Promise((c) => {
|
|
2200
|
-
|
|
2196
|
+
r.subscribe(c), o = c;
|
|
2201
2197
|
}).then(s);
|
|
2202
2198
|
return i.cancel = function() {
|
|
2203
|
-
|
|
2199
|
+
r.unsubscribe(o);
|
|
2204
2200
|
}, i;
|
|
2205
2201
|
}, t(function(o, i, c) {
|
|
2206
|
-
|
|
2202
|
+
r.reason || (r.reason = new X(o, i, c), n(r.reason));
|
|
2207
2203
|
});
|
|
2208
2204
|
}
|
|
2209
2205
|
/**
|
|
@@ -2229,14 +2225,14 @@ let Mn = class It {
|
|
|
2229
2225
|
unsubscribe(t) {
|
|
2230
2226
|
if (!this._listeners)
|
|
2231
2227
|
return;
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2228
|
+
const n = this._listeners.indexOf(t);
|
|
2229
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2234
2230
|
}
|
|
2235
2231
|
toAbortSignal() {
|
|
2236
|
-
const t = new AbortController(),
|
|
2237
|
-
t.abort(
|
|
2232
|
+
const t = new AbortController(), n = (r) => {
|
|
2233
|
+
t.abort(r);
|
|
2238
2234
|
};
|
|
2239
|
-
return this.subscribe(
|
|
2235
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2240
2236
|
}
|
|
2241
2237
|
/**
|
|
2242
2238
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2252,12 +2248,12 @@ let Mn = class It {
|
|
|
2252
2248
|
};
|
|
2253
2249
|
}
|
|
2254
2250
|
};
|
|
2255
|
-
function
|
|
2256
|
-
return function(
|
|
2257
|
-
return e.apply(null,
|
|
2251
|
+
function Mr(e) {
|
|
2252
|
+
return function(n) {
|
|
2253
|
+
return e.apply(null, n);
|
|
2258
2254
|
};
|
|
2259
2255
|
}
|
|
2260
|
-
function
|
|
2256
|
+
function Hr(e) {
|
|
2261
2257
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2262
2258
|
}
|
|
2263
2259
|
const Le = {
|
|
@@ -2329,61 +2325,61 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2329
2325
|
Le[t] = e;
|
|
2330
2326
|
});
|
|
2331
2327
|
function $t(e) {
|
|
2332
|
-
const t = new J(e),
|
|
2333
|
-
return a.extend(
|
|
2328
|
+
const t = new J(e), n = Et(J.prototype.request, t);
|
|
2329
|
+
return a.extend(n, J.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2334
2330
|
return $t(W(e, s));
|
|
2335
|
-
},
|
|
2331
|
+
}, n;
|
|
2336
2332
|
}
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2333
|
+
const x = $t(ae);
|
|
2334
|
+
x.Axios = J;
|
|
2335
|
+
x.CanceledError = X;
|
|
2336
|
+
x.CancelToken = $r;
|
|
2337
|
+
x.isCancel = Ft;
|
|
2338
|
+
x.VERSION = qt;
|
|
2339
|
+
x.toFormData = ye;
|
|
2340
|
+
x.AxiosError = y;
|
|
2341
|
+
x.Cancel = x.CanceledError;
|
|
2342
|
+
x.all = function(t) {
|
|
2347
2343
|
return Promise.all(t);
|
|
2348
2344
|
};
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2345
|
+
x.spread = Mr;
|
|
2346
|
+
x.isAxiosError = Hr;
|
|
2347
|
+
x.mergeConfig = W;
|
|
2348
|
+
x.AxiosHeaders = L;
|
|
2349
|
+
x.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2350
|
+
x.getAdapter = Bt.getAdapter;
|
|
2351
|
+
x.HttpStatusCode = Le;
|
|
2352
|
+
x.default = x;
|
|
2357
2353
|
const {
|
|
2358
|
-
Axios:
|
|
2359
|
-
AxiosError:
|
|
2360
|
-
CanceledError:
|
|
2354
|
+
Axios: Qr,
|
|
2355
|
+
AxiosError: es,
|
|
2356
|
+
CanceledError: ts,
|
|
2361
2357
|
isCancel: ns,
|
|
2362
|
-
CancelToken:
|
|
2363
|
-
VERSION:
|
|
2364
|
-
all:
|
|
2365
|
-
Cancel:
|
|
2366
|
-
isAxiosError:
|
|
2367
|
-
spread:
|
|
2368
|
-
toFormData:
|
|
2369
|
-
AxiosHeaders:
|
|
2370
|
-
HttpStatusCode:
|
|
2371
|
-
formToJSON:
|
|
2372
|
-
getAdapter:
|
|
2373
|
-
mergeConfig:
|
|
2374
|
-
} =
|
|
2358
|
+
CancelToken: rs,
|
|
2359
|
+
VERSION: ss,
|
|
2360
|
+
all: os,
|
|
2361
|
+
Cancel: is,
|
|
2362
|
+
isAxiosError: as,
|
|
2363
|
+
spread: cs,
|
|
2364
|
+
toFormData: ls,
|
|
2365
|
+
AxiosHeaders: us,
|
|
2366
|
+
HttpStatusCode: fs,
|
|
2367
|
+
formToJSON: ds,
|
|
2368
|
+
getAdapter: ps,
|
|
2369
|
+
mergeConfig: hs
|
|
2370
|
+
} = x, ms = (e) => x.create({
|
|
2375
2371
|
timeout: 2 * 60 * 1e3,
|
|
2376
2372
|
...e
|
|
2377
2373
|
});
|
|
2378
2374
|
export {
|
|
2379
|
-
|
|
2375
|
+
Yr as AuthStateProvider,
|
|
2380
2376
|
de as ERequestContentType,
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2377
|
+
Zt as ERequestMethod,
|
|
2378
|
+
Xr as FetcherProvider,
|
|
2379
|
+
ms as createAxiosInstance,
|
|
2380
|
+
Wr as createGraphQLFetcher,
|
|
2381
|
+
Vr as createRestFulFetcher,
|
|
2382
|
+
Kr as getGraphQLResponseFormatError,
|
|
2383
|
+
dn as getRestFulResponseFormatError,
|
|
2384
|
+
un as useAuthState
|
|
2389
2385
|
};
|