@agg-build/ui 1.0.0 → 1.0.1

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.
Files changed (56) hide show
  1. package/dist/{chunk-2QJXRRYP.mjs → chunk-43K4PFBC.mjs} +3 -2
  2. package/dist/{chunk-I2WBGEWK.mjs → chunk-5ES2VJHO.mjs} +159 -93
  3. package/dist/{chunk-DMKKNK76.mjs → chunk-BYMLPLEZ.mjs} +791 -583
  4. package/dist/{chunk-C7T56TJR.mjs → chunk-HD6HBTK2.mjs} +1 -1
  5. package/dist/{chunk-CGNDMLQL.mjs → chunk-LPNZOX3E.mjs} +123 -52
  6. package/dist/{chunk-75IGOQ4N.mjs → chunk-WLXYCBZV.mjs} +62 -32
  7. package/dist/{chunk-6NS7D73S.mjs → chunk-YZNO6IUD.mjs} +740 -521
  8. package/dist/events.js +196 -93
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +3396 -2806
  11. package/dist/index.mjs +13 -7
  12. package/dist/modals.js +798 -535
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +378 -176
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +713 -531
  17. package/dist/primitives.mjs +7 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +242 -54
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/deposit/steps/card-payment-pending.d.mts +3 -1
  23. package/dist/types/deposit/steps/card-payment-pending.d.ts +3 -1
  24. package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -1
  25. package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -1
  26. package/dist/types/events/item/event-list-item.utils.d.mts +57 -0
  27. package/dist/types/events/item/event-list-item.utils.d.ts +57 -0
  28. package/dist/types/events/item-details/event-list-item-details.types.d.mts +16 -1
  29. package/dist/types/events/item-details/event-list-item-details.types.d.ts +16 -1
  30. package/dist/types/events/market-details/market-details.types.d.mts +8 -0
  31. package/dist/types/events/market-details/market-details.types.d.ts +8 -0
  32. package/dist/types/primitives/copy-button/index.d.mts +25 -0
  33. package/dist/types/primitives/copy-button/index.d.ts +25 -0
  34. package/dist/types/primitives/index.d.mts +2 -0
  35. package/dist/types/primitives/index.d.ts +2 -0
  36. package/dist/types/primitives/toast/index.d.mts +4 -0
  37. package/dist/types/primitives/toast/index.d.ts +4 -0
  38. package/dist/types/primitives/toast/toast.types.d.mts +31 -0
  39. package/dist/types/primitives/toast/toast.types.d.ts +31 -0
  40. package/dist/types/trading/place-order/index.place-order.constants.d.mts +8 -0
  41. package/dist/types/trading/place-order/index.place-order.constants.d.ts +8 -0
  42. package/dist/types/trading/place-order/index.place-order.types.d.mts +6 -0
  43. package/dist/types/trading/place-order/index.place-order.types.d.ts +6 -0
  44. package/dist/types/trading/place-order/index.place-order.utils.d.mts +4 -7
  45. package/dist/types/trading/place-order/index.place-order.utils.d.ts +4 -7
  46. package/dist/types/withdraw/index.d.mts +2 -2
  47. package/dist/types/withdraw/index.d.ts +2 -2
  48. package/dist/types/withdraw/steps/withdraw-amount.d.mts +6 -3
  49. package/dist/types/withdraw/steps/withdraw-amount.d.ts +6 -3
  50. package/dist/types/withdraw/steps/withdraw-success.d.mts +8 -1
  51. package/dist/types/withdraw/steps/withdraw-success.d.ts +8 -1
  52. package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +36 -0
  53. package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +36 -0
  54. package/dist/types/withdraw/withdraw-modal.types.d.mts +25 -15
  55. package/dist/types/withdraw/withdraw-modal.types.d.ts +25 -15
  56. package/package.json +6 -5
@@ -10,7 +10,7 @@ import {
10
10
  ChevronLeftIcon,
11
11
  ChevronRightIcon,
12
12
  CloseIcon,
13
- CopyIcon,
13
+ CopyButton,
14
14
  CreateAccountIcon,
15
15
  CreditCardIcon,
16
16
  DocumentIcon,
@@ -37,11 +37,12 @@ import {
37
37
  __spreadValues,
38
38
  cn,
39
39
  formatCompactUsd,
40
+ getMotionClassName,
40
41
  venueLogoLabels
41
- } from "./chunk-6NS7D73S.mjs";
42
+ } from "./chunk-YZNO6IUD.mjs";
42
43
 
43
44
  // src/deposit/index.tsx
44
- import { useEffect as useEffect3, useMemo, useRef, useState as useState3 } from "react";
45
+ import { useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
45
46
  import { useAggAuthState, useAggUiConfig, useDepositAddresses, useLabels as useLabels10 } from "@agg-build/hooks";
46
47
  import { SVM_CHAIN_IDS, useDepositFlow } from "@agg-build/hooks/deposit";
47
48
 
@@ -462,7 +463,6 @@ var CardDepositStep = ({
462
463
  };
463
464
 
464
465
  // src/deposit/steps/crypto-transfer.tsx
465
- import { useState as useState2, useCallback } from "react";
466
466
  import { useLabels as useLabels3 } from "@agg-build/hooks";
467
467
 
468
468
  // src/deposit/components/DepositQRCode.tsx
@@ -556,12 +556,6 @@ var CryptoTransferStep = ({
556
556
  }) => {
557
557
  var _a;
558
558
  const labels = useLabels3();
559
- const [isCopied, setIsCopied] = useState2(false);
560
- const handleCopy = useCallback(() => {
561
- onCopyAddress();
562
- setIsCopied(true);
563
- window.setTimeout(() => setIsCopied(false), 2e3);
564
- }, [onCopyAddress]);
565
559
  const selectedNetworkOption = networkOptions.find((n) => n.value === selectedNetwork);
566
560
  const networkLogoUrl = (_a = selectedNetworkOption == null ? void 0 : selectedNetworkOption.iconUrl) != null ? _a : "";
567
561
  const networkLogo = selectedNetworkOption == null ? void 0 : selectedNetworkOption.icon;
@@ -622,17 +616,15 @@ var CryptoTransferStep = ({
622
616
  /* @__PURE__ */ jsx4("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.deposit.sendCrypto.depositAddressLabel }),
623
617
  /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 rounded border border-agg-separator bg-agg-secondary h-10 px-3", children: [
624
618
  isLoadingAddress ? /* @__PURE__ */ jsx4("div", { className: "h-4 flex-1 animate-pulse rounded bg-agg-muted-foreground/20" }) : /* @__PURE__ */ jsx4("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: depositAddress }),
625
- /* @__PURE__ */ jsxs4(
626
- "button",
619
+ /* @__PURE__ */ jsx4(
620
+ CopyButton,
627
621
  {
628
- type: "button",
622
+ value: depositAddress,
623
+ label: labels.deposit.sendCrypto.copy,
624
+ copiedLabel: labels.deposit.sendCrypto.copied,
629
625
  disabled: isLoadingAddress || !!addressError || !depositAddress,
630
- className: "shrink-0 inline-flex items-center gap-1 text-agg-primary hover:text-agg-primary/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
631
- onClick: handleCopy,
632
- children: [
633
- isCopied ? /* @__PURE__ */ jsx4(CheckCircleIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx4(CopyIcon, { className: "h-4 w-4" }),
634
- /* @__PURE__ */ jsx4("span", { className: "agg-type-label-strong", children: isCopied ? labels.deposit.sendCrypto.copied : labels.deposit.sendCrypto.copy })
635
- ]
626
+ onCopy: onCopyAddress,
627
+ className: "text-agg-primary hover:text-agg-primary/80"
636
628
  }
637
629
  )
638
630
  ] }),
@@ -924,6 +916,7 @@ import { useLabels as useLabels6 } from "@agg-build/hooks";
924
916
  import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
925
917
  var CardPaymentPendingStep = ({
926
918
  providerName,
919
+ walletAddress,
927
920
  onClose,
928
921
  onViewActivity,
929
922
  onChooseAnotherProvider
@@ -946,6 +939,20 @@ var CardPaymentPendingStep = ({
946
939
  /* @__PURE__ */ jsx7("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.deposit.cardFlow.pendingTitle(providerName) }),
947
940
  /* @__PURE__ */ jsx7("p", { className: "agg-type-body text-agg-foreground", children: labels.deposit.cardFlow.pendingDescription })
948
941
  ] }),
942
+ walletAddress ? /* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col items-center gap-3 rounded-agg-md bg-agg-secondary-hover p-5", children: [
943
+ /* @__PURE__ */ jsx7("p", { className: "agg-type-label text-agg-foreground w-full", children: labels.deposit.cardFlow.pendingWalletAddressHelp }),
944
+ /* @__PURE__ */ jsxs7("div", { className: "flex w-full h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 py-[10px]", children: [
945
+ /* @__PURE__ */ jsx7("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: walletAddress }),
946
+ /* @__PURE__ */ jsx7(
947
+ CopyButton,
948
+ {
949
+ value: walletAddress,
950
+ "aria-label": labels.deposit.cardFlow.pendingCopyAddress,
951
+ className: "text-agg-muted-foreground hover:text-agg-foreground"
952
+ }
953
+ )
954
+ ] })
955
+ ] }) : null,
949
956
  /* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-center gap-3", children: [
950
957
  /* @__PURE__ */ jsx7(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onClose, children: labels.common.close }),
951
958
  /* @__PURE__ */ jsx7(Button, { variant: "primary", size: "large", onClick: onViewActivity, children: labels.deposit.cardFlow.viewActivity })
@@ -1189,27 +1196,28 @@ function DepositModalControlled({
1189
1196
  const { walletActions } = useAggUiConfig();
1190
1197
  const labels = useLabels10();
1191
1198
  const defaultMethod = isWeb3User ? "wallet" : "crypto";
1192
- const [step, setStep] = useState3(
1199
+ const [step, setStep] = useState2(
1193
1200
  () => pendingCardPurchaseSummary ? "card-success" : "method"
1194
1201
  );
1195
- const [highlightedMethod, setHighlightedMethod] = useState3(defaultMethod);
1202
+ const [highlightedMethod, setHighlightedMethod] = useState2(defaultMethod);
1196
1203
  const walletSubmitInFlightRef = useRef(false);
1197
- const [isWalletSubmitting, setIsWalletSubmitting] = useState3(false);
1198
- const [cardProviders, setCardProviders] = useState3([]);
1199
- const [quotesLoading, setQuotesLoading] = useState3(false);
1200
- const [quotesError, setQuotesError] = useState3(null);
1201
- const [sessionError, setSessionError] = useState3(null);
1202
- const [pendingProviderName, setPendingProviderName] = useState3("");
1204
+ const [isWalletSubmitting, setIsWalletSubmitting] = useState2(false);
1205
+ const [cardProviders, setCardProviders] = useState2([]);
1206
+ const [quotesLoading, setQuotesLoading] = useState2(false);
1207
+ const [quotesError, setQuotesError] = useState2(null);
1208
+ const [sessionError, setSessionError] = useState2(null);
1209
+ const [pendingProviderName, setPendingProviderName] = useState2("");
1210
+ const [pendingProviderWalletAddress, setPendingProviderWalletAddress] = useState2("");
1203
1211
  useEffect3(() => {
1204
1212
  if (pendingCardPurchaseSummary) {
1205
1213
  clearPendingCardSession();
1206
1214
  setStep("card-success");
1207
1215
  }
1208
1216
  }, [pendingCardPurchaseSummary]);
1209
- const [walletChainId, setWalletChainId] = useState3("");
1210
- const [walletToken, setWalletToken] = useState3("");
1211
- const [sendChainId, setSendChainId] = useState3("");
1212
- const [sendToken, setSendToken] = useState3("");
1217
+ const [walletChainId, setWalletChainId] = useState2("");
1218
+ const [walletToken, setWalletToken] = useState2("");
1219
+ const [sendChainId, setSendChainId] = useState2("");
1220
+ const [sendToken, setSendToken] = useState2("");
1213
1221
  const {
1214
1222
  isReady,
1215
1223
  isTimedOut,
@@ -1373,6 +1381,7 @@ function DepositModalControlled({
1373
1381
  });
1374
1382
  window.open(session.widgetUrl, "_blank", "noopener,noreferrer");
1375
1383
  setPendingProviderName((_m = selectedProvider == null ? void 0 : selectedProvider.name) != null ? _m : providerId);
1384
+ setPendingProviderWalletAddress(depositAddr);
1376
1385
  setStep("card-payment-pending");
1377
1386
  } catch (err) {
1378
1387
  setSessionError(err instanceof Error ? err.message : "Failed to create session");
@@ -1390,6 +1399,7 @@ function DepositModalControlled({
1390
1399
  setQuotesError(null);
1391
1400
  setSessionError(null);
1392
1401
  setPendingProviderName("");
1402
+ setPendingProviderWalletAddress("");
1393
1403
  setStep("card-deposit");
1394
1404
  };
1395
1405
  const handleDoneCryptoTransfer = () => {
@@ -1419,6 +1429,7 @@ function DepositModalControlled({
1419
1429
  setQuotesError(null);
1420
1430
  setSessionError(null);
1421
1431
  setPendingProviderName("");
1432
+ setPendingProviderWalletAddress("");
1422
1433
  clearPendingCardSession();
1423
1434
  }
1424
1435
  onOpenChange(isOpen);
@@ -1559,6 +1570,7 @@ function DepositModalControlled({
1559
1570
  CardPaymentPendingStep,
1560
1571
  {
1561
1572
  providerName: pendingProviderName,
1573
+ walletAddress: pendingProviderWalletAddress || void 0,
1562
1574
  onClose: () => handleOpenChange(false),
1563
1575
  onViewActivity: handleViewActivity,
1564
1576
  onChooseAnotherProvider: handleChooseAnotherProvider
@@ -1595,11 +1607,6 @@ function DepositModalControlled({
1595
1607
  setSendChainId(id);
1596
1608
  setSendToken("");
1597
1609
  },
1598
- onCopyAddress: () => {
1599
- var _a2;
1600
- if (depositAddress) (_a2 = navigator.clipboard) == null ? void 0 : _a2.writeText(depositAddress).catch(() => {
1601
- });
1602
- },
1603
1610
  onDone: handleDoneCryptoTransfer
1604
1611
  }
1605
1612
  ) : null
@@ -1614,42 +1621,12 @@ var DepositModal = (props) => {
1614
1621
  DepositModal.displayName = "DepositModal";
1615
1622
 
1616
1623
  // src/withdraw/index.tsx
1617
- import { useMemo as useMemo2, useState as useState4 } from "react";
1624
+ import { useEffect as useEffect5, useState as useState4 } from "react";
1625
+ import { useWithdrawFlow } from "@agg-build/hooks/withdraw";
1618
1626
 
1619
1627
  // src/withdraw/steps/withdraw-method.tsx
1620
1628
  import { useLabels as useLabels11 } from "@agg-build/hooks";
1621
1629
  import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1622
- var WithdrawMethodCard = ({
1623
- icon,
1624
- title,
1625
- description,
1626
- onContinue
1627
- }) => /* @__PURE__ */ jsxs12(
1628
- "div",
1629
- {
1630
- className: cn(
1631
- "flex items-center gap-3 sm:gap-4 rounded-xl border border-agg-separator bg-agg-secondary p-3 sm:p-4",
1632
- "hover:bg-agg-secondary-hover transition-colors cursor-pointer"
1633
- ),
1634
- role: "button",
1635
- tabIndex: 0,
1636
- onClick: onContinue,
1637
- onKeyDown: (e) => {
1638
- if (e.key === "Enter" || e.key === " ") {
1639
- e.preventDefault();
1640
- onContinue();
1641
- }
1642
- },
1643
- children: [
1644
- /* @__PURE__ */ jsx12("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: icon }),
1645
- /* @__PURE__ */ jsxs12("div", { className: "flex-1 min-w-0", children: [
1646
- /* @__PURE__ */ jsx12("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
1647
- /* @__PURE__ */ jsx12("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
1648
- ] }),
1649
- /* @__PURE__ */ jsx12("div", { className: "shrink-0 text-agg-muted-foreground", children: /* @__PURE__ */ jsx12(ChevronRightIcon, { className: "h-5 w-5" }) })
1650
- ]
1651
- }
1652
- );
1653
1630
  var WithdrawMethodStep = ({
1654
1631
  balance,
1655
1632
  onSelectMethod
@@ -1663,13 +1640,30 @@ var WithdrawMethodStep = ({
1663
1640
  " ",
1664
1641
  formatCompactUsd(balance)
1665
1642
  ] }),
1666
- /* @__PURE__ */ jsx12(
1667
- WithdrawMethodCard,
1643
+ /* @__PURE__ */ jsxs12(
1644
+ "div",
1668
1645
  {
1669
- icon: /* @__PURE__ */ jsx12(CreditCardIcon, { className: "h-6 w-6 text-agg-muted-foreground" }),
1670
- title: labels.withdraw.methods.cardTitle,
1671
- description: labels.withdraw.methods.cardDescription,
1672
- onContinue: () => onSelectMethod("card")
1646
+ className: cn(
1647
+ "flex items-center gap-3 sm:gap-4 rounded-xl border border-agg-separator bg-agg-secondary p-3 sm:p-4",
1648
+ "hover:bg-agg-secondary-hover transition-colors cursor-pointer"
1649
+ ),
1650
+ role: "button",
1651
+ tabIndex: 0,
1652
+ onClick: () => onSelectMethod("wallet"),
1653
+ onKeyDown: (e) => {
1654
+ if (e.key === "Enter" || e.key === " ") {
1655
+ e.preventDefault();
1656
+ onSelectMethod("wallet");
1657
+ }
1658
+ },
1659
+ children: [
1660
+ /* @__PURE__ */ jsx12("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: /* @__PURE__ */ jsx12(WalletIcon, { className: "h-6 w-6 text-agg-muted-foreground" }) }),
1661
+ /* @__PURE__ */ jsxs12("div", { className: "flex-1 min-w-0", children: [
1662
+ /* @__PURE__ */ jsx12("p", { className: "agg-type-body-strong text-agg-foreground", children: labels.withdraw.methods.walletTitle }),
1663
+ /* @__PURE__ */ jsx12("p", { className: "agg-type-label text-agg-muted-foreground", children: labels.withdraw.methods.walletDescription })
1664
+ ] }),
1665
+ /* @__PURE__ */ jsx12("div", { className: "shrink-0 text-agg-muted-foreground", children: /* @__PURE__ */ jsx12(ChevronRightIcon, { className: "h-5 w-5" }) })
1666
+ ]
1673
1667
  }
1674
1668
  )
1675
1669
  ] }) })
@@ -1681,26 +1675,34 @@ import { useLabels as useLabels12 } from "@agg-build/hooks";
1681
1675
  import { Fragment as Fragment8, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
1682
1676
  var WithdrawAmountStep = ({
1683
1677
  amount,
1684
- currency,
1685
1678
  destinationWallet,
1679
+ balanceDisplay,
1686
1680
  tokenOptions,
1687
1681
  networkOptions,
1688
1682
  selectedToken,
1689
1683
  selectedNetwork,
1684
+ isConfirming = false,
1685
+ error,
1690
1686
  onBack,
1691
1687
  onAmountChange,
1692
- onCurrencyChange,
1688
+ onDestinationChange,
1693
1689
  onTokenChange,
1694
1690
  onNetworkChange,
1691
+ onMaxClick,
1695
1692
  onContinue
1696
1693
  }) => {
1697
1694
  const labels = useLabels12();
1698
- const isValid = Number(amount) > 0;
1695
+ const SOLANA_CHAIN_ID = "792703809";
1696
+ const isSolanaDest = selectedNetwork === SOLANA_CHAIN_ID;
1697
+ const trimmedDestination = destinationWallet.trim();
1698
+ const isValidAddress = isSolanaDest ? /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(trimmedDestination) : /^0x[a-fA-F0-9]{40}$/.test(trimmedDestination);
1699
+ const isValid = Number(amount) > 0 && isValidAddress;
1700
+ const isDisabled = !isValid || isConfirming;
1699
1701
  return /* @__PURE__ */ jsxs13(Fragment8, { children: [
1700
1702
  /* @__PURE__ */ jsx13(
1701
1703
  Modal.Header,
1702
1704
  {
1703
- title: labels.withdraw.cardFlow.title,
1705
+ title: labels.withdraw.walletFlow.title,
1704
1706
  hideBorder: true,
1705
1707
  leftElement: /* @__PURE__ */ jsx13(
1706
1708
  "button",
@@ -1708,323 +1710,529 @@ var WithdrawAmountStep = ({
1708
1710
  type: "button",
1709
1711
  className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
1710
1712
  onClick: onBack,
1711
- "aria-label": "Go back",
1713
+ "aria-label": labels.withdraw.back,
1712
1714
  children: /* @__PURE__ */ jsx13(ChevronLeftIcon, { className: "h-6 w-6" })
1713
1715
  }
1714
1716
  )
1715
1717
  }
1716
1718
  ),
1717
1719
  /* @__PURE__ */ jsx13(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-5", children: [
1718
- /* @__PURE__ */ jsxs13("div", { className: "flex gap-3 items-end", children: [
1719
- /* @__PURE__ */ jsxs13("div", { className: "flex-1 flex flex-col gap-2", children: [
1720
- /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.amountLabel }),
1721
- /* @__PURE__ */ jsxs13("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3", children: [
1722
- /* @__PURE__ */ jsx13(
1723
- "input",
1724
- {
1725
- type: "text",
1726
- inputMode: "decimal",
1727
- "aria-label": labels.withdraw.cardFlow.amountLabel,
1728
- className: cn(
1729
- "agg-type-body w-full bg-transparent outline-none",
1730
- isValid ? "text-agg-foreground" : "text-agg-muted-foreground"
1731
- ),
1732
- placeholder: "0.00",
1733
- value: amount,
1734
- onChange: (event) => onAmountChange(event.target.value)
1735
- }
1736
- ),
1737
- /* @__PURE__ */ jsx13("span", { className: "agg-type-body text-agg-muted-foreground", children: "$" })
1738
- ] })
1739
- ] }),
1740
- /* @__PURE__ */ jsx13("div", { className: "w-[100px]", children: /* @__PURE__ */ jsx13(
1741
- Select,
1720
+ /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2", children: [
1721
+ /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.recipientAddressLabel }),
1722
+ /* @__PURE__ */ jsx13(
1723
+ "input",
1742
1724
  {
1743
- items: [{ value: currency, label: currency }],
1744
- value: currency,
1745
- onChange: onCurrencyChange,
1746
- ariaLabel: labels.withdraw.cardFlow.currencyLabel
1725
+ type: "text",
1726
+ "aria-label": labels.withdraw.walletFlow.recipientAddressLabel,
1727
+ className: cn(
1728
+ "agg-type-body w-full h-10 rounded border border-agg-separator bg-agg-secondary px-3 outline-none",
1729
+ "text-agg-foreground placeholder:text-agg-muted-foreground",
1730
+ "focus:border-agg-primary transition-colors"
1731
+ ),
1732
+ placeholder: isSolanaDest ? "FwR3..." : "0x971d...",
1733
+ value: destinationWallet,
1734
+ onChange: (e) => onDestinationChange(e.target.value)
1747
1735
  }
1748
- ) })
1736
+ )
1749
1737
  ] }),
1750
- /* @__PURE__ */ jsxs13("div", { className: "flex gap-5", children: [
1738
+ /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2", children: [
1739
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between", children: [
1740
+ /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.amountLabel }),
1741
+ /* @__PURE__ */ jsx13("p", { className: "agg-type-label text-agg-muted-foreground", children: balanceDisplay })
1742
+ ] }),
1743
+ /* @__PURE__ */ jsxs13("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 focus-within:border-agg-primary transition-colors", children: [
1744
+ /* @__PURE__ */ jsx13(
1745
+ "input",
1746
+ {
1747
+ type: "text",
1748
+ inputMode: "decimal",
1749
+ "aria-label": labels.withdraw.walletFlow.amountLabel,
1750
+ className: cn(
1751
+ "agg-type-body flex-1 min-w-0 bg-transparent outline-none",
1752
+ Number(amount) > 0 ? "text-agg-foreground" : "text-agg-muted-foreground"
1753
+ ),
1754
+ placeholder: "0.00",
1755
+ value: amount,
1756
+ onChange: (e) => onAmountChange(e.target.value)
1757
+ }
1758
+ ),
1759
+ /* @__PURE__ */ jsx13("span", { className: "agg-type-body text-agg-muted-foreground shrink-0", children: selectedToken }),
1760
+ onMaxClick ? /* @__PURE__ */ jsx13(
1761
+ "button",
1762
+ {
1763
+ type: "button",
1764
+ className: "agg-type-label-strong text-agg-primary hover:opacity-80 transition-opacity cursor-pointer shrink-0",
1765
+ onClick: onMaxClick,
1766
+ children: labels.withdraw.walletFlow.max
1767
+ }
1768
+ ) : null
1769
+ ] })
1770
+ ] }),
1771
+ /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3 sm:flex-row sm:gap-5", children: [
1751
1772
  /* @__PURE__ */ jsxs13("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
1752
- /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.tokenLabel }),
1773
+ /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.tokenLabel }),
1753
1774
  /* @__PURE__ */ jsx13(
1754
1775
  Select,
1755
1776
  {
1756
1777
  items: tokenOptions,
1757
1778
  value: selectedToken,
1758
1779
  onChange: onTokenChange,
1759
- ariaLabel: labels.withdraw.cardFlow.tokenLabel
1780
+ ariaLabel: labels.withdraw.walletFlow.tokenLabel
1760
1781
  }
1761
1782
  )
1762
1783
  ] }),
1763
1784
  /* @__PURE__ */ jsxs13("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
1764
- /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.networkLabel }),
1785
+ /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.networkLabel }),
1765
1786
  /* @__PURE__ */ jsx13(
1766
1787
  Select,
1767
1788
  {
1768
1789
  items: networkOptions,
1769
1790
  value: selectedNetwork,
1770
1791
  onChange: onNetworkChange,
1771
- ariaLabel: labels.withdraw.cardFlow.networkLabel
1792
+ ariaLabel: labels.withdraw.walletFlow.networkLabel
1772
1793
  }
1773
1794
  )
1774
1795
  ] })
1775
1796
  ] }),
1776
- /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2", children: [
1777
- /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.cardFlow.destinationWalletLabel }),
1778
- /* @__PURE__ */ jsx13("div", { className: "flex h-10 items-center rounded border border-agg-separator bg-agg-secondary px-3", children: /* @__PURE__ */ jsx13("p", { className: "agg-type-body truncate text-agg-foreground", children: destinationWallet }) })
1779
- ] }),
1780
1797
  /* @__PURE__ */ jsx13(
1781
1798
  Button,
1782
1799
  {
1783
- variant: isValid ? "primary" : "secondary",
1800
+ variant: isValid && !isConfirming ? "primary" : "secondary",
1784
1801
  size: "large",
1785
1802
  className: "w-full",
1786
- disabled: !isValid,
1803
+ disabled: isDisabled,
1787
1804
  onClick: onContinue,
1788
- children: labels.withdraw.cardFlow.getQuotes
1805
+ children: isConfirming ? labels.common.loading : labels.withdraw.walletFlow.confirm
1789
1806
  }
1790
- )
1807
+ ),
1808
+ error ? /* @__PURE__ */ jsx13("p", { className: "agg-type-label text-agg-error text-center", role: "alert", children: error }) : null
1791
1809
  ] }) })
1792
1810
  ] });
1793
1811
  };
1794
1812
 
1795
- // src/withdraw/steps/withdraw-provider.tsx
1796
- import { useLabels as useLabels13 } from "@agg-build/hooks";
1797
- import { Fragment as Fragment9, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1798
- var WithdrawProviderItem = ({ provider, onSelect }) => {
1799
- const labels = useLabels13();
1800
- const badgeText = provider.badge === "best" ? labels.withdraw.cardFlow.providerBadges.best : provider.badge === "low-kyc" ? labels.withdraw.cardFlow.providerBadges.lowKyc : void 0;
1801
- return /* @__PURE__ */ jsx14(
1802
- "button",
1803
- {
1804
- type: "button",
1805
- className: "w-full rounded-xl border border-agg-separator px-4 py-3 text-left bg-agg-secondary hover:bg-agg-secondary-hover transition-colors cursor-pointer",
1806
- onClick: () => onSelect(provider.id),
1807
- children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between gap-4", children: [
1808
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
1809
- /* @__PURE__ */ jsx14("p", { className: "text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: provider.name }),
1810
- badgeText ? /* @__PURE__ */ jsx14(
1811
- "span",
1812
- {
1813
- className: `rounded border px-2 py-[2px] text-[10px] leading-[14px] font-agg-bold uppercase ${provider.badge === "best" ? "border-agg-primary/50 text-agg-primary bg-agg-secondary" : "border-agg-separator text-agg-foreground bg-agg-secondary"}`,
1814
- children: badgeText
1815
- }
1816
- ) : null
1817
- ] }),
1818
- /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-4", children: [
1819
- /* @__PURE__ */ jsxs14("div", { className: "text-right", children: [
1820
- /* @__PURE__ */ jsx14("p", { className: "agg-type-body text-agg-foreground", children: provider.quote }),
1821
- /* @__PURE__ */ jsxs14("p", { className: "agg-type-label text-agg-muted-foreground", children: [
1822
- labels.withdraw.cardFlow.feeLabel,
1823
- " ",
1824
- provider.fee
1825
- ] })
1826
- ] }),
1827
- /* @__PURE__ */ jsx14(ChevronRightIcon, { className: "h-5 w-5 text-agg-muted-foreground" })
1828
- ] })
1829
- ] })
1830
- }
1831
- );
1813
+ // src/withdraw/steps/withdraw-success.tsx
1814
+ import { useEffect as useEffect4, useState as useState3 } from "react";
1815
+ import { useLabels as useLabels13, useSdkUiConfig } from "@agg-build/hooks";
1816
+ import { useWithdrawalLifecycle } from "@agg-build/hooks/withdraw";
1817
+
1818
+ // src/withdraw/steps/withdraw-success.utils.ts
1819
+ var CHAIN_LABELS = {
1820
+ 1: "Ethereum",
1821
+ 10: "Optimism",
1822
+ 56: "BNB Chain",
1823
+ 137: "Polygon",
1824
+ 8453: "Base",
1825
+ 42161: "Arbitrum",
1826
+ 43114: "Avalanche",
1827
+ 11155111: "Sepolia",
1828
+ 792703809: "Solana"
1832
1829
  };
1833
- var WithdrawProviderStep = ({
1834
- token,
1835
- amount,
1836
- currency,
1837
- providers,
1838
- onBack,
1839
- onSelectProvider
1830
+ var resolveChainLabel = (chainId) => {
1831
+ var _a;
1832
+ return (_a = CHAIN_LABELS[chainId]) != null ? _a : `Chain ${chainId}`;
1833
+ };
1834
+ var legStepStatusFor = (legStatus) => {
1835
+ switch (legStatus) {
1836
+ case "confirmed":
1837
+ return "complete";
1838
+ case "failed":
1839
+ return "error";
1840
+ case "submitted":
1841
+ case "planned":
1842
+ default:
1843
+ return "pending";
1844
+ }
1845
+ };
1846
+ var legStepLabel = (leg, labels) => {
1847
+ if (leg.type === "bridge") {
1848
+ return labels.bridge(resolveChainLabel(leg.sourceChainId), resolveChainLabel(leg.destChainId));
1849
+ }
1850
+ return labels.transfer(resolveChainLabel(leg.destChainId));
1851
+ };
1852
+ var finalStepStatusFor = (status) => {
1853
+ switch (status) {
1854
+ case "completed":
1855
+ return "complete";
1856
+ case "partial":
1857
+ return "warning";
1858
+ case "failed":
1859
+ return "error";
1860
+ case "pending":
1861
+ case "bridging":
1862
+ case "transferring":
1863
+ default:
1864
+ return "pending";
1865
+ }
1866
+ };
1867
+ var finalStepLabelFor = (status, pending, walletFlowLabels) => {
1868
+ var _a;
1869
+ if (pending || status === null) {
1870
+ return walletFlowLabels.lifecycle.pending;
1871
+ }
1872
+ return (_a = walletFlowLabels.lifecycle[status]) != null ? _a : walletFlowLabels.lifecycle.pending;
1873
+ };
1874
+ var buildWithdrawalLifecycleSteps = ({
1875
+ pending,
1876
+ status,
1877
+ legs,
1878
+ walletFlowLabels
1840
1879
  }) => {
1841
- const labels = useLabels13();
1842
- return /* @__PURE__ */ jsxs14(Fragment9, { children: [
1843
- /* @__PURE__ */ jsx14(
1844
- Modal.Header,
1845
- {
1846
- title: labels.withdraw.cardFlow.selectProviderTitle,
1847
- hideBorder: true,
1848
- leftElement: /* @__PURE__ */ jsx14(
1849
- "button",
1850
- {
1851
- type: "button",
1852
- className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
1853
- onClick: onBack,
1854
- "aria-label": labels.withdraw.back,
1855
- children: /* @__PURE__ */ jsx14(ChevronLeftIcon, { className: "h-6 w-6" })
1856
- }
1857
- )
1858
- }
1859
- ),
1860
- /* @__PURE__ */ jsx14(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4", children: [
1861
- /* @__PURE__ */ jsxs14("p", { className: "agg-type-body text-agg-foreground", children: [
1862
- /* @__PURE__ */ jsx14("span", { className: "font-agg-bold", children: token }),
1863
- " $",
1864
- amount,
1865
- " ",
1866
- currency
1867
- ] }),
1868
- /* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-4", children: providers.map((provider) => /* @__PURE__ */ jsx14(
1869
- WithdrawProviderItem,
1870
- {
1871
- provider,
1872
- onSelect: onSelectProvider
1873
- },
1874
- provider.id
1875
- )) })
1876
- ] }) })
1877
- ] });
1880
+ const stepLabels = walletFlowLabels.lifecycle.steps;
1881
+ const legSteps = legs.map((leg, index) => ({
1882
+ id: `leg-${index}-${leg.type}-${leg.sourceChainId}-${leg.destChainId}`,
1883
+ label: legStepLabel(leg, stepLabels),
1884
+ status: legStepStatusFor(leg.status)
1885
+ }));
1886
+ const groups = legSteps.length > 0 ? [legSteps] : [];
1887
+ const finalStep = {
1888
+ id: `final-${status != null ? status : "pending"}`,
1889
+ label: finalStepLabelFor(status, pending, walletFlowLabels),
1890
+ status: finalStepStatusFor(status != null ? status : "pending")
1891
+ };
1892
+ return {
1893
+ groups,
1894
+ finalStep,
1895
+ hasDetails: legSteps.length > 0
1896
+ };
1878
1897
  };
1879
1898
 
1880
1899
  // src/withdraw/steps/withdraw-success.tsx
1881
- import { useLabels as useLabels14 } from "@agg-build/hooks";
1882
- import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1883
- var SummaryRow3 = ({ label, value }) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
1884
- /* @__PURE__ */ jsx15("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
1885
- /* @__PURE__ */ jsx15("p", { className: "agg-type-label text-agg-foreground", children: value })
1900
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1901
+ var SummaryRow3 = ({ label, value }) => /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b border-agg-separator py-2 last:border-b-0", children: [
1902
+ /* @__PURE__ */ jsx14("p", { className: "text-[12px] leading-4 font-agg-bold uppercase text-agg-muted-foreground", children: label }),
1903
+ /* @__PURE__ */ jsx14("p", { className: "agg-type-label text-agg-foreground", children: value })
1886
1904
  ] });
1905
+ var LoadingGlyph = ({
1906
+ className,
1907
+ enableAnimations
1908
+ }) => /* @__PURE__ */ jsx14(
1909
+ "span",
1910
+ {
1911
+ "aria-hidden": "true",
1912
+ className: cn(
1913
+ "inline-block rounded-full border-2 border-current border-r-transparent",
1914
+ getMotionClassName(enableAnimations, "animate-spin"),
1915
+ className
1916
+ )
1917
+ }
1918
+ );
1919
+ var stepIconClassNameFor = (status) => {
1920
+ switch (status) {
1921
+ case "complete":
1922
+ return "text-agg-primary";
1923
+ case "warning":
1924
+ return "text-agg-warning";
1925
+ case "error":
1926
+ return "text-agg-error";
1927
+ case "pending":
1928
+ default:
1929
+ return "text-agg-primary";
1930
+ }
1931
+ };
1932
+ var stepIconNameFor = (status) => {
1933
+ return status === "warning" || status === "error" ? "warning-filled" : "check-circle";
1934
+ };
1887
1935
  var WithdrawSuccessStep = ({
1888
1936
  summary,
1937
+ tokenSymbol,
1938
+ withdrawalId,
1889
1939
  onDone,
1890
1940
  onClose
1891
1941
  }) => {
1892
- const labels = useLabels14();
1893
- return /* @__PURE__ */ jsx15("div", { className: "relative", children: /* @__PURE__ */ jsxs15(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
1894
- /* @__PURE__ */ jsx15(
1942
+ var _a;
1943
+ const labels = useLabels13();
1944
+ const {
1945
+ features: { enableAnimations }
1946
+ } = useSdkUiConfig();
1947
+ const { state } = useWithdrawalLifecycle(withdrawalId);
1948
+ const [isTimelineExpanded, setIsTimelineExpanded] = useState3(true);
1949
+ const walletFlowLabels = labels.withdraw.walletFlow;
1950
+ const { groups, finalStep, hasDetails } = buildWithdrawalLifecycleSteps({
1951
+ pending: state.pending,
1952
+ status: state.status,
1953
+ legs: state.legs,
1954
+ walletFlowLabels
1955
+ });
1956
+ useEffect4(() => {
1957
+ if (!state.terminal) return;
1958
+ if (state.status !== "completed") return;
1959
+ const timer = window.setTimeout(() => onClose(), 1500);
1960
+ return () => window.clearTimeout(timer);
1961
+ }, [onClose, state.status, state.terminal]);
1962
+ const { titleCopy, descriptionCopy } = (() => {
1963
+ if (state.terminal && state.status === "completed") {
1964
+ return {
1965
+ titleCopy: walletFlowLabels.successTitleCompleted,
1966
+ descriptionCopy: walletFlowLabels.successDescriptionCompleted(tokenSymbol)
1967
+ };
1968
+ }
1969
+ if (state.terminal && state.status === "partial") {
1970
+ return {
1971
+ titleCopy: walletFlowLabels.successTitlePartial,
1972
+ descriptionCopy: walletFlowLabels.successDescriptionPartial(tokenSymbol)
1973
+ };
1974
+ }
1975
+ if (state.terminal && state.status === "failed") {
1976
+ return {
1977
+ titleCopy: walletFlowLabels.successTitleFailed,
1978
+ descriptionCopy: walletFlowLabels.successDescriptionFailed(tokenSymbol)
1979
+ };
1980
+ }
1981
+ return {
1982
+ titleCopy: walletFlowLabels.successTitle,
1983
+ descriptionCopy: walletFlowLabels.successDescription(tokenSymbol)
1984
+ };
1985
+ })();
1986
+ return /* @__PURE__ */ jsx14("div", { className: "relative", children: /* @__PURE__ */ jsxs14(Modal.Body, { classNames: { root: "px-5 py-8 sm:px-8 sm:py-10" }, children: [
1987
+ /* @__PURE__ */ jsx14(
1895
1988
  "button",
1896
1989
  {
1897
1990
  type: "button",
1898
- className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80",
1991
+ className: "absolute right-8 top-7 flex items-center justify-center text-agg-foreground transition-colors hover:text-agg-foreground/80 cursor-pointer",
1899
1992
  onClick: onClose,
1900
1993
  "aria-label": labels.common.close,
1901
- children: /* @__PURE__ */ jsx15(CloseIcon, { className: "h-6 w-6" })
1994
+ children: /* @__PURE__ */ jsx14(CloseIcon, { className: "h-6 w-6" })
1902
1995
  }
1903
1996
  ),
1904
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-8", children: [
1905
- /* @__PURE__ */ jsx15("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full border border-agg-success/50 bg-agg-success/15", children: /* @__PURE__ */ jsx15(SuccessCheckIcon, { className: "h-6 w-6 text-agg-success" }) }),
1906
- /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-3 text-center", children: [
1907
- /* @__PURE__ */ jsx15("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: labels.withdraw.cardFlow.successTitle }),
1908
- /* @__PURE__ */ jsx15("p", { className: "agg-type-body text-agg-foreground", children: labels.withdraw.cardFlow.successDescription })
1909
- ] }),
1910
- /* @__PURE__ */ jsxs15("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
1911
- /* @__PURE__ */ jsx15(
1912
- SummaryRow3,
1997
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center gap-8", children: [
1998
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center gap-3 text-center", children: [
1999
+ /* @__PURE__ */ jsx14("h3", { className: "text-agg-2xl leading-agg-8 font-agg-bold text-agg-foreground", children: titleCopy }),
2000
+ /* @__PURE__ */ jsx14(
2001
+ "p",
1913
2002
  {
1914
- label: labels.withdraw.summary.amountReceived,
1915
- value: summary.amountReceived
2003
+ className: "agg-type-body text-agg-muted-foreground",
2004
+ "data-lifecycle-status": (_a = state.status) != null ? _a : "submitted",
2005
+ "data-lifecycle-terminal": state.terminal ? "true" : "false",
2006
+ children: descriptionCopy
1916
2007
  }
1917
2008
  ),
1918
- /* @__PURE__ */ jsx15(SummaryRow3, { label: labels.withdraw.summary.network, value: summary.network }),
1919
- /* @__PURE__ */ jsx15(
1920
- SummaryRow3,
2009
+ state.errorMessage ? /* @__PURE__ */ jsx14("p", { className: "agg-type-body text-agg-destructive", children: state.errorMessage }) : null
2010
+ ] }),
2011
+ hasDetails || !state.pending ? /* @__PURE__ */ jsxs14("div", { className: "agg-withdraw-success-timeline flex w-full flex-col gap-2", children: [
2012
+ hasDetails ? /* @__PURE__ */ jsx14(
2013
+ "div",
1921
2014
  {
1922
- label: labels.withdraw.cardFlow.summary.provider,
1923
- value: summary.provider
2015
+ "aria-hidden": !isTimelineExpanded,
2016
+ className: cn(
2017
+ "grid overflow-hidden",
2018
+ isTimelineExpanded ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0",
2019
+ !isTimelineExpanded && "pointer-events-none",
2020
+ getMotionClassName(
2021
+ enableAnimations,
2022
+ "transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]"
2023
+ )
2024
+ ),
2025
+ children: /* @__PURE__ */ jsx14("div", { className: "min-h-0", children: /* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-4 pb-2", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsx14(
2026
+ "div",
2027
+ {
2028
+ className: "flex flex-col gap-2",
2029
+ children: group.map((step) => /* @__PURE__ */ jsxs14(
2030
+ "div",
2031
+ {
2032
+ className: "flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
2033
+ "data-step-status": step.status,
2034
+ children: [
2035
+ step.status === "pending" ? /* @__PURE__ */ jsx14(
2036
+ LoadingGlyph,
2037
+ {
2038
+ enableAnimations,
2039
+ className: cn(
2040
+ "h-3 w-3 shrink-0",
2041
+ stepIconClassNameFor(step.status)
2042
+ )
2043
+ }
2044
+ ) : /* @__PURE__ */ jsx14(
2045
+ Icon,
2046
+ {
2047
+ name: stepIconNameFor(step.status),
2048
+ size: "small",
2049
+ className: cn(
2050
+ "h-3 w-3 shrink-0",
2051
+ stepIconClassNameFor(step.status)
2052
+ ),
2053
+ "aria-hidden": "true"
2054
+ }
2055
+ ),
2056
+ /* @__PURE__ */ jsx14("p", { className: "min-w-0 flex-1", children: step.label })
2057
+ ]
2058
+ },
2059
+ step.id
2060
+ ))
2061
+ },
2062
+ `withdraw-step-group-${groupIndex}`
2063
+ )) }) })
1924
2064
  }
1925
- ),
1926
- /* @__PURE__ */ jsx15(
2065
+ ) : null,
2066
+ hasDetails ? /* @__PURE__ */ jsxs14(
2067
+ "button",
2068
+ {
2069
+ type: "button",
2070
+ "aria-expanded": isTimelineExpanded,
2071
+ className: cn(
2072
+ "flex w-full items-center gap-2 text-left text-agg-sm leading-agg-5 text-agg-foreground",
2073
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-0 focus-visible:ring-offset-agg-secondary",
2074
+ "cursor-pointer"
2075
+ ),
2076
+ onClick: () => setIsTimelineExpanded((current) => !current),
2077
+ children: [
2078
+ finalStep.status === "pending" ? /* @__PURE__ */ jsx14(
2079
+ LoadingGlyph,
2080
+ {
2081
+ enableAnimations,
2082
+ className: cn("h-3 w-3 shrink-0", stepIconClassNameFor(finalStep.status))
2083
+ }
2084
+ ) : /* @__PURE__ */ jsx14(
2085
+ Icon,
2086
+ {
2087
+ name: stepIconNameFor(finalStep.status),
2088
+ size: "small",
2089
+ className: cn("h-3 w-3 shrink-0", stepIconClassNameFor(finalStep.status)),
2090
+ "aria-hidden": "true"
2091
+ }
2092
+ ),
2093
+ /* @__PURE__ */ jsx14("p", { className: "min-w-0 flex-1", children: finalStep.label }),
2094
+ /* @__PURE__ */ jsx14(
2095
+ Icon,
2096
+ {
2097
+ name: isTimelineExpanded ? "chevron-up" : "chevron-down",
2098
+ size: "small",
2099
+ className: "h-4 w-4 shrink-0 text-agg-muted-foreground",
2100
+ "aria-hidden": "true"
2101
+ }
2102
+ )
2103
+ ]
2104
+ }
2105
+ ) : null
2106
+ ] }) : null,
2107
+ /* @__PURE__ */ jsxs14("div", { className: "w-full rounded-lg border border-agg-separator bg-agg-secondary px-3 py-1", children: [
2108
+ /* @__PURE__ */ jsx14(
1927
2109
  SummaryRow3,
1928
2110
  {
1929
- label: labels.withdraw.cardFlow.summary.toWallet,
1930
- value: summary.toWallet
2111
+ label: walletFlowLabels.summary.amountReceived,
2112
+ value: summary.amountReceived
1931
2113
  }
1932
2114
  ),
1933
- /* @__PURE__ */ jsx15(SummaryRow3, { label: labels.withdraw.cardFlow.summary.fees, value: summary.fees })
2115
+ /* @__PURE__ */ jsx14(SummaryRow3, { label: walletFlowLabels.summary.network, value: summary.network }),
2116
+ /* @__PURE__ */ jsx14(SummaryRow3, { label: walletFlowLabels.summary.toWallet, value: summary.toWallet }),
2117
+ /* @__PURE__ */ jsx14(SummaryRow3, { label: walletFlowLabels.summary.fees, value: summary.fees })
1934
2118
  ] }),
1935
- /* @__PURE__ */ jsx15(Button, { variant: "secondary", size: "large", className: "w-[120px]", onClick: onDone, children: labels.withdraw.done })
2119
+ /* @__PURE__ */ jsx14(Button, { variant: "secondary", size: "large", className: "w-[160px]", onClick: onDone, children: labels.withdraw.done })
1936
2120
  ] })
1937
2121
  ] }) });
1938
2122
  };
1939
2123
 
1940
2124
  // src/withdraw/index.tsx
1941
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1942
- var WithdrawModal = ({
2125
+ import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
2126
+ function isControlledWithdrawModalProps(props) {
2127
+ return "withdrawFlow" in props;
2128
+ }
2129
+ function WithdrawModalSelfDriven({
2130
+ open,
2131
+ onOpenChange
2132
+ }) {
2133
+ const withdrawProps = useWithdrawFlow({ open, onOpenChange });
2134
+ return /* @__PURE__ */ jsx15(WithdrawModalControlled, __spreadValues({}, withdrawProps));
2135
+ }
2136
+ function WithdrawModalControlled({
1943
2137
  open,
1944
2138
  onOpenChange,
1945
2139
  withdrawFlow,
1946
- onSelectWithdrawMethod,
2140
+ onWithdrawDestinationChange,
1947
2141
  onWithdrawAmountChange,
1948
- onWithdrawCurrencyChange,
1949
2142
  onWithdrawTokenChange,
1950
2143
  onWithdrawNetworkChange,
1951
- onGetWithdrawQuotes,
2144
+ onMaxClick,
1952
2145
  onSelectWithdrawProvider,
1953
2146
  onDoneWithdraw
1954
- }) => {
2147
+ }) {
1955
2148
  const [step, setStep] = useState4("method");
1956
- const handleBackToMethod = () => {
1957
- setStep("method");
1958
- };
1959
- const handleSelectMethod = (method) => {
1960
- setStep("withdraw-amount");
1961
- onSelectWithdrawMethod == null ? void 0 : onSelectWithdrawMethod(method);
1962
- };
2149
+ const [isConfirming, setIsConfirming] = useState4(false);
2150
+ const [confirmError, setConfirmError] = useState4(null);
2151
+ useEffect5(() => {
2152
+ if (!open) {
2153
+ setStep("method");
2154
+ setIsConfirming(false);
2155
+ setConfirmError(null);
2156
+ }
2157
+ }, [open]);
1963
2158
  const handleOpenChange = (isOpen) => {
1964
2159
  if (!isOpen) {
1965
2160
  setStep("method");
2161
+ setIsConfirming(false);
2162
+ setConfirmError(null);
1966
2163
  }
1967
2164
  onOpenChange(isOpen);
1968
2165
  };
1969
- const fallbackNetworkOptions = useMemo2(() => mapNetworksToOptions(), []);
1970
- const withdrawTokenOptions = withTokenIcons(
1971
- mergeSelectOptionsUnique(withdrawFlow.tokenOptions, DEFAULT_CURRENCY_OPTIONS)
1972
- );
1973
- const withdrawNetworkOptions = withNetworkIcons(
1974
- mergeSelectOptionsUnique(withdrawFlow.networkOptions, fallbackNetworkOptions)
1975
- );
1976
- return /* @__PURE__ */ jsx16(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs16(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
1977
- step === "method" ? /* @__PURE__ */ jsx16(WithdrawMethodStep, { balance: withdrawFlow.balance, onSelectMethod: handleSelectMethod }) : null,
1978
- step === "withdraw-amount" ? /* @__PURE__ */ jsx16(
2166
+ const handleBack = () => {
2167
+ setConfirmError(null);
2168
+ setStep("method");
2169
+ };
2170
+ const handleConfirm = () => __async(null, null, function* () {
2171
+ setIsConfirming(true);
2172
+ setConfirmError(null);
2173
+ try {
2174
+ yield onSelectWithdrawProvider("wallet");
2175
+ setStep("success");
2176
+ } catch (err) {
2177
+ setConfirmError(err instanceof Error ? err.message : "Withdrawal failed. Please try again.");
2178
+ } finally {
2179
+ setIsConfirming(false);
2180
+ }
2181
+ });
2182
+ const withdrawTokenOptions = withTokenIcons(withdrawFlow.tokenOptions);
2183
+ const withdrawNetworkOptions = withNetworkIcons(withdrawFlow.networkOptions);
2184
+ return /* @__PURE__ */ jsx15(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs15(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
2185
+ step === "method" ? /* @__PURE__ */ jsx15(
2186
+ WithdrawMethodStep,
2187
+ {
2188
+ balance: withdrawFlow.balance,
2189
+ onSelectMethod: () => setStep("withdraw-amount")
2190
+ }
2191
+ ) : null,
2192
+ step === "withdraw-amount" ? /* @__PURE__ */ jsx15(
1979
2193
  WithdrawAmountStep,
1980
2194
  {
1981
2195
  amount: withdrawFlow.amount,
1982
- currency: withdrawFlow.currency,
1983
2196
  destinationWallet: withdrawFlow.destinationWallet,
2197
+ balanceDisplay: withdrawFlow.balanceDisplay,
1984
2198
  tokenOptions: withdrawTokenOptions,
1985
2199
  networkOptions: withdrawNetworkOptions,
1986
2200
  selectedToken: withdrawFlow.selectedToken,
1987
2201
  selectedNetwork: withdrawFlow.selectedNetwork,
1988
- onBack: handleBackToMethod,
2202
+ isConfirming,
2203
+ error: confirmError,
2204
+ onBack: handleBack,
1989
2205
  onAmountChange: onWithdrawAmountChange,
1990
- onCurrencyChange: onWithdrawCurrencyChange,
2206
+ onDestinationChange: onWithdrawDestinationChange,
1991
2207
  onTokenChange: onWithdrawTokenChange,
1992
2208
  onNetworkChange: onWithdrawNetworkChange,
1993
- onContinue: () => {
1994
- onGetWithdrawQuotes == null ? void 0 : onGetWithdrawQuotes();
1995
- setStep("provider");
1996
- }
1997
- }
1998
- ) : null,
1999
- step === "provider" ? /* @__PURE__ */ jsx16(
2000
- WithdrawProviderStep,
2001
- {
2002
- token: withdrawFlow.selectedToken,
2003
- amount: withdrawFlow.amount,
2004
- currency: withdrawFlow.currency,
2005
- providers: withdrawFlow.providers,
2006
- onBack: () => setStep("withdraw-amount"),
2007
- onSelectProvider: (providerId) => {
2008
- onSelectWithdrawProvider(providerId);
2009
- setStep("success");
2010
- }
2209
+ onMaxClick,
2210
+ onContinue: handleConfirm
2011
2211
  }
2012
2212
  ) : null,
2013
- step === "success" ? /* @__PURE__ */ jsx16(
2213
+ step === "success" ? /* @__PURE__ */ jsx15(
2014
2214
  WithdrawSuccessStep,
2015
2215
  {
2016
2216
  summary: withdrawFlow.purchaseSummary,
2217
+ tokenSymbol: withdrawFlow.selectedToken,
2218
+ withdrawalId: withdrawFlow.withdrawalId,
2017
2219
  onDone: onDoneWithdraw,
2018
- onClose: () => onOpenChange(false)
2220
+ onClose: () => handleOpenChange(false)
2019
2221
  }
2020
2222
  ) : null
2021
2223
  ] }) });
2224
+ }
2225
+ var WithdrawModal = (props) => {
2226
+ if (isControlledWithdrawModalProps(props)) {
2227
+ return /* @__PURE__ */ jsx15(WithdrawModalControlled, __spreadValues({}, props));
2228
+ }
2229
+ return /* @__PURE__ */ jsx15(WithdrawModalSelfDriven, __spreadValues({}, props));
2022
2230
  };
2023
2231
  WithdrawModal.displayName = "WithdrawModal";
2024
2232
 
2025
2233
  // src/onboarding/index.tsx
2026
- import { useCallback as useCallback6, useEffect as useEffect4, useState as useState9 } from "react";
2027
- import { useLabels as useLabels20 } from "@agg-build/hooks";
2234
+ import { useCallback as useCallback5, useEffect as useEffect6, useState as useState9 } from "react";
2235
+ import { useLabels as useLabels19 } from "@agg-build/hooks";
2028
2236
  import * as Dialog3 from "@radix-ui/react-dialog";
2029
2237
 
2030
2238
  // src/onboarding/onboarding-modal.constants.ts
@@ -2043,30 +2251,30 @@ var ONBOARDING_STEPS = {
2043
2251
  var ONCHAIN_VENUES = [Venue.polymarket, Venue.opinion, Venue.predict];
2044
2252
 
2045
2253
  // src/onboarding/steps/how-it-works.tsx
2046
- import { useCallback as useCallback2, useRef as useRef2, useState as useState5 } from "react";
2047
- import { useLabels as useLabels15 } from "@agg-build/hooks";
2048
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2254
+ import { useCallback, useRef as useRef2, useState as useState5 } from "react";
2255
+ import { useLabels as useLabels14 } from "@agg-build/hooks";
2256
+ import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
2049
2257
  var defaultIcons = {
2050
- createAccount: /* @__PURE__ */ jsx17(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2051
- linkAccounts: /* @__PURE__ */ jsx17(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2052
- bestPrices: /* @__PURE__ */ jsx17(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2053
- stayInControl: /* @__PURE__ */ jsx17(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
2258
+ createAccount: /* @__PURE__ */ jsx16(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2259
+ linkAccounts: /* @__PURE__ */ jsx16(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2260
+ bestPrices: /* @__PURE__ */ jsx16(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
2261
+ stayInControl: /* @__PURE__ */ jsx16(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
2054
2262
  };
2055
2263
  var HowItWorksStep = ({ onContinue, icons }) => {
2056
- const labels = useLabels15();
2264
+ const labels = useLabels14();
2057
2265
  const scrollRef = useRef2(null);
2058
2266
  const [showTopGradient, setShowTopGradient] = useState5(false);
2059
2267
  const [showBottomGradient, setShowBottomGradient] = useState5(true);
2060
- const handleScroll = useCallback2(() => {
2268
+ const handleScroll = useCallback(() => {
2061
2269
  const el = scrollRef.current;
2062
2270
  if (!el) return;
2063
2271
  setShowTopGradient(el.scrollTop > 0);
2064
2272
  setShowBottomGradient(el.scrollTop + el.clientHeight < el.scrollHeight - 1);
2065
2273
  }, []);
2066
- return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
2067
- /* @__PURE__ */ jsx17("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
2068
- /* @__PURE__ */ jsxs17("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
2069
- /* @__PURE__ */ jsx17(
2274
+ return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
2275
+ /* @__PURE__ */ jsx16("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
2276
+ /* @__PURE__ */ jsxs16("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
2277
+ /* @__PURE__ */ jsx16(
2070
2278
  "div",
2071
2279
  {
2072
2280
  ref: scrollRef,
@@ -2076,7 +2284,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
2076
2284
  var _a;
2077
2285
  const icon = (_a = icons == null ? void 0 : icons[featureKey]) != null ? _a : defaultIcons[featureKey];
2078
2286
  const feature = labels.onboarding.howItWorks.features[featureKey];
2079
- return /* @__PURE__ */ jsxs17(
2287
+ return /* @__PURE__ */ jsxs16(
2080
2288
  "div",
2081
2289
  {
2082
2290
  className: cn(
@@ -2085,11 +2293,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
2085
2293
  "bg-agg-secondary-hover"
2086
2294
  ),
2087
2295
  children: [
2088
- /* @__PURE__ */ jsxs17("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
2089
- /* @__PURE__ */ jsx17("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
2090
- /* @__PURE__ */ jsx17("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
2296
+ /* @__PURE__ */ jsxs16("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
2297
+ /* @__PURE__ */ jsx16("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
2298
+ /* @__PURE__ */ jsx16("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
2091
2299
  ] }),
2092
- icon ? /* @__PURE__ */ jsx17("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
2300
+ icon ? /* @__PURE__ */ jsx16("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
2093
2301
  ]
2094
2302
  },
2095
2303
  featureKey
@@ -2097,7 +2305,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
2097
2305
  })
2098
2306
  }
2099
2307
  ),
2100
- /* @__PURE__ */ jsx17(
2308
+ /* @__PURE__ */ jsx16(
2101
2309
  "div",
2102
2310
  {
2103
2311
  className: cn(
@@ -2108,7 +2316,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
2108
2316
  )
2109
2317
  }
2110
2318
  ),
2111
- /* @__PURE__ */ jsx17(
2319
+ /* @__PURE__ */ jsx16(
2112
2320
  "div",
2113
2321
  {
2114
2322
  className: cn(
@@ -2120,26 +2328,26 @@ var HowItWorksStep = ({ onContinue, icons }) => {
2120
2328
  }
2121
2329
  )
2122
2330
  ] }),
2123
- /* @__PURE__ */ jsx17(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
2331
+ /* @__PURE__ */ jsx16(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
2124
2332
  ] });
2125
2333
  };
2126
2334
  HowItWorksStep.displayName = "HowItWorksStep";
2127
2335
 
2128
2336
  // src/onboarding/steps/profile-setup.tsx
2129
- import { useCallback as useCallback3, useRef as useRef3, useState as useState6 } from "react";
2130
- import { useLabels as useLabels16 } from "@agg-build/hooks";
2131
- import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
2337
+ import { useCallback as useCallback2, useRef as useRef3, useState as useState6 } from "react";
2338
+ import { useLabels as useLabels15 } from "@agg-build/hooks";
2339
+ import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2132
2340
  var ProfileSetupStep = ({ onContinue }) => {
2133
- const labels = useLabels16();
2341
+ const labels = useLabels15();
2134
2342
  const [username, setUsername] = useState6("");
2135
2343
  const [avatarFile, setAvatarFile] = useState6();
2136
2344
  const [avatarPreview, setAvatarPreview] = useState6();
2137
2345
  const fileInputRef = useRef3(null);
2138
- const handleAvatarClick = useCallback3(() => {
2346
+ const handleAvatarClick = useCallback2(() => {
2139
2347
  var _a;
2140
2348
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
2141
2349
  }, []);
2142
- const handleFileChange = useCallback3((e) => {
2350
+ const handleFileChange = useCallback2((e) => {
2143
2351
  var _a;
2144
2352
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
2145
2353
  if (!file) return;
@@ -2151,18 +2359,18 @@ var ProfileSetupStep = ({ onContinue }) => {
2151
2359
  };
2152
2360
  reader.readAsDataURL(file);
2153
2361
  }, []);
2154
- const handleContinue = useCallback3(() => {
2362
+ const handleContinue = useCallback2(() => {
2155
2363
  onContinue({
2156
2364
  username,
2157
2365
  avatarFile,
2158
2366
  avatarPreview
2159
2367
  });
2160
2368
  }, [username, avatarFile, avatarPreview, onContinue]);
2161
- return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-7", children: [
2162
- /* @__PURE__ */ jsx18("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
2163
- /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-5 items-center w-full", children: [
2164
- /* @__PURE__ */ jsxs18("div", { className: "flex justify-center", children: [
2165
- /* @__PURE__ */ jsxs18(
2369
+ return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-7", children: [
2370
+ /* @__PURE__ */ jsx17("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
2371
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-5 items-center w-full", children: [
2372
+ /* @__PURE__ */ jsxs17("div", { className: "flex justify-center", children: [
2373
+ /* @__PURE__ */ jsxs17(
2166
2374
  "button",
2167
2375
  {
2168
2376
  type: "button",
@@ -2178,13 +2386,13 @@ var ProfileSetupStep = ({ onContinue }) => {
2178
2386
  ),
2179
2387
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
2180
2388
  children: [
2181
- !avatarPreview ? /* @__PURE__ */ jsx18(
2389
+ !avatarPreview ? /* @__PURE__ */ jsx17(
2182
2390
  "svg",
2183
2391
  {
2184
2392
  "aria-hidden": true,
2185
2393
  viewBox: "0 0 80 80",
2186
2394
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
2187
- children: /* @__PURE__ */ jsx18(
2395
+ children: /* @__PURE__ */ jsx17(
2188
2396
  "circle",
2189
2397
  {
2190
2398
  cx: "40",
@@ -2198,18 +2406,18 @@ var ProfileSetupStep = ({ onContinue }) => {
2198
2406
  )
2199
2407
  }
2200
2408
  ) : null,
2201
- avatarPreview ? /* @__PURE__ */ jsx18(
2409
+ avatarPreview ? /* @__PURE__ */ jsx17(
2202
2410
  RemoteImage,
2203
2411
  {
2204
2412
  src: avatarPreview,
2205
2413
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
2206
2414
  className: "h-full w-full object-cover"
2207
2415
  }
2208
- ) : /* @__PURE__ */ jsx18(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
2416
+ ) : /* @__PURE__ */ jsx17(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
2209
2417
  ]
2210
2418
  }
2211
2419
  ),
2212
- /* @__PURE__ */ jsx18(
2420
+ /* @__PURE__ */ jsx17(
2213
2421
  "input",
2214
2422
  {
2215
2423
  ref: fileInputRef,
@@ -2221,8 +2429,8 @@ var ProfileSetupStep = ({ onContinue }) => {
2221
2429
  }
2222
2430
  )
2223
2431
  ] }),
2224
- /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-2 w-full", children: [
2225
- /* @__PURE__ */ jsx18(
2432
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2 w-full", children: [
2433
+ /* @__PURE__ */ jsx17(
2226
2434
  "label",
2227
2435
  {
2228
2436
  htmlFor: "onboarding-username",
@@ -2230,7 +2438,7 @@ var ProfileSetupStep = ({ onContinue }) => {
2230
2438
  children: labels.onboarding.profileSetup.usernameLabel
2231
2439
  }
2232
2440
  ),
2233
- /* @__PURE__ */ jsx18(
2441
+ /* @__PURE__ */ jsx17(
2234
2442
  "input",
2235
2443
  {
2236
2444
  id: "onboarding-username",
@@ -2254,17 +2462,17 @@ var ProfileSetupStep = ({ onContinue }) => {
2254
2462
  )
2255
2463
  ] })
2256
2464
  ] }),
2257
- /* @__PURE__ */ jsx18(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
2465
+ /* @__PURE__ */ jsx17(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
2258
2466
  ] });
2259
2467
  };
2260
2468
  ProfileSetupStep.displayName = "ProfileSetupStep";
2261
2469
 
2262
2470
  // src/onboarding/steps/connect-accounts.tsx
2263
2471
  import { Venue as Venue2 } from "@agg-build/sdk";
2264
- import { useLabels as useLabels17 } from "@agg-build/hooks";
2265
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
2472
+ import { useLabels as useLabels16 } from "@agg-build/hooks";
2473
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
2266
2474
  var OnchainVenueLogos = () => {
2267
- return /* @__PURE__ */ jsx19("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsx19("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ jsx19(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
2475
+ return /* @__PURE__ */ jsx18("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsx18("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ jsx18(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
2268
2476
  };
2269
2477
  var VenueCard = ({
2270
2478
  logos,
@@ -2275,8 +2483,8 @@ var VenueCard = ({
2275
2483
  onConnect,
2276
2484
  connected = false
2277
2485
  }) => {
2278
- const labels = useLabels17();
2279
- const action = connected ? /* @__PURE__ */ jsx19(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx19(
2486
+ const labels = useLabels16();
2487
+ const action = connected ? /* @__PURE__ */ jsx18(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx18(
2280
2488
  Button,
2281
2489
  {
2282
2490
  variant: "tertiary",
@@ -2286,18 +2494,18 @@ var VenueCard = ({
2286
2494
  children: labels.onboarding.connectAccounts.connect
2287
2495
  }
2288
2496
  );
2289
- const mobileAction = connected ? /* @__PURE__ */ jsx19(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx19(
2497
+ const mobileAction = connected ? /* @__PURE__ */ jsx18(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx18(
2290
2498
  Button,
2291
2499
  {
2292
2500
  variant: "tertiary",
2293
2501
  size: "medium",
2294
2502
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
2295
2503
  onClick: onConnect,
2296
- suffix: /* @__PURE__ */ jsx19(ChevronRightIcon, { className: "h-4 w-4" }),
2504
+ suffix: /* @__PURE__ */ jsx18(ChevronRightIcon, { className: "h-4 w-4" }),
2297
2505
  children: labels.onboarding.connectAccounts.connectAccount
2298
2506
  }
2299
2507
  );
2300
- return /* @__PURE__ */ jsxs19(
2508
+ return /* @__PURE__ */ jsxs18(
2301
2509
  "div",
2302
2510
  {
2303
2511
  className: cn(
@@ -2305,23 +2513,23 @@ var VenueCard = ({
2305
2513
  connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
2306
2514
  ),
2307
2515
  children: [
2308
- /* @__PURE__ */ jsxs19("div", { className: "hidden sm:flex items-center justify-between", children: [
2309
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-5", children: [
2310
- /* @__PURE__ */ jsx19("div", { className: "shrink-0", children: logos }),
2311
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-[2px]", children: [
2312
- /* @__PURE__ */ jsx19("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
2313
- /* @__PURE__ */ jsx19("p", { className: "text-agg-sm text-agg-foreground", children: description })
2516
+ /* @__PURE__ */ jsxs18("div", { className: "hidden sm:flex items-center justify-between", children: [
2517
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-5", children: [
2518
+ /* @__PURE__ */ jsx18("div", { className: "shrink-0", children: logos }),
2519
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-[2px]", children: [
2520
+ /* @__PURE__ */ jsx18("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
2521
+ /* @__PURE__ */ jsx18("p", { className: "text-agg-sm text-agg-foreground", children: description })
2314
2522
  ] })
2315
2523
  ] }),
2316
- /* @__PURE__ */ jsx19("div", { className: "shrink-0", children: action })
2524
+ /* @__PURE__ */ jsx18("div", { className: "shrink-0", children: action })
2317
2525
  ] }),
2318
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3 sm:hidden", children: [
2319
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3", children: [
2320
- /* @__PURE__ */ jsx19("div", { className: "shrink-0", children: logos }),
2321
- /* @__PURE__ */ jsx19("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
2526
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-3 sm:hidden", children: [
2527
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-3", children: [
2528
+ /* @__PURE__ */ jsx18("div", { className: "shrink-0", children: logos }),
2529
+ /* @__PURE__ */ jsx18("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
2322
2530
  ] }),
2323
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-start gap-2", children: [
2324
- /* @__PURE__ */ jsx19("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
2531
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-start gap-2", children: [
2532
+ /* @__PURE__ */ jsx18("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
2325
2533
  mobileAction
2326
2534
  ] })
2327
2535
  ] })
@@ -2336,15 +2544,15 @@ var ConnectAccountsStep = ({
2336
2544
  connectedOnchain = false,
2337
2545
  connectedKalshi = false
2338
2546
  }) => {
2339
- const labels = useLabels17();
2547
+ const labels = useLabels16();
2340
2548
  const canContinue = connectedOnchain || connectedKalshi;
2341
- return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-6", children: [
2342
- /* @__PURE__ */ jsx19("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
2343
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-4", children: [
2344
- /* @__PURE__ */ jsx19(
2549
+ return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-6", children: [
2550
+ /* @__PURE__ */ jsx18("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
2551
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-4", children: [
2552
+ /* @__PURE__ */ jsx18(
2345
2553
  VenueCard,
2346
2554
  {
2347
- logos: /* @__PURE__ */ jsx19(OnchainVenueLogos, {}),
2555
+ logos: /* @__PURE__ */ jsx18(OnchainVenueLogos, {}),
2348
2556
  title: labels.onboarding.connectAccounts.onchainTitle,
2349
2557
  mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
2350
2558
  ONCHAIN_VENUES.length - 1
@@ -2355,10 +2563,10 @@ var ConnectAccountsStep = ({
2355
2563
  connected: connectedOnchain
2356
2564
  }
2357
2565
  ),
2358
- /* @__PURE__ */ jsx19(
2566
+ /* @__PURE__ */ jsx18(
2359
2567
  VenueCard,
2360
2568
  {
2361
- logos: /* @__PURE__ */ jsx19("div", { className: "sm:flex sm:w-14 sm:items-center sm:justify-center", children: /* @__PURE__ */ jsx19(
2569
+ logos: /* @__PURE__ */ jsx18("div", { className: "sm:flex sm:w-14 sm:items-center sm:justify-center", children: /* @__PURE__ */ jsx18(
2362
2570
  VenueLogo,
2363
2571
  {
2364
2572
  venue: Venue2.kalshi,
@@ -2376,7 +2584,7 @@ var ConnectAccountsStep = ({
2376
2584
  }
2377
2585
  )
2378
2586
  ] }),
2379
- /* @__PURE__ */ jsx19(
2587
+ /* @__PURE__ */ jsx18(
2380
2588
  Button,
2381
2589
  {
2382
2590
  variant: "primary",
@@ -2393,25 +2601,25 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
2393
2601
 
2394
2602
  // src/onboarding/steps/connect-kalshi-modal.tsx
2395
2603
  import { Venue as Venue3 } from "@agg-build/sdk";
2396
- import { useCallback as useCallback4, useState as useState7 } from "react";
2397
- import { useLabels as useLabels18 } from "@agg-build/hooks";
2604
+ import { useCallback as useCallback3, useState as useState7 } from "react";
2605
+ import { useLabels as useLabels17 } from "@agg-build/hooks";
2398
2606
  import * as Dialog from "@radix-ui/react-dialog";
2399
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
2607
+ import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
2400
2608
  var ConnectKalshiModal = ({
2401
2609
  open,
2402
2610
  onOpenChange,
2403
2611
  onVerify
2404
2612
  }) => {
2405
- const labels = useLabels18();
2613
+ const labels = useLabels17();
2406
2614
  const [apiKeyId, setApiKeyId] = useState7("");
2407
2615
  const [privateKey, setPrivateKey] = useState7("");
2408
2616
  const [verifying, setVerifying] = useState7(false);
2409
2617
  const [error, setError] = useState7();
2410
2618
  const canVerify = apiKeyId.trim().length > 0 && privateKey.trim().length > 0;
2411
- const handleCancel = useCallback4(() => {
2619
+ const handleCancel = useCallback3(() => {
2412
2620
  onOpenChange(false);
2413
2621
  }, [onOpenChange]);
2414
- const handleVerify = useCallback4(() => __async(null, null, function* () {
2622
+ const handleVerify = useCallback3(() => __async(null, null, function* () {
2415
2623
  if (!canVerify || verifying) return;
2416
2624
  setVerifying(true);
2417
2625
  setError(void 0);
@@ -2440,7 +2648,7 @@ var ConnectKalshiModal = ({
2440
2648
  privateKey,
2441
2649
  verifying
2442
2650
  ]);
2443
- const handleOpenChange = useCallback4(
2651
+ const handleOpenChange = useCallback3(
2444
2652
  (value) => {
2445
2653
  if (value) {
2446
2654
  setApiKeyId("");
@@ -2452,15 +2660,15 @@ var ConnectKalshiModal = ({
2452
2660
  },
2453
2661
  [onOpenChange]
2454
2662
  );
2455
- return /* @__PURE__ */ jsx20(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs20(
2663
+ return /* @__PURE__ */ jsx19(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs19(
2456
2664
  Modal.Container,
2457
2665
  {
2458
2666
  maxWidth: "600px",
2459
2667
  "aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
2460
2668
  classNames: { container: "!rounded-agg-lg" },
2461
2669
  children: [
2462
- /* @__PURE__ */ jsx20(Dialog.Title, { className: "sr-only", children: labels.onboarding.connectKalshiModal.title }),
2463
- /* @__PURE__ */ jsx20(
2670
+ /* @__PURE__ */ jsx19(Dialog.Title, { className: "sr-only", children: labels.onboarding.connectKalshiModal.title }),
2671
+ /* @__PURE__ */ jsx19(
2464
2672
  Modal.Header,
2465
2673
  {
2466
2674
  hideClose: false,
@@ -2471,8 +2679,8 @@ var ConnectKalshiModal = ({
2471
2679
  }
2472
2680
  }
2473
2681
  ),
2474
- /* @__PURE__ */ jsx20(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-8 items-center", children: [
2475
- /* @__PURE__ */ jsx20(
2682
+ /* @__PURE__ */ jsx19(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-8 items-center", children: [
2683
+ /* @__PURE__ */ jsx19(
2476
2684
  VenueLogo,
2477
2685
  {
2478
2686
  venue: Venue3.kalshi,
@@ -2481,54 +2689,54 @@ var ConnectKalshiModal = ({
2481
2689
  className: "h-[60px] w-[60px]"
2482
2690
  }
2483
2691
  ),
2484
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4 items-center text-center", children: [
2485
- /* @__PURE__ */ jsx20("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
2486
- /* @__PURE__ */ jsx20("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
2692
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-4 items-center text-center", children: [
2693
+ /* @__PURE__ */ jsx19("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
2694
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
2487
2695
  ] }),
2488
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4 w-full", children: [
2489
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
2490
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
2491
- /* @__PURE__ */ jsx20("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
2492
- /* @__PURE__ */ jsx20("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
2696
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-4 w-full", children: [
2697
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
2698
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1", children: [
2699
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
2700
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
2493
2701
  ] }),
2494
- /* @__PURE__ */ jsxs20("div", { className: "space-y-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
2495
- /* @__PURE__ */ jsx20("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
2496
- /* @__PURE__ */ jsxs20("p", { children: [
2702
+ /* @__PURE__ */ jsxs19("div", { className: "space-y-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
2703
+ /* @__PURE__ */ jsx19("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
2704
+ /* @__PURE__ */ jsxs19("p", { children: [
2497
2705
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
2498
2706
  " ",
2499
- /* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
2707
+ /* @__PURE__ */ jsx19("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
2500
2708
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
2501
2709
  " ",
2502
- /* @__PURE__ */ jsx20("span", { className: "text-agg-foreground underline", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl })
2710
+ /* @__PURE__ */ jsx19("span", { className: "text-agg-foreground underline", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl })
2503
2711
  ] }),
2504
- /* @__PURE__ */ jsxs20("p", { children: [
2712
+ /* @__PURE__ */ jsxs19("p", { children: [
2505
2713
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
2506
2714
  " ",
2507
- /* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
2715
+ /* @__PURE__ */ jsx19("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
2508
2716
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
2509
2717
  ] }),
2510
- /* @__PURE__ */ jsxs20("p", { children: [
2718
+ /* @__PURE__ */ jsxs19("p", { children: [
2511
2719
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
2512
2720
  " ",
2513
- /* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
2721
+ /* @__PURE__ */ jsx19("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
2514
2722
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
2515
2723
  ] }),
2516
- /* @__PURE__ */ jsx20("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
2724
+ /* @__PURE__ */ jsx19("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
2517
2725
  ] }),
2518
- /* @__PURE__ */ jsxs20("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
2726
+ /* @__PURE__ */ jsxs19("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
2519
2727
  labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
2520
- /* @__PURE__ */ jsx20("br", {}),
2728
+ /* @__PURE__ */ jsx19("br", {}),
2521
2729
  labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
2522
2730
  ] })
2523
2731
  ] }),
2524
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
2525
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
2526
- /* @__PURE__ */ jsx20("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
2527
- /* @__PURE__ */ jsx20("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
2732
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
2733
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1", children: [
2734
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
2735
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
2528
2736
  ] }),
2529
- /* @__PURE__ */ jsx20("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
2530
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", children: [
2531
- /* @__PURE__ */ jsx20(
2737
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
2738
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
2739
+ /* @__PURE__ */ jsx19(
2532
2740
  "label",
2533
2741
  {
2534
2742
  htmlFor: "kalshi-api-key-id",
@@ -2536,7 +2744,7 @@ var ConnectKalshiModal = ({
2536
2744
  children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
2537
2745
  }
2538
2746
  ),
2539
- /* @__PURE__ */ jsx20(
2747
+ /* @__PURE__ */ jsx19(
2540
2748
  "input",
2541
2749
  {
2542
2750
  id: "kalshi-api-key-id",
@@ -2556,8 +2764,8 @@ var ConnectKalshiModal = ({
2556
2764
  }
2557
2765
  )
2558
2766
  ] }),
2559
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", children: [
2560
- /* @__PURE__ */ jsx20(
2767
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
2768
+ /* @__PURE__ */ jsx19(
2561
2769
  "label",
2562
2770
  {
2563
2771
  htmlFor: "kalshi-private-key",
@@ -2565,7 +2773,7 @@ var ConnectKalshiModal = ({
2565
2773
  children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
2566
2774
  }
2567
2775
  ),
2568
- /* @__PURE__ */ jsx20(
2776
+ /* @__PURE__ */ jsx19(
2569
2777
  "textarea",
2570
2778
  {
2571
2779
  id: "kalshi-private-key",
@@ -2587,42 +2795,42 @@ var ConnectKalshiModal = ({
2587
2795
  ] })
2588
2796
  ] })
2589
2797
  ] }),
2590
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between w-full", children: [
2591
- /* @__PURE__ */ jsx20("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
2592
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3", children: [
2593
- /* @__PURE__ */ jsxs20(
2798
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between w-full", children: [
2799
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
2800
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-3", children: [
2801
+ /* @__PURE__ */ jsxs19(
2594
2802
  "a",
2595
2803
  {
2596
2804
  href: "#",
2597
2805
  className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
2598
2806
  children: [
2599
- /* @__PURE__ */ jsx20(DocumentIcon, { className: "h-4 w-4" }),
2807
+ /* @__PURE__ */ jsx19(DocumentIcon, { className: "h-4 w-4" }),
2600
2808
  labels.onboarding.connectKalshiModal.help.docsLinkLabel
2601
2809
  ]
2602
2810
  }
2603
2811
  ),
2604
- /* @__PURE__ */ jsx20("span", { className: "h-3 w-px bg-agg-separator" }),
2605
- /* @__PURE__ */ jsxs20(
2812
+ /* @__PURE__ */ jsx19("span", { className: "h-3 w-px bg-agg-separator" }),
2813
+ /* @__PURE__ */ jsxs19(
2606
2814
  "a",
2607
2815
  {
2608
2816
  href: "#",
2609
2817
  className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
2610
2818
  children: [
2611
- /* @__PURE__ */ jsx20(PlaySquareIcon, { className: "h-4 w-4" }),
2819
+ /* @__PURE__ */ jsx19(PlaySquareIcon, { className: "h-4 w-4" }),
2612
2820
  labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
2613
2821
  ]
2614
2822
  }
2615
2823
  )
2616
2824
  ] })
2617
2825
  ] }),
2618
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-5 items-center", children: [
2619
- error ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2620
- /* @__PURE__ */ jsx20(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
2621
- /* @__PURE__ */ jsx20("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
2826
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-5 items-center", children: [
2827
+ error ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
2828
+ /* @__PURE__ */ jsx19(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
2829
+ /* @__PURE__ */ jsx19("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
2622
2830
  ] }) : null,
2623
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3 justify-center", children: [
2624
- /* @__PURE__ */ jsx20(Button, { variant: "secondary", size: "large", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
2625
- /* @__PURE__ */ jsx20(
2831
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-3 justify-center", children: [
2832
+ /* @__PURE__ */ jsx19(Button, { variant: "secondary", size: "large", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
2833
+ /* @__PURE__ */ jsx19(
2626
2834
  Button,
2627
2835
  {
2628
2836
  variant: "primary",
@@ -2643,22 +2851,22 @@ var ConnectKalshiModal = ({
2643
2851
  ConnectKalshiModal.displayName = "ConnectKalshiModal";
2644
2852
 
2645
2853
  // src/onboarding/steps/connect-onchain-modal.tsx
2646
- import { useCallback as useCallback5, useState as useState8 } from "react";
2647
- import { useLabels as useLabels19 } from "@agg-build/hooks";
2854
+ import { useCallback as useCallback4, useState as useState8 } from "react";
2855
+ import { useLabels as useLabels18 } from "@agg-build/hooks";
2648
2856
  import * as Dialog2 from "@radix-ui/react-dialog";
2649
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
2857
+ import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
2650
2858
  var ConnectOnchainModal = ({
2651
2859
  open,
2652
2860
  onOpenChange,
2653
2861
  onConnect
2654
2862
  }) => {
2655
- const labels = useLabels19();
2863
+ const labels = useLabels18();
2656
2864
  const [connecting, setConnecting] = useState8(false);
2657
2865
  const [error, setError] = useState8();
2658
- const handleCancel = useCallback5(() => {
2866
+ const handleCancel = useCallback4(() => {
2659
2867
  onOpenChange(false);
2660
2868
  }, [onOpenChange]);
2661
- const handleConnect = useCallback5(() => __async(null, null, function* () {
2869
+ const handleConnect = useCallback4(() => __async(null, null, function* () {
2662
2870
  if (connecting) return;
2663
2871
  setConnecting(true);
2664
2872
  setError(void 0);
@@ -2673,7 +2881,7 @@ var ConnectOnchainModal = ({
2673
2881
  setConnecting(false);
2674
2882
  }
2675
2883
  }), [connecting, labels.onboarding.connectOnchainModal.fallbackError, onConnect, onOpenChange]);
2676
- const handleOpenChange = useCallback5(
2884
+ const handleOpenChange = useCallback4(
2677
2885
  (value) => {
2678
2886
  if (value) {
2679
2887
  setError(void 0);
@@ -2683,15 +2891,15 @@ var ConnectOnchainModal = ({
2683
2891
  },
2684
2892
  [onOpenChange]
2685
2893
  );
2686
- return /* @__PURE__ */ jsx21(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs21(
2894
+ return /* @__PURE__ */ jsx20(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs20(
2687
2895
  Modal.Container,
2688
2896
  {
2689
2897
  maxWidth: "600px",
2690
2898
  "aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
2691
2899
  classNames: { container: "!rounded-agg-lg" },
2692
2900
  children: [
2693
- /* @__PURE__ */ jsx21(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
2694
- /* @__PURE__ */ jsx21(
2901
+ /* @__PURE__ */ jsx20(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
2902
+ /* @__PURE__ */ jsx20(
2695
2903
  Modal.Header,
2696
2904
  {
2697
2905
  hideClose: false,
@@ -2702,26 +2910,26 @@ var ConnectOnchainModal = ({
2702
2910
  }
2703
2911
  }
2704
2912
  ),
2705
- /* @__PURE__ */ jsx21(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-8 items-center", children: [
2706
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-4 items-center text-center", children: [
2707
- /* @__PURE__ */ jsx21("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
2708
- /* @__PURE__ */ jsx21("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
2913
+ /* @__PURE__ */ jsx20(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-8 items-center", children: [
2914
+ /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4 items-center text-center", children: [
2915
+ /* @__PURE__ */ jsx20("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
2916
+ /* @__PURE__ */ jsx20("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
2709
2917
  ] }),
2710
- /* @__PURE__ */ jsxs21("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
2711
- /* @__PURE__ */ jsx21("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
2712
- /* @__PURE__ */ jsx21("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-[6px]", children: [
2713
- index > 0 && /* @__PURE__ */ jsx21("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
2714
- /* @__PURE__ */ jsx21(VenueLogo, { venue, size: "medium" }),
2715
- /* @__PURE__ */ jsx21("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
2918
+ /* @__PURE__ */ jsxs20("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
2919
+ /* @__PURE__ */ jsx20("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
2920
+ /* @__PURE__ */ jsx20("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-[6px]", children: [
2921
+ index > 0 && /* @__PURE__ */ jsx20("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
2922
+ /* @__PURE__ */ jsx20(VenueLogo, { venue, size: "medium" }),
2923
+ /* @__PURE__ */ jsx20("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
2716
2924
  ] }, venue)) })
2717
2925
  ] }),
2718
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-6 items-center", children: [
2719
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-3 items-center", children: [
2720
- error ? /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
2721
- /* @__PURE__ */ jsx21(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
2722
- /* @__PURE__ */ jsx21("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
2926
+ /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-6 items-center", children: [
2927
+ /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-3 items-center", children: [
2928
+ error ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2929
+ /* @__PURE__ */ jsx20(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
2930
+ /* @__PURE__ */ jsx20("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
2723
2931
  ] }) : null,
2724
- /* @__PURE__ */ jsx21(
2932
+ /* @__PURE__ */ jsx20(
2725
2933
  Button,
2726
2934
  {
2727
2935
  variant: "primary",
@@ -2732,7 +2940,7 @@ var ConnectOnchainModal = ({
2732
2940
  }
2733
2941
  )
2734
2942
  ] }),
2735
- /* @__PURE__ */ jsx21(
2943
+ /* @__PURE__ */ jsx20(
2736
2944
  Button,
2737
2945
  {
2738
2946
  variant: "tertiary",
@@ -2751,7 +2959,7 @@ var ConnectOnchainModal = ({
2751
2959
  ConnectOnchainModal.displayName = "ConnectOnchainModal";
2752
2960
 
2753
2961
  // src/onboarding/index.tsx
2754
- import { Fragment as Fragment10, jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
2962
+ import { Fragment as Fragment9, jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
2755
2963
  var OnboardingModal = ({
2756
2964
  open,
2757
2965
  onOpenChange,
@@ -2764,7 +2972,7 @@ var OnboardingModal = ({
2764
2972
  connectedKalshi = false
2765
2973
  }) => {
2766
2974
  var _a;
2767
- const labels = useLabels20();
2975
+ const labels = useLabels19();
2768
2976
  const [step, setStep] = useState9(ONBOARDING_STEPS.HOW_IT_WORKS);
2769
2977
  const stepLabels = {
2770
2978
  [ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
@@ -2776,56 +2984,56 @@ var OnboardingModal = ({
2776
2984
  const [kalshiConnected, setKalshiConnected] = useState9(false);
2777
2985
  const [onchainModalOpen, setOnchainModalOpen] = useState9(false);
2778
2986
  const [onchainConnected, setOnchainConnected] = useState9(false);
2779
- useEffect4(() => {
2987
+ useEffect6(() => {
2780
2988
  if (open) {
2781
2989
  setStep(ONBOARDING_STEPS.HOW_IT_WORKS);
2782
2990
  setKalshiConnected(false);
2783
2991
  setOnchainConnected(false);
2784
2992
  }
2785
2993
  }, [open]);
2786
- const handleHowItWorksContinue = useCallback6(() => {
2994
+ const handleHowItWorksContinue = useCallback5(() => {
2787
2995
  setStep(ONBOARDING_STEPS.PROFILE_SETUP);
2788
2996
  }, []);
2789
- const handleProfileContinue = useCallback6(
2997
+ const handleProfileContinue = useCallback5(
2790
2998
  (data) => {
2791
2999
  onProfileSubmit == null ? void 0 : onProfileSubmit(data);
2792
3000
  setStep(ONBOARDING_STEPS.CONNECT_ACCOUNTS);
2793
3001
  },
2794
3002
  [onProfileSubmit]
2795
3003
  );
2796
- const handleConnectContinue = useCallback6(() => {
3004
+ const handleConnectContinue = useCallback5(() => {
2797
3005
  onComplete == null ? void 0 : onComplete();
2798
3006
  }, [onComplete]);
2799
- const handleOpenOnchainModal = useCallback6(() => {
3007
+ const handleOpenOnchainModal = useCallback5(() => {
2800
3008
  setOnchainModalOpen(true);
2801
3009
  }, []);
2802
- const handleOnchainConnect = useCallback6(() => __async(null, null, function* () {
3010
+ const handleOnchainConnect = useCallback5(() => __async(null, null, function* () {
2803
3011
  yield onConnectOnchain == null ? void 0 : onConnectOnchain();
2804
3012
  setOnchainConnected(true);
2805
3013
  }), [onConnectOnchain]);
2806
- const handleOpenKalshiModal = useCallback6(() => {
3014
+ const handleOpenKalshiModal = useCallback5(() => {
2807
3015
  setKalshiModalOpen(true);
2808
3016
  }, []);
2809
- const handleKalshiVerify = useCallback6(
3017
+ const handleKalshiVerify = useCallback5(
2810
3018
  (credentials) => __async(null, null, function* () {
2811
3019
  yield onConnectKalshi == null ? void 0 : onConnectKalshi(credentials);
2812
3020
  setKalshiConnected(true);
2813
3021
  }),
2814
3022
  [onConnectKalshi]
2815
3023
  );
2816
- return /* @__PURE__ */ jsxs22(Fragment10, { children: [
2817
- /* @__PURE__ */ jsx22(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs22(
3024
+ return /* @__PURE__ */ jsxs21(Fragment9, { children: [
3025
+ /* @__PURE__ */ jsx21(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs21(
2818
3026
  Modal.Container,
2819
3027
  {
2820
3028
  maxWidth: "600px",
2821
3029
  "aria-label": resolvedTitle,
2822
3030
  classNames: { container: "!rounded-agg-lg" },
2823
3031
  children: [
2824
- /* @__PURE__ */ jsx22(Dialog3.Title, { className: "sr-only", children: resolvedTitle }),
2825
- /* @__PURE__ */ jsxs22(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
2826
- step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ jsx22(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
2827
- step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ jsx22(ProfileSetupStep, { onContinue: handleProfileContinue }),
2828
- step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ jsx22(
3032
+ /* @__PURE__ */ jsx21(Dialog3.Title, { className: "sr-only", children: resolvedTitle }),
3033
+ /* @__PURE__ */ jsxs21(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
3034
+ step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ jsx21(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
3035
+ step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ jsx21(ProfileSetupStep, { onContinue: handleProfileContinue }),
3036
+ step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ jsx21(
2829
3037
  ConnectAccountsStep,
2830
3038
  {
2831
3039
  onConnectOnchain: handleOpenOnchainModal,
@@ -2839,7 +3047,7 @@ var OnboardingModal = ({
2839
3047
  ]
2840
3048
  }
2841
3049
  ) }),
2842
- /* @__PURE__ */ jsx22(
3050
+ /* @__PURE__ */ jsx21(
2843
3051
  ConnectOnchainModal,
2844
3052
  {
2845
3053
  open: onchainModalOpen,
@@ -2847,7 +3055,7 @@ var OnboardingModal = ({
2847
3055
  onConnect: handleOnchainConnect
2848
3056
  }
2849
3057
  ),
2850
- /* @__PURE__ */ jsx22(
3058
+ /* @__PURE__ */ jsx21(
2851
3059
  ConnectKalshiModal,
2852
3060
  {
2853
3061
  open: kalshiModalOpen,
@@ -2861,7 +3069,7 @@ OnboardingModal.displayName = "OnboardingModal";
2861
3069
 
2862
3070
  // src/profile/index.tsx
2863
3071
  import { Venue as Venue4 } from "@agg-build/sdk";
2864
- import { useState as useState11, useEffect as useEffect6, useCallback as useCallback9, useMemo as useMemo3 } from "react";
3072
+ import { useState as useState11, useEffect as useEffect8, useCallback as useCallback8, useMemo as useMemo2 } from "react";
2865
3073
  import { useAggClient as useAggClient2, useAggAuthState as useAggAuthState2 } from "@agg-build/hooks";
2866
3074
 
2867
3075
  // src/profile/profile-modal.constants.ts
@@ -2879,9 +3087,9 @@ var PROFILE_TAB_ITEMS = [
2879
3087
  ];
2880
3088
 
2881
3089
  // src/profile/tabs/about-tab.tsx
2882
- import { useCallback as useCallback7, useRef as useRef4 } from "react";
2883
- import { useLabels as useLabels21 } from "@agg-build/hooks";
2884
- import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
3090
+ import { useCallback as useCallback6, useRef as useRef4 } from "react";
3091
+ import { useLabels as useLabels20 } from "@agg-build/hooks";
3092
+ import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
2885
3093
  var AboutTab = ({
2886
3094
  avatarPreview,
2887
3095
  onDeleteProfile: _onDeleteProfile,
@@ -2891,13 +3099,13 @@ var AboutTab = ({
2891
3099
  draftAvatarPreview,
2892
3100
  avatarError: _avatarError
2893
3101
  }) => {
2894
- const labels = useLabels21();
3102
+ const labels = useLabels20();
2895
3103
  const fileInputRef = useRef4(null);
2896
- const handleAvatarClick = useCallback7(() => {
3104
+ const handleAvatarClick = useCallback6(() => {
2897
3105
  var _a;
2898
3106
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
2899
3107
  }, []);
2900
- const handleFileChange = useCallback7(
3108
+ const handleFileChange = useCallback6(
2901
3109
  (e) => {
2902
3110
  var _a;
2903
3111
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
@@ -2913,9 +3121,9 @@ var AboutTab = ({
2913
3121
  );
2914
3122
  const resolvedPreview = draftAvatarPreview != null ? draftAvatarPreview : avatarPreview;
2915
3123
  const hasAvatarPreview = Boolean(resolvedPreview);
2916
- return /* @__PURE__ */ jsxs23("div", { className: "agg-profile-about flex flex-col gap-8", children: [
2917
- /* @__PURE__ */ jsxs23("div", { className: "agg-profile-avatar-section flex w-full flex-col items-stretch sm:items-start", children: [
2918
- /* @__PURE__ */ jsxs23(
3124
+ return /* @__PURE__ */ jsxs22("div", { className: "agg-profile-about flex flex-col gap-8", children: [
3125
+ /* @__PURE__ */ jsxs22("div", { className: "agg-profile-avatar-section flex w-full flex-col items-stretch sm:items-start", children: [
3126
+ /* @__PURE__ */ jsxs22(
2919
3127
  "button",
2920
3128
  {
2921
3129
  type: "button",
@@ -2932,13 +3140,13 @@ var AboutTab = ({
2932
3140
  ),
2933
3141
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
2934
3142
  children: [
2935
- !hasAvatarPreview ? /* @__PURE__ */ jsx23(
3143
+ !hasAvatarPreview ? /* @__PURE__ */ jsx22(
2936
3144
  "svg",
2937
3145
  {
2938
3146
  "aria-hidden": true,
2939
3147
  viewBox: "0 0 80 80",
2940
3148
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
2941
- children: /* @__PURE__ */ jsx23(
3149
+ children: /* @__PURE__ */ jsx22(
2942
3150
  "circle",
2943
3151
  {
2944
3152
  cx: "40",
@@ -2952,18 +3160,18 @@ var AboutTab = ({
2952
3160
  )
2953
3161
  }
2954
3162
  ) : null,
2955
- resolvedPreview ? /* @__PURE__ */ jsx23(
3163
+ resolvedPreview ? /* @__PURE__ */ jsx22(
2956
3164
  RemoteImage,
2957
3165
  {
2958
3166
  src: resolvedPreview,
2959
3167
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
2960
3168
  className: "h-full w-full object-cover"
2961
3169
  }
2962
- ) : /* @__PURE__ */ jsx23(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
3170
+ ) : /* @__PURE__ */ jsx22(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
2963
3171
  ]
2964
3172
  }
2965
3173
  ),
2966
- /* @__PURE__ */ jsx23(
3174
+ /* @__PURE__ */ jsx22(
2967
3175
  "input",
2968
3176
  {
2969
3177
  ref: fileInputRef,
@@ -2975,8 +3183,8 @@ var AboutTab = ({
2975
3183
  }
2976
3184
  )
2977
3185
  ] }),
2978
- /* @__PURE__ */ jsxs23("div", { className: "agg-form-section flex flex-col gap-2", children: [
2979
- /* @__PURE__ */ jsx23(
3186
+ /* @__PURE__ */ jsxs22("div", { className: "agg-form-section flex flex-col gap-2", children: [
3187
+ /* @__PURE__ */ jsx22(
2980
3188
  "label",
2981
3189
  {
2982
3190
  htmlFor: "profile-username",
@@ -2984,7 +3192,7 @@ var AboutTab = ({
2984
3192
  children: "Username"
2985
3193
  }
2986
3194
  ),
2987
- /* @__PURE__ */ jsx23(
3195
+ /* @__PURE__ */ jsx22(
2988
3196
  "input",
2989
3197
  {
2990
3198
  id: "profile-username",
@@ -3011,11 +3219,11 @@ var AboutTab = ({
3011
3219
  AboutTab.displayName = "AboutTab";
3012
3220
 
3013
3221
  // src/profile/tabs/accounts-wallets-tab.tsx
3014
- import { useCallback as useCallback8, useEffect as useEffect5, useState as useState10 } from "react";
3222
+ import { useCallback as useCallback7, useEffect as useEffect7, useState as useState10 } from "react";
3015
3223
  import { useAggClient, useDepositAddresses as useDepositAddresses2 } from "@agg-build/hooks";
3016
- import { jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
3017
- var SectionTitle = ({ children }) => /* @__PURE__ */ jsx24("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
3018
- var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx24(
3224
+ import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
3225
+ var SectionTitle = ({ children }) => /* @__PURE__ */ jsx23("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
3226
+ var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx23(
3019
3227
  "div",
3020
3228
  {
3021
3229
  className: cn(
@@ -3027,7 +3235,7 @@ var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx24(
3027
3235
  children
3028
3236
  }
3029
3237
  );
3030
- var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx24(
3238
+ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx23(
3031
3239
  "button",
3032
3240
  {
3033
3241
  type: "button",
@@ -3036,7 +3244,7 @@ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx24(
3036
3244
  children: "Connect"
3037
3245
  }
3038
3246
  );
3039
- var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx24(
3247
+ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx23(
3040
3248
  "button",
3041
3249
  {
3042
3250
  type: "button",
@@ -3054,7 +3262,7 @@ var VerifyIdentityButton = ({ onError }) => {
3054
3262
  enabled: needsDepositAddress,
3055
3263
  poll: true
3056
3264
  });
3057
- useEffect5(() => {
3265
+ useEffect7(() => {
3058
3266
  if (!isInitiating || !isReady) return;
3059
3267
  const redirectUri = window.location.href;
3060
3268
  client.initiateKyc("kalshi", redirectUri).then((res) => {
@@ -3068,25 +3276,25 @@ var VerifyIdentityButton = ({ onError }) => {
3068
3276
  setNeedsDepositAddress(false);
3069
3277
  });
3070
3278
  }, [isReady, isInitiating, client, onError]);
3071
- useEffect5(() => {
3279
+ useEffect7(() => {
3072
3280
  if (isTimedOut && isInitiating) {
3073
3281
  setIsInitiating(false);
3074
3282
  setNeedsDepositAddress(false);
3075
3283
  onError == null ? void 0 : onError(new Error("Deposit address provisioning timed out"));
3076
3284
  }
3077
3285
  }, [isTimedOut, isInitiating, onError]);
3078
- const handleClick = useCallback8(() => {
3286
+ const handleClick = useCallback7(() => {
3079
3287
  setIsInitiating(true);
3080
3288
  setNeedsDepositAddress(true);
3081
3289
  }, []);
3082
- return /* @__PURE__ */ jsx24(
3290
+ return /* @__PURE__ */ jsx23(
3083
3291
  "button",
3084
3292
  {
3085
3293
  type: "button",
3086
3294
  disabled: isInitiating,
3087
3295
  onClick: handleClick,
3088
3296
  className: "shrink-0 cursor-pointer text-agg-sm font-agg-bold leading-agg-5 text-agg-primary whitespace-nowrap disabled:cursor-not-allowed disabled:opacity-60",
3089
- children: isInitiating ? /* @__PURE__ */ jsx24("span", { className: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : "Verify Identity"
3297
+ children: isInitiating ? /* @__PURE__ */ jsx23("span", { className: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : "Verify Identity"
3090
3298
  }
3091
3299
  );
3092
3300
  };
@@ -3094,26 +3302,26 @@ var TradingAccessSection = ({
3094
3302
  venueAccounts,
3095
3303
  onKycError
3096
3304
  }) => {
3097
- return /* @__PURE__ */ jsxs24("div", { className: "agg-trading-access-section flex flex-col gap-3", children: [
3098
- /* @__PURE__ */ jsx24(SectionTitle, { children: "Trading access" }),
3099
- /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-2", children: TRADING_ACCESS_VENUES.map((venue) => {
3305
+ return /* @__PURE__ */ jsxs23("div", { className: "agg-trading-access-section flex flex-col gap-3", children: [
3306
+ /* @__PURE__ */ jsx23(SectionTitle, { children: "Trading access" }),
3307
+ /* @__PURE__ */ jsx23("div", { className: "flex flex-col gap-2", children: TRADING_ACCESS_VENUES.map((venue) => {
3100
3308
  var _a;
3101
3309
  const venueAccount = venueAccounts == null ? void 0 : venueAccounts.find((va) => va.venue === venue);
3102
3310
  const isKalshi = venue === "kalshi";
3103
3311
  const isVerified = (venueAccount == null ? void 0 : venueAccount.kycStatus) === "verified";
3104
3312
  const displayName = (_a = venueLogoLabels[venue]) != null ? _a : venue;
3105
- return /* @__PURE__ */ jsxs24(AccountRow, { children: [
3106
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
3107
- /* @__PURE__ */ jsx24(VenueLogo, { venue, size: "small" }),
3108
- /* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: displayName })
3313
+ return /* @__PURE__ */ jsxs23(AccountRow, { children: [
3314
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
3315
+ /* @__PURE__ */ jsx23(VenueLogo, { venue, size: "small" }),
3316
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: displayName })
3109
3317
  ] }),
3110
- isKalshi && !isVerified ? /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
3111
- /* @__PURE__ */ jsx24("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: "KYC required" }),
3112
- /* @__PURE__ */ jsx24(VerifyIdentityButton, { onError: onKycError })
3113
- ] }) : isKalshi && isVerified ? /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
3114
- /* @__PURE__ */ jsx24("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: "Verified" }),
3115
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
3116
- /* @__PURE__ */ jsx24(
3318
+ isKalshi && !isVerified ? /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-4", children: [
3319
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: "KYC required" }),
3320
+ /* @__PURE__ */ jsx23(VerifyIdentityButton, { onError: onKycError })
3321
+ ] }) : isKalshi && isVerified ? /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-4", children: [
3322
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: "Verified" }),
3323
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
3324
+ /* @__PURE__ */ jsx23(
3117
3325
  Icon,
3118
3326
  {
3119
3327
  name: "check-badge",
@@ -3121,11 +3329,11 @@ var TradingAccessSection = ({
3121
3329
  color: "var(--agg-color-primary, #536dfe)"
3122
3330
  }
3123
3331
  ),
3124
- /* @__PURE__ */ jsx24("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: "Available" })
3332
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: "Available" })
3125
3333
  ] })
3126
- ] }) : /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
3127
- /* @__PURE__ */ jsx24(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" }),
3128
- /* @__PURE__ */ jsx24("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: "Available" })
3334
+ ] }) : /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
3335
+ /* @__PURE__ */ jsx23(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" }),
3336
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: "Available" })
3129
3337
  ] })
3130
3338
  ] }, venue);
3131
3339
  }) })
@@ -3153,37 +3361,37 @@ var AccountsWalletsTab = ({
3153
3361
  const twitter = socialAccounts == null ? void 0 : socialAccounts.twitter;
3154
3362
  const google = socialAccounts == null ? void 0 : socialAccounts.google;
3155
3363
  const apple = socialAccounts == null ? void 0 : socialAccounts.apple;
3156
- return /* @__PURE__ */ jsxs24("div", { className: "agg-accounts-wallets-tab flex flex-col gap-8", children: [
3157
- /* @__PURE__ */ jsx24(TradingAccessSection, { venueAccounts, onKycError }),
3158
- /* @__PURE__ */ jsxs24("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
3159
- /* @__PURE__ */ jsx24(SectionTitle, { children: "Social Accounts" }),
3160
- /* @__PURE__ */ jsxs24("div", { className: "agg-social-accounts-list flex flex-col gap-2", children: [
3161
- /* @__PURE__ */ jsxs24(AccountRow, { className: "agg-social-account-row", children: [
3162
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
3163
- /* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "google", size: "small", color: "currentColor" }) }),
3164
- /* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Google" })
3364
+ return /* @__PURE__ */ jsxs23("div", { className: "agg-accounts-wallets-tab flex flex-col gap-8", children: [
3365
+ /* @__PURE__ */ jsx23(TradingAccessSection, { venueAccounts, onKycError }),
3366
+ /* @__PURE__ */ jsxs23("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
3367
+ /* @__PURE__ */ jsx23(SectionTitle, { children: "Social Accounts" }),
3368
+ /* @__PURE__ */ jsxs23("div", { className: "agg-social-accounts-list flex flex-col gap-2", children: [
3369
+ /* @__PURE__ */ jsxs23(AccountRow, { className: "agg-social-account-row", children: [
3370
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
3371
+ /* @__PURE__ */ jsx23("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx23(Icon, { name: "google", size: "small", color: "currentColor" }) }),
3372
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Google" })
3165
3373
  ] }),
3166
- (google == null ? void 0 : google.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectGoogle }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectGoogle })
3374
+ (google == null ? void 0 : google.connected) ? /* @__PURE__ */ jsx23(DisconnectTextButton, { onClick: onDisconnectGoogle }) : /* @__PURE__ */ jsx23(ConnectTextButton, { onClick: onConnectGoogle })
3167
3375
  ] }),
3168
- /* @__PURE__ */ jsxs24(AccountRow, { className: "agg-social-account-row", children: [
3169
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
3170
- /* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "apple", size: "small", color: "currentColor" }) }),
3171
- /* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Apple" })
3376
+ /* @__PURE__ */ jsxs23(AccountRow, { className: "agg-social-account-row", children: [
3377
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
3378
+ /* @__PURE__ */ jsx23("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx23(Icon, { name: "apple", size: "small", color: "currentColor" }) }),
3379
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Apple" })
3172
3380
  ] }),
3173
- (apple == null ? void 0 : apple.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectApple }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectApple })
3381
+ (apple == null ? void 0 : apple.connected) ? /* @__PURE__ */ jsx23(DisconnectTextButton, { onClick: onDisconnectApple }) : /* @__PURE__ */ jsx23(ConnectTextButton, { onClick: onConnectApple })
3174
3382
  ] }),
3175
- /* @__PURE__ */ jsxs24(AccountRow, { className: "agg-social-account-row", children: [
3176
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
3177
- /* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "twitter", size: "small", color: "currentColor" }) }),
3178
- /* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "X (Twitter)" })
3383
+ /* @__PURE__ */ jsxs23(AccountRow, { className: "agg-social-account-row", children: [
3384
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
3385
+ /* @__PURE__ */ jsx23("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx23(Icon, { name: "twitter", size: "small", color: "currentColor" }) }),
3386
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "X (Twitter)" })
3179
3387
  ] }),
3180
- (twitter == null ? void 0 : twitter.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectTwitter }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectTwitter })
3388
+ (twitter == null ? void 0 : twitter.connected) ? /* @__PURE__ */ jsx23(DisconnectTextButton, { onClick: onDisconnectTwitter }) : /* @__PURE__ */ jsx23(ConnectTextButton, { onClick: onConnectTwitter })
3181
3389
  ] })
3182
3390
  ] })
3183
3391
  ] }),
3184
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
3185
- /* @__PURE__ */ jsx24(SectionTitle, { children: "Email Address" }),
3186
- /* @__PURE__ */ jsxs24(
3392
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-3", children: [
3393
+ /* @__PURE__ */ jsx23(SectionTitle, { children: "Email Address" }),
3394
+ /* @__PURE__ */ jsxs23(
3187
3395
  "button",
3188
3396
  {
3189
3397
  type: "button",
@@ -3195,11 +3403,11 @@ var AccountsWalletsTab = ({
3195
3403
  "cursor-pointer hover:bg-agg-secondary-hover"
3196
3404
  ),
3197
3405
  children: [
3198
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
3199
- /* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "email", size: "small", color: "currentColor" }) }),
3200
- /* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: email != null ? email : "Connect email" })
3406
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
3407
+ /* @__PURE__ */ jsx23("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx23(Icon, { name: "email", size: "small", color: "currentColor" }) }),
3408
+ /* @__PURE__ */ jsx23("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: email != null ? email : "Connect email" })
3201
3409
  ] }),
3202
- /* @__PURE__ */ jsx24(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
3410
+ /* @__PURE__ */ jsx23(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
3203
3411
  ]
3204
3412
  }
3205
3413
  )
@@ -3209,7 +3417,7 @@ var AccountsWalletsTab = ({
3209
3417
  AccountsWalletsTab.displayName = "AccountsWalletsTab";
3210
3418
 
3211
3419
  // src/profile/index.tsx
3212
- import { jsx as jsx25, jsxs as jsxs25 } from "react/jsx-runtime";
3420
+ import { jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
3213
3421
  var EVM_WALLET_VENUES = [Venue4.polymarket, Venue4.predict, Venue4.opinion];
3214
3422
  var ProfileModal = ({
3215
3423
  open,
@@ -3247,11 +3455,11 @@ var ProfileModal = ({
3247
3455
  const [draftAvatarPreview, setDraftAvatarPreview] = useState11();
3248
3456
  const [isSaving, setIsSaving] = useState11(false);
3249
3457
  const [avatarTypeError, setAvatarTypeError] = useState11(null);
3250
- useEffect6(() => {
3458
+ useEffect8(() => {
3251
3459
  var _a2;
3252
3460
  setDraftUsername((_a2 = username != null ? username : user == null ? void 0 : user.username) != null ? _a2 : "");
3253
3461
  }, [username, user == null ? void 0 : user.username]);
3254
- const handleOpenChange = useCallback9(
3462
+ const handleOpenChange = useCallback8(
3255
3463
  (isOpen) => {
3256
3464
  var _a2;
3257
3465
  if (!isOpen) {
@@ -3275,7 +3483,7 @@ var ProfileModal = ({
3275
3483
  setDraftAvatarPreview
3276
3484
  ]
3277
3485
  );
3278
- const handleDraftAvatarChange = useCallback9(
3486
+ const handleDraftAvatarChange = useCallback8(
3279
3487
  (file, preview) => {
3280
3488
  const ACCEPTED_AVATAR_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
3281
3489
  if (file && !ACCEPTED_AVATAR_TYPES.includes(file.type)) {
@@ -3290,7 +3498,7 @@ var ProfileModal = ({
3290
3498
  );
3291
3499
  const originalUsername = (_b = username != null ? username : user == null ? void 0 : user.username) != null ? _b : "";
3292
3500
  const hasChanges = draftUsername !== originalUsername || draftAvatarFile !== void 0;
3293
- const handleSave = useCallback9(() => __async(null, null, function* () {
3501
+ const handleSave = useCallback8(() => __async(null, null, function* () {
3294
3502
  var _a2, _b2;
3295
3503
  setIsSaving(true);
3296
3504
  try {
@@ -3335,7 +3543,7 @@ var ProfileModal = ({
3335
3543
  onSave,
3336
3544
  originalUsername
3337
3545
  ]);
3338
- const handleCancel = useCallback9(() => {
3546
+ const handleCancel = useCallback8(() => {
3339
3547
  handleOpenChange(false);
3340
3548
  }, [handleOpenChange]);
3341
3549
  const isAccountConnected = (providers) => {
@@ -3379,7 +3587,7 @@ var ProfileModal = ({
3379
3587
  if (typeof window === "undefined") return;
3380
3588
  ((_a2 = window.top) != null ? _a2 : window).location.assign(url);
3381
3589
  };
3382
- const handleConnectTwitter = useCallback9(() => __async(null, null, function* () {
3590
+ const handleConnectTwitter = useCallback8(() => __async(null, null, function* () {
3383
3591
  const result = yield startAuth({
3384
3592
  provider: "twitter",
3385
3593
  redirectUrl: resolveRedirectUrl()
@@ -3389,7 +3597,7 @@ var ProfileModal = ({
3389
3597
  navigateTopWindow(result.url);
3390
3598
  }
3391
3599
  }), [onConnectTwitter, startAuth]);
3392
- const handleConnectGoogle = useCallback9(() => __async(null, null, function* () {
3600
+ const handleConnectGoogle = useCallback8(() => __async(null, null, function* () {
3393
3601
  const result = yield startAuth({
3394
3602
  provider: "google",
3395
3603
  redirectUrl: resolveRedirectUrl()
@@ -3399,7 +3607,7 @@ var ProfileModal = ({
3399
3607
  navigateTopWindow(result.url);
3400
3608
  }
3401
3609
  }), [onConnectGoogle, startAuth]);
3402
- const handleConnectApple = useCallback9(() => __async(null, null, function* () {
3610
+ const handleConnectApple = useCallback8(() => __async(null, null, function* () {
3403
3611
  const result = yield startAuth({
3404
3612
  provider: "apple",
3405
3613
  redirectUrl: resolveRedirectUrl()
@@ -3409,22 +3617,22 @@ var ProfileModal = ({
3409
3617
  navigateTopWindow(result.url);
3410
3618
  }
3411
3619
  }), [onConnectApple, startAuth]);
3412
- const handleDisconnectTwitter = useCallback9(() => __async(null, null, function* () {
3620
+ const handleDisconnectTwitter = useCallback8(() => __async(null, null, function* () {
3413
3621
  yield client.disconnectAccount("twitter");
3414
3622
  yield client.getCurrentUser();
3415
3623
  onDisconnectTwitter == null ? void 0 : onDisconnectTwitter();
3416
3624
  }), [client, onDisconnectTwitter]);
3417
- const handleDisconnectGoogle = useCallback9(() => __async(null, null, function* () {
3625
+ const handleDisconnectGoogle = useCallback8(() => __async(null, null, function* () {
3418
3626
  yield client.disconnectAccount("google");
3419
3627
  yield client.getCurrentUser();
3420
3628
  onDisconnectGoogle == null ? void 0 : onDisconnectGoogle();
3421
3629
  }), [client, onDisconnectGoogle]);
3422
- const handleDisconnectApple = useCallback9(() => __async(null, null, function* () {
3630
+ const handleDisconnectApple = useCallback8(() => __async(null, null, function* () {
3423
3631
  yield client.disconnectAccount("apple");
3424
3632
  yield client.getCurrentUser();
3425
3633
  onDisconnectApple == null ? void 0 : onDisconnectApple();
3426
3634
  }), [client, onDisconnectApple]);
3427
- const handleConnectEmail = useCallback9(() => __async(null, null, function* () {
3635
+ const handleConnectEmail = useCallback8(() => __async(null, null, function* () {
3428
3636
  var _a2;
3429
3637
  const typedEmail = typeof window !== "undefined" ? (_a2 = window.prompt("Enter your email to receive a magic link")) == null ? void 0 : _a2.trim() : void 0;
3430
3638
  if (!typedEmail) return;
@@ -3435,7 +3643,7 @@ var ProfileModal = ({
3435
3643
  });
3436
3644
  onConnectEmail == null ? void 0 : onConnectEmail();
3437
3645
  }), [onConnectEmail, startAuth]);
3438
- const handleDisconnectWallet = useCallback9(
3646
+ const handleDisconnectWallet = useCallback8(
3439
3647
  (wallet) => __async(null, null, function* () {
3440
3648
  const normalizedChain = wallet.chain.toLowerCase();
3441
3649
  const provider = normalizedChain === "solana" || normalizedChain === "svm" ? "solana_wallet" : "wallet";
@@ -3445,7 +3653,7 @@ var ProfileModal = ({
3445
3653
  }),
3446
3654
  [client, onDisconnectWallet]
3447
3655
  );
3448
- const providerActionMap = useMemo3(
3656
+ const providerActionMap = useMemo2(
3449
3657
  () => ({
3450
3658
  twitter: {
3451
3659
  connect: () => {
@@ -3491,7 +3699,7 @@ var ProfileModal = ({
3491
3699
  if (address.length <= 12) return address;
3492
3700
  return `${address.slice(0, 6)}...${address.slice(-4)}`;
3493
3701
  };
3494
- const resolvedWallets = useMemo3(() => {
3702
+ const resolvedWallets = useMemo2(() => {
3495
3703
  var _a2, _b2;
3496
3704
  if (wallets) return wallets;
3497
3705
  return (_b2 = (_a2 = user == null ? void 0 : user.wallets) == null ? void 0 : _a2.map((wallet) => ({
@@ -3500,7 +3708,7 @@ var ProfileModal = ({
3500
3708
  displayAddress: shortenAddress(wallet.address)
3501
3709
  }))) != null ? _b2 : [];
3502
3710
  }, [user == null ? void 0 : user.wallets, wallets]);
3503
- const resolvedExchanges = useMemo3(() => {
3711
+ const resolvedExchanges = useMemo2(() => {
3504
3712
  var _a2, _b2;
3505
3713
  if (exchanges !== void 0) return exchanges;
3506
3714
  const walletAccount = (_a2 = user == null ? void 0 : user.accounts) == null ? void 0 : _a2.find(
@@ -3511,7 +3719,7 @@ var ProfileModal = ({
3511
3719
  const displayAddress = (_b2 = shortenAddress(addr)) != null ? _b2 : addr;
3512
3720
  return EVM_WALLET_VENUES.map((venue) => ({ venue, displayAddress, verified: false }));
3513
3721
  }, [exchanges, user == null ? void 0 : user.accounts]);
3514
- const handleDisconnectExchange = useCallback9(
3722
+ const handleDisconnectExchange = useCallback8(
3515
3723
  (venue) => __async(null, null, function* () {
3516
3724
  if (exchanges !== void 0) {
3517
3725
  onDisconnectExchangeProp == null ? void 0 : onDisconnectExchangeProp(venue);
@@ -3523,7 +3731,7 @@ var ProfileModal = ({
3523
3731
  }),
3524
3732
  [client, exchanges, onDisconnectExchangeProp]
3525
3733
  );
3526
- return /* @__PURE__ */ jsx25(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs25(
3734
+ return /* @__PURE__ */ jsx24(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs24(
3527
3735
  Modal.Container,
3528
3736
  {
3529
3737
  maxWidth: "800px",
@@ -3532,12 +3740,12 @@ var ProfileModal = ({
3532
3740
  container: cn("agg-profile-modal", "min-h-[37.5rem]")
3533
3741
  },
3534
3742
  children: [
3535
- /* @__PURE__ */ jsx25(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
3536
- /* @__PURE__ */ jsx25(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ jsxs25("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
3537
- /* @__PURE__ */ jsxs25("div", { className: "shrink-0", children: [
3538
- /* @__PURE__ */ jsx25("div", { className: "agg-profile-tabs mb-6 flex gap-2 sm:hidden", children: PROFILE_TAB_ITEMS.map((tab) => {
3743
+ /* @__PURE__ */ jsx24(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
3744
+ /* @__PURE__ */ jsx24(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ jsxs24("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
3745
+ /* @__PURE__ */ jsxs24("div", { className: "shrink-0", children: [
3746
+ /* @__PURE__ */ jsx24("div", { className: "agg-profile-tabs mb-6 flex gap-2 sm:hidden", children: PROFILE_TAB_ITEMS.map((tab) => {
3539
3747
  const isActive = activeTab === tab.value;
3540
- return /* @__PURE__ */ jsxs25(
3748
+ return /* @__PURE__ */ jsxs24(
3541
3749
  "button",
3542
3750
  {
3543
3751
  type: "button",
@@ -3551,14 +3759,14 @@ var ProfileModal = ({
3551
3759
  isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover border-agg-primary" : "font-agg-normal text-agg-foreground border-transparent"
3552
3760
  ),
3553
3761
  children: [
3554
- /* @__PURE__ */ jsx25(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3555
- /* @__PURE__ */ jsx25("span", { className: "whitespace-nowrap", children: tab.label })
3762
+ /* @__PURE__ */ jsx24(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3763
+ /* @__PURE__ */ jsx24("span", { className: "whitespace-nowrap", children: tab.label })
3556
3764
  ]
3557
3765
  },
3558
3766
  tab.value
3559
3767
  );
3560
3768
  }) }),
3561
- /* @__PURE__ */ jsx25(
3769
+ /* @__PURE__ */ jsx24(
3562
3770
  "nav",
3563
3771
  {
3564
3772
  className: cn(
@@ -3574,7 +3782,7 @@ var ProfileModal = ({
3574
3782
  "aria-label": "Profile sections",
3575
3783
  children: PROFILE_TAB_ITEMS.map((tab) => {
3576
3784
  const isActive = activeTab === tab.value;
3577
- return /* @__PURE__ */ jsxs25(
3785
+ return /* @__PURE__ */ jsxs24(
3578
3786
  "button",
3579
3787
  {
3580
3788
  type: "button",
@@ -3590,9 +3798,9 @@ var ProfileModal = ({
3590
3798
  isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover" : "font-agg-normal text-agg-foreground"
3591
3799
  ),
3592
3800
  children: [
3593
- isActive ? /* @__PURE__ */ jsx25("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
3594
- /* @__PURE__ */ jsx25(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3595
- /* @__PURE__ */ jsx25("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
3801
+ isActive ? /* @__PURE__ */ jsx24("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
3802
+ /* @__PURE__ */ jsx24(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
3803
+ /* @__PURE__ */ jsx24("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
3596
3804
  ]
3597
3805
  },
3598
3806
  tab.value
@@ -3601,8 +3809,8 @@ var ProfileModal = ({
3601
3809
  }
3602
3810
  )
3603
3811
  ] }),
3604
- /* @__PURE__ */ jsxs25("div", { className: "agg-profile-content min-w-0 flex-1", children: [
3605
- activeTab === PROFILE_TAB_KEYS.ABOUT ? /* @__PURE__ */ jsx25(
3812
+ /* @__PURE__ */ jsxs24("div", { className: "agg-profile-content min-w-0 flex-1", children: [
3813
+ activeTab === PROFILE_TAB_KEYS.ABOUT ? /* @__PURE__ */ jsx24(
3606
3814
  AboutTab,
3607
3815
  {
3608
3816
  username: username != null ? username : user == null ? void 0 : user.username,
@@ -3616,7 +3824,7 @@ var ProfileModal = ({
3616
3824
  avatarError: avatarTypeError
3617
3825
  }
3618
3826
  ) : null,
3619
- activeTab === PROFILE_TAB_KEYS.ACCOUNTS_WALLETS ? /* @__PURE__ */ jsx25(
3827
+ activeTab === PROFILE_TAB_KEYS.ACCOUNTS_WALLETS ? /* @__PURE__ */ jsx24(
3620
3828
  AccountsWalletsTab,
3621
3829
  {
3622
3830
  exchanges: resolvedExchanges,
@@ -3646,9 +3854,9 @@ var ProfileModal = ({
3646
3854
  ) : null
3647
3855
  ] })
3648
3856
  ] }) }),
3649
- /* @__PURE__ */ jsxs25(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
3650
- /* @__PURE__ */ jsx25(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
3651
- /* @__PURE__ */ jsx25(
3857
+ /* @__PURE__ */ jsxs24(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
3858
+ /* @__PURE__ */ jsx24(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
3859
+ /* @__PURE__ */ jsx24(
3652
3860
  Button,
3653
3861
  {
3654
3862
  variant: "primary",
@@ -3667,46 +3875,46 @@ var ProfileModal = ({
3667
3875
  ProfileModal.displayName = "ProfileModal";
3668
3876
 
3669
3877
  // src/geo-block-modal/index.tsx
3670
- import { useLabels as useLabels22 } from "@agg-build/hooks";
3671
- import { useCallback as useCallback10 } from "react";
3672
- import { jsx as jsx26, jsxs as jsxs26 } from "react/jsx-runtime";
3878
+ import { useLabels as useLabels21 } from "@agg-build/hooks";
3879
+ import { useCallback as useCallback9 } from "react";
3880
+ import { jsx as jsx25, jsxs as jsxs25 } from "react/jsx-runtime";
3673
3881
  var GeoBlockModal = ({
3674
3882
  open,
3675
3883
  onOpenChange,
3676
3884
  onConfirm,
3677
3885
  classNames
3678
3886
  }) => {
3679
- const labels = useLabels22();
3680
- const handleConfirm = useCallback10(() => {
3887
+ const labels = useLabels21();
3888
+ const handleConfirm = useCallback9(() => {
3681
3889
  onConfirm == null ? void 0 : onConfirm();
3682
3890
  onOpenChange(false);
3683
3891
  }, [onConfirm, onOpenChange]);
3684
- return /* @__PURE__ */ jsx26(
3892
+ return /* @__PURE__ */ jsx25(
3685
3893
  Modal,
3686
3894
  {
3687
3895
  open,
3688
3896
  onOpenChange,
3689
3897
  "aria-label": labels.trading.geoBlockModalAriaLabel,
3690
- children: /* @__PURE__ */ jsxs26(
3898
+ children: /* @__PURE__ */ jsxs25(
3691
3899
  Modal.Container,
3692
3900
  {
3693
3901
  maxWidth: "480px",
3694
3902
  classNames: { container: cn("!rounded-agg-2xl", classNames == null ? void 0 : classNames.container) },
3695
3903
  children: [
3696
- /* @__PURE__ */ jsx26(Modal.Header, { title: "", hideBorder: true, classNames: { container: "px-8 pt-8 pb-0" } }),
3697
- /* @__PURE__ */ jsx26(Modal.Body, { classNames: { root: cn("!px-10 !pb-12 !pt-0", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-8", children: [
3698
- /* @__PURE__ */ jsx26(
3904
+ /* @__PURE__ */ jsx25(Modal.Header, { title: "", hideBorder: true, classNames: { container: "px-8 pt-8 pb-0" } }),
3905
+ /* @__PURE__ */ jsx25(Modal.Body, { classNames: { root: cn("!px-10 !pb-12 !pt-0", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-8", children: [
3906
+ /* @__PURE__ */ jsx25(
3699
3907
  Icon,
3700
3908
  {
3701
3909
  name: "internet-security",
3702
3910
  className: "h-[60px] w-[60px] text-agg-muted-foreground"
3703
3911
  }
3704
3912
  ),
3705
- /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-3 text-center", children: [
3706
- /* @__PURE__ */ jsx26("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
3707
- /* @__PURE__ */ jsx26("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
3913
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-3 text-center", children: [
3914
+ /* @__PURE__ */ jsx25("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
3915
+ /* @__PURE__ */ jsx25("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
3708
3916
  ] }),
3709
- /* @__PURE__ */ jsx26(
3917
+ /* @__PURE__ */ jsx25(
3710
3918
  Button,
3711
3919
  {
3712
3920
  variant: "secondary",