@obb871001/api-integration-sdk 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +27 -1
- package/dist/index.js +2070 -2
- package/package.json +1 -1
- package/src/index.js +3 -0
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2071 @@
|
|
|
1
1
|
import "@tanstack/react-query";
|
|
2
|
-
import { createContext as
|
|
3
|
-
|
|
2
|
+
import At, { createContext as _t, useContext as xt, useMemo as Ct } from "react";
|
|
3
|
+
const Pt = _t(null), dn = () => {
|
|
4
|
+
const e = xt(Pt);
|
|
5
|
+
if (!e) throw new Error("useAxios must be used inside <ApiProvider>");
|
|
6
|
+
return e.client;
|
|
7
|
+
};
|
|
8
|
+
var fe = { exports: {} }, te = {};
|
|
9
|
+
/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
var Le;
|
|
19
|
+
function Nt() {
|
|
20
|
+
if (Le) return te;
|
|
21
|
+
Le = 1;
|
|
22
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
23
|
+
function r(n, s, i) {
|
|
24
|
+
var o = null;
|
|
25
|
+
if (i !== void 0 && (o = "" + i), s.key !== void 0 && (o = "" + s.key), "key" in s) {
|
|
26
|
+
i = {};
|
|
27
|
+
for (var c in s)
|
|
28
|
+
c !== "key" && (i[c] = s[c]);
|
|
29
|
+
} else i = s;
|
|
30
|
+
return s = i.ref, {
|
|
31
|
+
$$typeof: e,
|
|
32
|
+
type: n,
|
|
33
|
+
key: o,
|
|
34
|
+
ref: s !== void 0 ? s : null,
|
|
35
|
+
props: i
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return te.Fragment = t, te.jsx = r, te.jsxs = r, te;
|
|
39
|
+
}
|
|
40
|
+
var re = {};
|
|
41
|
+
/**
|
|
42
|
+
* @license React
|
|
43
|
+
* react-jsx-runtime.development.js
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/
|
|
50
|
+
var De;
|
|
51
|
+
function kt() {
|
|
52
|
+
return De || (De = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
53
|
+
function e(l) {
|
|
54
|
+
if (l == null) return null;
|
|
55
|
+
if (typeof l == "function")
|
|
56
|
+
return l.$$typeof === le ? null : l.displayName || l.name || null;
|
|
57
|
+
if (typeof l == "string") return l;
|
|
58
|
+
switch (l) {
|
|
59
|
+
case h:
|
|
60
|
+
return "Fragment";
|
|
61
|
+
case P:
|
|
62
|
+
return "Profiler";
|
|
63
|
+
case T:
|
|
64
|
+
return "StrictMode";
|
|
65
|
+
case v:
|
|
66
|
+
return "Suspense";
|
|
67
|
+
case N:
|
|
68
|
+
return "SuspenseList";
|
|
69
|
+
case ce:
|
|
70
|
+
return "Activity";
|
|
71
|
+
}
|
|
72
|
+
if (typeof l == "object")
|
|
73
|
+
switch (typeof l.tag == "number" && console.error(
|
|
74
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
75
|
+
), l.$$typeof) {
|
|
76
|
+
case b:
|
|
77
|
+
return "Portal";
|
|
78
|
+
case x:
|
|
79
|
+
return l.displayName || "Context";
|
|
80
|
+
case A:
|
|
81
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
82
|
+
case j:
|
|
83
|
+
var y = l.render;
|
|
84
|
+
return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
85
|
+
case Z:
|
|
86
|
+
return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
|
|
87
|
+
case I:
|
|
88
|
+
y = l._payload, l = l._init;
|
|
89
|
+
try {
|
|
90
|
+
return e(l(y));
|
|
91
|
+
} catch {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
function t(l) {
|
|
97
|
+
return "" + l;
|
|
98
|
+
}
|
|
99
|
+
function r(l) {
|
|
100
|
+
try {
|
|
101
|
+
t(l);
|
|
102
|
+
var y = !1;
|
|
103
|
+
} catch {
|
|
104
|
+
y = !0;
|
|
105
|
+
}
|
|
106
|
+
if (y) {
|
|
107
|
+
y = console;
|
|
108
|
+
var R = y.error, S = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
109
|
+
return R.call(
|
|
110
|
+
y,
|
|
111
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
112
|
+
S
|
|
113
|
+
), t(l);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function n(l) {
|
|
117
|
+
if (l === h) return "<>";
|
|
118
|
+
if (typeof l == "object" && l !== null && l.$$typeof === I)
|
|
119
|
+
return "<...>";
|
|
120
|
+
try {
|
|
121
|
+
var y = e(l);
|
|
122
|
+
return y ? "<" + y + ">" : "<...>";
|
|
123
|
+
} catch {
|
|
124
|
+
return "<...>";
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function s() {
|
|
128
|
+
var l = M.A;
|
|
129
|
+
return l === null ? null : l.getOwner();
|
|
130
|
+
}
|
|
131
|
+
function i() {
|
|
132
|
+
return Error("react-stack-top-frame");
|
|
133
|
+
}
|
|
134
|
+
function o(l) {
|
|
135
|
+
if ($.call(l, "key")) {
|
|
136
|
+
var y = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
137
|
+
if (y && y.isReactWarning) return !1;
|
|
138
|
+
}
|
|
139
|
+
return l.key !== void 0;
|
|
140
|
+
}
|
|
141
|
+
function c(l, y) {
|
|
142
|
+
function R() {
|
|
143
|
+
U || (U = !0, console.error(
|
|
144
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
145
|
+
y
|
|
146
|
+
));
|
|
147
|
+
}
|
|
148
|
+
R.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
149
|
+
get: R,
|
|
150
|
+
configurable: !0
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
function p() {
|
|
154
|
+
var l = e(this.type);
|
|
155
|
+
return Q[l] || (Q[l] = !0, console.error(
|
|
156
|
+
"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."
|
|
157
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
158
|
+
}
|
|
159
|
+
function f(l, y, R, S, H, ge) {
|
|
160
|
+
var _ = R.ref;
|
|
161
|
+
return l = {
|
|
162
|
+
$$typeof: d,
|
|
163
|
+
type: l,
|
|
164
|
+
key: y,
|
|
165
|
+
props: R,
|
|
166
|
+
_owner: S
|
|
167
|
+
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(l, "ref", {
|
|
168
|
+
enumerable: !1,
|
|
169
|
+
get: p
|
|
170
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
171
|
+
configurable: !1,
|
|
172
|
+
enumerable: !1,
|
|
173
|
+
writable: !0,
|
|
174
|
+
value: 0
|
|
175
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
176
|
+
configurable: !1,
|
|
177
|
+
enumerable: !1,
|
|
178
|
+
writable: !0,
|
|
179
|
+
value: null
|
|
180
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
181
|
+
configurable: !1,
|
|
182
|
+
enumerable: !1,
|
|
183
|
+
writable: !0,
|
|
184
|
+
value: H
|
|
185
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
186
|
+
configurable: !1,
|
|
187
|
+
enumerable: !1,
|
|
188
|
+
writable: !0,
|
|
189
|
+
value: ge
|
|
190
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
191
|
+
}
|
|
192
|
+
function u(l, y, R, S, H, ge) {
|
|
193
|
+
var _ = y.children;
|
|
194
|
+
if (_ !== void 0)
|
|
195
|
+
if (S)
|
|
196
|
+
if (q(_)) {
|
|
197
|
+
for (S = 0; S < _.length; S++)
|
|
198
|
+
m(_[S]);
|
|
199
|
+
Object.freeze && Object.freeze(_);
|
|
200
|
+
} else
|
|
201
|
+
console.error(
|
|
202
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
203
|
+
);
|
|
204
|
+
else m(_);
|
|
205
|
+
if ($.call(y, "key")) {
|
|
206
|
+
_ = e(l);
|
|
207
|
+
var Y = Object.keys(y).filter(function(Ot) {
|
|
208
|
+
return Ot !== "key";
|
|
209
|
+
});
|
|
210
|
+
S = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", ue[_ + S] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
211
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
212
|
+
let props = %s;
|
|
213
|
+
<%s {...props} />
|
|
214
|
+
React keys must be passed directly to JSX without using spread:
|
|
215
|
+
let props = %s;
|
|
216
|
+
<%s key={someKey} {...props} />`,
|
|
217
|
+
S,
|
|
218
|
+
_,
|
|
219
|
+
Y,
|
|
220
|
+
_
|
|
221
|
+
), ue[_ + S] = !0);
|
|
222
|
+
}
|
|
223
|
+
if (_ = null, R !== void 0 && (r(R), _ = "" + R), o(y) && (r(y.key), _ = "" + y.key), "key" in y) {
|
|
224
|
+
R = {};
|
|
225
|
+
for (var Te in y)
|
|
226
|
+
Te !== "key" && (R[Te] = y[Te]);
|
|
227
|
+
} else R = y;
|
|
228
|
+
return _ && c(
|
|
229
|
+
R,
|
|
230
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
231
|
+
), f(
|
|
232
|
+
l,
|
|
233
|
+
_,
|
|
234
|
+
R,
|
|
235
|
+
s(),
|
|
236
|
+
H,
|
|
237
|
+
ge
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
function m(l) {
|
|
241
|
+
w(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === I && (l._payload.status === "fulfilled" ? w(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
242
|
+
}
|
|
243
|
+
function w(l) {
|
|
244
|
+
return typeof l == "object" && l !== null && l.$$typeof === d;
|
|
245
|
+
}
|
|
246
|
+
var g = At, d = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), x = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), ce = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), M = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, q = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
247
|
+
return null;
|
|
248
|
+
};
|
|
249
|
+
g = {
|
|
250
|
+
react_stack_bottom_frame: function(l) {
|
|
251
|
+
return l();
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
var U, Q = {}, L = g.react_stack_bottom_frame.bind(
|
|
255
|
+
g,
|
|
256
|
+
i
|
|
257
|
+
)(), ee = W(n(i)), ue = {};
|
|
258
|
+
re.Fragment = h, re.jsx = function(l, y, R) {
|
|
259
|
+
var S = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
260
|
+
return u(
|
|
261
|
+
l,
|
|
262
|
+
y,
|
|
263
|
+
R,
|
|
264
|
+
!1,
|
|
265
|
+
S ? Error("react-stack-top-frame") : L,
|
|
266
|
+
S ? W(n(l)) : ee
|
|
267
|
+
);
|
|
268
|
+
}, re.jsxs = function(l, y, R) {
|
|
269
|
+
var S = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
270
|
+
return u(
|
|
271
|
+
l,
|
|
272
|
+
y,
|
|
273
|
+
R,
|
|
274
|
+
!0,
|
|
275
|
+
S ? Error("react-stack-top-frame") : L,
|
|
276
|
+
S ? W(n(l)) : ee
|
|
277
|
+
);
|
|
278
|
+
};
|
|
279
|
+
})()), re;
|
|
280
|
+
}
|
|
281
|
+
var Be;
|
|
282
|
+
function Ft() {
|
|
283
|
+
return Be || (Be = 1, process.env.NODE_ENV === "production" ? fe.exports = Nt() : fe.exports = kt()), fe.exports;
|
|
284
|
+
}
|
|
285
|
+
var jt = Ft();
|
|
286
|
+
function et(e, t) {
|
|
287
|
+
return function() {
|
|
288
|
+
return e.apply(t, arguments);
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
const { toString: Ut } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: ye, toStringTag: tt } = Symbol, Ee = /* @__PURE__ */ ((e) => (t) => {
|
|
292
|
+
const r = Ut.call(t);
|
|
293
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
294
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Ee(t) === e), we = (e) => (t) => typeof t === e, { isArray: X } = Array, K = we("undefined");
|
|
295
|
+
function se(e) {
|
|
296
|
+
return e !== null && !K(e) && e.constructor !== null && !K(e.constructor) && k(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
297
|
+
}
|
|
298
|
+
const rt = D("ArrayBuffer");
|
|
299
|
+
function Lt(e) {
|
|
300
|
+
let t;
|
|
301
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && rt(e.buffer), t;
|
|
302
|
+
}
|
|
303
|
+
const Dt = we("string"), k = we("function"), nt = we("number"), oe = (e) => e !== null && typeof e == "object", Bt = (e) => e === !0 || e === !1, pe = (e) => {
|
|
304
|
+
if (Ee(e) !== "object")
|
|
305
|
+
return !1;
|
|
306
|
+
const t = Fe(e);
|
|
307
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(ye in e);
|
|
308
|
+
}, vt = (e) => {
|
|
309
|
+
if (!oe(e) || se(e))
|
|
310
|
+
return !1;
|
|
311
|
+
try {
|
|
312
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
313
|
+
} catch {
|
|
314
|
+
return !1;
|
|
315
|
+
}
|
|
316
|
+
}, qt = D("Date"), It = D("File"), Mt = D("Blob"), $t = D("FileList"), Ht = (e) => oe(e) && k(e.pipe), zt = (e) => {
|
|
317
|
+
let t;
|
|
318
|
+
return e && (typeof FormData == "function" && e instanceof FormData || k(e.append) && ((t = Ee(e)) === "formdata" || // detect form-data instance
|
|
319
|
+
t === "object" && k(e.toString) && e.toString() === "[object FormData]"));
|
|
320
|
+
}, Jt = D("URLSearchParams"), [Vt, Wt, Yt, Kt] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
321
|
+
function ie(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
322
|
+
if (e === null || typeof e > "u")
|
|
323
|
+
return;
|
|
324
|
+
let n, s;
|
|
325
|
+
if (typeof e != "object" && (e = [e]), X(e))
|
|
326
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
327
|
+
t.call(null, e[n], n, e);
|
|
328
|
+
else {
|
|
329
|
+
if (se(e))
|
|
330
|
+
return;
|
|
331
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
332
|
+
let c;
|
|
333
|
+
for (n = 0; n < o; n++)
|
|
334
|
+
c = i[n], t.call(null, e[c], c, e);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function st(e, t) {
|
|
338
|
+
if (se(e))
|
|
339
|
+
return null;
|
|
340
|
+
t = t.toLowerCase();
|
|
341
|
+
const r = Object.keys(e);
|
|
342
|
+
let n = r.length, s;
|
|
343
|
+
for (; n-- > 0; )
|
|
344
|
+
if (s = r[n], t === s.toLowerCase())
|
|
345
|
+
return s;
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !K(e) && e !== z;
|
|
349
|
+
function xe() {
|
|
350
|
+
const { caseless: e, skipUndefined: t } = ot(this) && this || {}, r = {}, n = (s, i) => {
|
|
351
|
+
const o = e && st(r, i) || i;
|
|
352
|
+
pe(r[o]) && pe(s) ? r[o] = xe(r[o], s) : pe(s) ? r[o] = xe({}, s) : X(s) ? r[o] = s.slice() : (!t || !K(s)) && (r[o] = s);
|
|
353
|
+
};
|
|
354
|
+
for (let s = 0, i = arguments.length; s < i; s++)
|
|
355
|
+
arguments[s] && ie(arguments[s], n);
|
|
356
|
+
return r;
|
|
357
|
+
}
|
|
358
|
+
const Gt = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, i) => {
|
|
359
|
+
r && k(s) ? e[i] = et(s, r) : e[i] = s;
|
|
360
|
+
}, { allOwnKeys: n }), e), Zt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Qt = (e, t, r, n) => {
|
|
361
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
362
|
+
value: t.prototype
|
|
363
|
+
}), r && Object.assign(e.prototype, r);
|
|
364
|
+
}, er = (e, t, r, n) => {
|
|
365
|
+
let s, i, o;
|
|
366
|
+
const c = {};
|
|
367
|
+
if (t = t || {}, e == null) return t;
|
|
368
|
+
do {
|
|
369
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
370
|
+
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
371
|
+
e = r !== !1 && Fe(e);
|
|
372
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
373
|
+
return t;
|
|
374
|
+
}, tr = (e, t, r) => {
|
|
375
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
376
|
+
const n = e.indexOf(t, r);
|
|
377
|
+
return n !== -1 && n === r;
|
|
378
|
+
}, rr = (e) => {
|
|
379
|
+
if (!e) return null;
|
|
380
|
+
if (X(e)) return e;
|
|
381
|
+
let t = e.length;
|
|
382
|
+
if (!nt(t)) return null;
|
|
383
|
+
const r = new Array(t);
|
|
384
|
+
for (; t-- > 0; )
|
|
385
|
+
r[t] = e[t];
|
|
386
|
+
return r;
|
|
387
|
+
}, nr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Fe(Uint8Array)), sr = (e, t) => {
|
|
388
|
+
const n = (e && e[ye]).call(e);
|
|
389
|
+
let s;
|
|
390
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
391
|
+
const i = s.value;
|
|
392
|
+
t.call(e, i[0], i[1]);
|
|
393
|
+
}
|
|
394
|
+
}, or = (e, t) => {
|
|
395
|
+
let r;
|
|
396
|
+
const n = [];
|
|
397
|
+
for (; (r = e.exec(t)) !== null; )
|
|
398
|
+
n.push(r);
|
|
399
|
+
return n;
|
|
400
|
+
}, ir = D("HTMLFormElement"), ar = (e) => e.toLowerCase().replace(
|
|
401
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
402
|
+
function(r, n, s) {
|
|
403
|
+
return n.toUpperCase() + s;
|
|
404
|
+
}
|
|
405
|
+
), ve = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), cr = D("RegExp"), it = (e, t) => {
|
|
406
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
407
|
+
ie(r, (s, i) => {
|
|
408
|
+
let o;
|
|
409
|
+
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
410
|
+
}), Object.defineProperties(e, n);
|
|
411
|
+
}, lr = (e) => {
|
|
412
|
+
it(e, (t, r) => {
|
|
413
|
+
if (k(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
414
|
+
return !1;
|
|
415
|
+
const n = e[r];
|
|
416
|
+
if (k(n)) {
|
|
417
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
418
|
+
t.writable = !1;
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
t.set || (t.set = () => {
|
|
422
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}, ur = (e, t) => {
|
|
427
|
+
const r = {}, n = (s) => {
|
|
428
|
+
s.forEach((i) => {
|
|
429
|
+
r[i] = !0;
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
return X(e) ? n(e) : n(String(e).split(t)), r;
|
|
433
|
+
}, fr = () => {
|
|
434
|
+
}, dr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
435
|
+
function pr(e) {
|
|
436
|
+
return !!(e && k(e.append) && e[tt] === "FormData" && e[ye]);
|
|
437
|
+
}
|
|
438
|
+
const hr = (e) => {
|
|
439
|
+
const t = new Array(10), r = (n, s) => {
|
|
440
|
+
if (oe(n)) {
|
|
441
|
+
if (t.indexOf(n) >= 0)
|
|
442
|
+
return;
|
|
443
|
+
if (se(n))
|
|
444
|
+
return n;
|
|
445
|
+
if (!("toJSON" in n)) {
|
|
446
|
+
t[s] = n;
|
|
447
|
+
const i = X(n) ? [] : {};
|
|
448
|
+
return ie(n, (o, c) => {
|
|
449
|
+
const p = r(o, s + 1);
|
|
450
|
+
!K(p) && (i[c] = p);
|
|
451
|
+
}), t[s] = void 0, i;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return n;
|
|
455
|
+
};
|
|
456
|
+
return r(e, 0);
|
|
457
|
+
}, mr = D("AsyncFunction"), br = (e) => e && (oe(e) || k(e)) && k(e.then) && k(e.catch), at = ((e, t) => e ? setImmediate : t ? ((r, n) => (z.addEventListener("message", ({ source: s, data: i }) => {
|
|
458
|
+
s === z && i === r && n.length && n.shift()();
|
|
459
|
+
}, !1), (s) => {
|
|
460
|
+
n.push(s), z.postMessage(r, "*");
|
|
461
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
462
|
+
typeof setImmediate == "function",
|
|
463
|
+
k(z.postMessage)
|
|
464
|
+
), yr = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || at, Er = (e) => e != null && k(e[ye]), a = {
|
|
465
|
+
isArray: X,
|
|
466
|
+
isArrayBuffer: rt,
|
|
467
|
+
isBuffer: se,
|
|
468
|
+
isFormData: zt,
|
|
469
|
+
isArrayBufferView: Lt,
|
|
470
|
+
isString: Dt,
|
|
471
|
+
isNumber: nt,
|
|
472
|
+
isBoolean: Bt,
|
|
473
|
+
isObject: oe,
|
|
474
|
+
isPlainObject: pe,
|
|
475
|
+
isEmptyObject: vt,
|
|
476
|
+
isReadableStream: Vt,
|
|
477
|
+
isRequest: Wt,
|
|
478
|
+
isResponse: Yt,
|
|
479
|
+
isHeaders: Kt,
|
|
480
|
+
isUndefined: K,
|
|
481
|
+
isDate: qt,
|
|
482
|
+
isFile: It,
|
|
483
|
+
isBlob: Mt,
|
|
484
|
+
isRegExp: cr,
|
|
485
|
+
isFunction: k,
|
|
486
|
+
isStream: Ht,
|
|
487
|
+
isURLSearchParams: Jt,
|
|
488
|
+
isTypedArray: nr,
|
|
489
|
+
isFileList: $t,
|
|
490
|
+
forEach: ie,
|
|
491
|
+
merge: xe,
|
|
492
|
+
extend: Gt,
|
|
493
|
+
trim: Xt,
|
|
494
|
+
stripBOM: Zt,
|
|
495
|
+
inherits: Qt,
|
|
496
|
+
toFlatObject: er,
|
|
497
|
+
kindOf: Ee,
|
|
498
|
+
kindOfTest: D,
|
|
499
|
+
endsWith: tr,
|
|
500
|
+
toArray: rr,
|
|
501
|
+
forEachEntry: sr,
|
|
502
|
+
matchAll: or,
|
|
503
|
+
isHTMLForm: ir,
|
|
504
|
+
hasOwnProperty: ve,
|
|
505
|
+
hasOwnProp: ve,
|
|
506
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
507
|
+
reduceDescriptors: it,
|
|
508
|
+
freezeMethods: lr,
|
|
509
|
+
toObjectSet: ur,
|
|
510
|
+
toCamelCase: ar,
|
|
511
|
+
noop: fr,
|
|
512
|
+
toFiniteNumber: dr,
|
|
513
|
+
findKey: st,
|
|
514
|
+
global: z,
|
|
515
|
+
isContextDefined: ot,
|
|
516
|
+
isSpecCompliantForm: pr,
|
|
517
|
+
toJSONObject: hr,
|
|
518
|
+
isAsyncFn: mr,
|
|
519
|
+
isThenable: br,
|
|
520
|
+
setImmediate: at,
|
|
521
|
+
asap: yr,
|
|
522
|
+
isIterable: Er
|
|
523
|
+
};
|
|
524
|
+
function E(e, t, r, n, s) {
|
|
525
|
+
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);
|
|
526
|
+
}
|
|
527
|
+
a.inherits(E, Error, {
|
|
528
|
+
toJSON: function() {
|
|
529
|
+
return {
|
|
530
|
+
// Standard
|
|
531
|
+
message: this.message,
|
|
532
|
+
name: this.name,
|
|
533
|
+
// Microsoft
|
|
534
|
+
description: this.description,
|
|
535
|
+
number: this.number,
|
|
536
|
+
// Mozilla
|
|
537
|
+
fileName: this.fileName,
|
|
538
|
+
lineNumber: this.lineNumber,
|
|
539
|
+
columnNumber: this.columnNumber,
|
|
540
|
+
stack: this.stack,
|
|
541
|
+
// Axios
|
|
542
|
+
config: a.toJSONObject(this.config),
|
|
543
|
+
code: this.code,
|
|
544
|
+
status: this.status
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
const ct = E.prototype, lt = {};
|
|
549
|
+
[
|
|
550
|
+
"ERR_BAD_OPTION_VALUE",
|
|
551
|
+
"ERR_BAD_OPTION",
|
|
552
|
+
"ECONNABORTED",
|
|
553
|
+
"ETIMEDOUT",
|
|
554
|
+
"ERR_NETWORK",
|
|
555
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
556
|
+
"ERR_DEPRECATED",
|
|
557
|
+
"ERR_BAD_RESPONSE",
|
|
558
|
+
"ERR_BAD_REQUEST",
|
|
559
|
+
"ERR_CANCELED",
|
|
560
|
+
"ERR_NOT_SUPPORT",
|
|
561
|
+
"ERR_INVALID_URL"
|
|
562
|
+
// eslint-disable-next-line func-names
|
|
563
|
+
].forEach((e) => {
|
|
564
|
+
lt[e] = { value: e };
|
|
565
|
+
});
|
|
566
|
+
Object.defineProperties(E, lt);
|
|
567
|
+
Object.defineProperty(ct, "isAxiosError", { value: !0 });
|
|
568
|
+
E.from = (e, t, r, n, s, i) => {
|
|
569
|
+
const o = Object.create(ct);
|
|
570
|
+
a.toFlatObject(e, o, function(u) {
|
|
571
|
+
return u !== Error.prototype;
|
|
572
|
+
}, (f) => f !== "isAxiosError");
|
|
573
|
+
const c = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
|
|
574
|
+
return E.call(o, c, p, r, n, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
|
|
575
|
+
};
|
|
576
|
+
const wr = null;
|
|
577
|
+
function Ce(e) {
|
|
578
|
+
return a.isPlainObject(e) || a.isArray(e);
|
|
579
|
+
}
|
|
580
|
+
function ut(e) {
|
|
581
|
+
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
582
|
+
}
|
|
583
|
+
function qe(e, t, r) {
|
|
584
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
585
|
+
return s = ut(s), !r && i ? "[" + s + "]" : s;
|
|
586
|
+
}).join(r ? "." : "") : t;
|
|
587
|
+
}
|
|
588
|
+
function Rr(e) {
|
|
589
|
+
return a.isArray(e) && !e.some(Ce);
|
|
590
|
+
}
|
|
591
|
+
const Sr = a.toFlatObject(a, {}, null, function(t) {
|
|
592
|
+
return /^is[A-Z]/.test(t);
|
|
593
|
+
});
|
|
594
|
+
function Re(e, t, r) {
|
|
595
|
+
if (!a.isObject(e))
|
|
596
|
+
throw new TypeError("target must be an object");
|
|
597
|
+
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
598
|
+
metaTokens: !0,
|
|
599
|
+
dots: !1,
|
|
600
|
+
indexes: !1
|
|
601
|
+
}, !1, function(b, h) {
|
|
602
|
+
return !a.isUndefined(h[b]);
|
|
603
|
+
});
|
|
604
|
+
const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, p = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
605
|
+
if (!a.isFunction(s))
|
|
606
|
+
throw new TypeError("visitor must be a function");
|
|
607
|
+
function f(d) {
|
|
608
|
+
if (d === null) return "";
|
|
609
|
+
if (a.isDate(d))
|
|
610
|
+
return d.toISOString();
|
|
611
|
+
if (a.isBoolean(d))
|
|
612
|
+
return d.toString();
|
|
613
|
+
if (!p && a.isBlob(d))
|
|
614
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
615
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? p && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
616
|
+
}
|
|
617
|
+
function u(d, b, h) {
|
|
618
|
+
let T = d;
|
|
619
|
+
if (d && !h && typeof d == "object") {
|
|
620
|
+
if (a.endsWith(b, "{}"))
|
|
621
|
+
b = n ? b : b.slice(0, -2), d = JSON.stringify(d);
|
|
622
|
+
else if (a.isArray(d) && Rr(d) || (a.isFileList(d) || a.endsWith(b, "[]")) && (T = a.toArray(d)))
|
|
623
|
+
return b = ut(b), T.forEach(function(A, x) {
|
|
624
|
+
!(a.isUndefined(A) || A === null) && t.append(
|
|
625
|
+
// eslint-disable-next-line no-nested-ternary
|
|
626
|
+
o === !0 ? qe([b], x, i) : o === null ? b : b + "[]",
|
|
627
|
+
f(A)
|
|
628
|
+
);
|
|
629
|
+
}), !1;
|
|
630
|
+
}
|
|
631
|
+
return Ce(d) ? !0 : (t.append(qe(h, b, i), f(d)), !1);
|
|
632
|
+
}
|
|
633
|
+
const m = [], w = Object.assign(Sr, {
|
|
634
|
+
defaultVisitor: u,
|
|
635
|
+
convertValue: f,
|
|
636
|
+
isVisitable: Ce
|
|
637
|
+
});
|
|
638
|
+
function g(d, b) {
|
|
639
|
+
if (!a.isUndefined(d)) {
|
|
640
|
+
if (m.indexOf(d) !== -1)
|
|
641
|
+
throw Error("Circular reference detected in " + b.join("."));
|
|
642
|
+
m.push(d), a.forEach(d, function(T, P) {
|
|
643
|
+
(!(a.isUndefined(T) || T === null) && s.call(
|
|
644
|
+
t,
|
|
645
|
+
T,
|
|
646
|
+
a.isString(P) ? P.trim() : P,
|
|
647
|
+
b,
|
|
648
|
+
w
|
|
649
|
+
)) === !0 && g(T, b ? b.concat(P) : [P]);
|
|
650
|
+
}), m.pop();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
if (!a.isObject(e))
|
|
654
|
+
throw new TypeError("data must be an object");
|
|
655
|
+
return g(e), t;
|
|
656
|
+
}
|
|
657
|
+
function Ie(e) {
|
|
658
|
+
const t = {
|
|
659
|
+
"!": "%21",
|
|
660
|
+
"'": "%27",
|
|
661
|
+
"(": "%28",
|
|
662
|
+
")": "%29",
|
|
663
|
+
"~": "%7E",
|
|
664
|
+
"%20": "+",
|
|
665
|
+
"%00": "\0"
|
|
666
|
+
};
|
|
667
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
668
|
+
return t[n];
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
function je(e, t) {
|
|
672
|
+
this._pairs = [], e && Re(e, this, t);
|
|
673
|
+
}
|
|
674
|
+
const ft = je.prototype;
|
|
675
|
+
ft.append = function(t, r) {
|
|
676
|
+
this._pairs.push([t, r]);
|
|
677
|
+
};
|
|
678
|
+
ft.toString = function(t) {
|
|
679
|
+
const r = t ? function(n) {
|
|
680
|
+
return t.call(this, n, Ie);
|
|
681
|
+
} : Ie;
|
|
682
|
+
return this._pairs.map(function(s) {
|
|
683
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
684
|
+
}, "").join("&");
|
|
685
|
+
};
|
|
686
|
+
function gr(e) {
|
|
687
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
688
|
+
}
|
|
689
|
+
function dt(e, t, r) {
|
|
690
|
+
if (!t)
|
|
691
|
+
return e;
|
|
692
|
+
const n = r && r.encode || gr;
|
|
693
|
+
a.isFunction(r) && (r = {
|
|
694
|
+
serialize: r
|
|
695
|
+
});
|
|
696
|
+
const s = r && r.serialize;
|
|
697
|
+
let i;
|
|
698
|
+
if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new je(t, r).toString(n), i) {
|
|
699
|
+
const o = e.indexOf("#");
|
|
700
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
701
|
+
}
|
|
702
|
+
return e;
|
|
703
|
+
}
|
|
704
|
+
class Me {
|
|
705
|
+
constructor() {
|
|
706
|
+
this.handlers = [];
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Add a new interceptor to the stack
|
|
710
|
+
*
|
|
711
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
712
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
713
|
+
*
|
|
714
|
+
* @return {Number} An ID used to remove interceptor later
|
|
715
|
+
*/
|
|
716
|
+
use(t, r, n) {
|
|
717
|
+
return this.handlers.push({
|
|
718
|
+
fulfilled: t,
|
|
719
|
+
rejected: r,
|
|
720
|
+
synchronous: n ? n.synchronous : !1,
|
|
721
|
+
runWhen: n ? n.runWhen : null
|
|
722
|
+
}), this.handlers.length - 1;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Remove an interceptor from the stack
|
|
726
|
+
*
|
|
727
|
+
* @param {Number} id The ID that was returned by `use`
|
|
728
|
+
*
|
|
729
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
730
|
+
*/
|
|
731
|
+
eject(t) {
|
|
732
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Clear all interceptors from the stack
|
|
736
|
+
*
|
|
737
|
+
* @returns {void}
|
|
738
|
+
*/
|
|
739
|
+
clear() {
|
|
740
|
+
this.handlers && (this.handlers = []);
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Iterate over all the registered interceptors
|
|
744
|
+
*
|
|
745
|
+
* This method is particularly useful for skipping over any
|
|
746
|
+
* interceptors that may have become `null` calling `eject`.
|
|
747
|
+
*
|
|
748
|
+
* @param {Function} fn The function to call for each interceptor
|
|
749
|
+
*
|
|
750
|
+
* @returns {void}
|
|
751
|
+
*/
|
|
752
|
+
forEach(t) {
|
|
753
|
+
a.forEach(this.handlers, function(n) {
|
|
754
|
+
n !== null && t(n);
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
const pt = {
|
|
759
|
+
silentJSONParsing: !0,
|
|
760
|
+
forcedJSONParsing: !0,
|
|
761
|
+
clarifyTimeoutError: !1
|
|
762
|
+
}, Tr = typeof URLSearchParams < "u" ? URLSearchParams : je, Or = typeof FormData < "u" ? FormData : null, Ar = typeof Blob < "u" ? Blob : null, _r = {
|
|
763
|
+
isBrowser: !0,
|
|
764
|
+
classes: {
|
|
765
|
+
URLSearchParams: Tr,
|
|
766
|
+
FormData: Or,
|
|
767
|
+
Blob: Ar
|
|
768
|
+
},
|
|
769
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
770
|
+
}, Ue = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, xr = Ue && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), Cr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
771
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Pr = Ue && window.location.href || "http://localhost", Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
772
|
+
__proto__: null,
|
|
773
|
+
hasBrowserEnv: Ue,
|
|
774
|
+
hasStandardBrowserEnv: xr,
|
|
775
|
+
hasStandardBrowserWebWorkerEnv: Cr,
|
|
776
|
+
navigator: Pe,
|
|
777
|
+
origin: Pr
|
|
778
|
+
}, Symbol.toStringTag, { value: "Module" })), C = {
|
|
779
|
+
...Nr,
|
|
780
|
+
..._r
|
|
781
|
+
};
|
|
782
|
+
function kr(e, t) {
|
|
783
|
+
return Re(e, new C.classes.URLSearchParams(), {
|
|
784
|
+
visitor: function(r, n, s, i) {
|
|
785
|
+
return C.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
786
|
+
},
|
|
787
|
+
...t
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
function Fr(e) {
|
|
791
|
+
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
792
|
+
}
|
|
793
|
+
function jr(e) {
|
|
794
|
+
const t = {}, r = Object.keys(e);
|
|
795
|
+
let n;
|
|
796
|
+
const s = r.length;
|
|
797
|
+
let i;
|
|
798
|
+
for (n = 0; n < s; n++)
|
|
799
|
+
i = r[n], t[i] = e[i];
|
|
800
|
+
return t;
|
|
801
|
+
}
|
|
802
|
+
function ht(e) {
|
|
803
|
+
function t(r, n, s, i) {
|
|
804
|
+
let o = r[i++];
|
|
805
|
+
if (o === "__proto__") return !0;
|
|
806
|
+
const c = Number.isFinite(+o), p = i >= r.length;
|
|
807
|
+
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = jr(s[o])), !c);
|
|
808
|
+
}
|
|
809
|
+
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
810
|
+
const r = {};
|
|
811
|
+
return a.forEachEntry(e, (n, s) => {
|
|
812
|
+
t(Fr(n), s, r, 0);
|
|
813
|
+
}), r;
|
|
814
|
+
}
|
|
815
|
+
return null;
|
|
816
|
+
}
|
|
817
|
+
function Ur(e, t, r) {
|
|
818
|
+
if (a.isString(e))
|
|
819
|
+
try {
|
|
820
|
+
return (t || JSON.parse)(e), a.trim(e);
|
|
821
|
+
} catch (n) {
|
|
822
|
+
if (n.name !== "SyntaxError")
|
|
823
|
+
throw n;
|
|
824
|
+
}
|
|
825
|
+
return (r || JSON.stringify)(e);
|
|
826
|
+
}
|
|
827
|
+
const ae = {
|
|
828
|
+
transitional: pt,
|
|
829
|
+
adapter: ["xhr", "http", "fetch"],
|
|
830
|
+
transformRequest: [function(t, r) {
|
|
831
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(t);
|
|
832
|
+
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
833
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
834
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
835
|
+
return t;
|
|
836
|
+
if (a.isArrayBufferView(t))
|
|
837
|
+
return t.buffer;
|
|
838
|
+
if (a.isURLSearchParams(t))
|
|
839
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
840
|
+
let c;
|
|
841
|
+
if (i) {
|
|
842
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
843
|
+
return kr(t, this.formSerializer).toString();
|
|
844
|
+
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
845
|
+
const p = this.env && this.env.FormData;
|
|
846
|
+
return Re(
|
|
847
|
+
c ? { "files[]": t } : t,
|
|
848
|
+
p && new p(),
|
|
849
|
+
this.formSerializer
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
return i || s ? (r.setContentType("application/json", !1), Ur(t)) : t;
|
|
854
|
+
}],
|
|
855
|
+
transformResponse: [function(t) {
|
|
856
|
+
const r = this.transitional || ae.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
857
|
+
if (a.isResponse(t) || a.isReadableStream(t))
|
|
858
|
+
return t;
|
|
859
|
+
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
860
|
+
const o = !(r && r.silentJSONParsing) && s;
|
|
861
|
+
try {
|
|
862
|
+
return JSON.parse(t, this.parseReviver);
|
|
863
|
+
} catch (c) {
|
|
864
|
+
if (o)
|
|
865
|
+
throw c.name === "SyntaxError" ? E.from(c, E.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return t;
|
|
869
|
+
}],
|
|
870
|
+
/**
|
|
871
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
872
|
+
* timeout is not created.
|
|
873
|
+
*/
|
|
874
|
+
timeout: 0,
|
|
875
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
876
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
877
|
+
maxContentLength: -1,
|
|
878
|
+
maxBodyLength: -1,
|
|
879
|
+
env: {
|
|
880
|
+
FormData: C.classes.FormData,
|
|
881
|
+
Blob: C.classes.Blob
|
|
882
|
+
},
|
|
883
|
+
validateStatus: function(t) {
|
|
884
|
+
return t >= 200 && t < 300;
|
|
885
|
+
},
|
|
886
|
+
headers: {
|
|
887
|
+
common: {
|
|
888
|
+
Accept: "application/json, text/plain, */*",
|
|
889
|
+
"Content-Type": void 0
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
894
|
+
ae.headers[e] = {};
|
|
895
|
+
});
|
|
896
|
+
const Lr = a.toObjectSet([
|
|
897
|
+
"age",
|
|
898
|
+
"authorization",
|
|
899
|
+
"content-length",
|
|
900
|
+
"content-type",
|
|
901
|
+
"etag",
|
|
902
|
+
"expires",
|
|
903
|
+
"from",
|
|
904
|
+
"host",
|
|
905
|
+
"if-modified-since",
|
|
906
|
+
"if-unmodified-since",
|
|
907
|
+
"last-modified",
|
|
908
|
+
"location",
|
|
909
|
+
"max-forwards",
|
|
910
|
+
"proxy-authorization",
|
|
911
|
+
"referer",
|
|
912
|
+
"retry-after",
|
|
913
|
+
"user-agent"
|
|
914
|
+
]), Dr = (e) => {
|
|
915
|
+
const t = {};
|
|
916
|
+
let r, n, s;
|
|
917
|
+
return e && e.split(`
|
|
918
|
+
`).forEach(function(o) {
|
|
919
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Lr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
920
|
+
}), t;
|
|
921
|
+
}, $e = Symbol("internals");
|
|
922
|
+
function ne(e) {
|
|
923
|
+
return e && String(e).trim().toLowerCase();
|
|
924
|
+
}
|
|
925
|
+
function he(e) {
|
|
926
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(he) : String(e);
|
|
927
|
+
}
|
|
928
|
+
function Br(e) {
|
|
929
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
930
|
+
let n;
|
|
931
|
+
for (; n = r.exec(e); )
|
|
932
|
+
t[n[1]] = n[2];
|
|
933
|
+
return t;
|
|
934
|
+
}
|
|
935
|
+
const vr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
936
|
+
function Oe(e, t, r, n, s) {
|
|
937
|
+
if (a.isFunction(n))
|
|
938
|
+
return n.call(this, t, r);
|
|
939
|
+
if (s && (t = r), !!a.isString(t)) {
|
|
940
|
+
if (a.isString(n))
|
|
941
|
+
return t.indexOf(n) !== -1;
|
|
942
|
+
if (a.isRegExp(n))
|
|
943
|
+
return n.test(t);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
function qr(e) {
|
|
947
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
948
|
+
}
|
|
949
|
+
function Ir(e, t) {
|
|
950
|
+
const r = a.toCamelCase(" " + t);
|
|
951
|
+
["get", "set", "has"].forEach((n) => {
|
|
952
|
+
Object.defineProperty(e, n + r, {
|
|
953
|
+
value: function(s, i, o) {
|
|
954
|
+
return this[n].call(this, t, s, i, o);
|
|
955
|
+
},
|
|
956
|
+
configurable: !0
|
|
957
|
+
});
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
let F = class {
|
|
961
|
+
constructor(t) {
|
|
962
|
+
t && this.set(t);
|
|
963
|
+
}
|
|
964
|
+
set(t, r, n) {
|
|
965
|
+
const s = this;
|
|
966
|
+
function i(c, p, f) {
|
|
967
|
+
const u = ne(p);
|
|
968
|
+
if (!u)
|
|
969
|
+
throw new Error("header name must be a non-empty string");
|
|
970
|
+
const m = a.findKey(s, u);
|
|
971
|
+
(!m || s[m] === void 0 || f === !0 || f === void 0 && s[m] !== !1) && (s[m || p] = he(c));
|
|
972
|
+
}
|
|
973
|
+
const o = (c, p) => a.forEach(c, (f, u) => i(f, u, p));
|
|
974
|
+
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
975
|
+
o(t, r);
|
|
976
|
+
else if (a.isString(t) && (t = t.trim()) && !vr(t))
|
|
977
|
+
o(Dr(t), r);
|
|
978
|
+
else if (a.isObject(t) && a.isIterable(t)) {
|
|
979
|
+
let c = {}, p, f;
|
|
980
|
+
for (const u of t) {
|
|
981
|
+
if (!a.isArray(u))
|
|
982
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
983
|
+
c[f = u[0]] = (p = c[f]) ? a.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1];
|
|
984
|
+
}
|
|
985
|
+
o(c, r);
|
|
986
|
+
} else
|
|
987
|
+
t != null && i(r, t, n);
|
|
988
|
+
return this;
|
|
989
|
+
}
|
|
990
|
+
get(t, r) {
|
|
991
|
+
if (t = ne(t), t) {
|
|
992
|
+
const n = a.findKey(this, t);
|
|
993
|
+
if (n) {
|
|
994
|
+
const s = this[n];
|
|
995
|
+
if (!r)
|
|
996
|
+
return s;
|
|
997
|
+
if (r === !0)
|
|
998
|
+
return Br(s);
|
|
999
|
+
if (a.isFunction(r))
|
|
1000
|
+
return r.call(this, s, n);
|
|
1001
|
+
if (a.isRegExp(r))
|
|
1002
|
+
return r.exec(s);
|
|
1003
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
has(t, r) {
|
|
1008
|
+
if (t = ne(t), t) {
|
|
1009
|
+
const n = a.findKey(this, t);
|
|
1010
|
+
return !!(n && this[n] !== void 0 && (!r || Oe(this, this[n], n, r)));
|
|
1011
|
+
}
|
|
1012
|
+
return !1;
|
|
1013
|
+
}
|
|
1014
|
+
delete(t, r) {
|
|
1015
|
+
const n = this;
|
|
1016
|
+
let s = !1;
|
|
1017
|
+
function i(o) {
|
|
1018
|
+
if (o = ne(o), o) {
|
|
1019
|
+
const c = a.findKey(n, o);
|
|
1020
|
+
c && (!r || Oe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
1024
|
+
}
|
|
1025
|
+
clear(t) {
|
|
1026
|
+
const r = Object.keys(this);
|
|
1027
|
+
let n = r.length, s = !1;
|
|
1028
|
+
for (; n--; ) {
|
|
1029
|
+
const i = r[n];
|
|
1030
|
+
(!t || Oe(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
1031
|
+
}
|
|
1032
|
+
return s;
|
|
1033
|
+
}
|
|
1034
|
+
normalize(t) {
|
|
1035
|
+
const r = this, n = {};
|
|
1036
|
+
return a.forEach(this, (s, i) => {
|
|
1037
|
+
const o = a.findKey(n, i);
|
|
1038
|
+
if (o) {
|
|
1039
|
+
r[o] = he(s), delete r[i];
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
const c = t ? qr(i) : String(i).trim();
|
|
1043
|
+
c !== i && delete r[i], r[c] = he(s), n[c] = !0;
|
|
1044
|
+
}), this;
|
|
1045
|
+
}
|
|
1046
|
+
concat(...t) {
|
|
1047
|
+
return this.constructor.concat(this, ...t);
|
|
1048
|
+
}
|
|
1049
|
+
toJSON(t) {
|
|
1050
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
1051
|
+
return a.forEach(this, (n, s) => {
|
|
1052
|
+
n != null && n !== !1 && (r[s] = t && a.isArray(n) ? n.join(", ") : n);
|
|
1053
|
+
}), r;
|
|
1054
|
+
}
|
|
1055
|
+
[Symbol.iterator]() {
|
|
1056
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1057
|
+
}
|
|
1058
|
+
toString() {
|
|
1059
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
1060
|
+
`);
|
|
1061
|
+
}
|
|
1062
|
+
getSetCookie() {
|
|
1063
|
+
return this.get("set-cookie") || [];
|
|
1064
|
+
}
|
|
1065
|
+
get [Symbol.toStringTag]() {
|
|
1066
|
+
return "AxiosHeaders";
|
|
1067
|
+
}
|
|
1068
|
+
static from(t) {
|
|
1069
|
+
return t instanceof this ? t : new this(t);
|
|
1070
|
+
}
|
|
1071
|
+
static concat(t, ...r) {
|
|
1072
|
+
const n = new this(t);
|
|
1073
|
+
return r.forEach((s) => n.set(s)), n;
|
|
1074
|
+
}
|
|
1075
|
+
static accessor(t) {
|
|
1076
|
+
const n = (this[$e] = this[$e] = {
|
|
1077
|
+
accessors: {}
|
|
1078
|
+
}).accessors, s = this.prototype;
|
|
1079
|
+
function i(o) {
|
|
1080
|
+
const c = ne(o);
|
|
1081
|
+
n[c] || (Ir(s, o), n[c] = !0);
|
|
1082
|
+
}
|
|
1083
|
+
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
1086
|
+
F.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1087
|
+
a.reduceDescriptors(F.prototype, ({ value: e }, t) => {
|
|
1088
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
1089
|
+
return {
|
|
1090
|
+
get: () => e,
|
|
1091
|
+
set(n) {
|
|
1092
|
+
this[r] = n;
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
});
|
|
1096
|
+
a.freezeMethods(F);
|
|
1097
|
+
function Ae(e, t) {
|
|
1098
|
+
const r = this || ae, n = t || r, s = F.from(n.headers);
|
|
1099
|
+
let i = n.data;
|
|
1100
|
+
return a.forEach(e, function(c) {
|
|
1101
|
+
i = c.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
1102
|
+
}), s.normalize(), i;
|
|
1103
|
+
}
|
|
1104
|
+
function mt(e) {
|
|
1105
|
+
return !!(e && e.__CANCEL__);
|
|
1106
|
+
}
|
|
1107
|
+
function G(e, t, r) {
|
|
1108
|
+
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1109
|
+
}
|
|
1110
|
+
a.inherits(G, E, {
|
|
1111
|
+
__CANCEL__: !0
|
|
1112
|
+
});
|
|
1113
|
+
function bt(e, t, r) {
|
|
1114
|
+
const n = r.config.validateStatus;
|
|
1115
|
+
!r.status || !n || n(r.status) ? e(r) : t(new E(
|
|
1116
|
+
"Request failed with status code " + r.status,
|
|
1117
|
+
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1118
|
+
r.config,
|
|
1119
|
+
r.request,
|
|
1120
|
+
r
|
|
1121
|
+
));
|
|
1122
|
+
}
|
|
1123
|
+
function Mr(e) {
|
|
1124
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1125
|
+
return t && t[1] || "";
|
|
1126
|
+
}
|
|
1127
|
+
function $r(e, t) {
|
|
1128
|
+
e = e || 10;
|
|
1129
|
+
const r = new Array(e), n = new Array(e);
|
|
1130
|
+
let s = 0, i = 0, o;
|
|
1131
|
+
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
1132
|
+
const f = Date.now(), u = n[i];
|
|
1133
|
+
o || (o = f), r[s] = p, n[s] = f;
|
|
1134
|
+
let m = i, w = 0;
|
|
1135
|
+
for (; m !== s; )
|
|
1136
|
+
w += r[m++], m = m % e;
|
|
1137
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - o < t)
|
|
1138
|
+
return;
|
|
1139
|
+
const g = u && f - u;
|
|
1140
|
+
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
function Hr(e, t) {
|
|
1144
|
+
let r = 0, n = 1e3 / t, s, i;
|
|
1145
|
+
const o = (f, u = Date.now()) => {
|
|
1146
|
+
r = u, s = null, i && (clearTimeout(i), i = null), e(...f);
|
|
1147
|
+
};
|
|
1148
|
+
return [(...f) => {
|
|
1149
|
+
const u = Date.now(), m = u - r;
|
|
1150
|
+
m >= n ? o(f, u) : (s = f, i || (i = setTimeout(() => {
|
|
1151
|
+
i = null, o(s);
|
|
1152
|
+
}, n - m)));
|
|
1153
|
+
}, () => s && o(s)];
|
|
1154
|
+
}
|
|
1155
|
+
const be = (e, t, r = 3) => {
|
|
1156
|
+
let n = 0;
|
|
1157
|
+
const s = $r(50, 250);
|
|
1158
|
+
return Hr((i) => {
|
|
1159
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, p = o - n, f = s(p), u = o <= c;
|
|
1160
|
+
n = o;
|
|
1161
|
+
const m = {
|
|
1162
|
+
loaded: o,
|
|
1163
|
+
total: c,
|
|
1164
|
+
progress: c ? o / c : void 0,
|
|
1165
|
+
bytes: p,
|
|
1166
|
+
rate: f || void 0,
|
|
1167
|
+
estimated: f && c && u ? (c - o) / f : void 0,
|
|
1168
|
+
event: i,
|
|
1169
|
+
lengthComputable: c != null,
|
|
1170
|
+
[t ? "download" : "upload"]: !0
|
|
1171
|
+
};
|
|
1172
|
+
e(m);
|
|
1173
|
+
}, r);
|
|
1174
|
+
}, He = (e, t) => {
|
|
1175
|
+
const r = e != null;
|
|
1176
|
+
return [(n) => t[0]({
|
|
1177
|
+
lengthComputable: r,
|
|
1178
|
+
total: e,
|
|
1179
|
+
loaded: n
|
|
1180
|
+
}), t[1]];
|
|
1181
|
+
}, ze = (e) => (...t) => a.asap(() => e(...t)), zr = C.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, C.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
1182
|
+
new URL(C.origin),
|
|
1183
|
+
C.navigator && /(msie|trident)/i.test(C.navigator.userAgent)
|
|
1184
|
+
) : () => !0, Jr = C.hasStandardBrowserEnv ? (
|
|
1185
|
+
// Standard browser envs support document.cookie
|
|
1186
|
+
{
|
|
1187
|
+
write(e, t, r, n, s, i) {
|
|
1188
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
1189
|
+
a.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), a.isString(n) && o.push("path=" + n), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
1190
|
+
},
|
|
1191
|
+
read(e) {
|
|
1192
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
1193
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
1194
|
+
},
|
|
1195
|
+
remove(e) {
|
|
1196
|
+
this.write(e, "", Date.now() - 864e5);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
) : (
|
|
1200
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1201
|
+
{
|
|
1202
|
+
write() {
|
|
1203
|
+
},
|
|
1204
|
+
read() {
|
|
1205
|
+
return null;
|
|
1206
|
+
},
|
|
1207
|
+
remove() {
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
);
|
|
1211
|
+
function Vr(e) {
|
|
1212
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1213
|
+
}
|
|
1214
|
+
function Wr(e, t) {
|
|
1215
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1216
|
+
}
|
|
1217
|
+
function yt(e, t, r) {
|
|
1218
|
+
let n = !Vr(t);
|
|
1219
|
+
return e && (n || r == !1) ? Wr(e, t) : t;
|
|
1220
|
+
}
|
|
1221
|
+
const Je = (e) => e instanceof F ? { ...e } : e;
|
|
1222
|
+
function V(e, t) {
|
|
1223
|
+
t = t || {};
|
|
1224
|
+
const r = {};
|
|
1225
|
+
function n(f, u, m, w) {
|
|
1226
|
+
return a.isPlainObject(f) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, f, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1227
|
+
}
|
|
1228
|
+
function s(f, u, m, w) {
|
|
1229
|
+
if (a.isUndefined(u)) {
|
|
1230
|
+
if (!a.isUndefined(f))
|
|
1231
|
+
return n(void 0, f, m, w);
|
|
1232
|
+
} else return n(f, u, m, w);
|
|
1233
|
+
}
|
|
1234
|
+
function i(f, u) {
|
|
1235
|
+
if (!a.isUndefined(u))
|
|
1236
|
+
return n(void 0, u);
|
|
1237
|
+
}
|
|
1238
|
+
function o(f, u) {
|
|
1239
|
+
if (a.isUndefined(u)) {
|
|
1240
|
+
if (!a.isUndefined(f))
|
|
1241
|
+
return n(void 0, f);
|
|
1242
|
+
} else return n(void 0, u);
|
|
1243
|
+
}
|
|
1244
|
+
function c(f, u, m) {
|
|
1245
|
+
if (m in t)
|
|
1246
|
+
return n(f, u);
|
|
1247
|
+
if (m in e)
|
|
1248
|
+
return n(void 0, f);
|
|
1249
|
+
}
|
|
1250
|
+
const p = {
|
|
1251
|
+
url: i,
|
|
1252
|
+
method: i,
|
|
1253
|
+
data: i,
|
|
1254
|
+
baseURL: o,
|
|
1255
|
+
transformRequest: o,
|
|
1256
|
+
transformResponse: o,
|
|
1257
|
+
paramsSerializer: o,
|
|
1258
|
+
timeout: o,
|
|
1259
|
+
timeoutMessage: o,
|
|
1260
|
+
withCredentials: o,
|
|
1261
|
+
withXSRFToken: o,
|
|
1262
|
+
adapter: o,
|
|
1263
|
+
responseType: o,
|
|
1264
|
+
xsrfCookieName: o,
|
|
1265
|
+
xsrfHeaderName: o,
|
|
1266
|
+
onUploadProgress: o,
|
|
1267
|
+
onDownloadProgress: o,
|
|
1268
|
+
decompress: o,
|
|
1269
|
+
maxContentLength: o,
|
|
1270
|
+
maxBodyLength: o,
|
|
1271
|
+
beforeRedirect: o,
|
|
1272
|
+
transport: o,
|
|
1273
|
+
httpAgent: o,
|
|
1274
|
+
httpsAgent: o,
|
|
1275
|
+
cancelToken: o,
|
|
1276
|
+
socketPath: o,
|
|
1277
|
+
responseEncoding: o,
|
|
1278
|
+
validateStatus: c,
|
|
1279
|
+
headers: (f, u, m) => s(Je(f), Je(u), m, !0)
|
|
1280
|
+
};
|
|
1281
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1282
|
+
const m = p[u] || s, w = m(e[u], t[u], u);
|
|
1283
|
+
a.isUndefined(w) && m !== c || (r[u] = w);
|
|
1284
|
+
}), r;
|
|
1285
|
+
}
|
|
1286
|
+
const Et = (e) => {
|
|
1287
|
+
const t = V({}, e);
|
|
1288
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1289
|
+
if (t.headers = o = F.from(o), t.url = dt(yt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1290
|
+
"Authorization",
|
|
1291
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1292
|
+
), a.isFormData(r)) {
|
|
1293
|
+
if (C.hasStandardBrowserEnv || C.hasStandardBrowserWebWorkerEnv)
|
|
1294
|
+
o.setContentType(void 0);
|
|
1295
|
+
else if (a.isFunction(r.getHeaders)) {
|
|
1296
|
+
const p = r.getHeaders(), f = ["content-type", "content-length"];
|
|
1297
|
+
Object.entries(p).forEach(([u, m]) => {
|
|
1298
|
+
f.includes(u.toLowerCase()) && o.set(u, m);
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
if (C.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && zr(t.url))) {
|
|
1303
|
+
const p = s && i && Jr.read(i);
|
|
1304
|
+
p && o.set(s, p);
|
|
1305
|
+
}
|
|
1306
|
+
return t;
|
|
1307
|
+
}, Yr = typeof XMLHttpRequest < "u", Kr = Yr && function(e) {
|
|
1308
|
+
return new Promise(function(r, n) {
|
|
1309
|
+
const s = Et(e);
|
|
1310
|
+
let i = s.data;
|
|
1311
|
+
const o = F.from(s.headers).normalize();
|
|
1312
|
+
let { responseType: c, onUploadProgress: p, onDownloadProgress: f } = s, u, m, w, g, d;
|
|
1313
|
+
function b() {
|
|
1314
|
+
g && g(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1315
|
+
}
|
|
1316
|
+
let h = new XMLHttpRequest();
|
|
1317
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1318
|
+
function T() {
|
|
1319
|
+
if (!h)
|
|
1320
|
+
return;
|
|
1321
|
+
const A = F.from(
|
|
1322
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1323
|
+
), j = {
|
|
1324
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1325
|
+
status: h.status,
|
|
1326
|
+
statusText: h.statusText,
|
|
1327
|
+
headers: A,
|
|
1328
|
+
config: e,
|
|
1329
|
+
request: h
|
|
1330
|
+
};
|
|
1331
|
+
bt(function(N) {
|
|
1332
|
+
r(N), b();
|
|
1333
|
+
}, function(N) {
|
|
1334
|
+
n(N), b();
|
|
1335
|
+
}, j), h = null;
|
|
1336
|
+
}
|
|
1337
|
+
"onloadend" in h ? h.onloadend = T : h.onreadystatechange = function() {
|
|
1338
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(T);
|
|
1339
|
+
}, h.onabort = function() {
|
|
1340
|
+
h && (n(new E("Request aborted", E.ECONNABORTED, e, h)), h = null);
|
|
1341
|
+
}, h.onerror = function(x) {
|
|
1342
|
+
const j = x && x.message ? x.message : "Network Error", v = new E(j, E.ERR_NETWORK, e, h);
|
|
1343
|
+
v.event = x || null, n(v), h = null;
|
|
1344
|
+
}, h.ontimeout = function() {
|
|
1345
|
+
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1346
|
+
const j = s.transitional || pt;
|
|
1347
|
+
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), n(new E(
|
|
1348
|
+
x,
|
|
1349
|
+
j.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1350
|
+
e,
|
|
1351
|
+
h
|
|
1352
|
+
)), h = null;
|
|
1353
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(x, j) {
|
|
1354
|
+
h.setRequestHeader(j, x);
|
|
1355
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), f && ([w, d] = be(f, !0), h.addEventListener("progress", w)), p && h.upload && ([m, g] = be(p), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (A) => {
|
|
1356
|
+
h && (n(!A || A.type ? new G(null, e, h) : A), h.abort(), h = null);
|
|
1357
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1358
|
+
const P = Mr(s.url);
|
|
1359
|
+
if (P && C.protocols.indexOf(P) === -1) {
|
|
1360
|
+
n(new E("Unsupported protocol " + P + ":", E.ERR_BAD_REQUEST, e));
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
h.send(i || null);
|
|
1364
|
+
});
|
|
1365
|
+
}, Xr = (e, t) => {
|
|
1366
|
+
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1367
|
+
if (t || r) {
|
|
1368
|
+
let n = new AbortController(), s;
|
|
1369
|
+
const i = function(f) {
|
|
1370
|
+
if (!s) {
|
|
1371
|
+
s = !0, c();
|
|
1372
|
+
const u = f instanceof Error ? f : this.reason;
|
|
1373
|
+
n.abort(u instanceof E ? u : new G(u instanceof Error ? u.message : u));
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
let o = t && setTimeout(() => {
|
|
1377
|
+
o = null, i(new E(`timeout ${t} of ms exceeded`, E.ETIMEDOUT));
|
|
1378
|
+
}, t);
|
|
1379
|
+
const c = () => {
|
|
1380
|
+
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
1381
|
+
f.unsubscribe ? f.unsubscribe(i) : f.removeEventListener("abort", i);
|
|
1382
|
+
}), e = null);
|
|
1383
|
+
};
|
|
1384
|
+
e.forEach((f) => f.addEventListener("abort", i));
|
|
1385
|
+
const { signal: p } = n;
|
|
1386
|
+
return p.unsubscribe = () => a.asap(c), p;
|
|
1387
|
+
}
|
|
1388
|
+
}, Gr = function* (e, t) {
|
|
1389
|
+
let r = e.byteLength;
|
|
1390
|
+
if (r < t) {
|
|
1391
|
+
yield e;
|
|
1392
|
+
return;
|
|
1393
|
+
}
|
|
1394
|
+
let n = 0, s;
|
|
1395
|
+
for (; n < r; )
|
|
1396
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1397
|
+
}, Zr = async function* (e, t) {
|
|
1398
|
+
for await (const r of Qr(e))
|
|
1399
|
+
yield* Gr(r, t);
|
|
1400
|
+
}, Qr = async function* (e) {
|
|
1401
|
+
if (e[Symbol.asyncIterator]) {
|
|
1402
|
+
yield* e;
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
const t = e.getReader();
|
|
1406
|
+
try {
|
|
1407
|
+
for (; ; ) {
|
|
1408
|
+
const { done: r, value: n } = await t.read();
|
|
1409
|
+
if (r)
|
|
1410
|
+
break;
|
|
1411
|
+
yield n;
|
|
1412
|
+
}
|
|
1413
|
+
} finally {
|
|
1414
|
+
await t.cancel();
|
|
1415
|
+
}
|
|
1416
|
+
}, Ve = (e, t, r, n) => {
|
|
1417
|
+
const s = Zr(e, t);
|
|
1418
|
+
let i = 0, o, c = (p) => {
|
|
1419
|
+
o || (o = !0, n && n(p));
|
|
1420
|
+
};
|
|
1421
|
+
return new ReadableStream({
|
|
1422
|
+
async pull(p) {
|
|
1423
|
+
try {
|
|
1424
|
+
const { done: f, value: u } = await s.next();
|
|
1425
|
+
if (f) {
|
|
1426
|
+
c(), p.close();
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1429
|
+
let m = u.byteLength;
|
|
1430
|
+
if (r) {
|
|
1431
|
+
let w = i += m;
|
|
1432
|
+
r(w);
|
|
1433
|
+
}
|
|
1434
|
+
p.enqueue(new Uint8Array(u));
|
|
1435
|
+
} catch (f) {
|
|
1436
|
+
throw c(f), f;
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
cancel(p) {
|
|
1440
|
+
return c(p), s.return();
|
|
1441
|
+
}
|
|
1442
|
+
}, {
|
|
1443
|
+
highWaterMark: 2
|
|
1444
|
+
});
|
|
1445
|
+
}, We = 64 * 1024, { isFunction: de } = a, en = (({ Request: e, Response: t }) => ({
|
|
1446
|
+
Request: e,
|
|
1447
|
+
Response: t
|
|
1448
|
+
}))(a.global), {
|
|
1449
|
+
ReadableStream: Ye,
|
|
1450
|
+
TextEncoder: Ke
|
|
1451
|
+
} = a.global, Xe = (e, ...t) => {
|
|
1452
|
+
try {
|
|
1453
|
+
return !!e(...t);
|
|
1454
|
+
} catch {
|
|
1455
|
+
return !1;
|
|
1456
|
+
}
|
|
1457
|
+
}, tn = (e) => {
|
|
1458
|
+
e = a.merge.call({
|
|
1459
|
+
skipUndefined: !0
|
|
1460
|
+
}, en, e);
|
|
1461
|
+
const { fetch: t, Request: r, Response: n } = e, s = t ? de(t) : typeof fetch == "function", i = de(r), o = de(n);
|
|
1462
|
+
if (!s)
|
|
1463
|
+
return !1;
|
|
1464
|
+
const c = s && de(Ye), p = s && (typeof Ke == "function" ? /* @__PURE__ */ ((d) => (b) => d.encode(b))(new Ke()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), f = i && c && Xe(() => {
|
|
1465
|
+
let d = !1;
|
|
1466
|
+
const b = new r(C.origin, {
|
|
1467
|
+
body: new Ye(),
|
|
1468
|
+
method: "POST",
|
|
1469
|
+
get duplex() {
|
|
1470
|
+
return d = !0, "half";
|
|
1471
|
+
}
|
|
1472
|
+
}).headers.has("Content-Type");
|
|
1473
|
+
return d && !b;
|
|
1474
|
+
}), u = o && c && Xe(() => a.isReadableStream(new n("").body)), m = {
|
|
1475
|
+
stream: u && ((d) => d.body)
|
|
1476
|
+
};
|
|
1477
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1478
|
+
!m[d] && (m[d] = (b, h) => {
|
|
1479
|
+
let T = b && b[d];
|
|
1480
|
+
if (T)
|
|
1481
|
+
return T.call(b);
|
|
1482
|
+
throw new E(`Response type '${d}' is not supported`, E.ERR_NOT_SUPPORT, h);
|
|
1483
|
+
});
|
|
1484
|
+
});
|
|
1485
|
+
const w = async (d) => {
|
|
1486
|
+
if (d == null)
|
|
1487
|
+
return 0;
|
|
1488
|
+
if (a.isBlob(d))
|
|
1489
|
+
return d.size;
|
|
1490
|
+
if (a.isSpecCompliantForm(d))
|
|
1491
|
+
return (await new r(C.origin, {
|
|
1492
|
+
method: "POST",
|
|
1493
|
+
body: d
|
|
1494
|
+
}).arrayBuffer()).byteLength;
|
|
1495
|
+
if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
|
|
1496
|
+
return d.byteLength;
|
|
1497
|
+
if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
|
|
1498
|
+
return (await p(d)).byteLength;
|
|
1499
|
+
}, g = async (d, b) => {
|
|
1500
|
+
const h = a.toFiniteNumber(d.getContentLength());
|
|
1501
|
+
return h ?? w(b);
|
|
1502
|
+
};
|
|
1503
|
+
return async (d) => {
|
|
1504
|
+
let {
|
|
1505
|
+
url: b,
|
|
1506
|
+
method: h,
|
|
1507
|
+
data: T,
|
|
1508
|
+
signal: P,
|
|
1509
|
+
cancelToken: A,
|
|
1510
|
+
timeout: x,
|
|
1511
|
+
onDownloadProgress: j,
|
|
1512
|
+
onUploadProgress: v,
|
|
1513
|
+
responseType: N,
|
|
1514
|
+
headers: Z,
|
|
1515
|
+
withCredentials: I = "same-origin",
|
|
1516
|
+
fetchOptions: ce
|
|
1517
|
+
} = Et(d), le = t || fetch;
|
|
1518
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1519
|
+
let M = Xr([P, A && A.toAbortSignal()], x), $ = null;
|
|
1520
|
+
const q = M && M.unsubscribe && (() => {
|
|
1521
|
+
M.unsubscribe();
|
|
1522
|
+
});
|
|
1523
|
+
let W;
|
|
1524
|
+
try {
|
|
1525
|
+
if (v && f && h !== "get" && h !== "head" && (W = await g(Z, T)) !== 0) {
|
|
1526
|
+
let l = new r(b, {
|
|
1527
|
+
method: "POST",
|
|
1528
|
+
body: T,
|
|
1529
|
+
duplex: "half"
|
|
1530
|
+
}), y;
|
|
1531
|
+
if (a.isFormData(T) && (y = l.headers.get("content-type")) && Z.setContentType(y), l.body) {
|
|
1532
|
+
const [R, S] = He(
|
|
1533
|
+
W,
|
|
1534
|
+
be(ze(v))
|
|
1535
|
+
);
|
|
1536
|
+
T = Ve(l.body, We, R, S);
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
a.isString(I) || (I = I ? "include" : "omit");
|
|
1540
|
+
const U = i && "credentials" in r.prototype, Q = {
|
|
1541
|
+
...ce,
|
|
1542
|
+
signal: M,
|
|
1543
|
+
method: h.toUpperCase(),
|
|
1544
|
+
headers: Z.normalize().toJSON(),
|
|
1545
|
+
body: T,
|
|
1546
|
+
duplex: "half",
|
|
1547
|
+
credentials: U ? I : void 0
|
|
1548
|
+
};
|
|
1549
|
+
$ = i && new r(b, Q);
|
|
1550
|
+
let L = await (i ? le($, ce) : le(b, Q));
|
|
1551
|
+
const ee = u && (N === "stream" || N === "response");
|
|
1552
|
+
if (u && (j || ee && q)) {
|
|
1553
|
+
const l = {};
|
|
1554
|
+
["status", "statusText", "headers"].forEach((H) => {
|
|
1555
|
+
l[H] = L[H];
|
|
1556
|
+
});
|
|
1557
|
+
const y = a.toFiniteNumber(L.headers.get("content-length")), [R, S] = j && He(
|
|
1558
|
+
y,
|
|
1559
|
+
be(ze(j), !0)
|
|
1560
|
+
) || [];
|
|
1561
|
+
L = new n(
|
|
1562
|
+
Ve(L.body, We, R, () => {
|
|
1563
|
+
S && S(), q && q();
|
|
1564
|
+
}),
|
|
1565
|
+
l
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1568
|
+
N = N || "text";
|
|
1569
|
+
let ue = await m[a.findKey(m, N) || "text"](L, d);
|
|
1570
|
+
return !ee && q && q(), await new Promise((l, y) => {
|
|
1571
|
+
bt(l, y, {
|
|
1572
|
+
data: ue,
|
|
1573
|
+
headers: F.from(L.headers),
|
|
1574
|
+
status: L.status,
|
|
1575
|
+
statusText: L.statusText,
|
|
1576
|
+
config: d,
|
|
1577
|
+
request: $
|
|
1578
|
+
});
|
|
1579
|
+
});
|
|
1580
|
+
} catch (U) {
|
|
1581
|
+
throw q && q(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
|
|
1582
|
+
new E("Network Error", E.ERR_NETWORK, d, $),
|
|
1583
|
+
{
|
|
1584
|
+
cause: U.cause || U
|
|
1585
|
+
}
|
|
1586
|
+
) : E.from(U, U && U.code, d, $);
|
|
1587
|
+
}
|
|
1588
|
+
};
|
|
1589
|
+
}, rn = /* @__PURE__ */ new Map(), wt = (e) => {
|
|
1590
|
+
let t = e ? e.env : {};
|
|
1591
|
+
const { fetch: r, Request: n, Response: s } = t, i = [
|
|
1592
|
+
n,
|
|
1593
|
+
s,
|
|
1594
|
+
r
|
|
1595
|
+
];
|
|
1596
|
+
let o = i.length, c = o, p, f, u = rn;
|
|
1597
|
+
for (; c--; )
|
|
1598
|
+
p = i[c], f = u.get(p), f === void 0 && u.set(p, f = c ? /* @__PURE__ */ new Map() : tn(t)), u = f;
|
|
1599
|
+
return f;
|
|
1600
|
+
};
|
|
1601
|
+
wt();
|
|
1602
|
+
const Ne = {
|
|
1603
|
+
http: wr,
|
|
1604
|
+
xhr: Kr,
|
|
1605
|
+
fetch: {
|
|
1606
|
+
get: wt
|
|
1607
|
+
}
|
|
1608
|
+
};
|
|
1609
|
+
a.forEach(Ne, (e, t) => {
|
|
1610
|
+
if (e) {
|
|
1611
|
+
try {
|
|
1612
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1613
|
+
} catch {
|
|
1614
|
+
}
|
|
1615
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
const Ge = (e) => `- ${e}`, nn = (e) => a.isFunction(e) || e === null || e === !1, Rt = {
|
|
1619
|
+
getAdapter: (e, t) => {
|
|
1620
|
+
e = a.isArray(e) ? e : [e];
|
|
1621
|
+
const { length: r } = e;
|
|
1622
|
+
let n, s;
|
|
1623
|
+
const i = {};
|
|
1624
|
+
for (let o = 0; o < r; o++) {
|
|
1625
|
+
n = e[o];
|
|
1626
|
+
let c;
|
|
1627
|
+
if (s = n, !nn(n) && (s = Ne[(c = String(n)).toLowerCase()], s === void 0))
|
|
1628
|
+
throw new E(`Unknown adapter '${c}'`);
|
|
1629
|
+
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1630
|
+
break;
|
|
1631
|
+
i[c || "#" + o] = s;
|
|
1632
|
+
}
|
|
1633
|
+
if (!s) {
|
|
1634
|
+
const o = Object.entries(i).map(
|
|
1635
|
+
([p, f]) => `adapter ${p} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1636
|
+
);
|
|
1637
|
+
let c = r ? o.length > 1 ? `since :
|
|
1638
|
+
` + o.map(Ge).join(`
|
|
1639
|
+
`) : " " + Ge(o[0]) : "as no adapter specified";
|
|
1640
|
+
throw new E(
|
|
1641
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1642
|
+
"ERR_NOT_SUPPORT"
|
|
1643
|
+
);
|
|
1644
|
+
}
|
|
1645
|
+
return s;
|
|
1646
|
+
},
|
|
1647
|
+
adapters: Ne
|
|
1648
|
+
};
|
|
1649
|
+
function _e(e) {
|
|
1650
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1651
|
+
throw new G(null, e);
|
|
1652
|
+
}
|
|
1653
|
+
function Ze(e) {
|
|
1654
|
+
return _e(e), e.headers = F.from(e.headers), e.data = Ae.call(
|
|
1655
|
+
e,
|
|
1656
|
+
e.transformRequest
|
|
1657
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rt.getAdapter(e.adapter || ae.adapter, e)(e).then(function(n) {
|
|
1658
|
+
return _e(e), n.data = Ae.call(
|
|
1659
|
+
e,
|
|
1660
|
+
e.transformResponse,
|
|
1661
|
+
n
|
|
1662
|
+
), n.headers = F.from(n.headers), n;
|
|
1663
|
+
}, function(n) {
|
|
1664
|
+
return mt(n) || (_e(e), n && n.response && (n.response.data = Ae.call(
|
|
1665
|
+
e,
|
|
1666
|
+
e.transformResponse,
|
|
1667
|
+
n.response
|
|
1668
|
+
), n.response.headers = F.from(n.response.headers))), Promise.reject(n);
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
const St = "1.12.2", Se = {};
|
|
1672
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1673
|
+
Se[e] = function(n) {
|
|
1674
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1675
|
+
};
|
|
1676
|
+
});
|
|
1677
|
+
const Qe = {};
|
|
1678
|
+
Se.transitional = function(t, r, n) {
|
|
1679
|
+
function s(i, o) {
|
|
1680
|
+
return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1681
|
+
}
|
|
1682
|
+
return (i, o, c) => {
|
|
1683
|
+
if (t === !1)
|
|
1684
|
+
throw new E(
|
|
1685
|
+
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1686
|
+
E.ERR_DEPRECATED
|
|
1687
|
+
);
|
|
1688
|
+
return r && !Qe[o] && (Qe[o] = !0, console.warn(
|
|
1689
|
+
s(
|
|
1690
|
+
o,
|
|
1691
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1692
|
+
)
|
|
1693
|
+
)), t ? t(i, o, c) : !0;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
Se.spelling = function(t) {
|
|
1697
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1698
|
+
};
|
|
1699
|
+
function sn(e, t, r) {
|
|
1700
|
+
if (typeof e != "object")
|
|
1701
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1702
|
+
const n = Object.keys(e);
|
|
1703
|
+
let s = n.length;
|
|
1704
|
+
for (; s-- > 0; ) {
|
|
1705
|
+
const i = n[s], o = t[i];
|
|
1706
|
+
if (o) {
|
|
1707
|
+
const c = e[i], p = c === void 0 || o(c, i, e);
|
|
1708
|
+
if (p !== !0)
|
|
1709
|
+
throw new E("option " + i + " must be " + p, E.ERR_BAD_OPTION_VALUE);
|
|
1710
|
+
continue;
|
|
1711
|
+
}
|
|
1712
|
+
if (r !== !0)
|
|
1713
|
+
throw new E("Unknown option " + i, E.ERR_BAD_OPTION);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
const me = {
|
|
1717
|
+
assertOptions: sn,
|
|
1718
|
+
validators: Se
|
|
1719
|
+
}, B = me.validators;
|
|
1720
|
+
let J = class {
|
|
1721
|
+
constructor(t) {
|
|
1722
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1723
|
+
request: new Me(),
|
|
1724
|
+
response: new Me()
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Dispatch a request
|
|
1729
|
+
*
|
|
1730
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1731
|
+
* @param {?Object} config
|
|
1732
|
+
*
|
|
1733
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1734
|
+
*/
|
|
1735
|
+
async request(t, r) {
|
|
1736
|
+
try {
|
|
1737
|
+
return await this._request(t, r);
|
|
1738
|
+
} catch (n) {
|
|
1739
|
+
if (n instanceof Error) {
|
|
1740
|
+
let s = {};
|
|
1741
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1742
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1743
|
+
try {
|
|
1744
|
+
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1745
|
+
` + i) : n.stack = i;
|
|
1746
|
+
} catch {
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
throw n;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
_request(t, r) {
|
|
1753
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = V(this.defaults, r);
|
|
1754
|
+
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1755
|
+
n !== void 0 && me.assertOptions(n, {
|
|
1756
|
+
silentJSONParsing: B.transitional(B.boolean),
|
|
1757
|
+
forcedJSONParsing: B.transitional(B.boolean),
|
|
1758
|
+
clarifyTimeoutError: B.transitional(B.boolean)
|
|
1759
|
+
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1760
|
+
serialize: s
|
|
1761
|
+
} : me.assertOptions(s, {
|
|
1762
|
+
encode: B.function,
|
|
1763
|
+
serialize: B.function
|
|
1764
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), me.assertOptions(r, {
|
|
1765
|
+
baseUrl: B.spelling("baseURL"),
|
|
1766
|
+
withXsrfToken: B.spelling("withXSRFToken")
|
|
1767
|
+
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1768
|
+
let o = i && a.merge(
|
|
1769
|
+
i.common,
|
|
1770
|
+
i[r.method]
|
|
1771
|
+
);
|
|
1772
|
+
i && a.forEach(
|
|
1773
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1774
|
+
(d) => {
|
|
1775
|
+
delete i[d];
|
|
1776
|
+
}
|
|
1777
|
+
), r.headers = F.concat(o, i);
|
|
1778
|
+
const c = [];
|
|
1779
|
+
let p = !0;
|
|
1780
|
+
this.interceptors.request.forEach(function(b) {
|
|
1781
|
+
typeof b.runWhen == "function" && b.runWhen(r) === !1 || (p = p && b.synchronous, c.unshift(b.fulfilled, b.rejected));
|
|
1782
|
+
});
|
|
1783
|
+
const f = [];
|
|
1784
|
+
this.interceptors.response.forEach(function(b) {
|
|
1785
|
+
f.push(b.fulfilled, b.rejected);
|
|
1786
|
+
});
|
|
1787
|
+
let u, m = 0, w;
|
|
1788
|
+
if (!p) {
|
|
1789
|
+
const d = [Ze.bind(this), void 0];
|
|
1790
|
+
for (d.unshift(...c), d.push(...f), w = d.length, u = Promise.resolve(r); m < w; )
|
|
1791
|
+
u = u.then(d[m++], d[m++]);
|
|
1792
|
+
return u;
|
|
1793
|
+
}
|
|
1794
|
+
w = c.length;
|
|
1795
|
+
let g = r;
|
|
1796
|
+
for (; m < w; ) {
|
|
1797
|
+
const d = c[m++], b = c[m++];
|
|
1798
|
+
try {
|
|
1799
|
+
g = d(g);
|
|
1800
|
+
} catch (h) {
|
|
1801
|
+
b.call(this, h);
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
try {
|
|
1806
|
+
u = Ze.call(this, g);
|
|
1807
|
+
} catch (d) {
|
|
1808
|
+
return Promise.reject(d);
|
|
1809
|
+
}
|
|
1810
|
+
for (m = 0, w = f.length; m < w; )
|
|
1811
|
+
u = u.then(f[m++], f[m++]);
|
|
1812
|
+
return u;
|
|
1813
|
+
}
|
|
1814
|
+
getUri(t) {
|
|
1815
|
+
t = V(this.defaults, t);
|
|
1816
|
+
const r = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1817
|
+
return dt(r, t.params, t.paramsSerializer);
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1820
|
+
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1821
|
+
J.prototype[t] = function(r, n) {
|
|
1822
|
+
return this.request(V(n || {}, {
|
|
1823
|
+
method: t,
|
|
1824
|
+
url: r,
|
|
1825
|
+
data: (n || {}).data
|
|
1826
|
+
}));
|
|
1827
|
+
};
|
|
1828
|
+
});
|
|
1829
|
+
a.forEach(["post", "put", "patch"], function(t) {
|
|
1830
|
+
function r(n) {
|
|
1831
|
+
return function(i, o, c) {
|
|
1832
|
+
return this.request(V(c || {}, {
|
|
1833
|
+
method: t,
|
|
1834
|
+
headers: n ? {
|
|
1835
|
+
"Content-Type": "multipart/form-data"
|
|
1836
|
+
} : {},
|
|
1837
|
+
url: i,
|
|
1838
|
+
data: o
|
|
1839
|
+
}));
|
|
1840
|
+
};
|
|
1841
|
+
}
|
|
1842
|
+
J.prototype[t] = r(), J.prototype[t + "Form"] = r(!0);
|
|
1843
|
+
});
|
|
1844
|
+
let on = class gt {
|
|
1845
|
+
constructor(t) {
|
|
1846
|
+
if (typeof t != "function")
|
|
1847
|
+
throw new TypeError("executor must be a function.");
|
|
1848
|
+
let r;
|
|
1849
|
+
this.promise = new Promise(function(i) {
|
|
1850
|
+
r = i;
|
|
1851
|
+
});
|
|
1852
|
+
const n = this;
|
|
1853
|
+
this.promise.then((s) => {
|
|
1854
|
+
if (!n._listeners) return;
|
|
1855
|
+
let i = n._listeners.length;
|
|
1856
|
+
for (; i-- > 0; )
|
|
1857
|
+
n._listeners[i](s);
|
|
1858
|
+
n._listeners = null;
|
|
1859
|
+
}), this.promise.then = (s) => {
|
|
1860
|
+
let i;
|
|
1861
|
+
const o = new Promise((c) => {
|
|
1862
|
+
n.subscribe(c), i = c;
|
|
1863
|
+
}).then(s);
|
|
1864
|
+
return o.cancel = function() {
|
|
1865
|
+
n.unsubscribe(i);
|
|
1866
|
+
}, o;
|
|
1867
|
+
}, t(function(i, o, c) {
|
|
1868
|
+
n.reason || (n.reason = new G(i, o, c), r(n.reason));
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1873
|
+
*/
|
|
1874
|
+
throwIfRequested() {
|
|
1875
|
+
if (this.reason)
|
|
1876
|
+
throw this.reason;
|
|
1877
|
+
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Subscribe to the cancel signal
|
|
1880
|
+
*/
|
|
1881
|
+
subscribe(t) {
|
|
1882
|
+
if (this.reason) {
|
|
1883
|
+
t(this.reason);
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1887
|
+
}
|
|
1888
|
+
/**
|
|
1889
|
+
* Unsubscribe from the cancel signal
|
|
1890
|
+
*/
|
|
1891
|
+
unsubscribe(t) {
|
|
1892
|
+
if (!this._listeners)
|
|
1893
|
+
return;
|
|
1894
|
+
const r = this._listeners.indexOf(t);
|
|
1895
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
1896
|
+
}
|
|
1897
|
+
toAbortSignal() {
|
|
1898
|
+
const t = new AbortController(), r = (n) => {
|
|
1899
|
+
t.abort(n);
|
|
1900
|
+
};
|
|
1901
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1905
|
+
* cancels the `CancelToken`.
|
|
1906
|
+
*/
|
|
1907
|
+
static source() {
|
|
1908
|
+
let t;
|
|
1909
|
+
return {
|
|
1910
|
+
token: new gt(function(s) {
|
|
1911
|
+
t = s;
|
|
1912
|
+
}),
|
|
1913
|
+
cancel: t
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
function an(e) {
|
|
1918
|
+
return function(r) {
|
|
1919
|
+
return e.apply(null, r);
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
function cn(e) {
|
|
1923
|
+
return a.isObject(e) && e.isAxiosError === !0;
|
|
1924
|
+
}
|
|
1925
|
+
const ke = {
|
|
1926
|
+
Continue: 100,
|
|
1927
|
+
SwitchingProtocols: 101,
|
|
1928
|
+
Processing: 102,
|
|
1929
|
+
EarlyHints: 103,
|
|
1930
|
+
Ok: 200,
|
|
1931
|
+
Created: 201,
|
|
1932
|
+
Accepted: 202,
|
|
1933
|
+
NonAuthoritativeInformation: 203,
|
|
1934
|
+
NoContent: 204,
|
|
1935
|
+
ResetContent: 205,
|
|
1936
|
+
PartialContent: 206,
|
|
1937
|
+
MultiStatus: 207,
|
|
1938
|
+
AlreadyReported: 208,
|
|
1939
|
+
ImUsed: 226,
|
|
1940
|
+
MultipleChoices: 300,
|
|
1941
|
+
MovedPermanently: 301,
|
|
1942
|
+
Found: 302,
|
|
1943
|
+
SeeOther: 303,
|
|
1944
|
+
NotModified: 304,
|
|
1945
|
+
UseProxy: 305,
|
|
1946
|
+
Unused: 306,
|
|
1947
|
+
TemporaryRedirect: 307,
|
|
1948
|
+
PermanentRedirect: 308,
|
|
1949
|
+
BadRequest: 400,
|
|
1950
|
+
Unauthorized: 401,
|
|
1951
|
+
PaymentRequired: 402,
|
|
1952
|
+
Forbidden: 403,
|
|
1953
|
+
NotFound: 404,
|
|
1954
|
+
MethodNotAllowed: 405,
|
|
1955
|
+
NotAcceptable: 406,
|
|
1956
|
+
ProxyAuthenticationRequired: 407,
|
|
1957
|
+
RequestTimeout: 408,
|
|
1958
|
+
Conflict: 409,
|
|
1959
|
+
Gone: 410,
|
|
1960
|
+
LengthRequired: 411,
|
|
1961
|
+
PreconditionFailed: 412,
|
|
1962
|
+
PayloadTooLarge: 413,
|
|
1963
|
+
UriTooLong: 414,
|
|
1964
|
+
UnsupportedMediaType: 415,
|
|
1965
|
+
RangeNotSatisfiable: 416,
|
|
1966
|
+
ExpectationFailed: 417,
|
|
1967
|
+
ImATeapot: 418,
|
|
1968
|
+
MisdirectedRequest: 421,
|
|
1969
|
+
UnprocessableEntity: 422,
|
|
1970
|
+
Locked: 423,
|
|
1971
|
+
FailedDependency: 424,
|
|
1972
|
+
TooEarly: 425,
|
|
1973
|
+
UpgradeRequired: 426,
|
|
1974
|
+
PreconditionRequired: 428,
|
|
1975
|
+
TooManyRequests: 429,
|
|
1976
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1977
|
+
UnavailableForLegalReasons: 451,
|
|
1978
|
+
InternalServerError: 500,
|
|
1979
|
+
NotImplemented: 501,
|
|
1980
|
+
BadGateway: 502,
|
|
1981
|
+
ServiceUnavailable: 503,
|
|
1982
|
+
GatewayTimeout: 504,
|
|
1983
|
+
HttpVersionNotSupported: 505,
|
|
1984
|
+
VariantAlsoNegotiates: 506,
|
|
1985
|
+
InsufficientStorage: 507,
|
|
1986
|
+
LoopDetected: 508,
|
|
1987
|
+
NotExtended: 510,
|
|
1988
|
+
NetworkAuthenticationRequired: 511
|
|
1989
|
+
};
|
|
1990
|
+
Object.entries(ke).forEach(([e, t]) => {
|
|
1991
|
+
ke[t] = e;
|
|
1992
|
+
});
|
|
1993
|
+
function Tt(e) {
|
|
1994
|
+
const t = new J(e), r = et(J.prototype.request, t);
|
|
1995
|
+
return a.extend(r, J.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1996
|
+
return Tt(V(e, s));
|
|
1997
|
+
}, r;
|
|
1998
|
+
}
|
|
1999
|
+
const O = Tt(ae);
|
|
2000
|
+
O.Axios = J;
|
|
2001
|
+
O.CanceledError = G;
|
|
2002
|
+
O.CancelToken = on;
|
|
2003
|
+
O.isCancel = mt;
|
|
2004
|
+
O.VERSION = St;
|
|
2005
|
+
O.toFormData = Re;
|
|
2006
|
+
O.AxiosError = E;
|
|
2007
|
+
O.Cancel = O.CanceledError;
|
|
2008
|
+
O.all = function(t) {
|
|
2009
|
+
return Promise.all(t);
|
|
2010
|
+
};
|
|
2011
|
+
O.spread = an;
|
|
2012
|
+
O.isAxiosError = cn;
|
|
2013
|
+
O.mergeConfig = V;
|
|
2014
|
+
O.AxiosHeaders = F;
|
|
2015
|
+
O.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2016
|
+
O.getAdapter = Rt.getAdapter;
|
|
2017
|
+
O.HttpStatusCode = ke;
|
|
2018
|
+
O.default = O;
|
|
2019
|
+
const {
|
|
2020
|
+
Axios: mn,
|
|
2021
|
+
AxiosError: bn,
|
|
2022
|
+
CanceledError: yn,
|
|
2023
|
+
isCancel: En,
|
|
2024
|
+
CancelToken: wn,
|
|
2025
|
+
VERSION: Rn,
|
|
2026
|
+
all: Sn,
|
|
2027
|
+
Cancel: gn,
|
|
2028
|
+
isAxiosError: Tn,
|
|
2029
|
+
spread: On,
|
|
2030
|
+
toFormData: An,
|
|
2031
|
+
AxiosHeaders: _n,
|
|
2032
|
+
HttpStatusCode: xn,
|
|
2033
|
+
formToJSON: Cn,
|
|
2034
|
+
getAdapter: Pn,
|
|
2035
|
+
mergeConfig: Nn
|
|
2036
|
+
} = O;
|
|
2037
|
+
function ln({
|
|
2038
|
+
baseURL: e,
|
|
2039
|
+
getToken: t,
|
|
2040
|
+
timeoutMs: r = 15e3,
|
|
2041
|
+
axiosInstance: n,
|
|
2042
|
+
currency: s,
|
|
2043
|
+
lng: i,
|
|
2044
|
+
onError: o
|
|
2045
|
+
} = {}) {
|
|
2046
|
+
const c = n ?? O.create({
|
|
2047
|
+
baseURL: e,
|
|
2048
|
+
timeout: r,
|
|
2049
|
+
headers: { "Content-Type": "application/json" }
|
|
2050
|
+
});
|
|
2051
|
+
return c.interceptors.request.use(async (p) => {
|
|
2052
|
+
if (t) {
|
|
2053
|
+
const f = await t();
|
|
2054
|
+
f && (p.headers = p.headers || {}, p.headers.Authorization = `Bearer ${f}`);
|
|
2055
|
+
}
|
|
2056
|
+
return p;
|
|
2057
|
+
}), c.interceptors.request.use((p) => {
|
|
2058
|
+
p.headers.Currency = s, p.headers["currency-code"] = s, p.headers.lang = i;
|
|
2059
|
+
}), c.interceptors.response.use(
|
|
2060
|
+
(p) => p,
|
|
2061
|
+
(p) => o ? o(p, { instance: c }) : Promise.reject(p)
|
|
2062
|
+
), c;
|
|
2063
|
+
}
|
|
2064
|
+
function kn({ children: e, ...t }) {
|
|
2065
|
+
const r = Ct(() => ln(t), [t]);
|
|
2066
|
+
return /* @__PURE__ */ jt.jsx(ApiCtx.Provider, { value: { client: r }, children: e });
|
|
2067
|
+
}
|
|
2068
|
+
export {
|
|
2069
|
+
kn as ApiProvider,
|
|
2070
|
+
dn as useAxios
|
|
2071
|
+
};
|