@neuctra/authix 1.2.15 → 1.2.16

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.
@@ -4,23 +4,23 @@ function At(t, e) {
4
4
  return t.apply(e, arguments);
5
5
  };
6
6
  }
7
- const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: _t } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
7
+ const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: Ut } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
8
8
  const n = ur.call(e);
9
9
  return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
10
10
  })(/* @__PURE__ */ Object.create(null)), ae = (t) => (t = t.toLowerCase(), (e) => Le(e) === t), qe = (t) => (e) => typeof e === t, { isArray: je } = Array, be = qe("undefined");
11
11
  function Te(t) {
12
12
  return t !== null && !be(t) && t.constructor !== null && !be(t.constructor) && te(t.constructor.isBuffer) && t.constructor.isBuffer(t);
13
13
  }
14
- const Ut = ae("ArrayBuffer");
14
+ const _t = ae("ArrayBuffer");
15
15
  function pr(t) {
16
16
  let e;
17
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ut(t.buffer), e;
17
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && _t(t.buffer), e;
18
18
  }
19
- const fr = qe("string"), te = qe("function"), Dt = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, _e = (t) => {
19
+ const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, Ue = (t) => {
20
20
  if (Le(t) !== "object")
21
21
  return !1;
22
22
  const e = rt(t);
23
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(Fe in t);
23
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ut in t) && !(Fe in t);
24
24
  }, hr = (t) => {
25
25
  if (!Re(t) || Te(t))
26
26
  return !1;
@@ -50,7 +50,7 @@ function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
50
50
  c = a[s], e.call(null, t[c], c, t);
51
51
  }
52
52
  }
53
- function $t(t, e) {
53
+ function Dt(t, e) {
54
54
  if (Te(t))
55
55
  return null;
56
56
  e = e.toLowerCase();
@@ -64,8 +64,8 @@ function $t(t, e) {
64
64
  const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Nt = (t) => !be(t) && t !== fe;
65
65
  function Ge() {
66
66
  const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (i, a) => {
67
- const o = t && $t(n, a) || a;
68
- _e(n[o]) && _e(i) ? n[o] = Ge(n[o], i) : _e(i) ? n[o] = Ge({}, i) : je(i) ? n[o] = i.slice() : (!e || !be(i)) && (n[o] = i);
67
+ const o = t && Dt(n, a) || a;
68
+ Ue(n[o]) && Ue(i) ? n[o] = Ge(n[o], i) : Ue(i) ? n[o] = Ge({}, i) : je(i) ? n[o] = i.slice() : (!e || !be(i)) && (n[o] = i);
69
69
  };
70
70
  for (let i = 0, a = arguments.length; i < a; i++)
71
71
  arguments[i] && Pe(arguments[i], s);
@@ -95,25 +95,25 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
95
95
  if (!t) return null;
96
96
  if (je(t)) return t;
97
97
  let e = t.length;
98
- if (!Dt(e)) return null;
98
+ if (!$t(e)) return null;
99
99
  const n = new Array(e);
100
100
  for (; e-- > 0; )
101
101
  n[e] = t[e];
102
102
  return n;
103
- }, _r = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), Ur = (t, e) => {
103
+ }, Ur = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), _r = (t, e) => {
104
104
  const s = (t && t[Fe]).call(t);
105
105
  let i;
106
106
  for (; (i = s.next()) && !i.done; ) {
107
107
  const a = i.value;
108
108
  e.call(t, a[0], a[1]);
109
109
  }
110
- }, Dr = (t, e) => {
110
+ }, $r = (t, e) => {
111
111
  let n;
112
112
  const s = [];
113
113
  for (; (n = t.exec(e)) !== null; )
114
114
  s.push(n);
115
115
  return s;
116
- }, $r = ae("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
116
+ }, Dr = ae("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
117
117
  /[-_\s]([a-z\d])(\w*)/g,
118
118
  function(n, s, i) {
119
119
  return s.toUpperCase() + i;
@@ -149,7 +149,7 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
149
149
  }, Mr = () => {
150
150
  }, Wr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
151
151
  function Br(t) {
152
- return !!(t && te(t.append) && t[_t] === "FormData" && t[Fe]);
152
+ return !!(t && te(t.append) && t[Ut] === "FormData" && t[Fe]);
153
153
  }
154
154
  const Hr = (t) => {
155
155
  const e = new Array(10), n = (s, i) => {
@@ -179,15 +179,15 @@ const Hr = (t) => {
179
179
  te(fe.postMessage)
180
180
  ), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || Lt, Kr = (t) => t != null && te(t[Fe]), p = {
181
181
  isArray: je,
182
- isArrayBuffer: Ut,
182
+ isArrayBuffer: _t,
183
183
  isBuffer: Te,
184
184
  isFormData: jr,
185
185
  isArrayBufferView: pr,
186
186
  isString: fr,
187
- isNumber: Dt,
187
+ isNumber: $t,
188
188
  isBoolean: xr,
189
189
  isObject: Re,
190
- isPlainObject: _e,
190
+ isPlainObject: Ue,
191
191
  isEmptyObject: hr,
192
192
  isReadableStream: Sr,
193
193
  isRequest: kr,
@@ -201,7 +201,7 @@ const Hr = (t) => {
201
201
  isFunction: te,
202
202
  isStream: wr,
203
203
  isURLSearchParams: vr,
204
- isTypedArray: _r,
204
+ isTypedArray: Ur,
205
205
  isFileList: br,
206
206
  forEach: Pe,
207
207
  merge: Ge,
@@ -214,9 +214,9 @@ const Hr = (t) => {
214
214
  kindOfTest: ae,
215
215
  endsWith: zr,
216
216
  toArray: Ar,
217
- forEachEntry: Ur,
218
- matchAll: Dr,
219
- isHTMLForm: $r,
217
+ forEachEntry: _r,
218
+ matchAll: $r,
219
+ isHTMLForm: Dr,
220
220
  hasOwnProperty: ut,
221
221
  hasOwnProp: ut,
222
222
  // an alias to avoid ESLint no-prototype-builtins detection
@@ -226,7 +226,7 @@ const Hr = (t) => {
226
226
  toCamelCase: Nr,
227
227
  noop: Mr,
228
228
  toFiniteNumber: Wr,
229
- findKey: $t,
229
+ findKey: Dt,
230
230
  global: fe,
231
231
  isContextDefined: Nt,
232
232
  isSpecCompliantForm: Br,
@@ -237,10 +237,10 @@ const Hr = (t) => {
237
237
  asap: Jr,
238
238
  isIterable: Kr
239
239
  };
240
- function D(t, e, n, s, i) {
240
+ function $(t, e, n, s, i) {
241
241
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), s && (this.request = s), i && (this.response = i, this.status = i.status ? i.status : null);
242
242
  }
243
- p.inherits(D, Error, {
243
+ p.inherits($, Error, {
244
244
  toJSON: function() {
245
245
  return {
246
246
  // Standard
@@ -261,7 +261,7 @@ p.inherits(D, Error, {
261
261
  };
262
262
  }
263
263
  });
264
- const qt = D.prototype, Mt = {};
264
+ const qt = $.prototype, Mt = {};
265
265
  [
266
266
  "ERR_BAD_OPTION_VALUE",
267
267
  "ERR_BAD_OPTION",
@@ -279,15 +279,15 @@ const qt = D.prototype, Mt = {};
279
279
  ].forEach((t) => {
280
280
  Mt[t] = { value: t };
281
281
  });
282
- Object.defineProperties(D, Mt);
282
+ Object.defineProperties($, Mt);
283
283
  Object.defineProperty(qt, "isAxiosError", { value: !0 });
284
- D.from = (t, e, n, s, i, a) => {
284
+ $.from = (t, e, n, s, i, a) => {
285
285
  const o = Object.create(qt);
286
286
  p.toFlatObject(t, o, function(x) {
287
287
  return x !== Error.prototype;
288
288
  }, (f) => f !== "isAxiosError");
289
289
  const c = t && t.message ? t.message : "Error", d = e == null && t ? t.code : e;
290
- return D.call(o, c, d, n, s, i), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", a && Object.assign(o, a), o;
290
+ return $.call(o, c, d, n, s, i), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", a && Object.assign(o, a), o;
291
291
  };
292
292
  const Gr = null;
293
293
  function Xe(t) {
@@ -327,7 +327,7 @@ function Me(t, e, n) {
327
327
  if (p.isBoolean(u))
328
328
  return u.toString();
329
329
  if (!d && p.isBlob(u))
330
- throw new D("Blob is not supported. Use a Buffer instead.");
330
+ throw new $("Blob is not supported. Use a Buffer instead.");
331
331
  return p.isArrayBuffer(u) || p.isTypedArray(u) ? d && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
332
332
  }
333
333
  function x(u, w, h) {
@@ -578,7 +578,7 @@ const Ie = {
578
578
  return JSON.parse(e, this.parseReviver);
579
579
  } catch (c) {
580
580
  if (o)
581
- throw c.name === "SyntaxError" ? D.from(c, D.ERR_BAD_RESPONSE, this, null, this.response) : c;
581
+ throw c.name === "SyntaxError" ? $.from(c, $.ERR_BAD_RESPONSE, this, null, this.response) : c;
582
582
  }
583
583
  }
584
584
  return e;
@@ -638,8 +638,8 @@ const fn = p.toObjectSet([
638
638
  function Se(t) {
639
639
  return t && String(t).trim().toLowerCase();
640
640
  }
641
- function Ue(t) {
642
- return t === !1 || t == null ? t : p.isArray(t) ? t.map(Ue) : String(t);
641
+ function _e(t) {
642
+ return t === !1 || t == null ? t : p.isArray(t) ? t.map(_e) : String(t);
643
643
  }
644
644
  function hn(t) {
645
645
  const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -684,7 +684,7 @@ let re = class {
684
684
  if (!x)
685
685
  throw new Error("header name must be a non-empty string");
686
686
  const y = p.findKey(i, x);
687
- (!y || i[y] === void 0 || f === !0 || f === void 0 && i[y] !== !1) && (i[y || d] = Ue(c));
687
+ (!y || i[y] === void 0 || f === !0 || f === void 0 && i[y] !== !1) && (i[y || d] = _e(c));
688
688
  }
689
689
  const o = (c, d) => p.forEach(c, (f, x) => a(f, x, d));
690
690
  if (p.isPlainObject(e) || e instanceof this.constructor)
@@ -752,11 +752,11 @@ let re = class {
752
752
  return p.forEach(this, (i, a) => {
753
753
  const o = p.findKey(s, a);
754
754
  if (o) {
755
- n[o] = Ue(i), delete n[a];
755
+ n[o] = _e(i), delete n[a];
756
756
  return;
757
757
  }
758
758
  const c = e ? gn(a) : String(a).trim();
759
- c !== a && delete n[a], n[c] = Ue(i), s[c] = !0;
759
+ c !== a && delete n[a], n[c] = _e(i), s[c] = !0;
760
760
  }), this;
761
761
  }
762
762
  concat(...e) {
@@ -821,16 +821,16 @@ function Jt(t) {
821
821
  return !!(t && t.__CANCEL__);
822
822
  }
823
823
  function ve(t, e, n) {
824
- D.call(this, t ?? "canceled", D.ERR_CANCELED, e, n), this.name = "CanceledError";
824
+ $.call(this, t ?? "canceled", $.ERR_CANCELED, e, n), this.name = "CanceledError";
825
825
  }
826
- p.inherits(ve, D, {
826
+ p.inherits(ve, $, {
827
827
  __CANCEL__: !0
828
828
  });
829
829
  function Kt(t, e, n) {
830
830
  const s = n.config.validateStatus;
831
- !n.status || !s || s(n.status) ? t(n) : e(new D(
831
+ !n.status || !s || s(n.status) ? t(n) : e(new $(
832
832
  "Request failed with status code " + n.status,
833
- [D.ERR_BAD_REQUEST, D.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
833
+ [$.ERR_BAD_REQUEST, $.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
834
834
  n.config,
835
835
  n.request,
836
836
  n
@@ -1053,16 +1053,16 @@ const Xt = (t) => {
1053
1053
  "onloadend" in h ? h.onloadend = I : h.onreadystatechange = function() {
1054
1054
  !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(I);
1055
1055
  }, h.onabort = function() {
1056
- h && (s(new D("Request aborted", D.ECONNABORTED, t, h)), h = null);
1056
+ h && (s(new $("Request aborted", $.ECONNABORTED, t, h)), h = null);
1057
1057
  }, h.onerror = function(A) {
1058
- const N = A && A.message ? A.message : "Network Error", b = new D(N, D.ERR_NETWORK, t, h);
1058
+ const N = A && A.message ? A.message : "Network Error", b = new $(N, $.ERR_NETWORK, t, h);
1059
1059
  b.event = A || null, s(b), h = null;
1060
1060
  }, h.ontimeout = function() {
1061
1061
  let A = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
1062
1062
  const N = i.transitional || Vt;
1063
- i.timeoutErrorMessage && (A = i.timeoutErrorMessage), s(new D(
1063
+ i.timeoutErrorMessage && (A = i.timeoutErrorMessage), s(new $(
1064
1064
  A,
1065
- N.clarifyTimeoutError ? D.ETIMEDOUT : D.ECONNABORTED,
1065
+ N.clarifyTimeoutError ? $.ETIMEDOUT : $.ECONNABORTED,
1066
1066
  t,
1067
1067
  h
1068
1068
  )), h = null;
@@ -1073,7 +1073,7 @@ const Xt = (t) => {
1073
1073
  }, i.cancelToken && i.cancelToken.subscribe(x), i.signal && (i.signal.aborted ? x() : i.signal.addEventListener("abort", x)));
1074
1074
  const C = bn(i.url);
1075
1075
  if (C && Q.protocols.indexOf(C) === -1) {
1076
- s(new D("Unsupported protocol " + C + ":", D.ERR_BAD_REQUEST, t));
1076
+ s(new $("Unsupported protocol " + C + ":", $.ERR_BAD_REQUEST, t));
1077
1077
  return;
1078
1078
  }
1079
1079
  h.send(a || null);
@@ -1086,11 +1086,11 @@ const Xt = (t) => {
1086
1086
  if (!i) {
1087
1087
  i = !0, c();
1088
1088
  const x = f instanceof Error ? f : this.reason;
1089
- s.abort(x instanceof D ? x : new ve(x instanceof Error ? x.message : x));
1089
+ s.abort(x instanceof $ ? x : new ve(x instanceof Error ? x.message : x));
1090
1090
  }
1091
1091
  };
1092
1092
  let o = e && setTimeout(() => {
1093
- o = null, a(new D(`timeout ${e} of ms exceeded`, D.ETIMEDOUT));
1093
+ o = null, a(new $(`timeout ${e} of ms exceeded`, $.ETIMEDOUT));
1094
1094
  }, e);
1095
1095
  const c = () => {
1096
1096
  t && (o && clearTimeout(o), o = null, t.forEach((f) => {
@@ -1195,7 +1195,7 @@ const Xt = (t) => {
1195
1195
  let I = w && w[u];
1196
1196
  if (I)
1197
1197
  return I.call(w);
1198
- throw new D(`Response type '${u}' is not supported`, D.ERR_NOT_SUPPORT, h);
1198
+ throw new $(`Response type '${u}' is not supported`, $.ERR_NOT_SUPPORT, h);
1199
1199
  });
1200
1200
  });
1201
1201
  const k = async (u) => {
@@ -1245,11 +1245,11 @@ const Xt = (t) => {
1245
1245
  duplex: "half"
1246
1246
  }), m;
1247
1247
  if (p.isFormData(I) && (m = l.headers.get("content-type")) && q.setContentType(m), l.body) {
1248
- const [S, $] = mt(
1248
+ const [S, D] = mt(
1249
1249
  z,
1250
1250
  Ne(gt(b))
1251
1251
  );
1252
- I = bt(l.body, wt, S, $);
1252
+ I = bt(l.body, wt, S, D);
1253
1253
  }
1254
1254
  }
1255
1255
  p.isString(O) || (O = O ? "include" : "omit");
@@ -1270,13 +1270,13 @@ const Xt = (t) => {
1270
1270
  ["status", "statusText", "headers"].forEach((ne) => {
1271
1271
  l[ne] = H[ne];
1272
1272
  });
1273
- const m = p.toFiniteNumber(H.headers.get("content-length")), [S, $] = N && mt(
1273
+ const m = p.toFiniteNumber(H.headers.get("content-length")), [S, D] = N && mt(
1274
1274
  m,
1275
1275
  Ne(gt(N), !0)
1276
1276
  ) || [];
1277
1277
  H = new s(
1278
1278
  bt(H.body, wt, S, () => {
1279
- $ && $(), T && T();
1279
+ D && D(), T && T();
1280
1280
  }),
1281
1281
  l
1282
1282
  );
@@ -1295,21 +1295,21 @@ const Xt = (t) => {
1295
1295
  });
1296
1296
  } catch (M) {
1297
1297
  throw T && T(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
1298
- new D("Network Error", D.ERR_NETWORK, u, G),
1298
+ new $("Network Error", $.ERR_NETWORK, u, G),
1299
1299
  {
1300
1300
  cause: M.cause || M
1301
1301
  }
1302
- ) : D.from(M, M && M.code, u, G);
1302
+ ) : $.from(M, M && M.code, u, G);
1303
1303
  }
1304
1304
  };
1305
- }, _n = /* @__PURE__ */ new Map(), Zt = (t) => {
1305
+ }, Un = /* @__PURE__ */ new Map(), Zt = (t) => {
1306
1306
  let e = t ? t.env : {};
1307
1307
  const { fetch: n, Request: s, Response: i } = e, a = [
1308
1308
  s,
1309
1309
  i,
1310
1310
  n
1311
1311
  ];
1312
- let o = a.length, c = o, d, f, x = _n;
1312
+ let o = a.length, c = o, d, f, x = Un;
1313
1313
  for (; c--; )
1314
1314
  d = a[c], f = x.get(d), f === void 0 && x.set(d, f = c ? /* @__PURE__ */ new Map() : An(e)), x = f;
1315
1315
  return f;
@@ -1331,7 +1331,7 @@ p.forEach(Qe, (t, e) => {
1331
1331
  Object.defineProperty(t, "adapterName", { value: e });
1332
1332
  }
1333
1333
  });
1334
- const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !1, Qt = {
1334
+ const kt = (t) => `- ${t}`, _n = (t) => p.isFunction(t) || t === null || t === !1, Qt = {
1335
1335
  getAdapter: (t, e) => {
1336
1336
  t = p.isArray(t) ? t : [t];
1337
1337
  const { length: n } = t;
@@ -1340,8 +1340,8 @@ const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
1340
1340
  for (let o = 0; o < n; o++) {
1341
1341
  s = t[o];
1342
1342
  let c;
1343
- if (i = s, !Un(s) && (i = Qe[(c = String(s)).toLowerCase()], i === void 0))
1344
- throw new D(`Unknown adapter '${c}'`);
1343
+ if (i = s, !_n(s) && (i = Qe[(c = String(s)).toLowerCase()], i === void 0))
1344
+ throw new $(`Unknown adapter '${c}'`);
1345
1345
  if (i && (p.isFunction(i) || (i = i.get(e))))
1346
1346
  break;
1347
1347
  a[c || "#" + o] = i;
@@ -1353,7 +1353,7 @@ const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
1353
1353
  let c = n ? o.length > 1 ? `since :
1354
1354
  ` + o.map(kt).join(`
1355
1355
  `) : " " + kt(o[0]) : "as no adapter specified";
1356
- throw new D(
1356
+ throw new $(
1357
1357
  "There is no suitable adapter to dispatch the request " + c,
1358
1358
  "ERR_NOT_SUPPORT"
1359
1359
  );
@@ -1397,9 +1397,9 @@ We.transitional = function(e, n, s) {
1397
1397
  }
1398
1398
  return (a, o, c) => {
1399
1399
  if (e === !1)
1400
- throw new D(
1400
+ throw new $(
1401
1401
  i(o, " has been removed" + (n ? " in " + n : "")),
1402
- D.ERR_DEPRECATED
1402
+ $.ERR_DEPRECATED
1403
1403
  );
1404
1404
  return n && !Ct[o] && (Ct[o] = !0, console.warn(
1405
1405
  i(
@@ -1412,9 +1412,9 @@ We.transitional = function(e, n, s) {
1412
1412
  We.spelling = function(e) {
1413
1413
  return (n, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
1414
1414
  };
1415
- function Dn(t, e, n) {
1415
+ function $n(t, e, n) {
1416
1416
  if (typeof t != "object")
1417
- throw new D("options must be an object", D.ERR_BAD_OPTION_VALUE);
1417
+ throw new $("options must be an object", $.ERR_BAD_OPTION_VALUE);
1418
1418
  const s = Object.keys(t);
1419
1419
  let i = s.length;
1420
1420
  for (; i-- > 0; ) {
@@ -1422,17 +1422,17 @@ function Dn(t, e, n) {
1422
1422
  if (o) {
1423
1423
  const c = t[a], d = c === void 0 || o(c, a, t);
1424
1424
  if (d !== !0)
1425
- throw new D("option " + a + " must be " + d, D.ERR_BAD_OPTION_VALUE);
1425
+ throw new $("option " + a + " must be " + d, $.ERR_BAD_OPTION_VALUE);
1426
1426
  continue;
1427
1427
  }
1428
1428
  if (n !== !0)
1429
- throw new D("Unknown option " + a, D.ERR_BAD_OPTION);
1429
+ throw new $("Unknown option " + a, $.ERR_BAD_OPTION);
1430
1430
  }
1431
1431
  }
1432
- const De = {
1433
- assertOptions: Dn,
1432
+ const $e = {
1433
+ assertOptions: $n,
1434
1434
  validators: We
1435
- }, ce = De.validators;
1435
+ }, ce = $e.validators;
1436
1436
  let xe = class {
1437
1437
  constructor(e) {
1438
1438
  this.defaults = e || {}, this.interceptors = {
@@ -1468,16 +1468,16 @@ let xe = class {
1468
1468
  _request(e, n) {
1469
1469
  typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = he(this.defaults, n);
1470
1470
  const { transitional: s, paramsSerializer: i, headers: a } = n;
1471
- s !== void 0 && De.assertOptions(s, {
1471
+ s !== void 0 && $e.assertOptions(s, {
1472
1472
  silentJSONParsing: ce.transitional(ce.boolean),
1473
1473
  forcedJSONParsing: ce.transitional(ce.boolean),
1474
1474
  clarifyTimeoutError: ce.transitional(ce.boolean)
1475
1475
  }, !1), i != null && (p.isFunction(i) ? n.paramsSerializer = {
1476
1476
  serialize: i
1477
- } : De.assertOptions(i, {
1477
+ } : $e.assertOptions(i, {
1478
1478
  encode: ce.function,
1479
1479
  serialize: ce.function
1480
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), De.assertOptions(n, {
1480
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), $e.assertOptions(n, {
1481
1481
  baseUrl: ce.spelling("baseURL"),
1482
1482
  withXsrfToken: ce.spelling("withXSRFToken")
1483
1483
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -1557,7 +1557,7 @@ p.forEach(["post", "put", "patch"], function(e) {
1557
1557
  }
1558
1558
  xe.prototype[e] = n(), xe.prototype[e + "Form"] = n(!0);
1559
1559
  });
1560
- let $n = class tr {
1560
+ let Dn = class tr {
1561
1561
  constructor(e) {
1562
1562
  if (typeof e != "function")
1563
1563
  throw new TypeError("executor must be a function.");
@@ -1715,11 +1715,11 @@ function rr(t) {
1715
1715
  const J = rr(Ie);
1716
1716
  J.Axios = xe;
1717
1717
  J.CanceledError = ve;
1718
- J.CancelToken = $n;
1718
+ J.CancelToken = Dn;
1719
1719
  J.isCancel = Jt;
1720
1720
  J.VERSION = er;
1721
1721
  J.toFormData = Me;
1722
- J.AxiosError = D;
1722
+ J.AxiosError = $;
1723
1723
  J.Cancel = J.CanceledError;
1724
1724
  J.all = function(e) {
1725
1725
  return Promise.all(e);
@@ -2207,12 +2207,30 @@ class li {
2207
2207
  * GET /api/app/:appId/users-data
2208
2208
  * GET /api/app/:appId/users-data/:category
2209
2209
  */
2210
- async getUsersData(e) {
2210
+ async getAppUsersData(e) {
2211
2211
  const n = this.appId;
2212
2212
  if (!n) throw new Error("getUsersData: 'appId' is required");
2213
2213
  const s = e ? `/app/${encodeURIComponent(n)}/users-data/${encodeURIComponent(e)}` : `/app/${encodeURIComponent(n)}/users-data`;
2214
2214
  return await this.request("GET", s, void 0, {}, !1);
2215
2215
  }
2216
+ /**
2217
+ * 👥 Get all app users
2218
+ *
2219
+ * Route:
2220
+ * GET /api/app/:appId/users
2221
+ */
2222
+ async getAllAppUsers() {
2223
+ const e = this.appId;
2224
+ if (!e)
2225
+ throw new Error("getAllAppUsers: 'appId' is required");
2226
+ return await this.request(
2227
+ "GET",
2228
+ `/app/${encodeURIComponent(e)}/users`,
2229
+ void 0,
2230
+ {},
2231
+ !1
2232
+ );
2233
+ }
2216
2234
  /**
2217
2235
  * 🔍 Get single app data item by id
2218
2236
  *
@@ -2414,11 +2432,11 @@ function qn() {
2414
2432
  }
2415
2433
  if (m) {
2416
2434
  m = console;
2417
- var S = m.error, $ = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
2435
+ var S = m.error, D = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
2418
2436
  return S.call(
2419
2437
  m,
2420
2438
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
2421
- $
2439
+ D
2422
2440
  ), e(l);
2423
2441
  }
2424
2442
  }
@@ -2465,14 +2483,14 @@ function qn() {
2465
2483
  "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."
2466
2484
  )), l = this.props.ref, l !== void 0 ? l : null;
2467
2485
  }
2468
- function f(l, m, S, $, ne, oe) {
2486
+ function f(l, m, S, D, ne, oe) {
2469
2487
  var B = S.ref;
2470
2488
  return l = {
2471
2489
  $$typeof: u,
2472
2490
  type: l,
2473
2491
  key: m,
2474
2492
  props: S,
2475
- _owner: $
2493
+ _owner: D
2476
2494
  }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(l, "ref", {
2477
2495
  enumerable: !1,
2478
2496
  get: d
@@ -2498,13 +2516,13 @@ function qn() {
2498
2516
  value: oe
2499
2517
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
2500
2518
  }
2501
- function x(l, m, S, $, ne, oe) {
2519
+ function x(l, m, S, D, ne, oe) {
2502
2520
  var B = m.children;
2503
2521
  if (B !== void 0)
2504
- if ($)
2522
+ if (D)
2505
2523
  if (T(B)) {
2506
- for ($ = 0; $ < B.length; $++)
2507
- y(B[$]);
2524
+ for (D = 0; D < B.length; D++)
2525
+ y(B[D]);
2508
2526
  Object.freeze && Object.freeze(B);
2509
2527
  } else
2510
2528
  console.error(
@@ -2513,21 +2531,21 @@ function qn() {
2513
2531
  else y(B);
2514
2532
  if (G.call(m, "key")) {
2515
2533
  B = t(l);
2516
- var le = Object.keys(m).filter(function(_) {
2517
- return _ !== "key";
2534
+ var le = Object.keys(m).filter(function(U) {
2535
+ return U !== "key";
2518
2536
  });
2519
- $ = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Y[B + $] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
2537
+ D = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Y[B + D] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
2520
2538
  `A props object containing a "key" prop is being spread into JSX:
2521
2539
  let props = %s;
2522
2540
  <%s {...props} />
2523
2541
  React keys must be passed directly to JSX without using spread:
2524
2542
  let props = %s;
2525
2543
  <%s key={someKey} {...props} />`,
2526
- $,
2544
+ D,
2527
2545
  B,
2528
2546
  le,
2529
2547
  B
2530
- ), Y[B + $] = !0);
2548
+ ), Y[B + D] = !0);
2531
2549
  }
2532
2550
  if (B = null, S !== void 0 && (n(S), B = "" + S), o(m) && (n(m.key), B = "" + m.key), "key" in m) {
2533
2551
  S = {};
@@ -2565,24 +2583,24 @@ React keys must be passed directly to JSX without using spread:
2565
2583
  a
2566
2584
  )(), F = z(s(a)), Y = {};
2567
2585
  Ee.Fragment = h, Ee.jsx = function(l, m, S) {
2568
- var $ = 1e4 > R.recentlyCreatedOwnerStacks++;
2586
+ var D = 1e4 > R.recentlyCreatedOwnerStacks++;
2569
2587
  return x(
2570
2588
  l,
2571
2589
  m,
2572
2590
  S,
2573
2591
  !1,
2574
- $ ? Error("react-stack-top-frame") : H,
2575
- $ ? z(s(l)) : F
2592
+ D ? Error("react-stack-top-frame") : H,
2593
+ D ? z(s(l)) : F
2576
2594
  );
2577
2595
  }, Ee.jsxs = function(l, m, S) {
2578
- var $ = 1e4 > R.recentlyCreatedOwnerStacks++;
2596
+ var D = 1e4 > R.recentlyCreatedOwnerStacks++;
2579
2597
  return x(
2580
2598
  l,
2581
2599
  m,
2582
2600
  S,
2583
2601
  !0,
2584
- $ ? Error("react-stack-top-frame") : H,
2585
- $ ? z(s(l)) : F
2602
+ D ? Error("react-stack-top-frame") : H,
2603
+ D ? z(s(l)) : F
2586
2604
  );
2587
2605
  };
2588
2606
  })()), Ee;
@@ -3056,14 +3074,14 @@ const As = [
3056
3074
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
3057
3075
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
3058
3076
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
3059
- ], $e = L("trash-2", As);
3077
+ ], De = L("trash-2", As);
3060
3078
  /**
3061
3079
  * @license lucide-react v0.544.0 - ISC
3062
3080
  *
3063
3081
  * This source code is licensed under the ISC license.
3064
3082
  * See the LICENSE file in the root directory of this source tree.
3065
3083
  */
3066
- const _s = [
3084
+ const Us = [
3067
3085
  [
3068
3086
  "path",
3069
3087
  {
@@ -3073,29 +3091,29 @@ const _s = [
3073
3091
  ],
3074
3092
  ["path", { d: "M12 9v4", key: "juzpu7" }],
3075
3093
  ["path", { d: "M12 17h.01", key: "p32p05" }]
3076
- ], Ot = L("triangle-alert", _s);
3094
+ ], Ot = L("triangle-alert", Us);
3077
3095
  /**
3078
3096
  * @license lucide-react v0.544.0 - ISC
3079
3097
  *
3080
3098
  * This source code is licensed under the ISC license.
3081
3099
  * See the LICENSE file in the root directory of this source tree.
3082
3100
  */
3083
- const Us = [
3101
+ const _s = [
3084
3102
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
3085
3103
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
3086
3104
  ["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
3087
3105
  ["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
3088
- ], Ds = L("user-x", Us);
3106
+ ], $s = L("user-x", _s);
3089
3107
  /**
3090
3108
  * @license lucide-react v0.544.0 - ISC
3091
3109
  *
3092
3110
  * This source code is licensed under the ISC license.
3093
3111
  * See the LICENSE file in the root directory of this source tree.
3094
3112
  */
3095
- const $s = [
3113
+ const Ds = [
3096
3114
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
3097
3115
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
3098
- ], we = L("user", $s);
3116
+ ], we = L("user", Ds);
3099
3117
  /**
3100
3118
  * @license lucide-react v0.544.0 - ISC
3101
3119
  *
@@ -3764,17 +3782,17 @@ const Ns = [
3764
3782
  const K = async (m) => {
3765
3783
  m.preventDefault(), C(!0), A(null);
3766
3784
  try {
3767
- const S = await x.loginUser({ email: N, password: j }), { user: $ } = S;
3768
- if (!$)
3785
+ const S = await x.loginUser({ email: N, password: j }), { user: D } = S;
3786
+ if (!D)
3769
3787
  throw new Error(S.message || "Login failed");
3770
3788
  if (typeof document < "u") {
3771
3789
  const ne = "a_s_b", oe = "true", B = /* @__PURE__ */ new Date();
3772
3790
  B.setTime(B.getTime() + 1440 * 60 * 1e3), document.cookie = `${ne}=${oe}; path=/; expires=${B.toUTCString()}; SameSite=Lax`;
3773
3791
  }
3774
- A({ type: "success", text: `Welcome ${$.name}` }), d?.($);
3792
+ A({ type: "success", text: `Welcome ${D.name}` }), d?.(D);
3775
3793
  } catch (S) {
3776
- const $ = S.message || "Login failed";
3777
- A({ type: "error", text: $ }), f?.(S);
3794
+ const D = S.message || "Login failed";
3795
+ A({ type: "error", text: D }), f?.(S);
3778
3796
  } finally {
3779
3797
  C(!1);
3780
3798
  }
@@ -4423,7 +4441,7 @@ const Ns = [
4423
4441
  color: "white",
4424
4442
  flexShrink: 0
4425
4443
  },
4426
- children: /* @__PURE__ */ r.jsx($e, { size: 20 })
4444
+ children: /* @__PURE__ */ r.jsx(De, { size: 20 })
4427
4445
  }
4428
4446
  ),
4429
4447
  /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
@@ -4526,7 +4544,7 @@ const Ns = [
4526
4544
  text: "All your data will be permanently deleted"
4527
4545
  },
4528
4546
  {
4529
- icon: /* @__PURE__ */ r.jsx(Ds, { size: 16 }),
4547
+ icon: /* @__PURE__ */ r.jsx($s, { size: 16 }),
4530
4548
  text: "This action cannot be reversed"
4531
4549
  },
4532
4550
  {
@@ -4622,7 +4640,7 @@ const Ns = [
4622
4640
  g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)";
4623
4641
  },
4624
4642
  children: [
4625
- /* @__PURE__ */ r.jsx($e, { size: 16 }),
4643
+ /* @__PURE__ */ r.jsx(De, { size: 16 }),
4626
4644
  "Continue to Delete"
4627
4645
  ]
4628
4646
  }
@@ -4812,7 +4830,7 @@ const Ns = [
4812
4830
  h && !c && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4813
4831
  },
4814
4832
  children: [
4815
- /* @__PURE__ */ r.jsx($e, { size: 16 }),
4833
+ /* @__PURE__ */ r.jsx(De, { size: 16 }),
4816
4834
  "Yes, Delete My Account"
4817
4835
  ]
4818
4836
  }
@@ -6412,8 +6430,8 @@ const Ns = [
6412
6430
  return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
6413
6431
  }
6414
6432
  }, []);
6415
- const m = (v, U) => {
6416
- G({ type: v, message: U }), setTimeout(() => G(null), 3e3);
6433
+ const m = (v, _) => {
6434
+ G({ type: v, message: _ }), setTimeout(() => G(null), 3e3);
6417
6435
  }, S = () => {
6418
6436
  W(!0);
6419
6437
  const v = setTimeout(() => {
@@ -6422,15 +6440,15 @@ const Ns = [
6422
6440
  return () => clearTimeout(v);
6423
6441
  };
6424
6442
  ee(() => {
6425
- const v = (U) => {
6443
+ const v = (_) => {
6426
6444
  const V = document.querySelector(".dropdown-container");
6427
- V && !V.contains(U.target) && S();
6445
+ V && !V.contains(_.target) && S();
6428
6446
  };
6429
6447
  return q && document.addEventListener("mousedown", v), () => {
6430
6448
  document.removeEventListener("mousedown", v);
6431
6449
  };
6432
6450
  }, [q]);
6433
- const $ = async () => {
6451
+ const D = async () => {
6434
6452
  if (!M.email || !/\S+@\S+\.\S+/.test(M.email)) {
6435
6453
  m("error", "Please enter a valid email");
6436
6454
  return;
@@ -6444,11 +6462,11 @@ const Ns = [
6444
6462
  const v = await a.requestEmailVerificationOTP({
6445
6463
  userId: d.id,
6446
6464
  email: M.email
6447
- }), U = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
6448
- U ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
6465
+ }), _ = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
6466
+ _ ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
6449
6467
  } catch (v) {
6450
- const U = v?.response?.data?.message || v?.message || "Server error";
6451
- m("error", U);
6468
+ const _ = v?.response?.data?.message || v?.message || "Server error";
6469
+ m("error", _);
6452
6470
  } finally {
6453
6471
  l(!1);
6454
6472
  }
@@ -6463,18 +6481,18 @@ const Ns = [
6463
6481
  }
6464
6482
  try {
6465
6483
  l(!0);
6466
- const U = await a.verifyEmail({
6484
+ const _ = await a.verifyEmail({
6467
6485
  email: M.email,
6468
6486
  otp: M.otp
6469
- }), V = U?.data?.success ?? U?.success, Z = U?.data?.message ?? U?.message;
6487
+ }), V = _?.data?.success ?? _?.success, Z = _?.data?.message ?? _?.message;
6470
6488
  if (V) {
6471
6489
  m("success", Z || "Email verified!");
6472
6490
  const de = { ...d, isVerified: !0 };
6473
6491
  f(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }), F(!1), j?.(!1);
6474
6492
  } else
6475
6493
  m("error", Z || "Verification failed");
6476
- } catch (U) {
6477
- const V = U?.response?.data?.message || U?.message || "Something went wrong";
6494
+ } catch (_) {
6495
+ const V = _?.response?.data?.message || _?.message || "Something went wrong";
6478
6496
  m("error", V);
6479
6497
  } finally {
6480
6498
  l(!1);
@@ -6482,37 +6500,37 @@ const Ns = [
6482
6500
  }, oe = async (v) => {
6483
6501
  if (!d) return !1;
6484
6502
  try {
6485
- const U = await a.updateUser({
6503
+ const _ = await a.updateUser({
6486
6504
  userId: d.id,
6487
6505
  avatarUrl: v
6488
6506
  });
6489
- if (U?.success) {
6507
+ if (_?.success) {
6490
6508
  const V = {
6491
6509
  ...d,
6492
6510
  // 🔒 keep existing auth fields
6493
- ...U.user,
6511
+ ..._.user,
6494
6512
  // 🔁 merge backend response if present
6495
6513
  avatarUrl: v
6496
6514
  };
6497
6515
  return f(V), m("success", "Avatar updated successfully!"), !0;
6498
6516
  }
6499
- return m("error", U?.message || "Failed to update avatar"), !1;
6500
- } catch (U) {
6501
- return console.error("Avatar update error:", U), m("error", "Failed to update avatar"), !1;
6517
+ return m("error", _?.message || "Failed to update avatar"), !1;
6518
+ } catch (_) {
6519
+ return console.error("Avatar update error:", _), m("error", "Failed to update avatar"), !1;
6502
6520
  }
6503
6521
  }, B = async () => {
6504
6522
  if (d) {
6505
6523
  w(!0);
6506
6524
  try {
6507
- const v = d.email, U = await a.updateUser({
6525
+ const v = d.email, _ = await a.updateUser({
6508
6526
  userId: d.id,
6509
6527
  ...d
6510
6528
  });
6511
- if (U.success && U.user) {
6512
- const V = U.user.email !== v, Z = {
6529
+ if (_.success && _.user) {
6530
+ const V = _.user.email !== v, Z = {
6513
6531
  ...d,
6514
6532
  // keep old state
6515
- ...U.user,
6533
+ ..._.user,
6516
6534
  // overwrite updated fields
6517
6535
  isVerified: V ? !1 : d.isVerified
6518
6536
  };
@@ -6521,7 +6539,7 @@ const Ns = [
6521
6539
  V ? "Email updated. Please verify your new email." : "Profile updated successfully"
6522
6540
  ), E(!1);
6523
6541
  } else
6524
- m("error", U.message || "Update failed");
6542
+ m("error", _.message || "Update failed");
6525
6543
  } catch (v) {
6526
6544
  console.error(v), m("error", "Update failed");
6527
6545
  } finally {
@@ -6530,19 +6548,19 @@ const Ns = [
6530
6548
  }
6531
6549
  }, le = async (v) => {
6532
6550
  try {
6533
- const U = await a.checkIfUserExists(v);
6534
- U?.success === !0 && U?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), f(null));
6535
- } catch (U) {
6536
- console.error("⚠️ User validation request failed:", U);
6551
+ const _ = await a.checkIfUserExists(v);
6552
+ _?.success === !0 && _?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), f(null));
6553
+ } catch (_) {
6554
+ console.error("⚠️ User validation request failed:", _);
6537
6555
  }
6538
6556
  };
6539
6557
  ee(() => {
6540
6558
  (async () => {
6541
6559
  try {
6542
6560
  y(!0);
6543
- const U = await a.checkUserSession();
6544
- if (U.user?.id) {
6545
- const V = U.user.id, Z = await a.getUserProfile({ userId: V });
6561
+ const _ = await a.checkUserSession();
6562
+ if (_.user?.id) {
6563
+ const V = _.user.id, Z = await a.getUserProfile({ userId: V });
6546
6564
  if (Z.user) {
6547
6565
  const de = Z.user;
6548
6566
  f(de), le(V);
@@ -6550,8 +6568,8 @@ const Ns = [
6550
6568
  f(null), localStorage.removeItem("userInfo");
6551
6569
  } else
6552
6570
  f(null), localStorage.removeItem("userInfo");
6553
- } catch (U) {
6554
- console.error("User init failed:", U), f(null), localStorage.removeItem("userInfo");
6571
+ } catch (_) {
6572
+ console.error("User init failed:", _), f(null), localStorage.removeItem("userInfo");
6555
6573
  } finally {
6556
6574
  y(!1);
6557
6575
  }
@@ -6559,10 +6577,10 @@ const Ns = [
6559
6577
  }, []), ee(() => {
6560
6578
  d?.email && K((v) => ({ ...v, email: d.email }));
6561
6579
  }, [d?.email]);
6562
- const ge = (v, U) => {
6563
- let V = parseInt(v.replace("#", ""), 16), Z = (V >> 16) + U, de = (V >> 8 & 255) + U, Be = (V & 255) + U;
6580
+ const ge = (v, _) => {
6581
+ let V = parseInt(v.replace("#", ""), 16), Z = (V >> 16) + _, de = (V >> 8 & 255) + _, Be = (V & 255) + _;
6564
6582
  return Z = Math.min(255, Math.max(0, Z)), de = Math.min(255, Math.max(0, de)), Be = Math.min(255, Math.max(0, Be)), `#${(Be | de << 8 | Z << 16).toString(16).padStart(6, "0")}`;
6565
- }, _ = t ? {
6583
+ }, U = t ? {
6566
6584
  background: "#000000",
6567
6585
  surface: "#09090b",
6568
6586
  surfaceLight: "#27272a",
@@ -6601,7 +6619,7 @@ const Ns = [
6601
6619
  display: "flex",
6602
6620
  alignItems: "center",
6603
6621
  justifyContent: "center",
6604
- color: _.textPrimary,
6622
+ color: U.textPrimary,
6605
6623
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
6606
6624
  },
6607
6625
  children: /* @__PURE__ */ r.jsxs(
@@ -6619,12 +6637,12 @@ const Ns = [
6619
6637
  se,
6620
6638
  {
6621
6639
  size: 40,
6622
- color: _.accent,
6640
+ color: U.accent,
6623
6641
  style: { animation: "spin 1s linear infinite" },
6624
6642
  "aria-hidden": "true"
6625
6643
  }
6626
6644
  ),
6627
- /* @__PURE__ */ r.jsx("p", { style: { color: _.textTertiary, margin: 0 }, children: "Loading your profile..." })
6645
+ /* @__PURE__ */ r.jsx("p", { style: { color: U.textTertiary, margin: 0 }, children: "Loading your profile..." })
6628
6646
  ]
6629
6647
  }
6630
6648
  )
@@ -6640,7 +6658,7 @@ const Ns = [
6640
6658
  display: "flex",
6641
6659
  alignItems: "center",
6642
6660
  justifyContent: "center",
6643
- color: _.textPrimary,
6661
+ color: U.textPrimary,
6644
6662
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
6645
6663
  },
6646
6664
  children: /* @__PURE__ */ r.jsxs(
@@ -6654,8 +6672,8 @@ const Ns = [
6654
6672
  textAlign: "center"
6655
6673
  },
6656
6674
  children: [
6657
- /* @__PURE__ */ r.jsx(ie, { size: 40, color: _.error, "aria-hidden": "true" }),
6658
- /* @__PURE__ */ r.jsx("p", { style: { color: _.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
6675
+ /* @__PURE__ */ r.jsx(ie, { size: 40, color: U.error, "aria-hidden": "true" }),
6676
+ /* @__PURE__ */ r.jsx("p", { style: { color: U.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
6659
6677
  ]
6660
6678
  }
6661
6679
  )
@@ -6699,7 +6717,7 @@ const Ns = [
6699
6717
  display: "flex",
6700
6718
  alignItems: "center",
6701
6719
  justifyContent: "center",
6702
- color: _.textPrimary,
6720
+ color: U.textPrimary,
6703
6721
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
6704
6722
  lineHeight: 1.5,
6705
6723
  minHeight: "80vh"
@@ -6785,7 +6803,7 @@ const Ns = [
6785
6803
  "section",
6786
6804
  {
6787
6805
  style: {
6788
- backgroundColor: _.surface,
6806
+ backgroundColor: U.surface,
6789
6807
  borderRadius: "16px",
6790
6808
  position: "relative",
6791
6809
  padding: "24px",
@@ -6839,7 +6857,7 @@ const Ns = [
6839
6857
  borderRadius: "50%",
6840
6858
  objectFit: "cover",
6841
6859
  boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.3)",
6842
- border: `3px solid ${_.border}`
6860
+ border: `3px solid ${U.border}`
6843
6861
  },
6844
6862
  width: 128,
6845
6863
  height: 128,
@@ -6854,7 +6872,7 @@ const Ns = [
6854
6872
  position: "absolute",
6855
6873
  bottom: "8px",
6856
6874
  right: "8px",
6857
- backgroundColor: _.accent,
6875
+ backgroundColor: U.accent,
6858
6876
  color: "white",
6859
6877
  padding: "8px",
6860
6878
  borderRadius: "50%",
@@ -6881,7 +6899,7 @@ const Ns = [
6881
6899
  fontSize: "24px",
6882
6900
  fontWeight: 600,
6883
6901
  margin: "0 0 4px 0",
6884
- color: _.textPrimary
6902
+ color: U.textPrimary
6885
6903
  },
6886
6904
  children: d.name
6887
6905
  }
@@ -6890,7 +6908,7 @@ const Ns = [
6890
6908
  "p",
6891
6909
  {
6892
6910
  style: {
6893
- color: _.textTertiary,
6911
+ color: U.textTertiary,
6894
6912
  margin: "0 0 8px 0"
6895
6913
  },
6896
6914
  children: d.email
@@ -6901,7 +6919,7 @@ const Ns = [
6901
6919
  {
6902
6920
  style: {
6903
6921
  backgroundColor: d.isVerified ? t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)" : t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
6904
- color: d.isVerified ? _.success : _.warning,
6922
+ color: d.isVerified ? U.success : U.warning,
6905
6923
  border: `1px solid ${d.isVerified ? t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)" : t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`,
6906
6924
  padding: "6px 12px",
6907
6925
  borderRadius: "20px",
@@ -6935,9 +6953,9 @@ const Ns = [
6935
6953
  {
6936
6954
  onClick: () => E(!1),
6937
6955
  style: {
6938
- backgroundColor: _.surfaceLight,
6939
- border: `1px solid ${_.border}`,
6940
- color: _.textPrimary,
6956
+ backgroundColor: U.surfaceLight,
6957
+ border: `1px solid ${U.border}`,
6958
+ color: U.textPrimary,
6941
6959
  padding: "10px 20px",
6942
6960
  borderRadius: "6px",
6943
6961
  borderStyle: "solid",
@@ -6965,7 +6983,7 @@ const Ns = [
6965
6983
  onClick: B,
6966
6984
  disabled: u,
6967
6985
  style: {
6968
- background: `linear-gradient(to right, ${_.accent}, ${_.accentHover})`,
6986
+ background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
6969
6987
  opacity: u ? 0.7 : 1,
6970
6988
  color: "white",
6971
6989
  padding: "10px 20px",
@@ -7002,7 +7020,7 @@ const Ns = [
7002
7020
  {
7003
7021
  onClick: () => E(!0),
7004
7022
  style: {
7005
- background: `linear-gradient(to right, ${_.accent}, ${_.accentHover})`,
7023
+ background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
7006
7024
  color: "white",
7007
7025
  padding: "10px 20px",
7008
7026
  borderRadius: "6px",
@@ -7067,8 +7085,8 @@ const Ns = [
7067
7085
  "button",
7068
7086
  {
7069
7087
  style: {
7070
- backgroundColor: _.surfaceLight,
7071
- color: _.textPrimary,
7088
+ backgroundColor: U.surfaceLight,
7089
+ color: U.textPrimary,
7072
7090
  padding: "10px 20px",
7073
7091
  borderRadius: "6px",
7074
7092
  border: "none",
@@ -7101,8 +7119,8 @@ const Ns = [
7101
7119
  bottom: "100%",
7102
7120
  left: 0,
7103
7121
  right: 0,
7104
- backgroundColor: _.surface,
7105
- border: `1px solid ${_.border}`,
7122
+ backgroundColor: U.surface,
7123
+ border: `1px solid ${U.border}`,
7106
7124
  borderRadius: "12px 12px 0 0",
7107
7125
  boxShadow: "0 -8px 24px rgba(0, 0, 0, 0.25)",
7108
7126
  zIndex: 200,
@@ -7122,7 +7140,7 @@ const Ns = [
7122
7140
  padding: "14px 18px",
7123
7141
  backgroundColor: "transparent",
7124
7142
  border: "none",
7125
- color: _.textPrimary,
7143
+ color: U.textPrimary,
7126
7144
  cursor: "pointer",
7127
7145
  transition: "all 0.2s ease",
7128
7146
  fontSize: "13px",
@@ -7132,7 +7150,7 @@ const Ns = [
7132
7150
  gap: "8px",
7133
7151
  textAlign: "left"
7134
7152
  },
7135
- onMouseEnter: (v) => v.currentTarget.style.backgroundColor = _.surfaceLight,
7153
+ onMouseEnter: (v) => v.currentTarget.style.backgroundColor = U.surfaceLight,
7136
7154
  onMouseLeave: (v) => v.currentTarget.style.backgroundColor = "transparent",
7137
7155
  children: [
7138
7156
  /* @__PURE__ */ r.jsx(ot, { size: 14, "aria-hidden": "true" }),
@@ -7197,7 +7215,7 @@ const Ns = [
7197
7215
  },
7198
7216
  onMouseLeave: (v) => v.currentTarget.style.backgroundColor = "transparent",
7199
7217
  children: [
7200
- /* @__PURE__ */ r.jsx($e, { size: 14, "aria-hidden": "true" }),
7218
+ /* @__PURE__ */ r.jsx(De, { size: 14, "aria-hidden": "true" }),
7201
7219
  "Delete Account"
7202
7220
  ]
7203
7221
  }
@@ -7226,7 +7244,7 @@ const Ns = [
7226
7244
  "section",
7227
7245
  {
7228
7246
  style: {
7229
- backgroundColor: _.surface,
7247
+ backgroundColor: U.surface,
7230
7248
  borderRadius: "16px",
7231
7249
  padding: "24px",
7232
7250
  boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
@@ -7239,7 +7257,7 @@ const Ns = [
7239
7257
  fontSize: "20px",
7240
7258
  fontWeight: 600,
7241
7259
  margin: "0 0 24px 0",
7242
- color: _.textSecondary,
7260
+ color: U.textSecondary,
7243
7261
  display: "flex",
7244
7262
  alignItems: "center",
7245
7263
  gap: "8px"
@@ -7263,7 +7281,7 @@ const Ns = [
7263
7281
  }
7264
7282
  },
7265
7283
  children: lr.map((v) => {
7266
- const U = v.icon;
7284
+ const _ = v.icon;
7267
7285
  return /* @__PURE__ */ r.jsxs(
7268
7286
  "div",
7269
7287
  {
@@ -7277,7 +7295,7 @@ const Ns = [
7277
7295
  "label",
7278
7296
  {
7279
7297
  style: {
7280
- color: _.textTertiary,
7298
+ color: U.textTertiary,
7281
7299
  fontSize: "12px",
7282
7300
  fontWeight: 500,
7283
7301
  display: "flex",
@@ -7285,7 +7303,7 @@ const Ns = [
7285
7303
  gap: "8px"
7286
7304
  },
7287
7305
  children: [
7288
- /* @__PURE__ */ r.jsx(U, { size: 16, "aria-hidden": "true" }),
7306
+ /* @__PURE__ */ r.jsx(_, { size: 16, "aria-hidden": "true" }),
7289
7307
  v.label
7290
7308
  ]
7291
7309
  }
@@ -7304,7 +7322,7 @@ const Ns = [
7304
7322
  borderRadius: "8px",
7305
7323
  border: `1px solid ${i}`,
7306
7324
  backgroundColor: "transparent",
7307
- color: _.textPrimary,
7325
+ color: U.textPrimary,
7308
7326
  fontSize: "12px",
7309
7327
  outline: "none",
7310
7328
  transition: "border-color 0.2s ease",
@@ -7327,7 +7345,7 @@ const Ns = [
7327
7345
  display: "flex",
7328
7346
  alignItems: "center",
7329
7347
  boxSizing: "border-box",
7330
- color: _.textPrimary,
7348
+ color: U.textPrimary,
7331
7349
  backgroundColor: t ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
7332
7350
  },
7333
7351
  children: v.value
@@ -7347,7 +7365,7 @@ const Ns = [
7347
7365
  "section",
7348
7366
  {
7349
7367
  style: {
7350
- backgroundColor: _.surface,
7368
+ backgroundColor: U.surface,
7351
7369
  borderRadius: "16px",
7352
7370
  padding: "30px 24px",
7353
7371
  boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
@@ -7360,7 +7378,7 @@ const Ns = [
7360
7378
  fontSize: "20px",
7361
7379
  fontWeight: 600,
7362
7380
  margin: "0 0 24px 0",
7363
- color: _.textSecondary,
7381
+ color: U.textSecondary,
7364
7382
  display: "flex",
7365
7383
  alignItems: "center",
7366
7384
  gap: "8px"
@@ -7397,7 +7415,7 @@ const Ns = [
7397
7415
  display: "flex",
7398
7416
  alignItems: "center",
7399
7417
  gap: "12px",
7400
- color: _.textSecondary
7418
+ color: U.textSecondary
7401
7419
  },
7402
7420
  children: [
7403
7421
  /* @__PURE__ */ r.jsx(pe, { size: 16, "aria-hidden": "true" }),
@@ -7418,11 +7436,11 @@ const Ns = [
7418
7436
  gap: "6px",
7419
7437
  ...d.isVerified ? {
7420
7438
  backgroundColor: t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
7421
- color: _.success,
7439
+ color: U.success,
7422
7440
  border: `1px solid ${t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"}`
7423
7441
  } : {
7424
7442
  backgroundColor: t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
7425
- color: _.warning,
7443
+ color: U.warning,
7426
7444
  border: `1px solid ${t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`
7427
7445
  }
7428
7446
  },
@@ -7450,7 +7468,7 @@ const Ns = [
7450
7468
  "p",
7451
7469
  {
7452
7470
  style: {
7453
- color: _.textTertiary,
7471
+ color: U.textTertiary,
7454
7472
  fontSize: "12px",
7455
7473
  margin: 0
7456
7474
  },
@@ -7481,7 +7499,7 @@ const Ns = [
7481
7499
  I(!1);
7482
7500
  },
7483
7501
  onUpdate: oe,
7484
- colors: _
7502
+ colors: U
7485
7503
  }
7486
7504
  ),
7487
7505
  /* @__PURE__ */ r.jsx(
@@ -7492,7 +7510,7 @@ const Ns = [
7492
7510
  onClose: () => g(!1),
7493
7511
  onSuccess: (v) => m("success", v),
7494
7512
  onError: (v) => m("error", v),
7495
- colors: _
7513
+ colors: U
7496
7514
  }
7497
7515
  ),
7498
7516
  /* @__PURE__ */ r.jsx(
@@ -7503,7 +7521,7 @@ const Ns = [
7503
7521
  onClose: () => N(!1),
7504
7522
  onSuccess: (v) => m("success", v),
7505
7523
  onError: (v) => m("error", v),
7506
- colors: _
7524
+ colors: U
7507
7525
  }
7508
7526
  ),
7509
7527
  /* @__PURE__ */ r.jsx(
@@ -7514,13 +7532,13 @@ const Ns = [
7514
7532
  j(!1), F(!1), K({ email: d?.email || "", otp: "" });
7515
7533
  },
7516
7534
  onVerify: ne,
7517
- onSendOTP: $,
7535
+ onSendOTP: D,
7518
7536
  verifyFormData: M,
7519
7537
  setVerifyFormData: K,
7520
7538
  otpSent: H,
7521
7539
  verifying: Y,
7522
7540
  user: d,
7523
- colors: _,
7541
+ colors: U,
7524
7542
  darkMode: t
7525
7543
  }
7526
7544
  ),
@@ -7659,13 +7677,13 @@ const Ns = [
7659
7677
  g(null);
7660
7678
  return;
7661
7679
  }
7662
- const $ = {
7680
+ const D = {
7663
7681
  id: S.user.id,
7664
7682
  email: S.user.email,
7665
7683
  name: S.user.email.split("@")[0]
7666
7684
  // fallback until backend sends name
7667
7685
  };
7668
- g($);
7686
+ g(D);
7669
7687
  } catch (S) {
7670
7688
  console.error("User initialization failed:", S), l && (g(null), j(S.message || "Failed to load user"));
7671
7689
  } finally {
@@ -7678,8 +7696,8 @@ const Ns = [
7678
7696
  if (typeof window > "u") return;
7679
7697
  const l = () => {
7680
7698
  if (!h || !O.current) return;
7681
- const m = O.current.getBoundingClientRect(), S = window.innerWidth, $ = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
7682
- $ - m.bottom;
7699
+ const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
7700
+ D - m.bottom;
7683
7701
  const le = oe >= ne || oe > B;
7684
7702
  W(le);
7685
7703
  };
@@ -7687,10 +7705,10 @@ const Ns = [
7687
7705
  }, [h]), ee(() => {
7688
7706
  if (typeof window > "u" || typeof document > "u")
7689
7707
  return;
7690
- const l = ($) => {
7691
- q.current && !q.current.contains($.target) && !O.current?.contains($.target) && I(!1);
7692
- }, m = ($) => {
7693
- $.key === "Escape" && I(!1);
7708
+ const l = (D) => {
7709
+ q.current && !q.current.contains(D.target) && !O.current?.contains(D.target) && I(!1);
7710
+ }, m = (D) => {
7711
+ D.key === "Escape" && I(!1);
7694
7712
  }, S = () => {
7695
7713
  h && I(!1);
7696
7714
  };