@neuctra/authix 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/neuctra-authix.es.js +500 -529
- package/dist/neuctra-authix.umd.js +54 -54
- package/dist/sdk/index.d.ts +3 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/interfaces.d.ts +2 -23
- package/dist/sdk/interfaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,23 +4,23 @@ function Ar(t, e) {
|
|
|
4
4
|
return t.apply(e, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: Es } = Object.prototype, { getPrototypeOf: Bt } = Object, { iterator: jt, toStringTag:
|
|
7
|
+
const { toString: Es } = Object.prototype, { getPrototypeOf: Bt } = Object, { iterator: jt, toStringTag: Or } = Symbol, vt = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const r = Es.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
10
|
})(/* @__PURE__ */ Object.create(null)), je = (t) => (t = t.toLowerCase(), (e) => vt(e) === t), Nt = (t) => (e) => typeof e === t, { isArray: Je } = Array, We = Nt("undefined");
|
|
11
11
|
function et(t) {
|
|
12
12
|
return t !== null && !We(t) && t.constructor !== null && !We(t.constructor) && he(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const _r = je("ArrayBuffer");
|
|
15
15
|
function $s(t) {
|
|
16
16
|
let e;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && _r(t.buffer), e;
|
|
18
18
|
}
|
|
19
19
|
const ks = Nt("string"), he = Nt("function"), Ur = Nt("number"), tt = (t) => t !== null && typeof t == "object", Ss = (t) => t === !0 || t === !1, xt = (t) => {
|
|
20
20
|
if (vt(t) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const e = Bt(t);
|
|
23
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
23
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Or in t) && !(jt in t);
|
|
24
24
|
}, Ps = (t) => {
|
|
25
25
|
if (!tt(t) || et(t))
|
|
26
26
|
return !1;
|
|
@@ -29,7 +29,7 @@ const ks = Nt("string"), he = Nt("function"), Ur = Nt("number"), tt = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, Cs = je("Date"), Ts = je("File"), Rs = je("Blob"), As = je("FileList"),
|
|
32
|
+
}, Cs = je("Date"), Ts = je("File"), Rs = je("Blob"), As = je("FileList"), Os = (t) => tt(t) && he(t.pipe), _s = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || he(t.append) && ((e = vt(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && he(t.toString) && t.toString() === "[object FormData]"));
|
|
@@ -100,14 +100,14 @@ const Ds = (t, e, r, { allOwnKeys: s } = {}) => (rt(e, (a, o) => {
|
|
|
100
100
|
for (; e-- > 0; )
|
|
101
101
|
r[e] = t[e];
|
|
102
102
|
return r;
|
|
103
|
-
}, Js = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Bt(Uint8Array)),
|
|
103
|
+
}, Js = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Bt(Uint8Array)), Ys = (t, e) => {
|
|
104
104
|
const s = (t && t[jt]).call(t);
|
|
105
105
|
let a;
|
|
106
106
|
for (; (a = s.next()) && !a.done; ) {
|
|
107
107
|
const o = a.value;
|
|
108
108
|
e.call(t, o[0], o[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, Ks = (t, e) => {
|
|
111
111
|
let r;
|
|
112
112
|
const s = [];
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
@@ -149,7 +149,7 @@ const Ds = (t, e, r, { allOwnKeys: s } = {}) => (rt(e, (a, o) => {
|
|
|
149
149
|
}, tn = () => {
|
|
150
150
|
}, rn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
151
151
|
function sn(t) {
|
|
152
|
-
return !!(t && he(t.append) && t[
|
|
152
|
+
return !!(t && he(t.append) && t[Or] === "FormData" && t[jt]);
|
|
153
153
|
}
|
|
154
154
|
const nn = (t) => {
|
|
155
155
|
const e = new Array(10), r = (s, a) => {
|
|
@@ -179,9 +179,9 @@ const nn = (t) => {
|
|
|
179
179
|
he(Le.postMessage)
|
|
180
180
|
), ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(Le) : typeof process < "u" && process.nextTick || qr, cn = (t) => t != null && he(t[jt]), c = {
|
|
181
181
|
isArray: Je,
|
|
182
|
-
isArrayBuffer:
|
|
182
|
+
isArrayBuffer: _r,
|
|
183
183
|
isBuffer: et,
|
|
184
|
-
isFormData:
|
|
184
|
+
isFormData: _s,
|
|
185
185
|
isArrayBufferView: $s,
|
|
186
186
|
isString: ks,
|
|
187
187
|
isNumber: Ur,
|
|
@@ -199,7 +199,7 @@ const nn = (t) => {
|
|
|
199
199
|
isBlob: Rs,
|
|
200
200
|
isRegExp: Zs,
|
|
201
201
|
isFunction: he,
|
|
202
|
-
isStream:
|
|
202
|
+
isStream: Os,
|
|
203
203
|
isURLSearchParams: Us,
|
|
204
204
|
isTypedArray: Js,
|
|
205
205
|
isFileList: As,
|
|
@@ -214,8 +214,8 @@ const nn = (t) => {
|
|
|
214
214
|
kindOfTest: je,
|
|
215
215
|
endsWith: Hs,
|
|
216
216
|
toArray: Ws,
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
217
|
+
forEachEntry: Ys,
|
|
218
|
+
matchAll: Ks,
|
|
219
219
|
isHTMLForm: Xs,
|
|
220
220
|
hasOwnProperty: dr,
|
|
221
221
|
hasOwnProp: dr,
|
|
@@ -346,16 +346,16 @@ function Et(t, e, r) {
|
|
|
346
346
|
}
|
|
347
347
|
return Lt(m) ? !0 : (e.append(ur(y, x, o), u(m)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const g = [], w = Object.assign(fn, {
|
|
350
350
|
defaultVisitor: p,
|
|
351
351
|
convertValue: u,
|
|
352
352
|
isVisitable: Lt
|
|
353
353
|
});
|
|
354
354
|
function P(m, x) {
|
|
355
355
|
if (!c.isUndefined(m)) {
|
|
356
|
-
if (
|
|
356
|
+
if (g.indexOf(m) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + x.join("."));
|
|
358
|
-
|
|
358
|
+
g.push(m), c.forEach(m, function(C, M) {
|
|
359
359
|
(!(c.isUndefined(C) || C === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
C,
|
|
@@ -363,7 +363,7 @@ function Et(t, e, r) {
|
|
|
363
363
|
x,
|
|
364
364
|
w
|
|
365
365
|
)) === !0 && P(C, x ? x.concat(M) : [M]);
|
|
366
|
-
}),
|
|
366
|
+
}), g.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!c.isObject(t))
|
|
@@ -483,12 +483,12 @@ const Hr = {
|
|
|
483
483
|
Blob: xn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Wt = typeof window < "u" && typeof document < "u", qt = typeof navigator == "object" && navigator || void 0,
|
|
486
|
+
}, Wt = typeof window < "u" && typeof document < "u", qt = typeof navigator == "object" && navigator || void 0, gn = Wt && (!qt || ["ReactNative", "NativeScript", "NS"].indexOf(qt.product) < 0), bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
487
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", wn = Wt && window.location.href || "http://localhost", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: Wt,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
490
|
+
hasStandardBrowserEnv: gn,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: bn,
|
|
492
492
|
navigator: qt,
|
|
493
493
|
origin: wn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), fe = {
|
|
@@ -683,8 +683,8 @@ let xe = class {
|
|
|
683
683
|
const p = Xe(f);
|
|
684
684
|
if (!p)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const g = c.findKey(a, p);
|
|
687
|
+
(!g || a[g] === void 0 || u === !0 || u === void 0 && a[g] !== !1) && (a[g || f] = yt(l));
|
|
688
688
|
}
|
|
689
689
|
const i = (l, f) => c.forEach(l, (u, p) => o(u, p, f));
|
|
690
690
|
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
@@ -810,7 +810,7 @@ c.reduceDescriptors(xe.prototype, ({ value: t }, e) => {
|
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
c.freezeMethods(xe);
|
|
813
|
-
function
|
|
813
|
+
function Ot(t, e) {
|
|
814
814
|
const r = this || st, s = e || r, a = xe.from(s.headers);
|
|
815
815
|
let o = s.data;
|
|
816
816
|
return c.forEach(t, function(l) {
|
|
@@ -820,13 +820,13 @@ function _t(t, e) {
|
|
|
820
820
|
function Jr(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Ye(t, e, r) {
|
|
824
824
|
L.call(this, t ?? "canceled", L.ERR_CANCELED, e, r), this.name = "CanceledError";
|
|
825
825
|
}
|
|
826
|
-
c.inherits(
|
|
826
|
+
c.inherits(Ye, L, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function Yr(t, e, r) {
|
|
830
830
|
const s = r.config.validateStatus;
|
|
831
831
|
!r.status || !s || s(r.status) ? t(r) : e(new L(
|
|
832
832
|
"Request failed with status code " + r.status,
|
|
@@ -840,41 +840,41 @@ function An(t) {
|
|
|
840
840
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
841
841
|
return e && e[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function On(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
846
|
let a = 0, o = 0, i;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
848
848
|
const u = Date.now(), p = s[o];
|
|
849
849
|
i || (i = u), r[a] = f, s[a] = u;
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
w += r[
|
|
850
|
+
let g = o, w = 0;
|
|
851
|
+
for (; g !== a; )
|
|
852
|
+
w += r[g++], g = g % t;
|
|
853
853
|
if (a = (a + 1) % t, a === o && (o = (o + 1) % t), u - i < e)
|
|
854
854
|
return;
|
|
855
855
|
const P = p && u - p;
|
|
856
856
|
return P ? Math.round(w * 1e3 / P) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function _n(t, e) {
|
|
860
860
|
let r = 0, s = 1e3 / e, a, o;
|
|
861
861
|
const i = (u, p = Date.now()) => {
|
|
862
862
|
r = p, a = null, o && (clearTimeout(o), o = null), t(...u);
|
|
863
863
|
};
|
|
864
864
|
return [(...u) => {
|
|
865
|
-
const p = Date.now(),
|
|
866
|
-
|
|
865
|
+
const p = Date.now(), g = p - r;
|
|
866
|
+
g >= s ? i(u, p) : (a = u, o || (o = setTimeout(() => {
|
|
867
867
|
o = null, i(a);
|
|
868
|
-
}, s -
|
|
868
|
+
}, s - g)));
|
|
869
869
|
}, () => a && i(a)];
|
|
870
870
|
}
|
|
871
871
|
const wt = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const a =
|
|
874
|
-
return
|
|
873
|
+
const a = On(50, 250);
|
|
874
|
+
return _n((o) => {
|
|
875
875
|
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = i - s, u = a(f), p = i <= l;
|
|
876
876
|
s = i;
|
|
877
|
-
const
|
|
877
|
+
const g = {
|
|
878
878
|
loaded: i,
|
|
879
879
|
total: l,
|
|
880
880
|
progress: l ? i / l : void 0,
|
|
@@ -885,7 +885,7 @@ const wt = (t, e, r = 3) => {
|
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
t(
|
|
888
|
+
t(g);
|
|
889
889
|
}, r);
|
|
890
890
|
}, hr = (t, e) => {
|
|
891
891
|
const r = t != null;
|
|
@@ -930,7 +930,7 @@ function In(t) {
|
|
|
930
930
|
function Ln(t, e) {
|
|
931
931
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function Kr(t, e, r) {
|
|
934
934
|
let s = !In(e);
|
|
935
935
|
return t && (s || r == !1) ? Ln(t, e) : e;
|
|
936
936
|
}
|
|
@@ -938,14 +938,14 @@ const yr = (t) => t instanceof xe ? { ...t } : t;
|
|
|
938
938
|
function Fe(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(u, p,
|
|
941
|
+
function s(u, p, g, w) {
|
|
942
942
|
return c.isPlainObject(u) && c.isPlainObject(p) ? c.merge.call({ caseless: w }, u, p) : c.isPlainObject(p) ? c.merge({}, p) : c.isArray(p) ? p.slice() : p;
|
|
943
943
|
}
|
|
944
|
-
function a(u, p,
|
|
944
|
+
function a(u, p, g, w) {
|
|
945
945
|
if (c.isUndefined(p)) {
|
|
946
946
|
if (!c.isUndefined(u))
|
|
947
|
-
return s(void 0, u,
|
|
948
|
-
} else return s(u, p,
|
|
947
|
+
return s(void 0, u, g, w);
|
|
948
|
+
} else return s(u, p, g, w);
|
|
949
949
|
}
|
|
950
950
|
function o(u, p) {
|
|
951
951
|
if (!c.isUndefined(p))
|
|
@@ -957,10 +957,10 @@ function Fe(t, e) {
|
|
|
957
957
|
return s(void 0, u);
|
|
958
958
|
} else return s(void 0, p);
|
|
959
959
|
}
|
|
960
|
-
function l(u, p,
|
|
961
|
-
if (
|
|
960
|
+
function l(u, p, g) {
|
|
961
|
+
if (g in e)
|
|
962
962
|
return s(u, p);
|
|
963
|
-
if (
|
|
963
|
+
if (g in t)
|
|
964
964
|
return s(void 0, u);
|
|
965
965
|
}
|
|
966
966
|
const f = {
|
|
@@ -992,17 +992,17 @@ function Fe(t, e) {
|
|
|
992
992
|
socketPath: i,
|
|
993
993
|
responseEncoding: i,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (u, p,
|
|
995
|
+
headers: (u, p, g) => a(yr(u), yr(p), g, !0)
|
|
996
996
|
};
|
|
997
997
|
return c.forEach(Object.keys({ ...t, ...e }), function(p) {
|
|
998
|
-
const
|
|
999
|
-
c.isUndefined(w) &&
|
|
998
|
+
const g = f[p] || a, w = g(t[p], e[p], p);
|
|
999
|
+
c.isUndefined(w) && g !== l || (r[p] = w);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const Xr = (t) => {
|
|
1003
1003
|
const e = Fe({}, t);
|
|
1004
1004
|
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: o, headers: i, auth: l } = e;
|
|
1005
|
-
if (e.headers = i = xe.from(i), e.url = Br(
|
|
1005
|
+
if (e.headers = i = xe.from(i), e.url = Br(Kr(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && i.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), c.isFormData(r)) {
|
|
@@ -1010,8 +1010,8 @@ const Xr = (t) => {
|
|
|
1010
1010
|
i.setContentType(void 0);
|
|
1011
1011
|
else if (c.isFunction(r.getHeaders)) {
|
|
1012
1012
|
const f = r.getHeaders(), u = ["content-type", "content-length"];
|
|
1013
|
-
Object.entries(f).forEach(([p,
|
|
1014
|
-
u.includes(p.toLowerCase()) && i.set(p,
|
|
1013
|
+
Object.entries(f).forEach(([p, g]) => {
|
|
1014
|
+
u.includes(p.toLowerCase()) && i.set(p, g);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1025,7 +1025,7 @@ const Xr = (t) => {
|
|
|
1025
1025
|
const a = Xr(t);
|
|
1026
1026
|
let o = a.data;
|
|
1027
1027
|
const i = xe.from(a.headers).normalize();
|
|
1028
|
-
let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = a, p,
|
|
1028
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = a, p, g, w, P, m;
|
|
1029
1029
|
function x() {
|
|
1030
1030
|
P && P(), m && m(), a.cancelToken && a.cancelToken.unsubscribe(p), a.signal && a.signal.removeEventListener("abort", p);
|
|
1031
1031
|
}
|
|
@@ -1044,7 +1044,7 @@ const Xr = (t) => {
|
|
|
1044
1044
|
config: t,
|
|
1045
1045
|
request: y
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1047
|
+
Yr(function(U) {
|
|
1048
1048
|
r(U), x();
|
|
1049
1049
|
}, function(U) {
|
|
1050
1050
|
s(U), x();
|
|
@@ -1055,8 +1055,8 @@ const Xr = (t) => {
|
|
|
1055
1055
|
}, y.onabort = function() {
|
|
1056
1056
|
y && (s(new L("Request aborted", L.ECONNABORTED, t, y)), y = null);
|
|
1057
1057
|
}, y.onerror = function(F) {
|
|
1058
|
-
const q = F && F.message ? F.message : "Network Error",
|
|
1059
|
-
|
|
1058
|
+
const q = F && F.message ? F.message : "Network Error", K = new L(q, L.ERR_NETWORK, t, y);
|
|
1059
|
+
K.event = F || null, s(K), y = null;
|
|
1060
1060
|
}, y.ontimeout = function() {
|
|
1061
1061
|
let F = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
1062
|
const q = a.transitional || Hr;
|
|
@@ -1068,8 +1068,8 @@ const Xr = (t) => {
|
|
|
1068
1068
|
)), y = null;
|
|
1069
1069
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in y && c.forEach(i.toJSON(), function(F, q) {
|
|
1070
1070
|
y.setRequestHeader(q, F);
|
|
1071
|
-
}), c.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), l && l !== "json" && (y.responseType = a.responseType), u && ([w, m] = wt(u, !0), y.addEventListener("progress", w)), f && y.upload && ([
|
|
1072
|
-
y && (s(!S || S.type ? new
|
|
1071
|
+
}), c.isUndefined(a.withCredentials) || (y.withCredentials = !!a.withCredentials), l && l !== "json" && (y.responseType = a.responseType), u && ([w, m] = wt(u, !0), y.addEventListener("progress", w)), f && y.upload && ([g, P] = wt(f), y.upload.addEventListener("progress", g), y.upload.addEventListener("loadend", P)), (a.cancelToken || a.signal) && (p = (S) => {
|
|
1072
|
+
y && (s(!S || S.type ? new Ye(null, t, y) : S), y.abort(), y = null);
|
|
1073
1073
|
}, a.cancelToken && a.cancelToken.subscribe(p), a.signal && (a.signal.aborted ? p() : a.signal.addEventListener("abort", p)));
|
|
1074
1074
|
const M = An(a.url);
|
|
1075
1075
|
if (M && fe.protocols.indexOf(M) === -1) {
|
|
@@ -1086,7 +1086,7 @@ const Xr = (t) => {
|
|
|
1086
1086
|
if (!a) {
|
|
1087
1087
|
a = !0, l();
|
|
1088
1088
|
const p = u instanceof Error ? u : this.reason;
|
|
1089
|
-
s.abort(p instanceof L ? p : new
|
|
1089
|
+
s.abort(p instanceof L ? p : new Ye(p instanceof Error ? p.message : p));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
let i = e && setTimeout(() => {
|
|
@@ -1129,7 +1129,7 @@ const Xr = (t) => {
|
|
|
1129
1129
|
} finally {
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
|
-
},
|
|
1132
|
+
}, gr = (t, e, r, s) => {
|
|
1133
1133
|
const a = Mn(t, e);
|
|
1134
1134
|
let o = 0, i, l = (f) => {
|
|
1135
1135
|
i || (i = !0, s && s(f));
|
|
@@ -1142,9 +1142,9 @@ const Xr = (t) => {
|
|
|
1142
1142
|
l(), f.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let
|
|
1145
|
+
let g = p.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
|
-
let w = o +=
|
|
1147
|
+
let w = o += g;
|
|
1148
1148
|
r(w);
|
|
1149
1149
|
}
|
|
1150
1150
|
f.enqueue(new Uint8Array(p));
|
|
@@ -1158,7 +1158,7 @@ const Xr = (t) => {
|
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
1160
1160
|
});
|
|
1161
|
-
},
|
|
1161
|
+
}, br = 64 * 1024, { isFunction: mt } = c, Hn = (({ Request: t, Response: e }) => ({
|
|
1162
1162
|
Request: t,
|
|
1163
1163
|
Response: e
|
|
1164
1164
|
}))(c.global), {
|
|
@@ -1187,11 +1187,11 @@ const Xr = (t) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return m && !x;
|
|
1190
|
-
}), p = i && l && vr(() => c.isReadableStream(new s("").body)),
|
|
1190
|
+
}), p = i && l && vr(() => c.isReadableStream(new s("").body)), g = {
|
|
1191
1191
|
stream: p && ((m) => m.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
|
|
1194
|
-
!
|
|
1194
|
+
!g[m] && (g[m] = (x, y) => {
|
|
1195
1195
|
let C = x && x[m];
|
|
1196
1196
|
if (C)
|
|
1197
1197
|
return C.call(x);
|
|
@@ -1225,7 +1225,7 @@ const Xr = (t) => {
|
|
|
1225
1225
|
cancelToken: S,
|
|
1226
1226
|
timeout: F,
|
|
1227
1227
|
onDownloadProgress: q,
|
|
1228
|
-
onUploadProgress:
|
|
1228
|
+
onUploadProgress: K,
|
|
1229
1229
|
responseType: U,
|
|
1230
1230
|
headers: B,
|
|
1231
1231
|
withCredentials: H = "same-origin",
|
|
@@ -1238,18 +1238,18 @@ const Xr = (t) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
let v;
|
|
1240
1240
|
try {
|
|
1241
|
-
if (
|
|
1241
|
+
if (K && u && y !== "get" && y !== "head" && (v = await P(B, C)) !== 0) {
|
|
1242
1242
|
let d = new r(x, {
|
|
1243
1243
|
method: "POST",
|
|
1244
1244
|
body: C,
|
|
1245
1245
|
duplex: "half"
|
|
1246
1246
|
}), h;
|
|
1247
1247
|
if (c.isFormData(C) && (h = d.headers.get("content-type")) && B.setContentType(h), d.body) {
|
|
1248
|
-
const [
|
|
1248
|
+
const [b, N] = hr(
|
|
1249
1249
|
v,
|
|
1250
|
-
wt(xr(
|
|
1250
|
+
wt(xr(K))
|
|
1251
1251
|
);
|
|
1252
|
-
C =
|
|
1252
|
+
C = gr(d.body, br, b, N);
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
c.isString(H) || (H = H ? "include" : "omit");
|
|
@@ -1263,32 +1263,32 @@ const Xr = (t) => {
|
|
|
1263
1263
|
credentials: $ ? H : void 0
|
|
1264
1264
|
};
|
|
1265
1265
|
X = o && new r(x, A);
|
|
1266
|
-
let
|
|
1266
|
+
let O = await (o ? Q(X, se) : Q(x, A));
|
|
1267
1267
|
const D = p && (U === "stream" || U === "response");
|
|
1268
1268
|
if (p && (q || D && W)) {
|
|
1269
1269
|
const d = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((V) => {
|
|
1271
|
-
d[V] =
|
|
1271
|
+
d[V] = O[V];
|
|
1272
1272
|
});
|
|
1273
|
-
const h = c.toFiniteNumber(
|
|
1273
|
+
const h = c.toFiniteNumber(O.headers.get("content-length")), [b, N] = q && hr(
|
|
1274
1274
|
h,
|
|
1275
1275
|
wt(xr(q), !0)
|
|
1276
1276
|
) || [];
|
|
1277
|
-
|
|
1278
|
-
|
|
1277
|
+
O = new s(
|
|
1278
|
+
gr(O.body, br, b, () => {
|
|
1279
1279
|
N && N(), W && W();
|
|
1280
1280
|
}),
|
|
1281
1281
|
d
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
U = U || "text";
|
|
1285
|
-
let
|
|
1285
|
+
let Y = await g[c.findKey(g, U) || "text"](O, m);
|
|
1286
1286
|
return !D && W && W(), await new Promise((d, h) => {
|
|
1287
|
-
|
|
1288
|
-
data:
|
|
1289
|
-
headers: xe.from(
|
|
1290
|
-
status:
|
|
1291
|
-
statusText:
|
|
1287
|
+
Yr(d, h, {
|
|
1288
|
+
data: Y,
|
|
1289
|
+
headers: xe.from(O.headers),
|
|
1290
|
+
status: O.status,
|
|
1291
|
+
statusText: O.statusText,
|
|
1292
1292
|
config: m,
|
|
1293
1293
|
request: X
|
|
1294
1294
|
});
|
|
@@ -1331,7 +1331,7 @@ c.forEach(Ft, (t, e) => {
|
|
|
1331
1331
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const Nr = (t) => `- ${t}`,
|
|
1334
|
+
const Nr = (t) => `- ${t}`, Yn = (t) => c.isFunction(t) || t === null || t === !1, Zr = {
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = c.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
@@ -1340,7 +1340,7 @@ const Nr = (t) => `- ${t}`, Kn = (t) => c.isFunction(t) || t === null || t === !
|
|
|
1340
1340
|
for (let i = 0; i < r; i++) {
|
|
1341
1341
|
s = t[i];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (a = s, !
|
|
1343
|
+
if (a = s, !Yn(s) && (a = Ft[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
1345
|
if (a && (c.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
@@ -1362,22 +1362,22 @@ const Nr = (t) => `- ${t}`, Kn = (t) => c.isFunction(t) || t === null || t === !
|
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: Ft
|
|
1364
1364
|
};
|
|
1365
|
-
function
|
|
1365
|
+
function _t(t) {
|
|
1366
1366
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1367
|
-
throw new
|
|
1367
|
+
throw new Ye(null, t);
|
|
1368
1368
|
}
|
|
1369
1369
|
function Er(t) {
|
|
1370
|
-
return
|
|
1370
|
+
return _t(t), t.headers = xe.from(t.headers), t.data = Ot.call(
|
|
1371
1371
|
t,
|
|
1372
1372
|
t.transformRequest
|
|
1373
1373
|
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Zr.getAdapter(t.adapter || st.adapter, t)(t).then(function(s) {
|
|
1374
|
-
return
|
|
1374
|
+
return _t(t), s.data = Ot.call(
|
|
1375
1375
|
t,
|
|
1376
1376
|
t.transformResponse,
|
|
1377
1377
|
s
|
|
1378
1378
|
), s.headers = xe.from(s.headers), s;
|
|
1379
1379
|
}, function(s) {
|
|
1380
|
-
return Jr(s) || (
|
|
1380
|
+
return Jr(s) || (_t(t), s && s.response && (s.response.data = Ot.call(
|
|
1381
1381
|
t,
|
|
1382
1382
|
t.transformResponse,
|
|
1383
1383
|
s.response
|
|
@@ -1412,7 +1412,7 @@ $t.transitional = function(e, r, s) {
|
|
|
1412
1412
|
$t.spelling = function(e) {
|
|
1413
1413
|
return (r, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1414
1414
|
};
|
|
1415
|
-
function
|
|
1415
|
+
function Kn(t, e, r) {
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new L("options must be an object", L.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
@@ -1429,10 +1429,10 @@ function Yn(t, e, r) {
|
|
|
1429
1429
|
throw new L("Unknown option " + o, L.ERR_BAD_OPTION);
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
|
-
const
|
|
1433
|
-
assertOptions:
|
|
1432
|
+
const gt = {
|
|
1433
|
+
assertOptions: Kn,
|
|
1434
1434
|
validators: $t
|
|
1435
|
-
}, Ne =
|
|
1435
|
+
}, Ne = gt.validators;
|
|
1436
1436
|
let qe = class {
|
|
1437
1437
|
constructor(e) {
|
|
1438
1438
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -1468,16 +1468,16 @@ let qe = class {
|
|
|
1468
1468
|
_request(e, r) {
|
|
1469
1469
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = Fe(this.defaults, r);
|
|
1470
1470
|
const { transitional: s, paramsSerializer: a, headers: o } = r;
|
|
1471
|
-
s !== void 0 &&
|
|
1471
|
+
s !== void 0 && gt.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: Ne.transitional(Ne.boolean),
|
|
1473
1473
|
forcedJSONParsing: Ne.transitional(Ne.boolean),
|
|
1474
1474
|
clarifyTimeoutError: Ne.transitional(Ne.boolean)
|
|
1475
1475
|
}, !1), a != null && (c.isFunction(a) ? r.paramsSerializer = {
|
|
1476
1476
|
serialize: a
|
|
1477
|
-
} :
|
|
1477
|
+
} : gt.assertOptions(a, {
|
|
1478
1478
|
encode: Ne.function,
|
|
1479
1479
|
serialize: Ne.function
|
|
1480
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
1480
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), gt.assertOptions(r, {
|
|
1481
1481
|
baseUrl: Ne.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: Ne.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1500,17 +1500,17 @@ let qe = class {
|
|
|
1500
1500
|
this.interceptors.response.forEach(function(x) {
|
|
1501
1501
|
u.push(x.fulfilled, x.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let p,
|
|
1503
|
+
let p, g = 0, w;
|
|
1504
1504
|
if (!f) {
|
|
1505
1505
|
const m = [Er.bind(this), void 0];
|
|
1506
|
-
for (m.unshift(...l), m.push(...u), w = m.length, p = Promise.resolve(r);
|
|
1507
|
-
p = p.then(m[
|
|
1506
|
+
for (m.unshift(...l), m.push(...u), w = m.length, p = Promise.resolve(r); g < w; )
|
|
1507
|
+
p = p.then(m[g++], m[g++]);
|
|
1508
1508
|
return p;
|
|
1509
1509
|
}
|
|
1510
1510
|
w = l.length;
|
|
1511
1511
|
let P = r;
|
|
1512
|
-
for (;
|
|
1513
|
-
const m = l[
|
|
1512
|
+
for (; g < w; ) {
|
|
1513
|
+
const m = l[g++], x = l[g++];
|
|
1514
1514
|
try {
|
|
1515
1515
|
P = m(P);
|
|
1516
1516
|
} catch (y) {
|
|
@@ -1523,13 +1523,13 @@ let qe = class {
|
|
|
1523
1523
|
} catch (m) {
|
|
1524
1524
|
return Promise.reject(m);
|
|
1525
1525
|
}
|
|
1526
|
-
for (
|
|
1527
|
-
p = p.then(u[
|
|
1526
|
+
for (g = 0, w = u.length; g < w; )
|
|
1527
|
+
p = p.then(u[g++], u[g++]);
|
|
1528
1528
|
return p;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = Fe(this.defaults, e);
|
|
1532
|
-
const r =
|
|
1532
|
+
const r = Kr(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1533
1533
|
return Br(r, e.params, e.paramsSerializer);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
@@ -1581,7 +1581,7 @@ let Xn = class es {
|
|
|
1581
1581
|
s.unsubscribe(o);
|
|
1582
1582
|
}, i;
|
|
1583
1583
|
}, e(function(o, i, l) {
|
|
1584
|
-
s.reason || (s.reason = new
|
|
1584
|
+
s.reason || (s.reason = new Ye(o, i, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1714,7 +1714,7 @@ function ts(t) {
|
|
|
1714
1714
|
}
|
|
1715
1715
|
const ae = ts(st);
|
|
1716
1716
|
ae.Axios = qe;
|
|
1717
|
-
ae.CanceledError =
|
|
1717
|
+
ae.CanceledError = Ye;
|
|
1718
1718
|
ae.CancelToken = Xn;
|
|
1719
1719
|
ae.isCancel = Jr;
|
|
1720
1720
|
ae.VERSION = Qr;
|
|
@@ -1733,75 +1733,46 @@ ae.getAdapter = Zr.getAdapter;
|
|
|
1733
1733
|
ae.HttpStatusCode = Dt;
|
|
1734
1734
|
ae.default = ae;
|
|
1735
1735
|
const {
|
|
1736
|
-
Axios:
|
|
1737
|
-
AxiosError:
|
|
1738
|
-
CanceledError:
|
|
1739
|
-
isCancel:
|
|
1740
|
-
CancelToken:
|
|
1741
|
-
VERSION:
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1736
|
+
Axios: so,
|
|
1737
|
+
AxiosError: no,
|
|
1738
|
+
CanceledError: ao,
|
|
1739
|
+
isCancel: oo,
|
|
1740
|
+
CancelToken: io,
|
|
1741
|
+
VERSION: lo,
|
|
1742
|
+
all: co,
|
|
1743
|
+
Cancel: uo,
|
|
1744
|
+
isAxiosError: fo,
|
|
1745
|
+
spread: po,
|
|
1746
|
+
toFormData: mo,
|
|
1747
|
+
AxiosHeaders: ho,
|
|
1748
|
+
HttpStatusCode: xo,
|
|
1749
|
+
formToJSON: yo,
|
|
1750
1750
|
getAdapter: go,
|
|
1751
|
-
mergeConfig:
|
|
1751
|
+
mergeConfig: bo
|
|
1752
1752
|
} = ae;
|
|
1753
|
-
|
|
1754
|
-
return typeof window < "u" && typeof window.document < "u";
|
|
1755
|
-
}
|
|
1756
|
-
class jo {
|
|
1753
|
+
class wo {
|
|
1757
1754
|
appName;
|
|
1758
1755
|
baseUrl;
|
|
1759
1756
|
apiKey;
|
|
1760
|
-
/** Which credential this instance holds. Drives error messages and warnings. */
|
|
1761
|
-
keyType;
|
|
1762
1757
|
appId;
|
|
1763
1758
|
client;
|
|
1764
1759
|
/**
|
|
1765
1760
|
* Initialize the SDK client.
|
|
1766
1761
|
*
|
|
1767
|
-
* Provide
|
|
1768
|
-
* • `publishableKey` (`pk_live_…`) for browser and mobile code
|
|
1769
|
-
* • `secretKey` (`sk_live_…`) for server code only
|
|
1762
|
+
* Provide an account API key. It has full authority and must remain server-side.
|
|
1770
1763
|
*
|
|
1771
1764
|
* @param config configuration object with baseUrl, one key, and appId
|
|
1772
1765
|
*/
|
|
1773
1766
|
constructor(e) {
|
|
1774
1767
|
if (!e || !e.baseUrl)
|
|
1775
1768
|
throw new Error("NeuctraAuthix: 'baseUrl' is required in config");
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
);
|
|
1780
|
-
const { publishableKey: r, secretKey: s } = e;
|
|
1781
|
-
if (r && s)
|
|
1782
|
-
throw new Error(
|
|
1783
|
-
"NeuctraAuthix: provide either 'publishableKey' or 'secretKey', not both."
|
|
1784
|
-
);
|
|
1785
|
-
const a = r || s || null;
|
|
1786
|
-
if (!a)
|
|
1787
|
-
throw new Error(
|
|
1788
|
-
"NeuctraAuthix: a 'publishableKey' or 'secretKey' is required in config"
|
|
1789
|
-
);
|
|
1790
|
-
if (r && r.startsWith("sk_"))
|
|
1791
|
-
throw new Error(
|
|
1792
|
-
"NeuctraAuthix: a secret key (sk_…) was passed as 'publishableKey'. Secret keys must never appear in client code. Use a pk_… key here."
|
|
1793
|
-
);
|
|
1794
|
-
if (s && s.startsWith("pk_"))
|
|
1795
|
-
throw new Error(
|
|
1796
|
-
"NeuctraAuthix: a publishable key (pk_…) was passed as 'secretKey'. Use the sk_… key from your dashboard for server-side calls."
|
|
1797
|
-
);
|
|
1798
|
-
this.keyType = s ? "secret" : r ? "publishable" : null, this.keyType === "secret" && Qn() && console.error(
|
|
1799
|
-
"[Authix] SECURITY: a secret key (sk_…) is running in a browser. It is now exposed to anyone who opens devtools. Revoke this key in your dashboard and switch to a publishable key (pk_…)."
|
|
1800
|
-
), this.appName = e.appName, this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.apiKey = a, this.appId = e.appId || null, this.client = ae.create({
|
|
1769
|
+
const r = e.apiKey;
|
|
1770
|
+
if (!r) throw new Error("NeuctraAuthix: 'apiKey' is required in config");
|
|
1771
|
+
this.appName = e.appName, this.baseUrl = e.baseUrl.replace(/\/$/, ""), this.apiKey = r, this.appId = e.appId || null, this.client = ae.create({
|
|
1801
1772
|
baseURL: this.baseUrl,
|
|
1802
1773
|
headers: {
|
|
1803
1774
|
"Content-Type": "application/json",
|
|
1804
|
-
"x-api-key":
|
|
1775
|
+
"x-api-key": r
|
|
1805
1776
|
},
|
|
1806
1777
|
timeout: 3e4,
|
|
1807
1778
|
withCredentials: !0
|
|
@@ -1833,7 +1804,7 @@ class jo {
|
|
|
1833
1804
|
if (ae.isAxiosError(i)) {
|
|
1834
1805
|
const l = i.response?.status ?? 0, f = i.response?.data;
|
|
1835
1806
|
let u = f?.message || i.message || "Request failed";
|
|
1836
|
-
throw l === 403 && f?.code === "INSUFFICIENT_SCOPE" && (u = `${u} (called "${r}" with
|
|
1807
|
+
throw l === 403 && f?.code === "INSUFFICIENT_SCOPE" && (u = `${u} (called "${r}" with an API key). This endpoint needs an API key — call it from your server, not from client code.`), l === 401 && f?.code === "NO_USER_SESSION" && (u = `${u} Sign the user in with loginUser() first — this endpoint acts on the signed-in user's own data.`), l === 409 && f?.code === "VERSION_CONFLICT" ? {
|
|
1837
1808
|
message: `${u} Re-read the record to get its current version, then retry the update.`,
|
|
1838
1809
|
status: l,
|
|
1839
1810
|
code: "VERSION_CONFLICT",
|
|
@@ -2409,7 +2380,7 @@ class jo {
|
|
|
2409
2380
|
);
|
|
2410
2381
|
}
|
|
2411
2382
|
/**
|
|
2412
|
-
* Search users across the app. Requires
|
|
2383
|
+
* Search users across the app. Requires an API key.
|
|
2413
2384
|
*
|
|
2414
2385
|
* Only these fields may be filtered on: id, username, name, email, phone,
|
|
2415
2386
|
* address, role, isVerified, isActive. Anything else is rejected with a 400 —
|
|
@@ -2446,7 +2417,7 @@ class jo {
|
|
|
2446
2417
|
);
|
|
2447
2418
|
}
|
|
2448
2419
|
/**
|
|
2449
|
-
* Search across every user's records in the app. Requires
|
|
2420
|
+
* Search across every user's records in the app. Requires an API key.
|
|
2450
2421
|
*
|
|
2451
2422
|
* `keys` becomes a jsonb containment query and `q` a trigram substring match,
|
|
2452
2423
|
* both index-backed in Postgres. Paginated — follow `nextCursor`.
|
|
@@ -2477,7 +2448,7 @@ var ht = { exports: {} }, Ge = {};
|
|
|
2477
2448
|
* LICENSE file in the root directory of this source tree.
|
|
2478
2449
|
*/
|
|
2479
2450
|
var kr;
|
|
2480
|
-
function
|
|
2451
|
+
function Qn() {
|
|
2481
2452
|
if (kr) return Ge;
|
|
2482
2453
|
kr = 1;
|
|
2483
2454
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
@@ -2509,7 +2480,7 @@ var Ze = {};
|
|
|
2509
2480
|
* LICENSE file in the root directory of this source tree.
|
|
2510
2481
|
*/
|
|
2511
2482
|
var Sr;
|
|
2512
|
-
function
|
|
2483
|
+
function ea() {
|
|
2513
2484
|
return Sr || (Sr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2514
2485
|
function t(d) {
|
|
2515
2486
|
if (d == null) return null;
|
|
@@ -2523,7 +2494,7 @@ function ta() {
|
|
|
2523
2494
|
return "Profiler";
|
|
2524
2495
|
case C:
|
|
2525
2496
|
return "StrictMode";
|
|
2526
|
-
case
|
|
2497
|
+
case K:
|
|
2527
2498
|
return "Suspense";
|
|
2528
2499
|
case U:
|
|
2529
2500
|
return "SuspenseList";
|
|
@@ -2566,8 +2537,8 @@ function ta() {
|
|
|
2566
2537
|
}
|
|
2567
2538
|
if (h) {
|
|
2568
2539
|
h = console;
|
|
2569
|
-
var
|
|
2570
|
-
return
|
|
2540
|
+
var b = h.error, N = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
2541
|
+
return b.call(
|
|
2571
2542
|
h,
|
|
2572
2543
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2573
2544
|
N
|
|
@@ -2600,14 +2571,14 @@ function ta() {
|
|
|
2600
2571
|
return d.key !== void 0;
|
|
2601
2572
|
}
|
|
2602
2573
|
function l(d, h) {
|
|
2603
|
-
function
|
|
2574
|
+
function b() {
|
|
2604
2575
|
$ || ($ = !0, console.error(
|
|
2605
2576
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2606
2577
|
h
|
|
2607
2578
|
));
|
|
2608
2579
|
}
|
|
2609
|
-
|
|
2610
|
-
get:
|
|
2580
|
+
b.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
2581
|
+
get: b,
|
|
2611
2582
|
configurable: !0
|
|
2612
2583
|
});
|
|
2613
2584
|
}
|
|
@@ -2617,13 +2588,13 @@ function ta() {
|
|
|
2617
2588
|
"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."
|
|
2618
2589
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
2619
2590
|
}
|
|
2620
|
-
function u(d, h,
|
|
2621
|
-
var T =
|
|
2591
|
+
function u(d, h, b, N, V, ce) {
|
|
2592
|
+
var T = b.ref;
|
|
2622
2593
|
return d = {
|
|
2623
2594
|
$$typeof: m,
|
|
2624
2595
|
type: d,
|
|
2625
2596
|
key: h,
|
|
2626
|
-
props:
|
|
2597
|
+
props: b,
|
|
2627
2598
|
_owner: N
|
|
2628
2599
|
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(d, "ref", {
|
|
2629
2600
|
enumerable: !1,
|
|
@@ -2650,25 +2621,25 @@ function ta() {
|
|
|
2650
2621
|
value: ce
|
|
2651
2622
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
2652
2623
|
}
|
|
2653
|
-
function p(d, h,
|
|
2624
|
+
function p(d, h, b, N, V, ce) {
|
|
2654
2625
|
var T = h.children;
|
|
2655
2626
|
if (T !== void 0)
|
|
2656
2627
|
if (N)
|
|
2657
2628
|
if (W(T)) {
|
|
2658
2629
|
for (N = 0; N < T.length; N++)
|
|
2659
|
-
|
|
2630
|
+
g(T[N]);
|
|
2660
2631
|
Object.freeze && Object.freeze(T);
|
|
2661
2632
|
} else
|
|
2662
2633
|
console.error(
|
|
2663
2634
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2664
2635
|
);
|
|
2665
|
-
else
|
|
2636
|
+
else g(T);
|
|
2666
2637
|
if (X.call(h, "key")) {
|
|
2667
2638
|
T = t(d);
|
|
2668
2639
|
var oe = Object.keys(h).filter(function(I) {
|
|
2669
2640
|
return I !== "key";
|
|
2670
2641
|
});
|
|
2671
|
-
N = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
2642
|
+
N = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", Y[T + N] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2672
2643
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2673
2644
|
let props = %s;
|
|
2674
2645
|
<%s {...props} />
|
|
@@ -2679,32 +2650,32 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2679
2650
|
T,
|
|
2680
2651
|
oe,
|
|
2681
2652
|
T
|
|
2682
|
-
),
|
|
2653
|
+
), Y[T + N] = !0);
|
|
2683
2654
|
}
|
|
2684
|
-
if (T = null,
|
|
2685
|
-
|
|
2655
|
+
if (T = null, b !== void 0 && (r(b), T = "" + b), i(h) && (r(h.key), T = "" + h.key), "key" in h) {
|
|
2656
|
+
b = {};
|
|
2686
2657
|
for (var ie in h)
|
|
2687
|
-
ie !== "key" && (
|
|
2688
|
-
} else
|
|
2658
|
+
ie !== "key" && (b[ie] = h[ie]);
|
|
2659
|
+
} else b = h;
|
|
2689
2660
|
return T && l(
|
|
2690
|
-
|
|
2661
|
+
b,
|
|
2691
2662
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
2692
2663
|
), u(
|
|
2693
2664
|
d,
|
|
2694
2665
|
T,
|
|
2695
|
-
|
|
2666
|
+
b,
|
|
2696
2667
|
a(),
|
|
2697
2668
|
V,
|
|
2698
2669
|
ce
|
|
2699
2670
|
);
|
|
2700
2671
|
}
|
|
2701
|
-
function
|
|
2672
|
+
function g(d) {
|
|
2702
2673
|
w(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === H && (d._payload.status === "fulfilled" ? w(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
2703
2674
|
}
|
|
2704
2675
|
function w(d) {
|
|
2705
2676
|
return typeof d == "object" && d !== null && d.$$typeof === m;
|
|
2706
2677
|
}
|
|
2707
|
-
var P = Qe, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), F = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"),
|
|
2678
|
+
var P = Qe, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), F = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), se = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), J = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, W = Array.isArray, v = console.createTask ? console.createTask : function() {
|
|
2708
2679
|
return null;
|
|
2709
2680
|
};
|
|
2710
2681
|
P = {
|
|
@@ -2712,51 +2683,51 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2712
2683
|
return d();
|
|
2713
2684
|
}
|
|
2714
2685
|
};
|
|
2715
|
-
var $, A = {},
|
|
2686
|
+
var $, A = {}, O = P.react_stack_bottom_frame.bind(
|
|
2716
2687
|
P,
|
|
2717
2688
|
o
|
|
2718
|
-
)(), D = v(s(o)),
|
|
2719
|
-
Ze.Fragment = y, Ze.jsx = function(d, h,
|
|
2689
|
+
)(), D = v(s(o)), Y = {};
|
|
2690
|
+
Ze.Fragment = y, Ze.jsx = function(d, h, b) {
|
|
2720
2691
|
var N = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
2721
2692
|
return p(
|
|
2722
2693
|
d,
|
|
2723
2694
|
h,
|
|
2724
|
-
|
|
2695
|
+
b,
|
|
2725
2696
|
!1,
|
|
2726
|
-
N ? Error("react-stack-top-frame") :
|
|
2697
|
+
N ? Error("react-stack-top-frame") : O,
|
|
2727
2698
|
N ? v(s(d)) : D
|
|
2728
2699
|
);
|
|
2729
|
-
}, Ze.jsxs = function(d, h,
|
|
2700
|
+
}, Ze.jsxs = function(d, h, b) {
|
|
2730
2701
|
var N = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
2731
2702
|
return p(
|
|
2732
2703
|
d,
|
|
2733
2704
|
h,
|
|
2734
|
-
|
|
2705
|
+
b,
|
|
2735
2706
|
!0,
|
|
2736
|
-
N ? Error("react-stack-top-frame") :
|
|
2707
|
+
N ? Error("react-stack-top-frame") : O,
|
|
2737
2708
|
N ? v(s(d)) : D
|
|
2738
2709
|
);
|
|
2739
2710
|
};
|
|
2740
2711
|
})()), Ze;
|
|
2741
2712
|
}
|
|
2742
2713
|
var Pr;
|
|
2743
|
-
function
|
|
2744
|
-
return Pr || (Pr = 1, process.env.NODE_ENV === "production" ? ht.exports =
|
|
2714
|
+
function ta() {
|
|
2715
|
+
return Pr || (Pr = 1, process.env.NODE_ENV === "production" ? ht.exports = Qn() : ht.exports = ea()), ht.exports;
|
|
2745
2716
|
}
|
|
2746
|
-
var n =
|
|
2717
|
+
var n = ta();
|
|
2747
2718
|
/**
|
|
2748
2719
|
* @license lucide-react v0.544.0 - ISC
|
|
2749
2720
|
*
|
|
2750
2721
|
* This source code is licensed under the ISC license.
|
|
2751
2722
|
* See the LICENSE file in the root directory of this source tree.
|
|
2752
2723
|
*/
|
|
2753
|
-
const
|
|
2724
|
+
const ra = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), sa = (t) => t.replace(
|
|
2754
2725
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2755
2726
|
(e, r, s) => s ? s.toUpperCase() : r.toLowerCase()
|
|
2756
2727
|
), Cr = (t) => {
|
|
2757
|
-
const e =
|
|
2728
|
+
const e = sa(t);
|
|
2758
2729
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2759
|
-
}, rs = (...t) => t.filter((e, r, s) => !!e && e.trim() !== "" && s.indexOf(e) === r).join(" ").trim(),
|
|
2730
|
+
}, rs = (...t) => t.filter((e, r, s) => !!e && e.trim() !== "" && s.indexOf(e) === r).join(" ").trim(), na = (t) => {
|
|
2760
2731
|
for (const e in t)
|
|
2761
2732
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
2762
2733
|
return !0;
|
|
@@ -2767,7 +2738,7 @@ const sa = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), na = (
|
|
|
2767
2738
|
* This source code is licensed under the ISC license.
|
|
2768
2739
|
* See the LICENSE file in the root directory of this source tree.
|
|
2769
2740
|
*/
|
|
2770
|
-
var
|
|
2741
|
+
var aa = {
|
|
2771
2742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2772
2743
|
width: 24,
|
|
2773
2744
|
height: 24,
|
|
@@ -2784,7 +2755,7 @@ var oa = {
|
|
|
2784
2755
|
* This source code is licensed under the ISC license.
|
|
2785
2756
|
* See the LICENSE file in the root directory of this source tree.
|
|
2786
2757
|
*/
|
|
2787
|
-
const
|
|
2758
|
+
const oa = Rr(
|
|
2788
2759
|
({
|
|
2789
2760
|
color: t = "currentColor",
|
|
2790
2761
|
size: e = 24,
|
|
@@ -2798,13 +2769,13 @@ const ia = Rr(
|
|
|
2798
2769
|
"svg",
|
|
2799
2770
|
{
|
|
2800
2771
|
ref: f,
|
|
2801
|
-
...
|
|
2772
|
+
...aa,
|
|
2802
2773
|
width: e,
|
|
2803
2774
|
height: e,
|
|
2804
2775
|
stroke: t,
|
|
2805
2776
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2806
2777
|
className: rs("lucide", a),
|
|
2807
|
-
...!o && !
|
|
2778
|
+
...!o && !na(l) && { "aria-hidden": "true" },
|
|
2808
2779
|
...l
|
|
2809
2780
|
},
|
|
2810
2781
|
[
|
|
@@ -2821,11 +2792,11 @@ const ia = Rr(
|
|
|
2821
2792
|
*/
|
|
2822
2793
|
const Z = (t, e) => {
|
|
2823
2794
|
const r = Rr(
|
|
2824
|
-
({ className: s, ...a }, o) => zt(
|
|
2795
|
+
({ className: s, ...a }, o) => zt(oa, {
|
|
2825
2796
|
ref: o,
|
|
2826
2797
|
iconNode: e,
|
|
2827
2798
|
className: rs(
|
|
2828
|
-
`lucide-${
|
|
2799
|
+
`lucide-${ra(Cr(t))}`,
|
|
2829
2800
|
`lucide-${t}`,
|
|
2830
2801
|
s
|
|
2831
2802
|
),
|
|
@@ -2840,17 +2811,17 @@ const Z = (t, e) => {
|
|
|
2840
2811
|
* This source code is licensed under the ISC license.
|
|
2841
2812
|
* See the LICENSE file in the root directory of this source tree.
|
|
2842
2813
|
*/
|
|
2843
|
-
const
|
|
2814
|
+
const ia = [
|
|
2844
2815
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
2845
2816
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
2846
|
-
],
|
|
2817
|
+
], la = Z("arrow-left", ia);
|
|
2847
2818
|
/**
|
|
2848
2819
|
* @license lucide-react v0.544.0 - ISC
|
|
2849
2820
|
*
|
|
2850
2821
|
* This source code is licensed under the ISC license.
|
|
2851
2822
|
* See the LICENSE file in the root directory of this source tree.
|
|
2852
2823
|
*/
|
|
2853
|
-
const
|
|
2824
|
+
const ca = [
|
|
2854
2825
|
[
|
|
2855
2826
|
"path",
|
|
2856
2827
|
{
|
|
@@ -2859,14 +2830,14 @@ const da = [
|
|
|
2859
2830
|
}
|
|
2860
2831
|
],
|
|
2861
2832
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2862
|
-
],
|
|
2833
|
+
], da = Z("badge-check", ca);
|
|
2863
2834
|
/**
|
|
2864
2835
|
* @license lucide-react v0.544.0 - ISC
|
|
2865
2836
|
*
|
|
2866
2837
|
* This source code is licensed under the ISC license.
|
|
2867
2838
|
* See the LICENSE file in the root directory of this source tree.
|
|
2868
2839
|
*/
|
|
2869
|
-
const
|
|
2840
|
+
const ua = [
|
|
2870
2841
|
[
|
|
2871
2842
|
"path",
|
|
2872
2843
|
{
|
|
@@ -2875,67 +2846,67 @@ const fa = [
|
|
|
2875
2846
|
}
|
|
2876
2847
|
],
|
|
2877
2848
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
2878
|
-
], Vt = Z("camera",
|
|
2849
|
+
], Vt = Z("camera", ua);
|
|
2879
2850
|
/**
|
|
2880
2851
|
* @license lucide-react v0.544.0 - ISC
|
|
2881
2852
|
*
|
|
2882
2853
|
* This source code is licensed under the ISC license.
|
|
2883
2854
|
* See the LICENSE file in the root directory of this source tree.
|
|
2884
2855
|
*/
|
|
2885
|
-
const
|
|
2856
|
+
const fa = [
|
|
2886
2857
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2887
2858
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2888
2859
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2889
|
-
], we = Z("circle-alert",
|
|
2860
|
+
], we = Z("circle-alert", fa);
|
|
2890
2861
|
/**
|
|
2891
2862
|
* @license lucide-react v0.544.0 - ISC
|
|
2892
2863
|
*
|
|
2893
2864
|
* This source code is licensed under the ISC license.
|
|
2894
2865
|
* See the LICENSE file in the root directory of this source tree.
|
|
2895
2866
|
*/
|
|
2896
|
-
const
|
|
2867
|
+
const pa = [
|
|
2897
2868
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
2898
2869
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
2899
|
-
], ke = Z("circle-check-big",
|
|
2870
|
+
], ke = Z("circle-check-big", pa);
|
|
2900
2871
|
/**
|
|
2901
2872
|
* @license lucide-react v0.544.0 - ISC
|
|
2902
2873
|
*
|
|
2903
2874
|
* This source code is licensed under the ISC license.
|
|
2904
2875
|
* See the LICENSE file in the root directory of this source tree.
|
|
2905
2876
|
*/
|
|
2906
|
-
const
|
|
2877
|
+
const ma = [
|
|
2907
2878
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2908
2879
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
2909
|
-
], Ut = Z("circle-check",
|
|
2880
|
+
], Ut = Z("circle-check", ma);
|
|
2910
2881
|
/**
|
|
2911
2882
|
* @license lucide-react v0.544.0 - ISC
|
|
2912
2883
|
*
|
|
2913
2884
|
* This source code is licensed under the ISC license.
|
|
2914
2885
|
* See the LICENSE file in the root directory of this source tree.
|
|
2915
2886
|
*/
|
|
2916
|
-
const
|
|
2887
|
+
const ha = [
|
|
2917
2888
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
2918
2889
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
2919
2890
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
2920
|
-
],
|
|
2891
|
+
], xa = Z("database", ha);
|
|
2921
2892
|
/**
|
|
2922
2893
|
* @license lucide-react v0.544.0 - ISC
|
|
2923
2894
|
*
|
|
2924
2895
|
* This source code is licensed under the ISC license.
|
|
2925
2896
|
* See the LICENSE file in the root directory of this source tree.
|
|
2926
2897
|
*/
|
|
2927
|
-
const
|
|
2898
|
+
const ya = [
|
|
2928
2899
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2929
2900
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2930
2901
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2931
|
-
], ga = Z("ellipsis-vertical",
|
|
2902
|
+
], ga = Z("ellipsis-vertical", ya);
|
|
2932
2903
|
/**
|
|
2933
2904
|
* @license lucide-react v0.544.0 - ISC
|
|
2934
2905
|
*
|
|
2935
2906
|
* This source code is licensed under the ISC license.
|
|
2936
2907
|
* See the LICENSE file in the root directory of this source tree.
|
|
2937
2908
|
*/
|
|
2938
|
-
const
|
|
2909
|
+
const ba = [
|
|
2939
2910
|
[
|
|
2940
2911
|
"path",
|
|
2941
2912
|
{
|
|
@@ -2952,14 +2923,14 @@ const wa = [
|
|
|
2952
2923
|
}
|
|
2953
2924
|
],
|
|
2954
2925
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
2955
|
-
], Jt = Z("eye-off",
|
|
2926
|
+
], Jt = Z("eye-off", ba);
|
|
2956
2927
|
/**
|
|
2957
2928
|
* @license lucide-react v0.544.0 - ISC
|
|
2958
2929
|
*
|
|
2959
2930
|
* This source code is licensed under the ISC license.
|
|
2960
2931
|
* See the LICENSE file in the root directory of this source tree.
|
|
2961
2932
|
*/
|
|
2962
|
-
const
|
|
2933
|
+
const wa = [
|
|
2963
2934
|
[
|
|
2964
2935
|
"path",
|
|
2965
2936
|
{
|
|
@@ -2968,14 +2939,14 @@ const ja = [
|
|
|
2968
2939
|
}
|
|
2969
2940
|
],
|
|
2970
2941
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
2971
|
-
],
|
|
2942
|
+
], Yt = Z("eye", wa);
|
|
2972
2943
|
/**
|
|
2973
2944
|
* @license lucide-react v0.544.0 - ISC
|
|
2974
2945
|
*
|
|
2975
2946
|
* This source code is licensed under the ISC license.
|
|
2976
2947
|
* See the LICENSE file in the root directory of this source tree.
|
|
2977
2948
|
*/
|
|
2978
|
-
const
|
|
2949
|
+
const ja = [
|
|
2979
2950
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
2980
2951
|
[
|
|
2981
2952
|
"path",
|
|
@@ -2984,25 +2955,25 @@ const va = [
|
|
|
2984
2955
|
key: "r6nss1"
|
|
2985
2956
|
}
|
|
2986
2957
|
]
|
|
2987
|
-
],
|
|
2958
|
+
], va = Z("house", ja);
|
|
2988
2959
|
/**
|
|
2989
2960
|
* @license lucide-react v0.544.0 - ISC
|
|
2990
2961
|
*
|
|
2991
2962
|
* This source code is licensed under the ISC license.
|
|
2992
2963
|
* See the LICENSE file in the root directory of this source tree.
|
|
2993
2964
|
*/
|
|
2994
|
-
const
|
|
2965
|
+
const Na = [
|
|
2995
2966
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
2996
2967
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
2997
2968
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
2998
|
-
], ss = Z("image",
|
|
2969
|
+
], ss = Z("image", Na);
|
|
2999
2970
|
/**
|
|
3000
2971
|
* @license lucide-react v0.544.0 - ISC
|
|
3001
2972
|
*
|
|
3002
2973
|
* This source code is licensed under the ISC license.
|
|
3003
2974
|
* See the LICENSE file in the root directory of this source tree.
|
|
3004
2975
|
*/
|
|
3005
|
-
const
|
|
2976
|
+
const Ea = [
|
|
3006
2977
|
[
|
|
3007
2978
|
"path",
|
|
3008
2979
|
{
|
|
@@ -3011,43 +2982,43 @@ const $a = [
|
|
|
3011
2982
|
}
|
|
3012
2983
|
],
|
|
3013
2984
|
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
3014
|
-
], ns = Z("key-round",
|
|
2985
|
+
], ns = Z("key-round", Ea);
|
|
3015
2986
|
/**
|
|
3016
2987
|
* @license lucide-react v0.544.0 - ISC
|
|
3017
2988
|
*
|
|
3018
2989
|
* This source code is licensed under the ISC license.
|
|
3019
2990
|
* See the LICENSE file in the root directory of this source tree.
|
|
3020
2991
|
*/
|
|
3021
|
-
const
|
|
2992
|
+
const $a = [
|
|
3022
2993
|
["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" }],
|
|
3023
2994
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
3024
2995
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
3025
|
-
],
|
|
2996
|
+
], Kt = Z("key", $a);
|
|
3026
2997
|
/**
|
|
3027
2998
|
* @license lucide-react v0.544.0 - ISC
|
|
3028
2999
|
*
|
|
3029
3000
|
* This source code is licensed under the ISC license.
|
|
3030
3001
|
* See the LICENSE file in the root directory of this source tree.
|
|
3031
3002
|
*/
|
|
3032
|
-
const
|
|
3003
|
+
const ka = [
|
|
3033
3004
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
3034
3005
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
3035
3006
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
3036
|
-
],
|
|
3007
|
+
], Sa = Z("link-2", ka);
|
|
3037
3008
|
/**
|
|
3038
3009
|
* @license lucide-react v0.544.0 - ISC
|
|
3039
3010
|
*
|
|
3040
3011
|
* This source code is licensed under the ISC license.
|
|
3041
3012
|
* See the LICENSE file in the root directory of this source tree.
|
|
3042
3013
|
*/
|
|
3043
|
-
const
|
|
3014
|
+
const Pa = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ye = Z("loader-circle", Pa);
|
|
3044
3015
|
/**
|
|
3045
3016
|
* @license lucide-react v0.544.0 - ISC
|
|
3046
3017
|
*
|
|
3047
3018
|
* This source code is licensed under the ISC license.
|
|
3048
3019
|
* See the LICENSE file in the root directory of this source tree.
|
|
3049
3020
|
*/
|
|
3050
|
-
const
|
|
3021
|
+
const Ca = [
|
|
3051
3022
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
3052
3023
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
3053
3024
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -3056,38 +3027,38 @@ const Ta = [
|
|
|
3056
3027
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
3057
3028
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
3058
3029
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
3059
|
-
], as = Z("loader",
|
|
3030
|
+
], as = Z("loader", Ca);
|
|
3060
3031
|
/**
|
|
3061
3032
|
* @license lucide-react v0.544.0 - ISC
|
|
3062
3033
|
*
|
|
3063
3034
|
* This source code is licensed under the ISC license.
|
|
3064
3035
|
* See the LICENSE file in the root directory of this source tree.
|
|
3065
3036
|
*/
|
|
3066
|
-
const
|
|
3037
|
+
const Ta = [
|
|
3067
3038
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
3068
3039
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
3069
|
-
], Be = Z("lock",
|
|
3040
|
+
], Be = Z("lock", Ta);
|
|
3070
3041
|
/**
|
|
3071
3042
|
* @license lucide-react v0.544.0 - ISC
|
|
3072
3043
|
*
|
|
3073
3044
|
* This source code is licensed under the ISC license.
|
|
3074
3045
|
* See the LICENSE file in the root directory of this source tree.
|
|
3075
3046
|
*/
|
|
3076
|
-
const
|
|
3047
|
+
const Ra = [
|
|
3077
3048
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
3078
3049
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
3079
3050
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
3080
|
-
], Xt = Z("log-out",
|
|
3051
|
+
], Xt = Z("log-out", Ra);
|
|
3081
3052
|
/**
|
|
3082
3053
|
* @license lucide-react v0.544.0 - ISC
|
|
3083
3054
|
*
|
|
3084
3055
|
* This source code is licensed under the ISC license.
|
|
3085
3056
|
* See the LICENSE file in the root directory of this source tree.
|
|
3086
3057
|
*/
|
|
3087
|
-
const
|
|
3058
|
+
const Aa = [
|
|
3088
3059
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
3089
3060
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
3090
|
-
], De = Z("mail",
|
|
3061
|
+
], De = Z("mail", Aa);
|
|
3091
3062
|
/**
|
|
3092
3063
|
* @license lucide-react v0.544.0 - ISC
|
|
3093
3064
|
*
|
|
@@ -3103,14 +3074,14 @@ const Oa = [
|
|
|
3103
3074
|
}
|
|
3104
3075
|
],
|
|
3105
3076
|
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
3106
|
-
],
|
|
3077
|
+
], _a = Z("map-pin", Oa);
|
|
3107
3078
|
/**
|
|
3108
3079
|
* @license lucide-react v0.544.0 - ISC
|
|
3109
3080
|
*
|
|
3110
3081
|
* This source code is licensed under the ISC license.
|
|
3111
3082
|
* See the LICENSE file in the root directory of this source tree.
|
|
3112
3083
|
*/
|
|
3113
|
-
const
|
|
3084
|
+
const Ua = [
|
|
3114
3085
|
["path", { d: "M13 21h8", key: "1jsn5i" }],
|
|
3115
3086
|
[
|
|
3116
3087
|
"path",
|
|
@@ -3119,14 +3090,14 @@ const za = [
|
|
|
3119
3090
|
key: "1a8usu"
|
|
3120
3091
|
}
|
|
3121
3092
|
]
|
|
3122
|
-
],
|
|
3093
|
+
], za = Z("pen-line", Ua);
|
|
3123
3094
|
/**
|
|
3124
3095
|
* @license lucide-react v0.544.0 - ISC
|
|
3125
3096
|
*
|
|
3126
3097
|
* This source code is licensed under the ISC license.
|
|
3127
3098
|
* See the LICENSE file in the root directory of this source tree.
|
|
3128
3099
|
*/
|
|
3129
|
-
const
|
|
3100
|
+
const Ia = [
|
|
3130
3101
|
[
|
|
3131
3102
|
"path",
|
|
3132
3103
|
{
|
|
@@ -3134,14 +3105,14 @@ const La = [
|
|
|
3134
3105
|
key: "9njp5v"
|
|
3135
3106
|
}
|
|
3136
3107
|
]
|
|
3137
|
-
],
|
|
3108
|
+
], La = Z("phone", Ia);
|
|
3138
3109
|
/**
|
|
3139
3110
|
* @license lucide-react v0.544.0 - ISC
|
|
3140
3111
|
*
|
|
3141
3112
|
* This source code is licensed under the ISC license.
|
|
3142
3113
|
* See the LICENSE file in the root directory of this source tree.
|
|
3143
3114
|
*/
|
|
3144
|
-
const
|
|
3115
|
+
const qa = [
|
|
3145
3116
|
[
|
|
3146
3117
|
"path",
|
|
3147
3118
|
{
|
|
@@ -3151,14 +3122,14 @@ const Fa = [
|
|
|
3151
3122
|
],
|
|
3152
3123
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
3153
3124
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
3154
|
-
],
|
|
3125
|
+
], Fa = Z("save", qa);
|
|
3155
3126
|
/**
|
|
3156
3127
|
* @license lucide-react v0.544.0 - ISC
|
|
3157
3128
|
*
|
|
3158
3129
|
* This source code is licensed under the ISC license.
|
|
3159
3130
|
* See the LICENSE file in the root directory of this source tree.
|
|
3160
3131
|
*/
|
|
3161
|
-
const
|
|
3132
|
+
const Da = [
|
|
3162
3133
|
[
|
|
3163
3134
|
"path",
|
|
3164
3135
|
{
|
|
@@ -3167,14 +3138,14 @@ const Va = [
|
|
|
3167
3138
|
}
|
|
3168
3139
|
],
|
|
3169
3140
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
3170
|
-
], Gt = Z("send",
|
|
3141
|
+
], Gt = Z("send", Da);
|
|
3171
3142
|
/**
|
|
3172
3143
|
* @license lucide-react v0.544.0 - ISC
|
|
3173
3144
|
*
|
|
3174
3145
|
* This source code is licensed under the ISC license.
|
|
3175
3146
|
* See the LICENSE file in the root directory of this source tree.
|
|
3176
3147
|
*/
|
|
3177
|
-
const
|
|
3148
|
+
const Va = [
|
|
3178
3149
|
[
|
|
3179
3150
|
"path",
|
|
3180
3151
|
{
|
|
@@ -3182,27 +3153,27 @@ const Ma = [
|
|
|
3182
3153
|
key: "oel41y"
|
|
3183
3154
|
}
|
|
3184
3155
|
]
|
|
3185
|
-
], Mt = Z("shield",
|
|
3156
|
+
], Mt = Z("shield", Va);
|
|
3186
3157
|
/**
|
|
3187
3158
|
* @license lucide-react v0.544.0 - ISC
|
|
3188
3159
|
*
|
|
3189
3160
|
* This source code is licensed under the ISC license.
|
|
3190
3161
|
* See the LICENSE file in the root directory of this source tree.
|
|
3191
3162
|
*/
|
|
3192
|
-
const
|
|
3163
|
+
const Ma = [
|
|
3193
3164
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
3194
3165
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
3195
3166
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
3196
3167
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
3197
3168
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
3198
|
-
],
|
|
3169
|
+
], bt = Z("trash-2", Ma);
|
|
3199
3170
|
/**
|
|
3200
3171
|
* @license lucide-react v0.544.0 - ISC
|
|
3201
3172
|
*
|
|
3202
3173
|
* This source code is licensed under the ISC license.
|
|
3203
3174
|
* See the LICENSE file in the root directory of this source tree.
|
|
3204
3175
|
*/
|
|
3205
|
-
const
|
|
3176
|
+
const Ba = [
|
|
3206
3177
|
[
|
|
3207
3178
|
"path",
|
|
3208
3179
|
{
|
|
@@ -3212,29 +3183,29 @@ const Ha = [
|
|
|
3212
3183
|
],
|
|
3213
3184
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
3214
3185
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
3215
|
-
], Tr = Z("triangle-alert",
|
|
3186
|
+
], Tr = Z("triangle-alert", Ba);
|
|
3216
3187
|
/**
|
|
3217
3188
|
* @license lucide-react v0.544.0 - ISC
|
|
3218
3189
|
*
|
|
3219
3190
|
* This source code is licensed under the ISC license.
|
|
3220
3191
|
* See the LICENSE file in the root directory of this source tree.
|
|
3221
3192
|
*/
|
|
3222
|
-
const
|
|
3193
|
+
const Ha = [
|
|
3223
3194
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
3224
3195
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
3225
3196
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
3226
3197
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
3227
|
-
],
|
|
3198
|
+
], Wa = Z("user-x", Ha);
|
|
3228
3199
|
/**
|
|
3229
3200
|
* @license lucide-react v0.544.0 - ISC
|
|
3230
3201
|
*
|
|
3231
3202
|
* This source code is licensed under the ISC license.
|
|
3232
3203
|
* See the LICENSE file in the root directory of this source tree.
|
|
3233
3204
|
*/
|
|
3234
|
-
const
|
|
3205
|
+
const Ja = [
|
|
3235
3206
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
3236
3207
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
3237
|
-
], He = Z("user",
|
|
3208
|
+
], He = Z("user", Ja);
|
|
3238
3209
|
/**
|
|
3239
3210
|
* @license lucide-react v0.544.0 - ISC
|
|
3240
3211
|
*
|
|
@@ -3244,7 +3215,7 @@ const Ka = [
|
|
|
3244
3215
|
const Ya = [
|
|
3245
3216
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3246
3217
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3247
|
-
], nt = Z("x", Ya), os = js(null),
|
|
3218
|
+
], nt = Z("x", Ya), os = js(null), jo = ({
|
|
3248
3219
|
authix: t,
|
|
3249
3220
|
children: e
|
|
3250
3221
|
}) => /* @__PURE__ */ n.jsx(os.Provider, { value: t, children: e }), Ve = () => {
|
|
@@ -3252,7 +3223,7 @@ const Ya = [
|
|
|
3252
3223
|
if (!t)
|
|
3253
3224
|
throw new Error("useAuthix must be used inside <AuthixProvider />");
|
|
3254
3225
|
return t;
|
|
3255
|
-
},
|
|
3226
|
+
}, vo = ({
|
|
3256
3227
|
logoUrl: t,
|
|
3257
3228
|
logoLinkUrl: e,
|
|
3258
3229
|
title: r = "Create Your Account",
|
|
@@ -3264,7 +3235,7 @@ const Ya = [
|
|
|
3264
3235
|
roles: f = [],
|
|
3265
3236
|
showRoleSelector: u = !1,
|
|
3266
3237
|
loginUrl: p,
|
|
3267
|
-
onSuccess:
|
|
3238
|
+
onSuccess: g,
|
|
3268
3239
|
onError: w
|
|
3269
3240
|
// (custom styling props removed)
|
|
3270
3241
|
}) => {
|
|
@@ -3274,7 +3245,7 @@ const Ya = [
|
|
|
3274
3245
|
password: "",
|
|
3275
3246
|
role: f.length ? f[0] : "user",
|
|
3276
3247
|
...l && { avatarUrl: "" }
|
|
3277
|
-
}, [x, y] = E(m), [C, M] = E(!1), [S, F] = E(!1), [q,
|
|
3248
|
+
}, [x, y] = E(m), [C, M] = E(!1), [S, F] = E(!1), [q, K] = E(null), [U, B] = E({}), [H, se] = E(!1), Q = i ? "text-white" : "text-gray-900", J = i ? "text-gray-400" : "text-gray-600", X = i ? "bg-white/5" : "bg-black/[0.02]", W = i ? "border-white/10" : "border-black/10", v = "border-red-500", $ = i ? "bg-black" : "bg-white";
|
|
3278
3249
|
Qe.useEffect(() => {
|
|
3279
3250
|
if (typeof window < "u") {
|
|
3280
3251
|
const h = () => se(window.innerWidth < 768);
|
|
@@ -3282,36 +3253,36 @@ const Ya = [
|
|
|
3282
3253
|
}
|
|
3283
3254
|
}, []);
|
|
3284
3255
|
const A = (h) => {
|
|
3285
|
-
const { name:
|
|
3286
|
-
y((V) => ({ ...V, [
|
|
3287
|
-
},
|
|
3256
|
+
const { name: b, value: N } = h.target;
|
|
3257
|
+
y((V) => ({ ...V, [b]: N })), U[b] && B((V) => ({ ...V, [b]: void 0 }));
|
|
3258
|
+
}, O = () => {
|
|
3288
3259
|
const h = {};
|
|
3289
3260
|
return x.name.trim() || (h.name = "Name is required"), x.email.trim() ? /\S+@\S+\.\S+/.test(x.email) || (h.email = "Invalid email address") : h.email = "Email is required", x.password ? x.password.length < 6 && (h.password = "Password must be at least 6 characters") : h.password = "Password is required", B(h), Object.keys(h).length === 0;
|
|
3290
3261
|
}, D = async (h) => {
|
|
3291
|
-
if (h.preventDefault(), !!
|
|
3292
|
-
F(!0),
|
|
3262
|
+
if (h.preventDefault(), !!O()) {
|
|
3263
|
+
F(!0), K(null);
|
|
3293
3264
|
try {
|
|
3294
|
-
const
|
|
3265
|
+
const b = {
|
|
3295
3266
|
name: x.name,
|
|
3296
3267
|
email: x.email,
|
|
3297
3268
|
password: x.password,
|
|
3298
3269
|
role: x.role,
|
|
3299
3270
|
...x.avatarUrl ? { avatarUrl: x.avatarUrl } : {}
|
|
3300
|
-
}, N = await P.signupUser(
|
|
3301
|
-
N.success ? (
|
|
3271
|
+
}, N = await P.signupUser(b);
|
|
3272
|
+
N.success ? (K({
|
|
3302
3273
|
type: "success",
|
|
3303
3274
|
text: N.message || "Account created successfully!"
|
|
3304
|
-
}),
|
|
3305
|
-
} catch (
|
|
3306
|
-
|
|
3275
|
+
}), g?.(N.user)) : (K({ type: "error", text: N.message || "Signup failed" }), w?.(N));
|
|
3276
|
+
} catch (b) {
|
|
3277
|
+
K({
|
|
3307
3278
|
type: "error",
|
|
3308
|
-
text:
|
|
3309
|
-
}), w?.(
|
|
3279
|
+
text: b.message || "Signup failed. Please try again."
|
|
3280
|
+
}), w?.(b);
|
|
3310
3281
|
} finally {
|
|
3311
3282
|
F(!1);
|
|
3312
3283
|
}
|
|
3313
3284
|
}
|
|
3314
|
-
},
|
|
3285
|
+
}, Y = {
|
|
3315
3286
|
width: "100%",
|
|
3316
3287
|
padding: H ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3317
3288
|
outline: "none",
|
|
@@ -3350,8 +3321,8 @@ const Ya = [
|
|
|
3350
3321
|
className: "w-[60px] h-[60px] rounded-full object-cover border-2",
|
|
3351
3322
|
style: { borderColor: `${a}30` },
|
|
3352
3323
|
onError: (h) => {
|
|
3353
|
-
const
|
|
3354
|
-
|
|
3324
|
+
const b = h.target;
|
|
3325
|
+
b.style.display = "none";
|
|
3355
3326
|
}
|
|
3356
3327
|
}
|
|
3357
3328
|
) }),
|
|
@@ -3429,7 +3400,7 @@ const Ya = [
|
|
|
3429
3400
|
value: x.name,
|
|
3430
3401
|
onChange: A,
|
|
3431
3402
|
className: `${X} ${Q} ${H ? "py-[10px] pl-[44px] pr-[14px]" : "py-[10px] pl-[44px] pr-[16px]"} border rounded-[10px] text-[13px] transition-all duration-200 ease-in-out ${U.name ? v : W}`,
|
|
3432
|
-
style:
|
|
3403
|
+
style: Y
|
|
3433
3404
|
}
|
|
3434
3405
|
)
|
|
3435
3406
|
] }),
|
|
@@ -3458,7 +3429,7 @@ const Ya = [
|
|
|
3458
3429
|
value: x.email,
|
|
3459
3430
|
onChange: A,
|
|
3460
3431
|
className: `${X} ${Q} ${H ? "py-[10px] pl-[44px] pr-[14px]" : "py-[10px] pl-[44px] pr-[16px]"} border rounded-[10px] text-[13px] transition-all duration-200 ease-in-out ${U.email ? v : W}`,
|
|
3461
|
-
style:
|
|
3432
|
+
style: Y
|
|
3462
3433
|
}
|
|
3463
3434
|
)
|
|
3464
3435
|
] }),
|
|
@@ -3494,7 +3465,7 @@ const Ya = [
|
|
|
3494
3465
|
value: x.password,
|
|
3495
3466
|
onChange: A,
|
|
3496
3467
|
className: `${X} ${Q} ${H ? "py-[10px] pl-[44px] pr-[14px]" : "py-[10px] pl-[44px] pr-[16px]"} border rounded-[10px] text-[13px] transition-all duration-200 ease-in-out ${U.password ? v : W}`,
|
|
3497
|
-
style:
|
|
3468
|
+
style: Y
|
|
3498
3469
|
}
|
|
3499
3470
|
),
|
|
3500
3471
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3506,7 +3477,7 @@ const Ya = [
|
|
|
3506
3477
|
style: {
|
|
3507
3478
|
color: i ? "#a1a1aa" : "#6b7280"
|
|
3508
3479
|
},
|
|
3509
|
-
children: C ? /* @__PURE__ */ n.jsx(Jt, { size: 20 }) : /* @__PURE__ */ n.jsx(
|
|
3480
|
+
children: C ? /* @__PURE__ */ n.jsx(Jt, { size: 20 }) : /* @__PURE__ */ n.jsx(Yt, { size: 20 })
|
|
3510
3481
|
}
|
|
3511
3482
|
)
|
|
3512
3483
|
] }),
|
|
@@ -3542,7 +3513,7 @@ const Ya = [
|
|
|
3542
3513
|
value: x.avatarUrl || "",
|
|
3543
3514
|
onChange: A,
|
|
3544
3515
|
className: `${X} ${Q} ${H ? "py-[10px] pl-[44px] pr-[14px]" : "py-[10px] pl-[44px] pr-[16px]"} border ${W} rounded-[10px] text-[13px] transition-all duration-200 ease-in-out`,
|
|
3545
|
-
style:
|
|
3516
|
+
style: Y
|
|
3546
3517
|
}
|
|
3547
3518
|
)
|
|
3548
3519
|
] })
|
|
@@ -3588,7 +3559,7 @@ const Ya = [
|
|
|
3588
3559
|
]
|
|
3589
3560
|
}
|
|
3590
3561
|
) });
|
|
3591
|
-
},
|
|
3562
|
+
}, No = ({
|
|
3592
3563
|
logoUrl: t,
|
|
3593
3564
|
logoLinkUrl: e,
|
|
3594
3565
|
title: r = "Sign In to Your Account",
|
|
@@ -3600,7 +3571,7 @@ const Ya = [
|
|
|
3600
3571
|
onError: f
|
|
3601
3572
|
// Tailwind customization props removed
|
|
3602
3573
|
}) => {
|
|
3603
|
-
const u = Ve(), [p,
|
|
3574
|
+
const u = Ve(), [p, g] = E("login"), [w, P] = E(1), [m, x] = E(!1), [y, C] = E(!1), [M, S] = E(null), [F, q] = E(""), [K, U] = E(""), [B, H] = E({
|
|
3604
3575
|
email: "",
|
|
3605
3576
|
otp: "",
|
|
3606
3577
|
newPassword: ""
|
|
@@ -3611,42 +3582,42 @@ const Ya = [
|
|
|
3611
3582
|
return h(), window.addEventListener("resize", h), () => window.removeEventListener("resize", h);
|
|
3612
3583
|
}
|
|
3613
3584
|
}, []);
|
|
3614
|
-
const
|
|
3585
|
+
const O = async (h) => {
|
|
3615
3586
|
h.preventDefault(), C(!0), S(null);
|
|
3616
3587
|
try {
|
|
3617
|
-
const
|
|
3588
|
+
const b = await u.loginUser({ email: F, password: K }), { user: N } = b;
|
|
3618
3589
|
if (!N)
|
|
3619
|
-
throw new Error(
|
|
3590
|
+
throw new Error(b.message || "Login failed");
|
|
3620
3591
|
if (typeof document < "u") {
|
|
3621
3592
|
const V = "a_s_b", ce = "true", T = /* @__PURE__ */ new Date();
|
|
3622
3593
|
T.setTime(T.getTime() + 1440 * 60 * 1e3), document.cookie = `${V}=${ce}; path=/; expires=${T.toUTCString()}; SameSite=Lax`;
|
|
3623
3594
|
}
|
|
3624
3595
|
S({ type: "success", text: `Welcome ${N.name}` }), l?.(N);
|
|
3625
|
-
} catch (
|
|
3626
|
-
const N =
|
|
3627
|
-
S({ type: "error", text: N }), f?.(
|
|
3596
|
+
} catch (b) {
|
|
3597
|
+
const N = b.message || "Login failed";
|
|
3598
|
+
S({ type: "error", text: N }), f?.(b);
|
|
3628
3599
|
} finally {
|
|
3629
3600
|
C(!1);
|
|
3630
3601
|
}
|
|
3631
3602
|
}, D = (h) => {
|
|
3632
3603
|
H({ ...B, [h.target.name]: h.target.value });
|
|
3633
|
-
},
|
|
3604
|
+
}, Y = async (h) => {
|
|
3634
3605
|
h.preventDefault(), C(!0), S(null);
|
|
3635
3606
|
try {
|
|
3636
|
-
const
|
|
3607
|
+
const b = await u.requestResetUserPasswordOTP({
|
|
3637
3608
|
email: B.email
|
|
3638
3609
|
});
|
|
3639
|
-
|
|
3610
|
+
b.success ? (P(2), S({
|
|
3640
3611
|
type: "success",
|
|
3641
|
-
text:
|
|
3612
|
+
text: b.message || "OTP sent to your email"
|
|
3642
3613
|
})) : S({
|
|
3643
3614
|
type: "error",
|
|
3644
|
-
text:
|
|
3615
|
+
text: b.message || "Failed to send OTP"
|
|
3645
3616
|
});
|
|
3646
|
-
} catch (
|
|
3617
|
+
} catch (b) {
|
|
3647
3618
|
S({
|
|
3648
3619
|
type: "error",
|
|
3649
|
-
text:
|
|
3620
|
+
text: b.message || "Something went wrong"
|
|
3650
3621
|
});
|
|
3651
3622
|
} finally {
|
|
3652
3623
|
C(!1);
|
|
@@ -3654,19 +3625,19 @@ const Ya = [
|
|
|
3654
3625
|
}, d = async (h) => {
|
|
3655
3626
|
h.preventDefault(), C(!0), S(null);
|
|
3656
3627
|
try {
|
|
3657
|
-
const
|
|
3628
|
+
const b = await u.resetUserPassword({
|
|
3658
3629
|
email: B.email,
|
|
3659
3630
|
otp: B.otp,
|
|
3660
3631
|
newPassword: B.newPassword
|
|
3661
3632
|
});
|
|
3662
|
-
|
|
3633
|
+
b.success ? (S({
|
|
3663
3634
|
type: "success",
|
|
3664
|
-
text:
|
|
3665
|
-
}), P(1), H({ email: "", otp: "", newPassword: "" }),
|
|
3666
|
-
} catch (
|
|
3635
|
+
text: b.message || "Password reset successfully!"
|
|
3636
|
+
}), P(1), H({ email: "", otp: "", newPassword: "" }), g("login")) : S({ type: "error", text: b.message || "Reset failed" });
|
|
3637
|
+
} catch (b) {
|
|
3667
3638
|
S({
|
|
3668
3639
|
type: "error",
|
|
3669
|
-
text:
|
|
3640
|
+
text: b.message || "Something went wrong"
|
|
3670
3641
|
});
|
|
3671
3642
|
} finally {
|
|
3672
3643
|
C(!1);
|
|
@@ -3693,7 +3664,7 @@ const Ya = [
|
|
|
3693
3664
|
]
|
|
3694
3665
|
}
|
|
3695
3666
|
),
|
|
3696
|
-
p === "login" && /* @__PURE__ */ n.jsxs("form", { onSubmit:
|
|
3667
|
+
p === "login" && /* @__PURE__ */ n.jsxs("form", { onSubmit: O, className: "flex flex-col gap-4", children: [
|
|
3697
3668
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-[2px]", children: [
|
|
3698
3669
|
/* @__PURE__ */ n.jsx(
|
|
3699
3670
|
"label",
|
|
@@ -3748,7 +3719,7 @@ const Ya = [
|
|
|
3748
3719
|
{
|
|
3749
3720
|
id: "login-password",
|
|
3750
3721
|
type: m ? "text" : "password",
|
|
3751
|
-
value:
|
|
3722
|
+
value: K,
|
|
3752
3723
|
onChange: (h) => U(h.target.value),
|
|
3753
3724
|
placeholder: "Enter your password",
|
|
3754
3725
|
className: `w-full text-[13px] rounded-[10px] border outline-none transition
|
|
@@ -3764,7 +3735,7 @@ const Ya = [
|
|
|
3764
3735
|
type: "button",
|
|
3765
3736
|
onClick: () => x(!m),
|
|
3766
3737
|
className: `absolute right-3 top-1/2 -translate-y-1/2 ${o ? "text-zinc-500" : "text-zinc-400"}`,
|
|
3767
|
-
children: m ? /* @__PURE__ */ n.jsx(Jt, { size: 18 }) : /* @__PURE__ */ n.jsx(
|
|
3738
|
+
children: m ? /* @__PURE__ */ n.jsx(Jt, { size: 18 }) : /* @__PURE__ */ n.jsx(Yt, { size: 18 })
|
|
3768
3739
|
}
|
|
3769
3740
|
)
|
|
3770
3741
|
] })
|
|
@@ -3783,7 +3754,7 @@ const Ya = [
|
|
|
3783
3754
|
"button",
|
|
3784
3755
|
{
|
|
3785
3756
|
type: "button",
|
|
3786
|
-
onClick: () =>
|
|
3757
|
+
onClick: () => g("forgot"),
|
|
3787
3758
|
className: "font-medium",
|
|
3788
3759
|
style: { color: a },
|
|
3789
3760
|
children: "Forgot password?"
|
|
@@ -3807,7 +3778,7 @@ const Ya = [
|
|
|
3807
3778
|
p === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
3808
3779
|
"form",
|
|
3809
3780
|
{
|
|
3810
|
-
onSubmit: w === 1 ?
|
|
3781
|
+
onSubmit: w === 1 ? Y : d,
|
|
3811
3782
|
className: "flex flex-col gap-4",
|
|
3812
3783
|
children: [
|
|
3813
3784
|
w === 1 && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -3887,10 +3858,10 @@ const Ya = [
|
|
|
3887
3858
|
"button",
|
|
3888
3859
|
{
|
|
3889
3860
|
type: "button",
|
|
3890
|
-
onClick: () =>
|
|
3861
|
+
onClick: () => g("login"),
|
|
3891
3862
|
className: "flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-200 transition",
|
|
3892
3863
|
children: [
|
|
3893
|
-
/* @__PURE__ */ n.jsx(
|
|
3864
|
+
/* @__PURE__ */ n.jsx(la, { size: 14 }),
|
|
3894
3865
|
"Back to login"
|
|
3895
3866
|
]
|
|
3896
3867
|
}
|
|
@@ -3910,7 +3881,7 @@ const Ya = [
|
|
|
3910
3881
|
]
|
|
3911
3882
|
}
|
|
3912
3883
|
) });
|
|
3913
|
-
},
|
|
3884
|
+
}, Eo = ({
|
|
3914
3885
|
children: t,
|
|
3915
3886
|
fallback: e = null
|
|
3916
3887
|
}) => {
|
|
@@ -3923,7 +3894,7 @@ const Ya = [
|
|
|
3923
3894
|
}, []);
|
|
3924
3895
|
const a = (o) => typeof o == "function" ? o() : o;
|
|
3925
3896
|
return r === "loading" ? null : r === "unauthenticated" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: a(e) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t });
|
|
3926
|
-
},
|
|
3897
|
+
}, $o = ({
|
|
3927
3898
|
children: t,
|
|
3928
3899
|
fallback: e = null
|
|
3929
3900
|
}) => {
|
|
@@ -3936,7 +3907,7 @@ const Ya = [
|
|
|
3936
3907
|
}, []);
|
|
3937
3908
|
const a = (o) => typeof o == "function" ? o() : o;
|
|
3938
3909
|
return r === "loading" ? null : r === "authenticated" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: a(e) }) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t });
|
|
3939
|
-
},
|
|
3910
|
+
}, Ka = ({
|
|
3940
3911
|
isOpen: t,
|
|
3941
3912
|
onClose: e,
|
|
3942
3913
|
onSuccess: r,
|
|
@@ -3948,7 +3919,7 @@ const Ya = [
|
|
|
3948
3919
|
modalClassName: f,
|
|
3949
3920
|
modalStyle: u,
|
|
3950
3921
|
headerClassName: p,
|
|
3951
|
-
headerStyle:
|
|
3922
|
+
headerStyle: g,
|
|
3952
3923
|
iconContainerClassName: w,
|
|
3953
3924
|
iconContainerStyle: P,
|
|
3954
3925
|
titleClassName: m,
|
|
@@ -3959,7 +3930,7 @@ const Ya = [
|
|
|
3959
3930
|
closeButtonStyle: S,
|
|
3960
3931
|
warningContainerClassName: F,
|
|
3961
3932
|
warningContainerStyle: q,
|
|
3962
|
-
warningIconClassName:
|
|
3933
|
+
warningIconClassName: K,
|
|
3963
3934
|
warningIconStyle: U,
|
|
3964
3935
|
warningContentClassName: B,
|
|
3965
3936
|
warningContentStyle: H,
|
|
@@ -3971,12 +3942,12 @@ const Ya = [
|
|
|
3971
3942
|
confirmationInputStyle: v,
|
|
3972
3943
|
confirmationSuccessClassName: $,
|
|
3973
3944
|
confirmationSuccessStyle: A,
|
|
3974
|
-
processingContainerClassName:
|
|
3945
|
+
processingContainerClassName: O,
|
|
3975
3946
|
processingContainerStyle: D,
|
|
3976
|
-
processingStepClassName:
|
|
3947
|
+
processingStepClassName: Y,
|
|
3977
3948
|
processingStepStyle: d,
|
|
3978
3949
|
processingInfoClassName: h,
|
|
3979
|
-
processingInfoStyle:
|
|
3950
|
+
processingInfoStyle: b,
|
|
3980
3951
|
successContainerClassName: N,
|
|
3981
3952
|
successContainerStyle: V,
|
|
3982
3953
|
successContentClassName: ce,
|
|
@@ -3986,15 +3957,15 @@ const Ya = [
|
|
|
3986
3957
|
successRedirectClassName: I,
|
|
3987
3958
|
successRedirectStyle: ee,
|
|
3988
3959
|
actionsClassName: de,
|
|
3989
|
-
actionsStyle:
|
|
3960
|
+
actionsStyle: ge,
|
|
3990
3961
|
cancelButtonClassName: ve,
|
|
3991
3962
|
cancelButtonStyle: Se,
|
|
3992
3963
|
dangerButtonClassName: te,
|
|
3993
|
-
dangerButtonStyle:
|
|
3964
|
+
dangerButtonStyle: be,
|
|
3994
3965
|
confirmButtonClassName: Pe,
|
|
3995
3966
|
confirmButtonStyle: Ue
|
|
3996
3967
|
}) => {
|
|
3997
|
-
const k = Ve(), [ne, Ce] = E(!1), [pe, at] = E(""), [
|
|
3968
|
+
const k = Ve(), [ne, Ce] = E(!1), [pe, at] = E(""), [Ke, Te] = E("warning"), [Re, ot] = E(!1);
|
|
3998
3969
|
if (me(() => {
|
|
3999
3970
|
if (typeof window > "u") return;
|
|
4000
3971
|
const G = () => {
|
|
@@ -4017,12 +3988,12 @@ const Ya = [
|
|
|
4017
3988
|
Ce(!1);
|
|
4018
3989
|
}
|
|
4019
3990
|
}, Ae = pe.toLowerCase() === "delete my account", kt = (G) => {
|
|
4020
|
-
G.target === G.currentTarget &&
|
|
3991
|
+
G.target === G.currentTarget && Ke !== "processing" && Ke !== "success" && e();
|
|
4021
3992
|
}, St = () => {
|
|
4022
|
-
switch (
|
|
3993
|
+
switch (Ke) {
|
|
4023
3994
|
case "warning":
|
|
4024
3995
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4025
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center justify-between mb-6 gap-4 ${p || ""}`, style:
|
|
3996
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center justify-between mb-6 gap-4 ${p || ""}`, style: g, children: [
|
|
4026
3997
|
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 flex-1 ${w || ""}`, style: P, children: [
|
|
4027
3998
|
/* @__PURE__ */ n.jsx(
|
|
4028
3999
|
"div",
|
|
@@ -4033,7 +4004,7 @@ const Ya = [
|
|
|
4033
4004
|
color: "white",
|
|
4034
4005
|
...P
|
|
4035
4006
|
},
|
|
4036
|
-
children: /* @__PURE__ */ n.jsx(
|
|
4007
|
+
children: /* @__PURE__ */ n.jsx(bt, { size: 20 })
|
|
4037
4008
|
}
|
|
4038
4009
|
),
|
|
4039
4010
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
|
@@ -4069,7 +4040,7 @@ const Ya = [
|
|
|
4069
4040
|
/* @__PURE__ */ n.jsx(
|
|
4070
4041
|
"div",
|
|
4071
4042
|
{
|
|
4072
|
-
className: `flex-shrink-0 flex items-start ${
|
|
4043
|
+
className: `flex-shrink-0 flex items-start ${K || ""}`,
|
|
4073
4044
|
style: { color: o.error, ...U },
|
|
4074
4045
|
children: /* @__PURE__ */ n.jsx(Tr, { size: 24 })
|
|
4075
4046
|
}
|
|
@@ -4085,11 +4056,11 @@ const Ya = [
|
|
|
4085
4056
|
),
|
|
4086
4057
|
/* @__PURE__ */ n.jsx("div", { className: `flex flex-col gap-2.5 ${B || ""}`, style: H, children: [
|
|
4087
4058
|
{
|
|
4088
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4059
|
+
icon: /* @__PURE__ */ n.jsx(xa, { size: 16 }),
|
|
4089
4060
|
text: "All your data will be permanently deleted"
|
|
4090
4061
|
},
|
|
4091
4062
|
{
|
|
4092
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4063
|
+
icon: /* @__PURE__ */ n.jsx(Wa, { size: 16 }),
|
|
4093
4064
|
text: "This action cannot be reversed"
|
|
4094
4065
|
},
|
|
4095
4066
|
{
|
|
@@ -4105,7 +4076,7 @@ const Ya = [
|
|
|
4105
4076
|
...Q
|
|
4106
4077
|
},
|
|
4107
4078
|
children: [
|
|
4108
|
-
/* @__PURE__ */ n.jsx("div", { className: `flex-shrink-0 ${
|
|
4079
|
+
/* @__PURE__ */ n.jsx("div", { className: `flex-shrink-0 ${K || ""}`, style: { color: o.error, ...U }, children: G.icon }),
|
|
4109
4080
|
/* @__PURE__ */ n.jsx("span", { children: G.text })
|
|
4110
4081
|
]
|
|
4111
4082
|
},
|
|
@@ -4119,7 +4090,7 @@ const Ya = [
|
|
|
4119
4090
|
"div",
|
|
4120
4091
|
{
|
|
4121
4092
|
className: `flex gap-3 ${Re ? "flex-col-reverse" : "flex-row"} justify-end items-stretch ${de || ""}`,
|
|
4122
|
-
style:
|
|
4093
|
+
style: ge,
|
|
4123
4094
|
children: [
|
|
4124
4095
|
/* @__PURE__ */ n.jsx(
|
|
4125
4096
|
"button",
|
|
@@ -4143,10 +4114,10 @@ const Ya = [
|
|
|
4143
4114
|
background: "linear-gradient(135deg, #ef4444, #dc2626)",
|
|
4144
4115
|
color: "white",
|
|
4145
4116
|
boxShadow: "0 4px 12px rgba(239, 68, 68, 0.4)",
|
|
4146
|
-
...
|
|
4117
|
+
...be
|
|
4147
4118
|
},
|
|
4148
4119
|
children: [
|
|
4149
|
-
/* @__PURE__ */ n.jsx(
|
|
4120
|
+
/* @__PURE__ */ n.jsx(bt, { size: 16 }),
|
|
4150
4121
|
"Continue to Delete"
|
|
4151
4122
|
]
|
|
4152
4123
|
}
|
|
@@ -4157,7 +4128,7 @@ const Ya = [
|
|
|
4157
4128
|
] });
|
|
4158
4129
|
case "confirmation":
|
|
4159
4130
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4160
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style:
|
|
4131
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style: g, children: [
|
|
4161
4132
|
/* @__PURE__ */ n.jsx(
|
|
4162
4133
|
"div",
|
|
4163
4134
|
{
|
|
@@ -4170,7 +4141,7 @@ const Ya = [
|
|
|
4170
4141
|
children: /* @__PURE__ */ n.jsx(Tr, { size: 24 })
|
|
4171
4142
|
}
|
|
4172
4143
|
),
|
|
4173
|
-
/* @__PURE__ */ n.jsx("div", { className: `flex-1 ${p || ""}`, style:
|
|
4144
|
+
/* @__PURE__ */ n.jsx("div", { className: `flex-1 ${p || ""}`, style: g, children: /* @__PURE__ */ n.jsx(
|
|
4174
4145
|
"h3",
|
|
4175
4146
|
{
|
|
4176
4147
|
className: `m-0 text-xl font-bold leading-tight ${m || ""}`,
|
|
@@ -4236,7 +4207,7 @@ const Ya = [
|
|
|
4236
4207
|
"div",
|
|
4237
4208
|
{
|
|
4238
4209
|
className: `flex gap-3 flex-col-reverse justify-end items-stretch ${de || ""}`,
|
|
4239
|
-
style:
|
|
4210
|
+
style: ge,
|
|
4240
4211
|
children: [
|
|
4241
4212
|
/* @__PURE__ */ n.jsx(
|
|
4242
4213
|
"button",
|
|
@@ -4267,7 +4238,7 @@ const Ya = [
|
|
|
4267
4238
|
...Ue
|
|
4268
4239
|
},
|
|
4269
4240
|
children: [
|
|
4270
|
-
/* @__PURE__ */ n.jsx(
|
|
4241
|
+
/* @__PURE__ */ n.jsx(bt, { size: 16 }),
|
|
4271
4242
|
"Yes, Delete My Account"
|
|
4272
4243
|
]
|
|
4273
4244
|
}
|
|
@@ -4278,7 +4249,7 @@ const Ya = [
|
|
|
4278
4249
|
] });
|
|
4279
4250
|
case "processing":
|
|
4280
4251
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4281
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style:
|
|
4252
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style: g, children: [
|
|
4282
4253
|
/* @__PURE__ */ n.jsx(
|
|
4283
4254
|
"div",
|
|
4284
4255
|
{
|
|
@@ -4291,7 +4262,7 @@ const Ya = [
|
|
|
4291
4262
|
children: /* @__PURE__ */ n.jsx(ye, { size: 20, className: "animate-spin" })
|
|
4292
4263
|
}
|
|
4293
4264
|
),
|
|
4294
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex-1 ${p || ""}`, style:
|
|
4265
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex-1 ${p || ""}`, style: g, children: [
|
|
4295
4266
|
/* @__PURE__ */ n.jsx(
|
|
4296
4267
|
"h3",
|
|
4297
4268
|
{
|
|
@@ -4310,14 +4281,14 @@ const Ya = [
|
|
|
4310
4281
|
)
|
|
4311
4282
|
] })
|
|
4312
4283
|
] }),
|
|
4313
|
-
/* @__PURE__ */ n.jsx("div", { className: `mb-5 ${
|
|
4284
|
+
/* @__PURE__ */ n.jsx("div", { className: `mb-5 ${O || ""}`, style: D, children: /* @__PURE__ */ n.jsx("div", { className: `flex flex-col gap-3 ${O || ""}`, style: D, children: [
|
|
4314
4285
|
{ text: "Removing your data", active: !0 },
|
|
4315
4286
|
{ text: "Closing active sessions", active: !1 },
|
|
4316
4287
|
{ text: "Finalizing deletion", active: !1 }
|
|
4317
4288
|
].map((G, Me) => /* @__PURE__ */ n.jsxs(
|
|
4318
4289
|
"div",
|
|
4319
4290
|
{
|
|
4320
|
-
className: `flex items-center gap-3 p-3 rounded-lg transition-all ${
|
|
4291
|
+
className: `flex items-center gap-3 p-3 rounded-lg transition-all ${Y || ""}`,
|
|
4321
4292
|
style: {
|
|
4322
4293
|
backgroundColor: G.active ? `${o.accent}10` : "transparent",
|
|
4323
4294
|
...d
|
|
@@ -4326,7 +4297,7 @@ const Ya = [
|
|
|
4326
4297
|
/* @__PURE__ */ n.jsx(
|
|
4327
4298
|
"div",
|
|
4328
4299
|
{
|
|
4329
|
-
className: `w-2 h-2 rounded-full transition-all ${
|
|
4300
|
+
className: `w-2 h-2 rounded-full transition-all ${Y || ""}`,
|
|
4330
4301
|
style: {
|
|
4331
4302
|
backgroundColor: G.active ? o.accent : o.textTertiary,
|
|
4332
4303
|
boxShadow: G.active ? `0 0 0 4px ${o.accent}20` : "none",
|
|
@@ -4337,7 +4308,7 @@ const Ya = [
|
|
|
4337
4308
|
/* @__PURE__ */ n.jsx(
|
|
4338
4309
|
"span",
|
|
4339
4310
|
{
|
|
4340
|
-
className: `text-sm ${
|
|
4311
|
+
className: `text-sm ${Y || ""}`,
|
|
4341
4312
|
style: {
|
|
4342
4313
|
color: G.active ? o.textPrimary : o.textSecondary,
|
|
4343
4314
|
fontWeight: G.active ? 500 : 400,
|
|
@@ -4357,7 +4328,7 @@ const Ya = [
|
|
|
4357
4328
|
style: {
|
|
4358
4329
|
backgroundColor: `${o.accent}10`,
|
|
4359
4330
|
color: o.textSecondary,
|
|
4360
|
-
...
|
|
4331
|
+
...b
|
|
4361
4332
|
},
|
|
4362
4333
|
children: [
|
|
4363
4334
|
/* @__PURE__ */ n.jsx(Mt, { size: 18, className: "flex-shrink-0", style: { color: o.accent } }),
|
|
@@ -4368,7 +4339,7 @@ const Ya = [
|
|
|
4368
4339
|
] });
|
|
4369
4340
|
case "success":
|
|
4370
4341
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4371
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style:
|
|
4342
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 mb-6 ${p || ""}`, style: g, children: [
|
|
4372
4343
|
/* @__PURE__ */ n.jsx(
|
|
4373
4344
|
"div",
|
|
4374
4345
|
{
|
|
@@ -4381,7 +4352,7 @@ const Ya = [
|
|
|
4381
4352
|
children: /* @__PURE__ */ n.jsx(Ut, { size: 20 })
|
|
4382
4353
|
}
|
|
4383
4354
|
),
|
|
4384
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex-1 ${p || ""}`, style:
|
|
4355
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex-1 ${p || ""}`, style: g, children: [
|
|
4385
4356
|
/* @__PURE__ */ n.jsx(
|
|
4386
4357
|
"h3",
|
|
4387
4358
|
{
|
|
@@ -4482,7 +4453,7 @@ const Ya = [
|
|
|
4482
4453
|
)
|
|
4483
4454
|
}
|
|
4484
4455
|
);
|
|
4485
|
-
},
|
|
4456
|
+
}, Xa = ({
|
|
4486
4457
|
isOpen: t,
|
|
4487
4458
|
onClose: e,
|
|
4488
4459
|
onUpdate: r,
|
|
@@ -4494,7 +4465,7 @@ const Ya = [
|
|
|
4494
4465
|
headerClassName: f,
|
|
4495
4466
|
headerStyle: u,
|
|
4496
4467
|
iconContainerClassName: p,
|
|
4497
|
-
iconContainerStyle:
|
|
4468
|
+
iconContainerStyle: g,
|
|
4498
4469
|
titleClassName: w,
|
|
4499
4470
|
titleStyle: P,
|
|
4500
4471
|
closeButtonClassName: m,
|
|
@@ -4505,7 +4476,7 @@ const Ya = [
|
|
|
4505
4476
|
labelStyle: S,
|
|
4506
4477
|
inputContainerClassName: F,
|
|
4507
4478
|
inputContainerStyle: q,
|
|
4508
|
-
inputClassName:
|
|
4479
|
+
inputClassName: K,
|
|
4509
4480
|
inputStyle: U,
|
|
4510
4481
|
inputIconClassName: B,
|
|
4511
4482
|
inputIconStyle: H,
|
|
@@ -4517,12 +4488,12 @@ const Ya = [
|
|
|
4517
4488
|
errorValidationStyle: v,
|
|
4518
4489
|
warningValidationClassName: $,
|
|
4519
4490
|
warningValidationStyle: A,
|
|
4520
|
-
previewClassName:
|
|
4491
|
+
previewClassName: O,
|
|
4521
4492
|
previewStyle: D,
|
|
4522
|
-
previewLabelClassName:
|
|
4493
|
+
previewLabelClassName: Y,
|
|
4523
4494
|
previewLabelStyle: d,
|
|
4524
4495
|
previewImageClassName: h,
|
|
4525
|
-
previewImageStyle:
|
|
4496
|
+
previewImageStyle: b,
|
|
4526
4497
|
actionsClassName: N,
|
|
4527
4498
|
actionsStyle: V,
|
|
4528
4499
|
cancelButtonClassName: ce,
|
|
@@ -4530,7 +4501,7 @@ const Ya = [
|
|
|
4530
4501
|
submitButtonClassName: oe,
|
|
4531
4502
|
submitButtonStyle: ie
|
|
4532
4503
|
}) => {
|
|
4533
|
-
const [I, ee] = E(""), [de,
|
|
4504
|
+
const [I, ee] = E(""), [de, ge] = E(!1), [ve, Se] = E(!1), [te, be] = E({ isValid: !1, message: "", type: null });
|
|
4534
4505
|
if (me(() => {
|
|
4535
4506
|
if (typeof window > "u") return;
|
|
4536
4507
|
const k = () => {
|
|
@@ -4539,12 +4510,12 @@ const Ya = [
|
|
|
4539
4510
|
return k(), window.addEventListener("resize", k), () => window.removeEventListener("resize", k);
|
|
4540
4511
|
}, []), me(() => {
|
|
4541
4512
|
if (!I.trim()) {
|
|
4542
|
-
|
|
4513
|
+
be({ isValid: !1, message: "", type: null });
|
|
4543
4514
|
return;
|
|
4544
4515
|
}
|
|
4545
4516
|
try {
|
|
4546
4517
|
const k = new URL(I), ne = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(k.pathname);
|
|
4547
|
-
|
|
4518
|
+
be(ne ? {
|
|
4548
4519
|
isValid: !0,
|
|
4549
4520
|
message: "Valid image URL",
|
|
4550
4521
|
type: "success"
|
|
@@ -4554,7 +4525,7 @@ const Ya = [
|
|
|
4554
4525
|
type: "warning"
|
|
4555
4526
|
});
|
|
4556
4527
|
} catch {
|
|
4557
|
-
|
|
4528
|
+
be({
|
|
4558
4529
|
isValid: !1,
|
|
4559
4530
|
message: "Please enter a valid URL",
|
|
4560
4531
|
type: "error"
|
|
@@ -4563,11 +4534,11 @@ const Ya = [
|
|
|
4563
4534
|
}, [I]), !t) return null;
|
|
4564
4535
|
const Pe = async () => {
|
|
4565
4536
|
if (!(!I || !te.isValid)) {
|
|
4566
|
-
|
|
4537
|
+
ge(!0);
|
|
4567
4538
|
try {
|
|
4568
4539
|
await r(I) && (ee(""), e());
|
|
4569
4540
|
} finally {
|
|
4570
|
-
|
|
4541
|
+
ge(!1);
|
|
4571
4542
|
}
|
|
4572
4543
|
}
|
|
4573
4544
|
}, Ue = (k) => {
|
|
@@ -4594,7 +4565,7 @@ const Ya = [
|
|
|
4594
4565
|
},
|
|
4595
4566
|
children: [
|
|
4596
4567
|
/* @__PURE__ */ n.jsxs("div", { className: `flex items-start justify-between mb-6 gap-4 ${f || ""}`, style: u, children: [
|
|
4597
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 flex-1 ${p || ""}`, style:
|
|
4568
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 flex-1 ${p || ""}`, style: g, children: [
|
|
4598
4569
|
/* @__PURE__ */ n.jsx(
|
|
4599
4570
|
"div",
|
|
4600
4571
|
{
|
|
@@ -4602,7 +4573,7 @@ const Ya = [
|
|
|
4602
4573
|
style: {
|
|
4603
4574
|
background: `linear-gradient(135deg, ${s.accent}20, ${s.accent}40)`,
|
|
4604
4575
|
color: s.accent,
|
|
4605
|
-
...
|
|
4576
|
+
...g
|
|
4606
4577
|
},
|
|
4607
4578
|
children: /* @__PURE__ */ n.jsx(Vt, { size: 22 })
|
|
4608
4579
|
}
|
|
@@ -4636,7 +4607,7 @@ const Ya = [
|
|
|
4636
4607
|
className: `flex items-center gap-1.5 mb-2 text-sm font-medium ${M || ""}`,
|
|
4637
4608
|
style: { color: s.textPrimary, ...S },
|
|
4638
4609
|
children: [
|
|
4639
|
-
/* @__PURE__ */ n.jsx(
|
|
4610
|
+
/* @__PURE__ */ n.jsx(Sa, { size: 16 }),
|
|
4640
4611
|
"Avatar URL"
|
|
4641
4612
|
]
|
|
4642
4613
|
}
|
|
@@ -4650,7 +4621,7 @@ const Ya = [
|
|
|
4650
4621
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
4651
4622
|
value: I,
|
|
4652
4623
|
onChange: (k) => ee(k.target.value),
|
|
4653
|
-
className: `w-full pl-11 pr-4 py-3.5 rounded-xl border text-base outline-none transition-all focus:shadow-[0_0_0_3px_rgba(var(--accent),0.2)] ${
|
|
4624
|
+
className: `w-full pl-11 pr-4 py-3.5 rounded-xl border text-base outline-none transition-all focus:shadow-[0_0_0_3px_rgba(var(--accent),0.2)] ${K || ""}`,
|
|
4654
4625
|
style: {
|
|
4655
4626
|
borderColor: te.type === "error" ? s.error : te.type === "success" ? s.success : s.border,
|
|
4656
4627
|
backgroundColor: "transparent",
|
|
@@ -4698,7 +4669,7 @@ const Ya = [
|
|
|
4698
4669
|
I && te.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
4699
4670
|
"div",
|
|
4700
4671
|
{
|
|
4701
|
-
className: `p-4 rounded-xl text-center ${
|
|
4672
|
+
className: `p-4 rounded-xl text-center ${O || ""}`,
|
|
4702
4673
|
style: {
|
|
4703
4674
|
backgroundColor: `${s.success}10`,
|
|
4704
4675
|
border: `1px solid ${s.success}20`,
|
|
@@ -4708,7 +4679,7 @@ const Ya = [
|
|
|
4708
4679
|
/* @__PURE__ */ n.jsx(
|
|
4709
4680
|
"p",
|
|
4710
4681
|
{
|
|
4711
|
-
className: `text-sm font-medium mb-3 m-0 ${
|
|
4682
|
+
className: `text-sm font-medium mb-3 m-0 ${Y || ""}`,
|
|
4712
4683
|
style: { color: s.textSecondary, ...d },
|
|
4713
4684
|
children: "Preview"
|
|
4714
4685
|
}
|
|
@@ -4721,7 +4692,7 @@ const Ya = [
|
|
|
4721
4692
|
className: `w-20 h-20 rounded-full object-cover border-2 mx-auto ${h || ""}`,
|
|
4722
4693
|
style: {
|
|
4723
4694
|
borderColor: `${s.success}40`,
|
|
4724
|
-
...
|
|
4695
|
+
...b
|
|
4725
4696
|
},
|
|
4726
4697
|
onError: (k) => {
|
|
4727
4698
|
k.currentTarget.style.display = "none";
|
|
@@ -4782,7 +4753,7 @@ const Ya = [
|
|
|
4782
4753
|
)
|
|
4783
4754
|
}
|
|
4784
4755
|
);
|
|
4785
|
-
},
|
|
4756
|
+
}, Ga = ({
|
|
4786
4757
|
isOpen: t,
|
|
4787
4758
|
onClose: e,
|
|
4788
4759
|
onSuccess: r,
|
|
@@ -4794,7 +4765,7 @@ const Ya = [
|
|
|
4794
4765
|
modalClassName: f,
|
|
4795
4766
|
modalStyle: u,
|
|
4796
4767
|
headerClassName: p,
|
|
4797
|
-
headerStyle:
|
|
4768
|
+
headerStyle: g,
|
|
4798
4769
|
iconContainerClassName: w,
|
|
4799
4770
|
iconContainerStyle: P,
|
|
4800
4771
|
titleClassName: m,
|
|
@@ -4805,7 +4776,7 @@ const Ya = [
|
|
|
4805
4776
|
formStyle: S,
|
|
4806
4777
|
formGroupClassName: F,
|
|
4807
4778
|
formGroupStyle: q,
|
|
4808
|
-
labelClassName:
|
|
4779
|
+
labelClassName: K,
|
|
4809
4780
|
labelStyle: U,
|
|
4810
4781
|
inputContainerClassName: B,
|
|
4811
4782
|
inputContainerStyle: H,
|
|
@@ -4817,12 +4788,12 @@ const Ya = [
|
|
|
4817
4788
|
toggleButtonStyle: v,
|
|
4818
4789
|
errorClassName: $,
|
|
4819
4790
|
errorStyle: A,
|
|
4820
|
-
actionsClassName:
|
|
4791
|
+
actionsClassName: O,
|
|
4821
4792
|
actionsStyle: D,
|
|
4822
|
-
cancelButtonClassName:
|
|
4793
|
+
cancelButtonClassName: Y,
|
|
4823
4794
|
cancelButtonStyle: d,
|
|
4824
4795
|
submitButtonClassName: h,
|
|
4825
|
-
submitButtonStyle:
|
|
4796
|
+
submitButtonStyle: b
|
|
4826
4797
|
}) => {
|
|
4827
4798
|
const N = Ve(), [V, ce] = E({
|
|
4828
4799
|
currentPassword: "",
|
|
@@ -4832,7 +4803,7 @@ const Ya = [
|
|
|
4832
4803
|
currentPassword: !1,
|
|
4833
4804
|
newPassword: !1,
|
|
4834
4805
|
confirmPassword: !1
|
|
4835
|
-
}), [
|
|
4806
|
+
}), [ge, ve] = E(!1);
|
|
4836
4807
|
if (Qe.useEffect(() => {
|
|
4837
4808
|
if (typeof window > "u") return;
|
|
4838
4809
|
const k = () => {
|
|
@@ -4845,11 +4816,11 @@ const Ya = [
|
|
|
4845
4816
|
ce((pe) => ({ ...pe, [ne]: Ce })), T[ne] && oe((pe) => ({ ...pe, [ne]: "" }));
|
|
4846
4817
|
}, te = (k) => {
|
|
4847
4818
|
de((ne) => ({ ...ne, [k]: !ne[k] }));
|
|
4848
|
-
},
|
|
4819
|
+
}, be = () => {
|
|
4849
4820
|
const k = {};
|
|
4850
4821
|
return V.currentPassword || (k.currentPassword = "Current password is required"), V.newPassword ? V.newPassword.length < 6 && (k.newPassword = "Password must be at least 6 characters") : k.newPassword = "New password is required", V.newPassword !== V.confirmPassword && (k.confirmPassword = "Passwords do not match"), oe(k), Object.keys(k).length === 0;
|
|
4851
4822
|
}, Pe = async (k) => {
|
|
4852
|
-
if (k.preventDefault(), !!
|
|
4823
|
+
if (k.preventDefault(), !!be()) {
|
|
4853
4824
|
I(!0);
|
|
4854
4825
|
try {
|
|
4855
4826
|
const { data: ne } = await N.changePassword({
|
|
@@ -4872,7 +4843,7 @@ const Ya = [
|
|
|
4872
4843
|
{
|
|
4873
4844
|
field: "currentPassword",
|
|
4874
4845
|
label: "Current Password",
|
|
4875
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
4846
|
+
icon: /* @__PURE__ */ n.jsx(Kt, { size: 18 })
|
|
4876
4847
|
},
|
|
4877
4848
|
{
|
|
4878
4849
|
field: "newPassword",
|
|
@@ -4904,7 +4875,7 @@ const Ya = [
|
|
|
4904
4875
|
...u
|
|
4905
4876
|
},
|
|
4906
4877
|
children: [
|
|
4907
|
-
/* @__PURE__ */ n.jsxs("div", { className: `flex justify-between items-start mb-6 gap-3 ${p || ""}`, style:
|
|
4878
|
+
/* @__PURE__ */ n.jsxs("div", { className: `flex justify-between items-start mb-6 gap-3 ${p || ""}`, style: g, children: [
|
|
4908
4879
|
/* @__PURE__ */ n.jsxs("div", { className: `flex items-center gap-3 flex-1 ${w || ""}`, style: P, children: [
|
|
4909
4880
|
/* @__PURE__ */ n.jsx(
|
|
4910
4881
|
"div",
|
|
@@ -4949,7 +4920,7 @@ const Ya = [
|
|
|
4949
4920
|
"label",
|
|
4950
4921
|
{
|
|
4951
4922
|
htmlFor: k,
|
|
4952
|
-
className: `block mb-2 text-sm font-medium leading-normal ${
|
|
4923
|
+
className: `block mb-2 text-sm font-medium leading-normal ${K || ""}`,
|
|
4953
4924
|
style: { color: o.textPrimary, ...U },
|
|
4954
4925
|
children: ne
|
|
4955
4926
|
}
|
|
@@ -4994,7 +4965,7 @@ const Ya = [
|
|
|
4994
4965
|
onClick: () => te(k),
|
|
4995
4966
|
className: `absolute right-3.5 top-1/2 -translate-y-1/2 bg-transparent border-0 cursor-pointer p-1 rounded w-8 h-8 flex items-center justify-center transition-all hover:bg-white/10 ${W || ""}`,
|
|
4996
4967
|
style: { color: o.textTertiary, ...v },
|
|
4997
|
-
children: ee[k] ? /* @__PURE__ */ n.jsx(Jt, { size: 18 }) : /* @__PURE__ */ n.jsx(
|
|
4968
|
+
children: ee[k] ? /* @__PURE__ */ n.jsx(Jt, { size: 18 }) : /* @__PURE__ */ n.jsx(Yt, { size: 18 })
|
|
4998
4969
|
}
|
|
4999
4970
|
)
|
|
5000
4971
|
] }),
|
|
@@ -5016,7 +4987,7 @@ const Ya = [
|
|
|
5016
4987
|
/* @__PURE__ */ n.jsxs(
|
|
5017
4988
|
"div",
|
|
5018
4989
|
{
|
|
5019
|
-
className: `flex gap-3 ${
|
|
4990
|
+
className: `flex gap-3 ${ge ? "flex-col-reverse" : "flex-row"} justify-end items-stretch ${O || ""}`,
|
|
5020
4991
|
style: D,
|
|
5021
4992
|
children: [
|
|
5022
4993
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5025,7 +4996,7 @@ const Ya = [
|
|
|
5025
4996
|
type: "button",
|
|
5026
4997
|
onClick: e,
|
|
5027
4998
|
disabled: ie,
|
|
5028
|
-
className: `py-3.5 px-6 rounded-xl border bg-transparent text-sm font-medium cursor-pointer transition-all hover:-translate-y-0.5 disabled:opacity-60 disabled:cursor-not-allowed disabled:translate-y-0 ${
|
|
4999
|
+
className: `py-3.5 px-6 rounded-xl border bg-transparent text-sm font-medium cursor-pointer transition-all hover:-translate-y-0.5 disabled:opacity-60 disabled:cursor-not-allowed disabled:translate-y-0 ${ge ? "w-full" : "flex-1 min-w-[120px]"} ${Y || ""}`,
|
|
5029
5000
|
style: {
|
|
5030
5001
|
borderColor: o.border,
|
|
5031
5002
|
color: o.textPrimary,
|
|
@@ -5039,12 +5010,12 @@ const Ya = [
|
|
|
5039
5010
|
{
|
|
5040
5011
|
type: "submit",
|
|
5041
5012
|
disabled: ie,
|
|
5042
|
-
className: `py-3.5 px-6 rounded-xl border-none text-sm font-semibold flex items-center justify-center gap-2 transition-all hover:-translate-y-0.5 disabled:opacity-80 disabled:cursor-not-allowed disabled:translate-y-0 ${
|
|
5013
|
+
className: `py-3.5 px-6 rounded-xl border-none text-sm font-semibold flex items-center justify-center gap-2 transition-all hover:-translate-y-0.5 disabled:opacity-80 disabled:cursor-not-allowed disabled:translate-y-0 ${ge ? "w-full" : "flex-1 min-w-[140px]"} ${h || ""}`,
|
|
5043
5014
|
style: {
|
|
5044
5015
|
background: `linear-gradient(135deg, ${o.accent}, ${o.accent}E6)`,
|
|
5045
5016
|
color: "#fff",
|
|
5046
5017
|
boxShadow: ie ? "none" : `0 4px 12px ${o.accent}40`,
|
|
5047
|
-
...
|
|
5018
|
+
...b
|
|
5048
5019
|
},
|
|
5049
5020
|
children: ie ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5050
5021
|
/* @__PURE__ */ n.jsx(ye, { size: 16, className: "animate-spin" }),
|
|
@@ -5061,7 +5032,7 @@ const Ya = [
|
|
|
5061
5032
|
)
|
|
5062
5033
|
}
|
|
5063
5034
|
);
|
|
5064
|
-
},
|
|
5035
|
+
}, Za = ({
|
|
5065
5036
|
isOpen: t,
|
|
5066
5037
|
onClose: e,
|
|
5067
5038
|
onVerify: r,
|
|
@@ -5073,7 +5044,7 @@ const Ya = [
|
|
|
5073
5044
|
user: f,
|
|
5074
5045
|
colors: u,
|
|
5075
5046
|
darkMode: p,
|
|
5076
|
-
overlayClassName:
|
|
5047
|
+
overlayClassName: g,
|
|
5077
5048
|
overlayStyle: w,
|
|
5078
5049
|
modalClassName: P,
|
|
5079
5050
|
modalStyle: m,
|
|
@@ -5084,7 +5055,7 @@ const Ya = [
|
|
|
5084
5055
|
closeButtonClassName: S,
|
|
5085
5056
|
closeButtonStyle: F,
|
|
5086
5057
|
formClassName: q,
|
|
5087
|
-
formStyle:
|
|
5058
|
+
formStyle: K,
|
|
5088
5059
|
formGroupClassName: U,
|
|
5089
5060
|
formGroupStyle: B,
|
|
5090
5061
|
labelClassName: H,
|
|
@@ -5096,12 +5067,12 @@ const Ya = [
|
|
|
5096
5067
|
emailInputClassName: v,
|
|
5097
5068
|
emailInputStyle: $,
|
|
5098
5069
|
otpInputClassName: A,
|
|
5099
|
-
otpInputStyle:
|
|
5070
|
+
otpInputStyle: O,
|
|
5100
5071
|
actionsClassName: D,
|
|
5101
|
-
actionsStyle:
|
|
5072
|
+
actionsStyle: Y,
|
|
5102
5073
|
buttonClassName: d,
|
|
5103
5074
|
buttonStyle: h,
|
|
5104
|
-
sendButtonClassName:
|
|
5075
|
+
sendButtonClassName: b,
|
|
5105
5076
|
sendButtonStyle: N,
|
|
5106
5077
|
verifyButtonClassName: V,
|
|
5107
5078
|
verifyButtonStyle: ce
|
|
@@ -5113,7 +5084,7 @@ const Ya = [
|
|
|
5113
5084
|
return /* @__PURE__ */ n.jsx(
|
|
5114
5085
|
"div",
|
|
5115
5086
|
{
|
|
5116
|
-
className: `fixed inset-0 flex items-center justify-center z-[100] p-5 ${
|
|
5087
|
+
className: `fixed inset-0 flex items-center justify-center z-[100] p-5 ${g || ""}`,
|
|
5117
5088
|
style: {
|
|
5118
5089
|
backgroundColor: p ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)",
|
|
5119
5090
|
...w
|
|
@@ -5141,7 +5112,7 @@ const Ya = [
|
|
|
5141
5112
|
}
|
|
5142
5113
|
)
|
|
5143
5114
|
] }),
|
|
5144
|
-
/* @__PURE__ */ n.jsxs("form", { className: `flex flex-col gap-5 ${q || ""}`, style:
|
|
5115
|
+
/* @__PURE__ */ n.jsxs("form", { className: `flex flex-col gap-5 ${q || ""}`, style: K, onSubmit: r, children: [
|
|
5145
5116
|
/* @__PURE__ */ n.jsxs("div", { className: `flex flex-col gap-2 ${U || ""}`, style: B, children: [
|
|
5146
5117
|
/* @__PURE__ */ n.jsx("label", { className: `text-sm font-medium ${H || ""}`, style: { color: u.textSecondary, ...se }, children: "Email" }),
|
|
5147
5118
|
/* @__PURE__ */ n.jsxs("div", { className: `relative flex items-center ${Q || ""}`, style: J, children: [
|
|
@@ -5207,7 +5178,7 @@ const Ya = [
|
|
|
5207
5178
|
color: u.textPrimary,
|
|
5208
5179
|
borderColor: u.border,
|
|
5209
5180
|
...W,
|
|
5210
|
-
...
|
|
5181
|
+
...O
|
|
5211
5182
|
},
|
|
5212
5183
|
required: !0,
|
|
5213
5184
|
"aria-required": "true",
|
|
@@ -5216,7 +5187,7 @@ const Ya = [
|
|
|
5216
5187
|
)
|
|
5217
5188
|
] })
|
|
5218
5189
|
] }),
|
|
5219
|
-
/* @__PURE__ */ n.jsx("div", { className: `flex gap-3 ${D || ""}`, style:
|
|
5190
|
+
/* @__PURE__ */ n.jsx("div", { className: `flex gap-3 ${D || ""}`, style: Y, children: i ? /* @__PURE__ */ n.jsxs(
|
|
5220
5191
|
"button",
|
|
5221
5192
|
{
|
|
5222
5193
|
type: "submit",
|
|
@@ -5240,7 +5211,7 @@ const Ya = [
|
|
|
5240
5211
|
type: "button",
|
|
5241
5212
|
onClick: s,
|
|
5242
5213
|
disabled: l,
|
|
5243
|
-
className: `flex-1 flex items-center justify-center gap-2 py-3 px-5 rounded-lg border-none text-white font-medium cursor-pointer transition-all text-sm hover:-translate-y-0.5 hover:shadow-lg disabled:opacity-60 disabled:cursor-not-allowed disabled:translate-y-0 ${d || ""} ${
|
|
5214
|
+
className: `flex-1 flex items-center justify-center gap-2 py-3 px-5 rounded-lg border-none text-white font-medium cursor-pointer transition-all text-sm hover:-translate-y-0.5 hover:shadow-lg disabled:opacity-60 disabled:cursor-not-allowed disabled:translate-y-0 ${d || ""} ${b || ""}`,
|
|
5244
5215
|
style: {
|
|
5245
5216
|
background: `linear-gradient(to right, ${u.accent}, ${u.accentHover})`,
|
|
5246
5217
|
opacity: l ? 0.7 : 1,
|
|
@@ -5260,7 +5231,7 @@ const Ya = [
|
|
|
5260
5231
|
)
|
|
5261
5232
|
}
|
|
5262
5233
|
);
|
|
5263
|
-
},
|
|
5234
|
+
}, ko = ({
|
|
5264
5235
|
darkMode: t = !0,
|
|
5265
5236
|
homeUrl: e,
|
|
5266
5237
|
onLogout: r,
|
|
@@ -5272,7 +5243,7 @@ const Ya = [
|
|
|
5272
5243
|
mainContainerStyle: f,
|
|
5273
5244
|
notificationClassName: u,
|
|
5274
5245
|
notificationStyle: p,
|
|
5275
|
-
successNotificationClassName:
|
|
5246
|
+
successNotificationClassName: g,
|
|
5276
5247
|
successNotificationStyle: w,
|
|
5277
5248
|
errorNotificationClassName: P,
|
|
5278
5249
|
errorNotificationStyle: m,
|
|
@@ -5283,7 +5254,7 @@ const Ya = [
|
|
|
5283
5254
|
leftColumnClassName: S,
|
|
5284
5255
|
leftColumnStyle: F,
|
|
5285
5256
|
avatarSectionClassName: q,
|
|
5286
|
-
avatarSectionStyle:
|
|
5257
|
+
avatarSectionStyle: K,
|
|
5287
5258
|
avatarContainerClassName: U,
|
|
5288
5259
|
avatarContainerStyle: B,
|
|
5289
5260
|
avatarImageClassName: H,
|
|
@@ -5295,12 +5266,12 @@ const Ya = [
|
|
|
5295
5266
|
userUsernameClassName: v,
|
|
5296
5267
|
userUsernameStyle: $,
|
|
5297
5268
|
userEmailClassName: A,
|
|
5298
|
-
userEmailStyle:
|
|
5269
|
+
userEmailStyle: O,
|
|
5299
5270
|
verificationBadgeClassName: D,
|
|
5300
|
-
verificationBadgeStyle:
|
|
5271
|
+
verificationBadgeStyle: Y,
|
|
5301
5272
|
actionsContainerClassName: d,
|
|
5302
5273
|
actionsContainerStyle: h,
|
|
5303
|
-
editButtonClassName:
|
|
5274
|
+
editButtonClassName: b,
|
|
5304
5275
|
editButtonStyle: N,
|
|
5305
5276
|
verifyButtonClassName: V,
|
|
5306
5277
|
verifyButtonStyle: ce,
|
|
@@ -5310,11 +5281,11 @@ const Ya = [
|
|
|
5310
5281
|
dropdownStyle: I,
|
|
5311
5282
|
dropdownItemClassName: ee,
|
|
5312
5283
|
dropdownItemStyle: de,
|
|
5313
|
-
rightColumnClassName:
|
|
5284
|
+
rightColumnClassName: ge,
|
|
5314
5285
|
rightColumnStyle: ve,
|
|
5315
5286
|
personalInfoSectionClassName: Se,
|
|
5316
5287
|
personalInfoSectionStyle: te,
|
|
5317
|
-
sectionTitleClassName:
|
|
5288
|
+
sectionTitleClassName: be,
|
|
5318
5289
|
sectionTitleStyle: Pe,
|
|
5319
5290
|
fieldContainerClassName: Ue,
|
|
5320
5291
|
fieldContainerStyle: k,
|
|
@@ -5322,7 +5293,7 @@ const Ya = [
|
|
|
5322
5293
|
fieldLabelStyle: Ce,
|
|
5323
5294
|
fieldInputClassName: pe,
|
|
5324
5295
|
fieldInputStyle: at,
|
|
5325
|
-
fieldDisplayClassName:
|
|
5296
|
+
fieldDisplayClassName: Ke,
|
|
5326
5297
|
fieldDisplayStyle: Te,
|
|
5327
5298
|
securitySectionClassName: Re,
|
|
5328
5299
|
securitySectionStyle: ot,
|
|
@@ -5333,7 +5304,7 @@ const Ya = [
|
|
|
5333
5304
|
securityInfoClassName: G,
|
|
5334
5305
|
securityInfoStyle: Me
|
|
5335
5306
|
}) => {
|
|
5336
|
-
const ze = Ve(), [
|
|
5307
|
+
const ze = Ve(), [Oe, is] = E(null), [_, Ee] = E(), [ls, Zt] = E(!0), [Qt, Pt] = E(!1), [lt, er] = E(!1), [cs, tr] = E(!1), [ds, rr] = E(!1), [us, sr] = E(!1), [fs, Ct] = E(!1), [ct, nr] = E(!1), [ar, or] = E(!1), [Ie, ir] = E(null), [dt, Qa] = E(!1), [_e, ut] = E({
|
|
5337
5308
|
email: "",
|
|
5338
5309
|
otp: ""
|
|
5339
5310
|
}), [ps, Tt] = E(!1), [ms, ft] = E(!1);
|
|
@@ -5362,19 +5333,19 @@ const Ya = [
|
|
|
5362
5333
|
};
|
|
5363
5334
|
}, [ct]);
|
|
5364
5335
|
const hs = async () => {
|
|
5365
|
-
if (!
|
|
5336
|
+
if (!_e.email || !/\S+@\S+\.\S+/.test(_e.email)) {
|
|
5366
5337
|
le("error", "Please enter a valid email");
|
|
5367
5338
|
return;
|
|
5368
5339
|
}
|
|
5369
|
-
if (!
|
|
5340
|
+
if (!_?.id) {
|
|
5370
5341
|
le("error", "User not found. Cannot send OTP.");
|
|
5371
5342
|
return;
|
|
5372
5343
|
}
|
|
5373
5344
|
try {
|
|
5374
5345
|
ft(!0);
|
|
5375
5346
|
const j = await ze.requestEmailVerificationOTP({
|
|
5376
|
-
userId:
|
|
5377
|
-
email:
|
|
5347
|
+
userId: _.id,
|
|
5348
|
+
email: _e.email
|
|
5378
5349
|
}), z = j?.data?.success ?? j?.success, re = j?.data?.message ?? j?.message;
|
|
5379
5350
|
z ? (le("success", re || "OTP sent to email!"), Tt(!0)) : le("error", re || "Failed to send OTP");
|
|
5380
5351
|
} catch (j) {
|
|
@@ -5384,23 +5355,23 @@ const Ya = [
|
|
|
5384
5355
|
ft(!1);
|
|
5385
5356
|
}
|
|
5386
5357
|
}, xs = async (j) => {
|
|
5387
|
-
if (j.preventDefault(), !
|
|
5358
|
+
if (j.preventDefault(), !_e.email || !_e.otp) {
|
|
5388
5359
|
le("error", "Please fill in all fields");
|
|
5389
5360
|
return;
|
|
5390
5361
|
}
|
|
5391
|
-
if (!
|
|
5362
|
+
if (!_) {
|
|
5392
5363
|
le("error", "User not found");
|
|
5393
5364
|
return;
|
|
5394
5365
|
}
|
|
5395
5366
|
try {
|
|
5396
5367
|
ft(!0);
|
|
5397
5368
|
const z = await ze.verifyEmail({
|
|
5398
|
-
email:
|
|
5399
|
-
otp:
|
|
5369
|
+
email: _e.email,
|
|
5370
|
+
otp: _e.otp
|
|
5400
5371
|
}), re = z?.data?.success ?? z?.success, ue = z?.data?.message ?? z?.message;
|
|
5401
5372
|
if (re) {
|
|
5402
5373
|
le("success", ue || "Email verified!");
|
|
5403
|
-
const $e = { ...
|
|
5374
|
+
const $e = { ..._, isVerified: !0 };
|
|
5404
5375
|
Ee($e), typeof s == "function" && s($e), ut({ email: $e.email, otp: "" }), Tt(!1), Ct?.(!1);
|
|
5405
5376
|
} else
|
|
5406
5377
|
le("error", ue || "Verification failed");
|
|
@@ -5411,15 +5382,15 @@ const Ya = [
|
|
|
5411
5382
|
ft(!1);
|
|
5412
5383
|
}
|
|
5413
5384
|
}, ys = async (j) => {
|
|
5414
|
-
if (!
|
|
5385
|
+
if (!_) return !1;
|
|
5415
5386
|
try {
|
|
5416
5387
|
const z = await ze.updateUser({
|
|
5417
|
-
userId:
|
|
5388
|
+
userId: _.id,
|
|
5418
5389
|
avatarUrl: j
|
|
5419
5390
|
});
|
|
5420
5391
|
if (z?.success) {
|
|
5421
5392
|
const re = {
|
|
5422
|
-
...
|
|
5393
|
+
..._,
|
|
5423
5394
|
// 🔒 keep existing auth fields
|
|
5424
5395
|
...z.user,
|
|
5425
5396
|
// 🔁 merge backend response if present
|
|
@@ -5431,21 +5402,21 @@ const Ya = [
|
|
|
5431
5402
|
} catch (z) {
|
|
5432
5403
|
return console.error("Avatar update error:", z), le("error", "Failed to update avatar"), !1;
|
|
5433
5404
|
}
|
|
5434
|
-
},
|
|
5435
|
-
if (
|
|
5405
|
+
}, gs = async () => {
|
|
5406
|
+
if (_) {
|
|
5436
5407
|
er(!0);
|
|
5437
5408
|
try {
|
|
5438
|
-
const j =
|
|
5439
|
-
userId:
|
|
5440
|
-
...
|
|
5409
|
+
const j = _.email, z = await ze.updateUser({
|
|
5410
|
+
userId: _.id,
|
|
5411
|
+
..._
|
|
5441
5412
|
});
|
|
5442
5413
|
if (z.success && z.user) {
|
|
5443
5414
|
const re = z.user.email !== j, ue = {
|
|
5444
|
-
...
|
|
5415
|
+
..._,
|
|
5445
5416
|
// keep old state
|
|
5446
5417
|
...z.user,
|
|
5447
5418
|
// overwrite updated fields
|
|
5448
|
-
isVerified: re ? !1 :
|
|
5419
|
+
isVerified: re ? !1 : _.isVerified
|
|
5449
5420
|
};
|
|
5450
5421
|
Ee(ue), localStorage.setItem("userInfo", JSON.stringify(ue)), le(
|
|
5451
5422
|
"success",
|
|
@@ -5459,7 +5430,7 @@ const Ya = [
|
|
|
5459
5430
|
er(!1);
|
|
5460
5431
|
}
|
|
5461
5432
|
}
|
|
5462
|
-
},
|
|
5433
|
+
}, bs = async (j) => {
|
|
5463
5434
|
try {
|
|
5464
5435
|
const z = await ze.checkIfUserExists(j);
|
|
5465
5436
|
z?.success === !0 && z?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), Ee(null));
|
|
@@ -5476,7 +5447,7 @@ const Ya = [
|
|
|
5476
5447
|
const re = z.user.id, ue = await ze.getUserProfile({ userId: re });
|
|
5477
5448
|
if (ue.user) {
|
|
5478
5449
|
const $e = ue.user;
|
|
5479
|
-
Ee($e),
|
|
5450
|
+
Ee($e), bs(re);
|
|
5480
5451
|
} else
|
|
5481
5452
|
Ee(null), localStorage.removeItem("userInfo");
|
|
5482
5453
|
} else
|
|
@@ -5488,8 +5459,8 @@ const Ya = [
|
|
|
5488
5459
|
}
|
|
5489
5460
|
})();
|
|
5490
5461
|
}, []), me(() => {
|
|
5491
|
-
|
|
5492
|
-
}, [
|
|
5462
|
+
_?.email && ut((j) => ({ ...j, email: _.email }));
|
|
5463
|
+
}, [_?.email]);
|
|
5493
5464
|
const lr = (j, z) => {
|
|
5494
5465
|
let re = parseInt(j.replace("#", ""), 16), ue = (re >> 16) + z, $e = (re >> 8 & 255) + z, Rt = (re & 255) + z;
|
|
5495
5466
|
return ue = Math.min(255, Math.max(0, ue)), $e = Math.min(255, Math.max(0, $e)), Rt = Math.min(255, Math.max(0, Rt)), `#${(Rt | $e << 8 | ue << 16).toString(16).padStart(6, "0")}`;
|
|
@@ -5546,7 +5517,7 @@ const Ya = [
|
|
|
5546
5517
|
] })
|
|
5547
5518
|
}
|
|
5548
5519
|
);
|
|
5549
|
-
if (!
|
|
5520
|
+
if (!_)
|
|
5550
5521
|
return /* @__PURE__ */ n.jsx(
|
|
5551
5522
|
"div",
|
|
5552
5523
|
{
|
|
@@ -5565,7 +5536,7 @@ const Ya = [
|
|
|
5565
5536
|
const ws = [
|
|
5566
5537
|
{
|
|
5567
5538
|
label: "Username",
|
|
5568
|
-
value:
|
|
5539
|
+
value: _.username || "Not set",
|
|
5569
5540
|
name: "username",
|
|
5570
5541
|
type: "text",
|
|
5571
5542
|
icon: He,
|
|
@@ -5573,21 +5544,21 @@ const Ya = [
|
|
|
5573
5544
|
},
|
|
5574
5545
|
{
|
|
5575
5546
|
label: "Full Name",
|
|
5576
|
-
value:
|
|
5547
|
+
value: _.name,
|
|
5577
5548
|
name: "name",
|
|
5578
5549
|
type: "text",
|
|
5579
5550
|
icon: He
|
|
5580
5551
|
},
|
|
5581
5552
|
{
|
|
5582
5553
|
label: "Email Address",
|
|
5583
|
-
value:
|
|
5554
|
+
value: _.email,
|
|
5584
5555
|
name: "email",
|
|
5585
5556
|
type: "email",
|
|
5586
5557
|
icon: De
|
|
5587
5558
|
},
|
|
5588
5559
|
{
|
|
5589
5560
|
label: "Role",
|
|
5590
|
-
value:
|
|
5561
|
+
value: _.role || "user",
|
|
5591
5562
|
name: "role",
|
|
5592
5563
|
type: "text",
|
|
5593
5564
|
icon: Mt,
|
|
@@ -5595,17 +5566,17 @@ const Ya = [
|
|
|
5595
5566
|
},
|
|
5596
5567
|
{
|
|
5597
5568
|
label: "Phone Number",
|
|
5598
|
-
value:
|
|
5569
|
+
value: _.phone || "Not set",
|
|
5599
5570
|
name: "phone",
|
|
5600
5571
|
type: "tel",
|
|
5601
|
-
icon:
|
|
5572
|
+
icon: La
|
|
5602
5573
|
},
|
|
5603
5574
|
{
|
|
5604
5575
|
label: "Address",
|
|
5605
|
-
value:
|
|
5576
|
+
value: _.address || "Not provided",
|
|
5606
5577
|
name: "address",
|
|
5607
5578
|
type: "text",
|
|
5608
|
-
icon:
|
|
5579
|
+
icon: _a
|
|
5609
5580
|
}
|
|
5610
5581
|
];
|
|
5611
5582
|
return /* @__PURE__ */ n.jsxs(
|
|
@@ -5623,7 +5594,7 @@ const Ya = [
|
|
|
5623
5594
|
Ie && /* @__PURE__ */ n.jsxs(
|
|
5624
5595
|
"div",
|
|
5625
5596
|
{
|
|
5626
|
-
className: `fixed top-5 right-5 px-6 py-3 rounded-xl text-sm font-medium border shadow-lg backdrop-blur-sm z-[1000] animate-in slide-in-from-right duration-300 flex items-center gap-2 max-w-[400px] ${Ie.type === "success" ?
|
|
5597
|
+
className: `fixed top-5 right-5 px-6 py-3 rounded-xl text-sm font-medium border shadow-lg backdrop-blur-sm z-[1000] animate-in slide-in-from-right duration-300 flex items-center gap-2 max-w-[400px] ${Ie.type === "success" ? g || "" : P || ""} ${u || ""}`,
|
|
5627
5598
|
style: {
|
|
5628
5599
|
...Ie.type === "success" ? {
|
|
5629
5600
|
backgroundColor: t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
@@ -5654,7 +5625,7 @@ const Ya = [
|
|
|
5654
5625
|
children: /* @__PURE__ */ n.jsxs(
|
|
5655
5626
|
"div",
|
|
5656
5627
|
{
|
|
5657
|
-
className: `grid gap-6 grid-cols-1 ${
|
|
5628
|
+
className: `grid gap-6 grid-cols-1 ${Oe && window.innerWidth >= 1024 ? "grid-cols-[1fr_2fr] gap-[10px]" : ""} ${Oe && window.innerWidth >= 768 && window.innerWidth < 1024 ? "gap-[10px]" : ""} ${Oe && window.innerWidth >= 600 && window.innerWidth < 768 ? "gap-[28px]" : ""}`,
|
|
5658
5629
|
children: [
|
|
5659
5630
|
/* @__PURE__ */ n.jsxs("div", { className: `flex flex-col gap-1.5 h-full ${S || ""}`, style: F, children: [
|
|
5660
5631
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -5664,7 +5635,7 @@ const Ya = [
|
|
|
5664
5635
|
style: {
|
|
5665
5636
|
backgroundColor: R.surface,
|
|
5666
5637
|
borderColor: R.border,
|
|
5667
|
-
...
|
|
5638
|
+
...K
|
|
5668
5639
|
},
|
|
5669
5640
|
children: [
|
|
5670
5641
|
e && /* @__PURE__ */ n.jsx(
|
|
@@ -5675,7 +5646,7 @@ const Ya = [
|
|
|
5675
5646
|
rel: "noopener noreferrer",
|
|
5676
5647
|
className: "absolute top-[18px] left-[18px]",
|
|
5677
5648
|
children: /* @__PURE__ */ n.jsx(
|
|
5678
|
-
|
|
5649
|
+
va,
|
|
5679
5650
|
{
|
|
5680
5651
|
size: 20,
|
|
5681
5652
|
style: {
|
|
@@ -5689,10 +5660,10 @@ const Ya = [
|
|
|
5689
5660
|
/* @__PURE__ */ n.jsx(
|
|
5690
5661
|
"img",
|
|
5691
5662
|
{
|
|
5692
|
-
src:
|
|
5693
|
-
|
|
5663
|
+
src: _.avatarUrl || `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(
|
|
5664
|
+
_.name
|
|
5694
5665
|
)}`,
|
|
5695
|
-
alt: `Profile avatar of ${
|
|
5666
|
+
alt: `Profile avatar of ${_.name}`,
|
|
5696
5667
|
className: `w-32 h-32 rounded-full object-cover shadow-lg border-3 ${H || ""}`,
|
|
5697
5668
|
style: {
|
|
5698
5669
|
borderColor: R.border,
|
|
@@ -5723,17 +5694,17 @@ const Ya = [
|
|
|
5723
5694
|
{
|
|
5724
5695
|
className: `text-2xl font-semibold mb-1 m-0 ${X || ""}`,
|
|
5725
5696
|
style: { color: R.textPrimary, ...W },
|
|
5726
|
-
children:
|
|
5697
|
+
children: _.name
|
|
5727
5698
|
}
|
|
5728
5699
|
),
|
|
5729
|
-
|
|
5700
|
+
_.username && /* @__PURE__ */ n.jsxs(
|
|
5730
5701
|
"h2",
|
|
5731
5702
|
{
|
|
5732
5703
|
className: `text-lg font-semibold mb-1 m-0 ${v || ""}`,
|
|
5733
5704
|
style: { color: R.textTertiary, ...$ },
|
|
5734
5705
|
children: [
|
|
5735
5706
|
"@",
|
|
5736
|
-
|
|
5707
|
+
_.username || "Not set"
|
|
5737
5708
|
]
|
|
5738
5709
|
}
|
|
5739
5710
|
),
|
|
@@ -5741,8 +5712,8 @@ const Ya = [
|
|
|
5741
5712
|
"p",
|
|
5742
5713
|
{
|
|
5743
5714
|
className: `m-0 mb-2 ${A || ""}`,
|
|
5744
|
-
style: { color: R.textTertiary, ...
|
|
5745
|
-
children:
|
|
5715
|
+
style: { color: R.textTertiary, ...O },
|
|
5716
|
+
children: _.email
|
|
5746
5717
|
}
|
|
5747
5718
|
),
|
|
5748
5719
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -5750,16 +5721,16 @@ const Ya = [
|
|
|
5750
5721
|
{
|
|
5751
5722
|
className: `inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium mt-2 ${D || ""}`,
|
|
5752
5723
|
style: {
|
|
5753
|
-
backgroundColor:
|
|
5754
|
-
color:
|
|
5755
|
-
borderColor:
|
|
5724
|
+
backgroundColor: _.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)",
|
|
5725
|
+
color: _.isVerified ? R.success : R.warning,
|
|
5726
|
+
borderColor: _.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)",
|
|
5756
5727
|
borderWidth: "1px",
|
|
5757
5728
|
borderStyle: "solid",
|
|
5758
|
-
...
|
|
5729
|
+
...Y
|
|
5759
5730
|
},
|
|
5760
5731
|
children: [
|
|
5761
|
-
|
|
5762
|
-
|
|
5732
|
+
_.isVerified ? /* @__PURE__ */ n.jsx(ke, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(we, { size: 16, "aria-hidden": "true" }),
|
|
5733
|
+
_.isVerified ? "Email Verified" : "Not Verified"
|
|
5763
5734
|
]
|
|
5764
5735
|
}
|
|
5765
5736
|
)
|
|
@@ -5771,7 +5742,7 @@ const Ya = [
|
|
|
5771
5742
|
"button",
|
|
5772
5743
|
{
|
|
5773
5744
|
onClick: () => Pt(!1),
|
|
5774
|
-
className: `bg-transparent border text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded ${
|
|
5745
|
+
className: `bg-transparent border text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded ${Oe && window.innerWidth < 1024 ? "flex-1" : "auto"} ${b || ""}`,
|
|
5775
5746
|
style: {
|
|
5776
5747
|
backgroundColor: R.surfaceLight,
|
|
5777
5748
|
borderColor: R.border,
|
|
@@ -5787,9 +5758,9 @@ const Ya = [
|
|
|
5787
5758
|
/* @__PURE__ */ n.jsxs(
|
|
5788
5759
|
"button",
|
|
5789
5760
|
{
|
|
5790
|
-
onClick:
|
|
5761
|
+
onClick: gs,
|
|
5791
5762
|
disabled: lt,
|
|
5792
|
-
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded disabled:opacity-70 disabled:cursor-not-allowed ${
|
|
5763
|
+
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded disabled:opacity-70 disabled:cursor-not-allowed ${Oe && window.innerWidth < 1024 ? "flex-1" : "auto"} ${b || ""}`,
|
|
5793
5764
|
style: {
|
|
5794
5765
|
background: `linear-gradient(to right, ${R.accent}, ${R.accentHover})`,
|
|
5795
5766
|
opacity: lt ? 0.7 : 1,
|
|
@@ -5797,7 +5768,7 @@ const Ya = [
|
|
|
5797
5768
|
...N
|
|
5798
5769
|
},
|
|
5799
5770
|
children: [
|
|
5800
|
-
lt ? /* @__PURE__ */ n.jsx(ye, { size: 16, className: "animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
5771
|
+
lt ? /* @__PURE__ */ n.jsx(ye, { size: 16, className: "animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(Fa, { size: 16, "aria-hidden": "true" }),
|
|
5801
5772
|
lt ? "Saving..." : "Save Changes"
|
|
5802
5773
|
]
|
|
5803
5774
|
}
|
|
@@ -5807,24 +5778,24 @@ const Ya = [
|
|
|
5807
5778
|
"button",
|
|
5808
5779
|
{
|
|
5809
5780
|
onClick: () => Pt(!0),
|
|
5810
|
-
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded ${
|
|
5781
|
+
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded ${Oe && window.innerWidth < 1024 ? "flex-1" : "auto"} ${b || ""}`,
|
|
5811
5782
|
style: {
|
|
5812
5783
|
background: `linear-gradient(to right, ${R.accent}, ${R.accentHover})`,
|
|
5813
5784
|
color: "white",
|
|
5814
5785
|
...N
|
|
5815
5786
|
},
|
|
5816
5787
|
children: [
|
|
5817
|
-
/* @__PURE__ */ n.jsx(
|
|
5788
|
+
/* @__PURE__ */ n.jsx(za, { size: 16, "aria-hidden": "true" }),
|
|
5818
5789
|
"Edit Profile"
|
|
5819
5790
|
]
|
|
5820
5791
|
}
|
|
5821
5792
|
),
|
|
5822
|
-
!
|
|
5793
|
+
!_.isVerified && /* @__PURE__ */ n.jsxs(
|
|
5823
5794
|
"button",
|
|
5824
5795
|
{
|
|
5825
5796
|
onClick: () => Ct(!0),
|
|
5826
5797
|
disabled: dt,
|
|
5827
|
-
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded disabled:opacity-70 disabled:cursor-not-allowed ${
|
|
5798
|
+
className: `bg-transparent border-none text-sm font-medium cursor-pointer transition-all flex items-center justify-center gap-2 min-h-9 px-5 rounded disabled:opacity-70 disabled:cursor-not-allowed ${Oe && window.innerWidth < 1024 ? "flex-1" : "auto"} ${V || ""}`,
|
|
5828
5799
|
style: {
|
|
5829
5800
|
background: "linear-gradient(to right, #fbbf24, #f59e0b)",
|
|
5830
5801
|
color: "white",
|
|
@@ -5890,7 +5861,7 @@ const Ya = [
|
|
|
5890
5861
|
onMouseEnter: (j) => j.currentTarget.style.backgroundColor = R.surfaceLight,
|
|
5891
5862
|
onMouseLeave: (j) => j.currentTarget.style.backgroundColor = "transparent",
|
|
5892
5863
|
children: [
|
|
5893
|
-
/* @__PURE__ */ n.jsx(
|
|
5864
|
+
/* @__PURE__ */ n.jsx(Kt, { size: 14, "aria-hidden": "true" }),
|
|
5894
5865
|
"Change Password"
|
|
5895
5866
|
]
|
|
5896
5867
|
}
|
|
@@ -5932,7 +5903,7 @@ const Ya = [
|
|
|
5932
5903
|
},
|
|
5933
5904
|
onMouseLeave: (j) => j.currentTarget.style.backgroundColor = "transparent",
|
|
5934
5905
|
children: [
|
|
5935
|
-
/* @__PURE__ */ n.jsx(
|
|
5906
|
+
/* @__PURE__ */ n.jsx(bt, { size: 14, "aria-hidden": "true" }),
|
|
5936
5907
|
"Delete Account"
|
|
5937
5908
|
]
|
|
5938
5909
|
}
|
|
@@ -5943,7 +5914,7 @@ const Ya = [
|
|
|
5943
5914
|
] })
|
|
5944
5915
|
] }) })
|
|
5945
5916
|
] }),
|
|
5946
|
-
/* @__PURE__ */ n.jsxs("div", { className: `min-w-0 flex flex-col gap-3 ${
|
|
5917
|
+
/* @__PURE__ */ n.jsxs("div", { className: `min-w-0 flex flex-col gap-3 ${ge || ""}`, style: ve, children: [
|
|
5947
5918
|
/* @__PURE__ */ n.jsxs(
|
|
5948
5919
|
"section",
|
|
5949
5920
|
{
|
|
@@ -5957,7 +5928,7 @@ const Ya = [
|
|
|
5957
5928
|
/* @__PURE__ */ n.jsxs(
|
|
5958
5929
|
"h2",
|
|
5959
5930
|
{
|
|
5960
|
-
className: `text-xl font-semibold mb-6 m-0 flex items-center gap-2 ${
|
|
5931
|
+
className: `text-xl font-semibold mb-6 m-0 flex items-center gap-2 ${be || ""}`,
|
|
5961
5932
|
style: { color: R.textSecondary, ...Pe },
|
|
5962
5933
|
children: [
|
|
5963
5934
|
/* @__PURE__ */ n.jsx(He, { size: 20, "aria-hidden": "true" }),
|
|
@@ -5968,7 +5939,7 @@ const Ya = [
|
|
|
5968
5939
|
/* @__PURE__ */ n.jsx(
|
|
5969
5940
|
"div",
|
|
5970
5941
|
{
|
|
5971
|
-
className: `grid gap-5 grid-cols-1 ${
|
|
5942
|
+
className: `grid gap-5 grid-cols-1 ${Oe && window.innerWidth >= 600 ? "grid-cols-2 gap-5" : ""}`,
|
|
5972
5943
|
children: ws.map((j) => {
|
|
5973
5944
|
const z = j.icon;
|
|
5974
5945
|
return /* @__PURE__ */ n.jsxs(
|
|
@@ -5993,7 +5964,7 @@ const Ya = [
|
|
|
5993
5964
|
{
|
|
5994
5965
|
type: j.type,
|
|
5995
5966
|
name: j.name,
|
|
5996
|
-
value:
|
|
5967
|
+
value: _[j.name],
|
|
5997
5968
|
onChange: (re) => Ee(
|
|
5998
5969
|
(ue) => ue && { ...ue, [re.target.name]: re.target.value }
|
|
5999
5970
|
),
|
|
@@ -6011,7 +5982,7 @@ const Ya = [
|
|
|
6011
5982
|
) : /* @__PURE__ */ n.jsx(
|
|
6012
5983
|
"div",
|
|
6013
5984
|
{
|
|
6014
|
-
className: `py-3 px-3 rounded-lg border border-transparent text-xs min-h-11 flex items-center box-border ${
|
|
5985
|
+
className: `py-3 px-3 rounded-lg border border-transparent text-xs min-h-11 flex items-center box-border ${Ke || ""}`,
|
|
6015
5986
|
style: {
|
|
6016
5987
|
color: R.textPrimary,
|
|
6017
5988
|
backgroundColor: t ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)",
|
|
@@ -6043,7 +6014,7 @@ const Ya = [
|
|
|
6043
6014
|
/* @__PURE__ */ n.jsxs(
|
|
6044
6015
|
"h2",
|
|
6045
6016
|
{
|
|
6046
|
-
className: `text-xl font-semibold mb-6 m-0 flex items-center gap-2 ${
|
|
6017
|
+
className: `text-xl font-semibold mb-6 m-0 flex items-center gap-2 ${be || ""}`,
|
|
6047
6018
|
style: { color: R.textSecondary, ...Pe },
|
|
6048
6019
|
children: [
|
|
6049
6020
|
/* @__PURE__ */ n.jsx(Mt, { size: 20, "aria-hidden": "true" }),
|
|
@@ -6077,7 +6048,7 @@ const Ya = [
|
|
|
6077
6048
|
{
|
|
6078
6049
|
className: `px-3 py-1.5 rounded-lg text-xs font-medium flex items-center gap-1.5 ${kt || ""}`,
|
|
6079
6050
|
style: {
|
|
6080
|
-
...
|
|
6051
|
+
..._.isVerified ? {
|
|
6081
6052
|
backgroundColor: t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
|
|
6082
6053
|
color: R.success,
|
|
6083
6054
|
borderColor: t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"
|
|
@@ -6090,7 +6061,7 @@ const Ya = [
|
|
|
6090
6061
|
borderStyle: "solid",
|
|
6091
6062
|
...St
|
|
6092
6063
|
},
|
|
6093
|
-
children:
|
|
6064
|
+
children: _.isVerified ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6094
6065
|
/* @__PURE__ */ n.jsx(ke, { size: 16, "aria-hidden": "true" }),
|
|
6095
6066
|
"Verified"
|
|
6096
6067
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
@@ -6102,7 +6073,7 @@ const Ya = [
|
|
|
6102
6073
|
]
|
|
6103
6074
|
}
|
|
6104
6075
|
),
|
|
6105
|
-
!
|
|
6076
|
+
!_.isVerified && /* @__PURE__ */ n.jsx(
|
|
6106
6077
|
"div",
|
|
6107
6078
|
{
|
|
6108
6079
|
className: `p-3 rounded-lg ${G || ""}`,
|
|
@@ -6134,7 +6105,7 @@ const Ya = [
|
|
|
6134
6105
|
}
|
|
6135
6106
|
),
|
|
6136
6107
|
/* @__PURE__ */ n.jsx(
|
|
6137
|
-
|
|
6108
|
+
Xa,
|
|
6138
6109
|
{
|
|
6139
6110
|
isOpen: cs,
|
|
6140
6111
|
onClose: () => {
|
|
@@ -6145,9 +6116,9 @@ const Ya = [
|
|
|
6145
6116
|
}
|
|
6146
6117
|
),
|
|
6147
6118
|
/* @__PURE__ */ n.jsx(
|
|
6148
|
-
|
|
6119
|
+
Ga,
|
|
6149
6120
|
{
|
|
6150
|
-
userId:
|
|
6121
|
+
userId: _.id,
|
|
6151
6122
|
isOpen: ds,
|
|
6152
6123
|
onClose: () => rr(!1),
|
|
6153
6124
|
onSuccess: (j) => le("success", j),
|
|
@@ -6156,9 +6127,9 @@ const Ya = [
|
|
|
6156
6127
|
}
|
|
6157
6128
|
),
|
|
6158
6129
|
/* @__PURE__ */ n.jsx(
|
|
6159
|
-
|
|
6130
|
+
Ka,
|
|
6160
6131
|
{
|
|
6161
|
-
userId:
|
|
6132
|
+
userId: _.id,
|
|
6162
6133
|
isOpen: us,
|
|
6163
6134
|
onClose: () => sr(!1),
|
|
6164
6135
|
onSuccess: (j) => le("success", j),
|
|
@@ -6167,19 +6138,19 @@ const Ya = [
|
|
|
6167
6138
|
}
|
|
6168
6139
|
),
|
|
6169
6140
|
/* @__PURE__ */ n.jsx(
|
|
6170
|
-
|
|
6141
|
+
Za,
|
|
6171
6142
|
{
|
|
6172
6143
|
isOpen: fs,
|
|
6173
6144
|
onClose: () => {
|
|
6174
|
-
Ct(!1), Tt(!1), ut({ email:
|
|
6145
|
+
Ct(!1), Tt(!1), ut({ email: _?.email || "", otp: "" });
|
|
6175
6146
|
},
|
|
6176
6147
|
onVerify: xs,
|
|
6177
6148
|
onSendOTP: hs,
|
|
6178
|
-
verifyFormData:
|
|
6149
|
+
verifyFormData: _e,
|
|
6179
6150
|
setVerifyFormData: ut,
|
|
6180
6151
|
otpSent: ps,
|
|
6181
6152
|
verifying: ms,
|
|
6182
|
-
user:
|
|
6153
|
+
user: _,
|
|
6183
6154
|
colors: R,
|
|
6184
6155
|
darkMode: t
|
|
6185
6156
|
}
|
|
@@ -6210,7 +6181,7 @@ const Ya = [
|
|
|
6210
6181
|
]
|
|
6211
6182
|
}
|
|
6212
6183
|
);
|
|
6213
|
-
},
|
|
6184
|
+
}, So = ({
|
|
6214
6185
|
darkMode: t = !0,
|
|
6215
6186
|
menuItems: e,
|
|
6216
6187
|
onLogout: r,
|
|
@@ -6223,7 +6194,7 @@ const Ya = [
|
|
|
6223
6194
|
menuItemClassName: u,
|
|
6224
6195
|
logoutButtonClassName: p
|
|
6225
6196
|
}) => {
|
|
6226
|
-
const
|
|
6197
|
+
const g = Ve(), [w, P] = E(!1), [m, x] = E(null), [y, C] = E(!0), [M, S] = E(null), F = cr(null), q = cr(null), [K, U] = E(!1), [B, H] = E(!1), [se, Q] = E({ top: 0, left: 0 }), [J, X] = E("bottom");
|
|
6227
6198
|
me(() => {
|
|
6228
6199
|
if (typeof window > "u") return;
|
|
6229
6200
|
const v = () => {
|
|
@@ -6240,19 +6211,19 @@ const Ya = [
|
|
|
6240
6211
|
v && x(s);
|
|
6241
6212
|
return;
|
|
6242
6213
|
}
|
|
6243
|
-
const A = await
|
|
6214
|
+
const A = await g.checkUserSession();
|
|
6244
6215
|
if (!v) return;
|
|
6245
6216
|
if (!A?.authenticated || !A.user) {
|
|
6246
6217
|
x(null);
|
|
6247
6218
|
return;
|
|
6248
6219
|
}
|
|
6249
|
-
const
|
|
6220
|
+
const O = {
|
|
6250
6221
|
id: A.user.id,
|
|
6251
6222
|
email: A.user.email,
|
|
6252
6223
|
name: A.user.email.split("@")[0]
|
|
6253
6224
|
// fallback until backend sends name
|
|
6254
6225
|
};
|
|
6255
|
-
x(
|
|
6226
|
+
x(O);
|
|
6256
6227
|
} catch (A) {
|
|
6257
6228
|
console.error("User initialization failed:", A), v && (x(null), S(A.message || "Failed to load user"));
|
|
6258
6229
|
} finally {
|
|
@@ -6261,23 +6232,23 @@ const Ya = [
|
|
|
6261
6232
|
})(), () => {
|
|
6262
6233
|
v = !1;
|
|
6263
6234
|
};
|
|
6264
|
-
}, [s,
|
|
6235
|
+
}, [s, g]), me(() => {
|
|
6265
6236
|
if (typeof window > "u") return;
|
|
6266
6237
|
const v = () => {
|
|
6267
6238
|
if (!w || !q.current) return;
|
|
6268
|
-
const $ = q.current.getBoundingClientRect(), A = window.innerWidth,
|
|
6269
|
-
|
|
6270
|
-
const h =
|
|
6239
|
+
const $ = q.current.getBoundingClientRect(), A = window.innerWidth, O = window.innerHeight, D = 280, Y = A - $.right, d = $.left;
|
|
6240
|
+
O - $.bottom;
|
|
6241
|
+
const h = Y >= D || Y > d;
|
|
6271
6242
|
U(h);
|
|
6272
6243
|
};
|
|
6273
6244
|
return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
6274
6245
|
}, [w]), me(() => {
|
|
6275
6246
|
if (typeof window > "u" || typeof document > "u")
|
|
6276
6247
|
return;
|
|
6277
|
-
const v = (
|
|
6278
|
-
F.current && !F.current.contains(
|
|
6279
|
-
}, $ = (
|
|
6280
|
-
|
|
6248
|
+
const v = (O) => {
|
|
6249
|
+
F.current && !F.current.contains(O.target) && !q.current?.contains(O.target) && P(!1);
|
|
6250
|
+
}, $ = (O) => {
|
|
6251
|
+
O.key === "Escape" && P(!1);
|
|
6281
6252
|
}, A = () => {
|
|
6282
6253
|
w && P(!1);
|
|
6283
6254
|
};
|
|
@@ -6287,9 +6258,9 @@ const Ya = [
|
|
|
6287
6258
|
}, [w]), Ns(() => {
|
|
6288
6259
|
if (!w || !q.current) return;
|
|
6289
6260
|
const v = () => {
|
|
6290
|
-
const $ = q.current.getBoundingClientRect(), A = 280,
|
|
6261
|
+
const $ = q.current.getBoundingClientRect(), A = 280, O = 320, D = window.innerHeight - $.bottom, Y = $.top, d = window.innerWidth - $.right, h = D < O && Y > O, b = h ? $.top - O - 8 : $.bottom + 8;
|
|
6291
6262
|
let N = $.right - A;
|
|
6292
|
-
d < A && (N = $.left), N = Math.max(8, Math.min(N, window.innerWidth - A - 8)), X(h ? "top" : "bottom"), Q({ top:
|
|
6263
|
+
d < A && (N = $.left), N = Math.max(8, Math.min(N, window.innerWidth - A - 8)), X(h ? "top" : "bottom"), Q({ top: b, left: N });
|
|
6293
6264
|
};
|
|
6294
6265
|
return v(), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0), () => {
|
|
6295
6266
|
window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
|
|
@@ -6428,11 +6399,11 @@ const Ya = [
|
|
|
6428
6399
|
$
|
|
6429
6400
|
);
|
|
6430
6401
|
const A = `flex items-center gap-2 w-full px-2 py-2 rounded-lg text-xs transition-all
|
|
6431
|
-
${t ? "text-white hover:bg-neutral-800" : "text-gray-900 hover:bg-gray-100"}`,
|
|
6402
|
+
${t ? "text-white hover:bg-neutral-800" : "text-gray-900 hover:bg-gray-100"}`, O = /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6432
6403
|
v.icon && /* @__PURE__ */ n.jsx("span", { className: "text-gray-400 text-[11px]", children: v.icon }),
|
|
6433
6404
|
/* @__PURE__ */ n.jsx("span", { className: "flex-1", children: v.label })
|
|
6434
6405
|
] });
|
|
6435
|
-
return v.href ? /* @__PURE__ */ n.jsx("a", { href: v.href, className: A, children:
|
|
6406
|
+
return v.href ? /* @__PURE__ */ n.jsx("a", { href: v.href, className: A, children: O }, $) : /* @__PURE__ */ n.jsx("button", { onClick: v.onClick, className: A, children: O }, $);
|
|
6436
6407
|
}) }),
|
|
6437
6408
|
/* @__PURE__ */ n.jsx("div", { className: "px-1 pt-1", children: /* @__PURE__ */ n.jsxs(
|
|
6438
6409
|
"button",
|
|
@@ -6457,7 +6428,7 @@ const Ya = [
|
|
|
6457
6428
|
]
|
|
6458
6429
|
}
|
|
6459
6430
|
);
|
|
6460
|
-
},
|
|
6431
|
+
}, Po = ({
|
|
6461
6432
|
user: t,
|
|
6462
6433
|
darkMode: e = !0,
|
|
6463
6434
|
primaryColor: r = "#00C212",
|
|
@@ -6469,7 +6440,7 @@ const Ya = [
|
|
|
6469
6440
|
sendButtonClassName: f,
|
|
6470
6441
|
sendButtonStyle: u,
|
|
6471
6442
|
verifyButtonClassName: p,
|
|
6472
|
-
verifyButtonStyle:
|
|
6443
|
+
verifyButtonStyle: g,
|
|
6473
6444
|
inputClassName: w,
|
|
6474
6445
|
inputStyle: P,
|
|
6475
6446
|
emailInputClassName: m,
|
|
@@ -6480,7 +6451,7 @@ const Ya = [
|
|
|
6480
6451
|
notificationStyle: S,
|
|
6481
6452
|
successNotificationClassName: F,
|
|
6482
6453
|
successNotificationStyle: q,
|
|
6483
|
-
errorNotificationClassName:
|
|
6454
|
+
errorNotificationClassName: K,
|
|
6484
6455
|
errorNotificationStyle: U,
|
|
6485
6456
|
headerClassName: B,
|
|
6486
6457
|
headerStyle: H,
|
|
@@ -6507,17 +6478,17 @@ const Ya = [
|
|
|
6507
6478
|
]
|
|
6508
6479
|
}
|
|
6509
6480
|
);
|
|
6510
|
-
const [A,
|
|
6481
|
+
const [A, O] = E(!1), [D, Y] = E({
|
|
6511
6482
|
email: t?.email || "",
|
|
6512
6483
|
otp: ""
|
|
6513
|
-
}), [d, h] = E(!1), [
|
|
6484
|
+
}), [d, h] = E(!1), [b, N] = E(!1), [V, ce] = E(null);
|
|
6514
6485
|
Qe.useEffect(() => {
|
|
6515
6486
|
if (typeof window < "u") {
|
|
6516
|
-
const I = () =>
|
|
6487
|
+
const I = () => O(window.innerWidth < 768);
|
|
6517
6488
|
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
6518
6489
|
}
|
|
6519
6490
|
}, []), me(() => {
|
|
6520
|
-
t?.email &&
|
|
6491
|
+
t?.email && Y((I) => ({ ...I, email: t.email }));
|
|
6521
6492
|
}, [t?.email]);
|
|
6522
6493
|
const T = (I, ee) => {
|
|
6523
6494
|
ce({ type: I, message: ee }), setTimeout(() => ce(null), 3e3);
|
|
@@ -6561,7 +6532,7 @@ const Ya = [
|
|
|
6561
6532
|
});
|
|
6562
6533
|
if (ee.success) {
|
|
6563
6534
|
const de = { ...t, isVerified: !0 };
|
|
6564
|
-
s?.(de), T("success", ee.message || "Email verified!"), h(!1),
|
|
6535
|
+
s?.(de), T("success", ee.message || "Email verified!"), h(!1), Y({ email: t.email, otp: "" });
|
|
6565
6536
|
} else
|
|
6566
6537
|
T("error", ee.message || "Verification failed");
|
|
6567
6538
|
} catch (ee) {
|
|
@@ -6582,7 +6553,7 @@ const Ya = [
|
|
|
6582
6553
|
style: o,
|
|
6583
6554
|
children: [
|
|
6584
6555
|
/* @__PURE__ */ n.jsxs("div", { className: `flex flex-col items-center text-center gap-2 ${B || ""}`, style: H, children: [
|
|
6585
|
-
/* @__PURE__ */ n.jsx(
|
|
6556
|
+
/* @__PURE__ */ n.jsx(da, { className: "text-[#00C212]", size: 32 }),
|
|
6586
6557
|
/* @__PURE__ */ n.jsx("h2", { className: `text-xl font-semibold ${se || ""}`, style: Q, children: "Verify Your Email" }),
|
|
6587
6558
|
/* @__PURE__ */ n.jsx("p", { className: `text-sm text-zinc-400 ${J || ""}`, style: X, children: "Enter your email and OTP to confirm your account" })
|
|
6588
6559
|
] }),
|
|
@@ -6590,7 +6561,7 @@ const Ya = [
|
|
|
6590
6561
|
"div",
|
|
6591
6562
|
{
|
|
6592
6563
|
className: `flex items-center gap-2 px-4 py-3 rounded-lg text-sm border
|
|
6593
|
-
${V.type === "success" ? `text-emerald-500 bg-emerald-500/10 border-emerald-500/30 ${F || ""}` : `text-red-500 bg-red-500/10 border-red-500/30 ${
|
|
6564
|
+
${V.type === "success" ? `text-emerald-500 bg-emerald-500/10 border-emerald-500/30 ${F || ""}` : `text-red-500 bg-red-500/10 border-red-500/30 ${K || ""}`}
|
|
6594
6565
|
${M || ""}
|
|
6595
6566
|
`,
|
|
6596
6567
|
style: V.type === "success" ? { ...S, ...q } : { ...S, ...U },
|
|
@@ -6614,7 +6585,7 @@ const Ya = [
|
|
|
6614
6585
|
{
|
|
6615
6586
|
type: "email",
|
|
6616
6587
|
value: D.email,
|
|
6617
|
-
onChange: (I) =>
|
|
6588
|
+
onChange: (I) => Y((ee) => ({ ...ee, email: I.target.value })),
|
|
6618
6589
|
placeholder: "Enter your email",
|
|
6619
6590
|
required: !0,
|
|
6620
6591
|
className: `w-full h-11 pl-10 pr-3 text-sm rounded-lg border outline-none transition
|
|
@@ -6630,7 +6601,7 @@ const Ya = [
|
|
|
6630
6601
|
d && /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
6631
6602
|
/* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
6632
6603
|
/* @__PURE__ */ n.jsx(
|
|
6633
|
-
|
|
6604
|
+
Kt,
|
|
6634
6605
|
{
|
|
6635
6606
|
size: 18,
|
|
6636
6607
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400"
|
|
@@ -6641,7 +6612,7 @@ const Ya = [
|
|
|
6641
6612
|
{
|
|
6642
6613
|
type: "text",
|
|
6643
6614
|
value: D.otp,
|
|
6644
|
-
onChange: (I) =>
|
|
6615
|
+
onChange: (I) => Y((ee) => ({ ...ee, otp: I.target.value })),
|
|
6645
6616
|
placeholder: "Enter OTP",
|
|
6646
6617
|
required: !0,
|
|
6647
6618
|
className: `w-full h-11 pl-10 pr-3 text-sm rounded-lg border outline-none transition
|
|
@@ -6658,16 +6629,16 @@ const Ya = [
|
|
|
6658
6629
|
"button",
|
|
6659
6630
|
{
|
|
6660
6631
|
type: "submit",
|
|
6661
|
-
disabled:
|
|
6632
|
+
disabled: b,
|
|
6662
6633
|
className: `flex-1 flex items-center justify-center gap-2 h-11 rounded-lg text-sm font-medium
|
|
6663
6634
|
bg-[#00C212] hover:bg-[#00C212]/90 text-white
|
|
6664
6635
|
disabled:opacity-60 disabled:cursor-not-allowed transition
|
|
6665
6636
|
${i || ""} ${p || ""}
|
|
6666
6637
|
`,
|
|
6667
|
-
style: { ...l, ...
|
|
6638
|
+
style: { ...l, ...g },
|
|
6668
6639
|
children: [
|
|
6669
|
-
|
|
6670
|
-
|
|
6640
|
+
b ? /* @__PURE__ */ n.jsx(ye, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ n.jsx(ke, { size: 16 }),
|
|
6641
|
+
b ? "Verifying..." : "Verify Email"
|
|
6671
6642
|
]
|
|
6672
6643
|
}
|
|
6673
6644
|
) : /* @__PURE__ */ n.jsxs(
|
|
@@ -6675,7 +6646,7 @@ const Ya = [
|
|
|
6675
6646
|
{
|
|
6676
6647
|
type: "button",
|
|
6677
6648
|
onClick: oe,
|
|
6678
|
-
disabled:
|
|
6649
|
+
disabled: b || !t?.id,
|
|
6679
6650
|
className: `flex-1 flex items-center justify-center gap-2 h-11 rounded-lg text-sm font-medium
|
|
6680
6651
|
bg-[#00C212] hover:bg-[#00C212]/90 text-white
|
|
6681
6652
|
disabled:opacity-60 disabled:cursor-not-allowed transition
|
|
@@ -6683,8 +6654,8 @@ const Ya = [
|
|
|
6683
6654
|
`,
|
|
6684
6655
|
style: { ...l, ...u },
|
|
6685
6656
|
children: [
|
|
6686
|
-
|
|
6687
|
-
|
|
6657
|
+
b ? /* @__PURE__ */ n.jsx(ye, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ n.jsx(Gt, { size: 16 }),
|
|
6658
|
+
b ? "Sending..." : "Send OTP"
|
|
6688
6659
|
]
|
|
6689
6660
|
}
|
|
6690
6661
|
) })
|
|
@@ -6693,13 +6664,13 @@ const Ya = [
|
|
|
6693
6664
|
);
|
|
6694
6665
|
};
|
|
6695
6666
|
export {
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6667
|
+
jo as AuthixProvider,
|
|
6668
|
+
wo as NeuctraAuthix,
|
|
6669
|
+
Po as ReactEmailVerification,
|
|
6670
|
+
Eo as ReactSignedIn,
|
|
6671
|
+
$o as ReactSignedOut,
|
|
6672
|
+
So as ReactUserButton,
|
|
6673
|
+
No as ReactUserLogin,
|
|
6674
|
+
ko as ReactUserProfile,
|
|
6675
|
+
vo as ReactUserSignUp
|
|
6705
6676
|
};
|