vbss-translator 1.1.0 → 1.1.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/README.md +17 -21
- package/dist/cli/index.js +1 -1
- package/dist/vbss-translator.js +1592 -1411
- package/dist/vbss-translator.umd.cjs +18 -15
- package/package.json +111 -90
package/dist/vbss-translator.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var te = (t, e, r) =>
|
|
4
|
-
import
|
|
5
|
-
var qe = { exports: {} },
|
|
1
|
+
var en = Object.defineProperty;
|
|
2
|
+
var tn = (t, e, r) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var te = (t, e, r) => tn(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import ar, { createContext as rn, useContext as nn, useMemo as ce, useState as Be, useEffect as lt, useCallback as $e, useRef as sn, startTransition as on } from "react";
|
|
5
|
+
var qe = { exports: {} }, Se = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.min.js
|
|
@@ -12,21 +12,21 @@ var qe = { exports: {} }, Ae = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
var t =
|
|
20
|
-
function
|
|
21
|
-
var u, h = {},
|
|
22
|
-
|
|
23
|
-
for (u in
|
|
24
|
-
if (l && l.defaultProps) for (u in
|
|
25
|
-
return { $$typeof: e, type: l, key:
|
|
26
|
-
}
|
|
27
|
-
return
|
|
15
|
+
var Ut;
|
|
16
|
+
function an() {
|
|
17
|
+
if (Ut) return Se;
|
|
18
|
+
Ut = 1;
|
|
19
|
+
var t = ar, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
+
function i(l, f, d) {
|
|
21
|
+
var u, h = {}, _ = null, k = null;
|
|
22
|
+
d !== void 0 && (_ = "" + d), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
23
|
+
for (u in f) n.call(f, u) && !a.hasOwnProperty(u) && (h[u] = f[u]);
|
|
24
|
+
if (l && l.defaultProps) for (u in f = l.defaultProps, f) h[u] === void 0 && (h[u] = f[u]);
|
|
25
|
+
return { $$typeof: e, type: l, key: _, ref: k, props: h, _owner: s.current };
|
|
26
|
+
}
|
|
27
|
+
return Se.Fragment = r, Se.jsx = i, Se.jsxs = i, Se;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var Ae = {};
|
|
30
30
|
/**
|
|
31
31
|
* @license React
|
|
32
32
|
* react-jsx-runtime.development.js
|
|
@@ -36,57 +36,57 @@ var Ce = {};
|
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
38
|
*/
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
var t =
|
|
43
|
-
function
|
|
39
|
+
var It;
|
|
40
|
+
function ln() {
|
|
41
|
+
return It || (It = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
42
|
+
var t = ar, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), m = Symbol.iterator, y = "@@iterator";
|
|
43
|
+
function g(o) {
|
|
44
44
|
if (o === null || typeof o != "object")
|
|
45
45
|
return null;
|
|
46
|
-
var p =
|
|
46
|
+
var p = m && o[m] || o[y];
|
|
47
47
|
return typeof p == "function" ? p : null;
|
|
48
48
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
49
|
+
var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
50
|
+
function L(o) {
|
|
51
51
|
{
|
|
52
|
-
for (var p = arguments.length,
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
for (var p = arguments.length, E = new Array(p > 1 ? p - 1 : 0), v = 1; v < p; v++)
|
|
53
|
+
E[v - 1] = arguments[v];
|
|
54
|
+
D("error", o, E);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function D(o, p, E) {
|
|
58
58
|
{
|
|
59
|
-
var v =
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
return String(
|
|
59
|
+
var v = A.ReactDebugCurrentFrame, P = v.getStackAddendum();
|
|
60
|
+
P !== "" && (p += "%s", E = E.concat([P]));
|
|
61
|
+
var F = E.map(function(S) {
|
|
62
|
+
return String(S);
|
|
63
63
|
});
|
|
64
|
-
|
|
64
|
+
F.unshift("Warning: " + p), Function.prototype.apply.call(console[o], console, F);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
var
|
|
67
|
+
var C = !1, $ = !1, se = !1, q = !1, W = !1, Z;
|
|
68
68
|
Z = Symbol.for("react.module.reference");
|
|
69
69
|
function fe(o) {
|
|
70
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o ===
|
|
70
|
+
return !!(typeof o == "string" || typeof o == "function" || o === n || o === a || W || o === s || o === d || o === u || q || o === k || C || $ || se || typeof o == "object" && o !== null && (o.$$typeof === _ || o.$$typeof === h || o.$$typeof === i || o.$$typeof === l || o.$$typeof === f || // This needs to include all possible module reference object
|
|
71
71
|
// types supported by any Flight configuration anywhere since
|
|
72
72
|
// we don't know which Flight build this will end up being used
|
|
73
73
|
// with.
|
|
74
74
|
o.$$typeof === Z || o.getModuleId !== void 0));
|
|
75
75
|
}
|
|
76
|
-
function le(o, p,
|
|
76
|
+
function le(o, p, E) {
|
|
77
77
|
var v = o.displayName;
|
|
78
78
|
if (v)
|
|
79
79
|
return v;
|
|
80
|
-
var
|
|
81
|
-
return
|
|
80
|
+
var P = p.displayName || p.name || "";
|
|
81
|
+
return P !== "" ? E + "(" + P + ")" : E;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ie(o) {
|
|
84
84
|
return o.displayName || "Context";
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function H(o) {
|
|
87
87
|
if (o == null)
|
|
88
88
|
return null;
|
|
89
|
-
if (typeof o.tag == "number" &&
|
|
89
|
+
if (typeof o.tag == "number" && L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
90
90
|
return o.displayName || o.name || null;
|
|
91
91
|
if (typeof o == "string")
|
|
92
92
|
return o;
|
|
@@ -95,11 +95,11 @@ function an() {
|
|
|
95
95
|
return "Fragment";
|
|
96
96
|
case r:
|
|
97
97
|
return "Portal";
|
|
98
|
-
case
|
|
98
|
+
case a:
|
|
99
99
|
return "Profiler";
|
|
100
100
|
case s:
|
|
101
101
|
return "StrictMode";
|
|
102
|
-
case
|
|
102
|
+
case d:
|
|
103
103
|
return "Suspense";
|
|
104
104
|
case u:
|
|
105
105
|
return "SuspenseList";
|
|
@@ -108,19 +108,19 @@ function an() {
|
|
|
108
108
|
switch (o.$$typeof) {
|
|
109
109
|
case l:
|
|
110
110
|
var p = o;
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
var
|
|
114
|
-
return
|
|
115
|
-
case
|
|
111
|
+
return ie(p) + ".Consumer";
|
|
112
|
+
case i:
|
|
113
|
+
var E = o;
|
|
114
|
+
return ie(E._context) + ".Provider";
|
|
115
|
+
case f:
|
|
116
116
|
return le(o, o.render, "ForwardRef");
|
|
117
117
|
case h:
|
|
118
118
|
var v = o.displayName || null;
|
|
119
|
-
return v !== null ? v :
|
|
120
|
-
case
|
|
121
|
-
var
|
|
119
|
+
return v !== null ? v : H(o.type) || "Memo";
|
|
120
|
+
case _: {
|
|
121
|
+
var P = o, F = P._payload, S = P._init;
|
|
122
122
|
try {
|
|
123
|
-
return
|
|
123
|
+
return H(S(F));
|
|
124
124
|
} catch {
|
|
125
125
|
return null;
|
|
126
126
|
}
|
|
@@ -128,18 +128,18 @@ function an() {
|
|
|
128
128
|
}
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
131
|
+
var K = Object.assign, b = 0, R, x, T, N, oe, U, M;
|
|
132
|
+
function J() {
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
J.__reactDisabledLog = !0;
|
|
135
135
|
function ue() {
|
|
136
136
|
{
|
|
137
|
-
if (
|
|
138
|
-
|
|
137
|
+
if (b === 0) {
|
|
138
|
+
R = console.log, x = console.info, T = console.warn, N = console.error, oe = console.group, U = console.groupCollapsed, M = console.groupEnd;
|
|
139
139
|
var o = {
|
|
140
140
|
configurable: !0,
|
|
141
141
|
enumerable: !0,
|
|
142
|
-
value:
|
|
142
|
+
value: J,
|
|
143
143
|
writable: !0
|
|
144
144
|
};
|
|
145
145
|
Object.defineProperties(console, {
|
|
@@ -152,52 +152,52 @@ function an() {
|
|
|
152
152
|
groupEnd: o
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
b++;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
function de() {
|
|
159
159
|
{
|
|
160
|
-
if (
|
|
160
|
+
if (b--, b === 0) {
|
|
161
161
|
var o = {
|
|
162
162
|
configurable: !0,
|
|
163
163
|
enumerable: !0,
|
|
164
164
|
writable: !0
|
|
165
165
|
};
|
|
166
166
|
Object.defineProperties(console, {
|
|
167
|
-
log:
|
|
168
|
-
value: T
|
|
169
|
-
}),
|
|
170
|
-
info: q({}, o, {
|
|
167
|
+
log: K({}, o, {
|
|
171
168
|
value: R
|
|
172
169
|
}),
|
|
173
|
-
|
|
174
|
-
value:
|
|
170
|
+
info: K({}, o, {
|
|
171
|
+
value: x
|
|
175
172
|
}),
|
|
176
|
-
|
|
177
|
-
value:
|
|
173
|
+
warn: K({}, o, {
|
|
174
|
+
value: T
|
|
178
175
|
}),
|
|
179
|
-
|
|
180
|
-
value:
|
|
176
|
+
error: K({}, o, {
|
|
177
|
+
value: N
|
|
181
178
|
}),
|
|
182
|
-
|
|
183
|
-
value:
|
|
179
|
+
group: K({}, o, {
|
|
180
|
+
value: oe
|
|
184
181
|
}),
|
|
185
|
-
|
|
182
|
+
groupCollapsed: K({}, o, {
|
|
183
|
+
value: U
|
|
184
|
+
}),
|
|
185
|
+
groupEnd: K({}, o, {
|
|
186
186
|
value: M
|
|
187
187
|
})
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
b < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
function be(o, p,
|
|
193
|
+
var je = A.ReactCurrentDispatcher, xe;
|
|
194
|
+
function be(o, p, E) {
|
|
195
195
|
{
|
|
196
196
|
if (xe === void 0)
|
|
197
197
|
try {
|
|
198
198
|
throw Error();
|
|
199
|
-
} catch (
|
|
200
|
-
var v =
|
|
199
|
+
} catch (P) {
|
|
200
|
+
var v = P.stack.trim().match(/\n( *(at )?)/);
|
|
201
201
|
xe = v && v[1] || "";
|
|
202
202
|
}
|
|
203
203
|
return `
|
|
@@ -213,147 +213,147 @@ function an() {
|
|
|
213
213
|
if (!o || ee)
|
|
214
214
|
return "";
|
|
215
215
|
{
|
|
216
|
-
var
|
|
217
|
-
if (
|
|
218
|
-
return
|
|
216
|
+
var E = he.get(o);
|
|
217
|
+
if (E !== void 0)
|
|
218
|
+
return E;
|
|
219
219
|
}
|
|
220
220
|
var v;
|
|
221
221
|
ee = !0;
|
|
222
|
-
var
|
|
222
|
+
var P = Error.prepareStackTrace;
|
|
223
223
|
Error.prepareStackTrace = void 0;
|
|
224
|
-
var
|
|
225
|
-
|
|
224
|
+
var F;
|
|
225
|
+
F = je.current, je.current = null, ue();
|
|
226
226
|
try {
|
|
227
227
|
if (p) {
|
|
228
|
-
var
|
|
228
|
+
var S = function() {
|
|
229
229
|
throw Error();
|
|
230
230
|
};
|
|
231
|
-
if (Object.defineProperty(
|
|
231
|
+
if (Object.defineProperty(S.prototype, "props", {
|
|
232
232
|
set: function() {
|
|
233
233
|
throw Error();
|
|
234
234
|
}
|
|
235
235
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
236
|
try {
|
|
237
|
-
Reflect.construct(
|
|
238
|
-
} catch (
|
|
239
|
-
v =
|
|
237
|
+
Reflect.construct(S, []);
|
|
238
|
+
} catch (Y) {
|
|
239
|
+
v = Y;
|
|
240
240
|
}
|
|
241
|
-
Reflect.construct(o, [],
|
|
241
|
+
Reflect.construct(o, [], S);
|
|
242
242
|
} else {
|
|
243
243
|
try {
|
|
244
|
-
|
|
245
|
-
} catch (
|
|
246
|
-
v =
|
|
244
|
+
S.call();
|
|
245
|
+
} catch (Y) {
|
|
246
|
+
v = Y;
|
|
247
247
|
}
|
|
248
|
-
o.call(
|
|
248
|
+
o.call(S.prototype);
|
|
249
249
|
}
|
|
250
250
|
} else {
|
|
251
251
|
try {
|
|
252
252
|
throw Error();
|
|
253
|
-
} catch (
|
|
254
|
-
v =
|
|
253
|
+
} catch (Y) {
|
|
254
|
+
v = Y;
|
|
255
255
|
}
|
|
256
256
|
o();
|
|
257
257
|
}
|
|
258
|
-
} catch (
|
|
259
|
-
if (
|
|
260
|
-
for (var
|
|
261
|
-
`),
|
|
262
|
-
`),
|
|
263
|
-
|
|
264
|
-
for (;
|
|
265
|
-
if (
|
|
266
|
-
if (
|
|
258
|
+
} catch (Y) {
|
|
259
|
+
if (Y && v && typeof Y.stack == "string") {
|
|
260
|
+
for (var O = Y.stack.split(`
|
|
261
|
+
`), z = v.stack.split(`
|
|
262
|
+
`), I = O.length - 1, B = z.length - 1; I >= 1 && B >= 0 && O[I] !== z[B]; )
|
|
263
|
+
B--;
|
|
264
|
+
for (; I >= 1 && B >= 0; I--, B--)
|
|
265
|
+
if (O[I] !== z[B]) {
|
|
266
|
+
if (I !== 1 || B !== 1)
|
|
267
267
|
do
|
|
268
|
-
if (
|
|
268
|
+
if (I--, B--, B < 0 || O[I] !== z[B]) {
|
|
269
269
|
var re = `
|
|
270
|
-
` +
|
|
270
|
+
` + O[I].replace(" at new ", " at ");
|
|
271
271
|
return o.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", o.displayName)), typeof o == "function" && he.set(o, re), re;
|
|
272
272
|
}
|
|
273
|
-
while (
|
|
273
|
+
while (I >= 1 && B >= 0);
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
} finally {
|
|
278
|
-
ee = !1,
|
|
278
|
+
ee = !1, je.current = F, de(), Error.prepareStackTrace = P;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
280
|
+
var Re = o ? o.displayName || o.name : "", pe = Re ? be(Re) : "";
|
|
281
281
|
return typeof o == "function" && he.set(o, pe), pe;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function rt(o, p, E) {
|
|
284
284
|
return Ee(o, !1);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function kr(o) {
|
|
287
287
|
var p = o.prototype;
|
|
288
288
|
return !!(p && p.isReactComponent);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Ie(o, p, E) {
|
|
291
291
|
if (o == null)
|
|
292
292
|
return "";
|
|
293
293
|
if (typeof o == "function")
|
|
294
|
-
return Ee(o,
|
|
294
|
+
return Ee(o, kr(o));
|
|
295
295
|
if (typeof o == "string")
|
|
296
296
|
return be(o);
|
|
297
297
|
switch (o) {
|
|
298
|
-
case
|
|
298
|
+
case d:
|
|
299
299
|
return be("Suspense");
|
|
300
300
|
case u:
|
|
301
301
|
return be("SuspenseList");
|
|
302
302
|
}
|
|
303
303
|
if (typeof o == "object")
|
|
304
304
|
switch (o.$$typeof) {
|
|
305
|
-
case
|
|
306
|
-
return
|
|
305
|
+
case f:
|
|
306
|
+
return rt(o.render);
|
|
307
307
|
case h:
|
|
308
|
-
return
|
|
309
|
-
case
|
|
310
|
-
var v = o,
|
|
308
|
+
return Ie(o.type, p, E);
|
|
309
|
+
case _: {
|
|
310
|
+
var v = o, P = v._payload, F = v._init;
|
|
311
311
|
try {
|
|
312
|
-
return
|
|
312
|
+
return Ie(F(P), p, E);
|
|
313
313
|
} catch {
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
return "";
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
319
|
+
var Oe = Object.prototype.hasOwnProperty, vt = {}, _t = A.ReactDebugCurrentFrame;
|
|
320
|
+
function Me(o) {
|
|
321
321
|
if (o) {
|
|
322
|
-
var p = o._owner,
|
|
323
|
-
_t.setExtraStackFrame(
|
|
322
|
+
var p = o._owner, E = Ie(o.type, o._source, p ? p.type : null);
|
|
323
|
+
_t.setExtraStackFrame(E);
|
|
324
324
|
} else
|
|
325
325
|
_t.setExtraStackFrame(null);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Lr(o, p, E, v, P) {
|
|
328
328
|
{
|
|
329
|
-
var
|
|
330
|
-
for (var
|
|
331
|
-
if (
|
|
332
|
-
var
|
|
329
|
+
var F = Function.call.bind(Oe);
|
|
330
|
+
for (var S in o)
|
|
331
|
+
if (F(o, S)) {
|
|
332
|
+
var O = void 0;
|
|
333
333
|
try {
|
|
334
|
-
if (typeof o[
|
|
335
|
-
var
|
|
336
|
-
throw
|
|
334
|
+
if (typeof o[S] != "function") {
|
|
335
|
+
var z = Error((v || "React class") + ": " + E + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
336
|
+
throw z.name = "Invariant Violation", z;
|
|
337
337
|
}
|
|
338
|
-
|
|
339
|
-
} catch (
|
|
340
|
-
|
|
338
|
+
O = o[S](p, S, v, E, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
339
|
+
} catch (I) {
|
|
340
|
+
O = I;
|
|
341
341
|
}
|
|
342
|
-
|
|
342
|
+
O && !(O instanceof Error) && (Me(P), L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", E, S, typeof O), Me(null)), O instanceof Error && !(O.message in vt) && (vt[O.message] = !0, Me(P), L("Failed %s type: %s", E, O.message), Me(null));
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
function
|
|
348
|
-
return
|
|
346
|
+
var Dr = Array.isArray;
|
|
347
|
+
function nt(o) {
|
|
348
|
+
return Dr(o);
|
|
349
349
|
}
|
|
350
350
|
function Fr(o) {
|
|
351
351
|
{
|
|
352
|
-
var p = typeof Symbol == "function" && Symbol.toStringTag,
|
|
353
|
-
return
|
|
352
|
+
var p = typeof Symbol == "function" && Symbol.toStringTag, E = p && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
353
|
+
return E;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function Nr(o) {
|
|
357
357
|
try {
|
|
358
358
|
return xt(o), !1;
|
|
359
359
|
} catch {
|
|
@@ -363,27 +363,26 @@ function an() {
|
|
|
363
363
|
function xt(o) {
|
|
364
364
|
return "" + o;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
if (
|
|
368
|
-
return
|
|
366
|
+
function Ot(o) {
|
|
367
|
+
if (Nr(o))
|
|
368
|
+
return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Fr(o)), xt(o);
|
|
369
369
|
}
|
|
370
|
-
var
|
|
370
|
+
var St = A.ReactCurrentOwner, jr = {
|
|
371
371
|
key: !0,
|
|
372
372
|
ref: !0,
|
|
373
373
|
__self: !0,
|
|
374
374
|
__source: !0
|
|
375
|
-
},
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
if (Se.call(o, "ref")) {
|
|
375
|
+
}, At, Ct;
|
|
376
|
+
function Ur(o) {
|
|
377
|
+
if (Oe.call(o, "ref")) {
|
|
379
378
|
var p = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
380
379
|
if (p && p.isReactWarning)
|
|
381
380
|
return !1;
|
|
382
381
|
}
|
|
383
382
|
return o.ref !== void 0;
|
|
384
383
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
384
|
+
function Ir(o) {
|
|
385
|
+
if (Oe.call(o, "key")) {
|
|
387
386
|
var p = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
388
387
|
if (p && p.isReactWarning)
|
|
389
388
|
return !1;
|
|
@@ -391,97 +390,94 @@ function an() {
|
|
|
391
390
|
return o.key !== void 0;
|
|
392
391
|
}
|
|
393
392
|
function Mr(o, p) {
|
|
394
|
-
|
|
395
|
-
var m = B(Oe.current.type);
|
|
396
|
-
nt[m] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(Oe.current.type), o.ref), nt[m] = !0);
|
|
397
|
-
}
|
|
393
|
+
typeof o.ref == "string" && St.current;
|
|
398
394
|
}
|
|
399
|
-
function
|
|
395
|
+
function Br(o, p) {
|
|
400
396
|
{
|
|
401
|
-
var
|
|
402
|
-
|
|
397
|
+
var E = function() {
|
|
398
|
+
At || (At = !0, L("%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://reactjs.org/link/special-props)", p));
|
|
403
399
|
};
|
|
404
|
-
|
|
405
|
-
get:
|
|
400
|
+
E.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
401
|
+
get: E,
|
|
406
402
|
configurable: !0
|
|
407
403
|
});
|
|
408
404
|
}
|
|
409
405
|
}
|
|
410
|
-
function
|
|
406
|
+
function $r(o, p) {
|
|
411
407
|
{
|
|
412
|
-
var
|
|
413
|
-
|
|
408
|
+
var E = function() {
|
|
409
|
+
Ct || (Ct = !0, L("%s: `ref` 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://reactjs.org/link/special-props)", p));
|
|
414
410
|
};
|
|
415
|
-
|
|
416
|
-
get:
|
|
411
|
+
E.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
412
|
+
get: E,
|
|
417
413
|
configurable: !0
|
|
418
414
|
});
|
|
419
415
|
}
|
|
420
416
|
}
|
|
421
|
-
var
|
|
422
|
-
var
|
|
417
|
+
var qr = function(o, p, E, v, P, F, S) {
|
|
418
|
+
var O = {
|
|
423
419
|
// This tag allows us to uniquely identify this as a React Element
|
|
424
420
|
$$typeof: e,
|
|
425
421
|
// Built-in properties that belong on the element
|
|
426
422
|
type: o,
|
|
427
423
|
key: p,
|
|
428
|
-
ref:
|
|
429
|
-
props:
|
|
424
|
+
ref: E,
|
|
425
|
+
props: S,
|
|
430
426
|
// Record the component responsible for creating this element.
|
|
431
|
-
_owner:
|
|
427
|
+
_owner: F
|
|
432
428
|
};
|
|
433
|
-
return
|
|
429
|
+
return O._store = {}, Object.defineProperty(O._store, "validated", {
|
|
434
430
|
configurable: !1,
|
|
435
431
|
enumerable: !1,
|
|
436
432
|
writable: !0,
|
|
437
433
|
value: !1
|
|
438
|
-
}), Object.defineProperty(
|
|
434
|
+
}), Object.defineProperty(O, "_self", {
|
|
439
435
|
configurable: !1,
|
|
440
436
|
enumerable: !1,
|
|
441
437
|
writable: !1,
|
|
442
438
|
value: v
|
|
443
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(O, "_source", {
|
|
444
440
|
configurable: !1,
|
|
445
441
|
enumerable: !1,
|
|
446
442
|
writable: !1,
|
|
447
|
-
value:
|
|
448
|
-
}), Object.freeze && (Object.freeze(
|
|
443
|
+
value: P
|
|
444
|
+
}), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
|
|
449
445
|
};
|
|
450
|
-
function
|
|
446
|
+
function Hr(o, p, E, v, P) {
|
|
451
447
|
{
|
|
452
|
-
var
|
|
453
|
-
|
|
454
|
-
for (
|
|
455
|
-
|
|
448
|
+
var F, S = {}, O = null, z = null;
|
|
449
|
+
E !== void 0 && (Ot(E), O = "" + E), Ir(p) && (Ot(p.key), O = "" + p.key), Ur(p) && (z = p.ref, Mr(p, P));
|
|
450
|
+
for (F in p)
|
|
451
|
+
Oe.call(p, F) && !jr.hasOwnProperty(F) && (S[F] = p[F]);
|
|
456
452
|
if (o && o.defaultProps) {
|
|
457
|
-
var
|
|
458
|
-
for (
|
|
459
|
-
|
|
453
|
+
var I = o.defaultProps;
|
|
454
|
+
for (F in I)
|
|
455
|
+
S[F] === void 0 && (S[F] = I[F]);
|
|
460
456
|
}
|
|
461
|
-
if (
|
|
462
|
-
var
|
|
463
|
-
|
|
457
|
+
if (O || z) {
|
|
458
|
+
var B = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
459
|
+
O && Br(S, B), z && $r(S, B);
|
|
464
460
|
}
|
|
465
|
-
return
|
|
461
|
+
return qr(o, O, z, P, v, St.current, S);
|
|
466
462
|
}
|
|
467
463
|
}
|
|
468
|
-
var st =
|
|
464
|
+
var st = A.ReactCurrentOwner, Pt = A.ReactDebugCurrentFrame;
|
|
469
465
|
function we(o) {
|
|
470
466
|
if (o) {
|
|
471
|
-
var p = o._owner,
|
|
472
|
-
|
|
467
|
+
var p = o._owner, E = Ie(o.type, o._source, p ? p.type : null);
|
|
468
|
+
Pt.setExtraStackFrame(E);
|
|
473
469
|
} else
|
|
474
|
-
|
|
470
|
+
Pt.setExtraStackFrame(null);
|
|
475
471
|
}
|
|
476
472
|
var ot;
|
|
477
473
|
ot = !1;
|
|
478
474
|
function at(o) {
|
|
479
475
|
return typeof o == "object" && o !== null && o.$$typeof === e;
|
|
480
476
|
}
|
|
481
|
-
function
|
|
477
|
+
function kt() {
|
|
482
478
|
{
|
|
483
479
|
if (st.current) {
|
|
484
|
-
var o =
|
|
480
|
+
var o = H(st.current.type);
|
|
485
481
|
if (o)
|
|
486
482
|
return `
|
|
487
483
|
|
|
@@ -493,170 +489,170 @@ Check the render method of \`` + o + "`.";
|
|
|
493
489
|
function Kr(o) {
|
|
494
490
|
return "";
|
|
495
491
|
}
|
|
496
|
-
var
|
|
497
|
-
function
|
|
492
|
+
var Lt = {};
|
|
493
|
+
function Vr(o) {
|
|
498
494
|
{
|
|
499
|
-
var p =
|
|
495
|
+
var p = kt();
|
|
500
496
|
if (!p) {
|
|
501
|
-
var
|
|
502
|
-
|
|
497
|
+
var E = typeof o == "string" ? o : o.displayName || o.name;
|
|
498
|
+
E && (p = `
|
|
503
499
|
|
|
504
|
-
Check the top-level render call using <` +
|
|
500
|
+
Check the top-level render call using <` + E + ">.");
|
|
505
501
|
}
|
|
506
502
|
return p;
|
|
507
503
|
}
|
|
508
504
|
}
|
|
509
|
-
function
|
|
505
|
+
function Dt(o, p) {
|
|
510
506
|
{
|
|
511
507
|
if (!o._store || o._store.validated || o.key != null)
|
|
512
508
|
return;
|
|
513
509
|
o._store.validated = !0;
|
|
514
|
-
var
|
|
515
|
-
if (
|
|
510
|
+
var E = Vr(p);
|
|
511
|
+
if (Lt[E])
|
|
516
512
|
return;
|
|
517
|
-
|
|
513
|
+
Lt[E] = !0;
|
|
518
514
|
var v = "";
|
|
519
|
-
o && o._owner && o._owner !== st.current && (v = " It was passed a child from " +
|
|
515
|
+
o && o._owner && o._owner !== st.current && (v = " It was passed a child from " + H(o._owner.type) + "."), we(o), L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, v), we(null);
|
|
520
516
|
}
|
|
521
517
|
}
|
|
522
518
|
function Ft(o, p) {
|
|
523
519
|
{
|
|
524
520
|
if (typeof o != "object")
|
|
525
521
|
return;
|
|
526
|
-
if (
|
|
527
|
-
for (var
|
|
528
|
-
var v = o[
|
|
529
|
-
at(v) &&
|
|
522
|
+
if (nt(o))
|
|
523
|
+
for (var E = 0; E < o.length; E++) {
|
|
524
|
+
var v = o[E];
|
|
525
|
+
at(v) && Dt(v, p);
|
|
530
526
|
}
|
|
531
527
|
else if (at(o))
|
|
532
528
|
o._store && (o._store.validated = !0);
|
|
533
529
|
else if (o) {
|
|
534
|
-
var
|
|
535
|
-
if (typeof
|
|
536
|
-
for (var
|
|
537
|
-
at(
|
|
530
|
+
var P = g(o);
|
|
531
|
+
if (typeof P == "function" && P !== o.entries)
|
|
532
|
+
for (var F = P.call(o), S; !(S = F.next()).done; )
|
|
533
|
+
at(S.value) && Dt(S.value, p);
|
|
538
534
|
}
|
|
539
535
|
}
|
|
540
536
|
}
|
|
541
|
-
function
|
|
537
|
+
function Wr(o) {
|
|
542
538
|
{
|
|
543
539
|
var p = o.type;
|
|
544
540
|
if (p == null || typeof p == "string")
|
|
545
541
|
return;
|
|
546
|
-
var
|
|
542
|
+
var E;
|
|
547
543
|
if (typeof p == "function")
|
|
548
|
-
|
|
549
|
-
else if (typeof p == "object" && (p.$$typeof ===
|
|
544
|
+
E = p.propTypes;
|
|
545
|
+
else if (typeof p == "object" && (p.$$typeof === f || // Note: Memo only checks outer props here.
|
|
550
546
|
// Inner props are checked in the reconciler.
|
|
551
547
|
p.$$typeof === h))
|
|
552
|
-
|
|
548
|
+
E = p.propTypes;
|
|
553
549
|
else
|
|
554
550
|
return;
|
|
555
|
-
if (
|
|
556
|
-
var v =
|
|
557
|
-
|
|
551
|
+
if (E) {
|
|
552
|
+
var v = H(p);
|
|
553
|
+
Lr(E, o.props, "prop", v, o);
|
|
558
554
|
} else if (p.PropTypes !== void 0 && !ot) {
|
|
559
555
|
ot = !0;
|
|
560
|
-
var
|
|
561
|
-
|
|
556
|
+
var P = H(p);
|
|
557
|
+
L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
562
558
|
}
|
|
563
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved &&
|
|
559
|
+
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
564
560
|
}
|
|
565
561
|
}
|
|
566
|
-
function
|
|
562
|
+
function zr(o) {
|
|
567
563
|
{
|
|
568
|
-
for (var p = Object.keys(o.props),
|
|
569
|
-
var v = p[
|
|
564
|
+
for (var p = Object.keys(o.props), E = 0; E < p.length; E++) {
|
|
565
|
+
var v = p[E];
|
|
570
566
|
if (v !== "children" && v !== "key") {
|
|
571
|
-
we(o),
|
|
567
|
+
we(o), L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
|
|
572
568
|
break;
|
|
573
569
|
}
|
|
574
570
|
}
|
|
575
|
-
o.ref !== null && (we(o),
|
|
571
|
+
o.ref !== null && (we(o), L("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
576
572
|
}
|
|
577
573
|
}
|
|
578
|
-
var
|
|
579
|
-
function
|
|
574
|
+
var Nt = {};
|
|
575
|
+
function jt(o, p, E, v, P, F) {
|
|
580
576
|
{
|
|
581
|
-
var
|
|
582
|
-
if (!
|
|
583
|
-
var
|
|
584
|
-
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (
|
|
585
|
-
var
|
|
586
|
-
|
|
587
|
-
var
|
|
588
|
-
o === null ?
|
|
577
|
+
var S = fe(o);
|
|
578
|
+
if (!S) {
|
|
579
|
+
var O = "";
|
|
580
|
+
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (O += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
+
var z = Kr();
|
|
582
|
+
z ? O += z : O += kt();
|
|
583
|
+
var I;
|
|
584
|
+
o === null ? I = "null" : nt(o) ? I = "array" : o !== void 0 && o.$$typeof === e ? (I = "<" + (H(o.type) || "Unknown") + " />", O = " Did you accidentally export a JSX literal instead of a component?") : I = typeof o, L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, O);
|
|
589
585
|
}
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
592
|
-
return
|
|
593
|
-
if (
|
|
586
|
+
var B = Hr(o, p, E, P, F);
|
|
587
|
+
if (B == null)
|
|
588
|
+
return B;
|
|
589
|
+
if (S) {
|
|
594
590
|
var re = p.children;
|
|
595
591
|
if (re !== void 0)
|
|
596
592
|
if (v)
|
|
597
|
-
if (
|
|
598
|
-
for (var
|
|
599
|
-
Ft(re[
|
|
593
|
+
if (nt(re)) {
|
|
594
|
+
for (var Re = 0; Re < re.length; Re++)
|
|
595
|
+
Ft(re[Re], o);
|
|
600
596
|
Object.freeze && Object.freeze(re);
|
|
601
597
|
} else
|
|
602
|
-
|
|
598
|
+
L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
603
599
|
else
|
|
604
600
|
Ft(re, o);
|
|
605
601
|
}
|
|
606
|
-
if (
|
|
607
|
-
var pe =
|
|
608
|
-
return
|
|
609
|
-
}), it =
|
|
610
|
-
if (!
|
|
611
|
-
var
|
|
612
|
-
|
|
602
|
+
if (Oe.call(p, "key")) {
|
|
603
|
+
var pe = H(o), Y = Object.keys(p).filter(function(Zr) {
|
|
604
|
+
return Zr !== "key";
|
|
605
|
+
}), it = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
606
|
+
if (!Nt[pe + it]) {
|
|
607
|
+
var Qr = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
|
|
608
|
+
L(`A props object containing a "key" prop is being spread into JSX:
|
|
613
609
|
let props = %s;
|
|
614
610
|
<%s {...props} />
|
|
615
611
|
React keys must be passed directly to JSX without using spread:
|
|
616
612
|
let props = %s;
|
|
617
|
-
<%s key={someKey} {...props} />`, it, pe,
|
|
613
|
+
<%s key={someKey} {...props} />`, it, pe, Qr, pe), Nt[pe + it] = !0;
|
|
618
614
|
}
|
|
619
615
|
}
|
|
620
|
-
return o === n ?
|
|
616
|
+
return o === n ? zr(B) : Wr(B), B;
|
|
621
617
|
}
|
|
622
618
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
619
|
+
function Jr(o, p, E) {
|
|
620
|
+
return jt(o, p, E, !0);
|
|
625
621
|
}
|
|
626
|
-
function
|
|
627
|
-
return
|
|
622
|
+
function Yr(o, p, E) {
|
|
623
|
+
return jt(o, p, E, !1);
|
|
628
624
|
}
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
}()),
|
|
625
|
+
var Gr = Yr, Xr = Jr;
|
|
626
|
+
Ae.Fragment = n, Ae.jsx = Gr, Ae.jsxs = Xr;
|
|
627
|
+
})()), Ae;
|
|
632
628
|
}
|
|
633
629
|
var Mt;
|
|
634
|
-
function
|
|
635
|
-
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? qe.exports =
|
|
630
|
+
function cn() {
|
|
631
|
+
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? qe.exports = an() : qe.exports = ln()), qe.exports;
|
|
636
632
|
}
|
|
637
|
-
var
|
|
638
|
-
const
|
|
633
|
+
var un = cn();
|
|
634
|
+
const ir = rn(
|
|
639
635
|
null
|
|
640
|
-
),
|
|
641
|
-
const t =
|
|
636
|
+
), fn = () => {
|
|
637
|
+
const t = nn(ir);
|
|
642
638
|
if (!t)
|
|
643
639
|
throw new Error(
|
|
644
640
|
"useTranslatorContext must be used within a TranslatorProvider"
|
|
645
641
|
);
|
|
646
642
|
return t;
|
|
647
643
|
};
|
|
648
|
-
class
|
|
644
|
+
class Bt extends Error {
|
|
649
645
|
constructor(r) {
|
|
650
646
|
super(r);
|
|
651
647
|
te(this, "code", "timeout");
|
|
652
648
|
this.name = "ExternalTranslationTimeoutError";
|
|
653
649
|
}
|
|
654
650
|
}
|
|
655
|
-
const
|
|
651
|
+
const dn = "auto", He = (t) => typeof t == "number" && Number.isFinite(t) && t > 0, hn = (t) => {
|
|
656
652
|
const e = Object.entries(t).sort(([r], [n]) => r === n ? 0 : r < n ? -1 : 1);
|
|
657
653
|
return Object.fromEntries(e);
|
|
658
654
|
};
|
|
659
|
-
class
|
|
655
|
+
class pn {
|
|
660
656
|
constructor(e) {
|
|
661
657
|
te(this, "provider");
|
|
662
658
|
te(this, "config");
|
|
@@ -696,16 +692,16 @@ class hn {
|
|
|
696
692
|
key: r.externalRequest.key,
|
|
697
693
|
cacheKey: r.cacheKey
|
|
698
694
|
}), s;
|
|
699
|
-
const
|
|
700
|
-
return this.inFlight.set(r.cacheKey,
|
|
695
|
+
const a = this.executeTranslation(r);
|
|
696
|
+
return this.inFlight.set(r.cacheKey, a), a;
|
|
701
697
|
}
|
|
702
698
|
normalizeRequest(e) {
|
|
703
|
-
const r = e.sourceLanguage ??
|
|
699
|
+
const r = e.sourceLanguage ?? dn, n = {
|
|
704
700
|
text: e.text,
|
|
705
701
|
sourceLanguage: r,
|
|
706
702
|
targetLanguage: e.targetLanguage,
|
|
707
703
|
glossary: e.glossary
|
|
708
|
-
}, s = this.createCacheKey(n),
|
|
704
|
+
}, s = this.createCacheKey(n), a = He(e.timeoutMs) ? e.timeoutMs : this.config.timeoutMs;
|
|
709
705
|
return {
|
|
710
706
|
externalRequest: {
|
|
711
707
|
key: e.key,
|
|
@@ -715,7 +711,7 @@ class hn {
|
|
|
715
711
|
},
|
|
716
712
|
translateRequest: n,
|
|
717
713
|
cacheKey: s,
|
|
718
|
-
timeoutMs:
|
|
714
|
+
timeoutMs: a,
|
|
719
715
|
signal: e.signal
|
|
720
716
|
};
|
|
721
717
|
}
|
|
@@ -780,28 +776,28 @@ class hn {
|
|
|
780
776
|
async translateWithTimeout(e, r, n) {
|
|
781
777
|
if (!(typeof AbortController == "function"))
|
|
782
778
|
return this.provider.translate(e, {
|
|
783
|
-
timeoutMs:
|
|
779
|
+
timeoutMs: He(r) ? r : void 0,
|
|
784
780
|
signal: n
|
|
785
781
|
});
|
|
786
|
-
const
|
|
787
|
-
let
|
|
788
|
-
n && (n.aborted ?
|
|
789
|
-
|
|
782
|
+
const a = new AbortController();
|
|
783
|
+
let i = !1, l;
|
|
784
|
+
n && (n.aborted ? a.abort() : (l = () => {
|
|
785
|
+
a.abort();
|
|
790
786
|
}, n.addEventListener("abort", l, { once: !0 })));
|
|
791
|
-
const
|
|
792
|
-
|
|
787
|
+
const f = He(r) && r ? setTimeout(() => {
|
|
788
|
+
i = !0, a.abort();
|
|
793
789
|
}, r) : void 0;
|
|
794
790
|
try {
|
|
795
791
|
return await this.provider.translate(e, {
|
|
796
|
-
timeoutMs:
|
|
797
|
-
signal:
|
|
792
|
+
timeoutMs: He(r) ? r : void 0,
|
|
793
|
+
signal: a.signal
|
|
798
794
|
});
|
|
799
|
-
} catch (
|
|
800
|
-
throw
|
|
795
|
+
} catch (d) {
|
|
796
|
+
throw i ? new Bt(
|
|
801
797
|
`External translation timed out after ${r}ms`
|
|
802
|
-
) : (
|
|
798
|
+
) : (a.signal.aborted && !i, d);
|
|
803
799
|
} finally {
|
|
804
|
-
|
|
800
|
+
f && clearTimeout(f), l && n && n.removeEventListener("abort", l);
|
|
805
801
|
}
|
|
806
802
|
}
|
|
807
803
|
readFromCache(e) {
|
|
@@ -830,7 +826,7 @@ class hn {
|
|
|
830
826
|
});
|
|
831
827
|
}
|
|
832
828
|
normalizeError(e) {
|
|
833
|
-
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof
|
|
829
|
+
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof Bt ? {
|
|
834
830
|
code: "timeout",
|
|
835
831
|
message: e.message,
|
|
836
832
|
retryable: !0,
|
|
@@ -856,9 +852,9 @@ class hn {
|
|
|
856
852
|
}
|
|
857
853
|
hashText(e, r) {
|
|
858
854
|
let n = 2166136261;
|
|
859
|
-
const s = r && Object.keys(r).length > 0 ? `${e}|${JSON.stringify(
|
|
860
|
-
for (let
|
|
861
|
-
n ^= s.charCodeAt(
|
|
855
|
+
const s = r && Object.keys(r).length > 0 ? `${e}|${JSON.stringify(hn(r))}` : e;
|
|
856
|
+
for (let a = 0; a < s.length; a += 1)
|
|
857
|
+
n ^= s.charCodeAt(a), n += (n << 1) + (n << 4) + (n << 7) + (n << 8) + (n << 24);
|
|
862
858
|
return (n >>> 0).toString(16);
|
|
863
859
|
}
|
|
864
860
|
warn(e, r) {
|
|
@@ -915,8 +911,8 @@ class hn {
|
|
|
915
911
|
}
|
|
916
912
|
}
|
|
917
913
|
}
|
|
918
|
-
const ct = () => Date.now(),
|
|
919
|
-
class
|
|
914
|
+
const ct = () => Date.now(), Ke = (t) => typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
915
|
+
class gn {
|
|
920
916
|
constructor(e) {
|
|
921
917
|
te(this, "store", /* @__PURE__ */ new Map());
|
|
922
918
|
te(this, "enabled");
|
|
@@ -954,10 +950,10 @@ class pn {
|
|
|
954
950
|
set(e, r, n) {
|
|
955
951
|
if (!this.enabled)
|
|
956
952
|
return;
|
|
957
|
-
const s =
|
|
953
|
+
const s = Ke(n) ? n : this.ttlMs, a = Ke(s) ? ct() + s : void 0;
|
|
958
954
|
this.store.set(e, {
|
|
959
955
|
value: r,
|
|
960
|
-
expiresAt:
|
|
956
|
+
expiresAt: a,
|
|
961
957
|
insertedAt: ct()
|
|
962
958
|
}), this.enforceMaxEntries();
|
|
963
959
|
}
|
|
@@ -990,7 +986,7 @@ class pn {
|
|
|
990
986
|
this.isExpired(r) && this.store.delete(e);
|
|
991
987
|
}
|
|
992
988
|
enforceMaxEntries() {
|
|
993
|
-
if (!
|
|
989
|
+
if (!Ke(this.maxEntries))
|
|
994
990
|
return;
|
|
995
991
|
const e = this.maxEntries;
|
|
996
992
|
for (; this.store.size > e; ) {
|
|
@@ -1007,62 +1003,75 @@ class pn {
|
|
|
1007
1003
|
return e;
|
|
1008
1004
|
}
|
|
1009
1005
|
isExpired(e) {
|
|
1010
|
-
return
|
|
1006
|
+
return Ke(e.expiresAt) ? e.expiresAt <= ct() : !1;
|
|
1011
1007
|
}
|
|
1012
1008
|
}
|
|
1013
|
-
function
|
|
1009
|
+
function lr(t, e) {
|
|
1014
1010
|
return function() {
|
|
1015
1011
|
return t.apply(e, arguments);
|
|
1016
1012
|
};
|
|
1017
1013
|
}
|
|
1018
|
-
const { toString:
|
|
1019
|
-
const r =
|
|
1014
|
+
const { toString: mn } = Object.prototype, { getPrototypeOf: Ge } = Object, { iterator: Xe, toStringTag: cr } = Symbol, Qe = /* @__PURE__ */ ((t) => (e) => {
|
|
1015
|
+
const r = mn.call(e);
|
|
1020
1016
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
1021
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
1022
|
-
function
|
|
1023
|
-
return t !== null && !
|
|
1017
|
+
})(/* @__PURE__ */ Object.create(null)), ae = (t) => (t = t.toLowerCase(), (e) => Qe(e) === t), Ze = (t) => (e) => typeof e === t, { isArray: _e } = Array, ve = Ze("undefined");
|
|
1018
|
+
function ke(t) {
|
|
1019
|
+
return t !== null && !ve(t) && t.constructor !== null && !ve(t.constructor) && X(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
1024
1020
|
}
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
1021
|
+
const ur = ae("ArrayBuffer");
|
|
1022
|
+
function yn(t) {
|
|
1027
1023
|
let e;
|
|
1028
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
1024
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ur(t.buffer), e;
|
|
1029
1025
|
}
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1026
|
+
const bn = Ze("string"), X = Ze("function"), fr = Ze("number"), Le = (t) => t !== null && typeof t == "object", En = (t) => t === !0 || t === !1, We = (t) => {
|
|
1027
|
+
if (Qe(t) !== "object")
|
|
1032
1028
|
return !1;
|
|
1033
|
-
const e =
|
|
1034
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
1035
|
-
},
|
|
1036
|
-
if (!
|
|
1029
|
+
const e = Ge(t);
|
|
1030
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(cr in t) && !(Xe in t);
|
|
1031
|
+
}, wn = (t) => {
|
|
1032
|
+
if (!Le(t) || ke(t))
|
|
1037
1033
|
return !1;
|
|
1038
1034
|
try {
|
|
1039
1035
|
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
1040
1036
|
} catch {
|
|
1041
1037
|
return !1;
|
|
1042
1038
|
}
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1045
|
-
return
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1039
|
+
}, Rn = ae("Date"), Tn = ae("File"), vn = (t) => !!(t && typeof t.uri < "u"), _n = (t) => t && typeof t.getParts < "u", xn = ae("Blob"), On = ae("FileList"), Sn = (t) => Le(t) && X(t.pipe);
|
|
1040
|
+
function An() {
|
|
1041
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
1042
|
+
}
|
|
1043
|
+
const $t = An(), qt = typeof $t.FormData < "u" ? $t.FormData : void 0, Cn = (t) => {
|
|
1044
|
+
if (!t) return !1;
|
|
1045
|
+
if (qt && t instanceof qt) return !0;
|
|
1046
|
+
const e = Ge(t);
|
|
1047
|
+
if (!e || e === Object.prototype || !X(t.append)) return !1;
|
|
1048
|
+
const r = Qe(t);
|
|
1049
|
+
return r === "formdata" || // detect form-data instance
|
|
1050
|
+
r === "object" && X(t.toString) && t.toString() === "[object FormData]";
|
|
1051
|
+
}, Pn = ae("URLSearchParams"), [kn, Ln, Dn, Fn] = [
|
|
1052
|
+
"ReadableStream",
|
|
1053
|
+
"Request",
|
|
1054
|
+
"Response",
|
|
1055
|
+
"Headers"
|
|
1056
|
+
].map(ae), Nn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1057
|
+
function De(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
1049
1058
|
if (t === null || typeof t > "u")
|
|
1050
1059
|
return;
|
|
1051
1060
|
let n, s;
|
|
1052
|
-
if (typeof t != "object" && (t = [t]),
|
|
1061
|
+
if (typeof t != "object" && (t = [t]), _e(t))
|
|
1053
1062
|
for (n = 0, s = t.length; n < s; n++)
|
|
1054
1063
|
e.call(null, t[n], n, t);
|
|
1055
1064
|
else {
|
|
1056
|
-
if (
|
|
1065
|
+
if (ke(t))
|
|
1057
1066
|
return;
|
|
1058
|
-
const
|
|
1067
|
+
const a = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = a.length;
|
|
1059
1068
|
let l;
|
|
1060
|
-
for (n = 0; n <
|
|
1061
|
-
l =
|
|
1069
|
+
for (n = 0; n < i; n++)
|
|
1070
|
+
l = a[n], e.call(null, t[l], l, t);
|
|
1062
1071
|
}
|
|
1063
1072
|
}
|
|
1064
|
-
function
|
|
1065
|
-
if (
|
|
1073
|
+
function dr(t, e) {
|
|
1074
|
+
if (ke(t))
|
|
1066
1075
|
return null;
|
|
1067
1076
|
e = e.toLowerCase();
|
|
1068
1077
|
const r = Object.keys(t);
|
|
@@ -1072,75 +1081,93 @@ function ur(t, e) {
|
|
|
1072
1081
|
return s;
|
|
1073
1082
|
return null;
|
|
1074
1083
|
}
|
|
1075
|
-
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
1076
|
-
function
|
|
1077
|
-
const { caseless: t, skipUndefined: e } =
|
|
1078
|
-
|
|
1079
|
-
|
|
1084
|
+
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, hr = (t) => !ve(t) && t !== ge;
|
|
1085
|
+
function gt() {
|
|
1086
|
+
const { caseless: t, skipUndefined: e } = hr(this) && this || {}, r = {}, n = (s, a) => {
|
|
1087
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
1088
|
+
return;
|
|
1089
|
+
const i = t && dr(r, a) || a;
|
|
1090
|
+
We(r[i]) && We(s) ? r[i] = gt(r[i], s) : We(s) ? r[i] = gt({}, s) : _e(s) ? r[i] = s.slice() : (!e || !ve(s)) && (r[i] = s);
|
|
1080
1091
|
};
|
|
1081
|
-
for (let s = 0,
|
|
1082
|
-
arguments[s] &&
|
|
1092
|
+
for (let s = 0, a = arguments.length; s < a; s++)
|
|
1093
|
+
arguments[s] && De(arguments[s], n);
|
|
1083
1094
|
return r;
|
|
1084
1095
|
}
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1096
|
+
const jn = (t, e, r, { allOwnKeys: n } = {}) => (De(
|
|
1097
|
+
e,
|
|
1098
|
+
(s, a) => {
|
|
1099
|
+
r && X(s) ? Object.defineProperty(t, a, {
|
|
1100
|
+
value: lr(s, r),
|
|
1101
|
+
writable: !0,
|
|
1102
|
+
enumerable: !0,
|
|
1103
|
+
configurable: !0
|
|
1104
|
+
}) : Object.defineProperty(t, a, {
|
|
1105
|
+
value: s,
|
|
1106
|
+
writable: !0,
|
|
1107
|
+
enumerable: !0,
|
|
1108
|
+
configurable: !0
|
|
1109
|
+
});
|
|
1110
|
+
},
|
|
1111
|
+
{ allOwnKeys: n }
|
|
1112
|
+
), t), Un = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), In = (t, e, r, n) => {
|
|
1113
|
+
t.prototype = Object.create(e.prototype, n), Object.defineProperty(t.prototype, "constructor", {
|
|
1114
|
+
value: t,
|
|
1115
|
+
writable: !0,
|
|
1116
|
+
enumerable: !1,
|
|
1117
|
+
configurable: !0
|
|
1118
|
+
}), Object.defineProperty(t, "super", {
|
|
1089
1119
|
value: e.prototype
|
|
1090
1120
|
}), r && Object.assign(t.prototype, r);
|
|
1091
|
-
},
|
|
1092
|
-
let s,
|
|
1121
|
+
}, Mn = (t, e, r, n) => {
|
|
1122
|
+
let s, a, i;
|
|
1093
1123
|
const l = {};
|
|
1094
1124
|
if (e = e || {}, t == null) return e;
|
|
1095
1125
|
do {
|
|
1096
|
-
for (s = Object.getOwnPropertyNames(t),
|
|
1097
|
-
|
|
1098
|
-
t = r !== !1 &&
|
|
1126
|
+
for (s = Object.getOwnPropertyNames(t), a = s.length; a-- > 0; )
|
|
1127
|
+
i = s[a], (!n || n(i, t, e)) && !l[i] && (e[i] = t[i], l[i] = !0);
|
|
1128
|
+
t = r !== !1 && Ge(t);
|
|
1099
1129
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
1100
1130
|
return e;
|
|
1101
|
-
},
|
|
1131
|
+
}, Bn = (t, e, r) => {
|
|
1102
1132
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
1103
1133
|
const n = t.indexOf(e, r);
|
|
1104
1134
|
return n !== -1 && n === r;
|
|
1105
|
-
},
|
|
1135
|
+
}, $n = (t) => {
|
|
1106
1136
|
if (!t) return null;
|
|
1107
|
-
if (
|
|
1137
|
+
if (_e(t)) return t;
|
|
1108
1138
|
let e = t.length;
|
|
1109
|
-
if (!
|
|
1139
|
+
if (!fr(e)) return null;
|
|
1110
1140
|
const r = new Array(e);
|
|
1111
1141
|
for (; e-- > 0; )
|
|
1112
1142
|
r[e] = t[e];
|
|
1113
1143
|
return r;
|
|
1114
|
-
},
|
|
1115
|
-
const n = (t && t[
|
|
1144
|
+
}, qn = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Ge(Uint8Array)), Hn = (t, e) => {
|
|
1145
|
+
const n = (t && t[Xe]).call(t);
|
|
1116
1146
|
let s;
|
|
1117
1147
|
for (; (s = n.next()) && !s.done; ) {
|
|
1118
|
-
const
|
|
1119
|
-
e.call(t,
|
|
1148
|
+
const a = s.value;
|
|
1149
|
+
e.call(t, a[0], a[1]);
|
|
1120
1150
|
}
|
|
1121
|
-
},
|
|
1151
|
+
}, Kn = (t, e) => {
|
|
1122
1152
|
let r;
|
|
1123
1153
|
const n = [];
|
|
1124
1154
|
for (; (r = t.exec(e)) !== null; )
|
|
1125
1155
|
n.push(r);
|
|
1126
1156
|
return n;
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
return n.toUpperCase() + s;
|
|
1131
|
-
}
|
|
1132
|
-
), Bt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Kn = oe("RegExp"), dr = (t, e) => {
|
|
1157
|
+
}, Vn = ae("HTMLFormElement"), Wn = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
1158
|
+
return n.toUpperCase() + s;
|
|
1159
|
+
}), Ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), zn = ae("RegExp"), pr = (t, e) => {
|
|
1133
1160
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
1134
|
-
|
|
1135
|
-
let
|
|
1136
|
-
(
|
|
1161
|
+
De(r, (s, a) => {
|
|
1162
|
+
let i;
|
|
1163
|
+
(i = e(s, a, t)) !== !1 && (n[a] = i || s);
|
|
1137
1164
|
}), Object.defineProperties(t, n);
|
|
1138
|
-
},
|
|
1139
|
-
|
|
1140
|
-
if (
|
|
1165
|
+
}, Jn = (t) => {
|
|
1166
|
+
pr(t, (e, r) => {
|
|
1167
|
+
if (X(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
1141
1168
|
return !1;
|
|
1142
1169
|
const n = t[r];
|
|
1143
|
-
if (
|
|
1170
|
+
if (X(n)) {
|
|
1144
1171
|
if (e.enumerable = !1, "writable" in e) {
|
|
1145
1172
|
e.writable = !1;
|
|
1146
1173
|
return;
|
|
@@ -1150,109 +1177,132 @@ const Ln = (t, e, r, { allOwnKeys: n } = {}) => (je(e, (s, i) => {
|
|
|
1150
1177
|
});
|
|
1151
1178
|
}
|
|
1152
1179
|
});
|
|
1153
|
-
},
|
|
1180
|
+
}, Yn = (t, e) => {
|
|
1154
1181
|
const r = {}, n = (s) => {
|
|
1155
|
-
s.forEach((
|
|
1156
|
-
r[
|
|
1182
|
+
s.forEach((a) => {
|
|
1183
|
+
r[a] = !0;
|
|
1157
1184
|
});
|
|
1158
1185
|
};
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
1161
|
-
},
|
|
1162
|
-
function
|
|
1163
|
-
return !!(t &&
|
|
1186
|
+
return _e(t) ? n(t) : n(String(t).split(e)), r;
|
|
1187
|
+
}, Gn = () => {
|
|
1188
|
+
}, Xn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
1189
|
+
function Qn(t) {
|
|
1190
|
+
return !!(t && X(t.append) && t[cr] === "FormData" && t[Xe]);
|
|
1164
1191
|
}
|
|
1165
|
-
const
|
|
1192
|
+
const Zn = (t) => {
|
|
1166
1193
|
const e = new Array(10), r = (n, s) => {
|
|
1167
|
-
if (
|
|
1194
|
+
if (Le(n)) {
|
|
1168
1195
|
if (e.indexOf(n) >= 0)
|
|
1169
1196
|
return;
|
|
1170
|
-
if (
|
|
1197
|
+
if (ke(n))
|
|
1171
1198
|
return n;
|
|
1172
1199
|
if (!("toJSON" in n)) {
|
|
1173
1200
|
e[s] = n;
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1176
|
-
const
|
|
1177
|
-
!
|
|
1178
|
-
}), e[s] = void 0,
|
|
1201
|
+
const a = _e(n) ? [] : {};
|
|
1202
|
+
return De(n, (i, l) => {
|
|
1203
|
+
const f = r(i, s + 1);
|
|
1204
|
+
!ve(f) && (a[l] = f);
|
|
1205
|
+
}), e[s] = void 0, a;
|
|
1179
1206
|
}
|
|
1180
1207
|
}
|
|
1181
1208
|
return n;
|
|
1182
1209
|
};
|
|
1183
1210
|
return r(t, 0);
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
|
|
1211
|
+
}, es = ae("AsyncFunction"), ts = (t) => t && (Le(t) || X(t)) && X(t.then) && X(t.catch), gr = ((t, e) => t ? setImmediate : e ? ((r, n) => (ge.addEventListener(
|
|
1212
|
+
"message",
|
|
1213
|
+
({ source: s, data: a }) => {
|
|
1214
|
+
s === ge && a === r && n.length && n.shift()();
|
|
1215
|
+
},
|
|
1216
|
+
!1
|
|
1217
|
+
), (s) => {
|
|
1187
1218
|
n.push(s), ge.postMessage(r, "*");
|
|
1188
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
isNumber: cr,
|
|
1199
|
-
isBoolean: bn,
|
|
1200
|
-
isObject: Fe,
|
|
1219
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", X(ge.postMessage)), rs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ge) : typeof process < "u" && process.nextTick || gr, ns = (t) => t != null && X(t[Xe]), c = {
|
|
1220
|
+
isArray: _e,
|
|
1221
|
+
isArrayBuffer: ur,
|
|
1222
|
+
isBuffer: ke,
|
|
1223
|
+
isFormData: Cn,
|
|
1224
|
+
isArrayBufferView: yn,
|
|
1225
|
+
isString: bn,
|
|
1226
|
+
isNumber: fr,
|
|
1227
|
+
isBoolean: En,
|
|
1228
|
+
isObject: Le,
|
|
1201
1229
|
isPlainObject: We,
|
|
1202
|
-
isEmptyObject:
|
|
1203
|
-
isReadableStream:
|
|
1204
|
-
isRequest:
|
|
1205
|
-
isResponse:
|
|
1206
|
-
isHeaders:
|
|
1207
|
-
isUndefined:
|
|
1208
|
-
isDate:
|
|
1209
|
-
isFile:
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1230
|
+
isEmptyObject: wn,
|
|
1231
|
+
isReadableStream: kn,
|
|
1232
|
+
isRequest: Ln,
|
|
1233
|
+
isResponse: Dn,
|
|
1234
|
+
isHeaders: Fn,
|
|
1235
|
+
isUndefined: ve,
|
|
1236
|
+
isDate: Rn,
|
|
1237
|
+
isFile: Tn,
|
|
1238
|
+
isReactNativeBlob: vn,
|
|
1239
|
+
isReactNative: _n,
|
|
1240
|
+
isBlob: xn,
|
|
1241
|
+
isRegExp: zn,
|
|
1242
|
+
isFunction: X,
|
|
1243
|
+
isStream: Sn,
|
|
1244
|
+
isURLSearchParams: Pn,
|
|
1245
|
+
isTypedArray: qn,
|
|
1246
|
+
isFileList: On,
|
|
1247
|
+
forEach: De,
|
|
1248
|
+
merge: gt,
|
|
1249
|
+
extend: jn,
|
|
1250
|
+
trim: Nn,
|
|
1251
|
+
stripBOM: Un,
|
|
1252
|
+
inherits: In,
|
|
1253
|
+
toFlatObject: Mn,
|
|
1254
|
+
kindOf: Qe,
|
|
1255
|
+
kindOfTest: ae,
|
|
1256
|
+
endsWith: Bn,
|
|
1257
|
+
toArray: $n,
|
|
1258
|
+
forEachEntry: Hn,
|
|
1259
|
+
matchAll: Kn,
|
|
1260
|
+
isHTMLForm: Vn,
|
|
1261
|
+
hasOwnProperty: Ht,
|
|
1262
|
+
hasOwnProp: Ht,
|
|
1233
1263
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1234
|
-
reduceDescriptors:
|
|
1235
|
-
freezeMethods:
|
|
1236
|
-
toObjectSet:
|
|
1237
|
-
toCamelCase:
|
|
1238
|
-
noop:
|
|
1239
|
-
toFiniteNumber:
|
|
1240
|
-
findKey:
|
|
1264
|
+
reduceDescriptors: pr,
|
|
1265
|
+
freezeMethods: Jn,
|
|
1266
|
+
toObjectSet: Yn,
|
|
1267
|
+
toCamelCase: Wn,
|
|
1268
|
+
noop: Gn,
|
|
1269
|
+
toFiniteNumber: Xn,
|
|
1270
|
+
findKey: dr,
|
|
1241
1271
|
global: ge,
|
|
1242
|
-
isContextDefined:
|
|
1243
|
-
isSpecCompliantForm:
|
|
1244
|
-
toJSONObject:
|
|
1245
|
-
isAsyncFn:
|
|
1246
|
-
isThenable:
|
|
1247
|
-
setImmediate:
|
|
1248
|
-
asap:
|
|
1249
|
-
isIterable:
|
|
1272
|
+
isContextDefined: hr,
|
|
1273
|
+
isSpecCompliantForm: Qn,
|
|
1274
|
+
toJSONObject: Zn,
|
|
1275
|
+
isAsyncFn: es,
|
|
1276
|
+
isThenable: ts,
|
|
1277
|
+
setImmediate: gr,
|
|
1278
|
+
asap: rs,
|
|
1279
|
+
isIterable: ns
|
|
1250
1280
|
};
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1281
|
+
let w = class mr extends Error {
|
|
1282
|
+
static from(e, r, n, s, a, i) {
|
|
1283
|
+
const l = new mr(e.message, r || e.code, n, s, a);
|
|
1284
|
+
return l.cause = e, l.name = e.name, e.status != null && l.status == null && (l.status = e.status), i && Object.assign(l, i), l;
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
1288
|
+
*
|
|
1289
|
+
* @param {string} message The error message.
|
|
1290
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
1291
|
+
* @param {Object} [config] The config.
|
|
1292
|
+
* @param {Object} [request] The request.
|
|
1293
|
+
* @param {Object} [response] The response.
|
|
1294
|
+
*
|
|
1295
|
+
* @returns {Error} The created error.
|
|
1296
|
+
*/
|
|
1297
|
+
constructor(e, r, n, s, a) {
|
|
1298
|
+
super(e), Object.defineProperty(this, "message", {
|
|
1299
|
+
value: e,
|
|
1300
|
+
enumerable: !0,
|
|
1301
|
+
writable: !0,
|
|
1302
|
+
configurable: !0
|
|
1303
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, r && (this.code = r), n && (this.config = n), s && (this.request = s), a && (this.response = a, this.status = a.status);
|
|
1304
|
+
}
|
|
1305
|
+
toJSON() {
|
|
1256
1306
|
return {
|
|
1257
1307
|
// Standard
|
|
1258
1308
|
message: this.message,
|
|
@@ -1271,164 +1321,152 @@ c.inherits(_, Error, {
|
|
|
1271
1321
|
status: this.status
|
|
1272
1322
|
};
|
|
1273
1323
|
}
|
|
1274
|
-
});
|
|
1275
|
-
const pr = _.prototype, gr = {};
|
|
1276
|
-
[
|
|
1277
|
-
"ERR_BAD_OPTION_VALUE",
|
|
1278
|
-
"ERR_BAD_OPTION",
|
|
1279
|
-
"ECONNABORTED",
|
|
1280
|
-
"ETIMEDOUT",
|
|
1281
|
-
"ERR_NETWORK",
|
|
1282
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1283
|
-
"ERR_DEPRECATED",
|
|
1284
|
-
"ERR_BAD_RESPONSE",
|
|
1285
|
-
"ERR_BAD_REQUEST",
|
|
1286
|
-
"ERR_CANCELED",
|
|
1287
|
-
"ERR_NOT_SUPPORT",
|
|
1288
|
-
"ERR_INVALID_URL"
|
|
1289
|
-
// eslint-disable-next-line func-names
|
|
1290
|
-
].forEach((t) => {
|
|
1291
|
-
gr[t] = { value: t };
|
|
1292
|
-
});
|
|
1293
|
-
Object.defineProperties(_, gr);
|
|
1294
|
-
Object.defineProperty(pr, "isAxiosError", { value: !0 });
|
|
1295
|
-
_.from = (t, e, r, n, s, i) => {
|
|
1296
|
-
const a = Object.create(pr);
|
|
1297
|
-
c.toFlatObject(t, a, function(u) {
|
|
1298
|
-
return u !== Error.prototype;
|
|
1299
|
-
}, (f) => f !== "isAxiosError");
|
|
1300
|
-
const l = t && t.message ? t.message : "Error", g = e == null && t ? t.code : e;
|
|
1301
|
-
return _.call(a, l, g, r, n, s), t && a.cause == null && Object.defineProperty(a, "cause", { value: t, configurable: !0 }), a.name = t && t.name || "Error", i && Object.assign(a, i), a;
|
|
1302
1324
|
};
|
|
1303
|
-
|
|
1304
|
-
|
|
1325
|
+
w.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
1326
|
+
w.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
1327
|
+
w.ECONNABORTED = "ECONNABORTED";
|
|
1328
|
+
w.ETIMEDOUT = "ETIMEDOUT";
|
|
1329
|
+
w.ERR_NETWORK = "ERR_NETWORK";
|
|
1330
|
+
w.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
1331
|
+
w.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
1332
|
+
w.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
1333
|
+
w.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
1334
|
+
w.ERR_CANCELED = "ERR_CANCELED";
|
|
1335
|
+
w.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
1336
|
+
w.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
1337
|
+
w.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
1338
|
+
const ss = null;
|
|
1339
|
+
function mt(t) {
|
|
1305
1340
|
return c.isPlainObject(t) || c.isArray(t);
|
|
1306
1341
|
}
|
|
1307
|
-
function
|
|
1342
|
+
function yr(t) {
|
|
1308
1343
|
return c.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1309
1344
|
}
|
|
1310
|
-
function
|
|
1311
|
-
return t ? t.concat(e).map(function(s,
|
|
1312
|
-
return s =
|
|
1345
|
+
function ut(t, e, r) {
|
|
1346
|
+
return t ? t.concat(e).map(function(s, a) {
|
|
1347
|
+
return s = yr(s), !r && a ? "[" + s + "]" : s;
|
|
1313
1348
|
}).join(r ? "." : "") : e;
|
|
1314
1349
|
}
|
|
1315
|
-
function
|
|
1316
|
-
return c.isArray(t) && !t.some(
|
|
1350
|
+
function os(t) {
|
|
1351
|
+
return c.isArray(t) && !t.some(mt);
|
|
1317
1352
|
}
|
|
1318
|
-
const
|
|
1353
|
+
const as = c.toFlatObject(c, {}, null, function(e) {
|
|
1319
1354
|
return /^is[A-Z]/.test(e);
|
|
1320
1355
|
});
|
|
1321
|
-
function
|
|
1356
|
+
function et(t, e, r) {
|
|
1322
1357
|
if (!c.isObject(t))
|
|
1323
1358
|
throw new TypeError("target must be an object");
|
|
1324
|
-
e = e || new FormData(), r = c.toFlatObject(
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1359
|
+
e = e || new FormData(), r = c.toFlatObject(
|
|
1360
|
+
r,
|
|
1361
|
+
{
|
|
1362
|
+
metaTokens: !0,
|
|
1363
|
+
dots: !1,
|
|
1364
|
+
indexes: !1
|
|
1365
|
+
},
|
|
1366
|
+
!1,
|
|
1367
|
+
function(g, A) {
|
|
1368
|
+
return !c.isUndefined(A[g]);
|
|
1369
|
+
}
|
|
1370
|
+
);
|
|
1371
|
+
const n = r.metaTokens, s = r.visitor || h, a = r.dots, i = r.indexes, l = r.Blob || typeof Blob < "u" && Blob, f = r.maxDepth === void 0 ? 100 : r.maxDepth, d = l && c.isSpecCompliantForm(e);
|
|
1332
1372
|
if (!c.isFunction(s))
|
|
1333
1373
|
throw new TypeError("visitor must be a function");
|
|
1334
|
-
function
|
|
1335
|
-
if (
|
|
1336
|
-
if (c.isDate(
|
|
1337
|
-
return
|
|
1338
|
-
if (c.isBoolean(
|
|
1339
|
-
return
|
|
1340
|
-
if (!
|
|
1341
|
-
throw new
|
|
1342
|
-
return c.isArrayBuffer(
|
|
1343
|
-
}
|
|
1344
|
-
function
|
|
1345
|
-
let
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1374
|
+
function u(y) {
|
|
1375
|
+
if (y === null) return "";
|
|
1376
|
+
if (c.isDate(y))
|
|
1377
|
+
return y.toISOString();
|
|
1378
|
+
if (c.isBoolean(y))
|
|
1379
|
+
return y.toString();
|
|
1380
|
+
if (!d && c.isBlob(y))
|
|
1381
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
1382
|
+
return c.isArrayBuffer(y) || c.isTypedArray(y) ? d && typeof Blob == "function" ? new Blob([y]) : Buffer.from(y) : y;
|
|
1383
|
+
}
|
|
1384
|
+
function h(y, g, A) {
|
|
1385
|
+
let L = y;
|
|
1386
|
+
if (c.isReactNative(e) && c.isReactNativeBlob(y))
|
|
1387
|
+
return e.append(ut(A, g, a), u(y)), !1;
|
|
1388
|
+
if (y && !A && typeof y == "object") {
|
|
1389
|
+
if (c.endsWith(g, "{}"))
|
|
1390
|
+
g = n ? g : g.slice(0, -2), y = JSON.stringify(y);
|
|
1391
|
+
else if (c.isArray(y) && os(y) || (c.isFileList(y) || c.endsWith(g, "[]")) && (L = c.toArray(y)))
|
|
1392
|
+
return g = yr(g), L.forEach(function(C, $) {
|
|
1393
|
+
!(c.isUndefined(C) || C === null) && e.append(
|
|
1352
1394
|
// eslint-disable-next-line no-nested-ternary
|
|
1353
|
-
|
|
1354
|
-
|
|
1395
|
+
i === !0 ? ut([g], $, a) : i === null ? g : g + "[]",
|
|
1396
|
+
u(C)
|
|
1355
1397
|
);
|
|
1356
1398
|
}), !1;
|
|
1357
1399
|
}
|
|
1358
|
-
return
|
|
1400
|
+
return mt(y) ? !0 : (e.append(ut(A, g, a), u(y)), !1);
|
|
1359
1401
|
}
|
|
1360
|
-
const
|
|
1361
|
-
defaultVisitor:
|
|
1362
|
-
convertValue:
|
|
1363
|
-
isVisitable:
|
|
1402
|
+
const _ = [], k = Object.assign(as, {
|
|
1403
|
+
defaultVisitor: h,
|
|
1404
|
+
convertValue: u,
|
|
1405
|
+
isVisitable: mt
|
|
1364
1406
|
});
|
|
1365
|
-
function
|
|
1366
|
-
if (!c.isUndefined(
|
|
1367
|
-
if (
|
|
1368
|
-
throw
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
}), h.pop();
|
|
1407
|
+
function m(y, g, A = 0) {
|
|
1408
|
+
if (!c.isUndefined(y)) {
|
|
1409
|
+
if (A > f)
|
|
1410
|
+
throw new w(
|
|
1411
|
+
"Object is too deeply nested (" + A + " levels). Max depth: " + f,
|
|
1412
|
+
w.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1413
|
+
);
|
|
1414
|
+
if (_.indexOf(y) !== -1)
|
|
1415
|
+
throw Error("Circular reference detected in " + g.join("."));
|
|
1416
|
+
_.push(y), c.forEach(y, function(D, C) {
|
|
1417
|
+
(!(c.isUndefined(D) || D === null) && s.call(e, D, c.isString(C) ? C.trim() : C, g, k)) === !0 && m(D, g ? g.concat(C) : [C], A + 1);
|
|
1418
|
+
}), _.pop();
|
|
1378
1419
|
}
|
|
1379
1420
|
}
|
|
1380
1421
|
if (!c.isObject(t))
|
|
1381
1422
|
throw new TypeError("data must be an object");
|
|
1382
|
-
return
|
|
1423
|
+
return m(t), e;
|
|
1383
1424
|
}
|
|
1384
|
-
function
|
|
1425
|
+
function Kt(t) {
|
|
1385
1426
|
const e = {
|
|
1386
1427
|
"!": "%21",
|
|
1387
1428
|
"'": "%27",
|
|
1388
1429
|
"(": "%28",
|
|
1389
1430
|
")": "%29",
|
|
1390
1431
|
"~": "%7E",
|
|
1391
|
-
"%20": "+"
|
|
1392
|
-
"%00": "\0"
|
|
1432
|
+
"%20": "+"
|
|
1393
1433
|
};
|
|
1394
|
-
return encodeURIComponent(t).replace(/[!'()~]|%20
|
|
1434
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20/g, function(n) {
|
|
1395
1435
|
return e[n];
|
|
1396
1436
|
});
|
|
1397
1437
|
}
|
|
1398
1438
|
function Et(t, e) {
|
|
1399
|
-
this._pairs = [], t &&
|
|
1439
|
+
this._pairs = [], t && et(t, this, e);
|
|
1400
1440
|
}
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1441
|
+
const br = Et.prototype;
|
|
1442
|
+
br.append = function(e, r) {
|
|
1403
1443
|
this._pairs.push([e, r]);
|
|
1404
1444
|
};
|
|
1405
|
-
|
|
1445
|
+
br.toString = function(e) {
|
|
1406
1446
|
const r = e ? function(n) {
|
|
1407
|
-
return e.call(this, n,
|
|
1408
|
-
} :
|
|
1447
|
+
return e.call(this, n, Kt);
|
|
1448
|
+
} : Kt;
|
|
1409
1449
|
return this._pairs.map(function(s) {
|
|
1410
1450
|
return r(s[0]) + "=" + r(s[1]);
|
|
1411
1451
|
}, "").join("&");
|
|
1412
1452
|
};
|
|
1413
|
-
function
|
|
1453
|
+
function is(t) {
|
|
1414
1454
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1415
1455
|
}
|
|
1416
|
-
function
|
|
1456
|
+
function Er(t, e, r) {
|
|
1417
1457
|
if (!e)
|
|
1418
1458
|
return t;
|
|
1419
|
-
const n = r && r.encode ||
|
|
1420
|
-
c.isFunction(r) && (r = {
|
|
1459
|
+
const n = r && r.encode || is, s = c.isFunction(r) ? {
|
|
1421
1460
|
serialize: r
|
|
1422
|
-
}
|
|
1423
|
-
const s = r && r.serialize;
|
|
1461
|
+
} : r, a = s && s.serialize;
|
|
1424
1462
|
let i;
|
|
1425
|
-
if (
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1463
|
+
if (a ? i = a(e, s) : i = c.isURLSearchParams(e) ? e.toString() : new Et(e, s).toString(n), i) {
|
|
1464
|
+
const l = t.indexOf("#");
|
|
1465
|
+
l !== -1 && (t = t.slice(0, l)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
1428
1466
|
}
|
|
1429
1467
|
return t;
|
|
1430
1468
|
}
|
|
1431
|
-
class
|
|
1469
|
+
class Vt {
|
|
1432
1470
|
constructor() {
|
|
1433
1471
|
this.handlers = [];
|
|
1434
1472
|
}
|
|
@@ -1437,6 +1475,7 @@ class Kt {
|
|
|
1437
1475
|
*
|
|
1438
1476
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1439
1477
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
1478
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
1440
1479
|
*
|
|
1441
1480
|
* @return {Number} An ID used to remove interceptor later
|
|
1442
1481
|
*/
|
|
@@ -1482,66 +1521,68 @@ class Kt {
|
|
|
1482
1521
|
});
|
|
1483
1522
|
}
|
|
1484
1523
|
}
|
|
1485
|
-
const
|
|
1524
|
+
const wt = {
|
|
1486
1525
|
silentJSONParsing: !0,
|
|
1487
1526
|
forcedJSONParsing: !0,
|
|
1488
|
-
clarifyTimeoutError: !1
|
|
1489
|
-
|
|
1527
|
+
clarifyTimeoutError: !1,
|
|
1528
|
+
legacyInterceptorReqResOrdering: !0
|
|
1529
|
+
}, ls = typeof URLSearchParams < "u" ? URLSearchParams : Et, cs = typeof FormData < "u" ? FormData : null, us = typeof Blob < "u" ? Blob : null, fs = {
|
|
1490
1530
|
isBrowser: !0,
|
|
1491
1531
|
classes: {
|
|
1492
|
-
URLSearchParams:
|
|
1493
|
-
FormData:
|
|
1494
|
-
Blob:
|
|
1532
|
+
URLSearchParams: ls,
|
|
1533
|
+
FormData: cs,
|
|
1534
|
+
Blob: us
|
|
1495
1535
|
},
|
|
1496
1536
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1497
|
-
},
|
|
1498
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1537
|
+
}, Rt = typeof window < "u" && typeof document < "u", yt = typeof navigator == "object" && navigator || void 0, ds = Rt && (!yt || ["ReactNative", "NativeScript", "NS"].indexOf(yt.product) < 0), hs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1538
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ps = Rt && window.location.href || "http://localhost", gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1499
1539
|
__proto__: null,
|
|
1500
|
-
hasBrowserEnv:
|
|
1501
|
-
hasStandardBrowserEnv:
|
|
1502
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1503
|
-
navigator:
|
|
1504
|
-
origin:
|
|
1505
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1506
|
-
...
|
|
1507
|
-
...
|
|
1540
|
+
hasBrowserEnv: Rt,
|
|
1541
|
+
hasStandardBrowserEnv: ds,
|
|
1542
|
+
hasStandardBrowserWebWorkerEnv: hs,
|
|
1543
|
+
navigator: yt,
|
|
1544
|
+
origin: ps
|
|
1545
|
+
}, Symbol.toStringTag, { value: "Module" })), V = {
|
|
1546
|
+
...gs,
|
|
1547
|
+
...fs
|
|
1508
1548
|
};
|
|
1509
|
-
function
|
|
1510
|
-
return
|
|
1511
|
-
visitor: function(r, n, s,
|
|
1512
|
-
return
|
|
1549
|
+
function ms(t, e) {
|
|
1550
|
+
return et(t, new V.classes.URLSearchParams(), {
|
|
1551
|
+
visitor: function(r, n, s, a) {
|
|
1552
|
+
return V.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
|
|
1513
1553
|
},
|
|
1514
1554
|
...e
|
|
1515
1555
|
});
|
|
1516
1556
|
}
|
|
1517
|
-
function
|
|
1557
|
+
function ys(t) {
|
|
1518
1558
|
return c.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1519
1559
|
}
|
|
1520
|
-
function
|
|
1560
|
+
function bs(t) {
|
|
1521
1561
|
const e = {}, r = Object.keys(t);
|
|
1522
1562
|
let n;
|
|
1523
1563
|
const s = r.length;
|
|
1524
|
-
let
|
|
1564
|
+
let a;
|
|
1525
1565
|
for (n = 0; n < s; n++)
|
|
1526
|
-
|
|
1566
|
+
a = r[n], e[a] = t[a];
|
|
1527
1567
|
return e;
|
|
1528
1568
|
}
|
|
1529
1569
|
function wr(t) {
|
|
1530
|
-
function e(r, n, s,
|
|
1531
|
-
let
|
|
1532
|
-
if (
|
|
1533
|
-
const l = Number.isFinite(+
|
|
1534
|
-
return
|
|
1570
|
+
function e(r, n, s, a) {
|
|
1571
|
+
let i = r[a++];
|
|
1572
|
+
if (i === "__proto__") return !0;
|
|
1573
|
+
const l = Number.isFinite(+i), f = a >= r.length;
|
|
1574
|
+
return i = !i && c.isArray(s) ? s.length : i, f ? (c.hasOwnProp(s, i) ? s[i] = c.isArray(s[i]) ? s[i].concat(n) : [s[i], n] : s[i] = n, !l) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), e(r, n, s[i], a) && c.isArray(s[i]) && (s[i] = bs(s[i])), !l);
|
|
1535
1575
|
}
|
|
1536
1576
|
if (c.isFormData(t) && c.isFunction(t.entries)) {
|
|
1537
1577
|
const r = {};
|
|
1538
1578
|
return c.forEachEntry(t, (n, s) => {
|
|
1539
|
-
e(
|
|
1579
|
+
e(ys(n), s, r, 0);
|
|
1540
1580
|
}), r;
|
|
1541
1581
|
}
|
|
1542
1582
|
return null;
|
|
1543
1583
|
}
|
|
1544
|
-
|
|
1584
|
+
const Te = (t, e) => t != null && c.hasOwnProp(t, e) ? t[e] : void 0;
|
|
1585
|
+
function Es(t, e, r) {
|
|
1545
1586
|
if (c.isString(t))
|
|
1546
1587
|
try {
|
|
1547
1588
|
return (e || JSON.parse)(t), c.trim(t);
|
|
@@ -1549,51 +1590,56 @@ function gs(t, e, r) {
|
|
|
1549
1590
|
if (n.name !== "SyntaxError")
|
|
1550
1591
|
throw n;
|
|
1551
1592
|
}
|
|
1552
|
-
return (
|
|
1593
|
+
return (r || JSON.stringify)(t);
|
|
1553
1594
|
}
|
|
1554
|
-
const
|
|
1555
|
-
transitional:
|
|
1595
|
+
const Fe = {
|
|
1596
|
+
transitional: wt,
|
|
1556
1597
|
adapter: ["xhr", "http", "fetch"],
|
|
1557
|
-
transformRequest: [
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
if (
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1598
|
+
transformRequest: [
|
|
1599
|
+
function(e, r) {
|
|
1600
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, a = c.isObject(e);
|
|
1601
|
+
if (a && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
|
|
1602
|
+
return s ? JSON.stringify(wr(e)) : e;
|
|
1603
|
+
if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
|
|
1604
|
+
return e;
|
|
1605
|
+
if (c.isArrayBufferView(e))
|
|
1606
|
+
return e.buffer;
|
|
1607
|
+
if (c.isURLSearchParams(e))
|
|
1608
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1609
|
+
let l;
|
|
1610
|
+
if (a) {
|
|
1611
|
+
const f = Te(this, "formSerializer");
|
|
1612
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1613
|
+
return ms(e, f).toString();
|
|
1614
|
+
if ((l = c.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
1615
|
+
const d = Te(this, "env"), u = d && d.FormData;
|
|
1616
|
+
return et(
|
|
1617
|
+
l ? { "files[]": e } : e,
|
|
1618
|
+
u && new u(),
|
|
1619
|
+
f
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1578
1622
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
transformResponse: [
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1623
|
+
return a || s ? (r.setContentType("application/json", !1), Es(e)) : e;
|
|
1624
|
+
}
|
|
1625
|
+
],
|
|
1626
|
+
transformResponse: [
|
|
1627
|
+
function(e) {
|
|
1628
|
+
const r = Te(this, "transitional") || Fe.transitional, n = r && r.forcedJSONParsing, s = Te(this, "responseType"), a = s === "json";
|
|
1629
|
+
if (c.isResponse(e) || c.isReadableStream(e))
|
|
1630
|
+
return e;
|
|
1631
|
+
if (e && c.isString(e) && (n && !s || a)) {
|
|
1632
|
+
const l = !(r && r.silentJSONParsing) && a;
|
|
1633
|
+
try {
|
|
1634
|
+
return JSON.parse(e, Te(this, "parseReviver"));
|
|
1635
|
+
} catch (f) {
|
|
1636
|
+
if (l)
|
|
1637
|
+
throw f.name === "SyntaxError" ? w.from(f, w.ERR_BAD_RESPONSE, this, null, Te(this, "response")) : f;
|
|
1638
|
+
}
|
|
1593
1639
|
}
|
|
1640
|
+
return e;
|
|
1594
1641
|
}
|
|
1595
|
-
|
|
1596
|
-
}],
|
|
1642
|
+
],
|
|
1597
1643
|
/**
|
|
1598
1644
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1599
1645
|
* timeout is not created.
|
|
@@ -1604,8 +1650,8 @@ const De = {
|
|
|
1604
1650
|
maxContentLength: -1,
|
|
1605
1651
|
maxBodyLength: -1,
|
|
1606
1652
|
env: {
|
|
1607
|
-
FormData:
|
|
1608
|
-
Blob:
|
|
1653
|
+
FormData: V.classes.FormData,
|
|
1654
|
+
Blob: V.classes.Blob
|
|
1609
1655
|
},
|
|
1610
1656
|
validateStatus: function(e) {
|
|
1611
1657
|
return e >= 200 && e < 300;
|
|
@@ -1618,9 +1664,9 @@ const De = {
|
|
|
1618
1664
|
}
|
|
1619
1665
|
};
|
|
1620
1666
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1621
|
-
|
|
1667
|
+
Fe.headers[t] = {};
|
|
1622
1668
|
});
|
|
1623
|
-
const
|
|
1669
|
+
const ws = c.toObjectSet([
|
|
1624
1670
|
"age",
|
|
1625
1671
|
"authorization",
|
|
1626
1672
|
"content-length",
|
|
@@ -1638,29 +1684,48 @@ const ms = c.toObjectSet([
|
|
|
1638
1684
|
"referer",
|
|
1639
1685
|
"retry-after",
|
|
1640
1686
|
"user-agent"
|
|
1641
|
-
]),
|
|
1687
|
+
]), Rs = (t) => {
|
|
1642
1688
|
const e = {};
|
|
1643
1689
|
let r, n, s;
|
|
1644
1690
|
return t && t.split(`
|
|
1645
|
-
`).forEach(function(
|
|
1646
|
-
s =
|
|
1691
|
+
`).forEach(function(i) {
|
|
1692
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || e[r] && ws[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
1647
1693
|
}), e;
|
|
1648
|
-
},
|
|
1649
|
-
function
|
|
1694
|
+
}, Wt = Symbol("internals"), Ts = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
1695
|
+
function vs(t) {
|
|
1696
|
+
let e = 0, r = t.length;
|
|
1697
|
+
for (; e < r; ) {
|
|
1698
|
+
const n = t.charCodeAt(e);
|
|
1699
|
+
if (n !== 9 && n !== 32)
|
|
1700
|
+
break;
|
|
1701
|
+
e += 1;
|
|
1702
|
+
}
|
|
1703
|
+
for (; r > e; ) {
|
|
1704
|
+
const n = t.charCodeAt(r - 1);
|
|
1705
|
+
if (n !== 9 && n !== 32)
|
|
1706
|
+
break;
|
|
1707
|
+
r -= 1;
|
|
1708
|
+
}
|
|
1709
|
+
return e === 0 && r === t.length ? t : t.slice(e, r);
|
|
1710
|
+
}
|
|
1711
|
+
function Ce(t) {
|
|
1650
1712
|
return t && String(t).trim().toLowerCase();
|
|
1651
1713
|
}
|
|
1714
|
+
function _s(t) {
|
|
1715
|
+
return vs(t.replace(Ts, ""));
|
|
1716
|
+
}
|
|
1652
1717
|
function ze(t) {
|
|
1653
|
-
return t === !1 || t == null ? t : c.isArray(t) ? t.map(ze) : String(t);
|
|
1718
|
+
return t === !1 || t == null ? t : c.isArray(t) ? t.map(ze) : _s(String(t));
|
|
1654
1719
|
}
|
|
1655
|
-
function
|
|
1720
|
+
function xs(t) {
|
|
1656
1721
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1657
1722
|
let n;
|
|
1658
1723
|
for (; n = r.exec(t); )
|
|
1659
1724
|
e[n[1]] = n[2];
|
|
1660
1725
|
return e;
|
|
1661
1726
|
}
|
|
1662
|
-
const
|
|
1663
|
-
function
|
|
1727
|
+
const Os = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1728
|
+
function ft(t, e, r, n, s) {
|
|
1664
1729
|
if (c.isFunction(n))
|
|
1665
1730
|
return n.call(this, e, r);
|
|
1666
1731
|
if (s && (e = r), !!c.isString(e)) {
|
|
@@ -1670,59 +1735,59 @@ function ut(t, e, r, n, s) {
|
|
|
1670
1735
|
return n.test(e);
|
|
1671
1736
|
}
|
|
1672
1737
|
}
|
|
1673
|
-
function
|
|
1738
|
+
function Ss(t) {
|
|
1674
1739
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
1675
1740
|
}
|
|
1676
|
-
function
|
|
1741
|
+
function As(t, e) {
|
|
1677
1742
|
const r = c.toCamelCase(" " + e);
|
|
1678
1743
|
["get", "set", "has"].forEach((n) => {
|
|
1679
1744
|
Object.defineProperty(t, n + r, {
|
|
1680
|
-
value: function(s,
|
|
1681
|
-
return this[n].call(this, e, s,
|
|
1745
|
+
value: function(s, a, i) {
|
|
1746
|
+
return this[n].call(this, e, s, a, i);
|
|
1682
1747
|
},
|
|
1683
1748
|
configurable: !0
|
|
1684
1749
|
});
|
|
1685
1750
|
});
|
|
1686
1751
|
}
|
|
1687
|
-
class
|
|
1752
|
+
let Q = class {
|
|
1688
1753
|
constructor(e) {
|
|
1689
1754
|
e && this.set(e);
|
|
1690
1755
|
}
|
|
1691
1756
|
set(e, r, n) {
|
|
1692
1757
|
const s = this;
|
|
1693
|
-
function
|
|
1694
|
-
const u =
|
|
1758
|
+
function a(l, f, d) {
|
|
1759
|
+
const u = Ce(f);
|
|
1695
1760
|
if (!u)
|
|
1696
1761
|
throw new Error("header name must be a non-empty string");
|
|
1697
1762
|
const h = c.findKey(s, u);
|
|
1698
|
-
(!h || s[h] === void 0 ||
|
|
1763
|
+
(!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || f] = ze(l));
|
|
1699
1764
|
}
|
|
1700
|
-
const
|
|
1765
|
+
const i = (l, f) => c.forEach(l, (d, u) => a(d, u, f));
|
|
1701
1766
|
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
1702
|
-
|
|
1703
|
-
else if (c.isString(e) && (e = e.trim()) && !
|
|
1704
|
-
|
|
1767
|
+
i(e, r);
|
|
1768
|
+
else if (c.isString(e) && (e = e.trim()) && !Os(e))
|
|
1769
|
+
i(Rs(e), r);
|
|
1705
1770
|
else if (c.isObject(e) && c.isIterable(e)) {
|
|
1706
|
-
let l = {},
|
|
1771
|
+
let l = {}, f, d;
|
|
1707
1772
|
for (const u of e) {
|
|
1708
1773
|
if (!c.isArray(u))
|
|
1709
1774
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1710
|
-
l[
|
|
1775
|
+
l[d = u[0]] = (f = l[d]) ? c.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
1711
1776
|
}
|
|
1712
|
-
|
|
1777
|
+
i(l, r);
|
|
1713
1778
|
} else
|
|
1714
|
-
e != null &&
|
|
1779
|
+
e != null && a(r, e, n);
|
|
1715
1780
|
return this;
|
|
1716
1781
|
}
|
|
1717
1782
|
get(e, r) {
|
|
1718
|
-
if (e =
|
|
1783
|
+
if (e = Ce(e), e) {
|
|
1719
1784
|
const n = c.findKey(this, e);
|
|
1720
1785
|
if (n) {
|
|
1721
1786
|
const s = this[n];
|
|
1722
1787
|
if (!r)
|
|
1723
1788
|
return s;
|
|
1724
1789
|
if (r === !0)
|
|
1725
|
-
return
|
|
1790
|
+
return xs(s);
|
|
1726
1791
|
if (c.isFunction(r))
|
|
1727
1792
|
return r.call(this, s, n);
|
|
1728
1793
|
if (c.isRegExp(r))
|
|
@@ -1732,42 +1797,42 @@ class X {
|
|
|
1732
1797
|
}
|
|
1733
1798
|
}
|
|
1734
1799
|
has(e, r) {
|
|
1735
|
-
if (e =
|
|
1800
|
+
if (e = Ce(e), e) {
|
|
1736
1801
|
const n = c.findKey(this, e);
|
|
1737
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1802
|
+
return !!(n && this[n] !== void 0 && (!r || ft(this, this[n], n, r)));
|
|
1738
1803
|
}
|
|
1739
1804
|
return !1;
|
|
1740
1805
|
}
|
|
1741
1806
|
delete(e, r) {
|
|
1742
1807
|
const n = this;
|
|
1743
1808
|
let s = !1;
|
|
1744
|
-
function i
|
|
1745
|
-
if (
|
|
1746
|
-
const l = c.findKey(n,
|
|
1747
|
-
l && (!r ||
|
|
1809
|
+
function a(i) {
|
|
1810
|
+
if (i = Ce(i), i) {
|
|
1811
|
+
const l = c.findKey(n, i);
|
|
1812
|
+
l && (!r || ft(n, n[l], l, r)) && (delete n[l], s = !0);
|
|
1748
1813
|
}
|
|
1749
1814
|
}
|
|
1750
|
-
return c.isArray(e) ? e.forEach(
|
|
1815
|
+
return c.isArray(e) ? e.forEach(a) : a(e), s;
|
|
1751
1816
|
}
|
|
1752
1817
|
clear(e) {
|
|
1753
1818
|
const r = Object.keys(this);
|
|
1754
1819
|
let n = r.length, s = !1;
|
|
1755
1820
|
for (; n--; ) {
|
|
1756
|
-
const
|
|
1757
|
-
(!e ||
|
|
1821
|
+
const a = r[n];
|
|
1822
|
+
(!e || ft(this, this[a], a, e, !0)) && (delete this[a], s = !0);
|
|
1758
1823
|
}
|
|
1759
1824
|
return s;
|
|
1760
1825
|
}
|
|
1761
1826
|
normalize(e) {
|
|
1762
1827
|
const r = this, n = {};
|
|
1763
|
-
return c.forEach(this, (s,
|
|
1764
|
-
const
|
|
1765
|
-
if (
|
|
1766
|
-
r[
|
|
1828
|
+
return c.forEach(this, (s, a) => {
|
|
1829
|
+
const i = c.findKey(n, a);
|
|
1830
|
+
if (i) {
|
|
1831
|
+
r[i] = ze(s), delete r[a];
|
|
1767
1832
|
return;
|
|
1768
1833
|
}
|
|
1769
|
-
const l = e ?
|
|
1770
|
-
l !==
|
|
1834
|
+
const l = e ? Ss(a) : String(a).trim();
|
|
1835
|
+
l !== a && delete r[a], r[l] = ze(s), n[l] = !0;
|
|
1771
1836
|
}), this;
|
|
1772
1837
|
}
|
|
1773
1838
|
concat(...e) {
|
|
@@ -1800,18 +1865,25 @@ class X {
|
|
|
1800
1865
|
return r.forEach((s) => n.set(s)), n;
|
|
1801
1866
|
}
|
|
1802
1867
|
static accessor(e) {
|
|
1803
|
-
const n = (this[
|
|
1868
|
+
const n = (this[Wt] = this[Wt] = {
|
|
1804
1869
|
accessors: {}
|
|
1805
1870
|
}).accessors, s = this.prototype;
|
|
1806
|
-
function i
|
|
1807
|
-
const l =
|
|
1808
|
-
n[l] || (
|
|
1871
|
+
function a(i) {
|
|
1872
|
+
const l = Ce(i);
|
|
1873
|
+
n[l] || (As(s, i), n[l] = !0);
|
|
1809
1874
|
}
|
|
1810
|
-
return c.isArray(e) ? e.forEach(
|
|
1875
|
+
return c.isArray(e) ? e.forEach(a) : a(e), this;
|
|
1811
1876
|
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1877
|
+
};
|
|
1878
|
+
Q.accessor([
|
|
1879
|
+
"Content-Type",
|
|
1880
|
+
"Content-Length",
|
|
1881
|
+
"Accept",
|
|
1882
|
+
"Accept-Encoding",
|
|
1883
|
+
"User-Agent",
|
|
1884
|
+
"Authorization"
|
|
1885
|
+
]);
|
|
1886
|
+
c.reduceDescriptors(Q.prototype, ({ value: t }, e) => {
|
|
1815
1887
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
1816
1888
|
return {
|
|
1817
1889
|
get: () => t,
|
|
@@ -1820,101 +1892,114 @@ c.reduceDescriptors(X.prototype, ({ value: t }, e) => {
|
|
|
1820
1892
|
}
|
|
1821
1893
|
};
|
|
1822
1894
|
});
|
|
1823
|
-
c.freezeMethods(
|
|
1824
|
-
function
|
|
1825
|
-
const r = this ||
|
|
1826
|
-
let
|
|
1895
|
+
c.freezeMethods(Q);
|
|
1896
|
+
function dt(t, e) {
|
|
1897
|
+
const r = this || Fe, n = e || r, s = Q.from(n.headers);
|
|
1898
|
+
let a = n.data;
|
|
1827
1899
|
return c.forEach(t, function(l) {
|
|
1828
|
-
|
|
1829
|
-
}), s.normalize(),
|
|
1900
|
+
a = l.call(r, a, s.normalize(), e ? e.status : void 0);
|
|
1901
|
+
}), s.normalize(), a;
|
|
1830
1902
|
}
|
|
1831
|
-
function
|
|
1903
|
+
function Rr(t) {
|
|
1832
1904
|
return !!(t && t.__CANCEL__);
|
|
1833
1905
|
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1906
|
+
let Ne = class extends w {
|
|
1907
|
+
/**
|
|
1908
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1909
|
+
*
|
|
1910
|
+
* @param {string=} message The message.
|
|
1911
|
+
* @param {Object=} config The config.
|
|
1912
|
+
* @param {Object=} request The request.
|
|
1913
|
+
*
|
|
1914
|
+
* @returns {CanceledError} The created error.
|
|
1915
|
+
*/
|
|
1916
|
+
constructor(e, r, n) {
|
|
1917
|
+
super(e ?? "canceled", w.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1920
|
+
function Tr(t, e, r) {
|
|
1841
1921
|
const n = r.config.validateStatus;
|
|
1842
|
-
!r.status || !n || n(r.status) ? t(r) : e(
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1922
|
+
!r.status || !n || n(r.status) ? t(r) : e(
|
|
1923
|
+
new w(
|
|
1924
|
+
"Request failed with status code " + r.status,
|
|
1925
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1926
|
+
r.config,
|
|
1927
|
+
r.request,
|
|
1928
|
+
r
|
|
1929
|
+
)
|
|
1930
|
+
);
|
|
1849
1931
|
}
|
|
1850
|
-
function
|
|
1932
|
+
function Cs(t) {
|
|
1851
1933
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1852
1934
|
return e && e[1] || "";
|
|
1853
1935
|
}
|
|
1854
|
-
function
|
|
1936
|
+
function Ps(t, e) {
|
|
1855
1937
|
t = t || 10;
|
|
1856
1938
|
const r = new Array(t), n = new Array(t);
|
|
1857
|
-
let s = 0,
|
|
1858
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
let h =
|
|
1939
|
+
let s = 0, a = 0, i;
|
|
1940
|
+
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
1941
|
+
const d = Date.now(), u = n[a];
|
|
1942
|
+
i || (i = d), r[s] = f, n[s] = d;
|
|
1943
|
+
let h = a, _ = 0;
|
|
1862
1944
|
for (; h !== s; )
|
|
1863
|
-
|
|
1864
|
-
if (s = (s + 1) % t, s ===
|
|
1945
|
+
_ += r[h++], h = h % t;
|
|
1946
|
+
if (s = (s + 1) % t, s === a && (a = (a + 1) % t), d - i < e)
|
|
1865
1947
|
return;
|
|
1866
|
-
const
|
|
1867
|
-
return
|
|
1948
|
+
const k = u && d - u;
|
|
1949
|
+
return k ? Math.round(_ * 1e3 / k) : void 0;
|
|
1868
1950
|
};
|
|
1869
1951
|
}
|
|
1870
|
-
function
|
|
1871
|
-
let r = 0, n = 1e3 / e, s,
|
|
1872
|
-
const
|
|
1873
|
-
r = u, s = null,
|
|
1952
|
+
function ks(t, e) {
|
|
1953
|
+
let r = 0, n = 1e3 / e, s, a;
|
|
1954
|
+
const i = (d, u = Date.now()) => {
|
|
1955
|
+
r = u, s = null, a && (clearTimeout(a), a = null), t(...d);
|
|
1874
1956
|
};
|
|
1875
|
-
return [(...
|
|
1957
|
+
return [(...d) => {
|
|
1876
1958
|
const u = Date.now(), h = u - r;
|
|
1877
|
-
h >= n ?
|
|
1878
|
-
|
|
1959
|
+
h >= n ? i(d, u) : (s = d, a || (a = setTimeout(() => {
|
|
1960
|
+
a = null, i(s);
|
|
1879
1961
|
}, n - h)));
|
|
1880
|
-
}, () => s &&
|
|
1962
|
+
}, () => s && i(s)];
|
|
1881
1963
|
}
|
|
1882
1964
|
const Ye = (t, e, r = 3) => {
|
|
1883
1965
|
let n = 0;
|
|
1884
|
-
const s =
|
|
1885
|
-
return
|
|
1886
|
-
const
|
|
1887
|
-
n =
|
|
1966
|
+
const s = Ps(50, 250);
|
|
1967
|
+
return ks((a) => {
|
|
1968
|
+
const i = a.loaded, l = a.lengthComputable ? a.total : void 0, f = l != null ? Math.min(i, l) : i, d = Math.max(0, f - n), u = s(d);
|
|
1969
|
+
n = Math.max(n, f);
|
|
1888
1970
|
const h = {
|
|
1889
|
-
loaded:
|
|
1971
|
+
loaded: f,
|
|
1890
1972
|
total: l,
|
|
1891
|
-
progress: l ?
|
|
1892
|
-
bytes:
|
|
1893
|
-
rate:
|
|
1894
|
-
estimated:
|
|
1895
|
-
event:
|
|
1973
|
+
progress: l ? f / l : void 0,
|
|
1974
|
+
bytes: d,
|
|
1975
|
+
rate: u || void 0,
|
|
1976
|
+
estimated: u && l ? (l - f) / u : void 0,
|
|
1977
|
+
event: a,
|
|
1896
1978
|
lengthComputable: l != null,
|
|
1897
1979
|
[e ? "download" : "upload"]: !0
|
|
1898
1980
|
};
|
|
1899
1981
|
t(h);
|
|
1900
1982
|
}, r);
|
|
1901
|
-
},
|
|
1983
|
+
}, zt = (t, e) => {
|
|
1902
1984
|
const r = t != null;
|
|
1903
|
-
return [
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
)
|
|
1985
|
+
return [
|
|
1986
|
+
(n) => e[0]({
|
|
1987
|
+
lengthComputable: r,
|
|
1988
|
+
total: t,
|
|
1989
|
+
loaded: n
|
|
1990
|
+
}),
|
|
1991
|
+
e[1]
|
|
1992
|
+
];
|
|
1993
|
+
}, Jt = (t) => (...e) => c.asap(() => t(...e)), Ls = V.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, V.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1994
|
+
new URL(V.origin),
|
|
1995
|
+
V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
|
|
1996
|
+
) : () => !0, Ds = V.hasStandardBrowserEnv ? (
|
|
1912
1997
|
// Standard browser envs support document.cookie
|
|
1913
1998
|
{
|
|
1914
|
-
write(t, e, r, n, s,
|
|
1999
|
+
write(t, e, r, n, s, a, i) {
|
|
1915
2000
|
if (typeof document > "u") return;
|
|
1916
2001
|
const l = [`${t}=${encodeURIComponent(e)}`];
|
|
1917
|
-
c.isNumber(r) && l.push(`expires=${new Date(r).toUTCString()}`), c.isString(n) && l.push(`path=${n}`), c.isString(s) && l.push(`domain=${s}`),
|
|
2002
|
+
c.isNumber(r) && l.push(`expires=${new Date(r).toUTCString()}`), c.isString(n) && l.push(`path=${n}`), c.isString(s) && l.push(`domain=${s}`), a === !0 && l.push("secure"), c.isString(i) && l.push(`SameSite=${i}`), document.cookie = l.join("; ");
|
|
1918
2003
|
},
|
|
1919
2004
|
read(t) {
|
|
1920
2005
|
if (typeof document > "u") return null;
|
|
@@ -1937,184 +2022,215 @@ const Ye = (t, e, r = 3) => {
|
|
|
1937
2022
|
}
|
|
1938
2023
|
}
|
|
1939
2024
|
);
|
|
1940
|
-
function
|
|
1941
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
2025
|
+
function Fs(t) {
|
|
2026
|
+
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1942
2027
|
}
|
|
1943
|
-
function
|
|
2028
|
+
function Ns(t, e) {
|
|
1944
2029
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1945
2030
|
}
|
|
1946
|
-
function
|
|
1947
|
-
let n = !
|
|
1948
|
-
return t && (n || r
|
|
2031
|
+
function vr(t, e, r) {
|
|
2032
|
+
let n = !Fs(e);
|
|
2033
|
+
return t && (n || r === !1) ? Ns(t, e) : e;
|
|
1949
2034
|
}
|
|
1950
|
-
const
|
|
2035
|
+
const Yt = (t) => t instanceof Q ? { ...t } : t;
|
|
1951
2036
|
function ye(t, e) {
|
|
1952
2037
|
e = e || {};
|
|
1953
|
-
const r =
|
|
1954
|
-
|
|
1955
|
-
|
|
2038
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
2039
|
+
Object.defineProperty(r, "hasOwnProperty", {
|
|
2040
|
+
value: Object.prototype.hasOwnProperty,
|
|
2041
|
+
enumerable: !1,
|
|
2042
|
+
writable: !0,
|
|
2043
|
+
configurable: !0
|
|
2044
|
+
});
|
|
2045
|
+
function n(d, u, h, _) {
|
|
2046
|
+
return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: _ }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
|
|
1956
2047
|
}
|
|
1957
|
-
function s(
|
|
2048
|
+
function s(d, u, h, _) {
|
|
1958
2049
|
if (c.isUndefined(u)) {
|
|
1959
|
-
if (!c.isUndefined(
|
|
1960
|
-
return n(void 0,
|
|
1961
|
-
} else return n(
|
|
2050
|
+
if (!c.isUndefined(d))
|
|
2051
|
+
return n(void 0, d, h, _);
|
|
2052
|
+
} else return n(d, u, h, _);
|
|
1962
2053
|
}
|
|
1963
|
-
function
|
|
2054
|
+
function a(d, u) {
|
|
1964
2055
|
if (!c.isUndefined(u))
|
|
1965
2056
|
return n(void 0, u);
|
|
1966
2057
|
}
|
|
1967
|
-
function
|
|
2058
|
+
function i(d, u) {
|
|
1968
2059
|
if (c.isUndefined(u)) {
|
|
1969
|
-
if (!c.isUndefined(
|
|
1970
|
-
return n(void 0,
|
|
2060
|
+
if (!c.isUndefined(d))
|
|
2061
|
+
return n(void 0, d);
|
|
1971
2062
|
} else return n(void 0, u);
|
|
1972
2063
|
}
|
|
1973
|
-
function l(
|
|
1974
|
-
if (h
|
|
1975
|
-
return n(
|
|
1976
|
-
if (h
|
|
1977
|
-
return n(void 0,
|
|
1978
|
-
}
|
|
1979
|
-
const
|
|
1980
|
-
url:
|
|
1981
|
-
method:
|
|
1982
|
-
data:
|
|
1983
|
-
baseURL:
|
|
1984
|
-
transformRequest:
|
|
1985
|
-
transformResponse:
|
|
1986
|
-
paramsSerializer:
|
|
1987
|
-
timeout:
|
|
1988
|
-
timeoutMessage:
|
|
1989
|
-
withCredentials:
|
|
1990
|
-
withXSRFToken:
|
|
1991
|
-
adapter:
|
|
1992
|
-
responseType:
|
|
1993
|
-
xsrfCookieName:
|
|
1994
|
-
xsrfHeaderName:
|
|
1995
|
-
onUploadProgress:
|
|
1996
|
-
onDownloadProgress:
|
|
1997
|
-
decompress:
|
|
1998
|
-
maxContentLength:
|
|
1999
|
-
maxBodyLength:
|
|
2000
|
-
beforeRedirect:
|
|
2001
|
-
transport:
|
|
2002
|
-
httpAgent:
|
|
2003
|
-
httpsAgent:
|
|
2004
|
-
cancelToken:
|
|
2005
|
-
socketPath:
|
|
2006
|
-
|
|
2064
|
+
function l(d, u, h) {
|
|
2065
|
+
if (c.hasOwnProp(e, h))
|
|
2066
|
+
return n(d, u);
|
|
2067
|
+
if (c.hasOwnProp(t, h))
|
|
2068
|
+
return n(void 0, d);
|
|
2069
|
+
}
|
|
2070
|
+
const f = {
|
|
2071
|
+
url: a,
|
|
2072
|
+
method: a,
|
|
2073
|
+
data: a,
|
|
2074
|
+
baseURL: i,
|
|
2075
|
+
transformRequest: i,
|
|
2076
|
+
transformResponse: i,
|
|
2077
|
+
paramsSerializer: i,
|
|
2078
|
+
timeout: i,
|
|
2079
|
+
timeoutMessage: i,
|
|
2080
|
+
withCredentials: i,
|
|
2081
|
+
withXSRFToken: i,
|
|
2082
|
+
adapter: i,
|
|
2083
|
+
responseType: i,
|
|
2084
|
+
xsrfCookieName: i,
|
|
2085
|
+
xsrfHeaderName: i,
|
|
2086
|
+
onUploadProgress: i,
|
|
2087
|
+
onDownloadProgress: i,
|
|
2088
|
+
decompress: i,
|
|
2089
|
+
maxContentLength: i,
|
|
2090
|
+
maxBodyLength: i,
|
|
2091
|
+
beforeRedirect: i,
|
|
2092
|
+
transport: i,
|
|
2093
|
+
httpAgent: i,
|
|
2094
|
+
httpsAgent: i,
|
|
2095
|
+
cancelToken: i,
|
|
2096
|
+
socketPath: i,
|
|
2097
|
+
allowedSocketPaths: i,
|
|
2098
|
+
responseEncoding: i,
|
|
2007
2099
|
validateStatus: l,
|
|
2008
|
-
headers: (
|
|
2100
|
+
headers: (d, u, h) => s(Yt(d), Yt(u), h, !0)
|
|
2009
2101
|
};
|
|
2010
2102
|
return c.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
2011
|
-
|
|
2012
|
-
c.
|
|
2103
|
+
if (u === "__proto__" || u === "constructor" || u === "prototype") return;
|
|
2104
|
+
const h = c.hasOwnProp(f, u) ? f[u] : s, _ = c.hasOwnProp(t, u) ? t[u] : void 0, k = c.hasOwnProp(e, u) ? e[u] : void 0, m = h(_, k, u);
|
|
2105
|
+
c.isUndefined(m) && h !== l || (r[u] = m);
|
|
2013
2106
|
}), r;
|
|
2014
2107
|
}
|
|
2015
2108
|
const _r = (t) => {
|
|
2016
|
-
const e = ye({}, t);
|
|
2017
|
-
let
|
|
2018
|
-
|
|
2109
|
+
const e = ye({}, t), r = (_) => c.hasOwnProp(e, _) ? e[_] : void 0, n = r("data");
|
|
2110
|
+
let s = r("withXSRFToken");
|
|
2111
|
+
const a = r("xsrfHeaderName"), i = r("xsrfCookieName");
|
|
2112
|
+
let l = r("headers");
|
|
2113
|
+
const f = r("auth"), d = r("baseURL"), u = r("allowAbsoluteUrls"), h = r("url");
|
|
2114
|
+
if (e.headers = l = Q.from(l), e.url = Er(
|
|
2115
|
+
vr(d, h, u),
|
|
2116
|
+
t.params,
|
|
2117
|
+
t.paramsSerializer
|
|
2118
|
+
), f && l.set(
|
|
2019
2119
|
"Authorization",
|
|
2020
|
-
"Basic " + btoa(
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2120
|
+
"Basic " + btoa(
|
|
2121
|
+
(f.username || "") + ":" + (f.password ? unescape(encodeURIComponent(f.password)) : "")
|
|
2122
|
+
)
|
|
2123
|
+
), c.isFormData(n)) {
|
|
2124
|
+
if (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv)
|
|
2125
|
+
l.setContentType(void 0);
|
|
2126
|
+
else if (c.isFunction(n.getHeaders)) {
|
|
2127
|
+
const _ = n.getHeaders(), k = ["content-type", "content-length"];
|
|
2128
|
+
Object.entries(_).forEach(([m, y]) => {
|
|
2129
|
+
k.includes(m.toLowerCase()) && l.set(m, y);
|
|
2028
2130
|
});
|
|
2029
2131
|
}
|
|
2030
2132
|
}
|
|
2031
|
-
if (
|
|
2032
|
-
const
|
|
2033
|
-
|
|
2133
|
+
if (V.hasStandardBrowserEnv && (c.isFunction(s) && (s = s(e)), s === !0 || s == null && Ls(e.url))) {
|
|
2134
|
+
const k = a && i && Ds.read(i);
|
|
2135
|
+
k && l.set(a, k);
|
|
2034
2136
|
}
|
|
2035
2137
|
return e;
|
|
2036
|
-
},
|
|
2138
|
+
}, js = typeof XMLHttpRequest < "u", Us = js && function(t) {
|
|
2037
2139
|
return new Promise(function(r, n) {
|
|
2038
2140
|
const s = _r(t);
|
|
2039
|
-
let
|
|
2040
|
-
const
|
|
2041
|
-
let { responseType: l, onUploadProgress:
|
|
2042
|
-
function
|
|
2043
|
-
|
|
2044
|
-
}
|
|
2045
|
-
let
|
|
2046
|
-
|
|
2047
|
-
function
|
|
2048
|
-
if (!
|
|
2141
|
+
let a = s.data;
|
|
2142
|
+
const i = Q.from(s.headers).normalize();
|
|
2143
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: d } = s, u, h, _, k, m;
|
|
2144
|
+
function y() {
|
|
2145
|
+
k && k(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
2146
|
+
}
|
|
2147
|
+
let g = new XMLHttpRequest();
|
|
2148
|
+
g.open(s.method.toUpperCase(), s.url, !0), g.timeout = s.timeout;
|
|
2149
|
+
function A() {
|
|
2150
|
+
if (!g)
|
|
2049
2151
|
return;
|
|
2050
|
-
const
|
|
2051
|
-
"getAllResponseHeaders" in
|
|
2052
|
-
),
|
|
2053
|
-
data: !l || l === "text" || l === "json" ?
|
|
2054
|
-
status:
|
|
2055
|
-
statusText:
|
|
2056
|
-
headers:
|
|
2152
|
+
const D = Q.from(
|
|
2153
|
+
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
2154
|
+
), $ = {
|
|
2155
|
+
data: !l || l === "text" || l === "json" ? g.responseText : g.response,
|
|
2156
|
+
status: g.status,
|
|
2157
|
+
statusText: g.statusText,
|
|
2158
|
+
headers: D,
|
|
2057
2159
|
config: t,
|
|
2058
|
-
request:
|
|
2160
|
+
request: g
|
|
2059
2161
|
};
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2162
|
+
Tr(
|
|
2163
|
+
function(q) {
|
|
2164
|
+
r(q), y();
|
|
2165
|
+
},
|
|
2166
|
+
function(q) {
|
|
2167
|
+
n(q), y();
|
|
2168
|
+
},
|
|
2169
|
+
$
|
|
2170
|
+
), g = null;
|
|
2171
|
+
}
|
|
2172
|
+
"onloadend" in g ? g.onloadend = A : g.onreadystatechange = function() {
|
|
2173
|
+
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(A);
|
|
2174
|
+
}, g.onabort = function() {
|
|
2175
|
+
g && (n(new w("Request aborted", w.ECONNABORTED, t, g)), g = null);
|
|
2176
|
+
}, g.onerror = function(C) {
|
|
2177
|
+
const $ = C && C.message ? C.message : "Network Error", se = new w($, w.ERR_NETWORK, t, g);
|
|
2178
|
+
se.event = C || null, n(se), g = null;
|
|
2179
|
+
}, g.ontimeout = function() {
|
|
2180
|
+
let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
2181
|
+
const $ = s.transitional || wt;
|
|
2182
|
+
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(
|
|
2183
|
+
new w(
|
|
2184
|
+
C,
|
|
2185
|
+
$.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
2186
|
+
t,
|
|
2187
|
+
g
|
|
2188
|
+
)
|
|
2189
|
+
), g = null;
|
|
2190
|
+
}, a === void 0 && i.setContentType(null), "setRequestHeader" in g && c.forEach(i.toJSON(), function(C, $) {
|
|
2191
|
+
g.setRequestHeader($, C);
|
|
2192
|
+
}), c.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), l && l !== "json" && (g.responseType = s.responseType), d && ([_, m] = Ye(d, !0), g.addEventListener("progress", _)), f && g.upload && ([h, k] = Ye(f), g.upload.addEventListener("progress", h), g.upload.addEventListener("loadend", k)), (s.cancelToken || s.signal) && (u = (D) => {
|
|
2193
|
+
g && (n(!D || D.type ? new Ne(null, t, g) : D), g.abort(), g = null);
|
|
2086
2194
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
2087
|
-
const
|
|
2088
|
-
if (
|
|
2089
|
-
n(
|
|
2195
|
+
const L = Cs(s.url);
|
|
2196
|
+
if (L && V.protocols.indexOf(L) === -1) {
|
|
2197
|
+
n(
|
|
2198
|
+
new w(
|
|
2199
|
+
"Unsupported protocol " + L + ":",
|
|
2200
|
+
w.ERR_BAD_REQUEST,
|
|
2201
|
+
t
|
|
2202
|
+
)
|
|
2203
|
+
);
|
|
2090
2204
|
return;
|
|
2091
2205
|
}
|
|
2092
|
-
|
|
2206
|
+
g.send(a || null);
|
|
2093
2207
|
});
|
|
2094
|
-
},
|
|
2208
|
+
}, Is = (t, e) => {
|
|
2095
2209
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
2096
2210
|
if (e || r) {
|
|
2097
2211
|
let n = new AbortController(), s;
|
|
2098
|
-
const
|
|
2212
|
+
const a = function(d) {
|
|
2099
2213
|
if (!s) {
|
|
2100
2214
|
s = !0, l();
|
|
2101
|
-
const u =
|
|
2102
|
-
n.abort(
|
|
2215
|
+
const u = d instanceof Error ? d : this.reason;
|
|
2216
|
+
n.abort(
|
|
2217
|
+
u instanceof w ? u : new Ne(u instanceof Error ? u.message : u)
|
|
2218
|
+
);
|
|
2103
2219
|
}
|
|
2104
2220
|
};
|
|
2105
|
-
let
|
|
2106
|
-
|
|
2221
|
+
let i = e && setTimeout(() => {
|
|
2222
|
+
i = null, a(new w(`timeout of ${e}ms exceeded`, w.ETIMEDOUT));
|
|
2107
2223
|
}, e);
|
|
2108
2224
|
const l = () => {
|
|
2109
|
-
t && (
|
|
2110
|
-
|
|
2225
|
+
t && (i && clearTimeout(i), i = null, t.forEach((d) => {
|
|
2226
|
+
d.unsubscribe ? d.unsubscribe(a) : d.removeEventListener("abort", a);
|
|
2111
2227
|
}), t = null);
|
|
2112
2228
|
};
|
|
2113
|
-
t.forEach((
|
|
2114
|
-
const { signal:
|
|
2115
|
-
return
|
|
2229
|
+
t.forEach((d) => d.addEventListener("abort", a));
|
|
2230
|
+
const { signal: f } = n;
|
|
2231
|
+
return f.unsubscribe = () => c.asap(l), f;
|
|
2116
2232
|
}
|
|
2117
|
-
},
|
|
2233
|
+
}, Ms = function* (t, e) {
|
|
2118
2234
|
let r = t.byteLength;
|
|
2119
2235
|
if (r < e) {
|
|
2120
2236
|
yield t;
|
|
@@ -2123,10 +2239,10 @@ const _r = (t) => {
|
|
|
2123
2239
|
let n = 0, s;
|
|
2124
2240
|
for (; n < r; )
|
|
2125
2241
|
s = n + e, yield t.slice(n, s), n = s;
|
|
2126
|
-
},
|
|
2127
|
-
for await (const r of
|
|
2128
|
-
yield*
|
|
2129
|
-
},
|
|
2242
|
+
}, Bs = async function* (t, e) {
|
|
2243
|
+
for await (const r of $s(t))
|
|
2244
|
+
yield* Ms(r, e);
|
|
2245
|
+
}, $s = async function* (t) {
|
|
2130
2246
|
if (t[Symbol.asyncIterator]) {
|
|
2131
2247
|
yield* t;
|
|
2132
2248
|
return;
|
|
@@ -2142,200 +2258,221 @@ const _r = (t) => {
|
|
|
2142
2258
|
} finally {
|
|
2143
2259
|
await e.cancel();
|
|
2144
2260
|
}
|
|
2145
|
-
},
|
|
2146
|
-
const s =
|
|
2147
|
-
let
|
|
2148
|
-
|
|
2261
|
+
}, Gt = (t, e, r, n) => {
|
|
2262
|
+
const s = Bs(t, e);
|
|
2263
|
+
let a = 0, i, l = (f) => {
|
|
2264
|
+
i || (i = !0, n && n(f));
|
|
2149
2265
|
};
|
|
2150
|
-
return new ReadableStream(
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2266
|
+
return new ReadableStream(
|
|
2267
|
+
{
|
|
2268
|
+
async pull(f) {
|
|
2269
|
+
try {
|
|
2270
|
+
const { done: d, value: u } = await s.next();
|
|
2271
|
+
if (d) {
|
|
2272
|
+
l(), f.close();
|
|
2273
|
+
return;
|
|
2274
|
+
}
|
|
2275
|
+
let h = u.byteLength;
|
|
2276
|
+
if (r) {
|
|
2277
|
+
let _ = a += h;
|
|
2278
|
+
r(_);
|
|
2279
|
+
}
|
|
2280
|
+
f.enqueue(new Uint8Array(u));
|
|
2281
|
+
} catch (d) {
|
|
2282
|
+
throw l(d), d;
|
|
2162
2283
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2284
|
+
},
|
|
2285
|
+
cancel(f) {
|
|
2286
|
+
return l(f), s.return();
|
|
2166
2287
|
}
|
|
2167
2288
|
},
|
|
2168
|
-
|
|
2169
|
-
|
|
2289
|
+
{
|
|
2290
|
+
highWaterMark: 2
|
|
2170
2291
|
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
});
|
|
2174
|
-
}, Yt = 64 * 1024, { isFunction: Ve } = c, Ds = (({ Request: t, Response: e }) => ({
|
|
2292
|
+
);
|
|
2293
|
+
}, Xt = 64 * 1024, { isFunction: Ve } = c, qs = (({ Request: t, Response: e }) => ({
|
|
2175
2294
|
Request: t,
|
|
2176
2295
|
Response: e
|
|
2177
|
-
}))(c.global), {
|
|
2178
|
-
ReadableStream: Gt,
|
|
2179
|
-
TextEncoder: Xt
|
|
2180
|
-
} = c.global, Qt = (t, ...e) => {
|
|
2296
|
+
}))(c.global), { ReadableStream: Qt, TextEncoder: Zt } = c.global, er = (t, ...e) => {
|
|
2181
2297
|
try {
|
|
2182
2298
|
return !!t(...e);
|
|
2183
2299
|
} catch {
|
|
2184
2300
|
return !1;
|
|
2185
2301
|
}
|
|
2186
|
-
},
|
|
2187
|
-
t = c.merge.call(
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2302
|
+
}, Hs = (t) => {
|
|
2303
|
+
t = c.merge.call(
|
|
2304
|
+
{
|
|
2305
|
+
skipUndefined: !0
|
|
2306
|
+
},
|
|
2307
|
+
qs,
|
|
2308
|
+
t
|
|
2309
|
+
);
|
|
2310
|
+
const { fetch: e, Request: r, Response: n } = t, s = e ? Ve(e) : typeof fetch == "function", a = Ve(r), i = Ve(n);
|
|
2191
2311
|
if (!s)
|
|
2192
2312
|
return !1;
|
|
2193
|
-
const l = s && Ve(
|
|
2194
|
-
let
|
|
2195
|
-
const
|
|
2196
|
-
body: new
|
|
2313
|
+
const l = s && Ve(Qt), f = s && (typeof Zt == "function" ? /* @__PURE__ */ ((m) => (y) => m.encode(y))(new Zt()) : async (m) => new Uint8Array(await new r(m).arrayBuffer())), d = a && l && er(() => {
|
|
2314
|
+
let m = !1;
|
|
2315
|
+
const y = new r(V.origin, {
|
|
2316
|
+
body: new Qt(),
|
|
2197
2317
|
method: "POST",
|
|
2198
2318
|
get duplex() {
|
|
2199
|
-
return
|
|
2319
|
+
return m = !0, "half";
|
|
2200
2320
|
}
|
|
2201
|
-
}).headers.has("Content-Type");
|
|
2202
|
-
return
|
|
2203
|
-
}), u =
|
|
2204
|
-
stream: u && ((
|
|
2321
|
+
}), g = y.headers.has("Content-Type");
|
|
2322
|
+
return y.body != null && y.body.cancel(), m && !g;
|
|
2323
|
+
}), u = i && l && er(() => c.isReadableStream(new n("").body)), h = {
|
|
2324
|
+
stream: u && ((m) => m.body)
|
|
2205
2325
|
};
|
|
2206
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2207
|
-
!h[
|
|
2208
|
-
let
|
|
2209
|
-
if (
|
|
2210
|
-
return
|
|
2211
|
-
throw new
|
|
2326
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
|
|
2327
|
+
!h[m] && (h[m] = (y, g) => {
|
|
2328
|
+
let A = y && y[m];
|
|
2329
|
+
if (A)
|
|
2330
|
+
return A.call(y);
|
|
2331
|
+
throw new w(
|
|
2332
|
+
`Response type '${m}' is not supported`,
|
|
2333
|
+
w.ERR_NOT_SUPPORT,
|
|
2334
|
+
g
|
|
2335
|
+
);
|
|
2212
2336
|
});
|
|
2213
2337
|
});
|
|
2214
|
-
const
|
|
2215
|
-
if (
|
|
2338
|
+
const _ = async (m) => {
|
|
2339
|
+
if (m == null)
|
|
2216
2340
|
return 0;
|
|
2217
|
-
if (c.isBlob(
|
|
2218
|
-
return
|
|
2219
|
-
if (c.isSpecCompliantForm(
|
|
2220
|
-
return (await new r(
|
|
2341
|
+
if (c.isBlob(m))
|
|
2342
|
+
return m.size;
|
|
2343
|
+
if (c.isSpecCompliantForm(m))
|
|
2344
|
+
return (await new r(V.origin, {
|
|
2221
2345
|
method: "POST",
|
|
2222
|
-
body:
|
|
2346
|
+
body: m
|
|
2223
2347
|
}).arrayBuffer()).byteLength;
|
|
2224
|
-
if (c.isArrayBufferView(
|
|
2225
|
-
return
|
|
2226
|
-
if (c.isURLSearchParams(
|
|
2227
|
-
return (await
|
|
2228
|
-
},
|
|
2229
|
-
const
|
|
2230
|
-
return
|
|
2348
|
+
if (c.isArrayBufferView(m) || c.isArrayBuffer(m))
|
|
2349
|
+
return m.byteLength;
|
|
2350
|
+
if (c.isURLSearchParams(m) && (m = m + ""), c.isString(m))
|
|
2351
|
+
return (await f(m)).byteLength;
|
|
2352
|
+
}, k = async (m, y) => {
|
|
2353
|
+
const g = c.toFiniteNumber(m.getContentLength());
|
|
2354
|
+
return g ?? _(y);
|
|
2231
2355
|
};
|
|
2232
|
-
return async (
|
|
2356
|
+
return async (m) => {
|
|
2233
2357
|
let {
|
|
2234
|
-
url:
|
|
2235
|
-
method:
|
|
2236
|
-
data:
|
|
2237
|
-
signal:
|
|
2238
|
-
cancelToken:
|
|
2239
|
-
timeout:
|
|
2240
|
-
onDownloadProgress:
|
|
2241
|
-
onUploadProgress:
|
|
2242
|
-
responseType:
|
|
2243
|
-
headers:
|
|
2358
|
+
url: y,
|
|
2359
|
+
method: g,
|
|
2360
|
+
data: A,
|
|
2361
|
+
signal: L,
|
|
2362
|
+
cancelToken: D,
|
|
2363
|
+
timeout: C,
|
|
2364
|
+
onDownloadProgress: $,
|
|
2365
|
+
onUploadProgress: se,
|
|
2366
|
+
responseType: q,
|
|
2367
|
+
headers: W,
|
|
2244
2368
|
withCredentials: Z = "same-origin",
|
|
2245
2369
|
fetchOptions: fe
|
|
2246
|
-
} = _r(
|
|
2247
|
-
|
|
2248
|
-
let
|
|
2249
|
-
|
|
2250
|
-
|
|
2370
|
+
} = _r(m), le = e || fetch;
|
|
2371
|
+
q = q ? (q + "").toLowerCase() : "text";
|
|
2372
|
+
let ie = Is(
|
|
2373
|
+
[L, D && D.toAbortSignal()],
|
|
2374
|
+
C
|
|
2375
|
+
), H = null;
|
|
2376
|
+
const K = ie && ie.unsubscribe && (() => {
|
|
2377
|
+
ie.unsubscribe();
|
|
2251
2378
|
});
|
|
2252
|
-
let
|
|
2379
|
+
let b;
|
|
2253
2380
|
try {
|
|
2254
|
-
if (
|
|
2255
|
-
let
|
|
2381
|
+
if (se && d && g !== "get" && g !== "head" && (b = await k(W, A)) !== 0) {
|
|
2382
|
+
let U = new r(y, {
|
|
2256
2383
|
method: "POST",
|
|
2257
|
-
body:
|
|
2384
|
+
body: A,
|
|
2258
2385
|
duplex: "half"
|
|
2259
2386
|
}), M;
|
|
2260
|
-
if (c.isFormData(
|
|
2261
|
-
const [
|
|
2262
|
-
|
|
2263
|
-
Ye(
|
|
2387
|
+
if (c.isFormData(A) && (M = U.headers.get("content-type")) && W.setContentType(M), U.body) {
|
|
2388
|
+
const [J, ue] = zt(
|
|
2389
|
+
b,
|
|
2390
|
+
Ye(Jt(se))
|
|
2264
2391
|
);
|
|
2265
|
-
|
|
2392
|
+
A = Gt(U.body, Xt, J, ue);
|
|
2266
2393
|
}
|
|
2267
2394
|
}
|
|
2268
2395
|
c.isString(Z) || (Z = Z ? "include" : "omit");
|
|
2269
|
-
const
|
|
2396
|
+
const R = a && "credentials" in r.prototype;
|
|
2397
|
+
if (c.isFormData(A)) {
|
|
2398
|
+
const U = W.getContentType();
|
|
2399
|
+
U && /^multipart\/form-data/i.test(U) && !/boundary=/i.test(U) && W.delete("content-type");
|
|
2400
|
+
}
|
|
2401
|
+
const x = {
|
|
2270
2402
|
...fe,
|
|
2271
|
-
signal:
|
|
2272
|
-
method:
|
|
2273
|
-
headers:
|
|
2274
|
-
body:
|
|
2403
|
+
signal: ie,
|
|
2404
|
+
method: g.toUpperCase(),
|
|
2405
|
+
headers: W.normalize().toJSON(),
|
|
2406
|
+
body: A,
|
|
2275
2407
|
duplex: "half",
|
|
2276
|
-
credentials:
|
|
2408
|
+
credentials: R ? Z : void 0
|
|
2277
2409
|
};
|
|
2278
|
-
|
|
2279
|
-
let
|
|
2280
|
-
const
|
|
2281
|
-
if (u && (
|
|
2282
|
-
const
|
|
2410
|
+
H = a && new r(y, x);
|
|
2411
|
+
let T = await (a ? le(H, fe) : le(y, x));
|
|
2412
|
+
const N = u && (q === "stream" || q === "response");
|
|
2413
|
+
if (u && ($ || N && K)) {
|
|
2414
|
+
const U = {};
|
|
2283
2415
|
["status", "statusText", "headers"].forEach((de) => {
|
|
2284
|
-
|
|
2416
|
+
U[de] = T[de];
|
|
2285
2417
|
});
|
|
2286
|
-
const M = c.toFiniteNumber(
|
|
2418
|
+
const M = c.toFiniteNumber(T.headers.get("content-length")), [J, ue] = $ && zt(
|
|
2287
2419
|
M,
|
|
2288
|
-
Ye(
|
|
2420
|
+
Ye(Jt($), !0)
|
|
2289
2421
|
) || [];
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
ue && ue(),
|
|
2422
|
+
T = new n(
|
|
2423
|
+
Gt(T.body, Xt, J, () => {
|
|
2424
|
+
ue && ue(), K && K();
|
|
2293
2425
|
}),
|
|
2294
|
-
|
|
2426
|
+
U
|
|
2295
2427
|
);
|
|
2296
2428
|
}
|
|
2297
|
-
|
|
2298
|
-
let
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2429
|
+
q = q || "text";
|
|
2430
|
+
let oe = await h[c.findKey(h, q) || "text"](
|
|
2431
|
+
T,
|
|
2432
|
+
m
|
|
2433
|
+
);
|
|
2434
|
+
return !N && K && K(), await new Promise((U, M) => {
|
|
2435
|
+
Tr(U, M, {
|
|
2436
|
+
data: oe,
|
|
2437
|
+
headers: Q.from(T.headers),
|
|
2438
|
+
status: T.status,
|
|
2439
|
+
statusText: T.statusText,
|
|
2440
|
+
config: m,
|
|
2441
|
+
request: H
|
|
2307
2442
|
});
|
|
2308
2443
|
});
|
|
2309
|
-
} catch (
|
|
2310
|
-
throw
|
|
2311
|
-
new
|
|
2444
|
+
} catch (R) {
|
|
2445
|
+
throw K && K(), R && R.name === "TypeError" && /Load failed|fetch/i.test(R.message) ? Object.assign(
|
|
2446
|
+
new w(
|
|
2447
|
+
"Network Error",
|
|
2448
|
+
w.ERR_NETWORK,
|
|
2449
|
+
m,
|
|
2450
|
+
H,
|
|
2451
|
+
R && R.response
|
|
2452
|
+
),
|
|
2312
2453
|
{
|
|
2313
|
-
cause:
|
|
2454
|
+
cause: R.cause || R
|
|
2314
2455
|
}
|
|
2315
|
-
) :
|
|
2456
|
+
) : w.from(R, R && R.code, m, H, R && R.response);
|
|
2316
2457
|
}
|
|
2317
2458
|
};
|
|
2318
|
-
},
|
|
2459
|
+
}, Ks = /* @__PURE__ */ new Map(), xr = (t) => {
|
|
2319
2460
|
let e = t && t.env || {};
|
|
2320
|
-
const { fetch: r, Request: n, Response: s } = e,
|
|
2321
|
-
|
|
2322
|
-
s,
|
|
2323
|
-
r
|
|
2324
|
-
];
|
|
2325
|
-
let a = i.length, l = a, g, f, u = Us;
|
|
2461
|
+
const { fetch: r, Request: n, Response: s } = e, a = [n, s, r];
|
|
2462
|
+
let i = a.length, l = i, f, d, u = Ks;
|
|
2326
2463
|
for (; l--; )
|
|
2327
|
-
|
|
2328
|
-
return
|
|
2464
|
+
f = a[l], d = u.get(f), d === void 0 && u.set(f, d = l ? /* @__PURE__ */ new Map() : Hs(e)), u = d;
|
|
2465
|
+
return d;
|
|
2329
2466
|
};
|
|
2330
2467
|
xr();
|
|
2331
|
-
const
|
|
2332
|
-
http:
|
|
2333
|
-
xhr:
|
|
2468
|
+
const Tt = {
|
|
2469
|
+
http: ss,
|
|
2470
|
+
xhr: Us,
|
|
2334
2471
|
fetch: {
|
|
2335
2472
|
get: xr
|
|
2336
2473
|
}
|
|
2337
2474
|
};
|
|
2338
|
-
c.forEach(
|
|
2475
|
+
c.forEach(Tt, (t, e) => {
|
|
2339
2476
|
if (t) {
|
|
2340
2477
|
try {
|
|
2341
2478
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -2344,123 +2481,122 @@ c.forEach(vt, (t, e) => {
|
|
|
2344
2481
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
2345
2482
|
}
|
|
2346
2483
|
});
|
|
2347
|
-
const
|
|
2348
|
-
function
|
|
2484
|
+
const tr = (t) => `- ${t}`, Vs = (t) => c.isFunction(t) || t === null || t === !1;
|
|
2485
|
+
function Ws(t, e) {
|
|
2349
2486
|
t = c.isArray(t) ? t : [t];
|
|
2350
2487
|
const { length: r } = t;
|
|
2351
2488
|
let n, s;
|
|
2352
|
-
const
|
|
2353
|
-
for (let
|
|
2354
|
-
n = t[
|
|
2489
|
+
const a = {};
|
|
2490
|
+
for (let i = 0; i < r; i++) {
|
|
2491
|
+
n = t[i];
|
|
2355
2492
|
let l;
|
|
2356
|
-
if (s = n, !
|
|
2357
|
-
throw new
|
|
2493
|
+
if (s = n, !Vs(n) && (s = Tt[(l = String(n)).toLowerCase()], s === void 0))
|
|
2494
|
+
throw new w(`Unknown adapter '${l}'`);
|
|
2358
2495
|
if (s && (c.isFunction(s) || (s = s.get(e))))
|
|
2359
2496
|
break;
|
|
2360
|
-
|
|
2497
|
+
a[l || "#" + i] = s;
|
|
2361
2498
|
}
|
|
2362
2499
|
if (!s) {
|
|
2363
|
-
const
|
|
2364
|
-
([
|
|
2500
|
+
const i = Object.entries(a).map(
|
|
2501
|
+
([f, d]) => `adapter ${f} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2365
2502
|
);
|
|
2366
|
-
let l = r ?
|
|
2367
|
-
` +
|
|
2368
|
-
`) : " " +
|
|
2369
|
-
throw new
|
|
2503
|
+
let l = r ? i.length > 1 ? `since :
|
|
2504
|
+
` + i.map(tr).join(`
|
|
2505
|
+
`) : " " + tr(i[0]) : "as no adapter specified";
|
|
2506
|
+
throw new w(
|
|
2370
2507
|
"There is no suitable adapter to dispatch the request " + l,
|
|
2371
2508
|
"ERR_NOT_SUPPORT"
|
|
2372
2509
|
);
|
|
2373
2510
|
}
|
|
2374
2511
|
return s;
|
|
2375
2512
|
}
|
|
2376
|
-
const
|
|
2513
|
+
const Or = {
|
|
2377
2514
|
/**
|
|
2378
2515
|
* Resolve an adapter from a list of adapter names or functions.
|
|
2379
2516
|
* @type {Function}
|
|
2380
2517
|
*/
|
|
2381
|
-
getAdapter:
|
|
2518
|
+
getAdapter: Ws,
|
|
2382
2519
|
/**
|
|
2383
2520
|
* Exposes all known adapters
|
|
2384
2521
|
* @type {Object<string, Function|Object>}
|
|
2385
2522
|
*/
|
|
2386
|
-
adapters:
|
|
2523
|
+
adapters: Tt
|
|
2387
2524
|
};
|
|
2388
|
-
function
|
|
2525
|
+
function ht(t) {
|
|
2389
2526
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2390
|
-
throw new
|
|
2527
|
+
throw new Ne(null, t);
|
|
2391
2528
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
t,
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
t.transformResponse,
|
|
2406
|
-
n.response
|
|
2407
|
-
), n.response.headers = X.from(n.response.headers))), Promise.reject(n);
|
|
2408
|
-
});
|
|
2529
|
+
function rr(t) {
|
|
2530
|
+
return ht(t), t.headers = Q.from(t.headers), t.data = dt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Or.getAdapter(t.adapter || Fe.adapter, t)(t).then(
|
|
2531
|
+
function(n) {
|
|
2532
|
+
return ht(t), n.data = dt.call(t, t.transformResponse, n), n.headers = Q.from(n.headers), n;
|
|
2533
|
+
},
|
|
2534
|
+
function(n) {
|
|
2535
|
+
return Rr(n) || (ht(t), n && n.response && (n.response.data = dt.call(
|
|
2536
|
+
t,
|
|
2537
|
+
t.transformResponse,
|
|
2538
|
+
n.response
|
|
2539
|
+
), n.response.headers = Q.from(n.response.headers))), Promise.reject(n);
|
|
2540
|
+
}
|
|
2541
|
+
);
|
|
2409
2542
|
}
|
|
2410
|
-
const
|
|
2543
|
+
const Sr = "1.15.2", tt = {};
|
|
2411
2544
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2412
|
-
|
|
2545
|
+
tt[t] = function(n) {
|
|
2413
2546
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2414
2547
|
};
|
|
2415
2548
|
});
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2418
|
-
function s(
|
|
2419
|
-
return "[Axios v" +
|
|
2549
|
+
const nr = {};
|
|
2550
|
+
tt.transitional = function(e, r, n) {
|
|
2551
|
+
function s(a, i) {
|
|
2552
|
+
return "[Axios v" + Sr + "] Transitional option '" + a + "'" + i + (n ? ". " + n : "");
|
|
2420
2553
|
}
|
|
2421
|
-
return (
|
|
2554
|
+
return (a, i, l) => {
|
|
2422
2555
|
if (e === !1)
|
|
2423
|
-
throw new
|
|
2424
|
-
s(
|
|
2425
|
-
|
|
2556
|
+
throw new w(
|
|
2557
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
2558
|
+
w.ERR_DEPRECATED
|
|
2426
2559
|
);
|
|
2427
|
-
return r && !
|
|
2560
|
+
return r && !nr[i] && (nr[i] = !0, console.warn(
|
|
2428
2561
|
s(
|
|
2429
|
-
|
|
2562
|
+
i,
|
|
2430
2563
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
2431
2564
|
)
|
|
2432
|
-
)), e ? e(
|
|
2565
|
+
)), e ? e(a, i, l) : !0;
|
|
2433
2566
|
};
|
|
2434
2567
|
};
|
|
2435
|
-
|
|
2568
|
+
tt.spelling = function(e) {
|
|
2436
2569
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
2437
2570
|
};
|
|
2438
|
-
function
|
|
2571
|
+
function zs(t, e, r) {
|
|
2439
2572
|
if (typeof t != "object")
|
|
2440
|
-
throw new
|
|
2573
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
2441
2574
|
const n = Object.keys(t);
|
|
2442
2575
|
let s = n.length;
|
|
2443
2576
|
for (; s-- > 0; ) {
|
|
2444
|
-
const
|
|
2445
|
-
if (
|
|
2446
|
-
const l = t[
|
|
2447
|
-
if (
|
|
2448
|
-
throw new
|
|
2577
|
+
const a = n[s], i = Object.prototype.hasOwnProperty.call(e, a) ? e[a] : void 0;
|
|
2578
|
+
if (i) {
|
|
2579
|
+
const l = t[a], f = l === void 0 || i(l, a, t);
|
|
2580
|
+
if (f !== !0)
|
|
2581
|
+
throw new w(
|
|
2582
|
+
"option " + a + " must be " + f,
|
|
2583
|
+
w.ERR_BAD_OPTION_VALUE
|
|
2584
|
+
);
|
|
2449
2585
|
continue;
|
|
2450
2586
|
}
|
|
2451
2587
|
if (r !== !0)
|
|
2452
|
-
throw new
|
|
2588
|
+
throw new w("Unknown option " + a, w.ERR_BAD_OPTION);
|
|
2453
2589
|
}
|
|
2454
2590
|
}
|
|
2455
2591
|
const Je = {
|
|
2456
|
-
assertOptions:
|
|
2457
|
-
validators:
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2592
|
+
assertOptions: zs,
|
|
2593
|
+
validators: tt
|
|
2594
|
+
}, ne = Je.validators;
|
|
2595
|
+
let me = class {
|
|
2460
2596
|
constructor(e) {
|
|
2461
2597
|
this.defaults = e || {}, this.interceptors = {
|
|
2462
|
-
request: new
|
|
2463
|
-
response: new
|
|
2598
|
+
request: new Vt(),
|
|
2599
|
+
response: new Vt()
|
|
2464
2600
|
};
|
|
2465
2601
|
}
|
|
2466
2602
|
/**
|
|
@@ -2478,10 +2614,23 @@ class me {
|
|
|
2478
2614
|
if (n instanceof Error) {
|
|
2479
2615
|
let s = {};
|
|
2480
2616
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2481
|
-
const
|
|
2617
|
+
const a = (() => {
|
|
2618
|
+
if (!s.stack)
|
|
2619
|
+
return "";
|
|
2620
|
+
const i = s.stack.indexOf(`
|
|
2621
|
+
`);
|
|
2622
|
+
return i === -1 ? "" : s.stack.slice(i + 1);
|
|
2623
|
+
})();
|
|
2482
2624
|
try {
|
|
2483
|
-
|
|
2484
|
-
|
|
2625
|
+
if (!n.stack)
|
|
2626
|
+
n.stack = a;
|
|
2627
|
+
else if (a) {
|
|
2628
|
+
const i = a.indexOf(`
|
|
2629
|
+
`), l = i === -1 ? -1 : a.indexOf(`
|
|
2630
|
+
`, i + 1), f = l === -1 ? "" : a.slice(l + 1);
|
|
2631
|
+
String(n.stack).endsWith(f) || (n.stack += `
|
|
2632
|
+
` + a);
|
|
2633
|
+
}
|
|
2485
2634
|
} catch {
|
|
2486
2635
|
}
|
|
2487
2636
|
}
|
|
@@ -2490,121 +2639,136 @@ class me {
|
|
|
2490
2639
|
}
|
|
2491
2640
|
_request(e, r) {
|
|
2492
2641
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = ye(this.defaults, r);
|
|
2493
|
-
const { transitional: n, paramsSerializer: s, headers:
|
|
2494
|
-
n !== void 0 && Je.assertOptions(
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2642
|
+
const { transitional: n, paramsSerializer: s, headers: a } = r;
|
|
2643
|
+
n !== void 0 && Je.assertOptions(
|
|
2644
|
+
n,
|
|
2645
|
+
{
|
|
2646
|
+
silentJSONParsing: ne.transitional(ne.boolean),
|
|
2647
|
+
forcedJSONParsing: ne.transitional(ne.boolean),
|
|
2648
|
+
clarifyTimeoutError: ne.transitional(ne.boolean),
|
|
2649
|
+
legacyInterceptorReqResOrdering: ne.transitional(ne.boolean)
|
|
2650
|
+
},
|
|
2651
|
+
!1
|
|
2652
|
+
), s != null && (c.isFunction(s) ? r.paramsSerializer = {
|
|
2499
2653
|
serialize: s
|
|
2500
|
-
} : Je.assertOptions(
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2654
|
+
} : Je.assertOptions(
|
|
2655
|
+
s,
|
|
2656
|
+
{
|
|
2657
|
+
encode: ne.function,
|
|
2658
|
+
serialize: ne.function
|
|
2659
|
+
},
|
|
2660
|
+
!0
|
|
2661
|
+
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Je.assertOptions(
|
|
2662
|
+
r,
|
|
2663
|
+
{
|
|
2664
|
+
baseUrl: ne.spelling("baseURL"),
|
|
2665
|
+
withXsrfToken: ne.spelling("withXSRFToken")
|
|
2666
|
+
},
|
|
2667
|
+
!0
|
|
2668
|
+
), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2669
|
+
let i = a && c.merge(a.common, a[r.method]);
|
|
2670
|
+
a && c.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (m) => {
|
|
2671
|
+
delete a[m];
|
|
2672
|
+
}), r.headers = Q.concat(i, a);
|
|
2517
2673
|
const l = [];
|
|
2518
|
-
let
|
|
2519
|
-
this.interceptors.request.forEach(function(
|
|
2520
|
-
typeof
|
|
2674
|
+
let f = !0;
|
|
2675
|
+
this.interceptors.request.forEach(function(y) {
|
|
2676
|
+
if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
|
|
2677
|
+
return;
|
|
2678
|
+
f = f && y.synchronous;
|
|
2679
|
+
const g = r.transitional || wt;
|
|
2680
|
+
g && g.legacyInterceptorReqResOrdering ? l.unshift(y.fulfilled, y.rejected) : l.push(y.fulfilled, y.rejected);
|
|
2521
2681
|
});
|
|
2522
|
-
const
|
|
2523
|
-
this.interceptors.response.forEach(function(
|
|
2524
|
-
|
|
2682
|
+
const d = [];
|
|
2683
|
+
this.interceptors.response.forEach(function(y) {
|
|
2684
|
+
d.push(y.fulfilled, y.rejected);
|
|
2525
2685
|
});
|
|
2526
|
-
let u, h = 0,
|
|
2527
|
-
if (!
|
|
2528
|
-
const
|
|
2529
|
-
for (
|
|
2530
|
-
u = u.then(
|
|
2686
|
+
let u, h = 0, _;
|
|
2687
|
+
if (!f) {
|
|
2688
|
+
const m = [rr.bind(this), void 0];
|
|
2689
|
+
for (m.unshift(...l), m.push(...d), _ = m.length, u = Promise.resolve(r); h < _; )
|
|
2690
|
+
u = u.then(m[h++], m[h++]);
|
|
2531
2691
|
return u;
|
|
2532
2692
|
}
|
|
2533
|
-
|
|
2534
|
-
let
|
|
2535
|
-
for (; h <
|
|
2536
|
-
const
|
|
2693
|
+
_ = l.length;
|
|
2694
|
+
let k = r;
|
|
2695
|
+
for (; h < _; ) {
|
|
2696
|
+
const m = l[h++], y = l[h++];
|
|
2537
2697
|
try {
|
|
2538
|
-
|
|
2539
|
-
} catch (
|
|
2540
|
-
|
|
2698
|
+
k = m(k);
|
|
2699
|
+
} catch (g) {
|
|
2700
|
+
y.call(this, g);
|
|
2541
2701
|
break;
|
|
2542
2702
|
}
|
|
2543
2703
|
}
|
|
2544
2704
|
try {
|
|
2545
|
-
u =
|
|
2546
|
-
} catch (
|
|
2547
|
-
return Promise.reject(
|
|
2705
|
+
u = rr.call(this, k);
|
|
2706
|
+
} catch (m) {
|
|
2707
|
+
return Promise.reject(m);
|
|
2548
2708
|
}
|
|
2549
|
-
for (h = 0,
|
|
2550
|
-
u = u.then(
|
|
2709
|
+
for (h = 0, _ = d.length; h < _; )
|
|
2710
|
+
u = u.then(d[h++], d[h++]);
|
|
2551
2711
|
return u;
|
|
2552
2712
|
}
|
|
2553
2713
|
getUri(e) {
|
|
2554
2714
|
e = ye(this.defaults, e);
|
|
2555
|
-
const r =
|
|
2556
|
-
return
|
|
2715
|
+
const r = vr(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
2716
|
+
return Er(r, e.params, e.paramsSerializer);
|
|
2557
2717
|
}
|
|
2558
|
-
}
|
|
2718
|
+
};
|
|
2559
2719
|
c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2560
2720
|
me.prototype[e] = function(r, n) {
|
|
2561
|
-
return this.request(
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2721
|
+
return this.request(
|
|
2722
|
+
ye(n || {}, {
|
|
2723
|
+
method: e,
|
|
2724
|
+
url: r,
|
|
2725
|
+
data: (n || {}).data
|
|
2726
|
+
})
|
|
2727
|
+
);
|
|
2566
2728
|
};
|
|
2567
2729
|
});
|
|
2568
2730
|
c.forEach(["post", "put", "patch"], function(e) {
|
|
2569
2731
|
function r(n) {
|
|
2570
|
-
return function(
|
|
2571
|
-
return this.request(
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2732
|
+
return function(a, i, l) {
|
|
2733
|
+
return this.request(
|
|
2734
|
+
ye(l || {}, {
|
|
2735
|
+
method: e,
|
|
2736
|
+
headers: n ? {
|
|
2737
|
+
"Content-Type": "multipart/form-data"
|
|
2738
|
+
} : {},
|
|
2739
|
+
url: a,
|
|
2740
|
+
data: i
|
|
2741
|
+
})
|
|
2742
|
+
);
|
|
2579
2743
|
};
|
|
2580
2744
|
}
|
|
2581
2745
|
me.prototype[e] = r(), me.prototype[e + "Form"] = r(!0);
|
|
2582
2746
|
});
|
|
2583
|
-
class
|
|
2747
|
+
let Js = class Ar {
|
|
2584
2748
|
constructor(e) {
|
|
2585
2749
|
if (typeof e != "function")
|
|
2586
2750
|
throw new TypeError("executor must be a function.");
|
|
2587
2751
|
let r;
|
|
2588
|
-
this.promise = new Promise(function(
|
|
2589
|
-
r =
|
|
2752
|
+
this.promise = new Promise(function(a) {
|
|
2753
|
+
r = a;
|
|
2590
2754
|
});
|
|
2591
2755
|
const n = this;
|
|
2592
2756
|
this.promise.then((s) => {
|
|
2593
2757
|
if (!n._listeners) return;
|
|
2594
|
-
let
|
|
2595
|
-
for (;
|
|
2596
|
-
n._listeners[
|
|
2758
|
+
let a = n._listeners.length;
|
|
2759
|
+
for (; a-- > 0; )
|
|
2760
|
+
n._listeners[a](s);
|
|
2597
2761
|
n._listeners = null;
|
|
2598
2762
|
}), this.promise.then = (s) => {
|
|
2599
|
-
let
|
|
2600
|
-
const
|
|
2601
|
-
n.subscribe(l),
|
|
2763
|
+
let a;
|
|
2764
|
+
const i = new Promise((l) => {
|
|
2765
|
+
n.subscribe(l), a = l;
|
|
2602
2766
|
}).then(s);
|
|
2603
|
-
return
|
|
2604
|
-
n.unsubscribe(
|
|
2605
|
-
},
|
|
2606
|
-
}, e(function(
|
|
2607
|
-
n.reason || (n.reason = new
|
|
2767
|
+
return i.cancel = function() {
|
|
2768
|
+
n.unsubscribe(a);
|
|
2769
|
+
}, i;
|
|
2770
|
+
}, e(function(a, i, l) {
|
|
2771
|
+
n.reason || (n.reason = new Ne(a, i, l), r(n.reason));
|
|
2608
2772
|
});
|
|
2609
2773
|
}
|
|
2610
2774
|
/**
|
|
@@ -2646,22 +2810,22 @@ class Rt {
|
|
|
2646
2810
|
static source() {
|
|
2647
2811
|
let e;
|
|
2648
2812
|
return {
|
|
2649
|
-
token: new
|
|
2813
|
+
token: new Ar(function(s) {
|
|
2650
2814
|
e = s;
|
|
2651
2815
|
}),
|
|
2652
2816
|
cancel: e
|
|
2653
2817
|
};
|
|
2654
2818
|
}
|
|
2655
|
-
}
|
|
2656
|
-
function
|
|
2819
|
+
};
|
|
2820
|
+
function Ys(t) {
|
|
2657
2821
|
return function(r) {
|
|
2658
2822
|
return t.apply(null, r);
|
|
2659
2823
|
};
|
|
2660
2824
|
}
|
|
2661
|
-
function
|
|
2825
|
+
function Gs(t) {
|
|
2662
2826
|
return c.isObject(t) && t.isAxiosError === !0;
|
|
2663
2827
|
}
|
|
2664
|
-
const
|
|
2828
|
+
const bt = {
|
|
2665
2829
|
Continue: 100,
|
|
2666
2830
|
SwitchingProtocols: 101,
|
|
2667
2831
|
Processing: 102,
|
|
@@ -2732,42 +2896,59 @@ const yt = {
|
|
|
2732
2896
|
SslHandshakeFailed: 525,
|
|
2733
2897
|
InvalidSslCertificate: 526
|
|
2734
2898
|
};
|
|
2735
|
-
Object.entries(
|
|
2736
|
-
|
|
2899
|
+
Object.entries(bt).forEach(([t, e]) => {
|
|
2900
|
+
bt[e] = t;
|
|
2737
2901
|
});
|
|
2738
|
-
function
|
|
2739
|
-
const e = new me(t), r =
|
|
2902
|
+
function Cr(t) {
|
|
2903
|
+
const e = new me(t), r = lr(me.prototype.request, e);
|
|
2740
2904
|
return c.extend(r, me.prototype, e, { allOwnKeys: !0 }), c.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2741
|
-
return
|
|
2905
|
+
return Cr(ye(t, s));
|
|
2742
2906
|
}, r;
|
|
2743
2907
|
}
|
|
2744
|
-
const
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2908
|
+
const j = Cr(Fe);
|
|
2909
|
+
j.Axios = me;
|
|
2910
|
+
j.CanceledError = Ne;
|
|
2911
|
+
j.CancelToken = Js;
|
|
2912
|
+
j.isCancel = Rr;
|
|
2913
|
+
j.VERSION = Sr;
|
|
2914
|
+
j.toFormData = et;
|
|
2915
|
+
j.AxiosError = w;
|
|
2916
|
+
j.Cancel = j.CanceledError;
|
|
2917
|
+
j.all = function(e) {
|
|
2754
2918
|
return Promise.all(e);
|
|
2755
2919
|
};
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
const
|
|
2765
|
-
|
|
2920
|
+
j.spread = Ys;
|
|
2921
|
+
j.isAxiosError = Gs;
|
|
2922
|
+
j.mergeConfig = ye;
|
|
2923
|
+
j.AxiosHeaders = Q;
|
|
2924
|
+
j.formToJSON = (t) => wr(c.isHTMLForm(t) ? new FormData(t) : t);
|
|
2925
|
+
j.getAdapter = Or.getAdapter;
|
|
2926
|
+
j.HttpStatusCode = bt;
|
|
2927
|
+
j.default = j;
|
|
2928
|
+
const {
|
|
2929
|
+
Axios: To,
|
|
2930
|
+
AxiosError: vo,
|
|
2931
|
+
CanceledError: _o,
|
|
2932
|
+
isCancel: xo,
|
|
2933
|
+
CancelToken: Oo,
|
|
2934
|
+
VERSION: So,
|
|
2935
|
+
all: Ao,
|
|
2936
|
+
Cancel: Co,
|
|
2937
|
+
isAxiosError: Po,
|
|
2938
|
+
spread: ko,
|
|
2939
|
+
toFormData: Lo,
|
|
2940
|
+
AxiosHeaders: Do,
|
|
2941
|
+
HttpStatusCode: Fo,
|
|
2942
|
+
formToJSON: No,
|
|
2943
|
+
getAdapter: jo,
|
|
2944
|
+
mergeConfig: Uo
|
|
2945
|
+
} = j, sr = "https://translation.googleapis.com/language/translate/v2", Xs = /* @__PURE__ */ new Set([408, 425, 429, 500, 502, 503, 504]), Qs = (t) => !!t, Zs = (t) => j.isAxiosError(t);
|
|
2946
|
+
class eo {
|
|
2766
2947
|
constructor(e) {
|
|
2767
2948
|
te(this, "type", "google");
|
|
2768
2949
|
te(this, "axios");
|
|
2769
|
-
this.config = e, this.axios =
|
|
2770
|
-
baseURL: e.endpoint ??
|
|
2950
|
+
this.config = e, this.axios = j.create({
|
|
2951
|
+
baseURL: e.endpoint ?? sr,
|
|
2771
2952
|
headers: {
|
|
2772
2953
|
"Content-Type": "application/json",
|
|
2773
2954
|
...e.headers
|
|
@@ -2775,12 +2956,12 @@ class Ws {
|
|
|
2775
2956
|
});
|
|
2776
2957
|
}
|
|
2777
2958
|
isAvailable() {
|
|
2778
|
-
return this.config.apiKey ||
|
|
2959
|
+
return this.config.apiKey || Qs(this.config.headers) ? { available: !0 } : {
|
|
2779
2960
|
available: !0
|
|
2780
2961
|
};
|
|
2781
2962
|
}
|
|
2782
2963
|
async translate(e, r) {
|
|
2783
|
-
var
|
|
2964
|
+
var f, d, u;
|
|
2784
2965
|
const n = {
|
|
2785
2966
|
q: e.text,
|
|
2786
2967
|
target: e.targetLanguage,
|
|
@@ -2792,16 +2973,16 @@ class Ws {
|
|
|
2792
2973
|
sourceLanguageCode: e.sourceLanguage ?? "auto",
|
|
2793
2974
|
targetLanguageCode: e.targetLanguage
|
|
2794
2975
|
},
|
|
2795
|
-
terms: Object.entries(e.glossary).map(([h,
|
|
2976
|
+
terms: Object.entries(e.glossary).map(([h, _]) => ({
|
|
2796
2977
|
sourceText: h,
|
|
2797
|
-
targetText:
|
|
2978
|
+
targetText: _
|
|
2798
2979
|
}))
|
|
2799
2980
|
}
|
|
2800
2981
|
});
|
|
2801
2982
|
const s = {
|
|
2802
2983
|
...this.config.headers,
|
|
2803
2984
|
...r == null ? void 0 : r.headers
|
|
2804
|
-
},
|
|
2985
|
+
}, i = (u = (d = (f = (await this.axios.post(
|
|
2805
2986
|
"",
|
|
2806
2987
|
n,
|
|
2807
2988
|
{
|
|
@@ -2810,32 +2991,32 @@ class Ws {
|
|
|
2810
2991
|
timeout: r == null ? void 0 : r.timeoutMs,
|
|
2811
2992
|
signal: r == null ? void 0 : r.signal
|
|
2812
2993
|
}
|
|
2813
|
-
)).data) == null ? void 0 :
|
|
2814
|
-
if (!(
|
|
2994
|
+
)).data) == null ? void 0 : f.data) == null ? void 0 : d.translations) == null ? void 0 : u[0];
|
|
2995
|
+
if (!(i != null && i.translatedText))
|
|
2815
2996
|
throw new Error(
|
|
2816
2997
|
"Google Translate response did not include translatedText"
|
|
2817
2998
|
);
|
|
2818
2999
|
const l = {
|
|
2819
|
-
endpoint: this.config.endpoint ??
|
|
3000
|
+
endpoint: this.config.endpoint ?? sr
|
|
2820
3001
|
};
|
|
2821
|
-
return
|
|
2822
|
-
translatedText:
|
|
2823
|
-
detectedSourceLanguage:
|
|
3002
|
+
return i.model && (l.model = i.model), this.config.projectId && (l.projectId = this.config.projectId), this.config.region && (l.region = this.config.region), {
|
|
3003
|
+
translatedText: i.translatedText,
|
|
3004
|
+
detectedSourceLanguage: i.detectedSourceLanguage,
|
|
2824
3005
|
providerMetadata: l
|
|
2825
3006
|
};
|
|
2826
3007
|
}
|
|
2827
3008
|
normalizeError(e) {
|
|
2828
|
-
var r, n, s,
|
|
2829
|
-
if (
|
|
2830
|
-
const l = (r = e.response) == null ? void 0 : r.status,
|
|
3009
|
+
var r, n, s, a, i;
|
|
3010
|
+
if (Zs(e)) {
|
|
3011
|
+
const l = (r = e.response) == null ? void 0 : r.status, f = ((n = e.response) == null ? void 0 : n.data) ?? {}, d = ((s = f.error) == null ? void 0 : s.message) ?? e.message ?? "Google Translate request failed";
|
|
2831
3012
|
return {
|
|
2832
|
-
code: String(((
|
|
2833
|
-
message:
|
|
2834
|
-
retryable: l ?
|
|
3013
|
+
code: String(((a = f.error) == null ? void 0 : a.code) ?? l ?? "E_GOOGLE"),
|
|
3014
|
+
message: d,
|
|
3015
|
+
retryable: l ? Xs.has(l) : !1,
|
|
2835
3016
|
details: {
|
|
2836
3017
|
status: l,
|
|
2837
|
-
data:
|
|
2838
|
-
headers: (
|
|
3018
|
+
data: f,
|
|
3019
|
+
headers: (i = e.response) == null ? void 0 : i.headers
|
|
2839
3020
|
}
|
|
2840
3021
|
};
|
|
2841
3022
|
}
|
|
@@ -2858,7 +3039,7 @@ class Ws {
|
|
|
2858
3039
|
};
|
|
2859
3040
|
}
|
|
2860
3041
|
}
|
|
2861
|
-
const
|
|
3042
|
+
const pt = (t) => {
|
|
2862
3043
|
if (!t)
|
|
2863
3044
|
throw new Error("Provider instance is null or undefined");
|
|
2864
3045
|
if (!t.type)
|
|
@@ -2869,338 +3050,338 @@ const ht = (t) => {
|
|
|
2869
3050
|
throw new Error("Provider 'isAvailable' must be a function");
|
|
2870
3051
|
if (t.normalizeError && typeof t.normalizeError != "function")
|
|
2871
3052
|
throw new Error("Provider 'normalizeError' must be a function");
|
|
2872
|
-
},
|
|
3053
|
+
}, to = (t) => {
|
|
2873
3054
|
if (t.id === "google") {
|
|
2874
|
-
const e = new
|
|
2875
|
-
return
|
|
3055
|
+
const e = new eo(t);
|
|
3056
|
+
return pt(e), e;
|
|
2876
3057
|
}
|
|
2877
3058
|
if (t.implementation)
|
|
2878
|
-
return
|
|
3059
|
+
return pt(t.implementation), t.implementation;
|
|
2879
3060
|
if (t.factory) {
|
|
2880
3061
|
const e = t.factory();
|
|
2881
|
-
return
|
|
3062
|
+
return pt(e), e;
|
|
2882
3063
|
}
|
|
2883
3064
|
throw new Error(
|
|
2884
3065
|
"Custom provider configuration must include either 'implementation' or 'factory'"
|
|
2885
3066
|
);
|
|
2886
|
-
},
|
|
3067
|
+
}, ro = "translator", no = 5e3, or = 3e4, so = "::", oo = (t) => {
|
|
2887
3068
|
var r, n;
|
|
2888
3069
|
return ((n = (r = navigator == null ? void 0 : navigator.language) == null ? void 0 : r.split("-")) == null ? void 0 : n[0]) || t;
|
|
2889
|
-
},
|
|
3070
|
+
}, ao = (t) => localStorage.getItem(t), io = (t, e) => {
|
|
2890
3071
|
localStorage.setItem(t, e);
|
|
2891
|
-
},
|
|
2892
|
-
scope:
|
|
3072
|
+
}, lo = (t) => t ? t instanceof Set ? new Set(t) : new Set(t) : /* @__PURE__ */ new Set(), Pr = (t, e) => ({
|
|
3073
|
+
scope: ro,
|
|
2893
3074
|
event: t,
|
|
2894
3075
|
...e
|
|
2895
|
-
}),
|
|
2896
|
-
console.warn("[vbss-translator]",
|
|
2897
|
-
},
|
|
2898
|
-
console.debug("[vbss-translator]",
|
|
2899
|
-
},
|
|
3076
|
+
}), Pe = (t, e) => {
|
|
3077
|
+
console.warn("[vbss-translator]", Pr(t, e));
|
|
3078
|
+
}, G = (t, e) => {
|
|
3079
|
+
console.debug("[vbss-translator]", Pr(t, e));
|
|
3080
|
+
}, co = () => ({
|
|
2900
3081
|
warn: (t, e) => {
|
|
2901
|
-
|
|
3082
|
+
Pe(t, e ?? {});
|
|
2902
3083
|
},
|
|
2903
3084
|
debug: (t, e) => {
|
|
2904
|
-
|
|
3085
|
+
G(t, e ?? {});
|
|
2905
3086
|
}
|
|
2906
|
-
}),
|
|
3087
|
+
}), uo = (t) => {
|
|
2907
3088
|
const {
|
|
2908
3089
|
provider: e,
|
|
2909
3090
|
cache: r,
|
|
2910
3091
|
alwaysExternalKeys: n,
|
|
2911
3092
|
enabled: s,
|
|
2912
|
-
timeoutMs:
|
|
2913
|
-
debug:
|
|
3093
|
+
timeoutMs: a,
|
|
3094
|
+
debug: i,
|
|
2914
3095
|
...l
|
|
2915
3096
|
} = t ?? {};
|
|
2916
3097
|
return {
|
|
2917
3098
|
enabled: s ?? !1,
|
|
2918
|
-
timeoutMs:
|
|
2919
|
-
debug:
|
|
3099
|
+
timeoutMs: a ?? no,
|
|
3100
|
+
debug: i ?? !1,
|
|
2920
3101
|
provider: {
|
|
2921
|
-
...
|
|
3102
|
+
...fo,
|
|
2922
3103
|
...e
|
|
2923
3104
|
},
|
|
2924
3105
|
cache: {
|
|
2925
|
-
...
|
|
3106
|
+
...ho,
|
|
2926
3107
|
...r
|
|
2927
3108
|
},
|
|
2928
|
-
alwaysExternalKeys:
|
|
3109
|
+
alwaysExternalKeys: lo(n),
|
|
2929
3110
|
...l
|
|
2930
3111
|
};
|
|
2931
|
-
},
|
|
3112
|
+
}, fo = {
|
|
2932
3113
|
id: "google"
|
|
2933
|
-
},
|
|
3114
|
+
}, ho = {
|
|
2934
3115
|
enabled: !1,
|
|
2935
3116
|
ttlMs: 36e5
|
|
2936
|
-
},
|
|
3117
|
+
}, po = (t, e) => `${t}${so}${e}`, go = (t) => t ? new Map(t) : /* @__PURE__ */ new Map(), mo = (t, e) => {
|
|
2937
3118
|
const r = t.toLocaleLowerCase();
|
|
2938
3119
|
return e.find(
|
|
2939
3120
|
(n) => Object.values(n).some(
|
|
2940
3121
|
(s) => s.toLocaleLowerCase() === r
|
|
2941
3122
|
)
|
|
2942
3123
|
);
|
|
2943
|
-
},
|
|
3124
|
+
}, Io = ({
|
|
2944
3125
|
children: t,
|
|
2945
3126
|
translations: e,
|
|
2946
3127
|
defaultLanguage: r = "en",
|
|
2947
3128
|
persist: n = !1,
|
|
2948
3129
|
persistKey: s = "language",
|
|
2949
|
-
autoDetectLanguage:
|
|
2950
|
-
externalTranslation:
|
|
3130
|
+
autoDetectLanguage: a = !1,
|
|
3131
|
+
externalTranslation: i
|
|
2951
3132
|
}) => {
|
|
2952
3133
|
const l = ce(
|
|
2953
|
-
() =>
|
|
2954
|
-
[
|
|
2955
|
-
), [
|
|
3134
|
+
() => uo(i),
|
|
3135
|
+
[i]
|
|
3136
|
+
), [f, d] = Be(
|
|
2956
3137
|
() => new Set(l.alwaysExternalKeys)
|
|
2957
3138
|
);
|
|
2958
3139
|
lt(() => {
|
|
2959
|
-
|
|
2960
|
-
const
|
|
2961
|
-
return
|
|
3140
|
+
d((b) => {
|
|
3141
|
+
const R = new Set(l.alwaysExternalKeys);
|
|
3142
|
+
return b.forEach((x) => R.add(x)), R;
|
|
2962
3143
|
});
|
|
2963
3144
|
}, [l]);
|
|
2964
|
-
const u = $e((
|
|
2965
|
-
|
|
2966
|
-
if (
|
|
2967
|
-
return
|
|
2968
|
-
const
|
|
2969
|
-
return
|
|
3145
|
+
const u = $e((b) => {
|
|
3146
|
+
d((R) => {
|
|
3147
|
+
if (R.has(b))
|
|
3148
|
+
return R;
|
|
3149
|
+
const x = new Set(R);
|
|
3150
|
+
return x.add(b), x;
|
|
2970
3151
|
});
|
|
2971
3152
|
}, []), h = ce(
|
|
2972
3153
|
() => ({
|
|
2973
3154
|
...l,
|
|
2974
|
-
alwaysExternalKeys:
|
|
3155
|
+
alwaysExternalKeys: f
|
|
2975
3156
|
}),
|
|
2976
|
-
[l,
|
|
2977
|
-
),
|
|
2978
|
-
|
|
3157
|
+
[l, f]
|
|
3158
|
+
), _ = n ? ao(s) : null, k = a ? oo(r) : null, [m, y] = Be(
|
|
3159
|
+
_ ?? k ?? r
|
|
2979
3160
|
);
|
|
2980
3161
|
lt(() => {
|
|
2981
|
-
n &&
|
|
2982
|
-
}, [
|
|
2983
|
-
const
|
|
3162
|
+
n && io(s, m);
|
|
3163
|
+
}, [m, n, s]);
|
|
3164
|
+
const g = ce(
|
|
2984
3165
|
() => Object.keys(e[0] || {}),
|
|
2985
3166
|
[e]
|
|
2986
|
-
),
|
|
2987
|
-
() => new
|
|
3167
|
+
), A = ce(() => co(), []), L = ce(
|
|
3168
|
+
() => new gn(h.cache),
|
|
2988
3169
|
[h.cache]
|
|
2989
|
-
),
|
|
2990
|
-
let
|
|
3170
|
+
), D = ce(() => {
|
|
3171
|
+
let b;
|
|
2991
3172
|
try {
|
|
2992
|
-
if (
|
|
2993
|
-
providerType:
|
|
3173
|
+
if (b = to(h.provider), h.debug && G("TranslatorProvider_provider_created", {
|
|
3174
|
+
providerType: b.type,
|
|
2994
3175
|
providerId: h.provider.id,
|
|
2995
3176
|
timestamp: Date.now()
|
|
2996
|
-
}),
|
|
2997
|
-
const
|
|
2998
|
-
|
|
2999
|
-
providerType:
|
|
3177
|
+
}), b.isAvailable) {
|
|
3178
|
+
const R = b.isAvailable();
|
|
3179
|
+
R.available ? h.debug && G("TranslatorProvider_provider_available", {
|
|
3180
|
+
providerType: b.type,
|
|
3000
3181
|
providerId: h.provider.id,
|
|
3001
3182
|
timestamp: Date.now()
|
|
3002
|
-
}) :
|
|
3003
|
-
providerType:
|
|
3183
|
+
}) : Pe("TranslatorProvider_provider_unavailable", {
|
|
3184
|
+
providerType: b.type,
|
|
3004
3185
|
providerId: h.provider.id,
|
|
3005
|
-
reason:
|
|
3186
|
+
reason: R.reason,
|
|
3006
3187
|
timestamp: Date.now()
|
|
3007
3188
|
});
|
|
3008
3189
|
}
|
|
3009
|
-
} catch (
|
|
3010
|
-
throw
|
|
3190
|
+
} catch (R) {
|
|
3191
|
+
throw Pe("TranslatorProvider_provider_creation_failed", {
|
|
3011
3192
|
providerId: h.provider.id,
|
|
3012
|
-
error:
|
|
3193
|
+
error: R instanceof Error ? R.message : "Unknown error",
|
|
3013
3194
|
timestamp: Date.now()
|
|
3014
|
-
}),
|
|
3195
|
+
}), R;
|
|
3015
3196
|
}
|
|
3016
|
-
return new
|
|
3017
|
-
provider:
|
|
3197
|
+
return new pn({
|
|
3198
|
+
provider: b,
|
|
3018
3199
|
config: h,
|
|
3019
|
-
cache: h.cache.enabled ?
|
|
3020
|
-
logger:
|
|
3200
|
+
cache: h.cache.enabled ? L : void 0,
|
|
3201
|
+
logger: A
|
|
3021
3202
|
});
|
|
3022
|
-
}, [h,
|
|
3203
|
+
}, [h, A, L]), [C, $] = Be(
|
|
3023
3204
|
() => /* @__PURE__ */ new Map()
|
|
3024
|
-
), [
|
|
3025
|
-
lt(() => (h.debug &&
|
|
3205
|
+
), [se, q] = Be(0), W = sn(!0);
|
|
3206
|
+
lt(() => (h.debug && G("TranslatorProvider_mounted", {
|
|
3026
3207
|
timestamp: Date.now()
|
|
3027
|
-
}),
|
|
3028
|
-
h.debug &&
|
|
3208
|
+
}), W.current = !0, () => {
|
|
3209
|
+
h.debug && G("TranslatorProvider_unmounting", {
|
|
3029
3210
|
timestamp: Date.now()
|
|
3030
|
-
}),
|
|
3211
|
+
}), W.current = !1;
|
|
3031
3212
|
}), [h]);
|
|
3032
3213
|
const Z = $e(
|
|
3033
|
-
(
|
|
3034
|
-
var
|
|
3035
|
-
h.debug &&
|
|
3036
|
-
targetLanguage:
|
|
3037
|
-
key:
|
|
3038
|
-
status:
|
|
3039
|
-
value:
|
|
3040
|
-
isMounted:
|
|
3214
|
+
(b, R, x) => {
|
|
3215
|
+
var oe;
|
|
3216
|
+
h.debug && x && G("setExternalStateEntry_called", {
|
|
3217
|
+
targetLanguage: b,
|
|
3218
|
+
key: R,
|
|
3219
|
+
status: x.status,
|
|
3220
|
+
value: x.value,
|
|
3221
|
+
isMounted: W.current
|
|
3041
3222
|
});
|
|
3042
|
-
const
|
|
3043
|
-
|
|
3044
|
-
const M = new Map(
|
|
3045
|
-
return
|
|
3046
|
-
}), (
|
|
3047
|
-
targetLanguage:
|
|
3048
|
-
key:
|
|
3049
|
-
}),
|
|
3223
|
+
const T = () => {
|
|
3224
|
+
$((U) => {
|
|
3225
|
+
const M = new Map(U), J = go(M.get(b));
|
|
3226
|
+
return x ? (J.set(R, x), M.set(b, J)) : (J.delete(R), J.size > 0 ? M.set(b, J) : M.delete(b)), M;
|
|
3227
|
+
}), (x == null ? void 0 : x.status) === "resolved" && (h.debug && G("forceUpdate_triggered", {
|
|
3228
|
+
targetLanguage: b,
|
|
3229
|
+
key: R
|
|
3230
|
+
}), q((U) => U + 1));
|
|
3050
3231
|
};
|
|
3051
|
-
typeof process < "u" && ((
|
|
3052
|
-
|
|
3232
|
+
typeof process < "u" && ((oe = process.env) == null ? void 0 : oe.NODE_ENV) === "test" ? T() : on(() => {
|
|
3233
|
+
T();
|
|
3053
3234
|
});
|
|
3054
3235
|
},
|
|
3055
|
-
[h,
|
|
3236
|
+
[h, q]
|
|
3056
3237
|
), fe = $e(
|
|
3057
|
-
(
|
|
3058
|
-
var
|
|
3059
|
-
|
|
3238
|
+
(b) => {
|
|
3239
|
+
var R;
|
|
3240
|
+
D.isEnabled() && (Z(b.targetLanguage, b.key, {
|
|
3060
3241
|
status: "pending",
|
|
3061
|
-
value:
|
|
3062
|
-
}),
|
|
3063
|
-
key:
|
|
3064
|
-
text:
|
|
3065
|
-
targetLanguage:
|
|
3066
|
-
sourceLanguage:
|
|
3067
|
-
signal: (
|
|
3068
|
-
}).then((
|
|
3069
|
-
if (h.debug &&
|
|
3070
|
-
key:
|
|
3071
|
-
targetLanguage:
|
|
3072
|
-
isMounted:
|
|
3073
|
-
hasResult: !!
|
|
3074
|
-
hasTranslatedText: !!(
|
|
3075
|
-
translatedText:
|
|
3076
|
-
}),
|
|
3077
|
-
h.debug &&
|
|
3078
|
-
key:
|
|
3079
|
-
targetLanguage:
|
|
3080
|
-
isMounted:
|
|
3081
|
-
translatedText:
|
|
3082
|
-
}), Z(
|
|
3242
|
+
value: b.displayValue
|
|
3243
|
+
}), D.translate({
|
|
3244
|
+
key: b.key,
|
|
3245
|
+
text: b.originalText,
|
|
3246
|
+
targetLanguage: b.targetLanguage,
|
|
3247
|
+
sourceLanguage: b.sourceLanguage,
|
|
3248
|
+
signal: (R = b.options) == null ? void 0 : R.signal
|
|
3249
|
+
}).then((x) => {
|
|
3250
|
+
if (h.debug && G("translation_promise_resolved", {
|
|
3251
|
+
key: b.key,
|
|
3252
|
+
targetLanguage: b.targetLanguage,
|
|
3253
|
+
isMounted: W.current,
|
|
3254
|
+
hasResult: !!x,
|
|
3255
|
+
hasTranslatedText: !!(x && x.translatedText),
|
|
3256
|
+
translatedText: x == null ? void 0 : x.translatedText
|
|
3257
|
+
}), x && x.translatedText) {
|
|
3258
|
+
h.debug && G("translation_applying_resolved", {
|
|
3259
|
+
key: b.key,
|
|
3260
|
+
targetLanguage: b.targetLanguage,
|
|
3261
|
+
isMounted: W.current,
|
|
3262
|
+
translatedText: x.translatedText
|
|
3263
|
+
}), Z(b.targetLanguage, b.key, {
|
|
3083
3264
|
status: "resolved",
|
|
3084
|
-
value:
|
|
3265
|
+
value: x.translatedText
|
|
3085
3266
|
});
|
|
3086
3267
|
return;
|
|
3087
3268
|
}
|
|
3088
|
-
h.debug &&
|
|
3089
|
-
key:
|
|
3090
|
-
result:
|
|
3091
|
-
}), Z(
|
|
3269
|
+
h.debug && G("translation_invalid_result", {
|
|
3270
|
+
key: b.key,
|
|
3271
|
+
result: x
|
|
3272
|
+
}), Z(b.targetLanguage, b.key, {
|
|
3092
3273
|
status: "error",
|
|
3093
|
-
value:
|
|
3094
|
-
retryAt: Date.now() +
|
|
3274
|
+
value: b.displayValue,
|
|
3275
|
+
retryAt: Date.now() + or
|
|
3095
3276
|
});
|
|
3096
|
-
}).catch((
|
|
3097
|
-
h.debug &&
|
|
3098
|
-
key:
|
|
3099
|
-
targetLanguage:
|
|
3100
|
-
isMounted:
|
|
3101
|
-
error: (
|
|
3102
|
-
}),
|
|
3103
|
-
key:
|
|
3104
|
-
language:
|
|
3105
|
-
error:
|
|
3106
|
-
isMounted:
|
|
3107
|
-
}), Z(
|
|
3277
|
+
}).catch((x) => {
|
|
3278
|
+
h.debug && G("translation_promise_rejected", {
|
|
3279
|
+
key: b.key,
|
|
3280
|
+
targetLanguage: b.targetLanguage,
|
|
3281
|
+
isMounted: W.current,
|
|
3282
|
+
error: (x == null ? void 0 : x.message) || String(x)
|
|
3283
|
+
}), Pe("external_translation_unexpected_rejection", {
|
|
3284
|
+
key: b.key,
|
|
3285
|
+
language: b.targetLanguage,
|
|
3286
|
+
error: x,
|
|
3287
|
+
isMounted: W.current
|
|
3288
|
+
}), Z(b.targetLanguage, b.key, {
|
|
3108
3289
|
status: "error",
|
|
3109
|
-
value:
|
|
3110
|
-
error:
|
|
3111
|
-
retryAt: Date.now() +
|
|
3290
|
+
value: b.displayValue,
|
|
3291
|
+
error: x,
|
|
3292
|
+
retryAt: Date.now() + or
|
|
3112
3293
|
});
|
|
3113
3294
|
}));
|
|
3114
3295
|
},
|
|
3115
|
-
[h, Z,
|
|
3296
|
+
[h, Z, D]
|
|
3116
3297
|
), le = ce(() => {
|
|
3117
|
-
const
|
|
3118
|
-
return
|
|
3119
|
-
|
|
3120
|
-
|
|
3298
|
+
const b = {};
|
|
3299
|
+
return C.forEach((R, x) => {
|
|
3300
|
+
R.forEach((T, N) => {
|
|
3301
|
+
b[po(N, x)] = T.status === "pending";
|
|
3121
3302
|
});
|
|
3122
|
-
}), h.debug &&
|
|
3123
|
-
recordSize: Object.keys(
|
|
3124
|
-
record: { ...
|
|
3125
|
-
}),
|
|
3126
|
-
}, [
|
|
3303
|
+
}), h.debug && G("isTranslatingRecord_recalculated", {
|
|
3304
|
+
recordSize: Object.keys(b).length,
|
|
3305
|
+
record: { ...b }
|
|
3306
|
+
}), b;
|
|
3307
|
+
}, [C, h]), ie = ce(
|
|
3127
3308
|
() => Object.values(le).some(Boolean),
|
|
3128
3309
|
[le]
|
|
3129
|
-
),
|
|
3130
|
-
(
|
|
3310
|
+
), H = $e(
|
|
3311
|
+
(b, R = {}) => {
|
|
3131
3312
|
var he;
|
|
3132
|
-
const
|
|
3133
|
-
if (h.debug &&
|
|
3134
|
-
text:
|
|
3135
|
-
language:
|
|
3136
|
-
hasStateForLanguage: !!
|
|
3137
|
-
existingStateStatus:
|
|
3138
|
-
existingStateValue:
|
|
3139
|
-
preferExternal:
|
|
3140
|
-
}), (
|
|
3141
|
-
return h.debug &&
|
|
3142
|
-
text:
|
|
3143
|
-
value:
|
|
3144
|
-
}),
|
|
3145
|
-
const
|
|
3146
|
-
if (de ||
|
|
3147
|
-
key:
|
|
3148
|
-
language:
|
|
3149
|
-
}), !(ue && (
|
|
3150
|
-
return (
|
|
3151
|
-
const xe = Date.now(), be = (
|
|
3152
|
-
if (!
|
|
3153
|
-
const Ee =
|
|
3313
|
+
const x = C.get(m), T = x == null ? void 0 : x.get(b);
|
|
3314
|
+
if (h.debug && R.preferExternal && G("t_called", {
|
|
3315
|
+
text: b,
|
|
3316
|
+
language: m,
|
|
3317
|
+
hasStateForLanguage: !!x,
|
|
3318
|
+
existingStateStatus: T == null ? void 0 : T.status,
|
|
3319
|
+
existingStateValue: T == null ? void 0 : T.value,
|
|
3320
|
+
preferExternal: R.preferExternal
|
|
3321
|
+
}), (T == null ? void 0 : T.status) === "resolved" && T.value)
|
|
3322
|
+
return h.debug && G("t_returning_resolved", {
|
|
3323
|
+
text: b,
|
|
3324
|
+
value: T.value
|
|
3325
|
+
}), T.value;
|
|
3326
|
+
const N = mo(b, e), oe = N == null ? void 0 : N[m], U = N ? Object.values(N).find((Ue) => !!Ue) : void 0, M = R.fallbackValue ?? (T == null ? void 0 : T.value) ?? oe ?? U ?? b, J = R.preferExternal === !0 || h.alwaysExternalKeys.has(b), ue = D.isEnabled(), de = typeof oe == "string";
|
|
3327
|
+
if (de || Pe("missing_translation", {
|
|
3328
|
+
key: b,
|
|
3329
|
+
language: m
|
|
3330
|
+
}), !(ue && (J || !de)))
|
|
3331
|
+
return (T == null ? void 0 : T.status) === "pending" && T.value ? T.value : oe ?? M;
|
|
3332
|
+
const xe = Date.now(), be = (T == null ? void 0 : T.status) === "error" && (!T.retryAt || T.retryAt <= xe);
|
|
3333
|
+
if (!T || be) {
|
|
3334
|
+
const Ee = R.sourceLanguage ?? (N && N[r] ? r : void 0), rt = (Ee && (N == null ? void 0 : N[Ee])) ?? (N == null ? void 0 : N[r]) ?? b;
|
|
3154
3335
|
fe({
|
|
3155
|
-
key:
|
|
3156
|
-
targetLanguage:
|
|
3157
|
-
originalText:
|
|
3158
|
-
displayValue: (
|
|
3336
|
+
key: b,
|
|
3337
|
+
targetLanguage: m,
|
|
3338
|
+
originalText: rt,
|
|
3339
|
+
displayValue: (T == null ? void 0 : T.value) ?? M,
|
|
3159
3340
|
sourceLanguage: Ee,
|
|
3160
|
-
options:
|
|
3341
|
+
options: R
|
|
3161
3342
|
});
|
|
3162
3343
|
}
|
|
3163
|
-
const ee = ((he =
|
|
3344
|
+
const ee = ((he = C.get(m)) == null ? void 0 : he.get(b)) ?? T;
|
|
3164
3345
|
return (ee == null ? void 0 : ee.status) === "resolved" && ee.value ? ee.value : (ee == null ? void 0 : ee.status) === "pending" ? ee.value ?? M : M;
|
|
3165
3346
|
},
|
|
3166
3347
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3167
3348
|
[
|
|
3168
3349
|
r,
|
|
3169
3350
|
h.alwaysExternalKeys,
|
|
3170
|
-
|
|
3171
|
-
|
|
3351
|
+
C,
|
|
3352
|
+
m,
|
|
3172
3353
|
fe,
|
|
3173
|
-
|
|
3354
|
+
D,
|
|
3174
3355
|
e
|
|
3175
3356
|
]
|
|
3176
|
-
),
|
|
3357
|
+
), K = ce(
|
|
3177
3358
|
() => ({
|
|
3178
|
-
t:
|
|
3179
|
-
language:
|
|
3180
|
-
languages:
|
|
3181
|
-
setLanguage:
|
|
3359
|
+
t: H,
|
|
3360
|
+
language: m,
|
|
3361
|
+
languages: g,
|
|
3362
|
+
setLanguage: y,
|
|
3182
3363
|
isTranslating: le,
|
|
3183
|
-
isTranslatingAny:
|
|
3364
|
+
isTranslatingAny: ie,
|
|
3184
3365
|
registerExternalKey: u,
|
|
3185
3366
|
externalConfig: h
|
|
3186
3367
|
}),
|
|
3187
3368
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3188
3369
|
[
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3370
|
+
H,
|
|
3371
|
+
m,
|
|
3372
|
+
g,
|
|
3373
|
+
y,
|
|
3193
3374
|
le,
|
|
3194
|
-
|
|
3375
|
+
ie,
|
|
3195
3376
|
u,
|
|
3196
3377
|
h,
|
|
3197
|
-
|
|
3378
|
+
se
|
|
3198
3379
|
]
|
|
3199
3380
|
);
|
|
3200
|
-
return /* @__PURE__ */
|
|
3201
|
-
},
|
|
3381
|
+
return /* @__PURE__ */ un.jsx(ir.Provider, { value: K, children: t });
|
|
3382
|
+
}, Mo = () => fn();
|
|
3202
3383
|
export {
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3384
|
+
Io as TranslatorProvider,
|
|
3385
|
+
to as createTranslationProvider,
|
|
3386
|
+
Mo as useTranslator
|
|
3206
3387
|
};
|