@neuctra/authix 1.1.20 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neuctra-authix.es.js +815 -818
- package/dist/neuctra-authix.umd.js +50 -50
- package/dist/react/SignedIn.d.ts +1 -0
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/dist/react/SignedOut.d.ts +1 -0
- package/dist/react/SignedOut.d.ts.map +1 -1
- package/dist/react/UserButton.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +5 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import Le, { forwardRef as
|
|
2
|
-
function
|
|
1
|
+
import Le, { forwardRef as Nt, createElement as Ge, useState as O, useEffect as te, useRef as xt } from "react";
|
|
2
|
+
function Ut(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: fr } = Object.prototype, { getPrototypeOf:
|
|
7
|
+
const { toString: fr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Dt } = Symbol, Me = /* @__PURE__ */ ((e) => (t) => {
|
|
8
8
|
const n = fr.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), ae = (e) => (e = e.toLowerCase(), (t) => Me(t) === e), We = (e) => (t) => typeof t === e, { isArray: we } = Array, ye = We("undefined");
|
|
11
11
|
function Ce(e) {
|
|
12
|
-
return e !== null && !ye(e) && e.constructor !== null && !ye(e.constructor) &&
|
|
12
|
+
return e !== null && !ye(e) && e.constructor !== null && !ye(e.constructor) && re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const Lt = ae("ArrayBuffer");
|
|
15
15
|
function xr(e) {
|
|
16
16
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Lt(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const hr = We("string"),
|
|
19
|
+
const hr = We("string"), re = We("function"), Ft = We("number"), Te = (e) => e !== null && typeof e == "object", gr = (e) => e === !0 || e === !1, Ae = (e) => {
|
|
20
20
|
if (Me(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const t =
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
22
|
+
const t = st(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Dt in e) && !(Fe in e);
|
|
24
24
|
}, mr = (e) => {
|
|
25
25
|
if (!Te(e) || Ce(e))
|
|
26
26
|
return !1;
|
|
@@ -29,11 +29,11 @@ const hr = We("string"), te = We("function"), Mt = We("number"), Te = (e) => e !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, yr =
|
|
32
|
+
}, yr = ae("Date"), br = ae("File"), wr = ae("Blob"), jr = ae("FileList"), vr = (e) => Te(e) && re(e.pipe), Sr = (e) => {
|
|
33
33
|
let t;
|
|
34
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
35
|
-
t === "object" &&
|
|
36
|
-
}, kr =
|
|
34
|
+
return e && (typeof FormData == "function" && e instanceof FormData || re(e.append) && ((t = Me(e)) === "formdata" || // detect form-data instance
|
|
35
|
+
t === "object" && re(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
+
}, kr = ae("URLSearchParams"), [Er, Cr, Tr, Rr] = ["ReadableStream", "Request", "Response", "Headers"].map(ae), Ir = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Re(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
@@ -50,7 +50,7 @@ function Re(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
50
50
|
l = i[s], t.call(null, e[l], l, e);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Mt(e, t) {
|
|
54
54
|
if (Ce(e))
|
|
55
55
|
return null;
|
|
56
56
|
t = t.toLowerCase();
|
|
@@ -61,18 +61,18 @@ function Wt(e, t) {
|
|
|
61
61
|
return o;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
65
|
-
function
|
|
66
|
-
const { caseless: e, skipUndefined: t } =
|
|
67
|
-
const a = e &&
|
|
68
|
-
Ae(n[a]) && Ae(o) ? n[a] =
|
|
64
|
+
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (e) => !ye(e) && e !== fe;
|
|
65
|
+
function Ze() {
|
|
66
|
+
const { caseless: e, skipUndefined: t } = Wt(this) && this || {}, n = {}, s = (o, i) => {
|
|
67
|
+
const a = e && Mt(n, i) || i;
|
|
68
|
+
Ae(n[a]) && Ae(o) ? n[a] = Ze(n[a], o) : Ae(o) ? n[a] = Ze({}, o) : we(o) ? n[a] = o.slice() : (!t || !ye(o)) && (n[a] = o);
|
|
69
69
|
};
|
|
70
70
|
for (let o = 0, i = arguments.length; o < i; o++)
|
|
71
71
|
arguments[o] && Re(arguments[o], s);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
74
|
const Pr = (e, t, n, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
75
|
-
n &&
|
|
75
|
+
n && re(o) ? e[i] = Ut(o, n) : e[i] = o;
|
|
76
76
|
}, { allOwnKeys: s }), e), Or = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zr = (e, t, n, s) => {
|
|
77
77
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
78
|
value: t.prototype
|
|
@@ -84,7 +84,7 @@ const Pr = (e, t, n, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
84
84
|
do {
|
|
85
85
|
for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
|
|
86
86
|
a = o[i], (!s || s(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
|
|
87
|
-
e = n !== !1 &&
|
|
87
|
+
e = n !== !1 && st(e);
|
|
88
88
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
89
89
|
return t;
|
|
90
90
|
}, _r = (e, t, n) => {
|
|
@@ -95,12 +95,12 @@ const Pr = (e, t, n, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (we(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
98
|
-
if (!
|
|
98
|
+
if (!Ft(t)) return null;
|
|
99
99
|
const n = new Array(t);
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
n[t] = e[t];
|
|
102
102
|
return n;
|
|
103
|
-
}, Nr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
103
|
+
}, Nr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && st(Uint8Array)), Ur = (e, t) => {
|
|
104
104
|
const s = (e && e[Fe]).call(e);
|
|
105
105
|
let o;
|
|
106
106
|
for (; (o = s.next()) && !o.done; ) {
|
|
@@ -113,23 +113,23 @@ const Pr = (e, t, n, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
113
113
|
for (; (n = e.exec(t)) !== null; )
|
|
114
114
|
s.push(n);
|
|
115
115
|
return s;
|
|
116
|
-
}, Lr =
|
|
116
|
+
}, Lr = ae("HTMLFormElement"), Fr = (e) => e.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(n, s, o) {
|
|
119
119
|
return s.toUpperCase() + o;
|
|
120
120
|
}
|
|
121
|
-
),
|
|
121
|
+
), ht = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Mr = ae("RegExp"), Bt = (e, t) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
123
123
|
Re(n, (o, i) => {
|
|
124
124
|
let a;
|
|
125
125
|
(a = t(o, i, e)) !== !1 && (s[i] = a || o);
|
|
126
126
|
}), Object.defineProperties(e, s);
|
|
127
127
|
}, Wr = (e) => {
|
|
128
|
-
|
|
129
|
-
if (
|
|
128
|
+
Bt(e, (t, n) => {
|
|
129
|
+
if (re(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const s = e[n];
|
|
132
|
-
if (
|
|
132
|
+
if (re(s)) {
|
|
133
133
|
if (t.enumerable = !1, "writable" in t) {
|
|
134
134
|
t.writable = !1;
|
|
135
135
|
return;
|
|
@@ -149,7 +149,7 @@ const Pr = (e, t, n, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
149
149
|
}, qr = () => {
|
|
150
150
|
}, Hr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
151
|
function Vr(e) {
|
|
152
|
-
return !!(e &&
|
|
152
|
+
return !!(e && re(e.append) && e[Dt] === "FormData" && e[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Yr = (e) => {
|
|
155
155
|
const t = new Array(10), n = (s, o) => {
|
|
@@ -162,29 +162,29 @@ const Yr = (e) => {
|
|
|
162
162
|
t[o] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
164
|
return Re(s, (a, l) => {
|
|
165
|
-
const
|
|
166
|
-
!ye(
|
|
165
|
+
const h = n(a, o + 1);
|
|
166
|
+
!ye(h) && (i[l] = h);
|
|
167
167
|
}), t[o] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return n(e, 0);
|
|
173
|
-
}, Kr =
|
|
173
|
+
}, Kr = ae("AsyncFunction"), Jr = (e) => e && (Te(e) || re(e)) && re(e.then) && re(e.catch), qt = ((e, t) => e ? setImmediate : t ? ((n, s) => (fe.addEventListener("message", ({ source: o, data: i }) => {
|
|
174
174
|
o === fe && i === n && s.length && s.shift()();
|
|
175
175
|
}, !1), (o) => {
|
|
176
176
|
s.push(o), fe.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
|
-
|
|
180
|
-
), Xr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick ||
|
|
179
|
+
re(fe.postMessage)
|
|
180
|
+
), Xr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || qt, Gr = (e) => e != null && re(e[Fe]), p = {
|
|
181
181
|
isArray: we,
|
|
182
|
-
isArrayBuffer:
|
|
182
|
+
isArrayBuffer: Lt,
|
|
183
183
|
isBuffer: Ce,
|
|
184
184
|
isFormData: Sr,
|
|
185
185
|
isArrayBufferView: xr,
|
|
186
186
|
isString: hr,
|
|
187
|
-
isNumber:
|
|
187
|
+
isNumber: Ft,
|
|
188
188
|
isBoolean: gr,
|
|
189
189
|
isObject: Te,
|
|
190
190
|
isPlainObject: Ae,
|
|
@@ -198,42 +198,42 @@ const Yr = (e) => {
|
|
|
198
198
|
isFile: br,
|
|
199
199
|
isBlob: wr,
|
|
200
200
|
isRegExp: Mr,
|
|
201
|
-
isFunction:
|
|
201
|
+
isFunction: re,
|
|
202
202
|
isStream: vr,
|
|
203
203
|
isURLSearchParams: kr,
|
|
204
204
|
isTypedArray: Nr,
|
|
205
205
|
isFileList: jr,
|
|
206
206
|
forEach: Re,
|
|
207
|
-
merge:
|
|
207
|
+
merge: Ze,
|
|
208
208
|
extend: Pr,
|
|
209
209
|
trim: Ir,
|
|
210
210
|
stripBOM: Or,
|
|
211
211
|
inherits: zr,
|
|
212
212
|
toFlatObject: Ar,
|
|
213
213
|
kindOf: Me,
|
|
214
|
-
kindOfTest:
|
|
214
|
+
kindOfTest: ae,
|
|
215
215
|
endsWith: _r,
|
|
216
216
|
toArray: $r,
|
|
217
217
|
forEachEntry: Ur,
|
|
218
218
|
matchAll: Dr,
|
|
219
219
|
isHTMLForm: Lr,
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
220
|
+
hasOwnProperty: ht,
|
|
221
|
+
hasOwnProp: ht,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
223
|
+
reduceDescriptors: Bt,
|
|
224
224
|
freezeMethods: Wr,
|
|
225
225
|
toObjectSet: Br,
|
|
226
226
|
toCamelCase: Fr,
|
|
227
227
|
noop: qr,
|
|
228
228
|
toFiniteNumber: Hr,
|
|
229
|
-
findKey:
|
|
229
|
+
findKey: Mt,
|
|
230
230
|
global: fe,
|
|
231
|
-
isContextDefined:
|
|
231
|
+
isContextDefined: Wt,
|
|
232
232
|
isSpecCompliantForm: Vr,
|
|
233
233
|
toJSONObject: Yr,
|
|
234
234
|
isAsyncFn: Kr,
|
|
235
235
|
isThenable: Jr,
|
|
236
|
-
setImmediate:
|
|
236
|
+
setImmediate: qt,
|
|
237
237
|
asap: Xr,
|
|
238
238
|
isIterable: Gr
|
|
239
239
|
};
|
|
@@ -261,7 +261,7 @@ p.inherits(L, Error, {
|
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
const
|
|
264
|
+
const Ht = L.prototype, Vt = {};
|
|
265
265
|
[
|
|
266
266
|
"ERR_BAD_OPTION_VALUE",
|
|
267
267
|
"ERR_BAD_OPTION",
|
|
@@ -277,32 +277,32 @@ const Vt = L.prototype, Yt = {};
|
|
|
277
277
|
"ERR_INVALID_URL"
|
|
278
278
|
// eslint-disable-next-line func-names
|
|
279
279
|
].forEach((e) => {
|
|
280
|
-
|
|
280
|
+
Vt[e] = { value: e };
|
|
281
281
|
});
|
|
282
|
-
Object.defineProperties(L,
|
|
283
|
-
Object.defineProperty(
|
|
282
|
+
Object.defineProperties(L, Vt);
|
|
283
|
+
Object.defineProperty(Ht, "isAxiosError", { value: !0 });
|
|
284
284
|
L.from = (e, t, n, s, o, i) => {
|
|
285
|
-
const a = Object.create(
|
|
285
|
+
const a = Object.create(Ht);
|
|
286
286
|
p.toFlatObject(e, a, function(u) {
|
|
287
287
|
return u !== Error.prototype;
|
|
288
288
|
}, (c) => c !== "isAxiosError");
|
|
289
|
-
const l = e && e.message ? e.message : "Error",
|
|
290
|
-
return L.call(a, l,
|
|
289
|
+
const l = e && e.message ? e.message : "Error", h = t == null && e ? e.code : t;
|
|
290
|
+
return L.call(a, l, h, n, s, 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 Zr = null;
|
|
293
|
-
function
|
|
293
|
+
function Qe(e) {
|
|
294
294
|
return p.isPlainObject(e) || p.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Yt(e) {
|
|
297
297
|
return p.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function gt(e, t, n) {
|
|
300
300
|
return e ? e.concat(t).map(function(o, i) {
|
|
301
|
-
return o =
|
|
301
|
+
return o = Yt(o), !n && i ? "[" + o + "]" : o;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
304
|
function Qr(e) {
|
|
305
|
-
return p.isArray(e) && !e.some(
|
|
305
|
+
return p.isArray(e) && !e.some(Qe);
|
|
306
306
|
}
|
|
307
307
|
const en = p.toFlatObject(p, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
@@ -317,7 +317,7 @@ function Be(e, t, n) {
|
|
|
317
317
|
}, !1, function(j, m) {
|
|
318
318
|
return !p.isUndefined(m[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = n.metaTokens, o = n.visitor || u, i = n.dots, a = n.indexes,
|
|
320
|
+
const s = n.metaTokens, o = n.visitor || u, i = n.dots, a = n.indexes, h = (n.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(t);
|
|
321
321
|
if (!p.isFunction(o))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function c(d) {
|
|
@@ -326,9 +326,9 @@ function Be(e, t, n) {
|
|
|
326
326
|
return d.toISOString();
|
|
327
327
|
if (p.isBoolean(d))
|
|
328
328
|
return d.toString();
|
|
329
|
-
if (!
|
|
329
|
+
if (!h && p.isBlob(d))
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return p.isArrayBuffer(d) || p.isTypedArray(d) ?
|
|
331
|
+
return p.isArrayBuffer(d) || p.isTypedArray(d) ? h && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
332
332
|
}
|
|
333
333
|
function u(d, j, m) {
|
|
334
334
|
let _ = d;
|
|
@@ -336,20 +336,20 @@ function Be(e, t, n) {
|
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
337
|
j = s ? j : j.slice(0, -2), d = JSON.stringify(d);
|
|
338
338
|
else if (p.isArray(d) && Qr(d) || (p.isFileList(d) || p.endsWith(j, "[]")) && (_ = p.toArray(d)))
|
|
339
|
-
return j =
|
|
340
|
-
!(p.isUndefined(
|
|
339
|
+
return j = Yt(j), _.forEach(function(A, C) {
|
|
340
|
+
!(p.isUndefined(A) || A === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
a === !0 ?
|
|
343
|
-
c(
|
|
342
|
+
a === !0 ? gt([j], C, i) : a === null ? j : j + "[]",
|
|
343
|
+
c(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return Qe(d) ? !0 : (t.append(gt(m, j, i), c(d)), !1);
|
|
348
348
|
}
|
|
349
349
|
const b = [], y = Object.assign(en, {
|
|
350
350
|
defaultVisitor: u,
|
|
351
351
|
convertValue: c,
|
|
352
|
-
isVisitable:
|
|
352
|
+
isVisitable: Qe
|
|
353
353
|
});
|
|
354
354
|
function w(d, j) {
|
|
355
355
|
if (!p.isUndefined(d)) {
|
|
@@ -370,7 +370,7 @@ function Be(e, t, n) {
|
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return w(e), t;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function mt(e) {
|
|
374
374
|
const t = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
@@ -384,17 +384,17 @@ function yt(e) {
|
|
|
384
384
|
return t[s];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function ot(e, t) {
|
|
388
388
|
this._pairs = [], e && Be(e, this, t);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const Kt = ot.prototype;
|
|
391
|
+
Kt.append = function(t, n) {
|
|
392
392
|
this._pairs.push([t, n]);
|
|
393
393
|
};
|
|
394
|
-
|
|
394
|
+
Kt.toString = function(t) {
|
|
395
395
|
const n = t ? function(s) {
|
|
396
|
-
return t.call(this, s,
|
|
397
|
-
} :
|
|
396
|
+
return t.call(this, s, mt);
|
|
397
|
+
} : mt;
|
|
398
398
|
return this._pairs.map(function(o) {
|
|
399
399
|
return n(o[0]) + "=" + n(o[1]);
|
|
400
400
|
}, "").join("&");
|
|
@@ -402,7 +402,7 @@ Jt.toString = function(t) {
|
|
|
402
402
|
function tn(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Jt(e, t, n) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
408
|
const s = n && n.encode || tn;
|
|
@@ -411,13 +411,13 @@ function Xt(e, t, n) {
|
|
|
411
411
|
});
|
|
412
412
|
const o = n && n.serialize;
|
|
413
413
|
let i;
|
|
414
|
-
if (o ? i = o(t, n) : i = p.isURLSearchParams(t) ? t.toString() : new
|
|
414
|
+
if (o ? i = o(t, n) : i = p.isURLSearchParams(t) ? t.toString() : new ot(t, n).toString(s), i) {
|
|
415
415
|
const a = e.indexOf("#");
|
|
416
416
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class yt {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -471,11 +471,11 @@ class bt {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const Xt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
}, rn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
478
|
+
}, rn = typeof URLSearchParams < "u" ? URLSearchParams : ot, nn = typeof FormData < "u" ? FormData : null, sn = typeof Blob < "u" ? Blob : null, on = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
481
|
URLSearchParams: rn,
|
|
@@ -483,22 +483,22 @@ const Gt = {
|
|
|
483
483
|
Blob: sn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn =
|
|
486
|
+
}, at = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, an = at && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = at && window.location.href || "http://localhost", dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
489
|
+
hasBrowserEnv: at,
|
|
490
490
|
hasStandardBrowserEnv: an,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: ln,
|
|
492
|
-
navigator:
|
|
492
|
+
navigator: et,
|
|
493
493
|
origin: cn
|
|
494
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
494
|
+
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...dn,
|
|
496
496
|
...on
|
|
497
497
|
};
|
|
498
498
|
function un(e, t) {
|
|
499
|
-
return Be(e, new
|
|
499
|
+
return Be(e, new ee.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(n, s, o, i) {
|
|
501
|
-
return
|
|
501
|
+
return ee.isNode && p.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
@@ -515,12 +515,12 @@ function fn(e) {
|
|
|
515
515
|
i = n[s], t[i] = e[i];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Gt(e) {
|
|
519
519
|
function t(n, s, o, i) {
|
|
520
520
|
let a = n[i++];
|
|
521
521
|
if (a === "__proto__") return !0;
|
|
522
|
-
const l = Number.isFinite(+a),
|
|
523
|
-
return a = !a && p.isArray(o) ? o.length : a,
|
|
522
|
+
const l = Number.isFinite(+a), h = i >= n.length;
|
|
523
|
+
return a = !a && p.isArray(o) ? o.length : a, h ? (p.hasOwnProp(o, a) ? o[a] = [o[a], s] : o[a] = s, !l) : ((!o[a] || !p.isObject(o[a])) && (o[a] = []), t(n, s, o[a], i) && p.isArray(o[a]) && (o[a] = fn(o[a])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(e) && p.isFunction(e.entries)) {
|
|
526
526
|
const n = {};
|
|
@@ -541,12 +541,12 @@ function xn(e, t, n) {
|
|
|
541
541
|
return (n || JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const Ie = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: Xt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, n) {
|
|
547
547
|
const s = n.getContentType() || "", o = s.indexOf("application/json") > -1, i = p.isObject(t);
|
|
548
548
|
if (i && p.isHTMLForm(t) && (t = new FormData(t)), p.isFormData(t))
|
|
549
|
-
return o ? JSON.stringify(
|
|
549
|
+
return o ? JSON.stringify(Gt(t)) : t;
|
|
550
550
|
if (p.isArrayBuffer(t) || p.isBuffer(t) || p.isStream(t) || p.isFile(t) || p.isBlob(t) || p.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (p.isArrayBufferView(t))
|
|
@@ -558,10 +558,10 @@ const Ie = {
|
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return un(t, this.formSerializer).toString();
|
|
560
560
|
if ((l = p.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
|
-
const
|
|
561
|
+
const h = this.env && this.env.FormData;
|
|
562
562
|
return Be(
|
|
563
563
|
l ? { "files[]": t } : t,
|
|
564
|
-
|
|
564
|
+
h && new h(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
@@ -593,8 +593,8 @@ const Ie = {
|
|
|
593
593
|
maxContentLength: -1,
|
|
594
594
|
maxBodyLength: -1,
|
|
595
595
|
env: {
|
|
596
|
-
FormData:
|
|
597
|
-
Blob:
|
|
596
|
+
FormData: ee.classes.FormData,
|
|
597
|
+
Blob: ee.classes.Blob
|
|
598
598
|
},
|
|
599
599
|
validateStatus: function(t) {
|
|
600
600
|
return t >= 200 && t < 300;
|
|
@@ -634,7 +634,7 @@ const hn = p.toObjectSet([
|
|
|
634
634
|
`).forEach(function(a) {
|
|
635
635
|
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), s = a.substring(o + 1).trim(), !(!n || t[n] && hn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
636
636
|
}), t;
|
|
637
|
-
},
|
|
637
|
+
}, bt = Symbol("internals");
|
|
638
638
|
function Se(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
@@ -649,7 +649,7 @@ function mn(e) {
|
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
651
|
const yn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
-
function
|
|
652
|
+
function Ye(e, t, n, s, o) {
|
|
653
653
|
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, t, n);
|
|
655
655
|
if (o && (t = n), !!p.isString(t)) {
|
|
@@ -673,30 +673,30 @@ function wn(e, t) {
|
|
|
673
673
|
});
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
let
|
|
676
|
+
let ne = class {
|
|
677
677
|
constructor(t) {
|
|
678
678
|
t && this.set(t);
|
|
679
679
|
}
|
|
680
680
|
set(t, n, s) {
|
|
681
681
|
const o = this;
|
|
682
|
-
function i(l,
|
|
683
|
-
const u = Se(
|
|
682
|
+
function i(l, h, c) {
|
|
683
|
+
const u = Se(h);
|
|
684
684
|
if (!u)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
686
|
const b = p.findKey(o, u);
|
|
687
|
-
(!b || o[b] === void 0 || c === !0 || c === void 0 && o[b] !== !1) && (o[b ||
|
|
687
|
+
(!b || o[b] === void 0 || c === !0 || c === void 0 && o[b] !== !1) && (o[b || h] = _e(l));
|
|
688
688
|
}
|
|
689
|
-
const a = (l,
|
|
689
|
+
const a = (l, h) => p.forEach(l, (c, u) => i(c, u, h));
|
|
690
690
|
if (p.isPlainObject(t) || t instanceof this.constructor)
|
|
691
691
|
a(t, n);
|
|
692
692
|
else if (p.isString(t) && (t = t.trim()) && !yn(t))
|
|
693
693
|
a(gn(t), n);
|
|
694
694
|
else if (p.isObject(t) && p.isIterable(t)) {
|
|
695
|
-
let l = {},
|
|
695
|
+
let l = {}, h, c;
|
|
696
696
|
for (const u of t) {
|
|
697
697
|
if (!p.isArray(u))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[c = u[0]] = (
|
|
699
|
+
l[c = u[0]] = (h = l[c]) ? p.isArray(h) ? [...h, u[1]] : [h, u[1]] : u[1];
|
|
700
700
|
}
|
|
701
701
|
a(l, n);
|
|
702
702
|
} else
|
|
@@ -723,7 +723,7 @@ let re = class {
|
|
|
723
723
|
has(t, n) {
|
|
724
724
|
if (t = Se(t), t) {
|
|
725
725
|
const s = p.findKey(this, t);
|
|
726
|
-
return !!(s && this[s] !== void 0 && (!n ||
|
|
726
|
+
return !!(s && this[s] !== void 0 && (!n || Ye(this, this[s], s, n)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
@@ -733,7 +733,7 @@ let re = class {
|
|
|
733
733
|
function i(a) {
|
|
734
734
|
if (a = Se(a), a) {
|
|
735
735
|
const l = p.findKey(s, a);
|
|
736
|
-
l && (!n ||
|
|
736
|
+
l && (!n || Ye(s, s[l], l, n)) && (delete s[l], o = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
return p.isArray(t) ? t.forEach(i) : i(t), o;
|
|
@@ -743,7 +743,7 @@ let re = class {
|
|
|
743
743
|
let s = n.length, o = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
745
|
const i = n[s];
|
|
746
|
-
(!t ||
|
|
746
|
+
(!t || Ye(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
747
747
|
}
|
|
748
748
|
return o;
|
|
749
749
|
}
|
|
@@ -789,7 +789,7 @@ let re = class {
|
|
|
789
789
|
return n.forEach((o) => s.set(o)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const s = (this[
|
|
792
|
+
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, o = this.prototype;
|
|
795
795
|
function i(a) {
|
|
@@ -799,8 +799,8 @@ let re = class {
|
|
|
799
799
|
return p.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
|
-
|
|
803
|
-
p.reduceDescriptors(
|
|
802
|
+
ne.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
803
|
+
p.reduceDescriptors(ne.prototype, ({ value: e }, t) => {
|
|
804
804
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
805
805
|
return {
|
|
806
806
|
get: () => e,
|
|
@@ -809,15 +809,15 @@ p.reduceDescriptors(re.prototype, ({ value: e }, t) => {
|
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
|
-
p.freezeMethods(
|
|
813
|
-
function
|
|
814
|
-
const n = this || Ie, s = t || n, o =
|
|
812
|
+
p.freezeMethods(ne);
|
|
813
|
+
function Ke(e, t) {
|
|
814
|
+
const n = this || Ie, s = t || n, o = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(e, function(l) {
|
|
817
817
|
i = l.call(n, i, o.normalize(), t ? t.status : void 0);
|
|
818
818
|
}), o.normalize(), i;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Zt(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
823
|
function je(e, t, n) {
|
|
@@ -826,7 +826,7 @@ function je(e, t, n) {
|
|
|
826
826
|
p.inherits(je, L, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function Qt(e, t, n) {
|
|
830
830
|
const s = n.config.validateStatus;
|
|
831
831
|
!n.status || !s || s(n.status) ? e(n) : t(new L(
|
|
832
832
|
"Request failed with status code " + n.status,
|
|
@@ -844,9 +844,9 @@ function vn(e, t) {
|
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const n = new Array(e), s = new Array(e);
|
|
846
846
|
let o = 0, i = 0, a;
|
|
847
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
847
|
+
return t = t !== void 0 ? t : 1e3, function(h) {
|
|
848
848
|
const c = Date.now(), u = s[i];
|
|
849
|
-
a || (a = c), n[o] =
|
|
849
|
+
a || (a = c), n[o] = h, s[o] = c;
|
|
850
850
|
let b = i, y = 0;
|
|
851
851
|
for (; b !== o; )
|
|
852
852
|
y += n[b++], b = b % e;
|
|
@@ -872,13 +872,13 @@ const De = (e, t, n = 3) => {
|
|
|
872
872
|
let s = 0;
|
|
873
873
|
const o = vn(50, 250);
|
|
874
874
|
return Sn((i) => {
|
|
875
|
-
const a = i.loaded, l = i.lengthComputable ? i.total : void 0,
|
|
875
|
+
const a = i.loaded, l = i.lengthComputable ? i.total : void 0, h = a - s, c = o(h), u = a <= l;
|
|
876
876
|
s = a;
|
|
877
877
|
const b = {
|
|
878
878
|
loaded: a,
|
|
879
879
|
total: l,
|
|
880
880
|
progress: l ? a / l : void 0,
|
|
881
|
-
bytes:
|
|
881
|
+
bytes: h,
|
|
882
882
|
rate: c || void 0,
|
|
883
883
|
estimated: c && l && u ? (l - a) / c : void 0,
|
|
884
884
|
event: i,
|
|
@@ -887,17 +887,17 @@ const De = (e, t, n = 3) => {
|
|
|
887
887
|
};
|
|
888
888
|
e(b);
|
|
889
889
|
}, n);
|
|
890
|
-
},
|
|
890
|
+
}, wt = (e, t) => {
|
|
891
891
|
const n = e != null;
|
|
892
892
|
return [(s) => t[0]({
|
|
893
893
|
lengthComputable: n,
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: s
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
898
|
-
new URL(
|
|
899
|
-
|
|
900
|
-
) : () => !0, En =
|
|
897
|
+
}, jt = (e) => (...t) => p.asap(() => e(...t)), kn = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ee.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
|
+
new URL(ee.origin),
|
|
899
|
+
ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
|
|
900
|
+
) : () => !0, En = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(e, t, n, s, o, i) {
|
|
@@ -930,11 +930,11 @@ function Cn(e) {
|
|
|
930
930
|
function Tn(e, t) {
|
|
931
931
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function er(e, t, n) {
|
|
934
934
|
let s = !Cn(t);
|
|
935
935
|
return e && (s || n == !1) ? Tn(e, t) : t;
|
|
936
936
|
}
|
|
937
|
-
const
|
|
937
|
+
const vt = (e) => e instanceof ne ? { ...e } : e;
|
|
938
938
|
function he(e, t) {
|
|
939
939
|
t = t || {};
|
|
940
940
|
const n = {};
|
|
@@ -963,7 +963,7 @@ function he(e, t) {
|
|
|
963
963
|
if (b in e)
|
|
964
964
|
return s(void 0, c);
|
|
965
965
|
}
|
|
966
|
-
const
|
|
966
|
+
const h = {
|
|
967
967
|
url: i,
|
|
968
968
|
method: i,
|
|
969
969
|
data: i,
|
|
@@ -992,40 +992,40 @@ function he(e, t) {
|
|
|
992
992
|
socketPath: a,
|
|
993
993
|
responseEncoding: a,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (c, u, b) => o(
|
|
995
|
+
headers: (c, u, b) => o(vt(c), vt(u), b, !0)
|
|
996
996
|
};
|
|
997
997
|
return p.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
998
|
-
const b =
|
|
998
|
+
const b = h[u] || o, y = b(e[u], t[u], u);
|
|
999
999
|
p.isUndefined(y) && b !== l || (n[u] = y);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
|
-
const
|
|
1002
|
+
const tr = (e) => {
|
|
1003
1003
|
const t = he({}, e);
|
|
1004
1004
|
let { data: n, withXSRFToken: s, xsrfHeaderName: o, xsrfCookieName: i, headers: a, auth: l } = t;
|
|
1005
|
-
if (t.headers = a =
|
|
1005
|
+
if (t.headers = a = ne.from(a), t.url = Jt(er(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
|
), p.isFormData(n)) {
|
|
1009
|
-
if (
|
|
1009
|
+
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
1010
|
a.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(n.getHeaders)) {
|
|
1012
|
-
const
|
|
1013
|
-
Object.entries(
|
|
1012
|
+
const h = n.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
+
Object.entries(h).forEach(([u, b]) => {
|
|
1014
1014
|
c.includes(u.toLowerCase()) && a.set(u, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1018
|
+
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(t)), s || s !== !1 && kn(t.url))) {
|
|
1019
|
+
const h = o && i && En.read(i);
|
|
1020
|
+
h && a.set(o, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return t;
|
|
1023
1023
|
}, Rn = typeof XMLHttpRequest < "u", In = Rn && function(e) {
|
|
1024
1024
|
return new Promise(function(n, s) {
|
|
1025
|
-
const o =
|
|
1025
|
+
const o = tr(e);
|
|
1026
1026
|
let i = o.data;
|
|
1027
|
-
const a =
|
|
1028
|
-
let { responseType: l, onUploadProgress:
|
|
1027
|
+
const a = ne.from(o.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = o, u, b, y, w, d;
|
|
1029
1029
|
function j() {
|
|
1030
1030
|
w && w(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
|
|
1031
1031
|
}
|
|
@@ -1034,17 +1034,17 @@ const rr = (e) => {
|
|
|
1034
1034
|
function _() {
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const A = ne.from(
|
|
1038
1038
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1039
1039
|
), M = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? m.responseText : m.response,
|
|
1041
1041
|
status: m.status,
|
|
1042
1042
|
statusText: m.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: A,
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: m
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1047
|
+
Qt(function(I) {
|
|
1048
1048
|
n(I), j();
|
|
1049
1049
|
}, function(I) {
|
|
1050
1050
|
s(I), j();
|
|
@@ -1059,7 +1059,7 @@ const rr = (e) => {
|
|
|
1059
1059
|
g.event = C || null, s(g), m = null;
|
|
1060
1060
|
}, m.ontimeout = function() {
|
|
1061
1061
|
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
-
const M = o.transitional ||
|
|
1062
|
+
const M = o.transitional || Xt;
|
|
1063
1063
|
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
1065
|
M.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
@@ -1068,11 +1068,11 @@ const rr = (e) => {
|
|
|
1068
1068
|
)), m = null;
|
|
1069
1069
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in m && p.forEach(a.toJSON(), function(C, M) {
|
|
1070
1070
|
m.setRequestHeader(M, C);
|
|
1071
|
-
}), p.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), l && l !== "json" && (m.responseType = o.responseType), c && ([y, d] = De(c, !0), m.addEventListener("progress", y)),
|
|
1072
|
-
m && (s(
|
|
1071
|
+
}), p.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), l && l !== "json" && (m.responseType = o.responseType), c && ([y, d] = De(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = De(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (o.cancelToken || o.signal) && (u = (A) => {
|
|
1072
|
+
m && (s(!A || A.type ? new je(null, e, m) : A), m.abort(), m = null);
|
|
1073
1073
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1074
1074
|
const R = jn(o.url);
|
|
1075
|
-
if (R &&
|
|
1075
|
+
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, e));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
@@ -1098,8 +1098,8 @@ const rr = (e) => {
|
|
|
1098
1098
|
}), e = null);
|
|
1099
1099
|
};
|
|
1100
1100
|
e.forEach((c) => c.addEventListener("abort", i));
|
|
1101
|
-
const { signal:
|
|
1102
|
-
return
|
|
1101
|
+
const { signal: h } = s;
|
|
1102
|
+
return h.unsubscribe = () => p.asap(l), h;
|
|
1103
1103
|
}
|
|
1104
1104
|
}, On = function* (e, t) {
|
|
1105
1105
|
let n = e.byteLength;
|
|
@@ -1129,17 +1129,17 @@ const rr = (e) => {
|
|
|
1129
1129
|
} finally {
|
|
1130
1130
|
await t.cancel();
|
|
1131
1131
|
}
|
|
1132
|
-
},
|
|
1132
|
+
}, St = (e, t, n, s) => {
|
|
1133
1133
|
const o = zn(e, t);
|
|
1134
|
-
let i = 0, a, l = (
|
|
1135
|
-
a || (a = !0, s && s(
|
|
1134
|
+
let i = 0, a, l = (h) => {
|
|
1135
|
+
a || (a = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
|
-
async pull(
|
|
1138
|
+
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
1140
|
const { done: c, value: u } = await o.next();
|
|
1141
1141
|
if (c) {
|
|
1142
|
-
l(),
|
|
1142
|
+
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
1145
|
let b = u.byteLength;
|
|
@@ -1147,24 +1147,24 @@ const rr = (e) => {
|
|
|
1147
1147
|
let y = i += b;
|
|
1148
1148
|
n(y);
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1150
|
+
h.enqueue(new Uint8Array(u));
|
|
1151
1151
|
} catch (c) {
|
|
1152
1152
|
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
|
-
cancel(
|
|
1156
|
-
return l(
|
|
1155
|
+
cancel(h) {
|
|
1156
|
+
return l(h), o.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
},
|
|
1161
|
+
}, kt = 64 * 1024, { isFunction: Oe } = p, _n = (({ Request: e, Response: t }) => ({
|
|
1162
1162
|
Request: e,
|
|
1163
1163
|
Response: t
|
|
1164
1164
|
}))(p.global), {
|
|
1165
|
-
ReadableStream:
|
|
1166
|
-
TextEncoder:
|
|
1167
|
-
} = p.global,
|
|
1165
|
+
ReadableStream: Et,
|
|
1166
|
+
TextEncoder: Ct
|
|
1167
|
+
} = p.global, Tt = (e, ...t) => {
|
|
1168
1168
|
try {
|
|
1169
1169
|
return !!e(...t);
|
|
1170
1170
|
} catch {
|
|
@@ -1177,17 +1177,17 @@ const rr = (e) => {
|
|
|
1177
1177
|
const { fetch: t, Request: n, Response: s } = e, o = t ? Oe(t) : typeof fetch == "function", i = Oe(n), a = Oe(s);
|
|
1178
1178
|
if (!o)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l = o && Oe(
|
|
1180
|
+
const l = o && Oe(Et), h = o && (typeof Ct == "function" ? /* @__PURE__ */ ((d) => (j) => d.encode(j))(new Ct()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), c = i && l && Tt(() => {
|
|
1181
1181
|
let d = !1;
|
|
1182
|
-
const j = new n(
|
|
1183
|
-
body: new
|
|
1182
|
+
const j = new n(ee.origin, {
|
|
1183
|
+
body: new Et(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
1186
|
return d = !0, "half";
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return d && !j;
|
|
1190
|
-
}), u = a && l &&
|
|
1190
|
+
}), u = a && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
1191
|
stream: u && ((d) => d.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
@@ -1204,14 +1204,14 @@ const rr = (e) => {
|
|
|
1204
1204
|
if (p.isBlob(d))
|
|
1205
1205
|
return d.size;
|
|
1206
1206
|
if (p.isSpecCompliantForm(d))
|
|
1207
|
-
return (await new n(
|
|
1207
|
+
return (await new n(ee.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
1209
|
body: d
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
1211
|
if (p.isArrayBufferView(d) || p.isArrayBuffer(d))
|
|
1212
1212
|
return d.byteLength;
|
|
1213
1213
|
if (p.isURLSearchParams(d) && (d = d + ""), p.isString(d))
|
|
1214
|
-
return (await
|
|
1214
|
+
return (await h(d)).byteLength;
|
|
1215
1215
|
}, w = async (d, j) => {
|
|
1216
1216
|
const m = p.toFiniteNumber(d.getContentLength());
|
|
1217
1217
|
return m ?? y(j);
|
|
@@ -1222,107 +1222,107 @@ const rr = (e) => {
|
|
|
1222
1222
|
method: m,
|
|
1223
1223
|
data: _,
|
|
1224
1224
|
signal: R,
|
|
1225
|
-
cancelToken:
|
|
1225
|
+
cancelToken: A,
|
|
1226
1226
|
timeout: C,
|
|
1227
1227
|
onDownloadProgress: M,
|
|
1228
1228
|
onUploadProgress: g,
|
|
1229
1229
|
responseType: I,
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
|
-
fetchOptions:
|
|
1233
|
-
} =
|
|
1232
|
+
fetchOptions: B
|
|
1233
|
+
} = tr(d), F = t || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
|
-
let
|
|
1236
|
-
const T =
|
|
1237
|
-
|
|
1235
|
+
let V = Pn([R, A && A.toAbortSignal()], C), Z = null;
|
|
1236
|
+
const T = V && V.unsubscribe && (() => {
|
|
1237
|
+
V.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
|
-
let
|
|
1239
|
+
let J;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (g && c && m !== "get" && m !== "head" && (
|
|
1241
|
+
if (g && c && m !== "get" && m !== "head" && (J = await w(v, _)) !== 0) {
|
|
1242
1242
|
let f = new n(j, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: _,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), S;
|
|
1247
1247
|
if (p.isFormData(_) && (S = f.headers.get("content-type")) && v.setContentType(S), f.body) {
|
|
1248
|
-
const [
|
|
1249
|
-
|
|
1250
|
-
De(
|
|
1248
|
+
const [x, k] = wt(
|
|
1249
|
+
J,
|
|
1250
|
+
De(jt(g))
|
|
1251
1251
|
);
|
|
1252
|
-
_ =
|
|
1252
|
+
_ = St(f.body, kt, x, k);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(U) || (U = U ? "include" : "omit");
|
|
1256
|
-
const
|
|
1257
|
-
...
|
|
1258
|
-
signal:
|
|
1256
|
+
const z = i && "credentials" in n.prototype, P = {
|
|
1257
|
+
...B,
|
|
1258
|
+
signal: V,
|
|
1259
1259
|
method: m.toUpperCase(),
|
|
1260
1260
|
headers: v.normalize().toJSON(),
|
|
1261
1261
|
body: _,
|
|
1262
1262
|
duplex: "half",
|
|
1263
|
-
credentials:
|
|
1263
|
+
credentials: z ? U : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z = i && new n(j,
|
|
1266
|
-
let
|
|
1267
|
-
const
|
|
1268
|
-
if (u && (M ||
|
|
1265
|
+
Z = i && new n(j, P);
|
|
1266
|
+
let K = await (i ? F(Z, B) : F(j, P));
|
|
1267
|
+
const Q = u && (I === "stream" || I === "response");
|
|
1268
|
+
if (u && (M || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
|
-
["status", "statusText", "headers"].forEach((
|
|
1271
|
-
f[
|
|
1270
|
+
["status", "statusText", "headers"].forEach(($) => {
|
|
1271
|
+
f[$] = K[$];
|
|
1272
1272
|
});
|
|
1273
|
-
const S = p.toFiniteNumber(
|
|
1273
|
+
const S = p.toFiniteNumber(K.headers.get("content-length")), [x, k] = M && wt(
|
|
1274
1274
|
S,
|
|
1275
|
-
De(
|
|
1275
|
+
De(jt(M), !0)
|
|
1276
1276
|
) || [];
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1277
|
+
K = new s(
|
|
1278
|
+
St(K.body, kt, x, () => {
|
|
1279
|
+
k && k(), T && T();
|
|
1280
1280
|
}),
|
|
1281
1281
|
f
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let
|
|
1286
|
-
return !
|
|
1287
|
-
|
|
1288
|
-
data:
|
|
1289
|
-
headers:
|
|
1290
|
-
status:
|
|
1291
|
-
statusText:
|
|
1285
|
+
let X = await b[p.findKey(b, I) || "text"](K, d);
|
|
1286
|
+
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
|
+
Qt(f, S, {
|
|
1288
|
+
data: X,
|
|
1289
|
+
headers: ne.from(K.headers),
|
|
1290
|
+
status: K.status,
|
|
1291
|
+
statusText: K.statusText,
|
|
1292
1292
|
config: d,
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
|
-
} catch (
|
|
1297
|
-
throw T && T(),
|
|
1296
|
+
} catch (z) {
|
|
1297
|
+
throw T && T(), z && z.name === "TypeError" && /Load failed|fetch/i.test(z.message) ? Object.assign(
|
|
1298
1298
|
new L("Network Error", L.ERR_NETWORK, d, Z),
|
|
1299
1299
|
{
|
|
1300
|
-
cause:
|
|
1300
|
+
cause: z.cause || z
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(
|
|
1302
|
+
) : L.from(z, z && z.code, d, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
}, Nn = /* @__PURE__ */ new Map(),
|
|
1305
|
+
}, Nn = /* @__PURE__ */ new Map(), rr = (e) => {
|
|
1306
1306
|
let t = e ? e.env : {};
|
|
1307
1307
|
const { fetch: n, Request: s, Response: o } = t, i = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
o,
|
|
1310
1310
|
n
|
|
1311
1311
|
];
|
|
1312
|
-
let a = i.length, l = a,
|
|
1312
|
+
let a = i.length, l = a, h, c, u = Nn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
|
|
1314
|
+
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() : $n(t)), u = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1317
|
+
rr();
|
|
1318
|
+
const tt = {
|
|
1319
1319
|
http: Zr,
|
|
1320
1320
|
xhr: In,
|
|
1321
1321
|
fetch: {
|
|
1322
|
-
get:
|
|
1322
|
+
get: rr
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
p.forEach(
|
|
1325
|
+
p.forEach(tt, (e, t) => {
|
|
1326
1326
|
if (e) {
|
|
1327
1327
|
try {
|
|
1328
1328
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1331,7 +1331,7 @@ p.forEach(rt, (e, t) => {
|
|
|
1331
1331
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const
|
|
1334
|
+
const Rt = (e) => `- ${e}`, Un = (e) => p.isFunction(e) || e === null || e === !1, nr = {
|
|
1335
1335
|
getAdapter: (e, t) => {
|
|
1336
1336
|
e = p.isArray(e) ? e : [e];
|
|
1337
1337
|
const { length: n } = e;
|
|
@@ -1340,7 +1340,7 @@ const It = (e) => `- ${e}`, Un = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1340
1340
|
for (let a = 0; a < n; a++) {
|
|
1341
1341
|
s = e[a];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (o = s, !Un(s) && (o =
|
|
1343
|
+
if (o = s, !Un(s) && (o = tt[(l = String(s)).toLowerCase()], o === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
1345
|
if (o && (p.isFunction(o) || (o = o.get(t))))
|
|
1346
1346
|
break;
|
|
@@ -1348,11 +1348,11 @@ const It = (e) => `- ${e}`, Un = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!o) {
|
|
1350
1350
|
const a = Object.entries(i).map(
|
|
1351
|
-
([
|
|
1351
|
+
([h, c]) => `adapter ${h} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let l = n ? a.length > 1 ? `since :
|
|
1354
|
-
` + a.map(
|
|
1355
|
-
`) : " " +
|
|
1354
|
+
` + a.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(a[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new L(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
@@ -1360,40 +1360,40 @@ const It = (e) => `- ${e}`, Un = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1360
1360
|
}
|
|
1361
1361
|
return o;
|
|
1362
1362
|
},
|
|
1363
|
-
adapters:
|
|
1363
|
+
adapters: tt
|
|
1364
1364
|
};
|
|
1365
|
-
function
|
|
1365
|
+
function Je(e) {
|
|
1366
1366
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1367
1367
|
throw new je(null, e);
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1370
|
-
return
|
|
1369
|
+
function It(e) {
|
|
1370
|
+
return Je(e), e.headers = ne.from(e.headers), e.data = Ke.call(
|
|
1371
1371
|
e,
|
|
1372
1372
|
e.transformRequest
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1374
|
-
return
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(e.adapter || Ie.adapter, e)(e).then(function(s) {
|
|
1374
|
+
return Je(e), s.data = Ke.call(
|
|
1375
1375
|
e,
|
|
1376
1376
|
e.transformResponse,
|
|
1377
1377
|
s
|
|
1378
|
-
), s.headers =
|
|
1378
|
+
), s.headers = ne.from(s.headers), s;
|
|
1379
1379
|
}, function(s) {
|
|
1380
|
-
return
|
|
1380
|
+
return Zt(s) || (Je(e), s && s.response && (s.response.data = Ke.call(
|
|
1381
1381
|
e,
|
|
1382
1382
|
e.transformResponse,
|
|
1383
1383
|
s.response
|
|
1384
|
-
), s.response.headers =
|
|
1384
|
+
), s.response.headers = ne.from(s.response.headers))), Promise.reject(s);
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const sr = "1.12.2", qe = {};
|
|
1388
1388
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1389
1389
|
qe[e] = function(s) {
|
|
1390
1390
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1391
1391
|
};
|
|
1392
1392
|
});
|
|
1393
|
-
const
|
|
1393
|
+
const Pt = {};
|
|
1394
1394
|
qe.transitional = function(t, n, s) {
|
|
1395
1395
|
function o(i, a) {
|
|
1396
|
-
return "[Axios v" +
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + i + "'" + a + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
1398
|
return (i, a, l) => {
|
|
1399
1399
|
if (t === !1)
|
|
@@ -1401,7 +1401,7 @@ qe.transitional = function(t, n, s) {
|
|
|
1401
1401
|
o(a, " has been removed" + (n ? " in " + n : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return n && !
|
|
1404
|
+
return n && !Pt[a] && (Pt[a] = !0, console.warn(
|
|
1405
1405
|
o(
|
|
1406
1406
|
a,
|
|
1407
1407
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1420,9 +1420,9 @@ function Dn(e, t, n) {
|
|
|
1420
1420
|
for (; o-- > 0; ) {
|
|
1421
1421
|
const i = s[o], a = t[i];
|
|
1422
1422
|
if (a) {
|
|
1423
|
-
const l = e[i],
|
|
1424
|
-
if (
|
|
1425
|
-
throw new L("option " + i + " must be " +
|
|
1423
|
+
const l = e[i], h = l === void 0 || a(l, i, e);
|
|
1424
|
+
if (h !== !0)
|
|
1425
|
+
throw new L("option " + i + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (n !== !0)
|
|
@@ -1436,8 +1436,8 @@ const $e = {
|
|
|
1436
1436
|
let xe = class {
|
|
1437
1437
|
constructor(t) {
|
|
1438
1438
|
this.defaults = t || {}, this.interceptors = {
|
|
1439
|
-
request: new
|
|
1440
|
-
response: new
|
|
1439
|
+
request: new yt(),
|
|
1440
|
+
response: new yt()
|
|
1441
1441
|
};
|
|
1442
1442
|
}
|
|
1443
1443
|
/**
|
|
@@ -1490,19 +1490,19 @@ let xe = class {
|
|
|
1490
1490
|
(d) => {
|
|
1491
1491
|
delete i[d];
|
|
1492
1492
|
}
|
|
1493
|
-
), n.headers =
|
|
1493
|
+
), n.headers = ne.concat(a, i);
|
|
1494
1494
|
const l = [];
|
|
1495
|
-
let
|
|
1495
|
+
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
1497
|
-
typeof j.runWhen == "function" && j.runWhen(n) === !1 || (
|
|
1497
|
+
typeof j.runWhen == "function" && j.runWhen(n) === !1 || (h = h && j.synchronous, l.unshift(j.fulfilled, j.rejected));
|
|
1498
1498
|
});
|
|
1499
1499
|
const c = [];
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
1501
|
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
1503
|
let u, b = 0, y;
|
|
1504
|
-
if (!
|
|
1505
|
-
const d = [
|
|
1504
|
+
if (!h) {
|
|
1505
|
+
const d = [It.bind(this), void 0];
|
|
1506
1506
|
for (d.unshift(...l), d.push(...c), y = d.length, u = Promise.resolve(n); b < y; )
|
|
1507
1507
|
u = u.then(d[b++], d[b++]);
|
|
1508
1508
|
return u;
|
|
@@ -1519,7 +1519,7 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
u =
|
|
1522
|
+
u = It.call(this, w);
|
|
1523
1523
|
} catch (d) {
|
|
1524
1524
|
return Promise.reject(d);
|
|
1525
1525
|
}
|
|
@@ -1529,8 +1529,8 @@ let xe = class {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(t) {
|
|
1531
1531
|
t = he(this.defaults, t);
|
|
1532
|
-
const n =
|
|
1533
|
-
return
|
|
1532
|
+
const n = er(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1533
|
+
return Jt(n, t.params, t.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
1536
|
p.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1557,7 +1557,7 @@ p.forEach(["post", "put", "patch"], function(t) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
xe.prototype[t] = n(), xe.prototype[t + "Form"] = n(!0);
|
|
1559
1559
|
});
|
|
1560
|
-
let Ln = class
|
|
1560
|
+
let Ln = class or {
|
|
1561
1561
|
constructor(t) {
|
|
1562
1562
|
if (typeof t != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
@@ -1623,7 +1623,7 @@ let Ln = class ar {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let t;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new
|
|
1626
|
+
token: new or(function(o) {
|
|
1627
1627
|
t = o;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: t
|
|
@@ -1638,7 +1638,7 @@ function Fn(e) {
|
|
|
1638
1638
|
function Mn(e) {
|
|
1639
1639
|
return p.isObject(e) && e.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
|
-
const
|
|
1641
|
+
const rt = {
|
|
1642
1642
|
Continue: 100,
|
|
1643
1643
|
SwitchingProtocols: 101,
|
|
1644
1644
|
Processing: 102,
|
|
@@ -1703,21 +1703,21 @@ const nt = {
|
|
|
1703
1703
|
NotExtended: 510,
|
|
1704
1704
|
NetworkAuthenticationRequired: 511
|
|
1705
1705
|
};
|
|
1706
|
-
Object.entries(
|
|
1707
|
-
|
|
1706
|
+
Object.entries(rt).forEach(([e, t]) => {
|
|
1707
|
+
rt[t] = e;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1710
|
-
const t = new xe(e), n =
|
|
1709
|
+
function ar(e) {
|
|
1710
|
+
const t = new xe(e), n = Ut(xe.prototype.request, t);
|
|
1711
1711
|
return p.extend(n, xe.prototype, t, { allOwnKeys: !0 }), p.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1712
|
-
return
|
|
1712
|
+
return ar(he(e, o));
|
|
1713
1713
|
}, n;
|
|
1714
1714
|
}
|
|
1715
|
-
const W =
|
|
1715
|
+
const W = ar(Ie);
|
|
1716
1716
|
W.Axios = xe;
|
|
1717
1717
|
W.CanceledError = je;
|
|
1718
1718
|
W.CancelToken = Ln;
|
|
1719
|
-
W.isCancel =
|
|
1720
|
-
W.VERSION =
|
|
1719
|
+
W.isCancel = Zt;
|
|
1720
|
+
W.VERSION = sr;
|
|
1721
1721
|
W.toFormData = Be;
|
|
1722
1722
|
W.AxiosError = L;
|
|
1723
1723
|
W.Cancel = W.CanceledError;
|
|
@@ -1727,10 +1727,10 @@ W.all = function(t) {
|
|
|
1727
1727
|
W.spread = Fn;
|
|
1728
1728
|
W.isAxiosError = Mn;
|
|
1729
1729
|
W.mergeConfig = he;
|
|
1730
|
-
W.AxiosHeaders =
|
|
1731
|
-
W.formToJSON = (e) =>
|
|
1732
|
-
W.getAdapter =
|
|
1733
|
-
W.HttpStatusCode =
|
|
1730
|
+
W.AxiosHeaders = ne;
|
|
1731
|
+
W.formToJSON = (e) => Gt(p.isHTMLForm(e) ? new FormData(e) : e);
|
|
1732
|
+
W.getAdapter = nr.getAdapter;
|
|
1733
|
+
W.HttpStatusCode = rt;
|
|
1734
1734
|
W.default = W;
|
|
1735
1735
|
const {
|
|
1736
1736
|
Axios: Ks,
|
|
@@ -1940,6 +1940,15 @@ class uo {
|
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
1942
1942
|
// ================= USER EXTRA DATA =================
|
|
1943
|
+
/**
|
|
1944
|
+
* Fetch ALL users' merged data for a specific app
|
|
1945
|
+
* @param params requires appId
|
|
1946
|
+
*/
|
|
1947
|
+
async getAllUsersData() {
|
|
1948
|
+
if (!this.appId)
|
|
1949
|
+
throw new Error("getAllUsersData: SDK 'appId' is missing in config");
|
|
1950
|
+
return this.request("GET", `/users/all-data/${this.appId}/data`);
|
|
1951
|
+
}
|
|
1943
1952
|
/**
|
|
1944
1953
|
* Get all data objects for a user
|
|
1945
1954
|
* @param params requires userId
|
|
@@ -2001,10 +2010,10 @@ var ze = { exports: {} }, ke = {};
|
|
|
2001
2010
|
* This source code is licensed under the MIT license found in the
|
|
2002
2011
|
* LICENSE file in the root directory of this source tree.
|
|
2003
2012
|
*/
|
|
2004
|
-
var
|
|
2013
|
+
var Ot;
|
|
2005
2014
|
function Wn() {
|
|
2006
|
-
if (
|
|
2007
|
-
|
|
2015
|
+
if (Ot) return ke;
|
|
2016
|
+
Ot = 1;
|
|
2008
2017
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
2009
2018
|
function n(s, o, i) {
|
|
2010
2019
|
var a = null;
|
|
@@ -2033,9 +2042,9 @@ var Ee = {};
|
|
|
2033
2042
|
* This source code is licensed under the MIT license found in the
|
|
2034
2043
|
* LICENSE file in the root directory of this source tree.
|
|
2035
2044
|
*/
|
|
2036
|
-
var
|
|
2045
|
+
var zt;
|
|
2037
2046
|
function Bn() {
|
|
2038
|
-
return
|
|
2047
|
+
return zt || (zt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2039
2048
|
function e(f) {
|
|
2040
2049
|
if (f == null) return null;
|
|
2041
2050
|
if (typeof f == "function")
|
|
@@ -2052,7 +2061,7 @@ function Bn() {
|
|
|
2052
2061
|
return "Suspense";
|
|
2053
2062
|
case I:
|
|
2054
2063
|
return "SuspenseList";
|
|
2055
|
-
case
|
|
2064
|
+
case B:
|
|
2056
2065
|
return "Activity";
|
|
2057
2066
|
}
|
|
2058
2067
|
if (typeof f == "object")
|
|
@@ -2063,7 +2072,7 @@ function Bn() {
|
|
|
2063
2072
|
return "Portal";
|
|
2064
2073
|
case C:
|
|
2065
2074
|
return f.displayName || "Context";
|
|
2066
|
-
case
|
|
2075
|
+
case A:
|
|
2067
2076
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
2068
2077
|
case M:
|
|
2069
2078
|
var S = f.render;
|
|
@@ -2091,11 +2100,11 @@ function Bn() {
|
|
|
2091
2100
|
}
|
|
2092
2101
|
if (S) {
|
|
2093
2102
|
S = console;
|
|
2094
|
-
var
|
|
2095
|
-
return
|
|
2103
|
+
var x = S.error, k = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
2104
|
+
return x.call(
|
|
2096
2105
|
S,
|
|
2097
2106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2098
|
-
|
|
2107
|
+
k
|
|
2099
2108
|
), t(f);
|
|
2100
2109
|
}
|
|
2101
2110
|
}
|
|
@@ -2111,7 +2120,7 @@ function Bn() {
|
|
|
2111
2120
|
}
|
|
2112
2121
|
}
|
|
2113
2122
|
function o() {
|
|
2114
|
-
var f =
|
|
2123
|
+
var f = V.A;
|
|
2115
2124
|
return f === null ? null : f.getOwner();
|
|
2116
2125
|
}
|
|
2117
2126
|
function i() {
|
|
@@ -2125,34 +2134,34 @@ function Bn() {
|
|
|
2125
2134
|
return f.key !== void 0;
|
|
2126
2135
|
}
|
|
2127
2136
|
function l(f, S) {
|
|
2128
|
-
function
|
|
2129
|
-
|
|
2137
|
+
function x() {
|
|
2138
|
+
z || (z = !0, console.error(
|
|
2130
2139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2131
2140
|
S
|
|
2132
2141
|
));
|
|
2133
2142
|
}
|
|
2134
|
-
|
|
2135
|
-
get:
|
|
2143
|
+
x.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
2144
|
+
get: x,
|
|
2136
2145
|
configurable: !0
|
|
2137
2146
|
});
|
|
2138
2147
|
}
|
|
2139
|
-
function
|
|
2148
|
+
function h() {
|
|
2140
2149
|
var f = e(this.type);
|
|
2141
|
-
return
|
|
2150
|
+
return P[f] || (P[f] = !0, console.error(
|
|
2142
2151
|
"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."
|
|
2143
2152
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
2144
2153
|
}
|
|
2145
|
-
function c(f, S,
|
|
2146
|
-
var
|
|
2154
|
+
function c(f, S, x, k, $, N) {
|
|
2155
|
+
var Y = x.ref;
|
|
2147
2156
|
return f = {
|
|
2148
2157
|
$$typeof: d,
|
|
2149
2158
|
type: f,
|
|
2150
2159
|
key: S,
|
|
2151
|
-
props:
|
|
2152
|
-
_owner:
|
|
2153
|
-
}, (
|
|
2160
|
+
props: x,
|
|
2161
|
+
_owner: k
|
|
2162
|
+
}, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(f, "ref", {
|
|
2154
2163
|
enumerable: !1,
|
|
2155
|
-
get:
|
|
2164
|
+
get: h
|
|
2156
2165
|
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
2157
2166
|
configurable: !1,
|
|
2158
2167
|
enumerable: !1,
|
|
@@ -2167,60 +2176,60 @@ function Bn() {
|
|
|
2167
2176
|
configurable: !1,
|
|
2168
2177
|
enumerable: !1,
|
|
2169
2178
|
writable: !0,
|
|
2170
|
-
value:
|
|
2179
|
+
value: $
|
|
2171
2180
|
}), Object.defineProperty(f, "_debugTask", {
|
|
2172
2181
|
configurable: !1,
|
|
2173
2182
|
enumerable: !1,
|
|
2174
2183
|
writable: !0,
|
|
2175
|
-
value:
|
|
2184
|
+
value: N
|
|
2176
2185
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2177
2186
|
}
|
|
2178
|
-
function u(f, S,
|
|
2179
|
-
var
|
|
2180
|
-
if (
|
|
2181
|
-
if (
|
|
2182
|
-
if (T(
|
|
2183
|
-
for (
|
|
2184
|
-
b(
|
|
2185
|
-
Object.freeze && Object.freeze(
|
|
2187
|
+
function u(f, S, x, k, $, N) {
|
|
2188
|
+
var Y = S.children;
|
|
2189
|
+
if (Y !== void 0)
|
|
2190
|
+
if (k)
|
|
2191
|
+
if (T(Y)) {
|
|
2192
|
+
for (k = 0; k < Y.length; k++)
|
|
2193
|
+
b(Y[k]);
|
|
2194
|
+
Object.freeze && Object.freeze(Y);
|
|
2186
2195
|
} else
|
|
2187
2196
|
console.error(
|
|
2188
2197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2189
2198
|
);
|
|
2190
|
-
else b(
|
|
2199
|
+
else b(Y);
|
|
2191
2200
|
if (Z.call(S, "key")) {
|
|
2192
|
-
|
|
2193
|
-
var
|
|
2201
|
+
Y = e(f);
|
|
2202
|
+
var se = Object.keys(S).filter(function(ve) {
|
|
2194
2203
|
return ve !== "key";
|
|
2195
2204
|
});
|
|
2196
|
-
|
|
2205
|
+
k = 0 < se.length ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}", X[Y + k] || (se = 0 < se.length ? "{" + se.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2197
2206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2198
2207
|
let props = %s;
|
|
2199
2208
|
<%s {...props} />
|
|
2200
2209
|
React keys must be passed directly to JSX without using spread:
|
|
2201
2210
|
let props = %s;
|
|
2202
2211
|
<%s key={someKey} {...props} />`,
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
),
|
|
2212
|
+
k,
|
|
2213
|
+
Y,
|
|
2214
|
+
se,
|
|
2215
|
+
Y
|
|
2216
|
+
), X[Y + k] = !0);
|
|
2208
2217
|
}
|
|
2209
|
-
if (
|
|
2210
|
-
|
|
2211
|
-
for (var
|
|
2212
|
-
|
|
2213
|
-
} else
|
|
2214
|
-
return
|
|
2215
|
-
|
|
2218
|
+
if (Y = null, x !== void 0 && (n(x), Y = "" + x), a(S) && (n(S.key), Y = "" + S.key), "key" in S) {
|
|
2219
|
+
x = {};
|
|
2220
|
+
for (var ue in S)
|
|
2221
|
+
ue !== "key" && (x[ue] = S[ue]);
|
|
2222
|
+
} else x = S;
|
|
2223
|
+
return Y && l(
|
|
2224
|
+
x,
|
|
2216
2225
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
2217
2226
|
), c(
|
|
2218
2227
|
f,
|
|
2219
|
-
|
|
2220
|
-
|
|
2228
|
+
Y,
|
|
2229
|
+
x,
|
|
2221
2230
|
o(),
|
|
2222
|
-
|
|
2223
|
-
|
|
2231
|
+
$,
|
|
2232
|
+
N
|
|
2224
2233
|
);
|
|
2225
2234
|
}
|
|
2226
2235
|
function b(f) {
|
|
@@ -2229,7 +2238,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2229
2238
|
function y(f) {
|
|
2230
2239
|
return typeof f == "object" && f !== null && f.$$typeof === d;
|
|
2231
2240
|
}
|
|
2232
|
-
var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"),
|
|
2241
|
+
var w = Le, d = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), C = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
2233
2242
|
return null;
|
|
2234
2243
|
};
|
|
2235
2244
|
w = {
|
|
@@ -2237,40 +2246,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2237
2246
|
return f();
|
|
2238
2247
|
}
|
|
2239
2248
|
};
|
|
2240
|
-
var
|
|
2249
|
+
var z, P = {}, K = w.react_stack_bottom_frame.bind(
|
|
2241
2250
|
w,
|
|
2242
2251
|
i
|
|
2243
|
-
)(),
|
|
2244
|
-
Ee.Fragment = m, Ee.jsx = function(f, S,
|
|
2245
|
-
var
|
|
2252
|
+
)(), Q = J(s(i)), X = {};
|
|
2253
|
+
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2254
|
+
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2246
2255
|
return u(
|
|
2247
2256
|
f,
|
|
2248
2257
|
S,
|
|
2249
|
-
|
|
2258
|
+
x,
|
|
2250
2259
|
!1,
|
|
2251
|
-
|
|
2252
|
-
|
|
2260
|
+
k ? Error("react-stack-top-frame") : K,
|
|
2261
|
+
k ? J(s(f)) : Q
|
|
2253
2262
|
);
|
|
2254
|
-
}, Ee.jsxs = function(f, S,
|
|
2255
|
-
var
|
|
2263
|
+
}, Ee.jsxs = function(f, S, x) {
|
|
2264
|
+
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2256
2265
|
return u(
|
|
2257
2266
|
f,
|
|
2258
2267
|
S,
|
|
2259
|
-
|
|
2268
|
+
x,
|
|
2260
2269
|
!0,
|
|
2261
|
-
|
|
2262
|
-
|
|
2270
|
+
k ? Error("react-stack-top-frame") : K,
|
|
2271
|
+
k ? J(s(f)) : Q
|
|
2263
2272
|
);
|
|
2264
2273
|
};
|
|
2265
2274
|
})()), Ee;
|
|
2266
2275
|
}
|
|
2267
|
-
var
|
|
2276
|
+
var At;
|
|
2268
2277
|
function qn() {
|
|
2269
|
-
return
|
|
2278
|
+
return At || (At = 1, process.env.NODE_ENV === "production" ? ze.exports = Wn() : ze.exports = Bn()), ze.exports;
|
|
2270
2279
|
}
|
|
2271
2280
|
var r = qn();
|
|
2272
2281
|
const Hn = async (e, t) => {
|
|
2273
|
-
const { name: n, email: s, password: o, appId: i, phone: a, address: l, avatarUrl:
|
|
2282
|
+
const { name: n, email: s, password: o, appId: i, phone: a, address: l, avatarUrl: h, isActive: c = !0, role: u = "user" } = e, { baseUrl: b, apiKey: y } = t;
|
|
2274
2283
|
if (!y)
|
|
2275
2284
|
throw new Error("API key is required for signup");
|
|
2276
2285
|
if (!n || !s || !o || !i)
|
|
@@ -2285,7 +2294,7 @@ const Hn = async (e, t) => {
|
|
|
2285
2294
|
appId: i,
|
|
2286
2295
|
phone: a,
|
|
2287
2296
|
address: l,
|
|
2288
|
-
avatarUrl:
|
|
2297
|
+
avatarUrl: h,
|
|
2289
2298
|
isActive: c,
|
|
2290
2299
|
role: u
|
|
2291
2300
|
},
|
|
@@ -2333,10 +2342,10 @@ const Hn = async (e, t) => {
|
|
|
2333
2342
|
const Vn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Yn = (e) => e.replace(
|
|
2334
2343
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2335
2344
|
(t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2336
|
-
),
|
|
2345
|
+
), _t = (e) => {
|
|
2337
2346
|
const t = Yn(e);
|
|
2338
2347
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2339
|
-
},
|
|
2348
|
+
}, ir = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim(), Kn = (e) => {
|
|
2340
2349
|
for (const t in e)
|
|
2341
2350
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
2342
2351
|
return !0;
|
|
@@ -2364,7 +2373,7 @@ var Jn = {
|
|
|
2364
2373
|
* This source code is licensed under the ISC license.
|
|
2365
2374
|
* See the LICENSE file in the root directory of this source tree.
|
|
2366
2375
|
*/
|
|
2367
|
-
const Xn =
|
|
2376
|
+
const Xn = Nt(
|
|
2368
2377
|
({
|
|
2369
2378
|
color: e = "currentColor",
|
|
2370
2379
|
size: t = 24,
|
|
@@ -2374,21 +2383,21 @@ const Xn = Ut(
|
|
|
2374
2383
|
children: i,
|
|
2375
2384
|
iconNode: a,
|
|
2376
2385
|
...l
|
|
2377
|
-
},
|
|
2386
|
+
}, h) => Ge(
|
|
2378
2387
|
"svg",
|
|
2379
2388
|
{
|
|
2380
|
-
ref:
|
|
2389
|
+
ref: h,
|
|
2381
2390
|
...Jn,
|
|
2382
2391
|
width: t,
|
|
2383
2392
|
height: t,
|
|
2384
2393
|
stroke: e,
|
|
2385
2394
|
strokeWidth: s ? Number(n) * 24 / Number(t) : n,
|
|
2386
|
-
className:
|
|
2395
|
+
className: ir("lucide", o),
|
|
2387
2396
|
...!i && !Kn(l) && { "aria-hidden": "true" },
|
|
2388
2397
|
...l
|
|
2389
2398
|
},
|
|
2390
2399
|
[
|
|
2391
|
-
...a.map(([c, u]) =>
|
|
2400
|
+
...a.map(([c, u]) => Ge(c, u)),
|
|
2392
2401
|
...Array.isArray(i) ? i : [i]
|
|
2393
2402
|
]
|
|
2394
2403
|
)
|
|
@@ -2399,20 +2408,20 @@ const Xn = Ut(
|
|
|
2399
2408
|
* This source code is licensed under the ISC license.
|
|
2400
2409
|
* See the LICENSE file in the root directory of this source tree.
|
|
2401
2410
|
*/
|
|
2402
|
-
const
|
|
2403
|
-
const n =
|
|
2404
|
-
({ className: s, ...o }, i) =>
|
|
2411
|
+
const q = (e, t) => {
|
|
2412
|
+
const n = Nt(
|
|
2413
|
+
({ className: s, ...o }, i) => Ge(Xn, {
|
|
2405
2414
|
ref: i,
|
|
2406
2415
|
iconNode: t,
|
|
2407
|
-
className:
|
|
2408
|
-
`lucide-${Vn(
|
|
2416
|
+
className: ir(
|
|
2417
|
+
`lucide-${Vn(_t(e))}`,
|
|
2409
2418
|
`lucide-${e}`,
|
|
2410
2419
|
s
|
|
2411
2420
|
),
|
|
2412
2421
|
...o
|
|
2413
2422
|
})
|
|
2414
2423
|
);
|
|
2415
|
-
return n.displayName =
|
|
2424
|
+
return n.displayName = _t(e), n;
|
|
2416
2425
|
};
|
|
2417
2426
|
/**
|
|
2418
2427
|
* @license lucide-react v0.544.0 - ISC
|
|
@@ -2429,14 +2438,14 @@ const Gn = [
|
|
|
2429
2438
|
}
|
|
2430
2439
|
],
|
|
2431
2440
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2432
|
-
],
|
|
2441
|
+
], nt = q("camera", Gn);
|
|
2433
2442
|
/**
|
|
2434
2443
|
* @license lucide-react v0.544.0 - ISC
|
|
2435
2444
|
*
|
|
2436
2445
|
* This source code is licensed under the ISC license.
|
|
2437
2446
|
* See the LICENSE file in the root directory of this source tree.
|
|
2438
2447
|
*/
|
|
2439
|
-
const Zn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Qn =
|
|
2448
|
+
const Zn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Qn = q("chevron-down", Zn);
|
|
2440
2449
|
/**
|
|
2441
2450
|
* @license lucide-react v0.544.0 - ISC
|
|
2442
2451
|
*
|
|
@@ -2447,7 +2456,7 @@ const es = [
|
|
|
2447
2456
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2448
2457
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2449
2458
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2450
|
-
], le =
|
|
2459
|
+
], le = q("circle-alert", es);
|
|
2451
2460
|
/**
|
|
2452
2461
|
* @license lucide-react v0.544.0 - ISC
|
|
2453
2462
|
*
|
|
@@ -2457,7 +2466,7 @@ const es = [
|
|
|
2457
2466
|
const ts = [
|
|
2458
2467
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2459
2468
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2460
|
-
], ce =
|
|
2469
|
+
], ce = q("circle-check-big", ts);
|
|
2461
2470
|
/**
|
|
2462
2471
|
* @license lucide-react v0.544.0 - ISC
|
|
2463
2472
|
*
|
|
@@ -2467,7 +2476,7 @@ const ts = [
|
|
|
2467
2476
|
const rs = [
|
|
2468
2477
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2469
2478
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2470
|
-
],
|
|
2479
|
+
], Xe = q("circle-check", rs);
|
|
2471
2480
|
/**
|
|
2472
2481
|
* @license lucide-react v0.544.0 - ISC
|
|
2473
2482
|
*
|
|
@@ -2478,7 +2487,7 @@ const ns = [
|
|
|
2478
2487
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2479
2488
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2480
2489
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2481
|
-
], ss =
|
|
2490
|
+
], ss = q("database", ns);
|
|
2482
2491
|
/**
|
|
2483
2492
|
* @license lucide-react v0.544.0 - ISC
|
|
2484
2493
|
*
|
|
@@ -2489,7 +2498,7 @@ const os = [
|
|
|
2489
2498
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2490
2499
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2491
2500
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2492
|
-
], as =
|
|
2501
|
+
], as = q("ellipsis-vertical", os);
|
|
2493
2502
|
/**
|
|
2494
2503
|
* @license lucide-react v0.544.0 - ISC
|
|
2495
2504
|
*
|
|
@@ -2513,7 +2522,7 @@ const is = [
|
|
|
2513
2522
|
}
|
|
2514
2523
|
],
|
|
2515
2524
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2516
|
-
],
|
|
2525
|
+
], it = q("eye-off", is);
|
|
2517
2526
|
/**
|
|
2518
2527
|
* @license lucide-react v0.544.0 - ISC
|
|
2519
2528
|
*
|
|
@@ -2529,7 +2538,7 @@ const ls = [
|
|
|
2529
2538
|
}
|
|
2530
2539
|
],
|
|
2531
2540
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2532
|
-
],
|
|
2541
|
+
], lt = q("eye", ls);
|
|
2533
2542
|
/**
|
|
2534
2543
|
* @license lucide-react v0.544.0 - ISC
|
|
2535
2544
|
*
|
|
@@ -2545,7 +2554,7 @@ const cs = [
|
|
|
2545
2554
|
key: "r6nss1"
|
|
2546
2555
|
}
|
|
2547
2556
|
]
|
|
2548
|
-
], ds =
|
|
2557
|
+
], ds = q("house", cs);
|
|
2549
2558
|
/**
|
|
2550
2559
|
* @license lucide-react v0.544.0 - ISC
|
|
2551
2560
|
*
|
|
@@ -2556,7 +2565,7 @@ const us = [
|
|
|
2556
2565
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2557
2566
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2558
2567
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2559
|
-
],
|
|
2568
|
+
], lr = q("image", us);
|
|
2560
2569
|
/**
|
|
2561
2570
|
* @license lucide-react v0.544.0 - ISC
|
|
2562
2571
|
*
|
|
@@ -2572,7 +2581,7 @@ const ps = [
|
|
|
2572
2581
|
}
|
|
2573
2582
|
],
|
|
2574
2583
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2575
|
-
],
|
|
2584
|
+
], cr = q("key-round", ps);
|
|
2576
2585
|
/**
|
|
2577
2586
|
* @license lucide-react v0.544.0 - ISC
|
|
2578
2587
|
*
|
|
@@ -2583,7 +2592,7 @@ const fs = [
|
|
|
2583
2592
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
2584
2593
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2585
2594
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2586
|
-
],
|
|
2595
|
+
], ct = q("key", fs);
|
|
2587
2596
|
/**
|
|
2588
2597
|
* @license lucide-react v0.544.0 - ISC
|
|
2589
2598
|
*
|
|
@@ -2594,14 +2603,14 @@ const xs = [
|
|
|
2594
2603
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2595
2604
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2596
2605
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2597
|
-
], hs =
|
|
2606
|
+
], hs = q("link-2", xs);
|
|
2598
2607
|
/**
|
|
2599
2608
|
* @license lucide-react v0.544.0 - ISC
|
|
2600
2609
|
*
|
|
2601
2610
|
* This source code is licensed under the ISC license.
|
|
2602
2611
|
* See the LICENSE file in the root directory of this source tree.
|
|
2603
2612
|
*/
|
|
2604
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2613
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], oe = q("loader-circle", gs);
|
|
2605
2614
|
/**
|
|
2606
2615
|
* @license lucide-react v0.544.0 - ISC
|
|
2607
2616
|
*
|
|
@@ -2617,7 +2626,7 @@ const ms = [
|
|
|
2617
2626
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2618
2627
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2619
2628
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2620
|
-
], ys =
|
|
2629
|
+
], ys = q("loader", ms);
|
|
2621
2630
|
/**
|
|
2622
2631
|
* @license lucide-react v0.544.0 - ISC
|
|
2623
2632
|
*
|
|
@@ -2627,7 +2636,7 @@ const ms = [
|
|
|
2627
2636
|
const bs = [
|
|
2628
2637
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2629
2638
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2630
|
-
], me =
|
|
2639
|
+
], me = q("lock", bs);
|
|
2631
2640
|
/**
|
|
2632
2641
|
* @license lucide-react v0.544.0 - ISC
|
|
2633
2642
|
*
|
|
@@ -2638,7 +2647,7 @@ const ws = [
|
|
|
2638
2647
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
2639
2648
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
2640
2649
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
2641
|
-
],
|
|
2650
|
+
], dt = q("log-out", ws);
|
|
2642
2651
|
/**
|
|
2643
2652
|
* @license lucide-react v0.544.0 - ISC
|
|
2644
2653
|
*
|
|
@@ -2648,7 +2657,7 @@ const ws = [
|
|
|
2648
2657
|
const js = [
|
|
2649
2658
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
2650
2659
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
2651
|
-
],
|
|
2660
|
+
], de = q("mail", js);
|
|
2652
2661
|
/**
|
|
2653
2662
|
* @license lucide-react v0.544.0 - ISC
|
|
2654
2663
|
*
|
|
@@ -2664,7 +2673,7 @@ const vs = [
|
|
|
2664
2673
|
}
|
|
2665
2674
|
],
|
|
2666
2675
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
2667
|
-
], Ss =
|
|
2676
|
+
], Ss = q("map-pin", vs);
|
|
2668
2677
|
/**
|
|
2669
2678
|
* @license lucide-react v0.544.0 - ISC
|
|
2670
2679
|
*
|
|
@@ -2680,7 +2689,7 @@ const ks = [
|
|
|
2680
2689
|
key: "1a8usu"
|
|
2681
2690
|
}
|
|
2682
2691
|
]
|
|
2683
|
-
], Es =
|
|
2692
|
+
], Es = q("pen-line", ks);
|
|
2684
2693
|
/**
|
|
2685
2694
|
* @license lucide-react v0.544.0 - ISC
|
|
2686
2695
|
*
|
|
@@ -2695,7 +2704,7 @@ const Cs = [
|
|
|
2695
2704
|
key: "9njp5v"
|
|
2696
2705
|
}
|
|
2697
2706
|
]
|
|
2698
|
-
], Ts =
|
|
2707
|
+
], Ts = q("phone", Cs);
|
|
2699
2708
|
/**
|
|
2700
2709
|
* @license lucide-react v0.544.0 - ISC
|
|
2701
2710
|
*
|
|
@@ -2712,7 +2721,7 @@ const Rs = [
|
|
|
2712
2721
|
],
|
|
2713
2722
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2714
2723
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2715
|
-
], Is =
|
|
2724
|
+
], Is = q("save", Rs);
|
|
2716
2725
|
/**
|
|
2717
2726
|
* @license lucide-react v0.544.0 - ISC
|
|
2718
2727
|
*
|
|
@@ -2728,7 +2737,7 @@ const Ps = [
|
|
|
2728
2737
|
}
|
|
2729
2738
|
],
|
|
2730
2739
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
2731
|
-
],
|
|
2740
|
+
], ut = q("send", Ps);
|
|
2732
2741
|
/**
|
|
2733
2742
|
* @license lucide-react v0.544.0 - ISC
|
|
2734
2743
|
*
|
|
@@ -2744,7 +2753,7 @@ const Os = [
|
|
|
2744
2753
|
}
|
|
2745
2754
|
],
|
|
2746
2755
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2747
|
-
], zs =
|
|
2756
|
+
], zs = q("settings", Os);
|
|
2748
2757
|
/**
|
|
2749
2758
|
* @license lucide-react v0.544.0 - ISC
|
|
2750
2759
|
*
|
|
@@ -2759,7 +2768,7 @@ const As = [
|
|
|
2759
2768
|
key: "oel41y"
|
|
2760
2769
|
}
|
|
2761
2770
|
]
|
|
2762
|
-
],
|
|
2771
|
+
], dr = q("shield", As);
|
|
2763
2772
|
/**
|
|
2764
2773
|
* @license lucide-react v0.544.0 - ISC
|
|
2765
2774
|
*
|
|
@@ -2772,7 +2781,7 @@ const _s = [
|
|
|
2772
2781
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
2773
2782
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
2774
2783
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
2775
|
-
], Ne =
|
|
2784
|
+
], Ne = q("trash-2", _s);
|
|
2776
2785
|
/**
|
|
2777
2786
|
* @license lucide-react v0.544.0 - ISC
|
|
2778
2787
|
*
|
|
@@ -2789,7 +2798,7 @@ const $s = [
|
|
|
2789
2798
|
],
|
|
2790
2799
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2791
2800
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2792
|
-
],
|
|
2801
|
+
], $t = q("triangle-alert", $s);
|
|
2793
2802
|
/**
|
|
2794
2803
|
* @license lucide-react v0.544.0 - ISC
|
|
2795
2804
|
*
|
|
@@ -2801,7 +2810,7 @@ const Ns = [
|
|
|
2801
2810
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
2802
2811
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
2803
2812
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
2804
|
-
], Us =
|
|
2813
|
+
], Us = q("user-x", Ns);
|
|
2805
2814
|
/**
|
|
2806
2815
|
* @license lucide-react v0.544.0 - ISC
|
|
2807
2816
|
*
|
|
@@ -2811,7 +2820,7 @@ const Ns = [
|
|
|
2811
2820
|
const Ds = [
|
|
2812
2821
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
2813
2822
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
2814
|
-
], be =
|
|
2823
|
+
], be = q("user", Ds);
|
|
2815
2824
|
/**
|
|
2816
2825
|
* @license lucide-react v0.544.0 - ISC
|
|
2817
2826
|
*
|
|
@@ -2821,7 +2830,7 @@ const Ds = [
|
|
|
2821
2830
|
const Ls = [
|
|
2822
2831
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
2823
2832
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2824
|
-
], Pe =
|
|
2833
|
+
], Pe = q("x", Ls), Ue = {
|
|
2825
2834
|
baseUrl: "",
|
|
2826
2835
|
apiKey: "",
|
|
2827
2836
|
appId: ""
|
|
@@ -2839,7 +2848,7 @@ const Ls = [
|
|
|
2839
2848
|
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2840
2849
|
darkMode: l = !0,
|
|
2841
2850
|
// Only avatar is optional
|
|
2842
|
-
showAvatar:
|
|
2851
|
+
showAvatar: h = !1,
|
|
2843
2852
|
roles: c = [],
|
|
2844
2853
|
// 🔥 FIXED
|
|
2845
2854
|
showRoleSelector: u = !1,
|
|
@@ -2853,41 +2862,41 @@ const Ls = [
|
|
|
2853
2862
|
email: "",
|
|
2854
2863
|
password: "",
|
|
2855
2864
|
role: c.length ? c[0] : "user",
|
|
2856
|
-
...
|
|
2857
|
-
}, [R,
|
|
2865
|
+
...h && { avatarUrl: "" }
|
|
2866
|
+
}, [R, A] = O(_), [C, M] = O(!1), [g, I] = O(!1), [v, U] = O(null), [B, F] = O({}), [V, Z] = O(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", z = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", P = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
2858
2867
|
Le.useEffect(() => {
|
|
2859
2868
|
if (typeof window < "u") {
|
|
2860
2869
|
const S = () => Z(window.innerWidth < 768);
|
|
2861
2870
|
return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
2862
2871
|
}
|
|
2863
2872
|
}, []);
|
|
2864
|
-
const
|
|
2865
|
-
const { name:
|
|
2866
|
-
|
|
2867
|
-
},
|
|
2873
|
+
const K = (S) => {
|
|
2874
|
+
const { name: x, value: k } = S.target;
|
|
2875
|
+
A(($) => ({ ...$, [x]: k })), B[x] && F(($) => ({ ...$, [x]: void 0 }));
|
|
2876
|
+
}, Q = () => {
|
|
2868
2877
|
const S = {};
|
|
2869
2878
|
return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
|
|
2870
|
-
},
|
|
2871
|
-
if (S.preventDefault(), !!
|
|
2879
|
+
}, X = async (S) => {
|
|
2880
|
+
if (S.preventDefault(), !!Q()) {
|
|
2872
2881
|
I(!0), U(null);
|
|
2873
2882
|
try {
|
|
2874
|
-
const
|
|
2883
|
+
const x = {
|
|
2875
2884
|
...R,
|
|
2876
2885
|
appId: m
|
|
2877
|
-
},
|
|
2878
|
-
U({ type: "success", text: "Account created successfully!" }), y && y(
|
|
2879
|
-
} catch (
|
|
2880
|
-
const
|
|
2881
|
-
U({ type: "error", text:
|
|
2886
|
+
}, k = await Hn(x, { baseUrl: d, apiKey: j });
|
|
2887
|
+
U({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
2888
|
+
} catch (x) {
|
|
2889
|
+
const k = x.message || "Signup failed. Please try again.";
|
|
2890
|
+
U({ type: "error", text: k }), w && w(x);
|
|
2882
2891
|
} finally {
|
|
2883
2892
|
I(!1);
|
|
2884
2893
|
}
|
|
2885
2894
|
}
|
|
2886
2895
|
}, f = {
|
|
2887
2896
|
width: "100%",
|
|
2888
|
-
padding:
|
|
2889
|
-
backgroundColor:
|
|
2890
|
-
border: `1px solid ${
|
|
2897
|
+
padding: V ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
2898
|
+
backgroundColor: z,
|
|
2899
|
+
border: `1px solid ${P}`,
|
|
2891
2900
|
borderRadius: "10px",
|
|
2892
2901
|
color: T,
|
|
2893
2902
|
fontSize: "15px",
|
|
@@ -2908,15 +2917,15 @@ const Ls = [
|
|
|
2908
2917
|
"div",
|
|
2909
2918
|
{
|
|
2910
2919
|
style: {
|
|
2911
|
-
minWidth:
|
|
2920
|
+
minWidth: V ? "320px" : "380px",
|
|
2912
2921
|
width: "100%",
|
|
2913
|
-
maxWidth:
|
|
2922
|
+
maxWidth: V ? "340px" : "390px",
|
|
2914
2923
|
display: "flex",
|
|
2915
2924
|
flexDirection: "column",
|
|
2916
2925
|
borderRadius: "10px",
|
|
2917
2926
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
2918
2927
|
backgroundColor: l ? "#000000" : "#ffffff",
|
|
2919
|
-
padding:
|
|
2928
|
+
padding: V ? "30px 24px" : "20px 28px"
|
|
2920
2929
|
},
|
|
2921
2930
|
children: [
|
|
2922
2931
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -2969,7 +2978,7 @@ const Ls = [
|
|
|
2969
2978
|
{
|
|
2970
2979
|
style: {
|
|
2971
2980
|
fontSize: "14px",
|
|
2972
|
-
color:
|
|
2981
|
+
color: J
|
|
2973
2982
|
},
|
|
2974
2983
|
children: s
|
|
2975
2984
|
}
|
|
@@ -2977,7 +2986,7 @@ const Ls = [
|
|
|
2977
2986
|
]
|
|
2978
2987
|
}
|
|
2979
2988
|
),
|
|
2980
|
-
|
|
2989
|
+
h && R.avatarUrl && /* @__PURE__ */ r.jsx(
|
|
2981
2990
|
"div",
|
|
2982
2991
|
{
|
|
2983
2992
|
style: {
|
|
@@ -2998,8 +3007,8 @@ const Ls = [
|
|
|
2998
3007
|
border: `2px solid ${i}30`
|
|
2999
3008
|
},
|
|
3000
3009
|
onError: (S) => {
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3010
|
+
const x = S.target;
|
|
3011
|
+
x.style.display = "none";
|
|
3003
3012
|
}
|
|
3004
3013
|
}
|
|
3005
3014
|
)
|
|
@@ -3008,7 +3017,7 @@ const Ls = [
|
|
|
3008
3017
|
/* @__PURE__ */ r.jsxs(
|
|
3009
3018
|
"form",
|
|
3010
3019
|
{
|
|
3011
|
-
onSubmit:
|
|
3020
|
+
onSubmit: X,
|
|
3012
3021
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3013
3022
|
children: [
|
|
3014
3023
|
u && c && c.length === 2 && /* @__PURE__ */ r.jsxs(
|
|
@@ -3034,8 +3043,8 @@ const Ls = [
|
|
|
3034
3043
|
position: "relative",
|
|
3035
3044
|
display: "flex",
|
|
3036
3045
|
borderRadius: "10px",
|
|
3037
|
-
border: `1px solid ${
|
|
3038
|
-
backgroundColor:
|
|
3046
|
+
border: `1px solid ${P}`,
|
|
3047
|
+
backgroundColor: z,
|
|
3039
3048
|
overflow: "hidden",
|
|
3040
3049
|
cursor: "pointer",
|
|
3041
3050
|
height: "42px"
|
|
@@ -3065,7 +3074,7 @@ const Ls = [
|
|
|
3065
3074
|
"button",
|
|
3066
3075
|
{
|
|
3067
3076
|
type: "button",
|
|
3068
|
-
onClick: () =>
|
|
3077
|
+
onClick: () => A((S) => ({ ...S, role: c[0] })),
|
|
3069
3078
|
style: {
|
|
3070
3079
|
flex: 1,
|
|
3071
3080
|
zIndex: 10,
|
|
@@ -3087,7 +3096,7 @@ const Ls = [
|
|
|
3087
3096
|
"button",
|
|
3088
3097
|
{
|
|
3089
3098
|
type: "button",
|
|
3090
|
-
onClick: () =>
|
|
3099
|
+
onClick: () => A((S) => ({ ...S, role: c[1] })),
|
|
3091
3100
|
style: {
|
|
3092
3101
|
flex: 1,
|
|
3093
3102
|
zIndex: 10,
|
|
@@ -3133,7 +3142,7 @@ const Ls = [
|
|
|
3133
3142
|
left: "14px",
|
|
3134
3143
|
top: "50%",
|
|
3135
3144
|
transform: "translateY(-50%)",
|
|
3136
|
-
color:
|
|
3145
|
+
color: J
|
|
3137
3146
|
}
|
|
3138
3147
|
}
|
|
3139
3148
|
),
|
|
@@ -3145,15 +3154,15 @@ const Ls = [
|
|
|
3145
3154
|
name: "name",
|
|
3146
3155
|
placeholder: "Enter your full name",
|
|
3147
3156
|
value: R.name,
|
|
3148
|
-
onChange:
|
|
3157
|
+
onChange: K,
|
|
3149
3158
|
style: {
|
|
3150
3159
|
...f,
|
|
3151
|
-
borderColor:
|
|
3160
|
+
borderColor: B.name ? "#ef4444" : P
|
|
3152
3161
|
}
|
|
3153
3162
|
}
|
|
3154
3163
|
)
|
|
3155
3164
|
] }),
|
|
3156
|
-
|
|
3165
|
+
B.name && /* @__PURE__ */ r.jsx(
|
|
3157
3166
|
"span",
|
|
3158
3167
|
{
|
|
3159
3168
|
style: {
|
|
@@ -3161,7 +3170,7 @@ const Ls = [
|
|
|
3161
3170
|
fontSize: "12px",
|
|
3162
3171
|
marginTop: "2px"
|
|
3163
3172
|
},
|
|
3164
|
-
children:
|
|
3173
|
+
children: B.name
|
|
3165
3174
|
}
|
|
3166
3175
|
)
|
|
3167
3176
|
] }),
|
|
@@ -3180,7 +3189,7 @@ const Ls = [
|
|
|
3180
3189
|
),
|
|
3181
3190
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
3182
3191
|
/* @__PURE__ */ r.jsx(
|
|
3183
|
-
|
|
3192
|
+
de,
|
|
3184
3193
|
{
|
|
3185
3194
|
size: 20,
|
|
3186
3195
|
style: {
|
|
@@ -3188,7 +3197,7 @@ const Ls = [
|
|
|
3188
3197
|
left: "14px",
|
|
3189
3198
|
top: "50%",
|
|
3190
3199
|
transform: "translateY(-50%)",
|
|
3191
|
-
color:
|
|
3200
|
+
color: J
|
|
3192
3201
|
}
|
|
3193
3202
|
}
|
|
3194
3203
|
),
|
|
@@ -3200,15 +3209,15 @@ const Ls = [
|
|
|
3200
3209
|
name: "email",
|
|
3201
3210
|
placeholder: "Enter your email address",
|
|
3202
3211
|
value: R.email,
|
|
3203
|
-
onChange:
|
|
3212
|
+
onChange: K,
|
|
3204
3213
|
style: {
|
|
3205
3214
|
...f,
|
|
3206
|
-
borderColor:
|
|
3215
|
+
borderColor: B.email ? "#ef4444" : P
|
|
3207
3216
|
}
|
|
3208
3217
|
}
|
|
3209
3218
|
)
|
|
3210
3219
|
] }),
|
|
3211
|
-
|
|
3220
|
+
B.email && /* @__PURE__ */ r.jsx(
|
|
3212
3221
|
"span",
|
|
3213
3222
|
{
|
|
3214
3223
|
style: {
|
|
@@ -3216,7 +3225,7 @@ const Ls = [
|
|
|
3216
3225
|
fontSize: "12px",
|
|
3217
3226
|
marginTop: "2px"
|
|
3218
3227
|
},
|
|
3219
|
-
children:
|
|
3228
|
+
children: B.email
|
|
3220
3229
|
}
|
|
3221
3230
|
)
|
|
3222
3231
|
] }),
|
|
@@ -3243,7 +3252,7 @@ const Ls = [
|
|
|
3243
3252
|
left: "14px",
|
|
3244
3253
|
top: "50%",
|
|
3245
3254
|
transform: "translateY(-50%)",
|
|
3246
|
-
color:
|
|
3255
|
+
color: J
|
|
3247
3256
|
}
|
|
3248
3257
|
}
|
|
3249
3258
|
),
|
|
@@ -3255,10 +3264,10 @@ const Ls = [
|
|
|
3255
3264
|
name: "password",
|
|
3256
3265
|
placeholder: "Create a secure password",
|
|
3257
3266
|
value: R.password,
|
|
3258
|
-
onChange:
|
|
3267
|
+
onChange: K,
|
|
3259
3268
|
style: {
|
|
3260
3269
|
...f,
|
|
3261
|
-
borderColor:
|
|
3270
|
+
borderColor: B.password ? "#ef4444" : P
|
|
3262
3271
|
}
|
|
3263
3272
|
}
|
|
3264
3273
|
),
|
|
@@ -3274,15 +3283,15 @@ const Ls = [
|
|
|
3274
3283
|
transform: "translateY(-50%)",
|
|
3275
3284
|
background: "transparent",
|
|
3276
3285
|
border: "none",
|
|
3277
|
-
color:
|
|
3286
|
+
color: J,
|
|
3278
3287
|
cursor: "pointer",
|
|
3279
3288
|
padding: "4px"
|
|
3280
3289
|
},
|
|
3281
|
-
children: C ? /* @__PURE__ */ r.jsx(
|
|
3290
|
+
children: C ? /* @__PURE__ */ r.jsx(it, { size: 20 }) : /* @__PURE__ */ r.jsx(lt, { size: 20 })
|
|
3282
3291
|
}
|
|
3283
3292
|
)
|
|
3284
3293
|
] }),
|
|
3285
|
-
|
|
3294
|
+
B.password && /* @__PURE__ */ r.jsx(
|
|
3286
3295
|
"span",
|
|
3287
3296
|
{
|
|
3288
3297
|
style: {
|
|
@@ -3290,11 +3299,11 @@ const Ls = [
|
|
|
3290
3299
|
fontSize: "12px",
|
|
3291
3300
|
marginTop: "2px"
|
|
3292
3301
|
},
|
|
3293
|
-
children:
|
|
3302
|
+
children: B.password
|
|
3294
3303
|
}
|
|
3295
3304
|
)
|
|
3296
3305
|
] }),
|
|
3297
|
-
|
|
3306
|
+
h && /* @__PURE__ */ r.jsxs(
|
|
3298
3307
|
"div",
|
|
3299
3308
|
{
|
|
3300
3309
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3313,7 +3322,7 @@ const Ls = [
|
|
|
3313
3322
|
),
|
|
3314
3323
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
3315
3324
|
/* @__PURE__ */ r.jsx(
|
|
3316
|
-
|
|
3325
|
+
lr,
|
|
3317
3326
|
{
|
|
3318
3327
|
size: 20,
|
|
3319
3328
|
style: {
|
|
@@ -3321,7 +3330,7 @@ const Ls = [
|
|
|
3321
3330
|
left: "14px",
|
|
3322
3331
|
top: "50%",
|
|
3323
3332
|
transform: "translateY(-50%)",
|
|
3324
|
-
color:
|
|
3333
|
+
color: J
|
|
3325
3334
|
}
|
|
3326
3335
|
}
|
|
3327
3336
|
),
|
|
@@ -3333,7 +3342,7 @@ const Ls = [
|
|
|
3333
3342
|
name: "avatarUrl",
|
|
3334
3343
|
placeholder: "Paste your avatar image URL",
|
|
3335
3344
|
value: R.avatarUrl || "",
|
|
3336
|
-
onChange:
|
|
3345
|
+
onChange: K,
|
|
3337
3346
|
style: f
|
|
3338
3347
|
}
|
|
3339
3348
|
)
|
|
@@ -3424,7 +3433,7 @@ const Ls = [
|
|
|
3424
3433
|
style: {
|
|
3425
3434
|
textAlign: "center",
|
|
3426
3435
|
fontSize: "12px",
|
|
3427
|
-
color:
|
|
3436
|
+
color: J,
|
|
3428
3437
|
marginTop: "16px",
|
|
3429
3438
|
padding: "0 4px"
|
|
3430
3439
|
},
|
|
@@ -3464,10 +3473,10 @@ const Ls = [
|
|
|
3464
3473
|
);
|
|
3465
3474
|
return l.data?.user && localStorage.setItem("userInfo", JSON.stringify(l.data.user)), l.data.user;
|
|
3466
3475
|
} catch (l) {
|
|
3467
|
-
const
|
|
3468
|
-
throw console.error("Login API Error:",
|
|
3476
|
+
const h = l.response?.data?.message || l.message || "Login failed";
|
|
3477
|
+
throw console.error("Login API Error:", h), {
|
|
3469
3478
|
success: !1,
|
|
3470
|
-
message:
|
|
3479
|
+
message: h,
|
|
3471
3480
|
status: l.response?.status || 500
|
|
3472
3481
|
};
|
|
3473
3482
|
}
|
|
@@ -3480,85 +3489,85 @@ const Ls = [
|
|
|
3480
3489
|
primaryColor: i = "#00C214",
|
|
3481
3490
|
gradient: a = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3482
3491
|
darkMode: l = !0,
|
|
3483
|
-
signupUrl:
|
|
3492
|
+
signupUrl: h,
|
|
3484
3493
|
onSuccess: c,
|
|
3485
3494
|
onError: u
|
|
3486
3495
|
}) => {
|
|
3487
|
-
const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = O("login"), [m, _] = O(1), [R,
|
|
3496
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [d, j] = O("login"), [m, _] = O(1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(null), [v, U] = O(""), [B, F] = O(""), [V, Z] = O({
|
|
3488
3497
|
email: "",
|
|
3489
3498
|
otp: "",
|
|
3490
3499
|
newPassword: "",
|
|
3491
3500
|
appId: w
|
|
3492
|
-
}), [T,
|
|
3501
|
+
}), [T, J] = O(!1), z = l ? "#ffffff" : "#111827", P = l ? "#a1a1aa" : "#6b7280", K = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Q = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3493
3502
|
Le.useEffect(() => {
|
|
3494
3503
|
if (typeof window < "u") {
|
|
3495
|
-
const
|
|
3496
|
-
return
|
|
3504
|
+
const $ = () => J(window.innerWidth < 768);
|
|
3505
|
+
return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
|
|
3497
3506
|
}
|
|
3498
3507
|
}, []);
|
|
3499
|
-
const
|
|
3500
|
-
|
|
3508
|
+
const X = async ($) => {
|
|
3509
|
+
$.preventDefault(), M(!0), I(null);
|
|
3501
3510
|
try {
|
|
3502
|
-
const
|
|
3503
|
-
{ email: v, password:
|
|
3511
|
+
const N = await Fs(
|
|
3512
|
+
{ email: v, password: B, appId: w },
|
|
3504
3513
|
{ baseUrl: b, apiKey: y }
|
|
3505
3514
|
);
|
|
3506
|
-
I({ type: "success", text: `Welcome ${
|
|
3507
|
-
} catch (
|
|
3508
|
-
const
|
|
3509
|
-
I({ type: "error", text:
|
|
3515
|
+
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3516
|
+
} catch (N) {
|
|
3517
|
+
const Y = N.message || "Login failed";
|
|
3518
|
+
I({ type: "error", text: Y }), u?.(N);
|
|
3510
3519
|
} finally {
|
|
3511
3520
|
M(!1);
|
|
3512
3521
|
}
|
|
3513
|
-
}, f = (
|
|
3514
|
-
Z({ ...
|
|
3515
|
-
}, S = async (
|
|
3516
|
-
|
|
3522
|
+
}, f = ($) => {
|
|
3523
|
+
Z({ ...V, [$.target.name]: $.target.value });
|
|
3524
|
+
}, S = async ($) => {
|
|
3525
|
+
$.preventDefault(), M(!0), I(null);
|
|
3517
3526
|
try {
|
|
3518
|
-
const
|
|
3527
|
+
const N = await W.post(
|
|
3519
3528
|
`${b}/users/forgot-password`,
|
|
3520
3529
|
{
|
|
3521
|
-
email:
|
|
3530
|
+
email: V.email,
|
|
3522
3531
|
appId: w
|
|
3523
3532
|
},
|
|
3524
3533
|
{ headers: { "x-api-key": y } }
|
|
3525
3534
|
);
|
|
3526
|
-
|
|
3535
|
+
N.data.success ? (_(2), I({ type: "success", text: "OTP sent to your email" })) : I({
|
|
3527
3536
|
type: "error",
|
|
3528
|
-
text:
|
|
3537
|
+
text: N.data.message || "Failed to send OTP"
|
|
3529
3538
|
});
|
|
3530
|
-
} catch (
|
|
3539
|
+
} catch (N) {
|
|
3531
3540
|
I({
|
|
3532
3541
|
type: "error",
|
|
3533
|
-
text:
|
|
3542
|
+
text: N.response?.data?.message || "Something went wrong"
|
|
3534
3543
|
});
|
|
3535
3544
|
} finally {
|
|
3536
3545
|
M(!1);
|
|
3537
3546
|
}
|
|
3538
|
-
},
|
|
3539
|
-
|
|
3547
|
+
}, x = async ($) => {
|
|
3548
|
+
$.preventDefault(), M(!0), I(null);
|
|
3540
3549
|
try {
|
|
3541
|
-
const
|
|
3550
|
+
const N = await W.post(
|
|
3542
3551
|
`${b}/users/reset-password`,
|
|
3543
|
-
|
|
3552
|
+
V,
|
|
3544
3553
|
{ headers: { "x-api-key": y } }
|
|
3545
3554
|
);
|
|
3546
|
-
|
|
3547
|
-
} catch (
|
|
3555
|
+
N.data.success ? (I({ type: "success", text: "Password reset successfully!" }), _(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : I({ type: "error", text: N.data.message || "Reset failed" });
|
|
3556
|
+
} catch (N) {
|
|
3548
3557
|
I({
|
|
3549
3558
|
type: "error",
|
|
3550
|
-
text:
|
|
3559
|
+
text: N.response?.data?.message || "Something went wrong"
|
|
3551
3560
|
});
|
|
3552
3561
|
} finally {
|
|
3553
3562
|
M(!1);
|
|
3554
3563
|
}
|
|
3555
|
-
},
|
|
3564
|
+
}, k = {
|
|
3556
3565
|
width: "100%",
|
|
3557
3566
|
padding: T ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3558
|
-
backgroundColor:
|
|
3559
|
-
border: `1px solid ${
|
|
3567
|
+
backgroundColor: K,
|
|
3568
|
+
border: `1px solid ${Q}`,
|
|
3560
3569
|
borderRadius: "10px",
|
|
3561
|
-
color:
|
|
3570
|
+
color: z,
|
|
3562
3571
|
fontSize: "15px",
|
|
3563
3572
|
outline: "none",
|
|
3564
3573
|
transition: "all 0.2s ease"
|
|
@@ -3625,7 +3634,7 @@ const Ls = [
|
|
|
3625
3634
|
style: {
|
|
3626
3635
|
fontSize: "24px",
|
|
3627
3636
|
fontWeight: 700,
|
|
3628
|
-
color:
|
|
3637
|
+
color: z,
|
|
3629
3638
|
margin: 0
|
|
3630
3639
|
},
|
|
3631
3640
|
children: d === "login" ? n : m === 1 ? "Forgot Password" : "Reset Password"
|
|
@@ -3636,7 +3645,7 @@ const Ls = [
|
|
|
3636
3645
|
{
|
|
3637
3646
|
style: {
|
|
3638
3647
|
fontSize: "14px",
|
|
3639
|
-
color:
|
|
3648
|
+
color: P
|
|
3640
3649
|
},
|
|
3641
3650
|
children: d === "login" ? s : "Follow the steps to reset your password"
|
|
3642
3651
|
}
|
|
@@ -3647,7 +3656,7 @@ const Ls = [
|
|
|
3647
3656
|
d === "login" && /* @__PURE__ */ r.jsxs(
|
|
3648
3657
|
"form",
|
|
3649
3658
|
{
|
|
3650
|
-
onSubmit:
|
|
3659
|
+
onSubmit: X,
|
|
3651
3660
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3652
3661
|
children: [
|
|
3653
3662
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -3669,7 +3678,7 @@ const Ls = [
|
|
|
3669
3678
|
),
|
|
3670
3679
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
3671
3680
|
/* @__PURE__ */ r.jsx(
|
|
3672
|
-
|
|
3681
|
+
de,
|
|
3673
3682
|
{
|
|
3674
3683
|
size: 20,
|
|
3675
3684
|
style: {
|
|
@@ -3677,7 +3686,7 @@ const Ls = [
|
|
|
3677
3686
|
left: "14px",
|
|
3678
3687
|
top: "50%",
|
|
3679
3688
|
transform: "translateY(-50%)",
|
|
3680
|
-
color:
|
|
3689
|
+
color: P
|
|
3681
3690
|
}
|
|
3682
3691
|
}
|
|
3683
3692
|
),
|
|
@@ -3688,8 +3697,8 @@ const Ls = [
|
|
|
3688
3697
|
type: "email",
|
|
3689
3698
|
placeholder: "Enter your email",
|
|
3690
3699
|
value: v,
|
|
3691
|
-
onChange: (
|
|
3692
|
-
style:
|
|
3700
|
+
onChange: ($) => U($.target.value),
|
|
3701
|
+
style: k
|
|
3693
3702
|
}
|
|
3694
3703
|
)
|
|
3695
3704
|
] })
|
|
@@ -3723,7 +3732,7 @@ const Ls = [
|
|
|
3723
3732
|
left: "14px",
|
|
3724
3733
|
top: "50%",
|
|
3725
3734
|
transform: "translateY(-50%)",
|
|
3726
|
-
color:
|
|
3735
|
+
color: P
|
|
3727
3736
|
}
|
|
3728
3737
|
}
|
|
3729
3738
|
),
|
|
@@ -3733,16 +3742,16 @@ const Ls = [
|
|
|
3733
3742
|
id: "login-password",
|
|
3734
3743
|
type: R ? "text" : "password",
|
|
3735
3744
|
placeholder: "Enter your password",
|
|
3736
|
-
value:
|
|
3737
|
-
onChange: (
|
|
3738
|
-
style:
|
|
3745
|
+
value: B,
|
|
3746
|
+
onChange: ($) => F($.target.value),
|
|
3747
|
+
style: k
|
|
3739
3748
|
}
|
|
3740
3749
|
),
|
|
3741
3750
|
/* @__PURE__ */ r.jsx(
|
|
3742
3751
|
"button",
|
|
3743
3752
|
{
|
|
3744
3753
|
type: "button",
|
|
3745
|
-
onClick: () =>
|
|
3754
|
+
onClick: () => A(!R),
|
|
3746
3755
|
style: {
|
|
3747
3756
|
position: "absolute",
|
|
3748
3757
|
right: "14px",
|
|
@@ -3751,10 +3760,10 @@ const Ls = [
|
|
|
3751
3760
|
transform: "translateY(-50%)",
|
|
3752
3761
|
background: "transparent",
|
|
3753
3762
|
border: "none",
|
|
3754
|
-
color:
|
|
3763
|
+
color: P,
|
|
3755
3764
|
cursor: "pointer"
|
|
3756
3765
|
},
|
|
3757
|
-
children: R ? /* @__PURE__ */ r.jsx(
|
|
3766
|
+
children: R ? /* @__PURE__ */ r.jsx(it, { size: 20 }) : /* @__PURE__ */ r.jsx(lt, { size: 20 })
|
|
3758
3767
|
}
|
|
3759
3768
|
)
|
|
3760
3769
|
] })
|
|
@@ -3770,10 +3779,10 @@ const Ls = [
|
|
|
3770
3779
|
fontSize: "13px"
|
|
3771
3780
|
},
|
|
3772
3781
|
children: [
|
|
3773
|
-
|
|
3782
|
+
h && /* @__PURE__ */ r.jsx(
|
|
3774
3783
|
"a",
|
|
3775
3784
|
{
|
|
3776
|
-
href:
|
|
3785
|
+
href: h,
|
|
3777
3786
|
style: {
|
|
3778
3787
|
color: i,
|
|
3779
3788
|
textDecoration: "none",
|
|
@@ -3823,7 +3832,7 @@ const Ls = [
|
|
|
3823
3832
|
d === "forgot" && /* @__PURE__ */ r.jsxs(
|
|
3824
3833
|
"form",
|
|
3825
3834
|
{
|
|
3826
|
-
onSubmit: m === 1 ? S :
|
|
3835
|
+
onSubmit: m === 1 ? S : x,
|
|
3827
3836
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3828
3837
|
children: [
|
|
3829
3838
|
m === 1 ? /* @__PURE__ */ r.jsxs(
|
|
@@ -3845,7 +3854,7 @@ const Ls = [
|
|
|
3845
3854
|
),
|
|
3846
3855
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
3847
3856
|
/* @__PURE__ */ r.jsx(
|
|
3848
|
-
|
|
3857
|
+
de,
|
|
3849
3858
|
{
|
|
3850
3859
|
size: 20,
|
|
3851
3860
|
style: {
|
|
@@ -3853,7 +3862,7 @@ const Ls = [
|
|
|
3853
3862
|
left: "14px",
|
|
3854
3863
|
top: "50%",
|
|
3855
3864
|
transform: "translateY(-50%)",
|
|
3856
|
-
color:
|
|
3865
|
+
color: P
|
|
3857
3866
|
}
|
|
3858
3867
|
}
|
|
3859
3868
|
),
|
|
@@ -3864,9 +3873,9 @@ const Ls = [
|
|
|
3864
3873
|
type: "email",
|
|
3865
3874
|
name: "email",
|
|
3866
3875
|
placeholder: "Enter your email",
|
|
3867
|
-
value:
|
|
3876
|
+
value: V.email,
|
|
3868
3877
|
onChange: f,
|
|
3869
|
-
style:
|
|
3878
|
+
style: k
|
|
3870
3879
|
}
|
|
3871
3880
|
)
|
|
3872
3881
|
] })
|
|
@@ -3896,7 +3905,7 @@ const Ls = [
|
|
|
3896
3905
|
),
|
|
3897
3906
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
3898
3907
|
/* @__PURE__ */ r.jsx(
|
|
3899
|
-
|
|
3908
|
+
cr,
|
|
3900
3909
|
{
|
|
3901
3910
|
size: 20,
|
|
3902
3911
|
style: {
|
|
@@ -3904,7 +3913,7 @@ const Ls = [
|
|
|
3904
3913
|
left: "14px",
|
|
3905
3914
|
top: "50%",
|
|
3906
3915
|
transform: "translateY(-50%)",
|
|
3907
|
-
color:
|
|
3916
|
+
color: P
|
|
3908
3917
|
}
|
|
3909
3918
|
}
|
|
3910
3919
|
),
|
|
@@ -3915,9 +3924,9 @@ const Ls = [
|
|
|
3915
3924
|
type: "text",
|
|
3916
3925
|
name: "otp",
|
|
3917
3926
|
placeholder: "Enter OTP",
|
|
3918
|
-
value:
|
|
3927
|
+
value: V.otp,
|
|
3919
3928
|
onChange: f,
|
|
3920
|
-
style:
|
|
3929
|
+
style: k
|
|
3921
3930
|
}
|
|
3922
3931
|
)
|
|
3923
3932
|
] })
|
|
@@ -3955,7 +3964,7 @@ const Ls = [
|
|
|
3955
3964
|
left: "14px",
|
|
3956
3965
|
top: "50%",
|
|
3957
3966
|
transform: "translateY(-50%)",
|
|
3958
|
-
color:
|
|
3967
|
+
color: P
|
|
3959
3968
|
}
|
|
3960
3969
|
}
|
|
3961
3970
|
),
|
|
@@ -3966,9 +3975,9 @@ const Ls = [
|
|
|
3966
3975
|
type: "password",
|
|
3967
3976
|
name: "newPassword",
|
|
3968
3977
|
placeholder: "Enter new password",
|
|
3969
|
-
value:
|
|
3978
|
+
value: V.newPassword,
|
|
3970
3979
|
onChange: f,
|
|
3971
|
-
style:
|
|
3980
|
+
style: k
|
|
3972
3981
|
}
|
|
3973
3982
|
)
|
|
3974
3983
|
] })
|
|
@@ -4004,7 +4013,7 @@ const Ls = [
|
|
|
4004
4013
|
background: "none",
|
|
4005
4014
|
border: "none",
|
|
4006
4015
|
fontSize: "14px",
|
|
4007
|
-
color:
|
|
4016
|
+
color: P,
|
|
4008
4017
|
marginTop: "6px",
|
|
4009
4018
|
cursor: "pointer"
|
|
4010
4019
|
},
|
|
@@ -4041,7 +4050,7 @@ const Ls = [
|
|
|
4041
4050
|
style: {
|
|
4042
4051
|
textAlign: "center",
|
|
4043
4052
|
fontSize: "12px",
|
|
4044
|
-
color:
|
|
4053
|
+
color: P,
|
|
4045
4054
|
marginTop: "16px",
|
|
4046
4055
|
padding: "0 4px"
|
|
4047
4056
|
},
|
|
@@ -4060,32 +4069,34 @@ const Ls = [
|
|
|
4060
4069
|
}, ho = ({
|
|
4061
4070
|
children: e,
|
|
4062
4071
|
fallback: t = null,
|
|
4063
|
-
|
|
4064
|
-
|
|
4072
|
+
className: n,
|
|
4073
|
+
width: s,
|
|
4074
|
+
height: o
|
|
4065
4075
|
}) => {
|
|
4066
|
-
const [
|
|
4067
|
-
return
|
|
4068
|
-
const
|
|
4076
|
+
const [i, a] = O(!1);
|
|
4077
|
+
return te(() => {
|
|
4078
|
+
const l = () => {
|
|
4069
4079
|
if (typeof window > "u") return !1;
|
|
4070
4080
|
try {
|
|
4071
|
-
const
|
|
4072
|
-
return !!(
|
|
4081
|
+
const c = localStorage.getItem("userInfo");
|
|
4082
|
+
return !!(c && c !== "undefined" && c !== "null");
|
|
4073
4083
|
} catch {
|
|
4074
4084
|
return !1;
|
|
4075
4085
|
}
|
|
4076
|
-
},
|
|
4077
|
-
return
|
|
4078
|
-
typeof window < "u" && window.removeEventListener("storage",
|
|
4086
|
+
}, h = () => a(l());
|
|
4087
|
+
return h(), typeof window < "u" && window.addEventListener("storage", h), () => {
|
|
4088
|
+
typeof window < "u" && window.removeEventListener("storage", h);
|
|
4079
4089
|
};
|
|
4080
|
-
}, []),
|
|
4090
|
+
}, []), i ? /* @__PURE__ */ r.jsx(
|
|
4081
4091
|
"span",
|
|
4082
4092
|
{
|
|
4093
|
+
className: n,
|
|
4083
4094
|
style: {
|
|
4084
4095
|
display: "inline-flex",
|
|
4085
4096
|
alignItems: "center",
|
|
4086
4097
|
verticalAlign: "middle",
|
|
4087
|
-
width:
|
|
4088
|
-
height:
|
|
4098
|
+
width: s,
|
|
4099
|
+
height: o
|
|
4089
4100
|
},
|
|
4090
4101
|
children: e
|
|
4091
4102
|
}
|
|
@@ -4093,29 +4104,31 @@ const Ls = [
|
|
|
4093
4104
|
}, go = ({
|
|
4094
4105
|
children: e,
|
|
4095
4106
|
fallback: t = null,
|
|
4096
|
-
|
|
4097
|
-
|
|
4107
|
+
className: n,
|
|
4108
|
+
width: s,
|
|
4109
|
+
height: o
|
|
4098
4110
|
}) => {
|
|
4099
|
-
const [
|
|
4100
|
-
return
|
|
4101
|
-
const
|
|
4111
|
+
const [i, a] = O(!0);
|
|
4112
|
+
return te(() => {
|
|
4113
|
+
const l = () => {
|
|
4102
4114
|
try {
|
|
4103
|
-
const
|
|
4104
|
-
return !!(
|
|
4115
|
+
const c = localStorage.getItem("userInfo");
|
|
4116
|
+
return !!(c && c !== "undefined" && c !== "null");
|
|
4105
4117
|
} catch {
|
|
4106
4118
|
return !1;
|
|
4107
4119
|
}
|
|
4108
|
-
},
|
|
4109
|
-
return
|
|
4110
|
-
}, []),
|
|
4120
|
+
}, h = () => a(!l());
|
|
4121
|
+
return h(), window.addEventListener("storage", h), () => window.removeEventListener("storage", h);
|
|
4122
|
+
}, []), i ? /* @__PURE__ */ r.jsx(
|
|
4111
4123
|
"span",
|
|
4112
4124
|
{
|
|
4125
|
+
className: n,
|
|
4113
4126
|
style: {
|
|
4114
4127
|
display: "inline-flex",
|
|
4115
4128
|
alignItems: "center",
|
|
4116
4129
|
verticalAlign: "middle",
|
|
4117
|
-
width:
|
|
4118
|
-
height:
|
|
4130
|
+
width: s,
|
|
4131
|
+
height: o
|
|
4119
4132
|
},
|
|
4120
4133
|
children: e
|
|
4121
4134
|
}
|
|
@@ -4129,8 +4142,8 @@ const Ls = [
|
|
|
4129
4142
|
token: i,
|
|
4130
4143
|
colors: a
|
|
4131
4144
|
}) => {
|
|
4132
|
-
const { baseUrl: l, apiKey:
|
|
4133
|
-
if (
|
|
4145
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = O(!1), [y, w] = O(""), [d, j] = O("warning"), [m, _] = O(!1);
|
|
4146
|
+
if (te(() => {
|
|
4134
4147
|
if (typeof window > "u") return;
|
|
4135
4148
|
const g = () => {
|
|
4136
4149
|
_(window.innerWidth < 640);
|
|
@@ -4143,7 +4156,7 @@ const Ls = [
|
|
|
4143
4156
|
const { data: g } = await W.delete(`${l}/users/delete/${o}`, {
|
|
4144
4157
|
data: { appId: c },
|
|
4145
4158
|
headers: {
|
|
4146
|
-
"x-api-key":
|
|
4159
|
+
"x-api-key": h
|
|
4147
4160
|
}
|
|
4148
4161
|
});
|
|
4149
4162
|
g.success ? (n(g.message || "Account deleted successfully"), j("success"), setTimeout(() => {
|
|
@@ -4154,7 +4167,7 @@ const Ls = [
|
|
|
4154
4167
|
} finally {
|
|
4155
4168
|
b(!1);
|
|
4156
4169
|
}
|
|
4157
|
-
},
|
|
4170
|
+
}, A = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4158
4171
|
g.target === g.currentTarget && d !== "processing" && d !== "success" && t();
|
|
4159
4172
|
}, M = () => {
|
|
4160
4173
|
switch (d) {
|
|
@@ -4268,7 +4281,7 @@ const Ls = [
|
|
|
4268
4281
|
display: "flex",
|
|
4269
4282
|
alignItems: "flex-start"
|
|
4270
4283
|
},
|
|
4271
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4284
|
+
children: /* @__PURE__ */ r.jsx($t, { size: 24 })
|
|
4272
4285
|
}
|
|
4273
4286
|
),
|
|
4274
4287
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4302,7 +4315,7 @@ const Ls = [
|
|
|
4302
4315
|
text: "This action cannot be reversed"
|
|
4303
4316
|
},
|
|
4304
4317
|
{
|
|
4305
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
4318
|
+
icon: /* @__PURE__ */ r.jsx(dt, { size: 16 }),
|
|
4306
4319
|
text: "You will lose access to all services"
|
|
4307
4320
|
}
|
|
4308
4321
|
].map((g, I) => /* @__PURE__ */ r.jsxs(
|
|
@@ -4429,7 +4442,7 @@ const Ls = [
|
|
|
4429
4442
|
color: "white",
|
|
4430
4443
|
flexShrink: 0
|
|
4431
4444
|
},
|
|
4432
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4445
|
+
children: /* @__PURE__ */ r.jsx($t, { size: 24 })
|
|
4433
4446
|
}
|
|
4434
4447
|
),
|
|
4435
4448
|
/* @__PURE__ */ r.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ r.jsx(
|
|
@@ -4478,7 +4491,7 @@ const Ls = [
|
|
|
4478
4491
|
width: "100%",
|
|
4479
4492
|
padding: "14px 16px",
|
|
4480
4493
|
borderRadius: "10px",
|
|
4481
|
-
border: `2px solid ${
|
|
4494
|
+
border: `2px solid ${A ? a.success : a.error}`,
|
|
4482
4495
|
backgroundColor: "transparent",
|
|
4483
4496
|
color: a.textPrimary,
|
|
4484
4497
|
fontSize: "15px",
|
|
@@ -4495,7 +4508,7 @@ const Ls = [
|
|
|
4495
4508
|
autoFocus: !0
|
|
4496
4509
|
}
|
|
4497
4510
|
),
|
|
4498
|
-
|
|
4511
|
+
A && /* @__PURE__ */ r.jsxs(
|
|
4499
4512
|
"div",
|
|
4500
4513
|
{
|
|
4501
4514
|
style: {
|
|
@@ -4508,7 +4521,7 @@ const Ls = [
|
|
|
4508
4521
|
fontWeight: 500
|
|
4509
4522
|
},
|
|
4510
4523
|
children: [
|
|
4511
|
-
/* @__PURE__ */ r.jsx(
|
|
4524
|
+
/* @__PURE__ */ r.jsx(Xe, { size: 16 }),
|
|
4512
4525
|
/* @__PURE__ */ r.jsx("span", { children: "Confirmation accepted" })
|
|
4513
4526
|
]
|
|
4514
4527
|
}
|
|
@@ -4557,7 +4570,7 @@ const Ls = [
|
|
|
4557
4570
|
"button",
|
|
4558
4571
|
{
|
|
4559
4572
|
onClick: R,
|
|
4560
|
-
disabled:
|
|
4573
|
+
disabled: !A || u,
|
|
4561
4574
|
style: {
|
|
4562
4575
|
padding: "10px 24px",
|
|
4563
4576
|
borderRadius: "10px",
|
|
@@ -4566,22 +4579,22 @@ const Ls = [
|
|
|
4566
4579
|
color: "white",
|
|
4567
4580
|
fontSize: "14px",
|
|
4568
4581
|
fontWeight: 600,
|
|
4569
|
-
cursor:
|
|
4582
|
+
cursor: !A || u ? "not-allowed" : "pointer",
|
|
4570
4583
|
flex: m ? "none" : 1,
|
|
4571
4584
|
minWidth: m ? "100%" : "140px",
|
|
4572
|
-
opacity:
|
|
4585
|
+
opacity: !A || u ? 0.6 : 1,
|
|
4573
4586
|
display: "flex",
|
|
4574
4587
|
alignItems: "center",
|
|
4575
4588
|
justifyContent: "center",
|
|
4576
4589
|
gap: "8px",
|
|
4577
4590
|
transition: "all 0.2s ease",
|
|
4578
|
-
boxShadow:
|
|
4591
|
+
boxShadow: !A || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4579
4592
|
},
|
|
4580
4593
|
onMouseOver: (g) => {
|
|
4581
|
-
|
|
4594
|
+
A && !u && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4582
4595
|
},
|
|
4583
4596
|
onMouseOut: (g) => {
|
|
4584
|
-
|
|
4597
|
+
A && !u && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4585
4598
|
},
|
|
4586
4599
|
children: [
|
|
4587
4600
|
/* @__PURE__ */ r.jsx(Ne, { size: 16 }),
|
|
@@ -4620,7 +4633,7 @@ const Ls = [
|
|
|
4620
4633
|
flexShrink: 0
|
|
4621
4634
|
},
|
|
4622
4635
|
children: /* @__PURE__ */ r.jsx(
|
|
4623
|
-
|
|
4636
|
+
oe,
|
|
4624
4637
|
{
|
|
4625
4638
|
size: 20,
|
|
4626
4639
|
style: {
|
|
@@ -4730,7 +4743,7 @@ const Ls = [
|
|
|
4730
4743
|
},
|
|
4731
4744
|
children: [
|
|
4732
4745
|
/* @__PURE__ */ r.jsx(
|
|
4733
|
-
|
|
4746
|
+
dr,
|
|
4734
4747
|
{
|
|
4735
4748
|
size: 18,
|
|
4736
4749
|
style: { color: a.accent, flexShrink: 0 }
|
|
@@ -4767,7 +4780,7 @@ const Ls = [
|
|
|
4767
4780
|
color: "white",
|
|
4768
4781
|
flexShrink: 0
|
|
4769
4782
|
},
|
|
4770
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4783
|
+
children: /* @__PURE__ */ r.jsx(Xe, { size: 20 })
|
|
4771
4784
|
}
|
|
4772
4785
|
),
|
|
4773
4786
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4813,7 +4826,7 @@ const Ls = [
|
|
|
4813
4826
|
},
|
|
4814
4827
|
children: [
|
|
4815
4828
|
/* @__PURE__ */ r.jsx(
|
|
4816
|
-
|
|
4829
|
+
Xe,
|
|
4817
4830
|
{
|
|
4818
4831
|
size: 48,
|
|
4819
4832
|
style: {
|
|
@@ -4867,7 +4880,7 @@ const Ls = [
|
|
|
4867
4880
|
},
|
|
4868
4881
|
children: [
|
|
4869
4882
|
/* @__PURE__ */ r.jsx(
|
|
4870
|
-
|
|
4883
|
+
oe,
|
|
4871
4884
|
{
|
|
4872
4885
|
size: 16,
|
|
4873
4886
|
style: {
|
|
@@ -4981,14 +4994,14 @@ const Ls = [
|
|
|
4981
4994
|
onUpdate: n,
|
|
4982
4995
|
colors: s
|
|
4983
4996
|
}) => {
|
|
4984
|
-
const [o, i] = O(""), [a, l] = O(!1), [
|
|
4985
|
-
if (
|
|
4997
|
+
const [o, i] = O(""), [a, l] = O(!1), [h, c] = O(!1), [u, b] = O({ isValid: !1, message: "", type: null });
|
|
4998
|
+
if (te(() => {
|
|
4986
4999
|
if (typeof window > "u") return;
|
|
4987
5000
|
const d = () => {
|
|
4988
5001
|
c(window.innerWidth < 640);
|
|
4989
5002
|
};
|
|
4990
5003
|
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
4991
|
-
}, []),
|
|
5004
|
+
}, []), te(() => {
|
|
4992
5005
|
if (!o.trim()) {
|
|
4993
5006
|
b({ isValid: !1, message: "", type: null });
|
|
4994
5007
|
return;
|
|
@@ -5090,7 +5103,7 @@ const Ls = [
|
|
|
5090
5103
|
color: s.accent,
|
|
5091
5104
|
flexShrink: 0
|
|
5092
5105
|
},
|
|
5093
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5106
|
+
children: /* @__PURE__ */ r.jsx(nt, { size: 22 })
|
|
5094
5107
|
}
|
|
5095
5108
|
),
|
|
5096
5109
|
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
|
|
@@ -5211,7 +5224,7 @@ const Ls = [
|
|
|
5211
5224
|
transform: "translateY(-50%)",
|
|
5212
5225
|
color: s.textTertiary
|
|
5213
5226
|
},
|
|
5214
|
-
children: /* @__PURE__ */ r.jsx(
|
|
5227
|
+
children: /* @__PURE__ */ r.jsx(lr, { size: 18 })
|
|
5215
5228
|
}
|
|
5216
5229
|
)
|
|
5217
5230
|
] }),
|
|
@@ -5288,7 +5301,7 @@ const Ls = [
|
|
|
5288
5301
|
style: {
|
|
5289
5302
|
display: "flex",
|
|
5290
5303
|
gap: "12px",
|
|
5291
|
-
flexDirection:
|
|
5304
|
+
flexDirection: h ? "column-reverse" : "row",
|
|
5292
5305
|
justifyContent: "flex-end",
|
|
5293
5306
|
alignItems: "stretch",
|
|
5294
5307
|
marginTop: "24px"
|
|
@@ -5308,8 +5321,8 @@ const Ls = [
|
|
|
5308
5321
|
fontSize: "14px",
|
|
5309
5322
|
fontWeight: 500,
|
|
5310
5323
|
cursor: a ? "not-allowed" : "pointer",
|
|
5311
|
-
flex:
|
|
5312
|
-
minWidth:
|
|
5324
|
+
flex: h ? "none" : 1,
|
|
5325
|
+
minWidth: h ? "100%" : "120px",
|
|
5313
5326
|
opacity: a ? 0.6 : 1,
|
|
5314
5327
|
transition: "all 0.2s ease"
|
|
5315
5328
|
},
|
|
@@ -5336,8 +5349,8 @@ const Ls = [
|
|
|
5336
5349
|
fontSize: "14px",
|
|
5337
5350
|
fontWeight: 600,
|
|
5338
5351
|
cursor: a || !u.isValid ? "not-allowed" : "pointer",
|
|
5339
|
-
flex:
|
|
5340
|
-
minWidth:
|
|
5352
|
+
flex: h ? "none" : 1,
|
|
5353
|
+
minWidth: h ? "100%" : "140px",
|
|
5341
5354
|
opacity: a || !u.isValid ? 0.6 : 1,
|
|
5342
5355
|
display: "flex",
|
|
5343
5356
|
alignItems: "center",
|
|
@@ -5354,7 +5367,7 @@ const Ls = [
|
|
|
5354
5367
|
},
|
|
5355
5368
|
children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5356
5369
|
/* @__PURE__ */ r.jsx(
|
|
5357
|
-
|
|
5370
|
+
oe,
|
|
5358
5371
|
{
|
|
5359
5372
|
size: 16,
|
|
5360
5373
|
style: {
|
|
@@ -5364,7 +5377,7 @@ const Ls = [
|
|
|
5364
5377
|
),
|
|
5365
5378
|
"Updating..."
|
|
5366
5379
|
] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5367
|
-
/* @__PURE__ */ r.jsx(
|
|
5380
|
+
/* @__PURE__ */ r.jsx(nt, { size: 16 }),
|
|
5368
5381
|
"Update Avatar"
|
|
5369
5382
|
] })
|
|
5370
5383
|
}
|
|
@@ -5435,7 +5448,7 @@ const Ls = [
|
|
|
5435
5448
|
userId: o,
|
|
5436
5449
|
colors: i
|
|
5437
5450
|
}) => {
|
|
5438
|
-
const { baseUrl: a, apiKey: l, appId:
|
|
5451
|
+
const { baseUrl: a, apiKey: l, appId: h } = ge(), [c, u] = O({
|
|
5439
5452
|
currentPassword: "",
|
|
5440
5453
|
newPassword: "",
|
|
5441
5454
|
confirmPassword: ""
|
|
@@ -5451,9 +5464,9 @@ const Ls = [
|
|
|
5451
5464
|
};
|
|
5452
5465
|
return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
5453
5466
|
}, []), !e) return null;
|
|
5454
|
-
const
|
|
5455
|
-
const { name: U, value:
|
|
5456
|
-
u((F) => ({ ...F, [U]:
|
|
5467
|
+
const A = (v) => {
|
|
5468
|
+
const { name: U, value: B } = v.target;
|
|
5469
|
+
u((F) => ({ ...F, [U]: B })), b[U] && y((F) => ({ ...F, [U]: "" }));
|
|
5457
5470
|
}, C = (v) => {
|
|
5458
5471
|
m((U) => ({ ...U, [v]: !U[v] }));
|
|
5459
5472
|
}, M = () => {
|
|
@@ -5466,7 +5479,7 @@ const Ls = [
|
|
|
5466
5479
|
const { data: U } = await W.put(
|
|
5467
5480
|
`${a}/users/change-password/${o}`,
|
|
5468
5481
|
{
|
|
5469
|
-
appId:
|
|
5482
|
+
appId: h,
|
|
5470
5483
|
currentPassword: c.currentPassword,
|
|
5471
5484
|
newPassword: c.newPassword
|
|
5472
5485
|
},
|
|
@@ -5491,7 +5504,7 @@ const Ls = [
|
|
|
5491
5504
|
{
|
|
5492
5505
|
field: "currentPassword",
|
|
5493
5506
|
label: "Current Password",
|
|
5494
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
5507
|
+
icon: /* @__PURE__ */ r.jsx(ct, { size: 18 })
|
|
5495
5508
|
},
|
|
5496
5509
|
{
|
|
5497
5510
|
field: "newPassword",
|
|
@@ -5620,7 +5633,7 @@ const Ls = [
|
|
|
5620
5633
|
}
|
|
5621
5634
|
),
|
|
5622
5635
|
/* @__PURE__ */ r.jsxs("form", { onSubmit: g, children: [
|
|
5623
|
-
I.map(({ field: v, label: U, icon:
|
|
5636
|
+
I.map(({ field: v, label: U, icon: B }) => /* @__PURE__ */ r.jsxs(
|
|
5624
5637
|
"div",
|
|
5625
5638
|
{
|
|
5626
5639
|
style: {
|
|
@@ -5655,7 +5668,7 @@ const Ls = [
|
|
|
5655
5668
|
color: i.textTertiary,
|
|
5656
5669
|
zIndex: 2
|
|
5657
5670
|
},
|
|
5658
|
-
children:
|
|
5671
|
+
children: B
|
|
5659
5672
|
}
|
|
5660
5673
|
),
|
|
5661
5674
|
/* @__PURE__ */ r.jsx(
|
|
@@ -5666,7 +5679,7 @@ const Ls = [
|
|
|
5666
5679
|
name: v,
|
|
5667
5680
|
placeholder: `Enter ${U.toLowerCase()}`,
|
|
5668
5681
|
value: c[v],
|
|
5669
|
-
onChange:
|
|
5682
|
+
onChange: A,
|
|
5670
5683
|
style: {
|
|
5671
5684
|
width: "100%",
|
|
5672
5685
|
padding: "14px 48px 14px 44px",
|
|
@@ -5715,7 +5728,7 @@ const Ls = [
|
|
|
5715
5728
|
onMouseOut: (F) => {
|
|
5716
5729
|
F.currentTarget.style.backgroundColor = "transparent", F.currentTarget.style.color = i.textTertiary;
|
|
5717
5730
|
},
|
|
5718
|
-
children: j[v] ? /* @__PURE__ */ r.jsx(
|
|
5731
|
+
children: j[v] ? /* @__PURE__ */ r.jsx(it, { size: 18 }) : /* @__PURE__ */ r.jsx(lt, { size: 18 })
|
|
5719
5732
|
}
|
|
5720
5733
|
)
|
|
5721
5734
|
] }),
|
|
@@ -5812,7 +5825,7 @@ const Ls = [
|
|
|
5812
5825
|
},
|
|
5813
5826
|
children: w ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5814
5827
|
/* @__PURE__ */ r.jsx(
|
|
5815
|
-
|
|
5828
|
+
oe,
|
|
5816
5829
|
{
|
|
5817
5830
|
size: 16,
|
|
5818
5831
|
style: {
|
|
@@ -5881,13 +5894,13 @@ const Ls = [
|
|
|
5881
5894
|
setVerifyFormData: i,
|
|
5882
5895
|
otpSent: a,
|
|
5883
5896
|
verifying: l,
|
|
5884
|
-
user:
|
|
5897
|
+
user: h,
|
|
5885
5898
|
colors: c,
|
|
5886
5899
|
darkMode: u
|
|
5887
5900
|
}) => {
|
|
5888
5901
|
if (!e) return null;
|
|
5889
5902
|
const b = () => {
|
|
5890
|
-
t(), i({ email:
|
|
5903
|
+
t(), i({ email: h?.email || "", otp: "", appId: o.appId });
|
|
5891
5904
|
};
|
|
5892
5905
|
return /* @__PURE__ */ r.jsxs(
|
|
5893
5906
|
"div",
|
|
@@ -5923,7 +5936,7 @@ const Ls = [
|
|
|
5923
5936
|
/* @__PURE__ */ r.jsxs("div", { className: "form-group", children: [
|
|
5924
5937
|
/* @__PURE__ */ r.jsx("label", { style: { color: c.textSecondary }, children: "Email" }),
|
|
5925
5938
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
5926
|
-
/* @__PURE__ */ r.jsx(
|
|
5939
|
+
/* @__PURE__ */ r.jsx(de, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
5927
5940
|
/* @__PURE__ */ r.jsx(
|
|
5928
5941
|
"input",
|
|
5929
5942
|
{
|
|
@@ -5946,7 +5959,7 @@ const Ls = [
|
|
|
5946
5959
|
a && /* @__PURE__ */ r.jsxs("div", { className: "form-group", children: [
|
|
5947
5960
|
/* @__PURE__ */ r.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
5948
5961
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
5949
|
-
/* @__PURE__ */ r.jsx(
|
|
5962
|
+
/* @__PURE__ */ r.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
5950
5963
|
/* @__PURE__ */ r.jsx(
|
|
5951
5964
|
"input",
|
|
5952
5965
|
{
|
|
@@ -5978,7 +5991,7 @@ const Ls = [
|
|
|
5978
5991
|
},
|
|
5979
5992
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
5980
5993
|
children: [
|
|
5981
|
-
l ? /* @__PURE__ */ r.jsx(
|
|
5994
|
+
l ? /* @__PURE__ */ r.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
5982
5995
|
l ? "Verifying..." : "Verify Email"
|
|
5983
5996
|
]
|
|
5984
5997
|
}
|
|
@@ -5995,7 +6008,7 @@ const Ls = [
|
|
|
5995
6008
|
},
|
|
5996
6009
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
5997
6010
|
children: [
|
|
5998
|
-
l ? /* @__PURE__ */ r.jsx(
|
|
6011
|
+
l ? /* @__PURE__ */ r.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
5999
6012
|
l ? "Sending..." : "Send OTP"
|
|
6000
6013
|
]
|
|
6001
6014
|
}
|
|
@@ -6164,149 +6177,149 @@ const Ls = [
|
|
|
6164
6177
|
onVerify: i,
|
|
6165
6178
|
primaryColor: a = "#00C212"
|
|
6166
6179
|
}) => {
|
|
6167
|
-
const { baseUrl: l, apiKey:
|
|
6180
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [u, b] = O(null), [y, w] = O(t), [d, j] = O(!0), [m, _] = O(!1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(!1), [v, U] = O(!1), [B, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [z, P] = O(null), [K, Q] = O(!1), [X, f] = O({
|
|
6168
6181
|
email: "",
|
|
6169
6182
|
otp: "",
|
|
6170
6183
|
appId: c
|
|
6171
|
-
}), [S,
|
|
6172
|
-
|
|
6184
|
+
}), [S, x] = O(!1), [k, $] = O(!1);
|
|
6185
|
+
te(() => {
|
|
6173
6186
|
if (typeof window < "u") {
|
|
6174
6187
|
const E = () => b(window.innerWidth);
|
|
6175
6188
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
6176
6189
|
}
|
|
6177
6190
|
}, []);
|
|
6178
|
-
const
|
|
6179
|
-
|
|
6180
|
-
},
|
|
6181
|
-
|
|
6191
|
+
const N = (E, H) => {
|
|
6192
|
+
P({ type: E, message: H }), setTimeout(() => P(null), 3e3);
|
|
6193
|
+
}, Y = () => {
|
|
6194
|
+
J(!0);
|
|
6182
6195
|
const E = setTimeout(() => {
|
|
6183
|
-
Z(!1),
|
|
6196
|
+
Z(!1), J(!1);
|
|
6184
6197
|
}, 150);
|
|
6185
6198
|
return () => clearTimeout(E);
|
|
6186
6199
|
};
|
|
6187
|
-
|
|
6188
|
-
const E = (
|
|
6200
|
+
te(() => {
|
|
6201
|
+
const E = (H) => {
|
|
6189
6202
|
const G = document.querySelector(".dropdown-container");
|
|
6190
|
-
G && !G.contains(
|
|
6203
|
+
G && !G.contains(H.target) && Y();
|
|
6191
6204
|
};
|
|
6192
|
-
return
|
|
6205
|
+
return V && document.addEventListener("mousedown", E), () => {
|
|
6193
6206
|
document.removeEventListener("mousedown", E);
|
|
6194
6207
|
};
|
|
6195
|
-
}, [
|
|
6196
|
-
const
|
|
6197
|
-
if (!
|
|
6198
|
-
|
|
6208
|
+
}, [V]);
|
|
6209
|
+
const se = async () => {
|
|
6210
|
+
if (!X.email || !/\S+@\S+\.\S+/.test(X.email)) {
|
|
6211
|
+
N("error", "Please enter a valid email");
|
|
6199
6212
|
return;
|
|
6200
6213
|
}
|
|
6201
6214
|
try {
|
|
6202
|
-
|
|
6215
|
+
$(!0);
|
|
6203
6216
|
const E = await W.post(
|
|
6204
6217
|
`${l}/users/send-verify-otp/${y?.id}`,
|
|
6205
|
-
{ email:
|
|
6218
|
+
{ email: X.email },
|
|
6206
6219
|
{
|
|
6207
|
-
headers: { "x-api-key":
|
|
6220
|
+
headers: { "x-api-key": h, "x-app-id": c }
|
|
6208
6221
|
}
|
|
6209
6222
|
);
|
|
6210
|
-
E.data.success ? (
|
|
6223
|
+
E.data.success ? (N("success", E.data.message || "OTP sent to email!"), x(!0)) : N("error", E.data.message || "Failed to send OTP");
|
|
6211
6224
|
} catch (E) {
|
|
6212
|
-
|
|
6225
|
+
N("error", E.response?.data?.message || "Server error");
|
|
6213
6226
|
} finally {
|
|
6214
|
-
|
|
6227
|
+
$(!1);
|
|
6215
6228
|
}
|
|
6216
|
-
},
|
|
6217
|
-
if (E.preventDefault(), !
|
|
6218
|
-
|
|
6229
|
+
}, ue = async (E) => {
|
|
6230
|
+
if (E.preventDefault(), !X.email || !X.otp) {
|
|
6231
|
+
N("error", "Please fill in all fields");
|
|
6219
6232
|
return;
|
|
6220
6233
|
}
|
|
6221
6234
|
try {
|
|
6222
|
-
|
|
6223
|
-
const
|
|
6235
|
+
$(!0);
|
|
6236
|
+
const H = await W.post(
|
|
6224
6237
|
`${l}/users/verify-email`,
|
|
6225
|
-
|
|
6238
|
+
X
|
|
6226
6239
|
);
|
|
6227
|
-
if (
|
|
6228
|
-
if (
|
|
6240
|
+
if (H.data.success) {
|
|
6241
|
+
if (N("success", H.data.message || "Email verified!"), y) {
|
|
6229
6242
|
const G = { ...y, isVerified: !0 };
|
|
6230
6243
|
w(G), localStorage.setItem(
|
|
6231
6244
|
"userInfo",
|
|
6232
6245
|
JSON.stringify({ ...G, token: e })
|
|
6233
6246
|
), typeof i == "function" && i(G);
|
|
6234
6247
|
}
|
|
6235
|
-
f({ email: "", otp: "", appId: c }),
|
|
6248
|
+
f({ email: "", otp: "", appId: c }), x(!1), F(!1);
|
|
6236
6249
|
} else
|
|
6237
|
-
|
|
6238
|
-
} catch (
|
|
6239
|
-
|
|
6250
|
+
N("error", H.data.message || "Verification failed");
|
|
6251
|
+
} catch (H) {
|
|
6252
|
+
N(
|
|
6240
6253
|
"error",
|
|
6241
|
-
|
|
6254
|
+
H.response?.data?.message || "Something went wrong"
|
|
6242
6255
|
);
|
|
6243
6256
|
} finally {
|
|
6244
|
-
|
|
6257
|
+
$(!1);
|
|
6245
6258
|
}
|
|
6246
6259
|
}, ve = async (E) => {
|
|
6247
6260
|
if (!y) return !1;
|
|
6248
6261
|
try {
|
|
6249
|
-
const
|
|
6262
|
+
const H = { ...y, avatarUrl: E }, { data: G } = await W.put(
|
|
6250
6263
|
`${l}/users/update/${y.id}`,
|
|
6251
|
-
|
|
6252
|
-
{ headers: { "x-api-key":
|
|
6264
|
+
H,
|
|
6265
|
+
{ headers: { "x-api-key": h } }
|
|
6253
6266
|
);
|
|
6254
|
-
return G.success ? (w(
|
|
6267
|
+
return G.success ? (w(H), localStorage.setItem(
|
|
6255
6268
|
"userInfo",
|
|
6256
|
-
JSON.stringify({ ...
|
|
6257
|
-
),
|
|
6258
|
-
} catch (
|
|
6259
|
-
return console.error("Avatar update error:",
|
|
6269
|
+
JSON.stringify({ ...H, token: e })
|
|
6270
|
+
), N("success", "Avatar updated successfully!"), !0) : (N("error", G.message || "Failed to update avatar"), !1);
|
|
6271
|
+
} catch (H) {
|
|
6272
|
+
return console.error("Avatar update error:", H), N("error", "Failed to update avatar"), !1;
|
|
6260
6273
|
}
|
|
6261
|
-
},
|
|
6274
|
+
}, ur = async () => {
|
|
6262
6275
|
if (y) {
|
|
6263
|
-
|
|
6276
|
+
A(!0);
|
|
6264
6277
|
try {
|
|
6265
6278
|
const { data: E } = await W.put(
|
|
6266
6279
|
`${l}/users/update/${y.id}`,
|
|
6267
6280
|
y,
|
|
6268
|
-
{ headers: { "x-api-key":
|
|
6281
|
+
{ headers: { "x-api-key": h } }
|
|
6269
6282
|
);
|
|
6270
6283
|
E.success ? (w(E.user), _(!1), localStorage.setItem(
|
|
6271
6284
|
"userInfo",
|
|
6272
6285
|
JSON.stringify({ ...E.user, token: e })
|
|
6273
|
-
),
|
|
6286
|
+
), N("success", "Profile updated successfully")) : N("error", E.message);
|
|
6274
6287
|
} catch (E) {
|
|
6275
|
-
console.error(E),
|
|
6288
|
+
console.error(E), N("error", "Update failed");
|
|
6276
6289
|
} finally {
|
|
6277
|
-
|
|
6290
|
+
A(!1);
|
|
6278
6291
|
}
|
|
6279
6292
|
}
|
|
6280
|
-
},
|
|
6293
|
+
}, pt = async (E) => {
|
|
6281
6294
|
try {
|
|
6282
|
-
const { data:
|
|
6295
|
+
const { data: H } = await W.get(
|
|
6283
6296
|
`${l}/users/check-user/${E}?appId=${c}`,
|
|
6284
|
-
{ headers: { "x-api-key":
|
|
6297
|
+
{ headers: { "x-api-key": h } }
|
|
6285
6298
|
);
|
|
6286
|
-
|
|
6287
|
-
} catch (
|
|
6288
|
-
console.error("⚠️ User validation request failed:",
|
|
6299
|
+
H?.success === !0 && H?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), w(null));
|
|
6300
|
+
} catch (H) {
|
|
6301
|
+
console.error("⚠️ User validation request failed:", H);
|
|
6289
6302
|
}
|
|
6290
6303
|
};
|
|
6291
|
-
|
|
6304
|
+
te(() => {
|
|
6292
6305
|
(() => {
|
|
6293
6306
|
if (t)
|
|
6294
|
-
w(t), j(!1),
|
|
6307
|
+
w(t), j(!1), pt(t.id);
|
|
6295
6308
|
else {
|
|
6296
|
-
const
|
|
6297
|
-
if (
|
|
6298
|
-
const G = JSON.parse(
|
|
6299
|
-
w(G), j(!1),
|
|
6309
|
+
const H = localStorage.getItem("userInfo");
|
|
6310
|
+
if (H) {
|
|
6311
|
+
const G = JSON.parse(H);
|
|
6312
|
+
w(G), j(!1), pt(G.id);
|
|
6300
6313
|
} else
|
|
6301
6314
|
j(!1);
|
|
6302
6315
|
}
|
|
6303
6316
|
})();
|
|
6304
|
-
}, [t]),
|
|
6317
|
+
}, [t]), te(() => {
|
|
6305
6318
|
y?.email && f((E) => ({ ...E, email: y.email }));
|
|
6306
6319
|
}, [y?.email]);
|
|
6307
|
-
const
|
|
6308
|
-
let G = parseInt(E.replace("#", ""), 16), pe = (G >> 16) +
|
|
6309
|
-
return pe = Math.min(255, Math.max(0, pe)),
|
|
6320
|
+
const ft = (E, H) => {
|
|
6321
|
+
let G = parseInt(E.replace("#", ""), 16), pe = (G >> 16) + H, He = (G >> 8 & 255) + H, Ve = (G & 255) + H;
|
|
6322
|
+
return pe = Math.min(255, Math.max(0, pe)), He = Math.min(255, Math.max(0, He)), Ve = Math.min(255, Math.max(0, Ve)), `#${(Ve | He << 8 | pe << 16).toString(16).padStart(6, "0")}`;
|
|
6310
6323
|
}, D = n ? {
|
|
6311
6324
|
background: "#000000",
|
|
6312
6325
|
surface: "#09090b",
|
|
@@ -6316,7 +6329,7 @@ const Ls = [
|
|
|
6316
6329
|
textSecondary: "#d4d4d8",
|
|
6317
6330
|
textTertiary: "#a1a1aa",
|
|
6318
6331
|
accent: a,
|
|
6319
|
-
accentHover:
|
|
6332
|
+
accentHover: ft(a, -15),
|
|
6320
6333
|
success: "#10b981",
|
|
6321
6334
|
error: "#ef4444",
|
|
6322
6335
|
border: "#27272a",
|
|
@@ -6330,7 +6343,7 @@ const Ls = [
|
|
|
6330
6343
|
textSecondary: "#52525b",
|
|
6331
6344
|
textTertiary: "#71717a",
|
|
6332
6345
|
accent: a,
|
|
6333
|
-
accentHover:
|
|
6346
|
+
accentHover: ft(a, -15),
|
|
6334
6347
|
success: "#10b981",
|
|
6335
6348
|
error: "#ef4444",
|
|
6336
6349
|
border: "#e4e4e7",
|
|
@@ -6361,7 +6374,7 @@ const Ls = [
|
|
|
6361
6374
|
},
|
|
6362
6375
|
children: [
|
|
6363
6376
|
/* @__PURE__ */ r.jsx(
|
|
6364
|
-
|
|
6377
|
+
oe,
|
|
6365
6378
|
{
|
|
6366
6379
|
size: 40,
|
|
6367
6380
|
color: D.accent,
|
|
@@ -6419,7 +6432,7 @@ const Ls = [
|
|
|
6419
6432
|
value: y.email,
|
|
6420
6433
|
name: "email",
|
|
6421
6434
|
type: "email",
|
|
6422
|
-
icon:
|
|
6435
|
+
icon: de
|
|
6423
6436
|
},
|
|
6424
6437
|
{
|
|
6425
6438
|
label: "Phone Number",
|
|
@@ -6450,7 +6463,7 @@ const Ls = [
|
|
|
6450
6463
|
minHeight: "80vh"
|
|
6451
6464
|
},
|
|
6452
6465
|
children: [
|
|
6453
|
-
|
|
6466
|
+
z && /* @__PURE__ */ r.jsxs(
|
|
6454
6467
|
"div",
|
|
6455
6468
|
{
|
|
6456
6469
|
style: {
|
|
@@ -6470,7 +6483,7 @@ const Ls = [
|
|
|
6470
6483
|
fontWeight: 500,
|
|
6471
6484
|
maxWidth: "400px",
|
|
6472
6485
|
animation: "slideIn 0.3s ease-out",
|
|
6473
|
-
...
|
|
6486
|
+
...z.type === "success" ? {
|
|
6474
6487
|
backgroundColor: n ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
6475
6488
|
borderColor: n ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)",
|
|
6476
6489
|
color: n ? "#34d399" : "#059669"
|
|
@@ -6483,8 +6496,8 @@ const Ls = [
|
|
|
6483
6496
|
role: "alert",
|
|
6484
6497
|
"aria-live": "polite",
|
|
6485
6498
|
children: [
|
|
6486
|
-
|
|
6487
|
-
|
|
6499
|
+
z.type === "success" ? /* @__PURE__ */ r.jsx(ce, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ r.jsx(le, { size: 20, "aria-hidden": "true" }),
|
|
6500
|
+
z.message
|
|
6488
6501
|
]
|
|
6489
6502
|
}
|
|
6490
6503
|
),
|
|
@@ -6613,7 +6626,7 @@ const Ls = [
|
|
|
6613
6626
|
height: "32px"
|
|
6614
6627
|
},
|
|
6615
6628
|
"aria-label": "Change profile picture",
|
|
6616
|
-
children: /* @__PURE__ */ r.jsx(
|
|
6629
|
+
children: /* @__PURE__ */ r.jsx(nt, { size: 16, "aria-hidden": "true" })
|
|
6617
6630
|
}
|
|
6618
6631
|
)
|
|
6619
6632
|
]
|
|
@@ -6707,7 +6720,7 @@ const Ls = [
|
|
|
6707
6720
|
/* @__PURE__ */ r.jsxs(
|
|
6708
6721
|
"button",
|
|
6709
6722
|
{
|
|
6710
|
-
onClick:
|
|
6723
|
+
onClick: ur,
|
|
6711
6724
|
disabled: R,
|
|
6712
6725
|
style: {
|
|
6713
6726
|
background: `linear-gradient(to right, ${D.accent}, ${D.accentHover})`,
|
|
@@ -6730,7 +6743,7 @@ const Ls = [
|
|
|
6730
6743
|
},
|
|
6731
6744
|
children: [
|
|
6732
6745
|
R ? /* @__PURE__ */ r.jsx(
|
|
6733
|
-
|
|
6746
|
+
oe,
|
|
6734
6747
|
{
|
|
6735
6748
|
size: 16,
|
|
6736
6749
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6774,7 +6787,7 @@ const Ls = [
|
|
|
6774
6787
|
"button",
|
|
6775
6788
|
{
|
|
6776
6789
|
onClick: () => F(!0),
|
|
6777
|
-
disabled:
|
|
6790
|
+
disabled: K,
|
|
6778
6791
|
style: {
|
|
6779
6792
|
background: "linear-gradient(to right, #fbbf24, #f59e0b)",
|
|
6780
6793
|
// amber gradient
|
|
@@ -6782,7 +6795,7 @@ const Ls = [
|
|
|
6782
6795
|
padding: "10px 20px",
|
|
6783
6796
|
borderRadius: "6px",
|
|
6784
6797
|
border: "none",
|
|
6785
|
-
cursor:
|
|
6798
|
+
cursor: K ? "not-allowed" : "pointer",
|
|
6786
6799
|
transition: "all 0.2s ease",
|
|
6787
6800
|
fontSize: "12px",
|
|
6788
6801
|
fontWeight: 500,
|
|
@@ -6791,19 +6804,19 @@ const Ls = [
|
|
|
6791
6804
|
justifyContent: "center",
|
|
6792
6805
|
gap: "8px",
|
|
6793
6806
|
minHeight: "36px",
|
|
6794
|
-
opacity:
|
|
6807
|
+
opacity: K ? 0.7 : 1,
|
|
6795
6808
|
flex: u && window.innerWidth < 1024 ? "1" : "auto"
|
|
6796
6809
|
},
|
|
6797
6810
|
children: [
|
|
6798
|
-
|
|
6799
|
-
|
|
6811
|
+
K ? /* @__PURE__ */ r.jsx(
|
|
6812
|
+
oe,
|
|
6800
6813
|
{
|
|
6801
6814
|
size: 14,
|
|
6802
6815
|
style: { animation: "spin 1s linear infinite" },
|
|
6803
6816
|
"aria-hidden": "true"
|
|
6804
6817
|
}
|
|
6805
|
-
) : /* @__PURE__ */ r.jsx(
|
|
6806
|
-
|
|
6818
|
+
) : /* @__PURE__ */ r.jsx(ut, { size: 14, "aria-hidden": "true" }),
|
|
6819
|
+
K ? "Sending..." : "Verify Email"
|
|
6807
6820
|
]
|
|
6808
6821
|
}
|
|
6809
6822
|
),
|
|
@@ -6830,14 +6843,14 @@ const Ls = [
|
|
|
6830
6843
|
width: "100%",
|
|
6831
6844
|
boxSizing: "border-box"
|
|
6832
6845
|
},
|
|
6833
|
-
onClick: () => Z(!
|
|
6846
|
+
onClick: () => Z(!V),
|
|
6834
6847
|
children: [
|
|
6835
6848
|
/* @__PURE__ */ r.jsx(as, { size: 16, "aria-hidden": "true" }),
|
|
6836
6849
|
"More Actions"
|
|
6837
6850
|
]
|
|
6838
6851
|
}
|
|
6839
6852
|
),
|
|
6840
|
-
|
|
6853
|
+
V && /* @__PURE__ */ r.jsxs(
|
|
6841
6854
|
"div",
|
|
6842
6855
|
{
|
|
6843
6856
|
className: `dropdown-container ${T ? "closing" : ""}`,
|
|
@@ -6860,7 +6873,7 @@ const Ls = [
|
|
|
6860
6873
|
"button",
|
|
6861
6874
|
{
|
|
6862
6875
|
onClick: () => {
|
|
6863
|
-
I(!0),
|
|
6876
|
+
I(!0), Y();
|
|
6864
6877
|
},
|
|
6865
6878
|
style: {
|
|
6866
6879
|
width: "100%",
|
|
@@ -6880,7 +6893,7 @@ const Ls = [
|
|
|
6880
6893
|
onMouseEnter: (E) => E.currentTarget.style.backgroundColor = D.surfaceLight,
|
|
6881
6894
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
6882
6895
|
children: [
|
|
6883
|
-
/* @__PURE__ */ r.jsx(
|
|
6896
|
+
/* @__PURE__ */ r.jsx(ct, { size: 14, "aria-hidden": "true" }),
|
|
6884
6897
|
"Change Password"
|
|
6885
6898
|
]
|
|
6886
6899
|
}
|
|
@@ -6889,7 +6902,7 @@ const Ls = [
|
|
|
6889
6902
|
"button",
|
|
6890
6903
|
{
|
|
6891
6904
|
onClick: () => {
|
|
6892
|
-
o(),
|
|
6905
|
+
o(), Y();
|
|
6893
6906
|
},
|
|
6894
6907
|
style: {
|
|
6895
6908
|
width: "100%",
|
|
@@ -6911,7 +6924,7 @@ const Ls = [
|
|
|
6911
6924
|
},
|
|
6912
6925
|
onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
|
|
6913
6926
|
children: [
|
|
6914
|
-
/* @__PURE__ */ r.jsx(
|
|
6927
|
+
/* @__PURE__ */ r.jsx(dt, { size: 14, "aria-hidden": "true" }),
|
|
6915
6928
|
"Logout"
|
|
6916
6929
|
]
|
|
6917
6930
|
}
|
|
@@ -6920,7 +6933,7 @@ const Ls = [
|
|
|
6920
6933
|
"button",
|
|
6921
6934
|
{
|
|
6922
6935
|
onClick: () => {
|
|
6923
|
-
U(!0),
|
|
6936
|
+
U(!0), Y();
|
|
6924
6937
|
},
|
|
6925
6938
|
style: {
|
|
6926
6939
|
width: "100%",
|
|
@@ -7008,7 +7021,7 @@ const Ls = [
|
|
|
7008
7021
|
}
|
|
7009
7022
|
},
|
|
7010
7023
|
children: pr.map((E) => {
|
|
7011
|
-
const
|
|
7024
|
+
const H = E.icon;
|
|
7012
7025
|
return /* @__PURE__ */ r.jsxs(
|
|
7013
7026
|
"div",
|
|
7014
7027
|
{
|
|
@@ -7030,7 +7043,7 @@ const Ls = [
|
|
|
7030
7043
|
gap: "8px"
|
|
7031
7044
|
},
|
|
7032
7045
|
children: [
|
|
7033
|
-
/* @__PURE__ */ r.jsx(
|
|
7046
|
+
/* @__PURE__ */ r.jsx(H, { size: 16, "aria-hidden": "true" }),
|
|
7034
7047
|
E.label
|
|
7035
7048
|
]
|
|
7036
7049
|
}
|
|
@@ -7111,7 +7124,7 @@ const Ls = [
|
|
|
7111
7124
|
gap: "8px"
|
|
7112
7125
|
},
|
|
7113
7126
|
children: [
|
|
7114
|
-
/* @__PURE__ */ r.jsx(
|
|
7127
|
+
/* @__PURE__ */ r.jsx(dr, { size: 20, "aria-hidden": "true" }),
|
|
7115
7128
|
"Security Status"
|
|
7116
7129
|
]
|
|
7117
7130
|
}
|
|
@@ -7145,7 +7158,7 @@ const Ls = [
|
|
|
7145
7158
|
color: D.textSecondary
|
|
7146
7159
|
},
|
|
7147
7160
|
children: [
|
|
7148
|
-
/* @__PURE__ */ r.jsx(
|
|
7161
|
+
/* @__PURE__ */ r.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
7149
7162
|
/* @__PURE__ */ r.jsx("span", { children: "Email Verification" })
|
|
7150
7163
|
]
|
|
7151
7164
|
}
|
|
@@ -7233,13 +7246,13 @@ const Ls = [
|
|
|
7233
7246
|
Bs,
|
|
7234
7247
|
{
|
|
7235
7248
|
baseUrl: l,
|
|
7236
|
-
apiKey:
|
|
7249
|
+
apiKey: h,
|
|
7237
7250
|
appId: c,
|
|
7238
7251
|
userId: y.id,
|
|
7239
7252
|
isOpen: g,
|
|
7240
7253
|
onClose: () => I(!1),
|
|
7241
|
-
onSuccess: (E) =>
|
|
7242
|
-
onError: (E) =>
|
|
7254
|
+
onSuccess: (E) => N("success", E),
|
|
7255
|
+
onError: (E) => N("error", E),
|
|
7243
7256
|
colors: D
|
|
7244
7257
|
}
|
|
7245
7258
|
),
|
|
@@ -7247,30 +7260,30 @@ const Ls = [
|
|
|
7247
7260
|
Ms,
|
|
7248
7261
|
{
|
|
7249
7262
|
baseUrl: l,
|
|
7250
|
-
apiKey:
|
|
7263
|
+
apiKey: h,
|
|
7251
7264
|
appId: c,
|
|
7252
7265
|
userId: y.id,
|
|
7253
7266
|
token: e,
|
|
7254
7267
|
isOpen: v,
|
|
7255
7268
|
onClose: () => U(!1),
|
|
7256
|
-
onSuccess: (E) =>
|
|
7257
|
-
onError: (E) =>
|
|
7269
|
+
onSuccess: (E) => N("success", E),
|
|
7270
|
+
onError: (E) => N("error", E),
|
|
7258
7271
|
colors: D
|
|
7259
7272
|
}
|
|
7260
7273
|
),
|
|
7261
7274
|
/* @__PURE__ */ r.jsx(
|
|
7262
7275
|
qs,
|
|
7263
7276
|
{
|
|
7264
|
-
isOpen:
|
|
7277
|
+
isOpen: B,
|
|
7265
7278
|
onClose: () => {
|
|
7266
|
-
F(!1),
|
|
7279
|
+
F(!1), x(!1), f({ email: y?.email || "", otp: "", appId: c });
|
|
7267
7280
|
},
|
|
7268
|
-
onVerify:
|
|
7269
|
-
onSendOTP:
|
|
7270
|
-
verifyFormData:
|
|
7281
|
+
onVerify: ue,
|
|
7282
|
+
onSendOTP: se,
|
|
7283
|
+
verifyFormData: X,
|
|
7271
7284
|
setVerifyFormData: f,
|
|
7272
7285
|
otpSent: S,
|
|
7273
|
-
verifying:
|
|
7286
|
+
verifying: k,
|
|
7274
7287
|
user: y,
|
|
7275
7288
|
colors: D,
|
|
7276
7289
|
darkMode: n
|
|
@@ -7379,7 +7392,7 @@ const Ls = [
|
|
|
7379
7392
|
profileUrl: a,
|
|
7380
7393
|
settingsUrl: l,
|
|
7381
7394
|
// Menu item visibility with defaults
|
|
7382
|
-
showProfileMenuItem:
|
|
7395
|
+
showProfileMenuItem: h = !0,
|
|
7383
7396
|
showSettingsMenuItem: c = !0,
|
|
7384
7397
|
showViewProfileMenuItem: u = !0,
|
|
7385
7398
|
// Custom labels with defaults
|
|
@@ -7388,48 +7401,30 @@ const Ls = [
|
|
|
7388
7401
|
viewProfileLabel: w = "View Profile",
|
|
7389
7402
|
logoutLabel: d = "Sign Out"
|
|
7390
7403
|
}) => {
|
|
7391
|
-
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R,
|
|
7392
|
-
|
|
7393
|
-
if (!h)
|
|
7394
|
-
throw new Error("Invalid user ID");
|
|
7395
|
-
const { data: k } = await W.get(
|
|
7396
|
-
`${j}/users/check-user/${h}?appId=${_}`,
|
|
7397
|
-
{
|
|
7398
|
-
headers: { "x-api-key": m },
|
|
7399
|
-
timeout: 1e4
|
|
7400
|
-
// 10 second timeout
|
|
7401
|
-
}
|
|
7402
|
-
);
|
|
7403
|
-
(!k.success || !k.exists) && (console.warn("User not found, clearing session..."), localStorage.removeItem("userInfo"), M(null), U("Session expired"));
|
|
7404
|
-
} catch (k) {
|
|
7405
|
-
console.error("User validation failed:", k);
|
|
7406
|
-
const z = k.response?.status === 404 ? "User not found" : k.code === "NETWORK_ERROR" ? "Network error" : "Validation failed";
|
|
7407
|
-
U(z), k.response?.status === 404 && (localStorage.removeItem("userInfo"), M(null));
|
|
7408
|
-
}
|
|
7409
|
-
};
|
|
7410
|
-
ee(() => {
|
|
7404
|
+
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R, A] = O(!1), [C, M] = O(null), [g, I] = O(!0), [v, U] = O(null), B = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
|
|
7405
|
+
te(() => {
|
|
7411
7406
|
if (typeof window > "u") return;
|
|
7412
|
-
const
|
|
7413
|
-
|
|
7407
|
+
const x = () => {
|
|
7408
|
+
J(window.innerWidth < 768);
|
|
7414
7409
|
};
|
|
7415
|
-
return
|
|
7416
|
-
}, []),
|
|
7410
|
+
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7411
|
+
}, []), te(() => {
|
|
7417
7412
|
(async () => {
|
|
7418
7413
|
try {
|
|
7419
7414
|
if (I(!0), U(null), o) {
|
|
7420
7415
|
if (!o.id || !o.name || !o.email)
|
|
7421
7416
|
throw new Error("Invalid user data provided");
|
|
7422
|
-
M(o)
|
|
7417
|
+
M(o);
|
|
7423
7418
|
} else if (typeof window < "u") {
|
|
7424
7419
|
const k = localStorage.getItem("userInfo");
|
|
7425
7420
|
if (k)
|
|
7426
7421
|
try {
|
|
7427
|
-
const
|
|
7428
|
-
if (
|
|
7422
|
+
const $ = JSON.parse(k);
|
|
7423
|
+
if (!$.id || !$.name || !$.email)
|
|
7429
7424
|
throw new Error("Invalid stored user data");
|
|
7430
|
-
M(
|
|
7431
|
-
} catch (
|
|
7432
|
-
console.error("Failed to parse stored user data:",
|
|
7425
|
+
M($);
|
|
7426
|
+
} catch ($) {
|
|
7427
|
+
console.error("Failed to parse stored user data:", $), localStorage.removeItem("userInfo"), U("Invalid user data");
|
|
7433
7428
|
}
|
|
7434
7429
|
}
|
|
7435
7430
|
} catch (k) {
|
|
@@ -7438,31 +7433,31 @@ const Ls = [
|
|
|
7438
7433
|
I(!1);
|
|
7439
7434
|
}
|
|
7440
7435
|
})();
|
|
7441
|
-
}, [o]),
|
|
7436
|
+
}, [o]), te(() => {
|
|
7442
7437
|
if (typeof window > "u") return;
|
|
7443
|
-
const
|
|
7438
|
+
const x = () => {
|
|
7444
7439
|
if (!R || !F.current) return;
|
|
7445
|
-
const k = F.current.getBoundingClientRect(),
|
|
7446
|
-
|
|
7447
|
-
const
|
|
7448
|
-
Z(
|
|
7440
|
+
const k = F.current.getBoundingClientRect(), $ = window.innerWidth, N = window.innerHeight, Y = 280, se = $ - k.right, ue = k.left;
|
|
7441
|
+
N - k.bottom;
|
|
7442
|
+
const ve = se >= Y || se > ue;
|
|
7443
|
+
Z(ve);
|
|
7449
7444
|
};
|
|
7450
|
-
return
|
|
7451
|
-
}, [R]),
|
|
7445
|
+
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7446
|
+
}, [R]), te(() => {
|
|
7452
7447
|
if (typeof window > "u" || typeof document > "u")
|
|
7453
7448
|
return;
|
|
7454
|
-
const
|
|
7455
|
-
|
|
7456
|
-
}, k = (
|
|
7457
|
-
|
|
7458
|
-
},
|
|
7459
|
-
R &&
|
|
7449
|
+
const x = (N) => {
|
|
7450
|
+
B.current && !B.current.contains(N.target) && !F.current?.contains(N.target) && A(!1);
|
|
7451
|
+
}, k = (N) => {
|
|
7452
|
+
N.key === "Escape" && A(!1);
|
|
7453
|
+
}, $ = () => {
|
|
7454
|
+
R && A(!1);
|
|
7460
7455
|
};
|
|
7461
|
-
return R && (document.addEventListener("mousedown",
|
|
7462
|
-
document.removeEventListener("mousedown",
|
|
7456
|
+
return R && (document.addEventListener("mousedown", x), document.addEventListener("keydown", k), window.addEventListener("scroll", $)), () => {
|
|
7457
|
+
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", k), window.removeEventListener("scroll", $);
|
|
7463
7458
|
};
|
|
7464
7459
|
}, [R]);
|
|
7465
|
-
const
|
|
7460
|
+
const z = e ? {
|
|
7466
7461
|
surface: "#000000",
|
|
7467
7462
|
surfaceElevated: "#000000",
|
|
7468
7463
|
surfaceHover: "#262626",
|
|
@@ -7497,7 +7492,7 @@ const Ls = [
|
|
|
7497
7492
|
gap: T ? "6px" : "8px",
|
|
7498
7493
|
padding: T ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
7499
7494
|
borderRadius: "24px",
|
|
7500
|
-
backgroundColor:
|
|
7495
|
+
backgroundColor: z.surface,
|
|
7501
7496
|
cursor: "pointer",
|
|
7502
7497
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7503
7498
|
minWidth: T ? "auto" : "140px",
|
|
@@ -7509,7 +7504,7 @@ const Ls = [
|
|
|
7509
7504
|
height: T ? "28px" : "32px",
|
|
7510
7505
|
borderRadius: "50%",
|
|
7511
7506
|
objectFit: "cover",
|
|
7512
|
-
border: `2px solid ${
|
|
7507
|
+
border: `2px solid ${z.borderLight}`,
|
|
7513
7508
|
flexShrink: 0
|
|
7514
7509
|
},
|
|
7515
7510
|
userInfo: {
|
|
@@ -7523,7 +7518,7 @@ const Ls = [
|
|
|
7523
7518
|
userName: {
|
|
7524
7519
|
fontSize: T ? "13px" : "14px",
|
|
7525
7520
|
fontWeight: 600,
|
|
7526
|
-
color:
|
|
7521
|
+
color: z.textPrimary,
|
|
7527
7522
|
lineHeight: "1.2",
|
|
7528
7523
|
whiteSpace: "nowrap",
|
|
7529
7524
|
overflow: "hidden",
|
|
@@ -7532,7 +7527,7 @@ const Ls = [
|
|
|
7532
7527
|
},
|
|
7533
7528
|
userEmail: {
|
|
7534
7529
|
fontSize: T ? "11px" : "12px",
|
|
7535
|
-
color:
|
|
7530
|
+
color: z.textTertiary,
|
|
7536
7531
|
lineHeight: "1.2",
|
|
7537
7532
|
whiteSpace: "nowrap",
|
|
7538
7533
|
overflow: "hidden",
|
|
@@ -7542,16 +7537,16 @@ const Ls = [
|
|
|
7542
7537
|
chevron: {
|
|
7543
7538
|
transition: "transform 0.2s ease",
|
|
7544
7539
|
transform: R ? "rotate(180deg)" : "rotate(0deg)",
|
|
7545
|
-
color:
|
|
7540
|
+
color: z.textTertiary,
|
|
7546
7541
|
flexShrink: 0
|
|
7547
7542
|
},
|
|
7548
7543
|
dropdown: {
|
|
7549
7544
|
position: "absolute",
|
|
7550
7545
|
top: "100%",
|
|
7551
7546
|
marginTop: "8px",
|
|
7552
|
-
[
|
|
7553
|
-
backgroundColor:
|
|
7554
|
-
border: `1px solid ${
|
|
7547
|
+
[V ? "left" : "right"]: "0",
|
|
7548
|
+
backgroundColor: z.surfaceElevated,
|
|
7549
|
+
border: `1px solid ${z.border}`,
|
|
7555
7550
|
borderRadius: "12px",
|
|
7556
7551
|
boxShadow: "0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",
|
|
7557
7552
|
width: "min(280px, 90vw)",
|
|
@@ -7582,7 +7577,7 @@ const Ls = [
|
|
|
7582
7577
|
height: T ? "40px" : "48px",
|
|
7583
7578
|
borderRadius: "50%",
|
|
7584
7579
|
objectFit: "cover",
|
|
7585
|
-
border: `2px solid ${
|
|
7580
|
+
border: `2px solid ${z.borderLight}`,
|
|
7586
7581
|
flexShrink: 0
|
|
7587
7582
|
},
|
|
7588
7583
|
dropdownUserInfo: {
|
|
@@ -7594,7 +7589,7 @@ const Ls = [
|
|
|
7594
7589
|
dropdownUserName: {
|
|
7595
7590
|
fontSize: T ? "15px" : "16px",
|
|
7596
7591
|
fontWeight: 600,
|
|
7597
|
-
color:
|
|
7592
|
+
color: z.textPrimary,
|
|
7598
7593
|
lineHeight: "1.2",
|
|
7599
7594
|
marginBottom: "2px",
|
|
7600
7595
|
overflow: "hidden",
|
|
@@ -7602,7 +7597,7 @@ const Ls = [
|
|
|
7602
7597
|
},
|
|
7603
7598
|
dropdownUserEmail: {
|
|
7604
7599
|
fontSize: T ? "13px" : "14px",
|
|
7605
|
-
color:
|
|
7600
|
+
color: z.textSecondary,
|
|
7606
7601
|
lineHeight: "1.2",
|
|
7607
7602
|
overflow: "hidden",
|
|
7608
7603
|
textOverflow: "ellipsis"
|
|
@@ -7615,7 +7610,7 @@ const Ls = [
|
|
|
7615
7610
|
borderRadius: "8px",
|
|
7616
7611
|
cursor: "pointer",
|
|
7617
7612
|
transition: "all 0.15s ease",
|
|
7618
|
-
color:
|
|
7613
|
+
color: z.textPrimary,
|
|
7619
7614
|
textDecoration: "none",
|
|
7620
7615
|
border: "none",
|
|
7621
7616
|
background: "none",
|
|
@@ -7630,7 +7625,7 @@ const Ls = [
|
|
|
7630
7625
|
icon: {
|
|
7631
7626
|
width: T ? "16px" : "18px",
|
|
7632
7627
|
height: T ? "16px" : "18px",
|
|
7633
|
-
color:
|
|
7628
|
+
color: z.textSecondary,
|
|
7634
7629
|
flexShrink: 0
|
|
7635
7630
|
},
|
|
7636
7631
|
logoutButton: {
|
|
@@ -7645,20 +7640,20 @@ const Ls = [
|
|
|
7645
7640
|
border: "none",
|
|
7646
7641
|
width: "100%",
|
|
7647
7642
|
fontSize: T ? "13px" : "14px",
|
|
7648
|
-
color:
|
|
7643
|
+
color: z.error,
|
|
7649
7644
|
textAlign: "left",
|
|
7650
7645
|
outline: "none"
|
|
7651
7646
|
},
|
|
7652
7647
|
loadingText: {
|
|
7653
7648
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7654
7649
|
textAlign: "center",
|
|
7655
|
-
color:
|
|
7650
|
+
color: z.textSecondary,
|
|
7656
7651
|
fontSize: T ? "13px" : "14px"
|
|
7657
7652
|
},
|
|
7658
7653
|
errorState: {
|
|
7659
7654
|
padding: T ? "16px 12px" : "20px 16px",
|
|
7660
7655
|
textAlign: "center",
|
|
7661
|
-
color:
|
|
7656
|
+
color: z.textSecondary,
|
|
7662
7657
|
fontSize: T ? "13px" : "14px",
|
|
7663
7658
|
display: "flex",
|
|
7664
7659
|
alignItems: "center",
|
|
@@ -7669,7 +7664,7 @@ const Ls = [
|
|
|
7669
7664
|
retryButton: {
|
|
7670
7665
|
marginTop: "8px",
|
|
7671
7666
|
padding: "8px 16px",
|
|
7672
|
-
backgroundColor:
|
|
7667
|
+
backgroundColor: z.accent,
|
|
7673
7668
|
color: "#ffffff",
|
|
7674
7669
|
border: "none",
|
|
7675
7670
|
borderRadius: "6px",
|
|
@@ -7678,30 +7673,32 @@ const Ls = [
|
|
|
7678
7673
|
fontWeight: 500,
|
|
7679
7674
|
transition: "background-color 0.2s ease"
|
|
7680
7675
|
}
|
|
7681
|
-
},
|
|
7676
|
+
}, K = async () => {
|
|
7682
7677
|
U(null), I(!0);
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
const k = JSON.parse(
|
|
7687
|
-
M(k)
|
|
7688
|
-
}
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
},
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7678
|
+
try {
|
|
7679
|
+
const x = localStorage.getItem("userInfo");
|
|
7680
|
+
if (x) {
|
|
7681
|
+
const k = JSON.parse(x);
|
|
7682
|
+
M(k);
|
|
7683
|
+
} else o && M(o);
|
|
7684
|
+
} catch (x) {
|
|
7685
|
+
console.error("Retry failed:", x), U("Invalid user data"), localStorage.removeItem("userInfo"), M(null);
|
|
7686
|
+
} finally {
|
|
7687
|
+
I(!1);
|
|
7688
|
+
}
|
|
7689
|
+
}, Q = (x, k) => {
|
|
7690
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7691
|
+
}, X = () => a || C?.profileUrl, f = () => {
|
|
7692
|
+
const x = X();
|
|
7693
|
+
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7694
|
+
}, S = () => {
|
|
7698
7695
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
7699
7696
|
};
|
|
7700
7697
|
return /* @__PURE__ */ r.jsxs(
|
|
7701
7698
|
"div",
|
|
7702
7699
|
{
|
|
7703
7700
|
style: P.wrapper,
|
|
7704
|
-
ref:
|
|
7701
|
+
ref: B,
|
|
7705
7702
|
className: i,
|
|
7706
7703
|
role: "menu",
|
|
7707
7704
|
"aria-label": "User menu",
|
|
@@ -7710,8 +7707,8 @@ const Ls = [
|
|
|
7710
7707
|
"div",
|
|
7711
7708
|
{
|
|
7712
7709
|
ref: F,
|
|
7713
|
-
onClick: () =>
|
|
7714
|
-
onKeyDown: (
|
|
7710
|
+
onClick: () => A((x) => !x),
|
|
7711
|
+
onKeyDown: (x) => Q(x, () => A((k) => !k)),
|
|
7715
7712
|
tabIndex: 0,
|
|
7716
7713
|
role: "button",
|
|
7717
7714
|
"aria-haspopup": "true",
|
|
@@ -7727,12 +7724,12 @@ const Ls = [
|
|
|
7727
7724
|
height: T ? "34px" : "40px",
|
|
7728
7725
|
borderRadius: "50%",
|
|
7729
7726
|
objectFit: "cover",
|
|
7730
|
-
border: `2px solid ${
|
|
7727
|
+
border: `2px solid ${z.borderLight}`,
|
|
7731
7728
|
flexShrink: 0
|
|
7732
7729
|
},
|
|
7733
7730
|
loading: "lazy",
|
|
7734
|
-
onError: (
|
|
7735
|
-
const k =
|
|
7731
|
+
onError: (x) => {
|
|
7732
|
+
const k = x.target;
|
|
7736
7733
|
k.onerror = null, k.src = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
7737
7734
|
C?.name || "User"
|
|
7738
7735
|
)}`;
|
|
@@ -7750,7 +7747,7 @@ const Ls = [
|
|
|
7750
7747
|
height: T ? "34px" : "40px",
|
|
7751
7748
|
borderRadius: "50%",
|
|
7752
7749
|
objectFit: "cover",
|
|
7753
|
-
border: `2px solid ${
|
|
7750
|
+
border: `2px solid ${z.borderLight}`,
|
|
7754
7751
|
flexShrink: 0
|
|
7755
7752
|
},
|
|
7756
7753
|
loading: "lazy"
|
|
@@ -7762,21 +7759,21 @@ const Ls = [
|
|
|
7762
7759
|
{
|
|
7763
7760
|
ref: F,
|
|
7764
7761
|
style: P.avatarButton,
|
|
7765
|
-
onClick: () =>
|
|
7766
|
-
onKeyDown: (
|
|
7762
|
+
onClick: () => A((x) => !x),
|
|
7763
|
+
onKeyDown: (x) => Q(x, () => A((k) => !k)),
|
|
7767
7764
|
tabIndex: 0,
|
|
7768
7765
|
role: "button",
|
|
7769
7766
|
"aria-haspopup": "true",
|
|
7770
7767
|
"aria-expanded": R,
|
|
7771
7768
|
"aria-label": "Toggle user menu",
|
|
7772
|
-
onMouseOver: (
|
|
7773
|
-
|
|
7769
|
+
onMouseOver: (x) => {
|
|
7770
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
7774
7771
|
},
|
|
7775
|
-
onMouseOut: (
|
|
7776
|
-
|
|
7772
|
+
onMouseOut: (x) => {
|
|
7773
|
+
x.currentTarget.style.backgroundColor = z.surface, x.currentTarget.style.boxShadow = "none";
|
|
7777
7774
|
},
|
|
7778
|
-
onBlur: (
|
|
7779
|
-
|
|
7775
|
+
onBlur: (x) => {
|
|
7776
|
+
x.currentTarget.style.outline = "none";
|
|
7780
7777
|
},
|
|
7781
7778
|
children: [
|
|
7782
7779
|
C?.avatarUrl ? /* @__PURE__ */ r.jsx(
|
|
@@ -7786,8 +7783,8 @@ const Ls = [
|
|
|
7786
7783
|
alt: `${C.name}'s avatar`,
|
|
7787
7784
|
style: P.avatarImage,
|
|
7788
7785
|
loading: "lazy",
|
|
7789
|
-
onError: (
|
|
7790
|
-
const k =
|
|
7786
|
+
onError: (x) => {
|
|
7787
|
+
const k = x.target;
|
|
7791
7788
|
k.src = "https://api.dicebear.com/9.x/glass/svg?seed=Kingston";
|
|
7792
7789
|
}
|
|
7793
7790
|
}
|
|
@@ -7824,8 +7821,8 @@ const Ls = [
|
|
|
7824
7821
|
alt: `${C.name}'s profile picture`,
|
|
7825
7822
|
style: P.dropdownAvatar,
|
|
7826
7823
|
loading: "lazy",
|
|
7827
|
-
onError: (
|
|
7828
|
-
const k =
|
|
7824
|
+
onError: (x) => {
|
|
7825
|
+
const k = x.target;
|
|
7829
7826
|
k.src = `https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`;
|
|
7830
7827
|
}
|
|
7831
7828
|
}
|
|
@@ -7844,18 +7841,18 @@ const Ls = [
|
|
|
7844
7841
|
] })
|
|
7845
7842
|
] }),
|
|
7846
7843
|
/* @__PURE__ */ r.jsxs("div", { style: P.dropdownSection, children: [
|
|
7847
|
-
|
|
7844
|
+
h && X() && /* @__PURE__ */ r.jsxs(
|
|
7848
7845
|
"button",
|
|
7849
7846
|
{
|
|
7850
7847
|
style: P.menuItem,
|
|
7851
|
-
onClick:
|
|
7852
|
-
onMouseOver: (
|
|
7853
|
-
|
|
7848
|
+
onClick: f,
|
|
7849
|
+
onMouseOver: (x) => {
|
|
7850
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7854
7851
|
},
|
|
7855
|
-
onMouseOut: (
|
|
7856
|
-
|
|
7852
|
+
onMouseOut: (x) => {
|
|
7853
|
+
x.currentTarget.style.backgroundColor = "transparent";
|
|
7857
7854
|
},
|
|
7858
|
-
onKeyDown: (
|
|
7855
|
+
onKeyDown: (x) => Q(x, f),
|
|
7859
7856
|
role: "menuitem",
|
|
7860
7857
|
tabIndex: 0,
|
|
7861
7858
|
children: [
|
|
@@ -7868,14 +7865,14 @@ const Ls = [
|
|
|
7868
7865
|
"button",
|
|
7869
7866
|
{
|
|
7870
7867
|
style: P.menuItem,
|
|
7871
|
-
onClick:
|
|
7872
|
-
onMouseOver: (
|
|
7873
|
-
|
|
7868
|
+
onClick: S,
|
|
7869
|
+
onMouseOver: (x) => {
|
|
7870
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7874
7871
|
},
|
|
7875
|
-
onMouseOut: (
|
|
7876
|
-
|
|
7872
|
+
onMouseOut: (x) => {
|
|
7873
|
+
x.currentTarget.style.backgroundColor = "transparent";
|
|
7877
7874
|
},
|
|
7878
|
-
onKeyDown: (
|
|
7875
|
+
onKeyDown: (x) => Q(x, S),
|
|
7879
7876
|
role: "menuitem",
|
|
7880
7877
|
tabIndex: 0,
|
|
7881
7878
|
children: [
|
|
@@ -7891,16 +7888,16 @@ const Ls = [
|
|
|
7891
7888
|
target: "_self",
|
|
7892
7889
|
rel: "noopener noreferrer",
|
|
7893
7890
|
style: P.menuItem,
|
|
7894
|
-
onMouseOver: (
|
|
7895
|
-
|
|
7891
|
+
onMouseOver: (x) => {
|
|
7892
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7896
7893
|
},
|
|
7897
|
-
onMouseOut: (
|
|
7898
|
-
|
|
7894
|
+
onMouseOut: (x) => {
|
|
7895
|
+
x.currentTarget.style.backgroundColor = "transparent";
|
|
7899
7896
|
},
|
|
7900
7897
|
role: "menuitem",
|
|
7901
7898
|
tabIndex: 0,
|
|
7902
7899
|
children: [
|
|
7903
|
-
/* @__PURE__ */ r.jsx(
|
|
7900
|
+
/* @__PURE__ */ r.jsx(de, { style: P.icon, "aria-hidden": "true" }),
|
|
7904
7901
|
/* @__PURE__ */ r.jsx("span", { style: P.menuItemText, children: w })
|
|
7905
7902
|
]
|
|
7906
7903
|
}
|
|
@@ -7911,20 +7908,20 @@ const Ls = [
|
|
|
7911
7908
|
{
|
|
7912
7909
|
style: P.logoutButton,
|
|
7913
7910
|
onClick: n,
|
|
7914
|
-
onMouseOver: (
|
|
7915
|
-
|
|
7911
|
+
onMouseOver: (x) => {
|
|
7912
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7916
7913
|
},
|
|
7917
|
-
onMouseOut: (
|
|
7918
|
-
|
|
7914
|
+
onMouseOut: (x) => {
|
|
7915
|
+
x.currentTarget.style.backgroundColor = "transparent";
|
|
7919
7916
|
},
|
|
7920
|
-
onKeyDown: (
|
|
7917
|
+
onKeyDown: (x) => Q(x, n),
|
|
7921
7918
|
role: "menuitem",
|
|
7922
7919
|
tabIndex: 0,
|
|
7923
7920
|
children: [
|
|
7924
7921
|
/* @__PURE__ */ r.jsx(
|
|
7925
|
-
|
|
7922
|
+
dt,
|
|
7926
7923
|
{
|
|
7927
|
-
style: { ...P.icon, color:
|
|
7924
|
+
style: { ...P.icon, color: z.error },
|
|
7928
7925
|
"aria-hidden": "true"
|
|
7929
7926
|
}
|
|
7930
7927
|
),
|
|
@@ -7947,12 +7944,12 @@ const Ls = [
|
|
|
7947
7944
|
"button",
|
|
7948
7945
|
{
|
|
7949
7946
|
style: P.retryButton,
|
|
7950
|
-
onClick:
|
|
7951
|
-
onMouseOver: (
|
|
7952
|
-
|
|
7947
|
+
onClick: K,
|
|
7948
|
+
onMouseOver: (x) => {
|
|
7949
|
+
x.currentTarget.style.backgroundColor = z.accentHover;
|
|
7953
7950
|
},
|
|
7954
|
-
onMouseOut: (
|
|
7955
|
-
|
|
7951
|
+
onMouseOut: (x) => {
|
|
7952
|
+
x.currentTarget.style.backgroundColor = z.accent;
|
|
7956
7953
|
},
|
|
7957
7954
|
children: "Try Again"
|
|
7958
7955
|
}
|
|
@@ -7967,13 +7964,13 @@ const Ls = [
|
|
|
7967
7964
|
primaryColor: n = "#00C212",
|
|
7968
7965
|
onVerify: s
|
|
7969
7966
|
}) => {
|
|
7970
|
-
const { appId: o, baseUrl: i, apiKey: a } = ge(), [l,
|
|
7967
|
+
const { appId: o, baseUrl: i, apiKey: a } = ge(), [l, h] = O({
|
|
7971
7968
|
email: e?.email || "",
|
|
7972
7969
|
otp: "",
|
|
7973
7970
|
appId: o
|
|
7974
7971
|
}), [c, u] = O(!1), [b, y] = O(!1), [w, d] = O(null), j = (g, I) => {
|
|
7975
|
-
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I,
|
|
7976
|
-
return U = Math.min(255, Math.max(0, U)),
|
|
7972
|
+
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, B = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
7973
|
+
return U = Math.min(255, Math.max(0, U)), B = Math.min(255, Math.max(0, B)), F = Math.min(255, Math.max(0, F)), `#${(F | B << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
7977
7974
|
}, m = t ? {
|
|
7978
7975
|
surface: "#09090b",
|
|
7979
7976
|
surfaceLight: "#27272a",
|
|
@@ -7997,8 +7994,8 @@ const Ls = [
|
|
|
7997
7994
|
success: j(n, 0),
|
|
7998
7995
|
warning: "#d97706"
|
|
7999
7996
|
};
|
|
8000
|
-
|
|
8001
|
-
e?.email &&
|
|
7997
|
+
te(() => {
|
|
7998
|
+
e?.email && h((g) => ({ ...g, email: e.email }));
|
|
8002
7999
|
}, [e?.email]);
|
|
8003
8000
|
const _ = (g, I) => {
|
|
8004
8001
|
d({ type: g, message: I }), setTimeout(() => d(null), 3e3);
|
|
@@ -8020,7 +8017,7 @@ const Ls = [
|
|
|
8020
8017
|
} finally {
|
|
8021
8018
|
y(!1);
|
|
8022
8019
|
}
|
|
8023
|
-
},
|
|
8020
|
+
}, A = async (g) => {
|
|
8024
8021
|
if (g.preventDefault(), !l.email || !l.otp) {
|
|
8025
8022
|
_("error", "Please fill in all fields");
|
|
8026
8023
|
return;
|
|
@@ -8030,7 +8027,7 @@ const Ls = [
|
|
|
8030
8027
|
const I = await W.post(`${i}/users/verify-email`, l);
|
|
8031
8028
|
if (I.data.success && e) {
|
|
8032
8029
|
const v = { ...e, isVerified: !0 };
|
|
8033
|
-
s?.(v), _("success", I.data.message || "Email verified!"), u(!1),
|
|
8030
|
+
s?.(v), _("success", I.data.message || "Email verified!"), u(!1), h({ email: e.email, otp: "", appId: o });
|
|
8034
8031
|
} else
|
|
8035
8032
|
_("error", I.data.message || "Verification failed");
|
|
8036
8033
|
} catch (I) {
|
|
@@ -8066,7 +8063,7 @@ const Ls = [
|
|
|
8066
8063
|
return /* @__PURE__ */ r.jsxs(
|
|
8067
8064
|
"form",
|
|
8068
8065
|
{
|
|
8069
|
-
onSubmit:
|
|
8066
|
+
onSubmit: A,
|
|
8070
8067
|
style: {
|
|
8071
8068
|
display: "flex",
|
|
8072
8069
|
flexDirection: "column",
|
|
@@ -8102,7 +8099,7 @@ const Ls = [
|
|
|
8102
8099
|
/* @__PURE__ */ r.jsx("label", { style: { color: m.textSecondary }, children: "Email" }),
|
|
8103
8100
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
8104
8101
|
/* @__PURE__ */ r.jsx(
|
|
8105
|
-
|
|
8102
|
+
de,
|
|
8106
8103
|
{
|
|
8107
8104
|
size: 18,
|
|
8108
8105
|
style: {
|
|
@@ -8120,7 +8117,7 @@ const Ls = [
|
|
|
8120
8117
|
{
|
|
8121
8118
|
type: "email",
|
|
8122
8119
|
value: l.email,
|
|
8123
|
-
onChange: (g) =>
|
|
8120
|
+
onChange: (g) => h((I) => ({ ...I, email: g.target.value })),
|
|
8124
8121
|
placeholder: "Enter your email",
|
|
8125
8122
|
style: C,
|
|
8126
8123
|
required: !0
|
|
@@ -8132,7 +8129,7 @@ const Ls = [
|
|
|
8132
8129
|
/* @__PURE__ */ r.jsx("label", { style: { color: m.textSecondary }, children: "OTP" }),
|
|
8133
8130
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
8134
8131
|
/* @__PURE__ */ r.jsx(
|
|
8135
|
-
|
|
8132
|
+
ct,
|
|
8136
8133
|
{
|
|
8137
8134
|
size: 18,
|
|
8138
8135
|
style: {
|
|
@@ -8150,7 +8147,7 @@ const Ls = [
|
|
|
8150
8147
|
{
|
|
8151
8148
|
type: "text",
|
|
8152
8149
|
value: l.otp,
|
|
8153
|
-
onChange: (g) =>
|
|
8150
|
+
onChange: (g) => h((I) => ({ ...I, otp: g.target.value })),
|
|
8154
8151
|
placeholder: "Enter OTP",
|
|
8155
8152
|
style: C,
|
|
8156
8153
|
required: !0
|
|
@@ -8159,7 +8156,7 @@ const Ls = [
|
|
|
8159
8156
|
] })
|
|
8160
8157
|
] }),
|
|
8161
8158
|
/* @__PURE__ */ r.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ r.jsxs("button", { type: "submit", disabled: b, style: M(b), children: [
|
|
8162
|
-
b ? /* @__PURE__ */ r.jsx(
|
|
8159
|
+
b ? /* @__PURE__ */ r.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ce, { size: 16 }),
|
|
8163
8160
|
b ? "Verifying..." : "Verify Email"
|
|
8164
8161
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
8165
8162
|
"button",
|
|
@@ -8169,7 +8166,7 @@ const Ls = [
|
|
|
8169
8166
|
disabled: b,
|
|
8170
8167
|
style: M(b),
|
|
8171
8168
|
children: [
|
|
8172
|
-
b ? /* @__PURE__ */ r.jsx(
|
|
8169
|
+
b ? /* @__PURE__ */ r.jsx(oe, { size: 16, className: "spinner" }) : /* @__PURE__ */ r.jsx(ut, { size: 16 }),
|
|
8173
8170
|
b ? "Sending..." : "Send OTP"
|
|
8174
8171
|
]
|
|
8175
8172
|
}
|