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