@qwanyx/stack 0.2.12 → 0.2.13

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