@neuctra/authix 1.1.72 → 1.1.74

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.
@@ -29,11 +29,11 @@ const mr = We("string"), re = We("function"), Ft = We("number"), Pe = (t) => t !
29
29
  } catch {
30
30
  return !1;
31
31
  }
32
- }, br = ae("Date"), wr = ae("File"), jr = ae("Blob"), vr = ae("FileList"), Sr = (t) => Pe(t) && re(t.pipe), kr = (t) => {
32
+ }, br = ae("Date"), wr = ae("File"), jr = ae("Blob"), vr = ae("FileList"), Sr = (t) => Pe(t) && re(t.pipe), Er = (t) => {
33
33
  let e;
34
34
  return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = Me(t)) === "formdata" || // detect form-data instance
35
35
  e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
36
- }, Er = ae("URLSearchParams"), [Cr, Tr, Rr, Pr] = ["ReadableStream", "Request", "Response", "Headers"].map(ae), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
36
+ }, kr = ae("URLSearchParams"), [Cr, Tr, Rr, Pr] = ["ReadableStream", "Request", "Response", "Headers"].map(ae), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
37
  function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
38
38
  if (t === null || typeof t > "u")
39
39
  return;
@@ -181,7 +181,7 @@ const Kr = (t) => {
181
181
  isArray: we,
182
182
  isArrayBuffer: $t,
183
183
  isBuffer: Re,
184
- isFormData: kr,
184
+ isFormData: Er,
185
185
  isArrayBufferView: hr,
186
186
  isString: mr,
187
187
  isNumber: Ft,
@@ -200,7 +200,7 @@ const Kr = (t) => {
200
200
  isRegExp: Mr,
201
201
  isFunction: re,
202
202
  isStream: Sr,
203
- isURLSearchParams: Er,
203
+ isURLSearchParams: kr,
204
204
  isTypedArray: Dr,
205
205
  isFileList: vr,
206
206
  forEach: Ie,
@@ -635,7 +635,7 @@ const mn = f.toObjectSet([
635
635
  i = a.indexOf(":"), r = a.substring(0, i).trim().toLowerCase(), s = a.substring(i + 1).trim(), !(!r || e[r] && mn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
636
636
  }), e;
637
637
  }, yt = Symbol("internals");
638
- function ke(t) {
638
+ function Ee(t) {
639
639
  return t && String(t).trim().toLowerCase();
640
640
  }
641
641
  function Ne(t) {
@@ -680,7 +680,7 @@ let ne = class {
680
680
  set(e, r, s) {
681
681
  const i = this;
682
682
  function o(c, h, p) {
683
- const d = ke(h);
683
+ const d = Ee(h);
684
684
  if (!d)
685
685
  throw new Error("header name must be a non-empty string");
686
686
  const m = f.findKey(i, d);
@@ -704,7 +704,7 @@ let ne = class {
704
704
  return this;
705
705
  }
706
706
  get(e, r) {
707
- if (e = ke(e), e) {
707
+ if (e = Ee(e), e) {
708
708
  const s = f.findKey(this, e);
709
709
  if (s) {
710
710
  const i = this[s];
@@ -721,7 +721,7 @@ let ne = class {
721
721
  }
722
722
  }
723
723
  has(e, r) {
724
- if (e = ke(e), e) {
724
+ if (e = Ee(e), e) {
725
725
  const s = f.findKey(this, e);
726
726
  return !!(s && this[s] !== void 0 && (!r || Ye(this, this[s], s, r)));
727
727
  }
@@ -731,7 +731,7 @@ let ne = class {
731
731
  const s = this;
732
732
  let i = !1;
733
733
  function o(a) {
734
- if (a = ke(a), a) {
734
+ if (a = Ee(a), a) {
735
735
  const c = f.findKey(s, a);
736
736
  c && (!r || Ye(s, s[c], c, r)) && (delete s[c], i = !0);
737
737
  }
@@ -793,7 +793,7 @@ let ne = class {
793
793
  accessors: {}
794
794
  }).accessors, i = this.prototype;
795
795
  function o(a) {
796
- const c = ke(a);
796
+ const c = Ee(a);
797
797
  s[c] || (jn(i, a), s[c] = !0);
798
798
  }
799
799
  return f.isArray(e) ? e.forEach(o) : o(e), this;
@@ -856,7 +856,7 @@ function Sn(t, e) {
856
856
  return O ? Math.round(P * 1e3 / O) : void 0;
857
857
  };
858
858
  }
859
- function kn(t, e) {
859
+ function En(t, e) {
860
860
  let r = 0, s = 1e3 / e, i, o;
861
861
  const a = (p, d = Date.now()) => {
862
862
  r = d, i = null, o && (clearTimeout(o), o = null), t(...p);
@@ -871,7 +871,7 @@ function kn(t, e) {
871
871
  const Le = (t, e, r = 3) => {
872
872
  let s = 0;
873
873
  const i = Sn(50, 250);
874
- return kn((o) => {
874
+ return En((o) => {
875
875
  const a = o.loaded, c = o.lengthComputable ? o.total : void 0, h = a - s, p = i(h), d = a <= c;
876
876
  s = a;
877
877
  const m = {
@@ -894,7 +894,7 @@ const Le = (t, e, r = 3) => {
894
894
  total: t,
895
895
  loaded: s
896
896
  }), e[1]];
897
- }, wt = (t) => (...e) => f.asap(() => t(...e)), En = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, ee.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
897
+ }, wt = (t) => (...e) => f.asap(() => t(...e)), kn = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, ee.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
898
898
  new URL(ee.origin),
899
899
  ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
900
900
  ) : () => !0, Cn = ee.hasStandardBrowserEnv ? (
@@ -1015,7 +1015,7 @@ const er = (t) => {
1015
1015
  });
1016
1016
  }
1017
1017
  }
1018
- if (ee.hasStandardBrowserEnv && (s && f.isFunction(s) && (s = s(e)), s || s !== !1 && En(e.url))) {
1018
+ if (ee.hasStandardBrowserEnv && (s && f.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
1019
1019
  const h = i && o && Cn.read(o);
1020
1020
  h && a.set(i, h);
1021
1021
  }
@@ -1162,8 +1162,8 @@ const er = (t) => {
1162
1162
  Request: t,
1163
1163
  Response: e
1164
1164
  }))(f.global), {
1165
- ReadableStream: kt,
1166
- TextEncoder: Et
1165
+ ReadableStream: Et,
1166
+ TextEncoder: kt
1167
1167
  } = f.global, Ct = (t, ...e) => {
1168
1168
  try {
1169
1169
  return !!t(...e);
@@ -1177,10 +1177,10 @@ const er = (t) => {
1177
1177
  const { fetch: e, Request: r, Response: s } = t, i = e ? Ae(e) : typeof fetch == "function", o = Ae(r), a = Ae(s);
1178
1178
  if (!i)
1179
1179
  return !1;
1180
- const c = i && Ae(kt), h = i && (typeof Et == "function" ? /* @__PURE__ */ ((u) => (w) => u.encode(w))(new Et()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), p = o && c && Ct(() => {
1180
+ const c = i && Ae(Et), h = i && (typeof kt == "function" ? /* @__PURE__ */ ((u) => (w) => u.encode(w))(new kt()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), p = o && c && Ct(() => {
1181
1181
  let u = !1;
1182
1182
  const w = new r(ee.origin, {
1183
- body: new kt(),
1183
+ body: new Et(),
1184
1184
  method: "POST",
1185
1185
  get duplex() {
1186
1186
  return u = !0, "half";
@@ -1232,9 +1232,9 @@ const er = (t) => {
1232
1232
  fetchOptions: M
1233
1233
  } = er(u), X = e || fetch;
1234
1234
  v = v ? (v + "").toLowerCase() : "text";
1235
- let E = On([T, A && A.toAbortSignal()], y), V = null;
1236
- const z = E && E.unsubscribe && (() => {
1237
- E.unsubscribe();
1235
+ let k = On([T, A && A.toAbortSignal()], y), V = null;
1236
+ const z = k && k.unsubscribe && (() => {
1237
+ k.unsubscribe();
1238
1238
  });
1239
1239
  let I;
1240
1240
  try {
@@ -1255,7 +1255,7 @@ const er = (t) => {
1255
1255
  f.isString(U) || (U = U ? "include" : "omit");
1256
1256
  const W = o && "credentials" in r.prototype, Z = {
1257
1257
  ...M,
1258
- signal: E,
1258
+ signal: k,
1259
1259
  method: x.toUpperCase(),
1260
1260
  headers: F.normalize().toJSON(),
1261
1261
  body: C,
@@ -1811,7 +1811,7 @@ class ui {
1811
1811
  const { name: r, email: s, password: i } = e;
1812
1812
  if (!r || !s || !i)
1813
1813
  throw new Error("signup: 'name', 'email', and 'password' are required");
1814
- return this.request("POST", "/users/signup", e, {}, !0);
1814
+ return await this.request("POST", "/users/signup", e, {}, !0);
1815
1815
  }
1816
1816
  /**
1817
1817
  * Login a user
@@ -1822,7 +1822,7 @@ class ui {
1822
1822
  if (!r || !s)
1823
1823
  throw new Error("login: 'email' and 'password' are required");
1824
1824
  try {
1825
- return this.request(
1825
+ return await this.request(
1826
1826
  "POST",
1827
1827
  "/users/login",
1828
1828
  { email: r, password: s },
@@ -1844,7 +1844,7 @@ class ui {
1844
1844
  throw new Error(
1845
1845
  "changePassword: both 'currentPassword' and 'newPassword' are required"
1846
1846
  );
1847
- return this.request(
1847
+ return await this.request(
1848
1848
  "PUT",
1849
1849
  `/users/change-password/${r}`,
1850
1850
  { currentPassword: s, newPassword: i },
@@ -1869,7 +1869,7 @@ class ui {
1869
1869
  status: 400
1870
1870
  };
1871
1871
  try {
1872
- return this.request(
1872
+ return await this.request(
1873
1873
  "POST",
1874
1874
  `/users/send-verify-otp/${encodeURIComponent(r)}`,
1875
1875
  { email: s },
@@ -1892,7 +1892,7 @@ class ui {
1892
1892
  if (!r) throw new Error("verifyEmail: 'email' is required");
1893
1893
  if (!s) throw new Error("verifyEmail: 'otp' is required");
1894
1894
  try {
1895
- return this.request(
1895
+ return await this.request(
1896
1896
  "POST",
1897
1897
  "/users/verify-email",
1898
1898
  { email: r, otp: s },
@@ -1914,7 +1914,7 @@ class ui {
1914
1914
  if (typeof window > "u")
1915
1915
  return { authenticated: !1 };
1916
1916
  try {
1917
- return this.request(
1917
+ return await this.request(
1918
1918
  "GET",
1919
1919
  "/users/session",
1920
1920
  void 0,
@@ -1932,7 +1932,7 @@ class ui {
1932
1932
  async updateUser(e) {
1933
1933
  const { userId: r } = e;
1934
1934
  if (!r) throw new Error("updateUser: 'userId' is required");
1935
- return this.request(
1935
+ return await this.request(
1936
1936
  "PUT",
1937
1937
  `/users/update/${r}`,
1938
1938
  { ...e },
@@ -1947,7 +1947,13 @@ class ui {
1947
1947
  async deleteUser(e) {
1948
1948
  const { userId: r } = e;
1949
1949
  if (!r) throw new Error("deleteUser: 'userId' is required");
1950
- return this.request("DELETE", `/users/delete/${r}`, {}, {}, !0);
1950
+ return await this.request(
1951
+ "DELETE",
1952
+ `/users/delete/${r}`,
1953
+ {},
1954
+ {},
1955
+ !0
1956
+ );
1951
1957
  }
1952
1958
  /**
1953
1959
  * Get the profile of a user for a specific app
@@ -1958,7 +1964,7 @@ class ui {
1958
1964
  if (!r)
1959
1965
  throw new Error("getProfile: 'userId' and 'appId' are required");
1960
1966
  try {
1961
- return this.request("POST", "/users/profile", { userId: r }, {}, !0);
1967
+ return await this.request("POST", "/users/profile", { userId: r }, {}, !0);
1962
1968
  } catch (s) {
1963
1969
  throw {
1964
1970
  message: s.message || "Failed to fetch profile",
@@ -1974,7 +1980,7 @@ class ui {
1974
1980
  async requestResetUserPasswordOTP(e) {
1975
1981
  const { email: r } = e;
1976
1982
  if (!r) throw new Error("forgotPassword: 'email' is required");
1977
- return this.request("POST", "/users/forgot-password", {
1983
+ return await this.request("POST", "/users/forgot-password", {
1978
1984
  email: r
1979
1985
  });
1980
1986
  }
@@ -1988,7 +1994,7 @@ class ui {
1988
1994
  throw new Error(
1989
1995
  "resetPassword: 'email', 'otp' and 'newPassword' are required"
1990
1996
  );
1991
- return this.request("POST", "/users/reset-password", {
1997
+ return await this.request("POST", "/users/reset-password", {
1992
1998
  email: r,
1993
1999
  otp: s,
1994
2000
  newPassword: i
@@ -2002,7 +2008,7 @@ class ui {
2002
2008
  async checkIfUserExists(e) {
2003
2009
  if (!e)
2004
2010
  throw new Error("checkUser: 'userId' is required");
2005
- return this.request(
2011
+ return await this.request(
2006
2012
  "GET",
2007
2013
  `/users/check-user/${e}?appId=${this.appId}`
2008
2014
  );
@@ -2012,7 +2018,7 @@ class ui {
2012
2018
  const { userId: r, ...s } = e;
2013
2019
  if (!r) throw new Error("userId required");
2014
2020
  const i = new URLSearchParams(s).toString();
2015
- return this.request(
2021
+ return await this.request(
2016
2022
  "GET",
2017
2023
  `/users/${r}/data/search?${i}`,
2018
2024
  void 0,
@@ -2042,7 +2048,7 @@ class ui {
2042
2048
  {}
2043
2049
  )
2044
2050
  ).toString();
2045
- return this.request(
2051
+ return await this.request(
2046
2052
  "GET",
2047
2053
  `/users/${r}/data/searchbyref?${i}`,
2048
2054
  void 0,
@@ -2058,7 +2064,7 @@ class ui {
2058
2064
  async getUserData(e) {
2059
2065
  const { userId: r } = e;
2060
2066
  if (!r) throw new Error("getUserData: 'userId' is required");
2061
- return this.request(
2067
+ return await this.request(
2062
2068
  "GET",
2063
2069
  `/users/${r}/data`,
2064
2070
  void 0,
@@ -2075,7 +2081,7 @@ class ui {
2075
2081
  const { userId: r, dataId: s } = e;
2076
2082
  if (!r || !s)
2077
2083
  throw new Error("getSingleUserData: 'userId' and 'dataId' are required");
2078
- return this.request(
2084
+ return await this.request(
2079
2085
  "GET",
2080
2086
  `/users/${r}/data/${s}`,
2081
2087
  void 0,
@@ -2094,7 +2100,7 @@ class ui {
2094
2100
  if (!s)
2095
2101
  throw new Error("addUserData: 'dataCategory' is required");
2096
2102
  if (!i) throw new Error("addUserData: 'data' is required");
2097
- return this.request(
2103
+ return await this.request(
2098
2104
  "POST",
2099
2105
  `/users/${r}/data`,
2100
2106
  {
@@ -2115,7 +2121,7 @@ class ui {
2115
2121
  if (!r || !s)
2116
2122
  throw new Error("updateUserData: 'userId' and 'dataId' are required");
2117
2123
  if (!i) throw new Error("updateUserData: 'data' is required");
2118
- return this.request(
2124
+ return await this.request(
2119
2125
  "PUT",
2120
2126
  `/users/${r}/data/${s}`,
2121
2127
  i,
@@ -2132,7 +2138,7 @@ class ui {
2132
2138
  const { userId: r, dataId: s } = e;
2133
2139
  if (!r || !s)
2134
2140
  throw new Error("deleteUserData: 'userId' and 'dataId' are required");
2135
- return this.request(
2141
+ return await this.request(
2136
2142
  "DELETE",
2137
2143
  `/users/${r}/data/${s}`,
2138
2144
  void 0,
@@ -2150,10 +2156,14 @@ class ui {
2150
2156
  const r = this.appId;
2151
2157
  if (!r) throw new Error("getAppData: 'appId' is required");
2152
2158
  const s = e ? `?category=${encodeURIComponent(e)}` : "";
2153
- return (await this.request(
2159
+ return await this.request(
2154
2160
  "GET",
2155
- `/app/${r}/data${s}`
2156
- ))?.data || [];
2161
+ `/app/${r}/data${s}`,
2162
+ void 0,
2163
+ {},
2164
+ !1
2165
+ // ✅ include credentials
2166
+ );
2157
2167
  }
2158
2168
  /**
2159
2169
  * Get a single data item from app.appData[] by id
@@ -2163,35 +2173,29 @@ class ui {
2163
2173
  if (!r) throw new Error("getSingleAppData: 'appId' is required");
2164
2174
  if (!e.dataId)
2165
2175
  throw new Error("getSingleAppData: 'dataId' is required");
2166
- return (await this.request(
2176
+ return await this.request(
2167
2177
  "GET",
2168
- `/app/${r}/data/${e.dataId}`
2169
- ))?.data;
2178
+ `/app/${r}/data/${e.dataId}`,
2179
+ void 0,
2180
+ {},
2181
+ !1
2182
+ );
2170
2183
  }
2171
2184
  /**
2172
2185
  * 🔍 Search app data items by dynamic keys (BODY based)
2173
- * @example
2174
- * sdk.searchAppDataByKeys({
2175
- * dataCategory: "order",
2176
- * buyerId: "user123",
2177
- * status: "Processing",
2178
- * q: "iphone"
2179
- * })
2180
2186
  */
2181
2187
  async searchAppDataByKeys(e) {
2182
2188
  const r = this.appId;
2183
- if (!r)
2184
- throw new Error("searchAppDataByKeys: 'appId' is required");
2189
+ if (!r) throw new Error("searchAppDataByKeys: 'appId' is required");
2185
2190
  if (!e || typeof e != "object")
2186
2191
  throw new Error("searchAppDataByKeys: params object is required");
2187
- return (await this.request(
2192
+ return await this.request(
2188
2193
  "POST",
2189
- // ✅ FIX: POST (body-based search)
2190
2194
  `/app/${encodeURIComponent(r)}/data/search/bykeys`,
2191
- // ✅ FIX: correct route
2192
- e
2193
- // ✅ BODY
2194
- ))?.data || [];
2195
+ e,
2196
+ {},
2197
+ !1
2198
+ );
2195
2199
  }
2196
2200
  /**
2197
2201
  * Add a new item to app.appData[] under a specific category
@@ -2204,14 +2208,13 @@ class ui {
2204
2208
  throw new Error("addAppData: 'dataCategory' is required");
2205
2209
  if (!i || typeof i != "object")
2206
2210
  throw new Error("addAppData: 'data' is required");
2207
- return (await this.request(
2211
+ return await this.request(
2208
2212
  "POST",
2209
2213
  `/app/${r}/data/${encodeURIComponent(s)}`,
2210
- {
2211
- item: i
2212
- // ✅ matches controller
2213
- }
2214
- ))?.data;
2214
+ { item: i },
2215
+ {},
2216
+ !1
2217
+ );
2215
2218
  }
2216
2219
  /**
2217
2220
  * Update an item in app.appData[] by id
@@ -2221,11 +2224,13 @@ class ui {
2221
2224
  if (!r) throw new Error("updateAppData: 'appId' is required");
2222
2225
  if (!e.dataId) throw new Error("updateAppData: 'dataId' is required");
2223
2226
  if (!e.data) throw new Error("updateAppData: 'data' is required");
2224
- return (await this.request(
2227
+ return await this.request(
2225
2228
  "PATCH",
2226
2229
  `/app/${r}/data/${e.dataId}`,
2227
- e.data
2228
- ))?.data;
2230
+ e.data,
2231
+ {},
2232
+ !1
2233
+ );
2229
2234
  }
2230
2235
  /**
2231
2236
  * Delete an item from app.appData[] by id
@@ -2234,13 +2239,16 @@ class ui {
2234
2239
  const r = this.appId;
2235
2240
  if (!r) throw new Error("deleteAppData: 'appId' is required");
2236
2241
  if (!e.dataId) throw new Error("deleteAppData: 'dataId' is required");
2237
- return (await this.request(
2242
+ return await this.request(
2238
2243
  "DELETE",
2239
- `/app/${r}/data/${e.dataId}`
2240
- ))?.data;
2244
+ `/app/${r}/data/${e.dataId}`,
2245
+ void 0,
2246
+ {},
2247
+ !1
2248
+ );
2241
2249
  }
2242
2250
  }
2243
- var _e = { exports: {} }, Ee = {};
2251
+ var _e = { exports: {} }, ke = {};
2244
2252
  /**
2245
2253
  * @license React
2246
2254
  * react-jsx-runtime.production.js
@@ -2252,7 +2260,7 @@ var _e = { exports: {} }, Ee = {};
2252
2260
  */
2253
2261
  var It;
2254
2262
  function Wn() {
2255
- if (It) return Ee;
2263
+ if (It) return ke;
2256
2264
  It = 1;
2257
2265
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
2258
2266
  function r(s, i, o) {
@@ -2270,7 +2278,7 @@ function Wn() {
2270
2278
  props: o
2271
2279
  };
2272
2280
  }
2273
- return Ee.Fragment = e, Ee.jsx = r, Ee.jsxs = r, Ee;
2281
+ return ke.Fragment = e, ke.jsx = r, ke.jsxs = r, ke;
2274
2282
  }
2275
2283
  var Ce = {};
2276
2284
  /**
@@ -2360,7 +2368,7 @@ function Bn() {
2360
2368
  }
2361
2369
  }
2362
2370
  function i() {
2363
- var l = E.A;
2371
+ var l = k.A;
2364
2372
  return l === null ? null : l.getOwner();
2365
2373
  }
2366
2374
  function o() {
@@ -2478,7 +2486,7 @@ React keys must be passed directly to JSX without using spread:
2478
2486
  function P(l) {
2479
2487
  return typeof l == "object" && l !== null && l.$$typeof === u;
2480
2488
  }
2481
- var O = Te, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), y = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), E = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, z = Array.isArray, I = console.createTask ? console.createTask : function() {
2489
+ var O = Te, u = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), y = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), k = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, z = Array.isArray, I = console.createTask ? console.createTask : function() {
2482
2490
  return null;
2483
2491
  };
2484
2492
  O = {
@@ -2491,7 +2499,7 @@ React keys must be passed directly to JSX without using spread:
2491
2499
  o
2492
2500
  )(), K = I(s(o)), L = {};
2493
2501
  Ce.Fragment = x, Ce.jsx = function(l, b, S) {
2494
- var j = 1e4 > E.recentlyCreatedOwnerStacks++;
2502
+ var j = 1e4 > k.recentlyCreatedOwnerStacks++;
2495
2503
  return d(
2496
2504
  l,
2497
2505
  b,
@@ -2501,7 +2509,7 @@ React keys must be passed directly to JSX without using spread:
2501
2509
  j ? I(s(l)) : K
2502
2510
  );
2503
2511
  }, Ce.jsxs = function(l, b, S) {
2504
- var j = 1e4 > E.recentlyCreatedOwnerStacks++;
2512
+ var j = 1e4 > k.recentlyCreatedOwnerStacks++;
2505
2513
  return d(
2506
2514
  l,
2507
2515
  b,
@@ -2865,7 +2873,7 @@ const Ss = [
2865
2873
  * This source code is licensed under the ISC license.
2866
2874
  * See the LICENSE file in the root directory of this source tree.
2867
2875
  */
2868
- const ks = [
2876
+ const Es = [
2869
2877
  [
2870
2878
  "path",
2871
2879
  {
@@ -2874,7 +2882,7 @@ const ks = [
2874
2882
  }
2875
2883
  ],
2876
2884
  ["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
2877
- ], Es = q("map-pin", ks);
2885
+ ], ks = q("map-pin", Es);
2878
2886
  /**
2879
2887
  * @license lucide-react v0.544.0 - ISC
2880
2888
  *
@@ -3064,7 +3072,7 @@ const qs = [
3064
3072
  password: "",
3065
3073
  role: p.length ? p[0] : "user",
3066
3074
  ...h && { avatarUrl: "" }
3067
- }, [x, C] = R(w), [T, A] = R(!1), [y, _] = R(!1), [g, v] = R(null), [F, U] = R({}), [M, X] = R(!1), E = c ? "#ffffff" : "#111827", V = c ? "#a1a1aa" : "#6b7280", z = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", I = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3075
+ }, [x, C] = R(w), [T, A] = R(!1), [y, _] = R(!1), [g, v] = R(null), [F, U] = R({}), [M, X] = R(!1), k = c ? "#ffffff" : "#111827", V = c ? "#a1a1aa" : "#6b7280", z = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", I = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3068
3076
  Te.useEffect(() => {
3069
3077
  if (typeof window < "u") {
3070
3078
  const L = () => X(window.innerWidth < 768);
@@ -3107,7 +3115,7 @@ const qs = [
3107
3115
  backgroundColor: z,
3108
3116
  border: `1px solid ${I}`,
3109
3117
  borderRadius: "10px",
3110
- color: E,
3118
+ color: k,
3111
3119
  fontSize: "15px",
3112
3120
  outline: "none",
3113
3121
  transition: "all 0.2s ease",
@@ -3176,7 +3184,7 @@ const qs = [
3176
3184
  style: {
3177
3185
  fontSize: "24px",
3178
3186
  fontWeight: 700,
3179
- color: E,
3187
+ color: k,
3180
3188
  margin: 0
3181
3189
  },
3182
3190
  children: r
@@ -3240,7 +3248,7 @@ const qs = [
3240
3248
  style: {
3241
3249
  fontSize: "14px",
3242
3250
  fontWeight: 500,
3243
- color: E
3251
+ color: k
3244
3252
  },
3245
3253
  children: "Select Role"
3246
3254
  }
@@ -3336,7 +3344,7 @@ const qs = [
3336
3344
  style: {
3337
3345
  fontSize: "14px",
3338
3346
  fontWeight: 500,
3339
- color: E
3347
+ color: k
3340
3348
  },
3341
3349
  children: "Full Name"
3342
3350
  }
@@ -3391,7 +3399,7 @@ const qs = [
3391
3399
  style: {
3392
3400
  fontSize: "14px",
3393
3401
  fontWeight: 500,
3394
- color: E
3402
+ color: k
3395
3403
  },
3396
3404
  children: "Email Address"
3397
3405
  }
@@ -3446,7 +3454,7 @@ const qs = [
3446
3454
  style: {
3447
3455
  fontSize: "14px",
3448
3456
  fontWeight: 500,
3449
- color: E
3457
+ color: k
3450
3458
  },
3451
3459
  children: "Password"
3452
3460
  }
@@ -3524,7 +3532,7 @@ const qs = [
3524
3532
  style: {
3525
3533
  fontSize: "14px",
3526
3534
  fontWeight: 500,
3527
- color: E
3535
+ color: k
3528
3536
  },
3529
3537
  children: "Avatar URL (Optional)"
3530
3538
  }
@@ -3682,7 +3690,7 @@ const qs = [
3682
3690
  email: "",
3683
3691
  otp: "",
3684
3692
  newPassword: ""
3685
- }), [E, V] = R(!1), z = c ? "#ffffff" : "#111827", I = c ? "#a1a1aa" : "#6b7280", W = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Z = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3693
+ }), [k, V] = R(!1), z = c ? "#ffffff" : "#111827", I = c ? "#a1a1aa" : "#6b7280", W = c ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Z = c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3686
3694
  Te.useEffect(() => {
3687
3695
  if (typeof window < "u") {
3688
3696
  const S = () => V(window.innerWidth < 768);
@@ -3747,7 +3755,7 @@ const qs = [
3747
3755
  }
3748
3756
  }, b = {
3749
3757
  width: "100%",
3750
- padding: E ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
3758
+ padding: k ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
3751
3759
  backgroundColor: W,
3752
3760
  border: `1px solid ${Z}`,
3753
3761
  borderRadius: "10px",
@@ -3768,15 +3776,15 @@ const qs = [
3768
3776
  "div",
3769
3777
  {
3770
3778
  style: {
3771
- minWidth: E ? "320px" : "380px",
3772
- maxWidth: E ? "340px" : "390px",
3779
+ minWidth: k ? "320px" : "380px",
3780
+ maxWidth: k ? "340px" : "390px",
3773
3781
  width: "100%",
3774
3782
  display: "flex",
3775
3783
  flexDirection: "column",
3776
3784
  borderRadius: "10px",
3777
3785
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
3778
3786
  backgroundColor: c ? "#000000" : "#ffffff",
3779
- padding: E ? "30px 24px" : "18px 28px"
3787
+ padding: k ? "30px 24px" : "18px 28px"
3780
3788
  },
3781
3789
  children: [
3782
3790
  /* @__PURE__ */ n.jsxs(
@@ -4252,106 +4260,38 @@ const qs = [
4252
4260
  );
4253
4261
  }, hi = ({
4254
4262
  children: t,
4255
- fallback: e = null,
4256
- loading: r = null
4263
+ fallback: e = null
4257
4264
  }) => {
4258
- const s = ue(), [i, o] = R(!1), [a, c] = R(null);
4265
+ const r = ue(), [s, i] = R(!1), [o, a] = R(null);
4259
4266
  if (te(() => {
4260
- o(!0), (async () => {
4267
+ i(!0), (async () => {
4261
4268
  try {
4262
- const m = await s.checkUserSession();
4263
- c(!!m?.authenticated);
4269
+ const p = await r.checkUserSession();
4270
+ a(!!p?.authenticated);
4264
4271
  } catch {
4265
- c(!1);
4272
+ a(!1);
4266
4273
  }
4267
4274
  })();
4268
- }, [s]), !i) return null;
4269
- const h = (d) => typeof d == "function" ? d() : d, p = /* @__PURE__ */ n.jsxs(
4270
- "div",
4271
- {
4272
- style: {
4273
- position: "fixed",
4274
- display: "flex",
4275
- justifyContent: "center",
4276
- alignItems: "center",
4277
- width: "100%",
4278
- height: "100%"
4279
- },
4280
- children: [
4281
- /* @__PURE__ */ n.jsx(
4282
- "div",
4283
- {
4284
- style: {
4285
- border: "4px solid rgba(0,0,0,0.1)",
4286
- borderTop: "4px solid #3498db",
4287
- borderRadius: "50%",
4288
- width: "36px",
4289
- height: "36px",
4290
- animation: "spin 1s linear infinite"
4291
- }
4292
- }
4293
- ),
4294
- /* @__PURE__ */ n.jsx("style", { children: `
4295
- @keyframes spin {
4296
- 0% { transform: rotate(0deg); }
4297
- 100% { transform: rotate(360deg); }
4298
- }
4299
- ` })
4300
- ]
4301
- }
4302
- );
4303
- return a === null ? h(r) ?? p : a ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : h(e);
4275
+ }, [r]), !s) return null;
4276
+ const c = (h) => typeof h == "function" ? h() : h;
4277
+ return o === null ? c(e) ?? null : o ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : c(e);
4304
4278
  }, mi = ({
4305
4279
  children: t,
4306
- fallback: e = null,
4307
- loading: r = null
4280
+ fallback: e = null
4308
4281
  }) => {
4309
- const s = ue(), [i, o] = R(!1), [a, c] = R(null);
4282
+ const r = ue(), [s, i] = R(!1), [o, a] = R(null);
4310
4283
  if (te(() => {
4311
- o(!0), (async () => {
4284
+ i(!0), (async () => {
4312
4285
  try {
4313
- const m = await s.checkUserSession();
4314
- c(!m?.authenticated);
4286
+ const p = await r.checkUserSession();
4287
+ a(!p?.authenticated);
4315
4288
  } catch {
4316
- c(!0);
4289
+ a(!0);
4317
4290
  }
4318
4291
  })();
4319
- }, [s]), !i) return null;
4320
- const h = (d) => typeof d == "function" ? d() : d, p = /* @__PURE__ */ n.jsxs(
4321
- "div",
4322
- {
4323
- style: {
4324
- position: "fixed",
4325
- display: "flex",
4326
- justifyContent: "center",
4327
- alignItems: "center",
4328
- width: "100%",
4329
- height: "100%"
4330
- },
4331
- children: [
4332
- /* @__PURE__ */ n.jsx(
4333
- "div",
4334
- {
4335
- style: {
4336
- border: "4px solid rgba(0,0,0,0.1)",
4337
- borderTop: "4px solid #e74c3c",
4338
- borderRadius: "50%",
4339
- width: "36px",
4340
- height: "36px",
4341
- animation: "spin 1s linear infinite"
4342
- }
4343
- }
4344
- ),
4345
- /* @__PURE__ */ n.jsx("style", { children: `
4346
- @keyframes spin {
4347
- 0% { transform: rotate(0deg); }
4348
- 100% { transform: rotate(360deg); }
4349
- }
4350
- ` })
4351
- ]
4352
- }
4353
- );
4354
- return a === null ? h(r) ?? p : a ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : h(e);
4292
+ }, [r]), !s) return null;
4293
+ const c = (h) => typeof h == "function" ? h() : h;
4294
+ return o === null ? c(e) ?? null : o ? /* @__PURE__ */ n.jsx(n.Fragment, { children: t }) : c(e);
4355
4295
  }, Ms = ({
4356
4296
  isOpen: t,
4357
4297
  onClose: e,
@@ -6385,32 +6325,32 @@ const qs = [
6385
6325
  onVerify: o,
6386
6326
  primaryColor: a = "#00C212"
6387
6327
  }) => {
6388
- const c = ue(), [h, p] = R(null), [d, m] = R(e), [P, O] = R(!0), [u, w] = R(!1), [x, C] = R(!1), [T, A] = R(!1), [y, _] = R(!1), [g, v] = R(!1), [F, U] = R(!1), [M, X] = R(!1), [E, V] = R(!1), [z, I] = R(null), [W, Z] = R(!1), [B, K] = R({
6328
+ const c = ue(), [h, p] = R(null), [d, m] = R(e), [P, O] = R(!0), [u, w] = R(!1), [x, C] = R(!1), [T, A] = R(!1), [y, _] = R(!1), [g, v] = R(!1), [F, U] = R(!1), [M, X] = R(!1), [k, V] = R(!1), [z, I] = R(null), [W, Z] = R(!1), [B, K] = R({
6389
6329
  email: "",
6390
6330
  otp: ""
6391
6331
  }), [L, l] = R(!1), [b, S] = R(!1);
6392
6332
  te(() => {
6393
6333
  if (typeof window < "u") {
6394
- const k = () => p(window.innerWidth);
6395
- return k(), window.addEventListener("resize", k), () => window.removeEventListener("resize", k);
6334
+ const E = () => p(window.innerWidth);
6335
+ return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
6396
6336
  }
6397
6337
  }, []);
6398
- const j = (k, N) => {
6399
- I({ type: k, message: N }), setTimeout(() => I(null), 3e3);
6338
+ const j = (E, N) => {
6339
+ I({ type: E, message: N }), setTimeout(() => I(null), 3e3);
6400
6340
  }, G = () => {
6401
6341
  V(!0);
6402
- const k = setTimeout(() => {
6342
+ const E = setTimeout(() => {
6403
6343
  X(!1), V(!1);
6404
6344
  }, 150);
6405
- return () => clearTimeout(k);
6345
+ return () => clearTimeout(E);
6406
6346
  };
6407
6347
  te(() => {
6408
- const k = (N) => {
6348
+ const E = (N) => {
6409
6349
  const H = document.querySelector(".dropdown-container");
6410
6350
  H && !H.contains(N.target) && G();
6411
6351
  };
6412
- return M && document.addEventListener("mousedown", k), () => {
6413
- document.removeEventListener("mousedown", k);
6352
+ return M && document.addEventListener("mousedown", E), () => {
6353
+ document.removeEventListener("mousedown", E);
6414
6354
  };
6415
6355
  }, [M]);
6416
6356
  const pe = async () => {
@@ -6424,19 +6364,19 @@ const qs = [
6424
6364
  }
6425
6365
  try {
6426
6366
  S(!0);
6427
- const k = await c.requestEmailVerificationOTP({
6367
+ const E = await c.requestEmailVerificationOTP({
6428
6368
  userId: d.id,
6429
6369
  email: B.email
6430
- }), N = k?.data?.success ?? k?.success, H = k?.data?.message ?? k?.message;
6370
+ }), N = E?.data?.success ?? E?.success, H = E?.data?.message ?? E?.message;
6431
6371
  N ? (j("success", H || "OTP sent to email!"), l(!0)) : j("error", H || "Failed to send OTP");
6432
- } catch (k) {
6433
- const N = k?.response?.data?.message || k?.message || "Server error";
6372
+ } catch (E) {
6373
+ const N = E?.response?.data?.message || E?.message || "Server error";
6434
6374
  j("error", N);
6435
6375
  } finally {
6436
6376
  S(!1);
6437
6377
  }
6438
- }, Y = async (k) => {
6439
- if (k.preventDefault(), !B.email || !B.otp) {
6378
+ }, Y = async (E) => {
6379
+ if (E.preventDefault(), !B.email || !B.otp) {
6440
6380
  j("error", "Please fill in all fields");
6441
6381
  return;
6442
6382
  }
@@ -6467,12 +6407,12 @@ const qs = [
6467
6407
  } finally {
6468
6408
  S(!1);
6469
6409
  }
6470
- }, oe = async (k) => {
6410
+ }, oe = async (E) => {
6471
6411
  if (!d) return !1;
6472
6412
  try {
6473
6413
  const N = await c.updateUser({
6474
6414
  userId: d.id,
6475
- avatarUrl: k
6415
+ avatarUrl: E
6476
6416
  });
6477
6417
  if (N?.success) {
6478
6418
  const H = {
@@ -6480,7 +6420,7 @@ const qs = [
6480
6420
  // 🔒 keep existing auth fields
6481
6421
  ...N.user,
6482
6422
  // 🔁 merge backend response if present
6483
- avatarUrl: k
6423
+ avatarUrl: E
6484
6424
  };
6485
6425
  return m(H), j("success", "Avatar updated successfully!"), !0;
6486
6426
  }
@@ -6492,12 +6432,12 @@ const qs = [
6492
6432
  if (d) {
6493
6433
  C(!0);
6494
6434
  try {
6495
- const k = d.email, N = await c.updateUser({
6435
+ const E = d.email, N = await c.updateUser({
6496
6436
  userId: d.id,
6497
6437
  ...d
6498
6438
  });
6499
6439
  if (N.success && N.user) {
6500
- const H = N.user.email !== k, Q = {
6440
+ const H = N.user.email !== E, Q = {
6501
6441
  ...d,
6502
6442
  // keep old state
6503
6443
  ...N.user,
@@ -6510,15 +6450,15 @@ const qs = [
6510
6450
  ), w(!1);
6511
6451
  } else
6512
6452
  j("error", N.message || "Update failed");
6513
- } catch (k) {
6514
- console.error(k), j("error", "Update failed");
6453
+ } catch (E) {
6454
+ console.error(E), j("error", "Update failed");
6515
6455
  } finally {
6516
6456
  C(!1);
6517
6457
  }
6518
6458
  }
6519
- }, Ve = async (k) => {
6459
+ }, Ve = async (E) => {
6520
6460
  try {
6521
- const N = await c.checkIfUserExists(k);
6461
+ const N = await c.checkIfUserExists(E);
6522
6462
  N?.success === !0 && N?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), m(null));
6523
6463
  } catch (N) {
6524
6464
  console.error("⚠️ User validation request failed:", N);
@@ -6545,10 +6485,10 @@ const qs = [
6545
6485
  }
6546
6486
  })();
6547
6487
  }, [e]), te(() => {
6548
- d?.email && K((k) => ({ ...k, email: d.email }));
6488
+ d?.email && K((E) => ({ ...E, email: d.email }));
6549
6489
  }, [d?.email]);
6550
- const pt = (k, N) => {
6551
- let H = parseInt(k.replace("#", ""), 16), Q = (H >> 16) + N, le = (H >> 8 & 255) + N, Se = (H & 255) + N;
6490
+ const pt = (E, N) => {
6491
+ let H = parseInt(E.replace("#", ""), 16), Q = (H >> 16) + N, le = (H >> 8 & 255) + N, Se = (H & 255) + N;
6552
6492
  return Q = Math.min(255, Math.max(0, Q)), le = Math.min(255, Math.max(0, le)), Se = Math.min(255, Math.max(0, Se)), `#${(Se | le << 8 | Q << 16).toString(16).padStart(6, "0")}`;
6553
6493
  }, D = r ? {
6554
6494
  background: "#000000",
@@ -6676,7 +6616,7 @@ const qs = [
6676
6616
  value: d.address || "Not provided",
6677
6617
  name: "address",
6678
6618
  type: "text",
6679
- icon: Es
6619
+ icon: ks
6680
6620
  }
6681
6621
  ];
6682
6622
  return /* @__PURE__ */ n.jsxs(
@@ -7083,7 +7023,7 @@ const qs = [
7083
7023
  M && /* @__PURE__ */ n.jsxs(
7084
7024
  "div",
7085
7025
  {
7086
- className: `dropdown-container ${E ? "closing" : ""}`,
7026
+ className: `dropdown-container ${k ? "closing" : ""}`,
7087
7027
  style: {
7088
7028
  position: "absolute",
7089
7029
  bottom: "100%",
@@ -7096,7 +7036,7 @@ const qs = [
7096
7036
  zIndex: 200,
7097
7037
  marginBottom: "6px",
7098
7038
  overflow: "hidden",
7099
- animation: `${E ? "drawerSlideDown" : "drawerSlideUp"} 0.25s ease-out forwards`
7039
+ animation: `${k ? "drawerSlideDown" : "drawerSlideUp"} 0.25s ease-out forwards`
7100
7040
  },
7101
7041
  children: [
7102
7042
  /* @__PURE__ */ n.jsxs(
@@ -7120,8 +7060,8 @@ const qs = [
7120
7060
  gap: "8px",
7121
7061
  textAlign: "left"
7122
7062
  },
7123
- onMouseEnter: (k) => k.currentTarget.style.backgroundColor = D.surfaceLight,
7124
- onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
7063
+ onMouseEnter: (E) => E.currentTarget.style.backgroundColor = D.surfaceLight,
7064
+ onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
7125
7065
  children: [
7126
7066
  /* @__PURE__ */ n.jsx(ct, { size: 14, "aria-hidden": "true" }),
7127
7067
  "Change Password"
@@ -7149,10 +7089,10 @@ const qs = [
7149
7089
  gap: "8px",
7150
7090
  textAlign: "left"
7151
7091
  },
7152
- onMouseEnter: (k) => {
7153
- k.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
7092
+ onMouseEnter: (E) => {
7093
+ E.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
7154
7094
  },
7155
- onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
7095
+ onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
7156
7096
  children: [
7157
7097
  /* @__PURE__ */ n.jsx(dt, { size: 14, "aria-hidden": "true" }),
7158
7098
  "Logout"
@@ -7180,10 +7120,10 @@ const qs = [
7180
7120
  gap: "8px",
7181
7121
  textAlign: "left"
7182
7122
  },
7183
- onMouseEnter: (k) => {
7184
- k.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
7123
+ onMouseEnter: (E) => {
7124
+ E.currentTarget.style.backgroundColor = r ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)";
7185
7125
  },
7186
- onMouseLeave: (k) => k.currentTarget.style.backgroundColor = "transparent",
7126
+ onMouseLeave: (E) => E.currentTarget.style.backgroundColor = "transparent",
7187
7127
  children: [
7188
7128
  /* @__PURE__ */ n.jsx($e, { size: 14, "aria-hidden": "true" }),
7189
7129
  "Delete Account"
@@ -7250,8 +7190,8 @@ const qs = [
7250
7190
  gap: "20px"
7251
7191
  }
7252
7192
  },
7253
- children: ur.map((k) => {
7254
- const N = k.icon;
7193
+ children: ur.map((E) => {
7194
+ const N = E.icon;
7255
7195
  return /* @__PURE__ */ n.jsxs(
7256
7196
  "div",
7257
7197
  {
@@ -7274,16 +7214,16 @@ const qs = [
7274
7214
  },
7275
7215
  children: [
7276
7216
  /* @__PURE__ */ n.jsx(N, { size: 16, "aria-hidden": "true" }),
7277
- k.label
7217
+ E.label
7278
7218
  ]
7279
7219
  }
7280
7220
  ),
7281
7221
  u ? /* @__PURE__ */ n.jsx(
7282
7222
  "input",
7283
7223
  {
7284
- type: k.type,
7285
- name: k.name,
7286
- value: d[k.name],
7224
+ type: E.type,
7225
+ name: E.name,
7226
+ value: d[E.name],
7287
7227
  onChange: (H) => m(
7288
7228
  (Q) => Q && { ...Q, [H.target.name]: H.target.value }
7289
7229
  ),
@@ -7300,8 +7240,8 @@ const qs = [
7300
7240
  width: "100%",
7301
7241
  boxSizing: "border-box"
7302
7242
  },
7303
- placeholder: `Enter ${k.label.toLowerCase()}`,
7304
- "aria-label": k.label
7243
+ placeholder: `Enter ${E.label.toLowerCase()}`,
7244
+ "aria-label": E.label
7305
7245
  }
7306
7246
  ) : /* @__PURE__ */ n.jsx(
7307
7247
  "div",
@@ -7318,12 +7258,12 @@ const qs = [
7318
7258
  color: D.textPrimary,
7319
7259
  backgroundColor: r ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
7320
7260
  },
7321
- children: k.value
7261
+ children: E.value
7322
7262
  }
7323
7263
  )
7324
7264
  ]
7325
7265
  },
7326
- k.name
7266
+ E.name
7327
7267
  );
7328
7268
  })
7329
7269
  }
@@ -7478,8 +7418,8 @@ const qs = [
7478
7418
  userId: d.id,
7479
7419
  isOpen: y,
7480
7420
  onClose: () => _(!1),
7481
- onSuccess: (k) => j("success", k),
7482
- onError: (k) => j("error", k),
7421
+ onSuccess: (E) => j("success", E),
7422
+ onError: (E) => j("error", E),
7483
7423
  colors: D
7484
7424
  }
7485
7425
  ),
@@ -7490,8 +7430,8 @@ const qs = [
7490
7430
  token: t,
7491
7431
  isOpen: g,
7492
7432
  onClose: () => v(!1),
7493
- onSuccess: (k) => j("success", k),
7494
- onError: (k) => j("error", k),
7433
+ onSuccess: (E) => j("success", E),
7434
+ onError: (E) => j("error", E),
7495
7435
  colors: D
7496
7436
  }
7497
7437
  ),
@@ -7625,7 +7565,7 @@ const qs = [
7625
7565
  viewProfileLabel: O = "View Profile",
7626
7566
  logoutLabel: u = "Sign Out"
7627
7567
  }) => {
7628
- const w = ue(), [x, C] = R(!1), [T, A] = R(null), [y, _] = R(!0), [g, v] = R(null), F = ft(null), U = ft(null), [M, X] = R(!1), [E, V] = R(!1);
7568
+ const w = ue(), [x, C] = R(!1), [T, A] = R(null), [y, _] = R(!0), [g, v] = R(null), F = ft(null), U = ft(null), [M, X] = R(!1), [k, V] = R(!1);
7629
7569
  te(() => {
7630
7570
  if (typeof window > "u") return;
7631
7571
  const l = () => {
@@ -7719,19 +7659,19 @@ const qs = [
7719
7659
  avatarButton: {
7720
7660
  display: "flex",
7721
7661
  alignItems: "center",
7722
- gap: E ? "6px" : "8px",
7723
- padding: E ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
7662
+ gap: k ? "6px" : "8px",
7663
+ padding: k ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
7724
7664
  borderRadius: "24px",
7725
7665
  backgroundColor: z.surface,
7726
7666
  cursor: "pointer",
7727
7667
  transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
7728
- minWidth: E ? "auto" : "140px",
7729
- maxWidth: E ? "200px" : "none",
7668
+ minWidth: k ? "auto" : "140px",
7669
+ maxWidth: k ? "200px" : "none",
7730
7670
  outline: "none"
7731
7671
  },
7732
7672
  avatarImage: {
7733
- width: E ? "28px" : "32px",
7734
- height: E ? "28px" : "32px",
7673
+ width: k ? "28px" : "32px",
7674
+ height: k ? "28px" : "32px",
7735
7675
  borderRadius: "50%",
7736
7676
  objectFit: "cover",
7737
7677
  border: `2px solid ${z.borderLight}`,
@@ -7746,23 +7686,23 @@ const qs = [
7746
7686
  overflow: "hidden"
7747
7687
  },
7748
7688
  userName: {
7749
- fontSize: E ? "13px" : "14px",
7689
+ fontSize: k ? "13px" : "14px",
7750
7690
  fontWeight: 600,
7751
7691
  color: z.textPrimary,
7752
7692
  lineHeight: "1.2",
7753
7693
  whiteSpace: "nowrap",
7754
7694
  overflow: "hidden",
7755
7695
  textOverflow: "ellipsis",
7756
- maxWidth: E ? "80px" : "120px"
7696
+ maxWidth: k ? "80px" : "120px"
7757
7697
  },
7758
7698
  userEmail: {
7759
- fontSize: E ? "11px" : "12px",
7699
+ fontSize: k ? "11px" : "12px",
7760
7700
  color: z.textTertiary,
7761
7701
  lineHeight: "1.2",
7762
7702
  whiteSpace: "nowrap",
7763
7703
  overflow: "hidden",
7764
7704
  textOverflow: "ellipsis",
7765
- maxWidth: E ? "80px" : "120px"
7705
+ maxWidth: k ? "80px" : "120px"
7766
7706
  },
7767
7707
  chevron: {
7768
7708
  transition: "transform 0.2s ease",
@@ -7791,7 +7731,7 @@ const qs = [
7791
7731
  overflow: "hidden"
7792
7732
  },
7793
7733
  dropdownSection: {
7794
- padding: E ? "10px 12px" : "0px 16px",
7734
+ padding: k ? "10px 12px" : "0px 16px",
7795
7735
  "&:last-child": {
7796
7736
  borderBottom: "none"
7797
7737
  }
@@ -7799,12 +7739,12 @@ const qs = [
7799
7739
  userSection: {
7800
7740
  display: "flex",
7801
7741
  alignItems: "center",
7802
- gap: E ? "10px" : "12px",
7803
- padding: E ? "14px" : "16px"
7742
+ gap: k ? "10px" : "12px",
7743
+ padding: k ? "14px" : "16px"
7804
7744
  },
7805
7745
  dropdownAvatar: {
7806
- width: E ? "40px" : "48px",
7807
- height: E ? "40px" : "48px",
7746
+ width: k ? "40px" : "48px",
7747
+ height: k ? "40px" : "48px",
7808
7748
  borderRadius: "50%",
7809
7749
  objectFit: "cover",
7810
7750
  border: `2px solid ${z.borderLight}`,
@@ -7817,7 +7757,7 @@ const qs = [
7817
7757
  minWidth: 0
7818
7758
  },
7819
7759
  dropdownUserName: {
7820
- fontSize: E ? "15px" : "16px",
7760
+ fontSize: k ? "15px" : "16px",
7821
7761
  fontWeight: 600,
7822
7762
  color: z.textPrimary,
7823
7763
  lineHeight: "1.2",
@@ -7826,7 +7766,7 @@ const qs = [
7826
7766
  textOverflow: "ellipsis"
7827
7767
  },
7828
7768
  dropdownUserEmail: {
7829
- fontSize: E ? "13px" : "14px",
7769
+ fontSize: k ? "13px" : "14px",
7830
7770
  color: z.textSecondary,
7831
7771
  lineHeight: "1.2",
7832
7772
  overflow: "hidden",
@@ -7835,8 +7775,8 @@ const qs = [
7835
7775
  menuItem: {
7836
7776
  display: "flex",
7837
7777
  alignItems: "center",
7838
- gap: E ? "10px" : "12px",
7839
- padding: E ? "10px 12px" : "12px 16px",
7778
+ gap: k ? "10px" : "12px",
7779
+ padding: k ? "10px 12px" : "12px 16px",
7840
7780
  borderRadius: "8px",
7841
7781
  cursor: "pointer",
7842
7782
  transition: "all 0.15s ease",
@@ -7845,7 +7785,7 @@ const qs = [
7845
7785
  border: "none",
7846
7786
  background: "none",
7847
7787
  width: "100%",
7848
- fontSize: E ? "13px" : "14px",
7788
+ fontSize: k ? "13px" : "14px",
7849
7789
  textAlign: "left",
7850
7790
  outline: "none"
7851
7791
  },
@@ -7853,38 +7793,38 @@ const qs = [
7853
7793
  flex: 1
7854
7794
  },
7855
7795
  icon: {
7856
- width: E ? "16px" : "18px",
7857
- height: E ? "16px" : "18px",
7796
+ width: k ? "16px" : "18px",
7797
+ height: k ? "16px" : "18px",
7858
7798
  color: z.textSecondary,
7859
7799
  flexShrink: 0
7860
7800
  },
7861
7801
  logoutButton: {
7862
7802
  display: "flex",
7863
7803
  alignItems: "center",
7864
- gap: E ? "10px" : "12px",
7865
- padding: E ? "10px 12px" : "12px 16px",
7804
+ gap: k ? "10px" : "12px",
7805
+ padding: k ? "10px 12px" : "12px 16px",
7866
7806
  borderRadius: "8px",
7867
7807
  cursor: "pointer",
7868
7808
  transition: "all 0.15s ease",
7869
7809
  background: "none",
7870
7810
  border: "none",
7871
7811
  width: "100%",
7872
- fontSize: E ? "13px" : "14px",
7812
+ fontSize: k ? "13px" : "14px",
7873
7813
  color: z.error,
7874
7814
  textAlign: "left",
7875
7815
  outline: "none"
7876
7816
  },
7877
7817
  loadingText: {
7878
- padding: E ? "16px 12px" : "20px 16px",
7818
+ padding: k ? "16px 12px" : "20px 16px",
7879
7819
  textAlign: "center",
7880
7820
  color: z.textSecondary,
7881
- fontSize: E ? "13px" : "14px"
7821
+ fontSize: k ? "13px" : "14px"
7882
7822
  },
7883
7823
  errorState: {
7884
- padding: E ? "16px 12px" : "20px 16px",
7824
+ padding: k ? "16px 12px" : "20px 16px",
7885
7825
  textAlign: "center",
7886
7826
  color: z.textSecondary,
7887
- fontSize: E ? "13px" : "14px",
7827
+ fontSize: k ? "13px" : "14px",
7888
7828
  display: "flex",
7889
7829
  alignItems: "center",
7890
7830
  justifyContent: "center",
@@ -7963,8 +7903,8 @@ const qs = [
7963
7903
  src: T.avatarUrl,
7964
7904
  alt: `${T?.name || "User"}'s avatar`,
7965
7905
  style: {
7966
- width: E ? "34px" : "36px",
7967
- height: E ? "34px" : "36px",
7906
+ width: k ? "34px" : "36px",
7907
+ height: k ? "34px" : "36px",
7968
7908
  borderRadius: "50%",
7969
7909
  objectFit: "cover",
7970
7910
  border: `2px solid ${z.borderLight}`,
@@ -7986,8 +7926,8 @@ const qs = [
7986
7926
  )}`,
7987
7927
  alt: "Default user avatar",
7988
7928
  style: {
7989
- width: E ? "34px" : "40px",
7990
- height: E ? "34px" : "40px",
7929
+ width: k ? "34px" : "40px",
7930
+ height: k ? "34px" : "40px",
7991
7931
  borderRadius: "50%",
7992
7932
  objectFit: "cover",
7993
7933
  border: `2px solid ${z.borderLight}`,
@@ -8040,14 +7980,14 @@ const qs = [
8040
7980
  loading: "lazy"
8041
7981
  }
8042
7982
  ),
8043
- !E && /* @__PURE__ */ n.jsxs("div", { style: I.userInfo, children: [
7983
+ !k && /* @__PURE__ */ n.jsxs("div", { style: I.userInfo, children: [
8044
7984
  /* @__PURE__ */ n.jsx("div", { style: I.userName, title: T?.name, children: T?.name || "Guest" }),
8045
7985
  T?.email && /* @__PURE__ */ n.jsx("div", { style: I.userEmail, title: T.email, children: T.email })
8046
7986
  ] }),
8047
7987
  /* @__PURE__ */ n.jsx(
8048
7988
  ts,
8049
7989
  {
8050
- size: E ? 14 : 16,
7990
+ size: k ? 14 : 16,
8051
7991
  style: I.chevron,
8052
7992
  "aria-hidden": "true"
8053
7993
  }