@neuctra/authix 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.
|
@@ -1,183 +1,183 @@
|
|
|
1
1
|
import kt, { forwardRef as Et, createElement as We, useState as $, useEffect as re, useRef as rt } from "react";
|
|
2
|
-
function Tt(
|
|
2
|
+
function Tt(e, t) {
|
|
3
3
|
return function() {
|
|
4
|
-
return
|
|
4
|
+
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: tr } = Object.prototype, { getPrototypeOf: Ge } = Object, { iterator: Ae, toStringTag: Ct } = Symbol, ze = /* @__PURE__ */ ((
|
|
8
|
-
const r = tr.call(
|
|
9
|
-
return
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)), Z = (
|
|
11
|
-
function we(
|
|
12
|
-
return
|
|
7
|
+
const { toString: tr } = Object.prototype, { getPrototypeOf: Ge } = Object, { iterator: Ae, toStringTag: Ct } = Symbol, ze = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const r = tr.call(t);
|
|
9
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), Z = (e) => (e = e.toLowerCase(), (t) => ze(t) === e), Ne = (e) => (t) => typeof t === e, { isArray: ue } = Array, le = Ne("undefined");
|
|
11
|
+
function we(e) {
|
|
12
|
+
return e !== null && !le(e) && e.constructor !== null && !le(e.constructor) && X(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
14
|
const Rt = Z("ArrayBuffer");
|
|
15
|
-
function rr(
|
|
16
|
-
let
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ?
|
|
15
|
+
function rr(e) {
|
|
16
|
+
let t;
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rt(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const nr = Ne("string"), X = Ne("function"), Pt = Ne("number"), ve = (
|
|
20
|
-
if (ze(
|
|
19
|
+
const nr = Ne("string"), X = Ne("function"), Pt = Ne("number"), ve = (e) => e !== null && typeof e == "object", sr = (e) => e === !0 || e === !1, Te = (e) => {
|
|
20
|
+
if (ze(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const
|
|
23
|
-
return (
|
|
24
|
-
}, or = (
|
|
25
|
-
if (!ve(
|
|
22
|
+
const t = Ge(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ct in e) && !(Ae in e);
|
|
24
|
+
}, or = (e) => {
|
|
25
|
+
if (!ve(e) || we(e))
|
|
26
26
|
return !1;
|
|
27
27
|
try {
|
|
28
|
-
return Object.keys(
|
|
28
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, ar = Z("Date"), ir = Z("File"), lr = Z("Blob"), cr = Z("FileList"), dr = (
|
|
33
|
-
let
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, pr = Z("URLSearchParams"), [fr, xr, hr, mr] = ["ReadableStream", "Request", "Response", "Headers"].map(Z), gr = (
|
|
37
|
-
function je(
|
|
38
|
-
if (
|
|
32
|
+
}, ar = Z("Date"), ir = Z("File"), lr = Z("Blob"), cr = Z("FileList"), dr = (e) => ve(e) && X(e.pipe), ur = (e) => {
|
|
33
|
+
let t;
|
|
34
|
+
return e && (typeof FormData == "function" && e instanceof FormData || X(e.append) && ((t = ze(e)) === "formdata" || // detect form-data instance
|
|
35
|
+
t === "object" && X(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
+
}, pr = Z("URLSearchParams"), [fr, xr, hr, mr] = ["ReadableStream", "Request", "Response", "Headers"].map(Z), gr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
|
+
function je(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
38
|
+
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
40
40
|
let n, o;
|
|
41
|
-
if (typeof
|
|
42
|
-
for (n = 0, o =
|
|
43
|
-
|
|
41
|
+
if (typeof e != "object" && (e = [e]), ue(e))
|
|
42
|
+
for (n = 0, o = e.length; n < o; n++)
|
|
43
|
+
t.call(null, e[n], n, e);
|
|
44
44
|
else {
|
|
45
|
-
if (we(
|
|
45
|
+
if (we(e))
|
|
46
46
|
return;
|
|
47
|
-
const i = r ? Object.getOwnPropertyNames(
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length;
|
|
48
48
|
let l;
|
|
49
49
|
for (n = 0; n < a; n++)
|
|
50
|
-
l = i[n],
|
|
50
|
+
l = i[n], t.call(null, e[l], l, e);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
if (we(
|
|
53
|
+
function It(e, t) {
|
|
54
|
+
if (we(e))
|
|
55
55
|
return null;
|
|
56
|
-
|
|
57
|
-
const r = Object.keys(
|
|
56
|
+
t = t.toLowerCase();
|
|
57
|
+
const r = Object.keys(e);
|
|
58
58
|
let n = r.length, o;
|
|
59
59
|
for (; n-- > 0; )
|
|
60
|
-
if (o = r[n],
|
|
60
|
+
if (o = r[n], t === o.toLowerCase())
|
|
61
61
|
return o;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const ne = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
64
|
+
const ne = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ot = (e) => !le(e) && e !== ne;
|
|
65
65
|
function He() {
|
|
66
|
-
const { caseless:
|
|
67
|
-
const a =
|
|
68
|
-
Te(r[a]) && Te(o) ? r[a] = He(r[a], o) : Te(o) ? r[a] = He({}, o) : ue(o) ? r[a] = o.slice() : (!
|
|
66
|
+
const { caseless: e, skipUndefined: t } = Ot(this) && this || {}, r = {}, n = (o, i) => {
|
|
67
|
+
const a = e && It(r, i) || i;
|
|
68
|
+
Te(r[a]) && Te(o) ? r[a] = He(r[a], o) : Te(o) ? r[a] = He({}, o) : ue(o) ? r[a] = o.slice() : (!t || !le(o)) && (r[a] = o);
|
|
69
69
|
};
|
|
70
70
|
for (let o = 0, i = arguments.length; o < i; o++)
|
|
71
71
|
arguments[o] && je(arguments[o], n);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const yr = (
|
|
75
|
-
r && X(o) ?
|
|
76
|
-
}, { allOwnKeys: n }),
|
|
77
|
-
|
|
78
|
-
value:
|
|
79
|
-
}), r && Object.assign(
|
|
80
|
-
}, vr = (
|
|
74
|
+
const yr = (e, t, r, { allOwnKeys: n } = {}) => (je(t, (o, i) => {
|
|
75
|
+
r && X(o) ? e[i] = Tt(o, r) : e[i] = o;
|
|
76
|
+
}, { allOwnKeys: n }), e), br = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wr = (e, t, r, n) => {
|
|
77
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
|
+
value: t.prototype
|
|
79
|
+
}), r && Object.assign(e.prototype, r);
|
|
80
|
+
}, vr = (e, t, r, n) => {
|
|
81
81
|
let o, i, a;
|
|
82
82
|
const l = {};
|
|
83
|
-
if (
|
|
83
|
+
if (t = t || {}, e == null) return t;
|
|
84
84
|
do {
|
|
85
|
-
for (o = Object.getOwnPropertyNames(
|
|
86
|
-
a = o[i], (!n || n(a,
|
|
87
|
-
|
|
88
|
-
} while (
|
|
89
|
-
return
|
|
90
|
-
}, jr = (
|
|
91
|
-
|
|
92
|
-
const n =
|
|
85
|
+
for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
|
|
86
|
+
a = o[i], (!n || n(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
|
|
87
|
+
e = r !== !1 && Ge(e);
|
|
88
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
89
|
+
return t;
|
|
90
|
+
}, jr = (e, t, r) => {
|
|
91
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
92
|
+
const n = e.indexOf(t, r);
|
|
93
93
|
return n !== -1 && n === r;
|
|
94
|
-
}, Sr = (
|
|
95
|
-
if (!
|
|
96
|
-
if (ue(
|
|
97
|
-
let
|
|
98
|
-
if (!Pt(
|
|
99
|
-
const r = new Array(
|
|
100
|
-
for (;
|
|
101
|
-
r[
|
|
94
|
+
}, Sr = (e) => {
|
|
95
|
+
if (!e) return null;
|
|
96
|
+
if (ue(e)) return e;
|
|
97
|
+
let t = e.length;
|
|
98
|
+
if (!Pt(t)) return null;
|
|
99
|
+
const r = new Array(t);
|
|
100
|
+
for (; t-- > 0; )
|
|
101
|
+
r[t] = e[t];
|
|
102
102
|
return r;
|
|
103
|
-
}, kr = /* @__PURE__ */ ((
|
|
104
|
-
const n = (
|
|
103
|
+
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ge(Uint8Array)), Er = (e, t) => {
|
|
104
|
+
const n = (e && e[Ae]).call(e);
|
|
105
105
|
let o;
|
|
106
106
|
for (; (o = n.next()) && !o.done; ) {
|
|
107
107
|
const i = o.value;
|
|
108
|
-
|
|
108
|
+
t.call(e, i[0], i[1]);
|
|
109
109
|
}
|
|
110
|
-
}, Tr = (
|
|
110
|
+
}, Tr = (e, t) => {
|
|
111
111
|
let r;
|
|
112
112
|
const n = [];
|
|
113
|
-
for (; (r =
|
|
113
|
+
for (; (r = e.exec(t)) !== null; )
|
|
114
114
|
n.push(r);
|
|
115
115
|
return n;
|
|
116
|
-
}, Cr = Z("HTMLFormElement"), Rr = (
|
|
116
|
+
}, Cr = Z("HTMLFormElement"), Rr = (e) => e.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(r, n, o) {
|
|
119
119
|
return n.toUpperCase() + o;
|
|
120
120
|
}
|
|
121
|
-
), nt = (({ hasOwnProperty:
|
|
122
|
-
const r = Object.getOwnPropertyDescriptors(
|
|
121
|
+
), nt = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Pr = Z("RegExp"), At = (e, t) => {
|
|
122
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
123
123
|
je(r, (o, i) => {
|
|
124
124
|
let a;
|
|
125
|
-
(a =
|
|
126
|
-
}), Object.defineProperties(
|
|
127
|
-
},
|
|
128
|
-
At(
|
|
129
|
-
if (X(
|
|
125
|
+
(a = t(o, i, e)) !== !1 && (n[i] = a || o);
|
|
126
|
+
}), Object.defineProperties(e, n);
|
|
127
|
+
}, Ir = (e) => {
|
|
128
|
+
At(e, (t, r) => {
|
|
129
|
+
if (X(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
130
130
|
return !1;
|
|
131
|
-
const n =
|
|
131
|
+
const n = e[r];
|
|
132
132
|
if (X(n)) {
|
|
133
|
-
if (
|
|
134
|
-
|
|
133
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
134
|
+
t.writable = !1;
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
t.set || (t.set = () => {
|
|
138
138
|
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Or = (e, t) => {
|
|
143
143
|
const r = {}, n = (o) => {
|
|
144
144
|
o.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
return ue(
|
|
148
|
+
return ue(e) ? n(e) : n(String(e).split(t)), r;
|
|
149
149
|
}, Ar = () => {
|
|
150
|
-
}, zr = (
|
|
151
|
-
function Nr(
|
|
152
|
-
return !!(
|
|
150
|
+
}, zr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
|
+
function Nr(e) {
|
|
152
|
+
return !!(e && X(e.append) && e[Ct] === "FormData" && e[Ae]);
|
|
153
153
|
}
|
|
154
|
-
const _r = (
|
|
155
|
-
const
|
|
154
|
+
const _r = (e) => {
|
|
155
|
+
const t = new Array(10), r = (n, o) => {
|
|
156
156
|
if (ve(n)) {
|
|
157
|
-
if (
|
|
157
|
+
if (t.indexOf(n) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (we(n))
|
|
160
160
|
return n;
|
|
161
161
|
if (!("toJSON" in n)) {
|
|
162
|
-
|
|
162
|
+
t[o] = n;
|
|
163
163
|
const i = ue(n) ? [] : {};
|
|
164
164
|
return je(n, (a, l) => {
|
|
165
165
|
const h = r(a, o + 1);
|
|
166
166
|
!le(h) && (i[l] = h);
|
|
167
|
-
}),
|
|
167
|
+
}), t[o] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return n;
|
|
171
171
|
};
|
|
172
|
-
return r(
|
|
173
|
-
}, $r = Z("AsyncFunction"), Ur = (
|
|
172
|
+
return r(e, 0);
|
|
173
|
+
}, $r = Z("AsyncFunction"), Ur = (e) => e && (ve(e) || X(e)) && X(e.then) && X(e.catch), zt = ((e, t) => e ? setImmediate : t ? ((r, n) => (ne.addEventListener("message", ({ source: o, data: i }) => {
|
|
174
174
|
o === ne && i === r && n.length && n.shift()();
|
|
175
175
|
}, !1), (o) => {
|
|
176
176
|
n.push(o), ne.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
X(ne.postMessage)
|
|
180
|
-
), Fr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ne) : typeof process < "u" && process.nextTick || zt, Dr = (
|
|
180
|
+
), Fr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ne) : typeof process < "u" && process.nextTick || zt, Dr = (e) => e != null && X(e[Ae]), d = {
|
|
181
181
|
isArray: ue,
|
|
182
182
|
isArrayBuffer: Rt,
|
|
183
183
|
isBuffer: we,
|
|
@@ -221,14 +221,14 @@ const _r = (t) => {
|
|
|
221
221
|
hasOwnProp: nt,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
223
|
reduceDescriptors: At,
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
224
|
+
freezeMethods: Ir,
|
|
225
|
+
toObjectSet: Or,
|
|
226
226
|
toCamelCase: Rr,
|
|
227
227
|
noop: Ar,
|
|
228
228
|
toFiniteNumber: zr,
|
|
229
|
-
findKey:
|
|
229
|
+
findKey: It,
|
|
230
230
|
global: ne,
|
|
231
|
-
isContextDefined:
|
|
231
|
+
isContextDefined: Ot,
|
|
232
232
|
isSpecCompliantForm: Nr,
|
|
233
233
|
toJSONObject: _r,
|
|
234
234
|
isAsyncFn: $r,
|
|
@@ -237,8 +237,8 @@ const _r = (t) => {
|
|
|
237
237
|
asap: Fr,
|
|
238
238
|
isIterable: Dr
|
|
239
239
|
};
|
|
240
|
-
function _(
|
|
241
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message =
|
|
240
|
+
function _(e, t, r, n, o) {
|
|
241
|
+
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), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
242
242
|
}
|
|
243
243
|
d.inherits(_, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -276,48 +276,48 @@ const Nt = _.prototype, _t = {};
|
|
|
276
276
|
"ERR_NOT_SUPPORT",
|
|
277
277
|
"ERR_INVALID_URL"
|
|
278
278
|
// eslint-disable-next-line func-names
|
|
279
|
-
].forEach((
|
|
280
|
-
_t[
|
|
279
|
+
].forEach((e) => {
|
|
280
|
+
_t[e] = { value: e };
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(_, _t);
|
|
283
283
|
Object.defineProperty(Nt, "isAxiosError", { value: !0 });
|
|
284
|
-
_.from = (
|
|
284
|
+
_.from = (e, t, r, n, o, i) => {
|
|
285
285
|
const a = Object.create(Nt);
|
|
286
|
-
d.toFlatObject(
|
|
286
|
+
d.toFlatObject(e, a, function(u) {
|
|
287
287
|
return u !== Error.prototype;
|
|
288
288
|
}, (p) => p !== "isAxiosError");
|
|
289
|
-
const l =
|
|
290
|
-
return _.call(a, l, h, r, n, o),
|
|
289
|
+
const l = e && e.message ? e.message : "Error", h = t == null && e ? e.code : t;
|
|
290
|
+
return _.call(a, l, h, r, n, o), e && a.cause == null && Object.defineProperty(a, "cause", { value: e, configurable: !0 }), a.name = e && e.name || "Error", i && Object.assign(a, i), a;
|
|
291
291
|
};
|
|
292
292
|
const Lr = null;
|
|
293
|
-
function Ye(
|
|
294
|
-
return d.isPlainObject(
|
|
293
|
+
function Ye(e) {
|
|
294
|
+
return d.isPlainObject(e) || d.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function $t(
|
|
297
|
-
return d.endsWith(
|
|
296
|
+
function $t(e) {
|
|
297
|
+
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function st(
|
|
300
|
-
return
|
|
299
|
+
function st(e, t, r) {
|
|
300
|
+
return e ? e.concat(t).map(function(o, i) {
|
|
301
301
|
return o = $t(o), !r && i ? "[" + o + "]" : o;
|
|
302
|
-
}).join(r ? "." : "") :
|
|
302
|
+
}).join(r ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function Mr(
|
|
305
|
-
return d.isArray(
|
|
304
|
+
function Mr(e) {
|
|
305
|
+
return d.isArray(e) && !e.some(Ye);
|
|
306
306
|
}
|
|
307
|
-
const Br = d.toFlatObject(d, {}, null, function(
|
|
308
|
-
return /^is[A-Z]/.test(
|
|
307
|
+
const Br = d.toFlatObject(d, {}, null, function(t) {
|
|
308
|
+
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
|
-
function _e(
|
|
311
|
-
if (!d.isObject(
|
|
310
|
+
function _e(e, t, r) {
|
|
311
|
+
if (!d.isObject(e))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
|
-
|
|
313
|
+
t = t || new FormData(), r = d.toFlatObject(r, {
|
|
314
314
|
metaTokens: !0,
|
|
315
315
|
dots: !1,
|
|
316
316
|
indexes: !1
|
|
317
317
|
}, !1, function(g, y) {
|
|
318
318
|
return !d.isUndefined(y[g]);
|
|
319
319
|
});
|
|
320
|
-
const n = r.metaTokens, o = r.visitor || u, i = r.dots, a = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(
|
|
320
|
+
const n = r.metaTokens, o = r.visitor || u, i = r.dots, a = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
|
|
321
321
|
if (!d.isFunction(o))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function p(c) {
|
|
@@ -337,14 +337,14 @@ function _e(t, e, r) {
|
|
|
337
337
|
g = n ? g : g.slice(0, -2), c = JSON.stringify(c);
|
|
338
338
|
else if (d.isArray(c) && Mr(c) || (d.isFileList(c) || d.endsWith(g, "[]")) && (P = d.toArray(c)))
|
|
339
339
|
return g = $t(g), P.forEach(function(v, U) {
|
|
340
|
-
!(d.isUndefined(v) || v === null) &&
|
|
340
|
+
!(d.isUndefined(v) || v === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
342
|
a === !0 ? st([g], U, i) : a === null ? g : g + "[]",
|
|
343
343
|
p(v)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Ye(c) ? !0 : (
|
|
347
|
+
return Ye(c) ? !0 : (t.append(st(y, g, i), p(c)), !1);
|
|
348
348
|
}
|
|
349
349
|
const b = [], C = Object.assign(Br, {
|
|
350
350
|
defaultVisitor: u,
|
|
@@ -357,7 +357,7 @@ function _e(t, e, r) {
|
|
|
357
357
|
throw Error("Circular reference detected in " + g.join("."));
|
|
358
358
|
b.push(c), d.forEach(c, function(P, B) {
|
|
359
359
|
(!(d.isUndefined(P) || P === null) && o.call(
|
|
360
|
-
|
|
360
|
+
t,
|
|
361
361
|
P,
|
|
362
362
|
d.isString(B) ? B.trim() : B,
|
|
363
363
|
g,
|
|
@@ -366,12 +366,12 @@ function _e(t, e, r) {
|
|
|
366
366
|
}), b.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
if (!d.isObject(
|
|
369
|
+
if (!d.isObject(e))
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
|
-
return S(
|
|
371
|
+
return S(e), t;
|
|
372
372
|
}
|
|
373
|
-
function ot(
|
|
374
|
-
const
|
|
373
|
+
function ot(e) {
|
|
374
|
+
const t = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
377
377
|
"(": "%28",
|
|
@@ -380,42 +380,42 @@ function ot(t) {
|
|
|
380
380
|
"%20": "+",
|
|
381
381
|
"%00": "\0"
|
|
382
382
|
};
|
|
383
|
-
return encodeURIComponent(
|
|
384
|
-
return
|
|
383
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
384
|
+
return t[n];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function Ze(
|
|
388
|
-
this._pairs = [],
|
|
387
|
+
function Ze(e, t) {
|
|
388
|
+
this._pairs = [], e && _e(e, this, t);
|
|
389
389
|
}
|
|
390
390
|
const Ut = Ze.prototype;
|
|
391
|
-
Ut.append = function(
|
|
392
|
-
this._pairs.push([
|
|
391
|
+
Ut.append = function(t, r) {
|
|
392
|
+
this._pairs.push([t, r]);
|
|
393
393
|
};
|
|
394
|
-
Ut.toString = function(
|
|
395
|
-
const r =
|
|
396
|
-
return
|
|
394
|
+
Ut.toString = function(t) {
|
|
395
|
+
const r = t ? function(n) {
|
|
396
|
+
return t.call(this, n, ot);
|
|
397
397
|
} : ot;
|
|
398
398
|
return this._pairs.map(function(o) {
|
|
399
399
|
return r(o[0]) + "=" + r(o[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function qr(
|
|
403
|
-
return encodeURIComponent(
|
|
402
|
+
function qr(e) {
|
|
403
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
|
-
function Ft(
|
|
406
|
-
if (!
|
|
407
|
-
return
|
|
405
|
+
function Ft(e, t, r) {
|
|
406
|
+
if (!t)
|
|
407
|
+
return e;
|
|
408
408
|
const n = r && r.encode || qr;
|
|
409
409
|
d.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
412
|
const o = r && r.serialize;
|
|
413
413
|
let i;
|
|
414
|
-
if (o ? i = o(
|
|
415
|
-
const a =
|
|
416
|
-
a !== -1 && (
|
|
414
|
+
if (o ? i = o(t, r) : i = d.isURLSearchParams(t) ? t.toString() : new Ze(t, r).toString(n), i) {
|
|
415
|
+
const a = e.indexOf("#");
|
|
416
|
+
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
|
-
return
|
|
418
|
+
return e;
|
|
419
419
|
}
|
|
420
420
|
class at {
|
|
421
421
|
constructor() {
|
|
@@ -429,9 +429,9 @@ class at {
|
|
|
429
429
|
*
|
|
430
430
|
* @return {Number} An ID used to remove interceptor later
|
|
431
431
|
*/
|
|
432
|
-
use(
|
|
432
|
+
use(t, r, n) {
|
|
433
433
|
return this.handlers.push({
|
|
434
|
-
fulfilled:
|
|
434
|
+
fulfilled: t,
|
|
435
435
|
rejected: r,
|
|
436
436
|
synchronous: n ? n.synchronous : !1,
|
|
437
437
|
runWhen: n ? n.runWhen : null
|
|
@@ -444,8 +444,8 @@ class at {
|
|
|
444
444
|
*
|
|
445
445
|
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
446
446
|
*/
|
|
447
|
-
eject(
|
|
448
|
-
this.handlers[
|
|
447
|
+
eject(t) {
|
|
448
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
451
451
|
* Clear all interceptors from the stack
|
|
@@ -465,9 +465,9 @@ class at {
|
|
|
465
465
|
*
|
|
466
466
|
* @returns {void}
|
|
467
467
|
*/
|
|
468
|
-
forEach(
|
|
468
|
+
forEach(t) {
|
|
469
469
|
d.forEach(this.handlers, function(n) {
|
|
470
|
-
n !== null &&
|
|
470
|
+
n !== null && t(n);
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
@@ -495,93 +495,93 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xr
|
|
|
495
495
|
...Gr,
|
|
496
496
|
...Vr
|
|
497
497
|
};
|
|
498
|
-
function Zr(
|
|
499
|
-
return _e(
|
|
498
|
+
function Zr(e, t) {
|
|
499
|
+
return _e(e, new K.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(r, n, o, i) {
|
|
501
501
|
return K.isNode && d.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function Qr(
|
|
507
|
-
return d.matchAll(/\w+|\[(\w*)]/g,
|
|
506
|
+
function Qr(e) {
|
|
507
|
+
return d.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function en(
|
|
510
|
-
const
|
|
509
|
+
function en(e) {
|
|
510
|
+
const t = {}, r = Object.keys(e);
|
|
511
511
|
let n;
|
|
512
512
|
const o = r.length;
|
|
513
513
|
let i;
|
|
514
514
|
for (n = 0; n < o; n++)
|
|
515
|
-
i = r[n],
|
|
516
|
-
return
|
|
515
|
+
i = r[n], t[i] = e[i];
|
|
516
|
+
return t;
|
|
517
517
|
}
|
|
518
|
-
function Lt(
|
|
519
|
-
function
|
|
518
|
+
function Lt(e) {
|
|
519
|
+
function t(r, n, o, i) {
|
|
520
520
|
let a = r[i++];
|
|
521
521
|
if (a === "__proto__") return !0;
|
|
522
522
|
const l = Number.isFinite(+a), h = i >= r.length;
|
|
523
|
-
return a = !a && d.isArray(o) ? o.length : a, h ? (d.hasOwnProp(o, a) ? o[a] = [o[a], n] : o[a] = n, !l) : ((!o[a] || !d.isObject(o[a])) && (o[a] = []),
|
|
523
|
+
return a = !a && d.isArray(o) ? o.length : a, h ? (d.hasOwnProp(o, a) ? o[a] = [o[a], n] : o[a] = n, !l) : ((!o[a] || !d.isObject(o[a])) && (o[a] = []), t(r, n, o[a], i) && d.isArray(o[a]) && (o[a] = en(o[a])), !l);
|
|
524
524
|
}
|
|
525
|
-
if (d.isFormData(
|
|
525
|
+
if (d.isFormData(e) && d.isFunction(e.entries)) {
|
|
526
526
|
const r = {};
|
|
527
|
-
return d.forEachEntry(
|
|
528
|
-
|
|
527
|
+
return d.forEachEntry(e, (n, o) => {
|
|
528
|
+
t(Qr(n), o, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function tn(
|
|
534
|
-
if (d.isString(
|
|
533
|
+
function tn(e, t, r) {
|
|
534
|
+
if (d.isString(e))
|
|
535
535
|
try {
|
|
536
|
-
return (
|
|
536
|
+
return (t || JSON.parse)(e), d.trim(e);
|
|
537
537
|
} catch (n) {
|
|
538
538
|
if (n.name !== "SyntaxError")
|
|
539
539
|
throw n;
|
|
540
540
|
}
|
|
541
|
-
return (r || JSON.stringify)(
|
|
541
|
+
return (r || JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const Se = {
|
|
544
544
|
transitional: Dt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
|
-
transformRequest: [function(
|
|
547
|
-
const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, i = d.isObject(
|
|
548
|
-
if (i && d.isHTMLForm(
|
|
549
|
-
return o ? JSON.stringify(Lt(
|
|
550
|
-
if (d.isArrayBuffer(
|
|
551
|
-
return
|
|
552
|
-
if (d.isArrayBufferView(
|
|
553
|
-
return
|
|
554
|
-
if (d.isURLSearchParams(
|
|
555
|
-
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
|
|
546
|
+
transformRequest: [function(t, r) {
|
|
547
|
+
const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, i = d.isObject(t);
|
|
548
|
+
if (i && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
|
|
549
|
+
return o ? JSON.stringify(Lt(t)) : t;
|
|
550
|
+
if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
|
|
551
|
+
return t;
|
|
552
|
+
if (d.isArrayBufferView(t))
|
|
553
|
+
return t.buffer;
|
|
554
|
+
if (d.isURLSearchParams(t))
|
|
555
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
556
556
|
let l;
|
|
557
557
|
if (i) {
|
|
558
558
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return Zr(
|
|
560
|
-
if ((l = d.isFileList(
|
|
559
|
+
return Zr(t, this.formSerializer).toString();
|
|
560
|
+
if ((l = d.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const h = this.env && this.env.FormData;
|
|
562
562
|
return _e(
|
|
563
|
-
l ? { "files[]":
|
|
563
|
+
l ? { "files[]": t } : t,
|
|
564
564
|
h && new h(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i || o ? (r.setContentType("application/json", !1), tn(
|
|
569
|
+
return i || o ? (r.setContentType("application/json", !1), tn(t)) : t;
|
|
570
570
|
}],
|
|
571
|
-
transformResponse: [function(
|
|
571
|
+
transformResponse: [function(t) {
|
|
572
572
|
const r = this.transitional || Se.transitional, n = r && r.forcedJSONParsing, o = this.responseType === "json";
|
|
573
|
-
if (d.isResponse(
|
|
574
|
-
return
|
|
575
|
-
if (
|
|
573
|
+
if (d.isResponse(t) || d.isReadableStream(t))
|
|
574
|
+
return t;
|
|
575
|
+
if (t && d.isString(t) && (n && !this.responseType || o)) {
|
|
576
576
|
const a = !(r && r.silentJSONParsing) && o;
|
|
577
577
|
try {
|
|
578
|
-
return JSON.parse(
|
|
578
|
+
return JSON.parse(t, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
580
|
if (a)
|
|
581
581
|
throw l.name === "SyntaxError" ? _.from(l, _.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
return
|
|
584
|
+
return t;
|
|
585
585
|
}],
|
|
586
586
|
/**
|
|
587
587
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -596,8 +596,8 @@ const Se = {
|
|
|
596
596
|
FormData: K.classes.FormData,
|
|
597
597
|
Blob: K.classes.Blob
|
|
598
598
|
},
|
|
599
|
-
validateStatus: function(
|
|
600
|
-
return
|
|
599
|
+
validateStatus: function(t) {
|
|
600
|
+
return t >= 200 && t < 300;
|
|
601
601
|
},
|
|
602
602
|
headers: {
|
|
603
603
|
common: {
|
|
@@ -606,8 +606,8 @@ const Se = {
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
|
-
d.forEach(["delete", "get", "head", "post", "put", "patch"], (
|
|
610
|
-
Se.headers[
|
|
609
|
+
d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
|
+
Se.headers[e] = {};
|
|
611
611
|
});
|
|
612
612
|
const rn = d.toObjectSet([
|
|
613
613
|
"age",
|
|
@@ -627,57 +627,57 @@ const rn = d.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]), nn = (
|
|
631
|
-
const
|
|
630
|
+
]), nn = (e) => {
|
|
631
|
+
const t = {};
|
|
632
632
|
let r, n, o;
|
|
633
|
-
return
|
|
633
|
+
return e && e.split(`
|
|
634
634
|
`).forEach(function(a) {
|
|
635
|
-
o = a.indexOf(":"), r = a.substring(0, o).trim().toLowerCase(), n = a.substring(o + 1).trim(), !(!r ||
|
|
636
|
-
}),
|
|
635
|
+
o = a.indexOf(":"), r = a.substring(0, o).trim().toLowerCase(), n = a.substring(o + 1).trim(), !(!r || t[r] && rn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
636
|
+
}), t;
|
|
637
637
|
}, it = Symbol("internals");
|
|
638
|
-
function me(
|
|
639
|
-
return
|
|
638
|
+
function me(e) {
|
|
639
|
+
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
|
-
function Ce(
|
|
642
|
-
return
|
|
641
|
+
function Ce(e) {
|
|
642
|
+
return e === !1 || e == null ? e : d.isArray(e) ? e.map(Ce) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function sn(
|
|
645
|
-
const
|
|
644
|
+
function sn(e) {
|
|
645
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let n;
|
|
647
|
-
for (; n = r.exec(
|
|
648
|
-
|
|
649
|
-
return
|
|
647
|
+
for (; n = r.exec(e); )
|
|
648
|
+
t[n[1]] = n[2];
|
|
649
|
+
return t;
|
|
650
650
|
}
|
|
651
|
-
const on = (
|
|
652
|
-
function Le(
|
|
651
|
+
const on = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
+
function Le(e, t, r, n, o) {
|
|
653
653
|
if (d.isFunction(n))
|
|
654
|
-
return n.call(this,
|
|
655
|
-
if (o && (
|
|
654
|
+
return n.call(this, t, r);
|
|
655
|
+
if (o && (t = r), !!d.isString(t)) {
|
|
656
656
|
if (d.isString(n))
|
|
657
|
-
return
|
|
657
|
+
return t.indexOf(n) !== -1;
|
|
658
658
|
if (d.isRegExp(n))
|
|
659
|
-
return n.test(
|
|
659
|
+
return n.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function an(
|
|
663
|
-
return
|
|
662
|
+
function an(e) {
|
|
663
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
664
664
|
}
|
|
665
|
-
function ln(
|
|
666
|
-
const r = d.toCamelCase(" " +
|
|
665
|
+
function ln(e, t) {
|
|
666
|
+
const r = d.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((n) => {
|
|
668
|
-
Object.defineProperty(
|
|
668
|
+
Object.defineProperty(e, n + r, {
|
|
669
669
|
value: function(o, i, a) {
|
|
670
|
-
return this[n].call(this,
|
|
670
|
+
return this[n].call(this, t, o, i, a);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
let G = class {
|
|
677
|
-
constructor(
|
|
678
|
-
|
|
677
|
+
constructor(t) {
|
|
678
|
+
t && this.set(t);
|
|
679
679
|
}
|
|
680
|
-
set(
|
|
680
|
+
set(t, r, n) {
|
|
681
681
|
const o = this;
|
|
682
682
|
function i(l, h, p) {
|
|
683
683
|
const u = me(h);
|
|
@@ -687,25 +687,25 @@ let G = class {
|
|
|
687
687
|
(!b || o[b] === void 0 || p === !0 || p === void 0 && o[b] !== !1) && (o[b || h] = Ce(l));
|
|
688
688
|
}
|
|
689
689
|
const a = (l, h) => d.forEach(l, (p, u) => i(p, u, h));
|
|
690
|
-
if (d.isPlainObject(
|
|
691
|
-
a(
|
|
692
|
-
else if (d.isString(
|
|
693
|
-
a(nn(
|
|
694
|
-
else if (d.isObject(
|
|
690
|
+
if (d.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
+
a(t, r);
|
|
692
|
+
else if (d.isString(t) && (t = t.trim()) && !on(t))
|
|
693
|
+
a(nn(t), r);
|
|
694
|
+
else if (d.isObject(t) && d.isIterable(t)) {
|
|
695
695
|
let l = {}, h, p;
|
|
696
|
-
for (const u of
|
|
696
|
+
for (const u of t) {
|
|
697
697
|
if (!d.isArray(u))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
699
|
l[p = u[0]] = (h = l[p]) ? d.isArray(h) ? [...h, u[1]] : [h, u[1]] : u[1];
|
|
700
700
|
}
|
|
701
701
|
a(l, r);
|
|
702
702
|
} else
|
|
703
|
-
|
|
703
|
+
t != null && i(r, t, n);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
|
-
get(
|
|
707
|
-
if (
|
|
708
|
-
const n = d.findKey(this,
|
|
706
|
+
get(t, r) {
|
|
707
|
+
if (t = me(t), t) {
|
|
708
|
+
const n = d.findKey(this, t);
|
|
709
709
|
if (n) {
|
|
710
710
|
const o = this[n];
|
|
711
711
|
if (!r)
|
|
@@ -720,14 +720,14 @@ let G = class {
|
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
has(
|
|
724
|
-
if (
|
|
725
|
-
const n = d.findKey(this,
|
|
723
|
+
has(t, r) {
|
|
724
|
+
if (t = me(t), t) {
|
|
725
|
+
const n = d.findKey(this, t);
|
|
726
726
|
return !!(n && this[n] !== void 0 && (!r || Le(this, this[n], n, r)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
730
|
-
delete(
|
|
730
|
+
delete(t, r) {
|
|
731
731
|
const n = this;
|
|
732
732
|
let o = !1;
|
|
733
733
|
function i(a) {
|
|
@@ -736,18 +736,18 @@ let G = class {
|
|
|
736
736
|
l && (!r || Le(n, n[l], l, r)) && (delete n[l], o = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return d.isArray(
|
|
739
|
+
return d.isArray(t) ? t.forEach(i) : i(t), o;
|
|
740
740
|
}
|
|
741
|
-
clear(
|
|
741
|
+
clear(t) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
743
|
let n = r.length, o = !1;
|
|
744
744
|
for (; n--; ) {
|
|
745
745
|
const i = r[n];
|
|
746
|
-
(!
|
|
746
|
+
(!t || Le(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
747
747
|
}
|
|
748
748
|
return o;
|
|
749
749
|
}
|
|
750
|
-
normalize(
|
|
750
|
+
normalize(t) {
|
|
751
751
|
const r = this, n = {};
|
|
752
752
|
return d.forEach(this, (o, i) => {
|
|
753
753
|
const a = d.findKey(n, i);
|
|
@@ -755,24 +755,24 @@ let G = class {
|
|
|
755
755
|
r[a] = Ce(o), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const l =
|
|
758
|
+
const l = t ? an(i) : String(i).trim();
|
|
759
759
|
l !== i && delete r[i], r[l] = Ce(o), n[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
|
-
concat(...
|
|
763
|
-
return this.constructor.concat(this, ...
|
|
762
|
+
concat(...t) {
|
|
763
|
+
return this.constructor.concat(this, ...t);
|
|
764
764
|
}
|
|
765
|
-
toJSON(
|
|
765
|
+
toJSON(t) {
|
|
766
766
|
const r = /* @__PURE__ */ Object.create(null);
|
|
767
767
|
return d.forEach(this, (n, o) => {
|
|
768
|
-
n != null && n !== !1 && (r[o] =
|
|
768
|
+
n != null && n !== !1 && (r[o] = t && d.isArray(n) ? n.join(", ") : n);
|
|
769
769
|
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
772
772
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
773
773
|
}
|
|
774
774
|
toString() {
|
|
775
|
-
return Object.entries(this.toJSON()).map(([
|
|
775
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
776
776
|
`);
|
|
777
777
|
}
|
|
778
778
|
getSetCookie() {
|
|
@@ -781,14 +781,14 @@ let G = class {
|
|
|
781
781
|
get [Symbol.toStringTag]() {
|
|
782
782
|
return "AxiosHeaders";
|
|
783
783
|
}
|
|
784
|
-
static from(
|
|
785
|
-
return
|
|
784
|
+
static from(t) {
|
|
785
|
+
return t instanceof this ? t : new this(t);
|
|
786
786
|
}
|
|
787
|
-
static concat(
|
|
788
|
-
const n = new this(
|
|
787
|
+
static concat(t, ...r) {
|
|
788
|
+
const n = new this(t);
|
|
789
789
|
return r.forEach((o) => n.set(o)), n;
|
|
790
790
|
}
|
|
791
|
-
static accessor(
|
|
791
|
+
static accessor(t) {
|
|
792
792
|
const n = (this[it] = this[it] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, o = this.prototype;
|
|
@@ -796,39 +796,39 @@ let G = class {
|
|
|
796
796
|
const l = me(a);
|
|
797
797
|
n[l] || (ln(o, a), n[l] = !0);
|
|
798
798
|
}
|
|
799
|
-
return d.isArray(
|
|
799
|
+
return d.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
G.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
803
|
-
d.reduceDescriptors(G.prototype, ({ value:
|
|
804
|
-
let r =
|
|
803
|
+
d.reduceDescriptors(G.prototype, ({ value: e }, t) => {
|
|
804
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
805
805
|
return {
|
|
806
|
-
get: () =>
|
|
806
|
+
get: () => e,
|
|
807
807
|
set(n) {
|
|
808
808
|
this[r] = n;
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
d.freezeMethods(G);
|
|
813
|
-
function Me(
|
|
814
|
-
const r = this || Se, n =
|
|
813
|
+
function Me(e, t) {
|
|
814
|
+
const r = this || Se, n = t || r, o = G.from(n.headers);
|
|
815
815
|
let i = n.data;
|
|
816
|
-
return d.forEach(
|
|
817
|
-
i = l.call(r, i, o.normalize(),
|
|
816
|
+
return d.forEach(e, function(l) {
|
|
817
|
+
i = l.call(r, i, o.normalize(), t ? t.status : void 0);
|
|
818
818
|
}), o.normalize(), i;
|
|
819
819
|
}
|
|
820
|
-
function Mt(
|
|
821
|
-
return !!(
|
|
820
|
+
function Mt(e) {
|
|
821
|
+
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
|
-
function pe(
|
|
824
|
-
_.call(this,
|
|
823
|
+
function pe(e, t, r) {
|
|
824
|
+
_.call(this, e ?? "canceled", _.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
825
825
|
}
|
|
826
826
|
d.inherits(pe, _, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function Bt(
|
|
829
|
+
function Bt(e, t, r) {
|
|
830
830
|
const n = r.config.validateStatus;
|
|
831
|
-
!r.status || !n || n(r.status) ?
|
|
831
|
+
!r.status || !n || n(r.status) ? e(r) : t(new _(
|
|
832
832
|
"Request failed with status code " + r.status,
|
|
833
833
|
[_.ERR_BAD_REQUEST, _.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
834
834
|
r.config,
|
|
@@ -836,30 +836,30 @@ function Bt(t, e, r) {
|
|
|
836
836
|
r
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function cn(
|
|
840
|
-
const
|
|
841
|
-
return
|
|
839
|
+
function cn(e) {
|
|
840
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
|
+
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function dn(
|
|
844
|
-
|
|
845
|
-
const r = new Array(
|
|
843
|
+
function dn(e, t) {
|
|
844
|
+
e = e || 10;
|
|
845
|
+
const r = new Array(e), n = new Array(e);
|
|
846
846
|
let o = 0, i = 0, a;
|
|
847
|
-
return
|
|
847
|
+
return t = t !== void 0 ? t : 1e3, function(h) {
|
|
848
848
|
const p = Date.now(), u = n[i];
|
|
849
849
|
a || (a = p), r[o] = h, n[o] = p;
|
|
850
850
|
let b = i, C = 0;
|
|
851
851
|
for (; b !== o; )
|
|
852
|
-
C += r[b++], b = b %
|
|
853
|
-
if (o = (o + 1) %
|
|
852
|
+
C += r[b++], b = b % e;
|
|
853
|
+
if (o = (o + 1) % e, o === i && (i = (i + 1) % e), p - a < t)
|
|
854
854
|
return;
|
|
855
855
|
const S = u && p - u;
|
|
856
856
|
return S ? Math.round(C * 1e3 / S) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function un(
|
|
860
|
-
let r = 0, n = 1e3 /
|
|
859
|
+
function un(e, t) {
|
|
860
|
+
let r = 0, n = 1e3 / t, o, i;
|
|
861
861
|
const a = (p, u = Date.now()) => {
|
|
862
|
-
r = u, o = null, i && (clearTimeout(i), i = null),
|
|
862
|
+
r = u, o = null, i && (clearTimeout(i), i = null), e(...p);
|
|
863
863
|
};
|
|
864
864
|
return [(...p) => {
|
|
865
865
|
const u = Date.now(), b = u - r;
|
|
@@ -868,7 +868,7 @@ function un(t, e) {
|
|
|
868
868
|
}, n - b)));
|
|
869
869
|
}, () => o && a(o)];
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const Oe = (e, t, r = 3) => {
|
|
872
872
|
let n = 0;
|
|
873
873
|
const o = dn(50, 250);
|
|
874
874
|
return un((i) => {
|
|
@@ -883,33 +883,33 @@ const Ie = (t, e, r = 3) => {
|
|
|
883
883
|
estimated: p && l && u ? (l - a) / p : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
|
-
[
|
|
886
|
+
[t ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
|
|
888
|
+
e(b);
|
|
889
889
|
}, r);
|
|
890
|
-
}, lt = (
|
|
891
|
-
const r =
|
|
892
|
-
return [(n) =>
|
|
890
|
+
}, lt = (e, t) => {
|
|
891
|
+
const r = e != null;
|
|
892
|
+
return [(n) => t[0]({
|
|
893
893
|
lengthComputable: r,
|
|
894
|
-
total:
|
|
894
|
+
total: e,
|
|
895
895
|
loaded: n
|
|
896
|
-
}),
|
|
897
|
-
}, ct = (
|
|
896
|
+
}), t[1]];
|
|
897
|
+
}, ct = (e) => (...t) => d.asap(() => e(...t)), pn = 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)))(
|
|
898
898
|
new URL(K.origin),
|
|
899
899
|
K.navigator && /(msie|trident)/i.test(K.navigator.userAgent)
|
|
900
900
|
) : () => !0, fn = K.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(
|
|
904
|
-
const a = [
|
|
903
|
+
write(e, t, r, n, o, i) {
|
|
904
|
+
const a = [e + "=" + encodeURIComponent(t)];
|
|
905
905
|
d.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), d.isString(n) && a.push("path=" + n), d.isString(o) && a.push("domain=" + o), i === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
906
906
|
},
|
|
907
|
-
read(
|
|
908
|
-
const
|
|
909
|
-
return
|
|
907
|
+
read(e) {
|
|
908
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
909
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
910
910
|
},
|
|
911
|
-
remove(
|
|
912
|
-
this.write(
|
|
911
|
+
remove(e) {
|
|
912
|
+
this.write(e, "", Date.now() - 864e5);
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
) : (
|
|
@@ -924,19 +924,19 @@ const Ie = (t, e, r = 3) => {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
|
-
function xn(
|
|
928
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(
|
|
927
|
+
function xn(e) {
|
|
928
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
929
|
}
|
|
930
|
-
function hn(
|
|
931
|
-
return
|
|
930
|
+
function hn(e, t) {
|
|
931
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
932
|
}
|
|
933
|
-
function qt(
|
|
934
|
-
let n = !xn(
|
|
935
|
-
return
|
|
933
|
+
function qt(e, t, r) {
|
|
934
|
+
let n = !xn(t);
|
|
935
|
+
return e && (n || r == !1) ? hn(e, t) : t;
|
|
936
936
|
}
|
|
937
|
-
const dt = (
|
|
938
|
-
function oe(
|
|
939
|
-
|
|
937
|
+
const dt = (e) => e instanceof G ? { ...e } : e;
|
|
938
|
+
function oe(e, t) {
|
|
939
|
+
t = t || {};
|
|
940
940
|
const r = {};
|
|
941
941
|
function n(p, u, b, C) {
|
|
942
942
|
return d.isPlainObject(p) && d.isPlainObject(u) ? d.merge.call({ caseless: C }, p, u) : d.isPlainObject(u) ? d.merge({}, u) : d.isArray(u) ? u.slice() : u;
|
|
@@ -958,9 +958,9 @@ function oe(t, e) {
|
|
|
958
958
|
} else return n(void 0, u);
|
|
959
959
|
}
|
|
960
960
|
function l(p, u, b) {
|
|
961
|
-
if (b in e)
|
|
962
|
-
return n(p, u);
|
|
963
961
|
if (b in t)
|
|
962
|
+
return n(p, u);
|
|
963
|
+
if (b in e)
|
|
964
964
|
return n(void 0, p);
|
|
965
965
|
}
|
|
966
966
|
const h = {
|
|
@@ -994,15 +994,15 @@ function oe(t, e) {
|
|
|
994
994
|
validateStatus: l,
|
|
995
995
|
headers: (p, u, b) => o(dt(p), dt(u), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return d.forEach(Object.keys({ ...
|
|
998
|
-
const b = h[u] || o, C = b(
|
|
997
|
+
return d.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
998
|
+
const b = h[u] || o, C = b(e[u], t[u], u);
|
|
999
999
|
d.isUndefined(C) && b !== l || (r[u] = C);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
|
-
const Wt = (
|
|
1003
|
-
const
|
|
1004
|
-
let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: i, headers: a, auth: l } =
|
|
1005
|
-
if (
|
|
1002
|
+
const Wt = (e) => {
|
|
1003
|
+
const t = oe({}, e);
|
|
1004
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: i, headers: a, auth: l } = t;
|
|
1005
|
+
if (t.headers = a = G.from(a), t.url = Ft(qt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && a.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), d.isFormData(r)) {
|
|
@@ -1015,14 +1015,14 @@ const Wt = (t) => {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (K.hasStandardBrowserEnv && (n && d.isFunction(n) && (n = n(
|
|
1018
|
+
if (K.hasStandardBrowserEnv && (n && d.isFunction(n) && (n = n(t)), n || n !== !1 && pn(t.url))) {
|
|
1019
1019
|
const h = o && i && fn.read(i);
|
|
1020
1020
|
h && a.set(o, h);
|
|
1021
1021
|
}
|
|
1022
|
-
return
|
|
1023
|
-
}, mn = typeof XMLHttpRequest < "u", gn = mn && function(
|
|
1022
|
+
return t;
|
|
1023
|
+
}, mn = typeof XMLHttpRequest < "u", gn = mn && function(e) {
|
|
1024
1024
|
return new Promise(function(r, n) {
|
|
1025
|
-
const o = Wt(
|
|
1025
|
+
const o = Wt(e);
|
|
1026
1026
|
let i = o.data;
|
|
1027
1027
|
const a = G.from(o.headers).normalize();
|
|
1028
1028
|
let { responseType: l, onUploadProgress: h, onDownloadProgress: p } = o, u, b, C, S, c;
|
|
@@ -1041,21 +1041,21 @@ const Wt = (t) => {
|
|
|
1041
1041
|
status: y.status,
|
|
1042
1042
|
statusText: y.statusText,
|
|
1043
1043
|
headers: v,
|
|
1044
|
-
config:
|
|
1044
|
+
config: e,
|
|
1045
1045
|
request: y
|
|
1046
1046
|
};
|
|
1047
|
-
Bt(function(
|
|
1048
|
-
r(
|
|
1049
|
-
}, function(
|
|
1050
|
-
n(
|
|
1047
|
+
Bt(function(O) {
|
|
1048
|
+
r(O), g();
|
|
1049
|
+
}, function(O) {
|
|
1050
|
+
n(O), g();
|
|
1051
1051
|
}, F), y = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in y ? y.onloadend = P : y.onreadystatechange = function() {
|
|
1054
1054
|
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(P);
|
|
1055
1055
|
}, y.onabort = function() {
|
|
1056
|
-
y && (n(new _("Request aborted", _.ECONNABORTED,
|
|
1056
|
+
y && (n(new _("Request aborted", _.ECONNABORTED, e, y)), y = null);
|
|
1057
1057
|
}, y.onerror = function(U) {
|
|
1058
|
-
const F = U && U.message ? U.message : "Network Error", m = new _(F, _.ERR_NETWORK,
|
|
1058
|
+
const F = U && U.message ? U.message : "Network Error", m = new _(F, _.ERR_NETWORK, e, y);
|
|
1059
1059
|
m.event = U || null, n(m), y = null;
|
|
1060
1060
|
}, y.ontimeout = function() {
|
|
1061
1061
|
let U = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
@@ -1063,24 +1063,24 @@ const Wt = (t) => {
|
|
|
1063
1063
|
o.timeoutErrorMessage && (U = o.timeoutErrorMessage), n(new _(
|
|
1064
1064
|
U,
|
|
1065
1065
|
F.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
|
|
1066
|
-
|
|
1066
|
+
e,
|
|
1067
1067
|
y
|
|
1068
1068
|
)), y = null;
|
|
1069
1069
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in y && d.forEach(a.toJSON(), function(U, F) {
|
|
1070
1070
|
y.setRequestHeader(F, U);
|
|
1071
|
-
}), d.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), l && l !== "json" && (y.responseType = o.responseType), p && ([C, c] =
|
|
1072
|
-
y && (n(!v || v.type ? new pe(null,
|
|
1071
|
+
}), d.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), l && l !== "json" && (y.responseType = o.responseType), p && ([C, c] = Oe(p, !0), y.addEventListener("progress", C)), h && y.upload && ([b, S] = Oe(h), y.upload.addEventListener("progress", b), y.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (v) => {
|
|
1072
|
+
y && (n(!v || v.type ? new pe(null, e, y) : v), y.abort(), y = null);
|
|
1073
1073
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1074
1074
|
const B = cn(o.url);
|
|
1075
1075
|
if (B && K.protocols.indexOf(B) === -1) {
|
|
1076
|
-
n(new _("Unsupported protocol " + B + ":", _.ERR_BAD_REQUEST,
|
|
1076
|
+
n(new _("Unsupported protocol " + B + ":", _.ERR_BAD_REQUEST, e));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
y.send(i || null);
|
|
1080
1080
|
});
|
|
1081
|
-
}, yn = (
|
|
1082
|
-
const { length: r } =
|
|
1083
|
-
if (
|
|
1081
|
+
}, yn = (e, t) => {
|
|
1082
|
+
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1083
|
+
if (t || r) {
|
|
1084
1084
|
let n = new AbortController(), o;
|
|
1085
1085
|
const i = function(p) {
|
|
1086
1086
|
if (!o) {
|
|
@@ -1089,48 +1089,48 @@ const Wt = (t) => {
|
|
|
1089
1089
|
n.abort(u instanceof _ ? u : new pe(u instanceof Error ? u.message : u));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let a =
|
|
1093
|
-
a = null, i(new _(`timeout ${
|
|
1094
|
-
},
|
|
1092
|
+
let a = t && setTimeout(() => {
|
|
1093
|
+
a = null, i(new _(`timeout ${t} of ms exceeded`, _.ETIMEDOUT));
|
|
1094
|
+
}, t);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
|
|
1096
|
+
e && (a && clearTimeout(a), a = null, e.forEach((p) => {
|
|
1097
1097
|
p.unsubscribe ? p.unsubscribe(i) : p.removeEventListener("abort", i);
|
|
1098
|
-
}),
|
|
1098
|
+
}), e = null);
|
|
1099
1099
|
};
|
|
1100
|
-
|
|
1100
|
+
e.forEach((p) => p.addEventListener("abort", i));
|
|
1101
1101
|
const { signal: h } = n;
|
|
1102
1102
|
return h.unsubscribe = () => d.asap(l), h;
|
|
1103
1103
|
}
|
|
1104
|
-
}, bn = function* (
|
|
1105
|
-
let r =
|
|
1106
|
-
if (r <
|
|
1107
|
-
yield
|
|
1104
|
+
}, bn = function* (e, t) {
|
|
1105
|
+
let r = e.byteLength;
|
|
1106
|
+
if (r < t) {
|
|
1107
|
+
yield e;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
1110
|
let n = 0, o;
|
|
1111
1111
|
for (; n < r; )
|
|
1112
|
-
o = n +
|
|
1113
|
-
}, wn = async function* (
|
|
1114
|
-
for await (const r of vn(
|
|
1115
|
-
yield* bn(r,
|
|
1116
|
-
}, vn = async function* (
|
|
1117
|
-
if (
|
|
1118
|
-
yield*
|
|
1112
|
+
o = n + t, yield e.slice(n, o), n = o;
|
|
1113
|
+
}, wn = async function* (e, t) {
|
|
1114
|
+
for await (const r of vn(e))
|
|
1115
|
+
yield* bn(r, t);
|
|
1116
|
+
}, vn = async function* (e) {
|
|
1117
|
+
if (e[Symbol.asyncIterator]) {
|
|
1118
|
+
yield* e;
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1121
|
+
const t = e.getReader();
|
|
1122
1122
|
try {
|
|
1123
1123
|
for (; ; ) {
|
|
1124
|
-
const { done: r, value: n } = await
|
|
1124
|
+
const { done: r, value: n } = await t.read();
|
|
1125
1125
|
if (r)
|
|
1126
1126
|
break;
|
|
1127
1127
|
yield n;
|
|
1128
1128
|
}
|
|
1129
1129
|
} finally {
|
|
1130
|
-
await
|
|
1130
|
+
await t.cancel();
|
|
1131
1131
|
}
|
|
1132
|
-
}, ut = (
|
|
1133
|
-
const o = wn(
|
|
1132
|
+
}, ut = (e, t, r, n) => {
|
|
1133
|
+
const o = wn(e, t);
|
|
1134
1134
|
let i = 0, a, l = (h) => {
|
|
1135
1135
|
a || (a = !0, n && n(h));
|
|
1136
1136
|
};
|
|
@@ -1158,23 +1158,23 @@ const Wt = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
}, pt = 64 * 1024, { isFunction: ke } = d, jn = (({ Request:
|
|
1162
|
-
Request:
|
|
1163
|
-
Response:
|
|
1161
|
+
}, pt = 64 * 1024, { isFunction: ke } = d, jn = (({ Request: e, Response: t }) => ({
|
|
1162
|
+
Request: e,
|
|
1163
|
+
Response: t
|
|
1164
1164
|
}))(d.global), {
|
|
1165
1165
|
ReadableStream: ft,
|
|
1166
1166
|
TextEncoder: xt
|
|
1167
|
-
} = d.global, ht = (
|
|
1167
|
+
} = d.global, ht = (e, ...t) => {
|
|
1168
1168
|
try {
|
|
1169
|
-
return !!
|
|
1169
|
+
return !!e(...t);
|
|
1170
1170
|
} catch {
|
|
1171
1171
|
return !1;
|
|
1172
1172
|
}
|
|
1173
|
-
}, Sn = (
|
|
1174
|
-
|
|
1173
|
+
}, Sn = (e) => {
|
|
1174
|
+
e = d.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
|
-
}, jn,
|
|
1177
|
-
const { fetch:
|
|
1176
|
+
}, jn, e);
|
|
1177
|
+
const { fetch: t, Request: r, Response: n } = e, o = t ? ke(t) : typeof fetch == "function", i = ke(r), a = ke(n);
|
|
1178
1178
|
if (!o)
|
|
1179
1179
|
return !1;
|
|
1180
1180
|
const l = o && ke(ft), h = o && (typeof xt == "function" ? /* @__PURE__ */ ((c) => (g) => c.encode(g))(new xt()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), p = i && l && ht(() => {
|
|
@@ -1226,13 +1226,13 @@ const Wt = (t) => {
|
|
|
1226
1226
|
timeout: U,
|
|
1227
1227
|
onDownloadProgress: F,
|
|
1228
1228
|
onUploadProgress: m,
|
|
1229
|
-
responseType:
|
|
1229
|
+
responseType: O,
|
|
1230
1230
|
headers: w,
|
|
1231
1231
|
withCredentials: L = "same-origin",
|
|
1232
1232
|
fetchOptions: V
|
|
1233
|
-
} = Wt(c), N =
|
|
1234
|
-
|
|
1235
|
-
let A = yn([B, v && v.toAbortSignal()], U),
|
|
1233
|
+
} = Wt(c), N = t || fetch;
|
|
1234
|
+
O = O ? (O + "").toLowerCase() : "text";
|
|
1235
|
+
let A = yn([B, v && v.toAbortSignal()], U), I = null;
|
|
1236
1236
|
const k = A && A.unsubscribe && (() => {
|
|
1237
1237
|
A.unsubscribe();
|
|
1238
1238
|
});
|
|
@@ -1247,7 +1247,7 @@ const Wt = (t) => {
|
|
|
1247
1247
|
if (d.isFormData(P) && (D = T.headers.get("content-type")) && w.setContentType(D), T.body) {
|
|
1248
1248
|
const [x, j] = lt(
|
|
1249
1249
|
z,
|
|
1250
|
-
|
|
1250
|
+
Oe(ct(m))
|
|
1251
1251
|
);
|
|
1252
1252
|
P = ut(T.body, pt, x, j);
|
|
1253
1253
|
}
|
|
@@ -1262,9 +1262,9 @@ const Wt = (t) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: E ? L : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
|
|
1266
|
-
let M = await (i ? N(
|
|
1267
|
-
const H = u && (
|
|
1265
|
+
I = i && new r(g, R);
|
|
1266
|
+
let M = await (i ? N(I, V) : N(g, R));
|
|
1267
|
+
const H = u && (O === "stream" || O === "response");
|
|
1268
1268
|
if (u && (F || H && k)) {
|
|
1269
1269
|
const T = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((W) => {
|
|
@@ -1272,7 +1272,7 @@ const Wt = (t) => {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
const D = d.toFiniteNumber(M.headers.get("content-length")), [x, j] = F && lt(
|
|
1274
1274
|
D,
|
|
1275
|
-
|
|
1275
|
+
Oe(ct(F), !0)
|
|
1276
1276
|
) || [];
|
|
1277
1277
|
M = new n(
|
|
1278
1278
|
ut(M.body, pt, x, () => {
|
|
@@ -1281,8 +1281,8 @@ const Wt = (t) => {
|
|
|
1281
1281
|
T
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1285
|
-
let f = await b[d.findKey(b,
|
|
1284
|
+
O = O || "text";
|
|
1285
|
+
let f = await b[d.findKey(b, O) || "text"](M, c);
|
|
1286
1286
|
return !H && k && k(), await new Promise((T, D) => {
|
|
1287
1287
|
Bt(T, D, {
|
|
1288
1288
|
data: f,
|
|
@@ -1290,28 +1290,28 @@ const Wt = (t) => {
|
|
|
1290
1290
|
status: M.status,
|
|
1291
1291
|
statusText: M.statusText,
|
|
1292
1292
|
config: c,
|
|
1293
|
-
request:
|
|
1293
|
+
request: I
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (E) {
|
|
1297
1297
|
throw k && k(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1298
|
-
new _("Network Error", _.ERR_NETWORK, c,
|
|
1298
|
+
new _("Network Error", _.ERR_NETWORK, c, I),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: E.cause || E
|
|
1301
1301
|
}
|
|
1302
|
-
) : _.from(E, E && E.code, c,
|
|
1302
|
+
) : _.from(E, E && E.code, c, I);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
}, kn = /* @__PURE__ */ new Map(), Ht = (
|
|
1306
|
-
let
|
|
1307
|
-
const { fetch: r, Request: n, Response: o } =
|
|
1305
|
+
}, kn = /* @__PURE__ */ new Map(), Ht = (e) => {
|
|
1306
|
+
let t = e ? e.env : {};
|
|
1307
|
+
const { fetch: r, Request: n, Response: o } = t, i = [
|
|
1308
1308
|
n,
|
|
1309
1309
|
o,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
1312
|
let a = i.length, l = a, h, p, u = kn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], p = u.get(h), p === void 0 && u.set(h, p = l ? /* @__PURE__ */ new Map() : Sn(
|
|
1314
|
+
h = i[l], p = u.get(h), p === void 0 && u.set(h, p = l ? /* @__PURE__ */ new Map() : Sn(t)), u = p;
|
|
1315
1315
|
return p;
|
|
1316
1316
|
};
|
|
1317
1317
|
Ht();
|
|
@@ -1322,27 +1322,27 @@ const Je = {
|
|
|
1322
1322
|
get: Ht
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
d.forEach(Je, (
|
|
1326
|
-
if (
|
|
1325
|
+
d.forEach(Je, (e, t) => {
|
|
1326
|
+
if (e) {
|
|
1327
1327
|
try {
|
|
1328
|
-
Object.defineProperty(
|
|
1328
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1329
1329
|
} catch {
|
|
1330
1330
|
}
|
|
1331
|
-
Object.defineProperty(
|
|
1331
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const mt = (
|
|
1335
|
-
getAdapter: (
|
|
1336
|
-
|
|
1337
|
-
const { length: r } =
|
|
1334
|
+
const mt = (e) => `- ${e}`, En = (e) => d.isFunction(e) || e === null || e === !1, Yt = {
|
|
1335
|
+
getAdapter: (e, t) => {
|
|
1336
|
+
e = d.isArray(e) ? e : [e];
|
|
1337
|
+
const { length: r } = e;
|
|
1338
1338
|
let n, o;
|
|
1339
1339
|
const i = {};
|
|
1340
1340
|
for (let a = 0; a < r; a++) {
|
|
1341
|
-
n =
|
|
1341
|
+
n = e[a];
|
|
1342
1342
|
let l;
|
|
1343
1343
|
if (o = n, !En(n) && (o = Je[(l = String(n)).toLowerCase()], o === void 0))
|
|
1344
1344
|
throw new _(`Unknown adapter '${l}'`);
|
|
1345
|
-
if (o && (d.isFunction(o) || (o = o.get(
|
|
1345
|
+
if (o && (d.isFunction(o) || (o = o.get(t))))
|
|
1346
1346
|
break;
|
|
1347
1347
|
i[l || "#" + a] = o;
|
|
1348
1348
|
}
|
|
@@ -1362,41 +1362,41 @@ const mt = (t) => `- ${t}`, En = (t) => d.isFunction(t) || t === null || t === !
|
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: Je
|
|
1364
1364
|
};
|
|
1365
|
-
function Be(
|
|
1366
|
-
if (
|
|
1367
|
-
throw new pe(null,
|
|
1365
|
+
function Be(e) {
|
|
1366
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1367
|
+
throw new pe(null, e);
|
|
1368
1368
|
}
|
|
1369
|
-
function gt(
|
|
1370
|
-
return Be(
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(
|
|
1374
|
-
return Be(
|
|
1375
|
-
|
|
1376
|
-
|
|
1369
|
+
function gt(e) {
|
|
1370
|
+
return Be(e), e.headers = G.from(e.headers), e.data = Me.call(
|
|
1371
|
+
e,
|
|
1372
|
+
e.transformRequest
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Yt.getAdapter(e.adapter || Se.adapter, e)(e).then(function(n) {
|
|
1374
|
+
return Be(e), n.data = Me.call(
|
|
1375
|
+
e,
|
|
1376
|
+
e.transformResponse,
|
|
1377
1377
|
n
|
|
1378
1378
|
), n.headers = G.from(n.headers), n;
|
|
1379
1379
|
}, function(n) {
|
|
1380
|
-
return Mt(n) || (Be(
|
|
1381
|
-
|
|
1382
|
-
|
|
1380
|
+
return Mt(n) || (Be(e), n && n.response && (n.response.data = Me.call(
|
|
1381
|
+
e,
|
|
1382
|
+
e.transformResponse,
|
|
1383
1383
|
n.response
|
|
1384
1384
|
), n.response.headers = G.from(n.response.headers))), Promise.reject(n);
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
const Vt = "1.12.2", $e = {};
|
|
1388
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((
|
|
1389
|
-
$e[
|
|
1390
|
-
return typeof n ===
|
|
1388
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1389
|
+
$e[e] = function(n) {
|
|
1390
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1391
1391
|
};
|
|
1392
1392
|
});
|
|
1393
1393
|
const yt = {};
|
|
1394
|
-
$e.transitional = function(
|
|
1394
|
+
$e.transitional = function(t, r, n) {
|
|
1395
1395
|
function o(i, a) {
|
|
1396
1396
|
return "[Axios v" + Vt + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
|
|
1397
1397
|
}
|
|
1398
1398
|
return (i, a, l) => {
|
|
1399
|
-
if (
|
|
1399
|
+
if (t === !1)
|
|
1400
1400
|
throw new _(
|
|
1401
1401
|
o(a, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
_.ERR_DEPRECATED
|
|
@@ -1406,21 +1406,21 @@ $e.transitional = function(e, r, n) {
|
|
|
1406
1406
|
a,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)),
|
|
1409
|
+
)), t ? t(i, a, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
|
-
$e.spelling = function(
|
|
1413
|
-
return (r, n) => (console.warn(`${n} is likely a misspelling of ${
|
|
1412
|
+
$e.spelling = function(t) {
|
|
1413
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1414
1414
|
};
|
|
1415
|
-
function Tn(
|
|
1416
|
-
if (typeof
|
|
1415
|
+
function Tn(e, t, r) {
|
|
1416
|
+
if (typeof e != "object")
|
|
1417
1417
|
throw new _("options must be an object", _.ERR_BAD_OPTION_VALUE);
|
|
1418
|
-
const n = Object.keys(
|
|
1418
|
+
const n = Object.keys(e);
|
|
1419
1419
|
let o = n.length;
|
|
1420
1420
|
for (; o-- > 0; ) {
|
|
1421
|
-
const i = n[o], a =
|
|
1421
|
+
const i = n[o], a = t[i];
|
|
1422
1422
|
if (a) {
|
|
1423
|
-
const l =
|
|
1423
|
+
const l = e[i], h = l === void 0 || a(l, i, e);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
1425
|
throw new _("option " + i + " must be " + h, _.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
@@ -1434,8 +1434,8 @@ const Re = {
|
|
|
1434
1434
|
validators: $e
|
|
1435
1435
|
}, ee = Re.validators;
|
|
1436
1436
|
let se = class {
|
|
1437
|
-
constructor(
|
|
1438
|
-
this.defaults =
|
|
1437
|
+
constructor(t) {
|
|
1438
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1439
1439
|
request: new at(),
|
|
1440
1440
|
response: new at()
|
|
1441
1441
|
};
|
|
@@ -1448,9 +1448,9 @@ let se = class {
|
|
|
1448
1448
|
*
|
|
1449
1449
|
* @returns {Promise} The Promise to be fulfilled
|
|
1450
1450
|
*/
|
|
1451
|
-
async request(
|
|
1451
|
+
async request(t, r) {
|
|
1452
1452
|
try {
|
|
1453
|
-
return await this._request(
|
|
1453
|
+
return await this._request(t, r);
|
|
1454
1454
|
} catch (n) {
|
|
1455
1455
|
if (n instanceof Error) {
|
|
1456
1456
|
let o = {};
|
|
@@ -1465,8 +1465,8 @@ let se = class {
|
|
|
1465
1465
|
throw n;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
_request(
|
|
1469
|
-
typeof
|
|
1468
|
+
_request(t, r) {
|
|
1469
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = oe(this.defaults, r);
|
|
1470
1470
|
const { transitional: n, paramsSerializer: o, headers: i } = r;
|
|
1471
1471
|
n !== void 0 && Re.assertOptions(n, {
|
|
1472
1472
|
silentJSONParsing: ee.transitional(ee.boolean),
|
|
@@ -1527,26 +1527,26 @@ let se = class {
|
|
|
1527
1527
|
u = u.then(p[b++], p[b++]);
|
|
1528
1528
|
return u;
|
|
1529
1529
|
}
|
|
1530
|
-
getUri(
|
|
1531
|
-
|
|
1532
|
-
const r = qt(
|
|
1533
|
-
return Ft(r,
|
|
1530
|
+
getUri(t) {
|
|
1531
|
+
t = oe(this.defaults, t);
|
|
1532
|
+
const r = qt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1533
|
+
return Ft(r, t.params, t.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
d.forEach(["delete", "get", "head", "options"], function(
|
|
1537
|
-
se.prototype[
|
|
1536
|
+
d.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1537
|
+
se.prototype[t] = function(r, n) {
|
|
1538
1538
|
return this.request(oe(n || {}, {
|
|
1539
|
-
method:
|
|
1539
|
+
method: t,
|
|
1540
1540
|
url: r,
|
|
1541
1541
|
data: (n || {}).data
|
|
1542
1542
|
}));
|
|
1543
1543
|
};
|
|
1544
1544
|
});
|
|
1545
|
-
d.forEach(["post", "put", "patch"], function(
|
|
1545
|
+
d.forEach(["post", "put", "patch"], function(t) {
|
|
1546
1546
|
function r(n) {
|
|
1547
1547
|
return function(i, a, l) {
|
|
1548
1548
|
return this.request(oe(l || {}, {
|
|
1549
|
-
method:
|
|
1549
|
+
method: t,
|
|
1550
1550
|
headers: n ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
@@ -1555,11 +1555,11 @@ d.forEach(["post", "put", "patch"], function(e) {
|
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
|
-
se.prototype[
|
|
1558
|
+
se.prototype[t] = r(), se.prototype[t + "Form"] = r(!0);
|
|
1559
1559
|
});
|
|
1560
1560
|
let Cn = class Jt {
|
|
1561
|
-
constructor(
|
|
1562
|
-
if (typeof
|
|
1561
|
+
constructor(t) {
|
|
1562
|
+
if (typeof t != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let r;
|
|
1565
1565
|
this.promise = new Promise(function(i) {
|
|
@@ -1580,7 +1580,7 @@ let Cn = class Jt {
|
|
|
1580
1580
|
return a.cancel = function() {
|
|
1581
1581
|
n.unsubscribe(i);
|
|
1582
1582
|
}, a;
|
|
1583
|
-
},
|
|
1583
|
+
}, t(function(i, a, l) {
|
|
1584
1584
|
n.reason || (n.reason = new pe(i, a, l), r(n.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
@@ -1594,49 +1594,49 @@ let Cn = class Jt {
|
|
|
1594
1594
|
/**
|
|
1595
1595
|
* Subscribe to the cancel signal
|
|
1596
1596
|
*/
|
|
1597
|
-
subscribe(
|
|
1597
|
+
subscribe(t) {
|
|
1598
1598
|
if (this.reason) {
|
|
1599
|
-
|
|
1599
|
+
t(this.reason);
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
|
-
this._listeners ? this._listeners.push(
|
|
1602
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1603
1603
|
}
|
|
1604
1604
|
/**
|
|
1605
1605
|
* Unsubscribe from the cancel signal
|
|
1606
1606
|
*/
|
|
1607
|
-
unsubscribe(
|
|
1607
|
+
unsubscribe(t) {
|
|
1608
1608
|
if (!this._listeners)
|
|
1609
1609
|
return;
|
|
1610
|
-
const r = this._listeners.indexOf(
|
|
1610
|
+
const r = this._listeners.indexOf(t);
|
|
1611
1611
|
r !== -1 && this._listeners.splice(r, 1);
|
|
1612
1612
|
}
|
|
1613
1613
|
toAbortSignal() {
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1614
|
+
const t = new AbortController(), r = (n) => {
|
|
1615
|
+
t.abort(n);
|
|
1616
1616
|
};
|
|
1617
|
-
return this.subscribe(r),
|
|
1617
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
1618
1618
|
}
|
|
1619
1619
|
/**
|
|
1620
1620
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1621
1621
|
* cancels the `CancelToken`.
|
|
1622
1622
|
*/
|
|
1623
1623
|
static source() {
|
|
1624
|
-
let
|
|
1624
|
+
let t;
|
|
1625
1625
|
return {
|
|
1626
1626
|
token: new Jt(function(o) {
|
|
1627
|
-
|
|
1627
|
+
t = o;
|
|
1628
1628
|
}),
|
|
1629
|
-
cancel:
|
|
1629
|
+
cancel: t
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
1632
|
};
|
|
1633
|
-
function Rn(
|
|
1633
|
+
function Rn(e) {
|
|
1634
1634
|
return function(r) {
|
|
1635
|
-
return
|
|
1635
|
+
return e.apply(null, r);
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function Pn(
|
|
1639
|
-
return d.isObject(
|
|
1638
|
+
function Pn(e) {
|
|
1639
|
+
return d.isObject(e) && e.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
1641
|
const Ke = {
|
|
1642
1642
|
Continue: 100,
|
|
@@ -1703,13 +1703,13 @@ const Ke = {
|
|
|
1703
1703
|
NotExtended: 510,
|
|
1704
1704
|
NetworkAuthenticationRequired: 511
|
|
1705
1705
|
};
|
|
1706
|
-
Object.entries(Ke).forEach(([
|
|
1707
|
-
Ke[
|
|
1706
|
+
Object.entries(Ke).forEach(([e, t]) => {
|
|
1707
|
+
Ke[t] = e;
|
|
1708
1708
|
});
|
|
1709
|
-
function Kt(
|
|
1710
|
-
const
|
|
1711
|
-
return d.extend(r, se.prototype,
|
|
1712
|
-
return Kt(oe(
|
|
1709
|
+
function Kt(e) {
|
|
1710
|
+
const t = new se(e), r = Tt(se.prototype.request, t);
|
|
1711
|
+
return d.extend(r, se.prototype, t, { allOwnKeys: !0 }), d.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(o) {
|
|
1712
|
+
return Kt(oe(e, o));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
1715
|
const q = Kt(Se);
|
|
@@ -1721,36 +1721,36 @@ q.VERSION = Vt;
|
|
|
1721
1721
|
q.toFormData = _e;
|
|
1722
1722
|
q.AxiosError = _;
|
|
1723
1723
|
q.Cancel = q.CanceledError;
|
|
1724
|
-
q.all = function(
|
|
1725
|
-
return Promise.all(
|
|
1724
|
+
q.all = function(t) {
|
|
1725
|
+
return Promise.all(t);
|
|
1726
1726
|
};
|
|
1727
1727
|
q.spread = Rn;
|
|
1728
1728
|
q.isAxiosError = Pn;
|
|
1729
1729
|
q.mergeConfig = oe;
|
|
1730
1730
|
q.AxiosHeaders = G;
|
|
1731
|
-
q.formToJSON = (
|
|
1731
|
+
q.formToJSON = (e) => Lt(d.isHTMLForm(e) ? new FormData(e) : e);
|
|
1732
1732
|
q.getAdapter = Yt.getAdapter;
|
|
1733
1733
|
q.HttpStatusCode = Ke;
|
|
1734
1734
|
q.default = q;
|
|
1735
1735
|
const {
|
|
1736
|
-
Axios:
|
|
1737
|
-
AxiosError:
|
|
1738
|
-
CanceledError:
|
|
1739
|
-
isCancel:
|
|
1740
|
-
CancelToken:
|
|
1741
|
-
VERSION:
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1736
|
+
Axios: Ns,
|
|
1737
|
+
AxiosError: _s,
|
|
1738
|
+
CanceledError: $s,
|
|
1739
|
+
isCancel: Us,
|
|
1740
|
+
CancelToken: Fs,
|
|
1741
|
+
VERSION: Ds,
|
|
1742
|
+
all: Ls,
|
|
1743
|
+
Cancel: Ms,
|
|
1744
|
+
isAxiosError: Bs,
|
|
1745
|
+
spread: qs,
|
|
1746
|
+
toFormData: Ws,
|
|
1747
|
+
AxiosHeaders: Hs,
|
|
1748
|
+
HttpStatusCode: Ys,
|
|
1749
|
+
formToJSON: Vs,
|
|
1750
|
+
getAdapter: Js,
|
|
1751
|
+
mergeConfig: Ks
|
|
1752
1752
|
} = q;
|
|
1753
|
-
class
|
|
1753
|
+
class Xs {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1759,10 +1759,10 @@ class Js {
|
|
|
1759
1759
|
* Initialize the SDK client
|
|
1760
1760
|
* @param config configuration object with baseUrl, apiKey, and appId
|
|
1761
1761
|
*/
|
|
1762
|
-
constructor(
|
|
1763
|
-
if (!
|
|
1762
|
+
constructor(t) {
|
|
1763
|
+
if (!t || !t.baseUrl)
|
|
1764
1764
|
throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");
|
|
1765
|
-
this.baseUrl =
|
|
1765
|
+
this.baseUrl = t.baseUrl.replace(/\/$/, ""), this.apiKey = t.apiKey || null, this.appId = t.appId || null, this.client = q.create({
|
|
1766
1766
|
baseURL: this.baseUrl,
|
|
1767
1767
|
headers: {
|
|
1768
1768
|
"Content-Type": "application/json",
|
|
@@ -1779,8 +1779,8 @@ class Js {
|
|
|
1779
1779
|
* @param data optional request body
|
|
1780
1780
|
* @param extraHeaders optional headers
|
|
1781
1781
|
*/
|
|
1782
|
-
async request(
|
|
1783
|
-
if (!
|
|
1782
|
+
async request(t, r, n, o = {}) {
|
|
1783
|
+
if (!t) throw new Error("HTTP method is required");
|
|
1784
1784
|
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
1786
1786
|
const i = {
|
|
@@ -1789,7 +1789,7 @@ class Js {
|
|
|
1789
1789
|
};
|
|
1790
1790
|
return (await this.client.request({
|
|
1791
1791
|
url: r,
|
|
1792
|
-
method:
|
|
1792
|
+
method: t,
|
|
1793
1793
|
data: i,
|
|
1794
1794
|
headers: o
|
|
1795
1795
|
})).data;
|
|
@@ -1810,18 +1810,18 @@ class Js {
|
|
|
1810
1810
|
* Register a new user
|
|
1811
1811
|
* @param params user details
|
|
1812
1812
|
*/
|
|
1813
|
-
async signup(
|
|
1814
|
-
const { name: r, email: n, password: o } =
|
|
1813
|
+
async signup(t) {
|
|
1814
|
+
const { name: r, email: n, password: o } = t;
|
|
1815
1815
|
if (!r || !n || !o)
|
|
1816
1816
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1817
|
-
return this.request("POST", "/users/signup",
|
|
1817
|
+
return this.request("POST", "/users/signup", t);
|
|
1818
1818
|
}
|
|
1819
1819
|
/**
|
|
1820
1820
|
* Login a user
|
|
1821
1821
|
* @param params login details
|
|
1822
1822
|
*/
|
|
1823
|
-
async login(
|
|
1824
|
-
const { email: r, password: n, appId: o } =
|
|
1823
|
+
async login(t) {
|
|
1824
|
+
const { email: r, password: n, appId: o } = t;
|
|
1825
1825
|
if (!r || !n)
|
|
1826
1826
|
throw new Error("login: 'email' and 'password' are required");
|
|
1827
1827
|
return this.request("POST", "/users/login", {
|
|
@@ -1834,11 +1834,11 @@ class Js {
|
|
|
1834
1834
|
* Update an existing user
|
|
1835
1835
|
* @param params fields to update
|
|
1836
1836
|
*/
|
|
1837
|
-
async updateUser(
|
|
1838
|
-
const { userId: r, appId: n } =
|
|
1837
|
+
async updateUser(t) {
|
|
1838
|
+
const { userId: r, appId: n } = t;
|
|
1839
1839
|
if (!r) throw new Error("updateUser: 'userId' is required");
|
|
1840
1840
|
return this.request("PUT", `/users/update/${r}`, {
|
|
1841
|
-
...
|
|
1841
|
+
...t,
|
|
1842
1842
|
appId: n || this.appId
|
|
1843
1843
|
});
|
|
1844
1844
|
}
|
|
@@ -1846,8 +1846,8 @@ class Js {
|
|
|
1846
1846
|
* Change a user's password (Admin only)
|
|
1847
1847
|
* @param params requires userId, currentPassword, newPassword
|
|
1848
1848
|
*/
|
|
1849
|
-
async changePassword(
|
|
1850
|
-
const { userId: r, currentPassword: n, newPassword: o, appId: i } =
|
|
1849
|
+
async changePassword(t) {
|
|
1850
|
+
const { userId: r, currentPassword: n, newPassword: o, appId: i } = t;
|
|
1851
1851
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1852
1852
|
if (!n || !o)
|
|
1853
1853
|
throw new Error(
|
|
@@ -1863,8 +1863,8 @@ class Js {
|
|
|
1863
1863
|
* Delete a user
|
|
1864
1864
|
* @param params requires userId and optionally appId
|
|
1865
1865
|
*/
|
|
1866
|
-
async deleteUser(
|
|
1867
|
-
const { userId: r, appId: n } =
|
|
1866
|
+
async deleteUser(t) {
|
|
1867
|
+
const { userId: r, appId: n } = t;
|
|
1868
1868
|
if (!r) throw new Error("deleteUser: 'userId' is required");
|
|
1869
1869
|
return this.request("DELETE", `/users/delete/${r}`, {
|
|
1870
1870
|
appId: n || this.appId
|
|
@@ -1874,8 +1874,8 @@ class Js {
|
|
|
1874
1874
|
* Get the profile of the authenticated user
|
|
1875
1875
|
* @param params requires JWT token
|
|
1876
1876
|
*/
|
|
1877
|
-
async getProfile(
|
|
1878
|
-
const { token: r } =
|
|
1877
|
+
async getProfile(t) {
|
|
1878
|
+
const { token: r } = t;
|
|
1879
1879
|
if (!r) throw new Error("getProfile: 'token' is required");
|
|
1880
1880
|
return this.request(
|
|
1881
1881
|
"GET",
|
|
@@ -1889,8 +1889,8 @@ class Js {
|
|
|
1889
1889
|
* Send verification OTP (requires logged-in user token)
|
|
1890
1890
|
* @param params requires token
|
|
1891
1891
|
*/
|
|
1892
|
-
async sendVerifyOTP(
|
|
1893
|
-
const { token: r, appId: n } =
|
|
1892
|
+
async sendVerifyOTP(t) {
|
|
1893
|
+
const { token: r, appId: n } = t;
|
|
1894
1894
|
if (!r) throw new Error("sendVerifyOTP: 'token' is required");
|
|
1895
1895
|
return this.request(
|
|
1896
1896
|
"POST",
|
|
@@ -1903,8 +1903,8 @@ class Js {
|
|
|
1903
1903
|
* Verify email with OTP (requires logged-in user token)
|
|
1904
1904
|
* @param params requires token + otp
|
|
1905
1905
|
*/
|
|
1906
|
-
async verifyEmail(
|
|
1907
|
-
const { token: r, otp: n, appId: o } =
|
|
1906
|
+
async verifyEmail(t) {
|
|
1907
|
+
const { token: r, otp: n, appId: o } = t;
|
|
1908
1908
|
if (!r) throw new Error("verifyEmail: 'token' is required");
|
|
1909
1909
|
if (!n) throw new Error("verifyEmail: 'otp' is required");
|
|
1910
1910
|
return this.request(
|
|
@@ -1918,8 +1918,8 @@ class Js {
|
|
|
1918
1918
|
* Forgot password (public route)
|
|
1919
1919
|
* @param params requires email
|
|
1920
1920
|
*/
|
|
1921
|
-
async forgotPassword(
|
|
1922
|
-
const { email: r, appId: n } =
|
|
1921
|
+
async forgotPassword(t) {
|
|
1922
|
+
const { email: r, appId: n } = t;
|
|
1923
1923
|
if (!r) throw new Error("forgotPassword: 'email' is required");
|
|
1924
1924
|
return this.request("POST", "/users/forgot-password", {
|
|
1925
1925
|
email: r,
|
|
@@ -1930,8 +1930,8 @@ class Js {
|
|
|
1930
1930
|
* Reset password (public route)
|
|
1931
1931
|
* @param params requires email, otp, newPassword
|
|
1932
1932
|
*/
|
|
1933
|
-
async resetPassword(
|
|
1934
|
-
const { email: r, otp: n, newPassword: o, appId: i } =
|
|
1933
|
+
async resetPassword(t) {
|
|
1934
|
+
const { email: r, otp: n, newPassword: o, appId: i } = t;
|
|
1935
1935
|
if (!r || !n || !o)
|
|
1936
1936
|
throw new Error(
|
|
1937
1937
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
@@ -1948,8 +1948,8 @@ class Js {
|
|
|
1948
1948
|
* Get all data objects for a user
|
|
1949
1949
|
* @param params requires userId
|
|
1950
1950
|
*/
|
|
1951
|
-
async getUserData(
|
|
1952
|
-
const { userId: r } =
|
|
1951
|
+
async getUserData(t) {
|
|
1952
|
+
const { userId: r } = t;
|
|
1953
1953
|
if (!r) throw new Error("getUserData: 'userId' is required");
|
|
1954
1954
|
return this.request("GET", `/users/${r}/data`);
|
|
1955
1955
|
}
|
|
@@ -1957,8 +1957,8 @@ class Js {
|
|
|
1957
1957
|
* Get a single data object for a user
|
|
1958
1958
|
* @param params requires userId and dataId
|
|
1959
1959
|
*/
|
|
1960
|
-
async getSingleUserData(
|
|
1961
|
-
const { userId: r, dataId: n } =
|
|
1960
|
+
async getSingleUserData(t) {
|
|
1961
|
+
const { userId: r, dataId: n } = t;
|
|
1962
1962
|
if (!r || !n)
|
|
1963
1963
|
throw new Error("getSingleUserData: 'userId' and 'dataId' are required");
|
|
1964
1964
|
return this.request("GET", `/users/${r}/data/${n}`);
|
|
@@ -1967,8 +1967,8 @@ class Js {
|
|
|
1967
1967
|
* Add a new data object to a user
|
|
1968
1968
|
* @param params requires userId and data object
|
|
1969
1969
|
*/
|
|
1970
|
-
async addUserData(
|
|
1971
|
-
const { userId: r, data: n } =
|
|
1970
|
+
async addUserData(t) {
|
|
1971
|
+
const { userId: r, data: n } = t;
|
|
1972
1972
|
if (!r) throw new Error("addUserData: 'userId' is required");
|
|
1973
1973
|
if (!n) throw new Error("addUserData: 'data' is required");
|
|
1974
1974
|
return this.request("POST", `/users/${r}/data`, n);
|
|
@@ -1977,8 +1977,8 @@ class Js {
|
|
|
1977
1977
|
* Update a data object by its id
|
|
1978
1978
|
* @param params requires userId, dataId, and updated fields
|
|
1979
1979
|
*/
|
|
1980
|
-
async updateUserData(
|
|
1981
|
-
const { userId: r, dataId: n, data: o } =
|
|
1980
|
+
async updateUserData(t) {
|
|
1981
|
+
const { userId: r, dataId: n, data: o } = t;
|
|
1982
1982
|
if (!r || !n)
|
|
1983
1983
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
1984
1984
|
if (!o) throw new Error("updateUserData: 'data' is required");
|
|
@@ -1988,8 +1988,8 @@ class Js {
|
|
|
1988
1988
|
* Delete a data object by its id
|
|
1989
1989
|
* @param params requires userId and dataId
|
|
1990
1990
|
*/
|
|
1991
|
-
async deleteUserData(
|
|
1992
|
-
const { userId: r, dataId: n } =
|
|
1991
|
+
async deleteUserData(t) {
|
|
1992
|
+
const { userId: r, dataId: n } = t;
|
|
1993
1993
|
if (!r || !n)
|
|
1994
1994
|
throw new Error("deleteUserData: 'userId' and 'dataId' are required");
|
|
1995
1995
|
return this.request("DELETE", `/users/${r}/data/${n}`);
|
|
@@ -2006,10 +2006,10 @@ var Ee = { exports: {} }, ge = {};
|
|
|
2006
2006
|
* LICENSE file in the root directory of this source tree.
|
|
2007
2007
|
*/
|
|
2008
2008
|
var bt;
|
|
2009
|
-
function
|
|
2009
|
+
function In() {
|
|
2010
2010
|
if (bt) return ge;
|
|
2011
2011
|
bt = 1;
|
|
2012
|
-
var
|
|
2012
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
2013
2013
|
function r(n, o, i) {
|
|
2014
2014
|
var a = null;
|
|
2015
2015
|
if (i !== void 0 && (a = "" + i), o.key !== void 0 && (a = "" + o.key), "key" in o) {
|
|
@@ -2018,14 +2018,14 @@ function On() {
|
|
|
2018
2018
|
l !== "key" && (i[l] = o[l]);
|
|
2019
2019
|
} else i = o;
|
|
2020
2020
|
return o = i.ref, {
|
|
2021
|
-
$$typeof:
|
|
2021
|
+
$$typeof: e,
|
|
2022
2022
|
type: n,
|
|
2023
2023
|
key: a,
|
|
2024
2024
|
ref: o !== void 0 ? o : null,
|
|
2025
2025
|
props: i
|
|
2026
2026
|
};
|
|
2027
2027
|
}
|
|
2028
|
-
return ge.Fragment =
|
|
2028
|
+
return ge.Fragment = t, ge.jsx = r, ge.jsxs = r, ge;
|
|
2029
2029
|
}
|
|
2030
2030
|
var ye = {};
|
|
2031
2031
|
/**
|
|
@@ -2038,9 +2038,9 @@ var ye = {};
|
|
|
2038
2038
|
* LICENSE file in the root directory of this source tree.
|
|
2039
2039
|
*/
|
|
2040
2040
|
var wt;
|
|
2041
|
-
function
|
|
2041
|
+
function On() {
|
|
2042
2042
|
return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2043
|
-
function
|
|
2043
|
+
function e(f) {
|
|
2044
2044
|
if (f == null) return null;
|
|
2045
2045
|
if (typeof f == "function")
|
|
2046
2046
|
return f.$$typeof === V ? null : f.displayName || f.name || null;
|
|
@@ -2072,23 +2072,23 @@ function In() {
|
|
|
2072
2072
|
case U:
|
|
2073
2073
|
var T = f.render;
|
|
2074
2074
|
return f = f.displayName, f || (f = T.displayName || T.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
2075
|
-
case
|
|
2076
|
-
return T = f.displayName || null, T !== null ? T :
|
|
2075
|
+
case O:
|
|
2076
|
+
return T = f.displayName || null, T !== null ? T : e(f.type) || "Memo";
|
|
2077
2077
|
case w:
|
|
2078
2078
|
T = f._payload, f = f._init;
|
|
2079
2079
|
try {
|
|
2080
|
-
return
|
|
2080
|
+
return e(f(T));
|
|
2081
2081
|
} catch {
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
return null;
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2086
|
+
function t(f) {
|
|
2087
2087
|
return "" + f;
|
|
2088
2088
|
}
|
|
2089
2089
|
function r(f) {
|
|
2090
2090
|
try {
|
|
2091
|
-
|
|
2091
|
+
t(f);
|
|
2092
2092
|
var T = !1;
|
|
2093
2093
|
} catch {
|
|
2094
2094
|
T = !0;
|
|
@@ -2100,7 +2100,7 @@ function In() {
|
|
|
2100
2100
|
T,
|
|
2101
2101
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2102
2102
|
x
|
|
2103
|
-
),
|
|
2103
|
+
), t(f);
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
function n(f) {
|
|
@@ -2108,7 +2108,7 @@ function In() {
|
|
|
2108
2108
|
if (typeof f == "object" && f !== null && f.$$typeof === w)
|
|
2109
2109
|
return "<...>";
|
|
2110
2110
|
try {
|
|
2111
|
-
var T =
|
|
2111
|
+
var T = e(f);
|
|
2112
2112
|
return T ? "<" + T + ">" : "<...>";
|
|
2113
2113
|
} catch {
|
|
2114
2114
|
return "<...>";
|
|
@@ -2141,7 +2141,7 @@ function In() {
|
|
|
2141
2141
|
});
|
|
2142
2142
|
}
|
|
2143
2143
|
function h() {
|
|
2144
|
-
var f =
|
|
2144
|
+
var f = e(this.type);
|
|
2145
2145
|
return E[f] || (E[f] = !0, console.error(
|
|
2146
2146
|
"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."
|
|
2147
2147
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
@@ -2182,7 +2182,7 @@ function In() {
|
|
|
2182
2182
|
var J = T.children;
|
|
2183
2183
|
if (J !== void 0)
|
|
2184
2184
|
if (x)
|
|
2185
|
-
if (
|
|
2185
|
+
if (I(J)) {
|
|
2186
2186
|
for (x = 0; x < J.length; x++)
|
|
2187
2187
|
b(J[x]);
|
|
2188
2188
|
Object.freeze && Object.freeze(J);
|
|
@@ -2192,7 +2192,7 @@ function In() {
|
|
|
2192
2192
|
);
|
|
2193
2193
|
else b(J);
|
|
2194
2194
|
if (A.call(T, "key")) {
|
|
2195
|
-
J =
|
|
2195
|
+
J = e(f);
|
|
2196
2196
|
var te = Object.keys(T).filter(function(De) {
|
|
2197
2197
|
return De !== "key";
|
|
2198
2198
|
});
|
|
@@ -2231,7 +2231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2231
2231
|
function b(f) {
|
|
2232
2232
|
typeof f == "object" && f !== null && f.$$typeof === S && f._store && (f._store.validated = 1);
|
|
2233
2233
|
}
|
|
2234
|
-
var C = kt, S = Symbol.for("react.transitional.element"), c = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), B = Symbol.for("react.consumer"), v = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"),
|
|
2234
|
+
var C = kt, S = Symbol.for("react.transitional.element"), c = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), B = Symbol.for("react.consumer"), v = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), N = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, I = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
2235
2235
|
return null;
|
|
2236
2236
|
};
|
|
2237
2237
|
C = {
|
|
@@ -2272,57 +2272,79 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2272
2272
|
}
|
|
2273
2273
|
var vt;
|
|
2274
2274
|
function An() {
|
|
2275
|
-
return vt || (vt = 1, process.env.NODE_ENV === "production" ? Ee.exports =
|
|
2275
|
+
return vt || (vt = 1, process.env.NODE_ENV === "production" ? Ee.exports = In() : Ee.exports = On()), Ee.exports;
|
|
2276
2276
|
}
|
|
2277
2277
|
var s = An();
|
|
2278
|
-
const zn = async (
|
|
2279
|
-
const {
|
|
2280
|
-
if (!
|
|
2281
|
-
throw new Error("API key is required for
|
|
2278
|
+
const zn = async (e, t) => {
|
|
2279
|
+
const { name: r, email: n, password: o, appId: i, phone: a, address: l, avatarUrl: h, isActive: p = !0, role: u = "user" } = e, { baseUrl: b, apiKey: C } = t;
|
|
2280
|
+
if (!C)
|
|
2281
|
+
throw new Error("API key is required for signup");
|
|
2282
|
+
if (!r || !n || !o || !i)
|
|
2283
|
+
throw new Error("Name, email, password, and appId are required");
|
|
2282
2284
|
try {
|
|
2283
|
-
const
|
|
2284
|
-
`${
|
|
2285
|
-
{
|
|
2285
|
+
const S = await q.post(
|
|
2286
|
+
`${b}/users/signup`,
|
|
2287
|
+
{
|
|
2288
|
+
name: r,
|
|
2289
|
+
email: n,
|
|
2290
|
+
password: o,
|
|
2291
|
+
appId: i,
|
|
2292
|
+
phone: a,
|
|
2293
|
+
address: l,
|
|
2294
|
+
avatarUrl: h,
|
|
2295
|
+
isActive: p,
|
|
2296
|
+
role: u
|
|
2297
|
+
},
|
|
2286
2298
|
{
|
|
2287
2299
|
headers: {
|
|
2288
2300
|
"Content-Type": "application/json",
|
|
2289
|
-
"x-api-key":
|
|
2301
|
+
"x-api-key": C
|
|
2290
2302
|
}
|
|
2291
2303
|
}
|
|
2292
2304
|
);
|
|
2293
|
-
return
|
|
2294
|
-
} catch (
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2305
|
+
return S.data?.user && localStorage.setItem("userInfo", JSON.stringify(S.data.user)), S.data.user;
|
|
2306
|
+
} catch (S) {
|
|
2307
|
+
const c = S.response?.data?.message || S.message || "Signup failed";
|
|
2308
|
+
if (console.error("Signup API Error:", c), S.response?.status === 400) {
|
|
2309
|
+
if (c.includes("already exists"))
|
|
2310
|
+
throw {
|
|
2311
|
+
success: !1,
|
|
2312
|
+
message: "User with this email already exists for this app",
|
|
2313
|
+
status: 400
|
|
2314
|
+
};
|
|
2315
|
+
if (c.includes("inactive"))
|
|
2316
|
+
throw {
|
|
2317
|
+
success: !1,
|
|
2318
|
+
message: "Cannot signup under an inactive app",
|
|
2319
|
+
status: 400
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
throw S.response?.status === 404 ? {
|
|
2297
2323
|
success: !1,
|
|
2298
|
-
message:
|
|
2299
|
-
status:
|
|
2324
|
+
message: "Invalid or inactive app",
|
|
2325
|
+
status: 404
|
|
2326
|
+
} : {
|
|
2327
|
+
success: !1,
|
|
2328
|
+
message: c,
|
|
2329
|
+
status: S.response?.status || 500
|
|
2300
2330
|
};
|
|
2301
2331
|
}
|
|
2302
|
-
}
|
|
2303
|
-
baseUrl: "",
|
|
2304
|
-
apiKey: "",
|
|
2305
|
-
appId: ""
|
|
2306
|
-
}, Ks = (t) => {
|
|
2307
|
-
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
2308
|
-
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2309
|
-
Pe.baseUrl = t.baseUrl, Pe.apiKey = t.apiKey, Pe.appId = t.appId;
|
|
2310
|
-
}, fe = () => Pe;
|
|
2332
|
+
};
|
|
2311
2333
|
/**
|
|
2312
2334
|
* @license lucide-react v0.544.0 - ISC
|
|
2313
2335
|
*
|
|
2314
2336
|
* This source code is licensed under the ISC license.
|
|
2315
2337
|
* See the LICENSE file in the root directory of this source tree.
|
|
2316
2338
|
*/
|
|
2317
|
-
const Nn = (
|
|
2339
|
+
const Nn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), _n = (e) => e.replace(
|
|
2318
2340
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2319
|
-
(
|
|
2320
|
-
), jt = (
|
|
2321
|
-
const
|
|
2322
|
-
return
|
|
2323
|
-
}, Xt = (...
|
|
2324
|
-
for (const
|
|
2325
|
-
if (
|
|
2341
|
+
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
2342
|
+
), jt = (e) => {
|
|
2343
|
+
const t = _n(e);
|
|
2344
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2345
|
+
}, Xt = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), $n = (e) => {
|
|
2346
|
+
for (const t in e)
|
|
2347
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
2326
2348
|
return !0;
|
|
2327
2349
|
};
|
|
2328
2350
|
/**
|
|
@@ -2350,8 +2372,8 @@ var Un = {
|
|
|
2350
2372
|
*/
|
|
2351
2373
|
const Fn = Et(
|
|
2352
2374
|
({
|
|
2353
|
-
color:
|
|
2354
|
-
size:
|
|
2375
|
+
color: e = "currentColor",
|
|
2376
|
+
size: t = 24,
|
|
2355
2377
|
strokeWidth: r = 2,
|
|
2356
2378
|
absoluteStrokeWidth: n,
|
|
2357
2379
|
className: o = "",
|
|
@@ -2363,10 +2385,10 @@ const Fn = Et(
|
|
|
2363
2385
|
{
|
|
2364
2386
|
ref: h,
|
|
2365
2387
|
...Un,
|
|
2366
|
-
width:
|
|
2367
|
-
height:
|
|
2368
|
-
stroke:
|
|
2369
|
-
strokeWidth: n ? Number(r) * 24 / Number(
|
|
2388
|
+
width: t,
|
|
2389
|
+
height: t,
|
|
2390
|
+
stroke: e,
|
|
2391
|
+
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
2370
2392
|
className: Xt("lucide", o),
|
|
2371
2393
|
...!i && !$n(l) && { "aria-hidden": "true" },
|
|
2372
2394
|
...l
|
|
@@ -2383,20 +2405,20 @@ const Fn = Et(
|
|
|
2383
2405
|
* This source code is licensed under the ISC license.
|
|
2384
2406
|
* See the LICENSE file in the root directory of this source tree.
|
|
2385
2407
|
*/
|
|
2386
|
-
const Y = (
|
|
2408
|
+
const Y = (e, t) => {
|
|
2387
2409
|
const r = Et(
|
|
2388
2410
|
({ className: n, ...o }, i) => We(Fn, {
|
|
2389
2411
|
ref: i,
|
|
2390
|
-
iconNode:
|
|
2412
|
+
iconNode: t,
|
|
2391
2413
|
className: Xt(
|
|
2392
|
-
`lucide-${Nn(jt(
|
|
2393
|
-
`lucide-${
|
|
2414
|
+
`lucide-${Nn(jt(e))}`,
|
|
2415
|
+
`lucide-${e}`,
|
|
2394
2416
|
n
|
|
2395
2417
|
),
|
|
2396
2418
|
...o
|
|
2397
2419
|
})
|
|
2398
2420
|
);
|
|
2399
|
-
return r.displayName = jt(
|
|
2421
|
+
return r.displayName = jt(e), r;
|
|
2400
2422
|
};
|
|
2401
2423
|
/**
|
|
2402
2424
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -2713,7 +2735,7 @@ const bs = [
|
|
|
2713
2735
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2714
2736
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2715
2737
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2716
|
-
],
|
|
2738
|
+
], Pe = Y("trash-2", bs);
|
|
2717
2739
|
/**
|
|
2718
2740
|
* @license lucide-react v0.544.0 - ISC
|
|
2719
2741
|
*
|
|
@@ -2762,91 +2784,68 @@ const Ss = [
|
|
|
2762
2784
|
const ks = [
|
|
2763
2785
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
2764
2786
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2765
|
-
], Fe = Y("x", ks),
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2787
|
+
], Fe = Y("x", ks), Ie = {
|
|
2788
|
+
baseUrl: "",
|
|
2789
|
+
apiKey: "",
|
|
2790
|
+
appId: ""
|
|
2791
|
+
}, Gs = (e) => {
|
|
2792
|
+
if (!e.baseUrl || !e.apiKey || !e.appId)
|
|
2793
|
+
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2794
|
+
Ie.baseUrl = e.baseUrl, Ie.apiKey = e.apiKey, Ie.appId = e.appId;
|
|
2795
|
+
}, fe = () => Ie, Zs = ({
|
|
2796
|
+
logoUrl: e,
|
|
2797
|
+
title: t = "Create Your Account",
|
|
2798
|
+
subtitle: r = "Join our platform today",
|
|
2769
2799
|
footerText: n = "Secure authentication powered by Neuctra Authix",
|
|
2770
2800
|
primaryColor: o = "#00C214",
|
|
2771
2801
|
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2772
2802
|
darkMode: a = !0,
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2803
|
+
// Only avatar is optional
|
|
2804
|
+
showAvatar: l = !1,
|
|
2805
|
+
loginUrl: h,
|
|
2806
|
+
onSuccess: p,
|
|
2807
|
+
onError: u
|
|
2776
2808
|
}) => {
|
|
2777
|
-
const { baseUrl:
|
|
2809
|
+
const { baseUrl: b, apiKey: C, appId: S } = fe(), c = {
|
|
2810
|
+
name: "",
|
|
2778
2811
|
email: "",
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
`${u}/users/forgot-password`,
|
|
2803
|
-
{
|
|
2804
|
-
email: N.email,
|
|
2805
|
-
appId: C
|
|
2806
|
-
},
|
|
2807
|
-
{ headers: { "x-api-key": b } }
|
|
2808
|
-
);
|
|
2809
|
-
j.data.success ? (y(2), m({ type: "success", text: "OTP sent to your email" })) : m({
|
|
2810
|
-
type: "error",
|
|
2811
|
-
text: j.data.message || "Failed to send OTP"
|
|
2812
|
-
});
|
|
2813
|
-
} catch (j) {
|
|
2814
|
-
m({
|
|
2815
|
-
type: "error",
|
|
2816
|
-
text: j.response?.data?.message || "Something went wrong"
|
|
2817
|
-
});
|
|
2818
|
-
} finally {
|
|
2819
|
-
U(!1);
|
|
2820
|
-
}
|
|
2821
|
-
}, T = async (x) => {
|
|
2822
|
-
x.preventDefault(), U(!0), m(null);
|
|
2823
|
-
try {
|
|
2824
|
-
const j = await q.post(
|
|
2825
|
-
`${u}/users/reset-password`,
|
|
2826
|
-
N,
|
|
2827
|
-
{ headers: { "x-api-key": b } }
|
|
2828
|
-
);
|
|
2829
|
-
j.data.success ? (m({ type: "success", text: "Password reset successfully!" }), y(1), A({ email: "", otp: "", newPassword: "", appId: C }), c("login")) : m({ type: "error", text: j.data.message || "Reset failed" });
|
|
2830
|
-
} catch (j) {
|
|
2831
|
-
m({
|
|
2832
|
-
type: "error",
|
|
2833
|
-
text: j.response?.data?.message || "Something went wrong"
|
|
2834
|
-
});
|
|
2835
|
-
} finally {
|
|
2836
|
-
U(!1);
|
|
2812
|
+
password: "",
|
|
2813
|
+
...l && { avatarUrl: "" }
|
|
2814
|
+
}, [g, y] = $(c), [P, B] = $(!1), [v, U] = $(!1), [F, m] = $(null), [O, w] = $({}), L = typeof window < "u" ? window.innerWidth < 768 : !1, V = a ? "#ffffff" : "#111827", N = a ? "#a1a1aa" : "#6b7280", A = a ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", I = a ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", k = (M) => {
|
|
2815
|
+
const { name: H, value: f } = M.target;
|
|
2816
|
+
y((T) => ({ ...T, [H]: f })), O[H] && w((T) => ({ ...T, [H]: void 0 }));
|
|
2817
|
+
}, z = () => {
|
|
2818
|
+
const M = {};
|
|
2819
|
+
return g.name.trim() || (M.name = "Name is required"), g.email.trim() ? /\S+@\S+\.\S+/.test(g.email) || (M.email = "Invalid email address") : M.email = "Email is required", g.password ? g.password.length < 6 && (M.password = "Password must be at least 6 characters") : M.password = "Password is required", w(M), Object.keys(M).length === 0;
|
|
2820
|
+
}, E = async (M) => {
|
|
2821
|
+
if (M.preventDefault(), !!z()) {
|
|
2822
|
+
U(!0), m(null);
|
|
2823
|
+
try {
|
|
2824
|
+
const H = {
|
|
2825
|
+
...g,
|
|
2826
|
+
appId: S
|
|
2827
|
+
}, f = await zn(H, { baseUrl: b, apiKey: C });
|
|
2828
|
+
m({ type: "success", text: "Account created successfully!" }), p && p(f), window.location.reload();
|
|
2829
|
+
} catch (H) {
|
|
2830
|
+
const f = H.message || "Signup failed. Please try again.";
|
|
2831
|
+
m({ type: "error", text: f }), u && u(H);
|
|
2832
|
+
} finally {
|
|
2833
|
+
U(!1);
|
|
2834
|
+
}
|
|
2837
2835
|
}
|
|
2838
|
-
},
|
|
2836
|
+
}, R = {
|
|
2839
2837
|
width: "100%",
|
|
2840
|
-
padding:
|
|
2841
|
-
backgroundColor:
|
|
2842
|
-
border: `1px solid ${
|
|
2838
|
+
padding: L ? "14px 14px 14px 44px" : "16px 16px 16px 44px",
|
|
2839
|
+
backgroundColor: A,
|
|
2840
|
+
border: `1px solid ${I}`,
|
|
2843
2841
|
borderRadius: "12px",
|
|
2844
|
-
color:
|
|
2842
|
+
color: V,
|
|
2845
2843
|
fontSize: "15px",
|
|
2846
2844
|
outline: "none",
|
|
2847
|
-
transition: "all 0.2s ease"
|
|
2845
|
+
transition: "all 0.2s ease",
|
|
2846
|
+
boxSizing: "border-box"
|
|
2848
2847
|
};
|
|
2849
|
-
return /* @__PURE__ */ s.
|
|
2848
|
+
return /* @__PURE__ */ s.jsxs(
|
|
2850
2849
|
"div",
|
|
2851
2850
|
{
|
|
2852
2851
|
style: {
|
|
@@ -2854,324 +2853,311 @@ const ks = [
|
|
|
2854
2853
|
justifyContent: "center",
|
|
2855
2854
|
alignItems: "center"
|
|
2856
2855
|
},
|
|
2857
|
-
children:
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
"
|
|
2856
|
+
children: [
|
|
2857
|
+
/* @__PURE__ */ s.jsxs(
|
|
2858
|
+
"div",
|
|
2859
|
+
{
|
|
2860
|
+
style: {
|
|
2861
|
+
minWidth: L ? "320px" : "340px",
|
|
2862
|
+
width: "100%",
|
|
2863
|
+
maxWidth: "390px",
|
|
2864
|
+
display: "flex",
|
|
2865
|
+
flexDirection: "column",
|
|
2866
|
+
borderRadius: "10px",
|
|
2867
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
2868
|
+
backgroundColor: a ? "#000000" : "#ffffff",
|
|
2869
|
+
padding: L ? "30px 24px" : "32px 28px"
|
|
2870
|
+
},
|
|
2871
|
+
children: [
|
|
2872
|
+
/* @__PURE__ */ s.jsxs(
|
|
2873
|
+
"div",
|
|
2874
|
+
{
|
|
2875
|
+
style: {
|
|
2876
|
+
display: "flex",
|
|
2877
|
+
flexDirection: "column",
|
|
2878
|
+
alignItems: "center",
|
|
2879
|
+
marginBottom: "20px"
|
|
2880
|
+
},
|
|
2881
|
+
children: [
|
|
2882
|
+
e ? /* @__PURE__ */ s.jsx(
|
|
2883
|
+
"img",
|
|
2884
|
+
{
|
|
2885
|
+
src: e,
|
|
2886
|
+
alt: "Logo",
|
|
2887
|
+
style: { height: "50px", width: "50px", marginBottom: "10px" }
|
|
2888
|
+
}
|
|
2889
|
+
) : /* @__PURE__ */ s.jsx(
|
|
2890
|
+
de,
|
|
2891
|
+
{
|
|
2892
|
+
size: 40,
|
|
2893
|
+
color: o,
|
|
2894
|
+
style: { marginBottom: "10px" }
|
|
2895
|
+
}
|
|
2896
|
+
),
|
|
2897
|
+
/* @__PURE__ */ s.jsx(
|
|
2898
|
+
"h2",
|
|
2899
|
+
{
|
|
2900
|
+
style: {
|
|
2901
|
+
fontSize: "24px",
|
|
2902
|
+
fontWeight: 700,
|
|
2903
|
+
color: V,
|
|
2904
|
+
margin: 0
|
|
2905
|
+
},
|
|
2906
|
+
children: t
|
|
2907
|
+
}
|
|
2908
|
+
),
|
|
2909
|
+
/* @__PURE__ */ s.jsx(
|
|
2910
|
+
"p",
|
|
2911
|
+
{
|
|
2912
|
+
style: {
|
|
2913
|
+
fontSize: "14px",
|
|
2914
|
+
color: N,
|
|
2915
|
+
margin: "6px 0 0 0"
|
|
2916
|
+
},
|
|
2917
|
+
children: r
|
|
2918
|
+
}
|
|
2919
|
+
)
|
|
2920
|
+
]
|
|
2921
|
+
}
|
|
2922
|
+
),
|
|
2923
|
+
l && g.avatarUrl && /* @__PURE__ */ s.jsx(
|
|
2924
|
+
"div",
|
|
2925
|
+
{
|
|
2926
|
+
style: {
|
|
2927
|
+
display: "flex",
|
|
2928
|
+
justifyContent: "center",
|
|
2929
|
+
marginBottom: "16px"
|
|
2930
|
+
},
|
|
2931
|
+
children: /* @__PURE__ */ s.jsx(
|
|
2932
|
+
"img",
|
|
2931
2933
|
{
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
+
src: g.avatarUrl,
|
|
2935
|
+
alt: "Avatar Preview",
|
|
2936
|
+
style: {
|
|
2937
|
+
width: "60px",
|
|
2938
|
+
height: "60px",
|
|
2939
|
+
borderRadius: "50%",
|
|
2940
|
+
objectFit: "cover",
|
|
2941
|
+
border: `2px solid ${o}30`
|
|
2942
|
+
},
|
|
2943
|
+
onError: (M) => {
|
|
2944
|
+
const H = M.target;
|
|
2945
|
+
H.style.display = "none";
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
)
|
|
2949
|
+
}
|
|
2950
|
+
),
|
|
2951
|
+
/* @__PURE__ */ s.jsxs(
|
|
2952
|
+
"form",
|
|
2953
|
+
{
|
|
2954
|
+
onSubmit: E,
|
|
2955
|
+
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
2956
|
+
children: [
|
|
2957
|
+
/* @__PURE__ */ s.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
2958
|
+
/* @__PURE__ */ s.jsx(
|
|
2959
|
+
"label",
|
|
2960
|
+
{
|
|
2961
|
+
htmlFor: "signup-name",
|
|
2962
|
+
style: {
|
|
2963
|
+
fontSize: "14px",
|
|
2964
|
+
fontWeight: 500,
|
|
2965
|
+
color: V
|
|
2966
|
+
},
|
|
2967
|
+
children: "Full Name"
|
|
2968
|
+
}
|
|
2969
|
+
),
|
|
2970
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
2934
2971
|
/* @__PURE__ */ s.jsx(
|
|
2935
|
-
|
|
2972
|
+
de,
|
|
2936
2973
|
{
|
|
2937
|
-
|
|
2974
|
+
size: 20,
|
|
2938
2975
|
style: {
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2976
|
+
position: "absolute",
|
|
2977
|
+
left: "14px",
|
|
2978
|
+
top: "50%",
|
|
2979
|
+
transform: "translateY(-50%)",
|
|
2980
|
+
color: N
|
|
2981
|
+
}
|
|
2944
2982
|
}
|
|
2945
2983
|
),
|
|
2946
|
-
/* @__PURE__ */ s.
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
}
|
|
2959
|
-
),
|
|
2960
|
-
/* @__PURE__ */ s.jsx(
|
|
2961
|
-
"input",
|
|
2962
|
-
{
|
|
2963
|
-
id: "login-email",
|
|
2964
|
-
type: "email",
|
|
2965
|
-
placeholder: "Enter your email",
|
|
2966
|
-
value: I,
|
|
2967
|
-
onChange: (x) => w(x.target.value),
|
|
2968
|
-
style: D
|
|
2984
|
+
/* @__PURE__ */ s.jsx(
|
|
2985
|
+
"input",
|
|
2986
|
+
{
|
|
2987
|
+
id: "signup-name",
|
|
2988
|
+
type: "text",
|
|
2989
|
+
name: "name",
|
|
2990
|
+
placeholder: "Enter your full name",
|
|
2991
|
+
value: g.name,
|
|
2992
|
+
onChange: k,
|
|
2993
|
+
style: {
|
|
2994
|
+
...R,
|
|
2995
|
+
borderColor: O.name ? "#ef4444" : I
|
|
2969
2996
|
}
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
]
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2997
|
+
}
|
|
2998
|
+
)
|
|
2999
|
+
] }),
|
|
3000
|
+
O.name && /* @__PURE__ */ s.jsx(
|
|
3001
|
+
"span",
|
|
3002
|
+
{
|
|
3003
|
+
style: {
|
|
3004
|
+
color: "#ef4444",
|
|
3005
|
+
fontSize: "12px",
|
|
3006
|
+
marginTop: "2px"
|
|
3007
|
+
},
|
|
3008
|
+
children: O.name
|
|
3009
|
+
}
|
|
3010
|
+
)
|
|
3011
|
+
] }),
|
|
3012
|
+
/* @__PURE__ */ s.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
3013
|
+
/* @__PURE__ */ s.jsx(
|
|
3014
|
+
"label",
|
|
3015
|
+
{
|
|
3016
|
+
htmlFor: "signup-email",
|
|
3017
|
+
style: {
|
|
3018
|
+
fontSize: "14px",
|
|
3019
|
+
fontWeight: 500,
|
|
3020
|
+
color: V
|
|
3021
|
+
},
|
|
3022
|
+
children: "Email Address"
|
|
3023
|
+
}
|
|
3024
|
+
),
|
|
3025
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
2980
3026
|
/* @__PURE__ */ s.jsx(
|
|
2981
|
-
|
|
3027
|
+
be,
|
|
2982
3028
|
{
|
|
2983
|
-
|
|
3029
|
+
size: 20,
|
|
2984
3030
|
style: {
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3031
|
+
position: "absolute",
|
|
3032
|
+
left: "14px",
|
|
3033
|
+
top: "50%",
|
|
3034
|
+
transform: "translateY(-50%)",
|
|
3035
|
+
color: N
|
|
3036
|
+
}
|
|
2990
3037
|
}
|
|
2991
3038
|
),
|
|
2992
|
-
/* @__PURE__ */ s.
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
}
|
|
3005
|
-
),
|
|
3006
|
-
/* @__PURE__ */ s.jsx(
|
|
3007
|
-
"input",
|
|
3008
|
-
{
|
|
3009
|
-
id: "login-password",
|
|
3010
|
-
type: P ? "text" : "password",
|
|
3011
|
-
placeholder: "Enter your password",
|
|
3012
|
-
value: L,
|
|
3013
|
-
onChange: (x) => V(x.target.value),
|
|
3014
|
-
style: D
|
|
3039
|
+
/* @__PURE__ */ s.jsx(
|
|
3040
|
+
"input",
|
|
3041
|
+
{
|
|
3042
|
+
id: "signup-email",
|
|
3043
|
+
type: "email",
|
|
3044
|
+
name: "email",
|
|
3045
|
+
placeholder: "Enter your email address",
|
|
3046
|
+
value: g.email,
|
|
3047
|
+
onChange: k,
|
|
3048
|
+
style: {
|
|
3049
|
+
...R,
|
|
3050
|
+
borderColor: O.email ? "#ef4444" : I
|
|
3015
3051
|
}
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3052
|
+
}
|
|
3053
|
+
)
|
|
3054
|
+
] }),
|
|
3055
|
+
O.email && /* @__PURE__ */ s.jsx(
|
|
3056
|
+
"span",
|
|
3057
|
+
{
|
|
3058
|
+
style: {
|
|
3059
|
+
color: "#ef4444",
|
|
3060
|
+
fontSize: "12px",
|
|
3061
|
+
marginTop: "2px"
|
|
3062
|
+
},
|
|
3063
|
+
children: O.email
|
|
3064
|
+
}
|
|
3065
|
+
)
|
|
3066
|
+
] }),
|
|
3067
|
+
/* @__PURE__ */ s.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
3068
|
+
/* @__PURE__ */ s.jsx(
|
|
3069
|
+
"label",
|
|
3070
|
+
{
|
|
3071
|
+
htmlFor: "signup-password",
|
|
3072
|
+
style: {
|
|
3073
|
+
fontSize: "14px",
|
|
3074
|
+
fontWeight: 500,
|
|
3075
|
+
color: V
|
|
3076
|
+
},
|
|
3077
|
+
children: "Password"
|
|
3078
|
+
}
|
|
3079
|
+
),
|
|
3080
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3081
|
+
/* @__PURE__ */ s.jsx(
|
|
3082
|
+
ie,
|
|
3083
|
+
{
|
|
3084
|
+
size: 20,
|
|
3085
|
+
style: {
|
|
3086
|
+
position: "absolute",
|
|
3087
|
+
left: "14px",
|
|
3088
|
+
top: "50%",
|
|
3089
|
+
transform: "translateY(-50%)",
|
|
3090
|
+
color: N
|
|
3034
3091
|
}
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
),
|
|
3040
|
-
/* @__PURE__ */ s.jsxs(
|
|
3041
|
-
"div",
|
|
3042
|
-
{
|
|
3043
|
-
style: {
|
|
3044
|
-
display: "flex",
|
|
3045
|
-
justifyContent: "space-between",
|
|
3046
|
-
fontSize: "13px"
|
|
3047
|
-
},
|
|
3048
|
-
children: [
|
|
3049
|
-
l && /* @__PURE__ */ s.jsx(
|
|
3050
|
-
"a",
|
|
3092
|
+
}
|
|
3093
|
+
),
|
|
3094
|
+
/* @__PURE__ */ s.jsx(
|
|
3095
|
+
"input",
|
|
3051
3096
|
{
|
|
3052
|
-
|
|
3097
|
+
id: "signup-password",
|
|
3098
|
+
type: P ? "text" : "password",
|
|
3099
|
+
name: "password",
|
|
3100
|
+
placeholder: "Create a secure password",
|
|
3101
|
+
value: g.password,
|
|
3102
|
+
onChange: k,
|
|
3053
3103
|
style: {
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
},
|
|
3058
|
-
children: "Create new account"
|
|
3104
|
+
...R,
|
|
3105
|
+
borderColor: O.password ? "#ef4444" : I
|
|
3106
|
+
}
|
|
3059
3107
|
}
|
|
3060
3108
|
),
|
|
3061
3109
|
/* @__PURE__ */ s.jsx(
|
|
3062
3110
|
"button",
|
|
3063
3111
|
{
|
|
3064
3112
|
type: "button",
|
|
3065
|
-
onClick: () =>
|
|
3113
|
+
onClick: () => B(!P),
|
|
3066
3114
|
style: {
|
|
3067
|
-
|
|
3115
|
+
position: "absolute",
|
|
3116
|
+
right: "14px",
|
|
3117
|
+
top: "50%",
|
|
3118
|
+
transform: "translateY(-50%)",
|
|
3119
|
+
background: "transparent",
|
|
3068
3120
|
border: "none",
|
|
3069
|
-
color:
|
|
3070
|
-
|
|
3071
|
-
|
|
3121
|
+
color: N,
|
|
3122
|
+
cursor: "pointer",
|
|
3123
|
+
padding: "4px"
|
|
3072
3124
|
},
|
|
3073
|
-
children:
|
|
3125
|
+
children: P ? /* @__PURE__ */ s.jsx(et, { size: 20 }) : /* @__PURE__ */ s.jsx(tt, { size: 20 })
|
|
3074
3126
|
}
|
|
3075
3127
|
)
|
|
3076
|
-
]
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
fontWeight: 600
|
|
3091
|
-
},
|
|
3092
|
-
children: v ? "Signing In..." : "Sign In"
|
|
3093
|
-
}
|
|
3094
|
-
)
|
|
3095
|
-
]
|
|
3096
|
-
}
|
|
3097
|
-
),
|
|
3098
|
-
S === "forgot" && /* @__PURE__ */ s.jsxs(
|
|
3099
|
-
"form",
|
|
3100
|
-
{
|
|
3101
|
-
onSubmit: g === 1 ? f : T,
|
|
3102
|
-
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3103
|
-
children: [
|
|
3104
|
-
g === 1 ? /* @__PURE__ */ s.jsxs(
|
|
3105
|
-
"div",
|
|
3106
|
-
{
|
|
3107
|
-
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
3108
|
-
children: [
|
|
3109
|
-
/* @__PURE__ */ s.jsx(
|
|
3110
|
-
"label",
|
|
3111
|
-
{
|
|
3112
|
-
htmlFor: "forgot-email",
|
|
3113
|
-
style: {
|
|
3114
|
-
fontSize: "14px",
|
|
3115
|
-
fontWeight: 500,
|
|
3116
|
-
color: a ? "#ffffff" : "#000000"
|
|
3117
|
-
},
|
|
3118
|
-
children: "Email Address"
|
|
3119
|
-
}
|
|
3120
|
-
),
|
|
3121
|
-
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3122
|
-
/* @__PURE__ */ s.jsx(
|
|
3123
|
-
be,
|
|
3124
|
-
{
|
|
3125
|
-
size: 20,
|
|
3126
|
-
style: {
|
|
3127
|
-
position: "absolute",
|
|
3128
|
-
left: "14px",
|
|
3129
|
-
top: "50%",
|
|
3130
|
-
transform: "translateY(-50%)",
|
|
3131
|
-
color: z
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
),
|
|
3135
|
-
/* @__PURE__ */ s.jsx(
|
|
3136
|
-
"input",
|
|
3137
|
-
{
|
|
3138
|
-
id: "forgot-email",
|
|
3139
|
-
type: "email",
|
|
3140
|
-
name: "email",
|
|
3141
|
-
placeholder: "Enter your email",
|
|
3142
|
-
value: N.email,
|
|
3143
|
-
onChange: H,
|
|
3144
|
-
style: D
|
|
3145
|
-
}
|
|
3146
|
-
)
|
|
3147
|
-
] })
|
|
3148
|
-
]
|
|
3149
|
-
}
|
|
3150
|
-
) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3151
|
-
/* @__PURE__ */ s.jsxs(
|
|
3128
|
+
] }),
|
|
3129
|
+
O.password && /* @__PURE__ */ s.jsx(
|
|
3130
|
+
"span",
|
|
3131
|
+
{
|
|
3132
|
+
style: {
|
|
3133
|
+
color: "#ef4444",
|
|
3134
|
+
fontSize: "12px",
|
|
3135
|
+
marginTop: "2px"
|
|
3136
|
+
},
|
|
3137
|
+
children: O.password
|
|
3138
|
+
}
|
|
3139
|
+
)
|
|
3140
|
+
] }),
|
|
3141
|
+
l && /* @__PURE__ */ s.jsxs(
|
|
3152
3142
|
"div",
|
|
3153
3143
|
{
|
|
3154
|
-
style: {
|
|
3155
|
-
display: "flex",
|
|
3156
|
-
flexDirection: "column",
|
|
3157
|
-
gap: "6px"
|
|
3158
|
-
},
|
|
3144
|
+
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
3159
3145
|
children: [
|
|
3160
3146
|
/* @__PURE__ */ s.jsx(
|
|
3161
3147
|
"label",
|
|
3162
3148
|
{
|
|
3163
|
-
htmlFor: "
|
|
3149
|
+
htmlFor: "signup-avatar",
|
|
3164
3150
|
style: {
|
|
3165
3151
|
fontSize: "14px",
|
|
3166
3152
|
fontWeight: 500,
|
|
3167
|
-
color:
|
|
3153
|
+
color: V
|
|
3168
3154
|
},
|
|
3169
|
-
children: "
|
|
3155
|
+
children: "Avatar URL (Optional)"
|
|
3170
3156
|
}
|
|
3171
3157
|
),
|
|
3172
3158
|
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3173
3159
|
/* @__PURE__ */ s.jsx(
|
|
3174
|
-
|
|
3160
|
+
Gt,
|
|
3175
3161
|
{
|
|
3176
3162
|
size: 20,
|
|
3177
3163
|
style: {
|
|
@@ -3179,266 +3165,243 @@ const ks = [
|
|
|
3179
3165
|
left: "14px",
|
|
3180
3166
|
top: "50%",
|
|
3181
3167
|
transform: "translateY(-50%)",
|
|
3182
|
-
color:
|
|
3168
|
+
color: N
|
|
3183
3169
|
}
|
|
3184
3170
|
}
|
|
3185
3171
|
),
|
|
3186
3172
|
/* @__PURE__ */ s.jsx(
|
|
3187
3173
|
"input",
|
|
3188
3174
|
{
|
|
3189
|
-
id: "
|
|
3190
|
-
type: "
|
|
3191
|
-
name: "
|
|
3192
|
-
placeholder: "
|
|
3193
|
-
value:
|
|
3194
|
-
onChange:
|
|
3195
|
-
style:
|
|
3175
|
+
id: "signup-avatar",
|
|
3176
|
+
type: "url",
|
|
3177
|
+
name: "avatarUrl",
|
|
3178
|
+
placeholder: "Paste your avatar image URL",
|
|
3179
|
+
value: g.avatarUrl || "",
|
|
3180
|
+
onChange: k,
|
|
3181
|
+
style: R
|
|
3196
3182
|
}
|
|
3197
3183
|
)
|
|
3198
3184
|
] })
|
|
3199
3185
|
]
|
|
3200
3186
|
}
|
|
3201
3187
|
),
|
|
3202
|
-
/* @__PURE__ */ s.
|
|
3188
|
+
/* @__PURE__ */ s.jsx(
|
|
3203
3189
|
"div",
|
|
3204
3190
|
{
|
|
3205
3191
|
style: {
|
|
3206
3192
|
display: "flex",
|
|
3207
|
-
|
|
3208
|
-
|
|
3193
|
+
justifyContent: "space-between",
|
|
3194
|
+
fontSize: "13px",
|
|
3195
|
+
marginTop: "6px"
|
|
3209
3196
|
},
|
|
3210
|
-
children:
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3197
|
+
children: h && /* @__PURE__ */ s.jsx(
|
|
3198
|
+
"a",
|
|
3199
|
+
{
|
|
3200
|
+
href: h,
|
|
3201
|
+
style: {
|
|
3202
|
+
color: o,
|
|
3203
|
+
textDecoration: "none",
|
|
3204
|
+
fontWeight: 500
|
|
3205
|
+
},
|
|
3206
|
+
children: "Already have an account?"
|
|
3207
|
+
}
|
|
3208
|
+
)
|
|
3209
|
+
}
|
|
3210
|
+
),
|
|
3211
|
+
/* @__PURE__ */ s.jsx(
|
|
3212
|
+
"button",
|
|
3213
|
+
{
|
|
3214
|
+
type: "submit",
|
|
3215
|
+
disabled: v,
|
|
3216
|
+
style: {
|
|
3217
|
+
padding: "12px",
|
|
3218
|
+
background: i,
|
|
3219
|
+
color: "#fff",
|
|
3220
|
+
border: "none",
|
|
3221
|
+
borderRadius: "10px",
|
|
3222
|
+
fontWeight: 600,
|
|
3223
|
+
cursor: v ? "not-allowed" : "pointer",
|
|
3224
|
+
opacity: v ? 0.7 : 1,
|
|
3225
|
+
marginTop: "8px",
|
|
3226
|
+
display: "flex",
|
|
3227
|
+
alignItems: "center",
|
|
3228
|
+
justifyContent: "center",
|
|
3229
|
+
gap: "8px"
|
|
3230
|
+
},
|
|
3231
|
+
children: v ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3232
|
+
/* @__PURE__ */ s.jsx(
|
|
3233
|
+
ns,
|
|
3234
|
+
{
|
|
3235
|
+
size: 18,
|
|
3236
|
+
style: { animation: "spin 1s linear infinite" }
|
|
3237
|
+
}
|
|
3238
|
+
),
|
|
3239
|
+
"Creating Account..."
|
|
3240
|
+
] }) : "Create Account"
|
|
3251
3241
|
}
|
|
3252
3242
|
)
|
|
3253
|
-
]
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
"
|
|
3273
|
-
{
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
color: F.type === "success" ? o : "#ef4444"
|
|
3305
|
-
},
|
|
3306
|
-
children: [
|
|
3307
|
-
F.type === "success" ? /* @__PURE__ */ s.jsx(Ue, { size: 20 }) : /* @__PURE__ */ s.jsx(ae, { size: 20 }),
|
|
3308
|
-
/* @__PURE__ */ s.jsx("span", { children: F.text })
|
|
3309
|
-
]
|
|
3310
|
-
}
|
|
3311
|
-
),
|
|
3312
|
-
/* @__PURE__ */ s.jsxs(
|
|
3313
|
-
"div",
|
|
3314
|
-
{
|
|
3315
|
-
style: {
|
|
3316
|
-
textAlign: "center",
|
|
3317
|
-
fontSize: "12px",
|
|
3318
|
-
color: z,
|
|
3319
|
-
marginTop: "20px",
|
|
3320
|
-
padding: "0 4px"
|
|
3321
|
-
},
|
|
3322
|
-
children: [
|
|
3323
|
-
"Secure authentication powered by",
|
|
3324
|
-
" ",
|
|
3325
|
-
/* @__PURE__ */ s.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3326
|
-
]
|
|
3327
|
-
}
|
|
3328
|
-
)
|
|
3329
|
-
]
|
|
3330
|
-
}
|
|
3331
|
-
)
|
|
3243
|
+
]
|
|
3244
|
+
}
|
|
3245
|
+
),
|
|
3246
|
+
F && /* @__PURE__ */ s.jsxs(
|
|
3247
|
+
"div",
|
|
3248
|
+
{
|
|
3249
|
+
style: {
|
|
3250
|
+
marginTop: "16px",
|
|
3251
|
+
padding: "12px",
|
|
3252
|
+
borderRadius: "12px",
|
|
3253
|
+
fontSize: "14px",
|
|
3254
|
+
display: "flex",
|
|
3255
|
+
alignItems: "center",
|
|
3256
|
+
gap: "10px",
|
|
3257
|
+
backgroundColor: F.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
3258
|
+
border: F.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3259
|
+
color: F.type === "success" ? o : "#ef4444"
|
|
3260
|
+
},
|
|
3261
|
+
children: [
|
|
3262
|
+
F.type === "success" ? /* @__PURE__ */ s.jsx(Ue, { size: 20 }) : /* @__PURE__ */ s.jsx(ae, { size: 20 }),
|
|
3263
|
+
/* @__PURE__ */ s.jsx("span", { children: F.text })
|
|
3264
|
+
]
|
|
3265
|
+
}
|
|
3266
|
+
),
|
|
3267
|
+
/* @__PURE__ */ s.jsxs(
|
|
3268
|
+
"div",
|
|
3269
|
+
{
|
|
3270
|
+
style: {
|
|
3271
|
+
textAlign: "center",
|
|
3272
|
+
fontSize: "12px",
|
|
3273
|
+
color: N,
|
|
3274
|
+
marginTop: "20px",
|
|
3275
|
+
padding: "0 4px"
|
|
3276
|
+
},
|
|
3277
|
+
children: [
|
|
3278
|
+
"Secure authentication powered by",
|
|
3279
|
+
" ",
|
|
3280
|
+
/* @__PURE__ */ s.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3281
|
+
]
|
|
3282
|
+
}
|
|
3283
|
+
)
|
|
3284
|
+
]
|
|
3285
|
+
}
|
|
3286
|
+
),
|
|
3287
|
+
/* @__PURE__ */ s.jsx("style", { children: `
|
|
3288
|
+
@keyframes spin {
|
|
3289
|
+
from { transform: rotate(0deg); }
|
|
3290
|
+
to { transform: rotate(360deg); }
|
|
3291
|
+
}
|
|
3292
|
+
` })
|
|
3293
|
+
]
|
|
3332
3294
|
}
|
|
3333
3295
|
);
|
|
3334
|
-
}, Es = async (
|
|
3335
|
-
const {
|
|
3336
|
-
if (!
|
|
3337
|
-
throw new Error("API key is required for
|
|
3338
|
-
if (!r || !n || !o || !i)
|
|
3339
|
-
throw new Error("Name, email, password, and appId are required");
|
|
3296
|
+
}, Es = async (e, t) => {
|
|
3297
|
+
const { email: r, password: n, appId: o } = e, { baseUrl: i, apiKey: a } = t;
|
|
3298
|
+
if (!a)
|
|
3299
|
+
throw new Error("API key is required for login");
|
|
3340
3300
|
try {
|
|
3341
|
-
const
|
|
3342
|
-
`${
|
|
3343
|
-
{
|
|
3344
|
-
name: r,
|
|
3345
|
-
email: n,
|
|
3346
|
-
password: o,
|
|
3347
|
-
appId: i,
|
|
3348
|
-
phone: a,
|
|
3349
|
-
address: l,
|
|
3350
|
-
avatarUrl: h,
|
|
3351
|
-
isActive: p,
|
|
3352
|
-
role: u
|
|
3353
|
-
},
|
|
3301
|
+
const l = await q.post(
|
|
3302
|
+
`${i}/users/login`,
|
|
3303
|
+
{ email: r, password: n, appId: o },
|
|
3354
3304
|
{
|
|
3355
3305
|
headers: {
|
|
3356
3306
|
"Content-Type": "application/json",
|
|
3357
|
-
"x-api-key":
|
|
3307
|
+
"x-api-key": a
|
|
3358
3308
|
}
|
|
3359
3309
|
}
|
|
3360
3310
|
);
|
|
3361
|
-
return
|
|
3362
|
-
} catch (
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3365
|
-
if (c.includes("already exists"))
|
|
3366
|
-
throw {
|
|
3367
|
-
success: !1,
|
|
3368
|
-
message: "User with this email already exists for this app",
|
|
3369
|
-
status: 400
|
|
3370
|
-
};
|
|
3371
|
-
if (c.includes("inactive"))
|
|
3372
|
-
throw {
|
|
3373
|
-
success: !1,
|
|
3374
|
-
message: "Cannot signup under an inactive app",
|
|
3375
|
-
status: 400
|
|
3376
|
-
};
|
|
3377
|
-
}
|
|
3378
|
-
throw S.response?.status === 404 ? {
|
|
3379
|
-
success: !1,
|
|
3380
|
-
message: "Invalid or inactive app",
|
|
3381
|
-
status: 404
|
|
3382
|
-
} : {
|
|
3311
|
+
return l.data?.user && localStorage.setItem("userInfo", JSON.stringify(l.data.user)), l.data.user;
|
|
3312
|
+
} catch (l) {
|
|
3313
|
+
const h = l.response?.data?.message || l.message || "Login failed";
|
|
3314
|
+
throw console.error("Login API Error:", h), {
|
|
3383
3315
|
success: !1,
|
|
3384
|
-
message:
|
|
3385
|
-
status:
|
|
3316
|
+
message: h,
|
|
3317
|
+
status: l.response?.status || 500
|
|
3386
3318
|
};
|
|
3387
3319
|
}
|
|
3388
|
-
},
|
|
3389
|
-
logoUrl:
|
|
3390
|
-
title:
|
|
3391
|
-
subtitle: r = "
|
|
3320
|
+
}, Qs = ({
|
|
3321
|
+
logoUrl: e,
|
|
3322
|
+
title: t = "Sign In to Your Account",
|
|
3323
|
+
subtitle: r = "Welcome back! Please enter your details",
|
|
3392
3324
|
footerText: n = "Secure authentication powered by Neuctra Authix",
|
|
3393
3325
|
primaryColor: o = "#00C214",
|
|
3394
3326
|
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3395
3327
|
darkMode: a = !0,
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
onSuccess: p,
|
|
3400
|
-
onError: u
|
|
3328
|
+
signupUrl: l,
|
|
3329
|
+
onSuccess: h,
|
|
3330
|
+
onError: p
|
|
3401
3331
|
}) => {
|
|
3402
|
-
const { baseUrl:
|
|
3403
|
-
name: "",
|
|
3332
|
+
const { baseUrl: u, apiKey: b, appId: C } = fe(), [S, c] = $("login"), [g, y] = $(1), [P, B] = $(!1), [v, U] = $(!1), [F, m] = $(null), [O, w] = $(""), [L, V] = $(""), [N, A] = $({
|
|
3404
3333
|
email: "",
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
m({ type: "success", text: "Account created successfully!" }), p && p(f);
|
|
3422
|
-
} catch (H) {
|
|
3423
|
-
const f = H.message || "Signup failed. Please try again.";
|
|
3424
|
-
m({ type: "error", text: f }), u && u(H);
|
|
3425
|
-
} finally {
|
|
3426
|
-
U(!1);
|
|
3427
|
-
}
|
|
3334
|
+
otp: "",
|
|
3335
|
+
newPassword: "",
|
|
3336
|
+
appId: C
|
|
3337
|
+
}), I = window.innerWidth < 768, k = a ? "#ffffff" : "#111827", z = a ? "#a1a1aa" : "#6b7280", E = a ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", R = a ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", M = async (x) => {
|
|
3338
|
+
x.preventDefault(), U(!0), m(null);
|
|
3339
|
+
try {
|
|
3340
|
+
const j = await Es(
|
|
3341
|
+
{ email: O, password: L, appId: C },
|
|
3342
|
+
{ baseUrl: u, apiKey: b }
|
|
3343
|
+
);
|
|
3344
|
+
m({ type: "success", text: `Welcome ${j.name}` }), h?.(j), window.location.reload();
|
|
3345
|
+
} catch (j) {
|
|
3346
|
+
const W = j.message || "Login failed";
|
|
3347
|
+
m({ type: "error", text: W }), p?.(j);
|
|
3348
|
+
} finally {
|
|
3349
|
+
U(!1);
|
|
3428
3350
|
}
|
|
3429
|
-
},
|
|
3351
|
+
}, H = (x) => {
|
|
3352
|
+
A({ ...N, [x.target.name]: x.target.value });
|
|
3353
|
+
}, f = async (x) => {
|
|
3354
|
+
x.preventDefault(), U(!0), m(null);
|
|
3355
|
+
try {
|
|
3356
|
+
const j = await q.post(
|
|
3357
|
+
`${u}/users/forgot-password`,
|
|
3358
|
+
{
|
|
3359
|
+
email: N.email,
|
|
3360
|
+
appId: C
|
|
3361
|
+
},
|
|
3362
|
+
{ headers: { "x-api-key": b } }
|
|
3363
|
+
);
|
|
3364
|
+
j.data.success ? (y(2), m({ type: "success", text: "OTP sent to your email" })) : m({
|
|
3365
|
+
type: "error",
|
|
3366
|
+
text: j.data.message || "Failed to send OTP"
|
|
3367
|
+
});
|
|
3368
|
+
} catch (j) {
|
|
3369
|
+
m({
|
|
3370
|
+
type: "error",
|
|
3371
|
+
text: j.response?.data?.message || "Something went wrong"
|
|
3372
|
+
});
|
|
3373
|
+
} finally {
|
|
3374
|
+
U(!1);
|
|
3375
|
+
}
|
|
3376
|
+
}, T = async (x) => {
|
|
3377
|
+
x.preventDefault(), U(!0), m(null);
|
|
3378
|
+
try {
|
|
3379
|
+
const j = await q.post(
|
|
3380
|
+
`${u}/users/reset-password`,
|
|
3381
|
+
N,
|
|
3382
|
+
{ headers: { "x-api-key": b } }
|
|
3383
|
+
);
|
|
3384
|
+
j.data.success ? (m({ type: "success", text: "Password reset successfully!" }), y(1), A({ email: "", otp: "", newPassword: "", appId: C }), c("login")) : m({ type: "error", text: j.data.message || "Reset failed" });
|
|
3385
|
+
} catch (j) {
|
|
3386
|
+
m({
|
|
3387
|
+
type: "error",
|
|
3388
|
+
text: j.response?.data?.message || "Something went wrong"
|
|
3389
|
+
});
|
|
3390
|
+
} finally {
|
|
3391
|
+
U(!1);
|
|
3392
|
+
}
|
|
3393
|
+
}, D = {
|
|
3430
3394
|
width: "100%",
|
|
3431
|
-
padding:
|
|
3432
|
-
backgroundColor:
|
|
3433
|
-
border: `1px solid ${
|
|
3395
|
+
padding: I ? "14px 14px 14px 44px" : "16px 16px 16px 44px",
|
|
3396
|
+
backgroundColor: E,
|
|
3397
|
+
border: `1px solid ${R}`,
|
|
3434
3398
|
borderRadius: "12px",
|
|
3435
|
-
color:
|
|
3399
|
+
color: k,
|
|
3436
3400
|
fontSize: "15px",
|
|
3437
3401
|
outline: "none",
|
|
3438
|
-
transition: "all 0.2s ease"
|
|
3439
|
-
boxSizing: "border-box"
|
|
3402
|
+
transition: "all 0.2s ease"
|
|
3440
3403
|
};
|
|
3441
|
-
return /* @__PURE__ */ s.
|
|
3404
|
+
return /* @__PURE__ */ s.jsx(
|
|
3442
3405
|
"div",
|
|
3443
3406
|
{
|
|
3444
3407
|
style: {
|
|
@@ -3446,311 +3409,324 @@ const ks = [
|
|
|
3446
3409
|
justifyContent: "center",
|
|
3447
3410
|
alignItems: "center"
|
|
3448
3411
|
},
|
|
3449
|
-
children:
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
{
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
{
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
t ? /* @__PURE__ */ s.jsx(
|
|
3476
|
-
"img",
|
|
3477
|
-
{
|
|
3478
|
-
src: t,
|
|
3479
|
-
alt: "Logo",
|
|
3480
|
-
style: { height: "50px", width: "50px", marginBottom: "10px" }
|
|
3481
|
-
}
|
|
3482
|
-
) : /* @__PURE__ */ s.jsx(
|
|
3483
|
-
de,
|
|
3484
|
-
{
|
|
3485
|
-
size: 40,
|
|
3486
|
-
color: o,
|
|
3487
|
-
style: { marginBottom: "10px" }
|
|
3488
|
-
}
|
|
3489
|
-
),
|
|
3490
|
-
/* @__PURE__ */ s.jsx(
|
|
3491
|
-
"h2",
|
|
3492
|
-
{
|
|
3493
|
-
style: {
|
|
3494
|
-
fontSize: "24px",
|
|
3495
|
-
fontWeight: 700,
|
|
3496
|
-
color: V,
|
|
3497
|
-
margin: 0
|
|
3498
|
-
},
|
|
3499
|
-
children: e
|
|
3500
|
-
}
|
|
3501
|
-
),
|
|
3502
|
-
/* @__PURE__ */ s.jsx(
|
|
3503
|
-
"p",
|
|
3504
|
-
{
|
|
3505
|
-
style: {
|
|
3506
|
-
fontSize: "14px",
|
|
3507
|
-
color: N,
|
|
3508
|
-
margin: "6px 0 0 0"
|
|
3509
|
-
},
|
|
3510
|
-
children: r
|
|
3511
|
-
}
|
|
3512
|
-
)
|
|
3513
|
-
]
|
|
3514
|
-
}
|
|
3515
|
-
),
|
|
3516
|
-
l && g.avatarUrl && /* @__PURE__ */ s.jsx(
|
|
3517
|
-
"div",
|
|
3518
|
-
{
|
|
3519
|
-
style: {
|
|
3520
|
-
display: "flex",
|
|
3521
|
-
justifyContent: "center",
|
|
3522
|
-
marginBottom: "16px"
|
|
3523
|
-
},
|
|
3524
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3412
|
+
children: /* @__PURE__ */ s.jsxs(
|
|
3413
|
+
"div",
|
|
3414
|
+
{
|
|
3415
|
+
style: {
|
|
3416
|
+
minWidth: I ? "320px" : "340px",
|
|
3417
|
+
maxWidth: "390px",
|
|
3418
|
+
width: "100%",
|
|
3419
|
+
display: "flex",
|
|
3420
|
+
flexDirection: "column",
|
|
3421
|
+
borderRadius: "10px",
|
|
3422
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3423
|
+
backgroundColor: a ? "#000000" : "#ffffff",
|
|
3424
|
+
padding: I ? "30px 24px" : "32px 28px"
|
|
3425
|
+
},
|
|
3426
|
+
children: [
|
|
3427
|
+
/* @__PURE__ */ s.jsxs(
|
|
3428
|
+
"div",
|
|
3429
|
+
{
|
|
3430
|
+
style: {
|
|
3431
|
+
display: "flex",
|
|
3432
|
+
flexDirection: "column",
|
|
3433
|
+
alignItems: "center",
|
|
3434
|
+
marginBottom: "20px"
|
|
3435
|
+
},
|
|
3436
|
+
children: [
|
|
3437
|
+
e ? /* @__PURE__ */ s.jsx(
|
|
3525
3438
|
"img",
|
|
3526
3439
|
{
|
|
3527
|
-
src:
|
|
3528
|
-
alt: "
|
|
3440
|
+
src: e,
|
|
3441
|
+
alt: "Logo",
|
|
3442
|
+
style: { height: "50px", width: "50px", marginBottom: "10px" }
|
|
3443
|
+
}
|
|
3444
|
+
) : /* @__PURE__ */ s.jsx(
|
|
3445
|
+
de,
|
|
3446
|
+
{
|
|
3447
|
+
size: 40,
|
|
3448
|
+
color: o,
|
|
3449
|
+
style: { marginBottom: "10px" }
|
|
3450
|
+
}
|
|
3451
|
+
),
|
|
3452
|
+
/* @__PURE__ */ s.jsx(
|
|
3453
|
+
"h2",
|
|
3454
|
+
{
|
|
3529
3455
|
style: {
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
border: `2px solid ${o}30`
|
|
3456
|
+
fontSize: "24px",
|
|
3457
|
+
fontWeight: 700,
|
|
3458
|
+
color: k,
|
|
3459
|
+
margin: 0
|
|
3535
3460
|
},
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3461
|
+
children: S === "login" ? t : g === 1 ? "Forgot Password" : "Reset Password"
|
|
3462
|
+
}
|
|
3463
|
+
),
|
|
3464
|
+
/* @__PURE__ */ s.jsx(
|
|
3465
|
+
"p",
|
|
3466
|
+
{
|
|
3467
|
+
style: {
|
|
3468
|
+
fontSize: "14px",
|
|
3469
|
+
color: z,
|
|
3470
|
+
margin: "6px 0 0 0"
|
|
3471
|
+
},
|
|
3472
|
+
children: S === "login" ? r : "Follow the steps to reset your password"
|
|
3540
3473
|
}
|
|
3541
3474
|
)
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
fontSize: "14px",
|
|
3557
|
-
fontWeight: 500,
|
|
3558
|
-
color: V
|
|
3559
|
-
},
|
|
3560
|
-
children: "Full Name"
|
|
3561
|
-
}
|
|
3562
|
-
),
|
|
3563
|
-
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3564
|
-
/* @__PURE__ */ s.jsx(
|
|
3565
|
-
de,
|
|
3566
|
-
{
|
|
3567
|
-
size: 20,
|
|
3568
|
-
style: {
|
|
3569
|
-
position: "absolute",
|
|
3570
|
-
left: "14px",
|
|
3571
|
-
top: "50%",
|
|
3572
|
-
transform: "translateY(-50%)",
|
|
3573
|
-
color: N
|
|
3574
|
-
}
|
|
3575
|
-
}
|
|
3576
|
-
),
|
|
3577
|
-
/* @__PURE__ */ s.jsx(
|
|
3578
|
-
"input",
|
|
3579
|
-
{
|
|
3580
|
-
id: "signup-name",
|
|
3581
|
-
type: "text",
|
|
3582
|
-
name: "name",
|
|
3583
|
-
placeholder: "Enter your full name",
|
|
3584
|
-
value: g.name,
|
|
3585
|
-
onChange: k,
|
|
3586
|
-
style: {
|
|
3587
|
-
...R,
|
|
3588
|
-
borderColor: I.name ? "#ef4444" : O
|
|
3589
|
-
}
|
|
3590
|
-
}
|
|
3591
|
-
)
|
|
3592
|
-
] }),
|
|
3593
|
-
I.name && /* @__PURE__ */ s.jsx(
|
|
3594
|
-
"span",
|
|
3595
|
-
{
|
|
3596
|
-
style: {
|
|
3597
|
-
color: "#ef4444",
|
|
3598
|
-
fontSize: "12px",
|
|
3599
|
-
marginTop: "2px"
|
|
3600
|
-
},
|
|
3601
|
-
children: I.name
|
|
3602
|
-
}
|
|
3603
|
-
)
|
|
3604
|
-
] }),
|
|
3605
|
-
/* @__PURE__ */ s.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
3606
|
-
/* @__PURE__ */ s.jsx(
|
|
3607
|
-
"label",
|
|
3608
|
-
{
|
|
3609
|
-
htmlFor: "signup-email",
|
|
3610
|
-
style: {
|
|
3611
|
-
fontSize: "14px",
|
|
3612
|
-
fontWeight: 500,
|
|
3613
|
-
color: V
|
|
3614
|
-
},
|
|
3615
|
-
children: "Email Address"
|
|
3616
|
-
}
|
|
3617
|
-
),
|
|
3618
|
-
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3619
|
-
/* @__PURE__ */ s.jsx(
|
|
3620
|
-
be,
|
|
3621
|
-
{
|
|
3622
|
-
size: 20,
|
|
3623
|
-
style: {
|
|
3624
|
-
position: "absolute",
|
|
3625
|
-
left: "14px",
|
|
3626
|
-
top: "50%",
|
|
3627
|
-
transform: "translateY(-50%)",
|
|
3628
|
-
color: N
|
|
3629
|
-
}
|
|
3630
|
-
}
|
|
3631
|
-
),
|
|
3632
|
-
/* @__PURE__ */ s.jsx(
|
|
3633
|
-
"input",
|
|
3634
|
-
{
|
|
3635
|
-
id: "signup-email",
|
|
3636
|
-
type: "email",
|
|
3637
|
-
name: "email",
|
|
3638
|
-
placeholder: "Enter your email address",
|
|
3639
|
-
value: g.email,
|
|
3640
|
-
onChange: k,
|
|
3641
|
-
style: {
|
|
3642
|
-
...R,
|
|
3643
|
-
borderColor: I.email ? "#ef4444" : O
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
)
|
|
3647
|
-
] }),
|
|
3648
|
-
I.email && /* @__PURE__ */ s.jsx(
|
|
3649
|
-
"span",
|
|
3650
|
-
{
|
|
3651
|
-
style: {
|
|
3652
|
-
color: "#ef4444",
|
|
3653
|
-
fontSize: "12px",
|
|
3654
|
-
marginTop: "2px"
|
|
3655
|
-
},
|
|
3656
|
-
children: I.email
|
|
3657
|
-
}
|
|
3658
|
-
)
|
|
3659
|
-
] }),
|
|
3660
|
-
/* @__PURE__ */ s.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
3661
|
-
/* @__PURE__ */ s.jsx(
|
|
3662
|
-
"label",
|
|
3663
|
-
{
|
|
3664
|
-
htmlFor: "signup-password",
|
|
3665
|
-
style: {
|
|
3666
|
-
fontSize: "14px",
|
|
3667
|
-
fontWeight: 500,
|
|
3668
|
-
color: V
|
|
3669
|
-
},
|
|
3670
|
-
children: "Password"
|
|
3671
|
-
}
|
|
3672
|
-
),
|
|
3673
|
-
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3475
|
+
]
|
|
3476
|
+
}
|
|
3477
|
+
),
|
|
3478
|
+
S === "login" && /* @__PURE__ */ s.jsxs(
|
|
3479
|
+
"form",
|
|
3480
|
+
{
|
|
3481
|
+
onSubmit: M,
|
|
3482
|
+
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3483
|
+
children: [
|
|
3484
|
+
/* @__PURE__ */ s.jsxs(
|
|
3485
|
+
"div",
|
|
3486
|
+
{
|
|
3487
|
+
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
3488
|
+
children: [
|
|
3674
3489
|
/* @__PURE__ */ s.jsx(
|
|
3675
|
-
|
|
3490
|
+
"label",
|
|
3676
3491
|
{
|
|
3677
|
-
|
|
3492
|
+
htmlFor: "login-email",
|
|
3678
3493
|
style: {
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
}
|
|
3494
|
+
fontSize: "14px",
|
|
3495
|
+
fontWeight: 500,
|
|
3496
|
+
color: a ? "#ffffff" : "#000000"
|
|
3497
|
+
},
|
|
3498
|
+
children: "Email Address"
|
|
3685
3499
|
}
|
|
3686
3500
|
),
|
|
3501
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3502
|
+
/* @__PURE__ */ s.jsx(
|
|
3503
|
+
be,
|
|
3504
|
+
{
|
|
3505
|
+
size: 20,
|
|
3506
|
+
style: {
|
|
3507
|
+
position: "absolute",
|
|
3508
|
+
left: "14px",
|
|
3509
|
+
top: "50%",
|
|
3510
|
+
transform: "translateY(-50%)",
|
|
3511
|
+
color: z
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
),
|
|
3515
|
+
/* @__PURE__ */ s.jsx(
|
|
3516
|
+
"input",
|
|
3517
|
+
{
|
|
3518
|
+
id: "login-email",
|
|
3519
|
+
type: "email",
|
|
3520
|
+
placeholder: "Enter your email",
|
|
3521
|
+
value: O,
|
|
3522
|
+
onChange: (x) => w(x.target.value),
|
|
3523
|
+
style: D
|
|
3524
|
+
}
|
|
3525
|
+
)
|
|
3526
|
+
] })
|
|
3527
|
+
]
|
|
3528
|
+
}
|
|
3529
|
+
),
|
|
3530
|
+
/* @__PURE__ */ s.jsxs(
|
|
3531
|
+
"div",
|
|
3532
|
+
{
|
|
3533
|
+
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
3534
|
+
children: [
|
|
3687
3535
|
/* @__PURE__ */ s.jsx(
|
|
3688
|
-
"
|
|
3536
|
+
"label",
|
|
3689
3537
|
{
|
|
3690
|
-
|
|
3691
|
-
type: P ? "text" : "password",
|
|
3692
|
-
name: "password",
|
|
3693
|
-
placeholder: "Create a secure password",
|
|
3694
|
-
value: g.password,
|
|
3695
|
-
onChange: k,
|
|
3538
|
+
htmlFor: "login-password",
|
|
3696
3539
|
style: {
|
|
3697
|
-
|
|
3698
|
-
|
|
3540
|
+
fontSize: "14px",
|
|
3541
|
+
fontWeight: 500,
|
|
3542
|
+
color: a ? "#ffffff" : "#000000"
|
|
3543
|
+
},
|
|
3544
|
+
children: "Password"
|
|
3545
|
+
}
|
|
3546
|
+
),
|
|
3547
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3548
|
+
/* @__PURE__ */ s.jsx(
|
|
3549
|
+
ie,
|
|
3550
|
+
{
|
|
3551
|
+
size: 20,
|
|
3552
|
+
style: {
|
|
3553
|
+
position: "absolute",
|
|
3554
|
+
left: "14px",
|
|
3555
|
+
top: "50%",
|
|
3556
|
+
transform: "translateY(-50%)",
|
|
3557
|
+
color: z
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
),
|
|
3561
|
+
/* @__PURE__ */ s.jsx(
|
|
3562
|
+
"input",
|
|
3563
|
+
{
|
|
3564
|
+
id: "login-password",
|
|
3565
|
+
type: P ? "text" : "password",
|
|
3566
|
+
placeholder: "Enter your password",
|
|
3567
|
+
value: L,
|
|
3568
|
+
onChange: (x) => V(x.target.value),
|
|
3569
|
+
style: D
|
|
3570
|
+
}
|
|
3571
|
+
),
|
|
3572
|
+
/* @__PURE__ */ s.jsx(
|
|
3573
|
+
"button",
|
|
3574
|
+
{
|
|
3575
|
+
type: "button",
|
|
3576
|
+
onClick: () => B(!P),
|
|
3577
|
+
style: {
|
|
3578
|
+
position: "absolute",
|
|
3579
|
+
right: "14px",
|
|
3580
|
+
padding: "4px",
|
|
3581
|
+
top: "50%",
|
|
3582
|
+
transform: "translateY(-50%)",
|
|
3583
|
+
background: "transparent",
|
|
3584
|
+
border: "none",
|
|
3585
|
+
color: z,
|
|
3586
|
+
cursor: "pointer"
|
|
3587
|
+
},
|
|
3588
|
+
children: P ? /* @__PURE__ */ s.jsx(et, { size: 20 }) : /* @__PURE__ */ s.jsx(tt, { size: 20 })
|
|
3699
3589
|
}
|
|
3590
|
+
)
|
|
3591
|
+
] })
|
|
3592
|
+
]
|
|
3593
|
+
}
|
|
3594
|
+
),
|
|
3595
|
+
/* @__PURE__ */ s.jsxs(
|
|
3596
|
+
"div",
|
|
3597
|
+
{
|
|
3598
|
+
style: {
|
|
3599
|
+
display: "flex",
|
|
3600
|
+
justifyContent: "space-between",
|
|
3601
|
+
fontSize: "13px"
|
|
3602
|
+
},
|
|
3603
|
+
children: [
|
|
3604
|
+
l && /* @__PURE__ */ s.jsx(
|
|
3605
|
+
"a",
|
|
3606
|
+
{
|
|
3607
|
+
href: l,
|
|
3608
|
+
style: {
|
|
3609
|
+
color: o,
|
|
3610
|
+
textDecoration: "none",
|
|
3611
|
+
fontWeight: 500
|
|
3612
|
+
},
|
|
3613
|
+
children: "Create new account"
|
|
3700
3614
|
}
|
|
3701
3615
|
),
|
|
3702
3616
|
/* @__PURE__ */ s.jsx(
|
|
3703
3617
|
"button",
|
|
3704
3618
|
{
|
|
3705
3619
|
type: "button",
|
|
3706
|
-
onClick: () =>
|
|
3620
|
+
onClick: () => c("forgot"),
|
|
3707
3621
|
style: {
|
|
3708
|
-
|
|
3709
|
-
right: "14px",
|
|
3710
|
-
top: "50%",
|
|
3711
|
-
transform: "translateY(-50%)",
|
|
3712
|
-
background: "transparent",
|
|
3622
|
+
background: "none",
|
|
3713
3623
|
border: "none",
|
|
3714
|
-
color:
|
|
3715
|
-
|
|
3716
|
-
|
|
3624
|
+
color: o,
|
|
3625
|
+
fontWeight: 500,
|
|
3626
|
+
cursor: "pointer"
|
|
3717
3627
|
},
|
|
3718
|
-
children:
|
|
3628
|
+
children: "Forgot password?"
|
|
3719
3629
|
}
|
|
3720
3630
|
)
|
|
3721
|
-
]
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3631
|
+
]
|
|
3632
|
+
}
|
|
3633
|
+
),
|
|
3634
|
+
/* @__PURE__ */ s.jsx(
|
|
3635
|
+
"button",
|
|
3636
|
+
{
|
|
3637
|
+
type: "submit",
|
|
3638
|
+
disabled: v,
|
|
3639
|
+
style: {
|
|
3640
|
+
padding: "12px",
|
|
3641
|
+
background: i,
|
|
3642
|
+
color: "#fff",
|
|
3643
|
+
border: "none",
|
|
3644
|
+
borderRadius: "10px",
|
|
3645
|
+
fontWeight: 600
|
|
3646
|
+
},
|
|
3647
|
+
children: v ? "Signing In..." : "Sign In"
|
|
3648
|
+
}
|
|
3649
|
+
)
|
|
3650
|
+
]
|
|
3651
|
+
}
|
|
3652
|
+
),
|
|
3653
|
+
S === "forgot" && /* @__PURE__ */ s.jsxs(
|
|
3654
|
+
"form",
|
|
3655
|
+
{
|
|
3656
|
+
onSubmit: g === 1 ? f : T,
|
|
3657
|
+
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3658
|
+
children: [
|
|
3659
|
+
g === 1 ? /* @__PURE__ */ s.jsxs(
|
|
3660
|
+
"div",
|
|
3661
|
+
{
|
|
3662
|
+
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
3663
|
+
children: [
|
|
3664
|
+
/* @__PURE__ */ s.jsx(
|
|
3665
|
+
"label",
|
|
3666
|
+
{
|
|
3667
|
+
htmlFor: "forgot-email",
|
|
3668
|
+
style: {
|
|
3669
|
+
fontSize: "14px",
|
|
3670
|
+
fontWeight: 500,
|
|
3671
|
+
color: a ? "#ffffff" : "#000000"
|
|
3672
|
+
},
|
|
3673
|
+
children: "Email Address"
|
|
3674
|
+
}
|
|
3675
|
+
),
|
|
3676
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3677
|
+
/* @__PURE__ */ s.jsx(
|
|
3678
|
+
be,
|
|
3679
|
+
{
|
|
3680
|
+
size: 20,
|
|
3681
|
+
style: {
|
|
3682
|
+
position: "absolute",
|
|
3683
|
+
left: "14px",
|
|
3684
|
+
top: "50%",
|
|
3685
|
+
transform: "translateY(-50%)",
|
|
3686
|
+
color: z
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
),
|
|
3690
|
+
/* @__PURE__ */ s.jsx(
|
|
3691
|
+
"input",
|
|
3692
|
+
{
|
|
3693
|
+
id: "forgot-email",
|
|
3694
|
+
type: "email",
|
|
3695
|
+
name: "email",
|
|
3696
|
+
placeholder: "Enter your email",
|
|
3697
|
+
value: N.email,
|
|
3698
|
+
onChange: H,
|
|
3699
|
+
style: D
|
|
3700
|
+
}
|
|
3701
|
+
)
|
|
3702
|
+
] })
|
|
3703
|
+
]
|
|
3704
|
+
}
|
|
3705
|
+
) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3706
|
+
/* @__PURE__ */ s.jsxs(
|
|
3735
3707
|
"div",
|
|
3736
3708
|
{
|
|
3737
|
-
style: {
|
|
3709
|
+
style: {
|
|
3710
|
+
display: "flex",
|
|
3711
|
+
flexDirection: "column",
|
|
3712
|
+
gap: "6px"
|
|
3713
|
+
},
|
|
3738
3714
|
children: [
|
|
3739
3715
|
/* @__PURE__ */ s.jsx(
|
|
3740
3716
|
"label",
|
|
3741
3717
|
{
|
|
3742
|
-
htmlFor: "
|
|
3718
|
+
htmlFor: "otp",
|
|
3743
3719
|
style: {
|
|
3744
3720
|
fontSize: "14px",
|
|
3745
3721
|
fontWeight: 500,
|
|
3746
|
-
color:
|
|
3722
|
+
color: a ? "#ffffff" : "#000000"
|
|
3747
3723
|
},
|
|
3748
|
-
children: "
|
|
3724
|
+
children: "One-Time Password (OTP)"
|
|
3749
3725
|
}
|
|
3750
3726
|
),
|
|
3751
3727
|
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3752
3728
|
/* @__PURE__ */ s.jsx(
|
|
3753
|
-
|
|
3729
|
+
Gn,
|
|
3754
3730
|
{
|
|
3755
3731
|
size: 20,
|
|
3756
3732
|
style: {
|
|
@@ -3758,137 +3734,205 @@ const ks = [
|
|
|
3758
3734
|
left: "14px",
|
|
3759
3735
|
top: "50%",
|
|
3760
3736
|
transform: "translateY(-50%)",
|
|
3761
|
-
color:
|
|
3737
|
+
color: z
|
|
3762
3738
|
}
|
|
3763
3739
|
}
|
|
3764
3740
|
),
|
|
3765
3741
|
/* @__PURE__ */ s.jsx(
|
|
3766
3742
|
"input",
|
|
3767
3743
|
{
|
|
3768
|
-
id: "
|
|
3769
|
-
type: "
|
|
3770
|
-
name: "
|
|
3771
|
-
placeholder: "
|
|
3772
|
-
value:
|
|
3773
|
-
onChange:
|
|
3774
|
-
style:
|
|
3744
|
+
id: "otp",
|
|
3745
|
+
type: "text",
|
|
3746
|
+
name: "otp",
|
|
3747
|
+
placeholder: "Enter OTP",
|
|
3748
|
+
value: N.otp,
|
|
3749
|
+
onChange: H,
|
|
3750
|
+
style: D
|
|
3775
3751
|
}
|
|
3776
3752
|
)
|
|
3777
3753
|
] })
|
|
3778
3754
|
]
|
|
3779
3755
|
}
|
|
3780
3756
|
),
|
|
3781
|
-
/* @__PURE__ */ s.
|
|
3757
|
+
/* @__PURE__ */ s.jsxs(
|
|
3782
3758
|
"div",
|
|
3783
3759
|
{
|
|
3784
3760
|
style: {
|
|
3785
3761
|
display: "flex",
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
marginTop: "6px"
|
|
3789
|
-
},
|
|
3790
|
-
children: h && /* @__PURE__ */ s.jsx(
|
|
3791
|
-
"a",
|
|
3792
|
-
{
|
|
3793
|
-
href: h,
|
|
3794
|
-
style: {
|
|
3795
|
-
color: o,
|
|
3796
|
-
textDecoration: "none",
|
|
3797
|
-
fontWeight: 500
|
|
3798
|
-
},
|
|
3799
|
-
children: "Already have an account?"
|
|
3800
|
-
}
|
|
3801
|
-
)
|
|
3802
|
-
}
|
|
3803
|
-
),
|
|
3804
|
-
/* @__PURE__ */ s.jsx(
|
|
3805
|
-
"button",
|
|
3806
|
-
{
|
|
3807
|
-
type: "submit",
|
|
3808
|
-
disabled: v,
|
|
3809
|
-
style: {
|
|
3810
|
-
padding: "12px",
|
|
3811
|
-
background: i,
|
|
3812
|
-
color: "#fff",
|
|
3813
|
-
border: "none",
|
|
3814
|
-
borderRadius: "10px",
|
|
3815
|
-
fontWeight: 600,
|
|
3816
|
-
cursor: v ? "not-allowed" : "pointer",
|
|
3817
|
-
opacity: v ? 0.7 : 1,
|
|
3818
|
-
marginTop: "8px",
|
|
3819
|
-
display: "flex",
|
|
3820
|
-
alignItems: "center",
|
|
3821
|
-
justifyContent: "center",
|
|
3822
|
-
gap: "8px"
|
|
3762
|
+
flexDirection: "column",
|
|
3763
|
+
gap: "6px"
|
|
3823
3764
|
},
|
|
3824
|
-
children:
|
|
3765
|
+
children: [
|
|
3825
3766
|
/* @__PURE__ */ s.jsx(
|
|
3826
|
-
|
|
3767
|
+
"label",
|
|
3827
3768
|
{
|
|
3828
|
-
|
|
3829
|
-
style: {
|
|
3769
|
+
htmlFor: "newPassword",
|
|
3770
|
+
style: {
|
|
3771
|
+
fontSize: "14px",
|
|
3772
|
+
fontWeight: 500,
|
|
3773
|
+
color: a ? "#ffffff" : "#000000"
|
|
3774
|
+
},
|
|
3775
|
+
children: "New Password"
|
|
3830
3776
|
}
|
|
3831
3777
|
),
|
|
3832
|
-
"
|
|
3833
|
-
|
|
3778
|
+
/* @__PURE__ */ s.jsxs("div", { style: { position: "relative" }, children: [
|
|
3779
|
+
/* @__PURE__ */ s.jsx(
|
|
3780
|
+
ie,
|
|
3781
|
+
{
|
|
3782
|
+
size: 20,
|
|
3783
|
+
style: {
|
|
3784
|
+
position: "absolute",
|
|
3785
|
+
left: "14px",
|
|
3786
|
+
top: "50%",
|
|
3787
|
+
transform: "translateY(-50%)",
|
|
3788
|
+
color: z
|
|
3789
|
+
}
|
|
3790
|
+
}
|
|
3791
|
+
),
|
|
3792
|
+
/* @__PURE__ */ s.jsx(
|
|
3793
|
+
"input",
|
|
3794
|
+
{
|
|
3795
|
+
id: "newPassword",
|
|
3796
|
+
type: "password",
|
|
3797
|
+
name: "newPassword",
|
|
3798
|
+
placeholder: "Enter new password",
|
|
3799
|
+
value: N.newPassword,
|
|
3800
|
+
onChange: H,
|
|
3801
|
+
style: D
|
|
3802
|
+
}
|
|
3803
|
+
)
|
|
3804
|
+
] })
|
|
3805
|
+
]
|
|
3834
3806
|
}
|
|
3835
3807
|
)
|
|
3836
|
-
]
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3808
|
+
] }),
|
|
3809
|
+
/* @__PURE__ */ s.jsx(
|
|
3810
|
+
"button",
|
|
3811
|
+
{
|
|
3812
|
+
type: "submit",
|
|
3813
|
+
disabled: v,
|
|
3814
|
+
style: {
|
|
3815
|
+
padding: "12px",
|
|
3816
|
+
background: i,
|
|
3817
|
+
color: "#fff",
|
|
3818
|
+
border: "none",
|
|
3819
|
+
fontSize: "15px",
|
|
3820
|
+
borderRadius: "10px",
|
|
3821
|
+
fontWeight: 600
|
|
3822
|
+
},
|
|
3823
|
+
children: v ? "Please wait..." : g === 1 ? "Send Reset OTP" : "Reset Password"
|
|
3824
|
+
}
|
|
3825
|
+
),
|
|
3826
|
+
/* @__PURE__ */ s.jsx(
|
|
3827
|
+
"button",
|
|
3828
|
+
{
|
|
3829
|
+
type: "button",
|
|
3830
|
+
onClick: () => {
|
|
3831
|
+
c("login"), y(1);
|
|
3832
|
+
},
|
|
3833
|
+
style: {
|
|
3834
|
+
background: "none",
|
|
3835
|
+
border: "none",
|
|
3836
|
+
color: z,
|
|
3837
|
+
marginTop: "6px",
|
|
3838
|
+
cursor: "pointer"
|
|
3839
|
+
},
|
|
3840
|
+
children: "Back to Login"
|
|
3841
|
+
}
|
|
3842
|
+
)
|
|
3843
|
+
]
|
|
3844
|
+
}
|
|
3845
|
+
),
|
|
3846
|
+
F && /* @__PURE__ */ s.jsxs(
|
|
3847
|
+
"div",
|
|
3848
|
+
{
|
|
3849
|
+
style: {
|
|
3850
|
+
marginTop: "16px",
|
|
3851
|
+
padding: "12px",
|
|
3852
|
+
borderRadius: "12px",
|
|
3853
|
+
fontSize: "14px",
|
|
3854
|
+
display: "flex",
|
|
3855
|
+
alignItems: "center",
|
|
3856
|
+
gap: "10px",
|
|
3857
|
+
backgroundColor: F.type === "success" ? `${o}15` : "rgba(239,68,68,0.1)",
|
|
3858
|
+
border: F.type === "success" ? `1px solid ${o}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3859
|
+
color: F.type === "success" ? o : "#ef4444"
|
|
3860
|
+
},
|
|
3861
|
+
children: [
|
|
3862
|
+
F.type === "success" ? /* @__PURE__ */ s.jsx(Ue, { size: 20 }) : /* @__PURE__ */ s.jsx(ae, { size: 20 }),
|
|
3863
|
+
/* @__PURE__ */ s.jsx("span", { children: F.text })
|
|
3864
|
+
]
|
|
3865
|
+
}
|
|
3866
|
+
),
|
|
3867
|
+
/* @__PURE__ */ s.jsxs(
|
|
3868
|
+
"div",
|
|
3869
|
+
{
|
|
3870
|
+
style: {
|
|
3871
|
+
textAlign: "center",
|
|
3872
|
+
fontSize: "12px",
|
|
3873
|
+
color: z,
|
|
3874
|
+
marginTop: "20px",
|
|
3875
|
+
padding: "0 4px"
|
|
3876
|
+
},
|
|
3877
|
+
children: [
|
|
3878
|
+
"Secure authentication powered by",
|
|
3879
|
+
" ",
|
|
3880
|
+
/* @__PURE__ */ s.jsx("span", { style: { color: o, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3881
|
+
]
|
|
3882
|
+
}
|
|
3883
|
+
)
|
|
3884
|
+
]
|
|
3885
|
+
}
|
|
3886
|
+
)
|
|
3887
3887
|
}
|
|
3888
3888
|
);
|
|
3889
|
-
}, Ts = ({
|
|
3890
|
-
|
|
3891
|
-
|
|
3889
|
+
}, Ts = () => {
|
|
3890
|
+
try {
|
|
3891
|
+
const e = localStorage.getItem("userInfo");
|
|
3892
|
+
return !!(e && e !== "undefined");
|
|
3893
|
+
} catch {
|
|
3894
|
+
return !1;
|
|
3895
|
+
}
|
|
3896
|
+
}, eo = ({
|
|
3897
|
+
children: e
|
|
3898
|
+
}) => Ts() ? /* @__PURE__ */ s.jsx("div", { children: e ?? /* @__PURE__ */ s.jsxs(
|
|
3899
|
+
"div",
|
|
3900
|
+
{
|
|
3901
|
+
style: {
|
|
3902
|
+
padding: "20px",
|
|
3903
|
+
border: "2px solid green",
|
|
3904
|
+
margin: "10px",
|
|
3905
|
+
borderRadius: "8px"
|
|
3906
|
+
},
|
|
3907
|
+
children: [
|
|
3908
|
+
/* @__PURE__ */ s.jsx("h2", { children: "Signed In Content" }),
|
|
3909
|
+
/* @__PURE__ */ s.jsx("p", { children: "This content only shows when user is signed in." })
|
|
3910
|
+
]
|
|
3911
|
+
}
|
|
3912
|
+
) }) : null, Cs = () => {
|
|
3913
|
+
try {
|
|
3914
|
+
const e = localStorage.getItem("userInfo");
|
|
3915
|
+
return !!(e && e !== "undefined");
|
|
3916
|
+
} catch {
|
|
3917
|
+
return !1;
|
|
3918
|
+
}
|
|
3919
|
+
}, to = ({ children: e }) => Cs() ? null : /* @__PURE__ */ s.jsx("div", { children: e ?? /* @__PURE__ */ s.jsxs(
|
|
3920
|
+
"div",
|
|
3921
|
+
{
|
|
3922
|
+
style: {
|
|
3923
|
+
padding: "20px",
|
|
3924
|
+
border: "2px solid blue",
|
|
3925
|
+
margin: "10px",
|
|
3926
|
+
borderRadius: "8px"
|
|
3927
|
+
},
|
|
3928
|
+
children: [
|
|
3929
|
+
/* @__PURE__ */ s.jsx("h2", { children: "Signed Out Content" }),
|
|
3930
|
+
/* @__PURE__ */ s.jsx("p", { children: "This content only shows when user is signed out." })
|
|
3931
|
+
]
|
|
3932
|
+
}
|
|
3933
|
+
) }), Rs = ({
|
|
3934
|
+
isOpen: e,
|
|
3935
|
+
onClose: t,
|
|
3892
3936
|
onUpdate: r,
|
|
3893
3937
|
colors: n
|
|
3894
3938
|
}) => {
|
|
@@ -3921,18 +3965,18 @@ const ks = [
|
|
|
3921
3965
|
type: "error"
|
|
3922
3966
|
});
|
|
3923
3967
|
}
|
|
3924
|
-
}, [o]), !
|
|
3968
|
+
}, [o]), !e) return null;
|
|
3925
3969
|
const C = async () => {
|
|
3926
3970
|
if (!(!o || !u.isValid)) {
|
|
3927
3971
|
l(!0);
|
|
3928
3972
|
try {
|
|
3929
|
-
await r(o) && (i(""),
|
|
3973
|
+
await r(o) && (i(""), t());
|
|
3930
3974
|
} finally {
|
|
3931
3975
|
l(!1);
|
|
3932
3976
|
}
|
|
3933
3977
|
}
|
|
3934
3978
|
}, S = (c) => {
|
|
3935
|
-
c.target === c.currentTarget &&
|
|
3979
|
+
c.target === c.currentTarget && t();
|
|
3936
3980
|
};
|
|
3937
3981
|
return /* @__PURE__ */ s.jsxs(
|
|
3938
3982
|
"div",
|
|
@@ -4022,7 +4066,7 @@ const ks = [
|
|
|
4022
4066
|
/* @__PURE__ */ s.jsx(
|
|
4023
4067
|
"button",
|
|
4024
4068
|
{
|
|
4025
|
-
onClick:
|
|
4069
|
+
onClick: t,
|
|
4026
4070
|
"aria-label": "Close avatar modal",
|
|
4027
4071
|
style: {
|
|
4028
4072
|
background: "transparent",
|
|
@@ -4207,7 +4251,7 @@ const ks = [
|
|
|
4207
4251
|
/* @__PURE__ */ s.jsx(
|
|
4208
4252
|
"button",
|
|
4209
4253
|
{
|
|
4210
|
-
onClick:
|
|
4254
|
+
onClick: t,
|
|
4211
4255
|
disabled: a,
|
|
4212
4256
|
style: {
|
|
4213
4257
|
padding: "10px 24px",
|
|
@@ -4337,9 +4381,9 @@ const ks = [
|
|
|
4337
4381
|
]
|
|
4338
4382
|
}
|
|
4339
4383
|
);
|
|
4340
|
-
},
|
|
4341
|
-
isOpen:
|
|
4342
|
-
onClose:
|
|
4384
|
+
}, Ps = ({
|
|
4385
|
+
isOpen: e,
|
|
4386
|
+
onClose: t,
|
|
4343
4387
|
onSuccess: r,
|
|
4344
4388
|
onError: n,
|
|
4345
4389
|
userId: o,
|
|
@@ -4359,7 +4403,7 @@ const ks = [
|
|
|
4359
4403
|
B(window.innerWidth < 640);
|
|
4360
4404
|
};
|
|
4361
4405
|
return w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
|
|
4362
|
-
}, []), !
|
|
4406
|
+
}, []), !e) return null;
|
|
4363
4407
|
const v = (w) => {
|
|
4364
4408
|
const { name: L, value: V } = w.target;
|
|
4365
4409
|
u((N) => ({ ...N, [L]: V })), b[L] && C((N) => ({ ...N, [L]: "" }));
|
|
@@ -4389,14 +4433,14 @@ const ks = [
|
|
|
4389
4433
|
currentPassword: "",
|
|
4390
4434
|
newPassword: "",
|
|
4391
4435
|
confirmPassword: ""
|
|
4392
|
-
}),
|
|
4436
|
+
}), t()) : n(L.message || "Failed to update password");
|
|
4393
4437
|
} catch (L) {
|
|
4394
4438
|
n(L.response?.data?.message || "Something went wrong");
|
|
4395
4439
|
} finally {
|
|
4396
4440
|
c(!1);
|
|
4397
4441
|
}
|
|
4398
4442
|
}
|
|
4399
|
-
},
|
|
4443
|
+
}, O = [
|
|
4400
4444
|
{
|
|
4401
4445
|
field: "currentPassword",
|
|
4402
4446
|
label: "Current Password",
|
|
@@ -4500,7 +4544,7 @@ const ks = [
|
|
|
4500
4544
|
/* @__PURE__ */ s.jsx(
|
|
4501
4545
|
"button",
|
|
4502
4546
|
{
|
|
4503
|
-
onClick:
|
|
4547
|
+
onClick: t,
|
|
4504
4548
|
"aria-label": "Close password change modal",
|
|
4505
4549
|
style: {
|
|
4506
4550
|
background: "transparent",
|
|
@@ -4529,7 +4573,7 @@ const ks = [
|
|
|
4529
4573
|
}
|
|
4530
4574
|
),
|
|
4531
4575
|
/* @__PURE__ */ s.jsxs("form", { onSubmit: m, children: [
|
|
4532
|
-
|
|
4576
|
+
O.map(({ field: w, label: L, icon: V }) => /* @__PURE__ */ s.jsxs(
|
|
4533
4577
|
"div",
|
|
4534
4578
|
{
|
|
4535
4579
|
style: {
|
|
@@ -4664,7 +4708,7 @@ const ks = [
|
|
|
4664
4708
|
"button",
|
|
4665
4709
|
{
|
|
4666
4710
|
type: "button",
|
|
4667
|
-
onClick:
|
|
4711
|
+
onClick: t,
|
|
4668
4712
|
disabled: S,
|
|
4669
4713
|
style: {
|
|
4670
4714
|
padding: "14px 24px",
|
|
@@ -4781,9 +4825,9 @@ const ks = [
|
|
|
4781
4825
|
)
|
|
4782
4826
|
}
|
|
4783
4827
|
);
|
|
4784
|
-
},
|
|
4785
|
-
isOpen:
|
|
4786
|
-
onClose:
|
|
4828
|
+
}, Is = ({
|
|
4829
|
+
isOpen: e,
|
|
4830
|
+
onClose: t,
|
|
4787
4831
|
onSuccess: r,
|
|
4788
4832
|
onError: n,
|
|
4789
4833
|
userId: o,
|
|
@@ -4796,7 +4840,7 @@ const ks = [
|
|
|
4796
4840
|
P(window.innerWidth < 640);
|
|
4797
4841
|
};
|
|
4798
4842
|
return m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m);
|
|
4799
|
-
}, []), !
|
|
4843
|
+
}, []), !e) return null;
|
|
4800
4844
|
const B = async () => {
|
|
4801
4845
|
b(!0), g("processing");
|
|
4802
4846
|
try {
|
|
@@ -4815,7 +4859,7 @@ const ks = [
|
|
|
4815
4859
|
b(!1);
|
|
4816
4860
|
}
|
|
4817
4861
|
}, v = C.toLowerCase() === "delete my account", U = (m) => {
|
|
4818
|
-
m.target === m.currentTarget && c !== "processing" && c !== "success" &&
|
|
4862
|
+
m.target === m.currentTarget && c !== "processing" && c !== "success" && t();
|
|
4819
4863
|
}, F = () => {
|
|
4820
4864
|
switch (c) {
|
|
4821
4865
|
case "warning":
|
|
@@ -4855,7 +4899,7 @@ const ks = [
|
|
|
4855
4899
|
color: "white",
|
|
4856
4900
|
flexShrink: 0
|
|
4857
4901
|
},
|
|
4858
|
-
children: /* @__PURE__ */ s.jsx(
|
|
4902
|
+
children: /* @__PURE__ */ s.jsx(Pe, { size: 20 })
|
|
4859
4903
|
}
|
|
4860
4904
|
),
|
|
4861
4905
|
/* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(
|
|
@@ -4877,7 +4921,7 @@ const ks = [
|
|
|
4877
4921
|
/* @__PURE__ */ s.jsx(
|
|
4878
4922
|
"button",
|
|
4879
4923
|
{
|
|
4880
|
-
onClick:
|
|
4924
|
+
onClick: t,
|
|
4881
4925
|
"aria-label": "Close modal",
|
|
4882
4926
|
style: {
|
|
4883
4927
|
background: "transparent",
|
|
@@ -4965,7 +5009,7 @@ const ks = [
|
|
|
4965
5009
|
icon: /* @__PURE__ */ s.jsx(Qt, { size: 16 }),
|
|
4966
5010
|
text: "You will lose access to all services"
|
|
4967
5011
|
}
|
|
4968
|
-
].map((m,
|
|
5012
|
+
].map((m, O) => /* @__PURE__ */ s.jsxs(
|
|
4969
5013
|
"div",
|
|
4970
5014
|
{
|
|
4971
5015
|
style: {
|
|
@@ -4980,7 +5024,7 @@ const ks = [
|
|
|
4980
5024
|
/* @__PURE__ */ s.jsx("span", { children: m.text })
|
|
4981
5025
|
]
|
|
4982
5026
|
},
|
|
4983
|
-
|
|
5027
|
+
O
|
|
4984
5028
|
))
|
|
4985
5029
|
}
|
|
4986
5030
|
)
|
|
@@ -5002,7 +5046,7 @@ const ks = [
|
|
|
5002
5046
|
/* @__PURE__ */ s.jsx(
|
|
5003
5047
|
"button",
|
|
5004
5048
|
{
|
|
5005
|
-
onClick:
|
|
5049
|
+
onClick: t,
|
|
5006
5050
|
style: {
|
|
5007
5051
|
padding: "10px 24px",
|
|
5008
5052
|
borderRadius: "10px",
|
|
@@ -5054,7 +5098,7 @@ const ks = [
|
|
|
5054
5098
|
m.currentTarget.style.transform = "translateY(0)", m.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)";
|
|
5055
5099
|
},
|
|
5056
5100
|
children: [
|
|
5057
|
-
/* @__PURE__ */ s.jsx(
|
|
5101
|
+
/* @__PURE__ */ s.jsx(Pe, { size: 16 }),
|
|
5058
5102
|
"Continue to Delete"
|
|
5059
5103
|
]
|
|
5060
5104
|
}
|
|
@@ -5180,7 +5224,7 @@ const ks = [
|
|
|
5180
5224
|
style: {
|
|
5181
5225
|
display: "flex",
|
|
5182
5226
|
gap: "12px",
|
|
5183
|
-
flexDirection:
|
|
5227
|
+
flexDirection: "column-reverse",
|
|
5184
5228
|
justifyContent: "flex-end",
|
|
5185
5229
|
alignItems: "stretch"
|
|
5186
5230
|
},
|
|
@@ -5244,7 +5288,7 @@ const ks = [
|
|
|
5244
5288
|
v && !u && (m.currentTarget.style.transform = "translateY(0)", m.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
5245
5289
|
},
|
|
5246
5290
|
children: [
|
|
5247
|
-
/* @__PURE__ */ s.jsx(
|
|
5291
|
+
/* @__PURE__ */ s.jsx(Pe, { size: 16 }),
|
|
5248
5292
|
"Yes, Delete My Account"
|
|
5249
5293
|
]
|
|
5250
5294
|
}
|
|
@@ -5332,7 +5376,7 @@ const ks = [
|
|
|
5332
5376
|
{ text: "Removing your data", active: !0 },
|
|
5333
5377
|
{ text: "Closing active sessions", active: !1 },
|
|
5334
5378
|
{ text: "Finalizing deletion", active: !1 }
|
|
5335
|
-
].map((m,
|
|
5379
|
+
].map((m, O) => /* @__PURE__ */ s.jsxs(
|
|
5336
5380
|
"div",
|
|
5337
5381
|
{
|
|
5338
5382
|
style: {
|
|
@@ -5371,7 +5415,7 @@ const ks = [
|
|
|
5371
5415
|
)
|
|
5372
5416
|
]
|
|
5373
5417
|
},
|
|
5374
|
-
|
|
5418
|
+
O
|
|
5375
5419
|
))
|
|
5376
5420
|
}
|
|
5377
5421
|
) }),
|
|
@@ -5635,13 +5679,13 @@ const ks = [
|
|
|
5635
5679
|
]
|
|
5636
5680
|
}
|
|
5637
5681
|
);
|
|
5638
|
-
},
|
|
5639
|
-
token:
|
|
5640
|
-
user:
|
|
5682
|
+
}, ro = ({
|
|
5683
|
+
token: e,
|
|
5684
|
+
user: t = null,
|
|
5641
5685
|
darkMode: r = !0,
|
|
5642
5686
|
primaryColor: n = "#00C214"
|
|
5643
5687
|
}) => {
|
|
5644
|
-
const { baseUrl: o, apiKey: i, appId: a } = fe(), [l, h] = $(
|
|
5688
|
+
const { baseUrl: o, apiKey: i, appId: a } = fe(), [l, h] = $(t), [p, u] = $(!0), [b, C] = $(!1), [S, c] = $(!1), [g, y] = $(!1), [P, B] = $(!1), [v, U] = $(!1), [F, m] = $(null), O = (k, z) => {
|
|
5645
5689
|
m({ type: k, message: z }), setTimeout(() => m(null), 3e3);
|
|
5646
5690
|
}, w = async (k) => {
|
|
5647
5691
|
if (!l) return !1;
|
|
@@ -5653,10 +5697,10 @@ const ks = [
|
|
|
5653
5697
|
);
|
|
5654
5698
|
return E.success ? (h(z), localStorage.setItem(
|
|
5655
5699
|
"userInfo",
|
|
5656
|
-
JSON.stringify({ ...z, token:
|
|
5657
|
-
),
|
|
5700
|
+
JSON.stringify({ ...z, token: e })
|
|
5701
|
+
), O("success", "Avatar updated successfully!"), !0) : (O("error", E.message || "Failed to update avatar"), !1);
|
|
5658
5702
|
} catch (z) {
|
|
5659
|
-
return console.error("Avatar update error:", z),
|
|
5703
|
+
return console.error("Avatar update error:", z), O("error", "Failed to update avatar"), !1;
|
|
5660
5704
|
}
|
|
5661
5705
|
}, L = async () => {
|
|
5662
5706
|
if (l) {
|
|
@@ -5669,10 +5713,10 @@ const ks = [
|
|
|
5669
5713
|
);
|
|
5670
5714
|
k.success ? (h(k.user), C(!1), localStorage.setItem(
|
|
5671
5715
|
"userInfo",
|
|
5672
|
-
JSON.stringify({ ...k.user, token:
|
|
5673
|
-
),
|
|
5716
|
+
JSON.stringify({ ...k.user, token: e })
|
|
5717
|
+
), O("success", "Profile updated successfully")) : O("error", k.message);
|
|
5674
5718
|
} catch (k) {
|
|
5675
|
-
console.error(k),
|
|
5719
|
+
console.error(k), O("error", "Update failed");
|
|
5676
5720
|
} finally {
|
|
5677
5721
|
c(!1);
|
|
5678
5722
|
}
|
|
@@ -5690,8 +5734,8 @@ const ks = [
|
|
|
5690
5734
|
};
|
|
5691
5735
|
re(() => {
|
|
5692
5736
|
(() => {
|
|
5693
|
-
if (
|
|
5694
|
-
h(
|
|
5737
|
+
if (t)
|
|
5738
|
+
h(t), u(!1), V(t.id);
|
|
5695
5739
|
else {
|
|
5696
5740
|
const z = localStorage.getItem("userInfo");
|
|
5697
5741
|
if (z) {
|
|
@@ -5701,7 +5745,7 @@ const ks = [
|
|
|
5701
5745
|
u(!1);
|
|
5702
5746
|
}
|
|
5703
5747
|
})();
|
|
5704
|
-
}, [
|
|
5748
|
+
}, [t]);
|
|
5705
5749
|
const N = (k, z) => {
|
|
5706
5750
|
let E = parseInt(k.replace("#", ""), 16), R = (E >> 16) + z, M = (E >> 8 & 255) + z, H = (E & 255) + z;
|
|
5707
5751
|
return R = Math.min(255, Math.max(0, R)), M = Math.min(255, Math.max(0, M)), H = Math.min(255, Math.max(0, H)), `#${(H | M << 8 | R << 16).toString(16).padStart(6, "0")}`;
|
|
@@ -5776,7 +5820,7 @@ const ks = [
|
|
|
5776
5820
|
]
|
|
5777
5821
|
}
|
|
5778
5822
|
) });
|
|
5779
|
-
const
|
|
5823
|
+
const I = [
|
|
5780
5824
|
{
|
|
5781
5825
|
label: "Full Name",
|
|
5782
5826
|
value: l.name,
|
|
@@ -5959,7 +6003,7 @@ const ks = [
|
|
|
5959
6003
|
k.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.15)";
|
|
5960
6004
|
},
|
|
5961
6005
|
children: [
|
|
5962
|
-
/* @__PURE__ */ s.jsx(
|
|
6006
|
+
/* @__PURE__ */ s.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
5963
6007
|
"Delete Account"
|
|
5964
6008
|
]
|
|
5965
6009
|
}
|
|
@@ -5976,7 +6020,7 @@ const ks = [
|
|
|
5976
6020
|
/* @__PURE__ */ s.jsx(de, { size: 20, "aria-hidden": "true" }),
|
|
5977
6021
|
"Personal Information"
|
|
5978
6022
|
] }),
|
|
5979
|
-
/* @__PURE__ */ s.jsx("div", { className: "fields-grid", children:
|
|
6023
|
+
/* @__PURE__ */ s.jsx("div", { className: "fields-grid", children: I.map((k) => {
|
|
5980
6024
|
const z = k.icon;
|
|
5981
6025
|
return /* @__PURE__ */ s.jsxs("div", { className: "field-group", children: [
|
|
5982
6026
|
/* @__PURE__ */ s.jsxs("label", { className: "field-label", children: [
|
|
@@ -6015,7 +6059,7 @@ const ks = [
|
|
|
6015
6059
|
) })
|
|
6016
6060
|
] }) }),
|
|
6017
6061
|
/* @__PURE__ */ s.jsx(
|
|
6018
|
-
|
|
6062
|
+
Rs,
|
|
6019
6063
|
{
|
|
6020
6064
|
isOpen: g,
|
|
6021
6065
|
onClose: () => {
|
|
@@ -6026,7 +6070,7 @@ const ks = [
|
|
|
6026
6070
|
}
|
|
6027
6071
|
),
|
|
6028
6072
|
/* @__PURE__ */ s.jsx(
|
|
6029
|
-
|
|
6073
|
+
Ps,
|
|
6030
6074
|
{
|
|
6031
6075
|
baseUrl: o,
|
|
6032
6076
|
apiKey: i,
|
|
@@ -6034,23 +6078,23 @@ const ks = [
|
|
|
6034
6078
|
userId: l.id,
|
|
6035
6079
|
isOpen: P,
|
|
6036
6080
|
onClose: () => B(!1),
|
|
6037
|
-
onSuccess: (k) =>
|
|
6038
|
-
onError: (k) =>
|
|
6081
|
+
onSuccess: (k) => O("success", k),
|
|
6082
|
+
onError: (k) => O("error", k),
|
|
6039
6083
|
colors: A
|
|
6040
6084
|
}
|
|
6041
6085
|
),
|
|
6042
6086
|
/* @__PURE__ */ s.jsx(
|
|
6043
|
-
|
|
6087
|
+
Is,
|
|
6044
6088
|
{
|
|
6045
6089
|
baseUrl: o,
|
|
6046
6090
|
apiKey: i,
|
|
6047
6091
|
appId: a,
|
|
6048
6092
|
userId: l.id,
|
|
6049
|
-
token:
|
|
6093
|
+
token: e,
|
|
6050
6094
|
isOpen: v,
|
|
6051
6095
|
onClose: () => U(!1),
|
|
6052
|
-
onSuccess: (k) =>
|
|
6053
|
-
onError: (k) =>
|
|
6096
|
+
onSuccess: (k) => O("success", k),
|
|
6097
|
+
onError: (k) => O("error", k),
|
|
6054
6098
|
colors: A
|
|
6055
6099
|
}
|
|
6056
6100
|
),
|
|
@@ -6378,9 +6422,9 @@ const ks = [
|
|
|
6378
6422
|
}
|
|
6379
6423
|
` })
|
|
6380
6424
|
] });
|
|
6381
|
-
},
|
|
6382
|
-
darkMode:
|
|
6383
|
-
primaryColor:
|
|
6425
|
+
}, no = ({
|
|
6426
|
+
darkMode: e = !0,
|
|
6427
|
+
primaryColor: t = "#3b82f6",
|
|
6384
6428
|
onLogout: r,
|
|
6385
6429
|
propUser: n,
|
|
6386
6430
|
className: o = "",
|
|
@@ -6397,7 +6441,7 @@ const ks = [
|
|
|
6397
6441
|
viewProfileLabel: C = "View Profile",
|
|
6398
6442
|
logoutLabel: S = "Sign Out"
|
|
6399
6443
|
}) => {
|
|
6400
|
-
const { baseUrl: c, apiKey: g, appId: y } = fe(), [P, B] = $(!1), [v, U] = $(null), [F, m] = $(!0), [
|
|
6444
|
+
const { baseUrl: c, apiKey: g, appId: y } = fe(), [P, B] = $(!1), [v, U] = $(null), [F, m] = $(!0), [O, w] = $(null), L = rt(null), V = rt(null), [N, A] = $(!1), [I, k] = $(!1);
|
|
6401
6445
|
re(() => {
|
|
6402
6446
|
const x = () => {
|
|
6403
6447
|
k(window.innerWidth < 768);
|
|
@@ -6468,7 +6512,7 @@ const ks = [
|
|
|
6468
6512
|
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", j), window.removeEventListener("scroll", W);
|
|
6469
6513
|
};
|
|
6470
6514
|
}, [P]);
|
|
6471
|
-
const E =
|
|
6515
|
+
const E = e ? {
|
|
6472
6516
|
surface: "#000000",
|
|
6473
6517
|
surfaceElevated: "#000000",
|
|
6474
6518
|
surfaceHover: "#262626",
|
|
@@ -6477,8 +6521,8 @@ const ks = [
|
|
|
6477
6521
|
textPrimary: "#ffffff",
|
|
6478
6522
|
textSecondary: "#a3a3a3",
|
|
6479
6523
|
textTertiary: "#737373",
|
|
6480
|
-
accent:
|
|
6481
|
-
accentHover: `${
|
|
6524
|
+
accent: t,
|
|
6525
|
+
accentHover: `${t}e6`,
|
|
6482
6526
|
error: "#ef4444"
|
|
6483
6527
|
} : {
|
|
6484
6528
|
surface: "#ffffff",
|
|
@@ -6489,8 +6533,8 @@ const ks = [
|
|
|
6489
6533
|
textPrimary: "#171717",
|
|
6490
6534
|
textSecondary: "#525252",
|
|
6491
6535
|
textTertiary: "#a3a3a3",
|
|
6492
|
-
accent:
|
|
6493
|
-
accentHover: `${
|
|
6536
|
+
accent: t,
|
|
6537
|
+
accentHover: `${t}e6`,
|
|
6494
6538
|
error: "#ef4444"
|
|
6495
6539
|
}, R = {
|
|
6496
6540
|
wrapper: {
|
|
@@ -6500,19 +6544,19 @@ const ks = [
|
|
|
6500
6544
|
avatarButton: {
|
|
6501
6545
|
display: "flex",
|
|
6502
6546
|
alignItems: "center",
|
|
6503
|
-
gap:
|
|
6504
|
-
padding:
|
|
6547
|
+
gap: I ? "6px" : "8px",
|
|
6548
|
+
padding: I ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
6505
6549
|
borderRadius: "24px",
|
|
6506
6550
|
backgroundColor: E.surface,
|
|
6507
6551
|
cursor: "pointer",
|
|
6508
6552
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6509
|
-
minWidth:
|
|
6510
|
-
maxWidth:
|
|
6553
|
+
minWidth: I ? "auto" : "140px",
|
|
6554
|
+
maxWidth: I ? "200px" : "none",
|
|
6511
6555
|
outline: "none"
|
|
6512
6556
|
},
|
|
6513
6557
|
avatarImage: {
|
|
6514
|
-
width:
|
|
6515
|
-
height:
|
|
6558
|
+
width: I ? "28px" : "32px",
|
|
6559
|
+
height: I ? "28px" : "32px",
|
|
6516
6560
|
borderRadius: "50%",
|
|
6517
6561
|
objectFit: "cover",
|
|
6518
6562
|
border: `2px solid ${E.borderLight}`,
|
|
@@ -6527,23 +6571,23 @@ const ks = [
|
|
|
6527
6571
|
overflow: "hidden"
|
|
6528
6572
|
},
|
|
6529
6573
|
userName: {
|
|
6530
|
-
fontSize:
|
|
6574
|
+
fontSize: I ? "13px" : "14px",
|
|
6531
6575
|
fontWeight: 600,
|
|
6532
6576
|
color: E.textPrimary,
|
|
6533
6577
|
lineHeight: "1.2",
|
|
6534
6578
|
whiteSpace: "nowrap",
|
|
6535
6579
|
overflow: "hidden",
|
|
6536
6580
|
textOverflow: "ellipsis",
|
|
6537
|
-
maxWidth:
|
|
6581
|
+
maxWidth: I ? "80px" : "120px"
|
|
6538
6582
|
},
|
|
6539
6583
|
userEmail: {
|
|
6540
|
-
fontSize:
|
|
6584
|
+
fontSize: I ? "11px" : "12px",
|
|
6541
6585
|
color: E.textTertiary,
|
|
6542
6586
|
lineHeight: "1.2",
|
|
6543
6587
|
whiteSpace: "nowrap",
|
|
6544
6588
|
overflow: "hidden",
|
|
6545
6589
|
textOverflow: "ellipsis",
|
|
6546
|
-
maxWidth:
|
|
6590
|
+
maxWidth: I ? "80px" : "120px"
|
|
6547
6591
|
},
|
|
6548
6592
|
chevron: {
|
|
6549
6593
|
transition: "transform 0.2s ease",
|
|
@@ -6572,7 +6616,7 @@ const ks = [
|
|
|
6572
6616
|
overflow: "hidden"
|
|
6573
6617
|
},
|
|
6574
6618
|
dropdownSection: {
|
|
6575
|
-
padding:
|
|
6619
|
+
padding: I ? "10px 12px" : "0px 16px",
|
|
6576
6620
|
"&:last-child": {
|
|
6577
6621
|
borderBottom: "none"
|
|
6578
6622
|
}
|
|
@@ -6580,12 +6624,12 @@ const ks = [
|
|
|
6580
6624
|
userSection: {
|
|
6581
6625
|
display: "flex",
|
|
6582
6626
|
alignItems: "center",
|
|
6583
|
-
gap:
|
|
6584
|
-
padding:
|
|
6627
|
+
gap: I ? "10px" : "12px",
|
|
6628
|
+
padding: I ? "14px" : "16px"
|
|
6585
6629
|
},
|
|
6586
6630
|
dropdownAvatar: {
|
|
6587
|
-
width:
|
|
6588
|
-
height:
|
|
6631
|
+
width: I ? "40px" : "48px",
|
|
6632
|
+
height: I ? "40px" : "48px",
|
|
6589
6633
|
borderRadius: "50%",
|
|
6590
6634
|
objectFit: "cover",
|
|
6591
6635
|
border: `2px solid ${E.borderLight}`,
|
|
@@ -6598,7 +6642,7 @@ const ks = [
|
|
|
6598
6642
|
minWidth: 0
|
|
6599
6643
|
},
|
|
6600
6644
|
dropdownUserName: {
|
|
6601
|
-
fontSize:
|
|
6645
|
+
fontSize: I ? "15px" : "16px",
|
|
6602
6646
|
fontWeight: 600,
|
|
6603
6647
|
color: E.textPrimary,
|
|
6604
6648
|
lineHeight: "1.2",
|
|
@@ -6607,7 +6651,7 @@ const ks = [
|
|
|
6607
6651
|
textOverflow: "ellipsis"
|
|
6608
6652
|
},
|
|
6609
6653
|
dropdownUserEmail: {
|
|
6610
|
-
fontSize:
|
|
6654
|
+
fontSize: I ? "13px" : "14px",
|
|
6611
6655
|
color: E.textSecondary,
|
|
6612
6656
|
lineHeight: "1.2",
|
|
6613
6657
|
overflow: "hidden",
|
|
@@ -6616,8 +6660,8 @@ const ks = [
|
|
|
6616
6660
|
menuItem: {
|
|
6617
6661
|
display: "flex",
|
|
6618
6662
|
alignItems: "center",
|
|
6619
|
-
gap:
|
|
6620
|
-
padding:
|
|
6663
|
+
gap: I ? "10px" : "12px",
|
|
6664
|
+
padding: I ? "10px 12px" : "12px 16px",
|
|
6621
6665
|
borderRadius: "8px",
|
|
6622
6666
|
cursor: "pointer",
|
|
6623
6667
|
transition: "all 0.15s ease",
|
|
@@ -6626,7 +6670,7 @@ const ks = [
|
|
|
6626
6670
|
border: "none",
|
|
6627
6671
|
background: "none",
|
|
6628
6672
|
width: "100%",
|
|
6629
|
-
fontSize:
|
|
6673
|
+
fontSize: I ? "13px" : "14px",
|
|
6630
6674
|
textAlign: "left",
|
|
6631
6675
|
outline: "none"
|
|
6632
6676
|
},
|
|
@@ -6634,38 +6678,38 @@ const ks = [
|
|
|
6634
6678
|
flex: 1
|
|
6635
6679
|
},
|
|
6636
6680
|
icon: {
|
|
6637
|
-
width:
|
|
6638
|
-
height:
|
|
6681
|
+
width: I ? "16px" : "18px",
|
|
6682
|
+
height: I ? "16px" : "18px",
|
|
6639
6683
|
color: E.textSecondary,
|
|
6640
6684
|
flexShrink: 0
|
|
6641
6685
|
},
|
|
6642
6686
|
logoutButton: {
|
|
6643
6687
|
display: "flex",
|
|
6644
6688
|
alignItems: "center",
|
|
6645
|
-
gap:
|
|
6646
|
-
padding:
|
|
6689
|
+
gap: I ? "10px" : "12px",
|
|
6690
|
+
padding: I ? "10px 12px" : "12px 16px",
|
|
6647
6691
|
borderRadius: "8px",
|
|
6648
6692
|
cursor: "pointer",
|
|
6649
6693
|
transition: "all 0.15s ease",
|
|
6650
6694
|
background: "none",
|
|
6651
6695
|
border: "none",
|
|
6652
6696
|
width: "100%",
|
|
6653
|
-
fontSize:
|
|
6697
|
+
fontSize: I ? "13px" : "14px",
|
|
6654
6698
|
color: E.error,
|
|
6655
6699
|
textAlign: "left",
|
|
6656
6700
|
outline: "none"
|
|
6657
6701
|
},
|
|
6658
6702
|
loadingText: {
|
|
6659
|
-
padding:
|
|
6703
|
+
padding: I ? "16px 12px" : "20px 16px",
|
|
6660
6704
|
textAlign: "center",
|
|
6661
6705
|
color: E.textSecondary,
|
|
6662
|
-
fontSize:
|
|
6706
|
+
fontSize: I ? "13px" : "14px"
|
|
6663
6707
|
},
|
|
6664
6708
|
errorState: {
|
|
6665
|
-
padding:
|
|
6709
|
+
padding: I ? "16px 12px" : "20px 16px",
|
|
6666
6710
|
textAlign: "center",
|
|
6667
6711
|
color: E.textSecondary,
|
|
6668
|
-
fontSize:
|
|
6712
|
+
fontSize: I ? "13px" : "14px",
|
|
6669
6713
|
display: "flex",
|
|
6670
6714
|
alignItems: "center",
|
|
6671
6715
|
justifyContent: "center",
|
|
@@ -6755,14 +6799,14 @@ const ks = [
|
|
|
6755
6799
|
loading: "lazy"
|
|
6756
6800
|
}
|
|
6757
6801
|
),
|
|
6758
|
-
!
|
|
6802
|
+
!I && /* @__PURE__ */ s.jsxs("div", { style: R.userInfo, children: [
|
|
6759
6803
|
/* @__PURE__ */ s.jsx("div", { style: R.userName, title: v?.name, children: v?.name || "Guest" }),
|
|
6760
6804
|
v?.email && /* @__PURE__ */ s.jsx("div", { style: R.userEmail, title: v.email, children: v.email })
|
|
6761
6805
|
] }),
|
|
6762
6806
|
/* @__PURE__ */ s.jsx(
|
|
6763
6807
|
Mn,
|
|
6764
6808
|
{
|
|
6765
|
-
size:
|
|
6809
|
+
size: I ? 14 : 16,
|
|
6766
6810
|
style: R.chevron,
|
|
6767
6811
|
"aria-hidden": "true"
|
|
6768
6812
|
}
|
|
@@ -6894,11 +6938,11 @@ const ks = [
|
|
|
6894
6938
|
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
6895
6939
|
children: [
|
|
6896
6940
|
/* @__PURE__ */ s.jsx(ae, { size: 16, "aria-hidden": "true" }),
|
|
6897
|
-
/* @__PURE__ */ s.jsx("span", { children:
|
|
6941
|
+
/* @__PURE__ */ s.jsx("span", { children: O || "Not signed in" })
|
|
6898
6942
|
]
|
|
6899
6943
|
}
|
|
6900
6944
|
),
|
|
6901
|
-
|
|
6945
|
+
O && O !== "Not signed in" && /* @__PURE__ */ s.jsx(
|
|
6902
6946
|
"button",
|
|
6903
6947
|
{
|
|
6904
6948
|
style: R.retryButton,
|
|
@@ -6918,11 +6962,13 @@ const ks = [
|
|
|
6918
6962
|
);
|
|
6919
6963
|
};
|
|
6920
6964
|
export {
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6965
|
+
Xs as NeuctraAuthix,
|
|
6966
|
+
eo as ReactSignInComponent,
|
|
6967
|
+
to as ReactSignOutComponent,
|
|
6968
|
+
no as ReactUserButton,
|
|
6969
|
+
Qs as ReactUserLogin,
|
|
6970
|
+
ro as ReactUserProfile,
|
|
6971
|
+
Zs as ReactUserSignUp,
|
|
6926
6972
|
fe as getSdkConfig,
|
|
6927
|
-
|
|
6973
|
+
Gs as setSdkConfig
|
|
6928
6974
|
};
|