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