@neuctra/authix 1.1.44 → 1.1.45
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.
|
@@ -33,8 +33,8 @@ const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
|
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = qe(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, kr = oe("URLSearchParams"), [Er, Cr, Tr,
|
|
37
|
-
function
|
|
36
|
+
}, kr = oe("URLSearchParams"), [Er, Cr, Tr, Ir] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Rr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
|
+
function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
40
40
|
let s, a;
|
|
@@ -68,10 +68,10 @@ function Ze() {
|
|
|
68
68
|
ze(r[o]) && ze(a) ? r[o] = Ze(r[o], a) : ze(a) ? r[o] = Ze({}, a) : we(a) ? r[o] = a.slice() : (!e || !ye(a)) && (r[o] = a);
|
|
69
69
|
};
|
|
70
70
|
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
-
arguments[a] &&
|
|
71
|
+
arguments[a] && Ie(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (
|
|
74
|
+
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (a, i) => {
|
|
75
75
|
r && re(a) ? t[i] = Dt(a, r) : t[i] = a;
|
|
76
76
|
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ar = (t, e, r, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
@@ -120,7 +120,7 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
|
120
120
|
}
|
|
121
121
|
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), qr = oe("RegExp"), Bt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
|
|
123
|
+
Ie(r, (a, i) => {
|
|
124
124
|
let o;
|
|
125
125
|
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
@@ -161,7 +161,7 @@ const Yr = (t) => {
|
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
162
|
e[a] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
|
-
return
|
|
164
|
+
return Ie(s, (o, l) => {
|
|
165
165
|
const h = r(o, a + 1);
|
|
166
166
|
!ye(h) && (i[l] = h);
|
|
167
167
|
}), e[a] = void 0, i;
|
|
@@ -192,7 +192,7 @@ const Yr = (t) => {
|
|
|
192
192
|
isReadableStream: Er,
|
|
193
193
|
isRequest: Cr,
|
|
194
194
|
isResponse: Tr,
|
|
195
|
-
isHeaders:
|
|
195
|
+
isHeaders: Ir,
|
|
196
196
|
isUndefined: ye,
|
|
197
197
|
isDate: yr,
|
|
198
198
|
isFile: br,
|
|
@@ -203,10 +203,10 @@ const Yr = (t) => {
|
|
|
203
203
|
isURLSearchParams: kr,
|
|
204
204
|
isTypedArray: Nr,
|
|
205
205
|
isFileList: jr,
|
|
206
|
-
forEach:
|
|
206
|
+
forEach: Ie,
|
|
207
207
|
merge: Ze,
|
|
208
208
|
extend: Pr,
|
|
209
|
-
trim:
|
|
209
|
+
trim: Rr,
|
|
210
210
|
stripBOM: Or,
|
|
211
211
|
inherits: Ar,
|
|
212
212
|
toFlatObject: zr,
|
|
@@ -355,14 +355,14 @@ function Be(t, e, r) {
|
|
|
355
355
|
if (!p.isUndefined(u)) {
|
|
356
356
|
if (b.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
b.push(u), p.forEach(u, function($,
|
|
358
|
+
b.push(u), p.forEach(u, function($, I) {
|
|
359
359
|
(!(p.isUndefined($) || $ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
$,
|
|
362
|
-
p.isString(
|
|
362
|
+
p.isString(I) ? I.trim() : I,
|
|
363
363
|
j,
|
|
364
364
|
y
|
|
365
|
-
)) === !0 && w($, j ? j.concat(
|
|
365
|
+
)) === !0 && w($, j ? j.concat(I) : [I]);
|
|
366
366
|
}), b.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -540,7 +540,7 @@ function xn(t, e, r) {
|
|
|
540
540
|
}
|
|
541
541
|
return (r || JSON.stringify)(t);
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const Re = {
|
|
544
544
|
transitional: Gt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
@@ -569,7 +569,7 @@ const Ie = {
|
|
|
569
569
|
return i || a ? (r.setContentType("application/json", !1), xn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const r = this.transitional ||
|
|
572
|
+
const r = this.transitional || Re.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
575
|
if (e && p.isString(e) && (s && !this.responseType || a)) {
|
|
@@ -607,7 +607,7 @@ const Ie = {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
610
|
-
|
|
610
|
+
Re.headers[t] = {};
|
|
611
611
|
});
|
|
612
612
|
const hn = p.toObjectSet([
|
|
613
613
|
"age",
|
|
@@ -811,7 +811,7 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
|
-
const r = this ||
|
|
814
|
+
const r = this || Re, s = e || r, a = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
817
|
i = l.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
@@ -1020,7 +1020,7 @@ const tr = (t) => {
|
|
|
1020
1020
|
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
|
-
},
|
|
1023
|
+
}, In = typeof XMLHttpRequest < "u", Rn = In && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
1025
|
const a = tr(t);
|
|
1026
1026
|
let i = a.data;
|
|
@@ -1044,10 +1044,10 @@ const tr = (t) => {
|
|
|
1044
1044
|
config: t,
|
|
1045
1045
|
request: m
|
|
1046
1046
|
};
|
|
1047
|
-
Qt(function(
|
|
1048
|
-
r(
|
|
1049
|
-
}, function(
|
|
1050
|
-
s(
|
|
1047
|
+
Qt(function(R) {
|
|
1048
|
+
r(R), j();
|
|
1049
|
+
}, function(R) {
|
|
1050
|
+
s(R), j();
|
|
1051
1051
|
}, q), m = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in m ? m.onloadend = $ : m.onreadystatechange = function() {
|
|
@@ -1071,9 +1071,9 @@ const tr = (t) => {
|
|
|
1071
1071
|
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), d && ([y, u] = Ue(d, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (c = (z) => {
|
|
1072
1072
|
m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
|
|
1073
1073
|
}, a.cancelToken && a.cancelToken.subscribe(c), a.signal && (a.signal.aborted ? c() : a.signal.addEventListener("abort", c)));
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
s(new L("Unsupported protocol " +
|
|
1074
|
+
const I = jn(a.url);
|
|
1075
|
+
if (I && ee.protocols.indexOf(I) === -1) {
|
|
1076
|
+
s(new L("Unsupported protocol " + I + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
m.send(i || null);
|
|
@@ -1221,18 +1221,18 @@ const tr = (t) => {
|
|
|
1221
1221
|
url: j,
|
|
1222
1222
|
method: m,
|
|
1223
1223
|
data: $,
|
|
1224
|
-
signal:
|
|
1224
|
+
signal: I,
|
|
1225
1225
|
cancelToken: z,
|
|
1226
1226
|
timeout: C,
|
|
1227
1227
|
onDownloadProgress: q,
|
|
1228
1228
|
onUploadProgress: g,
|
|
1229
|
-
responseType:
|
|
1229
|
+
responseType: R,
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: D = "same-origin",
|
|
1232
1232
|
fetchOptions: B
|
|
1233
1233
|
} = tr(u), F = e || fetch;
|
|
1234
|
-
|
|
1235
|
-
let V = Pn([
|
|
1234
|
+
R = R ? (R + "").toLowerCase() : "text";
|
|
1235
|
+
let V = Pn([I, z && z.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
1237
1237
|
V.unsubscribe();
|
|
1238
1238
|
});
|
|
@@ -1264,7 +1264,7 @@ const tr = (t) => {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, O);
|
|
1266
1266
|
let K = await (i ? F(Z, B) : F(j, O));
|
|
1267
|
-
const Q = c && (
|
|
1267
|
+
const Q = c && (R === "stream" || R === "response");
|
|
1268
1268
|
if (c && (q || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach((_) => {
|
|
@@ -1281,8 +1281,8 @@ const tr = (t) => {
|
|
|
1281
1281
|
f
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1285
|
-
let G = await b[p.findKey(b,
|
|
1284
|
+
R = R || "text";
|
|
1285
|
+
let G = await b[p.findKey(b, R) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: G,
|
|
@@ -1317,7 +1317,7 @@ const tr = (t) => {
|
|
|
1317
1317
|
rr();
|
|
1318
1318
|
const tt = {
|
|
1319
1319
|
http: Zr,
|
|
1320
|
-
xhr:
|
|
1320
|
+
xhr: Rn,
|
|
1321
1321
|
fetch: {
|
|
1322
1322
|
get: rr
|
|
1323
1323
|
}
|
|
@@ -1331,7 +1331,7 @@ p.forEach(tt, (t, e) => {
|
|
|
1331
1331
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const
|
|
1334
|
+
const It = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !1, nr = {
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
@@ -1351,8 +1351,8 @@ const Rt = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1351
1351
|
([h, d]) => `adapter ${h} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
1353
|
let l = r ? o.length > 1 ? `since :
|
|
1354
|
-
` + o.map(
|
|
1355
|
-
`) : " " +
|
|
1354
|
+
` + o.map(It).join(`
|
|
1355
|
+
`) : " " + It(o[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new L(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
@@ -1366,11 +1366,11 @@ function Je(t) {
|
|
|
1366
1366
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1367
1367
|
throw new je(null, t);
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Rt(t) {
|
|
1370
1370
|
return Je(t), t.headers = ne.from(t.headers), t.data = Ke.call(
|
|
1371
1371
|
t,
|
|
1372
1372
|
t.transformRequest
|
|
1373
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter ||
|
|
1373
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter || Re.adapter, t)(t).then(function(s) {
|
|
1374
1374
|
return Je(t), s.data = Ke.call(
|
|
1375
1375
|
t,
|
|
1376
1376
|
t.transformResponse,
|
|
@@ -1502,7 +1502,7 @@ let xe = class {
|
|
|
1502
1502
|
});
|
|
1503
1503
|
let c, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const u = [
|
|
1505
|
+
const u = [Rt.bind(this), void 0];
|
|
1506
1506
|
for (u.unshift(...l), u.push(...d), y = u.length, c = Promise.resolve(r); b < y; )
|
|
1507
1507
|
c = c.then(u[b++], u[b++]);
|
|
1508
1508
|
return c;
|
|
@@ -1519,7 +1519,7 @@ let xe = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
c =
|
|
1522
|
+
c = Rt.call(this, w);
|
|
1523
1523
|
} catch (u) {
|
|
1524
1524
|
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
@@ -1712,7 +1712,7 @@ function or(t) {
|
|
|
1712
1712
|
return or(he(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const M = or(
|
|
1715
|
+
const M = or(Re);
|
|
1716
1716
|
M.Axios = xe;
|
|
1717
1717
|
M.CanceledError = je;
|
|
1718
1718
|
M.CancelToken = Ln;
|
|
@@ -1768,8 +1768,10 @@ class ca {
|
|
|
1768
1768
|
"Content-Type": "application/json",
|
|
1769
1769
|
...this.apiKey ? { "x-api-key": this.apiKey } : {}
|
|
1770
1770
|
},
|
|
1771
|
-
timeout:
|
|
1771
|
+
timeout: 3e4,
|
|
1772
1772
|
// 10s timeout
|
|
1773
|
+
withCredentials: !0
|
|
1774
|
+
// 🔥 REQUIRED FOR SESSION COOKIES
|
|
1773
1775
|
});
|
|
1774
1776
|
}
|
|
1775
1777
|
/**
|
|
@@ -1826,6 +1828,29 @@ class ca {
|
|
|
1826
1828
|
appId: a || this.appId
|
|
1827
1829
|
});
|
|
1828
1830
|
}
|
|
1831
|
+
/**
|
|
1832
|
+
* 🔐 Check current authentication session (cookie-based)
|
|
1833
|
+
* Automatically detects logged-in / logged-out state
|
|
1834
|
+
*/
|
|
1835
|
+
async checkSession() {
|
|
1836
|
+
if (typeof window > "u")
|
|
1837
|
+
return { authenticated: !1 };
|
|
1838
|
+
const e = localStorage.getItem("authix_token");
|
|
1839
|
+
if (!e || e === "undefined" || e === "null")
|
|
1840
|
+
return { authenticated: !1 };
|
|
1841
|
+
try {
|
|
1842
|
+
return await this.request(
|
|
1843
|
+
"GET",
|
|
1844
|
+
"/users/session",
|
|
1845
|
+
void 0,
|
|
1846
|
+
{
|
|
1847
|
+
Authorization: `Bearer ${e}`
|
|
1848
|
+
}
|
|
1849
|
+
);
|
|
1850
|
+
} catch {
|
|
1851
|
+
return { authenticated: !1 };
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1829
1854
|
/**
|
|
1830
1855
|
* Update an existing user
|
|
1831
1856
|
* @param params fields to update
|
|
@@ -2233,13 +2258,13 @@ function Bn() {
|
|
|
2233
2258
|
switch (f) {
|
|
2234
2259
|
case m:
|
|
2235
2260
|
return "Fragment";
|
|
2236
|
-
case
|
|
2261
|
+
case I:
|
|
2237
2262
|
return "Profiler";
|
|
2238
2263
|
case $:
|
|
2239
2264
|
return "StrictMode";
|
|
2240
2265
|
case g:
|
|
2241
2266
|
return "Suspense";
|
|
2242
|
-
case
|
|
2267
|
+
case R:
|
|
2243
2268
|
return "SuspenseList";
|
|
2244
2269
|
case B:
|
|
2245
2270
|
return "Activity";
|
|
@@ -2418,7 +2443,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2418
2443
|
function y(f) {
|
|
2419
2444
|
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2420
2445
|
}
|
|
2421
|
-
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"),
|
|
2446
|
+
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
2422
2447
|
return null;
|
|
2423
2448
|
};
|
|
2424
2449
|
w = {
|
|
@@ -2891,7 +2916,7 @@ const Cs = [
|
|
|
2891
2916
|
* This source code is licensed under the ISC license.
|
|
2892
2917
|
* See the LICENSE file in the root directory of this source tree.
|
|
2893
2918
|
*/
|
|
2894
|
-
const
|
|
2919
|
+
const Is = [
|
|
2895
2920
|
[
|
|
2896
2921
|
"path",
|
|
2897
2922
|
{
|
|
@@ -2901,7 +2926,7 @@ const Rs = [
|
|
|
2901
2926
|
],
|
|
2902
2927
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
2903
2928
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
2904
|
-
],
|
|
2929
|
+
], Rs = W("save", Is);
|
|
2905
2930
|
/**
|
|
2906
2931
|
* @license lucide-react v0.544.0 - ISC
|
|
2907
2932
|
*
|
|
@@ -3043,7 +3068,7 @@ const Ls = [
|
|
|
3043
3068
|
password: "",
|
|
3044
3069
|
role: d.length ? d[0] : "user",
|
|
3045
3070
|
...h && { avatarUrl: "" }
|
|
3046
|
-
}, [
|
|
3071
|
+
}, [I, z] = P($), [C, q] = P(!1), [g, R] = P(!1), [v, D] = P(null), [B, F] = P({}), [V, Z] = P(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
|
|
3047
3072
|
Le.useEffect(() => {
|
|
3048
3073
|
if (typeof window < "u") {
|
|
3049
3074
|
const S = () => Z(window.innerWidth < 768);
|
|
@@ -3055,13 +3080,13 @@ const Ls = [
|
|
|
3055
3080
|
z((_) => ({ ..._, [x]: k })), B[x] && F((_) => ({ ..._, [x]: void 0 }));
|
|
3056
3081
|
}, Q = () => {
|
|
3057
3082
|
const S = {};
|
|
3058
|
-
return
|
|
3083
|
+
return I.name.trim() || (S.name = "Name is required"), I.email.trim() ? /\S+@\S+\.\S+/.test(I.email) || (S.email = "Invalid email address") : S.email = "Email is required", I.password ? I.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
|
|
3059
3084
|
}, G = async (S) => {
|
|
3060
3085
|
if (S.preventDefault(), !!Q()) {
|
|
3061
|
-
|
|
3086
|
+
R(!0), D(null);
|
|
3062
3087
|
try {
|
|
3063
3088
|
const x = {
|
|
3064
|
-
...
|
|
3089
|
+
...I,
|
|
3065
3090
|
appId: m
|
|
3066
3091
|
}, k = await Hn(x, { baseUrl: u, apiKey: j });
|
|
3067
3092
|
D({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
@@ -3069,7 +3094,7 @@ const Ls = [
|
|
|
3069
3094
|
const k = x.message || "Signup failed. Please try again.";
|
|
3070
3095
|
D({ type: "error", text: k }), w && w(x);
|
|
3071
3096
|
} finally {
|
|
3072
|
-
|
|
3097
|
+
R(!1);
|
|
3073
3098
|
}
|
|
3074
3099
|
}
|
|
3075
3100
|
}, f = {
|
|
@@ -3166,7 +3191,7 @@ const Ls = [
|
|
|
3166
3191
|
]
|
|
3167
3192
|
}
|
|
3168
3193
|
),
|
|
3169
|
-
h &&
|
|
3194
|
+
h && I.avatarUrl && /* @__PURE__ */ n.jsx(
|
|
3170
3195
|
"div",
|
|
3171
3196
|
{
|
|
3172
3197
|
style: {
|
|
@@ -3177,7 +3202,7 @@ const Ls = [
|
|
|
3177
3202
|
children: /* @__PURE__ */ n.jsx(
|
|
3178
3203
|
"img",
|
|
3179
3204
|
{
|
|
3180
|
-
src:
|
|
3205
|
+
src: I.avatarUrl,
|
|
3181
3206
|
alt: "Avatar Preview",
|
|
3182
3207
|
style: {
|
|
3183
3208
|
width: "60px",
|
|
@@ -3245,7 +3270,7 @@ const Ls = [
|
|
|
3245
3270
|
// subtle shadow
|
|
3246
3271
|
borderRadius: "10px",
|
|
3247
3272
|
transition: "transform 0.3s ease, background-color 0.3s ease",
|
|
3248
|
-
transform:
|
|
3273
|
+
transform: I.role === d[1] ? "translateX(100%)" : "translateX(0)",
|
|
3249
3274
|
zIndex: 0
|
|
3250
3275
|
}
|
|
3251
3276
|
}
|
|
@@ -3260,9 +3285,9 @@ const Ls = [
|
|
|
3260
3285
|
zIndex: 10,
|
|
3261
3286
|
border: "none",
|
|
3262
3287
|
background: "transparent",
|
|
3263
|
-
color:
|
|
3288
|
+
color: I.role === d[0] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3264
3289
|
// theme-aware inactive color
|
|
3265
|
-
fontWeight:
|
|
3290
|
+
fontWeight: I.role === d[0] ? 600 : 500,
|
|
3266
3291
|
fontSize: "14px",
|
|
3267
3292
|
display: "flex",
|
|
3268
3293
|
alignItems: "center",
|
|
@@ -3282,8 +3307,8 @@ const Ls = [
|
|
|
3282
3307
|
zIndex: 10,
|
|
3283
3308
|
border: "none",
|
|
3284
3309
|
background: "transparent",
|
|
3285
|
-
color:
|
|
3286
|
-
fontWeight:
|
|
3310
|
+
color: I.role === d[1] ? i : l ? "#9ca3af" : "#6b7280",
|
|
3311
|
+
fontWeight: I.role === d[1] ? 600 : 500,
|
|
3287
3312
|
fontSize: "14px",
|
|
3288
3313
|
display: "flex",
|
|
3289
3314
|
alignItems: "center",
|
|
@@ -3333,7 +3358,7 @@ const Ls = [
|
|
|
3333
3358
|
type: "text",
|
|
3334
3359
|
name: "name",
|
|
3335
3360
|
placeholder: "Enter your full name",
|
|
3336
|
-
value:
|
|
3361
|
+
value: I.name,
|
|
3337
3362
|
onChange: K,
|
|
3338
3363
|
style: {
|
|
3339
3364
|
...f,
|
|
@@ -3388,7 +3413,7 @@ const Ls = [
|
|
|
3388
3413
|
type: "email",
|
|
3389
3414
|
name: "email",
|
|
3390
3415
|
placeholder: "Enter your email address",
|
|
3391
|
-
value:
|
|
3416
|
+
value: I.email,
|
|
3392
3417
|
onChange: K,
|
|
3393
3418
|
style: {
|
|
3394
3419
|
...f,
|
|
@@ -3443,7 +3468,7 @@ const Ls = [
|
|
|
3443
3468
|
type: C ? "text" : "password",
|
|
3444
3469
|
name: "password",
|
|
3445
3470
|
placeholder: "Create a secure password",
|
|
3446
|
-
value:
|
|
3471
|
+
value: I.password,
|
|
3447
3472
|
onChange: K,
|
|
3448
3473
|
style: {
|
|
3449
3474
|
...f,
|
|
@@ -3521,7 +3546,7 @@ const Ls = [
|
|
|
3521
3546
|
type: "url",
|
|
3522
3547
|
name: "avatarUrl",
|
|
3523
3548
|
placeholder: "Paste your avatar image URL",
|
|
3524
|
-
value:
|
|
3549
|
+
value: I.avatarUrl || "",
|
|
3525
3550
|
onChange: K,
|
|
3526
3551
|
style: f
|
|
3527
3552
|
}
|
|
@@ -3673,7 +3698,7 @@ const Ls = [
|
|
|
3673
3698
|
onSuccess: d,
|
|
3674
3699
|
onError: c
|
|
3675
3700
|
}) => {
|
|
3676
|
-
const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = P("login"), [m, $] = P(1), [
|
|
3701
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = P("login"), [m, $] = P(1), [I, z] = P(!1), [C, q] = P(!1), [g, R] = P(null), [v, D] = P(""), [B, F] = P(""), [V, Z] = P({
|
|
3677
3702
|
email: "",
|
|
3678
3703
|
otp: "",
|
|
3679
3704
|
newPassword: "",
|
|
@@ -3686,23 +3711,23 @@ const Ls = [
|
|
|
3686
3711
|
}
|
|
3687
3712
|
}, []);
|
|
3688
3713
|
const G = async (_) => {
|
|
3689
|
-
_.preventDefault(), q(!0),
|
|
3714
|
+
_.preventDefault(), q(!0), R(null);
|
|
3690
3715
|
try {
|
|
3691
3716
|
const N = await Fs(
|
|
3692
3717
|
{ email: v, password: B, appId: w },
|
|
3693
3718
|
{ baseUrl: b, apiKey: y }
|
|
3694
3719
|
);
|
|
3695
|
-
|
|
3720
|
+
R({ type: "success", text: `Welcome ${N.name}` }), d?.(N);
|
|
3696
3721
|
} catch (N) {
|
|
3697
3722
|
const Y = N.message || "Login failed";
|
|
3698
|
-
|
|
3723
|
+
R({ type: "error", text: Y }), c?.(N);
|
|
3699
3724
|
} finally {
|
|
3700
3725
|
q(!1);
|
|
3701
3726
|
}
|
|
3702
3727
|
}, f = (_) => {
|
|
3703
3728
|
Z({ ...V, [_.target.name]: _.target.value });
|
|
3704
3729
|
}, S = async (_) => {
|
|
3705
|
-
_.preventDefault(), q(!0),
|
|
3730
|
+
_.preventDefault(), q(!0), R(null);
|
|
3706
3731
|
try {
|
|
3707
3732
|
const N = await M.post(
|
|
3708
3733
|
`${b}/users/forgot-password`,
|
|
@@ -3712,12 +3737,12 @@ const Ls = [
|
|
|
3712
3737
|
},
|
|
3713
3738
|
{ headers: { "x-api-key": y } }
|
|
3714
3739
|
);
|
|
3715
|
-
N.data.success ? ($(2),
|
|
3740
|
+
N.data.success ? ($(2), R({ type: "success", text: "OTP sent to your email" })) : R({
|
|
3716
3741
|
type: "error",
|
|
3717
3742
|
text: N.data.message || "Failed to send OTP"
|
|
3718
3743
|
});
|
|
3719
3744
|
} catch (N) {
|
|
3720
|
-
|
|
3745
|
+
R({
|
|
3721
3746
|
type: "error",
|
|
3722
3747
|
text: N.response?.data?.message || "Something went wrong"
|
|
3723
3748
|
});
|
|
@@ -3725,16 +3750,16 @@ const Ls = [
|
|
|
3725
3750
|
q(!1);
|
|
3726
3751
|
}
|
|
3727
3752
|
}, x = async (_) => {
|
|
3728
|
-
_.preventDefault(), q(!0),
|
|
3753
|
+
_.preventDefault(), q(!0), R(null);
|
|
3729
3754
|
try {
|
|
3730
3755
|
const N = await M.post(
|
|
3731
3756
|
`${b}/users/reset-password`,
|
|
3732
3757
|
V,
|
|
3733
3758
|
{ headers: { "x-api-key": y } }
|
|
3734
3759
|
);
|
|
3735
|
-
N.data.success ? (
|
|
3760
|
+
N.data.success ? (R({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : R({ type: "error", text: N.data.message || "Reset failed" });
|
|
3736
3761
|
} catch (N) {
|
|
3737
|
-
|
|
3762
|
+
R({
|
|
3738
3763
|
type: "error",
|
|
3739
3764
|
text: N.response?.data?.message || "Something went wrong"
|
|
3740
3765
|
});
|
|
@@ -3920,7 +3945,7 @@ const Ls = [
|
|
|
3920
3945
|
"input",
|
|
3921
3946
|
{
|
|
3922
3947
|
id: "login-password",
|
|
3923
|
-
type:
|
|
3948
|
+
type: I ? "text" : "password",
|
|
3924
3949
|
placeholder: "Enter your password",
|
|
3925
3950
|
value: B,
|
|
3926
3951
|
onChange: (_) => F(_.target.value),
|
|
@@ -3931,7 +3956,7 @@ const Ls = [
|
|
|
3931
3956
|
"button",
|
|
3932
3957
|
{
|
|
3933
3958
|
type: "button",
|
|
3934
|
-
onClick: () => z(!
|
|
3959
|
+
onClick: () => z(!I),
|
|
3935
3960
|
style: {
|
|
3936
3961
|
position: "absolute",
|
|
3937
3962
|
right: "14px",
|
|
@@ -3943,7 +3968,7 @@ const Ls = [
|
|
|
3943
3968
|
color: O,
|
|
3944
3969
|
cursor: "pointer"
|
|
3945
3970
|
},
|
|
3946
|
-
children:
|
|
3971
|
+
children: I ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
|
|
3947
3972
|
}
|
|
3948
3973
|
)
|
|
3949
3974
|
] })
|
|
@@ -4339,7 +4364,7 @@ const Ls = [
|
|
|
4339
4364
|
};
|
|
4340
4365
|
return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
|
|
4341
4366
|
}, []), !t) return null;
|
|
4342
|
-
const
|
|
4367
|
+
const I = async () => {
|
|
4343
4368
|
b(!0), j("processing");
|
|
4344
4369
|
try {
|
|
4345
4370
|
const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
|
|
@@ -4507,7 +4532,7 @@ const Ls = [
|
|
|
4507
4532
|
icon: /* @__PURE__ */ n.jsx(ct, { size: 16 }),
|
|
4508
4533
|
text: "You will lose access to all services"
|
|
4509
4534
|
}
|
|
4510
|
-
].map((g,
|
|
4535
|
+
].map((g, R) => /* @__PURE__ */ n.jsxs(
|
|
4511
4536
|
"div",
|
|
4512
4537
|
{
|
|
4513
4538
|
style: {
|
|
@@ -4522,7 +4547,7 @@ const Ls = [
|
|
|
4522
4547
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4523
4548
|
]
|
|
4524
4549
|
},
|
|
4525
|
-
|
|
4550
|
+
R
|
|
4526
4551
|
))
|
|
4527
4552
|
}
|
|
4528
4553
|
)
|
|
@@ -4758,7 +4783,7 @@ const Ls = [
|
|
|
4758
4783
|
/* @__PURE__ */ n.jsxs(
|
|
4759
4784
|
"button",
|
|
4760
4785
|
{
|
|
4761
|
-
onClick:
|
|
4786
|
+
onClick: I,
|
|
4762
4787
|
disabled: !z || c,
|
|
4763
4788
|
style: {
|
|
4764
4789
|
padding: "10px 24px",
|
|
@@ -4874,7 +4899,7 @@ const Ls = [
|
|
|
4874
4899
|
{ text: "Removing your data", active: !0 },
|
|
4875
4900
|
{ text: "Closing active sessions", active: !1 },
|
|
4876
4901
|
{ text: "Finalizing deletion", active: !1 }
|
|
4877
|
-
].map((g,
|
|
4902
|
+
].map((g, R) => /* @__PURE__ */ n.jsxs(
|
|
4878
4903
|
"div",
|
|
4879
4904
|
{
|
|
4880
4905
|
style: {
|
|
@@ -4913,7 +4938,7 @@ const Ls = [
|
|
|
4913
4938
|
)
|
|
4914
4939
|
]
|
|
4915
4940
|
},
|
|
4916
|
-
|
|
4941
|
+
R
|
|
4917
4942
|
))
|
|
4918
4943
|
}
|
|
4919
4944
|
) }),
|
|
@@ -5645,11 +5670,11 @@ const Ls = [
|
|
|
5645
5670
|
currentPassword: !1,
|
|
5646
5671
|
newPassword: !1,
|
|
5647
5672
|
confirmPassword: !1
|
|
5648
|
-
}), [$,
|
|
5673
|
+
}), [$, I] = P(!1);
|
|
5649
5674
|
if (Le.useEffect(() => {
|
|
5650
5675
|
if (typeof window > "u") return;
|
|
5651
5676
|
const v = () => {
|
|
5652
|
-
|
|
5677
|
+
I(window.innerWidth < 640);
|
|
5653
5678
|
};
|
|
5654
5679
|
return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
5655
5680
|
}, []), !t) return null;
|
|
@@ -5689,7 +5714,7 @@ const Ls = [
|
|
|
5689
5714
|
u(!1);
|
|
5690
5715
|
}
|
|
5691
5716
|
}
|
|
5692
|
-
},
|
|
5717
|
+
}, R = [
|
|
5693
5718
|
{
|
|
5694
5719
|
field: "currentPassword",
|
|
5695
5720
|
label: "Current Password",
|
|
@@ -5822,7 +5847,7 @@ const Ls = [
|
|
|
5822
5847
|
}
|
|
5823
5848
|
),
|
|
5824
5849
|
/* @__PURE__ */ n.jsxs("form", { onSubmit: g, children: [
|
|
5825
|
-
|
|
5850
|
+
R.map(({ field: v, label: D, icon: B }) => /* @__PURE__ */ n.jsxs(
|
|
5826
5851
|
"div",
|
|
5827
5852
|
{
|
|
5828
5853
|
style: {
|
|
@@ -6366,7 +6391,7 @@ const Ls = [
|
|
|
6366
6391
|
onVerify: i,
|
|
6367
6392
|
primaryColor: o = "#00C212"
|
|
6368
6393
|
}) => {
|
|
6369
|
-
const { baseUrl: l, apiKey: h, appId: d } = ge(), [c, b] = P(null), [y, w] = P(e), [u, j] = P(!0), [m, $] = P(!1), [
|
|
6394
|
+
const { baseUrl: l, apiKey: h, appId: d } = ge(), [c, b] = P(null), [y, w] = P(e), [u, j] = P(!0), [m, $] = P(!1), [I, z] = P(!1), [C, q] = P(!1), [g, R] = P(!1), [v, D] = P(!1), [B, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
|
|
6370
6395
|
email: "",
|
|
6371
6396
|
otp: "",
|
|
6372
6397
|
appId: d
|
|
@@ -6910,15 +6935,15 @@ const Ls = [
|
|
|
6910
6935
|
"button",
|
|
6911
6936
|
{
|
|
6912
6937
|
onClick: ur,
|
|
6913
|
-
disabled:
|
|
6938
|
+
disabled: I,
|
|
6914
6939
|
style: {
|
|
6915
6940
|
background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
|
|
6916
|
-
opacity:
|
|
6941
|
+
opacity: I ? 0.7 : 1,
|
|
6917
6942
|
color: "white",
|
|
6918
6943
|
padding: "10px 20px",
|
|
6919
6944
|
borderRadius: "6px",
|
|
6920
6945
|
border: "none",
|
|
6921
|
-
cursor:
|
|
6946
|
+
cursor: I ? "not-allowed" : "pointer",
|
|
6922
6947
|
transition: "all 0.2s ease",
|
|
6923
6948
|
fontSize: "12px",
|
|
6924
6949
|
fontWeight: 500,
|
|
@@ -6931,15 +6956,15 @@ const Ls = [
|
|
|
6931
6956
|
flex: c && window.innerWidth < 1024 ? "1" : "auto"
|
|
6932
6957
|
},
|
|
6933
6958
|
children: [
|
|
6934
|
-
|
|
6959
|
+
I ? /* @__PURE__ */ n.jsx(
|
|
6935
6960
|
ae,
|
|
6936
6961
|
{
|
|
6937
6962
|
size: 16,
|
|
6938
6963
|
style: { animation: "spin 1s linear infinite" },
|
|
6939
6964
|
"aria-hidden": "true"
|
|
6940
6965
|
}
|
|
6941
|
-
) : /* @__PURE__ */ n.jsx(
|
|
6942
|
-
|
|
6966
|
+
) : /* @__PURE__ */ n.jsx(Rs, { size: 16, "aria-hidden": "true" }),
|
|
6967
|
+
I ? "Saving..." : "Save Changes"
|
|
6943
6968
|
]
|
|
6944
6969
|
}
|
|
6945
6970
|
)
|
|
@@ -7062,7 +7087,7 @@ const Ls = [
|
|
|
7062
7087
|
"button",
|
|
7063
7088
|
{
|
|
7064
7089
|
onClick: () => {
|
|
7065
|
-
|
|
7090
|
+
R(!0), Y();
|
|
7066
7091
|
},
|
|
7067
7092
|
style: {
|
|
7068
7093
|
width: "100%",
|
|
@@ -7439,7 +7464,7 @@ const Ls = [
|
|
|
7439
7464
|
appId: d,
|
|
7440
7465
|
userId: y.id,
|
|
7441
7466
|
isOpen: g,
|
|
7442
|
-
onClose: () =>
|
|
7467
|
+
onClose: () => R(!1),
|
|
7443
7468
|
onSuccess: (E) => N("success", E),
|
|
7444
7469
|
onError: (E) => N("error", E),
|
|
7445
7470
|
colors: U
|
|
@@ -7590,7 +7615,7 @@ const Ls = [
|
|
|
7590
7615
|
viewProfileLabel: w = "View Profile",
|
|
7591
7616
|
logoutLabel: u = "Sign Out"
|
|
7592
7617
|
}) => {
|
|
7593
|
-
const { baseUrl: j, apiKey: m, appId: $ } = ge(), [
|
|
7618
|
+
const { baseUrl: j, apiKey: m, appId: $ } = ge(), [I, z] = P(!1), [C, q] = P(null), [g, R] = P(!0), [v, D] = P(null), B = xt(null), F = xt(null), [V, Z] = P(!1), [T, J] = P(!1);
|
|
7594
7619
|
te(() => {
|
|
7595
7620
|
if (typeof window > "u") return;
|
|
7596
7621
|
const x = () => {
|
|
@@ -7600,7 +7625,7 @@ const Ls = [
|
|
|
7600
7625
|
}, []), te(() => {
|
|
7601
7626
|
(async () => {
|
|
7602
7627
|
try {
|
|
7603
|
-
if (
|
|
7628
|
+
if (R(!0), D(null), a) {
|
|
7604
7629
|
if (!a.id || !a.name || !a.email)
|
|
7605
7630
|
throw new Error("Invalid user data provided");
|
|
7606
7631
|
q(a);
|
|
@@ -7619,20 +7644,20 @@ const Ls = [
|
|
|
7619
7644
|
} catch (k) {
|
|
7620
7645
|
console.error("User initialization failed:", k), D(k.message || "Failed to load user");
|
|
7621
7646
|
} finally {
|
|
7622
|
-
|
|
7647
|
+
R(!1);
|
|
7623
7648
|
}
|
|
7624
7649
|
})();
|
|
7625
7650
|
}, [a]), te(() => {
|
|
7626
7651
|
if (typeof window > "u") return;
|
|
7627
7652
|
const x = () => {
|
|
7628
|
-
if (!
|
|
7653
|
+
if (!I || !F.current) return;
|
|
7629
7654
|
const k = F.current.getBoundingClientRect(), _ = window.innerWidth, N = window.innerHeight, Y = 280, se = _ - k.right, ue = k.left;
|
|
7630
7655
|
N - k.bottom;
|
|
7631
7656
|
const ve = se >= Y || se > ue;
|
|
7632
7657
|
Z(ve);
|
|
7633
7658
|
};
|
|
7634
7659
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7635
|
-
}, [
|
|
7660
|
+
}, [I]), te(() => {
|
|
7636
7661
|
if (typeof window > "u" || typeof document > "u")
|
|
7637
7662
|
return;
|
|
7638
7663
|
const x = (N) => {
|
|
@@ -7640,12 +7665,12 @@ const Ls = [
|
|
|
7640
7665
|
}, k = (N) => {
|
|
7641
7666
|
N.key === "Escape" && z(!1);
|
|
7642
7667
|
}, _ = () => {
|
|
7643
|
-
|
|
7668
|
+
I && z(!1);
|
|
7644
7669
|
};
|
|
7645
|
-
return
|
|
7670
|
+
return I && (document.addEventListener("mousedown", x), document.addEventListener("keydown", k), window.addEventListener("scroll", _)), () => {
|
|
7646
7671
|
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", k), window.removeEventListener("scroll", _);
|
|
7647
7672
|
};
|
|
7648
|
-
}, [
|
|
7673
|
+
}, [I]);
|
|
7649
7674
|
const A = t ? {
|
|
7650
7675
|
surface: "#000000",
|
|
7651
7676
|
surfaceElevated: "#000000",
|
|
@@ -7725,7 +7750,7 @@ const Ls = [
|
|
|
7725
7750
|
},
|
|
7726
7751
|
chevron: {
|
|
7727
7752
|
transition: "transform 0.2s ease",
|
|
7728
|
-
transform:
|
|
7753
|
+
transform: I ? "rotate(180deg)" : "rotate(0deg)",
|
|
7729
7754
|
color: A.textTertiary,
|
|
7730
7755
|
flexShrink: 0
|
|
7731
7756
|
},
|
|
@@ -7743,10 +7768,10 @@ const Ls = [
|
|
|
7743
7768
|
padding: "6px 6px 16px 6px",
|
|
7744
7769
|
zIndex: 1e3,
|
|
7745
7770
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
7746
|
-
opacity:
|
|
7747
|
-
pointerEvents:
|
|
7771
|
+
opacity: I ? 1 : 0,
|
|
7772
|
+
pointerEvents: I ? "auto" : "none",
|
|
7748
7773
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7749
|
-
transform:
|
|
7774
|
+
transform: I ? "translateY(0) scale(1)" : "translateY(-8px) scale(0.95)",
|
|
7750
7775
|
overflow: "hidden"
|
|
7751
7776
|
},
|
|
7752
7777
|
dropdownSection: {
|
|
@@ -7863,7 +7888,7 @@ const Ls = [
|
|
|
7863
7888
|
transition: "background-color 0.2s ease"
|
|
7864
7889
|
}
|
|
7865
7890
|
}, K = async () => {
|
|
7866
|
-
D(null),
|
|
7891
|
+
D(null), R(!0);
|
|
7867
7892
|
try {
|
|
7868
7893
|
const x = localStorage.getItem("userInfo");
|
|
7869
7894
|
if (x) {
|
|
@@ -7873,7 +7898,7 @@ const Ls = [
|
|
|
7873
7898
|
} catch (x) {
|
|
7874
7899
|
console.error("Retry failed:", x), D("Invalid user data"), localStorage.removeItem("userInfo"), q(null);
|
|
7875
7900
|
} finally {
|
|
7876
|
-
|
|
7901
|
+
R(!1);
|
|
7877
7902
|
}
|
|
7878
7903
|
}, Q = (x, k) => {
|
|
7879
7904
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
@@ -7901,7 +7926,7 @@ const Ls = [
|
|
|
7901
7926
|
tabIndex: 0,
|
|
7902
7927
|
role: "button",
|
|
7903
7928
|
"aria-haspopup": "true",
|
|
7904
|
-
"aria-expanded":
|
|
7929
|
+
"aria-expanded": I,
|
|
7905
7930
|
"aria-label": "Toggle user menu",
|
|
7906
7931
|
children: C?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
7907
7932
|
"img",
|
|
@@ -7953,7 +7978,7 @@ const Ls = [
|
|
|
7953
7978
|
tabIndex: 0,
|
|
7954
7979
|
role: "button",
|
|
7955
7980
|
"aria-haspopup": "true",
|
|
7956
|
-
"aria-expanded":
|
|
7981
|
+
"aria-expanded": I,
|
|
7957
7982
|
"aria-label": "Toggle user menu",
|
|
7958
7983
|
onMouseOver: (x) => {
|
|
7959
7984
|
x.currentTarget.style.backgroundColor = A.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
@@ -8001,7 +8026,7 @@ const Ls = [
|
|
|
8001
8026
|
]
|
|
8002
8027
|
}
|
|
8003
8028
|
),
|
|
8004
|
-
|
|
8029
|
+
I && /* @__PURE__ */ n.jsx("div", { style: O.dropdown, role: "menu", "aria-label": "User options", children: g ? /* @__PURE__ */ n.jsx("div", { style: O.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) : C ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
8005
8030
|
/* @__PURE__ */ n.jsxs("div", { style: O.userSection, children: [
|
|
8006
8031
|
C?.avatarUrl ? /* @__PURE__ */ n.jsx(
|
|
8007
8032
|
"img",
|
|
@@ -8157,8 +8182,8 @@ const Ls = [
|
|
|
8157
8182
|
email: t?.email || "",
|
|
8158
8183
|
otp: "",
|
|
8159
8184
|
appId: a
|
|
8160
|
-
}), [d, c] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g,
|
|
8161
|
-
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) +
|
|
8185
|
+
}), [d, c] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g, R) => {
|
|
8186
|
+
let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + R, B = (v >> 8 & 255) + R, F = (v & 255) + R;
|
|
8162
8187
|
return D = Math.min(255, Math.max(0, D)), B = Math.min(255, Math.max(0, B)), F = Math.min(255, Math.max(0, F)), `#${(F | B << 8 | D << 16).toString(16).padStart(6, "0")}`;
|
|
8163
8188
|
}, m = e ? {
|
|
8164
8189
|
surface: "#09090b",
|
|
@@ -8186,9 +8211,9 @@ const Ls = [
|
|
|
8186
8211
|
te(() => {
|
|
8187
8212
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8188
8213
|
}, [t?.email]);
|
|
8189
|
-
const $ = (g,
|
|
8190
|
-
u({ type: g, message:
|
|
8191
|
-
},
|
|
8214
|
+
const $ = (g, R) => {
|
|
8215
|
+
u({ type: g, message: R }), setTimeout(() => u(null), 3e3);
|
|
8216
|
+
}, I = async () => {
|
|
8192
8217
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8193
8218
|
$("error", "Please enter a valid email");
|
|
8194
8219
|
return;
|
|
@@ -8213,14 +8238,14 @@ const Ls = [
|
|
|
8213
8238
|
}
|
|
8214
8239
|
try {
|
|
8215
8240
|
y(!0);
|
|
8216
|
-
const
|
|
8217
|
-
if (
|
|
8241
|
+
const R = await M.post(`${i}/users/verify-email`, l);
|
|
8242
|
+
if (R.data.success && t) {
|
|
8218
8243
|
const v = { ...t, isVerified: !0 };
|
|
8219
|
-
s?.(v), $("success",
|
|
8244
|
+
s?.(v), $("success", R.data.message || "Email verified!"), c(!1), h({ email: t.email, otp: "", appId: a });
|
|
8220
8245
|
} else
|
|
8221
|
-
$("error",
|
|
8222
|
-
} catch (
|
|
8223
|
-
$("error",
|
|
8246
|
+
$("error", R.data.message || "Verification failed");
|
|
8247
|
+
} catch (R) {
|
|
8248
|
+
$("error", R.response?.data?.message || "Server error");
|
|
8224
8249
|
} finally {
|
|
8225
8250
|
y(!1);
|
|
8226
8251
|
}
|
|
@@ -8308,7 +8333,7 @@ const Ls = [
|
|
|
8308
8333
|
{
|
|
8309
8334
|
type: "email",
|
|
8310
8335
|
value: l.email,
|
|
8311
|
-
onChange: (g) => h((
|
|
8336
|
+
onChange: (g) => h((R) => ({ ...R, email: g.target.value })),
|
|
8312
8337
|
placeholder: "Enter your email",
|
|
8313
8338
|
style: C,
|
|
8314
8339
|
required: !0
|
|
@@ -8338,7 +8363,7 @@ const Ls = [
|
|
|
8338
8363
|
{
|
|
8339
8364
|
type: "text",
|
|
8340
8365
|
value: l.otp,
|
|
8341
|
-
onChange: (g) => h((
|
|
8366
|
+
onChange: (g) => h((R) => ({ ...R, otp: g.target.value })),
|
|
8342
8367
|
placeholder: "Enter OTP",
|
|
8343
8368
|
style: C,
|
|
8344
8369
|
required: !0
|
|
@@ -8353,7 +8378,7 @@ const Ls = [
|
|
|
8353
8378
|
"button",
|
|
8354
8379
|
{
|
|
8355
8380
|
type: "button",
|
|
8356
|
-
onClick:
|
|
8381
|
+
onClick: I,
|
|
8357
8382
|
disabled: b,
|
|
8358
8383
|
style: q(b),
|
|
8359
8384
|
children: [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const s=new this(e);return r.forEach(a=>s.set(a)),s}static accessor(e){const s=(this[Pt]=this[Pt]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=Ce(o);s[l]||(dn(a,o),s[l]=!0)}return p.isArray(e)?e.forEach(i):i(e),this}};ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(ne.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}}),p.freezeMethods(ne);function Xe(t,e){const r=this||ke,s=e||r,a=ne.from(s.headers);let i=s.data;return p.forEach(t,function(l){i=l.call(r,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function Ot(t){return!!(t&&t.__CANCEL__)}function be(t,e,r){D.call(this,t??"canceled",D.ERR_CANCELED,e,r),this.name="CanceledError"}p.inherits(be,D,{__CANCEL__:!0});function Rt(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new D("Request failed with status code "+r.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function un(t,e){t=t||10;const r=new Array(t),s=new Array(t);let a=0,i=0,o;return e=e!==void 0?e:1e3,function(h){const d=Date.now(),c=s[i];o||(o=d),r[a]=h,s[a]=d;let b=i,y=0;for(;b!==a;)y+=r[b++],b=b%t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),d-o<e)return;const S=c&&d-c;return S?Math.round(y*1e3/S):void 0}}function pn(t,e){let r=0,s=1e3/e,a,i;const o=(d,c=Date.now())=>{r=c,a=null,i&&(clearTimeout(i),i=null),t(...d)};return[(...d)=>{const c=Date.now(),b=c-r;b>=s?o(d,c):(a=d,i||(i=setTimeout(()=>{i=null,o(a)},s-b)))},()=>a&&o(a)]}const Ue=(t,e,r=3)=>{let s=0;const a=un(50,250);return pn(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,h=o-s,d=a(h),c=o<=l;s=o;const b={loaded:o,total:l,progress:l?o/l:void 0,bytes:h,rate:d||void 0,estimated:d&&l&&c?(l-o)/d:void 0,event:i,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(b)},r)},At=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},zt=t=>(...e)=>p.asap(()=>t(...e)),fn=ee.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,ee.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(ee.origin),ee.navigator&&/(msie|trident)/i.test(ee.navigator.userAgent)):()=>!0,xn=ee.hasStandardBrowserEnv?{write(t,e,r,s,a,i){const o=[t+"="+encodeURIComponent(e)];p.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),p.isString(s)&&o.push("path="+s),p.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function gn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _t(t,e,r){let s=!hn(e);return t&&(s||r==!1)?gn(t,e):e}const $t=t=>t instanceof ne?{...t}:t;function fe(t,e){e=e||{};const r={};function s(d,c,b,y){return p.isPlainObject(d)&&p.isPlainObject(c)?p.merge.call({caseless:y},d,c):p.isPlainObject(c)?p.merge({},c):p.isArray(c)?c.slice():c}function a(d,c,b,y){if(p.isUndefined(c)){if(!p.isUndefined(d))return s(void 0,d,b,y)}else return s(d,c,b,y)}function i(d,c){if(!p.isUndefined(c))return s(void 0,c)}function o(d,c){if(p.isUndefined(c)){if(!p.isUndefined(d))return s(void 0,d)}else return s(void 0,c)}function l(d,c,b){if(b in e)return s(d,c);if(b in t)return s(void 0,d)}const h={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,c,b)=>a($t(d),$t(c),b,!0)};return p.forEach(Object.keys({...t,...e}),function(c){const b=h[c]||a,y=b(t[c],e[c],c);p.isUndefined(y)&&b!==l||(r[c]=y)}),r}const Nt=t=>{const e=fe({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:l}=e;if(e.headers=o=ne.from(o),e.url=kt(_t(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),p.isFormData(r)){if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(p.isFunction(r.getHeaders)){const h=r.getHeaders(),d=["content-type","content-length"];Object.entries(h).forEach(([c,b])=>{d.includes(c.toLowerCase())&&o.set(c,b)})}}if(ee.hasStandardBrowserEnv&&(s&&p.isFunction(s)&&(s=s(e)),s||s!==!1&&fn(e.url))){const h=a&&i&&xn.read(i);h&&o.set(a,h)}return e},mn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,s){const a=Nt(t);let i=a.data;const o=ne.from(a.headers).normalize();let{responseType:l,onUploadProgress:h,onDownloadProgress:d}=a,c,b,y,S,u;function j(){S&&S(),u&&u(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(a.method.toUpperCase(),a.url,!0),m.timeout=a.timeout;function _(){if(!m)return;const z=ne.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),q={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:z,config:t,request:m};Rt(function(O){r(O),j()},function(O){s(O),j()},q),m=null}"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(_)},m.onabort=function(){m&&(s(new D("Request aborted",D.ECONNABORTED,t,m)),m=null)},m.onerror=function(T){const q=T&&T.message?T.message:"Network Error",g=new D(q,D.ERR_NETWORK,t,m);g.event=T||null,s(g),m=null},m.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const q=a.transitional||Tt;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),s(new D(T,q.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&p.forEach(o.toJSON(),function(T,q){m.setRequestHeader(q,T)}),p.isUndefined(a.withCredentials)||(m.withCredentials=!!a.withCredentials),l&&l!=="json"&&(m.responseType=a.responseType),d&&([y,u]=Ue(d,!0),m.addEventListener("progress",y)),h&&m.upload&&([b,S]=Ue(h),m.upload.addEventListener("progress",b),m.upload.addEventListener("loadend",S)),(a.cancelToken||a.signal)&&(c=z=>{m&&(s(!z||z.type?new be(null,t,m):z),m.abort(),m=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const P=cn(a.url);if(P&&ee.protocols.indexOf(P)===-1){s(new D("Unsupported protocol "+P+":",D.ERR_BAD_REQUEST,t));return}m.send(i||null)})},yn=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,a;const i=function(d){if(!a){a=!0,l();const c=d instanceof Error?d:this.reason;s.abort(c instanceof D?c:new be(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{o=null,i(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),t=null)};t.forEach(d=>d.addEventListener("abort",i));const{signal:h}=s;return h.unsubscribe=()=>p.asap(l),h}},bn=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,a;for(;s<r;)a=s+e,yield t.slice(s,a),s=a},wn=async function*(t,e){for await(const r of Sn(t))yield*bn(r,e)},Sn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},Ut=(t,e,r,s)=>{const a=wn(t,e);let i=0,o,l=h=>{o||(o=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:d,value:c}=await a.next();if(d){l(),h.close();return}let b=c.byteLength;if(r){let y=i+=b;r(y)}h.enqueue(new Uint8Array(c))}catch(d){throw l(d),d}},cancel(h){return l(h),a.return()}},{highWaterMark:2})},Dt=64*1024,{isFunction:De}=p,jn=(({Request:t,Response:e})=>({Request:t,Response:e}))(p.global),{ReadableStream:Lt,TextEncoder:Ft}=p.global,qt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},vn=t=>{t=p.merge.call({skipUndefined:!0},jn,t);const{fetch:e,Request:r,Response:s}=t,a=e?De(e):typeof fetch=="function",i=De(r),o=De(s);if(!a)return!1;const l=a&&De(Lt),h=a&&(typeof Ft=="function"?(u=>j=>u.encode(j))(new Ft):async u=>new Uint8Array(await new r(u).arrayBuffer())),d=i&&l&&qt(()=>{let u=!1;const j=new r(ee.origin,{body:new Lt,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!j}),c=o&&l&&qt(()=>p.isReadableStream(new s("").body)),b={stream:c&&(u=>u.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!b[u]&&(b[u]=(j,m)=>{let _=j&&j[u];if(_)return _.call(j);throw new D(`Response type '${u}' is not supported`,D.ERR_NOT_SUPPORT,m)})});const y=async u=>{if(u==null)return 0;if(p.isBlob(u))return u.size;if(p.isSpecCompliantForm(u))return(await new r(ee.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(p.isArrayBufferView(u)||p.isArrayBuffer(u))return u.byteLength;if(p.isURLSearchParams(u)&&(u=u+""),p.isString(u))return(await h(u)).byteLength},S=async(u,j)=>{const m=p.toFiniteNumber(u.getContentLength());return m??y(j)};return async u=>{let{url:j,method:m,data:_,signal:P,cancelToken:z,timeout:T,onDownloadProgress:q,onUploadProgress:g,responseType:O,headers:v,withCredentials:U="same-origin",fetchOptions:B}=Nt(u),F=e||fetch;O=O?(O+"").toLowerCase():"text";let V=yn([P,z&&z.toAbortSignal()],T),Z=null;const I=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let J;try{if(g&&d&&m!=="get"&&m!=="head"&&(J=await S(v,_))!==0){let f=new r(j,{method:"POST",body:_,duplex:"half"}),E;if(p.isFormData(_)&&(E=f.headers.get("content-type"))&&v.setContentType(E),f.body){const[x,k]=At(J,Ue(zt(g)));_=Ut(f.body,Dt,x,k)}}p.isString(U)||(U=U?"include":"omit");const A=i&&"credentials"in r.prototype,R={...B,signal:V,method:m.toUpperCase(),headers:v.normalize().toJSON(),body:_,duplex:"half",credentials:A?U:void 0};Z=i&&new r(j,R);let K=await(i?F(Z,B):F(j,R));const te=c&&(O==="stream"||O==="response");if(c&&(q||te&&I)){const f={};["status","statusText","headers"].forEach($=>{f[$]=K[$]});const E=p.toFiniteNumber(K.headers.get("content-length")),[x,k]=q&&At(E,Ue(zt(q),!0))||[];K=new s(Ut(K.body,Dt,x,()=>{k&&k(),I&&I()}),f)}O=O||"text";let G=await b[p.findKey(b,O)||"text"](K,u);return!te&&I&&I(),await new Promise((f,E)=>{Rt(f,E,{data:G,headers:ne.from(K.headers),status:K.status,statusText:K.statusText,config:u,request:Z})})}catch(A){throw I&&I(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,u,Z),{cause:A.cause||A}):D.from(A,A&&A.code,u,Z)}}},En=new Map,Mt=t=>{let e=t?t.env:{};const{fetch:r,Request:s,Response:a}=e,i=[s,a,r];let o=i.length,l=o,h,d,c=En;for(;l--;)h=i[l],d=c.get(h),d===void 0&&c.set(h,d=l?new Map:vn(e)),c=d;return d};Mt();const Ze={http:Hr,xhr:mn,fetch:{get:Mt}};p.forEach(Ze,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Bt=t=>`- ${t}`,kn=t=>p.isFunction(t)||t===null||t===!1,Wt={getAdapter:(t,e)=>{t=p.isArray(t)?t:[t];const{length:r}=t;let s,a;const i={};for(let o=0;o<r;o++){s=t[o];let l;if(a=s,!kn(s)&&(a=Ze[(l=String(s)).toLowerCase()],a===void 0))throw new D(`Unknown adapter '${l}'`);if(a&&(p.isFunction(a)||(a=a.get(e))))break;i[l||"#"+o]=a}if(!a){const o=Object.entries(i).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since :
|
|
4
4
|
`+o.map(Bt).join(`
|
|
5
5
|
`):" "+Bt(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a},adapters:Ze};function Qe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new be(null,t)}function Ht(t){return Qe(t),t.headers=ne.from(t.headers),t.data=Xe.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wt.getAdapter(t.adapter||ke.adapter,t)(t).then(function(s){return Qe(t),s.data=Xe.call(t,t.transformResponse,s),s.headers=ne.from(s.headers),s},function(s){return Ot(s)||(Qe(t),s&&s.response&&(s.response.data=Xe.call(t,t.transformResponse,s.response),s.response.headers=ne.from(s.response.headers))),Promise.reject(s)})}const Vt="1.12.2",Le={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Le[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Yt={};Le.transitional=function(e,r,s){function a(i,o){return"[Axios v"+Vt+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(e===!1)throw new D(a(o," has been removed"+(r?" in "+r:"")),D.ERR_DEPRECATED);return r&&!Yt[o]&&(Yt[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,l):!0}},Le.spelling=function(e){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Cn(t,e,r){if(typeof t!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let a=s.length;for(;a-- >0;){const i=s[a],o=e[i];if(o){const l=t[i],h=l===void 0||o(l,i,t);if(h!==!0)throw new D("option "+i+" must be "+h,D.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}}const Fe={assertOptions:Cn,validators:Le},ie=Fe.validators;let xe=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ct,response:new Ct}}async request(e,r){try{return await this._request(e,r)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
-
`+i):s.stack=i}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=fe(this.defaults,r);const{transitional:s,paramsSerializer:a,headers:i}=r;s!==void 0&&Fe.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),a!=null&&(p.isFunction(a)?r.paramsSerializer={serialize:a}:Fe.assertOptions(a,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Fe.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),r.headers=ne.concat(o,i);const l=[];let h=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(r)===!1||(h=h&&j.synchronous,l.unshift(j.fulfilled,j.rejected))});const d=[];this.interceptors.response.forEach(function(j){d.push(j.fulfilled,j.rejected)});let c,b=0,y;if(!h){const u=[Ht.bind(this),void 0];for(u.unshift(...l),u.push(...d),y=u.length,c=Promise.resolve(r);b<y;)c=c.then(u[b++],u[b++]);return c}y=l.length;let S=r;for(;b<y;){const u=l[b++],j=l[b++];try{S=u(S)}catch(m){j.call(this,m);break}}try{c=Ht.call(this,S)}catch(u){return Promise.reject(u)}for(b=0,y=d.length;b<y;)c=c.then(d[b++],d[b++]);return c}getUri(e){e=fe(this.defaults,e);const r=_t(e.baseURL,e.url,e.allowAbsoluteUrls);return kt(r,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){xe.prototype[e]=function(r,s){return this.request(fe(s||{},{method:e,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function r(s){return function(i,o,l){return this.request(fe(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xe.prototype[e]=r(),xe.prototype[e+"Form"]=r(!0)});let Tn=class or{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(a);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,l){s.reason||(s.reason=new be(i,o,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new or(function(a){e=a}),cancel:e}}};function In(t){return function(r){return t.apply(null,r)}}function Pn(t){return p.isObject(t)&&t.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([t,e])=>{et[e]=t});function Kt(t){const e=new xe(t),r=ct(xe.prototype.request,e);return p.extend(r,xe.prototype,e,{allOwnKeys:!0}),p.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return Kt(fe(t,a))},r}const M=Kt(ke);M.Axios=xe,M.CanceledError=be,M.CancelToken=Tn,M.isCancel=Ot,M.VERSION=Vt,M.toFormData=$e,M.AxiosError=D,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=In,M.isAxiosError=Pn,M.mergeConfig=fe,M.AxiosHeaders=ne,M.formToJSON=t=>It(p.isHTMLForm(t)?new FormData(t):t),M.getAdapter=Wt.getAdapter,M.HttpStatusCode=et,M.default=M;const{Axios:bs,AxiosError:ws,CanceledError:Ss,isCancel:js,CancelToken:vs,VERSION:Es,all:ks,Cancel:Cs,isAxiosError:Ts,spread:Is,toFormData:Ps,AxiosHeaders:Os,HttpStatusCode:Rs,formToJSON:As,getAdapter:zs,mergeConfig:_s}=M;class On{baseUrl;apiKey;appId;client;constructor(e){if(!e||!e.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey||null,this.appId=e.appId||null,this.client=M.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:1e4})}async request(e,r,s,a={}){if(!e)throw new Error("HTTP method is required");if(!r)throw new Error("Request path is required");try{const i={...this.appId?{appId:this.appId}:{},...s||{}};return(await this.client.request({url:r,method:e,data:i,headers:a})).data}catch(i){if(console.error("❌ [Request Error]:",i),i.isAxiosError){const o=i.response?.status||0,l=i.response?.data?.message||i.message||"Unknown Axios error occurred";throw new Error(`Request failed (${o}): ${l}`)}throw new Error(`Unexpected error: ${i.message||"Unknown failure"}`)}}async signup(e){const{name:r,email:s,password:a}=e;if(!r||!s||!a)throw new Error("signup: 'name', 'email', and 'password' are required");return this.request("POST","/users/signup",e)}async login(e){const{email:r,password:s,appId:a}=e;if(!r||!s)throw new Error("login: 'email' and 'password' are required");return this.request("POST","/users/login",{email:r,password:s,appId:a||this.appId})}async updateUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("updateUser: 'userId' is required");return this.request("PUT",`/users/update/${r}`,{...e,appId:s||this.appId})}async changePassword(e){const{userId:r,currentPassword:s,newPassword:a,appId:i}=e;if(!r)throw new Error("changePassword: 'userId' is required");if(!s||!a)throw new Error("changePassword: both 'currentPassword' and 'newPassword' are required");return this.request("PUT",`/users/change-password/${r}`,{currentPassword:s,newPassword:a,appId:i||this.appId})}async deleteUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("deleteUser: 'userId' is required");return this.request("DELETE",`/users/delete/${r}`,{appId:s||this.appId})}async getProfile(e){const{token:r}=e;if(!r)throw new Error("getProfile: 'token' is required");return this.request("GET","/users/profile",{},{Authorization:`Bearer ${r}`})}async sendVerifyOTP(e){const{token:r,appId:s}=e;if(!r)throw new Error("sendVerifyOTP: 'token' is required");return this.request("POST","/users/send-verify-otp",{appId:s||this.appId},{Authorization:`Bearer ${r}`})}async verifyEmail(e){const{token:r,otp:s,appId:a}=e;if(!r)throw new Error("verifyEmail: 'token' is required");if(!s)throw new Error("verifyEmail: 'otp' is required");return this.request("POST","/users/verify-email",{otp:s,appId:a||this.appId},{Authorization:`Bearer ${r}`})}async forgotPassword(e){const{email:r,appId:s}=e;if(!r)throw new Error("forgotPassword: 'email' is required");return this.request("POST","/users/forgot-password",{email:r,appId:s||this.appId})}async resetPassword(e){const{email:r,otp:s,newPassword:a,appId:i}=e;if(!r||!s||!a)throw new Error("resetPassword: 'email', 'otp' and 'newPassword' are required");return this.request("POST","/users/reset-password",{email:r,otp:s,newPassword:a,appId:i||this.appId})}async checkUser(e){if(!e)throw new Error("checkUser: 'userId' is required");if(!this.appId)throw new Error("checkUser: SDK 'appId' is missing in config");return this.request("GET",`/users/check-user/${e}?appId=${this.appId}`)}async searchAllUsersData(e){if(!this.appId)throw new Error("searchAllUsersData: appId missing");const r=new URLSearchParams(e).toString();return this.request("GET",`/users/${this.appId}/data/search?${r}`)}async searchUserData(e){const{userId:r,...s}=e;if(!r)throw new Error("userId required");const a=new URLSearchParams(s).toString();return this.request("GET",`/users/${r}/data/search?${a}`)}async searchUserDataByKeys(e){const{userId:r,...s}=e;if(!r)throw new Error("searchUserDataByKeys: 'userId' is required");const a=new URLSearchParams(Object.entries(s).reduce((i,[o,l])=>(l!=null&&(i[o]=String(l)),i),{})).toString();return this.request("GET",`/users/${r}/data/searchbyref?${a}`)}async searchAllUsersDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAllUsersDataByKeys: 'appId' is required on SDK initialization");const s=new URLSearchParams(Object.entries(e).reduce((a,[i,o])=>(o!=null&&(a[i]=String(o)),a),{})).toString();return this.request("GET",`/users/${encodeURIComponent(r)}/data/searchbyref/all?${s}`)}async getAllUsersData(){if(!this.appId)throw new Error("getAllUsersData: SDK 'appId' is missing in config");return this.request("GET",`/users/all-data/${this.appId}/data`)}async getUserData(e){const{userId:r}=e;if(!r)throw new Error("getUserData: 'userId' is required");return this.request("GET",`/users/${r}/data`)}async getSingleUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("getSingleUserData: 'userId' and 'dataId' are required");return this.request("GET",`/users/${r}/data/${s}`)}async addUserData(e){const{userId:r,dataCategory:s,data:a}=e;if(!r)throw new Error("addUserData: 'userId' is required");if(!s)throw new Error("addUserData: 'dataCategory' is required");if(!a)throw new Error("addUserData: 'data' is required");return this.request("POST",`/users/${r}/data`,{dataCategory:s,...a})}async updateUserData(e){const{userId:r,dataId:s,data:a}=e;if(!r||!s)throw new Error("updateUserData: 'userId' and 'dataId' are required");if(!a)throw new Error("updateUserData: 'data' is required");return this.request("PUT",`/users/${r}/data/${s}`,a)}async deleteUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("deleteUserData: 'userId' and 'dataId' are required");return this.request("DELETE",`/users/${r}/data/${s}`)}async getAppData(e){const r=this.appId;if(!r)throw new Error("getAppData: 'appId' is required");const s=e?`?category=${encodeURIComponent(e)}`:"";return(await this.request("GET",`/app/${r}/data${s}`))?.data||[]}async getSingleAppData(e){const r=this.appId;if(!r)throw new Error("getSingleAppData: 'appId' is required");if(!e.dataId)throw new Error("getSingleAppData: 'dataId' is required");return(await this.request("GET",`/app/${r}/data/${e.dataId}`))?.data}async searchAppDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAppDataByKeys: 'appId' is required");if(!e||typeof e!="object")throw new Error("searchAppDataByKeys: params object is required");return(await this.request("POST",`/app/${encodeURIComponent(r)}/data/search/bykeys`,e))?.data||[]}async addAppData(e){const r=this.appId;if(!r)throw new Error("addAppData: 'appId' is required");const{dataCategory:s,data:a}=e;if(!s)throw new Error("addAppData: 'dataCategory' is required");if(!a||typeof a!="object")throw new Error("addAppData: 'data' is required");return(await this.request("POST",`/app/${r}/data/${encodeURIComponent(s)}`,{item:a}))?.data}async updateAppData(e){const r=this.appId;if(!r)throw new Error("updateAppData: 'appId' is required");if(!e.dataId)throw new Error("updateAppData: 'dataId' is required");if(!e.data)throw new Error("updateAppData: 'data' is required");return(await this.request("PATCH",`/app/${r}/data/${e.dataId}`,e.data))?.data}async deleteAppData(e){const r=this.appId;if(!r)throw new Error("deleteAppData: 'appId' is required");if(!e.dataId)throw new Error("deleteAppData: 'dataId' is required");return(await this.request("DELETE",`/app/${r}/data/${e.dataId}`))?.data}}var qe={exports:{}},Te={};/**
|
|
6
|
+
`+i):s.stack=i}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=fe(this.defaults,r);const{transitional:s,paramsSerializer:a,headers:i}=r;s!==void 0&&Fe.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),a!=null&&(p.isFunction(a)?r.paramsSerializer={serialize:a}:Fe.assertOptions(a,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Fe.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),r.headers=ne.concat(o,i);const l=[];let h=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(r)===!1||(h=h&&j.synchronous,l.unshift(j.fulfilled,j.rejected))});const d=[];this.interceptors.response.forEach(function(j){d.push(j.fulfilled,j.rejected)});let c,b=0,y;if(!h){const u=[Ht.bind(this),void 0];for(u.unshift(...l),u.push(...d),y=u.length,c=Promise.resolve(r);b<y;)c=c.then(u[b++],u[b++]);return c}y=l.length;let S=r;for(;b<y;){const u=l[b++],j=l[b++];try{S=u(S)}catch(m){j.call(this,m);break}}try{c=Ht.call(this,S)}catch(u){return Promise.reject(u)}for(b=0,y=d.length;b<y;)c=c.then(d[b++],d[b++]);return c}getUri(e){e=fe(this.defaults,e);const r=_t(e.baseURL,e.url,e.allowAbsoluteUrls);return kt(r,e.params,e.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(e){xe.prototype[e]=function(r,s){return this.request(fe(s||{},{method:e,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function r(s){return function(i,o,l){return this.request(fe(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}xe.prototype[e]=r(),xe.prototype[e+"Form"]=r(!0)});let Tn=class or{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(a);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,l){s.reason||(s.reason=new be(i,o,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new or(function(a){e=a}),cancel:e}}};function In(t){return function(r){return t.apply(null,r)}}function Pn(t){return p.isObject(t)&&t.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([t,e])=>{et[e]=t});function Kt(t){const e=new xe(t),r=ct(xe.prototype.request,e);return p.extend(r,xe.prototype,e,{allOwnKeys:!0}),p.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return Kt(fe(t,a))},r}const M=Kt(ke);M.Axios=xe,M.CanceledError=be,M.CancelToken=Tn,M.isCancel=Ot,M.VERSION=Vt,M.toFormData=$e,M.AxiosError=D,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=In,M.isAxiosError=Pn,M.mergeConfig=fe,M.AxiosHeaders=ne,M.formToJSON=t=>It(p.isHTMLForm(t)?new FormData(t):t),M.getAdapter=Wt.getAdapter,M.HttpStatusCode=et,M.default=M;const{Axios:bs,AxiosError:ws,CanceledError:Ss,isCancel:js,CancelToken:vs,VERSION:Es,all:ks,Cancel:Cs,isAxiosError:Ts,spread:Is,toFormData:Ps,AxiosHeaders:Os,HttpStatusCode:Rs,formToJSON:As,getAdapter:zs,mergeConfig:_s}=M;class On{baseUrl;apiKey;appId;client;constructor(e){if(!e||!e.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey||null,this.appId=e.appId||null,this.client=M.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:3e4,withCredentials:!0})}async request(e,r,s,a={}){if(!e)throw new Error("HTTP method is required");if(!r)throw new Error("Request path is required");try{const i={...this.appId?{appId:this.appId}:{},...s||{}};return(await this.client.request({url:r,method:e,data:i,headers:a})).data}catch(i){if(console.error("❌ [Request Error]:",i),i.isAxiosError){const o=i.response?.status||0,l=i.response?.data?.message||i.message||"Unknown Axios error occurred";throw new Error(`Request failed (${o}): ${l}`)}throw new Error(`Unexpected error: ${i.message||"Unknown failure"}`)}}async signup(e){const{name:r,email:s,password:a}=e;if(!r||!s||!a)throw new Error("signup: 'name', 'email', and 'password' are required");return this.request("POST","/users/signup",e)}async login(e){const{email:r,password:s,appId:a}=e;if(!r||!s)throw new Error("login: 'email' and 'password' are required");return this.request("POST","/users/login",{email:r,password:s,appId:a||this.appId})}async checkSession(){if(typeof window>"u")return{authenticated:!1};const e=localStorage.getItem("authix_token");if(!e||e==="undefined"||e==="null")return{authenticated:!1};try{return await this.request("GET","/users/session",void 0,{Authorization:`Bearer ${e}`})}catch{return{authenticated:!1}}}async updateUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("updateUser: 'userId' is required");return this.request("PUT",`/users/update/${r}`,{...e,appId:s||this.appId})}async changePassword(e){const{userId:r,currentPassword:s,newPassword:a,appId:i}=e;if(!r)throw new Error("changePassword: 'userId' is required");if(!s||!a)throw new Error("changePassword: both 'currentPassword' and 'newPassword' are required");return this.request("PUT",`/users/change-password/${r}`,{currentPassword:s,newPassword:a,appId:i||this.appId})}async deleteUser(e){const{userId:r,appId:s}=e;if(!r)throw new Error("deleteUser: 'userId' is required");return this.request("DELETE",`/users/delete/${r}`,{appId:s||this.appId})}async getProfile(e){const{token:r}=e;if(!r)throw new Error("getProfile: 'token' is required");return this.request("GET","/users/profile",{},{Authorization:`Bearer ${r}`})}async sendVerifyOTP(e){const{token:r,appId:s}=e;if(!r)throw new Error("sendVerifyOTP: 'token' is required");return this.request("POST","/users/send-verify-otp",{appId:s||this.appId},{Authorization:`Bearer ${r}`})}async verifyEmail(e){const{token:r,otp:s,appId:a}=e;if(!r)throw new Error("verifyEmail: 'token' is required");if(!s)throw new Error("verifyEmail: 'otp' is required");return this.request("POST","/users/verify-email",{otp:s,appId:a||this.appId},{Authorization:`Bearer ${r}`})}async forgotPassword(e){const{email:r,appId:s}=e;if(!r)throw new Error("forgotPassword: 'email' is required");return this.request("POST","/users/forgot-password",{email:r,appId:s||this.appId})}async resetPassword(e){const{email:r,otp:s,newPassword:a,appId:i}=e;if(!r||!s||!a)throw new Error("resetPassword: 'email', 'otp' and 'newPassword' are required");return this.request("POST","/users/reset-password",{email:r,otp:s,newPassword:a,appId:i||this.appId})}async checkUser(e){if(!e)throw new Error("checkUser: 'userId' is required");if(!this.appId)throw new Error("checkUser: SDK 'appId' is missing in config");return this.request("GET",`/users/check-user/${e}?appId=${this.appId}`)}async searchAllUsersData(e){if(!this.appId)throw new Error("searchAllUsersData: appId missing");const r=new URLSearchParams(e).toString();return this.request("GET",`/users/${this.appId}/data/search?${r}`)}async searchUserData(e){const{userId:r,...s}=e;if(!r)throw new Error("userId required");const a=new URLSearchParams(s).toString();return this.request("GET",`/users/${r}/data/search?${a}`)}async searchUserDataByKeys(e){const{userId:r,...s}=e;if(!r)throw new Error("searchUserDataByKeys: 'userId' is required");const a=new URLSearchParams(Object.entries(s).reduce((i,[o,l])=>(l!=null&&(i[o]=String(l)),i),{})).toString();return this.request("GET",`/users/${r}/data/searchbyref?${a}`)}async searchAllUsersDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAllUsersDataByKeys: 'appId' is required on SDK initialization");const s=new URLSearchParams(Object.entries(e).reduce((a,[i,o])=>(o!=null&&(a[i]=String(o)),a),{})).toString();return this.request("GET",`/users/${encodeURIComponent(r)}/data/searchbyref/all?${s}`)}async getAllUsersData(){if(!this.appId)throw new Error("getAllUsersData: SDK 'appId' is missing in config");return this.request("GET",`/users/all-data/${this.appId}/data`)}async getUserData(e){const{userId:r}=e;if(!r)throw new Error("getUserData: 'userId' is required");return this.request("GET",`/users/${r}/data`)}async getSingleUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("getSingleUserData: 'userId' and 'dataId' are required");return this.request("GET",`/users/${r}/data/${s}`)}async addUserData(e){const{userId:r,dataCategory:s,data:a}=e;if(!r)throw new Error("addUserData: 'userId' is required");if(!s)throw new Error("addUserData: 'dataCategory' is required");if(!a)throw new Error("addUserData: 'data' is required");return this.request("POST",`/users/${r}/data`,{dataCategory:s,...a})}async updateUserData(e){const{userId:r,dataId:s,data:a}=e;if(!r||!s)throw new Error("updateUserData: 'userId' and 'dataId' are required");if(!a)throw new Error("updateUserData: 'data' is required");return this.request("PUT",`/users/${r}/data/${s}`,a)}async deleteUserData(e){const{userId:r,dataId:s}=e;if(!r||!s)throw new Error("deleteUserData: 'userId' and 'dataId' are required");return this.request("DELETE",`/users/${r}/data/${s}`)}async getAppData(e){const r=this.appId;if(!r)throw new Error("getAppData: 'appId' is required");const s=e?`?category=${encodeURIComponent(e)}`:"";return(await this.request("GET",`/app/${r}/data${s}`))?.data||[]}async getSingleAppData(e){const r=this.appId;if(!r)throw new Error("getSingleAppData: 'appId' is required");if(!e.dataId)throw new Error("getSingleAppData: 'dataId' is required");return(await this.request("GET",`/app/${r}/data/${e.dataId}`))?.data}async searchAppDataByKeys(e){const r=this.appId;if(!r)throw new Error("searchAppDataByKeys: 'appId' is required");if(!e||typeof e!="object")throw new Error("searchAppDataByKeys: params object is required");return(await this.request("POST",`/app/${encodeURIComponent(r)}/data/search/bykeys`,e))?.data||[]}async addAppData(e){const r=this.appId;if(!r)throw new Error("addAppData: 'appId' is required");const{dataCategory:s,data:a}=e;if(!s)throw new Error("addAppData: 'dataCategory' is required");if(!a||typeof a!="object")throw new Error("addAppData: 'data' is required");return(await this.request("POST",`/app/${r}/data/${encodeURIComponent(s)}`,{item:a}))?.data}async updateAppData(e){const r=this.appId;if(!r)throw new Error("updateAppData: 'appId' is required");if(!e.dataId)throw new Error("updateAppData: 'dataId' is required");if(!e.data)throw new Error("updateAppData: 'data' is required");return(await this.request("PATCH",`/app/${r}/data/${e.dataId}`,e.data))?.data}async deleteAppData(e){const r=this.appId;if(!r)throw new Error("deleteAppData: 'appId' is required");if(!e.dataId)throw new Error("deleteAppData: 'dataId' is required");return(await this.request("DELETE",`/app/${r}/data/${e.dataId}`))?.data}}var qe={exports:{}},Te={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
9
9
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AuthixLike {
|
|
3
|
+
checkSession: () => Promise<{
|
|
4
|
+
authenticated: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
}
|
|
7
|
+
export declare const AuthixProvider: ({ authix, children, }: {
|
|
8
|
+
authix: AuthixLike;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const useAuthix: () => AuthixLike;
|
|
12
|
+
//# sourceMappingURL=AuthixProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthixProvider.d.ts","sourceRoot":"","sources":["../../../src/react/Provider/AuthixProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,OAAO,CAAC;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACzD;AAID,eAAO,MAAM,cAAc,GAAI,uBAG5B;IACD,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAMA,CAAC;AAEF,eAAO,MAAM,SAAS,kBAQrB,CAAC"}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -111,6 +111,10 @@ interface CheckUserResponse {
|
|
|
111
111
|
success: boolean;
|
|
112
112
|
exists: boolean;
|
|
113
113
|
}
|
|
114
|
+
interface CheckSessionResponse {
|
|
115
|
+
authenticated: boolean;
|
|
116
|
+
user?: Record<string, any>;
|
|
117
|
+
}
|
|
114
118
|
export interface AppDataItem {
|
|
115
119
|
id: string;
|
|
116
120
|
[key: string]: any;
|
|
@@ -156,6 +160,11 @@ export declare class NeuctraAuthix {
|
|
|
156
160
|
* @param params login details
|
|
157
161
|
*/
|
|
158
162
|
login(params: LoginParams): Promise<any>;
|
|
163
|
+
/**
|
|
164
|
+
* 🔐 Check current authentication session (cookie-based)
|
|
165
|
+
* Automatically detects logged-in / logged-out state
|
|
166
|
+
*/
|
|
167
|
+
checkSession(): Promise<CheckSessionResponse>;
|
|
159
168
|
/**
|
|
160
169
|
* Update an existing user
|
|
161
170
|
* @param params fields to update
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,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