authifyer-sdk 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authifyer-sdk.es.js +469 -456
- package/dist/authifyer-sdk.umd.js +9 -9
- package/package.json +1 -1
- package/src/core/api.ts +25 -6
- package/src/core/client.ts +18 -5
package/dist/authifyer-sdk.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var V = (t, e, r) =>
|
|
4
|
-
import
|
|
1
|
+
var Bt = Object.defineProperty;
|
|
2
|
+
var Dt = (t, e, r) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var V = (t, e, r) => Dt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import qt, { createContext as Mt, useMemo as Ht, useState as I, useEffect as $t, useContext as zt } from "react";
|
|
5
5
|
var be = { exports: {} }, se = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
@@ -12,10 +12,10 @@ var be = { exports: {} }, se = {};
|
|
|
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
|
-
|
|
15
|
+
var Ve;
|
|
16
|
+
function Wt() {
|
|
17
|
+
if (Ve) return se;
|
|
18
|
+
Ve = 1;
|
|
19
19
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
20
20
|
function r(n, s, o) {
|
|
21
21
|
var i = null;
|
|
@@ -44,9 +44,9 @@ var oe = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
var Ke;
|
|
48
|
+
function Jt() {
|
|
49
|
+
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
50
|
function t(l) {
|
|
51
51
|
if (l == null) return null;
|
|
52
52
|
if (typeof l == "function")
|
|
@@ -74,17 +74,17 @@ function zt() {
|
|
|
74
74
|
return "Portal";
|
|
75
75
|
case C:
|
|
76
76
|
return l.displayName || "Context";
|
|
77
|
-
case
|
|
77
|
+
case _:
|
|
78
78
|
return (l._context.displayName || "Context") + ".Consumer";
|
|
79
79
|
case U:
|
|
80
|
-
var
|
|
81
|
-
return l = l.displayName, l || (l =
|
|
80
|
+
var E = l.render;
|
|
81
|
+
return l = l.displayName, l || (l = E.displayName || E.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
82
82
|
case te:
|
|
83
|
-
return
|
|
83
|
+
return E = l.displayName || null, E !== null ? E : t(l.type) || "Memo";
|
|
84
84
|
case $:
|
|
85
|
-
|
|
85
|
+
E = l._payload, l = l._init;
|
|
86
86
|
try {
|
|
87
|
-
return t(l(
|
|
87
|
+
return t(l(E));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -96,15 +96,15 @@ function zt() {
|
|
|
96
96
|
function r(l) {
|
|
97
97
|
try {
|
|
98
98
|
e(l);
|
|
99
|
-
var
|
|
99
|
+
var E = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
E = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var T =
|
|
103
|
+
if (E) {
|
|
104
|
+
E = console;
|
|
105
|
+
var T = E.error, A = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
106
106
|
return T.call(
|
|
107
|
-
|
|
107
|
+
E,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
A
|
|
110
110
|
), e(l);
|
|
@@ -115,8 +115,8 @@ function zt() {
|
|
|
115
115
|
if (typeof l == "object" && l !== null && l.$$typeof === $)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var E = t(l);
|
|
119
|
+
return E ? "<" + E + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
@@ -130,16 +130,16 @@ function zt() {
|
|
|
130
130
|
}
|
|
131
131
|
function i(l) {
|
|
132
132
|
if (W.call(l, "key")) {
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
133
|
+
var E = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
134
|
+
if (E && E.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
136
|
return l.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function c(l,
|
|
138
|
+
function c(l, E) {
|
|
139
139
|
function T() {
|
|
140
140
|
N || (N = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
|
-
|
|
142
|
+
E
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
145
|
T.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
@@ -153,15 +153,15 @@ function zt() {
|
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
155
155
|
}
|
|
156
|
-
function d(l,
|
|
157
|
-
var
|
|
156
|
+
function d(l, E, T, A, J, Ne) {
|
|
157
|
+
var O = T.ref;
|
|
158
158
|
return l = {
|
|
159
159
|
$$typeof: f,
|
|
160
160
|
type: l,
|
|
161
|
-
key:
|
|
161
|
+
key: E,
|
|
162
162
|
props: T,
|
|
163
163
|
_owner: A
|
|
164
|
-
}, (
|
|
164
|
+
}, (O !== void 0 ? O : null) !== null ? Object.defineProperty(l, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
get: p
|
|
167
167
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
@@ -186,25 +186,25 @@ function zt() {
|
|
|
186
186
|
value: Ne
|
|
187
187
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
188
188
|
}
|
|
189
|
-
function u(l,
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
189
|
+
function u(l, E, T, A, J, Ne) {
|
|
190
|
+
var O = E.children;
|
|
191
|
+
if (O !== void 0)
|
|
192
192
|
if (A)
|
|
193
|
-
if (H(
|
|
194
|
-
for (A = 0; A <
|
|
195
|
-
m(
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
193
|
+
if (H(O)) {
|
|
194
|
+
for (A = 0; A < O.length; A++)
|
|
195
|
+
m(O[A]);
|
|
196
|
+
Object.freeze && Object.freeze(O);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
199
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
200
|
);
|
|
201
|
-
else m(
|
|
202
|
-
if (W.call(
|
|
203
|
-
|
|
204
|
-
var Q = Object.keys(
|
|
205
|
-
return
|
|
201
|
+
else m(O);
|
|
202
|
+
if (W.call(E, "key")) {
|
|
203
|
+
O = t(l);
|
|
204
|
+
var Q = Object.keys(E).filter(function(Ft) {
|
|
205
|
+
return Ft !== "key";
|
|
206
206
|
});
|
|
207
|
-
A = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", ye[
|
|
207
|
+
A = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", ye[O + A] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
@@ -212,22 +212,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
214
|
A,
|
|
215
|
-
|
|
215
|
+
O,
|
|
216
216
|
Q,
|
|
217
|
-
|
|
218
|
-
), ye[
|
|
217
|
+
O
|
|
218
|
+
), ye[O + A] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
220
|
+
if (O = null, T !== void 0 && (r(T), O = "" + T), i(E) && (r(E.key), O = "" + E.key), "key" in E) {
|
|
221
221
|
T = {};
|
|
222
|
-
for (var Ce in
|
|
223
|
-
Ce !== "key" && (T[Ce] =
|
|
224
|
-
} else T =
|
|
225
|
-
return
|
|
222
|
+
for (var Ce in E)
|
|
223
|
+
Ce !== "key" && (T[Ce] = E[Ce]);
|
|
224
|
+
} else T = E;
|
|
225
|
+
return O && c(
|
|
226
226
|
T,
|
|
227
227
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
228
228
|
), d(
|
|
229
229
|
l,
|
|
230
|
-
|
|
230
|
+
O,
|
|
231
231
|
T,
|
|
232
232
|
s(),
|
|
233
233
|
J,
|
|
@@ -235,12 +235,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
function m(l) {
|
|
238
|
-
|
|
238
|
+
w(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === $ && (l._payload.status === "fulfilled" ? w(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function w(l) {
|
|
241
241
|
return typeof l == "object" && l !== null && l.$$typeof === f;
|
|
242
242
|
}
|
|
243
|
-
var R =
|
|
243
|
+
var R = qt, f = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), C = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), pe = Symbol.for("react.activity"), me = Symbol.for("react.client.reference"), z = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, H = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
R = {
|
|
@@ -252,21 +252,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
252
252
|
R,
|
|
253
253
|
o
|
|
254
254
|
)(), ne = G(n(o)), ye = {};
|
|
255
|
-
oe.Fragment = h, oe.jsx = function(l,
|
|
255
|
+
oe.Fragment = h, oe.jsx = function(l, E, T) {
|
|
256
256
|
var A = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return u(
|
|
258
258
|
l,
|
|
259
|
-
|
|
259
|
+
E,
|
|
260
260
|
T,
|
|
261
261
|
!1,
|
|
262
262
|
A ? Error("react-stack-top-frame") : B,
|
|
263
263
|
A ? G(n(l)) : ne
|
|
264
264
|
);
|
|
265
|
-
}, oe.jsxs = function(l,
|
|
265
|
+
}, oe.jsxs = function(l, E, T) {
|
|
266
266
|
var A = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return u(
|
|
268
268
|
l,
|
|
269
|
-
|
|
269
|
+
E,
|
|
270
270
|
T,
|
|
271
271
|
!0,
|
|
272
272
|
A ? Error("react-stack-top-frame") : B,
|
|
@@ -275,34 +275,34 @@ React keys must be passed directly to JSX without using spread:
|
|
|
275
275
|
};
|
|
276
276
|
})()), oe;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
return
|
|
278
|
+
var Ye;
|
|
279
|
+
function Vt() {
|
|
280
|
+
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? be.exports = Wt() : be.exports = Jt()), be.exports;
|
|
281
281
|
}
|
|
282
|
-
var b =
|
|
283
|
-
function
|
|
282
|
+
var b = Vt();
|
|
283
|
+
function pt(t, e) {
|
|
284
284
|
return function() {
|
|
285
285
|
return t.apply(e, arguments);
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
const { toString:
|
|
289
|
-
const r =
|
|
288
|
+
const { toString: Kt } = Object.prototype, { getPrototypeOf: He } = Object, { iterator: Te, toStringTag: mt } = Symbol, Ae = /* @__PURE__ */ ((t) => (e) => {
|
|
289
|
+
const r = Kt.call(e);
|
|
290
290
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
291
291
|
})(/* @__PURE__ */ Object.create(null)), D = (t) => (t = t.toLowerCase(), (e) => Ae(e) === t), xe = (t) => (e) => typeof e === t, { isArray: ee } = Array, Z = xe("undefined");
|
|
292
292
|
function ce(t) {
|
|
293
293
|
return t !== null && !Z(t) && t.constructor !== null && !Z(t.constructor) && k(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
296
|
-
function
|
|
295
|
+
const yt = D("ArrayBuffer");
|
|
296
|
+
function Yt(t) {
|
|
297
297
|
let e;
|
|
298
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
298
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && yt(t.buffer), e;
|
|
299
299
|
}
|
|
300
|
-
const
|
|
300
|
+
const Xt = xe("string"), k = xe("function"), bt = xe("number"), le = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, Ee = (t) => {
|
|
301
301
|
if (Ae(t) !== "object")
|
|
302
302
|
return !1;
|
|
303
|
-
const e =
|
|
304
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
305
|
-
},
|
|
303
|
+
const e = He(t);
|
|
304
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(mt in t) && !(Te in t);
|
|
305
|
+
}, Qt = (t) => {
|
|
306
306
|
if (!le(t) || ce(t))
|
|
307
307
|
return !1;
|
|
308
308
|
try {
|
|
@@ -310,16 +310,16 @@ const Kt = xe("string"), k = xe("function"), mt = xe("number"), le = (t) => t !=
|
|
|
310
310
|
} catch {
|
|
311
311
|
return !1;
|
|
312
312
|
}
|
|
313
|
-
},
|
|
313
|
+
}, Zt = D("Date"), er = D("File"), tr = D("Blob"), rr = D("FileList"), nr = (t) => le(t) && k(t.pipe), sr = (t) => {
|
|
314
314
|
let e;
|
|
315
315
|
return t && (typeof FormData == "function" && t instanceof FormData || k(t.append) && ((e = Ae(t)) === "formdata" || // detect form-data instance
|
|
316
316
|
e === "object" && k(t.toString) && t.toString() === "[object FormData]"));
|
|
317
|
-
},
|
|
317
|
+
}, or = D("URLSearchParams"), [ir, ar, cr, lr] = [
|
|
318
318
|
"ReadableStream",
|
|
319
319
|
"Request",
|
|
320
320
|
"Response",
|
|
321
321
|
"Headers"
|
|
322
|
-
].map(D),
|
|
322
|
+
].map(D), ur = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
323
323
|
function ue(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
324
324
|
if (t === null || typeof t > "u")
|
|
325
325
|
return;
|
|
@@ -336,7 +336,7 @@ function ue(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
336
336
|
c = o[n], e.call(null, t[c], c, t);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function gt(t, e) {
|
|
340
340
|
if (ce(t))
|
|
341
341
|
return null;
|
|
342
342
|
e = e.toLowerCase();
|
|
@@ -347,23 +347,23 @@ function yt(t, e) {
|
|
|
347
347
|
return s;
|
|
348
348
|
return null;
|
|
349
349
|
}
|
|
350
|
-
const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
351
|
-
function
|
|
352
|
-
const { caseless: t, skipUndefined: e } =
|
|
350
|
+
const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (t) => !Z(t) && t !== K;
|
|
351
|
+
function Ue() {
|
|
352
|
+
const { caseless: t, skipUndefined: e } = Et(this) && this || {}, r = {}, n = (s, o) => {
|
|
353
353
|
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
354
354
|
return;
|
|
355
|
-
const i = t &&
|
|
356
|
-
|
|
355
|
+
const i = t && gt(r, o) || o;
|
|
356
|
+
Ee(r[i]) && Ee(s) ? r[i] = Ue(r[i], s) : Ee(s) ? r[i] = Ue({}, s) : ee(s) ? r[i] = s.slice() : (!e || !Z(s)) && (r[i] = s);
|
|
357
357
|
};
|
|
358
358
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
359
359
|
arguments[s] && ue(arguments[s], n);
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const fr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
|
|
363
363
|
e,
|
|
364
364
|
(s, o) => {
|
|
365
365
|
r && k(s) ? Object.defineProperty(t, o, {
|
|
366
|
-
value:
|
|
366
|
+
value: pt(s, r),
|
|
367
367
|
writable: !0,
|
|
368
368
|
enumerable: !0,
|
|
369
369
|
configurable: !0
|
|
@@ -375,7 +375,7 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
|
|
|
375
375
|
});
|
|
376
376
|
},
|
|
377
377
|
{ allOwnKeys: n }
|
|
378
|
-
), t),
|
|
378
|
+
), t), dr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), hr = (t, e, r, n) => {
|
|
379
379
|
t.prototype = Object.create(
|
|
380
380
|
e.prototype,
|
|
381
381
|
n
|
|
@@ -387,52 +387,52 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
|
|
|
387
387
|
}), Object.defineProperty(t, "super", {
|
|
388
388
|
value: e.prototype
|
|
389
389
|
}), r && Object.assign(t.prototype, r);
|
|
390
|
-
},
|
|
390
|
+
}, pr = (t, e, r, n) => {
|
|
391
391
|
let s, o, i;
|
|
392
392
|
const c = {};
|
|
393
393
|
if (e = e || {}, t == null) return e;
|
|
394
394
|
do {
|
|
395
395
|
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
396
396
|
i = s[o], (!n || n(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
|
|
397
|
-
t = r !== !1 &&
|
|
397
|
+
t = r !== !1 && He(t);
|
|
398
398
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
399
399
|
return e;
|
|
400
|
-
},
|
|
400
|
+
}, mr = (t, e, r) => {
|
|
401
401
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
402
402
|
const n = t.indexOf(e, r);
|
|
403
403
|
return n !== -1 && n === r;
|
|
404
|
-
},
|
|
404
|
+
}, yr = (t) => {
|
|
405
405
|
if (!t) return null;
|
|
406
406
|
if (ee(t)) return t;
|
|
407
407
|
let e = t.length;
|
|
408
|
-
if (!
|
|
408
|
+
if (!bt(e)) return null;
|
|
409
409
|
const r = new Array(e);
|
|
410
410
|
for (; e-- > 0; )
|
|
411
411
|
r[e] = t[e];
|
|
412
412
|
return r;
|
|
413
|
-
},
|
|
413
|
+
}, br = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && He(Uint8Array)), gr = (t, e) => {
|
|
414
414
|
const n = (t && t[Te]).call(t);
|
|
415
415
|
let s;
|
|
416
416
|
for (; (s = n.next()) && !s.done; ) {
|
|
417
417
|
const o = s.value;
|
|
418
418
|
e.call(t, o[0], o[1]);
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, Er = (t, e) => {
|
|
421
421
|
let r;
|
|
422
422
|
const n = [];
|
|
423
423
|
for (; (r = t.exec(e)) !== null; )
|
|
424
424
|
n.push(r);
|
|
425
425
|
return n;
|
|
426
|
-
},
|
|
426
|
+
}, wr = D("HTMLFormElement"), Rr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
427
427
|
return n.toUpperCase() + s;
|
|
428
|
-
}),
|
|
428
|
+
}), Xe = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Sr = D("RegExp"), wt = (t, e) => {
|
|
429
429
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
430
430
|
ue(r, (s, o) => {
|
|
431
431
|
let i;
|
|
432
432
|
(i = e(s, o, t)) !== !1 && (n[o] = i || s);
|
|
433
433
|
}), Object.defineProperties(t, n);
|
|
434
|
-
},
|
|
435
|
-
|
|
434
|
+
}, Tr = (t) => {
|
|
435
|
+
wt(t, (e, r) => {
|
|
436
436
|
if (k(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
437
437
|
return !1;
|
|
438
438
|
const n = t[r];
|
|
@@ -446,19 +446,19 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
|
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
|
-
},
|
|
449
|
+
}, Ar = (t, e) => {
|
|
450
450
|
const r = {}, n = (s) => {
|
|
451
451
|
s.forEach((o) => {
|
|
452
452
|
r[o] = !0;
|
|
453
453
|
});
|
|
454
454
|
};
|
|
455
455
|
return ee(t) ? n(t) : n(String(t).split(e)), r;
|
|
456
|
-
},
|
|
457
|
-
},
|
|
458
|
-
function
|
|
459
|
-
return !!(t && k(t.append) && t[
|
|
456
|
+
}, xr = () => {
|
|
457
|
+
}, _r = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
458
|
+
function Or(t) {
|
|
459
|
+
return !!(t && k(t.append) && t[mt] === "FormData" && t[Te]);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const Nr = (t) => {
|
|
462
462
|
const e = new Array(10), r = (n, s) => {
|
|
463
463
|
if (le(n)) {
|
|
464
464
|
if (e.indexOf(n) >= 0)
|
|
@@ -477,7 +477,7 @@ const Or = (t) => {
|
|
|
477
477
|
return n;
|
|
478
478
|
};
|
|
479
479
|
return r(t, 0);
|
|
480
|
-
},
|
|
480
|
+
}, Cr = D("AsyncFunction"), Pr = (t) => t && (le(t) || k(t)) && k(t.then) && k(t.catch), Rt = ((t, e) => t ? setImmediate : e ? ((r, n) => (K.addEventListener(
|
|
481
481
|
"message",
|
|
482
482
|
({ source: s, data: o }) => {
|
|
483
483
|
s === K && o === r && n.length && n.shift()();
|
|
@@ -485,69 +485,69 @@ const Or = (t) => {
|
|
|
485
485
|
!1
|
|
486
486
|
), (s) => {
|
|
487
487
|
n.push(s), K.postMessage(r, "*");
|
|
488
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", k(K.postMessage)),
|
|
488
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", k(K.postMessage)), jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || Rt, vr = (t) => t != null && k(t[Te]), a = {
|
|
489
489
|
isArray: ee,
|
|
490
|
-
isArrayBuffer:
|
|
490
|
+
isArrayBuffer: yt,
|
|
491
491
|
isBuffer: ce,
|
|
492
|
-
isFormData:
|
|
493
|
-
isArrayBufferView:
|
|
494
|
-
isString:
|
|
495
|
-
isNumber:
|
|
496
|
-
isBoolean:
|
|
492
|
+
isFormData: sr,
|
|
493
|
+
isArrayBufferView: Yt,
|
|
494
|
+
isString: Xt,
|
|
495
|
+
isNumber: bt,
|
|
496
|
+
isBoolean: Gt,
|
|
497
497
|
isObject: le,
|
|
498
|
-
isPlainObject:
|
|
499
|
-
isEmptyObject:
|
|
500
|
-
isReadableStream:
|
|
501
|
-
isRequest:
|
|
502
|
-
isResponse:
|
|
503
|
-
isHeaders:
|
|
498
|
+
isPlainObject: Ee,
|
|
499
|
+
isEmptyObject: Qt,
|
|
500
|
+
isReadableStream: ir,
|
|
501
|
+
isRequest: ar,
|
|
502
|
+
isResponse: cr,
|
|
503
|
+
isHeaders: lr,
|
|
504
504
|
isUndefined: Z,
|
|
505
|
-
isDate:
|
|
506
|
-
isFile:
|
|
507
|
-
isBlob:
|
|
508
|
-
isRegExp:
|
|
505
|
+
isDate: Zt,
|
|
506
|
+
isFile: er,
|
|
507
|
+
isBlob: tr,
|
|
508
|
+
isRegExp: Sr,
|
|
509
509
|
isFunction: k,
|
|
510
|
-
isStream:
|
|
511
|
-
isURLSearchParams:
|
|
512
|
-
isTypedArray:
|
|
513
|
-
isFileList:
|
|
510
|
+
isStream: nr,
|
|
511
|
+
isURLSearchParams: or,
|
|
512
|
+
isTypedArray: br,
|
|
513
|
+
isFileList: rr,
|
|
514
514
|
forEach: ue,
|
|
515
|
-
merge:
|
|
516
|
-
extend:
|
|
517
|
-
trim:
|
|
518
|
-
stripBOM:
|
|
519
|
-
inherits:
|
|
520
|
-
toFlatObject:
|
|
515
|
+
merge: Ue,
|
|
516
|
+
extend: fr,
|
|
517
|
+
trim: ur,
|
|
518
|
+
stripBOM: dr,
|
|
519
|
+
inherits: hr,
|
|
520
|
+
toFlatObject: pr,
|
|
521
521
|
kindOf: Ae,
|
|
522
522
|
kindOfTest: D,
|
|
523
|
-
endsWith:
|
|
524
|
-
toArray:
|
|
525
|
-
forEachEntry:
|
|
526
|
-
matchAll:
|
|
527
|
-
isHTMLForm:
|
|
528
|
-
hasOwnProperty:
|
|
529
|
-
hasOwnProp:
|
|
523
|
+
endsWith: mr,
|
|
524
|
+
toArray: yr,
|
|
525
|
+
forEachEntry: gr,
|
|
526
|
+
matchAll: Er,
|
|
527
|
+
isHTMLForm: wr,
|
|
528
|
+
hasOwnProperty: Xe,
|
|
529
|
+
hasOwnProp: Xe,
|
|
530
530
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
531
|
-
reduceDescriptors:
|
|
532
|
-
freezeMethods:
|
|
533
|
-
toObjectSet:
|
|
534
|
-
toCamelCase:
|
|
535
|
-
noop:
|
|
536
|
-
toFiniteNumber:
|
|
537
|
-
findKey:
|
|
531
|
+
reduceDescriptors: wt,
|
|
532
|
+
freezeMethods: Tr,
|
|
533
|
+
toObjectSet: Ar,
|
|
534
|
+
toCamelCase: Rr,
|
|
535
|
+
noop: xr,
|
|
536
|
+
toFiniteNumber: _r,
|
|
537
|
+
findKey: gt,
|
|
538
538
|
global: K,
|
|
539
|
-
isContextDefined:
|
|
540
|
-
isSpecCompliantForm:
|
|
541
|
-
toJSONObject:
|
|
542
|
-
isAsyncFn:
|
|
543
|
-
isThenable:
|
|
544
|
-
setImmediate:
|
|
545
|
-
asap:
|
|
546
|
-
isIterable:
|
|
539
|
+
isContextDefined: Et,
|
|
540
|
+
isSpecCompliantForm: Or,
|
|
541
|
+
toJSONObject: Nr,
|
|
542
|
+
isAsyncFn: Cr,
|
|
543
|
+
isThenable: Pr,
|
|
544
|
+
setImmediate: Rt,
|
|
545
|
+
asap: jr,
|
|
546
|
+
isIterable: vr
|
|
547
547
|
};
|
|
548
|
-
let g = class
|
|
548
|
+
let g = class St extends Error {
|
|
549
549
|
static from(e, r, n, s, o, i) {
|
|
550
|
-
const c = new
|
|
550
|
+
const c = new St(e.message, r || e.code, n, s, o);
|
|
551
551
|
return c.cause = e, c.name = e.name, i && Object.assign(c, i), c;
|
|
552
552
|
}
|
|
553
553
|
/**
|
|
@@ -596,25 +596,25 @@ g.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
|
596
596
|
g.ERR_CANCELED = "ERR_CANCELED";
|
|
597
597
|
g.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
598
598
|
g.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
599
|
-
const
|
|
600
|
-
function
|
|
599
|
+
const kr = null;
|
|
600
|
+
function Ie(t) {
|
|
601
601
|
return a.isPlainObject(t) || a.isArray(t);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Tt(t) {
|
|
604
604
|
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Ge(t, e, r) {
|
|
607
607
|
return t ? t.concat(e).map(function(s, o) {
|
|
608
|
-
return s =
|
|
608
|
+
return s = Tt(s), !r && o ? "[" + s + "]" : s;
|
|
609
609
|
}).join(r ? "." : "") : e;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
return a.isArray(t) && !t.some(
|
|
611
|
+
function Lr(t) {
|
|
612
|
+
return a.isArray(t) && !t.some(Ie);
|
|
613
613
|
}
|
|
614
|
-
const
|
|
614
|
+
const Ur = a.toFlatObject(a, {}, null, function(e) {
|
|
615
615
|
return /^is[A-Z]/.test(e);
|
|
616
616
|
});
|
|
617
|
-
function
|
|
617
|
+
function _e(t, e, r) {
|
|
618
618
|
if (!a.isObject(t))
|
|
619
619
|
throw new TypeError("target must be an object");
|
|
620
620
|
e = e || new FormData(), r = a.toFlatObject(r, {
|
|
@@ -642,21 +642,21 @@ function Oe(t, e, r) {
|
|
|
642
642
|
if (f && !h && typeof f == "object") {
|
|
643
643
|
if (a.endsWith(y, "{}"))
|
|
644
644
|
y = n ? y : y.slice(0, -2), f = JSON.stringify(f);
|
|
645
|
-
else if (a.isArray(f) &&
|
|
646
|
-
return y =
|
|
647
|
-
!(a.isUndefined(
|
|
645
|
+
else if (a.isArray(f) && Lr(f) || (a.isFileList(f) || a.endsWith(y, "[]")) && (S = a.toArray(f)))
|
|
646
|
+
return y = Tt(y), S.forEach(function(_, C) {
|
|
647
|
+
!(a.isUndefined(_) || _ === null) && e.append(
|
|
648
648
|
// eslint-disable-next-line no-nested-ternary
|
|
649
|
-
i === !0 ?
|
|
650
|
-
d(
|
|
649
|
+
i === !0 ? Ge([y], C, o) : i === null ? y : y + "[]",
|
|
650
|
+
d(_)
|
|
651
651
|
);
|
|
652
652
|
}), !1;
|
|
653
653
|
}
|
|
654
|
-
return
|
|
654
|
+
return Ie(f) ? !0 : (e.append(Ge(h, y, o), d(f)), !1);
|
|
655
655
|
}
|
|
656
|
-
const m = [],
|
|
656
|
+
const m = [], w = Object.assign(Ur, {
|
|
657
657
|
defaultVisitor: u,
|
|
658
658
|
convertValue: d,
|
|
659
|
-
isVisitable:
|
|
659
|
+
isVisitable: Ie
|
|
660
660
|
});
|
|
661
661
|
function R(f, y) {
|
|
662
662
|
if (!a.isUndefined(f)) {
|
|
@@ -668,7 +668,7 @@ function Oe(t, e, r) {
|
|
|
668
668
|
S,
|
|
669
669
|
a.isString(j) ? j.trim() : j,
|
|
670
670
|
y,
|
|
671
|
-
|
|
671
|
+
w
|
|
672
672
|
)) === !0 && R(S, y ? y.concat(j) : [j]);
|
|
673
673
|
}), m.pop();
|
|
674
674
|
}
|
|
@@ -677,7 +677,7 @@ function Oe(t, e, r) {
|
|
|
677
677
|
throw new TypeError("data must be an object");
|
|
678
678
|
return R(t), e;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Qe(t) {
|
|
681
681
|
const e = {
|
|
682
682
|
"!": "%21",
|
|
683
683
|
"'": "%27",
|
|
@@ -691,38 +691,38 @@ function Xe(t) {
|
|
|
691
691
|
return e[n];
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
this._pairs = [], t &&
|
|
694
|
+
function $e(t, e) {
|
|
695
|
+
this._pairs = [], t && _e(t, this, e);
|
|
696
696
|
}
|
|
697
|
-
const
|
|
698
|
-
|
|
697
|
+
const At = $e.prototype;
|
|
698
|
+
At.append = function(e, r) {
|
|
699
699
|
this._pairs.push([e, r]);
|
|
700
700
|
};
|
|
701
|
-
|
|
701
|
+
At.toString = function(e) {
|
|
702
702
|
const r = e ? function(n) {
|
|
703
|
-
return e.call(this, n,
|
|
704
|
-
} :
|
|
703
|
+
return e.call(this, n, Qe);
|
|
704
|
+
} : Qe;
|
|
705
705
|
return this._pairs.map(function(s) {
|
|
706
706
|
return r(s[0]) + "=" + r(s[1]);
|
|
707
707
|
}, "").join("&");
|
|
708
708
|
};
|
|
709
|
-
function
|
|
709
|
+
function Ir(t) {
|
|
710
710
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function xt(t, e, r) {
|
|
713
713
|
if (!e)
|
|
714
714
|
return t;
|
|
715
|
-
const n = r && r.encode ||
|
|
715
|
+
const n = r && r.encode || Ir, s = a.isFunction(r) ? {
|
|
716
716
|
serialize: r
|
|
717
717
|
} : r, o = s && s.serialize;
|
|
718
718
|
let i;
|
|
719
|
-
if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new
|
|
719
|
+
if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new $e(e, s).toString(n), i) {
|
|
720
720
|
const c = t.indexOf("#");
|
|
721
721
|
c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
722
722
|
}
|
|
723
723
|
return t;
|
|
724
724
|
}
|
|
725
|
-
class
|
|
725
|
+
class Ze {
|
|
726
726
|
constructor() {
|
|
727
727
|
this.handlers = [];
|
|
728
728
|
}
|
|
@@ -777,43 +777,43 @@ class Ge {
|
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
const
|
|
780
|
+
const ze = {
|
|
781
781
|
silentJSONParsing: !0,
|
|
782
782
|
forcedJSONParsing: !0,
|
|
783
783
|
clarifyTimeoutError: !1,
|
|
784
784
|
legacyInterceptorReqResOrdering: !0
|
|
785
|
-
},
|
|
785
|
+
}, Fr = typeof URLSearchParams < "u" ? URLSearchParams : $e, Br = typeof FormData < "u" ? FormData : null, Dr = typeof Blob < "u" ? Blob : null, qr = {
|
|
786
786
|
isBrowser: !0,
|
|
787
787
|
classes: {
|
|
788
|
-
URLSearchParams:
|
|
789
|
-
FormData:
|
|
790
|
-
Blob:
|
|
788
|
+
URLSearchParams: Fr,
|
|
789
|
+
FormData: Br,
|
|
790
|
+
Blob: Dr
|
|
791
791
|
},
|
|
792
792
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
793
|
-
},
|
|
794
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
793
|
+
}, We = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Mr = We && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), Hr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
794
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $r = We && window.location.href || "http://localhost", zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
795
795
|
__proto__: null,
|
|
796
|
-
hasBrowserEnv:
|
|
797
|
-
hasStandardBrowserEnv:
|
|
798
|
-
hasStandardBrowserWebWorkerEnv:
|
|
796
|
+
hasBrowserEnv: We,
|
|
797
|
+
hasStandardBrowserEnv: Mr,
|
|
798
|
+
hasStandardBrowserWebWorkerEnv: Hr,
|
|
799
799
|
navigator: Fe,
|
|
800
|
-
origin:
|
|
800
|
+
origin: $r
|
|
801
801
|
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
802
|
-
...
|
|
803
|
-
...
|
|
802
|
+
...zr,
|
|
803
|
+
...qr
|
|
804
804
|
};
|
|
805
|
-
function
|
|
806
|
-
return
|
|
805
|
+
function Wr(t, e) {
|
|
806
|
+
return _e(t, new P.classes.URLSearchParams(), {
|
|
807
807
|
visitor: function(r, n, s, o) {
|
|
808
808
|
return P.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
809
809
|
},
|
|
810
810
|
...e
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Jr(t) {
|
|
814
814
|
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function Vr(t) {
|
|
817
817
|
const e = {}, r = Object.keys(t);
|
|
818
818
|
let n;
|
|
819
819
|
const s = r.length;
|
|
@@ -822,22 +822,22 @@ function Wr(t) {
|
|
|
822
822
|
o = r[n], e[o] = t[o];
|
|
823
823
|
return e;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function _t(t) {
|
|
826
826
|
function e(r, n, s, o) {
|
|
827
827
|
let i = r[o++];
|
|
828
828
|
if (i === "__proto__") return !0;
|
|
829
829
|
const c = Number.isFinite(+i), p = o >= r.length;
|
|
830
|
-
return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(r, n, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
830
|
+
return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Vr(s[i])), !c);
|
|
831
831
|
}
|
|
832
832
|
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
833
833
|
const r = {};
|
|
834
834
|
return a.forEachEntry(t, (n, s) => {
|
|
835
|
-
e(
|
|
835
|
+
e(Jr(n), s, r, 0);
|
|
836
836
|
}), r;
|
|
837
837
|
}
|
|
838
838
|
return null;
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function Kr(t, e, r) {
|
|
841
841
|
if (a.isString(t))
|
|
842
842
|
try {
|
|
843
843
|
return (e || JSON.parse)(t), a.trim(t);
|
|
@@ -848,12 +848,12 @@ function Jr(t, e, r) {
|
|
|
848
848
|
return (r || JSON.stringify)(t);
|
|
849
849
|
}
|
|
850
850
|
const fe = {
|
|
851
|
-
transitional:
|
|
851
|
+
transitional: ze,
|
|
852
852
|
adapter: ["xhr", "http", "fetch"],
|
|
853
853
|
transformRequest: [function(e, r) {
|
|
854
854
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(e);
|
|
855
855
|
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
856
|
-
return s ? JSON.stringify(
|
|
856
|
+
return s ? JSON.stringify(_t(e)) : e;
|
|
857
857
|
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
858
858
|
return e;
|
|
859
859
|
if (a.isArrayBufferView(e))
|
|
@@ -863,17 +863,17 @@ const fe = {
|
|
|
863
863
|
let c;
|
|
864
864
|
if (o) {
|
|
865
865
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
866
|
-
return
|
|
866
|
+
return Wr(e, this.formSerializer).toString();
|
|
867
867
|
if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
868
868
|
const p = this.env && this.env.FormData;
|
|
869
|
-
return
|
|
869
|
+
return _e(
|
|
870
870
|
c ? { "files[]": e } : e,
|
|
871
871
|
p && new p(),
|
|
872
872
|
this.formSerializer
|
|
873
873
|
);
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
return o || s ? (r.setContentType("application/json", !1),
|
|
876
|
+
return o || s ? (r.setContentType("application/json", !1), Kr(e)) : e;
|
|
877
877
|
}],
|
|
878
878
|
transformResponse: [function(e) {
|
|
879
879
|
const r = this.transitional || fe.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -916,7 +916,7 @@ const fe = {
|
|
|
916
916
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
917
917
|
fe.headers[t] = {};
|
|
918
918
|
});
|
|
919
|
-
const
|
|
919
|
+
const Yr = a.toObjectSet([
|
|
920
920
|
"age",
|
|
921
921
|
"authorization",
|
|
922
922
|
"content-length",
|
|
@@ -934,28 +934,28 @@ const Vr = a.toObjectSet([
|
|
|
934
934
|
"referer",
|
|
935
935
|
"retry-after",
|
|
936
936
|
"user-agent"
|
|
937
|
-
]),
|
|
937
|
+
]), Xr = (t) => {
|
|
938
938
|
const e = {};
|
|
939
939
|
let r, n, s;
|
|
940
940
|
return t && t.split(`
|
|
941
941
|
`).forEach(function(i) {
|
|
942
|
-
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || e[r] &&
|
|
942
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || e[r] && Yr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
943
943
|
}), e;
|
|
944
|
-
},
|
|
944
|
+
}, et = Symbol("internals");
|
|
945
945
|
function ie(t) {
|
|
946
946
|
return t && String(t).trim().toLowerCase();
|
|
947
947
|
}
|
|
948
|
-
function
|
|
949
|
-
return t === !1 || t == null ? t : a.isArray(t) ? t.map(
|
|
948
|
+
function we(t) {
|
|
949
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(we) : String(t);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Gr(t) {
|
|
952
952
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
953
953
|
let n;
|
|
954
954
|
for (; n = r.exec(t); )
|
|
955
955
|
e[n[1]] = n[2];
|
|
956
956
|
return e;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const Qr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
959
959
|
function Pe(t, e, r, n, s) {
|
|
960
960
|
if (a.isFunction(n))
|
|
961
961
|
return n.call(this, e, r);
|
|
@@ -966,10 +966,10 @@ function Pe(t, e, r, n, s) {
|
|
|
966
966
|
return n.test(e);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Zr(t) {
|
|
970
970
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function en(t, e) {
|
|
973
973
|
const r = a.toCamelCase(" " + e);
|
|
974
974
|
["get", "set", "has"].forEach((n) => {
|
|
975
975
|
Object.defineProperty(t, n + r, {
|
|
@@ -991,13 +991,13 @@ let L = class {
|
|
|
991
991
|
if (!u)
|
|
992
992
|
throw new Error("header name must be a non-empty string");
|
|
993
993
|
const m = a.findKey(s, u);
|
|
994
|
-
(!m || s[m] === void 0 || d === !0 || d === void 0 && s[m] !== !1) && (s[m || p] =
|
|
994
|
+
(!m || s[m] === void 0 || d === !0 || d === void 0 && s[m] !== !1) && (s[m || p] = we(c));
|
|
995
995
|
}
|
|
996
996
|
const i = (c, p) => a.forEach(c, (d, u) => o(d, u, p));
|
|
997
997
|
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
998
998
|
i(e, r);
|
|
999
|
-
else if (a.isString(e) && (e = e.trim()) && !
|
|
1000
|
-
i(
|
|
999
|
+
else if (a.isString(e) && (e = e.trim()) && !Qr(e))
|
|
1000
|
+
i(Xr(e), r);
|
|
1001
1001
|
else if (a.isObject(e) && a.isIterable(e)) {
|
|
1002
1002
|
let c = {}, p, d;
|
|
1003
1003
|
for (const u of e) {
|
|
@@ -1018,7 +1018,7 @@ let L = class {
|
|
|
1018
1018
|
if (!r)
|
|
1019
1019
|
return s;
|
|
1020
1020
|
if (r === !0)
|
|
1021
|
-
return
|
|
1021
|
+
return Gr(s);
|
|
1022
1022
|
if (a.isFunction(r))
|
|
1023
1023
|
return r.call(this, s, n);
|
|
1024
1024
|
if (a.isRegExp(r))
|
|
@@ -1059,11 +1059,11 @@ let L = class {
|
|
|
1059
1059
|
return a.forEach(this, (s, o) => {
|
|
1060
1060
|
const i = a.findKey(n, o);
|
|
1061
1061
|
if (i) {
|
|
1062
|
-
r[i] =
|
|
1062
|
+
r[i] = we(s), delete r[o];
|
|
1063
1063
|
return;
|
|
1064
1064
|
}
|
|
1065
|
-
const c = e ?
|
|
1066
|
-
c !== o && delete r[o], r[c] =
|
|
1065
|
+
const c = e ? Zr(o) : String(o).trim();
|
|
1066
|
+
c !== o && delete r[o], r[c] = we(s), n[c] = !0;
|
|
1067
1067
|
}), this;
|
|
1068
1068
|
}
|
|
1069
1069
|
concat(...e) {
|
|
@@ -1096,12 +1096,12 @@ let L = class {
|
|
|
1096
1096
|
return r.forEach((s) => n.set(s)), n;
|
|
1097
1097
|
}
|
|
1098
1098
|
static accessor(e) {
|
|
1099
|
-
const n = (this[
|
|
1099
|
+
const n = (this[et] = this[et] = {
|
|
1100
1100
|
accessors: {}
|
|
1101
1101
|
}).accessors, s = this.prototype;
|
|
1102
1102
|
function o(i) {
|
|
1103
1103
|
const c = ie(i);
|
|
1104
|
-
n[c] || (
|
|
1104
|
+
n[c] || (en(s, i), n[c] = !0);
|
|
1105
1105
|
}
|
|
1106
1106
|
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1107
1107
|
}
|
|
@@ -1124,7 +1124,7 @@ function je(t, e) {
|
|
|
1124
1124
|
o = c.call(r, o, s.normalize(), e ? e.status : void 0);
|
|
1125
1125
|
}), s.normalize(), o;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function Ot(t) {
|
|
1128
1128
|
return !!(t && t.__CANCEL__);
|
|
1129
1129
|
}
|
|
1130
1130
|
let de = class extends g {
|
|
@@ -1141,7 +1141,7 @@ let de = class extends g {
|
|
|
1141
1141
|
super(e ?? "canceled", g.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1142
1142
|
}
|
|
1143
1143
|
};
|
|
1144
|
-
function
|
|
1144
|
+
function Nt(t, e, r) {
|
|
1145
1145
|
const n = r.config.validateStatus;
|
|
1146
1146
|
!r.status || !n || n(r.status) ? t(r) : e(new g(
|
|
1147
1147
|
"Request failed with status code " + r.status,
|
|
@@ -1151,27 +1151,27 @@ function Ot(t, e, r) {
|
|
|
1151
1151
|
r
|
|
1152
1152
|
));
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function tn(t) {
|
|
1155
1155
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1156
1156
|
return e && e[1] || "";
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function rn(t, e) {
|
|
1159
1159
|
t = t || 10;
|
|
1160
1160
|
const r = new Array(t), n = new Array(t);
|
|
1161
1161
|
let s = 0, o = 0, i;
|
|
1162
1162
|
return e = e !== void 0 ? e : 1e3, function(p) {
|
|
1163
1163
|
const d = Date.now(), u = n[o];
|
|
1164
1164
|
i || (i = d), r[s] = p, n[s] = d;
|
|
1165
|
-
let m = o,
|
|
1165
|
+
let m = o, w = 0;
|
|
1166
1166
|
for (; m !== s; )
|
|
1167
|
-
|
|
1167
|
+
w += r[m++], m = m % t;
|
|
1168
1168
|
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), d - i < e)
|
|
1169
1169
|
return;
|
|
1170
1170
|
const R = u && d - u;
|
|
1171
|
-
return R ? Math.round(
|
|
1171
|
+
return R ? Math.round(w * 1e3 / R) : void 0;
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function nn(t, e) {
|
|
1175
1175
|
let r = 0, n = 1e3 / e, s, o;
|
|
1176
1176
|
const i = (d, u = Date.now()) => {
|
|
1177
1177
|
r = u, s = null, o && (clearTimeout(o), o = null), t(...d);
|
|
@@ -1185,8 +1185,8 @@ function tn(t, e) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
const Se = (t, e, r = 3) => {
|
|
1187
1187
|
let n = 0;
|
|
1188
|
-
const s =
|
|
1189
|
-
return
|
|
1188
|
+
const s = rn(50, 250);
|
|
1189
|
+
return nn((o) => {
|
|
1190
1190
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, p = i - n, d = s(p), u = i <= c;
|
|
1191
1191
|
n = i;
|
|
1192
1192
|
const m = {
|
|
@@ -1202,17 +1202,17 @@ const Se = (t, e, r = 3) => {
|
|
|
1202
1202
|
};
|
|
1203
1203
|
t(m);
|
|
1204
1204
|
}, r);
|
|
1205
|
-
},
|
|
1205
|
+
}, tt = (t, e) => {
|
|
1206
1206
|
const r = t != null;
|
|
1207
1207
|
return [(n) => e[0]({
|
|
1208
1208
|
lengthComputable: r,
|
|
1209
1209
|
total: t,
|
|
1210
1210
|
loaded: n
|
|
1211
1211
|
}), e[1]];
|
|
1212
|
-
},
|
|
1212
|
+
}, rt = (t) => (...e) => a.asap(() => t(...e)), sn = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, P.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1213
1213
|
new URL(P.origin),
|
|
1214
1214
|
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1215
|
-
) : () => !0,
|
|
1215
|
+
) : () => !0, on = P.hasStandardBrowserEnv ? (
|
|
1216
1216
|
// Standard browser envs support document.cookie
|
|
1217
1217
|
{
|
|
1218
1218
|
write(t, e, r, n, s, o, i) {
|
|
@@ -1241,28 +1241,28 @@ const Se = (t, e, r = 3) => {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
1243
|
);
|
|
1244
|
-
function
|
|
1244
|
+
function an(t) {
|
|
1245
1245
|
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function cn(t, e) {
|
|
1248
1248
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1251
|
-
let n = !
|
|
1252
|
-
return t && (n || r == !1) ?
|
|
1250
|
+
function Ct(t, e, r) {
|
|
1251
|
+
let n = !an(e);
|
|
1252
|
+
return t && (n || r == !1) ? cn(t, e) : e;
|
|
1253
1253
|
}
|
|
1254
|
-
const
|
|
1254
|
+
const nt = (t) => t instanceof L ? { ...t } : t;
|
|
1255
1255
|
function X(t, e) {
|
|
1256
1256
|
e = e || {};
|
|
1257
1257
|
const r = {};
|
|
1258
|
-
function n(d, u, m,
|
|
1259
|
-
return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless:
|
|
1258
|
+
function n(d, u, m, w) {
|
|
1259
|
+
return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, d, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1260
1260
|
}
|
|
1261
|
-
function s(d, u, m,
|
|
1261
|
+
function s(d, u, m, w) {
|
|
1262
1262
|
if (a.isUndefined(u)) {
|
|
1263
1263
|
if (!a.isUndefined(d))
|
|
1264
|
-
return n(void 0, d, m,
|
|
1265
|
-
} else return n(d, u, m,
|
|
1264
|
+
return n(void 0, d, m, w);
|
|
1265
|
+
} else return n(d, u, m, w);
|
|
1266
1266
|
}
|
|
1267
1267
|
function o(d, u) {
|
|
1268
1268
|
if (!a.isUndefined(u))
|
|
@@ -1309,22 +1309,22 @@ function X(t, e) {
|
|
|
1309
1309
|
socketPath: i,
|
|
1310
1310
|
responseEncoding: i,
|
|
1311
1311
|
validateStatus: c,
|
|
1312
|
-
headers: (d, u, m) => s(
|
|
1312
|
+
headers: (d, u, m) => s(nt(d), nt(u), m, !0)
|
|
1313
1313
|
};
|
|
1314
1314
|
return a.forEach(
|
|
1315
1315
|
Object.keys({ ...t, ...e }),
|
|
1316
1316
|
function(u) {
|
|
1317
1317
|
if (u === "__proto__" || u === "constructor" || u === "prototype")
|
|
1318
1318
|
return;
|
|
1319
|
-
const m = a.hasOwnProp(p, u) ? p[u] : s,
|
|
1320
|
-
a.isUndefined(
|
|
1319
|
+
const m = a.hasOwnProp(p, u) ? p[u] : s, w = m(t[u], e[u], u);
|
|
1320
|
+
a.isUndefined(w) && m !== c || (r[u] = w);
|
|
1321
1321
|
}
|
|
1322
1322
|
), r;
|
|
1323
1323
|
}
|
|
1324
|
-
const
|
|
1324
|
+
const Pt = (t) => {
|
|
1325
1325
|
const e = X({}, t);
|
|
1326
1326
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = e;
|
|
1327
|
-
if (e.headers = i = L.from(i), e.url =
|
|
1327
|
+
if (e.headers = i = L.from(i), e.url = xt(Ct(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && i.set(
|
|
1328
1328
|
"Authorization",
|
|
1329
1329
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1330
1330
|
), a.isFormData(r)) {
|
|
@@ -1337,17 +1337,17 @@ const Nt = (t) => {
|
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
if (P.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 &&
|
|
1341
|
-
const p = s && o &&
|
|
1340
|
+
if (P.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && sn(e.url))) {
|
|
1341
|
+
const p = s && o && on.read(o);
|
|
1342
1342
|
p && i.set(s, p);
|
|
1343
1343
|
}
|
|
1344
1344
|
return e;
|
|
1345
|
-
},
|
|
1345
|
+
}, ln = typeof XMLHttpRequest < "u", un = ln && function(t) {
|
|
1346
1346
|
return new Promise(function(r, n) {
|
|
1347
|
-
const s =
|
|
1347
|
+
const s = Pt(t);
|
|
1348
1348
|
let o = s.data;
|
|
1349
1349
|
const i = L.from(s.headers).normalize();
|
|
1350
|
-
let { responseType: c, onUploadProgress: p, onDownloadProgress: d } = s, u, m,
|
|
1350
|
+
let { responseType: c, onUploadProgress: p, onDownloadProgress: d } = s, u, m, w, R, f;
|
|
1351
1351
|
function y() {
|
|
1352
1352
|
R && R(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1353
1353
|
}
|
|
@@ -1356,17 +1356,17 @@ const Nt = (t) => {
|
|
|
1356
1356
|
function S() {
|
|
1357
1357
|
if (!h)
|
|
1358
1358
|
return;
|
|
1359
|
-
const
|
|
1359
|
+
const _ = L.from(
|
|
1360
1360
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1361
1361
|
), U = {
|
|
1362
1362
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1363
1363
|
status: h.status,
|
|
1364
1364
|
statusText: h.statusText,
|
|
1365
|
-
headers:
|
|
1365
|
+
headers: _,
|
|
1366
1366
|
config: t,
|
|
1367
1367
|
request: h
|
|
1368
1368
|
};
|
|
1369
|
-
|
|
1369
|
+
Nt(function(v) {
|
|
1370
1370
|
r(v), y();
|
|
1371
1371
|
}, function(v) {
|
|
1372
1372
|
n(v), y();
|
|
@@ -1381,7 +1381,7 @@ const Nt = (t) => {
|
|
|
1381
1381
|
M.event = C || null, n(M), h = null;
|
|
1382
1382
|
}, h.ontimeout = function() {
|
|
1383
1383
|
let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1384
|
-
const U = s.transitional ||
|
|
1384
|
+
const U = s.transitional || ze;
|
|
1385
1385
|
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new g(
|
|
1386
1386
|
C,
|
|
1387
1387
|
U.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
@@ -1390,17 +1390,17 @@ const Nt = (t) => {
|
|
|
1390
1390
|
)), h = null;
|
|
1391
1391
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(C, U) {
|
|
1392
1392
|
h.setRequestHeader(U, C);
|
|
1393
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), d && ([
|
|
1394
|
-
h && (n(!
|
|
1393
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), d && ([w, f] = Se(d, !0), h.addEventListener("progress", w)), p && h.upload && ([m, R] = Se(p), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (_) => {
|
|
1394
|
+
h && (n(!_ || _.type ? new de(null, t, h) : _), h.abort(), h = null);
|
|
1395
1395
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1396
|
-
const j =
|
|
1396
|
+
const j = tn(s.url);
|
|
1397
1397
|
if (j && P.protocols.indexOf(j) === -1) {
|
|
1398
1398
|
n(new g("Unsupported protocol " + j + ":", g.ERR_BAD_REQUEST, t));
|
|
1399
1399
|
return;
|
|
1400
1400
|
}
|
|
1401
1401
|
h.send(o || null);
|
|
1402
1402
|
});
|
|
1403
|
-
},
|
|
1403
|
+
}, fn = (t, e) => {
|
|
1404
1404
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1405
1405
|
if (e || r) {
|
|
1406
1406
|
let n = new AbortController(), s;
|
|
@@ -1423,7 +1423,7 @@ const Nt = (t) => {
|
|
|
1423
1423
|
const { signal: p } = n;
|
|
1424
1424
|
return p.unsubscribe = () => a.asap(c), p;
|
|
1425
1425
|
}
|
|
1426
|
-
},
|
|
1426
|
+
}, dn = function* (t, e) {
|
|
1427
1427
|
let r = t.byteLength;
|
|
1428
1428
|
if (r < e) {
|
|
1429
1429
|
yield t;
|
|
@@ -1432,10 +1432,10 @@ const Nt = (t) => {
|
|
|
1432
1432
|
let n = 0, s;
|
|
1433
1433
|
for (; n < r; )
|
|
1434
1434
|
s = n + e, yield t.slice(n, s), n = s;
|
|
1435
|
-
},
|
|
1436
|
-
for await (const r of
|
|
1437
|
-
yield*
|
|
1438
|
-
},
|
|
1435
|
+
}, hn = async function* (t, e) {
|
|
1436
|
+
for await (const r of pn(t))
|
|
1437
|
+
yield* dn(r, e);
|
|
1438
|
+
}, pn = async function* (t) {
|
|
1439
1439
|
if (t[Symbol.asyncIterator]) {
|
|
1440
1440
|
yield* t;
|
|
1441
1441
|
return;
|
|
@@ -1451,8 +1451,8 @@ const Nt = (t) => {
|
|
|
1451
1451
|
} finally {
|
|
1452
1452
|
await e.cancel();
|
|
1453
1453
|
}
|
|
1454
|
-
},
|
|
1455
|
-
const s =
|
|
1454
|
+
}, st = (t, e, r, n) => {
|
|
1455
|
+
const s = hn(t, e);
|
|
1456
1456
|
let o = 0, i, c = (p) => {
|
|
1457
1457
|
i || (i = !0, n && n(p));
|
|
1458
1458
|
};
|
|
@@ -1466,8 +1466,8 @@ const Nt = (t) => {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
let m = u.byteLength;
|
|
1468
1468
|
if (r) {
|
|
1469
|
-
let
|
|
1470
|
-
r(
|
|
1469
|
+
let w = o += m;
|
|
1470
|
+
r(w);
|
|
1471
1471
|
}
|
|
1472
1472
|
p.enqueue(new Uint8Array(u));
|
|
1473
1473
|
} catch (d) {
|
|
@@ -1480,36 +1480,36 @@ const Nt = (t) => {
|
|
|
1480
1480
|
}, {
|
|
1481
1481
|
highWaterMark: 2
|
|
1482
1482
|
});
|
|
1483
|
-
},
|
|
1483
|
+
}, ot = 64 * 1024, { isFunction: ge } = a, mn = (({ Request: t, Response: e }) => ({
|
|
1484
1484
|
Request: t,
|
|
1485
1485
|
Response: e
|
|
1486
1486
|
}))(a.global), {
|
|
1487
|
-
ReadableStream:
|
|
1488
|
-
TextEncoder:
|
|
1489
|
-
} = a.global,
|
|
1487
|
+
ReadableStream: it,
|
|
1488
|
+
TextEncoder: at
|
|
1489
|
+
} = a.global, ct = (t, ...e) => {
|
|
1490
1490
|
try {
|
|
1491
1491
|
return !!t(...e);
|
|
1492
1492
|
} catch {
|
|
1493
1493
|
return !1;
|
|
1494
1494
|
}
|
|
1495
|
-
},
|
|
1495
|
+
}, yn = (t) => {
|
|
1496
1496
|
t = a.merge.call({
|
|
1497
1497
|
skipUndefined: !0
|
|
1498
|
-
},
|
|
1498
|
+
}, mn, t);
|
|
1499
1499
|
const { fetch: e, Request: r, Response: n } = t, s = e ? ge(e) : typeof fetch == "function", o = ge(r), i = ge(n);
|
|
1500
1500
|
if (!s)
|
|
1501
1501
|
return !1;
|
|
1502
|
-
const c = s && ge(
|
|
1502
|
+
const c = s && ge(it), p = s && (typeof at == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new at()) : async (f) => new Uint8Array(await new r(f).arrayBuffer())), d = o && c && ct(() => {
|
|
1503
1503
|
let f = !1;
|
|
1504
1504
|
const y = new r(P.origin, {
|
|
1505
|
-
body: new
|
|
1505
|
+
body: new it(),
|
|
1506
1506
|
method: "POST",
|
|
1507
1507
|
get duplex() {
|
|
1508
1508
|
return f = !0, "half";
|
|
1509
1509
|
}
|
|
1510
1510
|
}).headers.has("Content-Type");
|
|
1511
1511
|
return f && !y;
|
|
1512
|
-
}), u = i && c &&
|
|
1512
|
+
}), u = i && c && ct(() => a.isReadableStream(new n("").body)), m = {
|
|
1513
1513
|
stream: u && ((f) => f.body)
|
|
1514
1514
|
};
|
|
1515
1515
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
@@ -1520,7 +1520,7 @@ const Nt = (t) => {
|
|
|
1520
1520
|
throw new g(`Response type '${f}' is not supported`, g.ERR_NOT_SUPPORT, h);
|
|
1521
1521
|
});
|
|
1522
1522
|
});
|
|
1523
|
-
const
|
|
1523
|
+
const w = async (f) => {
|
|
1524
1524
|
if (f == null)
|
|
1525
1525
|
return 0;
|
|
1526
1526
|
if (a.isBlob(f))
|
|
@@ -1536,7 +1536,7 @@ const Nt = (t) => {
|
|
|
1536
1536
|
return (await p(f)).byteLength;
|
|
1537
1537
|
}, R = async (f, y) => {
|
|
1538
1538
|
const h = a.toFiniteNumber(f.getContentLength());
|
|
1539
|
-
return h ??
|
|
1539
|
+
return h ?? w(y);
|
|
1540
1540
|
};
|
|
1541
1541
|
return async (f) => {
|
|
1542
1542
|
let {
|
|
@@ -1544,7 +1544,7 @@ const Nt = (t) => {
|
|
|
1544
1544
|
method: h,
|
|
1545
1545
|
data: S,
|
|
1546
1546
|
signal: j,
|
|
1547
|
-
cancelToken:
|
|
1547
|
+
cancelToken: _,
|
|
1548
1548
|
timeout: C,
|
|
1549
1549
|
onDownloadProgress: U,
|
|
1550
1550
|
onUploadProgress: M,
|
|
@@ -1552,9 +1552,9 @@ const Nt = (t) => {
|
|
|
1552
1552
|
headers: te,
|
|
1553
1553
|
withCredentials: $ = "same-origin",
|
|
1554
1554
|
fetchOptions: pe
|
|
1555
|
-
} =
|
|
1555
|
+
} = Pt(f), me = e || fetch;
|
|
1556
1556
|
v = v ? (v + "").toLowerCase() : "text";
|
|
1557
|
-
let z =
|
|
1557
|
+
let z = fn([j, _ && _.toAbortSignal()], C), W = null;
|
|
1558
1558
|
const H = z && z.unsubscribe && (() => {
|
|
1559
1559
|
z.unsubscribe();
|
|
1560
1560
|
});
|
|
@@ -1565,13 +1565,13 @@ const Nt = (t) => {
|
|
|
1565
1565
|
method: "POST",
|
|
1566
1566
|
body: S,
|
|
1567
1567
|
duplex: "half"
|
|
1568
|
-
}),
|
|
1569
|
-
if (a.isFormData(S) && (
|
|
1570
|
-
const [T, A] =
|
|
1568
|
+
}), E;
|
|
1569
|
+
if (a.isFormData(S) && (E = l.headers.get("content-type")) && te.setContentType(E), l.body) {
|
|
1570
|
+
const [T, A] = tt(
|
|
1571
1571
|
G,
|
|
1572
|
-
Se(
|
|
1572
|
+
Se(rt(M))
|
|
1573
1573
|
);
|
|
1574
|
-
S =
|
|
1574
|
+
S = st(l.body, ot, T, A);
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
a.isString($) || ($ = $ ? "include" : "omit");
|
|
@@ -1592,12 +1592,12 @@ const Nt = (t) => {
|
|
|
1592
1592
|
["status", "statusText", "headers"].forEach((J) => {
|
|
1593
1593
|
l[J] = B[J];
|
|
1594
1594
|
});
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
Se(
|
|
1595
|
+
const E = a.toFiniteNumber(B.headers.get("content-length")), [T, A] = U && tt(
|
|
1596
|
+
E,
|
|
1597
|
+
Se(rt(U), !0)
|
|
1598
1598
|
) || [];
|
|
1599
1599
|
B = new n(
|
|
1600
|
-
|
|
1600
|
+
st(B.body, ot, T, () => {
|
|
1601
1601
|
A && A(), H && H();
|
|
1602
1602
|
}),
|
|
1603
1603
|
l
|
|
@@ -1605,8 +1605,8 @@ const Nt = (t) => {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
v = v || "text";
|
|
1607
1607
|
let ye = await m[a.findKey(m, v) || "text"](B, f);
|
|
1608
|
-
return !ne && H && H(), await new Promise((l,
|
|
1609
|
-
|
|
1608
|
+
return !ne && H && H(), await new Promise((l, E) => {
|
|
1609
|
+
Nt(l, E, {
|
|
1610
1610
|
data: ye,
|
|
1611
1611
|
headers: L.from(B.headers),
|
|
1612
1612
|
status: B.status,
|
|
@@ -1624,27 +1624,27 @@ const Nt = (t) => {
|
|
|
1624
1624
|
) : g.from(N, N && N.code, f, W, N && N.response);
|
|
1625
1625
|
}
|
|
1626
1626
|
};
|
|
1627
|
-
},
|
|
1627
|
+
}, bn = /* @__PURE__ */ new Map(), jt = (t) => {
|
|
1628
1628
|
let e = t && t.env || {};
|
|
1629
1629
|
const { fetch: r, Request: n, Response: s } = e, o = [
|
|
1630
1630
|
n,
|
|
1631
1631
|
s,
|
|
1632
1632
|
r
|
|
1633
1633
|
];
|
|
1634
|
-
let i = o.length, c = i, p, d, u =
|
|
1634
|
+
let i = o.length, c = i, p, d, u = bn;
|
|
1635
1635
|
for (; c--; )
|
|
1636
|
-
p = o[c], d = u.get(p), d === void 0 && u.set(p, d = c ? /* @__PURE__ */ new Map() :
|
|
1636
|
+
p = o[c], d = u.get(p), d === void 0 && u.set(p, d = c ? /* @__PURE__ */ new Map() : yn(e)), u = d;
|
|
1637
1637
|
return d;
|
|
1638
1638
|
};
|
|
1639
|
-
|
|
1640
|
-
const
|
|
1641
|
-
http:
|
|
1642
|
-
xhr:
|
|
1639
|
+
jt();
|
|
1640
|
+
const Je = {
|
|
1641
|
+
http: kr,
|
|
1642
|
+
xhr: un,
|
|
1643
1643
|
fetch: {
|
|
1644
|
-
get:
|
|
1644
|
+
get: jt
|
|
1645
1645
|
}
|
|
1646
1646
|
};
|
|
1647
|
-
a.forEach(
|
|
1647
|
+
a.forEach(Je, (t, e) => {
|
|
1648
1648
|
if (t) {
|
|
1649
1649
|
try {
|
|
1650
1650
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1653,8 +1653,8 @@ a.forEach(ze, (t, e) => {
|
|
|
1653
1653
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1654
1654
|
}
|
|
1655
1655
|
});
|
|
1656
|
-
const
|
|
1657
|
-
function
|
|
1656
|
+
const lt = (t) => `- ${t}`, gn = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1657
|
+
function En(t, e) {
|
|
1658
1658
|
t = a.isArray(t) ? t : [t];
|
|
1659
1659
|
const { length: r } = t;
|
|
1660
1660
|
let n, s;
|
|
@@ -1662,7 +1662,7 @@ function bn(t, e) {
|
|
|
1662
1662
|
for (let i = 0; i < r; i++) {
|
|
1663
1663
|
n = t[i];
|
|
1664
1664
|
let c;
|
|
1665
|
-
if (s = n, !
|
|
1665
|
+
if (s = n, !gn(n) && (s = Je[(c = String(n)).toLowerCase()], s === void 0))
|
|
1666
1666
|
throw new g(`Unknown adapter '${c}'`);
|
|
1667
1667
|
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1668
1668
|
break;
|
|
@@ -1673,8 +1673,8 @@ function bn(t, e) {
|
|
|
1673
1673
|
([p, d]) => `adapter ${p} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1674
1674
|
);
|
|
1675
1675
|
let c = r ? i.length > 1 ? `since :
|
|
1676
|
-
` + i.map(
|
|
1677
|
-
`) : " " +
|
|
1676
|
+
` + i.map(lt).join(`
|
|
1677
|
+
`) : " " + lt(i[0]) : "as no adapter specified";
|
|
1678
1678
|
throw new g(
|
|
1679
1679
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1680
1680
|
"ERR_NOT_SUPPORT"
|
|
@@ -1682,50 +1682,50 @@ function bn(t, e) {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
return s;
|
|
1684
1684
|
}
|
|
1685
|
-
const
|
|
1685
|
+
const vt = {
|
|
1686
1686
|
/**
|
|
1687
1687
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1688
1688
|
* @type {Function}
|
|
1689
1689
|
*/
|
|
1690
|
-
getAdapter:
|
|
1690
|
+
getAdapter: En,
|
|
1691
1691
|
/**
|
|
1692
1692
|
* Exposes all known adapters
|
|
1693
1693
|
* @type {Object<string, Function|Object>}
|
|
1694
1694
|
*/
|
|
1695
|
-
adapters:
|
|
1695
|
+
adapters: Je
|
|
1696
1696
|
};
|
|
1697
1697
|
function ve(t) {
|
|
1698
1698
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1699
1699
|
throw new de(null, t);
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function ut(t) {
|
|
1702
1702
|
return ve(t), t.headers = L.from(t.headers), t.data = je.call(
|
|
1703
1703
|
t,
|
|
1704
1704
|
t.transformRequest
|
|
1705
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1705
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), vt.getAdapter(t.adapter || fe.adapter, t)(t).then(function(n) {
|
|
1706
1706
|
return ve(t), n.data = je.call(
|
|
1707
1707
|
t,
|
|
1708
1708
|
t.transformResponse,
|
|
1709
1709
|
n
|
|
1710
1710
|
), n.headers = L.from(n.headers), n;
|
|
1711
1711
|
}, function(n) {
|
|
1712
|
-
return
|
|
1712
|
+
return Ot(n) || (ve(t), n && n.response && (n.response.data = je.call(
|
|
1713
1713
|
t,
|
|
1714
1714
|
t.transformResponse,
|
|
1715
1715
|
n.response
|
|
1716
1716
|
), n.response.headers = L.from(n.response.headers))), Promise.reject(n);
|
|
1717
1717
|
});
|
|
1718
1718
|
}
|
|
1719
|
-
const
|
|
1719
|
+
const kt = "1.13.5", Oe = {};
|
|
1720
1720
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1721
|
-
|
|
1721
|
+
Oe[t] = function(n) {
|
|
1722
1722
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1723
1723
|
};
|
|
1724
1724
|
});
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1725
|
+
const ft = {};
|
|
1726
|
+
Oe.transitional = function(e, r, n) {
|
|
1727
1727
|
function s(o, i) {
|
|
1728
|
-
return "[Axios v" +
|
|
1728
|
+
return "[Axios v" + kt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1729
1729
|
}
|
|
1730
1730
|
return (o, i, c) => {
|
|
1731
1731
|
if (e === !1)
|
|
@@ -1733,7 +1733,7 @@ _e.transitional = function(e, r, n) {
|
|
|
1733
1733
|
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
1734
1734
|
g.ERR_DEPRECATED
|
|
1735
1735
|
);
|
|
1736
|
-
return r && !
|
|
1736
|
+
return r && !ft[i] && (ft[i] = !0, console.warn(
|
|
1737
1737
|
s(
|
|
1738
1738
|
i,
|
|
1739
1739
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1741,10 +1741,10 @@ _e.transitional = function(e, r, n) {
|
|
|
1741
1741
|
)), e ? e(o, i, c) : !0;
|
|
1742
1742
|
};
|
|
1743
1743
|
};
|
|
1744
|
-
|
|
1744
|
+
Oe.spelling = function(e) {
|
|
1745
1745
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1746
1746
|
};
|
|
1747
|
-
function
|
|
1747
|
+
function wn(t, e, r) {
|
|
1748
1748
|
if (typeof t != "object")
|
|
1749
1749
|
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1750
1750
|
const n = Object.keys(t);
|
|
@@ -1762,14 +1762,14 @@ function gn(t, e, r) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
1764
|
const Re = {
|
|
1765
|
-
assertOptions:
|
|
1766
|
-
validators:
|
|
1767
|
-
},
|
|
1765
|
+
assertOptions: wn,
|
|
1766
|
+
validators: Oe
|
|
1767
|
+
}, F = Re.validators;
|
|
1768
1768
|
let Y = class {
|
|
1769
1769
|
constructor(e) {
|
|
1770
1770
|
this.defaults = e || {}, this.interceptors = {
|
|
1771
|
-
request: new
|
|
1772
|
-
response: new
|
|
1771
|
+
request: new Ze(),
|
|
1772
|
+
response: new Ze()
|
|
1773
1773
|
};
|
|
1774
1774
|
}
|
|
1775
1775
|
/**
|
|
@@ -1801,18 +1801,18 @@ let Y = class {
|
|
|
1801
1801
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = X(this.defaults, r);
|
|
1802
1802
|
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
1803
1803
|
n !== void 0 && Re.assertOptions(n, {
|
|
1804
|
-
silentJSONParsing:
|
|
1805
|
-
forcedJSONParsing:
|
|
1806
|
-
clarifyTimeoutError:
|
|
1807
|
-
legacyInterceptorReqResOrdering:
|
|
1804
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1805
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1806
|
+
clarifyTimeoutError: F.transitional(F.boolean),
|
|
1807
|
+
legacyInterceptorReqResOrdering: F.transitional(F.boolean)
|
|
1808
1808
|
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1809
1809
|
serialize: s
|
|
1810
1810
|
} : Re.assertOptions(s, {
|
|
1811
|
-
encode:
|
|
1812
|
-
serialize:
|
|
1811
|
+
encode: F.function,
|
|
1812
|
+
serialize: F.function
|
|
1813
1813
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Re.assertOptions(r, {
|
|
1814
|
-
baseUrl:
|
|
1815
|
-
withXsrfToken:
|
|
1814
|
+
baseUrl: F.spelling("baseURL"),
|
|
1815
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1816
1816
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1817
1817
|
let i = o && a.merge(
|
|
1818
1818
|
o.common,
|
|
@@ -1830,23 +1830,23 @@ let Y = class {
|
|
|
1830
1830
|
if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
|
|
1831
1831
|
return;
|
|
1832
1832
|
p = p && y.synchronous;
|
|
1833
|
-
const h = r.transitional ||
|
|
1833
|
+
const h = r.transitional || ze;
|
|
1834
1834
|
h && h.legacyInterceptorReqResOrdering ? c.unshift(y.fulfilled, y.rejected) : c.push(y.fulfilled, y.rejected);
|
|
1835
1835
|
});
|
|
1836
1836
|
const d = [];
|
|
1837
1837
|
this.interceptors.response.forEach(function(y) {
|
|
1838
1838
|
d.push(y.fulfilled, y.rejected);
|
|
1839
1839
|
});
|
|
1840
|
-
let u, m = 0,
|
|
1840
|
+
let u, m = 0, w;
|
|
1841
1841
|
if (!p) {
|
|
1842
|
-
const f = [
|
|
1843
|
-
for (f.unshift(...c), f.push(...d),
|
|
1842
|
+
const f = [ut.bind(this), void 0];
|
|
1843
|
+
for (f.unshift(...c), f.push(...d), w = f.length, u = Promise.resolve(r); m < w; )
|
|
1844
1844
|
u = u.then(f[m++], f[m++]);
|
|
1845
1845
|
return u;
|
|
1846
1846
|
}
|
|
1847
|
-
|
|
1847
|
+
w = c.length;
|
|
1848
1848
|
let R = r;
|
|
1849
|
-
for (; m <
|
|
1849
|
+
for (; m < w; ) {
|
|
1850
1850
|
const f = c[m++], y = c[m++];
|
|
1851
1851
|
try {
|
|
1852
1852
|
R = f(R);
|
|
@@ -1856,18 +1856,18 @@ let Y = class {
|
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
1858
|
try {
|
|
1859
|
-
u =
|
|
1859
|
+
u = ut.call(this, R);
|
|
1860
1860
|
} catch (f) {
|
|
1861
1861
|
return Promise.reject(f);
|
|
1862
1862
|
}
|
|
1863
|
-
for (m = 0,
|
|
1863
|
+
for (m = 0, w = d.length; m < w; )
|
|
1864
1864
|
u = u.then(d[m++], d[m++]);
|
|
1865
1865
|
return u;
|
|
1866
1866
|
}
|
|
1867
1867
|
getUri(e) {
|
|
1868
1868
|
e = X(this.defaults, e);
|
|
1869
|
-
const r =
|
|
1870
|
-
return
|
|
1869
|
+
const r = Ct(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1870
|
+
return xt(r, e.params, e.paramsSerializer);
|
|
1871
1871
|
}
|
|
1872
1872
|
};
|
|
1873
1873
|
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1894,7 +1894,7 @@ a.forEach(["post", "put", "patch"], function(e) {
|
|
|
1894
1894
|
}
|
|
1895
1895
|
Y.prototype[e] = r(), Y.prototype[e + "Form"] = r(!0);
|
|
1896
1896
|
});
|
|
1897
|
-
let
|
|
1897
|
+
let Rn = class Lt {
|
|
1898
1898
|
constructor(e) {
|
|
1899
1899
|
if (typeof e != "function")
|
|
1900
1900
|
throw new TypeError("executor must be a function.");
|
|
@@ -1960,22 +1960,22 @@ let wn = class vt {
|
|
|
1960
1960
|
static source() {
|
|
1961
1961
|
let e;
|
|
1962
1962
|
return {
|
|
1963
|
-
token: new
|
|
1963
|
+
token: new Lt(function(s) {
|
|
1964
1964
|
e = s;
|
|
1965
1965
|
}),
|
|
1966
1966
|
cancel: e
|
|
1967
1967
|
};
|
|
1968
1968
|
}
|
|
1969
1969
|
};
|
|
1970
|
-
function
|
|
1970
|
+
function Sn(t) {
|
|
1971
1971
|
return function(r) {
|
|
1972
1972
|
return t.apply(null, r);
|
|
1973
1973
|
};
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function Tn(t) {
|
|
1976
1976
|
return a.isObject(t) && t.isAxiosError === !0;
|
|
1977
1977
|
}
|
|
1978
|
-
const
|
|
1978
|
+
const Be = {
|
|
1979
1979
|
Continue: 100,
|
|
1980
1980
|
SwitchingProtocols: 101,
|
|
1981
1981
|
Processing: 102,
|
|
@@ -2046,70 +2046,78 @@ const Ie = {
|
|
|
2046
2046
|
SslHandshakeFailed: 525,
|
|
2047
2047
|
InvalidSslCertificate: 526
|
|
2048
2048
|
};
|
|
2049
|
-
Object.entries(
|
|
2050
|
-
|
|
2049
|
+
Object.entries(Be).forEach(([t, e]) => {
|
|
2050
|
+
Be[e] = t;
|
|
2051
2051
|
});
|
|
2052
|
-
function
|
|
2053
|
-
const e = new Y(t), r =
|
|
2052
|
+
function Ut(t) {
|
|
2053
|
+
const e = new Y(t), r = pt(Y.prototype.request, e);
|
|
2054
2054
|
return a.extend(r, Y.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2055
|
-
return
|
|
2055
|
+
return Ut(X(t, s));
|
|
2056
2056
|
}, r;
|
|
2057
2057
|
}
|
|
2058
|
-
const x =
|
|
2058
|
+
const x = Ut(fe);
|
|
2059
2059
|
x.Axios = Y;
|
|
2060
2060
|
x.CanceledError = de;
|
|
2061
|
-
x.CancelToken =
|
|
2062
|
-
x.isCancel =
|
|
2063
|
-
x.VERSION =
|
|
2064
|
-
x.toFormData =
|
|
2061
|
+
x.CancelToken = Rn;
|
|
2062
|
+
x.isCancel = Ot;
|
|
2063
|
+
x.VERSION = kt;
|
|
2064
|
+
x.toFormData = _e;
|
|
2065
2065
|
x.AxiosError = g;
|
|
2066
2066
|
x.Cancel = x.CanceledError;
|
|
2067
2067
|
x.all = function(e) {
|
|
2068
2068
|
return Promise.all(e);
|
|
2069
2069
|
};
|
|
2070
|
-
x.spread =
|
|
2071
|
-
x.isAxiosError =
|
|
2070
|
+
x.spread = Sn;
|
|
2071
|
+
x.isAxiosError = Tn;
|
|
2072
2072
|
x.mergeConfig = X;
|
|
2073
2073
|
x.AxiosHeaders = L;
|
|
2074
|
-
x.formToJSON = (t) =>
|
|
2075
|
-
x.getAdapter =
|
|
2076
|
-
x.HttpStatusCode =
|
|
2074
|
+
x.formToJSON = (t) => _t(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
2075
|
+
x.getAdapter = vt.getAdapter;
|
|
2076
|
+
x.HttpStatusCode = Be;
|
|
2077
2077
|
x.default = x;
|
|
2078
2078
|
const {
|
|
2079
|
-
Axios:
|
|
2080
|
-
AxiosError:
|
|
2081
|
-
CanceledError:
|
|
2082
|
-
isCancel:
|
|
2083
|
-
CancelToken:
|
|
2084
|
-
VERSION:
|
|
2085
|
-
all:
|
|
2086
|
-
Cancel:
|
|
2087
|
-
isAxiosError:
|
|
2088
|
-
spread:
|
|
2089
|
-
toFormData:
|
|
2090
|
-
AxiosHeaders:
|
|
2091
|
-
HttpStatusCode:
|
|
2092
|
-
formToJSON:
|
|
2093
|
-
getAdapter:
|
|
2094
|
-
mergeConfig:
|
|
2095
|
-
} = x,
|
|
2096
|
-
baseURL:
|
|
2097
|
-
withCredentials: !0,
|
|
2098
|
-
// Kept for legacy compatibility if cookies are ever used
|
|
2079
|
+
Axios: Un,
|
|
2080
|
+
AxiosError: In,
|
|
2081
|
+
CanceledError: Fn,
|
|
2082
|
+
isCancel: Bn,
|
|
2083
|
+
CancelToken: Dn,
|
|
2084
|
+
VERSION: qn,
|
|
2085
|
+
all: Mn,
|
|
2086
|
+
Cancel: Hn,
|
|
2087
|
+
isAxiosError: $n,
|
|
2088
|
+
spread: zn,
|
|
2089
|
+
toFormData: Wn,
|
|
2090
|
+
AxiosHeaders: Jn,
|
|
2091
|
+
HttpStatusCode: Vn,
|
|
2092
|
+
formToJSON: Kn,
|
|
2093
|
+
getAdapter: Yn,
|
|
2094
|
+
mergeConfig: Xn
|
|
2095
|
+
} = x, An = "https://authifyer-backend.onrender.com", q = x.create({
|
|
2096
|
+
baseURL: An,
|
|
2099
2097
|
headers: {
|
|
2100
2098
|
"Content-Type": "application/json"
|
|
2101
2099
|
}
|
|
2102
|
-
}),
|
|
2103
|
-
|
|
2104
|
-
|
|
2100
|
+
}), De = "authifyer_access_token", ke = (t) => {
|
|
2101
|
+
try {
|
|
2102
|
+
t ? (localStorage.setItem(De, t), q.defaults.headers.common.Authorization = `Bearer ${t}`) : (localStorage.removeItem(De), delete q.defaults.headers.common.Authorization);
|
|
2103
|
+
} catch (e) {
|
|
2104
|
+
console.warn("Authifyer: localStorage is not accessible.", e);
|
|
2105
|
+
}
|
|
2106
|
+
}, xn = () => {
|
|
2107
|
+
try {
|
|
2108
|
+
return localStorage.getItem(De);
|
|
2109
|
+
} catch {
|
|
2110
|
+
return null;
|
|
2111
|
+
}
|
|
2112
|
+
}, qe = "authifyer_refresh_token", Le = (t) => {
|
|
2105
2113
|
try {
|
|
2106
|
-
t ? localStorage.setItem(
|
|
2114
|
+
t ? localStorage.setItem(qe, t) : localStorage.removeItem(qe);
|
|
2107
2115
|
} catch (e) {
|
|
2108
2116
|
console.warn("Authifyer: localStorage is not accessible. Session persistence may fail.", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("auth:storage_error"));
|
|
2109
2117
|
}
|
|
2110
|
-
},
|
|
2118
|
+
}, dt = () => {
|
|
2111
2119
|
try {
|
|
2112
|
-
return localStorage.getItem(
|
|
2120
|
+
return localStorage.getItem(qe);
|
|
2113
2121
|
} catch (t) {
|
|
2114
2122
|
return console.warn("Authifyer: localStorage is not accessible. Session persistence may fail.", t), typeof window < "u" && window.dispatchEvent(new CustomEvent("auth:storage_error")), null;
|
|
2115
2123
|
}
|
|
@@ -2117,13 +2125,13 @@ const {
|
|
|
2117
2125
|
class ae extends Error {
|
|
2118
2126
|
}
|
|
2119
2127
|
ae.prototype.name = "InvalidTokenError";
|
|
2120
|
-
function
|
|
2128
|
+
function _n(t) {
|
|
2121
2129
|
return decodeURIComponent(atob(t).replace(/(.)/g, (e, r) => {
|
|
2122
2130
|
let n = r.charCodeAt(0).toString(16).toUpperCase();
|
|
2123
2131
|
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
2124
2132
|
}));
|
|
2125
2133
|
}
|
|
2126
|
-
function
|
|
2134
|
+
function On(t) {
|
|
2127
2135
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2128
2136
|
switch (e.length % 4) {
|
|
2129
2137
|
case 0:
|
|
@@ -2138,12 +2146,12 @@ function An(t) {
|
|
|
2138
2146
|
throw new Error("base64 string is not of the correct length");
|
|
2139
2147
|
}
|
|
2140
2148
|
try {
|
|
2141
|
-
return
|
|
2149
|
+
return _n(e);
|
|
2142
2150
|
} catch {
|
|
2143
2151
|
return atob(e);
|
|
2144
2152
|
}
|
|
2145
2153
|
}
|
|
2146
|
-
function
|
|
2154
|
+
function Nn(t, e) {
|
|
2147
2155
|
if (typeof t != "string")
|
|
2148
2156
|
throw new ae("Invalid token specified: must be a string");
|
|
2149
2157
|
e || (e = {});
|
|
@@ -2152,7 +2160,7 @@ function xn(t, e) {
|
|
|
2152
2160
|
throw new ae(`Invalid token specified: missing part #${r + 1}`);
|
|
2153
2161
|
let s;
|
|
2154
2162
|
try {
|
|
2155
|
-
s =
|
|
2163
|
+
s = On(n);
|
|
2156
2164
|
} catch (o) {
|
|
2157
2165
|
throw new ae(`Invalid token specified: invalid base64 for part #${r + 1} (${o.message})`);
|
|
2158
2166
|
}
|
|
@@ -2162,9 +2170,9 @@ function xn(t, e) {
|
|
|
2162
2170
|
throw new ae(`Invalid token specified: invalid json for part #${r + 1} (${o.message})`);
|
|
2163
2171
|
}
|
|
2164
2172
|
}
|
|
2165
|
-
const
|
|
2173
|
+
const ht = (t) => {
|
|
2166
2174
|
try {
|
|
2167
|
-
const e =
|
|
2175
|
+
const e = Nn(t), r = Date.now() / 1e3;
|
|
2168
2176
|
if (e.exp < r)
|
|
2169
2177
|
return null;
|
|
2170
2178
|
const n = {
|
|
@@ -2187,7 +2195,7 @@ const On = (t) => {
|
|
|
2187
2195
|
return console.error("Invalid token", e), null;
|
|
2188
2196
|
}
|
|
2189
2197
|
};
|
|
2190
|
-
class
|
|
2198
|
+
class Cn {
|
|
2191
2199
|
constructor(e, r) {
|
|
2192
2200
|
V(this, "publishableKey");
|
|
2193
2201
|
V(this, "refreshTimer", null);
|
|
@@ -2203,18 +2211,23 @@ class _n {
|
|
|
2203
2211
|
try {
|
|
2204
2212
|
this.isLoading = !0, this.notifyListeners();
|
|
2205
2213
|
try {
|
|
2206
|
-
const
|
|
2207
|
-
|
|
2208
|
-
emailPasswordEnabled:
|
|
2209
|
-
oauthProviders:
|
|
2214
|
+
const n = (await q.get(`/public/config/${this.publishableKey}`)).data, s = [];
|
|
2215
|
+
n.isGoogleOauthEnabled && s.push("google"), n.isGithubOauthEnabled && s.push("github"), this.config = {
|
|
2216
|
+
emailPasswordEnabled: n.isEmailPassEnabled,
|
|
2217
|
+
oauthProviders: s
|
|
2210
2218
|
};
|
|
2211
|
-
} catch (
|
|
2212
|
-
console.warn("Authifyer: Failed to fetch public project configuration. Using
|
|
2219
|
+
} catch (r) {
|
|
2220
|
+
console.warn("Authifyer: Failed to fetch public project configuration. Using defaults.", r), this.config = {
|
|
2213
2221
|
emailPasswordEnabled: !0,
|
|
2214
2222
|
oauthProviders: ["google", "github"]
|
|
2215
2223
|
};
|
|
2216
2224
|
}
|
|
2217
|
-
|
|
2225
|
+
const e = xn();
|
|
2226
|
+
if (e) {
|
|
2227
|
+
const r = ht(e);
|
|
2228
|
+
r && (this.session = r, ke(e), this.startRefreshTimer());
|
|
2229
|
+
}
|
|
2230
|
+
this.session || await this.refreshSession();
|
|
2218
2231
|
} catch (e) {
|
|
2219
2232
|
console.error("Failed to load Authifyer client", e);
|
|
2220
2233
|
} finally {
|
|
@@ -2263,14 +2276,14 @@ class _n {
|
|
|
2263
2276
|
// --- Session Management ---
|
|
2264
2277
|
async refreshSession() {
|
|
2265
2278
|
try {
|
|
2266
|
-
const e =
|
|
2279
|
+
const e = dt(), r = await q.post("/authifyer/jwt/refresh-jwt", {
|
|
2267
2280
|
refresh_token: e || void 0
|
|
2268
2281
|
}), { access_token: n, refresh_token: s } = r.data;
|
|
2269
2282
|
if (n) {
|
|
2270
2283
|
const o = n.accessToken || n;
|
|
2271
2284
|
this.setSession(o);
|
|
2272
2285
|
}
|
|
2273
|
-
s &&
|
|
2286
|
+
s && Le(s);
|
|
2274
2287
|
} catch {
|
|
2275
2288
|
this.clearSession();
|
|
2276
2289
|
}
|
|
@@ -2282,7 +2295,7 @@ class _n {
|
|
|
2282
2295
|
*/
|
|
2283
2296
|
async rotateSession() {
|
|
2284
2297
|
try {
|
|
2285
|
-
const e =
|
|
2298
|
+
const e = dt();
|
|
2286
2299
|
await q.post("/authifyer/session/refresh", {
|
|
2287
2300
|
refresh_token: e || void 0
|
|
2288
2301
|
}), await this.refreshSession();
|
|
@@ -2291,14 +2304,14 @@ class _n {
|
|
|
2291
2304
|
}
|
|
2292
2305
|
}
|
|
2293
2306
|
handleAuthResponse(e) {
|
|
2294
|
-
e.accessToken && this.setSession(e.accessToken), (e.refreshToken || e.refresh_token) &&
|
|
2307
|
+
e.accessToken && this.setSession(e.accessToken), (e.refreshToken || e.refresh_token) && Le(e.refreshToken || e.refresh_token);
|
|
2295
2308
|
}
|
|
2296
2309
|
setSession(e) {
|
|
2297
|
-
const r =
|
|
2298
|
-
r && (this.session = r,
|
|
2310
|
+
const r = ht(e);
|
|
2311
|
+
r && (this.session = r, ke(e), this.startRefreshTimer(), this.notifyListeners());
|
|
2299
2312
|
}
|
|
2300
2313
|
clearSession() {
|
|
2301
|
-
this.session = null,
|
|
2314
|
+
this.session = null, ke(null), Le(null), this.stopRefreshTimer(), this.notifyListeners();
|
|
2302
2315
|
}
|
|
2303
2316
|
// --- Timer ---
|
|
2304
2317
|
startRefreshTimer() {
|
|
@@ -2319,27 +2332,27 @@ class _n {
|
|
|
2319
2332
|
this.listeners.forEach((e) => e(this));
|
|
2320
2333
|
}
|
|
2321
2334
|
}
|
|
2322
|
-
const
|
|
2335
|
+
const It = Mt(void 0), Gn = ({
|
|
2323
2336
|
publishableKey: t,
|
|
2324
2337
|
backendUrl: e,
|
|
2325
2338
|
config: r,
|
|
2326
2339
|
children: n
|
|
2327
2340
|
}) => {
|
|
2328
2341
|
var f;
|
|
2329
|
-
const s =
|
|
2342
|
+
const s = Ht(() => {
|
|
2330
2343
|
const y = (
|
|
2331
2344
|
// @ts-ignore (Vite)
|
|
2332
2345
|
// @ts-ignore (Next.js / CRA)
|
|
2333
2346
|
typeof process < "u" && process.env && (process.env.NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY || process.env.REACT_APP_AUTHIFYER_PUBLISHABLE_KEY)
|
|
2334
2347
|
), h = t || y;
|
|
2335
2348
|
h || console.error("AuthifyerProvider requires a publishableKey either passed as a prop or set as an environment variable (e.g. VITE_AUTHIFYER_PUBLISHABLE_KEY, NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY, REACT_APP_AUTHIFYER_PUBLISHABLE_KEY).");
|
|
2336
|
-
const S = new
|
|
2349
|
+
const S = new Cn(h || "", { backendUrl: e });
|
|
2337
2350
|
return r && (S.config = r), S;
|
|
2338
|
-
}, [t, e, r]), [o, i] =
|
|
2339
|
-
|
|
2351
|
+
}, [t, e, r]), [o, i] = I(((f = s.session) == null ? void 0 : f.user) || null), [c, p] = I(s.session), [d, u] = I(s.config), [m, w] = I(s.isLoading);
|
|
2352
|
+
$t(() => {
|
|
2340
2353
|
const y = s.subscribe((h) => {
|
|
2341
2354
|
var S;
|
|
2342
|
-
i(((S = h.session) == null ? void 0 : S.user) || null), p(h.session), r || u(h.config),
|
|
2355
|
+
i(((S = h.session) == null ? void 0 : S.user) || null), p(h.session), r || u(h.config), w(h.isLoading);
|
|
2343
2356
|
});
|
|
2344
2357
|
return s.load(), () => {
|
|
2345
2358
|
y();
|
|
@@ -2352,22 +2365,22 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2352
2365
|
config: r || d,
|
|
2353
2366
|
isLoading: m
|
|
2354
2367
|
};
|
|
2355
|
-
return /* @__PURE__ */ b.jsx(
|
|
2368
|
+
return /* @__PURE__ */ b.jsx(It.Provider, { value: R, children: n });
|
|
2356
2369
|
}, he = () => {
|
|
2357
|
-
const t =
|
|
2370
|
+
const t = zt(It);
|
|
2358
2371
|
if (t === void 0)
|
|
2359
2372
|
throw new Error("useAuth must be used within an AuthifyerProvider");
|
|
2360
2373
|
return t;
|
|
2361
|
-
},
|
|
2374
|
+
}, Qn = () => {
|
|
2362
2375
|
const { user: t, isLoading: e } = he();
|
|
2363
2376
|
return { user: t, isLoading: e, isSignedIn: !!t };
|
|
2364
|
-
},
|
|
2377
|
+
}, Zn = () => {
|
|
2365
2378
|
const { session: t, isLoading: e } = he();
|
|
2366
2379
|
return { session: t, isLoading: e, isSignedIn: !!t };
|
|
2367
|
-
},
|
|
2380
|
+
}, es = () => {
|
|
2368
2381
|
const { client: t } = he();
|
|
2369
2382
|
return t;
|
|
2370
|
-
},
|
|
2383
|
+
}, Me = ({ title: t, subtitle: e, children: r }) => /* @__PURE__ */ b.jsx("div", { className: "authifyer-root", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-card", children: [
|
|
2371
2384
|
/* @__PURE__ */ b.jsxs("div", { className: "authifyer-card-header", children: [
|
|
2372
2385
|
/* @__PURE__ */ b.jsx("h2", { className: "authifyer-card-title", children: t }),
|
|
2373
2386
|
e && /* @__PURE__ */ b.jsx("p", { className: "authifyer-card-subtitle", children: e })
|
|
@@ -2380,8 +2393,8 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2380
2393
|
"Authifyer"
|
|
2381
2394
|
] })
|
|
2382
2395
|
] })
|
|
2383
|
-
] }) }),
|
|
2384
|
-
const { client: t, config: e } = he(), [r, n] =
|
|
2396
|
+
] }) }), ts = () => {
|
|
2397
|
+
const { client: t, config: e } = he(), [r, n] = I(""), [s, o] = I(""), [i, c] = I(""), [p, d] = I(!1), u = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, m = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], w = async (R) => {
|
|
2385
2398
|
R.preventDefault(), d(!0), c("");
|
|
2386
2399
|
try {
|
|
2387
2400
|
await t.signInWithEmail(r, s);
|
|
@@ -2391,7 +2404,7 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2391
2404
|
d(!1);
|
|
2392
2405
|
}
|
|
2393
2406
|
};
|
|
2394
|
-
return /* @__PURE__ */ b.jsxs(
|
|
2407
|
+
return /* @__PURE__ */ b.jsxs(Me, { title: "Sign in", subtitle: "to continue to Authifyer", children: [
|
|
2395
2408
|
i && /* @__PURE__ */ b.jsx("p", { className: "authifyer-error", children: i }),
|
|
2396
2409
|
(m.includes("google") || m.includes("github")) && /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form", children: [
|
|
2397
2410
|
m.includes("google") && /* @__PURE__ */ b.jsxs(
|
|
@@ -2423,7 +2436,7 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2423
2436
|
)
|
|
2424
2437
|
] }),
|
|
2425
2438
|
(m.includes("google") || m.includes("github")) && u && /* @__PURE__ */ b.jsx("div", { className: "authifyer-divider", children: "or" }),
|
|
2426
|
-
u && /* @__PURE__ */ b.jsxs("form", { onSubmit:
|
|
2439
|
+
u && /* @__PURE__ */ b.jsxs("form", { onSubmit: w, className: "authifyer-form", children: [
|
|
2427
2440
|
/* @__PURE__ */ b.jsxs("div", { className: "authifyer-form-group", children: [
|
|
2428
2441
|
/* @__PURE__ */ b.jsx("label", { className: "authifyer-label", children: "Email address" }),
|
|
2429
2442
|
/* @__PURE__ */ b.jsx(
|
|
@@ -2453,8 +2466,8 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2453
2466
|
/* @__PURE__ */ b.jsx("button", { type: "submit", className: "authifyer-submit-btn", disabled: p, children: p ? "Signing In..." : "Continue" })
|
|
2454
2467
|
] })
|
|
2455
2468
|
] });
|
|
2456
|
-
},
|
|
2457
|
-
const { client: t, config: e } = he(), [r, n] =
|
|
2469
|
+
}, rs = () => {
|
|
2470
|
+
const { client: t, config: e } = he(), [r, n] = I(""), [s, o] = I(""), [i, c] = I(""), [p, d] = I(!1), [u, m] = I(!1), w = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, R = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], f = async (y) => {
|
|
2458
2471
|
y.preventDefault(), d(!0), c("");
|
|
2459
2472
|
try {
|
|
2460
2473
|
await t.signUpWithEmail(r, s), m(!0);
|
|
@@ -2464,13 +2477,13 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2464
2477
|
d(!1);
|
|
2465
2478
|
}
|
|
2466
2479
|
};
|
|
2467
|
-
return u ? /* @__PURE__ */ b.jsx(
|
|
2480
|
+
return u ? /* @__PURE__ */ b.jsx(Me, { title: "Welcome!", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-success", children: [
|
|
2468
2481
|
/* @__PURE__ */ b.jsx("svg", { className: "authifyer-success-icon", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ b.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
|
|
2469
2482
|
/* @__PURE__ */ b.jsxs("div", { children: [
|
|
2470
2483
|
/* @__PURE__ */ b.jsx("h3", { className: "authifyer-success-title", children: "Success" }),
|
|
2471
2484
|
/* @__PURE__ */ b.jsx("p", { className: "authifyer-success-text", children: "Registration completed. Please verify your email." })
|
|
2472
2485
|
] })
|
|
2473
|
-
] }) }) : /* @__PURE__ */ b.jsxs(
|
|
2486
|
+
] }) }) : /* @__PURE__ */ b.jsxs(Me, { title: "Create your account", subtitle: "Welcome to Authifyer", children: [
|
|
2474
2487
|
i && /* @__PURE__ */ b.jsx("p", { className: "authifyer-error", children: i }),
|
|
2475
2488
|
(R.includes("google") || R.includes("github")) && /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form", children: [
|
|
2476
2489
|
R.includes("google") && /* @__PURE__ */ b.jsxs(
|
|
@@ -2501,8 +2514,8 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2501
2514
|
}
|
|
2502
2515
|
)
|
|
2503
2516
|
] }),
|
|
2504
|
-
(R.includes("google") || R.includes("github")) &&
|
|
2505
|
-
|
|
2517
|
+
(R.includes("google") || R.includes("github")) && w && /* @__PURE__ */ b.jsx("div", { className: "authifyer-divider", children: "or" }),
|
|
2518
|
+
w && /* @__PURE__ */ b.jsxs("form", { onSubmit: f, className: "authifyer-form", children: [
|
|
2506
2519
|
/* @__PURE__ */ b.jsxs("div", { className: "authifyer-form-group", children: [
|
|
2507
2520
|
/* @__PURE__ */ b.jsx("label", { className: "authifyer-label", children: "Email address" }),
|
|
2508
2521
|
/* @__PURE__ */ b.jsx(
|
|
@@ -2534,11 +2547,11 @@ const Lt = Dt(void 0), Yn = ({
|
|
|
2534
2547
|
] });
|
|
2535
2548
|
};
|
|
2536
2549
|
export {
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2550
|
+
Gn as AuthifyerProvider,
|
|
2551
|
+
ts as SignIn,
|
|
2552
|
+
rs as SignUp,
|
|
2540
2553
|
he as useAuth,
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2554
|
+
es as useAuthifyer,
|
|
2555
|
+
Zn as useSession,
|
|
2556
|
+
Qn as useUser
|
|
2544
2557
|
};
|