@aurora-is-near/intents-swap-widget 3.17.1 → 3.17.3

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 (166) hide show
  1. package/dist/{config-CQ4V08as.js → config-VpsP2eLV.js} +959 -880
  2. package/dist/config-VpsP2eLV.js.map +1 -0
  3. package/dist/config.js +2 -2
  4. package/dist/errors.js +1 -1
  5. package/dist/ext/alchemy/index.js +1 -1
  6. package/dist/ext/index.js +1 -1
  7. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  8. package/dist/features/BalanceRpcLoader/index.js +1 -1
  9. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  10. package/dist/features/ChainsDropdown/index.js +1 -1
  11. package/dist/features/DepositMethodSwitcher.js +1 -1
  12. package/dist/features/ErrorBoundary.js +1 -1
  13. package/dist/features/ExternalDeposit.js +2 -2
  14. package/dist/features/SendAddress/index.js +1 -1
  15. package/dist/features/SendAddress/useNotification.js +1 -1
  16. package/dist/features/SubmitButton/index.js +1 -1
  17. package/dist/features/SuccessScreen/index.js +1 -1
  18. package/dist/features/SwapDirectionSwitcher.js +1 -1
  19. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  20. package/dist/features/SwapQuote/index.js +1 -1
  21. package/dist/features/TokenInput/TokenInput.js +1 -1
  22. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  23. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  24. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  25. package/dist/features/TokenInput/WalletBalance.js +1 -1
  26. package/dist/features/TokenInput/hooks/index.js +1 -1
  27. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  28. package/dist/features/TokenInput/index.js +1 -1
  29. package/dist/features/TokensList/TokenItem.d.ts +2 -2
  30. package/dist/features/TokensList/TokenItem.js +1 -2
  31. package/dist/features/TokensList/TokensList.js +10 -2
  32. package/dist/features/TokensList/TokensList.js.map +1 -1
  33. package/dist/features/TokensList/constants.d.ts +4 -0
  34. package/dist/features/TokensList/constants.js +8 -0
  35. package/dist/features/TokensList/constants.js.map +1 -0
  36. package/dist/features/TokensList/hooks/index.d.ts +1 -0
  37. package/dist/features/TokensList/hooks/index.js +5 -0
  38. package/dist/features/TokensList/hooks/index.js.map +1 -0
  39. package/dist/features/TokensList/hooks/useFocusOnList.d.ts +9 -0
  40. package/dist/features/TokensList/hooks/useFocusOnList.js +33 -0
  41. package/dist/features/TokensList/hooks/useFocusOnList.js.map +1 -0
  42. package/dist/features/TokensList/index.d.ts +2 -1
  43. package/dist/features/TokensList/index.js +1 -1
  44. package/dist/features/TokensList/types.d.ts +14 -0
  45. package/dist/features/TokensList/types.js +2 -0
  46. package/dist/features/TokensList/types.js.map +1 -0
  47. package/dist/features/TokensList/utils/getFirstGroupItemTotalIndex.d.ts +9 -0
  48. package/dist/features/TokensList/utils/getFirstGroupItemTotalIndex.js +8 -0
  49. package/dist/features/TokensList/utils/getFirstGroupItemTotalIndex.js.map +1 -0
  50. package/dist/features/TokensList/utils/getGroupHeadersTotalIndexes.d.ts +8 -0
  51. package/dist/features/TokensList/utils/getGroupHeadersTotalIndexes.js +5 -0
  52. package/dist/features/TokensList/utils/getGroupHeadersTotalIndexes.js.map +1 -0
  53. package/dist/features/TokensList/utils/getListItemsTotalCount.d.ts +8 -0
  54. package/dist/features/TokensList/utils/getListItemsTotalCount.js +8 -0
  55. package/dist/features/TokensList/utils/getListItemsTotalCount.js.map +1 -0
  56. package/dist/features/TokensList/utils/getListState.d.ts +9 -0
  57. package/dist/features/TokensList/utils/getListState.js +5 -0
  58. package/dist/features/TokensList/utils/getListState.js.map +1 -0
  59. package/dist/features/TokensList/utils/getListTotalHeight.d.ts +8 -0
  60. package/dist/features/TokensList/utils/getListTotalHeight.js +12 -0
  61. package/dist/features/TokensList/utils/getListTotalHeight.js.map +1 -0
  62. package/dist/features/TokensList/utils/getTokenByTotalIndex.d.ts +9 -0
  63. package/dist/features/TokensList/utils/getTokenByTotalIndex.js +7 -0
  64. package/dist/features/TokensList/utils/getTokenByTotalIndex.js.map +1 -0
  65. package/dist/features/TokensList/utils/index.d.ts +6 -0
  66. package/dist/features/TokensList/utils/index.js +15 -0
  67. package/dist/features/TokensList/utils/index.js.map +1 -0
  68. package/dist/features/TokensModal.js +2 -2
  69. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +2 -2
  70. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  71. package/dist/features/index.js +1 -1
  72. package/dist/hooks/index.js +1 -1
  73. package/dist/hooks/useAllTokens.js +1 -1
  74. package/dist/hooks/useChains.js +1 -1
  75. package/dist/hooks/useCompatibilityCheck.js +1 -1
  76. package/dist/hooks/useDefaultToken.js +1 -1
  77. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  78. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  79. package/dist/hooks/useIntentsBalance.js +1 -1
  80. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  81. package/dist/hooks/useMakeDepositAddress.js +1 -1
  82. package/dist/hooks/useMakeIntentsTransfer.js +4 -3
  83. package/dist/hooks/useMakeIntentsTransfer.js.map +1 -1
  84. package/dist/hooks/useMakeNEARFtTransferCall.js +4 -2
  85. package/dist/hooks/useMakeNEARFtTransferCall.js.map +1 -1
  86. package/dist/hooks/useMakeQuote.js +1 -1
  87. package/dist/hooks/useMakeQuoteTransfer.js +3 -2
  88. package/dist/hooks/useMakeQuoteTransfer.js.map +1 -1
  89. package/dist/hooks/useMakeSolanaTransfer.js +1 -1
  90. package/dist/hooks/useMakeTransfer.js +1 -1
  91. package/dist/hooks/useMergedBalance.js +1 -1
  92. package/dist/hooks/useSwitchChain.js +1 -1
  93. package/dist/hooks/useTheme.js +1 -1
  94. package/dist/hooks/useTokenInputPair.js +1 -1
  95. package/dist/hooks/useTokens.js +1 -1
  96. package/dist/hooks/useTokensFiltered.js +1 -1
  97. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  98. package/dist/{index-Ce9bzNHX.js → index-JGjxyZXI.js} +70 -70
  99. package/dist/index-JGjxyZXI.js.map +1 -0
  100. package/dist/index.browser.esm-COWShN0a.js.map +1 -1
  101. package/dist/index.js +1 -1
  102. package/dist/machine/effects/index.js +1 -1
  103. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  104. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  105. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  106. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  107. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  108. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  109. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  110. package/dist/machine/events/index.js +1 -1
  111. package/dist/machine/events/tokenSelect.js +1 -1
  112. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  113. package/dist/machine/events/validateInputs.js +1 -1
  114. package/dist/machine/index.js +1 -1
  115. package/dist/machine/snap.js +1 -1
  116. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  117. package/dist/machine/subscriptions/index.js +1 -1
  118. package/dist/styles.css +1 -1
  119. package/dist/theme/ThemeProvider.js +1 -1
  120. package/dist/utils/checkers/isUserDeniedSigning.d.ts +2 -1
  121. package/dist/utils/checkers/isUserDeniedSigning.js +6 -4
  122. package/dist/utils/checkers/isUserDeniedSigning.js.map +1 -1
  123. package/dist/utils/index.d.ts +1 -0
  124. package/dist/utils/index.js +26 -24
  125. package/dist/utils/index.js.map +1 -1
  126. package/dist/utils/intents/signers/near.d.ts +1 -1
  127. package/dist/utils/intents/signers/near.js +2 -2
  128. package/dist/utils/intents/signers/privy.d.ts +1 -1
  129. package/dist/utils/intents/signers/privy.js +1 -1
  130. package/dist/utils/intents/signers/solana.d.ts +1 -1
  131. package/dist/utils/intents/signers/solana.js.map +1 -1
  132. package/dist/utils/isErrorLikeObject.d.ts +4 -0
  133. package/dist/utils/isErrorLikeObject.js +5 -0
  134. package/dist/utils/isErrorLikeObject.js.map +1 -0
  135. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  136. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +2 -2
  137. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  138. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +2 -2
  139. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  140. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +2 -2
  141. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  142. package/package.json +2 -2
  143. package/src/features/TokensList/TokenItem.tsx +7 -3
  144. package/src/features/TokensList/TokensList.tsx +151 -57
  145. package/src/features/TokensList/constants.ts +4 -0
  146. package/src/features/TokensList/hooks/index.ts +1 -0
  147. package/src/features/TokensList/hooks/useFocusOnList.ts +56 -0
  148. package/src/features/TokensList/types.ts +28 -0
  149. package/src/features/TokensList/utils/getFirstGroupItemTotalIndex.ts +28 -0
  150. package/src/features/TokensList/utils/getGroupHeadersTotalIndexes.ts +21 -0
  151. package/src/features/TokensList/utils/getListItemsTotalCount.ts +14 -0
  152. package/src/features/TokensList/utils/getListState.ts +16 -0
  153. package/src/features/TokensList/utils/getListTotalHeight.ts +25 -0
  154. package/src/features/TokensList/utils/getTokenByTotalIndex.ts +19 -0
  155. package/src/features/TokensList/utils/index.ts +6 -0
  156. package/src/hooks/useMakeIntentsTransfer.ts +40 -29
  157. package/src/hooks/useMakeNEARFtTransferCall.ts +10 -0
  158. package/src/hooks/useMakeQuoteTransfer.ts +2 -1
  159. package/src/utils/checkers/isUserDeniedSigning.ts +11 -3
  160. package/src/utils/index.ts +1 -0
  161. package/src/utils/intents/signers/near.ts +1 -1
  162. package/src/utils/intents/signers/privy.ts +1 -1
  163. package/src/utils/intents/signers/solana.ts +1 -1
  164. package/src/utils/isErrorLikeObject.ts +11 -0
  165. package/dist/config-CQ4V08as.js.map +0 -1
  166. package/dist/index-Ce9bzNHX.js.map +0 -1
@@ -1,156 +1,165 @@
1
- import { p as tt } from "./index-xuotMAFm.js";
2
- import { jsx as o, jsxs as h, Fragment as Ft } from "react/jsx-runtime";
3
- import Lt from "i18next";
4
- import { deepClone as pe } from "valtio/utils";
5
- import { snapshot as Ne, useSnapshot as oe, proxy as nt } from "valtio";
6
- import { HelmetProvider as Bt, Helmet as qt } from "react-helmet-async";
7
- import { memo as Ut, useEffect as R, useMemo as v, useRef as Y, useCallback as Te, useState as re, useId as Pt, Fragment as Wt, createContext as st, useContext as Mt } from "react";
8
- import { useQuery as _e, useInfiniteQuery as Vt, useQueryClient as Qt, QueryClient as $t, QueryClientProvider as Kt } from "@tanstack/react-query";
9
- import { Trans as Ht, I18nextProvider as Gt } from "react-i18next";
10
- import { useTypedTranslation as V, initLocalisation as jt } from "./localisation.js";
11
- import { logger as b } from "./logger.js";
12
- import { getTonTokenBalance as zt } from "./utils/ton/getTonTokenBalance.js";
13
- import { getSolanaTokenBalance as Yt } from "./utils/solana/getSolanaTokenBalance.js";
14
- import { useWalletAddressForToken as rt } from "./hooks/useWalletAddressForToken.js";
1
+ import { p as lt } from "./index-xuotMAFm.js";
2
+ import { jsx as o, jsxs as h, Fragment as $t } from "react/jsx-runtime";
3
+ import Kt from "i18next";
4
+ import { deepClone as we } from "valtio/utils";
5
+ import { snapshot as be, useSnapshot as ue, proxy as ct } from "valtio";
6
+ import { HelmetProvider as Ht, Helmet as Gt } from "react-helmet-async";
7
+ import { memo as jt, useEffect as R, useMemo as L, useRef as X, useCallback as ie, useState as te, useId as zt, createContext as dt, useContext as Yt } from "react";
8
+ import { useQuery as Ee, useInfiniteQuery as Xt, useQueryClient as Zt, QueryClient as Jt, QueryClientProvider as en } from "@tanstack/react-query";
9
+ import { Trans as tn, I18nextProvider as nn } from "react-i18next";
10
+ import { useTypedTranslation as $, initLocalisation as sn } from "./localisation.js";
11
+ import { logger as E } from "./logger.js";
12
+ import { getTonTokenBalance as rn } from "./utils/ton/getTonTokenBalance.js";
13
+ import { getSolanaTokenBalance as an } from "./utils/solana/getSolanaTokenBalance.js";
14
+ import { useWalletAddressForToken as ut } from "./hooks/useWalletAddressForToken.js";
15
15
  import "@headlessui/react";
16
16
  import "framer-motion";
17
17
  import "lucide-react";
18
18
  import "./features/ChainsDropdown/ChainItem.js";
19
- import { cn as H } from "./utils/cn.js";
20
- import { OneClickService as Zt, QuoteRequest as U, GetExecutionStatusResponse as ee } from "@defuse-protocol/one-click-sdk-typescript";
21
- import { CHAINS_LIST as at, DEFAULT_CHAINS_ORDER as ot, CHAIN_POA_MAP as it, POA_EVM_CHAIN_ID as lt, CHAIN_BASE_TOKENS as Xt, EVM_CHAIN_IDS_MAP as he, CHAIN_IDS_MAP as Jt, EVM_CHAINS as en } from "./constants/chains.js";
19
+ import { cn as K } from "./utils/cn.js";
20
+ import { OneClickService as on, QuoteRequest as W, GetExecutionStatusResponse as ee } from "@defuse-protocol/one-click-sdk-typescript";
21
+ import { CHAINS_LIST as mt, DEFAULT_CHAINS_ORDER as ft, CHAIN_POA_MAP as pt, POA_EVM_CHAIN_ID as Tt, CHAIN_BASE_TOKENS as ln, EVM_CHAIN_IDS_MAP as ke, CHAIN_IDS_MAP as cn, EVM_CHAINS as dn } from "./constants/chains.js";
22
22
  import "use-debounce";
23
- import { derive as tn } from "derive-valtio";
24
- import { getIsNativeNearDeposit as nn } from "./machine/computed/getIsNativeNearDeposit.js";
25
- import { getIsDirectTokenOnNearDeposit as sn } from "./machine/computed/getIsDirectTokenOnNearDeposit.js";
23
+ import { derive as un } from "derive-valtio";
24
+ import { getIsNativeNearDeposit as mn } from "./machine/computed/getIsNativeNearDeposit.js";
25
+ import { getIsDirectTokenOnNearDeposit as fn } from "./machine/computed/getIsDirectTokenOnNearDeposit.js";
26
26
  import "ethers";
27
- import { moveTo as O, machine as Z } from "./machine/machine.js";
28
- import rn from "lodash.once";
29
- import { guardStates as D } from "./machine/guards/index.js";
30
- import { parse as an } from "./ext/alchemy/parse.js";
31
- import { createLoader as on } from "./ext/alchemy/load.js";
32
- import { isAlchemySupportedChain as ln } from "./ext/alchemy/types.js";
33
- import { fireEvent as p } from "./machine/events/utils/fireEvent.js";
34
- import { NATIVE_NEAR_DUMB_ASSET_ID as $, TOKENS_DATA as ye, WNEAR_ASSET_ID as ge } from "./constants/tokens.js";
35
- import { isValidChain as cn } from "./utils/checkers/isValidChain.js";
36
- import { useWalletBalance as be } from "./hooks/useWalletBalance.js";
37
- import { getIntentsAccountId as te } from "./utils/intents/getIntentsAccountId.js";
38
- import { getIntentsBalances as dn } from "./utils/intents/getIntentsBalance.js";
39
- import { notReachable as Ee } from "./utils/notReachable.js";
40
- import { getTokenBalanceKey as G } from "./utils/intents/getTokenBalanceKey.js";
41
- import { isDryQuote as Re } from "./machine/guards/checks/isDryQuote.js";
42
- import { snakeCase as ct } from "change-case";
43
- import un, { CanceledError as dt, AxiosError as ut } from "axios";
44
- import { oneClickApi as Ie, bridgeApi as mt } from "./network.js";
45
- import { formatBigToHuman as j } from "./utils/formatters/formatBigToHuman.js";
46
- import { getDryQuoteAddress as Ue } from "./utils/getDryQuoteAddress.js";
47
- import { isEvmChain as Q } from "./utils/evm/isEvmChain.js";
48
- import { checkNearAccountExists as mn } from "./utils/near/checkNearAccountExists.js";
49
- import { isNotEmptyAmount as ne } from "./utils/checkers/isNotEmptyAmount.js";
50
- import { isValidBigint as ft } from "./utils/checkers/isValidBigint.js";
51
- import { isNearAddress as pt } from "./utils/near/isNearAddress.js";
52
- import { isBalanceSufficient as Ce } from "./machine/guards/checks/isBalanceSufficient.js";
53
- import { isQuoteError as ve, isTransferError as De, isAsyncSendAddressValidationError as fn } from "./machine/errors.js";
54
- import { isSolanaAddress as Tt } from "./utils/solana/isSolanaAddress.js";
55
- import { isEvmAddress as ht } from "./utils/evm/isEvmAddress.js";
56
- import { getMainTokenByChain as pn } from "./utils/tokens/getMainTokenByChain.js";
57
- import { getDefaultIntentsToken as Tn } from "./utils/tokens/getDefaultIntentsToken.js";
58
- import { getTokenWithHighBalance as hn } from "./utils/tokens/getTokenWithHighBalance.js";
59
- import { isQuoteIdle as gn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
60
- import { isInputChanged as In } from "./machine/subscriptions/checkers/isInputChanged.js";
61
- import { isErrorChanged as wn } from "./machine/subscriptions/checkers/isErrorChanged.js";
62
- import { isOnlyErrorChanged as kn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
63
- import { isValidInitialState as An } from "./machine/subscriptions/checkers/isValidInitialState.js";
64
- import { isWalletDisconnected as Sn } from "./machine/subscriptions/checkers/isWalletDisconnected.js";
65
- import { isSendAddressForbidden as Nn } from "./machine/subscriptions/checkers/isSendAddressForbidden.js";
66
- import { isAmountChangedFromQuote as _n } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
67
- import { reset as yn } from "./machine/events/reset.js";
68
- import { tokenSelectRotate as we } from "./machine/events/tokenSelectRotate.js";
69
- import { errorSet as bn } from "./machine/events/errorSet.js";
70
- import { quoteSet as En } from "./machine/events/quoteSet.js";
71
- import { addressSet as Rn } from "./machine/events/addressSet.js";
72
- import { tokenSetAmount as Cn } from "./machine/events/tokenSetAmount.js";
73
- import { quoteSetStatus as vn } from "./machine/events/quoteSetStatus.js";
74
- import { depositTypeSet as Dn } from "./machine/events/depositTypeSet.js";
75
- import { externalDepositTxSet as xn } from "./machine/events/externalDepositTxSet.js";
76
- import { setInputsValidating as On } from "./machine/events/setInputsValidating.js";
77
- import { walletAddressSet as Fn } from "./machine/events/walletAddressSet.js";
78
- import { tokenSetBalance as Ln } from "./machine/events/tokenSetBalance.js";
79
- import { transferSetStatus as Bn } from "./machine/events/transferSetStatus.js";
80
- import { getUsdTradeDelta as qn } from "./machine/computed/getUsdTradeDelta.js";
81
- import { getIsDirectNonNearWithdrawal as Un } from "./machine/computed/getIsDirectNonNearWithdrawal.js";
82
- import { getIsDirectTokenOnNearTransfer as Pn } from "./machine/computed/getIsDirectTokenOnNearTransfer.js";
83
- import { getIsDirectNearTokenWithdrawal as Wn } from "./machine/computed/getIsDirectNearTokenWithdrawal.js";
84
- import { getIsSameAssetDiffChainWithdrawal as Mn } from "./machine/computed/getIsSameAssetDiffChainWithdrawal.js";
27
+ import { moveTo as F, machine as J } from "./machine/machine.js";
28
+ import pn from "lodash.once";
29
+ import { guardStates as x } from "./machine/guards/index.js";
30
+ import { parse as Tn } from "./ext/alchemy/parse.js";
31
+ import { createLoader as hn } from "./ext/alchemy/load.js";
32
+ import { isAlchemySupportedChain as gn } from "./ext/alchemy/types.js";
33
+ import { fireEvent as T } from "./machine/events/utils/fireEvent.js";
34
+ import { NATIVE_NEAR_DUMB_ASSET_ID as G, TOKENS_DATA as Re, WNEAR_ASSET_ID as Ae } from "./constants/tokens.js";
35
+ import { isValidChain as In } from "./utils/checkers/isValidChain.js";
36
+ import { useWalletBalance as Ce } from "./hooks/useWalletBalance.js";
37
+ import { getIntentsAccountId as ne } from "./utils/intents/getIntentsAccountId.js";
38
+ import { getIntentsBalances as wn } from "./utils/intents/getIntentsBalance.js";
39
+ import { notReachable as De } from "./utils/notReachable.js";
40
+ import { getTokenBalanceKey as z } from "./utils/intents/getTokenBalanceKey.js";
41
+ import { isDryQuote as ve } from "./machine/guards/checks/isDryQuote.js";
42
+ import { snakeCase as ht } from "change-case";
43
+ import kn, { CanceledError as gt, AxiosError as It } from "axios";
44
+ import { oneClickApi as Se, bridgeApi as wt } from "./network.js";
45
+ import { formatBigToHuman as Y } from "./utils/formatters/formatBigToHuman.js";
46
+ import { getDryQuoteAddress as He } from "./utils/getDryQuoteAddress.js";
47
+ import { isEvmChain as H } from "./utils/evm/isEvmChain.js";
48
+ import { checkNearAccountExists as An } from "./utils/near/checkNearAccountExists.js";
49
+ import { isNotEmptyAmount as se } from "./utils/checkers/isNotEmptyAmount.js";
50
+ import { isValidBigint as kt } from "./utils/checkers/isValidBigint.js";
51
+ import { isNearAddress as At } from "./utils/near/isNearAddress.js";
52
+ import { isBalanceSufficient as xe } from "./machine/guards/checks/isBalanceSufficient.js";
53
+ import { isQuoteError as Oe, isTransferError as Fe, isAsyncSendAddressValidationError as Sn } from "./machine/errors.js";
54
+ import { isSolanaAddress as St } from "./utils/solana/isSolanaAddress.js";
55
+ import { isEvmAddress as Nt } from "./utils/evm/isEvmAddress.js";
56
+ import { getMainTokenByChain as Nn } from "./utils/tokens/getMainTokenByChain.js";
57
+ import { getDefaultIntentsToken as _n } from "./utils/tokens/getDefaultIntentsToken.js";
58
+ import { getTokenWithHighBalance as yn } from "./utils/tokens/getTokenWithHighBalance.js";
59
+ import { isQuoteIdle as bn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
60
+ import { isInputChanged as En } from "./machine/subscriptions/checkers/isInputChanged.js";
61
+ import { isErrorChanged as Rn } from "./machine/subscriptions/checkers/isErrorChanged.js";
62
+ import { isOnlyErrorChanged as Cn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
63
+ import { isValidInitialState as Dn } from "./machine/subscriptions/checkers/isValidInitialState.js";
64
+ import { isWalletDisconnected as vn } from "./machine/subscriptions/checkers/isWalletDisconnected.js";
65
+ import { isSendAddressForbidden as xn } from "./machine/subscriptions/checkers/isSendAddressForbidden.js";
66
+ import { isAmountChangedFromQuote as On } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
67
+ import { reset as Fn } from "./machine/events/reset.js";
68
+ import { tokenSelectRotate as Ne } from "./machine/events/tokenSelectRotate.js";
69
+ import { errorSet as Ln } from "./machine/events/errorSet.js";
70
+ import { quoteSet as Bn } from "./machine/events/quoteSet.js";
71
+ import { addressSet as qn } from "./machine/events/addressSet.js";
72
+ import { tokenSetAmount as Un } from "./machine/events/tokenSetAmount.js";
73
+ import { quoteSetStatus as Pn } from "./machine/events/quoteSetStatus.js";
74
+ import { depositTypeSet as Wn } from "./machine/events/depositTypeSet.js";
75
+ import { externalDepositTxSet as Mn } from "./machine/events/externalDepositTxSet.js";
76
+ import { setInputsValidating as Vn } from "./machine/events/setInputsValidating.js";
77
+ import { walletAddressSet as Qn } from "./machine/events/walletAddressSet.js";
78
+ import { tokenSetBalance as $n } from "./machine/events/tokenSetBalance.js";
79
+ import { transferSetStatus as Kn } from "./machine/events/transferSetStatus.js";
80
+ import { getUsdTradeDelta as Hn } from "./machine/computed/getUsdTradeDelta.js";
81
+ import { getIsDirectNonNearWithdrawal as Gn } from "./machine/computed/getIsDirectNonNearWithdrawal.js";
82
+ import { getIsDirectTokenOnNearTransfer as jn } from "./machine/computed/getIsDirectTokenOnNearTransfer.js";
83
+ import { getIsDirectNearTokenWithdrawal as zn } from "./machine/computed/getIsDirectNearTokenWithdrawal.js";
84
+ import { getIsSameAssetDiffChainWithdrawal as Yn } from "./machine/computed/getIsSameAssetDiffChainWithdrawal.js";
85
85
  import "./components/Input.js";
86
86
  import "viem";
87
87
  import { Button as A } from "./components/Button.js";
88
- import { TinyNumber as xe } from "./components/TinyNumber.js";
89
- import { ErrorMessage as K } from "./components/ErrorMessage.js";
90
- import { FT_DEPOSIT_GAS as Pe, FT_TRANSFER_GAS as We } from "./utils/near/config.js";
91
- import { a as Oe } from "./index-DEq3oXQF.js";
92
- import { z as se } from "zod";
93
- import { decodeQueryResult as Vn } from "./utils/near/decodeQueryResult.js";
94
- import { nearRpcClient as Qn } from "./utils/near/rpc.js";
95
- import { getNearNep141MinStorageBalance as $n } from "./utils/near/getNearNep141MinStorageBalance.js";
96
- import { INTENTS_CONTRACT as ke } from "./constants/intents.js";
97
- import { isEvmBaseToken as gt } from "./utils/evm/isEvmBaseToken.js";
98
- import { useMakeEvmTransfer as Kn } from "./hooks/useMakeEvmTransfer.js";
99
- import { useMakeSolanaTransfer as Hn } from "./hooks/useMakeSolanaTransfer.js";
100
- import { isUserDeniedSigning as Ae } from "./utils/checkers/isUserDeniedSigning.js";
101
- import { createIntentSignerNEP413 as Gn, BridgeSDK as jn, createNearWithdrawalRoute as zn, createInternalTransferRoute as Yn, MinWithdrawalAmountError as Zn, FeeExceedsAmountError as Xn } from "@defuse-protocol/bridge-sdk";
102
- import { generateRandomBytes as Jn } from "./utils/near/getRandomBytes.js";
103
- import { IntentSignerSolana as es } from "./utils/intents/signers/solana.js";
104
- import { localStorageTyped as Me } from "./utils/localstorage.js";
105
- import { queryContract as ts } from "./utils/near/queryContract.js";
106
- import { utils as Ve } from "@defuse-protocol/internal-utils";
107
- import { getTransactionLink as ns } from "./utils/formatters/getTransactionLink.js";
108
- import { switchEthereumChain as ss } from "./utils/evm/switchEthereumChain.js";
88
+ import { TinyNumber as Le } from "./components/TinyNumber.js";
89
+ import { ErrorMessage as j } from "./components/ErrorMessage.js";
90
+ import { FT_DEPOSIT_GAS as Ge, FT_TRANSFER_GAS as je } from "./utils/near/config.js";
91
+ import { a as Be } from "./index-DEq3oXQF.js";
92
+ import { z as oe } from "zod";
93
+ import { decodeQueryResult as Xn } from "./utils/near/decodeQueryResult.js";
94
+ import { nearRpcClient as Zn } from "./utils/near/rpc.js";
95
+ import { getNearNep141MinStorageBalance as Jn } from "./utils/near/getNearNep141MinStorageBalance.js";
96
+ import { isErrorLikeObject as le } from "./utils/isErrorLikeObject.js";
97
+ import { isUserDeniedSigning as ce } from "./utils/checkers/isUserDeniedSigning.js";
98
+ import { INTENTS_CONTRACT as _e } from "./constants/intents.js";
99
+ import { isEvmBaseToken as _t } from "./utils/evm/isEvmBaseToken.js";
100
+ import { useMakeEvmTransfer as es } from "./hooks/useMakeEvmTransfer.js";
101
+ import { useMakeSolanaTransfer as ts } from "./hooks/useMakeSolanaTransfer.js";
102
+ import { createIntentSignerNEP413 as ns, IntentsSDK as ss, createNearWithdrawalRoute as rs, createInternalTransferRoute as as, MinWithdrawalAmountError as os, FeeExceedsAmountError as is } from "@defuse-protocol/intents-sdk";
103
+ import { generateRandomBytes as ls } from "./utils/near/getRandomBytes.js";
104
+ import { IntentSignerSolana as cs } from "./utils/intents/signers/solana.js";
105
+ import { localStorageTyped as ze } from "./utils/localstorage.js";
106
+ import { queryContract as ds } from "./utils/near/queryContract.js";
107
+ import { utils as Ye } from "@defuse-protocol/internal-utils";
108
+ import { getTransactionLink as us } from "./utils/formatters/getTransactionLink.js";
109
+ import { switchEthereumChain as ms } from "./utils/evm/switchEthereumChain.js";
109
110
  import "copy-text-to-clipboard";
110
- import { SwapQuoteSkeleton as It } from "./features/SwapQuote/SwapQuoteSkeleton.js";
111
- import { Notes as de } from "./components/Notes.js";
112
- import { Accordion as rs } from "./components/Accordion.js";
113
- import { formatUsdAmount as Qe } from "./utils/formatters/formatUsdAmount.js";
114
- import { formatTinyNumber as as } from "./utils/formatters/formatTinyNumber.js";
115
- import os from "clsx";
116
- import { Skeleton as is } from "./components/Skeleton.js";
117
- import { getBalancePortion as ls } from "./features/TokenInput/utils/getBalancePortion.js";
118
- import { getUsdDisplayAmount as cs } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
119
- import { TokenInputHeading as wt } from "./features/TokenInput/TokenInputHeading.js";
120
- import { noop as ds } from "./utils/noop.js";
121
- import { Card as ie } from "./components/Card.js";
122
- import { Badge as $e } from "./components/Badge.js";
123
- import { TokenIcon as kt } from "./components/TokenIcon.js";
124
- import { InputAmount as us } from "./components/InputAmount.js";
125
- import { TokenInputSkeleton as ms } from "./features/TokenInput/TokenInputSkeleton.js";
126
- import { getUsdDisplayBalance as fs } from "./utils/formatters/getUsdDisplayBalance.js";
127
- import { VList as ps } from "virtua";
128
- import { TokensListPlaceholder as Se } from "./features/TokensList/TokensListPlaceholder.js";
129
- import { Hr as Ts } from "./components/Hr.js";
130
- import { createTokenSorter as hs } from "./utils/tokens/sort.js";
131
- import { createFilterByIntents as Ke } from "./utils/tokens/filterByIntents.js";
132
- import { createFilterBySearch as gs } from "./utils/tokens/filterBySearchString.js";
133
- import { createFilterBySelectedChain as Is } from "./utils/tokens/filterBySelectedChain.js";
111
+ import { SwapQuoteSkeleton as yt } from "./features/SwapQuote/SwapQuoteSkeleton.js";
112
+ import { Notes as Te } from "./components/Notes.js";
113
+ import { Accordion as fs } from "./components/Accordion.js";
114
+ import { formatUsdAmount as Xe } from "./utils/formatters/formatUsdAmount.js";
115
+ import { formatTinyNumber as ps } from "./utils/formatters/formatTinyNumber.js";
116
+ import Ts from "clsx";
117
+ import { Skeleton as hs } from "./components/Skeleton.js";
118
+ import { getBalancePortion as gs } from "./features/TokenInput/utils/getBalancePortion.js";
119
+ import { getUsdDisplayAmount as Is } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
120
+ import { TokenInputHeading as bt } from "./features/TokenInput/TokenInputHeading.js";
121
+ import { noop as ws } from "./utils/noop.js";
122
+ import { Card as me } from "./components/Card.js";
123
+ import { Badge as Ze } from "./components/Badge.js";
124
+ import { TokenIcon as Et } from "./components/TokenIcon.js";
125
+ import { InputAmount as ks } from "./components/InputAmount.js";
126
+ import { TokenInputSkeleton as As } from "./features/TokenInput/TokenInputSkeleton.js";
127
+ import { getUsdDisplayBalance as Ss } from "./utils/formatters/getUsdDisplayBalance.js";
128
+ import { VList as Ns } from "virtua";
129
+ import { useFocusOnList as _s } from "./features/TokensList/hooks/useFocusOnList.js";
130
+ import { TokensListPlaceholder as ye } from "./features/TokensList/TokensListPlaceholder.js";
131
+ import { MAX_LIST_VIEW_AREA_HEIGHT as ys, TOKEN_ITEM_HEIGHT as bs, LIST_CONTAINER_ID as Es } from "./features/TokensList/constants.js";
132
+ import { getGroupHeadersTotalIndexes as Rs } from "./features/TokensList/utils/getGroupHeadersTotalIndexes.js";
133
+ import { getFirstGroupItemTotalIndex as Cs } from "./features/TokensList/utils/getFirstGroupItemTotalIndex.js";
134
+ import { getListItemsTotalCount as Ds } from "./features/TokensList/utils/getListItemsTotalCount.js";
135
+ import { getTokenByTotalIndex as vs } from "./features/TokensList/utils/getTokenByTotalIndex.js";
136
+ import { getListTotalHeight as xs } from "./features/TokensList/utils/getListTotalHeight.js";
137
+ import { getListState as Os } from "./features/TokensList/utils/getListState.js";
138
+ import { Hr as Fs } from "./components/Hr.js";
139
+ import { createTokenSorter as Ls } from "./utils/tokens/sort.js";
140
+ import { createFilterByIntents as Je } from "./utils/tokens/filterByIntents.js";
141
+ import { createFilterBySearch as Bs } from "./utils/tokens/filterBySearchString.js";
142
+ import { createFilterBySelectedChain as qs } from "./utils/tokens/filterBySelectedChain.js";
134
143
  import "bs58";
135
144
  import "viem/chains";
136
145
  import "browser-or-node";
137
146
  import "qrcode.react";
138
- import { createColorPalette as ws } from "./theme/createColorPalette.js";
139
- import { ArmingCountdownFill as ks, BeenhereFill as As, EncryptedFill as Ss, AccountBalanceWalletFill as Ns, CheckCircleFill as _s, GppBadFill as ys } from "@material-symbols-svg/react-rounded";
140
- import { useTimer as bs } from "use-timer";
141
- import { useHandleKeyDown as At } from "./hooks/useHandleKeyDown.js";
142
- import { CloseButton as St } from "./components/CloseButton.js";
143
- import { DEFAULT_RPCS as Es } from "./rpcs.js";
144
- import { useAddClassToPortal as Rs } from "./hooks/useAddClassToPortal.js";
145
- import { ErrorBoundary as Cs } from "react-error-boundary";
146
- import { isEvmToken as vs } from "./utils/evm/isEvmToken.js";
147
- import { getEvmMainTokenBalance as Ds } from "./utils/evm/getEvmMainTokenBalance.js";
148
- import { getNativeNearBalance as xs } from "./utils/near/getNativeNearBalance.js";
149
- import { getNearTokenBalance as Os } from "./utils/near/getNearTokenBalance.js";
150
- import { getEvmTokenBalance as Fs } from "./utils/evm/getEvmTokenBalance.js";
151
- function Ls({ rpcs: e, token: t, connectedWallets: r }) {
152
- const { walletSupportedChains: s, tonCenterApiKey: n, alchemyApiKey: a } = y(), { walletAddress: c } = rt(r, t);
153
- return _e({
147
+ import { createColorPalette as Us } from "./theme/createColorPalette.js";
148
+ import { ArmingCountdownFill as Ps, BeenhereFill as Ws, EncryptedFill as Ms, AccountBalanceWalletFill as Vs, CheckCircleFill as Qs, GppBadFill as $s } from "@material-symbols-svg/react-rounded";
149
+ import { useTimer as Ks } from "use-timer";
150
+ import { useHandleKeyDown as Rt } from "./hooks/useHandleKeyDown.js";
151
+ import { CloseButton as Ct } from "./components/CloseButton.js";
152
+ import { DEFAULT_RPCS as Hs } from "./rpcs.js";
153
+ import { useAddClassToPortal as Gs } from "./hooks/useAddClassToPortal.js";
154
+ import { ErrorBoundary as js } from "react-error-boundary";
155
+ import { isEvmToken as zs } from "./utils/evm/isEvmToken.js";
156
+ import { getEvmMainTokenBalance as Ys } from "./utils/evm/getEvmMainTokenBalance.js";
157
+ import { getNativeNearBalance as Xs } from "./utils/near/getNativeNearBalance.js";
158
+ import { getNearTokenBalance as Zs } from "./utils/near/getNearTokenBalance.js";
159
+ import { getEvmTokenBalance as Js } from "./utils/evm/getEvmTokenBalance.js";
160
+ function er({ rpcs: e, token: t, connectedWallets: r }) {
161
+ const { walletSupportedChains: s, tonCenterApiKey: n, alchemyApiKey: a } = b(), { walletAddress: c } = ut(r, t);
162
+ return Ee({
154
163
  retry: 2,
155
164
  enabled: !!c && Object.keys(e).includes(t.blockchain),
156
165
  queryKey: ["tokenBalance", t.assetId, r],
@@ -158,32 +167,32 @@ function Ls({ rpcs: e, token: t, connectedWallets: r }) {
158
167
  if (!c)
159
168
  return null;
160
169
  if (t.blockchain === "near" && s.includes(t.blockchain))
161
- return !e.near || e.near.length === 0 ? null : t.assetId === $ ? xs(c, e.near) : Os(t, c, e.near);
162
- if (!s.includes("eth") && Q(t.blockchain))
170
+ return !e.near || e.near.length === 0 ? null : t.assetId === G ? Xs(c, e.near) : Zs(t, c, e.near);
171
+ if (!s.includes("eth") && H(t.blockchain))
163
172
  return null;
164
- if (Q(t.blockchain) && gt(t)) {
173
+ if (H(t.blockchain) && _t(t)) {
165
174
  const l = e[t.blockchain] ?? [];
166
- return l.length > 0 ? Ds(c, l[0]) : null;
175
+ return l.length > 0 ? Ys(c, l[0]) : null;
167
176
  }
168
- if (vs(t) || Q(t.blockchain)) {
177
+ if (zs(t) || H(t.blockchain)) {
169
178
  const l = e[t.blockchain] ?? [];
170
- return l.length > 0 ? Fs(t, c, l[0]) : null;
179
+ return l.length > 0 ? Js(t, c, l[0]) : null;
171
180
  }
172
- return t.blockchain === "ton" ? zt(t, c, n) : t.blockchain === "sol" && s.includes(t.blockchain) ? Yt(t, c, a) : (b.warn(
181
+ return t.blockchain === "ton" ? rn(t, c, n) : t.blockchain === "sol" && s.includes(t.blockchain) ? an(t, c, a) : (E.warn(
173
182
  `Failed to fetch token balance for ${t.symbol} on ${t.blockchain}`
174
183
  ), null);
175
184
  }
176
185
  });
177
186
  }
178
- const Bs = ({
187
+ const tr = ({
179
188
  rpcs: e,
180
189
  token: t,
181
190
  onBalancesLoaded: r
182
191
  }) => (R(() => {
183
192
  t.isIntent || !Object.keys(e).includes(t.blockchain) || r({ [t.assetId]: "0" });
184
- }, [t.assetId]), null), Nt = Ut(
193
+ }, [t.assetId]), null), Dt = jt(
185
194
  ({ rpcs: e, token: t, connectedWallets: r, onBalancesLoaded: s }) => {
186
- const { data: n } = Ls({
195
+ const { data: n } = er({
187
196
  rpcs: e,
188
197
  token: t,
189
198
  connectedWallets: r
@@ -194,13 +203,13 @@ const Bs = ({
194
203
  },
195
204
  (e, t) => e.token.assetId === t.token.assetId && e.connectedWallets === t.connectedWallets
196
205
  );
197
- Nt.displayName = "TokenBalanceLoader";
198
- const He = Object.assign(Nt, {
199
- Zero: Bs
200
- }), qs = (e) => {
206
+ Dt.displayName = "TokenBalanceLoader";
207
+ const et = Object.assign(Dt, {
208
+ Zero: tr
209
+ }), nr = (e) => {
201
210
  const t = e.toLowerCase();
202
- return ye[t]?.icon ?? "";
203
- }, Us = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, Ps = (e) => ye[e]?.name ?? e, P = (e) => {
211
+ return Re[t]?.icon ?? "";
212
+ }, sr = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, rr = (e) => Re[e]?.name ?? e, M = (e) => {
204
213
  const {
205
214
  showIntentTokens: t,
206
215
  allowedTokensList: r,
@@ -209,55 +218,55 @@ const He = Object.assign(Nt, {
209
218
  filterTokens: a,
210
219
  fetchSourceTokens: c,
211
220
  fetchTargetTokens: l
212
- } = y(), { data: d, ...u } = _e({
221
+ } = b(), { data: d, ...u } = Ee({
213
222
  queryKey: ["tokens", e].filter(Boolean),
214
- queryFn: async () => e === "source" && c ? c() : e === "target" && l ? l() : Zt.getTokens()
215
- }), i = v(() => {
223
+ queryFn: async () => e === "source" && c ? c() : e === "target" && l ? l() : on.getTokens()
224
+ }), i = L(() => {
216
225
  if (!d)
217
226
  return [];
218
227
  const f = d.map((m) => {
219
228
  const w = m.blockchain.toLowerCase();
220
- return !cn(w) || r && !r.includes(m.assetId) || e === "source" && s && !s.includes(m.assetId) || e === "target" && n && !n.includes(m.assetId) ? null : {
229
+ return !In(w) || r && !r.includes(m.assetId) || e === "source" && s && !s.includes(m.assetId) || e === "target" && n && !n.includes(m.assetId) ? null : {
221
230
  assetId: m.assetId,
222
231
  symbol: m.symbol,
223
232
  decimals: m.decimals,
224
233
  price: m.price,
225
234
  blockchain: w,
226
235
  isIntent: !1,
227
- icon: m.icon ?? qs(m.symbol),
228
- name: Ps(m.symbol),
229
- chainName: at[m.blockchain]?.label ?? Us(m.blockchain),
236
+ icon: m.icon ?? nr(m.symbol),
237
+ name: rr(m.symbol),
238
+ chainName: mt[m.blockchain]?.label ?? sr(m.blockchain),
230
239
  contractAddress: m.contractAddress
231
240
  };
232
- }).filter((m) => !!m).filter(a ?? (() => !0)), T = f.filter(
241
+ }).filter((m) => !!m).filter(a ?? (() => !0)), p = f.filter(
233
242
  (m) => m.symbol.toLowerCase() !== "wnear"
234
243
  ), I = f.find((m) => m.symbol.toLowerCase() === "wnear");
235
- return I && T.push({
244
+ return I && p.push({
236
245
  name: "NEAR",
237
246
  symbol: "NEAR",
238
247
  chainName: "Near",
239
248
  blockchain: "near",
240
- assetId: $,
241
- icon: ye.near?.icon ?? "",
249
+ assetId: G,
250
+ icon: Re.near?.icon ?? "",
242
251
  price: I?.price ?? 0,
243
252
  contractAddress: I?.contractAddress,
244
253
  isIntent: !1,
245
254
  decimals: 24
246
255
  }), t ? [
247
- ...T,
256
+ ...p,
248
257
  // add intents tokens to the full list
249
258
  ...f.map(
250
259
  (m) => m.symbol.toLowerCase() === "wnear" ? { ...m, symbol: "NEAR", name: "NEAR", isIntent: !0 } : { ...m, isIntent: !0 }
251
260
  )
252
- ] : T;
261
+ ] : p;
253
262
  }, [d, t, a]);
254
263
  return {
255
264
  ...u,
256
265
  tokens: i
257
266
  };
258
- }, Ws = () => {
259
- const { tokens: e } = P(), { tokens: t } = P("source"), { tokens: r } = P("target");
260
- return { tokens: v(() => {
267
+ }, ar = () => {
268
+ const { tokens: e } = M(), { tokens: t } = M("source"), { tokens: r } = M("target");
269
+ return { tokens: L(() => {
261
270
  const n = {};
262
271
  return [
263
272
  ...e,
@@ -268,118 +277,118 @@ const He = Object.assign(Nt, {
268
277
  n[c] = a;
269
278
  }), Object.values(n);
270
279
  }, [e, t, r]) };
271
- }, ue = [
280
+ }, he = [
272
281
  { eth: ["ETH", "USDT", "USDC", "AURORA"] },
273
282
  { near: ["USDT", "USDC", "AURORA"] },
274
283
  { arb: ["ARB", "ETH", "USDT", "USDC"] },
275
284
  { btc: ["BTC"] }
276
- ], Ms = (e) => [...e].sort((t, r) => {
277
- const s = ue.findIndex(
285
+ ], or = (e) => [...e].sort((t, r) => {
286
+ const s = he.findIndex(
278
287
  (d) => Object.keys(d)[0] === t.blockchain
279
- ), n = ue.findIndex(
288
+ ), n = he.findIndex(
280
289
  (d) => Object.keys(d)[0] === r.blockchain
281
290
  );
282
291
  if (s !== n)
283
292
  return s === -1 ? 1 : n === -1 ? -1 : s - n;
284
- const a = ue[s]?.[t.blockchain] ?? [], c = a.indexOf(t.symbol), l = a.indexOf(r.symbol);
293
+ const a = he[s]?.[t.blockchain] ?? [], c = a.indexOf(t.symbol), l = a.indexOf(r.symbol);
285
294
  return c === -1 && l === -1 ? 0 : c === -1 ? 1 : l === -1 ? -1 : c - l;
286
- }), Vs = ({ rpcs: e, connectedWallets: t }) => {
287
- const { tokens: r } = Ws(), { walletSupportedChains: s } = y(), { setWalletBalance: n } = be(t);
288
- return v(() => Ms(r), [r]).map((c) => s.includes(c.blockchain) ? /* @__PURE__ */ o(
289
- He,
295
+ }), ir = ({ rpcs: e, connectedWallets: t }) => {
296
+ const { tokens: r } = ar(), { walletSupportedChains: s } = b(), { setWalletBalance: n } = Ce(t);
297
+ return L(() => or(r), [r]).map((c) => s.includes(c.blockchain) ? /* @__PURE__ */ o(
298
+ et,
290
299
  {
291
300
  rpcs: e,
292
301
  token: c,
293
302
  connectedWallets: t,
294
303
  onBalancesLoaded: (l) => n(t, l)
295
304
  },
296
- G(c)
305
+ z(c)
297
306
  ) : /* @__PURE__ */ o(
298
- He.Zero,
307
+ et.Zero,
299
308
  {
300
309
  rpcs: e,
301
310
  token: c,
302
311
  onBalancesLoaded: (l) => n(t, l)
303
312
  },
304
- G(c)
313
+ z(c)
305
314
  ));
306
315
  };
307
- function Qs(e, t) {
316
+ function lr(e, t) {
308
317
  const r = Array.from(
309
- /* @__PURE__ */ new Set([...t ?? [], ...ot])
318
+ /* @__PURE__ */ new Set([...t ?? [], ...ft])
310
319
  ), s = new Map(r.map((n, a) => [n, a]));
311
320
  return [...e].sort((n, a) => {
312
321
  const c = s.has(n.id) ? s.get(n.id) : 1 / 0, l = s.has(a.id) ? s.get(a.id) : 1 / 0;
313
322
  return c !== l ? c - l : n.id.localeCompare(a.id, void 0, { sensitivity: "base" });
314
323
  });
315
324
  }
316
- const $s = (e) => {
325
+ const cr = (e) => {
317
326
  const {
318
327
  chainsOrder: t,
319
328
  allowedChainsList: r,
320
329
  allowedSourceChainsList: s,
321
330
  allowedTargetChainsList: n
322
- } = y(), { tokens: a } = P();
323
- return v(() => {
331
+ } = b(), { tokens: a } = M();
332
+ return L(() => {
324
333
  const c = Array.from(
325
- new Set(a.map((l) => at[l.blockchain]))
334
+ new Set(a.map((l) => mt[l.blockchain]))
326
335
  ).filter((l) => !(r && !r.includes(l.id) || e === "source" && s && !s.includes(l.id) || e === "target" && n && !n.includes(l.id)));
327
- return Qs(c, t);
336
+ return lr(c, t);
328
337
  }, [a, t, r]);
329
- }, Ge = 3, _t = ({
338
+ }, tt = 3, vt = ({
330
339
  connectedWallets: e,
331
340
  alchemyApiKey: t,
332
341
  ...r
333
342
  }) => {
334
- const { ctx: s } = _(), { tokens: n } = P(), { walletSupportedChains: a } = y(), { setWalletBalance: c } = be(e), l = r.isEnabled && !!Object.values(e).length && a.length > 0, d = Vt({
343
+ const { ctx: s } = _(), { tokens: n } = M(), { walletSupportedChains: a } = b(), { setWalletBalance: c } = Ce(e), l = r.isEnabled && !!Object.values(e).length && a.length > 0, d = Xt({
335
344
  initialPageParam: null,
336
345
  enabled: !!l && !!t,
337
346
  queryKey: ["walletTokensBalance", e],
338
- queryFn: async ({ pageParam: i }) => on({ alchemyApiKey: t })({
347
+ queryFn: async ({ pageParam: i }) => hn({ alchemyApiKey: t })({
339
348
  pageParam: i ? `${i}` : null,
340
349
  connectedWallets: e,
341
350
  walletSupportedChains: a
342
351
  }),
343
352
  getNextPageParam: (i, f) => {
344
- if (i.pageKey && !(f.length >= Ge))
353
+ if (i.pageKey && !(f.length >= tt))
345
354
  return i.pageKey;
346
355
  }
347
356
  });
348
357
  R(() => {
349
- l && d.data && d.hasNextPage && d.data.pages.length < Ge && !d.isFetchingNextPage && d.fetchNextPage();
358
+ l && d.data && d.hasNextPage && d.data.pages.length < tt && !d.isFetchingNextPage && d.fetchNextPage();
350
359
  }, [l, d]);
351
- const u = v(() => {
360
+ const u = L(() => {
352
361
  if (!d.data?.pages)
353
362
  return {};
354
- const i = an(
363
+ const i = Tn(
355
364
  n,
356
365
  d.data.pages.flatMap((f) => f.data)
357
366
  );
358
367
  return n.forEach((f) => {
359
- ln(f.blockchain) && !(f.assetId in i) && (i[f.assetId] = "0");
368
+ gn(f.blockchain) && !(f.assetId in i) && (i[f.assetId] = "0");
360
369
  }), i;
361
370
  }, [d.data, n]);
362
371
  return R(() => {
363
- D(s, ["initial_wallet"]) && (c(e, u), s.sourceToken && Object.keys(u).includes(s.sourceToken.assetId) && p("tokenSetBalance", u[s.sourceToken.assetId]));
372
+ x(s, ["initial_wallet"]) && (c(e, u), s.sourceToken && Object.keys(u).includes(s.sourceToken.assetId) && T("tokenSetBalance", u[s.sourceToken.assetId]));
364
373
  }, [u]), {
365
374
  status: d.status,
366
375
  refetch: d.refetch,
367
376
  balances: u
368
377
  };
369
- }, le = () => {
370
- const { intentsAccountType: e } = y(), {
378
+ }, fe = () => {
379
+ const { intentsAccountType: e } = b(), {
371
380
  ctx: { walletAddress: t }
372
- } = _(), { tokens: r } = P(), s = r.filter((l) => l.isIntent).map((l) => l.assetId), n = te({
381
+ } = _(), { tokens: r } = M(), s = r.filter((l) => l.isIntent).map((l) => l.assetId), n = ne({
373
382
  walletAddress: t,
374
383
  addressType: e
375
- }), a = _e({
384
+ }), a = Ee({
376
385
  enabled: !!t && !!n && r.length > 0,
377
386
  queryKey: ["intentsBalances", n],
378
- queryFn: async () => n ? await dn(n, s) : {}
379
- }), c = v(() => {
387
+ queryFn: async () => n ? await wn(n, s) : {}
388
+ }), c = L(() => {
380
389
  switch (a.status) {
381
390
  case "error":
382
- return b.error("Unable to load intents balances:", a.error), {};
391
+ return E.error("Unable to load intents balances:", a.error), {};
383
392
  case "success":
384
393
  return Object.fromEntries(
385
394
  Object.entries(a.data).map(([l, d]) => [
@@ -390,47 +399,47 @@ const $s = (e) => {
390
399
  case "pending":
391
400
  return {};
392
401
  default:
393
- return Ee(a, { throwError: !1 }), {};
402
+ return De(a, { throwError: !1 }), {};
394
403
  }
395
404
  }, [a]) ?? {};
396
405
  return {
397
406
  ...a,
398
407
  intentBalances: c
399
408
  };
400
- }, Ks = ({
409
+ }, dr = ({
401
410
  isEnabled: e,
402
411
  alchemyApiKey: t
403
412
  }) => {
404
- const { connectedWallets: r } = y(), { ctx: s } = _(), n = Qt(), { refetch: a } = le(), { refetch: c } = _t({
413
+ const { connectedWallets: r } = b(), { ctx: s } = _(), n = Zt(), { refetch: a } = fe(), { refetch: c } = vt({
405
414
  isEnabled: e,
406
415
  connectedWallets: r,
407
416
  alchemyApiKey: t ?? ""
408
417
  });
409
418
  R(() => {
410
- const l = D(s, ["transfer_success"]);
419
+ const l = x(s, ["transfer_success"]);
411
420
  !e || !l || (async () => (await a(), t && (await new Promise((d) => {
412
421
  setTimeout(d, 1e4);
413
422
  }), await c()), await n.invalidateQueries({ queryKey: ["tokenBalance"] })))();
414
423
  }, [s.state, e, t]);
415
- }, ce = () => {
416
- const { connectedWallets: e } = y(), { intentBalances: t } = le(), { walletBalance: r } = be(e);
417
- return { mergedBalance: v(
424
+ }, pe = () => {
425
+ const { connectedWallets: e } = b(), { intentBalances: t } = fe(), { walletBalance: r } = Ce(e);
426
+ return { mergedBalance: L(
418
427
  () => ({ ...r, ...t }),
419
428
  [r, t]
420
429
  ) };
421
- }, Hs = ({ isEnabled: e }) => {
422
- const { ctx: t } = _(), { mergedBalance: r } = ce();
430
+ }, ur = ({ isEnabled: e }) => {
431
+ const { ctx: t } = _(), { mergedBalance: r } = pe();
423
432
  R(() => {
424
433
  if (!e)
425
434
  return;
426
435
  if (!t.sourceToken || !t.walletAddress) {
427
- p("tokenSetBalance", void 0);
436
+ T("tokenSetBalance", void 0);
428
437
  return;
429
438
  }
430
- const s = G(t.sourceToken);
431
- p("tokenSetBalance", r[s]);
439
+ const s = z(t.sourceToken);
440
+ T("tokenSetBalance", r[s]);
432
441
  }, [r, t.sourceToken]);
433
- }, je = {
442
+ }, nt = {
434
443
  // cbBTC (eth)
435
444
  "nep141:eth-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near": "nep141:nbtc.bridge.near",
436
445
  // cbBTC (base)
@@ -445,23 +454,23 @@ const $s = (e) => {
445
454
  "nep245:v2_1.omni.hot.tg:56_SZzgw3HSudhZcTwPWUTi2RJB19t": "nep141:wrap.near",
446
455
  // BTC (near)
447
456
  "nep141:btc.omft.near": "nep141:nbtc.bridge.near"
448
- }, Gs = ({
457
+ }, mr = ({
449
458
  isEnabled: e
450
459
  }) => {
451
- const { ctx: t } = _(), { tokens: r } = P();
460
+ const { ctx: t } = _(), { tokens: r } = M();
452
461
  R(() => {
453
462
  if (!e)
454
463
  return;
455
464
  if (!t.sourceToken) {
456
- p("tokenSelect", { variant: "target", token: void 0 });
465
+ T("tokenSelect", { variant: "target", token: void 0 });
457
466
  return;
458
467
  }
459
468
  const { sourceToken: s } = t;
460
- if (t.sourceToken.assetId in je) {
469
+ if (t.sourceToken.assetId in nt) {
461
470
  const l = r.find(
462
- (d) => d.isIntent && d.assetId === je[s.assetId]
471
+ (d) => d.isIntent && d.assetId === nt[s.assetId]
463
472
  );
464
- p("tokenSelect", {
473
+ T("tokenSelect", {
465
474
  variant: "target",
466
475
  token: l
467
476
  });
@@ -471,7 +480,7 @@ const $s = (e) => {
471
480
  (l) => l.isIntent && l.symbol === s.symbol && l.blockchain === "near"
472
481
  );
473
482
  if (n) {
474
- p("tokenSelect", { variant: "target", token: n });
483
+ T("tokenSelect", { variant: "target", token: n });
475
484
  return;
476
485
  }
477
486
  const a = r.find(
@@ -479,25 +488,25 @@ const $s = (e) => {
479
488
  ), c = r.find(
480
489
  (l) => l.isIntent && l.symbol === "USDC" && l.blockchain === "near"
481
490
  );
482
- p("tokenSelect", {
491
+ T("tokenSelect", {
483
492
  variant: "target",
484
493
  token: a ?? c
485
494
  });
486
495
  }, [r, t.sourceToken]);
487
- }, js = ({ isEnabled: e }) => {
488
- const { connectedWallets: t } = y(), { ctx: r, state: s } = _(), { walletAddress: n } = rt(
496
+ }, fr = ({ isEnabled: e }) => {
497
+ const { connectedWallets: t } = b(), { ctx: r, state: s } = _(), { walletAddress: n } = ut(
489
498
  t,
490
499
  r.sourceToken
491
500
  );
492
501
  R(() => {
493
502
  if (!e)
494
503
  return;
495
- p("walletAddressSet", n), D(r, ["initial_dry", "initial_wallet"]) && (s === "initial_wallet" && !n ? O("initial_dry") : s === "initial_dry" && n && O("initial_wallet"));
504
+ T("walletAddressSet", n), x(r, ["initial_dry", "initial_wallet"]) && (s === "initial_wallet" && !n ? F("initial_dry") : s === "initial_dry" && n && F("initial_wallet"));
496
505
  }, [e, n, r, s]);
497
- }, zs = (e) => (["depositAddress"].forEach((t) => {
506
+ }, pr = (e) => (["depositAddress"].forEach((t) => {
498
507
  if (!(t in e))
499
- return b.error(`Missing ${t} in quote response`), !1;
500
- }), !0), Ys = () => {
508
+ return E.error(`Missing ${t} in quote response`), !1;
509
+ }), !0), Tr = () => {
501
510
  const { ctx: e } = _(), {
502
511
  walletSupportedChains: t,
503
512
  intentsAccountType: r,
@@ -505,144 +514,144 @@ const $s = (e) => {
505
514
  appFees: n,
506
515
  fetchQuote: a,
507
516
  slippageTolerance: c
508
- } = y(), l = Re(e), d = Y(null), u = Y(new AbortController()), i = v(() => async (T, I) => {
517
+ } = b(), l = ve(e), d = X(null), u = X(new AbortController()), i = L(() => async (p, I) => {
509
518
  const { signal: m } = u.current;
510
- return a ? a(T, {
519
+ return a ? a(p, {
511
520
  ...I,
512
521
  signal: m
513
- }) : (await Ie.post(
522
+ }) : (await Se.post(
514
523
  "https://1click.chaindefuser.com/v0/quote",
515
- T,
524
+ p,
516
525
  { signal: m }
517
526
  )).data.quote;
518
- }, [Ie]);
527
+ }, [Se]);
519
528
  return {
520
529
  make: async ({
521
- message: T,
530
+ message: p,
522
531
  quoteType: I = "exact_in",
523
532
  options: m = {}
524
533
  } = {}) => {
525
- if (!D(e, [
534
+ if (!x(e, [
526
535
  "input_valid_dry",
527
536
  "input_valid_external",
528
537
  "input_valid_internal",
529
538
  "quote_success_internal",
530
539
  "quote_success_external"
531
540
  ])) {
532
- const k = `Unable to run quote in current state ${e.state}`;
533
- throw b.error(`[WIDGET] ${k}`), new q({
541
+ const S = `Unable to run quote in current state ${e.state}`;
542
+ throw E.error(`[WIDGET] ${S}`), new U({
534
543
  code: "QUOTE_INVALID_INITIAL",
535
- meta: { isDry: l, message: k }
544
+ meta: { isDry: l, message: S }
536
545
  });
537
546
  }
538
- const S = te({
547
+ const k = ne({
539
548
  addressType: r,
540
549
  walletAddress: l ? (
541
550
  // address on the target chain should be a dry quote recipient
542
- Ue(e.targetToken.blockchain)
551
+ He(e.targetToken.blockchain)
543
552
  ) : e.walletAddress ?? ""
544
- }), E = S && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), B = () => l ? Ue(
553
+ }), y = k && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), q = () => l ? He(
545
554
  e.sourceToken.blockchain,
546
555
  e.sourceToken.isIntent
547
- ) : E ? S : e.walletAddress ?? "";
548
- if (!S) {
549
- const k = "No corresponding intents account to run a quote";
550
- throw b.error(`[WIDGET] ${k}`), new q({
556
+ ) : y ? k : e.walletAddress ?? "";
557
+ if (!k) {
558
+ const S = "No corresponding intents account to run a quote";
559
+ throw E.error(`[WIDGET] ${S}`), new U({
551
560
  code: "QUOTE_INVALID_INITIAL",
552
- meta: { isDry: l, message: k }
561
+ meta: { isDry: l, message: S }
553
562
  });
554
563
  }
555
564
  d.current && (u.current.abort("Abort previous quote (auto)"), u.current = new AbortController());
556
- let F;
557
- const L = {
565
+ let D;
566
+ const B = {
558
567
  // Settings
559
568
  dry: l,
560
569
  slippageTolerance: c,
561
570
  deadline: new Date(Date.now() + 3600 * 1e3).toISOString(),
562
571
  // 1 hour
563
- swapType: I === "exact_out" ? U.swapType.EXACT_OUTPUT : U.swapType.EXACT_INPUT,
572
+ swapType: I === "exact_out" ? W.swapType.EXACT_OUTPUT : W.swapType.EXACT_INPUT,
564
573
  // Target
565
- destinationAsset: e.targetToken.assetId === $ ? ge : e.targetToken.assetId,
574
+ destinationAsset: e.targetToken.assetId === G ? Ae : e.targetToken.assetId,
566
575
  // Source
567
- originAsset: e.sourceToken.assetId === $ ? ge : e.sourceToken.assetId,
576
+ originAsset: e.sourceToken.assetId === G ? Ae : e.sourceToken.assetId,
568
577
  amount: I === "exact_out" ? e.targetTokenAmount : e.sourceTokenAmount,
569
578
  // Experimental
570
579
  quoteWaitingTimeMs: 0
571
580
  };
572
- T && (L.customRecipientMsg = T), s && (L.referral = ct(s)), n && (L.appFees = [...n]);
581
+ p && (B.customRecipientMsg = p), s && (B.referral = ht(s)), n && (B.appFees = [...n]);
573
582
  try {
574
583
  e.sourceToken.isIntent && e.targetToken.isIntent && (d.current = i(
575
584
  {
576
- ...L,
577
- recipient: S,
578
- recipientType: U.recipientType.INTENTS,
579
- depositType: U.depositType.INTENTS,
585
+ ...B,
586
+ recipient: k,
587
+ recipientType: W.recipientType.INTENTS,
588
+ depositType: W.depositType.INTENTS,
580
589
  // Refund
581
- refundTo: S,
582
- refundType: U.refundType.INTENTS
590
+ refundTo: k,
591
+ refundType: W.refundType.INTENTS
583
592
  },
584
593
  m
585
- ), F = await d.current), d.current = i(
594
+ ), D = await d.current), d.current = i(
586
595
  {
587
- ...L,
588
- recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : S,
589
- recipientType: e.targetToken.isIntent ? U.recipientType.INTENTS : U.recipientType.DESTINATION_CHAIN,
590
- depositType: e.sourceToken.isIntent ? U.depositType.INTENTS : U.depositType.ORIGIN_CHAIN,
596
+ ...B,
597
+ recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : k,
598
+ recipientType: e.targetToken.isIntent ? W.recipientType.INTENTS : W.recipientType.DESTINATION_CHAIN,
599
+ depositType: e.sourceToken.isIntent ? W.depositType.INTENTS : W.depositType.ORIGIN_CHAIN,
591
600
  // Refund
592
- refundTo: B(),
593
- refundType: E ? U.refundType.INTENTS : U.refundType.ORIGIN_CHAIN
601
+ refundTo: q(),
602
+ refundType: y ? W.refundType.INTENTS : W.refundType.ORIGIN_CHAIN
594
603
  },
595
604
  m
596
- ), F = await d.current;
597
- } catch (k) {
598
- if (k instanceof dt)
605
+ ), D = await d.current;
606
+ } catch (S) {
607
+ if (S instanceof gt)
599
608
  return;
600
- b.error("Quote error: ", k);
601
- let x = k instanceof Error ? k.message : "";
602
- if (k instanceof ut) {
603
- if (x = k.response?.data.message || x, x.includes("Amount is too low")) {
604
- const X = x.match(/\d+/), J = X ? X[0] : void 0;
605
- throw new q({
609
+ E.error("Quote error: ", S);
610
+ let O = S instanceof Error ? S.message : "";
611
+ if (S instanceof It) {
612
+ if (O = S.response?.data.message || O, O.includes("Amount is too low")) {
613
+ const re = O.match(/\d+/), ae = re ? re[0] : void 0;
614
+ throw new U({
606
615
  code: "QUOTE_AMOUNT_IS_TOO_LOW",
607
616
  meta: {
608
- minAmount: (J && j(J, e.sourceToken.decimals)) ?? "0"
617
+ minAmount: (ae && Y(ae, e.sourceToken.decimals)) ?? "0"
609
618
  }
610
619
  });
611
620
  }
612
- throw x.includes("recipient is not valid") ? new q({
621
+ throw O.includes("recipient is not valid") ? new U({
613
622
  code: "TOKEN_IS_NOT_SUPPORTED"
614
- }) : x.includes("Failed to get a deposit address") ? new q({
623
+ }) : O.includes("Failed to get a deposit address") ? new U({
615
624
  code: "QUOTE_NO_ONE_TIME_ADDRESS"
616
- }) : k;
625
+ }) : S;
617
626
  }
618
- throw new q({
627
+ throw new U({
619
628
  code: "QUOTE_FAILED",
620
629
  meta: {
621
- message: x || "Failed to fetch quote. Please try again."
630
+ message: O || "Failed to fetch quote. Please try again."
622
631
  }
623
632
  });
624
633
  }
625
634
  return l ? {
626
635
  dry: !0,
627
- ...F,
636
+ ...D,
628
637
  deadline: void 0,
629
638
  depositAddress: void 0
630
- } : (zs(F), {
639
+ } : (pr(D), {
631
640
  dry: !1,
632
- ...F,
633
- deadline: F.deadline,
634
- depositAddress: F.depositAddress
641
+ ...D,
642
+ deadline: D.deadline,
643
+ depositAddress: D.depositAddress
635
644
  });
636
645
  },
637
646
  cancel: () => {
638
647
  u.current.abort("Abort quote manually"), u.current = new AbortController();
639
648
  }
640
649
  };
641
- }, Zs = () => {
642
- const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: r } = z(), s = te({
650
+ }, hr = () => {
651
+ const { ctx: e } = _(), { intentsAccountType: t } = b(), { isNativeNearDeposit: r } = Z(), s = ne({
643
652
  addressType: t,
644
653
  walletAddress: e.walletAddress ?? ""
645
- }), n = Y(null), a = Y(new AbortController()), c = v(() => async (d) => mt.post(
654
+ }), n = X(null), a = X(new AbortController()), c = L(() => async (d) => wt.post(
646
655
  "",
647
656
  {
648
657
  id: 1,
@@ -658,10 +667,10 @@ const $s = (e) => {
658
667
  {
659
668
  signal: a.current.signal
660
669
  }
661
- ), [Ie]);
670
+ ), [Se]);
662
671
  return {
663
672
  make: async () => {
664
- if (!D(e, [
673
+ if (!x(e, [
665
674
  "input_valid_dry",
666
675
  "input_valid_external",
667
676
  "input_valid_internal",
@@ -669,13 +678,13 @@ const $s = (e) => {
669
678
  "quote_success_external"
670
679
  ])) {
671
680
  const i = `Unable to run quote in current state ${e.state}`;
672
- throw b.error(`[WIDGET] ${i}`), new q({
681
+ throw E.error(`[WIDGET] ${i}`), new U({
673
682
  code: "QUOTE_INVALID_INITIAL",
674
683
  meta: { isDry: !1, message: i }
675
684
  });
676
685
  }
677
686
  if (r && !e.isDepositFromExternalWallet || !r && e.sourceToken.assetId !== e.targetToken.assetId)
678
- throw new q({
687
+ throw new U({
679
688
  code: "QUOTE_INVALID_INITIAL",
680
689
  meta: {
681
690
  isDry: !1,
@@ -683,7 +692,7 @@ const $s = (e) => {
683
692
  }
684
693
  });
685
694
  if (e.sourceToken.isIntent)
686
- throw new q({
695
+ throw new U({
687
696
  code: "QUOTE_INVALID_INITIAL",
688
697
  meta: {
689
698
  isDry: !1,
@@ -691,7 +700,7 @@ const $s = (e) => {
691
700
  }
692
701
  });
693
702
  if (!e.isDepositFromExternalWallet && e.sourceToken.blockchain === "near")
694
- throw new q({
703
+ throw new U({
695
704
  code: "QUOTE_INVALID_INITIAL",
696
705
  meta: {
697
706
  isDry: !1,
@@ -700,18 +709,18 @@ const $s = (e) => {
700
709
  });
701
710
  if (!s) {
702
711
  const i = "No corresponding intents account to run a quote";
703
- throw b.error(`[WIDGET] ${i}`), new q({
712
+ throw E.error(`[WIDGET] ${i}`), new U({
704
713
  code: "QUOTE_INVALID_INITIAL",
705
714
  meta: { isDry: !1, message: i }
706
715
  });
707
716
  }
708
717
  n.current && (a.current.abort("Abort previous quote (auto)"), a.current = new AbortController());
709
- let u = it[e.targetToken.blockchain];
718
+ let u = pt[e.targetToken.blockchain];
710
719
  if (!u)
711
- if (Q(e.targetToken.blockchain))
712
- u = lt;
720
+ if (H(e.targetToken.blockchain))
721
+ u = Tt;
713
722
  else
714
- throw new q({
723
+ throw new U({
715
724
  code: "QUOTE_INVALID_INITIAL",
716
725
  meta: { isDry: !1, message: "Chain is not supported by POA" }
717
726
  });
@@ -724,12 +733,12 @@ const $s = (e) => {
724
733
  amountIn: e.sourceTokenAmount,
725
734
  amountOut: e.targetTokenAmount,
726
735
  amountInUsd: `${parseFloat(
727
- j(e.sourceTokenAmount, e.sourceToken.decimals)
736
+ Y(e.sourceTokenAmount, e.sourceToken.decimals)
728
737
  ) * e.sourceToken.price}`,
729
738
  amountOutUsd: `${parseFloat(
730
- j(e.targetTokenAmount, e.targetToken.decimals)
739
+ Y(e.targetTokenAmount, e.targetToken.decimals)
731
740
  ) * e.targetToken.price}`,
732
- amountOutFormatted: j(
741
+ amountOutFormatted: Y(
733
742
  e.targetTokenAmount,
734
743
  e.targetToken.decimals
735
744
  ),
@@ -739,11 +748,11 @@ const $s = (e) => {
739
748
  dry: !1
740
749
  };
741
750
  } catch (i) {
742
- if (i instanceof dt)
751
+ if (i instanceof gt)
743
752
  return;
744
- if (b.error(i), i instanceof ut) {
753
+ if (E.error(i), i instanceof It) {
745
754
  const f = i.response?.data.message || i.message;
746
- throw new q({
755
+ throw new U({
747
756
  code: "QUOTE_FAILED",
748
757
  meta: {
749
758
  message: f ?? "Failed to fetch quote. Please try again."
@@ -756,60 +765,60 @@ const $s = (e) => {
756
765
  a.current.abort("Abort quote manually"), a.current = new AbortController();
757
766
  }
758
767
  };
759
- }, ze = (e) => {
760
- p("errorSet", e), p("quoteSet", void 0), p("quoteSetStatus", "idle"), p("transferSetStatus", { status: "idle" });
761
- }, Ye = async (e) => {
768
+ }, st = (e) => {
769
+ T("errorSet", e), T("quoteSet", void 0), T("quoteSetStatus", "idle"), T("transferSetStatus", { status: "idle" });
770
+ }, rt = async (e) => {
762
771
  if (!e.sendAddress)
763
772
  return;
764
773
  let t = !1;
765
774
  try {
766
- p("setInputsValidating", !0), t = await mn(e.sendAddress);
775
+ T("setInputsValidating", !0), t = await An(e.sendAddress);
767
776
  } catch {
768
- ze({
777
+ st({
769
778
  code: "SEND_ADDRESS_IS_NOT_VERIFIED",
770
779
  meta: { address: e.sendAddress, chain: "near" }
771
- }), p("setInputsValidating", !1), O("initial_wallet");
780
+ }), T("setInputsValidating", !1), F("initial_wallet");
772
781
  return;
773
782
  }
774
- if (p("setInputsValidating", !1), !t) {
775
- ze({
783
+ if (T("setInputsValidating", !1), !t) {
784
+ st({
776
785
  code: "SEND_ADDRESS_IS_NOT_FOUND",
777
786
  meta: { address: e.sendAddress, chain: "near" }
778
- }), O("initial_wallet");
787
+ }), F("initial_wallet");
779
788
  return;
780
789
  }
781
- e.error ? fn(e.error) && (p("errorSet", null), O("input_valid_external")) : O("input_valid_external");
782
- }, yt = (e) => {
783
- const t = D(e, ["initial_dry"]), r = D(e, ["input_valid_dry"]);
790
+ e.error ? Sn(e.error) && (T("errorSet", null), F("input_valid_external")) : F("input_valid_external");
791
+ }, xt = (e) => {
792
+ const t = x(e, ["initial_dry"]), r = x(e, ["input_valid_dry"]);
784
793
  if (!t && !r)
785
794
  return;
786
795
  let s;
787
- return t && (e.sourceToken ? e.targetToken ? ne(e.sourceTokenAmount) ? e.walletAddress && !Ce(e) && (s = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : s = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : s = { code: "TARGET_TOKEN_IS_EMPTY" } : s = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && s ? p("errorSet", s) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r && s?.code === "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", s), r;
788
- }, bt = (e) => {
789
- const t = D(e, ["initial_wallet"]), r = D(e, ["input_valid_external"]);
796
+ return t && (e.sourceToken ? e.targetToken ? se(e.sourceTokenAmount) ? e.walletAddress && !xe(e) && (s = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : s = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : s = { code: "TARGET_TOKEN_IS_EMPTY" } : s = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && s ? T("errorSet", s) : e.error && !Oe(e.error) && !Fe(e.error) && T("errorSet", null), r && s?.code === "SOURCE_BALANCE_INSUFFICIENT" && T("errorSet", s), r;
797
+ }, Ot = (e) => {
798
+ const t = x(e, ["initial_wallet"]), r = x(e, ["input_valid_external"]);
790
799
  if (!t && !r)
791
800
  return;
792
801
  const s = e.sourceTokenBalance;
793
802
  let n;
794
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : ne(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? pt(e.sendAddress) ? Ye(e) : n = {
803
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : se(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? At(e.sendAddress) ? rt(e) : n = {
795
804
  code: "SEND_ADDRESS_IS_INVALID",
796
805
  meta: { address: e.sendAddress, chain: "near" }
797
- } : e.isDepositFromExternalWallet || (!s || !ft(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : Ce(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SEND_ADDRESS_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), r && e.targetToken.blockchain === "near" && Ye(e), !r && n ? p("errorSet", n) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r;
798
- }, Et = (e) => {
799
- const t = D(e, ["initial_wallet"]), r = D(e, ["input_valid_internal"]);
806
+ } : e.isDepositFromExternalWallet || (!s || !kt(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : xe(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SEND_ADDRESS_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), r && e.targetToken.blockchain === "near" && rt(e), !r && n ? T("errorSet", n) : e.error && !Oe(e.error) && !Fe(e.error) && T("errorSet", null), r;
807
+ }, Ft = (e) => {
808
+ const t = x(e, ["initial_wallet"]), r = x(e, ["input_valid_internal"]);
800
809
  if (!t && !r)
801
810
  return;
802
811
  const s = e.sourceTokenBalance;
803
812
  let n;
804
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? ne(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!s || !ft(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : Ce(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_NOT_INTENT" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && n ? p("errorSet", n) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r;
805
- }, Rt = (e) => {
806
- const t = Re(e), r = !t && e.targetToken?.isIntent === !0, s = !t && e.targetToken?.isIntent === !1;
813
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? se(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!s || !kt(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : xe(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_NOT_INTENT" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && n ? T("errorSet", n) : e.error && !Oe(e.error) && !Fe(e.error) && T("errorSet", null), r;
814
+ }, Lt = (e) => {
815
+ const t = ve(e), r = !t && e.targetToken?.isIntent === !0, s = !t && e.targetToken?.isIntent === !1;
807
816
  if (t) {
808
- const n = yt(e);
809
- return O(n ? "input_valid_dry" : "initial_dry");
817
+ const n = xt(e);
818
+ return F(n ? "input_valid_dry" : "initial_dry");
810
819
  }
811
- s && bt(e) ? O("input_valid_external") : r && Et(e) ? O("input_valid_internal") : O("initial_wallet");
812
- }, Xs = ({
820
+ s && Ot(e) ? F("input_valid_external") : r && Ft(e) ? F("input_valid_internal") : F("initial_wallet");
821
+ }, gr = ({
813
822
  isEnabled: e,
814
823
  message: t,
815
824
  type: r = "exact_in",
@@ -822,76 +831,76 @@ const $s = (e) => {
822
831
  isDirectNearTokenWithdrawal: d,
823
832
  isDirectTokenOnNearTransfer: u,
824
833
  isSameAssetDiffChainWithdrawal: i
825
- } = z(), f = Re(n), T = e && !n.areInputsValidating && (i || (l || a) && n.isDepositFromExternalWallet || !d && !c && !l && !u), { make: I, cancel: m } = Ys(), { make: w, cancel: S } = Zs(), E = Y(null), B = () => {
826
- m(), S();
834
+ } = Z(), f = ve(n), p = e && !n.areInputsValidating && (i || (l || a) && n.isDepositFromExternalWallet || !d && !c && !l && !u), { make: I, cancel: m } = Tr(), { make: w, cancel: k } = hr(), y = X(null), q = () => {
835
+ m(), k();
827
836
  };
828
837
  R(() => {
829
- const L = D(n, ["input_valid_dry"]), k = D(n, ["input_valid_external"]), x = D(n, ["input_valid_internal"]);
830
- (f && !L || !f && n.targetToken?.isIntent && !x || !f && !n.targetToken?.isIntent && !k || n.areInputsValidating) && B();
831
- }, [B, f, n]);
832
- const F = Te(
833
- async (L) => {
838
+ const B = x(n, ["input_valid_dry"]), S = x(n, ["input_valid_external"]), O = x(n, ["input_valid_internal"]);
839
+ (f && !B || !f && n.targetToken?.isIntent && !O || !f && !n.targetToken?.isIntent && !S || n.areInputsValidating) && q();
840
+ }, [q, f, n]);
841
+ const D = ie(
842
+ async (B) => {
834
843
  try {
835
- let k;
844
+ let S;
836
845
  if (n.sourceToken?.assetId === n.targetToken?.assetId || a && n.isDepositFromExternalWallet) {
837
846
  if (f)
838
847
  return;
839
- p("quoteSetStatus", "pending"), k = await w();
848
+ T("quoteSetStatus", "pending"), S = await w();
840
849
  } else
841
- p("quoteSetStatus", "pending"), k = await I({ message: t, quoteType: r, options: L });
842
- if (!k)
850
+ T("quoteSetStatus", "pending"), S = await I({ message: t, quoteType: r, options: B });
851
+ if (!S)
843
852
  return;
844
- if (p("quoteSetStatus", "success"), p("quoteSet", k), !f && n.error?.code !== "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", null), p("tokenSetAmount", {
853
+ if (T("quoteSetStatus", "success"), T("quoteSet", S), !f && n.error?.code !== "SOURCE_BALANCE_INSUFFICIENT" && T("errorSet", null), T("tokenSetAmount", {
845
854
  variant: "target",
846
- amount: k.amountOut
855
+ amount: S.amountOut
847
856
  }), n.state === "input_valid_dry") {
848
- O("quote_success_dry");
857
+ F("quote_success_dry");
849
858
  return;
850
859
  }
851
- n.targetToken?.isIntent ? O("quote_success_internal") : O("quote_success_external");
852
- } catch (k) {
853
- if (k instanceof q) {
854
- if (k.data.code === "QUOTE_INVALID_INITIAL") {
855
- p("quoteSetStatus", "idle"), p("quoteSet", void 0), p("errorSet", null);
860
+ n.targetToken?.isIntent ? F("quote_success_internal") : F("quote_success_external");
861
+ } catch (S) {
862
+ if (S instanceof U) {
863
+ if (S.data.code === "QUOTE_INVALID_INITIAL") {
864
+ T("quoteSetStatus", "idle"), T("quoteSet", void 0), T("errorSet", null);
856
865
  return;
857
866
  }
858
- p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", k.data), Rt(n);
867
+ T("quoteSetStatus", "error"), T("quoteSet", void 0), T("errorSet", S.data), Lt(n);
859
868
  return;
860
869
  }
861
- b.error("Unhandled error in useMakeQuoteEffect:", k), p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", {
870
+ E.error("Unhandled error in useMakeQuoteEffect:", S), T("quoteSetStatus", "error"), T("quoteSet", void 0), T("errorSet", {
862
871
  code: "QUOTE_FAILED",
863
872
  meta: { message: "Unknown error" }
864
873
  });
865
874
  }
866
875
  },
867
- [n, f, w, I, t, r, T]
876
+ [n, f, w, I, t, r, p]
868
877
  );
869
878
  R(() => {
870
- !T || !(f ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent) || n.quoteStatus !== "error" && (a && !n.isDepositFromExternalWallet || F({ isRefetch: !1 }));
871
- }, [T, F, B, n.sourceToken, n.targetToken]), R(() => {
872
- const L = () => {
873
- E.current && (clearInterval(E.current), E.current = null);
879
+ !p || !(f ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent) || n.quoteStatus !== "error" && (a && !n.isDepositFromExternalWallet || D({ isRefetch: !1 }));
880
+ }, [p, D, q, n.sourceToken, n.targetToken]), R(() => {
881
+ const B = () => {
882
+ y.current && (clearInterval(y.current), y.current = null);
874
883
  };
875
- return n.state !== "quote_success_internal" && n.state !== "quote_success_external" || !s || (E.current = setInterval(async () => {
876
- await F({ isRefetch: !0 });
877
- }, s)), L;
878
- }, [T, F, B, n.state]);
879
- }, me = {
884
+ return n.state !== "quote_success_internal" && n.state !== "quote_success_external" || !s || (y.current = setInterval(async () => {
885
+ await D({ isRefetch: !0 });
886
+ }, s)), B;
887
+ }, [p, D, q, n.state]);
888
+ }, ge = {
880
889
  sol: "sol",
881
890
  evm: "eth",
882
891
  near: "near"
883
- }, Js = ({
892
+ }, Ir = ({
884
893
  isEnabled: e,
885
894
  skipIntents: t = !1,
886
895
  target: r = "none"
887
896
  }) => {
888
- const { tokens: s } = P(), { ctx: n, state: a } = _(), { intentBalances: c } = le(), { walletSupportedChains: l, chainsFilter: d, intentsAccountType: u } = y(), i = hn({
897
+ const { tokens: s } = M(), { ctx: n, state: a } = _(), { intentBalances: c } = fe(), { walletSupportedChains: l, chainsFilter: d, intentsAccountType: u } = b(), i = yn({
889
898
  tokens: s,
890
899
  walletSupportedChains: l,
891
900
  balances: c,
892
901
  across: "intents"
893
- }), [f, T] = v(() => !n.walletAddress && !t ? [
894
- { token: Tn({ tokens: s }), status: "loaded" },
902
+ }), [f, p] = L(() => !n.walletAddress && !t ? [
903
+ { token: _n({ tokens: s }), status: "loaded" },
895
904
  { token: void 0, status: "loaded" }
896
905
  ] : d.source.intents !== "none" && !t ? i ? [
897
906
  { token: i, status: "loaded" },
@@ -900,7 +909,7 @@ const $s = (e) => {
900
909
  { token: void 0, status: "loading" },
901
910
  { token: void 0, status: "loading" }
902
911
  ] : [
903
- { token: pn({
912
+ { token: Nn({
904
913
  tokens: s,
905
914
  walletSupportedChains: l
906
915
  }), status: "loaded" },
@@ -917,11 +926,11 @@ const $s = (e) => {
917
926
  R(() => {
918
927
  if (!e)
919
928
  return;
920
- if (D(n, ["initial_dry", "initial_wallet"]) && (f.status === "loaded" && !n.sourceToken && p("tokenSelect", {
929
+ if (x(n, ["initial_dry", "initial_wallet"]) && (f.status === "loaded" && !n.sourceToken && T("tokenSelect", {
921
930
  variant: "source",
922
931
  token: f.token
923
- }), T.status === "loaded" && f.status === "loaded" && !n.targetToken)) {
924
- let w = T.token;
932
+ }), p.status === "loaded" && f.status === "loaded" && !n.targetToken)) {
933
+ let w = p.token;
925
934
  if (r === "same-asset")
926
935
  if (f.token?.isIntent) {
927
936
  if (!u)
@@ -929,93 +938,93 @@ const $s = (e) => {
929
938
  "Intents account type is required to select same-asset target token"
930
939
  );
931
940
  w = s.find(
932
- (S) => !S.isIntent && S.symbol === n.sourceToken?.symbol && S.blockchain === me[u]
941
+ (k) => !k.isIntent && k.symbol === n.sourceToken?.symbol && k.blockchain === ge[u]
933
942
  );
934
943
  } else
935
944
  w = s.find(
936
- (S) => S.isIntent && S.symbol === n.sourceToken?.symbol
945
+ (k) => k.isIntent && k.symbol === n.sourceToken?.symbol
937
946
  );
938
- p("tokenSelect", {
947
+ T("tokenSelect", {
939
948
  variant: "target",
940
949
  token: w
941
950
  });
942
951
  }
943
- }, [n, f, T, e]);
952
+ }, [n, f, p, e]);
944
953
  const I = (m, w) => {
945
- const S = s.find(
946
- (E) => !E.isIntent && E.blockchain === me[m] && E.symbol.toLowerCase() === Xt[me[m]]?.toLowerCase()
954
+ const k = s.find(
955
+ (y) => !y.isIntent && y.blockchain === ge[m] && y.symbol.toLowerCase() === ln[ge[m]]?.toLowerCase()
947
956
  ) ?? w;
948
- p("tokenSelect", {
957
+ T("tokenSelect", {
949
958
  variant: "source",
950
- token: S
959
+ token: k
951
960
  });
952
961
  };
953
962
  return R(() => {
954
- const m = D(n, ["initial_dry", "initial_wallet"]);
963
+ const m = x(n, ["initial_dry", "initial_wallet"]);
955
964
  if (!e || !m)
956
965
  return;
957
966
  const w = s.find(
958
- (E) => E.isIntent && E.symbol === "AURORA" && E.blockchain === "near"
959
- ), S = setTimeout(() => {
960
- f.token || (!t && i ? p("tokenSelect", {
967
+ (y) => y.isIntent && y.symbol === "AURORA" && y.blockchain === "near"
968
+ ), k = setTimeout(() => {
969
+ f.token || (!t && i ? T("tokenSelect", {
961
970
  variant: "source",
962
971
  token: i
963
- }) : l.length && u ? I(u, w) : n.walletAddress && Tt(n.walletAddress) ? I("sol", w) : n.walletAddress && ht(n.walletAddress) ? I("evm", w) : n.walletAddress && pt(n.walletAddress) ? I("near", w) : p("tokenSelect", {
972
+ }) : l.length && u ? I(u, w) : n.walletAddress && St(n.walletAddress) ? I("sol", w) : n.walletAddress && Nt(n.walletAddress) ? I("evm", w) : n.walletAddress && At(n.walletAddress) ? I("near", w) : T("tokenSelect", {
964
973
  variant: "source",
965
974
  token: w
966
975
  }));
967
976
  }, 3e3);
968
- return () => clearTimeout(S);
977
+ return () => clearTimeout(k);
969
978
  }, [s, f, t]), { source: n.sourceToken, target: n.targetToken };
970
- }, er = ({
979
+ }, wr = ({
971
980
  isEnabled: e,
972
981
  alchemyApiKey: t
973
982
  }) => {
974
- const { connectedWallets: r } = y();
975
- _t({
983
+ const { connectedWallets: r } = b();
984
+ vt({
976
985
  isEnabled: e,
977
986
  connectedWallets: r,
978
987
  alchemyApiKey: t ?? ""
979
988
  });
980
- }, tr = (e, t) => {
981
- const { config: r } = Ne(qe);
989
+ }, kr = (e, t) => {
990
+ const { config: r } = be(We);
982
991
  return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((s) => s?.key === "sendAddress") && r.walletSupportedChains.includes(e.targetToken.blockchain);
983
- }, nr = ({ debug: e }) => {
984
- Z.onContextChange((t, r) => {
992
+ }, Ar = ({ debug: e }) => {
993
+ J.onContextChange((t, r) => {
985
994
  const s = r;
986
- if (e && b.debug("[WIDGET] Context changed", s), e && t.error && wn(s) && b.debug(`[WIDGET] Error set to ${t.error.code}`), kn(s) || _n(t, s, e))
995
+ if (e && E.debug("[WIDGET] Context changed", s), e && t.error && Rn(s) && E.debug(`[WIDGET] Error set to ${t.error.code}`), Cn(s) || On(t, s, e))
987
996
  return;
988
- if (Sn(t, s)) {
989
- p("reset", { clearWalletAddress: !0 }), O("initial_dry");
997
+ if (vn(t, s)) {
998
+ T("reset", { clearWalletAddress: !0 }), F("initial_dry");
990
999
  return;
991
1000
  }
992
- const { isChanged: n, isDry: a } = In(t, s);
1001
+ const { isChanged: n, isDry: a } = En(t, s);
993
1002
  if (n) {
994
- if (An(t)) {
1003
+ if (Dn(t)) {
995
1004
  const c = a ? "initial_dry" : "initial_wallet";
996
- O(c, {
1005
+ F(c, {
997
1006
  onMoved: () => {
998
- e && b.debug(
1007
+ e && E.debug(
999
1008
  `[WIDGET] Inputs changed. State moved to ${c}`
1000
1009
  );
1001
1010
  }
1002
1011
  });
1003
1012
  }
1004
- gn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), Nn(t) && (t.sendAddress = void 0), tr(t, s) && (t.sendAddress = t.walletAddress), Rt(t);
1013
+ bn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), xn(t) && (t.sendAddress = void 0), kr(t, s) && (t.sendAddress = t.walletAddress), Lt(t);
1005
1014
  }
1006
1015
  });
1007
- }, sr = ({ debug: e }) => {
1008
- Z.onTransition((t, r) => {
1009
- e && b.debug(`===> [WIDGET] State moved from ${t} to ${r}`);
1016
+ }, Sr = ({ debug: e }) => {
1017
+ J.onTransition((t, r) => {
1018
+ e && E.debug(`===> [WIDGET] State moved from ${t} to ${r}`);
1010
1019
  });
1011
- }, rr = (e, t) => {
1012
- const { variant: r, token: s } = t, { config: n } = Ne(qe);
1020
+ }, Nr = (e, t) => {
1021
+ const { variant: r, token: s } = t, { config: n } = be(We);
1013
1022
  switch (r) {
1014
1023
  case "source":
1015
1024
  if (s && s.assetId === e.targetToken?.assetId && s.isIntent === e.targetToken.isIntent && n.enableAutoTokensSwitching) {
1016
1025
  if (!e.sourceToken)
1017
1026
  return;
1018
- we(e);
1027
+ Ne(e);
1019
1028
  return;
1020
1029
  }
1021
1030
  if (s && !e.sourceToken && s.assetId === e.targetToken?.assetId && s.isIntent === e.targetToken.isIntent && n.enableAutoTokensSwitching)
@@ -1026,26 +1035,26 @@ const $s = (e) => {
1026
1035
  if (s && s.assetId === e.sourceToken?.assetId && s.isIntent === e.sourceToken.isIntent && n.enableAutoTokensSwitching) {
1027
1036
  if (!e.targetToken)
1028
1037
  return;
1029
- we(e);
1038
+ Ne(e);
1030
1039
  return;
1031
1040
  }
1032
1041
  e.targetToken = s;
1033
1042
  break;
1034
1043
  default:
1035
- Ee(r, { throwError: !1 });
1044
+ De(r, { throwError: !1 });
1036
1045
  }
1037
- }, C = (e, t) => Z.on(
1046
+ }, v = (e, t) => J.on(
1038
1047
  e,
1039
- (r, s) => t(r, s, Z)
1040
- ), ar = () => {
1041
- C("quoteSetStatus", vn), C("walletAddressSet", Fn), C("transferSetStatus", Bn), C("tokenSelectRotate", we), C("tokenSetBalance", Ln), C("tokenSetAmount", Cn), C("depositTypeSet", Dn), C("setInputsValidating", On), C("externalDepositTxSet", xn), C("tokenSelect", rr), C("addressSet", Rn), C("errorSet", bn), C("quoteSet", En), C("reset", yn), C("validateDryInputs", yt), C("validateExternalInputs", bt), C("validateInternalInputs", Et);
1042
- }, or = rn(({ debug: e }) => {
1043
- e && b.debug(
1044
- "[WIDGET] Debug mode is enabled (package version: 3.17.1)"
1045
- ), ar(), sr({ debug: e }), nr({ debug: e });
1046
- }), qi = ({ listenTo: e, debug: t = !1 }) => {
1048
+ (r, s) => t(r, s, J)
1049
+ ), _r = () => {
1050
+ v("quoteSetStatus", Pn), v("walletAddressSet", Qn), v("transferSetStatus", Kn), v("tokenSelectRotate", Ne), v("tokenSetBalance", $n), v("tokenSetAmount", Un), v("depositTypeSet", Wn), v("setInputsValidating", Vn), v("externalDepositTxSet", Mn), v("tokenSelect", Nr), v("addressSet", qn), v("errorSet", Ln), v("quoteSet", Bn), v("reset", Fn), v("validateDryInputs", xt), v("validateExternalInputs", Ot), v("validateInternalInputs", Ft);
1051
+ }, yr = pn(({ debug: e }) => {
1052
+ e && E.debug(
1053
+ "[WIDGET] Debug mode is enabled (package version: 3.17.3)"
1054
+ ), _r(), Sr({ debug: e }), Ar({ debug: e });
1055
+ }), dl = ({ listenTo: e, debug: t = !1 }) => {
1047
1056
  R(() => {
1048
- or({ debug: t });
1057
+ yr({ debug: t });
1049
1058
  }, [t]);
1050
1059
  const r = e.find(
1051
1060
  (a) => Array.isArray(a) && a[0] === "setBalancesUsingAlchemyExt"
@@ -1054,95 +1063,95 @@ const $s = (e) => {
1054
1063
  ), n = e.find(
1055
1064
  (a) => Array.isArray(a) && a[0] === "makeQuote"
1056
1065
  );
1057
- er({
1066
+ wr({
1058
1067
  isEnabled: !!r,
1059
1068
  alchemyApiKey: r?.[1].alchemyApiKey
1060
- }), Js({
1069
+ }), Ir({
1061
1070
  isEnabled: !!s,
1062
1071
  skipIntents: s?.[1].skipIntents,
1063
1072
  target: s?.[1].target
1064
- }), Xs({
1073
+ }), gr({
1065
1074
  isEnabled: !!n,
1066
1075
  message: n?.[1].message,
1067
1076
  type: n?.[1].type,
1068
1077
  refetchQuoteInterval: n?.[1].refetchQuoteInterval
1069
- }), js({
1078
+ }), fr({
1070
1079
  isEnabled: e.includes("checkWalletConnection")
1071
- }), Hs({
1080
+ }), ur({
1072
1081
  isEnabled: e.includes("setSourceTokenBalance")
1073
- }), Gs({
1082
+ }), mr({
1074
1083
  isEnabled: e.includes("setSourceTokenIntentsTarget")
1075
- }), Ks({
1084
+ }), dr({
1076
1085
  isEnabled: e.includes("updateBalances"),
1077
1086
  alchemyApiKey: r?.[1].alchemyApiKey
1078
1087
  });
1079
- }, ir = Z.getStore();
1080
- class W extends Error {
1088
+ }, br = J.getStore();
1089
+ class V extends Error {
1081
1090
  context;
1082
1091
  _is_widget_error = !0;
1083
1092
  constructor(t, r) {
1084
- super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = Ne(ir).context;
1093
+ super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = be(br).context;
1085
1094
  }
1086
1095
  }
1087
- class Ct extends W {
1096
+ class Bt extends V {
1088
1097
  data;
1089
1098
  constructor(t) {
1090
1099
  super(t.code), this.data = t, this.name = "MachineError";
1091
1100
  }
1092
1101
  }
1093
- class q extends Ct {
1102
+ class U extends Bt {
1094
1103
  constructor(t) {
1095
1104
  super(t), this.name = "QuoteError";
1096
1105
  }
1097
1106
  }
1098
- class g extends Ct {
1107
+ class g extends Bt {
1099
1108
  constructor(t) {
1100
1109
  super(t), this.name = "TransferError";
1101
1110
  }
1102
1111
  }
1103
- const Ui = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, M = Z.getStore(), lr = tn({
1104
- usdTradeDelta: (e) => qn(e(M.context)),
1105
- isDirectNearTokenWithdrawal: (e) => Wn(e(M.context)),
1106
- isDirectNonNearWithdrawal: (e) => Un(e(M.context)),
1107
- isDirectTokenOnNearDeposit: (e) => sn(e(M.context)),
1108
- isNativeNearDeposit: (e) => nn(e(M.context)),
1109
- isSameAssetDiffChainWithdrawal: (e) => Mn(e(M.context)),
1110
- isDirectTokenOnNearTransfer: (e) => Pn(e(M.context))
1111
- }), z = () => oe(lr), _ = () => {
1112
- const e = oe(M);
1112
+ const ul = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, Q = J.getStore(), Er = un({
1113
+ usdTradeDelta: (e) => Hn(e(Q.context)),
1114
+ isDirectNearTokenWithdrawal: (e) => zn(e(Q.context)),
1115
+ isDirectNonNearWithdrawal: (e) => Gn(e(Q.context)),
1116
+ isDirectTokenOnNearDeposit: (e) => fn(e(Q.context)),
1117
+ isNativeNearDeposit: (e) => mn(e(Q.context)),
1118
+ isSameAssetDiffChainWithdrawal: (e) => Yn(e(Q.context)),
1119
+ isDirectTokenOnNearTransfer: (e) => jn(e(Q.context))
1120
+ }), Z = () => ue(Er), _ = () => {
1121
+ const e = ue(Q);
1113
1122
  return {
1114
1123
  state: e.state,
1115
1124
  ctx: e.context
1116
1125
  };
1117
- }, Pi = (e) => {
1118
- const t = oe(M);
1119
- if (!D(t.context, [e]))
1120
- throw new W(
1126
+ }, ml = (e) => {
1127
+ const t = ue(Q);
1128
+ if (!x(t.context, [e]))
1129
+ throw new V(
1121
1130
  `[WIDGET] Attempt to access snapshot for ${e} state while context does not match`
1122
1131
  );
1123
1132
  return t.context;
1124
- }, cr = async ({
1133
+ }, Rr = async ({
1125
1134
  contractId: e,
1126
1135
  accountId: t
1127
1136
  }) => {
1128
1137
  try {
1129
- const r = { account_id: t }, s = Oe.from(JSON.stringify(r)).toString("base64"), n = await Qn.query({
1138
+ const r = { account_id: t }, s = Be.from(JSON.stringify(r)).toString("base64"), n = await Zn.query({
1130
1139
  request_type: "call_function",
1131
1140
  method_name: "storage_balance_of",
1132
1141
  account_id: e,
1133
1142
  args_base64: s,
1134
1143
  finality: "optimistic"
1135
- }), a = Vn(
1144
+ }), a = Xn(
1136
1145
  n,
1137
- se.union([se.null(), se.object({ total: se.string() })])
1146
+ oe.union([oe.null(), oe.object({ total: oe.string() })])
1138
1147
  );
1139
1148
  return BigInt(a?.total ?? "0");
1140
1149
  } catch (r) {
1141
- throw new W("Error fetching balance", { cause: r });
1150
+ throw new V("Error fetching balance", { cause: r });
1142
1151
  }
1143
1152
  };
1144
- function dr(e) {
1145
- const { ctx: t } = _(), { isNativeNearDeposit: r } = z(), s = t.sourceToken?.contractAddress, n = t.quote?.amountIn ?? t.sourceTokenAmount;
1153
+ function Cr(e) {
1154
+ const { ctx: t } = _(), { isNativeNearDeposit: r } = Z(), s = t.sourceToken?.contractAddress, n = t.quote?.amountIn ?? t.sourceTokenAmount;
1146
1155
  return {
1147
1156
  make: async (c, l) => {
1148
1157
  if (!e)
@@ -1150,7 +1159,7 @@ function dr(e) {
1150
1159
  code: "TRANSFER_INVALID_INITIAL",
1151
1160
  meta: { message: "No connected wallet to sign a transfer." }
1152
1161
  });
1153
- if (!s && t.sourceToken?.assetId !== $)
1162
+ if (!s && t.sourceToken?.assetId !== G)
1154
1163
  throw new g({
1155
1164
  code: "TRANSFER_INVALID_INITIAL",
1156
1165
  meta: { message: "No token selected to transfer." }
@@ -1166,7 +1175,7 @@ function dr(e) {
1166
1175
  meta: { message: "No amount to transfer." }
1167
1176
  });
1168
1177
  const d = e();
1169
- if (t.sourceToken.assetId === $ && t.targetToken?.assetId !== ge) {
1178
+ if (t.sourceToken.assetId === G && t.targetToken?.assetId !== Ae) {
1170
1179
  const i = await d.signAndSendTransactions({
1171
1180
  transactions: [
1172
1181
  {
@@ -1201,7 +1210,7 @@ function dr(e) {
1201
1210
  type: "FunctionCall",
1202
1211
  params: {
1203
1212
  methodName: "near_deposit",
1204
- gas: Pe,
1213
+ gas: Ge,
1205
1214
  deposit: n,
1206
1215
  args: {}
1207
1216
  }
@@ -1211,7 +1220,7 @@ function dr(e) {
1211
1220
  methodName: "ft_transfer_call",
1212
1221
  deposit: "1",
1213
1222
  // 1 yocto required by NEP-141
1214
- gas: We,
1223
+ gas: je,
1215
1224
  args: {
1216
1225
  amount: n,
1217
1226
  receiver_id: c,
@@ -1237,7 +1246,9 @@ function dr(e) {
1237
1246
  code: "NO_DEPOSIT_RESULT"
1238
1247
  });
1239
1248
  } catch (i) {
1240
- throw b.error("[TRANSFER ERROR]", i), new g({
1249
+ if (le(i) && ce(i))
1250
+ return;
1251
+ throw E.error("[TRANSFER ERROR]", i), new g({
1241
1252
  code: "DIRECT_TRANSFER_ERROR"
1242
1253
  });
1243
1254
  }
@@ -1248,21 +1259,21 @@ function dr(e) {
1248
1259
  });
1249
1260
  try {
1250
1261
  const [i, f] = await Promise.all([
1251
- $n({
1262
+ Jn({
1252
1263
  contractId: s
1253
1264
  }),
1254
- cr({
1265
+ Rr({
1255
1266
  contractId: s,
1256
1267
  accountId: c
1257
1268
  })
1258
- ]), T = i - f;
1259
- T > 0n && u.push({
1269
+ ]), p = i - f;
1270
+ p > 0n && u.push({
1260
1271
  type: "FunctionCall",
1261
1272
  params: {
1262
1273
  methodName: "storage_deposit",
1263
1274
  args: { account_id: c },
1264
- gas: Pe,
1265
- deposit: T.toString()
1275
+ gas: Ge,
1276
+ deposit: p.toString()
1266
1277
  }
1267
1278
  }), u.push({
1268
1279
  type: "FunctionCall",
@@ -1273,7 +1284,7 @@ function dr(e) {
1273
1284
  amount: n,
1274
1285
  msg: l ?? ""
1275
1286
  },
1276
- gas: We,
1287
+ gas: je,
1277
1288
  deposit: "1"
1278
1289
  }
1279
1290
  });
@@ -1295,28 +1306,30 @@ function dr(e) {
1295
1306
  code: "NO_DEPOSIT_RESULT"
1296
1307
  });
1297
1308
  } catch (i) {
1298
- throw b.error("[TRANSFER ERROR]", i), new g({
1309
+ if (le(i) && ce(i))
1310
+ return;
1311
+ throw E.error("[TRANSFER ERROR]", i), new g({
1299
1312
  code: "DIRECT_TRANSFER_ERROR"
1300
1313
  });
1301
1314
  }
1302
1315
  }
1303
1316
  };
1304
1317
  }
1305
- const ur = ({
1318
+ const Dr = ({
1306
1319
  makeTransfer: e,
1307
1320
  providers: t
1308
1321
  }) => {
1309
- const { ctx: r } = _(), { alchemyApiKey: s } = y(), { make: n } = Kn({
1322
+ const { ctx: r } = _(), { alchemyApiKey: s } = b(), { make: n } = es({
1310
1323
  provider: t?.evm
1311
- }), { make: a } = Hn({
1324
+ }), { make: a } = ts({
1312
1325
  provider: t?.sol,
1313
1326
  alchemyApiKey: s
1314
1327
  }), c = (d) => {
1315
1328
  if (e)
1316
1329
  return e;
1317
- if (ht(d))
1330
+ if (Nt(d))
1318
1331
  return n;
1319
- if (Tt(d))
1332
+ if (St(d))
1320
1333
  return a;
1321
1334
  throw new g({
1322
1335
  code: "TRANSFER_INVALID_INITIAL",
@@ -1350,9 +1363,9 @@ const ur = ({
1350
1363
  decimals: r.sourceToken.decimals,
1351
1364
  address: r.quote.depositAddress,
1352
1365
  chain: r.sourceToken.blockchain,
1353
- evmChainId: Q(r.sourceToken.blockchain) ? he[r.sourceToken.blockchain] : null,
1354
- isNativeEvmTokenTransfer: !!r.sourceToken && gt(r.sourceToken),
1355
- tokenAddress: r.sourceToken.assetId === $ ? $ : r.sourceToken.contractAddress,
1366
+ evmChainId: H(r.sourceToken.blockchain) ? ke[r.sourceToken.blockchain] : null,
1367
+ isNativeEvmTokenTransfer: !!r.sourceToken && _t(r.sourceToken),
1368
+ tokenAddress: r.sourceToken.assetId === G ? G : r.sourceToken.contractAddress,
1356
1369
  sourceAssetId: r.sourceToken.assetId,
1357
1370
  targetAssetId: r.targetToken.assetId
1358
1371
  }, u = c(d.address);
@@ -1361,7 +1374,7 @@ const ur = ({
1361
1374
  if (!i) {
1362
1375
  if (e)
1363
1376
  return;
1364
- throw b.error("[TRANSFER ERROR]", "No deposit result"), new g({
1377
+ throw E.error("[TRANSFER ERROR]", "No deposit result"), new g({
1365
1378
  code: "NO_DEPOSIT_RESULT"
1366
1379
  });
1367
1380
  }
@@ -1371,17 +1384,17 @@ const ur = ({
1371
1384
  intent: void 0
1372
1385
  };
1373
1386
  } catch (i) {
1374
- b.error("[TRANSFER ERROR]", i, { error: i });
1387
+ E.error("[TRANSFER ERROR]", i, { error: i });
1375
1388
  let f = "Failed to make a transfer. Please try again.";
1376
- const T = i instanceof Error && Ae(i.message);
1377
- if (T)
1389
+ const p = le(i) && ce(i);
1390
+ if (p)
1378
1391
  return;
1379
- throw un.isAxiosError(i) ? (f = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new g({
1392
+ throw kn.isAxiosError(i) ? (f = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new g({
1380
1393
  code: "QUOTE_ERROR",
1381
1394
  meta: { message: f }
1382
1395
  })) : f === "No quotes found" ? new g({
1383
1396
  code: "NO_QUOTE_FOUND"
1384
- }) : i instanceof Error && !T ? new g({
1397
+ }) : i instanceof Error && !p ? new g({
1385
1398
  code: "QUOTE_ERROR",
1386
1399
  meta: { message: i.message }
1387
1400
  }) : new g({
@@ -1391,7 +1404,7 @@ const ur = ({
1391
1404
  }
1392
1405
  } };
1393
1406
  };
1394
- class mr {
1407
+ class vr {
1395
1408
  constructor(t, r) {
1396
1409
  this.account = t, this.provider = r;
1397
1410
  }
@@ -1401,7 +1414,7 @@ class mr {
1401
1414
  deadline: t.deadline,
1402
1415
  nonce: t.nonce,
1403
1416
  intents: t.intents,
1404
- signer_id: t.signer_id ?? Ve.authHandleToIntentsUserId({
1417
+ signer_id: t.signer_id ?? Ye.authHandleToIntentsUserId({
1405
1418
  identifier: this.account.walletAddress,
1406
1419
  method: "evm"
1407
1420
  })
@@ -1412,42 +1425,42 @@ class mr {
1412
1425
  params: [r, n[0]]
1413
1426
  });
1414
1427
  if (a == null)
1415
- throw new W("No signature is returned");
1428
+ throw new V("No signature is returned");
1416
1429
  return {
1417
1430
  payload: r,
1418
1431
  standard: "erc191",
1419
- signature: Ve.transformERC191Signature(a)
1432
+ signature: Ye.transformERC191Signature(a)
1420
1433
  };
1421
1434
  }
1422
1435
  }
1423
- const fr = ({
1436
+ const xr = ({
1424
1437
  walletAddress: e,
1425
1438
  getProvider: t
1426
- }) => Gn({
1439
+ }) => ns({
1427
1440
  accountId: e,
1428
1441
  signMessage: async (r) => {
1429
1442
  const s = t();
1430
1443
  if (!s.signMessage)
1431
- throw new W("Near wallet has no signMessage method exposed");
1444
+ throw new V("Near wallet has no signMessage method exposed");
1432
1445
  let n;
1433
1446
  try {
1434
1447
  n = await s.signMessage({
1435
1448
  ...r,
1436
- nonce: Oe.from(r.nonce)
1449
+ nonce: Be.from(r.nonce)
1437
1450
  });
1438
1451
  } catch (a) {
1439
- throw new W("Near wallet failed to sign a message", {
1452
+ throw new V("Near wallet failed to sign a message", {
1440
1453
  cause: a
1441
1454
  });
1442
1455
  }
1443
1456
  if (!n)
1444
- throw new W("Near wallet failed to sign a message");
1457
+ throw new V("Near wallet failed to sign a message");
1445
1458
  return {
1446
1459
  publicKey: n.publicKey,
1447
1460
  signature: n.signature
1448
1461
  };
1449
1462
  }
1450
- }), pr = (e, t) => {
1463
+ }), Or = (e, t) => {
1451
1464
  if (t) {
1452
1465
  if (e.sendAddress)
1453
1466
  return e.sendAddress;
@@ -1462,8 +1475,8 @@ const fr = ({
1462
1475
  meta: { message: "Quote is required for intents non-direct transfer" }
1463
1476
  });
1464
1477
  return e.quote.depositAddress;
1465
- }, Tr = async (e, t) => {
1466
- let r = Me.getItem("nearWalletsPk")[t];
1478
+ }, Fr = async (e, t) => {
1479
+ let r = ze.getItem("nearWalletsPk")[t];
1467
1480
  if (!e.signMessage)
1468
1481
  throw new g({
1469
1482
  code: "DIRECT_TRANSFER_ERROR",
@@ -1474,14 +1487,14 @@ const fr = ({
1474
1487
  const a = await e.signMessage({
1475
1488
  message: "Authenticate",
1476
1489
  recipient: "intents.near",
1477
- nonce: Oe.from(Jn(32))
1490
+ nonce: Be.from(ls(32))
1478
1491
  });
1479
1492
  if (!a)
1480
1493
  throw new g({
1481
1494
  code: "DIRECT_TRANSFER_ERROR",
1482
1495
  meta: { message: "Signing message failed" }
1483
1496
  });
1484
- r = a.publicKey, Me.setItem("nearWalletsPk", {
1497
+ r = a.publicKey, ze.setItem("nearWalletsPk", {
1485
1498
  [t]: a.publicKey
1486
1499
  });
1487
1500
  } catch {
@@ -1490,12 +1503,12 @@ const fr = ({
1490
1503
  meta: { message: "Your wallet doesn't support signing messages" }
1491
1504
  });
1492
1505
  }
1493
- const s = te({
1506
+ const s = ne({
1494
1507
  walletAddress: t,
1495
1508
  addressType: "near"
1496
1509
  });
1497
- if (!await ts({
1498
- contractId: ke,
1510
+ if (!await ds({
1511
+ contractId: _e,
1499
1512
  methodName: "has_public_key",
1500
1513
  args: {
1501
1514
  account_id: s,
@@ -1506,7 +1519,7 @@ const fr = ({
1506
1519
  await e.signAndSendTransactions({
1507
1520
  transactions: [
1508
1521
  {
1509
- receiverId: ke,
1522
+ receiverId: _e,
1510
1523
  signerId: t,
1511
1524
  actions: [
1512
1525
  {
@@ -1528,12 +1541,12 @@ const fr = ({
1528
1541
  meta: { message: "Unable to add public key to intents account" }
1529
1542
  });
1530
1543
  }
1531
- }, hr = ({ providers: e }) => {
1532
- const { ctx: t } = _(), { appName: r, intentsAccountType: s } = y(), {
1544
+ }, Lr = ({ providers: e }) => {
1545
+ const { ctx: t } = _(), { appName: r, intentsAccountType: s } = b(), {
1533
1546
  isNativeNearDeposit: n,
1534
1547
  isDirectNearTokenWithdrawal: a,
1535
1548
  isDirectNonNearWithdrawal: c
1536
- } = z();
1549
+ } = Z();
1537
1550
  return { make: async ({
1538
1551
  message: d,
1539
1552
  onPending: u
@@ -1568,7 +1581,7 @@ const fr = ({
1568
1581
  code: "TRANSFER_INVALID_INITIAL",
1569
1582
  meta: { message: "No EVM provider configured" }
1570
1583
  });
1571
- i = new mr(
1584
+ i = new vr(
1572
1585
  { walletAddress: t.walletAddress },
1573
1586
  e.evm
1574
1587
  );
@@ -1579,7 +1592,7 @@ const fr = ({
1579
1592
  code: "TRANSFER_INVALID_INITIAL",
1580
1593
  meta: { message: "No SOL provider configured" }
1581
1594
  });
1582
- i = new es(
1595
+ i = new cs(
1583
1596
  { walletAddress: t.walletAddress },
1584
1597
  e.sol
1585
1598
  );
@@ -1590,64 +1603,74 @@ const fr = ({
1590
1603
  code: "TRANSFER_INVALID_INITIAL",
1591
1604
  meta: { message: "No NEAR provider configured" }
1592
1605
  });
1593
- await Tr(e.near(), t.walletAddress), i = fr({
1606
+ await Fr(e.near(), t.walletAddress), i = xr({
1594
1607
  walletAddress: t.walletAddress,
1595
1608
  getProvider: e.near
1596
1609
  });
1597
1610
  break;
1598
1611
  }
1599
1612
  default:
1600
- Ee(s);
1613
+ De(s);
1601
1614
  }
1602
- const f = new jn({ referral: ct(r) });
1615
+ const f = new ss({ referral: ht(r) });
1603
1616
  f.setIntentSigner(i);
1604
- let T;
1605
- n ? T = void 0 : a ? T = zn(d ?? void 0) : c ? T = void 0 : T = Yn();
1606
- const I = f.createWithdrawal({
1607
- withdrawalParams: {
1608
- assetId: t.sourceToken.assetId,
1609
- amount: BigInt(t.sourceTokenAmount),
1610
- destinationAddress: pr(
1611
- t,
1612
- a || c
1613
- ),
1614
- destinationMemo: void 0,
1615
- feeInclusive: !1,
1616
- routeConfig: T
1617
- }
1618
- });
1617
+ let p;
1618
+ n ? p = void 0 : a ? p = rs(d ?? void 0) : c ? p = void 0 : p = as();
1619
+ const I = {
1620
+ assetId: t.sourceToken.assetId,
1621
+ amount: BigInt(t.sourceTokenAmount),
1622
+ destinationAddress: Or(
1623
+ t,
1624
+ a || c
1625
+ ),
1626
+ destinationMemo: void 0,
1627
+ feeInclusive: !1,
1628
+ routeConfig: p
1629
+ };
1630
+ u("WAITING_CONFIRMATION");
1619
1631
  try {
1620
- await I.estimateFee(), u("WAITING_CONFIRMATION");
1621
- const m = await I.signAndSendIntent();
1632
+ const m = await f.estimateWithdrawalFee({
1633
+ withdrawalParams: I
1634
+ }), { intentHash: w } = await f.signAndSendWithdrawalIntent({
1635
+ withdrawalParams: I,
1636
+ feeEstimation: m
1637
+ });
1622
1638
  u("PROCESSING");
1623
- const w = await I.waitForIntentSettlement();
1624
- return await I.waitForWithdrawalCompletion(), {
1625
- hash: w.hash,
1626
- transactionLink: ns(Jt.near, w.hash),
1627
- intent: m
1639
+ const k = await f.waitForIntentSettlement({ intentHash: w }), y = await f.waitForWithdrawalCompletion({
1640
+ withdrawalParams: I,
1641
+ intentTx: k
1642
+ });
1643
+ return {
1644
+ intent: k.hash,
1645
+ // no hash means completion not trackable for this bridge
1646
+ hash: y.hash ?? "",
1647
+ transactionLink: y.hash ? us(
1648
+ cn[t.targetToken.blockchain],
1649
+ y.hash
1650
+ ) : ""
1628
1651
  };
1629
1652
  } catch (m) {
1630
- if (b.error("[TRANSFER ERROR]", m), m instanceof Zn)
1653
+ if (E.error("[TRANSFER ERROR]", m), m instanceof os)
1631
1654
  throw new g({
1632
1655
  code: "MIN_WITHDRAWAL_AMOUNT_ERROR",
1633
1656
  meta: {
1634
- minAmount: j(
1657
+ minAmount: Y(
1635
1658
  m.minAmount.toString(),
1636
1659
  t.sourceToken.decimals
1637
1660
  )
1638
1661
  }
1639
1662
  });
1640
- if (m instanceof Xn)
1663
+ if (m instanceof is)
1641
1664
  throw new g({
1642
1665
  code: "TRANSFER_INVALID_INITIAL",
1643
1666
  meta: { message: "Fee is above the maximum allowed" }
1644
1667
  });
1645
- if (m instanceof Error) {
1668
+ if (le(m)) {
1646
1669
  if (m.message.includes("Fee is not estimated"))
1647
1670
  throw new g({
1648
1671
  code: "FEES_NOT_ESTIMATED"
1649
1672
  });
1650
- if (Ae(m.message) || Ae(`${m.cause}`))
1673
+ if (ce(m))
1651
1674
  return;
1652
1675
  }
1653
1676
  throw new g({
@@ -1655,7 +1678,7 @@ const fr = ({
1655
1678
  });
1656
1679
  }
1657
1680
  } };
1658
- }, gr = ({
1681
+ }, Br = ({
1659
1682
  message: e,
1660
1683
  providers: t,
1661
1684
  makeTransfer: r
@@ -1664,10 +1687,10 @@ const fr = ({
1664
1687
  isDirectTokenOnNearDeposit: n,
1665
1688
  isDirectTokenOnNearTransfer: a,
1666
1689
  isNativeNearDeposit: c
1667
- } = z(), { make: l } = hr({ providers: t }), { make: d } = ur({
1690
+ } = Z(), { make: l } = Lr({ providers: t }), { make: d } = Dr({
1668
1691
  makeTransfer: r,
1669
1692
  providers: t
1670
- }), { make: u } = dr(
1693
+ }), { make: u } = Cr(
1671
1694
  t?.near
1672
1695
  );
1673
1696
  return { make: async () => {
@@ -1675,22 +1698,22 @@ const fr = ({
1675
1698
  return;
1676
1699
  let f;
1677
1700
  try {
1678
- if (p("transferSetStatus", {
1701
+ if (T("transferSetStatus", {
1679
1702
  status: "pending",
1680
1703
  reason: "WAITING_CONFIRMATION"
1681
1704
  }), s.sourceToken?.isIntent)
1682
1705
  f = await l({
1683
1706
  message: e,
1684
- onPending: (T) => {
1685
- p("transferSetStatus", {
1707
+ onPending: (p) => {
1708
+ T("transferSetStatus", {
1686
1709
  status: "pending",
1687
- reason: T
1710
+ reason: p
1688
1711
  });
1689
1712
  }
1690
1713
  });
1691
1714
  else if ((c || n) && !s.isDepositFromExternalWallet)
1692
1715
  f = await u(
1693
- s.sendAddress ?? ke,
1716
+ s.sendAddress ?? _e,
1694
1717
  e
1695
1718
  );
1696
1719
  else if (a) {
@@ -1705,43 +1728,43 @@ const fr = ({
1705
1728
  );
1706
1729
  } else
1707
1730
  f = await d();
1708
- } catch (T) {
1709
- T instanceof g && (b.error(T.data), p("transferSetStatus", { status: "error" }), p("errorSet", T.data));
1731
+ } catch (p) {
1732
+ p instanceof g && (E.error(p.data), T("transferSetStatus", { status: "error" }), T("errorSet", p.data));
1710
1733
  }
1711
1734
  if (!f) {
1712
- p("transferSetStatus", { status: "idle" });
1735
+ T("transferSetStatus", { status: "idle" });
1713
1736
  return;
1714
1737
  }
1715
- return p("transferSetStatus", { status: "success" }), O("transfer_success"), f;
1738
+ return T("transferSetStatus", { status: "success" }), F("transfer_success"), f;
1716
1739
  } };
1717
- }, Ir = async (e) => {
1740
+ }, qr = async (e) => {
1718
1741
  if (!e)
1719
1742
  return;
1720
1743
  const t = await e.request({
1721
1744
  method: "eth_chainId"
1722
1745
  });
1723
1746
  return parseInt(t, 16);
1724
- }, wr = ({ providers: e }) => {
1725
- const { ctx: t } = _(), [r, s] = re(!1), [n, a] = re(!1), c = Te(async () => {
1747
+ }, Ur = ({ providers: e }) => {
1748
+ const { ctx: t } = _(), [r, s] = te(!1), [n, a] = te(!1), c = ie(async () => {
1726
1749
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1727
1750
  if (!t.sourceToken || !d)
1728
1751
  return !1;
1729
- const u = await Ir(d);
1730
- if (!Q(t.sourceToken.blockchain))
1752
+ const u = await qr(d);
1753
+ if (!H(t.sourceToken.blockchain))
1731
1754
  return !1;
1732
- const i = he[t.sourceToken.blockchain];
1755
+ const i = ke[t.sourceToken.blockchain];
1733
1756
  return !i || !u ? !1 : u !== i;
1734
- }, [t.sourceToken, e]), l = Te(async () => {
1757
+ }, [t.sourceToken, e]), l = ie(async () => {
1735
1758
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1736
- if (!t.sourceToken || !d || !Q(t.sourceToken.blockchain))
1759
+ if (!t.sourceToken || !d || !H(t.sourceToken.blockchain))
1737
1760
  return !1;
1738
- const u = he[t.sourceToken.blockchain];
1761
+ const u = ke[t.sourceToken.blockchain];
1739
1762
  if (!u)
1740
1763
  return !1;
1741
1764
  try {
1742
- return s(!0), await ss(u, d), !0;
1765
+ return s(!0), await ms(u, d), !0;
1743
1766
  } catch (i) {
1744
- return b.error("Failed to switch chain:", i), !1;
1767
+ return E.error("Failed to switch chain:", i), !1;
1745
1768
  } finally {
1746
1769
  s(!1);
1747
1770
  }
@@ -1756,8 +1779,8 @@ const fr = ({
1756
1779
  }, N = {
1757
1780
  size: "lg",
1758
1781
  variant: "primary"
1759
- }, Fe = (e) => {
1760
- const { t } = V();
1782
+ }, qe = (e) => {
1783
+ const { t } = $();
1761
1784
  if (e.error?.code === "TOKEN_IS_NOT_SUPPORTED")
1762
1785
  return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.invalidAddress", "Invalid address") });
1763
1786
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_EMPTY")
@@ -1775,12 +1798,12 @@ const fr = ({
1775
1798
  if (e.error?.code === "QUOTE_AMOUNT_IS_TOO_LOW" || e.error?.code === "MIN_WITHDRAWAL_AMOUNT_ERROR")
1776
1799
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1777
1800
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.amountTooLow.label", "Amount is too low") }),
1778
- /* @__PURE__ */ o(K, { children: /* @__PURE__ */ h(Ht, { i18nKey: "submit.error.amountTooLow.message", children: [
1801
+ /* @__PURE__ */ o(j, { children: /* @__PURE__ */ h(tn, { i18nKey: "submit.error.amountTooLow.message", children: [
1779
1802
  "Amount you entered is very low. Please try increasing it",
1780
1803
  " ",
1781
1804
  /* @__PURE__ */ h("span", { className: "text-nowrap", children: [
1782
1805
  "above ",
1783
- /* @__PURE__ */ o(xe, { value: e.error.meta.minAmount ?? "0" }),
1806
+ /* @__PURE__ */ o(Le, { value: e.error.meta.minAmount ?? "0" }),
1784
1807
  " ",
1785
1808
  e.sourceToken?.symbol ?? "",
1786
1809
  "."
@@ -1790,7 +1813,7 @@ const fr = ({
1790
1813
  if (e.quoteStatus === "error")
1791
1814
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1792
1815
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.quoteFailed.label", "Quote failed") }),
1793
- /* @__PURE__ */ o(K, { children: t(
1816
+ /* @__PURE__ */ o(j, { children: t(
1794
1817
  "submit.error.quoteFailed.message",
1795
1818
  "We couldn’t finalize your quote. Please try again or adjust your values."
1796
1819
  ) })
@@ -1798,14 +1821,14 @@ const fr = ({
1798
1821
  if (e.error?.code === "TRANSFER_INVALID_INITIAL")
1799
1822
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1800
1823
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.invalidTransferData.label", "Invalid transfer data") }),
1801
- e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1824
+ e.error.meta?.message ? /* @__PURE__ */ o(j, { children: e.error.meta.message }) : null
1802
1825
  ] });
1803
1826
  if (e.error?.code === "EXTERNAL_TRANSFER_FAILED")
1804
1827
  return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") });
1805
1828
  if (e.error?.code === "EXTERNAL_TRANSFER_INCOMPLETE")
1806
1829
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1807
1830
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1808
- /* @__PURE__ */ o(K, { children: t(
1831
+ /* @__PURE__ */ o(j, { children: t(
1809
1832
  "submit.error.externalTransferFailed.incompleteMessage",
1810
1833
  "Incomplete transfer. Deposited amount will be refunded."
1811
1834
  ) })
@@ -1813,7 +1836,7 @@ const fr = ({
1813
1836
  if (e.error?.code === "EXTERNAL_TRANSFER_REFUNDED")
1814
1837
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1815
1838
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1816
- /* @__PURE__ */ o(K, { children: t(
1839
+ /* @__PURE__ */ o(j, { children: t(
1817
1840
  "submit.error.externalTransferFailed.refundedMessage",
1818
1841
  "Deposited amount will be refunded."
1819
1842
  ) })
@@ -1821,31 +1844,31 @@ const fr = ({
1821
1844
  if (e.error?.code === "DIRECT_TRANSFER_ERROR")
1822
1845
  return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1823
1846
  /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.transferFailed.label", "Transfer failed") }),
1824
- e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1847
+ e.error.meta?.message ? /* @__PURE__ */ o(j, { children: e.error.meta.message }) : null
1825
1848
  ] });
1826
1849
  if (e.error?.code === "SOURCE_BALANCE_INSUFFICIENT")
1827
1850
  return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.insufficientBalance", "Insufficient balance") });
1828
- }, kr = ({ onClick: e }) => {
1829
- const { t } = V();
1851
+ }, Pr = ({ onClick: e }) => {
1852
+ const { t } = $();
1830
1853
  return /* @__PURE__ */ o(A, { state: "disabled", ...N, onClick: e, children: t("submit.error.connectWallet", "Connect wallet") });
1831
- }, Ar = () => {
1854
+ }, Wr = () => {
1832
1855
  const { ctx: e } = _();
1833
- return Fe(e) ?? null;
1834
- }, Sr = (e) => {
1835
- const { providers: t, makeTransfer: r, onSuccess: s } = e, { ctx: n } = _(), { t: a } = V(), {
1856
+ return qe(e) ?? null;
1857
+ }, Mr = (e) => {
1858
+ const { providers: t, makeTransfer: r, onSuccess: s } = e, { ctx: n } = _(), { t: a } = $(), {
1836
1859
  isNativeNearDeposit: c,
1837
1860
  isDirectNonNearWithdrawal: l,
1838
1861
  isDirectTokenOnNearDeposit: d,
1839
1862
  isDirectNearTokenWithdrawal: u
1840
- } = z(), { make: i } = gr({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: f, switchChain: T, isSwitchingChain: I } = wr({ providers: t }), m = Fe(n), w = async () => {
1841
- if (f && !await T())
1863
+ } = Z(), { make: i } = Br({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: f, switchChain: p, isSwitchingChain: I } = Ur({ providers: t }), m = qe(n), w = async () => {
1864
+ if (f && !await p())
1842
1865
  return;
1843
- const S = await i();
1844
- S && s(S);
1866
+ const k = await i();
1867
+ k && s(k);
1845
1868
  };
1846
1869
  if (!n.targetToken)
1847
1870
  return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1848
- if (!ne(n.sourceTokenAmount))
1871
+ if (!se(n.sourceTokenAmount))
1849
1872
  return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1850
1873
  if (n.areInputsValidating)
1851
1874
  return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.validating", "Validating...") });
@@ -1863,7 +1886,7 @@ const fr = ({
1863
1886
  }
1864
1887
  return n.transferStatus.status === "error" ? /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1865
1888
  /* @__PURE__ */ o(A, { ...N, children: e.label }),
1866
- /* @__PURE__ */ o(K, { children: (() => {
1889
+ /* @__PURE__ */ o(j, { children: (() => {
1867
1890
  switch (n.error?.code) {
1868
1891
  case "FEES_NOT_ESTIMATED":
1869
1892
  return a(
@@ -1878,18 +1901,18 @@ const fr = ({
1878
1901
  }
1879
1902
  })() })
1880
1903
  ] }) : n.quoteStatus === "pending" ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: n.quote ? a("submit.pending.quote.refreshing", "Refreshing quote") : a("submit.pending.quote.finalizing", "Finalizing quote") }) : n.error ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : !n.quote && !l && !d && !u && !c ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : /* @__PURE__ */ o(A, { ...N, onClick: w, children: e.label });
1881
- }, Nr = (e) => {
1882
- const { t } = V(), { ctx: r } = _(), s = Fe(r);
1883
- return r.isDepositFromExternalWallet ? ne(r.sourceTokenAmount) ? r.externalDepositTxReceived ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.processing", "Processing") }) : /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.waiting", "Waiting for transaction") }) : /* @__PURE__ */ o(A, { ...N, state: "disabled", children: t("submit.disabled.enterAmount", "Enter amount") }) : s || /* @__PURE__ */ o(Sr, { ...e });
1884
- }, _r = (e) => {
1885
- const { ctx: t } = _(), r = y();
1886
- return t.walletAddress ? /* @__PURE__ */ o(Nr, { ...e }) : /* @__PURE__ */ o(kr, { onClick: r.onWalletSignin });
1904
+ }, Vr = (e) => {
1905
+ const { t } = $(), { ctx: r } = _(), s = qe(r);
1906
+ return r.isDepositFromExternalWallet ? se(r.sourceTokenAmount) ? r.externalDepositTxReceived ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.processing", "Processing") }) : /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.waiting", "Waiting for transaction") }) : /* @__PURE__ */ o(A, { ...N, state: "disabled", children: t("submit.disabled.enterAmount", "Enter amount") }) : s || /* @__PURE__ */ o(Mr, { ...e });
1907
+ }, Qr = (e) => {
1908
+ const { ctx: t } = _(), r = b();
1909
+ return t.walletAddress ? /* @__PURE__ */ o(Vr, { ...e }) : /* @__PURE__ */ o(Pr, { onClick: r.onWalletSignin });
1887
1910
  };
1888
- _r.Error = Ar;
1889
- const yr = ({ className: e }) => {
1890
- const { t } = V(), { slippageTolerance: r } = y(), { ctx: s } = _(), n = s.sourceToken && s.targetToken && s.sourceToken.price / s.targetToken.price;
1911
+ Qr.Error = Wr;
1912
+ const $r = ({ className: e }) => {
1913
+ const { t } = $(), { slippageTolerance: r } = b(), { ctx: s } = _(), n = s.sourceToken && s.targetToken && s.sourceToken.price / s.targetToken.price;
1891
1914
  return s.sourceToken ? /* @__PURE__ */ o(
1892
- rs,
1915
+ fs,
1893
1916
  {
1894
1917
  expandedByDefault: !1,
1895
1918
  expandedHeightPx: s.walletAddress ? 80 : 50,
@@ -1899,26 +1922,26 @@ const yr = ({ className: e }) => {
1899
1922
  title: s.sourceToken && s.targetToken ? /* @__PURE__ */ h("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1900
1923
  `1 ${s.sourceToken.symbol} ≈ `,
1901
1924
  " ",
1902
- as(n ?? 0),
1925
+ ps(n ?? 0),
1903
1926
  " ",
1904
1927
  `${s.targetToken.symbol}`,
1905
- /* @__PURE__ */ o("span", { className: "text-sw-gray-50", children: ` (${Qe(s.sourceToken.price)})` })
1928
+ /* @__PURE__ */ o("span", { className: "text-sw-gray-50", children: ` (${Xe(s.sourceToken.price)})` })
1906
1929
  ] }) : /* @__PURE__ */ h("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1907
1930
  `1 ${s.sourceToken.symbol} ≈ `,
1908
1931
  " ",
1909
- Qe(s.sourceToken.price),
1932
+ Xe(s.sourceToken.price),
1910
1933
  " USD"
1911
1934
  ] }),
1912
- children: /* @__PURE__ */ h(de, { children: [
1935
+ children: /* @__PURE__ */ h(Te, { children: [
1913
1936
  /* @__PURE__ */ o(
1914
- de.Item,
1937
+ Te.Item,
1915
1938
  {
1916
1939
  label: t("quote.result.maxSlippage.label", "Max slippage"),
1917
1940
  value: `${(r / 100).toFixed(2)}%`
1918
1941
  }
1919
1942
  ),
1920
1943
  !!s.walletAddress && /* @__PURE__ */ o(
1921
- de.Item,
1944
+ Te.Item,
1922
1945
  {
1923
1946
  isLoading: s.quoteStatus === "pending",
1924
1947
  label: t("quote.result.processingTime.label", "Processing time"),
@@ -1927,28 +1950,28 @@ const yr = ({ className: e }) => {
1927
1950
  )
1928
1951
  ] })
1929
1952
  }
1930
- ) : /* @__PURE__ */ o(It, {});
1931
- }, Wi = Object.assign(yr, {
1932
- Skeleton: It
1933
- }), br = ({
1953
+ ) : /* @__PURE__ */ o(yt, {});
1954
+ }, fl = Object.assign($r, {
1955
+ Skeleton: yt
1956
+ }), Kr = ({
1934
1957
  token: e,
1935
1958
  balance: t,
1936
1959
  isNotSufficient: r = !1,
1937
1960
  onClick: s
1938
1961
  }) => {
1939
- const n = y();
1940
- return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(is, { width: 100 }) : /* @__PURE__ */ o(
1962
+ const n = b();
1963
+ return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(hs, { width: 100 }) : /* @__PURE__ */ o(
1941
1964
  "span",
1942
1965
  {
1943
1966
  onClick: t ? s : void 0,
1944
1967
  style: t ? { borderBottomWidth: "2px", borderStyle: "dotted" } : void 0,
1945
- className: os("text-sw-label-sm", {
1968
+ className: Ts("text-sw-label-sm", {
1946
1969
  "text-sw-status-error": r,
1947
1970
  "text-sw-gray-100": !r,
1948
1971
  "cursor-pointer": !!t && !!s
1949
1972
  }),
1950
1973
  children: /* @__PURE__ */ o(
1951
- xe,
1974
+ Le,
1952
1975
  {
1953
1976
  decimals: e.decimals,
1954
1977
  value: t === void 0 ? "0" : `${t}`
@@ -1956,7 +1979,7 @@ const yr = ({ className: e }) => {
1956
1979
  )
1957
1980
  }
1958
1981
  );
1959
- }, Le = ({
1982
+ }, Ue = ({
1960
1983
  token: e,
1961
1984
  balance: t,
1962
1985
  value: r = "",
@@ -1968,32 +1991,32 @@ const yr = ({ className: e }) => {
1968
1991
  heading: d,
1969
1992
  onMsg: u
1970
1993
  }) => {
1971
- const i = Pt(), { ctx: f } = _(), { t: T } = V(), { hideTokenInputHeadings: I } = y(), m = cs(e, r, n), w = (S) => {
1994
+ const i = zt(), { ctx: f } = _(), { t: p } = $(), { hideTokenInputHeadings: I } = b(), m = Is(e, r, n), w = (k) => {
1972
1995
  u({
1973
1996
  type: "on_change_amount",
1974
- amount: ls(t, e.decimals, S)
1997
+ amount: gs(t, e.decimals, k)
1975
1998
  });
1976
1999
  };
1977
- return /* @__PURE__ */ h(ie, { className: "flex flex-col", "aria-label": d, children: [
1978
- !I && /* @__PURE__ */ o(wt, { children: d }),
2000
+ return /* @__PURE__ */ h(me, { className: "flex flex-col", "aria-label": d, children: [
2001
+ !I && /* @__PURE__ */ o(bt, { children: d }),
1979
2002
  /* @__PURE__ */ h(
1980
2003
  "div",
1981
2004
  {
1982
- className: H(
2005
+ className: K(
1983
2006
  "flex items-center justify-between",
1984
2007
  !I && "mt-sw-2xl"
1985
2008
  ),
1986
2009
  children: [
1987
2010
  /* @__PURE__ */ o(
1988
- us,
2011
+ ks,
1989
2012
  {
1990
2013
  value: r,
1991
2014
  name: i,
1992
- setValue: ds,
2015
+ setValue: ws,
1993
2016
  placeholder: "0",
1994
2017
  state: a === "default" || a === "disabled" ? a : "error",
1995
- onChange: (S) => {
1996
- u({ type: "on_change_amount", amount: S.target.value });
2018
+ onChange: (k) => {
2019
+ u({ type: "on_change_amount", amount: k.target.value });
1997
2020
  }
1998
2021
  }
1999
2022
  ),
@@ -2002,7 +2025,7 @@ const yr = ({ className: e }) => {
2002
2025
  {
2003
2026
  type: "button",
2004
2027
  onClick: a === "disabled" ? void 0 : () => u({ type: "on_click_select_token" }),
2005
- className: H(
2028
+ className: K(
2006
2029
  "gap-sw-md pl-sw-sm pr-sw-md flex h-[36px] min-w-[80px] shrink-0 items-center rounded-sw-md transition-colors bg-sw-gray-800 hover:bg-sw-gray-700 group",
2007
2030
  {
2008
2031
  "cursor-pointer": a !== "disabled",
@@ -2011,7 +2034,7 @@ const yr = ({ className: e }) => {
2011
2034
  ),
2012
2035
  children: [
2013
2036
  /* @__PURE__ */ o(
2014
- kt,
2037
+ Et,
2015
2038
  {
2016
2039
  token: e,
2017
2040
  chainShowIcon: !e.isIntent,
@@ -2031,7 +2054,7 @@ const yr = ({ className: e }) => {
2031
2054
  s ? /* @__PURE__ */ o(
2032
2055
  "span",
2033
2056
  {
2034
- className: H("text-sw-label-sm text-nowrap", {
2057
+ className: K("text-sw-label-sm text-nowrap", {
2035
2058
  "text-sw-gray-400": s >= -2 && s <= 2,
2036
2059
  "text-sw-status-success": s > 2,
2037
2060
  "text-sw-status-error": s <= -5,
@@ -2043,7 +2066,7 @@ const yr = ({ className: e }) => {
2043
2066
  ] }),
2044
2067
  /* @__PURE__ */ h("div", { className: "gap-sw-sm flex items-center", children: [
2045
2068
  e && !!f.walletAddress && c && /* @__PURE__ */ o(
2046
- br,
2069
+ Kr,
2047
2070
  {
2048
2071
  token: e,
2049
2072
  balance: t,
@@ -2051,42 +2074,42 @@ const yr = ({ className: e }) => {
2051
2074
  onClick: () => w(1)
2052
2075
  }
2053
2076
  ),
2054
- !!t && c && l && /* @__PURE__ */ h(Ft, { children: [
2077
+ !!t && c && l && /* @__PURE__ */ h($t, { children: [
2055
2078
  /* @__PURE__ */ o(
2056
- $e,
2079
+ Ze,
2057
2080
  {
2058
2081
  isClickable: a !== "disabled",
2059
2082
  onClick: () => w(2),
2060
- children: T("tokens.input.half.label", "50%")
2083
+ children: p("tokens.input.half.label", "50%")
2061
2084
  }
2062
2085
  ),
2063
2086
  /* @__PURE__ */ o(
2064
- $e,
2087
+ Ze,
2065
2088
  {
2066
2089
  isClickable: a !== "disabled",
2067
2090
  onClick: () => w(1),
2068
- children: T("tokens.input.max.label", "Max")
2091
+ children: p("tokens.input.max.label", "Max")
2069
2092
  }
2070
2093
  )
2071
2094
  ] }),
2072
- !c && /* @__PURE__ */ o("div", { className: "rounded-full bg-sw-gray-700 py-sw-xs px-sw-sm flex items-center justify-center", children: /* @__PURE__ */ o("span", { className: "text-sw-gray-100 text-sw-label-sm", children: T("tokens.input.externalBalance.label", "External balance") }) })
2095
+ !c && /* @__PURE__ */ o("div", { className: "rounded-full bg-sw-gray-700 py-sw-xs px-sw-sm flex items-center justify-center", children: /* @__PURE__ */ o("span", { className: "text-sw-gray-100 text-sw-label-sm", children: p("tokens.input.externalBalance.label", "External balance") }) })
2073
2096
  ] })
2074
2097
  ] })
2075
2098
  ] });
2076
- }, Be = ({ onMsg: e, heading: t }) => {
2077
- const { hideTokenInputHeadings: r } = y();
2099
+ }, Pe = ({ onMsg: e, heading: t }) => {
2100
+ const { hideTokenInputHeadings: r } = b();
2078
2101
  return /* @__PURE__ */ h(
2079
- ie,
2102
+ me,
2080
2103
  {
2081
2104
  isClickable: !0,
2082
2105
  className: "flex flex-col",
2083
2106
  onClick: () => e({ type: "on_click_select_token" }),
2084
2107
  children: [
2085
- !r && /* @__PURE__ */ o(wt, { children: t }),
2108
+ !r && /* @__PURE__ */ o(bt, { children: t }),
2086
2109
  /* @__PURE__ */ h(
2087
2110
  "div",
2088
2111
  {
2089
- className: H(
2112
+ className: K(
2090
2113
  "flex items-center justify-between",
2091
2114
  !r && "mt-sw-2xl"
2092
2115
  ),
@@ -2115,19 +2138,19 @@ const yr = ({ className: e }) => {
2115
2138
  ]
2116
2139
  }
2117
2140
  );
2118
- }, vt = (e) => {
2119
- const { mergedBalance: t } = ce(), [r, s] = re(
2120
- e ? t[G(e)] : void 0
2141
+ }, qt = (e) => {
2142
+ const { mergedBalance: t } = pe(), [r, s] = te(
2143
+ e ? t[z(e)] : void 0
2121
2144
  );
2122
2145
  return R(() => {
2123
2146
  let n;
2124
2147
  if (e) {
2125
- const a = t[G(e)];
2148
+ const a = t[z(e)];
2126
2149
  a ? n = setTimeout(() => {
2127
2150
  s(a);
2128
2151
  }, 0) : n = setTimeout(() => {
2129
2152
  s(
2130
- e ? t[G(e)] ?? 0 : 0
2153
+ e ? t[z(e)] ?? 0 : 0
2131
2154
  );
2132
2155
  }, 2e3);
2133
2156
  }
@@ -2135,23 +2158,23 @@ const yr = ({ className: e }) => {
2135
2158
  n && clearTimeout(n);
2136
2159
  };
2137
2160
  }, [e, t]), r;
2138
- }, Dt = (e, t) => {
2139
- const { tokens: r } = P(e), s = Array.from(
2161
+ }, Ut = (e, t) => {
2162
+ const { tokens: r } = M(e), s = Array.from(
2140
2163
  new Set(r.map((n) => n.assetId))
2141
2164
  );
2142
2165
  R(() => {
2143
2166
  const n = s.length === 1 ? r[0] : null;
2144
2167
  n && t({ type: "on_select_token", token: n });
2145
2168
  }, [r]);
2146
- }, Er = ({
2169
+ }, Hr = ({
2147
2170
  onMsg: e,
2148
2171
  isChanging: t = !0,
2149
2172
  showBalance: r = !0,
2150
2173
  heading: s
2151
2174
  }) => {
2152
- const { ctx: n } = _(), a = vt(n.sourceToken);
2153
- Dt("source", e);
2154
- const c = v(() => {
2175
+ const { ctx: n } = _(), a = qt(n.sourceToken);
2176
+ Ut("source", e);
2177
+ const c = L(() => {
2155
2178
  if (!t && n.quoteStatus === "pending")
2156
2179
  return "disabled";
2157
2180
  if (!n.error)
@@ -2162,7 +2185,7 @@ const yr = ({ className: e }) => {
2162
2185
  return "error-balance";
2163
2186
  }, [t, n.error, n.quoteStatus]);
2164
2187
  return n.sourceToken ? /* @__PURE__ */ o(
2165
- Le,
2188
+ Ue,
2166
2189
  {
2167
2190
  heading: s,
2168
2191
  token: n.sourceToken,
@@ -2170,65 +2193,70 @@ const yr = ({ className: e }) => {
2170
2193
  balance: a,
2171
2194
  showBalance: r,
2172
2195
  showQuickBalanceActions: !0,
2173
- value: j(n.sourceTokenAmount, n.sourceToken?.decimals),
2196
+ value: Y(n.sourceTokenAmount, n.sourceToken?.decimals),
2174
2197
  onMsg: e
2175
2198
  }
2176
- ) : /* @__PURE__ */ o(Be, { heading: s, onMsg: e });
2177
- }, Rr = ({
2199
+ ) : /* @__PURE__ */ o(Pe, { heading: s, onMsg: e });
2200
+ }, Gr = ({
2178
2201
  isChanging: e = !1,
2179
2202
  onMsg: t,
2180
2203
  heading: r
2181
2204
  }) => {
2182
- const { ctx: s } = _(), { usdTradeDelta: n } = z(), a = vt(s.targetToken);
2183
- Dt("target", t);
2184
- const c = v(() => !e && s.quoteStatus === "pending" ? "disabled" : "default", [e, s.quoteStatus]);
2205
+ const { ctx: s } = _(), { usdTradeDelta: n } = Z(), a = qt(s.targetToken);
2206
+ Ut("target", t);
2207
+ const c = L(() => !e && s.quoteStatus === "pending" ? "disabled" : "default", [e, s.quoteStatus]);
2185
2208
  return s.targetToken ? /* @__PURE__ */ o(
2186
- Le,
2209
+ Ue,
2187
2210
  {
2188
2211
  heading: r,
2189
2212
  token: s.targetToken,
2190
2213
  balance: a,
2191
2214
  quoteUsdDelta: n?.percentage,
2192
2215
  quoteUsdValue: s.quote && parseFloat(s.quote.amountOutUsd),
2193
- value: j(s.targetTokenAmount, s.targetToken?.decimals),
2216
+ value: Y(s.targetTokenAmount, s.targetToken?.decimals),
2194
2217
  state: c,
2195
2218
  showQuickBalanceActions: !1,
2196
2219
  showBalance: !0,
2197
2220
  onMsg: t
2198
2221
  }
2199
- ) : /* @__PURE__ */ o(Be, { heading: r, onMsg: t });
2200
- }, Cr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Le, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(Be, { onMsg: r.onMsg, heading: t }), Mi = Object.assign(Cr, {
2201
- Skeleton: ms,
2202
- Source: Er,
2203
- Target: Rr
2204
- }), Ze = 58, xt = ({
2222
+ ) : /* @__PURE__ */ o(Pe, { heading: r, onMsg: t });
2223
+ }, jr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Ue, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(Pe, { onMsg: r.onMsg, heading: t }), pl = Object.assign(jr, {
2224
+ Skeleton: As,
2225
+ Source: Hr,
2226
+ Target: Gr
2227
+ }), Pt = ({
2205
2228
  token: e,
2206
2229
  balance: t,
2207
2230
  showBalance: r = !0,
2208
2231
  isNotSelectable: s,
2209
- className: n,
2210
- onMsg: a
2232
+ isFocused: n,
2233
+ className: a,
2234
+ onMsg: c
2211
2235
  }) => {
2212
- const { ctx: c } = _(), { walletSupportedChains: l, appName: d } = y(), u = fs(t, e), i = l.includes(e.blockchain) || e.isIntent, f = t !== "0" && t !== 0 && t !== void 0;
2236
+ const { ctx: l } = _(), { walletSupportedChains: d, appName: u } = b(), i = Ss(t, e), f = d.includes(e.blockchain) || e.isIntent, p = t !== "0" && t !== 0 && t !== void 0;
2213
2237
  return /* @__PURE__ */ o("li", { className: "list-none group", children: /* @__PURE__ */ h(
2214
2238
  "div",
2215
2239
  {
2216
- className: H(
2240
+ className: K(
2217
2241
  "gap-sw-lg p-sw-lg flex justify-between rounded-sw-md transition-colors",
2218
2242
  {
2219
2243
  "cursor-not-allowed": s,
2220
- "cursor-pointer hover:bg-sw-gray-800": !s
2244
+ "cursor-pointer hover:bg-sw-gray-800": !s,
2245
+ "bg-sw-gray-800": n && !s
2221
2246
  },
2222
- n
2247
+ a
2223
2248
  ),
2224
- onClick: () => !s && a({ type: "on_select_token", token: e }),
2249
+ onClick: () => !s && c({ type: "on_select_token", token: e }),
2225
2250
  children: [
2226
2251
  /* @__PURE__ */ o(
2227
- kt,
2252
+ Et,
2228
2253
  {
2229
2254
  token: e,
2230
2255
  chainShowIcon: !e.isIntent,
2231
- className: "border-sw-gray-900 group-hover:border-sw-gray-800 transition-colors"
2256
+ className: K("group-hover:border-sw-gray-800 transition-colors", {
2257
+ "border-sw-gray-800": n,
2258
+ "border-sw-gray-900": !n
2259
+ })
2232
2260
  }
2233
2261
  ),
2234
2262
  /* @__PURE__ */ h("div", { className: "gap-sw-xs mr-auto flex flex-col", children: [
@@ -2236,27 +2264,27 @@ const yr = ({ className: e }) => {
2236
2264
  e.isIntent ? /* @__PURE__ */ h("div", { className: "flex items-center gap-sw-xs", children: [
2237
2265
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2238
2266
  " ",
2239
- /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${d} ${e.chainName.toLowerCase() !== "near" && f ? `(${e.chainName})` : ""}` })
2267
+ /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${u} ${e.chainName.toLowerCase() !== "near" && p ? `(${e.chainName})` : ""}` })
2240
2268
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-sw-xs", children: [
2241
2269
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2242
2270
  " ",
2243
2271
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${e.chainName}` })
2244
2272
  ] })
2245
2273
  ] }),
2246
- i && !!c.walletAddress && r && /* @__PURE__ */ h("div", { className: "gap-sw-xs flex flex-col items-end", children: [
2247
- t === void 0 && !e.isIntent ? /* @__PURE__ */ o("span", { className: "h-[16px] w-[60px] animate-pulse rounded-full bg-sw-gray-700" }) : /* @__PURE__ */ o("span", { className: "h-[16px] text-sw-label-md text-sw-gray-50", children: f && /* @__PURE__ */ o(
2248
- xe,
2274
+ f && !!l.walletAddress && r && /* @__PURE__ */ h("div", { className: "gap-sw-xs flex flex-col items-end", children: [
2275
+ t === void 0 && !e.isIntent ? /* @__PURE__ */ o("span", { className: "h-[16px] w-[60px] animate-pulse rounded-full bg-sw-gray-700" }) : /* @__PURE__ */ o("span", { className: "h-[16px] text-sw-label-md text-sw-gray-50", children: p && /* @__PURE__ */ o(
2276
+ Le,
2249
2277
  {
2250
2278
  decimals: e.decimals,
2251
2279
  value: t === void 0 ? "0" : `${t}`
2252
2280
  }
2253
2281
  ) }),
2254
- f && /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: u })
2282
+ p && /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: i })
2255
2283
  ] })
2256
2284
  ]
2257
2285
  }
2258
2286
  ) });
2259
- }, Xe = [
2287
+ }, at = [
2260
2288
  "nep141:eth-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
2261
2289
  // cbBTC (eth)
2262
2290
  "nep141:base-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
@@ -2269,30 +2297,30 @@ const yr = ({ className: e }) => {
2269
2297
  // NEAR (bsc)
2270
2298
  "nep141:eth-0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c.omft.near"
2271
2299
  // SPX (eth)
2272
- ], vr = () => {
2273
- const { tokens: e } = P();
2300
+ ], zr = () => {
2301
+ const { tokens: e } = M();
2274
2302
  return {
2275
- uniqueIntentsTokens: v(() => {
2303
+ uniqueIntentsTokens: L(() => {
2276
2304
  const t = e.filter(
2277
- (n) => n.isIntent && n.blockchain === "near" && !Xe.includes(n.assetId)
2278
- ), r = t.map((n) => n.isIntent && n.symbol), s = e.filter((n) => n.isIntent && n.blockchain !== "near" && !r.includes(n.symbol) && !Xe.includes(n.assetId));
2305
+ (n) => n.isIntent && n.blockchain === "near" && !at.includes(n.assetId)
2306
+ ), r = t.map((n) => n.isIntent && n.symbol), s = e.filter((n) => n.isIntent && n.blockchain !== "near" && !r.includes(n.symbol) && !at.includes(n.assetId));
2279
2307
  return [...t, ...s];
2280
2308
  }, [e])
2281
2309
  };
2282
- }, Dr = ({
2310
+ }, Yr = ({
2283
2311
  variant: e,
2284
2312
  search: t,
2285
2313
  selectedChain: r,
2286
2314
  chainsFilter: s,
2287
2315
  walletSupportedChains: n
2288
2316
  }) => {
2289
- $s(e);
2290
- const { tokens: a } = P(e), { mergedBalance: c } = ce(), { intentBalances: l } = le(), { uniqueIntentsTokens: d } = vr(), u = hs(
2317
+ cr(e);
2318
+ const { tokens: a } = M(e), { mergedBalance: c } = pe(), { intentBalances: l } = fe(), { uniqueIntentsTokens: d } = zr(), u = Ls(
2291
2319
  c,
2292
2320
  n,
2293
2321
  t
2294
- ), i = a.filter(gs({ search: t })).filter(
2295
- Is({
2322
+ ), i = a.filter(Bs({ search: t })).filter(
2323
+ qs({
2296
2324
  selectedChain: r,
2297
2325
  chainsFilter: s,
2298
2326
  walletSupportedChains: n,
@@ -2302,10 +2330,10 @@ const yr = ({ className: e }) => {
2302
2330
  );
2303
2331
  return {
2304
2332
  all: i.sort(u),
2305
- intents: i.filter(Ke({ isIntent: !0 })).sort(u),
2306
- wallet: i.filter(Ke({ isIntent: !1 })).sort(u)
2333
+ intents: i.filter(Je({ isIntent: !0 })).sort(u),
2334
+ wallet: i.filter(Je({ isIntent: !1 })).sort(u)
2307
2335
  };
2308
- }, xr = (e, t) => e.length === 0 && t ? "EMPTY_SEARCH" : e.length === 0 && !t ? "NO_TOKENS" : "HAS_TOKENS", Or = ({
2336
+ }, Xr = ({
2309
2337
  variant: e,
2310
2338
  search: t,
2311
2339
  className: r,
@@ -2316,32 +2344,39 @@ const yr = ({ className: e }) => {
2316
2344
  chainIsNotSupported: l,
2317
2345
  onMsg: d
2318
2346
  }) => {
2319
- const { t: u } = V(), { ctx: i } = _(), { walletSupportedChains: f, appName: T } = y(), { mergedBalance: I } = ce(), m = Dr({
2347
+ const { t: u } = $(), { ctx: i } = _(), { walletSupportedChains: f, appName: p } = b(), { mergedBalance: I } = pe(), m = Yr({
2320
2348
  variant: e,
2321
2349
  search: t,
2322
2350
  chainsFilter: a,
2323
2351
  selectedChain: c,
2324
2352
  walletSupportedChains: f
2325
- }), w = i.walletAddress ? s : !1, S = xr(m.all, t), E = v(
2326
- () => [{ label: null, tokens: m.all }],
2353
+ }), w = i.walletAddress ? s : !1, k = Os(m.all, t), y = X(null), [q, D] = te(-1), B = L(
2354
+ () => [{ tokens: m.all }],
2327
2355
  [m.all]
2328
- ), B = v(
2329
- () => [
2330
- { label: T, tokens: m.intents },
2356
+ ), S = L(() => [
2357
+ ...m.intents.length > 0 ? [
2358
+ { label: p, count: m.intents.length },
2359
+ { tokens: m.intents }
2360
+ ] : [],
2361
+ ...m.wallet.length > 0 ? [
2331
2362
  {
2332
2363
  label: l ? null : "Connected wallet",
2333
- tokens: m.wallet
2334
- }
2335
- ],
2336
- [m.wallet, m.intents, l]
2337
- ), F = v(() => (w ? B : E).reduce(
2338
- (k, x) => k + x.tokens.length,
2339
- 0
2340
- ), [B, E, w]), L = "450px";
2341
- switch (S) {
2364
+ count: m.wallet.length
2365
+ },
2366
+ { tokens: m.wallet }
2367
+ ] : []
2368
+ ].filter(Boolean), [m.wallet, m.intents, l]), O = w ? S : B, re = xs(O), ae = Ds(O), Me = Rs(O), Mt = ie(() => {
2369
+ D(-1);
2370
+ }, []);
2371
+ switch (_s({
2372
+ listRef: y.current,
2373
+ initialFocusedIndex: w ? 1 : 0,
2374
+ onFocus: (P) => D(P),
2375
+ onBlur: Mt
2376
+ }), k) {
2342
2377
  case "EMPTY_SEARCH":
2343
2378
  return /* @__PURE__ */ o(
2344
- Se,
2379
+ ye,
2345
2380
  {
2346
2381
  hasAction: !0,
2347
2382
  actionType: "outlined",
@@ -2356,44 +2391,89 @@ const yr = ({ className: e }) => {
2356
2391
  }
2357
2392
  );
2358
2393
  case "HAS_TOKENS":
2359
- return /* @__PURE__ */ o("div", { className: H("gap-sw-lg flex flex-col", r), children: /* @__PURE__ */ o(
2360
- ps,
2394
+ return /* @__PURE__ */ o("div", { className: K("gap-sw-lg flex flex-col", r), children: /* @__PURE__ */ o(
2395
+ Ns,
2361
2396
  {
2397
+ ref: y,
2398
+ tabIndex: 0,
2399
+ id: Es,
2400
+ itemSize: bs,
2362
2401
  className: "hide-scrollbar",
2363
2402
  style: {
2364
- maxHeight: L,
2365
2403
  minHeight: 200,
2366
- height: F ? F * Ze + (w ? B.length * 62 : 0) : Ze * 2
2404
+ height: re,
2405
+ maxHeight: ys,
2406
+ overflowAnchor: "none",
2407
+ outline: "none"
2408
+ },
2409
+ onKeyDown: (P) => {
2410
+ if (y.current)
2411
+ switch (P.code) {
2412
+ case "ArrowUp": {
2413
+ P.preventDefault();
2414
+ let C = Math.max(q - 1, 0);
2415
+ w && Me.includes(C) && (C = C === 0 ? 1 : C - 1), D(C), y.current?.scrollToIndex(C, {
2416
+ align: "center",
2417
+ smooth: !0
2418
+ });
2419
+ break;
2420
+ }
2421
+ case "ArrowDown": {
2422
+ P.preventDefault();
2423
+ let C = Math.min(q + 1, ae - 1);
2424
+ w && Me.includes(C) && (C = C === 0 ? 1 : C + 1), D(C), y.current?.scrollToIndex(C, {
2425
+ align: "center",
2426
+ smooth: !0
2427
+ });
2428
+ break;
2429
+ }
2430
+ case "Enter": {
2431
+ P.preventDefault();
2432
+ const C = vs(O, q);
2433
+ C && d({ type: "on_select_token", token: C });
2434
+ break;
2435
+ }
2436
+ }
2367
2437
  },
2368
- children: (w ? B : E).map(
2369
- ({ label: k, tokens: x }) => /* @__PURE__ */ h(Wt, { children: [
2370
- x.length && k ? /* @__PURE__ */ h("header", { className: "pb-sw-lg flex flex-col", children: [
2371
- /* @__PURE__ */ o(Ts, {}),
2372
- /* @__PURE__ */ o("span", { className: "text-sw-label-sm pt-sw-xl text-sw-gray-100", children: `${k} — ${x.length}` })
2373
- ] }) : null,
2374
- x.map((X) => {
2375
- const J = G(X);
2438
+ children: O.map(
2439
+ ({ label: P, count: C, tokens: Ve }, Qe) => {
2440
+ const Vt = Cs(
2441
+ O,
2442
+ Qe
2443
+ );
2444
+ return P !== void 0 ? P ? /* @__PURE__ */ h(
2445
+ "header",
2446
+ {
2447
+ className: "pb-sw-lg pt-sw-sm flex flex-col",
2448
+ children: [
2449
+ /* @__PURE__ */ o(Fs, {}),
2450
+ /* @__PURE__ */ o("span", { className: "text-sw-label-sm pt-sw-xl text-sw-gray-100", children: `${P} — ${C}` })
2451
+ ]
2452
+ },
2453
+ P
2454
+ ) : /* @__PURE__ */ o("header", {}, Qe) : Ve ? Ve.map(($e, Qt) => {
2455
+ const Ke = z($e);
2376
2456
  return /* @__PURE__ */ o(
2377
- xt,
2457
+ Pt,
2378
2458
  {
2379
- token: X,
2459
+ token: $e,
2380
2460
  showBalance: n,
2381
- balance: I[J],
2461
+ balance: I[Ke],
2462
+ isFocused: q === Vt + Qt,
2382
2463
  isNotSelectable: l && !!i.walletAddress,
2383
2464
  onMsg: d
2384
2465
  },
2385
- J
2466
+ Ke
2386
2467
  );
2387
- }),
2388
- x.length ? /* @__PURE__ */ o("div", { className: "h-sw-2xl" }) : null
2389
- ] }, k ?? "ungrouped-tokens")
2468
+ }) : null;
2469
+ }
2390
2470
  )
2391
2471
  }
2392
2472
  ) });
2393
2473
  case "NO_TOKENS":
2394
2474
  default:
2395
2475
  return /* @__PURE__ */ o(
2396
- Se,
2476
+ ye,
2397
2477
  {
2398
2478
  className: "pt-sw-5xl pb-sw-5xl",
2399
2479
  subHeading: u(
@@ -2402,15 +2482,15 @@ const yr = ({ className: e }) => {
2402
2482
  ),
2403
2483
  heading: u("tokens.list.noBalanceOnApp.label", {
2404
2484
  defaultValue: "You have no balances on {{appName}}",
2405
- appName: T
2485
+ appName: p
2406
2486
  })
2407
2487
  }
2408
2488
  );
2409
2489
  }
2410
- }, Vi = Object.assign(Or, {
2411
- Placeholder: Se,
2412
- Item: xt
2413
- }), Fr = (e, t) => {
2490
+ }, Tl = Object.assign(Xr, {
2491
+ Placeholder: ye,
2492
+ Item: Pt
2493
+ }), Zr = (e, t) => {
2414
2494
  const r = t.assetId.substring(t.assetId.indexOf(":") + 1), s = (a) => {
2415
2495
  const c = (u) => u.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, ""), l = c(t.amount), d = c(
2416
2496
  a.amount.toLocaleString("en-US", {
@@ -2423,13 +2503,13 @@ const yr = ({ className: e }) => {
2423
2503
  return (e.result.deposits || []).find(
2424
2504
  (a) => a.chain === t.chainId && a.account_id === t.intentsAccountId && a.address === t.depositAddress && a.near_token_id === r && n(a) && s(a)
2425
2505
  );
2426
- }, Lr = {
2506
+ }, Jr = {
2427
2507
  CREDITED: ee.status.PROCESSING,
2428
2508
  PENDING: ee.status.PROCESSING,
2429
2509
  COMPLETED: ee.status.SUCCESS,
2430
2510
  FAILED: ee.status.FAILED
2431
- }, Qi = ({ depositAddress: e }) => {
2432
- const { ctx: t } = _(), { intentsAccountType: r } = y(), [s, n] = re(null), a = te({
2511
+ }, hl = ({ depositAddress: e }) => {
2512
+ const { ctx: t } = _(), { intentsAccountType: r } = b(), [s, n] = te(null), a = ne({
2433
2513
  addressType: r,
2434
2514
  walletAddress: t.walletAddress
2435
2515
  });
@@ -2439,18 +2519,18 @@ const yr = ({ className: e }) => {
2439
2519
  assetId: u
2440
2520
  }) => {
2441
2521
  if (!a)
2442
- throw new W("Unknown intents account for POA deposit check");
2443
- let i = it[l];
2522
+ throw new V("Unknown intents account for POA deposit check");
2523
+ let i = pt[l];
2444
2524
  if (!i)
2445
- if (Q(l))
2446
- i = lt;
2525
+ if (H(l))
2526
+ i = Tt;
2447
2527
  else
2448
- throw new W(
2528
+ throw new V(
2449
2529
  `Unknown chain for POA deposit check ${l}`
2450
2530
  );
2451
2531
  const f = s ?? (/* @__PURE__ */ new Date()).toUTCString();
2452
2532
  s || n(f);
2453
- const T = await mt.post("", {
2533
+ const p = await wt.post("", {
2454
2534
  id: 1,
2455
2535
  jsonrpc: "2.0",
2456
2536
  method: "recent_deposits",
@@ -2460,7 +2540,7 @@ const yr = ({ className: e }) => {
2460
2540
  chain: i
2461
2541
  }
2462
2542
  ]
2463
- }), I = Fr(T.data, {
2543
+ }), I = Zr(p.data, {
2464
2544
  intentsAccountId: a,
2465
2545
  initiatedAtDate: f,
2466
2546
  depositAddress: e,
@@ -2469,7 +2549,7 @@ const yr = ({ className: e }) => {
2469
2549
  amount: d
2470
2550
  });
2471
2551
  return I ? {
2472
- status: Lr[I.status],
2552
+ status: Jr[I.status],
2473
2553
  swapDetails: {
2474
2554
  intentHashes: [""],
2475
2555
  destinationChainTxHashes: [{ hash: I.tx_hash ?? "" }]
@@ -2482,39 +2562,39 @@ const yr = ({ className: e }) => {
2482
2562
  }
2483
2563
  };
2484
2564
  } };
2485
- }, Br = (e, t, r) => {
2565
+ }, ea = (e, t, r) => {
2486
2566
  let s = document.body;
2487
2567
  r instanceof HTMLElement && (s = r), Object.entries(e).forEach(([n, a]) => {
2488
2568
  s.style.setProperty(`--c-sw-${t}-${n}`, a);
2489
2569
  });
2490
- }, Je = (e, t, r, s, n) => {
2491
- const a = ws(s, n, t);
2492
- a && Br(a, e, r);
2493
- }, qr = (e, t) => {
2570
+ }, ot = (e, t, r, s, n) => {
2571
+ const a = Us(s, n, t);
2572
+ a && ea(a, e, r);
2573
+ }, ta = (e, t) => {
2494
2574
  const { primaryColor: r, surfaceColor: s, colorScheme: n = "dark" } = t;
2495
- r && Je("accent", 500, e, r, n), s && Je("gray", 950, e, s, n);
2496
- }, Ur = st(void 0), Pr = ({ children: e, theme: t }) => {
2497
- const { themeParentElementSelector: r } = y(), s = v(() => t, [t]);
2575
+ r && ot("accent", 500, e, r, n), s && ot("gray", 950, e, s, n);
2576
+ }, na = dt(void 0), sa = ({ children: e, theme: t }) => {
2577
+ const { themeParentElementSelector: r } = b(), s = L(() => t, [t]);
2498
2578
  return R(() => {
2499
2579
  if (t) {
2500
2580
  const n = r ? document.querySelector(r) : null;
2501
- qr(n, t);
2581
+ ta(n, t);
2502
2582
  }
2503
- }, [t]), /* @__PURE__ */ o(Ur.Provider, { value: s, children: /* @__PURE__ */ o("div", { className: "sw", children: e }) });
2504
- }, fe = ({
2583
+ }, [t]), /* @__PURE__ */ o(na.Provider, { value: s, children: /* @__PURE__ */ o("div", { className: "sw", children: e }) });
2584
+ }, Ie = ({
2505
2585
  text: e,
2506
2586
  icon: t
2507
2587
  }) => /* @__PURE__ */ h("li", { className: "flex items-center gap-sw-md", children: [
2508
2588
  t && /* @__PURE__ */ o(t, { size: 20, className: "text-sw-gray-300" }),
2509
2589
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e })
2510
- ] }), et = ({
2590
+ ] }), it = ({
2511
2591
  label: e,
2512
2592
  icon: t,
2513
2593
  className: r
2514
2594
  }) => /* @__PURE__ */ h(
2515
2595
  "div",
2516
2596
  {
2517
- className: H(
2597
+ className: K(
2518
2598
  "rounded-sw-lg flex align-center justify-center gap-sw-md w-full py-sw-2xl",
2519
2599
  r
2520
2600
  ),
@@ -2523,10 +2603,10 @@ const yr = ({ className: e }) => {
2523
2603
  /* @__PURE__ */ o("span", { className: "text-sw-label-md", children: e })
2524
2604
  ]
2525
2605
  }
2526
- ), Wr = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2527
- const { t: s } = V(), n = () => r({ type: "on_close" });
2528
- At("Escape", n);
2529
- const a = bs({
2606
+ ), ra = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2607
+ const { t: s } = $(), n = () => r({ type: "on_close" });
2608
+ Rt("Escape", n);
2609
+ const a = Ks({
2530
2610
  endTime: 0,
2531
2611
  autostart: !1,
2532
2612
  timerType: "DECREMENTAL",
@@ -2535,15 +2615,15 @@ const yr = ({ className: e }) => {
2535
2615
  });
2536
2616
  return R(() => {
2537
2617
  e ? a.start() : a.reset();
2538
- }, [e]), /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2618
+ }, [e]), /* @__PURE__ */ h(me, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2539
2619
  /* @__PURE__ */ o(
2540
- St,
2620
+ Ct,
2541
2621
  {
2542
2622
  onClick: n,
2543
2623
  className: "absolute top-sw-2xl right-sw-2xl"
2544
2624
  }
2545
2625
  ),
2546
- /* @__PURE__ */ o(ks, { size: 48, className: "text-sw-status-warning" }),
2626
+ /* @__PURE__ */ o(Ps, { size: 48, className: "text-sw-status-warning" }),
2547
2627
  /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2548
2628
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: s(
2549
2629
  "walletCompatibility.modal.title.initial",
@@ -2556,50 +2636,50 @@ const yr = ({ className: e }) => {
2556
2636
  ] }),
2557
2637
  /* @__PURE__ */ h("ul", { className: "flex flex-col gap-sw-xl", children: [
2558
2638
  /* @__PURE__ */ o(
2559
- fe,
2639
+ Ie,
2560
2640
  {
2561
2641
  text: s(
2562
2642
  "walletCompatibility.modal.feature.secureTransactions",
2563
2643
  "Read-only signature – no gas required."
2564
2644
  ),
2565
- icon: As
2645
+ icon: Ws
2566
2646
  }
2567
2647
  ),
2568
2648
  /* @__PURE__ */ o(
2569
- fe,
2649
+ Ie,
2570
2650
  {
2571
2651
  text: s(
2572
2652
  "walletCompatibility.modal.feature.fullAccess",
2573
2653
  "No access to your funds, no hidden permissions."
2574
2654
  ),
2575
- icon: Ss
2655
+ icon: Ms
2576
2656
  }
2577
2657
  ),
2578
2658
  /* @__PURE__ */ o(
2579
- fe,
2659
+ Ie,
2580
2660
  {
2581
2661
  text: s(
2582
2662
  "walletCompatibility.modal.feature.fundProtection",
2583
2663
  "Only checks whether your wallet is supported."
2584
2664
  ),
2585
- icon: Ns
2665
+ icon: Vs
2586
2666
  }
2587
2667
  )
2588
2668
  ] }),
2589
2669
  e ? /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
2590
2670
  /* @__PURE__ */ o(
2591
- et,
2671
+ it,
2592
2672
  {
2593
2673
  label: s(
2594
2674
  "walletCompatibility.modal.button.verified",
2595
2675
  "Wallet verified"
2596
2676
  ),
2597
2677
  className: "bg-sw-status-success text-sw-gray-950",
2598
- icon: _s
2678
+ icon: Qs
2599
2679
  }
2600
2680
  ),
2601
2681
  a.status === "RUNNING" && /* @__PURE__ */ o(
2602
- et,
2682
+ it,
2603
2683
  {
2604
2684
  className: "text-sw-gray-400",
2605
2685
  label: s("walletCompatibility.modal.button.closeTimer", {
@@ -2633,17 +2713,17 @@ const yr = ({ className: e }) => {
2633
2713
  )
2634
2714
  ] })
2635
2715
  ] });
2636
- }, Mr = ({ onMsg: e }) => {
2637
- const { t } = V(), r = () => e({ type: "on_close" });
2638
- return At("Escape", r), /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2716
+ }, aa = ({ onMsg: e }) => {
2717
+ const { t } = $(), r = () => e({ type: "on_close" });
2718
+ return Rt("Escape", r), /* @__PURE__ */ h(me, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2639
2719
  /* @__PURE__ */ o(
2640
- St,
2720
+ Ct,
2641
2721
  {
2642
2722
  onClick: r,
2643
2723
  className: "absolute top-sw-2xl right-sw-2xl"
2644
2724
  }
2645
2725
  ),
2646
- /* @__PURE__ */ o(ys, { size: 48, className: "text-sw-status-error" }),
2726
+ /* @__PURE__ */ o($s, { size: 48, className: "text-sw-status-error" }),
2647
2727
  /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2648
2728
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: t(
2649
2729
  "walletCompatibility.modal.title.error",
@@ -2679,58 +2759,58 @@ const yr = ({ className: e }) => {
2679
2759
  )
2680
2760
  ] })
2681
2761
  ] });
2682
- }, $i = Object.assign(Wr, {
2683
- Error: Mr
2684
- }), Vr = (e) => null, Qr = (e) => (t) => {
2685
- if (t instanceof W)
2762
+ }, gl = Object.assign(ra, {
2763
+ Error: aa
2764
+ }), oa = (e) => null, ia = (e) => (t) => {
2765
+ if (t instanceof V)
2686
2766
  throw t;
2687
- const r = new W(
2767
+ const r = new V(
2688
2768
  t instanceof Error ? t.message : "Unknown error",
2689
2769
  { cause: t }
2690
2770
  );
2691
2771
  throw r.context = e, r;
2692
- }, $r = ({ children: e }) => {
2772
+ }, la = ({ children: e }) => {
2693
2773
  const { ctx: t } = _();
2694
2774
  return /* @__PURE__ */ o(
2695
- Cs,
2775
+ js,
2696
2776
  {
2697
- FallbackComponent: Vr,
2698
- onError: Qr(t),
2777
+ FallbackComponent: oa,
2778
+ onError: ia(t),
2699
2779
  children: e
2700
2780
  }
2701
2781
  );
2702
- }, Kr = new $t({
2782
+ }, ca = new Jt({
2703
2783
  defaultOptions: {
2704
2784
  queries: {
2705
2785
  staleTime: 2e3 * 60,
2706
- retry: tt.env.NODE_ENV === "test" ? !1 : 3
2786
+ retry: lt.env.NODE_ENV === "test" ? !1 : 3
2707
2787
  }
2708
2788
  }
2709
- }), Hr = ["fms", "abg", "stjack", "noear", "testnebula"], ae = {
2789
+ }), da = ["fms", "abg", "stjack", "noear", "testnebula"], de = {
2710
2790
  appName: "Unknown",
2711
2791
  slippageTolerance: 100,
2712
2792
  // 1%
2713
2793
  intentsAccountType: "evm",
2714
- walletSupportedChains: en,
2794
+ walletSupportedChains: dn,
2715
2795
  connectedWallets: {},
2716
2796
  enableAutoTokensSwitching: !0,
2717
2797
  showIntentTokens: !0,
2718
- chainsOrder: ot,
2719
- filterTokens: (e) => !Hr.includes(e.symbol.toLocaleLowerCase()),
2798
+ chainsOrder: ft,
2799
+ filterTokens: (e) => !da.includes(e.symbol.toLocaleLowerCase()),
2720
2800
  chainsFilter: {
2721
2801
  source: { external: "wallet-supported", intents: "none" },
2722
2802
  target: { external: "all", intents: "none" }
2723
2803
  }
2724
- }, Ot = st({
2725
- config: ae
2726
- }), qe = nt({
2727
- config: ae
2728
- }), y = () => {
2729
- const e = Mt(Ot);
2730
- return oe(e).config;
2731
- }, Gr = (e) => {
2732
- qe.config = pe(e);
2733
- }, Ki = ({
2804
+ }, Wt = dt({
2805
+ config: de
2806
+ }), We = ct({
2807
+ config: de
2808
+ }), b = () => {
2809
+ const e = Yt(Wt);
2810
+ return ue(e).config;
2811
+ }, ua = (e) => {
2812
+ We.config = we(e);
2813
+ }, Il = ({
2734
2814
  children: e,
2735
2815
  config: t,
2736
2816
  balanceViaRpc: r = !0,
@@ -2739,110 +2819,109 @@ const yr = ({ className: e }) => {
2739
2819
  rpcs: n,
2740
2820
  theme: a
2741
2821
  }) => {
2742
- const c = Y(
2743
- nt({
2744
- config: pe({
2745
- ...ae,
2822
+ const c = X(
2823
+ ct({
2824
+ config: we({
2825
+ ...de,
2746
2826
  ...t
2747
2827
  })
2748
2828
  })
2749
2829
  );
2750
2830
  return R(() => {
2751
- const l = pe({
2752
- ...ae,
2831
+ const l = we({
2832
+ ...de,
2753
2833
  ...t
2754
2834
  });
2755
- Object.assign(c.current.config, l), Gr(l);
2756
- }, [t]), jt(s ?? {}), Rs("headlessui-portal-root", "sw"), /* @__PURE__ */ o(Kt, { client: Kr, children: /* @__PURE__ */ o(Gt, { i18n: Lt, children: /* @__PURE__ */ h(Ot.Provider, { value: c.current, children: [
2757
- /* @__PURE__ */ h(Bt, { children: [
2758
- /* @__PURE__ */ h(qt, { children: [
2835
+ Object.assign(c.current.config, l), ua(l);
2836
+ }, [t]), sn(s ?? {}), Gs("headlessui-portal-root", "sw"), /* @__PURE__ */ o(en, { client: ca, children: /* @__PURE__ */ o(nn, { i18n: Kt, children: /* @__PURE__ */ h(Wt.Provider, { value: c.current, children: [
2837
+ /* @__PURE__ */ h(Ht, { children: [
2838
+ /* @__PURE__ */ h(Gt, { children: [
2759
2839
  /* @__PURE__ */ o("link", { rel: "preconnect", href: "https://rsms.me/" }),
2760
2840
  /* @__PURE__ */ o("link", { rel: "stylesheet", href: "https://rsms.me/inter/inter.css" })
2761
2841
  ] }),
2762
- /* @__PURE__ */ o(Pr, { theme: a, children: tt.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o($r, { children: e }) })
2842
+ /* @__PURE__ */ o(sa, { theme: a, children: lt.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o(la, { children: e }) })
2763
2843
  ] }),
2764
2844
  r && /* @__PURE__ */ o(
2765
- Vs,
2845
+ ir,
2766
2846
  {
2767
- rpcs: n ?? Es,
2847
+ rpcs: n ?? Hs,
2768
2848
  connectedWallets: t.connectedWallets ?? {}
2769
2849
  }
2770
2850
  )
2771
2851
  ] }) }) });
2772
2852
  };
2773
2853
  export {
2774
- cr as $,
2775
- Qi as A,
2776
- Vs as B,
2777
- Ur as C,
2778
- Ls as D,
2779
- He as E,
2780
- Ks as F,
2781
- Hs as G,
2782
- Gs as H,
2783
- js as I,
2784
- Zs as J,
2785
- yt as K,
2786
- bt as L,
2787
- Ct as M,
2788
- Et as N,
2789
- Rt as O,
2790
- Xs as P,
2791
- q as Q,
2792
- Js as R,
2793
- _r as S,
2794
- Cr as T,
2795
- er as U,
2796
- tr as V,
2797
- Ki as W,
2798
- nr as X,
2799
- sr as Y,
2800
- rr as Z,
2801
- ar as _,
2802
- Pi as a,
2803
- dr as a0,
2804
- mr as a1,
2805
- fr as a2,
2806
- yr as a3,
2807
- br as a4,
2808
- Le as a5,
2809
- Be as a6,
2810
- Dt as a7,
2811
- Er as a8,
2812
- Rr as a9,
2813
- Ze as aa,
2814
- xt as ab,
2815
- vr as ac,
2816
- Or as ad,
2817
- Pr as ae,
2818
- Wr as af,
2819
- Mr as ag,
2820
- $r as ah,
2821
- qe as ai,
2854
+ Rr as $,
2855
+ hl as A,
2856
+ ir as B,
2857
+ na as C,
2858
+ er as D,
2859
+ et as E,
2860
+ dr as F,
2861
+ ur as G,
2862
+ mr as H,
2863
+ fr as I,
2864
+ hr as J,
2865
+ xt as K,
2866
+ Ot as L,
2867
+ Bt as M,
2868
+ Ft as N,
2869
+ Lt as O,
2870
+ gr as P,
2871
+ U as Q,
2872
+ Ir as R,
2873
+ Qr as S,
2874
+ jr as T,
2875
+ wr as U,
2876
+ kr as V,
2877
+ Il as W,
2878
+ Ar as X,
2879
+ Sr as Y,
2880
+ Nr as Z,
2881
+ _r as _,
2882
+ ml as a,
2883
+ Cr as a0,
2884
+ vr as a1,
2885
+ xr as a2,
2886
+ $r as a3,
2887
+ Kr as a4,
2888
+ Ue as a5,
2889
+ Pe as a6,
2890
+ Ut as a7,
2891
+ Hr as a8,
2892
+ Gr as a9,
2893
+ Pt as aa,
2894
+ zr as ab,
2895
+ Xr as ac,
2896
+ sa as ad,
2897
+ ra as ae,
2898
+ aa as af,
2899
+ la as ag,
2900
+ We as ah,
2822
2901
  _ as b,
2823
- qi as c,
2824
- $s as d,
2825
- Ws as e,
2826
- le as f,
2827
- hr as g,
2828
- Ys as h,
2829
- gr as i,
2830
- ur as j,
2831
- ce as k,
2832
- wr as l,
2833
- Dr as m,
2834
- P as n,
2835
- Wi as o,
2836
- Mi as p,
2837
- Vi as q,
2838
- or as r,
2839
- vt as s,
2840
- _t as t,
2841
- z as u,
2842
- W as v,
2902
+ dl as c,
2903
+ cr as d,
2904
+ ar as e,
2905
+ fe as f,
2906
+ Lr as g,
2907
+ Tr as h,
2908
+ Br as i,
2909
+ Dr as j,
2910
+ pe as k,
2911
+ Ur as l,
2912
+ Yr as m,
2913
+ M as n,
2914
+ fl as o,
2915
+ pl as p,
2916
+ Tl as q,
2917
+ yr as r,
2918
+ qt as s,
2919
+ vt as t,
2920
+ Z as u,
2921
+ V as v,
2843
2922
  g as w,
2844
- Ui as x,
2845
- y,
2846
- $i as z
2923
+ ul as x,
2924
+ b as y,
2925
+ gl as z
2847
2926
  };
2848
- //# sourceMappingURL=config-CQ4V08as.js.map
2927
+ //# sourceMappingURL=config-VpsP2eLV.js.map