@neuctra/authix 1.2.28 → 1.2.30
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 +977 -1083
- package/dist/neuctra-authix.umd.js +53 -53
- package/dist/sdk/index.d.ts +33 -128
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import Ce, { forwardRef as
|
|
1
|
+
import Ce, { forwardRef as zt, createElement as Ke, createContext as cr, useContext as dr, useState as P, useEffect as ee, useRef as ut } from "react";
|
|
2
2
|
function Ut(t, e) {
|
|
3
3
|
return function() {
|
|
4
4
|
return t.apply(e, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: ur } = Object.prototype, { getPrototypeOf: nt } = Object, { iterator:
|
|
7
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: nt } = Object, { iterator: Fe, toStringTag: _t } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const n = ur.call(e);
|
|
9
9
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (t) => (t = t.toLowerCase(), (e) => Le(e) === t), qe = (t) => (e) => typeof e === t, { isArray: je } = Array, we = qe("undefined");
|
|
11
11
|
function Te(t) {
|
|
12
12
|
return t !== null && !we(t) && t.constructor !== null && !we(t.constructor) && te(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const $t =
|
|
14
|
+
const $t = oe("ArrayBuffer");
|
|
15
15
|
function pr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && $t(t.buffer), e;
|
|
18
18
|
}
|
|
19
19
|
const fr = qe("string"), te = qe("function"), Dt = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, Ue = (t) => {
|
|
20
|
-
if (
|
|
20
|
+
if (Le(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = nt(t);
|
|
23
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(
|
|
23
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(Fe in t);
|
|
24
24
|
}, hr = (t) => {
|
|
25
25
|
if (!Re(t) || Te(t))
|
|
26
26
|
return !1;
|
|
@@ -29,11 +29,11 @@ const fr = qe("string"), te = qe("function"), Dt = qe("number"), Re = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, mr =
|
|
32
|
+
}, mr = oe("Date"), gr = oe("File"), yr = oe("Blob"), br = oe("FileList"), wr = (t) => Re(t) && te(t.pipe), jr = (t) => {
|
|
33
33
|
let e;
|
|
34
|
-
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e =
|
|
34
|
+
return t && (typeof FormData == "function" && t instanceof FormData || te(t.append) && ((e = Le(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && te(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, vr =
|
|
36
|
+
}, vr = oe("URLSearchParams"), [Sr, kr, Er, Cr] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Tr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
@@ -44,10 +44,10 @@ function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
44
44
|
else {
|
|
45
45
|
if (Te(t))
|
|
46
46
|
return;
|
|
47
|
-
const
|
|
47
|
+
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), a = o.length;
|
|
48
48
|
let c;
|
|
49
|
-
for (s = 0; s <
|
|
50
|
-
c =
|
|
49
|
+
for (s = 0; s < a; s++)
|
|
50
|
+
c = o[s], e.call(null, t[c], c, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
function Nt(t, e) {
|
|
@@ -61,37 +61,37 @@ function Nt(t, e) {
|
|
|
61
61
|
return i;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
64
|
+
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ft = (t) => !we(t) && t !== fe;
|
|
65
65
|
function Ge() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } =
|
|
67
|
-
const
|
|
68
|
-
Ue(n[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Ft(this) && this || {}, n = {}, s = (i, o) => {
|
|
67
|
+
const a = t && Nt(n, o) || o;
|
|
68
|
+
Ue(n[a]) && Ue(i) ? n[a] = Ge(n[a], i) : Ue(i) ? n[a] = Ge({}, i) : je(i) ? n[a] = i.slice() : (!e || !we(i)) && (n[a] = i);
|
|
69
69
|
};
|
|
70
|
-
for (let i = 0,
|
|
70
|
+
for (let i = 0, o = arguments.length; i < o; i++)
|
|
71
71
|
arguments[i] && Pe(arguments[i], s);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i,
|
|
75
|
-
n && te(i) ? t[
|
|
74
|
+
const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, o) => {
|
|
75
|
+
n && te(i) ? t[o] = Ut(i, n) : t[o] = i;
|
|
76
76
|
}, { allOwnKeys: s }), t), Pr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ir = (t, e, n, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
78
78
|
value: e.prototype
|
|
79
79
|
}), n && Object.assign(t.prototype, n);
|
|
80
80
|
}, Or = (t, e, n, s) => {
|
|
81
|
-
let i,
|
|
81
|
+
let i, o, a;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (i = Object.getOwnPropertyNames(t),
|
|
86
|
-
|
|
85
|
+
for (i = Object.getOwnPropertyNames(t), o = i.length; o-- > 0; )
|
|
86
|
+
a = i[o], (!s || s(a, t, e)) && !c[a] && (e[a] = t[a], c[a] = !0);
|
|
87
87
|
t = n !== !1 && nt(t);
|
|
88
88
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
90
|
-
},
|
|
90
|
+
}, Ar = (t, e, n) => {
|
|
91
91
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
92
92
|
const s = t.indexOf(e, n);
|
|
93
93
|
return s !== -1 && s === n;
|
|
94
|
-
},
|
|
94
|
+
}, zr = (t) => {
|
|
95
95
|
if (!t) return null;
|
|
96
96
|
if (je(t)) return t;
|
|
97
97
|
let e = t.length;
|
|
@@ -101,11 +101,11 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
101
101
|
n[e] = t[e];
|
|
102
102
|
return n;
|
|
103
103
|
}, Ur = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && nt(Uint8Array)), _r = (t, e) => {
|
|
104
|
-
const s = (t && t[
|
|
104
|
+
const s = (t && t[Fe]).call(t);
|
|
105
105
|
let i;
|
|
106
106
|
for (; (i = s.next()) && !i.done; ) {
|
|
107
|
-
const
|
|
108
|
-
e.call(t,
|
|
107
|
+
const o = i.value;
|
|
108
|
+
e.call(t, o[0], o[1]);
|
|
109
109
|
}
|
|
110
110
|
}, $r = (t, e) => {
|
|
111
111
|
let n;
|
|
@@ -113,19 +113,19 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
113
113
|
for (; (n = t.exec(e)) !== null; )
|
|
114
114
|
s.push(n);
|
|
115
115
|
return s;
|
|
116
|
-
}, Dr =
|
|
116
|
+
}, Dr = oe("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(n, s, i) {
|
|
119
119
|
return s.toUpperCase() + i;
|
|
120
120
|
}
|
|
121
|
-
), pt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype),
|
|
121
|
+
), pt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Fr = oe("RegExp"), Lt = (t, e) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Pe(n, (i,
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Pe(n, (i, o) => {
|
|
124
|
+
let a;
|
|
125
|
+
(a = e(i, o, t)) !== !1 && (s[o] = a || i);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, Lr = (t) => {
|
|
128
|
+
Lt(t, (e, n) => {
|
|
129
129
|
if (te(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const s = t[n];
|
|
@@ -141,15 +141,15 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
|
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
143
|
const n = {}, s = (i) => {
|
|
144
|
-
i.forEach((
|
|
145
|
-
n[
|
|
144
|
+
i.forEach((o) => {
|
|
145
|
+
n[o] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return je(t) ? s(t) : s(String(t).split(e)), n;
|
|
149
149
|
}, Mr = () => {
|
|
150
150
|
}, Wr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
151
|
function Br(t) {
|
|
152
|
-
return !!(t && te(t.append) && t[_t] === "FormData" && t[
|
|
152
|
+
return !!(t && te(t.append) && t[_t] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Hr = (t) => {
|
|
155
155
|
const e = new Array(10), n = (s, i) => {
|
|
@@ -160,24 +160,24 @@ const Hr = (t) => {
|
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[i] = s;
|
|
163
|
-
const
|
|
164
|
-
return Pe(s, (
|
|
165
|
-
const d = n(
|
|
166
|
-
!we(d) && (
|
|
167
|
-
}), e[i] = void 0,
|
|
163
|
+
const o = je(s) ? [] : {};
|
|
164
|
+
return Pe(s, (a, c) => {
|
|
165
|
+
const d = n(a, i + 1);
|
|
166
|
+
!we(d) && (o[c] = d);
|
|
167
|
+
}), e[i] = void 0, o;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return n(t, 0);
|
|
173
|
-
}, Vr =
|
|
174
|
-
i === fe &&
|
|
173
|
+
}, Vr = oe("AsyncFunction"), Yr = (t) => t && (Re(t) || te(t)) && te(t.then) && te(t.catch), qt = ((t, e) => t ? setImmediate : e ? ((n, s) => (fe.addEventListener("message", ({ source: i, data: o }) => {
|
|
174
|
+
i === fe && o === n && s.length && s.shift()();
|
|
175
175
|
}, !1), (i) => {
|
|
176
176
|
s.push(i), fe.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
te(fe.postMessage)
|
|
180
|
-
),
|
|
180
|
+
), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || qt, Kr = (t) => t != null && te(t[Fe]), p = {
|
|
181
181
|
isArray: je,
|
|
182
182
|
isArrayBuffer: $t,
|
|
183
183
|
isBuffer: Te,
|
|
@@ -197,7 +197,7 @@ const Hr = (t) => {
|
|
|
197
197
|
isDate: mr,
|
|
198
198
|
isFile: gr,
|
|
199
199
|
isBlob: yr,
|
|
200
|
-
isRegExp:
|
|
200
|
+
isRegExp: Fr,
|
|
201
201
|
isFunction: te,
|
|
202
202
|
isStream: wr,
|
|
203
203
|
isURLSearchParams: vr,
|
|
@@ -210,37 +210,37 @@ const Hr = (t) => {
|
|
|
210
210
|
stripBOM: Pr,
|
|
211
211
|
inherits: Ir,
|
|
212
212
|
toFlatObject: Or,
|
|
213
|
-
kindOf:
|
|
214
|
-
kindOfTest:
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
213
|
+
kindOf: Le,
|
|
214
|
+
kindOfTest: oe,
|
|
215
|
+
endsWith: Ar,
|
|
216
|
+
toArray: zr,
|
|
217
217
|
forEachEntry: _r,
|
|
218
218
|
matchAll: $r,
|
|
219
219
|
isHTMLForm: Dr,
|
|
220
220
|
hasOwnProperty: pt,
|
|
221
221
|
hasOwnProp: pt,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
223
|
+
reduceDescriptors: Lt,
|
|
224
|
+
freezeMethods: Lr,
|
|
225
225
|
toObjectSet: qr,
|
|
226
226
|
toCamelCase: Nr,
|
|
227
227
|
noop: Mr,
|
|
228
228
|
toFiniteNumber: Wr,
|
|
229
229
|
findKey: Nt,
|
|
230
230
|
global: fe,
|
|
231
|
-
isContextDefined:
|
|
231
|
+
isContextDefined: Ft,
|
|
232
232
|
isSpecCompliantForm: Br,
|
|
233
233
|
toJSONObject: Hr,
|
|
234
234
|
isAsyncFn: Vr,
|
|
235
235
|
isThenable: Yr,
|
|
236
236
|
setImmediate: qt,
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
237
|
+
asap: Jr,
|
|
238
|
+
isIterable: Kr
|
|
239
239
|
};
|
|
240
240
|
function $(t, e, n, s, i) {
|
|
241
241
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), s && (this.request = s), i && (this.response = i, this.status = i.status ? i.status : null);
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
p.inherits($, Error, {
|
|
244
244
|
toJSON: function() {
|
|
245
245
|
return {
|
|
246
246
|
// Standard
|
|
@@ -255,7 +255,7 @@ f.inherits($, Error, {
|
|
|
255
255
|
columnNumber: this.columnNumber,
|
|
256
256
|
stack: this.stack,
|
|
257
257
|
// Axios
|
|
258
|
-
config:
|
|
258
|
+
config: p.toJSONObject(this.config),
|
|
259
259
|
code: this.code,
|
|
260
260
|
status: this.status
|
|
261
261
|
};
|
|
@@ -281,92 +281,92 @@ const Mt = $.prototype, Wt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties($, Wt);
|
|
283
283
|
Object.defineProperty(Mt, "isAxiosError", { value: !0 });
|
|
284
|
-
$.from = (t, e, n, s, i,
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
return
|
|
288
|
-
}, (
|
|
284
|
+
$.from = (t, e, n, s, i, o) => {
|
|
285
|
+
const a = Object.create(Mt);
|
|
286
|
+
p.toFlatObject(t, a, function(x) {
|
|
287
|
+
return x !== Error.prototype;
|
|
288
|
+
}, (f) => f !== "isAxiosError");
|
|
289
289
|
const c = t && t.message ? t.message : "Error", d = e == null && t ? t.code : e;
|
|
290
|
-
return $.call(
|
|
290
|
+
return $.call(a, c, d, n, s, i), t && a.cause == null && Object.defineProperty(a, "cause", { value: t, configurable: !0 }), a.name = t && t.name || "Error", o && Object.assign(a, o), a;
|
|
291
291
|
};
|
|
292
292
|
const Gr = null;
|
|
293
293
|
function Xe(t) {
|
|
294
|
-
return
|
|
294
|
+
return p.isPlainObject(t) || p.isArray(t);
|
|
295
295
|
}
|
|
296
296
|
function Bt(t) {
|
|
297
|
-
return
|
|
297
|
+
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function ft(t, e, n) {
|
|
300
|
-
return t ? t.concat(e).map(function(i,
|
|
301
|
-
return i = Bt(i), !n &&
|
|
300
|
+
return t ? t.concat(e).map(function(i, o) {
|
|
301
|
+
return i = Bt(i), !n && o ? "[" + i + "]" : i;
|
|
302
302
|
}).join(n ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Xr(t) {
|
|
305
|
-
return
|
|
305
|
+
return p.isArray(t) && !t.some(Xe);
|
|
306
306
|
}
|
|
307
|
-
const Zr =
|
|
307
|
+
const Zr = p.toFlatObject(p, {}, null, function(e) {
|
|
308
308
|
return /^is[A-Z]/.test(e);
|
|
309
309
|
});
|
|
310
310
|
function Me(t, e, n) {
|
|
311
|
-
if (!
|
|
311
|
+
if (!p.isObject(t))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
|
-
e = e || new FormData(), n =
|
|
313
|
+
e = e || new FormData(), n = p.toFlatObject(n, {
|
|
314
314
|
metaTokens: !0,
|
|
315
315
|
dots: !1,
|
|
316
316
|
indexes: !1
|
|
317
317
|
}, !1, function(w, h) {
|
|
318
|
-
return !
|
|
318
|
+
return !p.isUndefined(h[w]);
|
|
319
319
|
});
|
|
320
|
-
const s = n.metaTokens, i = n.visitor ||
|
|
321
|
-
if (!
|
|
320
|
+
const s = n.metaTokens, i = n.visitor || x, o = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
|
+
if (!p.isFunction(i))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function
|
|
323
|
+
function f(u) {
|
|
324
324
|
if (u === null) return "";
|
|
325
|
-
if (
|
|
325
|
+
if (p.isDate(u))
|
|
326
326
|
return u.toISOString();
|
|
327
|
-
if (
|
|
327
|
+
if (p.isBoolean(u))
|
|
328
328
|
return u.toString();
|
|
329
|
-
if (!d &&
|
|
329
|
+
if (!d && p.isBlob(u))
|
|
330
330
|
throw new $("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return
|
|
331
|
+
return p.isArrayBuffer(u) || p.isTypedArray(u) ? d && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function x(u, w, h) {
|
|
334
334
|
let I = u;
|
|
335
335
|
if (u && !h && typeof u == "object") {
|
|
336
|
-
if (
|
|
336
|
+
if (p.endsWith(w, "{}"))
|
|
337
337
|
w = s ? w : w.slice(0, -2), u = JSON.stringify(u);
|
|
338
|
-
else if (
|
|
338
|
+
else if (p.isArray(u) && Xr(u) || (p.isFileList(u) || p.endsWith(w, "[]")) && (I = p.toArray(u)))
|
|
339
339
|
return w = Bt(w), I.forEach(function(g, U) {
|
|
340
|
-
!(
|
|
340
|
+
!(p.isUndefined(g) || g === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
a === !0 ? ft([w], U, o) : a === null ? w : w + "[]",
|
|
343
|
+
f(g)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Xe(u) ? !0 : (e.append(ft(h, w,
|
|
347
|
+
return Xe(u) ? !0 : (e.append(ft(h, w, o), f(u)), !1);
|
|
348
348
|
}
|
|
349
349
|
const y = [], k = Object.assign(Zr, {
|
|
350
|
-
defaultVisitor:
|
|
351
|
-
convertValue:
|
|
350
|
+
defaultVisitor: x,
|
|
351
|
+
convertValue: f,
|
|
352
352
|
isVisitable: Xe
|
|
353
353
|
});
|
|
354
354
|
function E(u, w) {
|
|
355
|
-
if (!
|
|
355
|
+
if (!p.isUndefined(u)) {
|
|
356
356
|
if (y.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + w.join("."));
|
|
358
|
-
y.push(u),
|
|
359
|
-
(!(
|
|
358
|
+
y.push(u), p.forEach(u, function(I, C) {
|
|
359
|
+
(!(p.isUndefined(I) || I === null) && i.call(
|
|
360
360
|
e,
|
|
361
361
|
I,
|
|
362
|
-
|
|
362
|
+
p.isString(C) ? C.trim() : C,
|
|
363
363
|
w,
|
|
364
364
|
k
|
|
365
365
|
)) === !0 && E(I, w ? w.concat(C) : [C]);
|
|
366
366
|
}), y.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
if (!
|
|
369
|
+
if (!p.isObject(t))
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return E(t), e;
|
|
372
372
|
}
|
|
@@ -406,14 +406,14 @@ function Vt(t, e, n) {
|
|
|
406
406
|
if (!e)
|
|
407
407
|
return t;
|
|
408
408
|
const s = n && n.encode || Qr;
|
|
409
|
-
|
|
409
|
+
p.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
412
|
const i = n && n.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (i ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let o;
|
|
414
|
+
if (i ? o = i(e, n) : o = p.isURLSearchParams(e) ? e.toString() : new st(e, n).toString(s), o) {
|
|
415
|
+
const a = t.indexOf("#");
|
|
416
|
+
a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -466,7 +466,7 @@ class ht {
|
|
|
466
466
|
* @returns {void}
|
|
467
467
|
*/
|
|
468
468
|
forEach(e) {
|
|
469
|
-
|
|
469
|
+
p.forEach(this.handlers, function(s) {
|
|
470
470
|
s !== null && e(s);
|
|
471
471
|
});
|
|
472
472
|
}
|
|
@@ -483,57 +483,57 @@ const Yt = {
|
|
|
483
483
|
Blob: rn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, it = typeof window < "u" && typeof document < "u", Ze = typeof navigator == "object" && navigator || void 0, sn = it && (!Ze || ["ReactNative", "NativeScript", "NS"].indexOf(Ze.product) < 0),
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, it = typeof window < "u" && typeof document < "u", Ze = typeof navigator == "object" && navigator || void 0, sn = it && (!Ze || ["ReactNative", "NativeScript", "NS"].indexOf(Ze.product) < 0), on = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", an = it && window.location.href || "http://localhost", ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: it,
|
|
490
490
|
hasStandardBrowserEnv: sn,
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: on,
|
|
492
492
|
navigator: Ze,
|
|
493
|
-
origin:
|
|
493
|
+
origin: an
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), Q = {
|
|
495
495
|
...ln,
|
|
496
496
|
...nn
|
|
497
497
|
};
|
|
498
498
|
function cn(t, e) {
|
|
499
499
|
return Me(t, new Q.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(n, s, i,
|
|
501
|
-
return Q.isNode &&
|
|
500
|
+
visitor: function(n, s, i, o) {
|
|
501
|
+
return Q.isNode && p.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
function dn(t) {
|
|
507
|
-
return
|
|
507
|
+
return p.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
508
508
|
}
|
|
509
509
|
function un(t) {
|
|
510
510
|
const e = {}, n = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
512
|
const i = n.length;
|
|
513
|
-
let
|
|
513
|
+
let o;
|
|
514
514
|
for (s = 0; s < i; s++)
|
|
515
|
-
|
|
515
|
+
o = n[s], e[o] = t[o];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
function e(n, s, i,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const c = Number.isFinite(+
|
|
523
|
-
return
|
|
518
|
+
function Jt(t) {
|
|
519
|
+
function e(n, s, i, o) {
|
|
520
|
+
let a = n[o++];
|
|
521
|
+
if (a === "__proto__") return !0;
|
|
522
|
+
const c = Number.isFinite(+a), d = o >= n.length;
|
|
523
|
+
return a = !a && p.isArray(i) ? i.length : a, d ? (p.hasOwnProp(i, a) ? i[a] = [i[a], s] : i[a] = s, !c) : ((!i[a] || !p.isObject(i[a])) && (i[a] = []), e(n, s, i[a], o) && p.isArray(i[a]) && (i[a] = un(i[a])), !c);
|
|
524
524
|
}
|
|
525
|
-
if (
|
|
525
|
+
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const n = {};
|
|
527
|
-
return
|
|
527
|
+
return p.forEachEntry(t, (s, i) => {
|
|
528
528
|
e(dn(s), i, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
533
|
function pn(t, e, n) {
|
|
534
|
-
if (
|
|
534
|
+
if (p.isString(t))
|
|
535
535
|
try {
|
|
536
|
-
return (e || JSON.parse)(t),
|
|
536
|
+
return (e || JSON.parse)(t), p.trim(t);
|
|
537
537
|
} catch (s) {
|
|
538
538
|
if (s.name !== "SyntaxError")
|
|
539
539
|
throw s;
|
|
@@ -544,20 +544,20 @@ const Ie = {
|
|
|
544
544
|
transitional: Yt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, n) {
|
|
547
|
-
const s = n.getContentType() || "", i = s.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
549
|
-
return i ? JSON.stringify(
|
|
550
|
-
if (
|
|
547
|
+
const s = n.getContentType() || "", i = s.indexOf("application/json") > -1, o = p.isObject(e);
|
|
548
|
+
if (o && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
|
+
return i ? JSON.stringify(Jt(e)) : e;
|
|
550
|
+
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e) || p.isReadableStream(e))
|
|
551
551
|
return e;
|
|
552
|
-
if (
|
|
552
|
+
if (p.isArrayBufferView(e))
|
|
553
553
|
return e.buffer;
|
|
554
|
-
if (
|
|
554
|
+
if (p.isURLSearchParams(e))
|
|
555
555
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (o) {
|
|
558
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return cn(e, this.formSerializer).toString();
|
|
560
|
-
if ((c =
|
|
560
|
+
if ((c = p.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const d = this.env && this.env.FormData;
|
|
562
562
|
return Me(
|
|
563
563
|
c ? { "files[]": e } : e,
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return o || i ? (n.setContentType("application/json", !1), pn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
572
|
const n = this.transitional || Ie.transitional, s = n && n.forcedJSONParsing, i = this.responseType === "json";
|
|
573
|
-
if (
|
|
573
|
+
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e &&
|
|
576
|
-
const
|
|
575
|
+
if (e && p.isString(e) && (s && !this.responseType || i)) {
|
|
576
|
+
const a = !(n && n.silentJSONParsing) && i;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (c) {
|
|
580
|
-
if (
|
|
580
|
+
if (a)
|
|
581
581
|
throw c.name === "SyntaxError" ? $.from(c, $.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -606,10 +606,10 @@ const Ie = {
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
|
-
|
|
609
|
+
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
610
|
Ie.headers[t] = {};
|
|
611
611
|
});
|
|
612
|
-
const fn =
|
|
612
|
+
const fn = p.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -631,15 +631,15 @@ const fn = f.toObjectSet([
|
|
|
631
631
|
const e = {};
|
|
632
632
|
let n, s, i;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
i =
|
|
634
|
+
`).forEach(function(a) {
|
|
635
|
+
i = a.indexOf(":"), n = a.substring(0, i).trim().toLowerCase(), s = a.substring(i + 1).trim(), !(!n || e[n] && fn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(s) : e[n] = [s] : e[n] = e[n] ? e[n] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, mt = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
639
639
|
return t && String(t).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
641
|
function _e(t) {
|
|
642
|
-
return t === !1 || t == null ? t :
|
|
642
|
+
return t === !1 || t == null ? t : p.isArray(t) ? t.map(_e) : String(t);
|
|
643
643
|
}
|
|
644
644
|
function hn(t) {
|
|
645
645
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -650,12 +650,12 @@ function hn(t) {
|
|
|
650
650
|
}
|
|
651
651
|
const mn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
652
|
function He(t, e, n, s, i) {
|
|
653
|
-
if (
|
|
653
|
+
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, e, n);
|
|
655
|
-
if (i && (e = n), !!
|
|
656
|
-
if (
|
|
655
|
+
if (i && (e = n), !!p.isString(e)) {
|
|
656
|
+
if (p.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
|
-
if (
|
|
658
|
+
if (p.isRegExp(s))
|
|
659
659
|
return s.test(e);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
@@ -663,11 +663,11 @@ function gn(t) {
|
|
|
663
663
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, s) => n.toUpperCase() + s);
|
|
664
664
|
}
|
|
665
665
|
function yn(t, e) {
|
|
666
|
-
const n =
|
|
666
|
+
const n = p.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + n, {
|
|
669
|
-
value: function(i,
|
|
670
|
-
return this[s].call(this, e, i,
|
|
669
|
+
value: function(i, o, a) {
|
|
670
|
+
return this[s].call(this, e, i, o, a);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,42 +679,42 @@ let re = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(e, n, s) {
|
|
681
681
|
const i = this;
|
|
682
|
-
function
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
682
|
+
function o(c, d, f) {
|
|
683
|
+
const x = Se(d);
|
|
684
|
+
if (!x)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const y =
|
|
687
|
-
(!y || i[y] === void 0 ||
|
|
686
|
+
const y = p.findKey(i, x);
|
|
687
|
+
(!y || i[y] === void 0 || f === !0 || f === void 0 && i[y] !== !1) && (i[y || d] = _e(c));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
else if (
|
|
693
|
-
|
|
694
|
-
else if (
|
|
695
|
-
let c = {}, d,
|
|
696
|
-
for (const
|
|
697
|
-
if (!
|
|
689
|
+
const a = (c, d) => p.forEach(c, (f, x) => o(f, x, d));
|
|
690
|
+
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
+
a(e, n);
|
|
692
|
+
else if (p.isString(e) && (e = e.trim()) && !mn(e))
|
|
693
|
+
a(xn(e), n);
|
|
694
|
+
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
|
+
let c = {}, d, f;
|
|
696
|
+
for (const x of e) {
|
|
697
|
+
if (!p.isArray(x))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
c[
|
|
699
|
+
c[f = x[0]] = (d = c[f]) ? p.isArray(d) ? [...d, x[1]] : [d, x[1]] : x[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
a(c, n);
|
|
702
702
|
} else
|
|
703
|
-
e != null &&
|
|
703
|
+
e != null && o(n, e, s);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, n) {
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
|
-
const s =
|
|
708
|
+
const s = p.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
710
|
const i = this[s];
|
|
711
711
|
if (!n)
|
|
712
712
|
return i;
|
|
713
713
|
if (n === !0)
|
|
714
714
|
return hn(i);
|
|
715
|
-
if (
|
|
715
|
+
if (p.isFunction(n))
|
|
716
716
|
return n.call(this, i, s);
|
|
717
|
-
if (
|
|
717
|
+
if (p.isRegExp(n))
|
|
718
718
|
return n.exec(i);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
@@ -722,7 +722,7 @@ let re = class {
|
|
|
722
722
|
}
|
|
723
723
|
has(e, n) {
|
|
724
724
|
if (e = Se(e), e) {
|
|
725
|
-
const s =
|
|
725
|
+
const s = p.findKey(this, e);
|
|
726
726
|
return !!(s && this[s] !== void 0 && (!n || He(this, this[s], s, n)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
@@ -730,33 +730,33 @@ let re = class {
|
|
|
730
730
|
delete(e, n) {
|
|
731
731
|
const s = this;
|
|
732
732
|
let i = !1;
|
|
733
|
-
function a
|
|
734
|
-
if (
|
|
735
|
-
const c =
|
|
733
|
+
function o(a) {
|
|
734
|
+
if (a = Se(a), a) {
|
|
735
|
+
const c = p.findKey(s, a);
|
|
736
736
|
c && (!n || He(s, s[c], c, n)) && (delete s[c], i = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return
|
|
739
|
+
return p.isArray(e) ? e.forEach(o) : o(e), i;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const n = Object.keys(this);
|
|
743
743
|
let s = n.length, i = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!e || He(this, this[
|
|
745
|
+
const o = n[s];
|
|
746
|
+
(!e || He(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
747
747
|
}
|
|
748
748
|
return i;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const n = this, s = {};
|
|
752
|
-
return
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
n[
|
|
752
|
+
return p.forEach(this, (i, o) => {
|
|
753
|
+
const a = p.findKey(s, o);
|
|
754
|
+
if (a) {
|
|
755
|
+
n[a] = _e(i), delete n[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = e ? gn(
|
|
759
|
-
c !==
|
|
758
|
+
const c = e ? gn(o) : String(o).trim();
|
|
759
|
+
c !== o && delete n[o], n[c] = _e(i), s[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let re = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const n = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return
|
|
768
|
-
s != null && s !== !1 && (n[i] = e &&
|
|
767
|
+
return p.forEach(this, (s, i) => {
|
|
768
|
+
s != null && s !== !1 && (n[i] = e && p.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), n;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -792,15 +792,15 @@ let re = class {
|
|
|
792
792
|
const s = (this[mt] = this[mt] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, i = this.prototype;
|
|
795
|
-
function a
|
|
796
|
-
const c = Se(
|
|
797
|
-
s[c] || (yn(i,
|
|
795
|
+
function o(a) {
|
|
796
|
+
const c = Se(a);
|
|
797
|
+
s[c] || (yn(i, a), s[c] = !0);
|
|
798
798
|
}
|
|
799
|
-
return
|
|
799
|
+
return p.isArray(e) ? e.forEach(o) : o(e), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
re.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
803
|
-
|
|
803
|
+
p.reduceDescriptors(re.prototype, ({ value: t }, e) => {
|
|
804
804
|
let n = e[0].toUpperCase() + e.slice(1);
|
|
805
805
|
return {
|
|
806
806
|
get: () => t,
|
|
@@ -809,21 +809,21 @@ f.reduceDescriptors(re.prototype, ({ value: t }, e) => {
|
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
|
-
|
|
812
|
+
p.freezeMethods(re);
|
|
813
813
|
function Ve(t, e) {
|
|
814
814
|
const n = this || Ie, s = e || n, i = re.from(s.headers);
|
|
815
|
-
let
|
|
816
|
-
return
|
|
817
|
-
|
|
818
|
-
}), i.normalize(),
|
|
815
|
+
let o = s.data;
|
|
816
|
+
return p.forEach(t, function(c) {
|
|
817
|
+
o = c.call(n, o, i.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), i.normalize(), o;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Kt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
822
822
|
}
|
|
823
823
|
function ve(t, e, n) {
|
|
824
824
|
$.call(this, t ?? "canceled", $.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
p.inherits(ve, $, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
829
|
function Gt(t, e, n) {
|
|
@@ -843,45 +843,45 @@ function bn(t) {
|
|
|
843
843
|
function wn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const n = new Array(t), s = new Array(t);
|
|
846
|
-
let i = 0,
|
|
846
|
+
let i = 0, o = 0, a;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(d) {
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
let y =
|
|
848
|
+
const f = Date.now(), x = s[o];
|
|
849
|
+
a || (a = f), n[i] = d, s[i] = f;
|
|
850
|
+
let y = o, k = 0;
|
|
851
851
|
for (; y !== i; )
|
|
852
852
|
k += n[y++], y = y % t;
|
|
853
|
-
if (i = (i + 1) % t, i ===
|
|
853
|
+
if (i = (i + 1) % t, i === o && (o = (o + 1) % t), f - a < e)
|
|
854
854
|
return;
|
|
855
|
-
const E =
|
|
855
|
+
const E = x && f - x;
|
|
856
856
|
return E ? Math.round(k * 1e3 / E) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function jn(t, e) {
|
|
860
|
-
let n = 0, s = 1e3 / e, i,
|
|
861
|
-
const
|
|
862
|
-
n =
|
|
860
|
+
let n = 0, s = 1e3 / e, i, o;
|
|
861
|
+
const a = (f, x = Date.now()) => {
|
|
862
|
+
n = x, i = null, o && (clearTimeout(o), o = null), t(...f);
|
|
863
863
|
};
|
|
864
|
-
return [(...
|
|
865
|
-
const
|
|
866
|
-
y >= s ?
|
|
867
|
-
|
|
864
|
+
return [(...f) => {
|
|
865
|
+
const x = Date.now(), y = x - n;
|
|
866
|
+
y >= s ? a(f, x) : (i = f, o || (o = setTimeout(() => {
|
|
867
|
+
o = null, a(i);
|
|
868
868
|
}, s - y)));
|
|
869
|
-
}, () => i &&
|
|
869
|
+
}, () => i && a(i)];
|
|
870
870
|
}
|
|
871
871
|
const Ne = (t, e, n = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
873
|
const i = wn(50, 250);
|
|
874
|
-
return jn((
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
874
|
+
return jn((o) => {
|
|
875
|
+
const a = o.loaded, c = o.lengthComputable ? o.total : void 0, d = a - s, f = i(d), x = a <= c;
|
|
876
|
+
s = a;
|
|
877
877
|
const y = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: a,
|
|
879
879
|
total: c,
|
|
880
|
-
progress: c ?
|
|
880
|
+
progress: c ? a / c : void 0,
|
|
881
881
|
bytes: d,
|
|
882
|
-
rate:
|
|
883
|
-
estimated:
|
|
884
|
-
event:
|
|
882
|
+
rate: f || void 0,
|
|
883
|
+
estimated: f && c && x ? (c - a) / f : void 0,
|
|
884
|
+
event: o,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
@@ -894,15 +894,15 @@ const Ne = (t, e, n = 3) => {
|
|
|
894
894
|
total: t,
|
|
895
895
|
loaded: s
|
|
896
896
|
}), e[1]];
|
|
897
|
-
}, yt = (t) => (...e) =>
|
|
897
|
+
}, yt = (t) => (...e) => p.asap(() => t(...e)), vn = Q.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, Q.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
898
898
|
new URL(Q.origin),
|
|
899
899
|
Q.navigator && /(msie|trident)/i.test(Q.navigator.userAgent)
|
|
900
900
|
) : () => !0, Sn = Q.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, n, s, i,
|
|
904
|
-
const
|
|
905
|
-
|
|
903
|
+
write(t, e, n, s, i, o) {
|
|
904
|
+
const a = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), p.isString(s) && a.push("path=" + s), p.isString(i) && a.push("domain=" + i), o === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -938,96 +938,96 @@ const bt = (t) => t instanceof re ? { ...t } : t;
|
|
|
938
938
|
function me(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const n = {};
|
|
941
|
-
function s(
|
|
942
|
-
return
|
|
941
|
+
function s(f, x, y, k) {
|
|
942
|
+
return p.isPlainObject(f) && p.isPlainObject(x) ? p.merge.call({ caseless: k }, f, x) : p.isPlainObject(x) ? p.merge({}, x) : p.isArray(x) ? x.slice() : x;
|
|
943
943
|
}
|
|
944
|
-
function i(
|
|
945
|
-
if (
|
|
946
|
-
if (!
|
|
947
|
-
return s(void 0,
|
|
948
|
-
} else return s(
|
|
944
|
+
function i(f, x, y, k) {
|
|
945
|
+
if (p.isUndefined(x)) {
|
|
946
|
+
if (!p.isUndefined(f))
|
|
947
|
+
return s(void 0, f, y, k);
|
|
948
|
+
} else return s(f, x, y, k);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
if (!
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function o(f, x) {
|
|
951
|
+
if (!p.isUndefined(x))
|
|
952
|
+
return s(void 0, x);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (
|
|
956
|
-
if (!
|
|
957
|
-
return s(void 0,
|
|
958
|
-
} else return s(void 0,
|
|
954
|
+
function a(f, x) {
|
|
955
|
+
if (p.isUndefined(x)) {
|
|
956
|
+
if (!p.isUndefined(f))
|
|
957
|
+
return s(void 0, f);
|
|
958
|
+
} else return s(void 0, x);
|
|
959
959
|
}
|
|
960
|
-
function c(
|
|
960
|
+
function c(f, x, y) {
|
|
961
961
|
if (y in e)
|
|
962
|
-
return s(
|
|
962
|
+
return s(f, x);
|
|
963
963
|
if (y in t)
|
|
964
|
-
return s(void 0,
|
|
964
|
+
return s(void 0, f);
|
|
965
965
|
}
|
|
966
966
|
const d = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
967
|
+
url: o,
|
|
968
|
+
method: o,
|
|
969
|
+
data: o,
|
|
970
|
+
baseURL: a,
|
|
971
|
+
transformRequest: a,
|
|
972
|
+
transformResponse: a,
|
|
973
|
+
paramsSerializer: a,
|
|
974
|
+
timeout: a,
|
|
975
|
+
timeoutMessage: a,
|
|
976
|
+
withCredentials: a,
|
|
977
|
+
withXSRFToken: a,
|
|
978
|
+
adapter: a,
|
|
979
|
+
responseType: a,
|
|
980
|
+
xsrfCookieName: a,
|
|
981
|
+
xsrfHeaderName: a,
|
|
982
|
+
onUploadProgress: a,
|
|
983
|
+
onDownloadProgress: a,
|
|
984
|
+
decompress: a,
|
|
985
|
+
maxContentLength: a,
|
|
986
|
+
maxBodyLength: a,
|
|
987
|
+
beforeRedirect: a,
|
|
988
|
+
transport: a,
|
|
989
|
+
httpAgent: a,
|
|
990
|
+
httpsAgent: a,
|
|
991
|
+
cancelToken: a,
|
|
992
|
+
socketPath: a,
|
|
993
|
+
responseEncoding: a,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (
|
|
995
|
+
headers: (f, x, y) => i(bt(f), bt(x), y, !0)
|
|
996
996
|
};
|
|
997
|
-
return
|
|
998
|
-
const y = d[
|
|
999
|
-
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(x) {
|
|
998
|
+
const y = d[x] || i, k = y(t[x], e[x], x);
|
|
999
|
+
p.isUndefined(k) && y !== c || (n[x] = k);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
const Zt = (t) => {
|
|
1003
1003
|
const e = me({}, t);
|
|
1004
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName:
|
|
1005
|
-
if (e.headers =
|
|
1004
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName: o, headers: a, auth: c } = e;
|
|
1005
|
+
if (e.headers = a = re.from(a), e.url = Vt(Xt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && a.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
|
-
),
|
|
1008
|
+
), p.isFormData(n)) {
|
|
1009
1009
|
if (Q.hasStandardBrowserEnv || Q.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1011
|
-
else if (
|
|
1012
|
-
const d = n.getHeaders(),
|
|
1013
|
-
Object.entries(d).forEach(([
|
|
1014
|
-
|
|
1010
|
+
a.setContentType(void 0);
|
|
1011
|
+
else if (p.isFunction(n.getHeaders)) {
|
|
1012
|
+
const d = n.getHeaders(), f = ["content-type", "content-length"];
|
|
1013
|
+
Object.entries(d).forEach(([x, y]) => {
|
|
1014
|
+
f.includes(x.toLowerCase()) && a.set(x, y);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (Q.hasStandardBrowserEnv && (s &&
|
|
1019
|
-
const d = i &&
|
|
1020
|
-
d &&
|
|
1018
|
+
if (Q.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && vn(e.url))) {
|
|
1019
|
+
const d = i && o && Sn.read(o);
|
|
1020
|
+
d && a.set(i, d);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Cn = typeof XMLHttpRequest < "u", Tn = Cn && function(t) {
|
|
1024
1024
|
return new Promise(function(n, s) {
|
|
1025
1025
|
const i = Zt(t);
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: c, onUploadProgress: d, onDownloadProgress:
|
|
1026
|
+
let o = i.data;
|
|
1027
|
+
const a = re.from(i.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: d, onDownloadProgress: f } = i, x, y, k, E, u;
|
|
1029
1029
|
function w() {
|
|
1030
|
-
E && E(), u && u(), i.cancelToken && i.cancelToken.unsubscribe(
|
|
1030
|
+
E && E(), u && u(), i.cancelToken && i.cancelToken.unsubscribe(x), i.signal && i.signal.removeEventListener("abort", x);
|
|
1031
1031
|
}
|
|
1032
1032
|
let h = new XMLHttpRequest();
|
|
1033
1033
|
h.open(i.method.toUpperCase(), i.url, !0), h.timeout = i.timeout;
|
|
@@ -1066,40 +1066,40 @@ const Zt = (t) => {
|
|
|
1066
1066
|
t,
|
|
1067
1067
|
h
|
|
1068
1068
|
)), h = null;
|
|
1069
|
-
},
|
|
1069
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in h && p.forEach(a.toJSON(), function(U, N) {
|
|
1070
1070
|
h.setRequestHeader(N, U);
|
|
1071
|
-
}),
|
|
1071
|
+
}), p.isUndefined(i.withCredentials) || (h.withCredentials = !!i.withCredentials), c && c !== "json" && (h.responseType = i.responseType), f && ([k, u] = Ne(f, !0), h.addEventListener("progress", k)), d && h.upload && ([y, E] = Ne(d), h.upload.addEventListener("progress", y), h.upload.addEventListener("loadend", E)), (i.cancelToken || i.signal) && (x = (g) => {
|
|
1072
1072
|
h && (s(!g || g.type ? new ve(null, t, h) : g), h.abort(), h = null);
|
|
1073
|
-
}, i.cancelToken && i.cancelToken.subscribe(
|
|
1073
|
+
}, i.cancelToken && i.cancelToken.subscribe(x), i.signal && (i.signal.aborted ? x() : i.signal.addEventListener("abort", x)));
|
|
1074
1074
|
const C = bn(i.url);
|
|
1075
1075
|
if (C && Q.protocols.indexOf(C) === -1) {
|
|
1076
1076
|
s(new $("Unsupported protocol " + C + ":", $.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
h.send(
|
|
1079
|
+
h.send(o || null);
|
|
1080
1080
|
});
|
|
1081
1081
|
}, Rn = (t, e) => {
|
|
1082
1082
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || n) {
|
|
1084
1084
|
let s = new AbortController(), i;
|
|
1085
|
-
const
|
|
1085
|
+
const o = function(f) {
|
|
1086
1086
|
if (!i) {
|
|
1087
1087
|
i = !0, c();
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1088
|
+
const x = f instanceof Error ? f : this.reason;
|
|
1089
|
+
s.abort(x instanceof $ ? x : new ve(x instanceof Error ? x.message : x));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let a = e && setTimeout(() => {
|
|
1093
|
+
a = null, o(new $(`timeout ${e} of ms exceeded`, $.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const c = () => {
|
|
1096
|
-
t && (
|
|
1097
|
-
|
|
1096
|
+
t && (a && clearTimeout(a), a = null, t.forEach((f) => {
|
|
1097
|
+
f.unsubscribe ? f.unsubscribe(o) : f.removeEventListener("abort", o);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
1100
|
-
t.forEach((
|
|
1100
|
+
t.forEach((f) => f.addEventListener("abort", o));
|
|
1101
1101
|
const { signal: d } = s;
|
|
1102
|
-
return d.unsubscribe = () =>
|
|
1102
|
+
return d.unsubscribe = () => p.asap(c), d;
|
|
1103
1103
|
}
|
|
1104
1104
|
}, Pn = function* (t, e) {
|
|
1105
1105
|
let n = t.byteLength;
|
|
@@ -1131,25 +1131,25 @@ const Zt = (t) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}, wt = (t, e, n, s) => {
|
|
1133
1133
|
const i = In(t, e);
|
|
1134
|
-
let
|
|
1135
|
-
|
|
1134
|
+
let o = 0, a, c = (d) => {
|
|
1135
|
+
a || (a = !0, s && s(d));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(d) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done:
|
|
1141
|
-
if (
|
|
1140
|
+
const { done: f, value: x } = await i.next();
|
|
1141
|
+
if (f) {
|
|
1142
1142
|
c(), d.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let y =
|
|
1145
|
+
let y = x.byteLength;
|
|
1146
1146
|
if (n) {
|
|
1147
|
-
let k =
|
|
1147
|
+
let k = o += y;
|
|
1148
1148
|
n(k);
|
|
1149
1149
|
}
|
|
1150
|
-
d.enqueue(new Uint8Array(
|
|
1151
|
-
} catch (
|
|
1152
|
-
throw c(
|
|
1150
|
+
d.enqueue(new Uint8Array(x));
|
|
1151
|
+
} catch (f) {
|
|
1152
|
+
throw c(f), f;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(d) {
|
|
@@ -1158,26 +1158,26 @@ const Zt = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
}, jt = 64 * 1024, { isFunction:
|
|
1161
|
+
}, jt = 64 * 1024, { isFunction: Ae } = p, An = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
|
-
}))(
|
|
1164
|
+
}))(p.global), {
|
|
1165
1165
|
ReadableStream: vt,
|
|
1166
1166
|
TextEncoder: St
|
|
1167
|
-
} =
|
|
1167
|
+
} = p.global, kt = (t, ...e) => {
|
|
1168
1168
|
try {
|
|
1169
1169
|
return !!t(...e);
|
|
1170
1170
|
} catch {
|
|
1171
1171
|
return !1;
|
|
1172
1172
|
}
|
|
1173
|
-
},
|
|
1174
|
-
t =
|
|
1173
|
+
}, zn = (t) => {
|
|
1174
|
+
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
|
-
},
|
|
1177
|
-
const { fetch: e, Request: n, Response: s } = t, i = e ?
|
|
1176
|
+
}, An, t);
|
|
1177
|
+
const { fetch: e, Request: n, Response: s } = t, i = e ? Ae(e) : typeof fetch == "function", o = Ae(n), a = Ae(s);
|
|
1178
1178
|
if (!i)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const c = i &&
|
|
1180
|
+
const c = i && Ae(vt), d = i && (typeof St == "function" ? /* @__PURE__ */ ((u) => (w) => u.encode(w))(new St()) : async (u) => new Uint8Array(await new n(u).arrayBuffer())), f = o && c && kt(() => {
|
|
1181
1181
|
let u = !1;
|
|
1182
1182
|
const w = new n(Q.origin, {
|
|
1183
1183
|
body: new vt(),
|
|
@@ -1187,8 +1187,8 @@ const Zt = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return u && !w;
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1190
|
+
}), x = a && c && kt(() => p.isReadableStream(new s("").body)), y = {
|
|
1191
|
+
stream: x && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
1194
|
!y[u] && (y[u] = (w, h) => {
|
|
@@ -1201,19 +1201,19 @@ const Zt = (t) => {
|
|
|
1201
1201
|
const k = async (u) => {
|
|
1202
1202
|
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
|
-
if (
|
|
1204
|
+
if (p.isBlob(u))
|
|
1205
1205
|
return u.size;
|
|
1206
|
-
if (
|
|
1206
|
+
if (p.isSpecCompliantForm(u))
|
|
1207
1207
|
return (await new n(Q.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
1209
|
body: u
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
|
-
if (
|
|
1211
|
+
if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
|
|
1212
1212
|
return u.byteLength;
|
|
1213
|
-
if (
|
|
1213
|
+
if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
|
|
1214
1214
|
return (await d(u)).byteLength;
|
|
1215
1215
|
}, E = async (u, w) => {
|
|
1216
|
-
const h =
|
|
1216
|
+
const h = p.toFiniteNumber(u.getContentLength());
|
|
1217
1217
|
return h ?? k(w);
|
|
1218
1218
|
};
|
|
1219
1219
|
return async (u) => {
|
|
@@ -1236,24 +1236,24 @@ const Zt = (t) => {
|
|
|
1236
1236
|
const T = R && R.unsubscribe && (() => {
|
|
1237
1237
|
R.unsubscribe();
|
|
1238
1238
|
});
|
|
1239
|
-
let
|
|
1239
|
+
let A;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (b &&
|
|
1241
|
+
if (b && f && h !== "get" && h !== "head" && (A = await E(q, I)) !== 0) {
|
|
1242
1242
|
let l = new n(w, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: I,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), m;
|
|
1247
|
-
if (
|
|
1247
|
+
if (p.isFormData(I) && (m = l.headers.get("content-type")) && q.setContentType(m), l.body) {
|
|
1248
1248
|
const [S, D] = gt(
|
|
1249
|
-
|
|
1249
|
+
A,
|
|
1250
1250
|
Ne(yt(b))
|
|
1251
1251
|
);
|
|
1252
1252
|
I = wt(l.body, jt, S, D);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
|
|
1256
|
-
const M =
|
|
1255
|
+
p.isString(O) || (O = O ? "include" : "omit");
|
|
1256
|
+
const M = o && "credentials" in n.prototype, K = {
|
|
1257
1257
|
...X,
|
|
1258
1258
|
signal: R,
|
|
1259
1259
|
method: h.toUpperCase(),
|
|
@@ -1262,15 +1262,15 @@ const Zt = (t) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: M ? O : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
G =
|
|
1266
|
-
let H = await (
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1265
|
+
G = o && new n(w, K);
|
|
1266
|
+
let H = await (o ? W(G, X) : W(w, K));
|
|
1267
|
+
const F = x && (j === "stream" || j === "response");
|
|
1268
|
+
if (x && (N || F && T)) {
|
|
1269
1269
|
const l = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((ne) => {
|
|
1271
1271
|
l[ne] = H[ne];
|
|
1272
1272
|
});
|
|
1273
|
-
const m =
|
|
1273
|
+
const m = p.toFiniteNumber(H.headers.get("content-length")), [S, D] = N && gt(
|
|
1274
1274
|
m,
|
|
1275
1275
|
Ne(yt(N), !0)
|
|
1276
1276
|
) || [];
|
|
@@ -1282,8 +1282,8 @@ const Zt = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
j = j || "text";
|
|
1285
|
-
let Y = await y[
|
|
1286
|
-
return !
|
|
1285
|
+
let Y = await y[p.findKey(y, j) || "text"](H, u);
|
|
1286
|
+
return !F && T && T(), await new Promise((l, m) => {
|
|
1287
1287
|
Gt(l, m, {
|
|
1288
1288
|
data: Y,
|
|
1289
1289
|
headers: re.from(H.headers),
|
|
@@ -1304,15 +1304,15 @@ const Zt = (t) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Un = /* @__PURE__ */ new Map(), Qt = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: n, Request: s, Response: i } = e,
|
|
1307
|
+
const { fetch: n, Request: s, Response: i } = e, o = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
i,
|
|
1310
1310
|
n
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let a = o.length, c = a, d, f, x = Un;
|
|
1313
1313
|
for (; c--; )
|
|
1314
|
-
d =
|
|
1315
|
-
return
|
|
1314
|
+
d = o[c], f = x.get(d), f === void 0 && x.set(d, f = c ? /* @__PURE__ */ new Map() : zn(e)), x = f;
|
|
1315
|
+
return f;
|
|
1316
1316
|
};
|
|
1317
1317
|
Qt();
|
|
1318
1318
|
const Qe = {
|
|
@@ -1322,7 +1322,7 @@ const Qe = {
|
|
|
1322
1322
|
get: Qt
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
|
|
1325
|
+
p.forEach(Qe, (t, e) => {
|
|
1326
1326
|
if (t) {
|
|
1327
1327
|
try {
|
|
1328
1328
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1331,28 +1331,28 @@ f.forEach(Qe, (t, e) => {
|
|
|
1331
1331
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const Et = (t) => `- ${t}`, _n = (t) =>
|
|
1334
|
+
const Et = (t) => `- ${t}`, _n = (t) => p.isFunction(t) || t === null || t === !1, er = {
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
|
-
t =
|
|
1336
|
+
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: n } = t;
|
|
1338
1338
|
let s, i;
|
|
1339
|
-
const
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1339
|
+
const o = {};
|
|
1340
|
+
for (let a = 0; a < n; a++) {
|
|
1341
|
+
s = t[a];
|
|
1342
1342
|
let c;
|
|
1343
1343
|
if (i = s, !_n(s) && (i = Qe[(c = String(s)).toLowerCase()], i === void 0))
|
|
1344
1344
|
throw new $(`Unknown adapter '${c}'`);
|
|
1345
|
-
if (i && (
|
|
1345
|
+
if (i && (p.isFunction(i) || (i = i.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
|
|
1347
|
+
o[c || "#" + a] = i;
|
|
1348
1348
|
}
|
|
1349
1349
|
if (!i) {
|
|
1350
|
-
const
|
|
1351
|
-
([d,
|
|
1350
|
+
const a = Object.entries(o).map(
|
|
1351
|
+
([d, f]) => `adapter ${d} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let c = n ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + Et(
|
|
1353
|
+
let c = n ? a.length > 1 ? `since :
|
|
1354
|
+
` + a.map(Et).join(`
|
|
1355
|
+
`) : " " + Et(a[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new $(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
@@ -1377,7 +1377,7 @@ function Ct(t) {
|
|
|
1377
1377
|
s
|
|
1378
1378
|
), s.headers = re.from(s.headers), s;
|
|
1379
1379
|
}, function(s) {
|
|
1380
|
-
return
|
|
1380
|
+
return Kt(s) || (Ye(t), s && s.response && (s.response.data = Ve.call(
|
|
1381
1381
|
t,
|
|
1382
1382
|
t.transformResponse,
|
|
1383
1383
|
s.response
|
|
@@ -1392,21 +1392,21 @@ const tr = "1.12.2", We = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Tt = {};
|
|
1394
1394
|
We.transitional = function(e, n, s) {
|
|
1395
|
-
function i(
|
|
1396
|
-
return "[Axios v" + tr + "] Transitional option '" +
|
|
1395
|
+
function i(o, a) {
|
|
1396
|
+
return "[Axios v" + tr + "] Transitional option '" + o + "'" + a + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (
|
|
1398
|
+
return (o, a, c) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new $(
|
|
1401
|
-
i(
|
|
1401
|
+
i(a, " has been removed" + (n ? " in " + n : "")),
|
|
1402
1402
|
$.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return n && !Tt[
|
|
1404
|
+
return n && !Tt[a] && (Tt[a] = !0, console.warn(
|
|
1405
1405
|
i(
|
|
1406
|
-
|
|
1406
|
+
a,
|
|
1407
1407
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(
|
|
1409
|
+
)), e ? e(o, a, c) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
We.spelling = function(e) {
|
|
@@ -1418,15 +1418,15 @@ function $n(t, e, n) {
|
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
1419
|
let i = s.length;
|
|
1420
1420
|
for (; i-- > 0; ) {
|
|
1421
|
-
const
|
|
1422
|
-
if (
|
|
1423
|
-
const c = t[
|
|
1421
|
+
const o = s[i], a = e[o];
|
|
1422
|
+
if (a) {
|
|
1423
|
+
const c = t[o], d = c === void 0 || a(c, o, t);
|
|
1424
1424
|
if (d !== !0)
|
|
1425
|
-
throw new $("option " +
|
|
1425
|
+
throw new $("option " + o + " must be " + d, $.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (n !== !0)
|
|
1429
|
-
throw new $("Unknown option " +
|
|
1429
|
+
throw new $("Unknown option " + o, $.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const $e = {
|
|
@@ -1455,10 +1455,10 @@ let xe = class {
|
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
1456
|
let i = {};
|
|
1457
1457
|
Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error();
|
|
1458
|
-
const
|
|
1458
|
+
const o = i.stack ? i.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
|
-
s.stack ?
|
|
1461
|
-
` +
|
|
1460
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
|
+
` + o) : s.stack = o;
|
|
1462
1462
|
} catch {
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1467,12 +1467,12 @@ let xe = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, n) {
|
|
1469
1469
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = me(this.defaults, n);
|
|
1470
|
-
const { transitional: s, paramsSerializer: i, headers:
|
|
1470
|
+
const { transitional: s, paramsSerializer: i, headers: o } = n;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ce.transitional(ce.boolean),
|
|
1473
1473
|
forcedJSONParsing: ce.transitional(ce.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ce.transitional(ce.boolean)
|
|
1475
|
-
}, !1), i != null && (
|
|
1475
|
+
}, !1), i != null && (p.isFunction(i) ? n.paramsSerializer = {
|
|
1476
1476
|
serialize: i
|
|
1477
1477
|
} : $e.assertOptions(i, {
|
|
1478
1478
|
encode: ce.function,
|
|
@@ -1481,31 +1481,31 @@ let xe = class {
|
|
|
1481
1481
|
baseUrl: ce.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ce.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
let a = o && p.merge(
|
|
1485
|
+
o.common,
|
|
1486
|
+
o[n.method]
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
o && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
1490
|
(u) => {
|
|
1491
|
-
delete
|
|
1491
|
+
delete o[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), n.headers = re.concat(
|
|
1493
|
+
), n.headers = re.concat(a, o);
|
|
1494
1494
|
const c = [];
|
|
1495
1495
|
let d = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(w) {
|
|
1497
1497
|
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (d = d && w.synchronous, c.unshift(w.fulfilled, w.rejected));
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1499
|
+
const f = [];
|
|
1500
1500
|
this.interceptors.response.forEach(function(w) {
|
|
1501
|
-
|
|
1501
|
+
f.push(w.fulfilled, w.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let x, y = 0, k;
|
|
1504
1504
|
if (!d) {
|
|
1505
1505
|
const u = [Ct.bind(this), void 0];
|
|
1506
|
-
for (u.unshift(...c), u.push(...
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1506
|
+
for (u.unshift(...c), u.push(...f), k = u.length, x = Promise.resolve(n); y < k; )
|
|
1507
|
+
x = x.then(u[y++], u[y++]);
|
|
1508
|
+
return x;
|
|
1509
1509
|
}
|
|
1510
1510
|
k = c.length;
|
|
1511
1511
|
let E = n;
|
|
@@ -1519,13 +1519,13 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1522
|
+
x = Ct.call(this, E);
|
|
1523
1523
|
} catch (u) {
|
|
1524
1524
|
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
|
-
for (y = 0, k =
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1526
|
+
for (y = 0, k = f.length; y < k; )
|
|
1527
|
+
x = x.then(f[y++], f[y++]);
|
|
1528
|
+
return x;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = me(this.defaults, e);
|
|
@@ -1533,7 +1533,7 @@ let xe = class {
|
|
|
1533
1533
|
return Vt(n, e.params, e.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
|
|
1536
|
+
p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1537
1537
|
xe.prototype[e] = function(n, s) {
|
|
1538
1538
|
return this.request(me(s || {}, {
|
|
1539
1539
|
method: e,
|
|
@@ -1542,16 +1542,16 @@ f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1542
1542
|
}));
|
|
1543
1543
|
};
|
|
1544
1544
|
});
|
|
1545
|
-
|
|
1545
|
+
p.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function n(s) {
|
|
1547
|
-
return function(
|
|
1547
|
+
return function(o, a, c) {
|
|
1548
1548
|
return this.request(me(c || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
|
-
url:
|
|
1554
|
-
data:
|
|
1553
|
+
url: o,
|
|
1554
|
+
data: a
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
@@ -1562,26 +1562,26 @@ let Dn = class rr {
|
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
1564
1564
|
let n;
|
|
1565
|
-
this.promise = new Promise(function(
|
|
1566
|
-
n =
|
|
1565
|
+
this.promise = new Promise(function(o) {
|
|
1566
|
+
n = o;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
1569
|
this.promise.then((i) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
|
-
let
|
|
1572
|
-
for (;
|
|
1573
|
-
s._listeners[
|
|
1571
|
+
let o = s._listeners.length;
|
|
1572
|
+
for (; o-- > 0; )
|
|
1573
|
+
s._listeners[o](i);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
1575
|
}), this.promise.then = (i) => {
|
|
1576
|
-
let
|
|
1577
|
-
const
|
|
1578
|
-
s.subscribe(c),
|
|
1576
|
+
let o;
|
|
1577
|
+
const a = new Promise((c) => {
|
|
1578
|
+
s.subscribe(c), o = c;
|
|
1579
1579
|
}).then(i);
|
|
1580
|
-
return
|
|
1581
|
-
s.unsubscribe(
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(
|
|
1584
|
-
s.reason || (s.reason = new ve(
|
|
1580
|
+
return a.cancel = function() {
|
|
1581
|
+
s.unsubscribe(o);
|
|
1582
|
+
}, a;
|
|
1583
|
+
}, e(function(o, a, c) {
|
|
1584
|
+
s.reason || (s.reason = new ve(o, a, c), n(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1635,8 +1635,8 @@ function Nn(t) {
|
|
|
1635
1635
|
return t.apply(null, n);
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1638
|
+
function Fn(t) {
|
|
1639
|
+
return p.isObject(t) && t.isAxiosError === !0;
|
|
1640
1640
|
}
|
|
1641
1641
|
const et = {
|
|
1642
1642
|
Continue: 100,
|
|
@@ -1708,35 +1708,35 @@ Object.entries(et).forEach(([t, e]) => {
|
|
|
1708
1708
|
});
|
|
1709
1709
|
function nr(t) {
|
|
1710
1710
|
const e = new xe(t), n = Ut(xe.prototype.request, e);
|
|
1711
|
-
return
|
|
1711
|
+
return p.extend(n, xe.prototype, e, { allOwnKeys: !0 }), p.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(i) {
|
|
1712
1712
|
return nr(me(t, i));
|
|
1713
1713
|
}, n;
|
|
1714
1714
|
}
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1715
|
+
const J = nr(Ie);
|
|
1716
|
+
J.Axios = xe;
|
|
1717
|
+
J.CanceledError = ve;
|
|
1718
|
+
J.CancelToken = Dn;
|
|
1719
|
+
J.isCancel = Kt;
|
|
1720
|
+
J.VERSION = tr;
|
|
1721
|
+
J.toFormData = Me;
|
|
1722
|
+
J.AxiosError = $;
|
|
1723
|
+
J.Cancel = J.CanceledError;
|
|
1724
|
+
J.all = function(e) {
|
|
1725
1725
|
return Promise.all(e);
|
|
1726
1726
|
};
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1727
|
+
J.spread = Nn;
|
|
1728
|
+
J.isAxiosError = Fn;
|
|
1729
|
+
J.mergeConfig = me;
|
|
1730
|
+
J.AxiosHeaders = re;
|
|
1731
|
+
J.formToJSON = (t) => Jt(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
1732
|
+
J.getAdapter = er.getAdapter;
|
|
1733
|
+
J.HttpStatusCode = et;
|
|
1734
|
+
J.default = J;
|
|
1735
1735
|
const {
|
|
1736
1736
|
Axios: Vs,
|
|
1737
1737
|
AxiosError: Ys,
|
|
1738
|
-
CanceledError:
|
|
1739
|
-
isCancel:
|
|
1738
|
+
CanceledError: Js,
|
|
1739
|
+
isCancel: Ks,
|
|
1740
1740
|
CancelToken: Gs,
|
|
1741
1741
|
VERSION: Xs,
|
|
1742
1742
|
all: Zs,
|
|
@@ -1747,9 +1747,9 @@ const {
|
|
|
1747
1747
|
AxiosHeaders: ni,
|
|
1748
1748
|
HttpStatusCode: si,
|
|
1749
1749
|
formToJSON: ii,
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1752
|
-
} =
|
|
1750
|
+
getAdapter: oi,
|
|
1751
|
+
mergeConfig: ai
|
|
1752
|
+
} = J;
|
|
1753
1753
|
class li {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
@@ -1762,7 +1762,7 @@ class li {
|
|
|
1762
1762
|
constructor(e) {
|
|
1763
1763
|
if (!e || !e.baseUrl)
|
|
1764
1764
|
throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");
|
|
1765
|
-
this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.apiKey = e.apiKey || null, this.appId = e.appId || null, this.client =
|
|
1765
|
+
this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.apiKey = e.apiKey || null, this.appId = e.appId || null, this.client = J.create({
|
|
1766
1766
|
baseURL: this.baseUrl,
|
|
1767
1767
|
headers: {
|
|
1768
1768
|
"Content-Type": "application/json",
|
|
@@ -1781,25 +1781,25 @@ class li {
|
|
|
1781
1781
|
* @param data Optional request body
|
|
1782
1782
|
* @param extraHeaders Optional custom headers
|
|
1783
1783
|
*/
|
|
1784
|
-
async request(e, n, s, i = {},
|
|
1784
|
+
async request(e, n, s, i = {}, o = !1) {
|
|
1785
1785
|
try {
|
|
1786
|
-
const
|
|
1786
|
+
const a = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
1788
1788
|
...s || {}
|
|
1789
1789
|
};
|
|
1790
1790
|
return (await this.client.request({
|
|
1791
1791
|
url: n,
|
|
1792
1792
|
method: e,
|
|
1793
|
-
data:
|
|
1793
|
+
data: a,
|
|
1794
1794
|
headers: i,
|
|
1795
|
-
withCredentials:
|
|
1795
|
+
withCredentials: o
|
|
1796
1796
|
// 👈 override axios default
|
|
1797
1797
|
})).data;
|
|
1798
|
-
} catch (
|
|
1799
|
-
throw
|
|
1800
|
-
message:
|
|
1801
|
-
status:
|
|
1802
|
-
} : { message:
|
|
1798
|
+
} catch (a) {
|
|
1799
|
+
throw J.isAxiosError(a) ? {
|
|
1800
|
+
message: a.response?.data?.message || a.message || "Request failed",
|
|
1801
|
+
status: a.response?.status ?? 0
|
|
1802
|
+
} : { message: a.message || "Unexpected error occurred" };
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
1805
|
// ================= USERS =================
|
|
@@ -2053,81 +2053,42 @@ class li {
|
|
|
2053
2053
|
`/users/check-user/${e}?appId=${this.appId}`
|
|
2054
2054
|
);
|
|
2055
2055
|
}
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
const i =
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
{},
|
|
2066
|
-
!1
|
|
2067
|
-
// 👈 no credentials
|
|
2068
|
-
);
|
|
2069
|
-
}
|
|
2070
|
-
/**
|
|
2071
|
-
* Search user's extra data by dynamic reference keys
|
|
2072
|
-
* @example
|
|
2073
|
-
* searchUserDataByKeys({
|
|
2074
|
-
* userId: "123",
|
|
2075
|
-
* category: "orders",
|
|
2076
|
-
* shopId: 12,
|
|
2077
|
-
* productId: 99,
|
|
2078
|
-
* status: "active"
|
|
2079
|
-
* })
|
|
2080
|
-
*/
|
|
2081
|
-
async searchUserDataByKeys(e) {
|
|
2082
|
-
const { userId: n, ...s } = e;
|
|
2083
|
-
if (!n)
|
|
2084
|
-
throw new Error("searchUserDataByKeys: 'userId' is required");
|
|
2085
|
-
const i = new URLSearchParams(
|
|
2086
|
-
Object.entries(s).reduce(
|
|
2087
|
-
(a, [o, c]) => (c != null && (a[o] = String(c)), a),
|
|
2088
|
-
{}
|
|
2089
|
-
)
|
|
2090
|
-
).toString();
|
|
2056
|
+
/*-------------------------------------------------*/
|
|
2057
|
+
/* <<~~ User Data CRUD & Search SDK Functions ~~>> */
|
|
2058
|
+
/*-------------------------------------------------*/
|
|
2059
|
+
async addUserData(e) {
|
|
2060
|
+
const { userId: n, dataCategory: s, data: i } = e;
|
|
2061
|
+
if (!n) throw new Error("addUserData: 'userId' is required");
|
|
2062
|
+
if (!s)
|
|
2063
|
+
throw new Error("addUserData: 'dataCategory' is required");
|
|
2064
|
+
if (!i) throw new Error("addUserData: 'data' is required");
|
|
2091
2065
|
return await this.request(
|
|
2092
|
-
"
|
|
2093
|
-
`/users/${n}/data
|
|
2094
|
-
|
|
2066
|
+
"POST",
|
|
2067
|
+
`/users/${n}/data`,
|
|
2068
|
+
{
|
|
2069
|
+
dataCategory: s,
|
|
2070
|
+
...i
|
|
2071
|
+
},
|
|
2095
2072
|
{},
|
|
2096
2073
|
!1
|
|
2097
2074
|
// 👈 no credentials
|
|
2098
2075
|
);
|
|
2099
2076
|
}
|
|
2100
|
-
/**
|
|
2101
|
-
* 📦 Get all data objects for a user
|
|
2102
|
-
*
|
|
2103
|
-
* Route:
|
|
2104
|
-
* GET /api/users/:id/data
|
|
2105
|
-
*
|
|
2106
|
-
* Features:
|
|
2107
|
-
* - Cursor pagination
|
|
2108
|
-
* - Load more support
|
|
2109
|
-
* - Limit control
|
|
2110
|
-
* - Future filter ready
|
|
2111
|
-
*/
|
|
2112
2077
|
async getUserData(e) {
|
|
2113
|
-
const { userId: n, limit: s = 20, cursor: i, category:
|
|
2078
|
+
const { userId: n, limit: s = 20, cursor: i, category: o } = e;
|
|
2114
2079
|
if (!n)
|
|
2115
2080
|
throw new Error("getUserData: 'userId' is required");
|
|
2116
|
-
const
|
|
2117
|
-
c.set("limit", String(s)), i && c.set("cursor", i),
|
|
2081
|
+
const a = `/users/${encodeURIComponent(n)}/data`, c = new URLSearchParams();
|
|
2082
|
+
c.set("limit", String(s)), i && c.set("cursor", i), o && c.set("category", o);
|
|
2118
2083
|
const d = c.toString();
|
|
2119
2084
|
return this.request(
|
|
2120
2085
|
"GET",
|
|
2121
|
-
d ? `${
|
|
2086
|
+
d ? `${a}?${d}` : a,
|
|
2122
2087
|
void 0,
|
|
2123
2088
|
{},
|
|
2124
2089
|
!1
|
|
2125
2090
|
);
|
|
2126
2091
|
}
|
|
2127
|
-
/**
|
|
2128
|
-
* Get a single data object for a user
|
|
2129
|
-
* @param params requires userId and dataId
|
|
2130
|
-
*/
|
|
2131
2092
|
async getSingleUserData(e) {
|
|
2132
2093
|
const { userId: n, dataId: s } = e;
|
|
2133
2094
|
if (!n || !s)
|
|
@@ -2141,32 +2102,22 @@ class li {
|
|
|
2141
2102
|
// 👈 no credentials
|
|
2142
2103
|
);
|
|
2143
2104
|
}
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
async addUserData(e) {
|
|
2149
|
-
const { userId: n, dataCategory: s, data: i } = e;
|
|
2150
|
-
if (!n) throw new Error("addUserData: 'userId' is required");
|
|
2151
|
-
if (!s)
|
|
2152
|
-
throw new Error("addUserData: 'dataCategory' is required");
|
|
2153
|
-
if (!i) throw new Error("addUserData: 'data' is required");
|
|
2105
|
+
async searchInUserData(e) {
|
|
2106
|
+
const { userId: n, category: s, q: i, keys: o } = e || {};
|
|
2107
|
+
if (!n)
|
|
2108
|
+
throw new Error("searchUserData: 'userId' is required");
|
|
2154
2109
|
return await this.request(
|
|
2155
2110
|
"POST",
|
|
2156
|
-
`/users/${n}/data`,
|
|
2111
|
+
`/users/${encodeURIComponent(n)}/data/search`,
|
|
2157
2112
|
{
|
|
2158
|
-
|
|
2159
|
-
|
|
2113
|
+
category: s,
|
|
2114
|
+
q: i,
|
|
2115
|
+
keys: o && Object.keys(o).length > 0 ? o : {}
|
|
2160
2116
|
},
|
|
2161
2117
|
{},
|
|
2162
2118
|
!1
|
|
2163
|
-
// 👈 no credentials
|
|
2164
2119
|
);
|
|
2165
2120
|
}
|
|
2166
|
-
/**
|
|
2167
|
-
* Update a data object by its id
|
|
2168
|
-
* @param params requires userId, dataId, and updated fields
|
|
2169
|
-
*/
|
|
2170
2121
|
async updateUserData(e) {
|
|
2171
2122
|
const { userId: n, dataId: s, data: i } = e;
|
|
2172
2123
|
if (!n || !s)
|
|
@@ -2181,10 +2132,6 @@ class li {
|
|
|
2181
2132
|
// 👈 no credentials
|
|
2182
2133
|
);
|
|
2183
2134
|
}
|
|
2184
|
-
/**
|
|
2185
|
-
* Delete a data object by its id
|
|
2186
|
-
* @param params requires userId and dataId
|
|
2187
|
-
*/
|
|
2188
2135
|
async deleteUserData(e) {
|
|
2189
2136
|
const { userId: n, dataId: s } = e;
|
|
2190
2137
|
if (!n || !s)
|
|
@@ -2198,107 +2145,31 @@ class li {
|
|
|
2198
2145
|
// 👈 no credentials
|
|
2199
2146
|
);
|
|
2200
2147
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2148
|
+
/*------------------------------------------------*/
|
|
2149
|
+
/* <<~~ App Data CRUD & Search SDK Functions ~~>> */
|
|
2150
|
+
/*------------------------------------------------*/
|
|
2151
|
+
async addAppData(e) {
|
|
2152
|
+
const n = this.appId;
|
|
2153
|
+
if (!n) throw new Error("addAppData: 'appId' is required");
|
|
2154
|
+
const { dataCategory: s, data: i } = e;
|
|
2155
|
+
if (!s)
|
|
2156
|
+
throw new Error("addAppData: 'dataCategory' is required");
|
|
2157
|
+
if (!i || typeof i != "object")
|
|
2158
|
+
throw new Error("addAppData: 'data' is required");
|
|
2211
2159
|
return await this.request(
|
|
2212
|
-
"
|
|
2213
|
-
`/
|
|
2214
|
-
|
|
2215
|
-
dataCategory: n,
|
|
2216
|
-
...s ? { query: s } : {},
|
|
2217
|
-
...i
|
|
2218
|
-
}
|
|
2219
|
-
).toString()}`,
|
|
2220
|
-
void 0,
|
|
2160
|
+
"POST",
|
|
2161
|
+
`/app/${encodeURIComponent(n)}/data/${encodeURIComponent(s)}`,
|
|
2162
|
+
{ item: i },
|
|
2221
2163
|
{},
|
|
2222
2164
|
!1
|
|
2223
2165
|
);
|
|
2224
2166
|
}
|
|
2225
|
-
// ================= APP DATA =================
|
|
2226
|
-
/**
|
|
2227
|
-
* 📦 Get all app data items
|
|
2228
|
-
* Optional category filter
|
|
2229
|
-
*
|
|
2230
|
-
* Routes:
|
|
2231
|
-
* GET /api/app/:appId/app-data
|
|
2232
|
-
* GET /api/app/:appId/app-data/:category
|
|
2233
|
-
*/
|
|
2234
2167
|
async getAppData(e) {
|
|
2235
2168
|
const n = this.appId;
|
|
2236
2169
|
if (!n) throw new Error("getAppData: 'appId' is required");
|
|
2237
2170
|
const s = e ? `/app/${encodeURIComponent(n)}/app-data/${encodeURIComponent(e)}` : `/app/${encodeURIComponent(n)}/app-data`;
|
|
2238
2171
|
return await this.request("GET", s, void 0, {}, !1);
|
|
2239
2172
|
}
|
|
2240
|
-
/**
|
|
2241
|
-
* 👥 Get all users data
|
|
2242
|
-
*
|
|
2243
|
-
* Routes:
|
|
2244
|
-
* GET /api/app/:appId/users-data
|
|
2245
|
-
* GET /api/app/:appId/users-data/:category
|
|
2246
|
-
*
|
|
2247
|
-
* Features:
|
|
2248
|
-
* - Pagination
|
|
2249
|
-
* - Load More
|
|
2250
|
-
* - Category filtering
|
|
2251
|
-
*/
|
|
2252
|
-
async getAppUsersData(e = {}) {
|
|
2253
|
-
const n = this.appId;
|
|
2254
|
-
if (!n)
|
|
2255
|
-
throw new Error("getAppUsersData: 'appId' is required");
|
|
2256
|
-
const { category: s, limit: i = 20, cursor: a } = e, o = `/app/${encodeURIComponent(n)}/users-data`, c = {
|
|
2257
|
-
limit: i
|
|
2258
|
-
};
|
|
2259
|
-
return s && (c.category = s), a && (c.cursor = a), await this.request(
|
|
2260
|
-
"POST",
|
|
2261
|
-
o,
|
|
2262
|
-
c,
|
|
2263
|
-
{},
|
|
2264
|
-
// headers
|
|
2265
|
-
!1
|
|
2266
|
-
// auth flag (keep as your original)
|
|
2267
|
-
);
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* 👥 Get all app users (Paginated + Load More + Filters)
|
|
2271
|
-
*
|
|
2272
|
-
* Route:
|
|
2273
|
-
* GET /api/app/:appId/users
|
|
2274
|
-
*
|
|
2275
|
-
* Features:
|
|
2276
|
-
* - Cursor pagination
|
|
2277
|
-
* - Limit control
|
|
2278
|
-
* - Load more support
|
|
2279
|
-
* - Optional filters (future-ready)
|
|
2280
|
-
*/
|
|
2281
|
-
async getAllAppUsers(e = {}) {
|
|
2282
|
-
const n = this.appId;
|
|
2283
|
-
if (!n)
|
|
2284
|
-
throw new Error("getAllAppUsers: 'appId' is required");
|
|
2285
|
-
const { limit: s = 20, cursor: i, search: a, role: o, isActive: c, isVerified: d } = e, x = `/app/${encodeURIComponent(n)}/users`, p = new URLSearchParams();
|
|
2286
|
-
p.append("limit", String(s)), i && p.append("cursor", i), a && p.append("search", a), o && p.append("role", o), typeof c == "boolean" && p.append("isActive", String(c)), typeof d == "boolean" && p.append("isVerified", String(d));
|
|
2287
|
-
const y = p.toString();
|
|
2288
|
-
return await this.request(
|
|
2289
|
-
"GET",
|
|
2290
|
-
y ? `${x}?${y}` : x,
|
|
2291
|
-
void 0,
|
|
2292
|
-
{},
|
|
2293
|
-
!1
|
|
2294
|
-
);
|
|
2295
|
-
}
|
|
2296
|
-
/**
|
|
2297
|
-
* 🔍 Get single app data item by id
|
|
2298
|
-
*
|
|
2299
|
-
* Route:
|
|
2300
|
-
* GET /api/app/:appId/data/:itemId
|
|
2301
|
-
*/
|
|
2302
2173
|
async getSingleAppData(e) {
|
|
2303
2174
|
const n = this.appId;
|
|
2304
2175
|
if (!n) throw new Error("getSingleAppData: 'appId' is required");
|
|
@@ -2312,53 +2183,23 @@ class li {
|
|
|
2312
2183
|
!1
|
|
2313
2184
|
);
|
|
2314
2185
|
}
|
|
2315
|
-
|
|
2316
|
-
* 🔍 Search app data by dynamic keys
|
|
2317
|
-
*
|
|
2318
|
-
* Route:
|
|
2319
|
-
* POST /api/app/:appId/data/searchByKeys
|
|
2320
|
-
*/
|
|
2321
|
-
async searchAppDataByKeys(e) {
|
|
2322
|
-
const n = this.appId;
|
|
2323
|
-
if (!n) throw new Error("searchAppDataByKeys: 'appId' is required");
|
|
2324
|
-
if (!e || typeof e != "object")
|
|
2325
|
-
throw new Error("searchAppDataByKeys: params object is required");
|
|
2326
|
-
return await this.request(
|
|
2327
|
-
"POST",
|
|
2328
|
-
`/app/${encodeURIComponent(n)}/data/searchByKeys`,
|
|
2329
|
-
e,
|
|
2330
|
-
{},
|
|
2331
|
-
!1
|
|
2332
|
-
);
|
|
2333
|
-
}
|
|
2334
|
-
/**
|
|
2335
|
-
* ➕ Add new app data item
|
|
2336
|
-
*
|
|
2337
|
-
* Route:
|
|
2338
|
-
* POST /api/app/:appId/data/:dataCategory
|
|
2339
|
-
*/
|
|
2340
|
-
async addAppData(e) {
|
|
2186
|
+
async searchInAppData(e) {
|
|
2341
2187
|
const n = this.appId;
|
|
2342
|
-
if (!n)
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
throw new Error("addAppData: 'dataCategory' is required");
|
|
2346
|
-
if (!i || typeof i != "object")
|
|
2347
|
-
throw new Error("addAppData: 'data' is required");
|
|
2188
|
+
if (!n)
|
|
2189
|
+
throw new Error("searchInAppData: 'appId' is required");
|
|
2190
|
+
const { category: s, q: i, keys: o } = e || {};
|
|
2348
2191
|
return await this.request(
|
|
2349
2192
|
"POST",
|
|
2350
|
-
`/app/${encodeURIComponent(n)}/data
|
|
2351
|
-
{
|
|
2193
|
+
`/app/${encodeURIComponent(n)}/app-data/search`,
|
|
2194
|
+
{
|
|
2195
|
+
category: s,
|
|
2196
|
+
q: i,
|
|
2197
|
+
keys: o && Object.keys(o).length > 0 ? o : {}
|
|
2198
|
+
},
|
|
2352
2199
|
{},
|
|
2353
2200
|
!1
|
|
2354
2201
|
);
|
|
2355
2202
|
}
|
|
2356
|
-
/**
|
|
2357
|
-
* ✏️ Update app data item
|
|
2358
|
-
*
|
|
2359
|
-
* Route:
|
|
2360
|
-
* PATCH /api/app/:appId/data/:itemId
|
|
2361
|
-
*/
|
|
2362
2203
|
async updateAppData(e) {
|
|
2363
2204
|
const n = this.appId;
|
|
2364
2205
|
if (!n) throw new Error("updateAppData: 'appId' is required");
|
|
@@ -2374,12 +2215,6 @@ class li {
|
|
|
2374
2215
|
!1
|
|
2375
2216
|
);
|
|
2376
2217
|
}
|
|
2377
|
-
/**
|
|
2378
|
-
* 🗑️ Delete app data item
|
|
2379
|
-
*
|
|
2380
|
-
* Route:
|
|
2381
|
-
* DELETE /api/app/:appId/data/:itemId
|
|
2382
|
-
*/
|
|
2383
2218
|
async deleteAppData(e) {
|
|
2384
2219
|
const n = this.appId;
|
|
2385
2220
|
if (!n) throw new Error("deleteAppData: 'appId' is required");
|
|
@@ -2393,8 +2228,67 @@ class li {
|
|
|
2393
2228
|
!1
|
|
2394
2229
|
);
|
|
2395
2230
|
}
|
|
2231
|
+
/*-------------------------------------------*/
|
|
2232
|
+
/* <<~~ Global App Search SDK Functions ~~>> */
|
|
2233
|
+
/*-------------------------------------------*/
|
|
2234
|
+
async getAllUsersFromApp(e = {}) {
|
|
2235
|
+
const n = this.appId;
|
|
2236
|
+
if (!n)
|
|
2237
|
+
throw new Error("getAllUsersFromApp: 'appId' is required");
|
|
2238
|
+
const { cursor: s, limit: i } = e, o = {};
|
|
2239
|
+
return s && (o.cursor = s), i !== void 0 && (o.limit = i), await this.request(
|
|
2240
|
+
"POST",
|
|
2241
|
+
`/app/global/${encodeURIComponent(n)}/all-app-users`,
|
|
2242
|
+
o,
|
|
2243
|
+
{},
|
|
2244
|
+
!1
|
|
2245
|
+
// no credentials (consistent with your app-level user APIs)
|
|
2246
|
+
);
|
|
2247
|
+
}
|
|
2248
|
+
async searchInAllAppUsers(e = {}) {
|
|
2249
|
+
const n = this.appId;
|
|
2250
|
+
if (!n)
|
|
2251
|
+
throw new Error("searchInAllAppUsers: 'appId' is required");
|
|
2252
|
+
const { q: s, keys: i = {} } = e, o = {};
|
|
2253
|
+
return s && (o.q = s), i && Object.keys(i).length > 0 && (o.keys = i), await this.request(
|
|
2254
|
+
"POST",
|
|
2255
|
+
`/app/global/${encodeURIComponent(n)}/all-app-users/search`,
|
|
2256
|
+
o,
|
|
2257
|
+
{},
|
|
2258
|
+
!1
|
|
2259
|
+
// no credentials (matches your other app-level search APIs)
|
|
2260
|
+
);
|
|
2261
|
+
}
|
|
2262
|
+
async getAllUsersDataFromApp(e = {}) {
|
|
2263
|
+
const n = this.appId;
|
|
2264
|
+
if (!n)
|
|
2265
|
+
throw new Error("getAllUsersDataFromApp: 'appId' is required");
|
|
2266
|
+
const { category: s, cursor: i, limit: o } = e, a = {};
|
|
2267
|
+
return s && (a.category = s), i && (a.cursor = i), o !== void 0 && (a.limit = o), await this.request(
|
|
2268
|
+
"POST",
|
|
2269
|
+
`/app/global/${encodeURIComponent(n)}/all-app-users-data`,
|
|
2270
|
+
a,
|
|
2271
|
+
{},
|
|
2272
|
+
!1
|
|
2273
|
+
// no credentials (consistent with your app-data reads)
|
|
2274
|
+
);
|
|
2275
|
+
}
|
|
2276
|
+
async searchInAllAppUsersData(e = {}) {
|
|
2277
|
+
const n = this.appId;
|
|
2278
|
+
if (!n)
|
|
2279
|
+
throw new Error("searchInAllAppUsersData: 'appId' is required");
|
|
2280
|
+
const { category: s, q: i, keys: o = {} } = e, a = {};
|
|
2281
|
+
return s && (a.category = s), i && (a.q = i), o && Object.keys(o).length > 0 && (a.keys = o), await this.request(
|
|
2282
|
+
"POST",
|
|
2283
|
+
`/app/global/${encodeURIComponent(n)}/all-app-users-data/search`,
|
|
2284
|
+
a,
|
|
2285
|
+
{},
|
|
2286
|
+
!1
|
|
2287
|
+
// no credentials (match your other app-level reads)
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2396
2290
|
}
|
|
2397
|
-
var
|
|
2291
|
+
var ze = { exports: {} }, ke = {};
|
|
2398
2292
|
/**
|
|
2399
2293
|
* @license React
|
|
2400
2294
|
* react-jsx-runtime.production.js
|
|
@@ -2405,23 +2299,23 @@ var Ae = { exports: {} }, ke = {};
|
|
|
2405
2299
|
* LICENSE file in the root directory of this source tree.
|
|
2406
2300
|
*/
|
|
2407
2301
|
var Rt;
|
|
2408
|
-
function
|
|
2302
|
+
function Ln() {
|
|
2409
2303
|
if (Rt) return ke;
|
|
2410
2304
|
Rt = 1;
|
|
2411
2305
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2412
|
-
function n(s, i,
|
|
2413
|
-
var
|
|
2414
|
-
if (
|
|
2415
|
-
|
|
2306
|
+
function n(s, i, o) {
|
|
2307
|
+
var a = null;
|
|
2308
|
+
if (o !== void 0 && (a = "" + o), i.key !== void 0 && (a = "" + i.key), "key" in i) {
|
|
2309
|
+
o = {};
|
|
2416
2310
|
for (var c in i)
|
|
2417
|
-
c !== "key" && (
|
|
2418
|
-
} else
|
|
2419
|
-
return i =
|
|
2311
|
+
c !== "key" && (o[c] = i[c]);
|
|
2312
|
+
} else o = i;
|
|
2313
|
+
return i = o.ref, {
|
|
2420
2314
|
$$typeof: t,
|
|
2421
2315
|
type: s,
|
|
2422
|
-
key:
|
|
2316
|
+
key: a,
|
|
2423
2317
|
ref: i !== void 0 ? i : null,
|
|
2424
|
-
props:
|
|
2318
|
+
props: o
|
|
2425
2319
|
};
|
|
2426
2320
|
}
|
|
2427
2321
|
return ke.Fragment = e, ke.jsx = n, ke.jsxs = n, ke;
|
|
@@ -2517,10 +2411,10 @@ function qn() {
|
|
|
2517
2411
|
var l = R.A;
|
|
2518
2412
|
return l === null ? null : l.getOwner();
|
|
2519
2413
|
}
|
|
2520
|
-
function
|
|
2414
|
+
function o() {
|
|
2521
2415
|
return Error("react-stack-top-frame");
|
|
2522
2416
|
}
|
|
2523
|
-
function
|
|
2417
|
+
function a(l) {
|
|
2524
2418
|
if (G.call(l, "key")) {
|
|
2525
2419
|
var m = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
2526
2420
|
if (m && m.isReactWarning) return !1;
|
|
@@ -2541,11 +2435,11 @@ function qn() {
|
|
|
2541
2435
|
}
|
|
2542
2436
|
function d() {
|
|
2543
2437
|
var l = t(this.type);
|
|
2544
|
-
return
|
|
2438
|
+
return K[l] || (K[l] = !0, console.error(
|
|
2545
2439
|
"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."
|
|
2546
2440
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
2547
2441
|
}
|
|
2548
|
-
function
|
|
2442
|
+
function f(l, m, S, D, ne, ae) {
|
|
2549
2443
|
var B = S.ref;
|
|
2550
2444
|
return l = {
|
|
2551
2445
|
$$typeof: u,
|
|
@@ -2575,10 +2469,10 @@ function qn() {
|
|
|
2575
2469
|
configurable: !1,
|
|
2576
2470
|
enumerable: !1,
|
|
2577
2471
|
writable: !0,
|
|
2578
|
-
value:
|
|
2472
|
+
value: ae
|
|
2579
2473
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
2580
2474
|
}
|
|
2581
|
-
function
|
|
2475
|
+
function x(l, m, S, D, ne, ae) {
|
|
2582
2476
|
var B = m.children;
|
|
2583
2477
|
if (B !== void 0)
|
|
2584
2478
|
if (D)
|
|
@@ -2593,8 +2487,8 @@ function qn() {
|
|
|
2593
2487
|
else y(B);
|
|
2594
2488
|
if (G.call(m, "key")) {
|
|
2595
2489
|
B = t(l);
|
|
2596
|
-
var le = Object.keys(m).filter(function(
|
|
2597
|
-
return
|
|
2490
|
+
var le = Object.keys(m).filter(function(z) {
|
|
2491
|
+
return z !== "key";
|
|
2598
2492
|
});
|
|
2599
2493
|
D = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Y[B + D] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2600
2494
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -2609,7 +2503,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2609
2503
|
B
|
|
2610
2504
|
), Y[B + D] = !0);
|
|
2611
2505
|
}
|
|
2612
|
-
if (B = null, S !== void 0 && (n(S), B = "" + S),
|
|
2506
|
+
if (B = null, S !== void 0 && (n(S), B = "" + S), a(m) && (n(m.key), B = "" + m.key), "key" in m) {
|
|
2613
2507
|
S = {};
|
|
2614
2508
|
for (var ye in m)
|
|
2615
2509
|
ye !== "key" && (S[ye] = m[ye]);
|
|
@@ -2617,13 +2511,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2617
2511
|
return B && c(
|
|
2618
2512
|
S,
|
|
2619
2513
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
2620
|
-
),
|
|
2514
|
+
), f(
|
|
2621
2515
|
l,
|
|
2622
2516
|
B,
|
|
2623
2517
|
S,
|
|
2624
2518
|
i(),
|
|
2625
2519
|
ne,
|
|
2626
|
-
|
|
2520
|
+
ae
|
|
2627
2521
|
);
|
|
2628
2522
|
}
|
|
2629
2523
|
function y(l) {
|
|
@@ -2632,7 +2526,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2632
2526
|
function k(l) {
|
|
2633
2527
|
return typeof l == "object" && l !== null && l.$$typeof === u;
|
|
2634
2528
|
}
|
|
2635
|
-
var E = Ce, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), U = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), R = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, T = Array.isArray,
|
|
2529
|
+
var E = Ce, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), U = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), R = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, T = Array.isArray, A = console.createTask ? console.createTask : function() {
|
|
2636
2530
|
return null;
|
|
2637
2531
|
};
|
|
2638
2532
|
E = {
|
|
@@ -2640,36 +2534,36 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2640
2534
|
return l();
|
|
2641
2535
|
}
|
|
2642
2536
|
};
|
|
2643
|
-
var M,
|
|
2537
|
+
var M, K = {}, H = E.react_stack_bottom_frame.bind(
|
|
2644
2538
|
E,
|
|
2645
|
-
|
|
2646
|
-
)(),
|
|
2539
|
+
o
|
|
2540
|
+
)(), F = A(s(o)), Y = {};
|
|
2647
2541
|
Ee.Fragment = h, Ee.jsx = function(l, m, S) {
|
|
2648
2542
|
var D = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
2649
|
-
return
|
|
2543
|
+
return x(
|
|
2650
2544
|
l,
|
|
2651
2545
|
m,
|
|
2652
2546
|
S,
|
|
2653
2547
|
!1,
|
|
2654
2548
|
D ? Error("react-stack-top-frame") : H,
|
|
2655
|
-
D ?
|
|
2549
|
+
D ? A(s(l)) : F
|
|
2656
2550
|
);
|
|
2657
2551
|
}, Ee.jsxs = function(l, m, S) {
|
|
2658
2552
|
var D = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
2659
|
-
return
|
|
2553
|
+
return x(
|
|
2660
2554
|
l,
|
|
2661
2555
|
m,
|
|
2662
2556
|
S,
|
|
2663
2557
|
!0,
|
|
2664
2558
|
D ? Error("react-stack-top-frame") : H,
|
|
2665
|
-
D ?
|
|
2559
|
+
D ? A(s(l)) : F
|
|
2666
2560
|
);
|
|
2667
2561
|
};
|
|
2668
2562
|
})()), Ee;
|
|
2669
2563
|
}
|
|
2670
2564
|
var It;
|
|
2671
2565
|
function Mn() {
|
|
2672
|
-
return It || (It = 1, process.env.NODE_ENV === "production" ?
|
|
2566
|
+
return It || (It = 1, process.env.NODE_ENV === "production" ? ze.exports = Ln() : ze.exports = qn()), ze.exports;
|
|
2673
2567
|
}
|
|
2674
2568
|
var r = Mn();
|
|
2675
2569
|
/**
|
|
@@ -2712,17 +2606,17 @@ var Vn = {
|
|
|
2712
2606
|
* This source code is licensed under the ISC license.
|
|
2713
2607
|
* See the LICENSE file in the root directory of this source tree.
|
|
2714
2608
|
*/
|
|
2715
|
-
const Yn =
|
|
2609
|
+
const Yn = zt(
|
|
2716
2610
|
({
|
|
2717
2611
|
color: t = "currentColor",
|
|
2718
2612
|
size: e = 24,
|
|
2719
2613
|
strokeWidth: n = 2,
|
|
2720
2614
|
absoluteStrokeWidth: s,
|
|
2721
2615
|
className: i = "",
|
|
2722
|
-
children:
|
|
2723
|
-
iconNode:
|
|
2616
|
+
children: o,
|
|
2617
|
+
iconNode: a,
|
|
2724
2618
|
...c
|
|
2725
|
-
}, d) =>
|
|
2619
|
+
}, d) => Ke(
|
|
2726
2620
|
"svg",
|
|
2727
2621
|
{
|
|
2728
2622
|
ref: d,
|
|
@@ -2732,12 +2626,12 @@ const Yn = At(
|
|
|
2732
2626
|
stroke: t,
|
|
2733
2627
|
strokeWidth: s ? Number(n) * 24 / Number(e) : n,
|
|
2734
2628
|
className: sr("lucide", i),
|
|
2735
|
-
...!
|
|
2629
|
+
...!o && !Hn(c) && { "aria-hidden": "true" },
|
|
2736
2630
|
...c
|
|
2737
2631
|
},
|
|
2738
2632
|
[
|
|
2739
|
-
...
|
|
2740
|
-
...Array.isArray(
|
|
2633
|
+
...a.map(([f, x]) => Ke(f, x)),
|
|
2634
|
+
...Array.isArray(o) ? o : [o]
|
|
2741
2635
|
]
|
|
2742
2636
|
)
|
|
2743
2637
|
);
|
|
@@ -2747,10 +2641,10 @@ const Yn = At(
|
|
|
2747
2641
|
* This source code is licensed under the ISC license.
|
|
2748
2642
|
* See the LICENSE file in the root directory of this source tree.
|
|
2749
2643
|
*/
|
|
2750
|
-
const
|
|
2751
|
-
const n =
|
|
2752
|
-
({ className: s, ...i },
|
|
2753
|
-
ref:
|
|
2644
|
+
const L = (t, e) => {
|
|
2645
|
+
const n = zt(
|
|
2646
|
+
({ className: s, ...i }, o) => Ke(Yn, {
|
|
2647
|
+
ref: o,
|
|
2754
2648
|
iconNode: e,
|
|
2755
2649
|
className: sr(
|
|
2756
2650
|
`lucide-${Wn(Ot(t))}`,
|
|
@@ -2768,7 +2662,7 @@ const F = (t, e) => {
|
|
|
2768
2662
|
* This source code is licensed under the ISC license.
|
|
2769
2663
|
* See the LICENSE file in the root directory of this source tree.
|
|
2770
2664
|
*/
|
|
2771
|
-
const
|
|
2665
|
+
const Jn = [
|
|
2772
2666
|
[
|
|
2773
2667
|
"path",
|
|
2774
2668
|
{
|
|
@@ -2777,7 +2671,7 @@ const Kn = [
|
|
|
2777
2671
|
}
|
|
2778
2672
|
],
|
|
2779
2673
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2780
|
-
],
|
|
2674
|
+
], Kn = L("badge-check", Jn);
|
|
2781
2675
|
/**
|
|
2782
2676
|
* @license lucide-react v0.544.0 - ISC
|
|
2783
2677
|
*
|
|
@@ -2793,14 +2687,14 @@ const Gn = [
|
|
|
2793
2687
|
}
|
|
2794
2688
|
],
|
|
2795
2689
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2796
|
-
], tt =
|
|
2690
|
+
], tt = L("camera", Gn);
|
|
2797
2691
|
/**
|
|
2798
2692
|
* @license lucide-react v0.544.0 - ISC
|
|
2799
2693
|
*
|
|
2800
2694
|
* This source code is licensed under the ISC license.
|
|
2801
2695
|
* See the LICENSE file in the root directory of this source tree.
|
|
2802
2696
|
*/
|
|
2803
|
-
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn =
|
|
2697
|
+
const Xn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zn = L("chevron-down", Xn);
|
|
2804
2698
|
/**
|
|
2805
2699
|
* @license lucide-react v0.544.0 - ISC
|
|
2806
2700
|
*
|
|
@@ -2811,7 +2705,7 @@ const Qn = [
|
|
|
2811
2705
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2812
2706
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2813
2707
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2814
|
-
], ie =
|
|
2708
|
+
], ie = L("circle-alert", Qn);
|
|
2815
2709
|
/**
|
|
2816
2710
|
* @license lucide-react v0.544.0 - ISC
|
|
2817
2711
|
*
|
|
@@ -2821,7 +2715,7 @@ const Qn = [
|
|
|
2821
2715
|
const es = [
|
|
2822
2716
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2823
2717
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2824
|
-
], ue =
|
|
2718
|
+
], ue = L("circle-check-big", es);
|
|
2825
2719
|
/**
|
|
2826
2720
|
* @license lucide-react v0.544.0 - ISC
|
|
2827
2721
|
*
|
|
@@ -2831,7 +2725,7 @@ const es = [
|
|
|
2831
2725
|
const ts = [
|
|
2832
2726
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2833
2727
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2834
|
-
],
|
|
2728
|
+
], Je = L("circle-check", ts);
|
|
2835
2729
|
/**
|
|
2836
2730
|
* @license lucide-react v0.544.0 - ISC
|
|
2837
2731
|
*
|
|
@@ -2842,7 +2736,7 @@ const rs = [
|
|
|
2842
2736
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2843
2737
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2844
2738
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2845
|
-
], ns =
|
|
2739
|
+
], ns = L("database", rs);
|
|
2846
2740
|
/**
|
|
2847
2741
|
* @license lucide-react v0.544.0 - ISC
|
|
2848
2742
|
*
|
|
@@ -2853,14 +2747,14 @@ const ss = [
|
|
|
2853
2747
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2854
2748
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2855
2749
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2856
|
-
], is =
|
|
2750
|
+
], is = L("ellipsis-vertical", ss);
|
|
2857
2751
|
/**
|
|
2858
2752
|
* @license lucide-react v0.544.0 - ISC
|
|
2859
2753
|
*
|
|
2860
2754
|
* This source code is licensed under the ISC license.
|
|
2861
2755
|
* See the LICENSE file in the root directory of this source tree.
|
|
2862
2756
|
*/
|
|
2863
|
-
const
|
|
2757
|
+
const os = [
|
|
2864
2758
|
[
|
|
2865
2759
|
"path",
|
|
2866
2760
|
{
|
|
@@ -2877,14 +2771,14 @@ const as = [
|
|
|
2877
2771
|
}
|
|
2878
2772
|
],
|
|
2879
2773
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2880
|
-
],
|
|
2774
|
+
], ot = L("eye-off", os);
|
|
2881
2775
|
/**
|
|
2882
2776
|
* @license lucide-react v0.544.0 - ISC
|
|
2883
2777
|
*
|
|
2884
2778
|
* This source code is licensed under the ISC license.
|
|
2885
2779
|
* See the LICENSE file in the root directory of this source tree.
|
|
2886
2780
|
*/
|
|
2887
|
-
const
|
|
2781
|
+
const as = [
|
|
2888
2782
|
[
|
|
2889
2783
|
"path",
|
|
2890
2784
|
{
|
|
@@ -2893,7 +2787,7 @@ const os = [
|
|
|
2893
2787
|
}
|
|
2894
2788
|
],
|
|
2895
2789
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2896
|
-
],
|
|
2790
|
+
], at = L("eye", as);
|
|
2897
2791
|
/**
|
|
2898
2792
|
* @license lucide-react v0.544.0 - ISC
|
|
2899
2793
|
*
|
|
@@ -2909,7 +2803,7 @@ const ls = [
|
|
|
2909
2803
|
key: "r6nss1"
|
|
2910
2804
|
}
|
|
2911
2805
|
]
|
|
2912
|
-
], cs =
|
|
2806
|
+
], cs = L("house", ls);
|
|
2913
2807
|
/**
|
|
2914
2808
|
* @license lucide-react v0.544.0 - ISC
|
|
2915
2809
|
*
|
|
@@ -2920,7 +2814,7 @@ const ds = [
|
|
|
2920
2814
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2921
2815
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2922
2816
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2923
|
-
], ir =
|
|
2817
|
+
], ir = L("image", ds);
|
|
2924
2818
|
/**
|
|
2925
2819
|
* @license lucide-react v0.544.0 - ISC
|
|
2926
2820
|
*
|
|
@@ -2936,7 +2830,7 @@ const us = [
|
|
|
2936
2830
|
}
|
|
2937
2831
|
],
|
|
2938
2832
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
2939
|
-
],
|
|
2833
|
+
], or = L("key-round", us);
|
|
2940
2834
|
/**
|
|
2941
2835
|
* @license lucide-react v0.544.0 - ISC
|
|
2942
2836
|
*
|
|
@@ -2947,7 +2841,7 @@ const ps = [
|
|
|
2947
2841
|
["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" }],
|
|
2948
2842
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
2949
2843
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
2950
|
-
], lt =
|
|
2844
|
+
], lt = L("key", ps);
|
|
2951
2845
|
/**
|
|
2952
2846
|
* @license lucide-react v0.544.0 - ISC
|
|
2953
2847
|
*
|
|
@@ -2958,14 +2852,14 @@ const fs = [
|
|
|
2958
2852
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
2959
2853
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
2960
2854
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
2961
|
-
], xs =
|
|
2855
|
+
], xs = L("link-2", fs);
|
|
2962
2856
|
/**
|
|
2963
2857
|
* @license lucide-react v0.544.0 - ISC
|
|
2964
2858
|
*
|
|
2965
2859
|
* This source code is licensed under the ISC license.
|
|
2966
2860
|
* See the LICENSE file in the root directory of this source tree.
|
|
2967
2861
|
*/
|
|
2968
|
-
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], se =
|
|
2862
|
+
const hs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], se = L("loader-circle", hs);
|
|
2969
2863
|
/**
|
|
2970
2864
|
* @license lucide-react v0.544.0 - ISC
|
|
2971
2865
|
*
|
|
@@ -2981,7 +2875,7 @@ const ms = [
|
|
|
2981
2875
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2982
2876
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2983
2877
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2984
|
-
], gs =
|
|
2878
|
+
], gs = L("loader", ms);
|
|
2985
2879
|
/**
|
|
2986
2880
|
* @license lucide-react v0.544.0 - ISC
|
|
2987
2881
|
*
|
|
@@ -2991,7 +2885,7 @@ const ms = [
|
|
|
2991
2885
|
const ys = [
|
|
2992
2886
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
2993
2887
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
2994
|
-
], be =
|
|
2888
|
+
], be = L("lock", ys);
|
|
2995
2889
|
/**
|
|
2996
2890
|
* @license lucide-react v0.544.0 - ISC
|
|
2997
2891
|
*
|
|
@@ -3002,7 +2896,7 @@ const bs = [
|
|
|
3002
2896
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
3003
2897
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
3004
2898
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
3005
|
-
], ct =
|
|
2899
|
+
], ct = L("log-out", bs);
|
|
3006
2900
|
/**
|
|
3007
2901
|
* @license lucide-react v0.544.0 - ISC
|
|
3008
2902
|
*
|
|
@@ -3012,7 +2906,7 @@ const bs = [
|
|
|
3012
2906
|
const ws = [
|
|
3013
2907
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
3014
2908
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
3015
|
-
], pe =
|
|
2909
|
+
], pe = L("mail", ws);
|
|
3016
2910
|
/**
|
|
3017
2911
|
* @license lucide-react v0.544.0 - ISC
|
|
3018
2912
|
*
|
|
@@ -3028,7 +2922,7 @@ const js = [
|
|
|
3028
2922
|
}
|
|
3029
2923
|
],
|
|
3030
2924
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
3031
|
-
], vs =
|
|
2925
|
+
], vs = L("map-pin", js);
|
|
3032
2926
|
/**
|
|
3033
2927
|
* @license lucide-react v0.544.0 - ISC
|
|
3034
2928
|
*
|
|
@@ -3044,7 +2938,7 @@ const Ss = [
|
|
|
3044
2938
|
key: "1a8usu"
|
|
3045
2939
|
}
|
|
3046
2940
|
]
|
|
3047
|
-
], ks =
|
|
2941
|
+
], ks = L("pen-line", Ss);
|
|
3048
2942
|
/**
|
|
3049
2943
|
* @license lucide-react v0.544.0 - ISC
|
|
3050
2944
|
*
|
|
@@ -3059,7 +2953,7 @@ const Es = [
|
|
|
3059
2953
|
key: "9njp5v"
|
|
3060
2954
|
}
|
|
3061
2955
|
]
|
|
3062
|
-
], Cs =
|
|
2956
|
+
], Cs = L("phone", Es);
|
|
3063
2957
|
/**
|
|
3064
2958
|
* @license lucide-react v0.544.0 - ISC
|
|
3065
2959
|
*
|
|
@@ -3076,7 +2970,7 @@ const Ts = [
|
|
|
3076
2970
|
],
|
|
3077
2971
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
3078
2972
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
3079
|
-
], Rs =
|
|
2973
|
+
], Rs = L("save", Ts);
|
|
3080
2974
|
/**
|
|
3081
2975
|
* @license lucide-react v0.544.0 - ISC
|
|
3082
2976
|
*
|
|
@@ -3092,7 +2986,7 @@ const Ps = [
|
|
|
3092
2986
|
}
|
|
3093
2987
|
],
|
|
3094
2988
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
3095
|
-
], dt =
|
|
2989
|
+
], dt = L("send", Ps);
|
|
3096
2990
|
/**
|
|
3097
2991
|
* @license lucide-react v0.544.0 - ISC
|
|
3098
2992
|
*
|
|
@@ -3108,14 +3002,14 @@ const Is = [
|
|
|
3108
3002
|
}
|
|
3109
3003
|
],
|
|
3110
3004
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
3111
|
-
], Os =
|
|
3005
|
+
], Os = L("settings", Is);
|
|
3112
3006
|
/**
|
|
3113
3007
|
* @license lucide-react v0.544.0 - ISC
|
|
3114
3008
|
*
|
|
3115
3009
|
* This source code is licensed under the ISC license.
|
|
3116
3010
|
* See the LICENSE file in the root directory of this source tree.
|
|
3117
3011
|
*/
|
|
3118
|
-
const
|
|
3012
|
+
const As = [
|
|
3119
3013
|
[
|
|
3120
3014
|
"path",
|
|
3121
3015
|
{
|
|
@@ -3123,20 +3017,20 @@ const zs = [
|
|
|
3123
3017
|
key: "oel41y"
|
|
3124
3018
|
}
|
|
3125
3019
|
]
|
|
3126
|
-
], rt =
|
|
3020
|
+
], rt = L("shield", As);
|
|
3127
3021
|
/**
|
|
3128
3022
|
* @license lucide-react v0.544.0 - ISC
|
|
3129
3023
|
*
|
|
3130
3024
|
* This source code is licensed under the ISC license.
|
|
3131
3025
|
* See the LICENSE file in the root directory of this source tree.
|
|
3132
3026
|
*/
|
|
3133
|
-
const
|
|
3027
|
+
const zs = [
|
|
3134
3028
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
3135
3029
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
3136
3030
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
3137
3031
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
3138
3032
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
3139
|
-
], De =
|
|
3033
|
+
], De = L("trash-2", zs);
|
|
3140
3034
|
/**
|
|
3141
3035
|
* @license lucide-react v0.544.0 - ISC
|
|
3142
3036
|
*
|
|
@@ -3153,7 +3047,7 @@ const Us = [
|
|
|
3153
3047
|
],
|
|
3154
3048
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
3155
3049
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
3156
|
-
],
|
|
3050
|
+
], At = L("triangle-alert", Us);
|
|
3157
3051
|
/**
|
|
3158
3052
|
* @license lucide-react v0.544.0 - ISC
|
|
3159
3053
|
*
|
|
@@ -3165,7 +3059,7 @@ const _s = [
|
|
|
3165
3059
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
3166
3060
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
3167
3061
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
3168
|
-
], $s =
|
|
3062
|
+
], $s = L("user-x", _s);
|
|
3169
3063
|
/**
|
|
3170
3064
|
* @license lucide-react v0.544.0 - ISC
|
|
3171
3065
|
*
|
|
@@ -3175,7 +3069,7 @@ const _s = [
|
|
|
3175
3069
|
const Ds = [
|
|
3176
3070
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
3177
3071
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
3178
|
-
], he =
|
|
3072
|
+
], he = L("user", Ds);
|
|
3179
3073
|
/**
|
|
3180
3074
|
* @license lucide-react v0.544.0 - ISC
|
|
3181
3075
|
*
|
|
@@ -3185,11 +3079,11 @@ const Ds = [
|
|
|
3185
3079
|
const Ns = [
|
|
3186
3080
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3187
3081
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3188
|
-
], Oe =
|
|
3082
|
+
], Oe = L("x", Ns), ar = cr(null), ci = ({
|
|
3189
3083
|
authix: t,
|
|
3190
3084
|
children: e
|
|
3191
|
-
}) => /* @__PURE__ */ r.jsx(
|
|
3192
|
-
const t = dr(
|
|
3085
|
+
}) => /* @__PURE__ */ r.jsx(ar.Provider, { value: t, children: e }), ge = () => {
|
|
3086
|
+
const t = dr(ar);
|
|
3193
3087
|
if (!t)
|
|
3194
3088
|
throw new Error("useAuthix must be used inside <AuthixProvider />");
|
|
3195
3089
|
return t;
|
|
@@ -3199,15 +3093,15 @@ const Ns = [
|
|
|
3199
3093
|
title: n = "Create Your Account",
|
|
3200
3094
|
subtitle: s = "Join our platform today",
|
|
3201
3095
|
primaryColor: i = "#00C214",
|
|
3202
|
-
gradient:
|
|
3203
|
-
darkMode:
|
|
3096
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3097
|
+
darkMode: a = !0,
|
|
3204
3098
|
// Only avatar is optional
|
|
3205
3099
|
showAvatar: c = !1,
|
|
3206
3100
|
roles: d = [],
|
|
3207
3101
|
// 🔥 FIXED
|
|
3208
|
-
showRoleSelector:
|
|
3102
|
+
showRoleSelector: f = !1,
|
|
3209
3103
|
// 🔥 FIXED
|
|
3210
|
-
loginUrl:
|
|
3104
|
+
loginUrl: x,
|
|
3211
3105
|
onSuccess: y,
|
|
3212
3106
|
onError: k
|
|
3213
3107
|
}) => {
|
|
@@ -3217,21 +3111,21 @@ const Ns = [
|
|
|
3217
3111
|
password: "",
|
|
3218
3112
|
role: d.length ? d[0] : "user",
|
|
3219
3113
|
...c && { avatarUrl: "" }
|
|
3220
|
-
}, [w, h] = P(u), [I, C] = P(!1), [g, U] = P(!1), [N, b] = P(null), [j, q] = P({}), [O, X] = P(!1), W =
|
|
3114
|
+
}, [w, h] = P(u), [I, C] = P(!1), [g, U] = P(!1), [N, b] = P(null), [j, q] = P({}), [O, X] = P(!1), W = a ? "#ffffff" : "#111827", R = a ? "#a1a1aa" : "#6b7280", G = a ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", T = a ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3221
3115
|
Ce.useEffect(() => {
|
|
3222
3116
|
if (typeof window < "u") {
|
|
3223
|
-
const
|
|
3224
|
-
return
|
|
3117
|
+
const F = () => X(window.innerWidth < 768);
|
|
3118
|
+
return F(), window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
|
|
3225
3119
|
}
|
|
3226
3120
|
}, []);
|
|
3227
|
-
const
|
|
3228
|
-
const { name: Y, value: l } =
|
|
3121
|
+
const A = (F) => {
|
|
3122
|
+
const { name: Y, value: l } = F.target;
|
|
3229
3123
|
h((m) => ({ ...m, [Y]: l })), j[Y] && q((m) => ({ ...m, [Y]: void 0 }));
|
|
3230
3124
|
}, M = () => {
|
|
3231
|
-
const
|
|
3232
|
-
return w.name.trim() || (
|
|
3233
|
-
},
|
|
3234
|
-
if (
|
|
3125
|
+
const F = {};
|
|
3126
|
+
return w.name.trim() || (F.name = "Name is required"), w.email.trim() ? /\S+@\S+\.\S+/.test(w.email) || (F.email = "Invalid email address") : F.email = "Email is required", w.password ? w.password.length < 6 && (F.password = "Password must be at least 6 characters") : F.password = "Password is required", q(F), Object.keys(F).length === 0;
|
|
3127
|
+
}, K = async (F) => {
|
|
3128
|
+
if (F.preventDefault(), !!M()) {
|
|
3235
3129
|
U(!0), b(null);
|
|
3236
3130
|
try {
|
|
3237
3131
|
const Y = {
|
|
@@ -3286,7 +3180,7 @@ const Ns = [
|
|
|
3286
3180
|
flexDirection: "column",
|
|
3287
3181
|
borderRadius: "10px",
|
|
3288
3182
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3289
|
-
backgroundColor:
|
|
3183
|
+
backgroundColor: a ? "#000000" : "#ffffff",
|
|
3290
3184
|
padding: O ? "30px 24px" : "20px 28px"
|
|
3291
3185
|
},
|
|
3292
3186
|
children: [
|
|
@@ -3368,8 +3262,8 @@ const Ns = [
|
|
|
3368
3262
|
objectFit: "cover",
|
|
3369
3263
|
border: `2px solid ${i}30`
|
|
3370
3264
|
},
|
|
3371
|
-
onError: (
|
|
3372
|
-
const Y =
|
|
3265
|
+
onError: (F) => {
|
|
3266
|
+
const Y = F.target;
|
|
3373
3267
|
Y.style.display = "none";
|
|
3374
3268
|
}
|
|
3375
3269
|
}
|
|
@@ -3379,10 +3273,10 @@ const Ns = [
|
|
|
3379
3273
|
/* @__PURE__ */ r.jsxs(
|
|
3380
3274
|
"form",
|
|
3381
3275
|
{
|
|
3382
|
-
onSubmit:
|
|
3276
|
+
onSubmit: K,
|
|
3383
3277
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3384
3278
|
children: [
|
|
3385
|
-
|
|
3279
|
+
f && d && d.length === 2 && /* @__PURE__ */ r.jsxs(
|
|
3386
3280
|
"div",
|
|
3387
3281
|
{
|
|
3388
3282
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3421,9 +3315,9 @@ const Ns = [
|
|
|
3421
3315
|
left: 0,
|
|
3422
3316
|
width: "50%",
|
|
3423
3317
|
height: "100%",
|
|
3424
|
-
backgroundColor:
|
|
3318
|
+
backgroundColor: a ? "#000000" : "#ffffff",
|
|
3425
3319
|
// dark/light background
|
|
3426
|
-
boxShadow:
|
|
3320
|
+
boxShadow: a ? "0 1px 3px rgba(255,255,255,0.05)" : "0 1px 3px rgba(0,0,0,0.1)",
|
|
3427
3321
|
// subtle shadow
|
|
3428
3322
|
borderRadius: "10px",
|
|
3429
3323
|
transition: "transform 0.3s ease, background-color 0.3s ease",
|
|
@@ -3436,13 +3330,13 @@ const Ns = [
|
|
|
3436
3330
|
"button",
|
|
3437
3331
|
{
|
|
3438
3332
|
type: "button",
|
|
3439
|
-
onClick: () => h((
|
|
3333
|
+
onClick: () => h((F) => ({ ...F, role: d[0] })),
|
|
3440
3334
|
style: {
|
|
3441
3335
|
flex: 1,
|
|
3442
3336
|
zIndex: 10,
|
|
3443
3337
|
border: "none",
|
|
3444
3338
|
background: "transparent",
|
|
3445
|
-
color: w.role === d[0] ? i :
|
|
3339
|
+
color: w.role === d[0] ? i : a ? "#9ca3af" : "#6b7280",
|
|
3446
3340
|
// theme-aware inactive color
|
|
3447
3341
|
fontWeight: w.role === d[0] ? 600 : 500,
|
|
3448
3342
|
fontSize: "14px",
|
|
@@ -3458,13 +3352,13 @@ const Ns = [
|
|
|
3458
3352
|
"button",
|
|
3459
3353
|
{
|
|
3460
3354
|
type: "button",
|
|
3461
|
-
onClick: () => h((
|
|
3355
|
+
onClick: () => h((F) => ({ ...F, role: d[1] })),
|
|
3462
3356
|
style: {
|
|
3463
3357
|
flex: 1,
|
|
3464
3358
|
zIndex: 10,
|
|
3465
3359
|
border: "none",
|
|
3466
3360
|
background: "transparent",
|
|
3467
|
-
color: w.role === d[1] ? i :
|
|
3361
|
+
color: w.role === d[1] ? i : a ? "#9ca3af" : "#6b7280",
|
|
3468
3362
|
fontWeight: w.role === d[1] ? 600 : 500,
|
|
3469
3363
|
fontSize: "14px",
|
|
3470
3364
|
display: "flex",
|
|
@@ -3516,7 +3410,7 @@ const Ns = [
|
|
|
3516
3410
|
name: "name",
|
|
3517
3411
|
placeholder: "Enter your full name",
|
|
3518
3412
|
value: w.name,
|
|
3519
|
-
onChange:
|
|
3413
|
+
onChange: A,
|
|
3520
3414
|
style: {
|
|
3521
3415
|
...H,
|
|
3522
3416
|
borderColor: j.name ? "#ef4444" : T
|
|
@@ -3571,7 +3465,7 @@ const Ns = [
|
|
|
3571
3465
|
name: "email",
|
|
3572
3466
|
placeholder: "Enter your email address",
|
|
3573
3467
|
value: w.email,
|
|
3574
|
-
onChange:
|
|
3468
|
+
onChange: A,
|
|
3575
3469
|
style: {
|
|
3576
3470
|
...H,
|
|
3577
3471
|
borderColor: j.email ? "#ef4444" : T
|
|
@@ -3626,7 +3520,7 @@ const Ns = [
|
|
|
3626
3520
|
name: "password",
|
|
3627
3521
|
placeholder: "Create a secure password",
|
|
3628
3522
|
value: w.password,
|
|
3629
|
-
onChange:
|
|
3523
|
+
onChange: A,
|
|
3630
3524
|
style: {
|
|
3631
3525
|
...H,
|
|
3632
3526
|
borderColor: j.password ? "#ef4444" : T
|
|
@@ -3649,7 +3543,7 @@ const Ns = [
|
|
|
3649
3543
|
cursor: "pointer",
|
|
3650
3544
|
padding: "4px"
|
|
3651
3545
|
},
|
|
3652
|
-
children: I ? /* @__PURE__ */ r.jsx(
|
|
3546
|
+
children: I ? /* @__PURE__ */ r.jsx(ot, { size: 20 }) : /* @__PURE__ */ r.jsx(at, { size: 20 })
|
|
3653
3547
|
}
|
|
3654
3548
|
)
|
|
3655
3549
|
] }),
|
|
@@ -3704,7 +3598,7 @@ const Ns = [
|
|
|
3704
3598
|
name: "avatarUrl",
|
|
3705
3599
|
placeholder: "Paste your avatar image URL",
|
|
3706
3600
|
value: w.avatarUrl || "",
|
|
3707
|
-
onChange:
|
|
3601
|
+
onChange: A,
|
|
3708
3602
|
style: H
|
|
3709
3603
|
}
|
|
3710
3604
|
)
|
|
@@ -3712,7 +3606,7 @@ const Ns = [
|
|
|
3712
3606
|
]
|
|
3713
3607
|
}
|
|
3714
3608
|
),
|
|
3715
|
-
|
|
3609
|
+
x && /* @__PURE__ */ r.jsx(
|
|
3716
3610
|
"div",
|
|
3717
3611
|
{
|
|
3718
3612
|
style: {
|
|
@@ -3723,7 +3617,7 @@ const Ns = [
|
|
|
3723
3617
|
children: /* @__PURE__ */ r.jsx(
|
|
3724
3618
|
"a",
|
|
3725
3619
|
{
|
|
3726
|
-
href:
|
|
3620
|
+
href: x,
|
|
3727
3621
|
style: {
|
|
3728
3622
|
color: i,
|
|
3729
3623
|
textDecoration: "none",
|
|
@@ -3761,7 +3655,7 @@ const Ns = [
|
|
|
3761
3655
|
disabled: g,
|
|
3762
3656
|
style: {
|
|
3763
3657
|
padding: "12px",
|
|
3764
|
-
background:
|
|
3658
|
+
background: o,
|
|
3765
3659
|
color: "#fff",
|
|
3766
3660
|
border: "none",
|
|
3767
3661
|
borderRadius: "10px",
|
|
@@ -3824,46 +3718,46 @@ const Ns = [
|
|
|
3824
3718
|
title: n = "Sign In to Your Account",
|
|
3825
3719
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3826
3720
|
primaryColor: i = "#00C214",
|
|
3827
|
-
gradient:
|
|
3828
|
-
darkMode:
|
|
3721
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3722
|
+
darkMode: a = !0,
|
|
3829
3723
|
signupUrl: c,
|
|
3830
3724
|
onSuccess: d,
|
|
3831
|
-
onError:
|
|
3725
|
+
onError: f
|
|
3832
3726
|
}) => {
|
|
3833
|
-
const
|
|
3727
|
+
const x = ge(), [y, k] = P("login"), [E, u] = P(1), [w, h] = P(!1), [I, C] = P(!1), [g, U] = P(null), [N, b] = P(""), [j, q] = P(""), [O, X] = P({
|
|
3834
3728
|
email: "",
|
|
3835
3729
|
otp: "",
|
|
3836
3730
|
newPassword: ""
|
|
3837
|
-
}), [W, R] = P(!1), G =
|
|
3731
|
+
}), [W, R] = P(!1), G = a ? "#ffffff" : "#111827", T = a ? "#a1a1aa" : "#6b7280", A = a ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", M = a ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3838
3732
|
Ce.useEffect(() => {
|
|
3839
3733
|
if (typeof window < "u") {
|
|
3840
3734
|
const m = () => R(window.innerWidth < 768);
|
|
3841
3735
|
return m(), window.addEventListener("resize", m), () => window.removeEventListener("resize", m);
|
|
3842
3736
|
}
|
|
3843
3737
|
}, []);
|
|
3844
|
-
const
|
|
3738
|
+
const K = async (m) => {
|
|
3845
3739
|
m.preventDefault(), C(!0), U(null);
|
|
3846
3740
|
try {
|
|
3847
|
-
const S = await
|
|
3741
|
+
const S = await x.loginUser({ email: N, password: j }), { user: D } = S;
|
|
3848
3742
|
if (!D)
|
|
3849
3743
|
throw new Error(S.message || "Login failed");
|
|
3850
3744
|
if (typeof document < "u") {
|
|
3851
|
-
const ne = "a_s_b",
|
|
3852
|
-
B.setTime(B.getTime() + 1440 * 60 * 1e3), document.cookie = `${ne}=${
|
|
3745
|
+
const ne = "a_s_b", ae = "true", B = /* @__PURE__ */ new Date();
|
|
3746
|
+
B.setTime(B.getTime() + 1440 * 60 * 1e3), document.cookie = `${ne}=${ae}; path=/; expires=${B.toUTCString()}; SameSite=Lax`;
|
|
3853
3747
|
}
|
|
3854
3748
|
U({ type: "success", text: `Welcome ${D.name}` }), d?.(D);
|
|
3855
3749
|
} catch (S) {
|
|
3856
3750
|
const D = S.message || "Login failed";
|
|
3857
|
-
U({ type: "error", text: D }),
|
|
3751
|
+
U({ type: "error", text: D }), f?.(S);
|
|
3858
3752
|
} finally {
|
|
3859
3753
|
C(!1);
|
|
3860
3754
|
}
|
|
3861
3755
|
}, H = (m) => {
|
|
3862
3756
|
X({ ...O, [m.target.name]: m.target.value });
|
|
3863
|
-
},
|
|
3757
|
+
}, F = async (m) => {
|
|
3864
3758
|
m.preventDefault(), C(!0), U(null);
|
|
3865
3759
|
try {
|
|
3866
|
-
const S = await
|
|
3760
|
+
const S = await x.requestResetUserPasswordOTP({
|
|
3867
3761
|
email: O.email
|
|
3868
3762
|
});
|
|
3869
3763
|
S.success ? (u(2), U({
|
|
@@ -3884,7 +3778,7 @@ const Ns = [
|
|
|
3884
3778
|
}, Y = async (m) => {
|
|
3885
3779
|
m.preventDefault(), C(!0), U(null);
|
|
3886
3780
|
try {
|
|
3887
|
-
const S = await
|
|
3781
|
+
const S = await x.resetUserPassword({
|
|
3888
3782
|
email: O.email,
|
|
3889
3783
|
otp: O.otp,
|
|
3890
3784
|
newPassword: O.newPassword
|
|
@@ -3904,7 +3798,7 @@ const Ns = [
|
|
|
3904
3798
|
}, l = {
|
|
3905
3799
|
width: "100%",
|
|
3906
3800
|
padding: W ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3907
|
-
backgroundColor:
|
|
3801
|
+
backgroundColor: A,
|
|
3908
3802
|
border: `1px solid ${M}`,
|
|
3909
3803
|
borderRadius: "10px",
|
|
3910
3804
|
color: G,
|
|
@@ -3931,7 +3825,7 @@ const Ns = [
|
|
|
3931
3825
|
flexDirection: "column",
|
|
3932
3826
|
borderRadius: "10px",
|
|
3933
3827
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3934
|
-
backgroundColor:
|
|
3828
|
+
backgroundColor: a ? "#000000" : "#ffffff",
|
|
3935
3829
|
padding: W ? "30px 24px" : "18px 28px"
|
|
3936
3830
|
},
|
|
3937
3831
|
children: [
|
|
@@ -3996,7 +3890,7 @@ const Ns = [
|
|
|
3996
3890
|
y === "login" && /* @__PURE__ */ r.jsxs(
|
|
3997
3891
|
"form",
|
|
3998
3892
|
{
|
|
3999
|
-
onSubmit:
|
|
3893
|
+
onSubmit: K,
|
|
4000
3894
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
4001
3895
|
children: [
|
|
4002
3896
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -4011,7 +3905,7 @@ const Ns = [
|
|
|
4011
3905
|
style: {
|
|
4012
3906
|
fontSize: "14px",
|
|
4013
3907
|
fontWeight: 500,
|
|
4014
|
-
color:
|
|
3908
|
+
color: a ? "#ffffff" : "#000000"
|
|
4015
3909
|
},
|
|
4016
3910
|
children: "Email Address"
|
|
4017
3911
|
}
|
|
@@ -4057,7 +3951,7 @@ const Ns = [
|
|
|
4057
3951
|
style: {
|
|
4058
3952
|
fontSize: "14px",
|
|
4059
3953
|
fontWeight: 500,
|
|
4060
|
-
color:
|
|
3954
|
+
color: a ? "#ffffff" : "#000000"
|
|
4061
3955
|
},
|
|
4062
3956
|
children: "Password"
|
|
4063
3957
|
}
|
|
@@ -4103,7 +3997,7 @@ const Ns = [
|
|
|
4103
3997
|
color: T,
|
|
4104
3998
|
cursor: "pointer"
|
|
4105
3999
|
},
|
|
4106
|
-
children: w ? /* @__PURE__ */ r.jsx(
|
|
4000
|
+
children: w ? /* @__PURE__ */ r.jsx(ot, { size: 20 }) : /* @__PURE__ */ r.jsx(at, { size: 20 })
|
|
4107
4001
|
}
|
|
4108
4002
|
)
|
|
4109
4003
|
] })
|
|
@@ -4156,7 +4050,7 @@ const Ns = [
|
|
|
4156
4050
|
disabled: I,
|
|
4157
4051
|
style: {
|
|
4158
4052
|
padding: "12px",
|
|
4159
|
-
background:
|
|
4053
|
+
background: o,
|
|
4160
4054
|
color: "#fff",
|
|
4161
4055
|
border: "none",
|
|
4162
4056
|
borderRadius: "10px",
|
|
@@ -4172,7 +4066,7 @@ const Ns = [
|
|
|
4172
4066
|
y === "forgot" && /* @__PURE__ */ r.jsxs(
|
|
4173
4067
|
"form",
|
|
4174
4068
|
{
|
|
4175
|
-
onSubmit: E === 1 ?
|
|
4069
|
+
onSubmit: E === 1 ? F : Y,
|
|
4176
4070
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
4177
4071
|
children: [
|
|
4178
4072
|
E === 1 ? /* @__PURE__ */ r.jsxs(
|
|
@@ -4187,7 +4081,7 @@ const Ns = [
|
|
|
4187
4081
|
style: {
|
|
4188
4082
|
fontSize: "14px",
|
|
4189
4083
|
fontWeight: 500,
|
|
4190
|
-
color:
|
|
4084
|
+
color: a ? "#ffffff" : "#000000"
|
|
4191
4085
|
},
|
|
4192
4086
|
children: "Email Address"
|
|
4193
4087
|
}
|
|
@@ -4238,14 +4132,14 @@ const Ns = [
|
|
|
4238
4132
|
style: {
|
|
4239
4133
|
fontSize: "14px",
|
|
4240
4134
|
fontWeight: 500,
|
|
4241
|
-
color:
|
|
4135
|
+
color: a ? "#ffffff" : "#000000"
|
|
4242
4136
|
},
|
|
4243
4137
|
children: "One-Time Password (OTP)"
|
|
4244
4138
|
}
|
|
4245
4139
|
),
|
|
4246
4140
|
/* @__PURE__ */ r.jsxs("div", { style: { position: "relative" }, children: [
|
|
4247
4141
|
/* @__PURE__ */ r.jsx(
|
|
4248
|
-
|
|
4142
|
+
or,
|
|
4249
4143
|
{
|
|
4250
4144
|
size: 20,
|
|
4251
4145
|
style: {
|
|
@@ -4289,7 +4183,7 @@ const Ns = [
|
|
|
4289
4183
|
style: {
|
|
4290
4184
|
fontSize: "14px",
|
|
4291
4185
|
fontWeight: 500,
|
|
4292
|
-
color:
|
|
4186
|
+
color: a ? "#ffffff" : "#000000"
|
|
4293
4187
|
},
|
|
4294
4188
|
children: "New Password"
|
|
4295
4189
|
}
|
|
@@ -4332,7 +4226,7 @@ const Ns = [
|
|
|
4332
4226
|
disabled: I,
|
|
4333
4227
|
style: {
|
|
4334
4228
|
padding: "12px",
|
|
4335
|
-
background:
|
|
4229
|
+
background: o,
|
|
4336
4230
|
color: "#fff",
|
|
4337
4231
|
border: "none",
|
|
4338
4232
|
fontSize: "14px",
|
|
@@ -4417,7 +4311,7 @@ const Ns = [
|
|
|
4417
4311
|
const c = window.document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
|
|
4418
4312
|
s(c ? "authenticated" : "unauthenticated");
|
|
4419
4313
|
}, []);
|
|
4420
|
-
const i = (
|
|
4314
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4421
4315
|
return n === "loading" ? null : n === "unauthenticated" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: i(e) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4422
4316
|
}, fi = ({
|
|
4423
4317
|
children: t,
|
|
@@ -4430,17 +4324,17 @@ const Ns = [
|
|
|
4430
4324
|
const c = window.document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
|
|
4431
4325
|
s(c ? "authenticated" : "unauthenticated");
|
|
4432
4326
|
}, []);
|
|
4433
|
-
const i = (
|
|
4327
|
+
const i = (o) => typeof o == "function" ? o() : o;
|
|
4434
4328
|
return n === "loading" ? null : n === "authenticated" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: i(e) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
|
|
4435
|
-
},
|
|
4329
|
+
}, Fs = ({
|
|
4436
4330
|
isOpen: t,
|
|
4437
4331
|
onClose: e,
|
|
4438
4332
|
onSuccess: n,
|
|
4439
4333
|
onError: s,
|
|
4440
4334
|
userId: i,
|
|
4441
|
-
colors:
|
|
4335
|
+
colors: o
|
|
4442
4336
|
}) => {
|
|
4443
|
-
const
|
|
4337
|
+
const a = ge(), [c, d] = P(!1), [f, x] = P(""), [y, k] = P("warning"), [E, u] = P(!1);
|
|
4444
4338
|
if (ee(() => {
|
|
4445
4339
|
if (typeof window > "u") return;
|
|
4446
4340
|
const g = () => {
|
|
@@ -4451,7 +4345,7 @@ const Ns = [
|
|
|
4451
4345
|
const w = async () => {
|
|
4452
4346
|
d(!0), k("processing");
|
|
4453
4347
|
try {
|
|
4454
|
-
const g = await
|
|
4348
|
+
const g = await a.deleteUser({
|
|
4455
4349
|
userId: i
|
|
4456
4350
|
});
|
|
4457
4351
|
g.success ? (n(g.message || "Account deleted successfully"), k("success"), setTimeout(() => {
|
|
@@ -4462,7 +4356,7 @@ const Ns = [
|
|
|
4462
4356
|
} finally {
|
|
4463
4357
|
d(!1);
|
|
4464
4358
|
}
|
|
4465
|
-
}, h =
|
|
4359
|
+
}, h = f.toLowerCase() === "delete my account", I = (g) => {
|
|
4466
4360
|
g.target === g.currentTarget && y !== "processing" && y !== "success" && e();
|
|
4467
4361
|
}, C = () => {
|
|
4468
4362
|
switch (y) {
|
|
@@ -4510,7 +4404,7 @@ const Ns = [
|
|
|
4510
4404
|
"h3",
|
|
4511
4405
|
{
|
|
4512
4406
|
style: {
|
|
4513
|
-
color:
|
|
4407
|
+
color: o.textPrimary,
|
|
4514
4408
|
margin: 0,
|
|
4515
4409
|
fontSize: "20px",
|
|
4516
4410
|
fontWeight: 700,
|
|
@@ -4530,7 +4424,7 @@ const Ns = [
|
|
|
4530
4424
|
style: {
|
|
4531
4425
|
background: "transparent",
|
|
4532
4426
|
border: "none",
|
|
4533
|
-
color:
|
|
4427
|
+
color: o.textTertiary,
|
|
4534
4428
|
cursor: "pointer",
|
|
4535
4429
|
padding: "8px",
|
|
4536
4430
|
borderRadius: "8px",
|
|
@@ -4543,10 +4437,10 @@ const Ns = [
|
|
|
4543
4437
|
transition: "all 0.2s ease"
|
|
4544
4438
|
},
|
|
4545
4439
|
onMouseOver: (g) => {
|
|
4546
|
-
g.currentTarget.style.backgroundColor =
|
|
4440
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.color = o.textPrimary;
|
|
4547
4441
|
},
|
|
4548
4442
|
onMouseOut: (g) => {
|
|
4549
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4443
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = o.textTertiary;
|
|
4550
4444
|
},
|
|
4551
4445
|
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
4552
4446
|
}
|
|
@@ -4561,8 +4455,8 @@ const Ns = [
|
|
|
4561
4455
|
display: "flex",
|
|
4562
4456
|
gap: "16px",
|
|
4563
4457
|
padding: "20px",
|
|
4564
|
-
background: `${
|
|
4565
|
-
border: `1px solid ${
|
|
4458
|
+
background: `${o.error}15`,
|
|
4459
|
+
border: `1px solid ${o.error}30`,
|
|
4566
4460
|
borderRadius: "12px",
|
|
4567
4461
|
marginBottom: "20px"
|
|
4568
4462
|
},
|
|
@@ -4571,12 +4465,12 @@ const Ns = [
|
|
|
4571
4465
|
"div",
|
|
4572
4466
|
{
|
|
4573
4467
|
style: {
|
|
4574
|
-
color:
|
|
4468
|
+
color: o.error,
|
|
4575
4469
|
flexShrink: 0,
|
|
4576
4470
|
display: "flex",
|
|
4577
4471
|
alignItems: "flex-start"
|
|
4578
4472
|
},
|
|
4579
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4473
|
+
children: /* @__PURE__ */ r.jsx(At, { size: 24 })
|
|
4580
4474
|
}
|
|
4581
4475
|
),
|
|
4582
4476
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -4584,7 +4478,7 @@ const Ns = [
|
|
|
4584
4478
|
"h4",
|
|
4585
4479
|
{
|
|
4586
4480
|
style: {
|
|
4587
|
-
color:
|
|
4481
|
+
color: o.textPrimary,
|
|
4588
4482
|
margin: "0 0 12px 0",
|
|
4589
4483
|
fontSize: "16px",
|
|
4590
4484
|
fontWeight: 600
|
|
@@ -4621,10 +4515,10 @@ const Ns = [
|
|
|
4621
4515
|
alignItems: "center",
|
|
4622
4516
|
gap: "10px",
|
|
4623
4517
|
fontSize: "14px",
|
|
4624
|
-
color:
|
|
4518
|
+
color: o.textSecondary
|
|
4625
4519
|
},
|
|
4626
4520
|
children: [
|
|
4627
|
-
/* @__PURE__ */ r.jsx("div", { style: { color:
|
|
4521
|
+
/* @__PURE__ */ r.jsx("div", { style: { color: o.error, flexShrink: 0 }, children: g.icon }),
|
|
4628
4522
|
/* @__PURE__ */ r.jsx("span", { children: g.text })
|
|
4629
4523
|
]
|
|
4630
4524
|
},
|
|
@@ -4654,9 +4548,9 @@ const Ns = [
|
|
|
4654
4548
|
style: {
|
|
4655
4549
|
padding: "10px 24px",
|
|
4656
4550
|
borderRadius: "10px",
|
|
4657
|
-
border: `1.5px solid ${
|
|
4551
|
+
border: `1.5px solid ${o.border}`,
|
|
4658
4552
|
background: "transparent",
|
|
4659
|
-
color:
|
|
4553
|
+
color: o.textPrimary,
|
|
4660
4554
|
fontSize: "14px",
|
|
4661
4555
|
fontWeight: 500,
|
|
4662
4556
|
cursor: "pointer",
|
|
@@ -4665,7 +4559,7 @@ const Ns = [
|
|
|
4665
4559
|
transition: "all 0.2s ease"
|
|
4666
4560
|
},
|
|
4667
4561
|
onMouseOver: (g) => {
|
|
4668
|
-
g.currentTarget.style.backgroundColor =
|
|
4562
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4669
4563
|
},
|
|
4670
4564
|
onMouseOut: (g) => {
|
|
4671
4565
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4737,14 +4631,14 @@ const Ns = [
|
|
|
4737
4631
|
color: "white",
|
|
4738
4632
|
flexShrink: 0
|
|
4739
4633
|
},
|
|
4740
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4634
|
+
children: /* @__PURE__ */ r.jsx(At, { size: 24 })
|
|
4741
4635
|
}
|
|
4742
4636
|
),
|
|
4743
4637
|
/* @__PURE__ */ r.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ r.jsx(
|
|
4744
4638
|
"h3",
|
|
4745
4639
|
{
|
|
4746
4640
|
style: {
|
|
4747
|
-
color:
|
|
4641
|
+
color: o.textPrimary,
|
|
4748
4642
|
margin: 0,
|
|
4749
4643
|
fontSize: "20px",
|
|
4750
4644
|
fontWeight: 700,
|
|
@@ -4761,7 +4655,7 @@ const Ns = [
|
|
|
4761
4655
|
"p",
|
|
4762
4656
|
{
|
|
4763
4657
|
style: {
|
|
4764
|
-
color:
|
|
4658
|
+
color: o.textSecondary,
|
|
4765
4659
|
marginBottom: "16px",
|
|
4766
4660
|
fontSize: "14px",
|
|
4767
4661
|
lineHeight: "1.5"
|
|
@@ -4769,7 +4663,7 @@ const Ns = [
|
|
|
4769
4663
|
children: [
|
|
4770
4664
|
"Type",
|
|
4771
4665
|
" ",
|
|
4772
|
-
/* @__PURE__ */ r.jsx("strong", { style: { color:
|
|
4666
|
+
/* @__PURE__ */ r.jsx("strong", { style: { color: o.textPrimary }, children: '"delete my account"' }),
|
|
4773
4667
|
" ",
|
|
4774
4668
|
"to confirm:"
|
|
4775
4669
|
]
|
|
@@ -4779,23 +4673,23 @@ const Ns = [
|
|
|
4779
4673
|
"input",
|
|
4780
4674
|
{
|
|
4781
4675
|
type: "text",
|
|
4782
|
-
value:
|
|
4783
|
-
onChange: (g) =>
|
|
4676
|
+
value: f,
|
|
4677
|
+
onChange: (g) => x(g.target.value),
|
|
4784
4678
|
placeholder: "delete my account",
|
|
4785
4679
|
style: {
|
|
4786
4680
|
width: "100%",
|
|
4787
4681
|
padding: "14px 16px",
|
|
4788
4682
|
borderRadius: "10px",
|
|
4789
|
-
border: `2px solid ${h ?
|
|
4683
|
+
border: `2px solid ${h ? o.success : o.error}`,
|
|
4790
4684
|
backgroundColor: "transparent",
|
|
4791
|
-
color:
|
|
4685
|
+
color: o.textPrimary,
|
|
4792
4686
|
fontSize: "15px",
|
|
4793
4687
|
outline: "none",
|
|
4794
4688
|
transition: "all 0.2s ease",
|
|
4795
4689
|
boxSizing: "border-box"
|
|
4796
4690
|
},
|
|
4797
4691
|
onFocus: (g) => {
|
|
4798
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4692
|
+
g.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
4799
4693
|
},
|
|
4800
4694
|
onBlur: (g) => {
|
|
4801
4695
|
g.target.style.boxShadow = "none";
|
|
@@ -4811,12 +4705,12 @@ const Ns = [
|
|
|
4811
4705
|
alignItems: "center",
|
|
4812
4706
|
gap: "8px",
|
|
4813
4707
|
marginTop: "10px",
|
|
4814
|
-
color:
|
|
4708
|
+
color: o.success,
|
|
4815
4709
|
fontSize: "14px",
|
|
4816
4710
|
fontWeight: 500
|
|
4817
4711
|
},
|
|
4818
4712
|
children: [
|
|
4819
|
-
/* @__PURE__ */ r.jsx(
|
|
4713
|
+
/* @__PURE__ */ r.jsx(Je, { size: 16 }),
|
|
4820
4714
|
/* @__PURE__ */ r.jsx("span", { children: "Confirmation accepted" })
|
|
4821
4715
|
]
|
|
4822
4716
|
}
|
|
@@ -4837,14 +4731,14 @@ const Ns = [
|
|
|
4837
4731
|
"button",
|
|
4838
4732
|
{
|
|
4839
4733
|
onClick: () => {
|
|
4840
|
-
k("warning"),
|
|
4734
|
+
k("warning"), x("");
|
|
4841
4735
|
},
|
|
4842
4736
|
style: {
|
|
4843
4737
|
padding: "10px 24px",
|
|
4844
4738
|
borderRadius: "10px",
|
|
4845
|
-
border: `1.5px solid ${
|
|
4739
|
+
border: `1.5px solid ${o.border}`,
|
|
4846
4740
|
background: "transparent",
|
|
4847
|
-
color:
|
|
4741
|
+
color: o.textPrimary,
|
|
4848
4742
|
fontSize: "14px",
|
|
4849
4743
|
fontWeight: 500,
|
|
4850
4744
|
cursor: "pointer",
|
|
@@ -4853,7 +4747,7 @@ const Ns = [
|
|
|
4853
4747
|
transition: "all 0.2s ease"
|
|
4854
4748
|
},
|
|
4855
4749
|
onMouseOver: (g) => {
|
|
4856
|
-
g.currentTarget.style.backgroundColor =
|
|
4750
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4857
4751
|
},
|
|
4858
4752
|
onMouseOut: (g) => {
|
|
4859
4753
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4943,7 +4837,7 @@ const Ns = [
|
|
|
4943
4837
|
"h3",
|
|
4944
4838
|
{
|
|
4945
4839
|
style: {
|
|
4946
|
-
color:
|
|
4840
|
+
color: o.textPrimary,
|
|
4947
4841
|
margin: 0,
|
|
4948
4842
|
fontSize: "20px",
|
|
4949
4843
|
fontWeight: 700,
|
|
@@ -4956,7 +4850,7 @@ const Ns = [
|
|
|
4956
4850
|
"p",
|
|
4957
4851
|
{
|
|
4958
4852
|
style: {
|
|
4959
|
-
color:
|
|
4853
|
+
color: o.textTertiary,
|
|
4960
4854
|
margin: "4px 0 0 0",
|
|
4961
4855
|
fontSize: "14px",
|
|
4962
4856
|
lineHeight: "1.4"
|
|
@@ -4990,7 +4884,7 @@ const Ns = [
|
|
|
4990
4884
|
padding: "12px",
|
|
4991
4885
|
borderRadius: "8px",
|
|
4992
4886
|
transition: "all 0.2s ease",
|
|
4993
|
-
backgroundColor: g.active ? `${
|
|
4887
|
+
backgroundColor: g.active ? `${o.accent}10` : "transparent"
|
|
4994
4888
|
},
|
|
4995
4889
|
children: [
|
|
4996
4890
|
/* @__PURE__ */ r.jsx(
|
|
@@ -5000,9 +4894,9 @@ const Ns = [
|
|
|
5000
4894
|
width: "8px",
|
|
5001
4895
|
height: "8px",
|
|
5002
4896
|
borderRadius: "50%",
|
|
5003
|
-
backgroundColor: g.active ?
|
|
4897
|
+
backgroundColor: g.active ? o.accent : o.textTertiary,
|
|
5004
4898
|
transition: "all 0.3s ease",
|
|
5005
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4899
|
+
boxShadow: g.active ? `0 0 0 4px ${o.accent}20` : "none"
|
|
5006
4900
|
}
|
|
5007
4901
|
}
|
|
5008
4902
|
),
|
|
@@ -5011,7 +4905,7 @@ const Ns = [
|
|
|
5011
4905
|
{
|
|
5012
4906
|
style: {
|
|
5013
4907
|
fontSize: "14px",
|
|
5014
|
-
color: g.active ?
|
|
4908
|
+
color: g.active ? o.textPrimary : o.textSecondary,
|
|
5015
4909
|
fontWeight: g.active ? 500 : 400
|
|
5016
4910
|
},
|
|
5017
4911
|
children: g.text
|
|
@@ -5031,17 +4925,17 @@ const Ns = [
|
|
|
5031
4925
|
alignItems: "center",
|
|
5032
4926
|
gap: "10px",
|
|
5033
4927
|
padding: "16px",
|
|
5034
|
-
background: `${
|
|
4928
|
+
background: `${o.accent}10`,
|
|
5035
4929
|
borderRadius: "10px",
|
|
5036
4930
|
fontSize: "14px",
|
|
5037
|
-
color:
|
|
4931
|
+
color: o.textSecondary
|
|
5038
4932
|
},
|
|
5039
4933
|
children: [
|
|
5040
4934
|
/* @__PURE__ */ r.jsx(
|
|
5041
4935
|
rt,
|
|
5042
4936
|
{
|
|
5043
4937
|
size: 18,
|
|
5044
|
-
style: { color:
|
|
4938
|
+
style: { color: o.accent, flexShrink: 0 }
|
|
5045
4939
|
}
|
|
5046
4940
|
),
|
|
5047
4941
|
/* @__PURE__ */ r.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -5075,7 +4969,7 @@ const Ns = [
|
|
|
5075
4969
|
color: "white",
|
|
5076
4970
|
flexShrink: 0
|
|
5077
4971
|
},
|
|
5078
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4972
|
+
children: /* @__PURE__ */ r.jsx(Je, { size: 20 })
|
|
5079
4973
|
}
|
|
5080
4974
|
),
|
|
5081
4975
|
/* @__PURE__ */ r.jsxs("div", { style: { flex: 1 }, children: [
|
|
@@ -5083,7 +4977,7 @@ const Ns = [
|
|
|
5083
4977
|
"h3",
|
|
5084
4978
|
{
|
|
5085
4979
|
style: {
|
|
5086
|
-
color:
|
|
4980
|
+
color: o.textPrimary,
|
|
5087
4981
|
margin: 0,
|
|
5088
4982
|
fontSize: "20px",
|
|
5089
4983
|
fontWeight: 700,
|
|
@@ -5096,7 +4990,7 @@ const Ns = [
|
|
|
5096
4990
|
"p",
|
|
5097
4991
|
{
|
|
5098
4992
|
style: {
|
|
5099
|
-
color:
|
|
4993
|
+
color: o.textTertiary,
|
|
5100
4994
|
margin: "4px 0 0 0",
|
|
5101
4995
|
fontSize: "14px",
|
|
5102
4996
|
lineHeight: "1.4"
|
|
@@ -5114,18 +5008,18 @@ const Ns = [
|
|
|
5114
5008
|
style: {
|
|
5115
5009
|
textAlign: "center",
|
|
5116
5010
|
padding: "20px",
|
|
5117
|
-
background: `${
|
|
5118
|
-
border: `1px solid ${
|
|
5011
|
+
background: `${o.success}10`,
|
|
5012
|
+
border: `1px solid ${o.success}20`,
|
|
5119
5013
|
borderRadius: "12px",
|
|
5120
5014
|
marginBottom: "24px"
|
|
5121
5015
|
},
|
|
5122
5016
|
children: [
|
|
5123
5017
|
/* @__PURE__ */ r.jsx(
|
|
5124
|
-
|
|
5018
|
+
Je,
|
|
5125
5019
|
{
|
|
5126
5020
|
size: 48,
|
|
5127
5021
|
style: {
|
|
5128
|
-
color:
|
|
5022
|
+
color: o.success,
|
|
5129
5023
|
marginBottom: "12px",
|
|
5130
5024
|
display: "block",
|
|
5131
5025
|
margin: "0 auto 12px auto"
|
|
@@ -5136,7 +5030,7 @@ const Ns = [
|
|
|
5136
5030
|
"p",
|
|
5137
5031
|
{
|
|
5138
5032
|
style: {
|
|
5139
|
-
color:
|
|
5033
|
+
color: o.textPrimary,
|
|
5140
5034
|
fontSize: "16px",
|
|
5141
5035
|
fontWeight: 600,
|
|
5142
5036
|
margin: "0 0 8px 0"
|
|
@@ -5148,7 +5042,7 @@ const Ns = [
|
|
|
5148
5042
|
"p",
|
|
5149
5043
|
{
|
|
5150
5044
|
style: {
|
|
5151
|
-
color:
|
|
5045
|
+
color: o.textSecondary,
|
|
5152
5046
|
fontSize: "14px",
|
|
5153
5047
|
margin: 0,
|
|
5154
5048
|
lineHeight: "1.5"
|
|
@@ -5167,10 +5061,10 @@ const Ns = [
|
|
|
5167
5061
|
alignItems: "center",
|
|
5168
5062
|
gap: "10px",
|
|
5169
5063
|
padding: "16px",
|
|
5170
|
-
background: `${
|
|
5064
|
+
background: `${o.accent}10`,
|
|
5171
5065
|
borderRadius: "10px",
|
|
5172
5066
|
fontSize: "14px",
|
|
5173
|
-
color:
|
|
5067
|
+
color: o.textSecondary,
|
|
5174
5068
|
justifyContent: "center"
|
|
5175
5069
|
},
|
|
5176
5070
|
children: [
|
|
@@ -5180,7 +5074,7 @@ const Ns = [
|
|
|
5180
5074
|
size: 16,
|
|
5181
5075
|
style: {
|
|
5182
5076
|
animation: "spin 1s linear infinite",
|
|
5183
|
-
color:
|
|
5077
|
+
color: o.accent
|
|
5184
5078
|
}
|
|
5185
5079
|
}
|
|
5186
5080
|
),
|
|
@@ -5212,8 +5106,8 @@ const Ns = [
|
|
|
5212
5106
|
"div",
|
|
5213
5107
|
{
|
|
5214
5108
|
style: {
|
|
5215
|
-
backgroundColor:
|
|
5216
|
-
border: `1px solid ${
|
|
5109
|
+
backgroundColor: o.surface,
|
|
5110
|
+
border: `1px solid ${o.border}`,
|
|
5217
5111
|
borderRadius: "20px",
|
|
5218
5112
|
width: "100%",
|
|
5219
5113
|
maxWidth: "480px",
|
|
@@ -5283,17 +5177,17 @@ const Ns = [
|
|
|
5283
5177
|
]
|
|
5284
5178
|
}
|
|
5285
5179
|
);
|
|
5286
|
-
},
|
|
5180
|
+
}, Ls = ({
|
|
5287
5181
|
isOpen: t,
|
|
5288
5182
|
onClose: e,
|
|
5289
5183
|
onUpdate: n,
|
|
5290
5184
|
colors: s
|
|
5291
5185
|
}) => {
|
|
5292
|
-
const [i,
|
|
5186
|
+
const [i, o] = P(""), [a, c] = P(!1), [d, f] = P(!1), [x, y] = P({ isValid: !1, message: "", type: null });
|
|
5293
5187
|
if (ee(() => {
|
|
5294
5188
|
if (typeof window > "u") return;
|
|
5295
5189
|
const u = () => {
|
|
5296
|
-
|
|
5190
|
+
f(window.innerWidth < 640);
|
|
5297
5191
|
};
|
|
5298
5192
|
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5299
5193
|
}, []), ee(() => {
|
|
@@ -5321,10 +5215,10 @@ const Ns = [
|
|
|
5321
5215
|
}
|
|
5322
5216
|
}, [i]), !t) return null;
|
|
5323
5217
|
const k = async () => {
|
|
5324
|
-
if (!(!i || !
|
|
5218
|
+
if (!(!i || !x.isValid)) {
|
|
5325
5219
|
c(!0);
|
|
5326
5220
|
try {
|
|
5327
|
-
await n(i) && (
|
|
5221
|
+
await n(i) && (o(""), e());
|
|
5328
5222
|
} finally {
|
|
5329
5223
|
c(!1);
|
|
5330
5224
|
}
|
|
@@ -5486,13 +5380,13 @@ const Ns = [
|
|
|
5486
5380
|
id: "avatar-url",
|
|
5487
5381
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5488
5382
|
value: i,
|
|
5489
|
-
onChange: (u) =>
|
|
5383
|
+
onChange: (u) => o(u.target.value),
|
|
5490
5384
|
style: {
|
|
5491
5385
|
width: "100%",
|
|
5492
5386
|
padding: "14px 16px",
|
|
5493
5387
|
paddingLeft: "44px",
|
|
5494
5388
|
borderRadius: "12px",
|
|
5495
|
-
border: `1.5px solid ${
|
|
5389
|
+
border: `1.5px solid ${x.type === "error" ? s.error : x.type === "success" ? s.success : s.border}`,
|
|
5496
5390
|
backgroundColor: "transparent",
|
|
5497
5391
|
color: s.textPrimary,
|
|
5498
5392
|
fontSize: "15px",
|
|
@@ -5504,9 +5398,9 @@ const Ns = [
|
|
|
5504
5398
|
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5505
5399
|
},
|
|
5506
5400
|
onBlur: (u) => {
|
|
5507
|
-
u.target.style.borderColor =
|
|
5401
|
+
u.target.style.borderColor = x.type === "error" ? s.error : x.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5508
5402
|
},
|
|
5509
|
-
disabled:
|
|
5403
|
+
disabled: a
|
|
5510
5404
|
}
|
|
5511
5405
|
),
|
|
5512
5406
|
/* @__PURE__ */ r.jsx(
|
|
@@ -5523,7 +5417,7 @@ const Ns = [
|
|
|
5523
5417
|
}
|
|
5524
5418
|
)
|
|
5525
5419
|
] }),
|
|
5526
|
-
|
|
5420
|
+
x.message && /* @__PURE__ */ r.jsxs(
|
|
5527
5421
|
"div",
|
|
5528
5422
|
{
|
|
5529
5423
|
style: {
|
|
@@ -5532,18 +5426,18 @@ const Ns = [
|
|
|
5532
5426
|
gap: "6px",
|
|
5533
5427
|
marginTop: "8px",
|
|
5534
5428
|
fontSize: "13px",
|
|
5535
|
-
color:
|
|
5429
|
+
color: x.type === "success" ? s.success : x.type === "error" ? s.error : s.textTertiary
|
|
5536
5430
|
},
|
|
5537
5431
|
children: [
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5432
|
+
x.type === "success" && /* @__PURE__ */ r.jsx(ue, { size: 14 }),
|
|
5433
|
+
x.type === "error" && /* @__PURE__ */ r.jsx(ie, { size: 14 }),
|
|
5434
|
+
x.type === "warning" && /* @__PURE__ */ r.jsx(ie, { size: 14 }),
|
|
5435
|
+
x.message
|
|
5542
5436
|
]
|
|
5543
5437
|
}
|
|
5544
5438
|
)
|
|
5545
5439
|
] }),
|
|
5546
|
-
i &&
|
|
5440
|
+
i && x.type === "success" && /* @__PURE__ */ r.jsxs(
|
|
5547
5441
|
"div",
|
|
5548
5442
|
{
|
|
5549
5443
|
style: {
|
|
@@ -5606,7 +5500,7 @@ const Ns = [
|
|
|
5606
5500
|
"button",
|
|
5607
5501
|
{
|
|
5608
5502
|
onClick: e,
|
|
5609
|
-
disabled:
|
|
5503
|
+
disabled: a,
|
|
5610
5504
|
style: {
|
|
5611
5505
|
padding: "10px 24px",
|
|
5612
5506
|
borderRadius: "10px",
|
|
@@ -5615,17 +5509,17 @@ const Ns = [
|
|
|
5615
5509
|
color: s.textPrimary,
|
|
5616
5510
|
fontSize: "14px",
|
|
5617
5511
|
fontWeight: 500,
|
|
5618
|
-
cursor:
|
|
5512
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5619
5513
|
flex: d ? "none" : 1,
|
|
5620
5514
|
minWidth: d ? "100%" : "120px",
|
|
5621
|
-
opacity:
|
|
5515
|
+
opacity: a ? 0.6 : 1,
|
|
5622
5516
|
transition: "all 0.2s ease"
|
|
5623
5517
|
},
|
|
5624
5518
|
onMouseOver: (u) => {
|
|
5625
|
-
|
|
5519
|
+
a || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5626
5520
|
},
|
|
5627
5521
|
onMouseOut: (u) => {
|
|
5628
|
-
|
|
5522
|
+
a || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5629
5523
|
},
|
|
5630
5524
|
children: "Cancel"
|
|
5631
5525
|
}
|
|
@@ -5634,7 +5528,7 @@ const Ns = [
|
|
|
5634
5528
|
"button",
|
|
5635
5529
|
{
|
|
5636
5530
|
onClick: k,
|
|
5637
|
-
disabled:
|
|
5531
|
+
disabled: a || !x.isValid,
|
|
5638
5532
|
style: {
|
|
5639
5533
|
padding: "10px 24px",
|
|
5640
5534
|
borderRadius: "10px",
|
|
@@ -5643,24 +5537,24 @@ const Ns = [
|
|
|
5643
5537
|
color: "#fff",
|
|
5644
5538
|
fontSize: "14px",
|
|
5645
5539
|
fontWeight: 600,
|
|
5646
|
-
cursor:
|
|
5540
|
+
cursor: a || !x.isValid ? "not-allowed" : "pointer",
|
|
5647
5541
|
flex: d ? "none" : 1,
|
|
5648
5542
|
minWidth: d ? "100%" : "140px",
|
|
5649
|
-
opacity:
|
|
5543
|
+
opacity: a || !x.isValid ? 0.6 : 1,
|
|
5650
5544
|
display: "flex",
|
|
5651
5545
|
alignItems: "center",
|
|
5652
5546
|
justifyContent: "center",
|
|
5653
5547
|
gap: "8px",
|
|
5654
5548
|
transition: "all 0.2s ease",
|
|
5655
|
-
boxShadow:
|
|
5549
|
+
boxShadow: a || !x.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5656
5550
|
},
|
|
5657
5551
|
onMouseOver: (u) => {
|
|
5658
|
-
!
|
|
5552
|
+
!a && x.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5659
5553
|
},
|
|
5660
5554
|
onMouseOut: (u) => {
|
|
5661
|
-
!
|
|
5555
|
+
!a && x.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5662
5556
|
},
|
|
5663
|
-
children:
|
|
5557
|
+
children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
5664
5558
|
/* @__PURE__ */ r.jsx(
|
|
5665
5559
|
se,
|
|
5666
5560
|
{
|
|
@@ -5741,13 +5635,13 @@ const Ns = [
|
|
|
5741
5635
|
onSuccess: n,
|
|
5742
5636
|
onError: s,
|
|
5743
5637
|
userId: i,
|
|
5744
|
-
colors:
|
|
5638
|
+
colors: o
|
|
5745
5639
|
}) => {
|
|
5746
|
-
const
|
|
5640
|
+
const a = ge(), [c, d] = P({
|
|
5747
5641
|
currentPassword: "",
|
|
5748
5642
|
newPassword: "",
|
|
5749
5643
|
confirmPassword: ""
|
|
5750
|
-
}), [
|
|
5644
|
+
}), [f, x] = P({}), [y, k] = P(!1), [E, u] = P({
|
|
5751
5645
|
currentPassword: !1,
|
|
5752
5646
|
newPassword: !1,
|
|
5753
5647
|
confirmPassword: !1
|
|
@@ -5761,17 +5655,17 @@ const Ns = [
|
|
|
5761
5655
|
}, []), !t) return null;
|
|
5762
5656
|
const I = (b) => {
|
|
5763
5657
|
const { name: j, value: q } = b.target;
|
|
5764
|
-
d((O) => ({ ...O, [j]: q })),
|
|
5658
|
+
d((O) => ({ ...O, [j]: q })), f[j] && x((O) => ({ ...O, [j]: "" }));
|
|
5765
5659
|
}, C = (b) => {
|
|
5766
5660
|
u((j) => ({ ...j, [b]: !j[b] }));
|
|
5767
5661
|
}, g = () => {
|
|
5768
5662
|
const b = {};
|
|
5769
|
-
return c.currentPassword || (b.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (b.newPassword = "Password must be at least 6 characters") : b.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (b.confirmPassword = "Passwords do not match"),
|
|
5663
|
+
return c.currentPassword || (b.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (b.newPassword = "Password must be at least 6 characters") : b.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (b.confirmPassword = "Passwords do not match"), x(b), Object.keys(b).length === 0;
|
|
5770
5664
|
}, U = async (b) => {
|
|
5771
5665
|
if (b.preventDefault(), !!g()) {
|
|
5772
5666
|
k(!0);
|
|
5773
5667
|
try {
|
|
5774
|
-
const { data: j } = await
|
|
5668
|
+
const { data: j } = await a.changePassword({
|
|
5775
5669
|
currentPassword: c.currentPassword,
|
|
5776
5670
|
newPassword: c.newPassword,
|
|
5777
5671
|
userId: i
|
|
@@ -5822,8 +5716,8 @@ const Ns = [
|
|
|
5822
5716
|
"div",
|
|
5823
5717
|
{
|
|
5824
5718
|
style: {
|
|
5825
|
-
backgroundColor:
|
|
5826
|
-
border: `1px solid ${
|
|
5719
|
+
backgroundColor: o.surface,
|
|
5720
|
+
border: `1px solid ${o.border}`,
|
|
5827
5721
|
borderRadius: "16px",
|
|
5828
5722
|
maxWidth: "440px",
|
|
5829
5723
|
width: "100%",
|
|
@@ -5862,11 +5756,11 @@ const Ns = [
|
|
|
5862
5756
|
width: "40px",
|
|
5863
5757
|
height: "40px",
|
|
5864
5758
|
borderRadius: "10px",
|
|
5865
|
-
background: `linear-gradient(135deg, ${
|
|
5759
|
+
background: `linear-gradient(135deg, ${o.accent}20, ${o.accent}40)`,
|
|
5866
5760
|
display: "flex",
|
|
5867
5761
|
alignItems: "center",
|
|
5868
5762
|
justifyContent: "center",
|
|
5869
|
-
color:
|
|
5763
|
+
color: o.accent,
|
|
5870
5764
|
flexShrink: 0
|
|
5871
5765
|
},
|
|
5872
5766
|
children: /* @__PURE__ */ r.jsx(be, { size: 20 })
|
|
@@ -5876,7 +5770,7 @@ const Ns = [
|
|
|
5876
5770
|
"h3",
|
|
5877
5771
|
{
|
|
5878
5772
|
style: {
|
|
5879
|
-
color:
|
|
5773
|
+
color: o.textPrimary,
|
|
5880
5774
|
margin: 0,
|
|
5881
5775
|
fontSize: "18px",
|
|
5882
5776
|
fontWeight: 600,
|
|
@@ -5896,7 +5790,7 @@ const Ns = [
|
|
|
5896
5790
|
style: {
|
|
5897
5791
|
background: "transparent",
|
|
5898
5792
|
border: "none",
|
|
5899
|
-
color:
|
|
5793
|
+
color: o.textTertiary,
|
|
5900
5794
|
cursor: "pointer",
|
|
5901
5795
|
padding: "8px",
|
|
5902
5796
|
borderRadius: "8px",
|
|
@@ -5908,10 +5802,10 @@ const Ns = [
|
|
|
5908
5802
|
justifyContent: "center"
|
|
5909
5803
|
},
|
|
5910
5804
|
onMouseOver: (b) => {
|
|
5911
|
-
b.currentTarget.style.backgroundColor =
|
|
5805
|
+
b.currentTarget.style.backgroundColor = o.border, b.currentTarget.style.color = o.textPrimary;
|
|
5912
5806
|
},
|
|
5913
5807
|
onMouseOut: (b) => {
|
|
5914
|
-
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color =
|
|
5808
|
+
b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.color = o.textTertiary;
|
|
5915
5809
|
},
|
|
5916
5810
|
children: /* @__PURE__ */ r.jsx(Oe, { size: 20 })
|
|
5917
5811
|
}
|
|
@@ -5935,7 +5829,7 @@ const Ns = [
|
|
|
5935
5829
|
style: {
|
|
5936
5830
|
display: "block",
|
|
5937
5831
|
marginBottom: "8px",
|
|
5938
|
-
color:
|
|
5832
|
+
color: o.textPrimary,
|
|
5939
5833
|
fontSize: "14px",
|
|
5940
5834
|
fontWeight: 500,
|
|
5941
5835
|
lineHeight: "1.4"
|
|
@@ -5952,7 +5846,7 @@ const Ns = [
|
|
|
5952
5846
|
left: "14px",
|
|
5953
5847
|
top: "50%",
|
|
5954
5848
|
transform: "translateY(-50%)",
|
|
5955
|
-
color:
|
|
5849
|
+
color: o.textTertiary,
|
|
5956
5850
|
zIndex: 2
|
|
5957
5851
|
},
|
|
5958
5852
|
children: q
|
|
@@ -5971,19 +5865,19 @@ const Ns = [
|
|
|
5971
5865
|
width: "100%",
|
|
5972
5866
|
padding: "14px 48px 14px 44px",
|
|
5973
5867
|
borderRadius: "10px",
|
|
5974
|
-
border: `1.5px solid ${
|
|
5868
|
+
border: `1.5px solid ${f[b] ? o.error : o.border}`,
|
|
5975
5869
|
backgroundColor: "transparent",
|
|
5976
|
-
color:
|
|
5870
|
+
color: o.textPrimary,
|
|
5977
5871
|
fontSize: "15px",
|
|
5978
5872
|
outline: "none",
|
|
5979
5873
|
transition: "all 0.2s ease",
|
|
5980
5874
|
boxSizing: "border-box"
|
|
5981
5875
|
},
|
|
5982
5876
|
onFocus: (O) => {
|
|
5983
|
-
O.target.style.borderColor =
|
|
5877
|
+
O.target.style.borderColor = o.accent, O.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
5984
5878
|
},
|
|
5985
5879
|
onBlur: (O) => {
|
|
5986
|
-
O.target.style.borderColor =
|
|
5880
|
+
O.target.style.borderColor = f[b] ? o.error : o.border, O.target.style.boxShadow = "none";
|
|
5987
5881
|
}
|
|
5988
5882
|
}
|
|
5989
5883
|
),
|
|
@@ -6000,7 +5894,7 @@ const Ns = [
|
|
|
6000
5894
|
background: "transparent",
|
|
6001
5895
|
border: "none",
|
|
6002
5896
|
cursor: "pointer",
|
|
6003
|
-
color:
|
|
5897
|
+
color: o.textTertiary,
|
|
6004
5898
|
padding: "4px",
|
|
6005
5899
|
borderRadius: "4px",
|
|
6006
5900
|
width: "32px",
|
|
@@ -6010,21 +5904,21 @@ const Ns = [
|
|
|
6010
5904
|
justifyContent: "center"
|
|
6011
5905
|
},
|
|
6012
5906
|
onMouseOver: (O) => {
|
|
6013
|
-
O.currentTarget.style.backgroundColor =
|
|
5907
|
+
O.currentTarget.style.backgroundColor = o.border, O.currentTarget.style.color = o.textPrimary;
|
|
6014
5908
|
},
|
|
6015
5909
|
onMouseOut: (O) => {
|
|
6016
|
-
O.currentTarget.style.backgroundColor = "transparent", O.currentTarget.style.color =
|
|
5910
|
+
O.currentTarget.style.backgroundColor = "transparent", O.currentTarget.style.color = o.textTertiary;
|
|
6017
5911
|
},
|
|
6018
|
-
children: E[b] ? /* @__PURE__ */ r.jsx(
|
|
5912
|
+
children: E[b] ? /* @__PURE__ */ r.jsx(ot, { size: 18 }) : /* @__PURE__ */ r.jsx(at, { size: 18 })
|
|
6019
5913
|
}
|
|
6020
5914
|
)
|
|
6021
5915
|
] }),
|
|
6022
|
-
|
|
5916
|
+
f[b] && /* @__PURE__ */ r.jsxs(
|
|
6023
5917
|
"div",
|
|
6024
5918
|
{
|
|
6025
5919
|
style: {
|
|
6026
5920
|
fontSize: "13px",
|
|
6027
|
-
color:
|
|
5921
|
+
color: o.error,
|
|
6028
5922
|
marginTop: "6px",
|
|
6029
5923
|
display: "flex",
|
|
6030
5924
|
alignItems: "center",
|
|
@@ -6032,7 +5926,7 @@ const Ns = [
|
|
|
6032
5926
|
},
|
|
6033
5927
|
children: [
|
|
6034
5928
|
/* @__PURE__ */ r.jsx("span", { style: { fontSize: "16px" }, children: "⚠" }),
|
|
6035
|
-
|
|
5929
|
+
f[b]
|
|
6036
5930
|
]
|
|
6037
5931
|
}
|
|
6038
5932
|
)
|
|
@@ -6060,9 +5954,9 @@ const Ns = [
|
|
|
6060
5954
|
style: {
|
|
6061
5955
|
padding: "14px 24px",
|
|
6062
5956
|
borderRadius: "10px",
|
|
6063
|
-
border: `1.5px solid ${
|
|
5957
|
+
border: `1.5px solid ${o.border}`,
|
|
6064
5958
|
background: "transparent",
|
|
6065
|
-
color:
|
|
5959
|
+
color: o.textPrimary,
|
|
6066
5960
|
fontSize: "14px",
|
|
6067
5961
|
fontWeight: 500,
|
|
6068
5962
|
cursor: y ? "not-allowed" : "pointer",
|
|
@@ -6072,7 +5966,7 @@ const Ns = [
|
|
|
6072
5966
|
transition: "all 0.2s ease"
|
|
6073
5967
|
},
|
|
6074
5968
|
onMouseOver: (b) => {
|
|
6075
|
-
y || (b.currentTarget.style.backgroundColor =
|
|
5969
|
+
y || (b.currentTarget.style.backgroundColor = o.border, b.currentTarget.style.transform = "translateY(-1px)");
|
|
6076
5970
|
},
|
|
6077
5971
|
onMouseOut: (b) => {
|
|
6078
5972
|
y || (b.currentTarget.style.backgroundColor = "transparent", b.currentTarget.style.transform = "translateY(0)");
|
|
@@ -6089,7 +5983,7 @@ const Ns = [
|
|
|
6089
5983
|
padding: "14px 24px",
|
|
6090
5984
|
borderRadius: "10px",
|
|
6091
5985
|
border: "none",
|
|
6092
|
-
background: `linear-gradient(135deg, ${
|
|
5986
|
+
background: `linear-gradient(135deg, ${o.accent}, ${o.accent}E6)`,
|
|
6093
5987
|
color: "#fff",
|
|
6094
5988
|
fontSize: "14px",
|
|
6095
5989
|
fontWeight: 600,
|
|
@@ -6102,13 +5996,13 @@ const Ns = [
|
|
|
6102
5996
|
justifyContent: "center",
|
|
6103
5997
|
gap: "8px",
|
|
6104
5998
|
transition: "all 0.2s ease",
|
|
6105
|
-
boxShadow: y ? "none" : `0 4px 12px ${
|
|
5999
|
+
boxShadow: y ? "none" : `0 4px 12px ${o.accent}40`
|
|
6106
6000
|
},
|
|
6107
6001
|
onMouseOver: (b) => {
|
|
6108
|
-
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${
|
|
6002
|
+
y || (b.currentTarget.style.transform = "translateY(-1px)", b.currentTarget.style.boxShadow = `0 6px 20px ${o.accent}60`);
|
|
6109
6003
|
},
|
|
6110
6004
|
onMouseOut: (b) => {
|
|
6111
|
-
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${
|
|
6005
|
+
y || (b.currentTarget.style.transform = "translateY(0)", b.currentTarget.style.boxShadow = `0 4px 12px ${o.accent}40`);
|
|
6112
6006
|
},
|
|
6113
6007
|
children: y ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
6114
6008
|
/* @__PURE__ */ r.jsx(
|
|
@@ -6143,12 +6037,12 @@ const Ns = [
|
|
|
6143
6037
|
}
|
|
6144
6038
|
|
|
6145
6039
|
.change-password-modal::-webkit-scrollbar-thumb {
|
|
6146
|
-
background: ${
|
|
6040
|
+
background: ${o.border};
|
|
6147
6041
|
border-radius: 3px;
|
|
6148
6042
|
}
|
|
6149
6043
|
|
|
6150
6044
|
.change-password-modal::-webkit-scrollbar-thumb:hover {
|
|
6151
|
-
background: ${
|
|
6045
|
+
background: ${o.textTertiary};
|
|
6152
6046
|
}
|
|
6153
6047
|
|
|
6154
6048
|
/* Mobile responsiveness */
|
|
@@ -6178,23 +6072,23 @@ const Ns = [
|
|
|
6178
6072
|
onVerify: n,
|
|
6179
6073
|
onSendOTP: s,
|
|
6180
6074
|
verifyFormData: i,
|
|
6181
|
-
setVerifyFormData:
|
|
6182
|
-
otpSent:
|
|
6075
|
+
setVerifyFormData: o,
|
|
6076
|
+
otpSent: a,
|
|
6183
6077
|
verifying: c,
|
|
6184
6078
|
user: d,
|
|
6185
|
-
colors:
|
|
6186
|
-
darkMode:
|
|
6079
|
+
colors: f,
|
|
6080
|
+
darkMode: x
|
|
6187
6081
|
}) => {
|
|
6188
6082
|
if (!t) return null;
|
|
6189
6083
|
const y = () => {
|
|
6190
|
-
e(),
|
|
6084
|
+
e(), o({ email: d?.email || "", otp: "" });
|
|
6191
6085
|
};
|
|
6192
6086
|
return /* @__PURE__ */ r.jsxs(
|
|
6193
6087
|
"div",
|
|
6194
6088
|
{
|
|
6195
6089
|
className: "modal-overlay",
|
|
6196
6090
|
style: {
|
|
6197
|
-
backgroundColor:
|
|
6091
|
+
backgroundColor: x ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
6198
6092
|
},
|
|
6199
6093
|
children: [
|
|
6200
6094
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -6202,18 +6096,18 @@ const Ns = [
|
|
|
6202
6096
|
{
|
|
6203
6097
|
className: "verify-email-modal",
|
|
6204
6098
|
style: {
|
|
6205
|
-
backgroundColor:
|
|
6206
|
-
border: `1px solid ${
|
|
6099
|
+
backgroundColor: f.surface,
|
|
6100
|
+
border: `1px solid ${f.border}`
|
|
6207
6101
|
},
|
|
6208
6102
|
children: [
|
|
6209
6103
|
/* @__PURE__ */ r.jsxs("div", { className: "modal-header", children: [
|
|
6210
|
-
/* @__PURE__ */ r.jsx("h3", { style: { color:
|
|
6104
|
+
/* @__PURE__ */ r.jsx("h3", { style: { color: f.textPrimary }, children: "Verify Your Email" }),
|
|
6211
6105
|
/* @__PURE__ */ r.jsx(
|
|
6212
6106
|
"button",
|
|
6213
6107
|
{
|
|
6214
6108
|
onClick: y,
|
|
6215
6109
|
className: "close-btn",
|
|
6216
|
-
style: { color:
|
|
6110
|
+
style: { color: f.textTertiary },
|
|
6217
6111
|
"aria-label": "Close verification modal",
|
|
6218
6112
|
children: /* @__PURE__ */ r.jsx(Oe, { size: 20, "aria-hidden": "true" })
|
|
6219
6113
|
}
|
|
@@ -6221,13 +6115,13 @@ const Ns = [
|
|
|
6221
6115
|
] }),
|
|
6222
6116
|
/* @__PURE__ */ r.jsxs("form", { className: "verify-form", onSubmit: n, children: [
|
|
6223
6117
|
/* @__PURE__ */ r.jsxs("div", { className: "form-group", children: [
|
|
6224
|
-
/* @__PURE__ */ r.jsx("label", { style: { color:
|
|
6118
|
+
/* @__PURE__ */ r.jsx("label", { style: { color: f.textSecondary }, children: "Email" }),
|
|
6225
6119
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
6226
6120
|
/* @__PURE__ */ r.jsx(
|
|
6227
6121
|
pe,
|
|
6228
6122
|
{
|
|
6229
6123
|
size: 18,
|
|
6230
|
-
style: { color:
|
|
6124
|
+
style: { color: f.textTertiary },
|
|
6231
6125
|
"aria-hidden": "true"
|
|
6232
6126
|
}
|
|
6233
6127
|
),
|
|
@@ -6236,15 +6130,15 @@ const Ns = [
|
|
|
6236
6130
|
{
|
|
6237
6131
|
type: "email",
|
|
6238
6132
|
value: i.email,
|
|
6239
|
-
onChange: (k) =>
|
|
6133
|
+
onChange: (k) => o((E) => ({
|
|
6240
6134
|
...E,
|
|
6241
6135
|
email: k.target.value
|
|
6242
6136
|
})),
|
|
6243
6137
|
placeholder: "Enter your email",
|
|
6244
6138
|
style: {
|
|
6245
|
-
backgroundColor:
|
|
6246
|
-
color:
|
|
6247
|
-
borderColor:
|
|
6139
|
+
backgroundColor: f.surfaceLight,
|
|
6140
|
+
color: f.textPrimary,
|
|
6141
|
+
borderColor: f.border
|
|
6248
6142
|
},
|
|
6249
6143
|
required: !0,
|
|
6250
6144
|
"aria-required": "true",
|
|
@@ -6253,14 +6147,14 @@ const Ns = [
|
|
|
6253
6147
|
)
|
|
6254
6148
|
] })
|
|
6255
6149
|
] }),
|
|
6256
|
-
|
|
6257
|
-
/* @__PURE__ */ r.jsx("label", { style: { color:
|
|
6150
|
+
a && /* @__PURE__ */ r.jsxs("div", { className: "form-group", children: [
|
|
6151
|
+
/* @__PURE__ */ r.jsx("label", { style: { color: f.textSecondary }, children: "OTP" }),
|
|
6258
6152
|
/* @__PURE__ */ r.jsxs("div", { className: "input-container", children: [
|
|
6259
6153
|
/* @__PURE__ */ r.jsx(
|
|
6260
|
-
|
|
6154
|
+
or,
|
|
6261
6155
|
{
|
|
6262
6156
|
size: 18,
|
|
6263
|
-
style: { color:
|
|
6157
|
+
style: { color: f.textTertiary },
|
|
6264
6158
|
"aria-hidden": "true"
|
|
6265
6159
|
}
|
|
6266
6160
|
),
|
|
@@ -6269,15 +6163,15 @@ const Ns = [
|
|
|
6269
6163
|
{
|
|
6270
6164
|
type: "text",
|
|
6271
6165
|
value: i.otp,
|
|
6272
|
-
onChange: (k) =>
|
|
6166
|
+
onChange: (k) => o((E) => ({
|
|
6273
6167
|
...E,
|
|
6274
6168
|
otp: k.target.value
|
|
6275
6169
|
})),
|
|
6276
6170
|
placeholder: "Enter OTP",
|
|
6277
6171
|
style: {
|
|
6278
|
-
backgroundColor:
|
|
6279
|
-
color:
|
|
6280
|
-
borderColor:
|
|
6172
|
+
backgroundColor: f.surfaceLight,
|
|
6173
|
+
color: f.textPrimary,
|
|
6174
|
+
borderColor: f.border
|
|
6281
6175
|
},
|
|
6282
6176
|
required: !0,
|
|
6283
6177
|
"aria-required": "true",
|
|
@@ -6286,14 +6180,14 @@ const Ns = [
|
|
|
6286
6180
|
)
|
|
6287
6181
|
] })
|
|
6288
6182
|
] }),
|
|
6289
|
-
/* @__PURE__ */ r.jsx("div", { className: "modal-actions", children:
|
|
6183
|
+
/* @__PURE__ */ r.jsx("div", { className: "modal-actions", children: a ? /* @__PURE__ */ r.jsxs(
|
|
6290
6184
|
"button",
|
|
6291
6185
|
{
|
|
6292
6186
|
type: "submit",
|
|
6293
6187
|
disabled: c,
|
|
6294
6188
|
className: "btn-primary",
|
|
6295
6189
|
style: {
|
|
6296
|
-
background: `linear-gradient(to right, ${
|
|
6190
|
+
background: `linear-gradient(to right, ${f.accent}, ${f.accentHover})`,
|
|
6297
6191
|
opacity: c ? 0.7 : 1
|
|
6298
6192
|
},
|
|
6299
6193
|
"aria-label": c ? "Verifying email" : "Verify email",
|
|
@@ -6310,7 +6204,7 @@ const Ns = [
|
|
|
6310
6204
|
disabled: c,
|
|
6311
6205
|
className: "btn-primary",
|
|
6312
6206
|
style: {
|
|
6313
|
-
background: `linear-gradient(to right, ${
|
|
6207
|
+
background: `linear-gradient(to right, ${f.accent}, ${f.accentHover})`,
|
|
6314
6208
|
opacity: c ? 0.7 : 1
|
|
6315
6209
|
},
|
|
6316
6210
|
"aria-label": c ? "Sending OTP" : "Send OTP",
|
|
@@ -6373,7 +6267,7 @@ const Ns = [
|
|
|
6373
6267
|
}
|
|
6374
6268
|
|
|
6375
6269
|
.close-btn:hover {
|
|
6376
|
-
background-color: ${
|
|
6270
|
+
background-color: ${x ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6377
6271
|
}
|
|
6378
6272
|
|
|
6379
6273
|
.verify-form {
|
|
@@ -6417,8 +6311,8 @@ const Ns = [
|
|
|
6417
6311
|
}
|
|
6418
6312
|
|
|
6419
6313
|
.input-container input:focus {
|
|
6420
|
-
border-color: ${
|
|
6421
|
-
box-shadow: 0 0 0 3px ${
|
|
6314
|
+
border-color: ${f.accent};
|
|
6315
|
+
box-shadow: 0 0 0 3px ${f.accent}20;
|
|
6422
6316
|
}
|
|
6423
6317
|
|
|
6424
6318
|
.modal-actions {
|
|
@@ -6482,10 +6376,10 @@ const Ns = [
|
|
|
6482
6376
|
onVerify: s,
|
|
6483
6377
|
primaryColor: i = "#00C212"
|
|
6484
6378
|
}) => {
|
|
6485
|
-
const
|
|
6379
|
+
const o = ge(), [a, c] = P(null), [d, f] = P(), [x, y] = P(!0), [k, E] = P(!1), [u, w] = P(!1), [h, I] = P(!1), [C, g] = P(!1), [U, N] = P(!1), [b, j] = P(!1), [q, O] = P(!1), [X, W] = P(!1), [R, G] = P(null), [T, A] = P(!1), [M, K] = P({
|
|
6486
6380
|
email: "",
|
|
6487
6381
|
otp: ""
|
|
6488
|
-
}), [H,
|
|
6382
|
+
}), [H, F] = P(!1), [Y, l] = P(!1);
|
|
6489
6383
|
ee(() => {
|
|
6490
6384
|
if (typeof window < "u") {
|
|
6491
6385
|
const v = () => c(window.innerWidth);
|
|
@@ -6521,11 +6415,11 @@ const Ns = [
|
|
|
6521
6415
|
}
|
|
6522
6416
|
try {
|
|
6523
6417
|
l(!0);
|
|
6524
|
-
const v = await
|
|
6418
|
+
const v = await o.requestEmailVerificationOTP({
|
|
6525
6419
|
userId: d.id,
|
|
6526
6420
|
email: M.email
|
|
6527
6421
|
}), _ = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
|
|
6528
|
-
_ ? (m("success", V || "OTP sent to email!"),
|
|
6422
|
+
_ ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
|
|
6529
6423
|
} catch (v) {
|
|
6530
6424
|
const _ = v?.response?.data?.message || v?.message || "Server error";
|
|
6531
6425
|
m("error", _);
|
|
@@ -6543,14 +6437,14 @@ const Ns = [
|
|
|
6543
6437
|
}
|
|
6544
6438
|
try {
|
|
6545
6439
|
l(!0);
|
|
6546
|
-
const _ = await
|
|
6440
|
+
const _ = await o.verifyEmail({
|
|
6547
6441
|
email: M.email,
|
|
6548
6442
|
otp: M.otp
|
|
6549
6443
|
}), V = _?.data?.success ?? _?.success, Z = _?.data?.message ?? _?.message;
|
|
6550
6444
|
if (V) {
|
|
6551
6445
|
m("success", Z || "Email verified!");
|
|
6552
6446
|
const de = { ...d, isVerified: !0 };
|
|
6553
|
-
|
|
6447
|
+
f(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }), F(!1), j?.(!1);
|
|
6554
6448
|
} else
|
|
6555
6449
|
m("error", Z || "Verification failed");
|
|
6556
6450
|
} catch (_) {
|
|
@@ -6559,10 +6453,10 @@ const Ns = [
|
|
|
6559
6453
|
} finally {
|
|
6560
6454
|
l(!1);
|
|
6561
6455
|
}
|
|
6562
|
-
},
|
|
6456
|
+
}, ae = async (v) => {
|
|
6563
6457
|
if (!d) return !1;
|
|
6564
6458
|
try {
|
|
6565
|
-
const _ = await
|
|
6459
|
+
const _ = await o.updateUser({
|
|
6566
6460
|
userId: d.id,
|
|
6567
6461
|
avatarUrl: v
|
|
6568
6462
|
});
|
|
@@ -6574,7 +6468,7 @@ const Ns = [
|
|
|
6574
6468
|
// 🔁 merge backend response if present
|
|
6575
6469
|
avatarUrl: v
|
|
6576
6470
|
};
|
|
6577
|
-
return
|
|
6471
|
+
return f(V), m("success", "Avatar updated successfully!"), !0;
|
|
6578
6472
|
}
|
|
6579
6473
|
return m("error", _?.message || "Failed to update avatar"), !1;
|
|
6580
6474
|
} catch (_) {
|
|
@@ -6584,7 +6478,7 @@ const Ns = [
|
|
|
6584
6478
|
if (d) {
|
|
6585
6479
|
w(!0);
|
|
6586
6480
|
try {
|
|
6587
|
-
const v = d.email, _ = await
|
|
6481
|
+
const v = d.email, _ = await o.updateUser({
|
|
6588
6482
|
userId: d.id,
|
|
6589
6483
|
...d
|
|
6590
6484
|
});
|
|
@@ -6596,7 +6490,7 @@ const Ns = [
|
|
|
6596
6490
|
// overwrite updated fields
|
|
6597
6491
|
isVerified: V ? !1 : d.isVerified
|
|
6598
6492
|
};
|
|
6599
|
-
|
|
6493
|
+
f(Z), localStorage.setItem("userInfo", JSON.stringify(Z)), m(
|
|
6600
6494
|
"success",
|
|
6601
6495
|
V ? "Email updated. Please verify your new email." : "Profile updated successfully"
|
|
6602
6496
|
), E(!1);
|
|
@@ -6610,8 +6504,8 @@ const Ns = [
|
|
|
6610
6504
|
}
|
|
6611
6505
|
}, le = async (v) => {
|
|
6612
6506
|
try {
|
|
6613
|
-
const _ = await
|
|
6614
|
-
_?.success === !0 && _?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"),
|
|
6507
|
+
const _ = await o.checkIfUserExists(v);
|
|
6508
|
+
_?.success === !0 && _?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), f(null));
|
|
6615
6509
|
} catch (_) {
|
|
6616
6510
|
console.error("⚠️ User validation request failed:", _);
|
|
6617
6511
|
}
|
|
@@ -6620,29 +6514,29 @@ const Ns = [
|
|
|
6620
6514
|
(async () => {
|
|
6621
6515
|
try {
|
|
6622
6516
|
y(!0);
|
|
6623
|
-
const _ = await
|
|
6517
|
+
const _ = await o.checkUserSession();
|
|
6624
6518
|
if (_.user?.id) {
|
|
6625
|
-
const V = _.user.id, Z = await
|
|
6519
|
+
const V = _.user.id, Z = await o.getUserProfile({ userId: V });
|
|
6626
6520
|
if (Z.user) {
|
|
6627
6521
|
const de = Z.user;
|
|
6628
|
-
|
|
6522
|
+
f(de), le(V);
|
|
6629
6523
|
} else
|
|
6630
|
-
|
|
6524
|
+
f(null), localStorage.removeItem("userInfo");
|
|
6631
6525
|
} else
|
|
6632
|
-
|
|
6526
|
+
f(null), localStorage.removeItem("userInfo");
|
|
6633
6527
|
} catch (_) {
|
|
6634
|
-
console.error("User init failed:", _),
|
|
6528
|
+
console.error("User init failed:", _), f(null), localStorage.removeItem("userInfo");
|
|
6635
6529
|
} finally {
|
|
6636
6530
|
y(!1);
|
|
6637
6531
|
}
|
|
6638
6532
|
})();
|
|
6639
6533
|
}, []), ee(() => {
|
|
6640
|
-
d?.email &&
|
|
6534
|
+
d?.email && K((v) => ({ ...v, email: d.email }));
|
|
6641
6535
|
}, [d?.email]);
|
|
6642
6536
|
const ye = (v, _) => {
|
|
6643
6537
|
let V = parseInt(v.replace("#", ""), 16), Z = (V >> 16) + _, de = (V >> 8 & 255) + _, Be = (V & 255) + _;
|
|
6644
6538
|
return Z = Math.min(255, Math.max(0, Z)), de = Math.min(255, Math.max(0, de)), Be = Math.min(255, Math.max(0, Be)), `#${(Be | de << 8 | Z << 16).toString(16).padStart(6, "0")}`;
|
|
6645
|
-
},
|
|
6539
|
+
}, z = t ? {
|
|
6646
6540
|
background: "#000000",
|
|
6647
6541
|
surface: "#09090b",
|
|
6648
6542
|
surfaceLight: "#27272a",
|
|
@@ -6671,7 +6565,7 @@ const Ns = [
|
|
|
6671
6565
|
border: "#e4e4e7",
|
|
6672
6566
|
warning: "#d97706"
|
|
6673
6567
|
};
|
|
6674
|
-
if (
|
|
6568
|
+
if (x)
|
|
6675
6569
|
return /* @__PURE__ */ r.jsx(
|
|
6676
6570
|
"div",
|
|
6677
6571
|
{
|
|
@@ -6681,7 +6575,7 @@ const Ns = [
|
|
|
6681
6575
|
display: "flex",
|
|
6682
6576
|
alignItems: "center",
|
|
6683
6577
|
justifyContent: "center",
|
|
6684
|
-
color:
|
|
6578
|
+
color: z.textPrimary,
|
|
6685
6579
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
|
|
6686
6580
|
},
|
|
6687
6581
|
children: /* @__PURE__ */ r.jsxs(
|
|
@@ -6699,12 +6593,12 @@ const Ns = [
|
|
|
6699
6593
|
se,
|
|
6700
6594
|
{
|
|
6701
6595
|
size: 40,
|
|
6702
|
-
color:
|
|
6596
|
+
color: z.accent,
|
|
6703
6597
|
style: { animation: "spin 1s linear infinite" },
|
|
6704
6598
|
"aria-hidden": "true"
|
|
6705
6599
|
}
|
|
6706
6600
|
),
|
|
6707
|
-
/* @__PURE__ */ r.jsx("p", { style: { color:
|
|
6601
|
+
/* @__PURE__ */ r.jsx("p", { style: { color: z.textTertiary, margin: 0 }, children: "Loading your profile..." })
|
|
6708
6602
|
]
|
|
6709
6603
|
}
|
|
6710
6604
|
)
|
|
@@ -6720,7 +6614,7 @@ const Ns = [
|
|
|
6720
6614
|
display: "flex",
|
|
6721
6615
|
alignItems: "center",
|
|
6722
6616
|
justifyContent: "center",
|
|
6723
|
-
color:
|
|
6617
|
+
color: z.textPrimary,
|
|
6724
6618
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
|
|
6725
6619
|
},
|
|
6726
6620
|
children: /* @__PURE__ */ r.jsxs(
|
|
@@ -6734,8 +6628,8 @@ const Ns = [
|
|
|
6734
6628
|
textAlign: "center"
|
|
6735
6629
|
},
|
|
6736
6630
|
children: [
|
|
6737
|
-
/* @__PURE__ */ r.jsx(ie, { size: 40, color:
|
|
6738
|
-
/* @__PURE__ */ r.jsx("p", { style: { color:
|
|
6631
|
+
/* @__PURE__ */ r.jsx(ie, { size: 40, color: z.error, "aria-hidden": "true" }),
|
|
6632
|
+
/* @__PURE__ */ r.jsx("p", { style: { color: z.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
|
|
6739
6633
|
]
|
|
6740
6634
|
}
|
|
6741
6635
|
)
|
|
@@ -6795,7 +6689,7 @@ const Ns = [
|
|
|
6795
6689
|
display: "flex",
|
|
6796
6690
|
alignItems: "center",
|
|
6797
6691
|
justifyContent: "center",
|
|
6798
|
-
color:
|
|
6692
|
+
color: z.textPrimary,
|
|
6799
6693
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
6800
6694
|
lineHeight: 1.5,
|
|
6801
6695
|
minHeight: "80vh"
|
|
@@ -6855,14 +6749,14 @@ const Ns = [
|
|
|
6855
6749
|
display: "grid",
|
|
6856
6750
|
gap: "24px",
|
|
6857
6751
|
gridTemplateColumns: "1fr",
|
|
6858
|
-
...
|
|
6752
|
+
...a && window.innerWidth >= 1024 && {
|
|
6859
6753
|
gridTemplateColumns: "1fr 2fr",
|
|
6860
6754
|
gap: "10px"
|
|
6861
6755
|
},
|
|
6862
|
-
...
|
|
6756
|
+
...a && window.innerWidth >= 768 && a && window.innerWidth < 1024 && {
|
|
6863
6757
|
gap: "10px"
|
|
6864
6758
|
},
|
|
6865
|
-
...
|
|
6759
|
+
...a && window.innerWidth >= 600 && a && window.innerWidth < 768 && {
|
|
6866
6760
|
gap: "28px"
|
|
6867
6761
|
}
|
|
6868
6762
|
},
|
|
@@ -6881,7 +6775,7 @@ const Ns = [
|
|
|
6881
6775
|
"section",
|
|
6882
6776
|
{
|
|
6883
6777
|
style: {
|
|
6884
|
-
backgroundColor:
|
|
6778
|
+
backgroundColor: z.surface,
|
|
6885
6779
|
borderRadius: "16px",
|
|
6886
6780
|
position: "relative",
|
|
6887
6781
|
padding: "24px",
|
|
@@ -6935,7 +6829,7 @@ const Ns = [
|
|
|
6935
6829
|
borderRadius: "50%",
|
|
6936
6830
|
objectFit: "cover",
|
|
6937
6831
|
boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.3)",
|
|
6938
|
-
border: `3px solid ${
|
|
6832
|
+
border: `3px solid ${z.border}`
|
|
6939
6833
|
},
|
|
6940
6834
|
width: 128,
|
|
6941
6835
|
height: 128,
|
|
@@ -6950,7 +6844,7 @@ const Ns = [
|
|
|
6950
6844
|
position: "absolute",
|
|
6951
6845
|
bottom: "8px",
|
|
6952
6846
|
right: "8px",
|
|
6953
|
-
backgroundColor:
|
|
6847
|
+
backgroundColor: z.accent,
|
|
6954
6848
|
color: "white",
|
|
6955
6849
|
padding: "8px",
|
|
6956
6850
|
borderRadius: "50%",
|
|
@@ -6977,7 +6871,7 @@ const Ns = [
|
|
|
6977
6871
|
fontSize: "24px",
|
|
6978
6872
|
fontWeight: 600,
|
|
6979
6873
|
margin: "0 0 4px 0",
|
|
6980
|
-
color:
|
|
6874
|
+
color: z.textPrimary
|
|
6981
6875
|
},
|
|
6982
6876
|
children: d.name
|
|
6983
6877
|
}
|
|
@@ -6989,7 +6883,7 @@ const Ns = [
|
|
|
6989
6883
|
fontSize: "18px",
|
|
6990
6884
|
fontWeight: 600,
|
|
6991
6885
|
margin: "0 0 4px 0",
|
|
6992
|
-
color:
|
|
6886
|
+
color: z.textTertiary
|
|
6993
6887
|
},
|
|
6994
6888
|
children: [
|
|
6995
6889
|
"@",
|
|
@@ -7001,7 +6895,7 @@ const Ns = [
|
|
|
7001
6895
|
"p",
|
|
7002
6896
|
{
|
|
7003
6897
|
style: {
|
|
7004
|
-
color:
|
|
6898
|
+
color: z.textTertiary,
|
|
7005
6899
|
margin: "0 0 8px 0"
|
|
7006
6900
|
},
|
|
7007
6901
|
children: d.email
|
|
@@ -7012,7 +6906,7 @@ const Ns = [
|
|
|
7012
6906
|
{
|
|
7013
6907
|
style: {
|
|
7014
6908
|
backgroundColor: d.isVerified ? t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)" : t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
|
|
7015
|
-
color: d.isVerified ?
|
|
6909
|
+
color: d.isVerified ? z.success : z.warning,
|
|
7016
6910
|
border: `1px solid ${d.isVerified ? t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)" : t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`,
|
|
7017
6911
|
padding: "6px 12px",
|
|
7018
6912
|
borderRadius: "20px",
|
|
@@ -7046,9 +6940,9 @@ const Ns = [
|
|
|
7046
6940
|
{
|
|
7047
6941
|
onClick: () => E(!1),
|
|
7048
6942
|
style: {
|
|
7049
|
-
backgroundColor:
|
|
7050
|
-
border: `1px solid ${
|
|
7051
|
-
color:
|
|
6943
|
+
backgroundColor: z.surfaceLight,
|
|
6944
|
+
border: `1px solid ${z.border}`,
|
|
6945
|
+
color: z.textPrimary,
|
|
7052
6946
|
padding: "10px 20px",
|
|
7053
6947
|
borderRadius: "6px",
|
|
7054
6948
|
borderStyle: "solid",
|
|
@@ -7062,7 +6956,7 @@ const Ns = [
|
|
|
7062
6956
|
gap: "8px",
|
|
7063
6957
|
textDecoration: "none",
|
|
7064
6958
|
minHeight: "36px",
|
|
7065
|
-
flex:
|
|
6959
|
+
flex: a && window.innerWidth < 1024 ? "1" : "auto"
|
|
7066
6960
|
},
|
|
7067
6961
|
children: [
|
|
7068
6962
|
/* @__PURE__ */ r.jsx(Oe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7076,7 +6970,7 @@ const Ns = [
|
|
|
7076
6970
|
onClick: B,
|
|
7077
6971
|
disabled: u,
|
|
7078
6972
|
style: {
|
|
7079
|
-
background: `linear-gradient(to right, ${
|
|
6973
|
+
background: `linear-gradient(to right, ${z.accent}, ${z.accentHover})`,
|
|
7080
6974
|
opacity: u ? 0.7 : 1,
|
|
7081
6975
|
color: "white",
|
|
7082
6976
|
padding: "10px 20px",
|
|
@@ -7092,7 +6986,7 @@ const Ns = [
|
|
|
7092
6986
|
gap: "8px",
|
|
7093
6987
|
textDecoration: "none",
|
|
7094
6988
|
minHeight: "36px",
|
|
7095
|
-
flex:
|
|
6989
|
+
flex: a && window.innerWidth < 1024 ? "1" : "auto"
|
|
7096
6990
|
},
|
|
7097
6991
|
children: [
|
|
7098
6992
|
u ? /* @__PURE__ */ r.jsx(
|
|
@@ -7113,7 +7007,7 @@ const Ns = [
|
|
|
7113
7007
|
{
|
|
7114
7008
|
onClick: () => E(!0),
|
|
7115
7009
|
style: {
|
|
7116
|
-
background: `linear-gradient(to right, ${
|
|
7010
|
+
background: `linear-gradient(to right, ${z.accent}, ${z.accentHover})`,
|
|
7117
7011
|
color: "white",
|
|
7118
7012
|
padding: "10px 20px",
|
|
7119
7013
|
borderRadius: "6px",
|
|
@@ -7128,7 +7022,7 @@ const Ns = [
|
|
|
7128
7022
|
gap: "8px",
|
|
7129
7023
|
textDecoration: "none",
|
|
7130
7024
|
minHeight: "36px",
|
|
7131
|
-
flex:
|
|
7025
|
+
flex: a && window.innerWidth < 1024 ? "1" : "auto"
|
|
7132
7026
|
},
|
|
7133
7027
|
children: [
|
|
7134
7028
|
/* @__PURE__ */ r.jsx(ks, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7158,7 +7052,7 @@ const Ns = [
|
|
|
7158
7052
|
gap: "8px",
|
|
7159
7053
|
minHeight: "36px",
|
|
7160
7054
|
opacity: T ? 0.7 : 1,
|
|
7161
|
-
flex:
|
|
7055
|
+
flex: a && window.innerWidth < 1024 ? "1" : "auto"
|
|
7162
7056
|
},
|
|
7163
7057
|
children: [
|
|
7164
7058
|
T ? /* @__PURE__ */ r.jsx(
|
|
@@ -7178,8 +7072,8 @@ const Ns = [
|
|
|
7178
7072
|
"button",
|
|
7179
7073
|
{
|
|
7180
7074
|
style: {
|
|
7181
|
-
backgroundColor:
|
|
7182
|
-
color:
|
|
7075
|
+
backgroundColor: z.surfaceLight,
|
|
7076
|
+
color: z.textPrimary,
|
|
7183
7077
|
padding: "10px 20px",
|
|
7184
7078
|
borderRadius: "6px",
|
|
7185
7079
|
border: "none",
|
|
@@ -7212,8 +7106,8 @@ const Ns = [
|
|
|
7212
7106
|
bottom: "100%",
|
|
7213
7107
|
left: 0,
|
|
7214
7108
|
right: 0,
|
|
7215
|
-
backgroundColor:
|
|
7216
|
-
border: `1px solid ${
|
|
7109
|
+
backgroundColor: z.surface,
|
|
7110
|
+
border: `1px solid ${z.border}`,
|
|
7217
7111
|
borderRadius: "12px 12px 0 0",
|
|
7218
7112
|
boxShadow: "0 -8px 24px rgba(0, 0, 0, 0.25)",
|
|
7219
7113
|
zIndex: 200,
|
|
@@ -7233,7 +7127,7 @@ const Ns = [
|
|
|
7233
7127
|
padding: "14px 18px",
|
|
7234
7128
|
backgroundColor: "transparent",
|
|
7235
7129
|
border: "none",
|
|
7236
|
-
color:
|
|
7130
|
+
color: z.textPrimary,
|
|
7237
7131
|
cursor: "pointer",
|
|
7238
7132
|
transition: "all 0.2s ease",
|
|
7239
7133
|
fontSize: "13px",
|
|
@@ -7243,7 +7137,7 @@ const Ns = [
|
|
|
7243
7137
|
gap: "8px",
|
|
7244
7138
|
textAlign: "left"
|
|
7245
7139
|
},
|
|
7246
|
-
onMouseEnter: (v) => v.currentTarget.style.backgroundColor =
|
|
7140
|
+
onMouseEnter: (v) => v.currentTarget.style.backgroundColor = z.surfaceLight,
|
|
7247
7141
|
onMouseLeave: (v) => v.currentTarget.style.backgroundColor = "transparent",
|
|
7248
7142
|
children: [
|
|
7249
7143
|
/* @__PURE__ */ r.jsx(lt, { size: 14, "aria-hidden": "true" }),
|
|
@@ -7337,7 +7231,7 @@ const Ns = [
|
|
|
7337
7231
|
"section",
|
|
7338
7232
|
{
|
|
7339
7233
|
style: {
|
|
7340
|
-
backgroundColor:
|
|
7234
|
+
backgroundColor: z.surface,
|
|
7341
7235
|
borderRadius: "16px",
|
|
7342
7236
|
padding: "24px",
|
|
7343
7237
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
|
|
@@ -7350,7 +7244,7 @@ const Ns = [
|
|
|
7350
7244
|
fontSize: "20px",
|
|
7351
7245
|
fontWeight: 600,
|
|
7352
7246
|
margin: "0 0 24px 0",
|
|
7353
|
-
color:
|
|
7247
|
+
color: z.textSecondary,
|
|
7354
7248
|
display: "flex",
|
|
7355
7249
|
alignItems: "center",
|
|
7356
7250
|
gap: "8px"
|
|
@@ -7368,7 +7262,7 @@ const Ns = [
|
|
|
7368
7262
|
display: "grid",
|
|
7369
7263
|
gap: "20px",
|
|
7370
7264
|
gridTemplateColumns: "1fr",
|
|
7371
|
-
...
|
|
7265
|
+
...a && window.innerWidth >= 600 && {
|
|
7372
7266
|
gridTemplateColumns: "1fr 1fr",
|
|
7373
7267
|
gap: "20px"
|
|
7374
7268
|
}
|
|
@@ -7388,7 +7282,7 @@ const Ns = [
|
|
|
7388
7282
|
"label",
|
|
7389
7283
|
{
|
|
7390
7284
|
style: {
|
|
7391
|
-
color:
|
|
7285
|
+
color: z.textTertiary,
|
|
7392
7286
|
fontSize: "12px",
|
|
7393
7287
|
fontWeight: 500,
|
|
7394
7288
|
display: "flex",
|
|
@@ -7407,7 +7301,7 @@ const Ns = [
|
|
|
7407
7301
|
type: v.type,
|
|
7408
7302
|
name: v.name,
|
|
7409
7303
|
value: d[v.name],
|
|
7410
|
-
onChange: (V) =>
|
|
7304
|
+
onChange: (V) => f(
|
|
7411
7305
|
(Z) => Z && { ...Z, [V.target.name]: V.target.value }
|
|
7412
7306
|
),
|
|
7413
7307
|
style: {
|
|
@@ -7415,7 +7309,7 @@ const Ns = [
|
|
|
7415
7309
|
borderRadius: "8px",
|
|
7416
7310
|
border: `1px solid ${i}`,
|
|
7417
7311
|
backgroundColor: "transparent",
|
|
7418
|
-
color:
|
|
7312
|
+
color: z.textPrimary,
|
|
7419
7313
|
fontSize: "12px",
|
|
7420
7314
|
outline: "none",
|
|
7421
7315
|
transition: "border-color 0.2s ease",
|
|
@@ -7439,7 +7333,7 @@ const Ns = [
|
|
|
7439
7333
|
display: "flex",
|
|
7440
7334
|
alignItems: "center",
|
|
7441
7335
|
boxSizing: "border-box",
|
|
7442
|
-
color:
|
|
7336
|
+
color: z.textPrimary,
|
|
7443
7337
|
backgroundColor: t ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
|
|
7444
7338
|
},
|
|
7445
7339
|
children: v.value
|
|
@@ -7459,7 +7353,7 @@ const Ns = [
|
|
|
7459
7353
|
"section",
|
|
7460
7354
|
{
|
|
7461
7355
|
style: {
|
|
7462
|
-
backgroundColor:
|
|
7356
|
+
backgroundColor: z.surface,
|
|
7463
7357
|
borderRadius: "16px",
|
|
7464
7358
|
padding: "30px 24px",
|
|
7465
7359
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
|
|
@@ -7472,7 +7366,7 @@ const Ns = [
|
|
|
7472
7366
|
fontSize: "20px",
|
|
7473
7367
|
fontWeight: 600,
|
|
7474
7368
|
margin: "0 0 24px 0",
|
|
7475
|
-
color:
|
|
7369
|
+
color: z.textSecondary,
|
|
7476
7370
|
display: "flex",
|
|
7477
7371
|
alignItems: "center",
|
|
7478
7372
|
gap: "8px"
|
|
@@ -7509,7 +7403,7 @@ const Ns = [
|
|
|
7509
7403
|
display: "flex",
|
|
7510
7404
|
alignItems: "center",
|
|
7511
7405
|
gap: "12px",
|
|
7512
|
-
color:
|
|
7406
|
+
color: z.textSecondary
|
|
7513
7407
|
},
|
|
7514
7408
|
children: [
|
|
7515
7409
|
/* @__PURE__ */ r.jsx(pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -7530,11 +7424,11 @@ const Ns = [
|
|
|
7530
7424
|
gap: "6px",
|
|
7531
7425
|
...d.isVerified ? {
|
|
7532
7426
|
backgroundColor: t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
7533
|
-
color:
|
|
7427
|
+
color: z.success,
|
|
7534
7428
|
border: `1px solid ${t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"}`
|
|
7535
7429
|
} : {
|
|
7536
7430
|
backgroundColor: t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
|
|
7537
|
-
color:
|
|
7431
|
+
color: z.warning,
|
|
7538
7432
|
border: `1px solid ${t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`
|
|
7539
7433
|
}
|
|
7540
7434
|
},
|
|
@@ -7562,7 +7456,7 @@ const Ns = [
|
|
|
7562
7456
|
"p",
|
|
7563
7457
|
{
|
|
7564
7458
|
style: {
|
|
7565
|
-
color:
|
|
7459
|
+
color: z.textTertiary,
|
|
7566
7460
|
fontSize: "12px",
|
|
7567
7461
|
margin: 0
|
|
7568
7462
|
},
|
|
@@ -7586,14 +7480,14 @@ const Ns = [
|
|
|
7586
7480
|
}
|
|
7587
7481
|
),
|
|
7588
7482
|
/* @__PURE__ */ r.jsx(
|
|
7589
|
-
|
|
7483
|
+
Ls,
|
|
7590
7484
|
{
|
|
7591
7485
|
isOpen: h,
|
|
7592
7486
|
onClose: () => {
|
|
7593
7487
|
I(!1);
|
|
7594
7488
|
},
|
|
7595
|
-
onUpdate:
|
|
7596
|
-
colors:
|
|
7489
|
+
onUpdate: ae,
|
|
7490
|
+
colors: z
|
|
7597
7491
|
}
|
|
7598
7492
|
),
|
|
7599
7493
|
/* @__PURE__ */ r.jsx(
|
|
@@ -7604,18 +7498,18 @@ const Ns = [
|
|
|
7604
7498
|
onClose: () => g(!1),
|
|
7605
7499
|
onSuccess: (v) => m("success", v),
|
|
7606
7500
|
onError: (v) => m("error", v),
|
|
7607
|
-
colors:
|
|
7501
|
+
colors: z
|
|
7608
7502
|
}
|
|
7609
7503
|
),
|
|
7610
7504
|
/* @__PURE__ */ r.jsx(
|
|
7611
|
-
|
|
7505
|
+
Fs,
|
|
7612
7506
|
{
|
|
7613
7507
|
userId: d.id,
|
|
7614
7508
|
isOpen: U,
|
|
7615
7509
|
onClose: () => N(!1),
|
|
7616
7510
|
onSuccess: (v) => m("success", v),
|
|
7617
7511
|
onError: (v) => m("error", v),
|
|
7618
|
-
colors:
|
|
7512
|
+
colors: z
|
|
7619
7513
|
}
|
|
7620
7514
|
),
|
|
7621
7515
|
/* @__PURE__ */ r.jsx(
|
|
@@ -7623,16 +7517,16 @@ const Ns = [
|
|
|
7623
7517
|
{
|
|
7624
7518
|
isOpen: b,
|
|
7625
7519
|
onClose: () => {
|
|
7626
|
-
j(!1),
|
|
7520
|
+
j(!1), F(!1), K({ email: d?.email || "", otp: "" });
|
|
7627
7521
|
},
|
|
7628
7522
|
onVerify: ne,
|
|
7629
7523
|
onSendOTP: D,
|
|
7630
7524
|
verifyFormData: M,
|
|
7631
|
-
setVerifyFormData:
|
|
7525
|
+
setVerifyFormData: K,
|
|
7632
7526
|
otpSent: H,
|
|
7633
7527
|
verifying: Y,
|
|
7634
7528
|
user: d,
|
|
7635
|
-
colors:
|
|
7529
|
+
colors: z,
|
|
7636
7530
|
darkMode: t
|
|
7637
7531
|
}
|
|
7638
7532
|
),
|
|
@@ -7734,14 +7628,14 @@ const Ns = [
|
|
|
7734
7628
|
onLogout: n,
|
|
7735
7629
|
varient: s = "classic",
|
|
7736
7630
|
propUser: i,
|
|
7737
|
-
className:
|
|
7631
|
+
className: o = "",
|
|
7738
7632
|
// New URL props with defaults
|
|
7739
|
-
profileUrl:
|
|
7633
|
+
profileUrl: a,
|
|
7740
7634
|
settingsUrl: c,
|
|
7741
7635
|
// Menu item visibility with defaults
|
|
7742
7636
|
showProfileMenuItem: d = !0,
|
|
7743
|
-
showSettingsMenuItem:
|
|
7744
|
-
showViewProfileMenuItem:
|
|
7637
|
+
showSettingsMenuItem: f = !0,
|
|
7638
|
+
showViewProfileMenuItem: x = !0,
|
|
7745
7639
|
// Custom labels with defaults
|
|
7746
7640
|
profileLabel: y = "My Profile",
|
|
7747
7641
|
settingsLabel: k = "Settings",
|
|
@@ -7790,9 +7684,9 @@ const Ns = [
|
|
|
7790
7684
|
if (typeof window > "u") return;
|
|
7791
7685
|
const l = () => {
|
|
7792
7686
|
if (!h || !O.current) return;
|
|
7793
|
-
const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280,
|
|
7687
|
+
const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280, ae = S - m.right, B = m.left;
|
|
7794
7688
|
D - m.bottom;
|
|
7795
|
-
const le =
|
|
7689
|
+
const le = ae >= ne || ae > B;
|
|
7796
7690
|
W(le);
|
|
7797
7691
|
};
|
|
7798
7692
|
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
@@ -7834,7 +7728,7 @@ const Ns = [
|
|
|
7834
7728
|
accent: e,
|
|
7835
7729
|
accentHover: `${e}e6`,
|
|
7836
7730
|
error: "#ef4444"
|
|
7837
|
-
},
|
|
7731
|
+
}, A = {
|
|
7838
7732
|
wrapper: {
|
|
7839
7733
|
position: "relative",
|
|
7840
7734
|
display: "inline-block"
|
|
@@ -8087,9 +7981,9 @@ const Ns = [
|
|
|
8087
7981
|
} finally {
|
|
8088
7982
|
N(!1);
|
|
8089
7983
|
}
|
|
8090
|
-
},
|
|
7984
|
+
}, K = (l, m) => {
|
|
8091
7985
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), m());
|
|
8092
|
-
}, H = () =>
|
|
7986
|
+
}, H = () => a || C?.profileUrl, F = () => {
|
|
8093
7987
|
const l = H();
|
|
8094
7988
|
l && window.open(l, "_self", "noopener,noreferrer");
|
|
8095
7989
|
}, Y = () => {
|
|
@@ -8098,9 +7992,9 @@ const Ns = [
|
|
|
8098
7992
|
return /* @__PURE__ */ r.jsxs(
|
|
8099
7993
|
"div",
|
|
8100
7994
|
{
|
|
8101
|
-
style:
|
|
7995
|
+
style: A.wrapper,
|
|
8102
7996
|
ref: q,
|
|
8103
|
-
className:
|
|
7997
|
+
className: o,
|
|
8104
7998
|
role: "menu",
|
|
8105
7999
|
"aria-label": "User menu",
|
|
8106
8000
|
children: [
|
|
@@ -8109,7 +8003,7 @@ const Ns = [
|
|
|
8109
8003
|
{
|
|
8110
8004
|
ref: O,
|
|
8111
8005
|
onClick: () => I((l) => !l),
|
|
8112
|
-
onKeyDown: (l) =>
|
|
8006
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
8113
8007
|
tabIndex: 0,
|
|
8114
8008
|
role: "button",
|
|
8115
8009
|
"aria-haspopup": "true",
|
|
@@ -8159,9 +8053,9 @@ const Ns = [
|
|
|
8159
8053
|
"div",
|
|
8160
8054
|
{
|
|
8161
8055
|
ref: O,
|
|
8162
|
-
style:
|
|
8056
|
+
style: A.avatarButton,
|
|
8163
8057
|
onClick: () => I((l) => !l),
|
|
8164
|
-
onKeyDown: (l) =>
|
|
8058
|
+
onKeyDown: (l) => K(l, () => I((m) => !m)),
|
|
8165
8059
|
tabIndex: 0,
|
|
8166
8060
|
role: "button",
|
|
8167
8061
|
"aria-haspopup": "true",
|
|
@@ -8182,7 +8076,7 @@ const Ns = [
|
|
|
8182
8076
|
{
|
|
8183
8077
|
src: C.avatarUrl,
|
|
8184
8078
|
alt: `${C.name}'s avatar`,
|
|
8185
|
-
style:
|
|
8079
|
+
style: A.avatarImage,
|
|
8186
8080
|
loading: "lazy",
|
|
8187
8081
|
onError: (l) => {
|
|
8188
8082
|
const m = l.target;
|
|
@@ -8194,29 +8088,29 @@ const Ns = [
|
|
|
8194
8088
|
{
|
|
8195
8089
|
src: "https://api.dicebear.com/9.x/glass/svg?seed=Kingston",
|
|
8196
8090
|
alt: "Default user avatar",
|
|
8197
|
-
style:
|
|
8091
|
+
style: A.avatarImage,
|
|
8198
8092
|
loading: "lazy"
|
|
8199
8093
|
}
|
|
8200
8094
|
),
|
|
8201
|
-
!R && /* @__PURE__ */ r.jsxs("div", { style:
|
|
8202
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8203
|
-
C?.email && /* @__PURE__ */ r.jsx("div", { style:
|
|
8095
|
+
!R && /* @__PURE__ */ r.jsxs("div", { style: A.userInfo, children: [
|
|
8096
|
+
/* @__PURE__ */ r.jsx("div", { style: A.userName, title: C?.name, children: C?.name || "Guest" }),
|
|
8097
|
+
C?.email && /* @__PURE__ */ r.jsx("div", { style: A.userEmail, title: C.email, children: C.email })
|
|
8204
8098
|
] }),
|
|
8205
8099
|
/* @__PURE__ */ r.jsx(
|
|
8206
8100
|
Zn,
|
|
8207
8101
|
{
|
|
8208
8102
|
size: R ? 14 : 16,
|
|
8209
|
-
style:
|
|
8103
|
+
style: A.chevron,
|
|
8210
8104
|
"aria-hidden": "true"
|
|
8211
8105
|
}
|
|
8212
8106
|
)
|
|
8213
8107
|
]
|
|
8214
8108
|
}
|
|
8215
8109
|
),
|
|
8216
|
-
h && /* @__PURE__ */ r.jsx("div", { style:
|
|
8110
|
+
h && /* @__PURE__ */ r.jsx("div", { style: A.dropdown, role: "menu", "aria-label": "User options", children: U ? /* @__PURE__ */ r.jsxs(
|
|
8217
8111
|
"div",
|
|
8218
8112
|
{
|
|
8219
|
-
style:
|
|
8113
|
+
style: A.loadingContainer,
|
|
8220
8114
|
role: "status",
|
|
8221
8115
|
"aria-live": "polite",
|
|
8222
8116
|
children: [
|
|
@@ -8229,23 +8123,23 @@ const Ns = [
|
|
|
8229
8123
|
"aria-hidden": "true"
|
|
8230
8124
|
}
|
|
8231
8125
|
),
|
|
8232
|
-
/* @__PURE__ */ r.jsxs("div", { style:
|
|
8233
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8234
|
-
/* @__PURE__ */ r.jsxs("div", { style:
|
|
8235
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8236
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8126
|
+
/* @__PURE__ */ r.jsxs("div", { style: A.loadingSkeleton, children: [
|
|
8127
|
+
/* @__PURE__ */ r.jsx("div", { style: A.skeletonAvatar }),
|
|
8128
|
+
/* @__PURE__ */ r.jsxs("div", { style: A.skeletonTextBlock, children: [
|
|
8129
|
+
/* @__PURE__ */ r.jsx("div", { style: A.skeletonLineShort }),
|
|
8130
|
+
/* @__PURE__ */ r.jsx("div", { style: A.skeletonLineLong })
|
|
8237
8131
|
] })
|
|
8238
8132
|
] })
|
|
8239
8133
|
]
|
|
8240
8134
|
}
|
|
8241
8135
|
) : C ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
8242
|
-
/* @__PURE__ */ r.jsxs("div", { style:
|
|
8136
|
+
/* @__PURE__ */ r.jsxs("div", { style: A.userSection, children: [
|
|
8243
8137
|
C?.avatarUrl ? /* @__PURE__ */ r.jsx(
|
|
8244
8138
|
"img",
|
|
8245
8139
|
{
|
|
8246
8140
|
src: C.avatarUrl,
|
|
8247
8141
|
alt: `${C.name}'s profile picture`,
|
|
8248
|
-
style:
|
|
8142
|
+
style: A.dropdownAvatar,
|
|
8249
8143
|
loading: "lazy",
|
|
8250
8144
|
onError: (l) => {
|
|
8251
8145
|
const m = l.target;
|
|
@@ -8257,40 +8151,40 @@ const Ns = [
|
|
|
8257
8151
|
{
|
|
8258
8152
|
src: `https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`,
|
|
8259
8153
|
alt: `${C.name}'s default avatar`,
|
|
8260
|
-
style:
|
|
8154
|
+
style: A.dropdownAvatar,
|
|
8261
8155
|
loading: "lazy"
|
|
8262
8156
|
}
|
|
8263
8157
|
),
|
|
8264
|
-
/* @__PURE__ */ r.jsxs("div", { style:
|
|
8265
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8266
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8158
|
+
/* @__PURE__ */ r.jsxs("div", { style: A.dropdownUserInfo, children: [
|
|
8159
|
+
/* @__PURE__ */ r.jsx("div", { style: A.dropdownUserName, title: C.name, children: C.name }),
|
|
8160
|
+
/* @__PURE__ */ r.jsx("div", { style: A.dropdownUserEmail, title: C.email, children: C.email })
|
|
8267
8161
|
] })
|
|
8268
8162
|
] }),
|
|
8269
|
-
/* @__PURE__ */ r.jsxs("div", { style:
|
|
8163
|
+
/* @__PURE__ */ r.jsxs("div", { style: A.dropdownSection, children: [
|
|
8270
8164
|
d && H() && /* @__PURE__ */ r.jsxs(
|
|
8271
8165
|
"button",
|
|
8272
8166
|
{
|
|
8273
|
-
style:
|
|
8274
|
-
onClick:
|
|
8167
|
+
style: A.menuItem,
|
|
8168
|
+
onClick: F,
|
|
8275
8169
|
onMouseOver: (l) => {
|
|
8276
8170
|
l.currentTarget.style.backgroundColor = T.surfaceHover;
|
|
8277
8171
|
},
|
|
8278
8172
|
onMouseOut: (l) => {
|
|
8279
8173
|
l.currentTarget.style.backgroundColor = "transparent";
|
|
8280
8174
|
},
|
|
8281
|
-
onKeyDown: (l) =>
|
|
8175
|
+
onKeyDown: (l) => K(l, F),
|
|
8282
8176
|
role: "menuitem",
|
|
8283
8177
|
tabIndex: 0,
|
|
8284
8178
|
children: [
|
|
8285
|
-
/* @__PURE__ */ r.jsx(he, { style:
|
|
8286
|
-
/* @__PURE__ */ r.jsx("span", { style:
|
|
8179
|
+
/* @__PURE__ */ r.jsx(he, { style: A.icon, "aria-hidden": "true" }),
|
|
8180
|
+
/* @__PURE__ */ r.jsx("span", { style: A.menuItemText, children: y })
|
|
8287
8181
|
]
|
|
8288
8182
|
}
|
|
8289
8183
|
),
|
|
8290
|
-
|
|
8184
|
+
f && c && /* @__PURE__ */ r.jsxs(
|
|
8291
8185
|
"button",
|
|
8292
8186
|
{
|
|
8293
|
-
style:
|
|
8187
|
+
style: A.menuItem,
|
|
8294
8188
|
onClick: Y,
|
|
8295
8189
|
onMouseOver: (l) => {
|
|
8296
8190
|
l.currentTarget.style.backgroundColor = T.surfaceHover;
|
|
@@ -8298,22 +8192,22 @@ const Ns = [
|
|
|
8298
8192
|
onMouseOut: (l) => {
|
|
8299
8193
|
l.currentTarget.style.backgroundColor = "transparent";
|
|
8300
8194
|
},
|
|
8301
|
-
onKeyDown: (l) =>
|
|
8195
|
+
onKeyDown: (l) => K(l, Y),
|
|
8302
8196
|
role: "menuitem",
|
|
8303
8197
|
tabIndex: 0,
|
|
8304
8198
|
children: [
|
|
8305
|
-
/* @__PURE__ */ r.jsx(Os, { style:
|
|
8306
|
-
/* @__PURE__ */ r.jsx("span", { style:
|
|
8199
|
+
/* @__PURE__ */ r.jsx(Os, { style: A.icon, "aria-hidden": "true" }),
|
|
8200
|
+
/* @__PURE__ */ r.jsx("span", { style: A.menuItemText, children: k })
|
|
8307
8201
|
]
|
|
8308
8202
|
}
|
|
8309
8203
|
),
|
|
8310
|
-
|
|
8204
|
+
x && C.profileUrl && /* @__PURE__ */ r.jsxs(
|
|
8311
8205
|
"a",
|
|
8312
8206
|
{
|
|
8313
8207
|
href: C.profileUrl,
|
|
8314
8208
|
target: "_self",
|
|
8315
8209
|
rel: "noopener noreferrer",
|
|
8316
|
-
style:
|
|
8210
|
+
style: A.menuItem,
|
|
8317
8211
|
onMouseOver: (l) => {
|
|
8318
8212
|
l.currentTarget.style.backgroundColor = T.surfaceHover;
|
|
8319
8213
|
},
|
|
@@ -8323,16 +8217,16 @@ const Ns = [
|
|
|
8323
8217
|
role: "menuitem",
|
|
8324
8218
|
tabIndex: 0,
|
|
8325
8219
|
children: [
|
|
8326
|
-
/* @__PURE__ */ r.jsx(pe, { style:
|
|
8327
|
-
/* @__PURE__ */ r.jsx("span", { style:
|
|
8220
|
+
/* @__PURE__ */ r.jsx(pe, { style: A.icon, "aria-hidden": "true" }),
|
|
8221
|
+
/* @__PURE__ */ r.jsx("span", { style: A.menuItemText, children: E })
|
|
8328
8222
|
]
|
|
8329
8223
|
}
|
|
8330
8224
|
)
|
|
8331
8225
|
] }),
|
|
8332
|
-
/* @__PURE__ */ r.jsx("div", { style:
|
|
8226
|
+
/* @__PURE__ */ r.jsx("div", { style: A.dropdownSection, children: /* @__PURE__ */ r.jsxs(
|
|
8333
8227
|
"button",
|
|
8334
8228
|
{
|
|
8335
|
-
style:
|
|
8229
|
+
style: A.logoutButton,
|
|
8336
8230
|
onClick: n,
|
|
8337
8231
|
onMouseOver: (l) => {
|
|
8338
8232
|
l.currentTarget.style.backgroundColor = T.surfaceHover;
|
|
@@ -8340,22 +8234,22 @@ const Ns = [
|
|
|
8340
8234
|
onMouseOut: (l) => {
|
|
8341
8235
|
l.currentTarget.style.backgroundColor = "transparent";
|
|
8342
8236
|
},
|
|
8343
|
-
onKeyDown: (l) =>
|
|
8237
|
+
onKeyDown: (l) => K(l, n),
|
|
8344
8238
|
role: "menuitem",
|
|
8345
8239
|
tabIndex: 0,
|
|
8346
8240
|
children: [
|
|
8347
8241
|
/* @__PURE__ */ r.jsx(
|
|
8348
8242
|
ct,
|
|
8349
8243
|
{
|
|
8350
|
-
style: { ...
|
|
8244
|
+
style: { ...A.icon, color: T.error },
|
|
8351
8245
|
"aria-hidden": "true"
|
|
8352
8246
|
}
|
|
8353
8247
|
),
|
|
8354
|
-
/* @__PURE__ */ r.jsx("span", { style:
|
|
8248
|
+
/* @__PURE__ */ r.jsx("span", { style: A.menuItemText, children: u })
|
|
8355
8249
|
]
|
|
8356
8250
|
}
|
|
8357
8251
|
) })
|
|
8358
|
-
] }) : /* @__PURE__ */ r.jsxs("div", { style:
|
|
8252
|
+
] }) : /* @__PURE__ */ r.jsxs("div", { style: A.errorState, role: "alert", children: [
|
|
8359
8253
|
/* @__PURE__ */ r.jsxs(
|
|
8360
8254
|
"div",
|
|
8361
8255
|
{
|
|
@@ -8369,7 +8263,7 @@ const Ns = [
|
|
|
8369
8263
|
b && b !== "Not signed in" && /* @__PURE__ */ r.jsx(
|
|
8370
8264
|
"button",
|
|
8371
8265
|
{
|
|
8372
|
-
style:
|
|
8266
|
+
style: A.retryButton,
|
|
8373
8267
|
onClick: M,
|
|
8374
8268
|
onMouseOver: (l) => {
|
|
8375
8269
|
l.currentTarget.style.backgroundColor = T.accentHover;
|
|
@@ -8419,13 +8313,13 @@ const Ns = [
|
|
|
8419
8313
|
]
|
|
8420
8314
|
}
|
|
8421
8315
|
);
|
|
8422
|
-
const [
|
|
8316
|
+
const [o, a] = P(!1), [c, d] = P({
|
|
8423
8317
|
email: t?.email || "",
|
|
8424
8318
|
otp: ""
|
|
8425
|
-
}), [
|
|
8319
|
+
}), [f, x] = P(!1), [y, k] = P(!1), [E, u] = P(null);
|
|
8426
8320
|
Ce.useEffect(() => {
|
|
8427
8321
|
if (typeof window < "u") {
|
|
8428
|
-
const b = () =>
|
|
8322
|
+
const b = () => a(window.innerWidth < 768);
|
|
8429
8323
|
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
8430
8324
|
}
|
|
8431
8325
|
}, []);
|
|
@@ -8475,7 +8369,7 @@ const Ns = [
|
|
|
8475
8369
|
});
|
|
8476
8370
|
if (console.log("Send OTP response:", b), b.success || b.data?.success) {
|
|
8477
8371
|
const j = b.message || b.data?.message || "OTP sent!";
|
|
8478
|
-
I("success", j),
|
|
8372
|
+
I("success", j), x(!0);
|
|
8479
8373
|
} else {
|
|
8480
8374
|
const j = b.message || b.data?.message || "Failed to send OTP";
|
|
8481
8375
|
I("error", j);
|
|
@@ -8498,7 +8392,7 @@ const Ns = [
|
|
|
8498
8392
|
});
|
|
8499
8393
|
if (j.success) {
|
|
8500
8394
|
const q = { ...t, isVerified: !0 };
|
|
8501
|
-
s?.(q), I("success", j.message || "Email verified!"),
|
|
8395
|
+
s?.(q), I("success", j.message || "Email verified!"), x(!1), d({ email: t.email, otp: "" });
|
|
8502
8396
|
} else
|
|
8503
8397
|
I("error", j.message || "Verification failed");
|
|
8504
8398
|
} catch (j) {
|
|
@@ -8537,7 +8431,7 @@ const Ns = [
|
|
|
8537
8431
|
onSubmit: g,
|
|
8538
8432
|
style: {
|
|
8539
8433
|
width: "100%",
|
|
8540
|
-
maxWidth:
|
|
8434
|
+
maxWidth: o ? "340px" : "400px",
|
|
8541
8435
|
display: "flex",
|
|
8542
8436
|
flexDirection: "column",
|
|
8543
8437
|
gap: 20,
|
|
@@ -8558,7 +8452,7 @@ const Ns = [
|
|
|
8558
8452
|
gap: 8
|
|
8559
8453
|
},
|
|
8560
8454
|
children: [
|
|
8561
|
-
/* @__PURE__ */ r.jsx(
|
|
8455
|
+
/* @__PURE__ */ r.jsx(Kn, { size: 32, color: h.accent }),
|
|
8562
8456
|
/* @__PURE__ */ r.jsx(
|
|
8563
8457
|
"h2",
|
|
8564
8458
|
{
|
|
@@ -8658,7 +8552,7 @@ const Ns = [
|
|
|
8658
8552
|
}
|
|
8659
8553
|
)
|
|
8660
8554
|
] }),
|
|
8661
|
-
|
|
8555
|
+
f && /* @__PURE__ */ r.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
8662
8556
|
/* @__PURE__ */ r.jsxs(
|
|
8663
8557
|
"div",
|
|
8664
8558
|
{
|
|
@@ -8708,7 +8602,7 @@ const Ns = [
|
|
|
8708
8602
|
}
|
|
8709
8603
|
)
|
|
8710
8604
|
] }),
|
|
8711
|
-
/* @__PURE__ */ r.jsx("div", { style: { display: "flex", gap: 12 }, children:
|
|
8605
|
+
/* @__PURE__ */ r.jsx("div", { style: { display: "flex", gap: 12 }, children: f ? /* @__PURE__ */ r.jsxs(
|
|
8712
8606
|
"button",
|
|
8713
8607
|
{
|
|
8714
8608
|
type: "submit",
|