@use-glyph/sdk-react 1.2.12 → 1.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.js CHANGED
@@ -4841,7 +4841,7 @@ const We = (e) => {
4841
4841
  }, B6 = (e, ...t) => typeof e == "function" ? ks(Ms, e, ...t) : ks(() => k6(Ms(), e), ...t), U6 = /^0x[a-fA-F0-9]{40}$/, T6 = /https?:\/\/(?:[a-zA-Z0-9-]+\.)*twimg\.com/, L6 = B6({
4842
4842
  prefix: "gw-"
4843
4843
  });
4844
- function ae(...e) {
4844
+ function le(...e) {
4845
4845
  return L6(k2(e));
4846
4846
  }
4847
4847
  function F6(e) {
@@ -4885,19 +4885,19 @@ const tn = (e, t = 2) => Number(
4885
4885
  }
4886
4886
  });
4887
4887
  function $e({ className: e, ...t }) {
4888
- return /* @__PURE__ */ l("div", { className: ae("gw-animate-pulse gw-rounded-md gw-bg-muted", e), ...t });
4888
+ return /* @__PURE__ */ l("div", { className: le("gw-animate-pulse gw-rounded-md gw-bg-muted", e), ...t });
4889
4889
  }
4890
4890
  const Q6 = ({ className: e, overrideUrl: t, overrideAlt: r }) => {
4891
4891
  const { user: n, ready: o, authenticated: i } = Fe();
4892
4892
  if (!o || !i)
4893
- return /* @__PURE__ */ l($e, { className: ae("gw-size-10 gw-rounded-full", e) });
4893
+ return /* @__PURE__ */ l($e, { className: le("gw-size-10 gw-rounded-full", e) });
4894
4894
  let a = t || n?.picture || U1(n?.evmWallet);
4895
4895
  return a.match(T6) && (a = a.replace("_normal.", ".")), /* @__PURE__ */ l(Ue, { children: /* @__PURE__ */ l(
4896
4896
  "img",
4897
4897
  {
4898
4898
  alt: r || n?.name || "",
4899
4899
  src: a,
4900
- className: ae("gw-size-10 gw-rounded-full gw-object-cover", e),
4900
+ className: le("gw-size-10 gw-rounded-full gw-object-cover", e),
4901
4901
  onError: t ? void 0 : (s) => {
4902
4902
  s.currentTarget.src = U1(n?.evmWallet), s.currentTarget.onerror = null;
4903
4903
  }
@@ -4915,17 +4915,17 @@ const Q6 = ({ className: e, overrideUrl: t, overrideAlt: r }) => {
4915
4915
  className: `gw-inline-flex gw-items-center gw-bg-background gw-rounded-full gw-h-[3.25rem] gw-text-foreground gw-font-display gw-font-medium gw-shadow-buttonMd ${e && !(t || r) ? "gw-px-2" : "gw-px-3"}`,
4916
4916
  children: [
4917
4917
  t && /* @__PURE__ */ x(Ue, { children: [
4918
- /* @__PURE__ */ l("div", { className: ae(s && "max-sm:gw-hidden", "gw-pl-1"), children: /* @__PURE__ */ l(e6, { className: "gw-size-6" }) }),
4918
+ /* @__PURE__ */ l("div", { className: le(s && "max-sm:gw-hidden", "gw-pl-1"), children: /* @__PURE__ */ l(e6, { className: "gw-size-6" }) }),
4919
4919
  !i || a?.value === void 0 ? /* @__PURE__ */ l(
4920
4920
  "div",
4921
4921
  {
4922
- className: ae(
4922
+ className: le(
4923
4923
  s && "max-sm:gw-hidden",
4924
4924
  "gw-pl-1 gw-pr-2.5 gw-inline-flex gw-items-center"
4925
4925
  ),
4926
4926
  children: /* @__PURE__ */ l($e, { className: "gw-w-16 gw-h-5 gw-inline-block" })
4927
4927
  }
4928
- ) : /* @__PURE__ */ x("div", { className: ae(s && "max-sm:gw-hidden", "gw-pl-1 gw-pr-2.5"), children: [
4928
+ ) : /* @__PURE__ */ x("div", { className: le(s && "max-sm:gw-hidden", "gw-pl-1 gw-pr-2.5"), children: [
4929
4929
  a?.value || "0.00",
4930
4930
  " ",
4931
4931
  a?.symbol || ""
@@ -5223,7 +5223,7 @@ const Ts = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ls = k2, s
5223
5223
  ({ className: e, variant: t, size: r, shadow: n, scale: o, asChild: i = !1, ...a }, s) => /* @__PURE__ */ l(
5224
5224
  i ? e7 : "button",
5225
5225
  {
5226
- className: ae(zn({ variant: t, size: r, className: e, shadow: n, scale: o })),
5226
+ className: le(zn({ variant: t, size: r, className: e, shadow: n, scale: o })),
5227
5227
  ref: s,
5228
5228
  ...a
5229
5229
  }
@@ -7047,9 +7047,9 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7047
7047
  document.body.style.pointerEvents = "auto";
7048
7048
  }), ie || (document.body.style.pointerEvents = "auto");
7049
7049
  }
7050
- }), [Z, Q] = B.useState(!1), [J, P] = B.useState(!1), [D, _] = B.useState(!1), j = B.useRef(null), H = B.useRef(null), G = B.useRef(null), $ = B.useRef(null), ne = B.useRef(null), te = B.useRef(!1), le = B.useRef(null), fe = B.useRef(0), ve = B.useRef(!1), Ne = B.useRef(!R), xe = B.useRef(0), oe = B.useRef(null), sr = B.useRef(((V = oe.current) == null ? void 0 : V.getBoundingClientRect().height) || 0), Ct = B.useRef(((T = oe.current) == null ? void 0 : T.getBoundingClientRect().width) || 0), rt = B.useRef(0), Tt = B.useCallback((ie) => {
7050
+ }), [Z, Q] = B.useState(!1), [J, P] = B.useState(!1), [D, _] = B.useState(!1), j = B.useRef(null), H = B.useRef(null), G = B.useRef(null), ee = B.useRef(null), ne = B.useRef(null), $ = B.useRef(!1), ae = B.useRef(null), fe = B.useRef(0), ve = B.useRef(!1), Ne = B.useRef(!R), xe = B.useRef(0), oe = B.useRef(null), sr = B.useRef(((V = oe.current) == null ? void 0 : V.getBoundingClientRect().height) || 0), Ct = B.useRef(((T = oe.current) == null ? void 0 : T.getBoundingClientRect().width) || 0), rt = B.useRef(0), Tt = B.useCallback((ie) => {
7051
7051
  i && ie === Xe.length - 1 && (H.current = /* @__PURE__ */ new Date());
7052
- }, []), { activeSnapPoint: _e, activeSnapPointIndex: it, setActiveSnapPoint: yt, onRelease: be, snapPointsOffset: Xe, onDrag: ee, shouldFade: ce, getPercentageDragged: Ye } = r9({
7052
+ }, []), { activeSnapPoint: _e, activeSnapPointIndex: it, setActiveSnapPoint: yt, onRelease: be, snapPointsOffset: Xe, onDrag: te, shouldFade: ce, getPercentageDragged: Ye } = r9({
7053
7053
  snapPoints: i,
7054
7054
  activeSnapPointProp: m,
7055
7055
  setActiveSnapPointProp: C,
@@ -7077,7 +7077,7 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7077
7077
  }
7078
7078
  function g(ie) {
7079
7079
  var ye, Ee;
7080
- !f && !i || oe.current && !oe.current.contains(ie.target) || (sr.current = ((ye = oe.current) == null ? void 0 : ye.getBoundingClientRect().height) || 0, Ct.current = ((Ee = oe.current) == null ? void 0 : Ee.getBoundingClientRect().width) || 0, P(!0), G.current = /* @__PURE__ */ new Date(), ml() && window.addEventListener("touchend", () => te.current = !1, {
7080
+ !f && !i || oe.current && !oe.current.contains(ie.target) || (sr.current = ((ye = oe.current) == null ? void 0 : ye.getBoundingClientRect().height) || 0, Ct.current = ((Ee = oe.current) == null ? void 0 : Ee.getBoundingClientRect().width) || 0, P(!0), G.current = /* @__PURE__ */ new Date(), ml() && window.addEventListener("touchend", () => $.current = !1, {
7081
7081
  once: !0
7082
7082
  }), ie.target.setPointerCapture(ie.pointerId), fe.current = De(S) ? ie.pageY : ie.pageX);
7083
7083
  }
@@ -7115,12 +7115,12 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7115
7115
  const se = Math.abs(Ee), we = document.querySelector("[data-vaul-drawer-wrapper]"), ke = S === "bottom" || S === "top" ? sr.current : Ct.current;
7116
7116
  let Me = se / ke;
7117
7117
  const vt = Ye(se, ge);
7118
- if (vt !== null && (Me = vt), Te && Me >= 1 || !te.current && !A(ie.target, ge)) return;
7119
- if (oe.current.classList.add(Ro), te.current = !0, He(oe.current, {
7118
+ if (vt !== null && (Me = vt), Te && Me >= 1 || !$.current && !A(ie.target, ge)) return;
7119
+ if (oe.current.classList.add(Ro), $.current = !0, He(oe.current, {
7120
7120
  transition: "none"
7121
7121
  }), He(j.current, {
7122
7122
  transition: "none"
7123
- }), i && ee({
7123
+ }), i && te({
7124
7124
  draggedDistance: Ee
7125
7125
  }), ge && !i) {
7126
7126
  const Ke = j4(Ee), zt = Math.min(Ke * -1, 0) * ye;
@@ -7216,14 +7216,14 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7216
7216
  }, !0);
7217
7217
  }
7218
7218
  function ue() {
7219
- !J || !oe.current || (oe.current.classList.remove(Ro), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date());
7219
+ !J || !oe.current || (oe.current.classList.remove(Ro), $.current = !1, P(!1), ee.current = /* @__PURE__ */ new Date());
7220
7220
  }
7221
7221
  function Se(ie) {
7222
7222
  if (!J || !oe.current) return;
7223
- oe.current.classList.remove(Ro), te.current = !1, P(!1), $.current = /* @__PURE__ */ new Date();
7223
+ oe.current.classList.remove(Ro), $.current = !1, P(!1), ee.current = /* @__PURE__ */ new Date();
7224
7224
  const ye = cn(oe.current, S);
7225
7225
  if (!ie || !A(ie.target, !1) || !ye || Number.isNaN(ye) || G.current === null) return;
7226
- const Ee = $.current.getTime() - G.current.getTime(), ge = fe.current - (De(S) ? ie.pageY : ie.pageX), Te = Math.abs(ge) / Ee;
7226
+ const Ee = ee.current.getTime() - G.current.getTime(), ge = fe.current - (De(S) ? ie.pageY : ie.pageX), Te = Math.abs(ge) / Ee;
7227
7227
  if (Te > 0.05 && (_(!0), setTimeout(() => {
7228
7228
  _(!1);
7229
7229
  }, 200)), i) {
@@ -7262,10 +7262,10 @@ function s9({ open: e, onOpenChange: t, children: r, onDrag: n, onRelease: o, sn
7262
7262
  ]);
7263
7263
  function Ae(ie) {
7264
7264
  const ye = ie ? (window.innerWidth - Ir) / window.innerWidth : 1, Ee = ie ? -Ir : 0;
7265
- le.current && window.clearTimeout(le.current), He(oe.current, {
7265
+ ae.current && window.clearTimeout(ae.current), He(oe.current, {
7266
7266
  transition: `transform ${Ze.DURATION}s cubic-bezier(${Ze.EASE.join(",")})`,
7267
7267
  transform: De(S) ? `scale(${ye}) translate3d(0, ${Ee}px, 0)` : `scale(${ye}) translate3d(${Ee}px, 0, 0)`
7268
- }), !ie && oe.current && (le.current = setTimeout(() => {
7268
+ }), !ie && oe.current && (ae.current = setTimeout(() => {
7269
7269
  const ge = cn(oe.current, S);
7270
7270
  He(oe.current, {
7271
7271
  transition: "none",
@@ -7520,7 +7520,7 @@ const br = {
7520
7520
  br.Overlay,
7521
7521
  {
7522
7522
  ref: r,
7523
- className: ae("gw-fixed gw-inset-0 gw-z-50 gw-backdrop-blur-sm gw-bg-black/50", e),
7523
+ className: le("gw-fixed gw-inset-0 gw-z-50 gw-backdrop-blur-sm gw-bg-black/50", e),
7524
7524
  ...t
7525
7525
  }
7526
7526
  )), p9 = wt(({ className: e, children: t, childrenWrapperClassName: r, ...n }, o) => /* @__PURE__ */ x(f9, { children: [
@@ -7529,7 +7529,7 @@ const br = {
7529
7529
  br.Content,
7530
7530
  {
7531
7531
  ref: o,
7532
- className: ae(
7532
+ className: le(
7533
7533
  "gw-fixed gw-left-0 gw-right-0 gw-bottom-0 gw-z-50 gw-flex gw-max-h-[82vh] gw-flex-col gw-rounded-t-3xl gw-bg-popover gw-text-popover-foreground gw-shadow-md",
7534
7534
  e
7535
7535
  ),
@@ -7537,7 +7537,7 @@ const br = {
7537
7537
  children: /* @__PURE__ */ l(
7538
7538
  "div",
7539
7539
  {
7540
- className: ae(
7540
+ className: le(
7541
7541
  "gw-w-full gw-mx-auto gw-overflow-auto gw-rounded-t-3xl gw-pt-2",
7542
7542
  r
7543
7543
  ),
@@ -7550,14 +7550,14 @@ const br = {
7550
7550
  br.Title,
7551
7551
  {
7552
7552
  ref: r,
7553
- className: ae("gw-text-lg gw-font-semibold gw-leading-none gw-tracking-tight", e),
7553
+ className: le("gw-text-lg gw-font-semibold gw-leading-none gw-tracking-tight", e),
7554
7554
  ...t
7555
7555
  }
7556
7556
  )), w9 = wt(({ className: e, ...t }, r) => /* @__PURE__ */ l(
7557
7557
  br.Description,
7558
7558
  {
7559
7559
  ref: r,
7560
- className: ae("gw-text-sm gw-text-muted-foreground", e),
7560
+ className: le("gw-text-sm gw-text-muted-foreground", e),
7561
7561
  ...t
7562
7562
  }
7563
7563
  )), C9 = ["top", "right", "bottom", "left"], mr = Math.min, ht = Math.max, En = Math.round, un = Math.floor, Zt = (e) => ({
@@ -8967,9 +8967,9 @@ var Oi = "PopperContent", [W8, B8] = ql(Oi), zl = N.forwardRef(
8967
8967
  c && E8({ ...V }),
8968
8968
  I8({
8969
8969
  ...V,
8970
- apply: ({ elements: ne, rects: te, availableWidth: le, availableHeight: fe }) => {
8971
- const { width: ve, height: Ne } = te.reference, xe = ne.floating.style;
8972
- xe.setProperty("--radix-popper-available-width", `${le}px`), xe.setProperty("--radix-popper-available-height", `${fe}px`), xe.setProperty("--radix-popper-anchor-width", `${ve}px`), xe.setProperty("--radix-popper-anchor-height", `${Ne}px`);
8970
+ apply: ({ elements: ne, rects: $, availableWidth: ae, availableHeight: fe }) => {
8971
+ const { width: ve, height: Ne } = $.reference, xe = ne.floating.style;
8972
+ xe.setProperty("--radix-popper-available-width", `${ae}px`), xe.setProperty("--radix-popper-available-height", `${fe}px`), xe.setProperty("--radix-popper-anchor-width", `${ve}px`), xe.setProperty("--radix-popper-anchor-height", `${Ne}px`);
8973
8973
  }
8974
8974
  }),
8975
8975
  S && N8({ element: S, padding: s }),
@@ -8980,9 +8980,9 @@ var Oi = "PopperContent", [W8, B8] = ql(Oi), zl = N.forwardRef(
8980
8980
  nr(() => {
8981
8981
  Z && D?.();
8982
8982
  }, [Z, D]);
8983
- const _ = Q.arrow?.x, j = Q.arrow?.y, H = Q.arrow?.centerOffset !== 0, [G, $] = N.useState();
8983
+ const _ = Q.arrow?.x, j = Q.arrow?.y, H = Q.arrow?.centerOffset !== 0, [G, ee] = N.useState();
8984
8984
  return nr(() => {
8985
- b && $(window.getComputedStyle(b).zIndex);
8985
+ b && ee(window.getComputedStyle(b).zIndex);
8986
8986
  }, [b]), /* @__PURE__ */ l(
8987
8987
  "div",
8988
8988
  {
@@ -9320,7 +9320,7 @@ const j8 = D8, _8 = X8, $8 = wt(({ className: e, align: t = "center", sideOffset
9320
9320
  ref: o,
9321
9321
  align: t,
9322
9322
  sideOffset: r,
9323
- className: ae(
9323
+ className: le(
9324
9324
  "gw-PopoverContent gw-z-50 gw-w-72 gw-rounded-3xl gw-overflow-y-auto gw-bg-popover gw-p-6 gw-text-popover-foreground gw-shadow-buttonMd gw-outline-none data-[state=open]:gw-animate-in data-[state=closed]:gw-animate-out data-[state=closed]:gw-fade-out-0 data-[state=open]:gw-fade-in-0 data-[state=closed]:gw-zoom-out-95 data-[state=open]:gw-zoom-in-95 data-[side=bottom]:gw-slide-in-from-top-2 data-[side=left]:gw-slide-in-from-right-2 data-[side=right]:gw-slide-in-from-left-2 data-[side=top]:gw-slide-in-from-bottom-2",
9325
9325
  e
9326
9326
  ),
@@ -9615,7 +9615,7 @@ function xu(e) {
9615
9615
  }
9616
9616
  const Eu = (e) => {
9617
9617
  var t, r, n, o, i, a, s, c, u;
9618
- const { invert: f, toast: d, unstyled: p, interacting: m, setHeights: C, visibleToasts: w, heights: v, index: b, toasts: I, expanded: E, removeToast: S, defaultRichColors: R, closeButton: k, style: W, cancelButtonStyle: q, actionButtonStyle: L, className: X = "", descriptionClassName: z = "", duration: O, position: V, gap: T, expandByDefault: U, classNames: F, icons: Z, closeButtonAriaLabel: Q = "Close toast" } = e, [J, P] = B.useState(null), [D, _] = B.useState(null), [j, H] = B.useState(!1), [G, $] = B.useState(!1), [ne, te] = B.useState(!1), [le, fe] = B.useState(!1), [ve, Ne] = B.useState(!1), [xe, oe] = B.useState(0), [sr, Ct] = B.useState(0), rt = B.useRef(d.duration || O || ua), Tt = B.useRef(null), _e = B.useRef(null), it = b === 0, yt = b + 1 <= w, be = d.type, Xe = d.dismissible !== !1, ee = d.className || "", ce = d.descriptionClassName || "", Ye = B.useMemo(() => v.findIndex((se) => se.toastId === d.id) || 0, [
9618
+ const { invert: f, toast: d, unstyled: p, interacting: m, setHeights: C, visibleToasts: w, heights: v, index: b, toasts: I, expanded: E, removeToast: S, defaultRichColors: R, closeButton: k, style: W, cancelButtonStyle: q, actionButtonStyle: L, className: X = "", descriptionClassName: z = "", duration: O, position: V, gap: T, expandByDefault: U, classNames: F, icons: Z, closeButtonAriaLabel: Q = "Close toast" } = e, [J, P] = B.useState(null), [D, _] = B.useState(null), [j, H] = B.useState(!1), [G, ee] = B.useState(!1), [ne, $] = B.useState(!1), [ae, fe] = B.useState(!1), [ve, Ne] = B.useState(!1), [xe, oe] = B.useState(0), [sr, Ct] = B.useState(0), rt = B.useRef(d.duration || O || ua), Tt = B.useRef(null), _e = B.useRef(null), it = b === 0, yt = b + 1 <= w, be = d.type, Xe = d.dismissible !== !1, te = d.className || "", ce = d.descriptionClassName || "", Ye = B.useMemo(() => v.findIndex((se) => se.toastId === d.id) || 0, [
9619
9619
  v,
9620
9620
  d.id
9621
9621
  ]), y = B.useMemo(() => {
@@ -9683,7 +9683,7 @@ const Eu = (e) => {
9683
9683
  d.cancel
9684
9684
  ]);
9685
9685
  const ie = B.useCallback(() => {
9686
- $(!0), oe(A.current), C((se) => se.filter((we) => we.toastId !== d.id)), setTimeout(() => {
9686
+ ee(!0), oe(A.current), C((se) => se.filter((we) => we.toastId !== d.id)), setTimeout(() => {
9687
9687
  S(d);
9688
9688
  }, Au);
9689
9689
  }, [
@@ -9738,7 +9738,7 @@ const Eu = (e) => {
9738
9738
  return /* @__PURE__ */ B.createElement("li", {
9739
9739
  tabIndex: 0,
9740
9740
  ref: _e,
9741
- className: Ft(X, ee, F?.toast, d == null || (t = d.classNames) == null ? void 0 : t.toast, F?.default, F?.[be], d == null || (r = d.classNames) == null ? void 0 : r[be]),
9741
+ className: Ft(X, te, F?.toast, d == null || (t = d.classNames) == null ? void 0 : t.toast, F?.default, F?.[be], d == null || (r = d.classNames) == null ? void 0 : r[be]),
9742
9742
  "data-sonner-toast": "",
9743
9743
  "data-rich-colors": (ge = d.richColors) != null ? ge : R,
9744
9744
  "data-styled": !(d.jsx || d.unstyled || p),
@@ -9755,7 +9755,7 @@ const Eu = (e) => {
9755
9755
  "data-dismissible": Xe,
9756
9756
  "data-type": be,
9757
9757
  "data-invert": Ve,
9758
- "data-swipe-out": le,
9758
+ "data-swipe-out": ae,
9759
9759
  "data-swipe-direction": D,
9760
9760
  "data-expanded": !!(E || U && j),
9761
9761
  "data-testid": d.testId,
@@ -9769,17 +9769,17 @@ const Eu = (e) => {
9769
9769
  ...d.style
9770
9770
  },
9771
9771
  onDragEnd: () => {
9772
- te(!1), P(null), K.current = null;
9772
+ $(!1), P(null), K.current = null;
9773
9773
  },
9774
9774
  onPointerDown: (se) => {
9775
- se.button !== 2 && (Ce || !Xe || (Tt.current = /* @__PURE__ */ new Date(), oe(A.current), se.target.setPointerCapture(se.pointerId), se.target.tagName !== "BUTTON" && (te(!0), K.current = {
9775
+ se.button !== 2 && (Ce || !Xe || (Tt.current = /* @__PURE__ */ new Date(), oe(A.current), se.target.setPointerCapture(se.pointerId), se.target.tagName !== "BUTTON" && ($(!0), K.current = {
9776
9776
  x: se.clientX,
9777
9777
  y: se.clientY
9778
9778
  })));
9779
9779
  },
9780
9780
  onPointerUp: () => {
9781
9781
  var se, we, ke;
9782
- if (le || !Xe) return;
9782
+ if (ae || !Xe) return;
9783
9783
  K.current = null;
9784
9784
  const Me = Number(((se = _e.current) == null ? void 0 : se.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), vt = Number(((we = _e.current) == null ? void 0 : we.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Re = (/* @__PURE__ */ new Date()).getTime() - ((ke = Tt.current) == null ? void 0 : ke.getTime()), Ke = J === "x" ? Me : vt, zt = Math.abs(Ke) / Re;
9785
9785
  if (Math.abs(Ke) >= bu || zt > 0.11) {
@@ -9789,7 +9789,7 @@ const Eu = (e) => {
9789
9789
  var st, St;
9790
9790
  (st = _e.current) == null || st.style.setProperty("--swipe-amount-x", "0px"), (St = _e.current) == null || St.style.setProperty("--swipe-amount-y", "0px");
9791
9791
  }
9792
- Ne(!1), te(!1), P(null);
9792
+ Ne(!1), $(!1), P(null);
9793
9793
  },
9794
9794
  onPointerMove: (se) => {
9795
9795
  var we, ke, Me;
@@ -9906,7 +9906,7 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
9906
9906
  ]), [X, z] = B.useState([]), [O, V] = B.useState(!1), [T, U] = B.useState(!1), [F, Z] = B.useState(p !== "system" ? p : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), Q = B.useRef(null), J = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = B.useRef(null), D = B.useRef(!1), _ = B.useCallback((j) => {
9907
9907
  W((H) => {
9908
9908
  var G;
9909
- return (G = H.find(($) => $.id === j.id)) != null && G.delete || ct.dismiss(j.id), H.filter(({ id: $ }) => $ !== j.id);
9909
+ return (G = H.find((ee) => ee.id === j.id)) != null && G.delete || ct.dismiss(j.id), H.filter(({ id: ee }) => ee !== j.id);
9910
9910
  });
9911
9911
  }, []);
9912
9912
  return B.useEffect(() => ct.subscribe((j) => {
@@ -9922,7 +9922,7 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
9922
9922
  setTimeout(() => {
9923
9923
  Xa.flushSync(() => {
9924
9924
  W((H) => {
9925
- const G = H.findIndex(($) => $.id === j.id);
9925
+ const G = H.findIndex((ee) => ee.id === j.id);
9926
9926
  return G !== -1 ? [
9927
9927
  ...H.slice(0, G),
9928
9928
  {
@@ -9954,8 +9954,8 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
9954
9954
  j.addListener(({ matches: G }) => {
9955
9955
  try {
9956
9956
  Z(G ? "dark" : "light");
9957
- } catch ($) {
9958
- console.error($);
9957
+ } catch (ee) {
9958
+ console.error(ee);
9959
9959
  }
9960
9960
  });
9961
9961
  }
@@ -9968,7 +9968,7 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
9968
9968
  ]), B.useEffect(() => {
9969
9969
  const j = (H) => {
9970
9970
  var G;
9971
- if (a.every((te) => H[te] || H.code === te)) {
9971
+ if (a.every(($) => H[$] || H.code === $)) {
9972
9972
  var ne;
9973
9973
  V(!0), (ne = Q.current) == null || ne.focus();
9974
9974
  }
@@ -9997,7 +9997,7 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
9997
9997
  suppressHydrationWarning: !0
9998
9998
  }, L.map((j, H) => {
9999
9999
  var G;
10000
- const [$, ne] = j.split("-");
10000
+ const [ee, ne] = j.split("-");
10001
10001
  return q.length ? /* @__PURE__ */ B.createElement("ol", {
10002
10002
  key: j,
10003
10003
  dir: I === "auto" ? da() : I,
@@ -10006,7 +10006,7 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
10006
10006
  className: u,
10007
10007
  "data-sonner-toaster": !0,
10008
10008
  "data-sonner-theme": F,
10009
- "data-y-position": $,
10009
+ "data-y-position": ee,
10010
10010
  "data-x-position": ne,
10011
10011
  style: {
10012
10012
  "--front-toast-height": `${((G = X[0]) == null ? void 0 : G.height) || 0}px`,
@@ -10015,13 +10015,13 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
10015
10015
  ...w,
10016
10016
  ...Iu(f, d)
10017
10017
  },
10018
- onBlur: (te) => {
10019
- D.current && !te.currentTarget.contains(te.relatedTarget) && (D.current = !1, P.current && (P.current.focus({
10018
+ onBlur: ($) => {
10019
+ D.current && !$.currentTarget.contains($.relatedTarget) && (D.current = !1, P.current && (P.current.focus({
10020
10020
  preventScroll: !0
10021
10021
  }), P.current = null));
10022
10022
  },
10023
- onFocus: (te) => {
10024
- te.target instanceof HTMLElement && te.target.dataset.dismissible === "false" || D.current || (D.current = !0, P.current = te.relatedTarget);
10023
+ onFocus: ($) => {
10024
+ $.target instanceof HTMLElement && $.target.dataset.dismissible === "false" || D.current || (D.current = !0, P.current = $.relatedTarget);
10025
10025
  },
10026
10026
  onMouseEnter: () => V(!0),
10027
10027
  onMouseMove: () => V(!0),
@@ -10029,17 +10029,17 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
10029
10029
  T || V(!1);
10030
10030
  },
10031
10031
  onDragEnd: () => V(!1),
10032
- onPointerDown: (te) => {
10033
- te.target instanceof HTMLElement && te.target.dataset.dismissible === "false" || U(!0);
10032
+ onPointerDown: ($) => {
10033
+ $.target instanceof HTMLElement && $.target.dataset.dismissible === "false" || U(!0);
10034
10034
  },
10035
10035
  onPointerUp: () => U(!1)
10036
- }, q.filter((te) => !te.position && H === 0 || te.position === j).map((te, le) => {
10036
+ }, q.filter(($) => !$.position && H === 0 || $.position === j).map(($, ae) => {
10037
10037
  var fe, ve;
10038
10038
  return /* @__PURE__ */ B.createElement(Eu, {
10039
- key: te.id,
10039
+ key: $.id,
10040
10040
  icons: S,
10041
- index: le,
10042
- toast: te,
10041
+ index: ae,
10042
+ toast: $,
10043
10043
  defaultRichColors: m,
10044
10044
  duration: (fe = b?.duration) != null ? fe : C,
10045
10045
  className: b?.className,
@@ -10056,8 +10056,8 @@ const Su = /* @__PURE__ */ B.forwardRef(function(t, r) {
10056
10056
  actionButtonStyle: b?.actionButtonStyle,
10057
10057
  closeButtonAriaLabel: b?.closeButtonAriaLabel,
10058
10058
  removeToast: _,
10059
- toasts: q.filter((Ne) => Ne.position == te.position),
10060
- heights: X.filter((Ne) => Ne.position == te.position),
10059
+ toasts: q.filter((Ne) => Ne.position == $.position),
10060
+ heights: X.filter((Ne) => Ne.position == $.position),
10061
10061
  setHeights: z,
10062
10062
  expandByDefault: s,
10063
10063
  gap: E,
@@ -10250,11 +10250,11 @@ function Lu() {
10250
10250
  async (H, G) => {
10251
10251
  try {
10252
10252
  R(!0);
10253
- const $ = await s(H, G);
10254
- if (!$.ok) throw new Error($?.error || "Could not update the quote");
10255
- z($.quote);
10256
- } catch ($) {
10257
- V($?.message);
10253
+ const ee = await s(H, G);
10254
+ if (!ee.ok) throw new Error(ee?.error || "Could not update the quote");
10255
+ z(ee.quote);
10256
+ } catch (ee) {
10257
+ V(ee?.message);
10258
10258
  }
10259
10259
  R(!1);
10260
10260
  },
@@ -10271,19 +10271,23 @@ function Lu() {
10271
10271
  } else
10272
10272
  Z(c);
10273
10273
  }, [f, c, v, T, k, X, Z, e, Q]);
10274
- const J = async (H, G) => {
10274
+ const J = async (H, G, ee = !0) => {
10275
10275
  if (!e) return G("User not authenticated");
10276
+ let ne = "";
10276
10277
  try {
10277
10278
  if (!X) return G("Cannot create payment link for invalid quote");
10278
- const $ = ku({ url: "", height: Wu, width: Bu });
10279
- if (!$) return G("Cannot open popup");
10280
- const ne = await o(X);
10281
- if (!ne.ok) return G(ne?.error || "Cannot create payment link");
10282
- $.location.href = ne.url, W(!0);
10279
+ const $ = await o(X);
10280
+ if (!$.ok || !$.url) return G($?.error || "Cannot create payment link");
10281
+ if (ne = $.url, ee) {
10282
+ const ae = ku({ url: "", height: Wu, width: Bu });
10283
+ if (!ae) return G("Cannot open popup");
10284
+ ae.location.href = ne;
10285
+ }
10286
+ W(!0);
10283
10287
  } catch ($) {
10284
10288
  return G($?.message || "Error initiating funding");
10285
10289
  }
10286
- return H();
10290
+ return H(ne);
10287
10291
  }, P = Pe(
10288
10292
  async (H) => {
10289
10293
  L((G) => G + 1);
@@ -10402,10 +10406,10 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10402
10406
  a(!1);
10403
10407
  }, 2e3);
10404
10408
  },
10405
- className: ae("gw-inline-flex gw-items-center gw-justify-end gw-text-brand-gray-500 gw-gap-1", r),
10409
+ className: le("gw-inline-flex gw-items-center gw-justify-end gw-text-brand-gray-500 gw-gap-1", r),
10406
10410
  children: [
10407
10411
  /* @__PURE__ */ l("span", { className: n, children: e }),
10408
- /* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(Qu, { isCopied: i, className: ae("gw-text-secondary gw-size-4", o) }) })
10412
+ /* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(Qu, { isCopied: i, className: le("gw-text-secondary gw-size-4", o) }) })
10409
10413
  ]
10410
10414
  }
10411
10415
  );
@@ -10451,7 +10455,7 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10451
10455
  ) })
10452
10456
  ] })
10453
10457
  ] }),
10454
- a?.length === 1 ? /* @__PURE__ */ l(m, { className: ae("gw-size-8", p && pr) }) : /* @__PURE__ */ x("div", { className: "gw-relative", ref: d, children: [
10458
+ a?.length === 1 ? /* @__PURE__ */ l(m, { className: le("gw-size-8", p && pr) }) : /* @__PURE__ */ x("div", { className: "gw-relative", ref: d, children: [
10455
10459
  /* @__PURE__ */ x(
10456
10460
  "button",
10457
10461
  {
@@ -10459,7 +10463,7 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10459
10463
  disabled: !n,
10460
10464
  className: "gw-rounded-full gw-shadow-buttonMd gw-px-1 gw-py-1 gw-h-auto gw-w-auto gw-min-w-0 !gw-ring-0 gw-flex gw-items-center gw-space-x-1",
10461
10465
  children: [
10462
- /* @__PURE__ */ l("div", { className: "gw-w-8 gw-h-8 gw-rounded-full", children: /* @__PURE__ */ l(m, { className: ae("gw-size-8", p && pr) }) }),
10466
+ /* @__PURE__ */ l("div", { className: "gw-w-8 gw-h-8 gw-rounded-full", children: /* @__PURE__ */ l(m, { className: le("gw-size-8", p && pr) }) }),
10463
10467
  /* @__PURE__ */ l(F2, { className: "gw-size-4 gw-text-gray-500" })
10464
10468
  ]
10465
10469
  }
@@ -10473,7 +10477,7 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10473
10477
  i({ chainId: C.id }), f(!1);
10474
10478
  },
10475
10479
  disabled: w,
10476
- className: ae(
10480
+ className: le(
10477
10481
  "gw-w-full gw-flex gw-items-center gw-space-x-2 gw-px-1 gw-py-1 gw-text-left",
10478
10482
  w ? "gw-bg-green-500/15" : "hover:gw-bg-gray-50"
10479
10483
  ),
@@ -10481,13 +10485,13 @@ const Ou = ({ text: e, textToCopy: t, className: r, textClassName: n, iconClassN
10481
10485
  /* @__PURE__ */ l("div", { className: "gw-w-9 gw-h-9 gw-rounded-full gw-p-1", children: /* @__PURE__ */ l(
10482
10486
  b,
10483
10487
  {
10484
- className: ae(
10488
+ className: le(
10485
10489
  "gw-size-6 gw-text-white",
10486
10490
  I && pr
10487
10491
  )
10488
10492
  }
10489
10493
  ) }),
10490
- /* @__PURE__ */ l("span", { className: ae("gw-text-sm", w && "!gw-font-bold"), children: v })
10494
+ /* @__PURE__ */ l("span", { className: le("gw-text-sm", w && "!gw-font-bold"), children: v })
10491
10495
  ]
10492
10496
  },
10493
10497
  C.id
@@ -10856,7 +10860,7 @@ const gd = ud, pd = dd, md = fd, wd = wt(({ className: e, sideOffset: t = 4, ...
10856
10860
  {
10857
10861
  ref: n,
10858
10862
  sideOffset: t,
10859
- className: ae(
10863
+ className: le(
10860
10864
  "gw-z-50 gw-overflow-hidden gw-typography-caption gw-rounded-lg gw-bg-popover gw-px-3 gw-py-1.5 gw-text-popover-foreground gw-shadow-inputFocus gw-animate-in gw-fade-in-0 gw-zoom-in-95 data-[state=closed]:gw-animate-out data-[state=closed]:gw-fade-out-0 data-[state=closed]:gw-zoom-out-95 data-[side=bottom]:gw-slide-in-from-top-2 data-[side=left]:gw-slide-in-from-right-2 data-[side=right]:gw-slide-in-from-left-2 data-[side=top]:gw-slide-in-from-bottom-2",
10861
10865
  e
10862
10866
  ),
@@ -10891,10 +10895,10 @@ function Vn({
10891
10895
  onClick: (p) => {
10892
10896
  u && p.stopPropagation(), s === void 0 && !c && d((m) => !m);
10893
10897
  },
10894
- children: n ?? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(zu, { className: ae("gw-text-brand-gray-500 gw-size-5", t) }) })
10898
+ children: n ?? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(zu, { className: le("gw-text-brand-gray-500 gw-size-5", t) }) })
10895
10899
  }
10896
10900
  ),
10897
- /* @__PURE__ */ l(wd, { align: i, className: ae("gw-max-w-72", e), side: o, children: /* @__PURE__ */ l("div", { children: r }) })
10901
+ /* @__PURE__ */ l(wd, { align: i, className: le("gw-max-w-72", e), side: o, children: /* @__PURE__ */ l("div", { children: r }) })
10898
10902
  ]
10899
10903
  }
10900
10904
  );
@@ -11193,7 +11197,7 @@ function M1(e) {
11193
11197
  }
11194
11198
  function K1({ className: e }) {
11195
11199
  const { nativeSymbol: t } = Fe(), r = Et(), n = _c[t] || M1, o = i1.get(r) || !1;
11196
- return /* @__PURE__ */ l(n, { className: ae("gw-size-6", e, o && pr) });
11200
+ return /* @__PURE__ */ l(n, { className: le("gw-size-6", e, o && pr) });
11197
11201
  }
11198
11202
  const vd = ({ onBack: e, id: t, value: r }) => {
11199
11203
  const { user: n, nativeSymbol: o } = Fe();
@@ -11804,7 +11808,7 @@ const Wd = (e) => /* @__PURE__ */ l("svg", { width: "23", height: "19", viewBox:
11804
11808
  /* @__PURE__ */ l(
11805
11809
  Nd,
11806
11810
  {
11807
- className: ae(
11811
+ className: le(
11808
11812
  e === Oe.HOME ? "gw-fill-secondary gw-text-secondary" : "gw-text-brand-gray-600",
11809
11813
  "gw-size-5"
11810
11814
  )
@@ -11816,7 +11820,7 @@ const Wd = (e) => /* @__PURE__ */ l("svg", { width: "23", height: "19", viewBox:
11816
11820
  /* @__PURE__ */ l(
11817
11821
  Md,
11818
11822
  {
11819
- className: ae(
11823
+ className: le(
11820
11824
  e === Oe.TOKENS ? "gw-fill-secondary gw-text-secondary" : "gw-text-brand-gray-600",
11821
11825
  "gw-size-5"
11822
11826
  )
@@ -11837,7 +11841,7 @@ const Wd = (e) => /* @__PURE__ */ l("svg", { width: "23", height: "19", viewBox:
11837
11841
  Sd,
11838
11842
  {
11839
11843
  isActive: e === Oe.ACTIVITY,
11840
- className: ae(
11844
+ className: le(
11841
11845
  e === Oe.ACTIVITY ? "gw-fill-secondary gw-text-secondary" : "gw-text-brand-gray-600",
11842
11846
  "gw-size-6"
11843
11847
  )
@@ -11926,7 +11930,7 @@ function qd({ data: e }) {
11926
11930
  /* @__PURE__ */ l(
11927
11931
  "div",
11928
11932
  {
11929
- className: ae(
11933
+ className: le(
11930
11934
  "gw-rounded-full gw-size-10 gw-flex-shrink-0 gw-flex gw-justify-center gw-items-center",
11931
11935
  e.status === "Confirmed" ? "gw-bg-brand-success" : e.status === "Failed" ? "gw-bg-destructive" : "gw-bg-brand-warning"
11932
11936
  ),
@@ -11939,7 +11943,7 @@ function qd({ data: e }) {
11939
11943
  /* @__PURE__ */ l(
11940
11944
  "div",
11941
11945
  {
11942
- className: ae(
11946
+ className: le(
11943
11947
  "gw-typography-caption",
11944
11948
  e.status === "Confirmed" ? "gw-text-brand-success" : e.status === "Failed" ? "gw-text-destructive" : "gw-text-brand-warning"
11945
11949
  ),
@@ -11982,7 +11986,7 @@ function Zd() {
11982
11986
  /* @__PURE__ */ l(
11983
11987
  "div",
11984
11988
  {
11985
- className: ae(
11989
+ className: le(
11986
11990
  "gw-rounded-full gw-overflow-hidden gw-size-10 gw-flex-shrink-0 gw-flex gw-justify-center gw-items-center"
11987
11991
  ),
11988
11992
  children: /* @__PURE__ */ l($e, { className: "gw-w-full gw-h-full gw-rounded-full" })
@@ -11991,7 +11995,7 @@ function Zd() {
11991
11995
  /* @__PURE__ */ x("div", { className: "gw-flex gw-justify-between gw-items-center gw-flex-1", children: [
11992
11996
  /* @__PURE__ */ x("div", { className: "gw-flex gw-flex-col gw-text-start gw-space-y-1", children: [
11993
11997
  /* @__PURE__ */ l("div", { className: "gw-font-medium gw-capitalize", children: /* @__PURE__ */ l($e, { className: "gw-w-14 gw-h-4" }) }),
11994
- /* @__PURE__ */ l("div", { className: ae("gw-typography-caption"), children: /* @__PURE__ */ l($e, { className: "gw-w-14 gw-h-3" }) })
11998
+ /* @__PURE__ */ l("div", { className: le("gw-typography-caption"), children: /* @__PURE__ */ l($e, { className: "gw-w-14 gw-h-3" }) })
11995
11999
  ] }),
11996
12000
  /* @__PURE__ */ x("div", { className: "gw-flex gw-flex-col gw-text-end gw-space-y-1", children: [
11997
12001
  /* @__PURE__ */ l("div", { className: "gw-font-medium", children: /* @__PURE__ */ l($e, { className: "gw-w-10 gw-h-4" }) }),
@@ -12357,11 +12361,11 @@ function M3(e) {
12357
12361
  return e ? "open" : "closed";
12358
12362
  }
12359
12363
  var sf = _i, af = es, lf = R3, cf = ts, uf = rs;
12360
- const df = sf, ff = wt(({ className: e, ...t }, r) => /* @__PURE__ */ l(af, { ref: r, className: ae(e), ...t })), hf = wt(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ l(lf, { className: "gw-flex", children: /* @__PURE__ */ l(
12364
+ const df = sf, ff = wt(({ className: e, ...t }, r) => /* @__PURE__ */ l(af, { ref: r, className: le(e), ...t })), hf = wt(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ l(lf, { className: "gw-flex", children: /* @__PURE__ */ l(
12361
12365
  cf,
12362
12366
  {
12363
12367
  ref: n,
12364
- className: ae("gw-flex gw-flex-1 gw-items-center gw-justify-between gw-py-3 gw-transition-all", e),
12368
+ className: le("gw-flex gw-flex-1 gw-items-center gw-justify-between gw-py-3 gw-transition-all", e),
12365
12369
  ...r,
12366
12370
  children: t
12367
12371
  }
@@ -12371,7 +12375,7 @@ const df = sf, ff = wt(({ className: e, ...t }, r) => /* @__PURE__ */ l(af, { re
12371
12375
  ref: n,
12372
12376
  className: "gw-overflow-hidden gw-text-sm gw-transition-all data-[state=closed]:gw-animate-accordion-up data-[state=open]:gw-animate-accordion-down",
12373
12377
  ...r,
12374
- children: /* @__PURE__ */ l("div", { className: ae("gw-pb-2 gw-pt-0", e), children: t })
12378
+ children: /* @__PURE__ */ l("div", { className: le("gw-pb-2 gw-pt-0", e), children: t })
12375
12379
  }
12376
12380
  ));
12377
12381
  function pf({ expandFirst: e = !1 }) {
@@ -12766,7 +12770,7 @@ const wa = ({ url: e, alt: t, title: r, className: n, ...o }) => {
12766
12770
  alt: t,
12767
12771
  title: r,
12768
12772
  onError: () => a(!0),
12769
- className: ae("gw-object-cover gw-rounded-md gw-block", n)
12773
+ className: le("gw-object-cover gw-rounded-md gw-block", n)
12770
12774
  }
12771
12775
  ) : /* @__PURE__ */ l(bf, { style: { width: "100%", height: "100%" }, ...o }) });
12772
12776
  };
@@ -12927,7 +12931,7 @@ function Nf({ onBack: e }) {
12927
12931
  /* @__PURE__ */ l(
12928
12932
  "span",
12929
12933
  {
12930
- className: ae(
12934
+ className: le(
12931
12935
  "group-hover:gw-w-16 gw-w-0 gw-overflow-hidden gw-whitespace-nowrap gw-transition-all gw-duration-300 gw-text-xs"
12932
12936
  ),
12933
12937
  children: "Edit Profile"
@@ -13877,7 +13881,7 @@ function qf({ onBack: e }) {
13877
13881
  const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { className: "gw-relative gw-w-full", children: e ? /* @__PURE__ */ l(
13878
13882
  "p",
13879
13883
  {
13880
- className: ae(
13884
+ className: le(
13881
13885
  "gw-absolute gw-translate-y-1 gw-pr-2 gw-w-full gw-typography-caption",
13882
13886
  t === "error" ? "gw-text-destructive" : "gw-text-muted",
13883
13887
  r
@@ -13897,11 +13901,11 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13897
13901
  type: s,
13898
13902
  placeholder: c,
13899
13903
  ...u
13900
- }, f) => /* @__PURE__ */ x("div", { className: ae("gw-typography-body2 gw-pb-3 gw-w-full", r), children: [
13904
+ }, f) => /* @__PURE__ */ x("div", { className: le("gw-typography-body2 gw-pb-3 gw-w-full", r), children: [
13901
13905
  e && !e.floatingLabel ? /* @__PURE__ */ l(
13902
13906
  "label",
13903
13907
  {
13904
- className: ae(
13908
+ className: le(
13905
13909
  "gw-text-brand-gray-500",
13906
13910
  t?.isError && "gw-text-destructive",
13907
13911
  e.className
@@ -13913,7 +13917,7 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13913
13917
  /* @__PURE__ */ x(
13914
13918
  "div",
13915
13919
  {
13916
- className: ae(
13920
+ className: le(
13917
13921
  "gw-relative gw-w-full gw-text-foreground gw-typography-body1 ",
13918
13922
  t?.isError && "gw-text-destructive",
13919
13923
  !e?.floatingLabel && "gw-mt-1",
@@ -13923,7 +13927,7 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13923
13927
  o ? /* @__PURE__ */ l(
13924
13928
  "div",
13925
13929
  {
13926
- className: ae(
13930
+ className: le(
13927
13931
  "gw-absolute gw-inset-y-0 gw-left-0 gw-rounded-l-xl gw-flex gw-items-center gw-w-11 gw-pointer-events-none",
13928
13932
  u.disabled && "gw-opacity-50",
13929
13933
  o.className
@@ -13934,7 +13938,7 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13934
13938
  /* @__PURE__ */ l(
13935
13939
  "input",
13936
13940
  {
13937
- className: ae(
13941
+ className: le(
13938
13942
  "gw-peer gw-flex gw-w-full gw-rounded-full gw-border-none gw-bg-background gw-outline-none gw-py-3 gw-px-5 gw-h-12 gw-shadow-sm gw-transition-all file:gw-border-0 file:gw-bg-transparent gw-placeholder-brand-gray-500 focus-visible:gw-outline-none gw-ring-1 hover:gw-ring-2 focus:gw-ring-1 focus:gw-shadow-inputFocus active:gw-shadow-inputFocus gw-ring-input focus-visible:gw-ring-secondary disabled:gw-cursor-not-allowed disabled:gw-opacity-50",
13939
13943
  t?.isError && "gw-ring-destructive/50 dark:gw-ring-destructive/50 hover:gw-ring-destructive focus-visible:gw-ring-destructive",
13940
13944
  !!o && "gw-pl-11",
@@ -13958,7 +13962,7 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13958
13962
  e && e.floatingLabel ? /* @__PURE__ */ l(
13959
13963
  "label",
13960
13964
  {
13961
- className: ae(
13965
+ className: le(
13962
13966
  "gw-absolute gw-cursor-text gw-duration-300 gw-text-brand-gray-500 peer-placeholder-shown:gw-text-input peer-focus:gw-text-foreground gw-transform gw-typography-caption gw--translate-y-1/2 gw-scale-90 gw-top-0 gw-z-10 gw-bg-background peer-focus:gw-px-1.5 peer-placeholder-shown:gw-px-0 gw-px-1.5 gw-left-1.5 peer-focus:gw-left-1.5 peer-focus:gw-top-0 peer-focus:gw-scale-90 peer-focus:gw--translate-y-1/2 peer-placeholder-shown:gw-scale-100 peer-placeholder-shown:gw--translate-y-1/2 peer-placeholder-shown:gw-top-1/2 gw-pointer-events-none autofill:gw-bg-transparent",
13963
13967
  o && "peer-placeholder-shown:gw-left-11",
13964
13968
  i && "peer-placeholder-shown:gw-right-11",
@@ -13973,7 +13977,7 @@ const Zf = ({ text: e, type: t, className: r }) => /* @__PURE__ */ l("div", { cl
13973
13977
  i ? /* @__PURE__ */ l(
13974
13978
  "div",
13975
13979
  {
13976
- className: ae(
13980
+ className: le(
13977
13981
  "gw-absolute gw-inset-y-0 gw-flex gw-items-center gw-w-11 gw-right-0 gw-rounded-r-xl gw-pointer-events-none",
13978
13982
  u.disabled && "gw-opacity-50",
13979
13983
  i.className
@@ -14158,7 +14162,7 @@ Please try again.` }),
14158
14162
  /* @__PURE__ */ l(ft, { className: "gw-animate-pulse gw-delay-600 gw-w-4" })
14159
14163
  ] }),
14160
14164
  /* @__PURE__ */ x("div", { className: "gw-flex gw-items-center gw-justify-center gw-relative gw-z-10", children: [
14161
- /* @__PURE__ */ l(a, { className: ae("gw-size-6", u && pr) }),
14165
+ /* @__PURE__ */ l(a, { className: le("gw-size-6", u && pr) }),
14162
14166
  /* @__PURE__ */ x("div", { className: "gw-typography-body2 gw-ml-2", children: [
14163
14167
  /* @__PURE__ */ l("span", { children: o?.receivable_amount_in_token }),
14164
14168
  " ",
@@ -14256,24 +14260,24 @@ sent to ${dt(r.receiver_address)}` }),
14256
14260
  }, Hf = xt(Xf), Pf = 6, jf = 10 * 1e3, _f = "Not enough balance";
14257
14261
  function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14258
14262
  const { user: o, sendTransaction: i, refreshBalances: a, hasBalances: s, balances: c } = Fe(), { glyphApiFetch: u } = C1(), f = Et(), { chain: d } = Ya(), [p, m] = re(""), [C, w] = re(null), v = nt(() => yn({ chain: d, transport: Mr() }), [d]), [b, I] = re(at.ENTER_ADDRESS), [E, S] = re(y1), R = nt(
14259
- () => c?.tokens?.find((ee) => ee.address === y1),
14263
+ () => c?.tokens?.find((te) => te.address === y1),
14260
14264
  [c?.tokens]
14261
14265
  ), k = nt(
14262
- () => c?.tokens?.find((ee) => ee.address === E),
14266
+ () => c?.tokens?.find((te) => te.address === E),
14263
14267
  [E, c?.tokens]
14264
- ), [W, q] = re(""), [L, X] = re(Number(W)), [z, O] = re(!1), [V, T] = re(null), [U, F] = re(!1), [Z, Q] = re(!1), [J, P] = re(!1), [D, _] = re(0), [j, H] = re(null), [G, $] = re(!1), [ne, te] = re(), [le, fe] = re(!1), ve = Tn(null);
14268
+ ), [W, q] = re(""), [L, X] = re(Number(W)), [z, O] = re(!1), [V, T] = re(null), [U, F] = re(!1), [Z, Q] = re(!1), [J, P] = re(!1), [D, _] = re(0), [j, H] = re(null), [G, ee] = re(!1), [ne, $] = re(), [ae, fe] = re(!1), ve = Tn(null);
14265
14269
  pe(() => {
14266
- const ee = (ce) => {
14270
+ const te = (ce) => {
14267
14271
  ve.current && !ve.current.contains(ce.target) && fe(!1);
14268
14272
  };
14269
- return document.addEventListener("mousedown", ee), () => document.removeEventListener("mousedown", ee);
14273
+ return document.addEventListener("mousedown", te), () => document.removeEventListener("mousedown", te);
14270
14274
  }, []);
14271
14275
  const [Ne, xe] = re(), [oe, sr] = re(), [Ct, rt] = re("PENDING"), Tt = J1("SendFundView"), _e = i1.get(f) || !1;
14272
14276
  pe(() => {
14273
14277
  if (!Number(k?.value || "0"))
14274
14278
  return F(!1), H("No tokens to send");
14275
14279
  }, [k, H, F]), pe(() => {
14276
- const ee = async () => {
14280
+ const te = async () => {
14277
14281
  if (!(b !== at.ENTER_AMOUNT || Z || G) && k && L && p && E && (z || L <= Number(k?.value || 0))) {
14278
14282
  T(null), F(!0), H(null);
14279
14283
  const { maxFeePerGas: Ye } = await v.estimateFeesPerGas();
@@ -14332,8 +14336,8 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14332
14336
  }), F(!1);
14333
14337
  }
14334
14338
  };
14335
- ee();
14336
- const ce = setInterval(ee, 5e3);
14339
+ te();
14340
+ const ce = setInterval(te, 5e3);
14337
14341
  return () => clearInterval(ce);
14338
14342
  }, [
14339
14343
  L,
@@ -14354,27 +14358,27 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14354
14358
  }, [J]);
14355
14359
  const it = Pe(async () => {
14356
14360
  if (!u) return gr.error("Glyph API not ready");
14357
- _((ee) => ee + 1);
14361
+ _((te) => te + 1);
14358
14362
  try {
14359
14363
  if (!ne) throw new Error("Cannot fetch tx status for ID");
14360
- const ee = await u(`/api/widget/transactions/${ne}?chainId=${f}`);
14361
- if (!ee.ok) throw new Error("Cannot fetch tx status");
14362
- const ce = await ee.json();
14364
+ const te = await u(`/api/widget/transactions/${ne}?chainId=${f}`);
14365
+ if (!te.ok) throw new Error("Cannot fetch tx status");
14366
+ const ce = await te.json();
14363
14367
  if (rt(ce.status), xe(ce.blockExplorerUrl), sr(ce.blockExplorerName), ce.status === "PENDING") return;
14364
14368
  await a(!0), P(!1), I(at.END);
14365
- } catch (ee) {
14366
- gr.error(ee?.message);
14369
+ } catch (te) {
14370
+ gr.error(te?.message);
14367
14371
  return;
14368
14372
  }
14369
14373
  }, [f, ne, u, a]);
14370
14374
  pe(() => {
14371
14375
  if (!J) return;
14372
- const ee = setInterval(() => it(), D ? jf : 0);
14373
- return () => clearInterval(ee);
14376
+ const te = setInterval(() => it(), D ? jf : 0);
14377
+ return () => clearInterval(te);
14374
14378
  }, [J, D, it]);
14375
14379
  const yt = nt(
14376
- () => a3(500, (ee) => {
14377
- T(null), X(Number(ee));
14380
+ () => a3(500, (te) => {
14381
+ T(null), X(Number(te));
14378
14382
  }),
14379
14383
  []
14380
14384
  );
@@ -14411,7 +14415,7 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14411
14415
  content: /* @__PURE__ */ x(
14412
14416
  "div",
14413
14417
  {
14414
- className: ae(
14418
+ className: le(
14415
14419
  "gw-px-4 gw-pt-3 gw-h-full gw-flex gw-flex-col gw-justify-between gw-items-center gw-gap-3"
14416
14420
  ),
14417
14421
  children: [
@@ -14422,43 +14426,43 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14422
14426
  /* @__PURE__ */ x(
14423
14427
  "button",
14424
14428
  {
14425
- onClick: () => fe(!le),
14429
+ onClick: () => fe(!ae),
14426
14430
  disabled: !s,
14427
14431
  className: "gw-shadow-buttonMd gw-rounded-full gw-h-auto gw-p-1 gw-flex gw-items-center gw-space-x-1",
14428
14432
  children: [
14429
- /* @__PURE__ */ l(Xe, { className: ae("gw-w-6 gw-h-6 gw-mr-2", _e && pr) }),
14433
+ /* @__PURE__ */ l(Xe, { className: le("gw-w-6 gw-h-6 gw-mr-2", _e && pr) }),
14430
14434
  /* @__PURE__ */ l(F2, { className: "gw-size-4 gw-text-gray-500" })
14431
14435
  ]
14432
14436
  }
14433
14437
  ),
14434
- le && /* @__PURE__ */ l("div", { className: "gw-absolute gw-top-full gw-right-0 gw-mt-1 gw-bg-white gw-rounded-xl gw-shadow-md gw-z-50 gw-min-w-[16rem] gw-max-h-[320px] gw-overflow-y-auto", children: c?.tokens?.map?.((ee, ce) => {
14435
- if (ee?.hide) return null;
14436
- const Ye = Do[ee.symbol] || M1;
14438
+ ae && /* @__PURE__ */ l("div", { className: "gw-absolute gw-top-full gw-right-0 gw-mt-1 gw-bg-white gw-rounded-xl gw-shadow-md gw-z-50 gw-min-w-[16rem] gw-max-h-[320px] gw-overflow-y-auto", children: c?.tokens?.map?.((te, ce) => {
14439
+ if (te?.hide) return null;
14440
+ const Ye = Do[te.symbol] || M1;
14437
14441
  return /* @__PURE__ */ x("div", { children: [
14438
14442
  /* @__PURE__ */ x(
14439
14443
  "button",
14440
14444
  {
14441
14445
  onClick: () => {
14442
- q(""), O(!1), X(0), H(null), T(null), S(ee.address), fe(!1);
14446
+ q(""), O(!1), X(0), H(null), T(null), S(te.address), fe(!1);
14443
14447
  },
14444
14448
  className: "gw-w-full gw-flex gw-justify-between gw-items-center gw-p-3 hover:gw-bg-gray-50",
14445
14449
  children: [
14446
14450
  /* @__PURE__ */ x("div", { className: "gw-flex gw-items-center gw-space-x-3 gw-text-[12px]", children: [
14447
- /* @__PURE__ */ l(Ye, { className: ae("gw-w-8 gw-h-8", _e && pr) }),
14451
+ /* @__PURE__ */ l(Ye, { className: le("gw-w-8 gw-h-8", _e && pr) }),
14448
14452
  /* @__PURE__ */ x("div", { className: "gw-flex gw-flex-col gw-items-start", children: [
14449
- /* @__PURE__ */ l("span", { className: "gw-font-medium", children: ee.name }),
14450
- /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: ee.symbol })
14453
+ /* @__PURE__ */ l("span", { className: "gw-font-medium", children: te.name }),
14454
+ /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: te.symbol })
14451
14455
  ] })
14452
14456
  ] }),
14453
14457
  /* @__PURE__ */ x("div", { className: "gw-flex gw-flex-col gw-items-end gw-text-[12px]", children: [
14454
- /* @__PURE__ */ l("span", { className: "gw-font-medium", children: et(ee.amount, ee.currency) }),
14455
- /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: ee.value })
14458
+ /* @__PURE__ */ l("span", { className: "gw-font-medium", children: et(te.amount, te.currency) }),
14459
+ /* @__PURE__ */ l("span", { className: "gw-text-brand-gray-500", children: te.value })
14456
14460
  ] })
14457
14461
  ]
14458
14462
  }
14459
14463
  ),
14460
14464
  ce < (c?.tokens?.length || 0) - 1 && /* @__PURE__ */ l("div", { className: "gw-mx-3 gw-my-1 gw-h-px gw-bg-gray-200" })
14461
- ] }, ee.address);
14465
+ ] }, te.address);
14462
14466
  }) })
14463
14467
  ] })
14464
14468
  ] }),
@@ -14476,8 +14480,8 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14476
14480
  "div",
14477
14481
  {
14478
14482
  className: "gw-flex gw-flex-col gw-cursor-text gw-w-full",
14479
- onClick: (ee) => {
14480
- const ce = ee.currentTarget.querySelector("input");
14483
+ onClick: (te) => {
14484
+ const ce = te.currentTarget.querySelector("input");
14481
14485
  ce && ce.focus();
14482
14486
  },
14483
14487
  children: /* @__PURE__ */ x("div", { className: "gw-flex gw-justify-between gw-items-center gw-mt-1 gw-flex-col", children: [
@@ -14497,31 +14501,31 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14497
14501
  type: "text",
14498
14502
  max: k?.value || "0",
14499
14503
  disabled: !Number(k?.value || "0"),
14500
- onKeyDown: (ee) => {
14501
- if (ee.key === "Backspace" || ee.key === "ArrowLeft" || ee.key === "ArrowRight")
14504
+ onKeyDown: (te) => {
14505
+ if (te.key === "Backspace" || te.key === "ArrowLeft" || te.key === "ArrowRight")
14502
14506
  return;
14503
- /[0-9.]$/.test(ee.key) || ee.preventDefault(), W?.includes(".") && ee.key.includes(".") && ee.preventDefault();
14504
- const ce = ee.currentTarget, Ye = ce.value + ee.key;
14507
+ /[0-9.]$/.test(te.key) || te.preventDefault(), W?.includes(".") && te.key.includes(".") && te.preventDefault();
14508
+ const ce = te.currentTarget, Ye = ce.value + te.key;
14505
14509
  ce.max && !isNaN(parseFloat(Ye)) && parseFloat(Ye) > parseFloat(ce.max) && H(_f);
14506
14510
  },
14507
- onWheelCapture: (ee) => {
14508
- ee.currentTarget.blur();
14511
+ onWheelCapture: (te) => {
14512
+ te.currentTarget.blur();
14509
14513
  },
14510
14514
  value: W,
14511
- onChange: (ee) => {
14515
+ onChange: (te) => {
14512
14516
  const ce = l3(
14513
- ee.target.value,
14517
+ te.target.value,
14514
14518
  k?.displayDecimals || Pf
14515
14519
  );
14516
- if (!isNaN(parseFloat(ee.target.max)) && parseFloat(ce) > parseFloat(ee.target.max)) {
14520
+ if (!isNaN(parseFloat(te.target.max)) && parseFloat(ce) > parseFloat(te.target.max)) {
14517
14521
  if (G) return;
14518
- $(!0);
14522
+ ee(!0);
14519
14523
  } else
14520
- H(null), $(!1);
14524
+ H(null), ee(!1);
14521
14525
  yt(ce), q(ce), O(!1);
14522
14526
  },
14523
14527
  placeholder: "0",
14524
- className: ae(
14528
+ className: le(
14525
14529
  "gw-text-foreground gw-bg-transparent focus:gw-outline-none placeholder:gw-text-foreground gw-absolute gw-inset-0 gw-w-full gw-max-w-44",
14526
14530
  !Number(k?.value || "0") && "gw-opacity-50 gw-cursor-not-allowed"
14527
14531
  )
@@ -14540,8 +14544,8 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14540
14544
  disabled: !Number(k?.value || "0"),
14541
14545
  className: "gw-rounded-lg gw-py-1 gw-px-2 gw-h-auto gw-w-16",
14542
14546
  onClick: () => {
14543
- const ee = z ? "" : `${+(k?.value || 0) || ""}`;
14544
- q(ee), yt(ee), O((ce) => !ce);
14547
+ const te = z ? "" : `${+(k?.value || 0) || ""}`;
14548
+ q(te), yt(te), O((ce) => !ce);
14545
14549
  },
14546
14550
  children: /* @__PURE__ */ l("span", { className: "gw-typography-overline", children: z ? "Clear" : "Max" })
14547
14551
  }
@@ -14604,21 +14608,21 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14604
14608
  disabled: !s || // most likely means user just switched chains and balances haven't been loaded yet
14605
14609
  Z || U || !!j || !V || !W || +W <= 0 || (k?.value ? +W > +k.value : !1),
14606
14610
  onClick: async () => {
14607
- let ee;
14611
+ let te;
14608
14612
  Q(!0), H(null);
14609
14613
  try {
14610
14614
  if (!V?.receivable_amount)
14611
14615
  throw new Error("No receivable amount");
14612
14616
  let ce;
14613
14617
  if (E === y1)
14614
- ee = await i({
14618
+ te = await i({
14615
14619
  transaction: {
14616
14620
  to: p,
14617
14621
  value: V?.receivable_amount,
14618
14622
  maxFeePerGas: V?.maxFeePerGas,
14619
14623
  maxPriorityFeePerGas: V?.maxPriorityFeePerGas
14620
14624
  }
14621
- }), ce = typeof ee == "object" ? ee.hash : ee;
14625
+ }), ce = typeof te == "object" ? te.hash : te;
14622
14626
  else {
14623
14627
  const y = await v.simulateContract({
14624
14628
  abi: uo,
@@ -14637,14 +14641,14 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14637
14641
  functionName: "transfer",
14638
14642
  args: [p, V?.receivable_amount]
14639
14643
  });
14640
- ee = await i({
14644
+ te = await i({
14641
14645
  transaction: {
14642
14646
  to: E,
14643
14647
  data: h,
14644
14648
  maxFeePerGas: y?.request?.maxFeePerGas,
14645
14649
  maxPriorityFeePerGas: y?.request?.maxPriorityFeePerGas
14646
14650
  }
14647
- }), ce = typeof ee == "object" ? ee.hash : ee;
14651
+ }), ce = typeof te == "object" ? te.hash : te;
14648
14652
  } catch (h) {
14649
14653
  throw Tt.error("error sending txn", h), h;
14650
14654
  }
@@ -14653,7 +14657,7 @@ function $f({ onBack: e, onEnd: t, onShowActivity: r, setGradientType: n }) {
14653
14657
  (await u(`/api/widget/transactions/${ce}`, {
14654
14658
  method: "POST",
14655
14659
  body: JSON.stringify({ chainId: f })
14656
- })).ok ? (te(ce), H(null), I(at.WAIT), await a(!0)) : H("Failed to send transaction");
14660
+ })).ok ? ($(ce), H(null), I(at.WAIT), await a(!0)) : H("Failed to send transaction");
14657
14661
  } catch (ce) {
14658
14662
  Tt.error("error sending txn", ce), H("Request rejected or failed"), gr.error("Request rejected or failed");
14659
14663
  } finally {
@@ -16064,10 +16068,10 @@ function Mh(e, t = {}) {
16064
16068
  const { X: T, Y: U, Z: F } = this, { X: Z, Y: Q, Z: J } = V;
16065
16069
  let P = n.ZERO, D = n.ZERO, _ = n.ZERO;
16066
16070
  const j = i.a, H = n.mul(i.b, gn);
16067
- let G = n.mul(T, Z), $ = n.mul(U, Q), ne = n.mul(F, J), te = n.add(T, U), le = n.add(Z, Q);
16068
- te = n.mul(te, le), le = n.add(G, $), te = n.sub(te, le), le = n.add(T, F);
16071
+ let G = n.mul(T, Z), ee = n.mul(U, Q), ne = n.mul(F, J), $ = n.add(T, U), ae = n.add(Z, Q);
16072
+ $ = n.mul($, ae), ae = n.add(G, ee), $ = n.sub($, ae), ae = n.add(T, F);
16069
16073
  let fe = n.add(Z, J);
16070
- return le = n.mul(le, fe), fe = n.add(G, ne), le = n.sub(le, fe), fe = n.add(U, F), P = n.add(Q, J), fe = n.mul(fe, P), P = n.add($, ne), fe = n.sub(fe, P), _ = n.mul(j, le), P = n.mul(H, ne), _ = n.add(P, _), P = n.sub($, _), _ = n.add($, _), D = n.mul(P, _), $ = n.add(G, G), $ = n.add($, G), ne = n.mul(j, ne), le = n.mul(H, le), $ = n.add($, ne), ne = n.sub(G, ne), ne = n.mul(j, ne), le = n.add(le, ne), G = n.mul($, le), D = n.add(D, G), G = n.mul(fe, le), P = n.mul(te, P), P = n.sub(P, G), G = n.mul(te, $), _ = n.mul(fe, _), _ = n.add(_, G), new L(P, D, _);
16074
+ return ae = n.mul(ae, fe), fe = n.add(G, ne), ae = n.sub(ae, fe), fe = n.add(U, F), P = n.add(Q, J), fe = n.mul(fe, P), P = n.add(ee, ne), fe = n.sub(fe, P), _ = n.mul(j, ae), P = n.mul(H, ne), _ = n.add(P, _), P = n.sub(ee, _), _ = n.add(ee, _), D = n.mul(P, _), ee = n.add(G, G), ee = n.add(ee, G), ne = n.mul(j, ne), ae = n.mul(H, ae), ee = n.add(ee, ne), ne = n.sub(G, ne), ne = n.mul(j, ne), ae = n.add(ae, ne), G = n.mul(ee, ae), D = n.add(D, G), G = n.mul(fe, ae), P = n.mul($, P), P = n.sub(P, G), G = n.mul($, ee), _ = n.mul(fe, _), _ = n.add(_, G), new L(P, D, _);
16071
16075
  }
16072
16076
  subtract(V) {
16073
16077
  return this.add(V.negate());
@@ -16316,10 +16320,10 @@ function Bh(e, t, r = {}) {
16316
16320
  const D = J === 2 || J === 3 ? Z + s : Z;
16317
16321
  if (!i.isValid(D))
16318
16322
  throw new Error("recovery id 2 or 3 invalid");
16319
- const _ = i.toBytes(D), j = e.fromBytes(hr(p0((J & 1) === 0), _)), H = a.inv(D), G = R(lt("msgHash", U)), $ = a.create(-G * H), ne = a.create(Q * H), te = e.BASE.multiplyUnsafe($).add(j.multiplyUnsafe(ne));
16320
- if (te.is0())
16323
+ const _ = i.toBytes(D), j = e.fromBytes(hr(p0((J & 1) === 0), _)), H = a.inv(D), G = R(lt("msgHash", U)), ee = a.create(-G * H), ne = a.create(Q * H), $ = e.BASE.multiplyUnsafe(ee).add(j.multiplyUnsafe(ne));
16324
+ if ($.is0())
16321
16325
  throw new Error("point at infinify");
16322
- return te.assertValidity(), te;
16326
+ return $.assertValidity(), $;
16323
16327
  }
16324
16328
  // Signatures should be low-s, to prevent malleability.
16325
16329
  hasHighS() {
@@ -16379,27 +16383,27 @@ function Bh(e, t, r = {}) {
16379
16383
  return Nr(T, void 0, "message"), U ? Nr(t(T), void 0, "prehashed message") : T;
16380
16384
  }
16381
16385
  function L(T, U, F) {
16382
- if (["recovered", "canonical"].some(($) => $ in F))
16386
+ if (["recovered", "canonical"].some((ee) => ee in F))
16383
16387
  throw new Error("sign() legacy options not supported");
16384
16388
  const { lowS: Z, prehash: Q, extraEntropy: J } = qo(F, C);
16385
16389
  T = q(T, Q);
16386
16390
  const P = R(T), D = Hr(a, U), _ = [W(D), W(P)];
16387
16391
  if (J != null && J !== !1) {
16388
- const $ = J === !0 ? n(m.secretKey) : J;
16389
- _.push(lt("extraEntropy", $));
16392
+ const ee = J === !0 ? n(m.secretKey) : J;
16393
+ _.push(lt("extraEntropy", ee));
16390
16394
  }
16391
16395
  const j = hr(..._), H = P;
16392
- function G($) {
16393
- const ne = S($);
16396
+ function G(ee) {
16397
+ const ne = S(ee);
16394
16398
  if (!a.isValidNot0(ne))
16395
16399
  return;
16396
- const te = a.inv(ne), le = e.BASE.multiply(ne).toAffine(), fe = a.create(le.x);
16400
+ const $ = a.inv(ne), ae = e.BASE.multiply(ne).toAffine(), fe = a.create(ae.x);
16397
16401
  if (fe === $t)
16398
16402
  return;
16399
- const ve = a.create(te * a.create(H + fe * D));
16403
+ const ve = a.create($ * a.create(H + fe * D));
16400
16404
  if (ve === $t)
16401
16405
  return;
16402
- let Ne = (le.x === fe ? 0 : 2) | Number(le.y & t1), xe = ve;
16406
+ let Ne = (ae.x === fe ? 0 : 2) | Number(ae.y & t1), xe = ve;
16403
16407
  return Z && v(ve) && (xe = a.neg(ve), Ne ^= 1), new E(fe, xe, Ne);
16404
16408
  }
16405
16409
  return { seed: j, k2sig: G };
@@ -16443,8 +16447,8 @@ function Bh(e, t, r = {}) {
16443
16447
  const _ = e.fromBytes(F);
16444
16448
  if (Q && D.hasHighS())
16445
16449
  return !1;
16446
- const { r: j, s: H } = D, G = R(U), $ = a.inv(H), ne = a.create(G * $), te = a.create(j * $), le = e.BASE.multiplyUnsafe(ne).add(_.multiplyUnsafe(te));
16447
- return le.is0() ? !1 : a.create(le.x) === j;
16450
+ const { r: j, s: H } = D, G = R(U), ee = a.inv(H), ne = a.create(G * ee), $ = a.create(j * ee), ae = e.BASE.multiplyUnsafe(ne).add(_.multiplyUnsafe($));
16451
+ return ae.is0() ? !1 : a.create(ae.x) === j;
16448
16452
  } catch {
16449
16453
  return !1;
16450
16454
  }
@@ -17269,7 +17273,7 @@ function Hh() {
17269
17273
  (!h || h < 0) && (h = 0), (!g || g < 0 || g > A) && (g = A);
17270
17274
  let M = "";
17271
17275
  for (let K = h; K < g; ++K)
17272
- M += ee[y[K]];
17276
+ M += te[y[K]];
17273
17277
  return M;
17274
17278
  }
17275
17279
  function P(y, h, g) {
@@ -17460,13 +17464,13 @@ function Hh() {
17460
17464
  if (g + A > y.length) throw new RangeError("Index out of range");
17461
17465
  if (g < 0) throw new RangeError("Index out of range");
17462
17466
  }
17463
- function $(y, h, g, A, M) {
17467
+ function ee(y, h, g, A, M) {
17464
17468
  return h = +h, g = g >>> 0, M || G(y, h, g, 4), r.write(y, h, g, A, 23, 4), g + 4;
17465
17469
  }
17466
17470
  s.prototype.writeFloatLE = function(h, g, A) {
17467
- return $(this, h, g, !0, A);
17471
+ return ee(this, h, g, !0, A);
17468
17472
  }, s.prototype.writeFloatBE = function(h, g, A) {
17469
- return $(this, h, g, !1, A);
17473
+ return ee(this, h, g, !1, A);
17470
17474
  };
17471
17475
  function ne(y, h, g, A, M) {
17472
17476
  return h = +h, g = g >>> 0, M || G(y, h, g, 8), r.write(y, h, g, A, 52, 8), g + 8;
@@ -17518,9 +17522,9 @@ function Hh() {
17518
17522
  }
17519
17523
  return this;
17520
17524
  };
17521
- const te = {};
17522
- function le(y, h, g) {
17523
- te[y] = class extends g {
17525
+ const $ = {};
17526
+ function ae(y, h, g) {
17527
+ $[y] = class extends g {
17524
17528
  constructor() {
17525
17529
  super(), Object.defineProperty(this, "message", {
17526
17530
  value: h.apply(this, arguments),
@@ -17544,19 +17548,19 @@ function Hh() {
17544
17548
  }
17545
17549
  };
17546
17550
  }
17547
- le(
17551
+ ae(
17548
17552
  "ERR_BUFFER_OUT_OF_BOUNDS",
17549
17553
  function(y) {
17550
17554
  return y ? `${y} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
17551
17555
  },
17552
17556
  RangeError
17553
- ), le(
17557
+ ), ae(
17554
17558
  "ERR_INVALID_ARG_TYPE",
17555
17559
  function(y, h) {
17556
17560
  return `The "${y}" argument must be of type number. Received type ${typeof h}`;
17557
17561
  },
17558
17562
  TypeError
17559
- ), le(
17563
+ ), ae(
17560
17564
  "ERR_OUT_OF_RANGE",
17561
17565
  function(y, h, g) {
17562
17566
  let A = `The value of "${y}" is out of range.`, M = g;
@@ -17578,16 +17582,16 @@ function Hh() {
17578
17582
  if (y > g || y < h) {
17579
17583
  const Y = typeof h == "bigint" ? "n" : "";
17580
17584
  let ue;
17581
- throw h === 0 || h === BigInt(0) ? ue = `>= 0${Y} and < 2${Y} ** ${(K + 1) * 8}${Y}` : ue = `>= -(2${Y} ** ${(K + 1) * 8 - 1}${Y}) and < 2 ** ${(K + 1) * 8 - 1}${Y}`, new te.ERR_OUT_OF_RANGE("value", ue, y);
17585
+ throw h === 0 || h === BigInt(0) ? ue = `>= 0${Y} and < 2${Y} ** ${(K + 1) * 8}${Y}` : ue = `>= -(2${Y} ** ${(K + 1) * 8 - 1}${Y}) and < 2 ** ${(K + 1) * 8 - 1}${Y}`, new $.ERR_OUT_OF_RANGE("value", ue, y);
17582
17586
  }
17583
17587
  ve(A, M, K);
17584
17588
  }
17585
17589
  function xe(y, h) {
17586
17590
  if (typeof y != "number")
17587
- throw new te.ERR_INVALID_ARG_TYPE(h, "number", y);
17591
+ throw new $.ERR_INVALID_ARG_TYPE(h, "number", y);
17588
17592
  }
17589
17593
  function oe(y, h, g) {
17590
- throw Math.floor(y) !== y ? (xe(y, g), new te.ERR_OUT_OF_RANGE("offset", "an integer", y)) : h < 0 ? new te.ERR_BUFFER_OUT_OF_BOUNDS() : new te.ERR_OUT_OF_RANGE(
17594
+ throw Math.floor(y) !== y ? (xe(y, g), new $.ERR_OUT_OF_RANGE("offset", "an integer", y)) : h < 0 ? new $.ERR_BUFFER_OUT_OF_BOUNDS() : new $.ERR_OUT_OF_RANGE(
17591
17595
  "offset",
17592
17596
  `>= 0 and <= ${h}`,
17593
17597
  y
@@ -17682,7 +17686,7 @@ function Hh() {
17682
17686
  function Xe(y) {
17683
17687
  return y !== y;
17684
17688
  }
17685
- const ee = (function() {
17689
+ const te = (function() {
17686
17690
  const y = "0123456789abcdef", h = new Array(256);
17687
17691
  for (let g = 0; g < 16; ++g) {
17688
17692
  const A = g * 16;
@@ -17921,8 +17925,8 @@ var _h = /* @__PURE__ */ Qt(Cr, 9, 0), $h = /* @__PURE__ */ Qt(Cr, 9, 1), eg = /
17921
17925
  var z = j - 257, G = ao[z];
17922
17926
  H = Nt(e, d, (1 << G) - 1) + v0[z], d += G;
17923
17927
  }
17924
- var $ = C[Oo(e, d) & D], ne = $ >> 4;
17925
- $ || Rt(3), d += $ & 15;
17928
+ var ee = C[Oo(e, d) & D], ne = ee >> 4;
17929
+ ee || Rt(3), d += ee & 15;
17926
17930
  var J = jh[ne];
17927
17931
  if (ne > 3) {
17928
17932
  var G = lo[ne];
@@ -17933,13 +17937,13 @@ var _h = /* @__PURE__ */ Qt(Cr, 9, 0), $h = /* @__PURE__ */ Qt(Cr, 9, 1), eg = /
17933
17937
  break;
17934
17938
  }
17935
17939
  s && u(p + 131072);
17936
- var te = p + H;
17940
+ var $ = p + H;
17937
17941
  if (p < J) {
17938
- var le = i - J, fe = Math.min(J, te);
17939
- for (le + p < 0 && Rt(3); p < fe; ++p)
17940
- r[p] = n[le + p];
17942
+ var ae = i - J, fe = Math.min(J, $);
17943
+ for (ae + p < 0 && Rt(3); p < fe; ++p)
17944
+ r[p] = n[ae + p];
17941
17945
  }
17942
- for (; p < te; ++p)
17946
+ for (; p < $; ++p)
17943
17947
  r[p] = r[p - J];
17944
17948
  }
17945
17949
  }
@@ -18061,8 +18065,8 @@ var _h = /* @__PURE__ */ Qt(Cr, 9, 0), $h = /* @__PURE__ */ Qt(Cr, 9, 1), eg = /
18061
18065
  if (G > 255) {
18062
18066
  var H = G >> 18 & 31;
18063
18067
  N1(t, f, F[H + 257]), f += Z[H + 257], H > 7 && (Xt(t, f, G >> 23 & 31), f += ao[H]);
18064
- var $ = G & 31;
18065
- N1(t, f, Q[$]), f += J[$], $ > 3 && (N1(t, f, G >> 5 & 8191), f += lo[$]);
18068
+ var ee = G & 31;
18069
+ N1(t, f, Q[ee]), f += J[ee], ee > 3 && (N1(t, f, G >> 5 & 8191), f += lo[ee]);
18066
18070
  } else
18067
18071
  N1(t, f, F[G]), f += Z[G];
18068
18072
  }
@@ -18093,9 +18097,9 @@ var _h = /* @__PURE__ */ Qt(Cr, 9, 0), $h = /* @__PURE__ */ Qt(Cr, 9, 1), eg = /
18093
18097
  if (G > Q) {
18094
18098
  if (Q = G, J = D, G > _)
18095
18099
  break;
18096
- for (var $ = Math.min(D, G - 2), ne = 0, Z = 0; Z < $; ++Z) {
18097
- var te = L - D + Z & 32767, le = w[te], fe = te - le & 32767;
18098
- fe > ne && (ne = fe, U = te);
18100
+ for (var ee = Math.min(D, G - 2), ne = 0, Z = 0; Z < ee; ++Z) {
18101
+ var $ = L - D + Z & 32767, ae = w[$], fe = $ - ae & 32767;
18102
+ fe > ne && (ne = fe, U = $);
18099
18103
  }
18100
18104
  }
18101
18105
  }