react-auth-service 0.0.1 → 0.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/README.md +36 -7
- package/dist/auth-ui.es.js +566 -563
- package/dist/auth-ui.umd.js +7 -7
- package/package.json +39 -37
- package/types/config/config.d.ts +4 -0
- package/types/constants/apiEndpoints.d.ts +6 -7
- package/types/index.d.ts +1 -0
- package/types/App.d.ts +0 -3
- /package/dist/{react-auth-ui.css → react-auth-service.css} +0 -0
package/dist/auth-ui.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import pt, { createContext as Vt, useContext as Yt, useState as M, useEffect as mt } from "react";
|
|
2
|
+
import { useNavigate as Et, Navigate as bt } from "react-router-dom";
|
|
3
|
+
var we = { exports: {} }, ie = {};
|
|
4
|
+
var Ve;
|
|
5
|
+
function Xt() {
|
|
6
|
+
if (Ve) return ie;
|
|
7
|
+
Ve = 1;
|
|
8
8
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
9
9
|
function r(n, s, i) {
|
|
10
10
|
var o = null;
|
|
@@ -21,16 +21,16 @@ function Yt() {
|
|
|
21
21
|
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return ie.Fragment = t, ie.jsx = r, ie.jsxs = r, ie;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
26
|
+
var ae = {};
|
|
27
|
+
var Ye;
|
|
28
|
+
function Kt() {
|
|
29
|
+
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
30
|
function e(l) {
|
|
31
31
|
if (l == null) return null;
|
|
32
32
|
if (typeof l == "function")
|
|
33
|
-
return l.$$typeof ===
|
|
33
|
+
return l.$$typeof === Ee ? null : l.displayName || l.name || null;
|
|
34
34
|
if (typeof l == "string") return l;
|
|
35
35
|
switch (l) {
|
|
36
36
|
case p:
|
|
@@ -50,21 +50,21 @@ function Xt() {
|
|
|
50
50
|
switch (typeof l.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), l.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case E:
|
|
54
54
|
return "Portal";
|
|
55
55
|
case C:
|
|
56
56
|
return l.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case T:
|
|
58
58
|
return (l._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return l = l.displayName, l || (l =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
59
|
+
case I:
|
|
60
|
+
var b = l.render;
|
|
61
|
+
return l = l.displayName, l || (l = b.displayName || b.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
62
|
+
case ne:
|
|
63
|
+
return b = l.displayName || null, b !== null ? b : e(l.type) || "Memo";
|
|
64
64
|
case H:
|
|
65
|
-
|
|
65
|
+
b = l._payload, l = l._init;
|
|
66
66
|
try {
|
|
67
|
-
return e(l(
|
|
67
|
+
return e(l(b));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -76,15 +76,15 @@ function Xt() {
|
|
|
76
76
|
function r(l) {
|
|
77
77
|
try {
|
|
78
78
|
t(l);
|
|
79
|
-
var
|
|
79
|
+
var b = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
b = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var R =
|
|
83
|
+
if (b) {
|
|
84
|
+
b = console;
|
|
85
|
+
var R = b.error, O = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
86
86
|
return R.call(
|
|
87
|
-
|
|
87
|
+
b,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
89
|
O
|
|
90
90
|
), t(l);
|
|
@@ -95,8 +95,8 @@ function Xt() {
|
|
|
95
95
|
if (typeof l == "object" && l !== null && l.$$typeof === H)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var b = e(l);
|
|
99
|
+
return b ? "<" + b + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
@@ -110,16 +110,16 @@ function Xt() {
|
|
|
110
110
|
}
|
|
111
111
|
function o(l) {
|
|
112
112
|
if (G.call(l, "key")) {
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
113
|
+
var b = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
114
|
+
if (b && b.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return l.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function c(l,
|
|
118
|
+
function c(l, b) {
|
|
119
119
|
function R() {
|
|
120
120
|
F || (F = !0, console.error(
|
|
121
121
|
"%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)",
|
|
122
|
-
|
|
122
|
+
b
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
125
|
R.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
@@ -129,16 +129,16 @@ function Xt() {
|
|
|
129
129
|
}
|
|
130
130
|
function h() {
|
|
131
131
|
var l = e(this.type);
|
|
132
|
-
return
|
|
132
|
+
return se[l] || (se[l] = !0, console.error(
|
|
133
133
|
"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."
|
|
134
134
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
135
135
|
}
|
|
136
|
-
function f(l,
|
|
136
|
+
function f(l, b, R, O, W, ke) {
|
|
137
137
|
var _ = R.ref;
|
|
138
138
|
return l = {
|
|
139
139
|
$$typeof: d,
|
|
140
140
|
type: l,
|
|
141
|
-
key:
|
|
141
|
+
key: b,
|
|
142
142
|
props: R,
|
|
143
143
|
_owner: O
|
|
144
144
|
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(l, "ref", {
|
|
@@ -166,8 +166,8 @@ function Xt() {
|
|
|
166
166
|
value: ke
|
|
167
167
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
168
168
|
}
|
|
169
|
-
function u(l,
|
|
170
|
-
var _ =
|
|
169
|
+
function u(l, b, R, O, W, ke) {
|
|
170
|
+
var _ = b.children;
|
|
171
171
|
if (_ !== void 0)
|
|
172
172
|
if (O)
|
|
173
173
|
if (q(_)) {
|
|
@@ -179,12 +179,12 @@ function Xt() {
|
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
181
|
else m(_);
|
|
182
|
-
if (G.call(
|
|
182
|
+
if (G.call(b, "key")) {
|
|
183
183
|
_ = e(l);
|
|
184
|
-
var Q = Object.keys(
|
|
185
|
-
return
|
|
184
|
+
var Q = Object.keys(b).filter(function(Wt) {
|
|
185
|
+
return Wt !== "key";
|
|
186
186
|
});
|
|
187
|
-
O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
187
|
+
O = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", be[_ + O] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
@@ -195,13 +195,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
195
195
|
_,
|
|
196
196
|
Q,
|
|
197
197
|
_
|
|
198
|
-
),
|
|
198
|
+
), be[_ + O] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (_ = null, R !== void 0 && (r(R), _ = "" + R), o(
|
|
200
|
+
if (_ = null, R !== void 0 && (r(R), _ = "" + R), o(b) && (r(b.key), _ = "" + b.key), "key" in b) {
|
|
201
201
|
R = {};
|
|
202
|
-
for (var je in
|
|
203
|
-
je !== "key" && (R[je] =
|
|
204
|
-
} else R =
|
|
202
|
+
for (var je in b)
|
|
203
|
+
je !== "key" && (R[je] = b[je]);
|
|
204
|
+
} else R = b;
|
|
205
205
|
return _ && c(
|
|
206
206
|
R,
|
|
207
207
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
@@ -220,87 +220,87 @@ React keys must be passed directly to JSX without using spread:
|
|
|
220
220
|
function g(l) {
|
|
221
221
|
return typeof l == "object" && l !== null && l.$$typeof === d;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var A = pt, d = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), C = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), me = Symbol.for("react.activity"), Ee = Symbol.for("react.client.reference"), z = A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, q = Array.isArray, Z = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
A = {
|
|
227
227
|
react_stack_bottom_frame: function(l) {
|
|
228
228
|
return l();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var F,
|
|
232
|
-
|
|
231
|
+
var F, se = {}, v = A.react_stack_bottom_frame.bind(
|
|
232
|
+
A,
|
|
233
233
|
i
|
|
234
|
-
)(),
|
|
235
|
-
|
|
234
|
+
)(), oe = Z(n(i)), be = {};
|
|
235
|
+
ae.Fragment = p, ae.jsx = function(l, b, R) {
|
|
236
236
|
var O = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return u(
|
|
238
238
|
l,
|
|
239
|
-
|
|
239
|
+
b,
|
|
240
240
|
R,
|
|
241
241
|
!1,
|
|
242
242
|
O ? Error("react-stack-top-frame") : v,
|
|
243
|
-
O ? Z(n(l)) :
|
|
243
|
+
O ? Z(n(l)) : oe
|
|
244
244
|
);
|
|
245
|
-
},
|
|
245
|
+
}, ae.jsxs = function(l, b, R) {
|
|
246
246
|
var O = 1e4 > z.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return u(
|
|
248
248
|
l,
|
|
249
|
-
|
|
249
|
+
b,
|
|
250
250
|
R,
|
|
251
251
|
!0,
|
|
252
252
|
O ? Error("react-stack-top-frame") : v,
|
|
253
|
-
O ? Z(n(l)) :
|
|
253
|
+
O ? Z(n(l)) : oe
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), ae;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var Xe;
|
|
259
|
+
function Zt() {
|
|
260
|
+
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? we.exports = Xt() : we.exports = Kt()), we.exports;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
const
|
|
264
|
-
refreshToken:
|
|
265
|
-
login:
|
|
266
|
-
logout:
|
|
267
|
-
register:
|
|
268
|
-
userDetails:
|
|
269
|
-
test:
|
|
270
|
-
},
|
|
262
|
+
var y = Zt();
|
|
263
|
+
const X = {
|
|
264
|
+
refreshToken: "auth/renew-token",
|
|
265
|
+
login: "auth/authenticate",
|
|
266
|
+
logout: "auth/terminate",
|
|
267
|
+
register: "auth/register",
|
|
268
|
+
userDetails: "auth/profile",
|
|
269
|
+
test: "/auth/test-endpoint"
|
|
270
|
+
}, Qt = "Registration successful! Please login.", er = "Registration failed. Please try again.", tr = "Login failed. Please try again.", rr = "Login successful!", Hn = "Logged out successfully.", nr = "Session expired. Please login again.", P = {
|
|
271
271
|
LOGIN: "Sign In",
|
|
272
272
|
SIGNUP: "Sign Up"
|
|
273
|
-
},
|
|
273
|
+
}, sr = "Signing in...", or = "Signing up...", wt = "Email", ir = "Password", ar = "User ID", cr = "Logout", Ae = "sessionExpired", Me = "true";
|
|
274
274
|
let yt = null;
|
|
275
|
-
function
|
|
275
|
+
function le(e) {
|
|
276
276
|
yt = e;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function lr() {
|
|
279
279
|
return yt;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function gt(e, t) {
|
|
282
282
|
return function() {
|
|
283
283
|
return e.apply(t, arguments);
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
const { toString:
|
|
287
|
-
const r =
|
|
286
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: He } = Object, { iterator: xe, toStringTag: St } = Symbol, Ne = /* @__PURE__ */ ((e) => (t) => {
|
|
287
|
+
const r = ur.call(t);
|
|
288
288
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
289
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Ne(t) === e), _e = (e) => (t) => typeof t === e, { isArray:
|
|
289
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Ne(t) === e), _e = (e) => (t) => typeof t === e, { isArray: te } = Array, ee = _e("undefined");
|
|
290
290
|
function fe(e) {
|
|
291
|
-
return e !== null && !
|
|
291
|
+
return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
292
292
|
}
|
|
293
|
-
const
|
|
294
|
-
function
|
|
293
|
+
const Rt = D("ArrayBuffer");
|
|
294
|
+
function fr(e) {
|
|
295
295
|
let t;
|
|
296
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
296
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rt(e.buffer), t;
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const dr = _e("string"), L = _e("function"), Ot = _e("number"), de = (e) => e !== null && typeof e == "object", hr = (e) => e === !0 || e === !1, Se = (e) => {
|
|
299
299
|
if (Ne(e) !== "object")
|
|
300
300
|
return !1;
|
|
301
|
-
const t =
|
|
302
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
303
|
-
},
|
|
301
|
+
const t = He(e);
|
|
302
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(St in e) && !(xe in e);
|
|
303
|
+
}, pr = (e) => {
|
|
304
304
|
if (!de(e) || fe(e))
|
|
305
305
|
return !1;
|
|
306
306
|
try {
|
|
@@ -308,16 +308,16 @@ const fr = _e("string"), L = _e("function"), Rt = _e("number"), de = (e) => e !=
|
|
|
308
308
|
} catch {
|
|
309
309
|
return !1;
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, mr = D("Date"), Er = D("File"), br = D("Blob"), wr = D("FileList"), yr = (e) => de(e) && L(e.pipe), gr = (e) => {
|
|
312
312
|
let t;
|
|
313
313
|
return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((t = Ne(e)) === "formdata" || // detect form-data instance
|
|
314
314
|
t === "object" && L(e.toString) && e.toString() === "[object FormData]"));
|
|
315
|
-
},
|
|
315
|
+
}, Sr = D("URLSearchParams"), [Rr, Or, Ar, Tr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), xr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
316
316
|
function he(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
317
317
|
if (e === null || typeof e > "u")
|
|
318
318
|
return;
|
|
319
319
|
let n, s;
|
|
320
|
-
if (typeof e != "object" && (e = [e]),
|
|
320
|
+
if (typeof e != "object" && (e = [e]), te(e))
|
|
321
321
|
for (n = 0, s = e.length; n < s; n++)
|
|
322
322
|
t.call(null, e[n], n, e);
|
|
323
323
|
else {
|
|
@@ -329,7 +329,7 @@ function he(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
|
329
329
|
c = i[n], t.call(null, e[c], c, e);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function At(e, t) {
|
|
333
333
|
if (fe(e))
|
|
334
334
|
return null;
|
|
335
335
|
t = t.toLowerCase();
|
|
@@ -340,46 +340,46 @@ function Ot(e, t) {
|
|
|
340
340
|
return s;
|
|
341
341
|
return null;
|
|
342
342
|
}
|
|
343
|
-
const V = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tt = (e) => !
|
|
343
|
+
const V = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tt = (e) => !ee(e) && e !== V;
|
|
344
344
|
function Fe() {
|
|
345
345
|
const { caseless: e, skipUndefined: t } = Tt(this) && this || {}, r = {}, n = (s, i) => {
|
|
346
|
-
const o = e &&
|
|
347
|
-
Se(r[o]) && Se(s) ? r[o] = Fe(r[o], s) : Se(s) ? r[o] = Fe({}, s) :
|
|
346
|
+
const o = e && At(r, i) || i;
|
|
347
|
+
Se(r[o]) && Se(s) ? r[o] = Fe(r[o], s) : Se(s) ? r[o] = Fe({}, s) : te(s) ? r[o] = s.slice() : (!t || !ee(s)) && (r[o] = s);
|
|
348
348
|
};
|
|
349
349
|
for (let s = 0, i = arguments.length; s < i; s++)
|
|
350
350
|
arguments[s] && he(arguments[s], n);
|
|
351
351
|
return r;
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
r && L(s) ? e[i] =
|
|
355
|
-
}, { allOwnKeys: n }), e),
|
|
353
|
+
const Nr = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
354
|
+
r && L(s) ? e[i] = gt(s, r) : e[i] = s;
|
|
355
|
+
}, { allOwnKeys: n }), e), _r = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Pr = (e, t, r, n) => {
|
|
356
356
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
357
357
|
value: t.prototype
|
|
358
358
|
}), r && Object.assign(e.prototype, r);
|
|
359
|
-
},
|
|
359
|
+
}, Cr = (e, t, r, n) => {
|
|
360
360
|
let s, i, o;
|
|
361
361
|
const c = {};
|
|
362
362
|
if (t = t || {}, e == null) return t;
|
|
363
363
|
do {
|
|
364
364
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
365
365
|
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
366
|
-
e = r !== !1 &&
|
|
366
|
+
e = r !== !1 && He(e);
|
|
367
367
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
368
368
|
return t;
|
|
369
|
-
},
|
|
369
|
+
}, kr = (e, t, r) => {
|
|
370
370
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
371
371
|
const n = e.indexOf(t, r);
|
|
372
372
|
return n !== -1 && n === r;
|
|
373
|
-
},
|
|
373
|
+
}, jr = (e) => {
|
|
374
374
|
if (!e) return null;
|
|
375
|
-
if (
|
|
375
|
+
if (te(e)) return e;
|
|
376
376
|
let t = e.length;
|
|
377
|
-
if (!
|
|
377
|
+
if (!Ot(t)) return null;
|
|
378
378
|
const r = new Array(t);
|
|
379
379
|
for (; t-- > 0; )
|
|
380
380
|
r[t] = e[t];
|
|
381
381
|
return r;
|
|
382
|
-
},
|
|
382
|
+
}, Lr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && He(Uint8Array)), Ur = (e, t) => {
|
|
383
383
|
const n = (e && e[xe]).call(e);
|
|
384
384
|
let s;
|
|
385
385
|
for (; (s = n.next()) && !s.done; ) {
|
|
@@ -392,19 +392,19 @@ const xr = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
392
392
|
for (; (r = e.exec(t)) !== null; )
|
|
393
393
|
n.push(r);
|
|
394
394
|
return n;
|
|
395
|
-
},
|
|
395
|
+
}, Fr = D("HTMLFormElement"), vr = (e) => e.toLowerCase().replace(
|
|
396
396
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
397
397
|
function(r, n, s) {
|
|
398
398
|
return n.toUpperCase() + s;
|
|
399
399
|
}
|
|
400
|
-
),
|
|
400
|
+
), Ke = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Dr = D("RegExp"), xt = (e, t) => {
|
|
401
401
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
402
402
|
he(r, (s, i) => {
|
|
403
403
|
let o;
|
|
404
404
|
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
405
405
|
}), Object.defineProperties(e, n);
|
|
406
|
-
},
|
|
407
|
-
|
|
406
|
+
}, Br = (e) => {
|
|
407
|
+
xt(e, (t, r) => {
|
|
408
408
|
if (L(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
409
409
|
return !1;
|
|
410
410
|
const n = e[r];
|
|
@@ -418,19 +418,19 @@ const xr = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
|
-
},
|
|
421
|
+
}, $r = (e, t) => {
|
|
422
422
|
const r = {}, n = (s) => {
|
|
423
423
|
s.forEach((i) => {
|
|
424
424
|
r[i] = !0;
|
|
425
425
|
});
|
|
426
426
|
};
|
|
427
|
-
return
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
function
|
|
431
|
-
return !!(e && L(e.append) && e[
|
|
427
|
+
return te(e) ? n(e) : n(String(e).split(t)), r;
|
|
428
|
+
}, qr = () => {
|
|
429
|
+
}, Mr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
430
|
+
function Hr(e) {
|
|
431
|
+
return !!(e && L(e.append) && e[St] === "FormData" && e[xe]);
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const zr = (e) => {
|
|
434
434
|
const t = new Array(10), r = (n, s) => {
|
|
435
435
|
if (de(n)) {
|
|
436
436
|
if (t.indexOf(n) >= 0)
|
|
@@ -439,87 +439,87 @@ const Hr = (e) => {
|
|
|
439
439
|
return n;
|
|
440
440
|
if (!("toJSON" in n)) {
|
|
441
441
|
t[s] = n;
|
|
442
|
-
const i =
|
|
442
|
+
const i = te(n) ? [] : {};
|
|
443
443
|
return he(n, (o, c) => {
|
|
444
444
|
const h = r(o, s + 1);
|
|
445
|
-
!
|
|
445
|
+
!ee(h) && (i[c] = h);
|
|
446
446
|
}), t[s] = void 0, i;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
return n;
|
|
450
450
|
};
|
|
451
451
|
return r(e, 0);
|
|
452
|
-
},
|
|
452
|
+
}, Gr = D("AsyncFunction"), Jr = (e) => e && (de(e) || L(e)) && L(e.then) && L(e.catch), Nt = ((e, t) => e ? setImmediate : t ? ((r, n) => (V.addEventListener("message", ({ source: s, data: i }) => {
|
|
453
453
|
s === V && i === r && n.length && n.shift()();
|
|
454
454
|
}, !1), (s) => {
|
|
455
455
|
n.push(s), V.postMessage(r, "*");
|
|
456
456
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
457
457
|
typeof setImmediate == "function",
|
|
458
458
|
L(V.postMessage)
|
|
459
|
-
),
|
|
460
|
-
isArray:
|
|
461
|
-
isArrayBuffer:
|
|
459
|
+
), Wr = typeof queueMicrotask < "u" ? queueMicrotask.bind(V) : typeof process < "u" && process.nextTick || Nt, Vr = (e) => e != null && L(e[xe]), a = {
|
|
460
|
+
isArray: te,
|
|
461
|
+
isArrayBuffer: Rt,
|
|
462
462
|
isBuffer: fe,
|
|
463
|
-
isFormData:
|
|
464
|
-
isArrayBufferView:
|
|
465
|
-
isString:
|
|
466
|
-
isNumber:
|
|
467
|
-
isBoolean:
|
|
463
|
+
isFormData: gr,
|
|
464
|
+
isArrayBufferView: fr,
|
|
465
|
+
isString: dr,
|
|
466
|
+
isNumber: Ot,
|
|
467
|
+
isBoolean: hr,
|
|
468
468
|
isObject: de,
|
|
469
469
|
isPlainObject: Se,
|
|
470
|
-
isEmptyObject:
|
|
471
|
-
isReadableStream:
|
|
472
|
-
isRequest:
|
|
473
|
-
isResponse:
|
|
470
|
+
isEmptyObject: pr,
|
|
471
|
+
isReadableStream: Rr,
|
|
472
|
+
isRequest: Or,
|
|
473
|
+
isResponse: Ar,
|
|
474
474
|
isHeaders: Tr,
|
|
475
|
-
isUndefined:
|
|
476
|
-
isDate:
|
|
477
|
-
isFile:
|
|
475
|
+
isUndefined: ee,
|
|
476
|
+
isDate: mr,
|
|
477
|
+
isFile: Er,
|
|
478
478
|
isBlob: br,
|
|
479
|
-
isRegExp:
|
|
479
|
+
isRegExp: Dr,
|
|
480
480
|
isFunction: L,
|
|
481
481
|
isStream: yr,
|
|
482
|
-
isURLSearchParams:
|
|
483
|
-
isTypedArray:
|
|
484
|
-
isFileList:
|
|
482
|
+
isURLSearchParams: Sr,
|
|
483
|
+
isTypedArray: Lr,
|
|
484
|
+
isFileList: wr,
|
|
485
485
|
forEach: he,
|
|
486
486
|
merge: Fe,
|
|
487
|
-
extend:
|
|
488
|
-
trim:
|
|
489
|
-
stripBOM:
|
|
490
|
-
inherits:
|
|
491
|
-
toFlatObject:
|
|
487
|
+
extend: Nr,
|
|
488
|
+
trim: xr,
|
|
489
|
+
stripBOM: _r,
|
|
490
|
+
inherits: Pr,
|
|
491
|
+
toFlatObject: Cr,
|
|
492
492
|
kindOf: Ne,
|
|
493
493
|
kindOfTest: D,
|
|
494
|
-
endsWith:
|
|
495
|
-
toArray:
|
|
496
|
-
forEachEntry:
|
|
494
|
+
endsWith: kr,
|
|
495
|
+
toArray: jr,
|
|
496
|
+
forEachEntry: Ur,
|
|
497
497
|
matchAll: Ir,
|
|
498
|
-
isHTMLForm:
|
|
499
|
-
hasOwnProperty:
|
|
500
|
-
hasOwnProp:
|
|
498
|
+
isHTMLForm: Fr,
|
|
499
|
+
hasOwnProperty: Ke,
|
|
500
|
+
hasOwnProp: Ke,
|
|
501
501
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
502
|
-
reduceDescriptors:
|
|
503
|
-
freezeMethods:
|
|
504
|
-
toObjectSet:
|
|
505
|
-
toCamelCase:
|
|
506
|
-
noop:
|
|
507
|
-
toFiniteNumber:
|
|
508
|
-
findKey:
|
|
502
|
+
reduceDescriptors: xt,
|
|
503
|
+
freezeMethods: Br,
|
|
504
|
+
toObjectSet: $r,
|
|
505
|
+
toCamelCase: vr,
|
|
506
|
+
noop: qr,
|
|
507
|
+
toFiniteNumber: Mr,
|
|
508
|
+
findKey: At,
|
|
509
509
|
global: V,
|
|
510
510
|
isContextDefined: Tt,
|
|
511
|
-
isSpecCompliantForm:
|
|
512
|
-
toJSONObject:
|
|
513
|
-
isAsyncFn:
|
|
514
|
-
isThenable:
|
|
515
|
-
setImmediate:
|
|
516
|
-
asap:
|
|
517
|
-
isIterable:
|
|
511
|
+
isSpecCompliantForm: Hr,
|
|
512
|
+
toJSONObject: zr,
|
|
513
|
+
isAsyncFn: Gr,
|
|
514
|
+
isThenable: Jr,
|
|
515
|
+
setImmediate: Nt,
|
|
516
|
+
asap: Wr,
|
|
517
|
+
isIterable: Vr
|
|
518
518
|
};
|
|
519
|
-
function
|
|
519
|
+
function w(e, t, r, n, s) {
|
|
520
520
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
521
521
|
}
|
|
522
|
-
a.inherits(
|
|
522
|
+
a.inherits(w, Error, {
|
|
523
523
|
toJSON: function() {
|
|
524
524
|
return {
|
|
525
525
|
// Standard
|
|
@@ -540,7 +540,7 @@ a.inherits(y, Error, {
|
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
542
|
});
|
|
543
|
-
const
|
|
543
|
+
const _t = w.prototype, Pt = {};
|
|
544
544
|
[
|
|
545
545
|
"ERR_BAD_OPTION_VALUE",
|
|
546
546
|
"ERR_BAD_OPTION",
|
|
@@ -556,34 +556,34 @@ const Nt = y.prototype, _t = {};
|
|
|
556
556
|
"ERR_INVALID_URL"
|
|
557
557
|
// eslint-disable-next-line func-names
|
|
558
558
|
].forEach((e) => {
|
|
559
|
-
|
|
559
|
+
Pt[e] = { value: e };
|
|
560
560
|
});
|
|
561
|
-
Object.defineProperties(
|
|
562
|
-
Object.defineProperty(
|
|
563
|
-
|
|
564
|
-
const o = Object.create(
|
|
561
|
+
Object.defineProperties(w, Pt);
|
|
562
|
+
Object.defineProperty(_t, "isAxiosError", { value: !0 });
|
|
563
|
+
w.from = (e, t, r, n, s, i) => {
|
|
564
|
+
const o = Object.create(_t);
|
|
565
565
|
a.toFlatObject(e, o, function(u) {
|
|
566
566
|
return u !== Error.prototype;
|
|
567
567
|
}, (f) => f !== "isAxiosError");
|
|
568
568
|
const c = e && e.message ? e.message : "Error", h = t == null && e ? e.code : t;
|
|
569
|
-
return
|
|
569
|
+
return w.call(o, c, h, r, n, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
|
|
570
570
|
};
|
|
571
|
-
const
|
|
571
|
+
const Yr = null;
|
|
572
572
|
function ve(e) {
|
|
573
573
|
return a.isPlainObject(e) || a.isArray(e);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Ct(e) {
|
|
576
576
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Ze(e, t, r) {
|
|
579
579
|
return e ? e.concat(t).map(function(s, i) {
|
|
580
|
-
return s =
|
|
580
|
+
return s = Ct(s), !r && i ? "[" + s + "]" : s;
|
|
581
581
|
}).join(r ? "." : "") : t;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Xr(e) {
|
|
584
584
|
return a.isArray(e) && !e.some(ve);
|
|
585
585
|
}
|
|
586
|
-
const
|
|
586
|
+
const Kr = a.toFlatObject(a, {}, null, function(t) {
|
|
587
587
|
return /^is[A-Z]/.test(t);
|
|
588
588
|
});
|
|
589
589
|
function Pe(e, t, r) {
|
|
@@ -593,8 +593,8 @@ function Pe(e, t, r) {
|
|
|
593
593
|
metaTokens: !0,
|
|
594
594
|
dots: !1,
|
|
595
595
|
indexes: !1
|
|
596
|
-
}, !1, function(
|
|
597
|
-
return !a.isUndefined(p[
|
|
596
|
+
}, !1, function(E, p) {
|
|
597
|
+
return !a.isUndefined(p[E]);
|
|
598
598
|
});
|
|
599
599
|
const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
600
600
|
if (!a.isFunction(s))
|
|
@@ -606,50 +606,50 @@ function Pe(e, t, r) {
|
|
|
606
606
|
if (a.isBoolean(d))
|
|
607
607
|
return d.toString();
|
|
608
608
|
if (!h && a.isBlob(d))
|
|
609
|
-
throw new
|
|
609
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
610
610
|
return a.isArrayBuffer(d) || a.isTypedArray(d) ? h && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
611
611
|
}
|
|
612
|
-
function u(d,
|
|
612
|
+
function u(d, E, p) {
|
|
613
613
|
let S = d;
|
|
614
614
|
if (d && !p && typeof d == "object") {
|
|
615
|
-
if (a.endsWith(
|
|
616
|
-
|
|
617
|
-
else if (a.isArray(d) &&
|
|
618
|
-
return
|
|
619
|
-
!(a.isUndefined(
|
|
615
|
+
if (a.endsWith(E, "{}"))
|
|
616
|
+
E = n ? E : E.slice(0, -2), d = JSON.stringify(d);
|
|
617
|
+
else if (a.isArray(d) && Xr(d) || (a.isFileList(d) || a.endsWith(E, "[]")) && (S = a.toArray(d)))
|
|
618
|
+
return E = Ct(E), S.forEach(function(T, C) {
|
|
619
|
+
!(a.isUndefined(T) || T === null) && t.append(
|
|
620
620
|
// eslint-disable-next-line no-nested-ternary
|
|
621
|
-
o === !0 ?
|
|
622
|
-
f(
|
|
621
|
+
o === !0 ? Ze([E], C, i) : o === null ? E : E + "[]",
|
|
622
|
+
f(T)
|
|
623
623
|
);
|
|
624
624
|
}), !1;
|
|
625
625
|
}
|
|
626
|
-
return ve(d) ? !0 : (t.append(
|
|
626
|
+
return ve(d) ? !0 : (t.append(Ze(p, E, i), f(d)), !1);
|
|
627
627
|
}
|
|
628
|
-
const m = [], g = Object.assign(
|
|
628
|
+
const m = [], g = Object.assign(Kr, {
|
|
629
629
|
defaultVisitor: u,
|
|
630
630
|
convertValue: f,
|
|
631
631
|
isVisitable: ve
|
|
632
632
|
});
|
|
633
|
-
function
|
|
633
|
+
function A(d, E) {
|
|
634
634
|
if (!a.isUndefined(d)) {
|
|
635
635
|
if (m.indexOf(d) !== -1)
|
|
636
|
-
throw Error("Circular reference detected in " +
|
|
636
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
637
637
|
m.push(d), a.forEach(d, function(S, N) {
|
|
638
638
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
639
639
|
t,
|
|
640
640
|
S,
|
|
641
641
|
a.isString(N) ? N.trim() : N,
|
|
642
|
-
|
|
642
|
+
E,
|
|
643
643
|
g
|
|
644
|
-
)) === !0 &&
|
|
644
|
+
)) === !0 && A(S, E ? E.concat(N) : [N]);
|
|
645
645
|
}), m.pop();
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
if (!a.isObject(e))
|
|
649
649
|
throw new TypeError("data must be an object");
|
|
650
|
-
return
|
|
650
|
+
return A(e), t;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function Qe(e) {
|
|
653
653
|
const t = {
|
|
654
654
|
"!": "%21",
|
|
655
655
|
"'": "%27",
|
|
@@ -663,40 +663,40 @@ function Ze(e) {
|
|
|
663
663
|
return t[n];
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function ze(e, t) {
|
|
667
667
|
this._pairs = [], e && Pe(e, this, t);
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
|
|
669
|
+
const kt = ze.prototype;
|
|
670
|
+
kt.append = function(t, r) {
|
|
671
671
|
this._pairs.push([t, r]);
|
|
672
672
|
};
|
|
673
|
-
|
|
673
|
+
kt.toString = function(t) {
|
|
674
674
|
const r = t ? function(n) {
|
|
675
|
-
return t.call(this, n,
|
|
676
|
-
} :
|
|
675
|
+
return t.call(this, n, Qe);
|
|
676
|
+
} : Qe;
|
|
677
677
|
return this._pairs.map(function(s) {
|
|
678
678
|
return r(s[0]) + "=" + r(s[1]);
|
|
679
679
|
}, "").join("&");
|
|
680
680
|
};
|
|
681
|
-
function
|
|
681
|
+
function Zr(e) {
|
|
682
682
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function jt(e, t, r) {
|
|
685
685
|
if (!t)
|
|
686
686
|
return e;
|
|
687
|
-
const n = r && r.encode ||
|
|
687
|
+
const n = r && r.encode || Zr;
|
|
688
688
|
a.isFunction(r) && (r = {
|
|
689
689
|
serialize: r
|
|
690
690
|
});
|
|
691
691
|
const s = r && r.serialize;
|
|
692
692
|
let i;
|
|
693
|
-
if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
693
|
+
if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new ze(t, r).toString(n), i) {
|
|
694
694
|
const o = e.indexOf("#");
|
|
695
695
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
696
696
|
}
|
|
697
697
|
return e;
|
|
698
698
|
}
|
|
699
|
-
class
|
|
699
|
+
class et {
|
|
700
700
|
constructor() {
|
|
701
701
|
this.handlers = [];
|
|
702
702
|
}
|
|
@@ -750,31 +750,31 @@ class Qe {
|
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
const
|
|
753
|
+
const Lt = {
|
|
754
754
|
silentJSONParsing: !0,
|
|
755
755
|
forcedJSONParsing: !0,
|
|
756
756
|
clarifyTimeoutError: !1
|
|
757
|
-
},
|
|
757
|
+
}, Qr = typeof URLSearchParams < "u" ? URLSearchParams : ze, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, rn = {
|
|
758
758
|
isBrowser: !0,
|
|
759
759
|
classes: {
|
|
760
|
-
URLSearchParams:
|
|
761
|
-
FormData:
|
|
762
|
-
Blob:
|
|
760
|
+
URLSearchParams: Qr,
|
|
761
|
+
FormData: en,
|
|
762
|
+
Blob: tn
|
|
763
763
|
},
|
|
764
764
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
765
|
-
},
|
|
766
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
765
|
+
}, Ge = typeof window < "u" && typeof document < "u", De = typeof navigator == "object" && navigator || void 0, nn = Ge && (!De || ["ReactNative", "NativeScript", "NS"].indexOf(De.product) < 0), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
766
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = Ge && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
767
767
|
__proto__: null,
|
|
768
|
-
hasBrowserEnv:
|
|
769
|
-
hasStandardBrowserEnv:
|
|
770
|
-
hasStandardBrowserWebWorkerEnv:
|
|
768
|
+
hasBrowserEnv: Ge,
|
|
769
|
+
hasStandardBrowserEnv: nn,
|
|
770
|
+
hasStandardBrowserWebWorkerEnv: sn,
|
|
771
771
|
navigator: De,
|
|
772
|
-
origin:
|
|
772
|
+
origin: on
|
|
773
773
|
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
774
|
-
...
|
|
775
|
-
...
|
|
774
|
+
...an,
|
|
775
|
+
...rn
|
|
776
776
|
};
|
|
777
|
-
function
|
|
777
|
+
function cn(e, t) {
|
|
778
778
|
return Pe(e, new k.classes.URLSearchParams(), {
|
|
779
779
|
visitor: function(r, n, s, i) {
|
|
780
780
|
return k.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -782,10 +782,10 @@ function an(e, t) {
|
|
|
782
782
|
...t
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function ln(e) {
|
|
786
786
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function un(e) {
|
|
789
789
|
const t = {}, r = Object.keys(e);
|
|
790
790
|
let n;
|
|
791
791
|
const s = r.length;
|
|
@@ -794,22 +794,22 @@ function ln(e) {
|
|
|
794
794
|
i = r[n], t[i] = e[i];
|
|
795
795
|
return t;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Ut(e) {
|
|
798
798
|
function t(r, n, s, i) {
|
|
799
799
|
let o = r[i++];
|
|
800
800
|
if (o === "__proto__") return !0;
|
|
801
801
|
const c = Number.isFinite(+o), h = i >= r.length;
|
|
802
|
-
return o = !o && a.isArray(s) ? s.length : o, h ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
802
|
+
return o = !o && a.isArray(s) ? s.length : o, h ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = un(s[o])), !c);
|
|
803
803
|
}
|
|
804
804
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
805
805
|
const r = {};
|
|
806
806
|
return a.forEachEntry(e, (n, s) => {
|
|
807
|
-
t(
|
|
807
|
+
t(ln(n), s, r, 0);
|
|
808
808
|
}), r;
|
|
809
809
|
}
|
|
810
810
|
return null;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function fn(e, t, r) {
|
|
813
813
|
if (a.isString(e))
|
|
814
814
|
try {
|
|
815
815
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -820,12 +820,12 @@ function un(e, t, r) {
|
|
|
820
820
|
return (r || JSON.stringify)(e);
|
|
821
821
|
}
|
|
822
822
|
const pe = {
|
|
823
|
-
transitional:
|
|
823
|
+
transitional: Lt,
|
|
824
824
|
adapter: ["xhr", "http", "fetch"],
|
|
825
825
|
transformRequest: [function(t, r) {
|
|
826
826
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(t);
|
|
827
827
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
828
|
-
return s ? JSON.stringify(
|
|
828
|
+
return s ? JSON.stringify(Ut(t)) : t;
|
|
829
829
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
830
830
|
return t;
|
|
831
831
|
if (a.isArrayBufferView(t))
|
|
@@ -835,7 +835,7 @@ const pe = {
|
|
|
835
835
|
let c;
|
|
836
836
|
if (i) {
|
|
837
837
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
838
|
-
return
|
|
838
|
+
return cn(t, this.formSerializer).toString();
|
|
839
839
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
840
840
|
const h = this.env && this.env.FormData;
|
|
841
841
|
return Pe(
|
|
@@ -845,7 +845,7 @@ const pe = {
|
|
|
845
845
|
);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
848
|
+
return i || s ? (r.setContentType("application/json", !1), fn(t)) : t;
|
|
849
849
|
}],
|
|
850
850
|
transformResponse: [function(t) {
|
|
851
851
|
const r = this.transitional || pe.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -857,7 +857,7 @@ const pe = {
|
|
|
857
857
|
return JSON.parse(t, this.parseReviver);
|
|
858
858
|
} catch (c) {
|
|
859
859
|
if (o)
|
|
860
|
-
throw c.name === "SyntaxError" ?
|
|
860
|
+
throw c.name === "SyntaxError" ? w.from(c, w.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
return t;
|
|
@@ -888,7 +888,7 @@ const pe = {
|
|
|
888
888
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
889
889
|
pe.headers[e] = {};
|
|
890
890
|
});
|
|
891
|
-
const
|
|
891
|
+
const dn = a.toObjectSet([
|
|
892
892
|
"age",
|
|
893
893
|
"authorization",
|
|
894
894
|
"content-length",
|
|
@@ -906,28 +906,28 @@ const fn = a.toObjectSet([
|
|
|
906
906
|
"referer",
|
|
907
907
|
"retry-after",
|
|
908
908
|
"user-agent"
|
|
909
|
-
]),
|
|
909
|
+
]), hn = (e) => {
|
|
910
910
|
const t = {};
|
|
911
911
|
let r, n, s;
|
|
912
912
|
return e && e.split(`
|
|
913
913
|
`).forEach(function(o) {
|
|
914
|
-
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] &&
|
|
914
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && dn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
915
915
|
}), t;
|
|
916
|
-
},
|
|
917
|
-
function
|
|
916
|
+
}, tt = Symbol("internals");
|
|
917
|
+
function ce(e) {
|
|
918
918
|
return e && String(e).trim().toLowerCase();
|
|
919
919
|
}
|
|
920
920
|
function Re(e) {
|
|
921
921
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Re) : String(e);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function pn(e) {
|
|
924
924
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
925
925
|
let n;
|
|
926
926
|
for (; n = r.exec(e); )
|
|
927
927
|
t[n[1]] = n[2];
|
|
928
928
|
return t;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
931
931
|
function Le(e, t, r, n, s) {
|
|
932
932
|
if (a.isFunction(n))
|
|
933
933
|
return n.call(this, t, r);
|
|
@@ -938,7 +938,7 @@ function Le(e, t, r, n, s) {
|
|
|
938
938
|
return n.test(t);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function En(e) {
|
|
942
942
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
943
943
|
}
|
|
944
944
|
function bn(e, t) {
|
|
@@ -952,14 +952,14 @@ function bn(e, t) {
|
|
|
952
952
|
});
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
|
-
let
|
|
955
|
+
let U = class {
|
|
956
956
|
constructor(t) {
|
|
957
957
|
t && this.set(t);
|
|
958
958
|
}
|
|
959
959
|
set(t, r, n) {
|
|
960
960
|
const s = this;
|
|
961
961
|
function i(c, h, f) {
|
|
962
|
-
const u =
|
|
962
|
+
const u = ce(h);
|
|
963
963
|
if (!u)
|
|
964
964
|
throw new Error("header name must be a non-empty string");
|
|
965
965
|
const m = a.findKey(s, u);
|
|
@@ -968,8 +968,8 @@ let I = class {
|
|
|
968
968
|
const o = (c, h) => a.forEach(c, (f, u) => i(f, u, h));
|
|
969
969
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
970
970
|
o(t, r);
|
|
971
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
972
|
-
o(
|
|
971
|
+
else if (a.isString(t) && (t = t.trim()) && !mn(t))
|
|
972
|
+
o(hn(t), r);
|
|
973
973
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
974
974
|
let c = {}, h, f;
|
|
975
975
|
for (const u of t) {
|
|
@@ -983,14 +983,14 @@ let I = class {
|
|
|
983
983
|
return this;
|
|
984
984
|
}
|
|
985
985
|
get(t, r) {
|
|
986
|
-
if (t =
|
|
986
|
+
if (t = ce(t), t) {
|
|
987
987
|
const n = a.findKey(this, t);
|
|
988
988
|
if (n) {
|
|
989
989
|
const s = this[n];
|
|
990
990
|
if (!r)
|
|
991
991
|
return s;
|
|
992
992
|
if (r === !0)
|
|
993
|
-
return
|
|
993
|
+
return pn(s);
|
|
994
994
|
if (a.isFunction(r))
|
|
995
995
|
return r.call(this, s, n);
|
|
996
996
|
if (a.isRegExp(r))
|
|
@@ -1000,7 +1000,7 @@ let I = class {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
has(t, r) {
|
|
1003
|
-
if (t =
|
|
1003
|
+
if (t = ce(t), t) {
|
|
1004
1004
|
const n = a.findKey(this, t);
|
|
1005
1005
|
return !!(n && this[n] !== void 0 && (!r || Le(this, this[n], n, r)));
|
|
1006
1006
|
}
|
|
@@ -1010,7 +1010,7 @@ let I = class {
|
|
|
1010
1010
|
const n = this;
|
|
1011
1011
|
let s = !1;
|
|
1012
1012
|
function i(o) {
|
|
1013
|
-
if (o =
|
|
1013
|
+
if (o = ce(o), o) {
|
|
1014
1014
|
const c = a.findKey(n, o);
|
|
1015
1015
|
c && (!r || Le(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
1016
1016
|
}
|
|
@@ -1034,7 +1034,7 @@ let I = class {
|
|
|
1034
1034
|
r[o] = Re(s), delete r[i];
|
|
1035
1035
|
return;
|
|
1036
1036
|
}
|
|
1037
|
-
const c = t ?
|
|
1037
|
+
const c = t ? En(i) : String(i).trim();
|
|
1038
1038
|
c !== i && delete r[i], r[c] = Re(s), n[c] = !0;
|
|
1039
1039
|
}), this;
|
|
1040
1040
|
}
|
|
@@ -1068,18 +1068,18 @@ let I = class {
|
|
|
1068
1068
|
return r.forEach((s) => n.set(s)), n;
|
|
1069
1069
|
}
|
|
1070
1070
|
static accessor(t) {
|
|
1071
|
-
const n = (this[
|
|
1071
|
+
const n = (this[tt] = this[tt] = {
|
|
1072
1072
|
accessors: {}
|
|
1073
1073
|
}).accessors, s = this.prototype;
|
|
1074
1074
|
function i(o) {
|
|
1075
|
-
const c =
|
|
1075
|
+
const c = ce(o);
|
|
1076
1076
|
n[c] || (bn(s, o), n[c] = !0);
|
|
1077
1077
|
}
|
|
1078
1078
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1079
1079
|
}
|
|
1080
1080
|
};
|
|
1081
|
-
|
|
1082
|
-
a.reduceDescriptors(
|
|
1081
|
+
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1082
|
+
a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
1083
1083
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
1084
1084
|
return {
|
|
1085
1085
|
get: () => e,
|
|
@@ -1088,9 +1088,9 @@ a.reduceDescriptors(I.prototype, ({ value: e }, t) => {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
};
|
|
1090
1090
|
});
|
|
1091
|
-
a.freezeMethods(
|
|
1092
|
-
function
|
|
1093
|
-
const r = this || pe, n = t || r, s =
|
|
1091
|
+
a.freezeMethods(U);
|
|
1092
|
+
function Ue(e, t) {
|
|
1093
|
+
const r = this || pe, n = t || r, s = U.from(n.headers);
|
|
1094
1094
|
let i = n.data;
|
|
1095
1095
|
return a.forEach(e, function(c) {
|
|
1096
1096
|
i = c.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
@@ -1099,23 +1099,23 @@ function Ie(e, t) {
|
|
|
1099
1099
|
function It(e) {
|
|
1100
1100
|
return !!(e && e.__CANCEL__);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
|
|
1102
|
+
function re(e, t, r) {
|
|
1103
|
+
w.call(this, e ?? "canceled", w.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1104
1104
|
}
|
|
1105
|
-
a.inherits(
|
|
1105
|
+
a.inherits(re, w, {
|
|
1106
1106
|
__CANCEL__: !0
|
|
1107
1107
|
});
|
|
1108
|
-
function
|
|
1108
|
+
function Ft(e, t, r) {
|
|
1109
1109
|
const n = r.config.validateStatus;
|
|
1110
|
-
!r.status || !n || n(r.status) ? e(r) : t(new
|
|
1110
|
+
!r.status || !n || n(r.status) ? e(r) : t(new w(
|
|
1111
1111
|
"Request failed with status code " + r.status,
|
|
1112
|
-
[
|
|
1112
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1113
1113
|
r.config,
|
|
1114
1114
|
r.request,
|
|
1115
1115
|
r
|
|
1116
1116
|
));
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function wn(e) {
|
|
1119
1119
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1120
1120
|
return t && t[1] || "";
|
|
1121
1121
|
}
|
|
@@ -1131,11 +1131,11 @@ function yn(e, t) {
|
|
|
1131
1131
|
g += r[m++], m = m % e;
|
|
1132
1132
|
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - o < t)
|
|
1133
1133
|
return;
|
|
1134
|
-
const
|
|
1135
|
-
return
|
|
1134
|
+
const A = u && f - u;
|
|
1135
|
+
return A ? Math.round(g * 1e3 / A) : void 0;
|
|
1136
1136
|
};
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function gn(e, t) {
|
|
1139
1139
|
let r = 0, n = 1e3 / t, s, i;
|
|
1140
1140
|
const o = (f, u = Date.now()) => {
|
|
1141
1141
|
r = u, s = null, i && (clearTimeout(i), i = null), e(...f);
|
|
@@ -1147,10 +1147,10 @@ function wn(e, t) {
|
|
|
1147
1147
|
}, n - m)));
|
|
1148
1148
|
}, () => s && o(s)];
|
|
1149
1149
|
}
|
|
1150
|
-
const
|
|
1150
|
+
const Te = (e, t, r = 3) => {
|
|
1151
1151
|
let n = 0;
|
|
1152
1152
|
const s = yn(50, 250);
|
|
1153
|
-
return
|
|
1153
|
+
return gn((i) => {
|
|
1154
1154
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, h = o - n, f = s(h), u = o <= c;
|
|
1155
1155
|
n = o;
|
|
1156
1156
|
const m = {
|
|
@@ -1166,17 +1166,17 @@ const Ae = (e, t, r = 3) => {
|
|
|
1166
1166
|
};
|
|
1167
1167
|
e(m);
|
|
1168
1168
|
}, r);
|
|
1169
|
-
},
|
|
1169
|
+
}, rt = (e, t) => {
|
|
1170
1170
|
const r = e != null;
|
|
1171
1171
|
return [(n) => t[0]({
|
|
1172
1172
|
lengthComputable: r,
|
|
1173
1173
|
total: e,
|
|
1174
1174
|
loaded: n
|
|
1175
1175
|
}), t[1]];
|
|
1176
|
-
},
|
|
1176
|
+
}, nt = (e) => (...t) => a.asap(() => e(...t)), Sn = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, k.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
1177
1177
|
new URL(k.origin),
|
|
1178
1178
|
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
1179
|
-
) : () => !0,
|
|
1179
|
+
) : () => !0, Rn = k.hasStandardBrowserEnv ? (
|
|
1180
1180
|
// Standard browser envs support document.cookie
|
|
1181
1181
|
{
|
|
1182
1182
|
write(e, t, r, n, s, i, o) {
|
|
@@ -1205,17 +1205,17 @@ const Ae = (e, t, r = 3) => {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
1207
|
);
|
|
1208
|
-
function
|
|
1208
|
+
function On(e) {
|
|
1209
1209
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function An(e, t) {
|
|
1212
1212
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1215
|
-
let n = !
|
|
1216
|
-
return e && (n || r == !1) ?
|
|
1214
|
+
function vt(e, t, r) {
|
|
1215
|
+
let n = !On(t);
|
|
1216
|
+
return e && (n || r == !1) ? An(e, t) : t;
|
|
1217
1217
|
}
|
|
1218
|
-
const
|
|
1218
|
+
const st = (e) => e instanceof U ? { ...e } : e;
|
|
1219
1219
|
function K(e, t) {
|
|
1220
1220
|
t = t || {};
|
|
1221
1221
|
const r = {};
|
|
@@ -1273,17 +1273,17 @@ function K(e, t) {
|
|
|
1273
1273
|
socketPath: o,
|
|
1274
1274
|
responseEncoding: o,
|
|
1275
1275
|
validateStatus: c,
|
|
1276
|
-
headers: (f, u, m) => s(
|
|
1276
|
+
headers: (f, u, m) => s(st(f), st(u), m, !0)
|
|
1277
1277
|
};
|
|
1278
1278
|
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1279
1279
|
const m = h[u] || s, g = m(e[u], t[u], u);
|
|
1280
1280
|
a.isUndefined(g) && m !== c || (r[u] = g);
|
|
1281
1281
|
}), r;
|
|
1282
1282
|
}
|
|
1283
|
-
const
|
|
1283
|
+
const Dt = (e) => {
|
|
1284
1284
|
const t = K({}, e);
|
|
1285
1285
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1286
|
-
if (t.headers = o =
|
|
1286
|
+
if (t.headers = o = U.from(o), t.url = jt(vt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1287
1287
|
"Authorization",
|
|
1288
1288
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1289
1289
|
), a.isFormData(r)) {
|
|
@@ -1296,70 +1296,70 @@ const vt = (e) => {
|
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
|
-
if (k.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 &&
|
|
1300
|
-
const h = s && i &&
|
|
1299
|
+
if (k.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && Sn(t.url))) {
|
|
1300
|
+
const h = s && i && Rn.read(i);
|
|
1301
1301
|
h && o.set(s, h);
|
|
1302
1302
|
}
|
|
1303
1303
|
return t;
|
|
1304
|
-
}, Tn = typeof XMLHttpRequest < "u",
|
|
1304
|
+
}, Tn = typeof XMLHttpRequest < "u", xn = Tn && function(e) {
|
|
1305
1305
|
return new Promise(function(r, n) {
|
|
1306
|
-
const s =
|
|
1306
|
+
const s = Dt(e);
|
|
1307
1307
|
let i = s.data;
|
|
1308
|
-
const o =
|
|
1309
|
-
let { responseType: c, onUploadProgress: h, onDownloadProgress: f } = s, u, m, g,
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1308
|
+
const o = U.from(s.headers).normalize();
|
|
1309
|
+
let { responseType: c, onUploadProgress: h, onDownloadProgress: f } = s, u, m, g, A, d;
|
|
1310
|
+
function E() {
|
|
1311
|
+
A && A(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1312
1312
|
}
|
|
1313
1313
|
let p = new XMLHttpRequest();
|
|
1314
1314
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1315
1315
|
function S() {
|
|
1316
1316
|
if (!p)
|
|
1317
1317
|
return;
|
|
1318
|
-
const
|
|
1318
|
+
const T = U.from(
|
|
1319
1319
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1320
|
-
),
|
|
1320
|
+
), I = {
|
|
1321
1321
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1322
1322
|
status: p.status,
|
|
1323
1323
|
statusText: p.statusText,
|
|
1324
|
-
headers:
|
|
1324
|
+
headers: T,
|
|
1325
1325
|
config: e,
|
|
1326
1326
|
request: p
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1329
|
-
r(j),
|
|
1328
|
+
Ft(function(j) {
|
|
1329
|
+
r(j), E();
|
|
1330
1330
|
}, function(j) {
|
|
1331
|
-
n(j),
|
|
1332
|
-
},
|
|
1331
|
+
n(j), E();
|
|
1332
|
+
}, I), p = null;
|
|
1333
1333
|
}
|
|
1334
1334
|
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1335
1335
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1336
1336
|
}, p.onabort = function() {
|
|
1337
|
-
p && (n(new
|
|
1337
|
+
p && (n(new w("Request aborted", w.ECONNABORTED, e, p)), p = null);
|
|
1338
1338
|
}, p.onerror = function(C) {
|
|
1339
|
-
const
|
|
1339
|
+
const I = C && C.message ? C.message : "Network Error", $ = new w(I, w.ERR_NETWORK, e, p);
|
|
1340
1340
|
$.event = C || null, n($), p = null;
|
|
1341
1341
|
}, p.ontimeout = function() {
|
|
1342
1342
|
let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1343
|
-
const
|
|
1344
|
-
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new
|
|
1343
|
+
const I = s.transitional || Lt;
|
|
1344
|
+
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new w(
|
|
1345
1345
|
C,
|
|
1346
|
-
|
|
1346
|
+
I.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1347
1347
|
e,
|
|
1348
1348
|
p
|
|
1349
1349
|
)), p = null;
|
|
1350
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(C,
|
|
1351
|
-
p.setRequestHeader(
|
|
1352
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), f && ([g, d] =
|
|
1353
|
-
p && (n(!
|
|
1350
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(C, I) {
|
|
1351
|
+
p.setRequestHeader(I, C);
|
|
1352
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), f && ([g, d] = Te(f, !0), p.addEventListener("progress", g)), h && p.upload && ([m, A] = Te(h), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", A)), (s.cancelToken || s.signal) && (u = (T) => {
|
|
1353
|
+
p && (n(!T || T.type ? new re(null, e, p) : T), p.abort(), p = null);
|
|
1354
1354
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1355
|
-
const N =
|
|
1355
|
+
const N = wn(s.url);
|
|
1356
1356
|
if (N && k.protocols.indexOf(N) === -1) {
|
|
1357
|
-
n(new
|
|
1357
|
+
n(new w("Unsupported protocol " + N + ":", w.ERR_BAD_REQUEST, e));
|
|
1358
1358
|
return;
|
|
1359
1359
|
}
|
|
1360
1360
|
p.send(i || null);
|
|
1361
1361
|
});
|
|
1362
|
-
},
|
|
1362
|
+
}, Nn = (e, t) => {
|
|
1363
1363
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1364
1364
|
if (t || r) {
|
|
1365
1365
|
let n = new AbortController(), s;
|
|
@@ -1367,11 +1367,11 @@ const vt = (e) => {
|
|
|
1367
1367
|
if (!s) {
|
|
1368
1368
|
s = !0, c();
|
|
1369
1369
|
const u = f instanceof Error ? f : this.reason;
|
|
1370
|
-
n.abort(u instanceof
|
|
1370
|
+
n.abort(u instanceof w ? u : new re(u instanceof Error ? u.message : u));
|
|
1371
1371
|
}
|
|
1372
1372
|
};
|
|
1373
1373
|
let o = t && setTimeout(() => {
|
|
1374
|
-
o = null, i(new
|
|
1374
|
+
o = null, i(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT));
|
|
1375
1375
|
}, t);
|
|
1376
1376
|
const c = () => {
|
|
1377
1377
|
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
@@ -1382,7 +1382,7 @@ const vt = (e) => {
|
|
|
1382
1382
|
const { signal: h } = n;
|
|
1383
1383
|
return h.unsubscribe = () => a.asap(c), h;
|
|
1384
1384
|
}
|
|
1385
|
-
},
|
|
1385
|
+
}, _n = function* (e, t) {
|
|
1386
1386
|
let r = e.byteLength;
|
|
1387
1387
|
if (r < t) {
|
|
1388
1388
|
yield e;
|
|
@@ -1391,10 +1391,10 @@ const vt = (e) => {
|
|
|
1391
1391
|
let n = 0, s;
|
|
1392
1392
|
for (; n < r; )
|
|
1393
1393
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1394
|
-
},
|
|
1395
|
-
for await (const r of
|
|
1396
|
-
yield*
|
|
1397
|
-
},
|
|
1394
|
+
}, Pn = async function* (e, t) {
|
|
1395
|
+
for await (const r of Cn(e))
|
|
1396
|
+
yield* _n(r, t);
|
|
1397
|
+
}, Cn = async function* (e) {
|
|
1398
1398
|
if (e[Symbol.asyncIterator]) {
|
|
1399
1399
|
yield* e;
|
|
1400
1400
|
return;
|
|
@@ -1410,8 +1410,8 @@ const vt = (e) => {
|
|
|
1410
1410
|
} finally {
|
|
1411
1411
|
await t.cancel();
|
|
1412
1412
|
}
|
|
1413
|
-
},
|
|
1414
|
-
const s =
|
|
1413
|
+
}, ot = (e, t, r, n) => {
|
|
1414
|
+
const s = Pn(e, t);
|
|
1415
1415
|
let i = 0, o, c = (h) => {
|
|
1416
1416
|
o || (o = !0, n && n(h));
|
|
1417
1417
|
};
|
|
@@ -1439,44 +1439,44 @@ const vt = (e) => {
|
|
|
1439
1439
|
}, {
|
|
1440
1440
|
highWaterMark: 2
|
|
1441
1441
|
});
|
|
1442
|
-
},
|
|
1442
|
+
}, it = 64 * 1024, { isFunction: ye } = a, kn = (({ Request: e, Response: t }) => ({
|
|
1443
1443
|
Request: e,
|
|
1444
1444
|
Response: t
|
|
1445
1445
|
}))(a.global), {
|
|
1446
|
-
ReadableStream:
|
|
1447
|
-
TextEncoder:
|
|
1448
|
-
} = a.global,
|
|
1446
|
+
ReadableStream: at,
|
|
1447
|
+
TextEncoder: ct
|
|
1448
|
+
} = a.global, lt = (e, ...t) => {
|
|
1449
1449
|
try {
|
|
1450
1450
|
return !!e(...t);
|
|
1451
1451
|
} catch {
|
|
1452
1452
|
return !1;
|
|
1453
1453
|
}
|
|
1454
|
-
},
|
|
1454
|
+
}, jn = (e) => {
|
|
1455
1455
|
e = a.merge.call({
|
|
1456
1456
|
skipUndefined: !0
|
|
1457
|
-
},
|
|
1458
|
-
const { fetch: t, Request: r, Response: n } = e, s = t ?
|
|
1457
|
+
}, kn, e);
|
|
1458
|
+
const { fetch: t, Request: r, Response: n } = e, s = t ? ye(t) : typeof fetch == "function", i = ye(r), o = ye(n);
|
|
1459
1459
|
if (!s)
|
|
1460
1460
|
return !1;
|
|
1461
|
-
const c = s &&
|
|
1461
|
+
const c = s && ye(at), h = s && (typeof ct == "function" ? /* @__PURE__ */ ((d) => (E) => d.encode(E))(new ct()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), f = i && c && lt(() => {
|
|
1462
1462
|
let d = !1;
|
|
1463
|
-
const
|
|
1464
|
-
body: new
|
|
1463
|
+
const E = new r(k.origin, {
|
|
1464
|
+
body: new at(),
|
|
1465
1465
|
method: "POST",
|
|
1466
1466
|
get duplex() {
|
|
1467
1467
|
return d = !0, "half";
|
|
1468
1468
|
}
|
|
1469
1469
|
}).headers.has("Content-Type");
|
|
1470
|
-
return d && !
|
|
1471
|
-
}), u = o && c &&
|
|
1470
|
+
return d && !E;
|
|
1471
|
+
}), u = o && c && lt(() => a.isReadableStream(new n("").body)), m = {
|
|
1472
1472
|
stream: u && ((d) => d.body)
|
|
1473
1473
|
};
|
|
1474
1474
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1475
|
-
!m[d] && (m[d] = (
|
|
1476
|
-
let S =
|
|
1475
|
+
!m[d] && (m[d] = (E, p) => {
|
|
1476
|
+
let S = E && E[d];
|
|
1477
1477
|
if (S)
|
|
1478
|
-
return S.call(
|
|
1479
|
-
throw new
|
|
1478
|
+
return S.call(E);
|
|
1479
|
+
throw new w(`Response type '${d}' is not supported`, w.ERR_NOT_SUPPORT, p);
|
|
1480
1480
|
});
|
|
1481
1481
|
});
|
|
1482
1482
|
const g = async (d) => {
|
|
@@ -1493,81 +1493,81 @@ const vt = (e) => {
|
|
|
1493
1493
|
return d.byteLength;
|
|
1494
1494
|
if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
|
|
1495
1495
|
return (await h(d)).byteLength;
|
|
1496
|
-
},
|
|
1496
|
+
}, A = async (d, E) => {
|
|
1497
1497
|
const p = a.toFiniteNumber(d.getContentLength());
|
|
1498
|
-
return p ?? g(
|
|
1498
|
+
return p ?? g(E);
|
|
1499
1499
|
};
|
|
1500
1500
|
return async (d) => {
|
|
1501
1501
|
let {
|
|
1502
|
-
url:
|
|
1502
|
+
url: E,
|
|
1503
1503
|
method: p,
|
|
1504
1504
|
data: S,
|
|
1505
1505
|
signal: N,
|
|
1506
|
-
cancelToken:
|
|
1506
|
+
cancelToken: T,
|
|
1507
1507
|
timeout: C,
|
|
1508
|
-
onDownloadProgress:
|
|
1508
|
+
onDownloadProgress: I,
|
|
1509
1509
|
onUploadProgress: $,
|
|
1510
1510
|
responseType: j,
|
|
1511
|
-
headers:
|
|
1511
|
+
headers: ne,
|
|
1512
1512
|
withCredentials: H = "same-origin",
|
|
1513
1513
|
fetchOptions: me
|
|
1514
|
-
} =
|
|
1514
|
+
} = Dt(d), Ee = t || fetch;
|
|
1515
1515
|
j = j ? (j + "").toLowerCase() : "text";
|
|
1516
|
-
let z =
|
|
1516
|
+
let z = Nn([N, T && T.toAbortSignal()], C), G = null;
|
|
1517
1517
|
const q = z && z.unsubscribe && (() => {
|
|
1518
1518
|
z.unsubscribe();
|
|
1519
1519
|
});
|
|
1520
1520
|
let Z;
|
|
1521
1521
|
try {
|
|
1522
|
-
if ($ && f && p !== "get" && p !== "head" && (Z = await
|
|
1523
|
-
let l = new r(
|
|
1522
|
+
if ($ && f && p !== "get" && p !== "head" && (Z = await A(ne, S)) !== 0) {
|
|
1523
|
+
let l = new r(E, {
|
|
1524
1524
|
method: "POST",
|
|
1525
1525
|
body: S,
|
|
1526
1526
|
duplex: "half"
|
|
1527
|
-
}),
|
|
1528
|
-
if (a.isFormData(S) && (
|
|
1529
|
-
const [R, O] =
|
|
1527
|
+
}), b;
|
|
1528
|
+
if (a.isFormData(S) && (b = l.headers.get("content-type")) && ne.setContentType(b), l.body) {
|
|
1529
|
+
const [R, O] = rt(
|
|
1530
1530
|
Z,
|
|
1531
|
-
|
|
1531
|
+
Te(nt($))
|
|
1532
1532
|
);
|
|
1533
|
-
S =
|
|
1533
|
+
S = ot(l.body, it, R, O);
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
a.isString(H) || (H = H ? "include" : "omit");
|
|
1537
|
-
const F = i && "credentials" in r.prototype,
|
|
1537
|
+
const F = i && "credentials" in r.prototype, se = {
|
|
1538
1538
|
...me,
|
|
1539
1539
|
signal: z,
|
|
1540
1540
|
method: p.toUpperCase(),
|
|
1541
|
-
headers:
|
|
1541
|
+
headers: ne.normalize().toJSON(),
|
|
1542
1542
|
body: S,
|
|
1543
1543
|
duplex: "half",
|
|
1544
1544
|
credentials: F ? H : void 0
|
|
1545
1545
|
};
|
|
1546
|
-
G = i && new r(
|
|
1547
|
-
let v = await (i ?
|
|
1548
|
-
const
|
|
1549
|
-
if (u && (
|
|
1546
|
+
G = i && new r(E, se);
|
|
1547
|
+
let v = await (i ? Ee(G, me) : Ee(E, se));
|
|
1548
|
+
const oe = u && (j === "stream" || j === "response");
|
|
1549
|
+
if (u && (I || oe && q)) {
|
|
1550
1550
|
const l = {};
|
|
1551
1551
|
["status", "statusText", "headers"].forEach((W) => {
|
|
1552
1552
|
l[W] = v[W];
|
|
1553
1553
|
});
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
|
|
1554
|
+
const b = a.toFiniteNumber(v.headers.get("content-length")), [R, O] = I && rt(
|
|
1555
|
+
b,
|
|
1556
|
+
Te(nt(I), !0)
|
|
1557
1557
|
) || [];
|
|
1558
1558
|
v = new n(
|
|
1559
|
-
|
|
1559
|
+
ot(v.body, it, R, () => {
|
|
1560
1560
|
O && O(), q && q();
|
|
1561
1561
|
}),
|
|
1562
1562
|
l
|
|
1563
1563
|
);
|
|
1564
1564
|
}
|
|
1565
1565
|
j = j || "text";
|
|
1566
|
-
let
|
|
1567
|
-
return !
|
|
1568
|
-
|
|
1569
|
-
data:
|
|
1570
|
-
headers:
|
|
1566
|
+
let be = await m[a.findKey(m, j) || "text"](v, d);
|
|
1567
|
+
return !oe && q && q(), await new Promise((l, b) => {
|
|
1568
|
+
Ft(l, b, {
|
|
1569
|
+
data: be,
|
|
1570
|
+
headers: U.from(v.headers),
|
|
1571
1571
|
status: v.status,
|
|
1572
1572
|
statusText: v.statusText,
|
|
1573
1573
|
config: d,
|
|
@@ -1576,34 +1576,34 @@ const vt = (e) => {
|
|
|
1576
1576
|
});
|
|
1577
1577
|
} catch (F) {
|
|
1578
1578
|
throw q && q(), F && F.name === "TypeError" && /Load failed|fetch/i.test(F.message) ? Object.assign(
|
|
1579
|
-
new
|
|
1579
|
+
new w("Network Error", w.ERR_NETWORK, d, G),
|
|
1580
1580
|
{
|
|
1581
1581
|
cause: F.cause || F
|
|
1582
1582
|
}
|
|
1583
|
-
) :
|
|
1583
|
+
) : w.from(F, F && F.code, d, G);
|
|
1584
1584
|
}
|
|
1585
1585
|
};
|
|
1586
|
-
},
|
|
1586
|
+
}, Ln = /* @__PURE__ */ new Map(), Bt = (e) => {
|
|
1587
1587
|
let t = e && e.env || {};
|
|
1588
1588
|
const { fetch: r, Request: n, Response: s } = t, i = [
|
|
1589
1589
|
n,
|
|
1590
1590
|
s,
|
|
1591
1591
|
r
|
|
1592
1592
|
];
|
|
1593
|
-
let o = i.length, c = o, h, f, u =
|
|
1593
|
+
let o = i.length, c = o, h, f, u = Ln;
|
|
1594
1594
|
for (; c--; )
|
|
1595
|
-
h = i[c], f = u.get(h), f === void 0 && u.set(h, f = c ? /* @__PURE__ */ new Map() :
|
|
1595
|
+
h = i[c], f = u.get(h), f === void 0 && u.set(h, f = c ? /* @__PURE__ */ new Map() : jn(t)), u = f;
|
|
1596
1596
|
return f;
|
|
1597
1597
|
};
|
|
1598
|
-
|
|
1599
|
-
const
|
|
1600
|
-
http:
|
|
1601
|
-
xhr:
|
|
1598
|
+
Bt();
|
|
1599
|
+
const Je = {
|
|
1600
|
+
http: Yr,
|
|
1601
|
+
xhr: xn,
|
|
1602
1602
|
fetch: {
|
|
1603
|
-
get:
|
|
1603
|
+
get: Bt
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
|
-
a.forEach(
|
|
1606
|
+
a.forEach(Je, (e, t) => {
|
|
1607
1607
|
if (e) {
|
|
1608
1608
|
try {
|
|
1609
1609
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1612,7 +1612,7 @@ a.forEach(Ge, (e, t) => {
|
|
|
1612
1612
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1613
1613
|
}
|
|
1614
1614
|
});
|
|
1615
|
-
const
|
|
1615
|
+
const ut = (e) => `- ${e}`, Un = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1616
1616
|
function In(e, t) {
|
|
1617
1617
|
e = a.isArray(e) ? e : [e];
|
|
1618
1618
|
const { length: r } = e;
|
|
@@ -1621,8 +1621,8 @@ function In(e, t) {
|
|
|
1621
1621
|
for (let o = 0; o < r; o++) {
|
|
1622
1622
|
n = e[o];
|
|
1623
1623
|
let c;
|
|
1624
|
-
if (s = n, !
|
|
1625
|
-
throw new
|
|
1624
|
+
if (s = n, !Un(n) && (s = Je[(c = String(n)).toLowerCase()], s === void 0))
|
|
1625
|
+
throw new w(`Unknown adapter '${c}'`);
|
|
1626
1626
|
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1627
1627
|
break;
|
|
1628
1628
|
i[c || "#" + o] = s;
|
|
@@ -1632,16 +1632,16 @@ function In(e, t) {
|
|
|
1632
1632
|
([h, f]) => `adapter ${h} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1633
1633
|
);
|
|
1634
1634
|
let c = r ? o.length > 1 ? `since :
|
|
1635
|
-
` + o.map(
|
|
1636
|
-
`) : " " +
|
|
1637
|
-
throw new
|
|
1635
|
+
` + o.map(ut).join(`
|
|
1636
|
+
`) : " " + ut(o[0]) : "as no adapter specified";
|
|
1637
|
+
throw new w(
|
|
1638
1638
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1639
1639
|
"ERR_NOT_SUPPORT"
|
|
1640
1640
|
);
|
|
1641
1641
|
}
|
|
1642
1642
|
return s;
|
|
1643
1643
|
}
|
|
1644
|
-
const
|
|
1644
|
+
const $t = {
|
|
1645
1645
|
/**
|
|
1646
1646
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1647
1647
|
* @type {Function}
|
|
@@ -1651,48 +1651,48 @@ const Bt = {
|
|
|
1651
1651
|
* Exposes all known adapters
|
|
1652
1652
|
* @type {Object<string, Function|Object>}
|
|
1653
1653
|
*/
|
|
1654
|
-
adapters:
|
|
1654
|
+
adapters: Je
|
|
1655
1655
|
};
|
|
1656
|
-
function
|
|
1656
|
+
function Ie(e) {
|
|
1657
1657
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1658
|
-
throw new
|
|
1658
|
+
throw new re(null, e);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return
|
|
1660
|
+
function ft(e) {
|
|
1661
|
+
return Ie(e), e.headers = U.from(e.headers), e.data = Ue.call(
|
|
1662
1662
|
e,
|
|
1663
1663
|
e.transformRequest
|
|
1664
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1665
|
-
return
|
|
1664
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $t.getAdapter(e.adapter || pe.adapter, e)(e).then(function(n) {
|
|
1665
|
+
return Ie(e), n.data = Ue.call(
|
|
1666
1666
|
e,
|
|
1667
1667
|
e.transformResponse,
|
|
1668
1668
|
n
|
|
1669
|
-
), n.headers =
|
|
1669
|
+
), n.headers = U.from(n.headers), n;
|
|
1670
1670
|
}, function(n) {
|
|
1671
|
-
return It(n) || (
|
|
1671
|
+
return It(n) || (Ie(e), n && n.response && (n.response.data = Ue.call(
|
|
1672
1672
|
e,
|
|
1673
1673
|
e.transformResponse,
|
|
1674
1674
|
n.response
|
|
1675
|
-
), n.response.headers =
|
|
1675
|
+
), n.response.headers = U.from(n.response.headers))), Promise.reject(n);
|
|
1676
1676
|
});
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1678
|
+
const qt = "1.13.2", Ce = {};
|
|
1679
1679
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1680
1680
|
Ce[e] = function(n) {
|
|
1681
1681
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1682
1682
|
};
|
|
1683
1683
|
});
|
|
1684
|
-
const
|
|
1684
|
+
const dt = {};
|
|
1685
1685
|
Ce.transitional = function(t, r, n) {
|
|
1686
1686
|
function s(i, o) {
|
|
1687
|
-
return "[Axios v" +
|
|
1687
|
+
return "[Axios v" + qt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1688
1688
|
}
|
|
1689
1689
|
return (i, o, c) => {
|
|
1690
1690
|
if (t === !1)
|
|
1691
|
-
throw new
|
|
1691
|
+
throw new w(
|
|
1692
1692
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1693
|
-
|
|
1693
|
+
w.ERR_DEPRECATED
|
|
1694
1694
|
);
|
|
1695
|
-
return r && !
|
|
1695
|
+
return r && !dt[o] && (dt[o] = !0, console.warn(
|
|
1696
1696
|
s(
|
|
1697
1697
|
o,
|
|
1698
1698
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1703,9 +1703,9 @@ Ce.transitional = function(t, r, n) {
|
|
|
1703
1703
|
Ce.spelling = function(t) {
|
|
1704
1704
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1705
1705
|
};
|
|
1706
|
-
function
|
|
1706
|
+
function Fn(e, t, r) {
|
|
1707
1707
|
if (typeof e != "object")
|
|
1708
|
-
throw new
|
|
1708
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1709
1709
|
const n = Object.keys(e);
|
|
1710
1710
|
let s = n.length;
|
|
1711
1711
|
for (; s-- > 0; ) {
|
|
@@ -1713,22 +1713,22 @@ function Un(e, t, r) {
|
|
|
1713
1713
|
if (o) {
|
|
1714
1714
|
const c = e[i], h = c === void 0 || o(c, i, e);
|
|
1715
1715
|
if (h !== !0)
|
|
1716
|
-
throw new
|
|
1716
|
+
throw new w("option " + i + " must be " + h, w.ERR_BAD_OPTION_VALUE);
|
|
1717
1717
|
continue;
|
|
1718
1718
|
}
|
|
1719
1719
|
if (r !== !0)
|
|
1720
|
-
throw new
|
|
1720
|
+
throw new w("Unknown option " + i, w.ERR_BAD_OPTION);
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
const Oe = {
|
|
1724
|
-
assertOptions:
|
|
1724
|
+
assertOptions: Fn,
|
|
1725
1725
|
validators: Ce
|
|
1726
1726
|
}, B = Oe.validators;
|
|
1727
1727
|
let Y = class {
|
|
1728
1728
|
constructor(t) {
|
|
1729
1729
|
this.defaults = t || {}, this.interceptors = {
|
|
1730
|
-
request: new
|
|
1731
|
-
response: new
|
|
1730
|
+
request: new et(),
|
|
1731
|
+
response: new et()
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
1734
|
/**
|
|
@@ -1781,36 +1781,36 @@ let Y = class {
|
|
|
1781
1781
|
(d) => {
|
|
1782
1782
|
delete i[d];
|
|
1783
1783
|
}
|
|
1784
|
-
), r.headers =
|
|
1784
|
+
), r.headers = U.concat(o, i);
|
|
1785
1785
|
const c = [];
|
|
1786
1786
|
let h = !0;
|
|
1787
|
-
this.interceptors.request.forEach(function(
|
|
1788
|
-
typeof
|
|
1787
|
+
this.interceptors.request.forEach(function(E) {
|
|
1788
|
+
typeof E.runWhen == "function" && E.runWhen(r) === !1 || (h = h && E.synchronous, c.unshift(E.fulfilled, E.rejected));
|
|
1789
1789
|
});
|
|
1790
1790
|
const f = [];
|
|
1791
|
-
this.interceptors.response.forEach(function(
|
|
1792
|
-
f.push(
|
|
1791
|
+
this.interceptors.response.forEach(function(E) {
|
|
1792
|
+
f.push(E.fulfilled, E.rejected);
|
|
1793
1793
|
});
|
|
1794
1794
|
let u, m = 0, g;
|
|
1795
1795
|
if (!h) {
|
|
1796
|
-
const d = [
|
|
1796
|
+
const d = [ft.bind(this), void 0];
|
|
1797
1797
|
for (d.unshift(...c), d.push(...f), g = d.length, u = Promise.resolve(r); m < g; )
|
|
1798
1798
|
u = u.then(d[m++], d[m++]);
|
|
1799
1799
|
return u;
|
|
1800
1800
|
}
|
|
1801
1801
|
g = c.length;
|
|
1802
|
-
let
|
|
1802
|
+
let A = r;
|
|
1803
1803
|
for (; m < g; ) {
|
|
1804
|
-
const d = c[m++],
|
|
1804
|
+
const d = c[m++], E = c[m++];
|
|
1805
1805
|
try {
|
|
1806
|
-
|
|
1806
|
+
A = d(A);
|
|
1807
1807
|
} catch (p) {
|
|
1808
|
-
|
|
1808
|
+
E.call(this, p);
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
try {
|
|
1813
|
-
u =
|
|
1813
|
+
u = ft.call(this, A);
|
|
1814
1814
|
} catch (d) {
|
|
1815
1815
|
return Promise.reject(d);
|
|
1816
1816
|
}
|
|
@@ -1820,8 +1820,8 @@ let Y = class {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
getUri(t) {
|
|
1822
1822
|
t = K(this.defaults, t);
|
|
1823
|
-
const r =
|
|
1824
|
-
return
|
|
1823
|
+
const r = vt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1824
|
+
return jt(r, t.params, t.paramsSerializer);
|
|
1825
1825
|
}
|
|
1826
1826
|
};
|
|
1827
1827
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1848,7 +1848,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
Y.prototype[t] = r(), Y.prototype[t + "Form"] = r(!0);
|
|
1850
1850
|
});
|
|
1851
|
-
let
|
|
1851
|
+
let vn = class Mt {
|
|
1852
1852
|
constructor(t) {
|
|
1853
1853
|
if (typeof t != "function")
|
|
1854
1854
|
throw new TypeError("executor must be a function.");
|
|
@@ -1872,7 +1872,7 @@ let Fn = class qt {
|
|
|
1872
1872
|
n.unsubscribe(i);
|
|
1873
1873
|
}, o;
|
|
1874
1874
|
}, t(function(i, o, c) {
|
|
1875
|
-
n.reason || (n.reason = new
|
|
1875
|
+
n.reason || (n.reason = new re(i, o, c), r(n.reason));
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
1878
|
/**
|
|
@@ -1914,19 +1914,19 @@ let Fn = class qt {
|
|
|
1914
1914
|
static source() {
|
|
1915
1915
|
let t;
|
|
1916
1916
|
return {
|
|
1917
|
-
token: new
|
|
1917
|
+
token: new Mt(function(s) {
|
|
1918
1918
|
t = s;
|
|
1919
1919
|
}),
|
|
1920
1920
|
cancel: t
|
|
1921
1921
|
};
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
function
|
|
1924
|
+
function Dn(e) {
|
|
1925
1925
|
return function(r) {
|
|
1926
1926
|
return e.apply(null, r);
|
|
1927
1927
|
};
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Bn(e) {
|
|
1930
1930
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1931
1931
|
}
|
|
1932
1932
|
const Be = {
|
|
@@ -2003,102 +2003,104 @@ const Be = {
|
|
|
2003
2003
|
Object.entries(Be).forEach(([e, t]) => {
|
|
2004
2004
|
Be[t] = e;
|
|
2005
2005
|
});
|
|
2006
|
-
function
|
|
2007
|
-
const t = new Y(e), r =
|
|
2006
|
+
function Ht(e) {
|
|
2007
|
+
const t = new Y(e), r = gt(Y.prototype.request, t);
|
|
2008
2008
|
return a.extend(r, Y.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2009
|
-
return
|
|
2009
|
+
return Ht(K(e, s));
|
|
2010
2010
|
}, r;
|
|
2011
2011
|
}
|
|
2012
|
-
const x =
|
|
2012
|
+
const x = Ht(pe);
|
|
2013
2013
|
x.Axios = Y;
|
|
2014
|
-
x.CanceledError =
|
|
2015
|
-
x.CancelToken =
|
|
2014
|
+
x.CanceledError = re;
|
|
2015
|
+
x.CancelToken = vn;
|
|
2016
2016
|
x.isCancel = It;
|
|
2017
|
-
x.VERSION =
|
|
2017
|
+
x.VERSION = qt;
|
|
2018
2018
|
x.toFormData = Pe;
|
|
2019
|
-
x.AxiosError =
|
|
2019
|
+
x.AxiosError = w;
|
|
2020
2020
|
x.Cancel = x.CanceledError;
|
|
2021
2021
|
x.all = function(t) {
|
|
2022
2022
|
return Promise.all(t);
|
|
2023
2023
|
};
|
|
2024
|
-
x.spread =
|
|
2025
|
-
x.isAxiosError =
|
|
2024
|
+
x.spread = Dn;
|
|
2025
|
+
x.isAxiosError = Bn;
|
|
2026
2026
|
x.mergeConfig = K;
|
|
2027
|
-
x.AxiosHeaders =
|
|
2028
|
-
x.formToJSON = (e) =>
|
|
2029
|
-
x.getAdapter =
|
|
2027
|
+
x.AxiosHeaders = U;
|
|
2028
|
+
x.formToJSON = (e) => Ut(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2029
|
+
x.getAdapter = $t.getAdapter;
|
|
2030
2030
|
x.HttpStatusCode = Be;
|
|
2031
2031
|
x.default = x;
|
|
2032
2032
|
const {
|
|
2033
|
-
Axios:
|
|
2034
|
-
AxiosError:
|
|
2035
|
-
CanceledError:
|
|
2036
|
-
isCancel:
|
|
2037
|
-
CancelToken:
|
|
2038
|
-
VERSION:
|
|
2039
|
-
all:
|
|
2040
|
-
Cancel:
|
|
2041
|
-
isAxiosError:
|
|
2042
|
-
spread:
|
|
2043
|
-
toFormData:
|
|
2044
|
-
AxiosHeaders:
|
|
2045
|
-
HttpStatusCode:
|
|
2046
|
-
formToJSON:
|
|
2047
|
-
getAdapter:
|
|
2048
|
-
mergeConfig:
|
|
2049
|
-
} = x,
|
|
2033
|
+
Axios: Jn,
|
|
2034
|
+
AxiosError: Wn,
|
|
2035
|
+
CanceledError: Vn,
|
|
2036
|
+
isCancel: Yn,
|
|
2037
|
+
CancelToken: Xn,
|
|
2038
|
+
VERSION: Kn,
|
|
2039
|
+
all: Zn,
|
|
2040
|
+
Cancel: Qn,
|
|
2041
|
+
isAxiosError: es,
|
|
2042
|
+
spread: ts,
|
|
2043
|
+
toFormData: rs,
|
|
2044
|
+
AxiosHeaders: ns,
|
|
2045
|
+
HttpStatusCode: ss,
|
|
2046
|
+
formToJSON: os,
|
|
2047
|
+
getAdapter: is,
|
|
2048
|
+
mergeConfig: as
|
|
2049
|
+
} = x, zt = Vt(null), cs = ({ children: e }) => {
|
|
2050
2050
|
const [t, r] = M(
|
|
2051
2051
|
localStorage.getItem("isLoggedIn") === "true"
|
|
2052
2052
|
), n = () => {
|
|
2053
2053
|
localStorage.setItem("isLoggedIn", "true"), r(!0);
|
|
2054
2054
|
}, s = () => {
|
|
2055
|
-
localStorage.removeItem("isLoggedIn"),
|
|
2055
|
+
localStorage.removeItem("isLoggedIn"), le(null), r(!1);
|
|
2056
2056
|
};
|
|
2057
|
-
return /* @__PURE__ */
|
|
2058
|
-
},
|
|
2059
|
-
const e =
|
|
2057
|
+
return /* @__PURE__ */ y.jsx(zt.Provider, { value: { isAuthenticated: t, login: n, logout: s }, children: e });
|
|
2058
|
+
}, We = () => {
|
|
2059
|
+
const e = Yt(zt);
|
|
2060
2060
|
if (!e)
|
|
2061
2061
|
throw new Error("useAuth must be used inside AuthProvider");
|
|
2062
2062
|
return e;
|
|
2063
2063
|
};
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2064
|
+
let $e = "";
|
|
2065
|
+
function ls(e) {
|
|
2066
|
+
$e = e.apiBaseUrl;
|
|
2067
|
+
}
|
|
2068
|
+
function ue() {
|
|
2069
|
+
if (!$e)
|
|
2070
|
+
throw new Error("Auth not initialized. Call initAuth() in consumer app.");
|
|
2071
|
+
return $e;
|
|
2072
|
+
}
|
|
2073
|
+
async function Gt() {
|
|
2074
|
+
const e = await x.post(
|
|
2075
|
+
`${ue()}${X.refreshToken}`,
|
|
2076
|
+
{},
|
|
2077
|
+
{ withCredentials: !0 }
|
|
2078
|
+
), t = e?.data?.accessToken || e?.data?.data?.accessToken;
|
|
2079
|
+
if (!t)
|
|
2080
|
+
throw new Error("Invalid refresh response");
|
|
2081
|
+
return t;
|
|
2080
2082
|
}
|
|
2081
2083
|
const J = x.create({
|
|
2082
2084
|
withCredentials: !0
|
|
2083
2085
|
});
|
|
2084
|
-
let ge = !1,
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2086
|
+
let ge = !1, qe = [];
|
|
2087
|
+
const ht = (e, t = null) => {
|
|
2088
|
+
qe.forEach((r) => {
|
|
2087
2089
|
e ? r.reject(e) : r.resolve(t);
|
|
2088
|
-
}),
|
|
2090
|
+
}), qe = [];
|
|
2089
2091
|
};
|
|
2090
2092
|
J.interceptors.request.use(
|
|
2091
2093
|
async (e) => {
|
|
2092
|
-
if (e.withCredentials = !0, e.url
|
|
2094
|
+
if (e.withCredentials = !0, e.url?.includes(X.login) || e.url?.includes(X.register))
|
|
2093
2095
|
return e.headers && "Authorization" in e.headers && delete e.headers.Authorization, e;
|
|
2094
|
-
const r =
|
|
2096
|
+
const r = lr();
|
|
2095
2097
|
if (r)
|
|
2096
2098
|
return e.headers && (e.headers.Authorization = `Bearer ${r}`), e;
|
|
2097
2099
|
try {
|
|
2098
|
-
const n = await
|
|
2099
|
-
return
|
|
2100
|
+
const n = await Gt();
|
|
2101
|
+
return le(n), e.headers && (e.headers.Authorization = `Bearer ${n}`), e;
|
|
2100
2102
|
} catch (n) {
|
|
2101
|
-
throw window.location.href = "/", sessionStorage.setItem(
|
|
2103
|
+
throw window.location.href = "/", sessionStorage.setItem(Ae, Me), le(null), localStorage.removeItem("isLoggedIn"), n;
|
|
2102
2104
|
}
|
|
2103
2105
|
},
|
|
2104
2106
|
(e) => Promise.reject(e)
|
|
@@ -2110,69 +2112,69 @@ J.interceptors.response.use(
|
|
|
2110
2112
|
if (e.response?.status === 401 && !t._retry) {
|
|
2111
2113
|
if (ge)
|
|
2112
2114
|
return new Promise((r, n) => {
|
|
2113
|
-
|
|
2115
|
+
qe.push({ resolve: r, reject: n });
|
|
2114
2116
|
}).then((r) => (t.headers && (t.headers.Authorization = `Bearer ${r}`), J(t))).catch((r) => Promise.reject(r));
|
|
2115
2117
|
t._retry = !0, ge = !0;
|
|
2116
2118
|
try {
|
|
2117
|
-
const r = await
|
|
2118
|
-
return
|
|
2119
|
+
const r = await Gt();
|
|
2120
|
+
return le(r), t.headers && (t.headers.Authorization = `Bearer ${r}`), ht(null, r), ge = !1, J(t);
|
|
2119
2121
|
} catch (r) {
|
|
2120
|
-
return window.location.href = "/", sessionStorage.setItem(
|
|
2122
|
+
return window.location.href = "/", sessionStorage.setItem(Ae, Me), ht(r, null), ge = !1, We().logout(), Promise.reject(r);
|
|
2121
2123
|
}
|
|
2122
2124
|
}
|
|
2123
2125
|
return Promise.reject(e);
|
|
2124
2126
|
}
|
|
2125
2127
|
);
|
|
2126
|
-
const
|
|
2128
|
+
const Jt = {
|
|
2127
2129
|
MIN_LENGTH: 8,
|
|
2128
2130
|
REGEX: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])[A-Za-z\d@$!%*?&#]{8,}$/,
|
|
2129
2131
|
ERROR_MESSAGE: "Password must be at least 8 characters long and include uppercase, lowercase, number, and special character."
|
|
2130
|
-
},
|
|
2132
|
+
}, $n = (e) => Jt.REGEX.test(e), us = ({ onLoginSuccess: e }) => {
|
|
2131
2133
|
const [t, r] = M(P.LOGIN), [n, s] = M({
|
|
2132
2134
|
email: "",
|
|
2133
2135
|
password: ""
|
|
2134
|
-
}), i =
|
|
2135
|
-
|
|
2136
|
-
typeof window < "u" && sessionStorage.getItem(
|
|
2136
|
+
}), i = Et(), [o, c] = M(!1), [h, f] = M(""), [u, m] = M("");
|
|
2137
|
+
mt(() => {
|
|
2138
|
+
typeof window < "u" && sessionStorage.getItem(Ae) === Me && (sessionStorage.removeItem(Ae), f(nr), r(P.LOGIN));
|
|
2137
2139
|
}, []);
|
|
2138
2140
|
const g = (p) => {
|
|
2139
2141
|
const { name: S, value: N } = p.target;
|
|
2140
|
-
s((
|
|
2141
|
-
},
|
|
2142
|
+
s((T) => ({ ...T, [S]: N })), f("");
|
|
2143
|
+
}, A = async (p) => {
|
|
2142
2144
|
p.preventDefault(), c(!0), f(""), m("");
|
|
2143
2145
|
try {
|
|
2144
2146
|
if (t === P.SIGNUP) {
|
|
2145
|
-
if (
|
|
2146
|
-
f(
|
|
2147
|
+
if (!$n(n.password)) {
|
|
2148
|
+
f(Jt.ERROR_MESSAGE);
|
|
2147
2149
|
return;
|
|
2148
2150
|
}
|
|
2149
|
-
await J.post(X.register
|
|
2151
|
+
await J.post(`${ue()}${X.register}`, n), m(Qt), r(P.LOGIN), s({ email: n.email, password: "" });
|
|
2150
2152
|
return;
|
|
2151
2153
|
}
|
|
2152
|
-
const S = await J.post(X.login
|
|
2153
|
-
|
|
2154
|
+
const S = await J.post(`${ue()}${X.login}`, n), { accessToken: N } = S.data;
|
|
2155
|
+
le(N), localStorage.setItem("isLoggedIn", "true"), m(rr), e && e(), i("/profile");
|
|
2154
2156
|
} catch (S) {
|
|
2155
|
-
const N = S?.response?.data?.message || (t === P.SIGNUP ?
|
|
2157
|
+
const N = S?.response?.data?.message || (t === P.SIGNUP ? er : tr);
|
|
2156
2158
|
f(N);
|
|
2157
2159
|
} finally {
|
|
2158
2160
|
c(!1);
|
|
2159
2161
|
}
|
|
2160
2162
|
}, d = () => {
|
|
2161
2163
|
r(P.SIGNUP), f(""), m("");
|
|
2162
|
-
},
|
|
2164
|
+
}, E = () => {
|
|
2163
2165
|
r(P.LOGIN), f(""), m("");
|
|
2164
2166
|
};
|
|
2165
|
-
return /* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2167
|
+
return /* @__PURE__ */ y.jsx("div", { className: "auth-container", children: /* @__PURE__ */ y.jsxs("div", { className: "auth-card", children: [
|
|
2168
|
+
/* @__PURE__ */ y.jsxs("div", { className: "mode-selector", children: [
|
|
2169
|
+
/* @__PURE__ */ y.jsx(
|
|
2168
2170
|
"button",
|
|
2169
2171
|
{
|
|
2170
2172
|
className: t === P.LOGIN ? "active" : "",
|
|
2171
|
-
onClick:
|
|
2173
|
+
onClick: E,
|
|
2172
2174
|
children: P.LOGIN
|
|
2173
2175
|
}
|
|
2174
2176
|
),
|
|
2175
|
-
/* @__PURE__ */
|
|
2177
|
+
/* @__PURE__ */ y.jsx(
|
|
2176
2178
|
"button",
|
|
2177
2179
|
{
|
|
2178
2180
|
className: t === P.SIGNUP ? "active" : "",
|
|
@@ -2181,11 +2183,11 @@ const Gt = {
|
|
|
2181
2183
|
}
|
|
2182
2184
|
)
|
|
2183
2185
|
] }),
|
|
2184
|
-
/* @__PURE__ */
|
|
2185
|
-
t === P.LOGIN ? /* @__PURE__ */
|
|
2186
|
-
/* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
2188
|
-
/* @__PURE__ */
|
|
2186
|
+
/* @__PURE__ */ y.jsxs("form", { onSubmit: A, children: [
|
|
2187
|
+
t === P.LOGIN ? /* @__PURE__ */ y.jsx("h2", { children: P.LOGIN }) : /* @__PURE__ */ y.jsx("h2", { children: P.SIGNUP }),
|
|
2188
|
+
/* @__PURE__ */ y.jsxs("div", { className: "form-group", children: [
|
|
2189
|
+
/* @__PURE__ */ y.jsx("label", { htmlFor: "email", children: wt }),
|
|
2190
|
+
/* @__PURE__ */ y.jsx(
|
|
2189
2191
|
"input",
|
|
2190
2192
|
{
|
|
2191
2193
|
type: "email",
|
|
@@ -2198,9 +2200,9 @@ const Gt = {
|
|
|
2198
2200
|
}
|
|
2199
2201
|
)
|
|
2200
2202
|
] }),
|
|
2201
|
-
/* @__PURE__ */
|
|
2202
|
-
/* @__PURE__ */
|
|
2203
|
-
/* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ y.jsxs("div", { className: "form-group", children: [
|
|
2204
|
+
/* @__PURE__ */ y.jsx("label", { htmlFor: "password", children: ir }),
|
|
2205
|
+
/* @__PURE__ */ y.jsx(
|
|
2204
2206
|
"input",
|
|
2205
2207
|
{
|
|
2206
2208
|
type: "password",
|
|
@@ -2213,22 +2215,22 @@ const Gt = {
|
|
|
2213
2215
|
}
|
|
2214
2216
|
)
|
|
2215
2217
|
] }),
|
|
2216
|
-
h && /* @__PURE__ */
|
|
2217
|
-
u && /* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2218
|
+
h && /* @__PURE__ */ y.jsx("div", { className: "error-message", children: h }),
|
|
2219
|
+
u && /* @__PURE__ */ y.jsx("div", { className: "success-message", children: u }),
|
|
2220
|
+
/* @__PURE__ */ y.jsx("button", { type: "submit", className: "submit-btn", disabled: o, children: o ? t === P.LOGIN ? sr : or : t === P.LOGIN ? P.LOGIN : P.SIGNUP })
|
|
2219
2221
|
] })
|
|
2220
2222
|
] }) });
|
|
2221
|
-
},
|
|
2222
|
-
const [t, r] =
|
|
2223
|
-
J.post(X.logout).catch((m) => {
|
|
2223
|
+
}, fs = ({ onLogout: e }) => {
|
|
2224
|
+
const [t, r] = pt.useState(null), [n, s] = M(!1), [i, o] = M(""), [c, h] = M(""), f = Et(), u = () => {
|
|
2225
|
+
J.post(`${ue()}${X.logout}`).catch((m) => {
|
|
2224
2226
|
console.error("Logout failed:", m);
|
|
2225
2227
|
}), r(null), e(), f("/");
|
|
2226
2228
|
};
|
|
2227
|
-
return
|
|
2229
|
+
return mt(() => {
|
|
2228
2230
|
(async () => {
|
|
2229
2231
|
s(!0), o("");
|
|
2230
2232
|
try {
|
|
2231
|
-
const g = await J.get(X.userDetails);
|
|
2233
|
+
const g = await J.get(`${ue()}${X.userDetails}`);
|
|
2232
2234
|
r(g.data.data), h("User details fetched successfully");
|
|
2233
2235
|
} catch (g) {
|
|
2234
2236
|
o(g.response?.data?.message || "Failed to fetch user details");
|
|
@@ -2236,67 +2238,68 @@ const Gt = {
|
|
|
2236
2238
|
s(!1);
|
|
2237
2239
|
}
|
|
2238
2240
|
})();
|
|
2239
|
-
}, []), /* @__PURE__ */
|
|
2240
|
-
/* @__PURE__ */
|
|
2241
|
-
n && /* @__PURE__ */
|
|
2242
|
-
/* @__PURE__ */
|
|
2243
|
-
/* @__PURE__ */
|
|
2244
|
-
/* @__PURE__ */
|
|
2245
|
-
|
|
2241
|
+
}, []), /* @__PURE__ */ y.jsx("div", { className: "auth-container", children: /* @__PURE__ */ y.jsxs("div", { className: "auth-card profile-view", children: [
|
|
2242
|
+
/* @__PURE__ */ y.jsx("h2", { children: "User Profile" }),
|
|
2243
|
+
n && /* @__PURE__ */ y.jsx("div", { className: "loading", children: "Loading user details..." }),
|
|
2244
|
+
/* @__PURE__ */ y.jsxs("div", { className: "user-details", children: [
|
|
2245
|
+
/* @__PURE__ */ y.jsxs("div", { className: "detail-row", children: [
|
|
2246
|
+
/* @__PURE__ */ y.jsxs("span", { className: "label", children: [
|
|
2247
|
+
ar,
|
|
2246
2248
|
":"
|
|
2247
2249
|
] }),
|
|
2248
|
-
/* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ y.jsx("span", { className: "value", children: t?.userId })
|
|
2249
2251
|
] }),
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
2252
|
-
|
|
2252
|
+
/* @__PURE__ */ y.jsxs("div", { className: "detail-row", children: [
|
|
2253
|
+
/* @__PURE__ */ y.jsxs("span", { className: "label", children: [
|
|
2254
|
+
wt,
|
|
2253
2255
|
":"
|
|
2254
2256
|
] }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ y.jsx("span", { className: "value", children: t?.emailId })
|
|
2256
2258
|
] })
|
|
2257
2259
|
] }),
|
|
2258
|
-
i && /* @__PURE__ */
|
|
2259
|
-
c && /* @__PURE__ */
|
|
2260
|
-
/* @__PURE__ */
|
|
2260
|
+
i && /* @__PURE__ */ y.jsx("div", { className: "error-message", children: i }),
|
|
2261
|
+
c && /* @__PURE__ */ y.jsx("div", { className: "success-message", children: c }),
|
|
2262
|
+
/* @__PURE__ */ y.jsx("button", { className: "logout-btn", onClick: u, children: cr })
|
|
2261
2263
|
] }) });
|
|
2262
|
-
},
|
|
2264
|
+
}, ds = ({
|
|
2263
2265
|
children: e,
|
|
2264
2266
|
redirectTo: t = "/"
|
|
2265
2267
|
}) => {
|
|
2266
|
-
const { isAuthenticated: r } =
|
|
2267
|
-
return r ? /* @__PURE__ */
|
|
2268
|
-
},
|
|
2268
|
+
const { isAuthenticated: r } = We();
|
|
2269
|
+
return r ? /* @__PURE__ */ y.jsx(y.Fragment, { children: e }) : /* @__PURE__ */ y.jsx(bt, { to: t, replace: !0 });
|
|
2270
|
+
}, hs = ({
|
|
2269
2271
|
children: e,
|
|
2270
2272
|
redirectTo: t = "/profile"
|
|
2271
2273
|
}) => {
|
|
2272
|
-
const { isAuthenticated: r } =
|
|
2273
|
-
return r ? /* @__PURE__ */
|
|
2274
|
+
const { isAuthenticated: r } = We();
|
|
2275
|
+
return r ? /* @__PURE__ */ y.jsx(bt, { to: t, replace: !0 }) : /* @__PURE__ */ y.jsx(y.Fragment, { children: e });
|
|
2274
2276
|
};
|
|
2275
2277
|
export {
|
|
2276
|
-
|
|
2277
|
-
cs as AuthForm,
|
|
2278
|
+
us as AuthForm,
|
|
2278
2279
|
P as AuthMode,
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2280
|
+
cs as AuthProvider,
|
|
2281
|
+
wt as EMAIL_LABEL,
|
|
2282
|
+
tr as LOGIN_FAILED,
|
|
2283
|
+
rr as LOGIN_SUCCESS,
|
|
2284
|
+
cr as LOGOUT_BUTTON,
|
|
2285
|
+
Hn as LOGOUT_SUCCESS,
|
|
2286
|
+
ir as PASSWORD_LABEL,
|
|
2287
|
+
Jt as PASSWORD_VALIDATION,
|
|
2288
|
+
ds as ProtectedRoute,
|
|
2289
|
+
hs as PublicRoute,
|
|
2290
|
+
er as REGISTRATION_FAILED,
|
|
2291
|
+
Qt as REGISTRATION_SUCCESS,
|
|
2292
|
+
nr as SESSION_EXPIRED,
|
|
2293
|
+
sr as SIGNING_IN,
|
|
2294
|
+
or as SIGNING_UP,
|
|
2295
|
+
ar as USER_ID,
|
|
2296
|
+
fs as UserProfile,
|
|
2296
2297
|
J as axiosInstance,
|
|
2297
2298
|
X as endPoints,
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2299
|
+
ue as getApiBaseUrl,
|
|
2300
|
+
ls as initAuth,
|
|
2301
|
+
Ae as sessionExpired,
|
|
2302
|
+
Me as sessionExpiredValue,
|
|
2303
|
+
We as useAuth,
|
|
2304
|
+
$n as validatePassword
|
|
2302
2305
|
};
|