@qwanyx/stack 0.2.12 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,15 +1,15 @@
1
- var Et = Object.defineProperty;
2
- var _t = (h, t, r) => t in h ? Et(h, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : h[t] = r;
3
- var he = (h, t, r) => _t(h, typeof t != "symbol" ? t + "" : t, r);
4
- import tt, { useState as z, useCallback as K, useEffect as de, useMemo as rt, useRef as Qe } from "react";
1
+ var _t = Object.defineProperty;
2
+ var Et = (p, t, r) => t in p ? _t(p, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : p[t] = r;
3
+ var be = (p, t, r) => Et(p, typeof t != "symbol" ? t + "" : t, r);
4
+ import rt, { useState as M, useCallback as J, useEffect as fe, useMemo as nt, useRef as Ze } from "react";
5
5
  class $t {
6
6
  constructor(t) {
7
- he(this, "config");
7
+ be(this, "config");
8
8
  // ===== FILE OPERATIONS =====
9
9
  /**
10
10
  * Options for file upload
11
11
  */
12
- he(this, "defaultUploadOptions", {
12
+ be(this, "defaultUploadOptions", {
13
13
  maxSizeMB: 10,
14
14
  maxImageDimension: 0,
15
15
  // 0 = no resize
@@ -228,16 +228,16 @@ class $t {
228
228
  i(t);
229
229
  return;
230
230
  }
231
- let p, u;
232
- s.width > s.height ? (p = r, u = Math.round(s.height / s.width * r)) : (u = r, p = Math.round(s.width / s.height * r));
231
+ let h, u;
232
+ s.width > s.height ? (h = r, u = Math.round(s.height / s.width * r)) : (u = r, h = Math.round(s.width / s.height * r));
233
233
  const g = document.createElement("canvas");
234
- g.width = p, g.height = u;
234
+ g.width = h, g.height = u;
235
235
  const c = g.getContext("2d");
236
236
  if (!c) {
237
237
  i(t);
238
238
  return;
239
239
  }
240
- c.drawImage(s, 0, 0, p, u);
240
+ c.drawImage(s, 0, 0, h, u);
241
241
  const E = t.type === "image/png" ? "image/png" : "image/jpeg";
242
242
  g.toBlob(
243
243
  (x) => {
@@ -267,8 +267,8 @@ class $t {
267
267
  try {
268
268
  let o = n;
269
269
  s.maxImageDimension > 0 && n.type.startsWith("image/") && (o = await this.resizeImage(n, s.maxImageDimension, s.imageQuality));
270
- const p = s.maxSizeMB * 1024 * 1024;
271
- if (o.size > p)
270
+ const h = s.maxSizeMB * 1024 * 1024;
271
+ if (o.size > h)
272
272
  return {
273
273
  success: !1,
274
274
  error: `File too large (${(o.size / 1024 / 1024).toFixed(1)} MB). Max: ${s.maxSizeMB} MB`
@@ -321,7 +321,7 @@ class $t {
321
321
  }
322
322
  class jt {
323
323
  constructor(t) {
324
- he(this, "config");
324
+ be(this, "config");
325
325
  if (!t.system_id)
326
326
  throw new Error("MailClient: system_id is REQUIRED");
327
327
  this.config = t;
@@ -349,8 +349,8 @@ class jt {
349
349
  body: JSON.stringify(i)
350
350
  });
351
351
  if (!s.ok) {
352
- const p = await s.text();
353
- throw new Error(`API error (${s.status}): ${p}`);
352
+ const h = await s.text();
353
+ throw new Error(`API error (${s.status}): ${h}`);
354
354
  }
355
355
  const o = await s.json();
356
356
  if (!o.success && o.error)
@@ -440,9 +440,9 @@ class jt {
440
440
  const s = [
441
441
  "SELECT INBOX",
442
442
  ...r.map((u) => `UID MOVE ${u} ${i}`)
443
- ], p = (await this.imapExec(t, s)).responses.filter((u) => u.ok && u.command === "UID MOVE").length;
444
- if (p > 0)
445
- return { success: !0, moved: p };
443
+ ], h = (await this.imapExec(t, s)).responses.filter((u) => u.ok && u.command === "UID MOVE").length;
444
+ if (h > 0)
445
+ return { success: !0, moved: h };
446
446
  }
447
447
  return { success: !1, moved: 0 };
448
448
  }
@@ -502,11 +502,11 @@ class jt {
502
502
  for (const m of c.messages)
503
503
  m.uid && E.set(m.uid, m);
504
504
  const x = u.map((m) => {
505
- var Y, w, U, y, N;
505
+ var W, w, D, y, O;
506
506
  const T = E.get(m);
507
507
  if (!T) return null;
508
- const S = ((Y = T.flags) == null ? void 0 : Y.some((F) => F.includes("Seen"))) || !1, V = ((U = (w = T.envelope) == null ? void 0 : w.from) == null ? void 0 : U.email) || "Unknown", B = ((y = T.envelope) == null ? void 0 : y.subject) || "(No subject)", $ = ((N = T.envelope) == null ? void 0 : N.date) || "";
509
- return { uid: m, from: V, subject: B, date: $, seen: S };
508
+ const S = ((W = T.flags) == null ? void 0 : W.some((F) => F.includes("Seen"))) || !1, V = ((D = (w = T.envelope) == null ? void 0 : w.from) == null ? void 0 : D.email) || "Unknown", I = ((y = T.envelope) == null ? void 0 : y.subject) || "(No subject)", $ = ((O = T.envelope) == null ? void 0 : O.date) || "";
509
+ return { uid: m, from: V, subject: I, date: $, seen: S };
510
510
  }).filter(Boolean);
511
511
  return {
512
512
  account: { id: t, label: "", email: "" },
@@ -517,10 +517,11 @@ class jt {
517
517
  /**
518
518
  * Get a single email by UID with full body content
519
519
  */
520
- async getEmail(t, r) {
520
+ async getEmail(t, r, n = "INBOX") {
521
521
  return this.callMail("get_email", {
522
522
  account_id: t,
523
- uid: r
523
+ uid: r,
524
+ folder: n
524
525
  });
525
526
  }
526
527
  // ===== SMTP OPERATIONS (via email coprocessor) =====
@@ -537,37 +538,37 @@ class jt {
537
538
  return t.html && (r.html = t.html), t.from && (r.from = t.from), t.smtpConfig && (r.smtp_config = t.smtpConfig), this.callEmail("send", r);
538
539
  }
539
540
  }
540
- const De = "qwanyx_auth_token", Me = "qwanyx_refresh_token";
541
+ const ze = "qwanyx_auth_token", Ge = "qwanyx_refresh_token";
541
542
  class Tt {
542
543
  /**
543
544
  * Store authentication token
544
545
  */
545
546
  static setToken(t) {
546
- typeof window < "u" && localStorage.setItem(De, t);
547
+ typeof window < "u" && localStorage.setItem(ze, t);
547
548
  }
548
549
  /**
549
550
  * Get authentication token
550
551
  */
551
552
  static getToken() {
552
- return typeof window < "u" ? localStorage.getItem(De) : null;
553
+ return typeof window < "u" ? localStorage.getItem(ze) : null;
553
554
  }
554
555
  /**
555
556
  * Remove authentication token
556
557
  */
557
558
  static clearToken() {
558
- typeof window < "u" && (localStorage.removeItem(De), localStorage.removeItem(Me));
559
+ typeof window < "u" && (localStorage.removeItem(ze), localStorage.removeItem(Ge));
559
560
  }
560
561
  /**
561
562
  * Store refresh token
562
563
  */
563
564
  static setRefreshToken(t) {
564
- typeof window < "u" && localStorage.setItem(Me, t);
565
+ typeof window < "u" && localStorage.setItem(Ge, t);
565
566
  }
566
567
  /**
567
568
  * Get refresh token
568
569
  */
569
570
  static getRefreshToken() {
570
- return typeof window < "u" ? localStorage.getItem(Me) : null;
571
+ return typeof window < "u" ? localStorage.getItem(Ge) : null;
571
572
  }
572
573
  /**
573
574
  * Check if user is authenticated
@@ -585,7 +586,7 @@ class Tt {
585
586
  }
586
587
  class kt {
587
588
  constructor(t) {
588
- he(this, "config");
589
+ be(this, "config");
589
590
  this.config = {
590
591
  timeout: 3e4,
591
592
  headers: {
@@ -616,7 +617,7 @@ class kt {
616
617
  headers: i = {},
617
618
  body: s,
618
619
  params: o
619
- } = r, p = `${this.config.baseUrl}/${t}${this.buildQueryString(o)}`, u = {
620
+ } = r, h = `${this.config.baseUrl}/${t}${this.buildQueryString(o)}`, u = {
620
621
  ...this.config.headers,
621
622
  ...Tt.getAuthHeader(),
622
623
  ...i
@@ -626,7 +627,7 @@ class kt {
626
627
  };
627
628
  s && n !== "GET" && (g.body = JSON.stringify(s));
628
629
  try {
629
- const c = new AbortController(), E = setTimeout(() => c.abort(), this.config.timeout), x = await fetch(p, {
630
+ const c = new AbortController(), E = setTimeout(() => c.abort(), this.config.timeout), x = await fetch(h, {
630
631
  ...g,
631
632
  signal: c.signal
632
633
  });
@@ -684,26 +685,26 @@ class kt {
684
685
  return this.config.baseUrl;
685
686
  }
686
687
  }
687
- let ke = null;
688
- function Ft(h) {
689
- return ke = new kt(h), ke;
688
+ let Ne = null;
689
+ function Ft(p) {
690
+ return Ne = new kt(p), Ne;
690
691
  }
691
- function nt() {
692
- if (!ke)
692
+ function st() {
693
+ if (!Ne)
693
694
  throw new Error("API client not initialized. Call initializeApiClient() first.");
694
- return ke;
695
+ return Ne;
695
696
  }
696
- function Rt(h, t, r = {}) {
697
+ function Rt(p, t, r = {}) {
697
698
  const {
698
699
  enabled: n = !0,
699
700
  refetchOnMount: i = !0,
700
701
  onSuccess: s,
701
702
  onError: o
702
- } = r, [p, u] = z(null), [g, c] = z(n), [E, x] = z(null), m = K(async () => {
703
+ } = r, [h, u] = M(null), [g, c] = M(n), [E, x] = M(null), m = J(async () => {
703
704
  if (n) {
704
705
  c(!0), x(null);
705
706
  try {
706
- const S = await nt().get(h, t);
707
+ const S = await st().get(p, t);
707
708
  u(S), s == null || s(S);
708
709
  } catch (T) {
709
710
  const S = T instanceof Error ? T : new Error("Unknown error");
@@ -712,35 +713,35 @@ function Rt(h, t, r = {}) {
712
713
  c(!1);
713
714
  }
714
715
  }
715
- }, [h, JSON.stringify(t), n, s, o]);
716
- return de(() => {
716
+ }, [p, JSON.stringify(t), n, s, o]);
717
+ return fe(() => {
717
718
  i && m();
718
719
  }, [m, i]), {
719
- data: p,
720
+ data: h,
720
721
  loading: g,
721
722
  error: E,
722
723
  refetch: m
723
724
  };
724
725
  }
725
- function Ut(h, t = "POST", r = {}) {
726
- const { onSuccess: n, onError: i } = r, [s, o] = z(null), [p, u] = z(!1), [g, c] = z(null), E = K(
726
+ function Dt(p, t = "POST", r = {}) {
727
+ const { onSuccess: n, onError: i } = r, [s, o] = M(null), [h, u] = M(!1), [g, c] = M(null), E = J(
727
728
  async (m) => {
728
729
  u(!0), c(null);
729
730
  try {
730
- const T = nt();
731
+ const T = st();
731
732
  let S;
732
733
  switch (t) {
733
734
  case "POST":
734
- S = await T.post(h, m);
735
+ S = await T.post(p, m);
735
736
  break;
736
737
  case "PUT":
737
- S = await T.put(h, m);
738
+ S = await T.put(p, m);
738
739
  break;
739
740
  case "PATCH":
740
- S = await T.patch(h, m);
741
+ S = await T.patch(p, m);
741
742
  break;
742
743
  case "DELETE":
743
- S = await T.delete(h);
744
+ S = await T.delete(p);
744
745
  break;
745
746
  default:
746
747
  throw new Error(`Unsupported method: ${t}`);
@@ -753,19 +754,19 @@ function Ut(h, t = "POST", r = {}) {
753
754
  u(!1);
754
755
  }
755
756
  },
756
- [h, t, n, i]
757
- ), x = K(() => {
757
+ [p, t, n, i]
758
+ ), x = J(() => {
758
759
  o(null), c(null), u(!1);
759
760
  }, []);
760
761
  return {
761
762
  data: s,
762
- loading: p,
763
+ loading: h,
763
764
  error: g,
764
765
  mutate: E,
765
766
  reset: x
766
767
  };
767
768
  }
768
- var Ie = { exports: {} }, ge = {};
769
+ var Ye = { exports: {} }, we = {};
769
770
  /**
770
771
  * @license React
771
772
  * react-jsx-runtime.production.min.js
@@ -775,21 +776,21 @@ var Ie = { exports: {} }, ge = {};
775
776
  * This source code is licensed under the MIT license found in the
776
777
  * LICENSE file in the root directory of this source tree.
777
778
  */
778
- var Ze;
779
+ var et;
779
780
  function St() {
780
- if (Ze) return ge;
781
- Ze = 1;
782
- var h = tt, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
783
- function o(p, u, g) {
781
+ if (et) return we;
782
+ et = 1;
783
+ var p = rt, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
784
+ function o(h, u, g) {
784
785
  var c, E = {}, x = null, m = null;
785
786
  g !== void 0 && (x = "" + g), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (m = u.ref);
786
787
  for (c in u) n.call(u, c) && !s.hasOwnProperty(c) && (E[c] = u[c]);
787
- if (p && p.defaultProps) for (c in u = p.defaultProps, u) E[c] === void 0 && (E[c] = u[c]);
788
- return { $$typeof: t, type: p, key: x, ref: m, props: E, _owner: i.current };
788
+ if (h && h.defaultProps) for (c in u = h.defaultProps, u) E[c] === void 0 && (E[c] = u[c]);
789
+ return { $$typeof: t, type: h, key: x, ref: m, props: E, _owner: i.current };
789
790
  }
790
- return ge.Fragment = r, ge.jsx = o, ge.jsxs = o, ge;
791
+ return we.Fragment = r, we.jsx = o, we.jsxs = o, we;
791
792
  }
792
- var me = {};
793
+ var _e = {};
793
794
  /**
794
795
  * @license React
795
796
  * react-jsx-runtime.development.js
@@ -799,42 +800,42 @@ var me = {};
799
800
  * This source code is licensed under the MIT license found in the
800
801
  * LICENSE file in the root directory of this source tree.
801
802
  */
802
- var et;
803
- function Ot() {
804
- return et || (et = 1, process.env.NODE_ENV !== "production" && function() {
805
- var h = tt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), p = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), T = Symbol.iterator, S = "@@iterator";
803
+ var tt;
804
+ function Nt() {
805
+ return tt || (tt = 1, process.env.NODE_ENV !== "production" && function() {
806
+ var p = rt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), T = Symbol.iterator, S = "@@iterator";
806
807
  function V(e) {
807
808
  if (e === null || typeof e != "object")
808
809
  return null;
809
810
  var l = T && e[T] || e[S];
810
811
  return typeof l == "function" ? l : null;
811
812
  }
812
- var B = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
813
+ var I = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
813
814
  function $(e) {
814
815
  {
815
816
  for (var l = arguments.length, d = new Array(l > 1 ? l - 1 : 0), b = 1; b < l; b++)
816
817
  d[b - 1] = arguments[b];
817
- Y("error", e, d);
818
+ W("error", e, d);
818
819
  }
819
820
  }
820
- function Y(e, l, d) {
821
+ function W(e, l, d) {
821
822
  {
822
- var b = B.ReactDebugCurrentFrame, P = b.getStackAddendum();
823
+ var b = I.ReactDebugCurrentFrame, P = b.getStackAddendum();
823
824
  P !== "" && (l += "%s", d = d.concat([P]));
824
- var A = d.map(function(O) {
825
- return String(O);
825
+ var A = d.map(function(N) {
826
+ return String(N);
826
827
  });
827
828
  A.unshift("Warning: " + l), Function.prototype.apply.call(console[e], console, A);
828
829
  }
829
830
  }
830
- var w = !1, U = !1, y = !1, N = !1, F = !1, _;
831
- _ = Symbol.for("react.module.reference");
831
+ var w = !1, D = !1, y = !1, O = !1, F = !1, j;
832
+ j = Symbol.for("react.module.reference");
832
833
  function C(e) {
833
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || F || e === i || e === g || e === c || N || e === m || w || U || y || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === E || e.$$typeof === o || e.$$typeof === p || e.$$typeof === u || // This needs to include all possible module reference object
834
+ return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || F || e === i || e === g || e === c || O || e === m || w || D || y || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === E || e.$$typeof === o || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
834
835
  // types supported by any Flight configuration anywhere since
835
836
  // we don't know which Flight build this will end up being used
836
837
  // with.
837
- e.$$typeof === _ || e.getModuleId !== void 0));
838
+ e.$$typeof === j || e.getModuleId !== void 0));
838
839
  }
839
840
  function v(e, l, d) {
840
841
  var b = e.displayName;
@@ -846,7 +847,7 @@ function Ot() {
846
847
  function G(e) {
847
848
  return e.displayName || "Context";
848
849
  }
849
- function I(e) {
850
+ function L(e) {
850
851
  if (e == null)
851
852
  return null;
852
853
  if (typeof e.tag == "number" && $("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -869,7 +870,7 @@ function Ot() {
869
870
  }
870
871
  if (typeof e == "object")
871
872
  switch (e.$$typeof) {
872
- case p:
873
+ case h:
873
874
  var l = e;
874
875
  return G(l) + ".Consumer";
875
876
  case o:
@@ -879,11 +880,11 @@ function Ot() {
879
880
  return v(e, e.render, "ForwardRef");
880
881
  case E:
881
882
  var b = e.displayName || null;
882
- return b !== null ? b : I(e.type) || "Memo";
883
+ return b !== null ? b : L(e.type) || "Memo";
883
884
  case x: {
884
- var P = e, A = P._payload, O = P._init;
885
+ var P = e, A = P._payload, N = P._init;
885
886
  try {
886
- return I(O(A));
887
+ return L(N(A));
887
888
  } catch {
888
889
  return null;
889
890
  }
@@ -891,18 +892,18 @@ function Ot() {
891
892
  }
892
893
  return null;
893
894
  }
894
- var R = Object.assign, L = 0, J, X, re, ye, xe, ve, be;
895
- function we() {
895
+ var R = Object.assign, z = 0, X, he, pe, Ee, ge, Y, re;
896
+ function ae() {
896
897
  }
897
- we.__reactDisabledLog = !0;
898
- function Re() {
898
+ ae.__reactDisabledLog = !0;
899
+ function Oe() {
899
900
  {
900
- if (L === 0) {
901
- J = console.log, X = console.info, re = console.warn, ye = console.error, xe = console.group, ve = console.groupCollapsed, be = console.groupEnd;
901
+ if (z === 0) {
902
+ X = console.log, he = console.info, pe = console.warn, Ee = console.error, ge = console.group, Y = console.groupCollapsed, re = console.groupEnd;
902
903
  var e = {
903
904
  configurable: !0,
904
905
  enumerable: !0,
905
- value: we,
906
+ value: ae,
906
907
  writable: !0
907
908
  };
908
909
  Object.defineProperties(console, {
@@ -915,12 +916,12 @@ function Ot() {
915
916
  groupEnd: e
916
917
  });
917
918
  }
918
- L++;
919
+ z++;
919
920
  }
920
921
  }
921
- function Se() {
922
+ function Ce() {
922
923
  {
923
- if (L--, L === 0) {
924
+ if (z--, z === 0) {
924
925
  var e = {
925
926
  configurable: !0,
926
927
  enumerable: !0,
@@ -928,87 +929,87 @@ function Ot() {
928
929
  };
929
930
  Object.defineProperties(console, {
930
931
  log: R({}, e, {
931
- value: J
932
+ value: X
932
933
  }),
933
934
  info: R({}, e, {
934
- value: X
935
+ value: he
935
936
  }),
936
937
  warn: R({}, e, {
937
- value: re
938
+ value: pe
938
939
  }),
939
940
  error: R({}, e, {
940
- value: ye
941
+ value: Ee
941
942
  }),
942
943
  group: R({}, e, {
943
- value: xe
944
+ value: ge
944
945
  }),
945
946
  groupCollapsed: R({}, e, {
946
- value: ve
947
+ value: Y
947
948
  }),
948
949
  groupEnd: R({}, e, {
949
- value: be
950
+ value: re
950
951
  })
951
952
  });
952
953
  }
953
- L < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
954
+ z < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
954
955
  }
955
956
  }
956
- var ue = B.ReactCurrentDispatcher, fe;
957
- function ae(e, l, d) {
957
+ var me = I.ReactCurrentDispatcher, ye;
958
+ function ie(e, l, d) {
958
959
  {
959
- if (fe === void 0)
960
+ if (ye === void 0)
960
961
  try {
961
962
  throw Error();
962
963
  } catch (P) {
963
964
  var b = P.stack.trim().match(/\n( *(at )?)/);
964
- fe = b && b[1] || "";
965
+ ye = b && b[1] || "";
965
966
  }
966
967
  return `
967
- ` + fe + e;
968
+ ` + ye + e;
968
969
  }
969
970
  }
970
- var pe = !1, ie;
971
+ var xe = !1, oe;
971
972
  {
972
- var Oe = typeof WeakMap == "function" ? WeakMap : Map;
973
- ie = new Oe();
973
+ var Pe = typeof WeakMap == "function" ? WeakMap : Map;
974
+ oe = new Pe();
974
975
  }
975
- function Ee(e, l) {
976
- if (!e || pe)
976
+ function je(e, l) {
977
+ if (!e || xe)
977
978
  return "";
978
979
  {
979
- var d = ie.get(e);
980
+ var d = oe.get(e);
980
981
  if (d !== void 0)
981
982
  return d;
982
983
  }
983
984
  var b;
984
- pe = !0;
985
+ xe = !0;
985
986
  var P = Error.prepareStackTrace;
986
987
  Error.prepareStackTrace = void 0;
987
988
  var A;
988
- A = ue.current, ue.current = null, Re();
989
+ A = me.current, me.current = null, Oe();
989
990
  try {
990
991
  if (l) {
991
- var O = function() {
992
+ var N = function() {
992
993
  throw Error();
993
994
  };
994
- if (Object.defineProperty(O.prototype, "props", {
995
+ if (Object.defineProperty(N.prototype, "props", {
995
996
  set: function() {
996
997
  throw Error();
997
998
  }
998
999
  }), typeof Reflect == "object" && Reflect.construct) {
999
1000
  try {
1000
- Reflect.construct(O, []);
1001
+ Reflect.construct(N, []);
1001
1002
  } catch (H) {
1002
1003
  b = H;
1003
1004
  }
1004
- Reflect.construct(e, [], O);
1005
+ Reflect.construct(e, [], N);
1005
1006
  } else {
1006
1007
  try {
1007
- O.call();
1008
+ N.call();
1008
1009
  } catch (H) {
1009
1010
  b = H;
1010
1011
  }
1011
- e.call(O.prototype);
1012
+ e.call(N.prototype);
1012
1013
  }
1013
1014
  } else {
1014
1015
  try {
@@ -1022,120 +1023,120 @@ function Ot() {
1022
1023
  if (H && b && typeof H.stack == "string") {
1023
1024
  for (var k = H.stack.split(`
1024
1025
  `), q = b.stack.split(`
1025
- `), D = k.length - 1, M = q.length - 1; D >= 1 && M >= 0 && k[D] !== q[M]; )
1026
- M--;
1027
- for (; D >= 1 && M >= 0; D--, M--)
1028
- if (k[D] !== q[M]) {
1029
- if (D !== 1 || M !== 1)
1026
+ `), U = k.length - 1, B = q.length - 1; U >= 1 && B >= 0 && k[U] !== q[B]; )
1027
+ B--;
1028
+ for (; U >= 1 && B >= 0; U--, B--)
1029
+ if (k[U] !== q[B]) {
1030
+ if (U !== 1 || B !== 1)
1030
1031
  do
1031
- if (D--, M--, M < 0 || k[D] !== q[M]) {
1032
- var Q = `
1033
- ` + k[D].replace(" at new ", " at ");
1034
- return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, Q), Q;
1032
+ if (U--, B--, B < 0 || k[U] !== q[B]) {
1033
+ var Z = `
1034
+ ` + k[U].replace(" at new ", " at ");
1035
+ return e.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", e.displayName)), typeof e == "function" && oe.set(e, Z), Z;
1035
1036
  }
1036
- while (D >= 1 && M >= 0);
1037
+ while (U >= 1 && B >= 0);
1037
1038
  break;
1038
1039
  }
1039
1040
  }
1040
1041
  } finally {
1041
- pe = !1, ue.current = A, Se(), Error.prepareStackTrace = P;
1042
+ xe = !1, me.current = A, Ce(), Error.prepareStackTrace = P;
1042
1043
  }
1043
- var ce = e ? e.displayName || e.name : "", se = ce ? ae(ce) : "";
1044
- return typeof e == "function" && ie.set(e, se), se;
1044
+ var ue = e ? e.displayName || e.name : "", se = ue ? ie(ue) : "";
1045
+ return typeof e == "function" && oe.set(e, se), se;
1045
1046
  }
1046
- function Ne(e, l, d) {
1047
- return Ee(e, !1);
1047
+ function Ae(e, l, d) {
1048
+ return je(e, !1);
1048
1049
  }
1049
- function Ce(e) {
1050
+ function $e(e) {
1050
1051
  var l = e.prototype;
1051
1052
  return !!(l && l.isReactComponent);
1052
1053
  }
1053
- function oe(e, l, d) {
1054
+ function le(e, l, d) {
1054
1055
  if (e == null)
1055
1056
  return "";
1056
1057
  if (typeof e == "function")
1057
- return Ee(e, Ce(e));
1058
+ return je(e, $e(e));
1058
1059
  if (typeof e == "string")
1059
- return ae(e);
1060
+ return ie(e);
1060
1061
  switch (e) {
1061
1062
  case g:
1062
- return ae("Suspense");
1063
+ return ie("Suspense");
1063
1064
  case c:
1064
- return ae("SuspenseList");
1065
+ return ie("SuspenseList");
1065
1066
  }
1066
1067
  if (typeof e == "object")
1067
1068
  switch (e.$$typeof) {
1068
1069
  case u:
1069
- return Ne(e.render);
1070
+ return Ae(e.render);
1070
1071
  case E:
1071
- return oe(e.type, l, d);
1072
+ return le(e.type, l, d);
1072
1073
  case x: {
1073
1074
  var b = e, P = b._payload, A = b._init;
1074
1075
  try {
1075
- return oe(A(P), l, d);
1076
+ return le(A(P), l, d);
1076
1077
  } catch {
1077
1078
  }
1078
1079
  }
1079
1080
  }
1080
1081
  return "";
1081
1082
  }
1082
- var ne = Object.prototype.hasOwnProperty, f = {}, j = B.ReactDebugCurrentFrame;
1083
- function W(e) {
1083
+ var ne = Object.prototype.hasOwnProperty, Te = {}, ke = I.ReactDebugCurrentFrame;
1084
+ function ce(e) {
1084
1085
  if (e) {
1085
- var l = e._owner, d = oe(e.type, e._source, l ? l.type : null);
1086
- j.setExtraStackFrame(d);
1086
+ var l = e._owner, d = le(e.type, e._source, l ? l.type : null);
1087
+ ke.setExtraStackFrame(d);
1087
1088
  } else
1088
- j.setExtraStackFrame(null);
1089
+ ke.setExtraStackFrame(null);
1089
1090
  }
1090
- function Z(e, l, d, b, P) {
1091
+ function Fe(e, l, d, b, P) {
1091
1092
  {
1092
1093
  var A = Function.call.bind(ne);
1093
- for (var O in e)
1094
- if (A(e, O)) {
1094
+ for (var N in e)
1095
+ if (A(e, N)) {
1095
1096
  var k = void 0;
1096
1097
  try {
1097
- if (typeof e[O] != "function") {
1098
- var q = Error((b || "React class") + ": " + d + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1098
+ if (typeof e[N] != "function") {
1099
+ var q = Error((b || "React class") + ": " + d + " type `" + N + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[N] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1099
1100
  throw q.name = "Invariant Violation", q;
1100
1101
  }
1101
- k = e[O](l, O, b, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1102
- } catch (D) {
1103
- k = D;
1102
+ k = e[N](l, N, b, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1103
+ } catch (U) {
1104
+ k = U;
1104
1105
  }
1105
- k && !(k instanceof Error) && (W(P), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", d, O, typeof k), W(null)), k instanceof Error && !(k.message in f) && (f[k.message] = !0, W(P), $("Failed %s type: %s", d, k.message), W(null));
1106
+ k && !(k instanceof Error) && (ce(P), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", d, N, typeof k), ce(null)), k instanceof Error && !(k.message in Te) && (Te[k.message] = !0, ce(P), $("Failed %s type: %s", d, k.message), ce(null));
1106
1107
  }
1107
1108
  }
1108
1109
  }
1109
- var te = Array.isArray;
1110
- function ee(e) {
1111
- return te(e);
1110
+ var De = Array.isArray;
1111
+ function f(e) {
1112
+ return De(e);
1112
1113
  }
1113
- function Pe(e) {
1114
+ function _(e) {
1114
1115
  {
1115
1116
  var l = typeof Symbol == "function" && Symbol.toStringTag, d = l && e[Symbol.toStringTag] || e.constructor.name || "Object";
1116
1117
  return d;
1117
1118
  }
1118
1119
  }
1119
- function _e(e) {
1120
+ function K(e) {
1120
1121
  try {
1121
- return je(e), !1;
1122
+ return Q(e), !1;
1122
1123
  } catch {
1123
1124
  return !0;
1124
1125
  }
1125
1126
  }
1126
- function je(e) {
1127
+ function Q(e) {
1127
1128
  return "" + e;
1128
1129
  }
1129
- function Le(e) {
1130
- if (_e(e))
1131
- return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pe(e)), je(e);
1130
+ function te(e) {
1131
+ if (K(e))
1132
+ return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _(e)), Q(e);
1132
1133
  }
1133
- var ze = B.ReactCurrentOwner, st = {
1134
+ var ee = I.ReactCurrentOwner, Ue = {
1134
1135
  key: !0,
1135
1136
  ref: !0,
1136
1137
  __self: !0,
1137
1138
  __source: !0
1138
- }, Ge, We;
1139
+ }, ve, Re;
1139
1140
  function at(e) {
1140
1141
  if (ne.call(e, "ref")) {
1141
1142
  var l = Object.getOwnPropertyDescriptor(e, "ref").get;
@@ -1153,12 +1154,12 @@ function Ot() {
1153
1154
  return e.key !== void 0;
1154
1155
  }
1155
1156
  function ot(e, l) {
1156
- typeof e.ref == "string" && ze.current;
1157
+ typeof e.ref == "string" && ee.current;
1157
1158
  }
1158
1159
  function lt(e, l) {
1159
1160
  {
1160
1161
  var d = function() {
1161
- Ge || (Ge = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1162
+ ve || (ve = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1162
1163
  };
1163
1164
  d.isReactWarning = !0, Object.defineProperty(e, "key", {
1164
1165
  get: d,
@@ -1169,7 +1170,7 @@ function Ot() {
1169
1170
  function ct(e, l) {
1170
1171
  {
1171
1172
  var d = function() {
1172
- We || (We = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1173
+ Re || (Re = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1173
1174
  };
1174
1175
  d.isReactWarning = !0, Object.defineProperty(e, "ref", {
1175
1176
  get: d,
@@ -1177,7 +1178,7 @@ function Ot() {
1177
1178
  });
1178
1179
  }
1179
1180
  }
1180
- var dt = function(e, l, d, b, P, A, O) {
1181
+ var dt = function(e, l, d, b, P, A, N) {
1181
1182
  var k = {
1182
1183
  // This tag allows us to uniquely identify this as a React Element
1183
1184
  $$typeof: t,
@@ -1185,7 +1186,7 @@ function Ot() {
1185
1186
  type: e,
1186
1187
  key: l,
1187
1188
  ref: d,
1188
- props: O,
1189
+ props: N,
1189
1190
  // Record the component responsible for creating this element.
1190
1191
  _owner: A
1191
1192
  };
@@ -1208,39 +1209,39 @@ function Ot() {
1208
1209
  };
1209
1210
  function ut(e, l, d, b, P) {
1210
1211
  {
1211
- var A, O = {}, k = null, q = null;
1212
- d !== void 0 && (Le(d), k = "" + d), it(l) && (Le(l.key), k = "" + l.key), at(l) && (q = l.ref, ot(l, P));
1212
+ var A, N = {}, k = null, q = null;
1213
+ d !== void 0 && (te(d), k = "" + d), it(l) && (te(l.key), k = "" + l.key), at(l) && (q = l.ref, ot(l, P));
1213
1214
  for (A in l)
1214
- ne.call(l, A) && !st.hasOwnProperty(A) && (O[A] = l[A]);
1215
+ ne.call(l, A) && !Ue.hasOwnProperty(A) && (N[A] = l[A]);
1215
1216
  if (e && e.defaultProps) {
1216
- var D = e.defaultProps;
1217
- for (A in D)
1218
- O[A] === void 0 && (O[A] = D[A]);
1217
+ var U = e.defaultProps;
1218
+ for (A in U)
1219
+ N[A] === void 0 && (N[A] = U[A]);
1219
1220
  }
1220
1221
  if (k || q) {
1221
- var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1222
- k && lt(O, M), q && ct(O, M);
1222
+ var B = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1223
+ k && lt(N, B), q && ct(N, B);
1223
1224
  }
1224
- return dt(e, k, q, P, b, ze.current, O);
1225
+ return dt(e, k, q, P, b, ee.current, N);
1225
1226
  }
1226
1227
  }
1227
- var Ae = B.ReactCurrentOwner, Ye = B.ReactDebugCurrentFrame;
1228
- function le(e) {
1228
+ var Me = I.ReactCurrentOwner, qe = I.ReactDebugCurrentFrame;
1229
+ function de(e) {
1229
1230
  if (e) {
1230
- var l = e._owner, d = oe(e.type, e._source, l ? l.type : null);
1231
- Ye.setExtraStackFrame(d);
1231
+ var l = e._owner, d = le(e.type, e._source, l ? l.type : null);
1232
+ qe.setExtraStackFrame(d);
1232
1233
  } else
1233
- Ye.setExtraStackFrame(null);
1234
+ qe.setExtraStackFrame(null);
1234
1235
  }
1235
- var $e;
1236
- $e = !1;
1237
- function Fe(e) {
1236
+ var Be;
1237
+ Be = !1;
1238
+ function Ie(e) {
1238
1239
  return typeof e == "object" && e !== null && e.$$typeof === t;
1239
1240
  }
1240
- function qe() {
1241
+ function Ve() {
1241
1242
  {
1242
- if (Ae.current) {
1243
- var e = I(Ae.current.type);
1243
+ if (Me.current) {
1244
+ var e = L(Me.current.type);
1244
1245
  if (e)
1245
1246
  return `
1246
1247
 
@@ -1252,10 +1253,10 @@ Check the render method of \`` + e + "`.";
1252
1253
  function ft(e) {
1253
1254
  return "";
1254
1255
  }
1255
- var Ve = {};
1256
- function pt(e) {
1256
+ var He = {};
1257
+ function ht(e) {
1257
1258
  {
1258
- var l = qe();
1259
+ var l = Ve();
1259
1260
  if (!l) {
1260
1261
  var d = typeof e == "string" ? e : e.displayName || e.name;
1261
1262
  d && (l = `
@@ -1265,39 +1266,39 @@ Check the top-level render call using <` + d + ">.");
1265
1266
  return l;
1266
1267
  }
1267
1268
  }
1268
- function He(e, l) {
1269
+ function Je(e, l) {
1269
1270
  {
1270
1271
  if (!e._store || e._store.validated || e.key != null)
1271
1272
  return;
1272
1273
  e._store.validated = !0;
1273
- var d = pt(l);
1274
- if (Ve[d])
1274
+ var d = ht(l);
1275
+ if (He[d])
1275
1276
  return;
1276
- Ve[d] = !0;
1277
+ He[d] = !0;
1277
1278
  var b = "";
1278
- e && e._owner && e._owner !== Ae.current && (b = " It was passed a child from " + I(e._owner.type) + "."), le(e), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, b), le(null);
1279
+ e && e._owner && e._owner !== Me.current && (b = " It was passed a child from " + L(e._owner.type) + "."), de(e), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, b), de(null);
1279
1280
  }
1280
1281
  }
1281
- function Je(e, l) {
1282
+ function Ke(e, l) {
1282
1283
  {
1283
1284
  if (typeof e != "object")
1284
1285
  return;
1285
- if (ee(e))
1286
+ if (f(e))
1286
1287
  for (var d = 0; d < e.length; d++) {
1287
1288
  var b = e[d];
1288
- Fe(b) && He(b, l);
1289
+ Ie(b) && Je(b, l);
1289
1290
  }
1290
- else if (Fe(e))
1291
+ else if (Ie(e))
1291
1292
  e._store && (e._store.validated = !0);
1292
1293
  else if (e) {
1293
1294
  var P = V(e);
1294
1295
  if (typeof P == "function" && P !== e.entries)
1295
- for (var A = P.call(e), O; !(O = A.next()).done; )
1296
- Fe(O.value) && He(O.value, l);
1296
+ for (var A = P.call(e), N; !(N = A.next()).done; )
1297
+ Ie(N.value) && Je(N.value, l);
1297
1298
  }
1298
1299
  }
1299
1300
  }
1300
- function ht(e) {
1301
+ function pt(e) {
1301
1302
  {
1302
1303
  var l = e.type;
1303
1304
  if (l == null || typeof l == "string")
@@ -1312,11 +1313,11 @@ Check the top-level render call using <` + d + ">.");
1312
1313
  else
1313
1314
  return;
1314
1315
  if (d) {
1315
- var b = I(l);
1316
- Z(d, e.props, "prop", b, e);
1317
- } else if (l.PropTypes !== void 0 && !$e) {
1318
- $e = !0;
1319
- var P = I(l);
1316
+ var b = L(l);
1317
+ Fe(d, e.props, "prop", b, e);
1318
+ } else if (l.PropTypes !== void 0 && !Be) {
1319
+ Be = !0;
1320
+ var P = L(l);
1320
1321
  $("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
1321
1322
  }
1322
1323
  typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -1327,71 +1328,71 @@ Check the top-level render call using <` + d + ">.");
1327
1328
  for (var l = Object.keys(e.props), d = 0; d < l.length; d++) {
1328
1329
  var b = l[d];
1329
1330
  if (b !== "children" && b !== "key") {
1330
- le(e), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), le(null);
1331
+ de(e), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), de(null);
1331
1332
  break;
1332
1333
  }
1333
1334
  }
1334
- e.ref !== null && (le(e), $("Invalid attribute `ref` supplied to `React.Fragment`."), le(null));
1335
+ e.ref !== null && (de(e), $("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
1335
1336
  }
1336
1337
  }
1337
- var Ke = {};
1338
- function Xe(e, l, d, b, P, A) {
1338
+ var Xe = {};
1339
+ function Qe(e, l, d, b, P, A) {
1339
1340
  {
1340
- var O = C(e);
1341
- if (!O) {
1341
+ var N = C(e);
1342
+ if (!N) {
1342
1343
  var k = "";
1343
1344
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1344
1345
  var q = ft();
1345
- q ? k += q : k += qe();
1346
- var D;
1347
- e === null ? D = "null" : ee(e) ? D = "array" : e !== void 0 && e.$$typeof === t ? (D = "<" + (I(e.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, k);
1346
+ q ? k += q : k += Ve();
1347
+ var U;
1348
+ e === null ? U = "null" : f(e) ? U = "array" : e !== void 0 && e.$$typeof === t ? (U = "<" + (L(e.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : U = typeof e, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, k);
1348
1349
  }
1349
- var M = ut(e, l, d, P, A);
1350
- if (M == null)
1351
- return M;
1352
- if (O) {
1353
- var Q = l.children;
1354
- if (Q !== void 0)
1350
+ var B = ut(e, l, d, P, A);
1351
+ if (B == null)
1352
+ return B;
1353
+ if (N) {
1354
+ var Z = l.children;
1355
+ if (Z !== void 0)
1355
1356
  if (b)
1356
- if (ee(Q)) {
1357
- for (var ce = 0; ce < Q.length; ce++)
1358
- Je(Q[ce], e);
1359
- Object.freeze && Object.freeze(Q);
1357
+ if (f(Z)) {
1358
+ for (var ue = 0; ue < Z.length; ue++)
1359
+ Ke(Z[ue], e);
1360
+ Object.freeze && Object.freeze(Z);
1360
1361
  } else
1361
1362
  $("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1362
1363
  else
1363
- Je(Q, e);
1364
+ Ke(Z, e);
1364
1365
  }
1365
1366
  if (ne.call(l, "key")) {
1366
- var se = I(e), H = Object.keys(l).filter(function(wt) {
1367
+ var se = L(e), H = Object.keys(l).filter(function(wt) {
1367
1368
  return wt !== "key";
1368
- }), Ue = H.length > 0 ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}";
1369
- if (!Ke[se + Ue]) {
1369
+ }), Le = H.length > 0 ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}";
1370
+ if (!Xe[se + Le]) {
1370
1371
  var bt = H.length > 0 ? "{" + H.join(": ..., ") + ": ...}" : "{}";
1371
1372
  $(`A props object containing a "key" prop is being spread into JSX:
1372
1373
  let props = %s;
1373
1374
  <%s {...props} />
1374
1375
  React keys must be passed directly to JSX without using spread:
1375
1376
  let props = %s;
1376
- <%s key={someKey} {...props} />`, Ue, se, bt, se), Ke[se + Ue] = !0;
1377
+ <%s key={someKey} {...props} />`, Le, se, bt, se), Xe[se + Le] = !0;
1377
1378
  }
1378
1379
  }
1379
- return e === n ? gt(M) : ht(M), M;
1380
+ return e === n ? gt(B) : pt(B), B;
1380
1381
  }
1381
1382
  }
1382
1383
  function mt(e, l, d) {
1383
- return Xe(e, l, d, !0);
1384
+ return Qe(e, l, d, !0);
1384
1385
  }
1385
1386
  function yt(e, l, d) {
1386
- return Xe(e, l, d, !1);
1387
+ return Qe(e, l, d, !1);
1387
1388
  }
1388
1389
  var xt = yt, vt = mt;
1389
- me.Fragment = n, me.jsx = xt, me.jsxs = vt;
1390
- }()), me;
1390
+ _e.Fragment = n, _e.jsx = xt, _e.jsxs = vt;
1391
+ }()), _e;
1391
1392
  }
1392
- process.env.NODE_ENV === "production" ? Ie.exports = St() : Ie.exports = Ot();
1393
- var a = Ie.exports;
1394
- class Be {
1393
+ process.env.NODE_ENV === "production" ? Ye.exports = St() : Ye.exports = Nt();
1394
+ var a = Ye.exports;
1395
+ class We {
1395
1396
  /**
1396
1397
  * Filter array by predicate function
1397
1398
  */
@@ -1415,10 +1416,10 @@ class Be {
1415
1416
  */
1416
1417
  static sort(t, r, n = "asc") {
1417
1418
  return [...t].sort((i, s) => {
1418
- const o = i[r], p = s[r];
1419
- if (o === p) return 0;
1419
+ const o = i[r], h = s[r];
1420
+ if (o === h) return 0;
1420
1421
  let u = 0;
1421
- return o > p && (u = 1), o < p && (u = -1), n === "asc" ? u : -u;
1422
+ return o > h && (u = 1), o < h && (u = -1), n === "asc" ? u : -u;
1422
1423
  });
1423
1424
  }
1424
1425
  /**
@@ -1428,8 +1429,8 @@ class Be {
1428
1429
  if (!r.trim()) return t;
1429
1430
  const i = r.toLowerCase();
1430
1431
  return t.filter((s) => n.some((o) => {
1431
- const p = s[o];
1432
- return p == null ? !1 : String(p).toLowerCase().includes(i);
1432
+ const h = s[o];
1433
+ return h == null ? !1 : String(h).toLowerCase().includes(i);
1433
1434
  }));
1434
1435
  }
1435
1436
  /**
@@ -1476,15 +1477,15 @@ class Be {
1476
1477
  return r.reduce((n, i) => i(n), t);
1477
1478
  }
1478
1479
  }
1479
- function Dt({
1480
- endpoint: h,
1480
+ function Ut({
1481
+ endpoint: p,
1481
1482
  params: t,
1482
1483
  layout: r = "list",
1483
1484
  title: n,
1484
1485
  emptyMessage: i = "No items found",
1485
1486
  renderItem: s,
1486
1487
  keyExtractor: o = (S, V) => S.id || S._id || String(V),
1487
- searchable: p = !1,
1488
+ searchable: h = !1,
1488
1489
  searchFields: u = [],
1489
1490
  searchPlaceholder: g = "Search...",
1490
1491
  filters: c = [],
@@ -1493,14 +1494,14 @@ function Dt({
1493
1494
  onRefresh: m,
1494
1495
  theme: T = {}
1495
1496
  }) {
1496
- const { data: S, loading: V, error: B, refetch: $ } = Rt(h, t), [Y, w] = z(""), [U, y] = z({}), [N, F] = z(1), _ = rt(() => {
1497
+ const { data: S, loading: V, error: I, refetch: $ } = Rt(p, t), [W, w] = M(""), [D, y] = M({}), [O, F] = M(1), j = nt(() => {
1497
1498
  if (!S) return { data: [], total: 0, totalPages: 0 };
1498
1499
  let R = S;
1499
- return p && Y && u.length > 0 && (R = Be.search(R, Y, u)), Object.keys(U).length > 0 && (R = Be.filterByFields(R, U)), Be.paginate(R, N, E);
1500
- }, [S, Y, U, N, E, p, u]);
1501
- de(() => {
1500
+ return h && W && u.length > 0 && (R = We.search(R, W, u)), Object.keys(D).length > 0 && (R = We.filterByFields(R, D)), We.paginate(R, O, E);
1501
+ }, [S, W, D, O, E, h, u]);
1502
+ fe(() => {
1502
1503
  F(1);
1503
- }, [Y, U]);
1504
+ }, [W, D]);
1504
1505
  const C = () => {
1505
1506
  w(""), y({}), F(1), $(), m == null || m();
1506
1507
  }, v = {
@@ -1510,7 +1511,7 @@ function Dt({
1510
1511
  textSecondary: T.textSecondary || "#6b7280",
1511
1512
  border: T.border || "#e5e7eb",
1512
1513
  primary: T.primary || "#3b82f6"
1513
- }, I = s || ((R) => /* @__PURE__ */ a.jsxs("div", { style: {
1514
+ }, L = s || ((R) => /* @__PURE__ */ a.jsxs("div", { style: {
1514
1515
  padding: "16px",
1515
1516
  cursor: x ? "pointer" : "default"
1516
1517
  }, children: [
@@ -1523,13 +1524,13 @@ function Dt({
1523
1524
  justifyContent: "center",
1524
1525
  padding: "48px",
1525
1526
  color: v.textSecondary
1526
- }, children: "Loading..." }) : B ? /* @__PURE__ */ a.jsxs("div", { style: {
1527
+ }, children: "Loading..." }) : I ? /* @__PURE__ */ a.jsxs("div", { style: {
1527
1528
  padding: "24px",
1528
1529
  textAlign: "center",
1529
1530
  color: "#ef4444"
1530
1531
  }, children: [
1531
1532
  /* @__PURE__ */ a.jsx("div", { style: { fontWeight: 500, marginBottom: "8px" }, children: "Error" }),
1532
- /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px" }, children: B.message }),
1533
+ /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px" }, children: I.message }),
1533
1534
  /* @__PURE__ */ a.jsx(
1534
1535
  "button",
1535
1536
  {
@@ -1551,7 +1552,7 @@ function Dt({
1551
1552
  borderRadius: "12px",
1552
1553
  overflow: "hidden"
1553
1554
  }, children: [
1554
- (n || p || c.length > 0) && /* @__PURE__ */ a.jsxs("div", { style: {
1555
+ (n || h || c.length > 0) && /* @__PURE__ */ a.jsxs("div", { style: {
1555
1556
  padding: "16px",
1556
1557
  borderBottom: `1px solid ${v.border}`
1557
1558
  }, children: [
@@ -1559,7 +1560,7 @@ function Dt({
1559
1560
  display: "flex",
1560
1561
  alignItems: "center",
1561
1562
  justifyContent: "space-between",
1562
- marginBottom: p || c.length > 0 ? "12px" : "0"
1563
+ marginBottom: h || c.length > 0 ? "12px" : "0"
1563
1564
  }, children: [
1564
1565
  n && /* @__PURE__ */ a.jsx("h2", { style: {
1565
1566
  margin: 0,
@@ -1584,12 +1585,12 @@ function Dt({
1584
1585
  }
1585
1586
  )
1586
1587
  ] }),
1587
- p && /* @__PURE__ */ a.jsx(
1588
+ h && /* @__PURE__ */ a.jsx(
1588
1589
  "input",
1589
1590
  {
1590
1591
  type: "text",
1591
1592
  placeholder: g,
1592
- value: Y,
1593
+ value: W,
1593
1594
  onChange: (R) => w(R.target.value),
1594
1595
  style: {
1595
1596
  width: "100%",
@@ -1608,11 +1609,11 @@ function Dt({
1608
1609
  gridTemplateColumns: r === "grid" ? "repeat(auto-fill, minmax(250px, 1fr))" : void 0,
1609
1610
  gap: r === "list" ? "0" : "16px",
1610
1611
  padding: r === "list" ? "0" : "16px"
1611
- }, children: _.data.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: {
1612
+ }, children: j.data.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: {
1612
1613
  padding: "48px",
1613
1614
  textAlign: "center",
1614
1615
  color: v.textSecondary
1615
- }, children: i }) : _.data.map((R, L) => /* @__PURE__ */ a.jsx(
1616
+ }, children: i }) : j.data.map((R, z) => /* @__PURE__ */ a.jsx(
1616
1617
  "div",
1617
1618
  {
1618
1619
  onClick: () => x == null ? void 0 : x(R),
@@ -1622,17 +1623,17 @@ function Dt({
1622
1623
  borderBottom: r === "list" ? `1px solid ${v.border}` : "none",
1623
1624
  transition: "all 0.15s ease"
1624
1625
  },
1625
- onMouseEnter: (J) => {
1626
- x && (J.currentTarget.style.background = v.border);
1626
+ onMouseEnter: (X) => {
1627
+ x && (X.currentTarget.style.background = v.border);
1627
1628
  },
1628
- onMouseLeave: (J) => {
1629
- J.currentTarget.style.background = v.cardBackground;
1629
+ onMouseLeave: (X) => {
1630
+ X.currentTarget.style.background = v.cardBackground;
1630
1631
  },
1631
- children: I(R, L)
1632
+ children: L(R, z)
1632
1633
  },
1633
- o(R, L)
1634
+ o(R, z)
1634
1635
  )) }),
1635
- _.totalPages > 1 && /* @__PURE__ */ a.jsxs("div", { style: {
1636
+ j.totalPages > 1 && /* @__PURE__ */ a.jsxs("div", { style: {
1636
1637
  padding: "16px",
1637
1638
  borderTop: `1px solid ${v.border}`,
1638
1639
  display: "flex",
@@ -1641,23 +1642,23 @@ function Dt({
1641
1642
  }, children: [
1642
1643
  /* @__PURE__ */ a.jsxs("div", { style: { fontSize: "13px", color: v.textSecondary }, children: [
1643
1644
  "Page ",
1644
- N,
1645
+ O,
1645
1646
  " of ",
1646
- _.totalPages
1647
+ j.totalPages
1647
1648
  ] }),
1648
1649
  /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
1649
1650
  /* @__PURE__ */ a.jsx(
1650
1651
  "button",
1651
1652
  {
1652
1653
  onClick: () => F((R) => Math.max(1, R - 1)),
1653
- disabled: N === 1,
1654
+ disabled: O === 1,
1654
1655
  style: {
1655
1656
  padding: "6px 12px",
1656
1657
  border: `1px solid ${v.border}`,
1657
1658
  borderRadius: "6px",
1658
1659
  background: "white",
1659
- cursor: N === 1 ? "not-allowed" : "pointer",
1660
- opacity: N === 1 ? 0.5 : 1
1660
+ cursor: O === 1 ? "not-allowed" : "pointer",
1661
+ opacity: O === 1 ? 0.5 : 1
1661
1662
  },
1662
1663
  children: "Previous"
1663
1664
  }
@@ -1665,15 +1666,15 @@ function Dt({
1665
1666
  /* @__PURE__ */ a.jsx(
1666
1667
  "button",
1667
1668
  {
1668
- onClick: () => F((R) => Math.min(_.totalPages, R + 1)),
1669
- disabled: N === _.totalPages,
1669
+ onClick: () => F((R) => Math.min(j.totalPages, R + 1)),
1670
+ disabled: O === j.totalPages,
1670
1671
  style: {
1671
1672
  padding: "6px 12px",
1672
1673
  border: `1px solid ${v.border}`,
1673
1674
  borderRadius: "6px",
1674
1675
  background: "white",
1675
- cursor: N === _.totalPages ? "not-allowed" : "pointer",
1676
- opacity: N === _.totalPages ? 0.5 : 1
1676
+ cursor: O === j.totalPages ? "not-allowed" : "pointer",
1677
+ opacity: O === j.totalPages ? 0.5 : 1
1677
1678
  },
1678
1679
  children: "Next"
1679
1680
  }
@@ -1683,14 +1684,14 @@ function Dt({
1683
1684
  ] });
1684
1685
  }
1685
1686
  function Mt({
1686
- item: h,
1687
+ item: p,
1687
1688
  onClick: t,
1688
1689
  title: r = (o) => o.title || o.name || o.label || "Untitled",
1689
1690
  subtitle: n = (o) => o.description || o.subtitle || "",
1690
1691
  image: i = (o) => o.image || o.thumbnail || o.photo,
1691
1692
  badge: s = (o) => o.badge || o.tag || o.type
1692
1693
  }) {
1693
- const o = r(h), p = n(h), u = i(h), g = s(h);
1694
+ const o = r(p), h = n(p), u = i(p), g = s(p);
1694
1695
  return /* @__PURE__ */ a.jsxs(
1695
1696
  "div",
1696
1697
  {
@@ -1714,7 +1715,7 @@ function Mt({
1714
1715
  /* @__PURE__ */ a.jsx("h3", { className: "font-medium text-gray-900 truncate", children: o }),
1715
1716
  g && /* @__PURE__ */ a.jsx("span", { className: "px-2 py-0.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full", children: g })
1716
1717
  ] }),
1717
- p && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-gray-600 truncate mt-0.5", children: p })
1718
+ h && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-gray-600 truncate mt-0.5", children: h })
1718
1719
  ] }),
1719
1720
  t && /* @__PURE__ */ a.jsx("div", { className: "flex-shrink-0 text-gray-400", children: /* @__PURE__ */ a.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })
1720
1721
  ]
@@ -1722,14 +1723,14 @@ function Mt({
1722
1723
  );
1723
1724
  }
1724
1725
  function Bt({
1725
- item: h,
1726
+ item: p,
1726
1727
  onClose: t,
1727
1728
  title: r = (s) => s.title || s.name || s.label || "Detail",
1728
1729
  image: n = (s) => s.image || s.thumbnail || s.photo,
1729
1730
  fields: i = []
1730
1731
  }) {
1731
- if (!h) return null;
1732
- const s = r(h), o = n(h);
1732
+ if (!p) return null;
1733
+ const s = r(p), o = n(p);
1733
1734
  return /* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ a.jsxs("div", { className: "bg-white rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto shadow-2xl", children: [
1734
1735
  /* @__PURE__ */ a.jsxs("div", { className: "sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between", children: [
1735
1736
  /* @__PURE__ */ a.jsx("h2", { className: "text-xl font-semibold text-gray-900", children: s }),
@@ -1751,14 +1752,14 @@ function Bt({
1751
1752
  className: "w-full h-64 object-cover rounded-lg"
1752
1753
  }
1753
1754
  ) }),
1754
- i.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "space-y-4", children: i.map((p, u) => {
1755
- const g = p.value(h);
1755
+ i.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "space-y-4", children: i.map((h, u) => {
1756
+ const g = h.value(p);
1756
1757
  return g == null || g === "" ? null : /* @__PURE__ */ a.jsxs("div", { children: [
1757
- /* @__PURE__ */ a.jsx("div", { className: "text-sm font-medium text-gray-500 mb-1", children: p.label }),
1758
+ /* @__PURE__ */ a.jsx("div", { className: "text-sm font-medium text-gray-500 mb-1", children: h.label }),
1758
1759
  /* @__PURE__ */ a.jsx("div", { className: "text-base text-gray-900", children: typeof g == "object" ? JSON.stringify(g, null, 2) : String(g) })
1759
1760
  ] }, u);
1760
1761
  }) }),
1761
- i.length === 0 && /* @__PURE__ */ a.jsx("pre", { className: "bg-gray-50 p-4 rounded-lg text-sm overflow-x-auto", children: JSON.stringify(h, null, 2) })
1762
+ i.length === 0 && /* @__PURE__ */ a.jsx("pre", { className: "bg-gray-50 p-4 rounded-lg text-sm overflow-x-auto", children: JSON.stringify(p, null, 2) })
1762
1763
  ] }),
1763
1764
  t && /* @__PURE__ */ a.jsx("div", { className: "sticky bottom-0 bg-gray-50 border-t border-gray-200 px-6 py-4", children: /* @__PURE__ */ a.jsx(
1764
1765
  "button",
@@ -1770,13 +1771,13 @@ function Bt({
1770
1771
  ) })
1771
1772
  ] }) });
1772
1773
  }
1773
- const Nt = {
1774
+ const Ot = {
1774
1775
  small: "w-32 h-32",
1775
1776
  medium: "w-48 h-48",
1776
1777
  large: "w-64 h-64"
1777
1778
  };
1778
1779
  function It({
1779
- nodes: h,
1780
+ nodes: p,
1780
1781
  cardCount: t = 2,
1781
1782
  minInterval: r = 1e3,
1782
1783
  maxInterval: n = 3e3,
@@ -1784,87 +1785,87 @@ function It({
1784
1785
  cardSize: s = "medium",
1785
1786
  className: o = ""
1786
1787
  }) {
1787
- const p = Math.min(Math.max(t, 1), 5), [u, g] = z([]), [c, E] = z([]), [x, m] = z(Array(p).fill(!1)), [T, S] = z(Array(p).fill(!1)), V = Qe([]), B = K((y) => {
1788
- const N = h.filter((_) => !y.includes(_._id));
1789
- if (N.length === 0) return null;
1790
- const F = Math.floor(Math.random() * N.length);
1791
- return N[F];
1792
- }, [h]), $ = K(() => Math.random() * (n - r) + r, [r, n]);
1793
- de(() => {
1794
- if (h.length === 0) {
1788
+ const h = Math.min(Math.max(t, 1), 5), [u, g] = M([]), [c, E] = M([]), [x, m] = M(Array(h).fill(!1)), [T, S] = M(Array(h).fill(!1)), V = Ze([]), I = J((y) => {
1789
+ const O = p.filter((j) => !y.includes(j._id));
1790
+ if (O.length === 0) return null;
1791
+ const F = Math.floor(Math.random() * O.length);
1792
+ return O[F];
1793
+ }, [p]), $ = J(() => Math.random() * (n - r) + r, [r, n]);
1794
+ fe(() => {
1795
+ if (p.length === 0) {
1795
1796
  g([]), E([]);
1796
1797
  return;
1797
1798
  }
1798
- const y = [], N = [], F = [];
1799
- for (let _ = 0; _ < p && _ < h.length; _++) {
1800
- const C = B(F);
1799
+ const y = [], O = [], F = [];
1800
+ for (let j = 0; j < h && j < p.length; j++) {
1801
+ const C = I(F);
1801
1802
  C && (y.push(C), F.push(C._id));
1802
1803
  }
1803
- for (let _ = 0; _ < y.length; _++) {
1804
+ for (let j = 0; j < y.length; j++) {
1804
1805
  const C = [
1805
- y[_]._id,
1806
- ...y.filter((G, I) => I !== _).map((G) => G._id)
1807
- ], v = B(C);
1808
- v ? N.push(v) : N.push(y[_]);
1806
+ y[j]._id,
1807
+ ...y.filter((G, L) => L !== j).map((G) => G._id)
1808
+ ], v = I(C);
1809
+ v ? O.push(v) : O.push(y[j]);
1809
1810
  }
1810
- g(y), E(N);
1811
- }, [h, p, B]);
1812
- const Y = K((y) => {
1813
- const N = $(), F = setTimeout(() => {
1814
- m((_) => {
1815
- const C = [..._];
1811
+ g(y), E(O);
1812
+ }, [p, h, I]);
1813
+ const W = J((y) => {
1814
+ const O = $(), F = setTimeout(() => {
1815
+ m((j) => {
1816
+ const C = [...j];
1816
1817
  return C[y] = !C[y], C;
1817
1818
  }), setTimeout(() => {
1818
- S((_) => {
1819
- const C = [..._];
1819
+ S((j) => {
1820
+ const C = [...j];
1820
1821
  return C[y] = !C[y], C;
1821
1822
  }), setTimeout(() => {
1822
- const _ = !T[y];
1823
- _ && g((C) => {
1823
+ const j = !T[y];
1824
+ j && g((C) => {
1824
1825
  const v = [...C];
1825
1826
  return v[y] = c[y], v;
1826
1827
  }), E((C) => {
1827
- const v = [...C], I = [
1828
- (_ ? c[y] : u[y])._id,
1829
- ...u.filter((L, J) => J !== y).map((L) => L._id),
1830
- ...C.filter((L, J) => J !== y).map((L) => L._id)
1831
- ], R = B(I);
1828
+ const v = [...C], L = [
1829
+ (j ? c[y] : u[y])._id,
1830
+ ...u.filter((z, X) => X !== y).map((z) => z._id),
1831
+ ...C.filter((z, X) => X !== y).map((z) => z._id)
1832
+ ], R = I(L);
1832
1833
  return R && (v[y] = R), v;
1833
1834
  }), setTimeout(() => {
1834
- Y(y);
1835
+ W(y);
1835
1836
  }, 150);
1836
1837
  }, 200);
1837
1838
  }, 150);
1838
- }, N);
1839
+ }, O);
1839
1840
  V.current[y] = F;
1840
- }, [$, B, u, c, T]), w = Qe(!1);
1841
- de(() => {
1842
- if (!(u.length === 0 || h.length <= 1) && !w.current) {
1841
+ }, [$, I, u, c, T]), w = Ze(!1);
1842
+ fe(() => {
1843
+ if (!(u.length === 0 || p.length <= 1) && !w.current) {
1843
1844
  w.current = !0;
1844
1845
  for (let y = 0; y < u.length; y++)
1845
- Y(y);
1846
+ W(y);
1846
1847
  return () => {
1847
1848
  V.current.forEach((y) => clearTimeout(y)), V.current = [], w.current = !1;
1848
1849
  };
1849
1850
  }
1850
- }, [u.length, h.length]);
1851
- const U = (y) => {
1851
+ }, [u.length, p.length]);
1852
+ const D = (y) => {
1852
1853
  i && i(y);
1853
1854
  };
1854
- return h.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : u.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ a.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${o}`, children: u.map((y, N) => {
1855
- const F = c[N], _ = T[N];
1855
+ return p.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : u.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ a.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${o}`, children: u.map((y, O) => {
1856
+ const F = c[O], j = T[O];
1856
1857
  return /* @__PURE__ */ a.jsx(
1857
1858
  "div",
1858
1859
  {
1859
- className: `relative ${Nt[s]}`,
1860
+ className: `relative ${Ot[s]}`,
1860
1861
  style: { perspective: "1000px" },
1861
- onClick: () => U(_ ? F : y),
1862
+ onClick: () => D(j ? F : y),
1862
1863
  children: /* @__PURE__ */ a.jsxs(
1863
1864
  "div",
1864
1865
  {
1865
1866
  className: "w-full h-full rounded-lg shadow-lg overflow-hidden cursor-pointer hover:shadow-xl",
1866
1867
  style: {
1867
- transform: `rotateY(${x[N] ? 180 : 0}deg)`,
1868
+ transform: `rotateY(${x[O] ? 180 : 0}deg)`,
1868
1869
  transition: "transform 0.5s",
1869
1870
  transformStyle: "preserve-3d"
1870
1871
  },
@@ -1874,13 +1875,13 @@ function It({
1874
1875
  {
1875
1876
  className: "absolute inset-0 transition-opacity duration-200",
1876
1877
  style: {
1877
- opacity: _ ? 0 : 1
1878
+ opacity: j ? 0 : 1
1878
1879
  },
1879
1880
  children: /* @__PURE__ */ a.jsxs(
1880
1881
  "div",
1881
1882
  {
1882
1883
  style: {
1883
- transform: x[N] ? "scaleX(-1)" : "scaleX(1)",
1884
+ transform: x[O] ? "scaleX(-1)" : "scaleX(1)",
1884
1885
  width: "100%",
1885
1886
  height: "100%"
1886
1887
  },
@@ -1904,13 +1905,13 @@ function It({
1904
1905
  {
1905
1906
  className: "absolute inset-0 transition-opacity duration-200",
1906
1907
  style: {
1907
- opacity: _ ? 1 : 0
1908
+ opacity: j ? 1 : 0
1908
1909
  },
1909
1910
  children: /* @__PURE__ */ a.jsxs(
1910
1911
  "div",
1911
1912
  {
1912
1913
  style: {
1913
- transform: x[N] ? "scaleX(-1)" : "scaleX(1)",
1914
+ transform: x[O] ? "scaleX(-1)" : "scaleX(1)",
1914
1915
  width: "100%",
1915
1916
  height: "100%"
1916
1917
  },
@@ -1933,14 +1934,14 @@ function It({
1933
1934
  }
1934
1935
  )
1935
1936
  },
1936
- `slot-${N}`
1937
+ `slot-${O}`
1937
1938
  );
1938
1939
  }) });
1939
1940
  }
1940
- function Te(h) {
1941
- if (!h) return "";
1941
+ function Se(p) {
1942
+ if (!p) return "";
1942
1943
  const t = /=\?([^?]+)\?([BQbq])\?([^?]*)\?=/g;
1943
- return h.replace(t, (r, n, i, s) => {
1944
+ return p.replace(t, (r, n, i, s) => {
1944
1945
  try {
1945
1946
  if (i.toUpperCase() === "B") {
1946
1947
  const o = atob(s);
@@ -1948,7 +1949,7 @@ function Te(h) {
1948
1949
  } else if (i.toUpperCase() === "Q") {
1949
1950
  const o = s.replace(/_/g, " ").replace(
1950
1951
  /=([0-9A-Fa-f]{2})/g,
1951
- (p, u) => String.fromCharCode(parseInt(u, 16))
1952
+ (h, u) => String.fromCharCode(parseInt(u, 16))
1952
1953
  );
1953
1954
  return decodeURIComponent(escape(o));
1954
1955
  }
@@ -1970,14 +1971,14 @@ const Ct = {
1970
1971
  danger: "#ef4444"
1971
1972
  };
1972
1973
  function Lt({
1973
- baseUrl: h,
1974
+ baseUrl: p,
1974
1975
  systemId: t,
1975
1976
  accountId: r,
1976
1977
  limit: n = 30,
1977
1978
  folder: i,
1978
1979
  selectable: s = !0,
1979
1980
  showDetail: o = !1,
1980
- emptyMessage: p = "No emails",
1981
+ emptyMessage: h = "No emails",
1981
1982
  autoLoad: u = !0,
1982
1983
  onSelect: g,
1983
1984
  onSelectionChange: c,
@@ -1987,98 +1988,109 @@ function Lt({
1987
1988
  renderItem: T,
1988
1989
  renderDetail: S,
1989
1990
  renderActions: V,
1990
- renderEmpty: B,
1991
+ renderEmpty: I,
1991
1992
  renderLoading: $,
1992
- theme: Y = {}
1993
+ theme: W = {}
1993
1994
  }) {
1994
- const w = { ...Ct, ...Y }, [U, y] = z([]), [N, F] = z(!1), [_, C] = z(null), [v, G] = z(/* @__PURE__ */ new Set()), [I, R] = z(null), [L, J] = z(null), X = rt(() => t ? new jt({ baseUrl: h, system_id: t }) : null, [h, t]), re = K(async () => {
1995
- if (X) {
1995
+ const w = { ...Ct, ...W }, [D, y] = M([]), [O, F] = M(!1), [j, C] = M(null), [v, G] = M(/* @__PURE__ */ new Set()), [L, R] = M(null), [z, X] = M(null), [he, pe] = M(null), [Ee, ge] = M(!1), Y = nt(() => t ? new jt({ baseUrl: p, system_id: t }) : null, [p, t]), re = J(async () => {
1996
+ if (Y) {
1996
1997
  F(!0), C(null);
1997
1998
  try {
1998
- const f = await X.listEmailsSorted(r, i || "INBOX", n);
1999
+ const f = await Y.listEmails(r, n, i);
1999
2000
  f != null && f.messages && (y(f.messages), m == null || m(f.messages));
2000
2001
  } catch (f) {
2001
- const j = f instanceof Error ? f : new Error("Failed to fetch emails");
2002
- C(j.message), x == null || x(j);
2002
+ const _ = f instanceof Error ? f : new Error("Failed to fetch emails");
2003
+ C(_.message), x == null || x(_);
2003
2004
  }
2004
2005
  F(!1);
2005
2006
  }
2006
- }, [X, r, n, i, x, m]);
2007
- de(() => {
2007
+ }, [Y, r, n, i, x, m]);
2008
+ fe(() => {
2008
2009
  u && re();
2009
- }, [u, re]), de(() => {
2010
+ }, [u, re]), fe(() => {
2010
2011
  re();
2011
2012
  }, [i]);
2012
- const ye = K((f) => {
2013
- g == null || g(f), o && J(f);
2014
- }, [g, o]), xe = K((f, j, W) => {
2013
+ const ae = J(async (f) => {
2014
+ if (Y) {
2015
+ X(f), pe(null), ge(!0);
2016
+ try {
2017
+ const _ = await Y.getEmail(r, f.uid, i || "INBOX");
2018
+ _ != null && _.body && pe(_.body);
2019
+ } catch (_) {
2020
+ console.error("Failed to fetch email body:", _);
2021
+ }
2022
+ ge(!1);
2023
+ }
2024
+ }, [Y, r, i]), Oe = J((f) => {
2025
+ g == null || g(f), o && ae(f);
2026
+ }, [g, o, ae]), Ce = J((f, _, K) => {
2015
2027
  if (!s) {
2016
- g == null || g(f), o && J(f);
2028
+ g == null || g(f), o && ae(f);
2017
2029
  return;
2018
2030
  }
2019
- const Z = f.uid;
2020
- if (W.shiftKey && I !== null) {
2021
- const te = Math.min(I, j), ee = Math.max(I, j), Pe = U.slice(te, ee + 1).map((je) => je.uid), _e = new Set(Pe);
2022
- G(_e), c == null || c(Array.from(_e));
2023
- } else if (W.ctrlKey || W.metaKey)
2031
+ const Q = f.uid;
2032
+ if (K.shiftKey && L !== null) {
2033
+ const te = Math.min(L, _), ee = Math.max(L, _), Ue = D.slice(te, ee + 1).map((Re) => Re.uid), ve = new Set(Ue);
2034
+ G(ve), c == null || c(Array.from(ve));
2035
+ } else if (K.ctrlKey || K.metaKey)
2024
2036
  G((te) => {
2025
2037
  const ee = new Set(te);
2026
- return ee.has(Z) ? ee.delete(Z) : ee.add(Z), c == null || c(Array.from(ee)), ee;
2027
- }), R(j);
2038
+ return ee.has(Q) ? ee.delete(Q) : ee.add(Q), c == null || c(Array.from(ee)), ee;
2039
+ }), R(_);
2028
2040
  else {
2029
- const te = /* @__PURE__ */ new Set([Z]);
2030
- G(te), R(j), c == null || c(Array.from(te));
2041
+ const te = /* @__PURE__ */ new Set([Q]);
2042
+ G(te), R(_), c == null || c(Array.from(te));
2031
2043
  }
2032
- }, [s, I, U, v, g, c, o]), ve = K(async () => {
2033
- if (!(!X || v.size === 0))
2044
+ }, [s, L, D, v, g, c, o]), me = J(async () => {
2045
+ if (!(!Y || v.size === 0))
2034
2046
  try {
2035
- const f = await X.trashEmails(r, Array.from(v));
2047
+ const f = await Y.trashEmails(r, Array.from(v));
2036
2048
  if (console.log("Trash result:", f), f.success && f.moved > 0) {
2037
- y((W) => W.filter((Z) => !v.has(Z.uid)));
2038
- const j = Array.from(v);
2039
- G(/* @__PURE__ */ new Set()), E == null || E(j);
2049
+ y((K) => K.filter((Q) => !v.has(Q.uid)));
2050
+ const _ = Array.from(v);
2051
+ G(/* @__PURE__ */ new Set()), E == null || E(_);
2040
2052
  } else
2041
2053
  C("Failed to move emails to trash");
2042
2054
  } catch (f) {
2043
- const j = f instanceof Error ? f : new Error("Trash failed");
2044
- console.error("Trash error:", j), C(j.message), x == null || x(j);
2055
+ const _ = f instanceof Error ? f : new Error("Trash failed");
2056
+ console.error("Trash error:", _), C(_.message), x == null || x(_);
2045
2057
  }
2046
- }, [X, r, v, E, x]), be = K(async () => {
2047
- if (!(!X || v.size === 0))
2058
+ }, [Y, r, v, E, x]), ye = J(async () => {
2059
+ if (!(!Y || v.size === 0))
2048
2060
  try {
2049
- const f = await X.archiveEmails(r, Array.from(v));
2061
+ const f = await Y.archiveEmails(r, Array.from(v));
2050
2062
  if (console.log("Archive result:", f), f.success && f.archived > 0) {
2051
- y((W) => W.filter((Z) => !v.has(Z.uid)));
2052
- const j = Array.from(v);
2053
- G(/* @__PURE__ */ new Set()), E == null || E(j);
2063
+ y((K) => K.filter((Q) => !v.has(Q.uid)));
2064
+ const _ = Array.from(v);
2065
+ G(/* @__PURE__ */ new Set()), E == null || E(_);
2054
2066
  } else
2055
2067
  C("Failed to archive emails");
2056
2068
  } catch (f) {
2057
- const j = f instanceof Error ? f : new Error("Archive failed");
2058
- console.error("Archive error:", j), C(j.message), x == null || x(j);
2069
+ const _ = f instanceof Error ? f : new Error("Archive failed");
2070
+ console.error("Archive error:", _), C(_.message), x == null || x(_);
2059
2071
  }
2060
- }, [X, r, v, E, x]), we = K(() => {
2061
- if (v.size === U.length)
2072
+ }, [Y, r, v, E, x]), ie = J(() => {
2073
+ if (v.size === D.length)
2062
2074
  G(/* @__PURE__ */ new Set()), c == null || c([]);
2063
2075
  else {
2064
- const f = new Set(U.map((j) => j.uid));
2076
+ const f = new Set(D.map((_) => _.uid));
2065
2077
  G(f), c == null || c(Array.from(f));
2066
2078
  }
2067
- }, [U, v.size, c]), Re = K(() => {
2079
+ }, [D, v.size, c]), xe = J(() => {
2068
2080
  G(/* @__PURE__ */ new Set()), c == null || c([]);
2069
- }, [c]), Se = {
2070
- delete: ve,
2071
- archive: be,
2081
+ }, [c]), oe = {
2082
+ delete: me,
2083
+ archive: ye,
2072
2084
  refresh: re,
2073
- selectAll: we,
2074
- clearSelection: Re
2075
- }, ue = (f) => {
2085
+ selectAll: ie,
2086
+ clearSelection: xe
2087
+ }, Pe = (f) => {
2076
2088
  if (!f) return "";
2077
- const j = new Date(f), W = /* @__PURE__ */ new Date();
2078
- return j.toDateString() === W.toDateString() ? j.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : j.toLocaleDateString([], { month: "short", day: "numeric" });
2079
- }, fe = (f, j) => /* @__PURE__ */ a.jsx("div", { style: {
2089
+ const _ = new Date(f), K = /* @__PURE__ */ new Date();
2090
+ return _.toDateString() === K.toDateString() ? _.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : _.toLocaleDateString([], { month: "short", day: "numeric" });
2091
+ }, je = (f, _) => /* @__PURE__ */ a.jsx("div", { style: {
2080
2092
  padding: "12px 16px",
2081
- background: j ? w.selectedBackground : f.seen ? w.cardBackground : w.unreadBackground,
2093
+ background: _ ? w.selectedBackground : f.seen ? w.cardBackground : w.unreadBackground,
2082
2094
  borderBottom: `1px solid ${w.border}`,
2083
2095
  cursor: "pointer",
2084
2096
  transition: "background 0.15s ease"
@@ -2091,7 +2103,7 @@ function Lt({
2091
2103
  whiteSpace: "nowrap",
2092
2104
  overflow: "hidden",
2093
2105
  textOverflow: "ellipsis"
2094
- }, children: Te(f.from).split("@")[0] }),
2106
+ }, children: Se(f.from).split("@")[0] }),
2095
2107
  /* @__PURE__ */ a.jsx("div", { style: {
2096
2108
  fontSize: "14px",
2097
2109
  fontWeight: f.seen ? 400 : 500,
@@ -2100,23 +2112,29 @@ function Lt({
2100
2112
  whiteSpace: "nowrap",
2101
2113
  overflow: "hidden",
2102
2114
  textOverflow: "ellipsis"
2103
- }, children: Te(f.subject) || "(No subject)" })
2115
+ }, children: Se(f.subject) || "(No subject)" })
2104
2116
  ] }),
2105
2117
  /* @__PURE__ */ a.jsx("div", { style: {
2106
2118
  fontSize: "12px",
2107
2119
  color: w.textSecondary,
2108
2120
  flexShrink: 0
2109
- }, children: ue(f.date) })
2110
- ] }) }), ae = (f) => /* @__PURE__ */ a.jsxs("div", { style: { padding: "24px" }, children: [
2111
- /* @__PURE__ */ a.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: w.text }, children: Te(f.subject) || "(No subject)" }),
2121
+ }, children: Pe(f.date) })
2122
+ ] }) }), Ae = (f) => /* @__PURE__ */ a.jsxs("div", { style: { padding: "24px" }, children: [
2123
+ /* @__PURE__ */ a.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: w.text }, children: Se(f.subject) || "(No subject)" }),
2112
2124
  /* @__PURE__ */ a.jsxs("div", { style: { fontSize: "14px", color: w.textSecondary, marginBottom: "16px" }, children: [
2113
2125
  "From: ",
2114
- Te(f.from),
2126
+ Se(f.from),
2115
2127
  " • ",
2116
2128
  new Date(f.date).toLocaleString()
2117
2129
  ] }),
2118
- /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px", color: w.text }, children: "Email body not loaded. Implement getEmail(uid) to fetch full content." })
2119
- ] }), pe = (f, j) => /* @__PURE__ */ a.jsxs("div", { style: {
2130
+ Ee ? /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px", color: w.textSecondary }, children: "Loading..." }) : he ? /* @__PURE__ */ a.jsx(
2131
+ "div",
2132
+ {
2133
+ style: { fontSize: "14px", color: w.text },
2134
+ dangerouslySetInnerHTML: { __html: he }
2135
+ }
2136
+ ) : /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px", color: w.textSecondary }, children: "No content available" })
2137
+ ] }), $e = (f, _) => /* @__PURE__ */ a.jsxs("div", { style: {
2120
2138
  display: "flex",
2121
2139
  alignItems: "center",
2122
2140
  gap: "8px",
@@ -2127,7 +2145,7 @@ function Lt({
2127
2145
  /* @__PURE__ */ a.jsx(
2128
2146
  "button",
2129
2147
  {
2130
- onClick: j.selectAll,
2148
+ onClick: _.selectAll,
2131
2149
  style: {
2132
2150
  padding: "6px 12px",
2133
2151
  background: "transparent",
@@ -2137,7 +2155,7 @@ function Lt({
2137
2155
  cursor: "pointer",
2138
2156
  color: w.text
2139
2157
  },
2140
- children: f.length === U.length ? "Deselect All" : "Select All"
2158
+ children: f.length === D.length ? "Deselect All" : "Select All"
2141
2159
  }
2142
2160
  ),
2143
2161
  f.length > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
@@ -2148,7 +2166,7 @@ function Lt({
2148
2166
  /* @__PURE__ */ a.jsx(
2149
2167
  "button",
2150
2168
  {
2151
- onClick: j.archive,
2169
+ onClick: _.archive,
2152
2170
  title: "Archive",
2153
2171
  style: {
2154
2172
  display: "flex",
@@ -2168,7 +2186,7 @@ function Lt({
2168
2186
  /* @__PURE__ */ a.jsx(
2169
2187
  "button",
2170
2188
  {
2171
- onClick: j.delete,
2189
+ onClick: _.delete,
2172
2190
  title: "Delete",
2173
2191
  style: {
2174
2192
  display: "flex",
@@ -2190,7 +2208,7 @@ function Lt({
2190
2208
  /* @__PURE__ */ a.jsx(
2191
2209
  "button",
2192
2210
  {
2193
- onClick: j.refresh,
2211
+ onClick: _.refresh,
2194
2212
  title: "Refresh",
2195
2213
  style: {
2196
2214
  display: "flex",
@@ -2207,42 +2225,42 @@ function Lt({
2207
2225
  children: /* @__PURE__ */ a.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "refresh" })
2208
2226
  }
2209
2227
  )
2210
- ] }), ie = () => /* @__PURE__ */ a.jsx("div", { style: {
2228
+ ] }), le = () => /* @__PURE__ */ a.jsx("div", { style: {
2211
2229
  padding: "48px",
2212
2230
  textAlign: "center",
2213
2231
  color: w.textSecondary
2214
- }, children: p }), Oe = () => /* @__PURE__ */ a.jsx("div", { style: {
2232
+ }, children: h }), ne = () => /* @__PURE__ */ a.jsx("div", { style: {
2215
2233
  padding: "48px",
2216
2234
  textAlign: "center",
2217
2235
  color: w.textSecondary
2218
- }, children: "Loading..." }), Ee = T || fe, Ne = S || ae, Ce = V || pe, oe = B || ie, ne = $ || Oe;
2219
- return N && U.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: { background: w.background, width: "100%", height: "100%" }, children: ne() }) : /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", background: w.background, width: "100%", height: "100%" }, children: [
2236
+ }, children: "Loading..." }), Te = T || je, ke = S || Ae, ce = V || $e, Fe = I || le, De = $ || ne;
2237
+ return O && D.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: { background: w.background, width: "100%", height: "100%" }, children: De() }) : /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", background: w.background, width: "100%", height: "100%" }, children: [
2220
2238
  /* @__PURE__ */ a.jsxs("div", { style: {
2221
- flex: o && L ? "0 0 50%" : "1",
2239
+ flex: o && z ? "0 0 50%" : "1",
2222
2240
  display: "flex",
2223
2241
  flexDirection: "column",
2224
- borderRight: o && L ? `1px solid ${w.border}` : "none",
2242
+ borderRight: o && z ? `1px solid ${w.border}` : "none",
2225
2243
  overflow: "hidden"
2226
2244
  }, children: [
2227
- s && Ce(Array.from(v), Se),
2228
- _ && /* @__PURE__ */ a.jsx("div", { style: {
2245
+ s && ce(Array.from(v), oe),
2246
+ j && /* @__PURE__ */ a.jsx("div", { style: {
2229
2247
  padding: "12px 16px",
2230
2248
  background: "#fef2f2",
2231
2249
  color: w.danger,
2232
2250
  fontSize: "14px",
2233
2251
  borderBottom: `1px solid ${w.border}`
2234
- }, children: _ }),
2235
- /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: U.length === 0 ? oe() : U.map((f, j) => /* @__PURE__ */ a.jsx(
2252
+ }, children: j }),
2253
+ /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: D.length === 0 ? Fe() : D.map((f, _) => /* @__PURE__ */ a.jsx(
2236
2254
  "div",
2237
2255
  {
2238
- onClick: (W) => xe(f, j, W),
2239
- onDoubleClick: () => ye(f),
2240
- children: Ee(f, v.has(f.uid))
2256
+ onClick: (K) => Ce(f, _, K),
2257
+ onDoubleClick: () => Oe(f),
2258
+ children: Te(f, v.has(f.uid))
2241
2259
  },
2242
2260
  f.uid
2243
2261
  )) })
2244
2262
  ] }),
2245
- o && L && /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: Ne(L) })
2263
+ o && z && /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: ke(z) })
2246
2264
  ] });
2247
2265
  }
2248
2266
  export {
@@ -2250,14 +2268,14 @@ export {
2250
2268
  kt as ApiClient,
2251
2269
  Tt as AuthManager,
2252
2270
  Mt as Card,
2253
- Be as DataOperations,
2271
+ We as DataOperations,
2254
2272
  Bt as Detail,
2255
2273
  $t as GraphClient,
2256
2274
  Lt as Mail,
2257
2275
  jt as MailClient,
2258
- Dt as Stack,
2259
- nt as getApiClient,
2276
+ Ut as Stack,
2277
+ st as getApiClient,
2260
2278
  Ft as initializeApiClient,
2261
- Ut as useMutation,
2279
+ Dt as useMutation,
2262
2280
  Rt as useQuery
2263
2281
  };