@rango-dev/ui 0.1.10-next.69

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 (349) hide show
  1. package/README.md +181 -0
  2. package/dist/components/Alert/Alert.d.ts +6 -0
  3. package/dist/components/Alert/Alert.stories.d.ts +4 -0
  4. package/dist/components/Alert/index.d.ts +1 -0
  5. package/dist/components/BestRoute/BestRoute.d.ts +8 -0
  6. package/dist/components/BestRoute/BestRoute.stories.d.ts +8 -0
  7. package/dist/components/BestRoute/index.d.ts +1 -0
  8. package/dist/components/BestRoute/mock.d.ts +4 -0
  9. package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +14 -0
  10. package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +4 -0
  11. package/dist/components/BlockchainSelector/index.d.ts +1 -0
  12. package/dist/components/BlockchainsList/BlockchainsList.d.ts +7 -0
  13. package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +4 -0
  14. package/dist/components/BlockchainsList/index.d.ts +1 -0
  15. package/dist/components/BlockchainsList/mockData.d.ts +2 -0
  16. package/dist/components/Button/Button.d.ts +17 -0
  17. package/dist/components/Button/Button.stories.d.ts +8 -0
  18. package/dist/components/Button/index.d.ts +1 -0
  19. package/dist/components/Checkbox/Checkbox.d.ts +11 -0
  20. package/dist/components/Checkbox/Checkbox.stories.d.ts +5 -0
  21. package/dist/components/Checkbox/index.d.ts +1 -0
  22. package/dist/components/Chip/Chip.d.ts +12 -0
  23. package/dist/components/Chip/Chip.stories.d.ts +6 -0
  24. package/dist/components/Chip/index.d.ts +1 -0
  25. package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +4 -0
  26. package/dist/components/ConnectWalletsModal/ConnectWalletsModal.d.ts +10 -0
  27. package/dist/components/ConnectWalletsModal/index.d.ts +1 -0
  28. package/dist/components/ConnectWalletsModal/mockData.d.ts +2 -0
  29. package/dist/components/Drawer/Drawer.d.ts +12 -0
  30. package/dist/components/Drawer/Drawer.stories.d.ts +7 -0
  31. package/dist/components/Drawer/index.d.ts +1 -0
  32. package/dist/components/Icon/AddCircleIcon.d.ts +3 -0
  33. package/dist/components/Icon/AddIcon.d.ts +3 -0
  34. package/dist/components/Icon/AddWalletIcon.d.ts +3 -0
  35. package/dist/components/Icon/AngleDownIcon.d.ts +3 -0
  36. package/dist/components/Icon/AngleLeftIcon.d.ts +3 -0
  37. package/dist/components/Icon/AngleRightIcon.d.ts +3 -0
  38. package/dist/components/Icon/AngleUpIcon.d.ts +3 -0
  39. package/dist/components/Icon/BagIcon.d.ts +3 -0
  40. package/dist/components/Icon/BanIcon.d.ts +3 -0
  41. package/dist/components/Icon/CheckCircleIcon.d.ts +3 -0
  42. package/dist/components/Icon/CheckIcon.d.ts +3 -0
  43. package/dist/components/Icon/CheckSquareIcon.d.ts +3 -0
  44. package/dist/components/Icon/CheckWalletIcon.d.ts +3 -0
  45. package/dist/components/Icon/CloseIcon.d.ts +1 -0
  46. package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -0
  47. package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -0
  48. package/dist/components/Icon/DownloadIcon.d.ts +3 -0
  49. package/dist/components/Icon/GasIcon.d.ts +3 -0
  50. package/dist/components/Icon/HistoryIcon.d.ts +3 -0
  51. package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -0
  52. package/dist/components/Icon/Icons.stories.d.ts +5 -0
  53. package/dist/components/Icon/InfoCircleIcon.d.ts +3 -0
  54. package/dist/components/Icon/MinusCircleIcon.d.ts +3 -0
  55. package/dist/components/Icon/RetryIcon.d.ts +3 -0
  56. package/dist/components/Icon/RetryLeftIcon.d.ts +3 -0
  57. package/dist/components/Icon/RetryRightIcon.d.ts +3 -0
  58. package/dist/components/Icon/SearchIcon.d.ts +3 -0
  59. package/dist/components/Icon/SearchMinusIcon.d.ts +3 -0
  60. package/dist/components/Icon/SettingIcon.d.ts +3 -0
  61. package/dist/components/Icon/SignatureIcon.d.ts +3 -0
  62. package/dist/components/Icon/SwapWalletIcon.d.ts +3 -0
  63. package/dist/components/Icon/TimeIcon.d.ts +3 -0
  64. package/dist/components/Icon/TrashIcon.d.ts +3 -0
  65. package/dist/components/Icon/TryAgainIcon.d.ts +3 -0
  66. package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -0
  67. package/dist/components/Icon/WalletIconIcon.d.ts +3 -0
  68. package/dist/components/Icon/WarningIcon.d.ts +3 -0
  69. package/dist/components/Icon/common.d.ts +2 -0
  70. package/dist/components/Icon/index.d.ts +36 -0
  71. package/dist/components/Icon/types.d.ts +6 -0
  72. package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +4 -0
  73. package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +8 -0
  74. package/dist/components/LiquiditySourceList/index.d.ts +1 -0
  75. package/dist/components/LiquiditySourceList/mockData.d.ts +2 -0
  76. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +11 -0
  77. package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +4 -0
  78. package/dist/components/LiquiditySourcesSelector/index.d.ts +1 -0
  79. package/dist/components/Modal/Modal.d.ts +11 -0
  80. package/dist/components/Modal/Modal.stories.d.ts +4 -0
  81. package/dist/components/Modal/index.d.ts +1 -0
  82. package/dist/components/Radio/Radio.d.ts +12 -0
  83. package/dist/components/Radio/Radio.stories.d.ts +4 -0
  84. package/dist/components/Radio/index.d.ts +1 -0
  85. package/dist/components/SecondaryPage/SecondaryPage.d.ts +18 -0
  86. package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +2 -0
  87. package/dist/components/SecondaryPage/index.d.ts +1 -0
  88. package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -0
  89. package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +5 -0
  90. package/dist/components/SelectableWalletList/index.d.ts +1 -0
  91. package/dist/components/SelectableWalletList/mock.d.ts +2 -0
  92. package/dist/components/Settings/Settings.d.ts +19 -0
  93. package/dist/components/Settings/Settings.stories.d.ts +4 -0
  94. package/dist/components/Settings/index.d.ts +1 -0
  95. package/dist/components/Skeleton/Skeleton.d.ts +5 -0
  96. package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -0
  97. package/dist/components/Skeleton/index.d.ts +1 -0
  98. package/dist/components/Spacer/Spacer.d.ts +5 -0
  99. package/dist/components/Spacer/Spacer.stories.d.ts +4 -0
  100. package/dist/components/Spacer/index.d.ts +1 -0
  101. package/dist/components/Spinner/Spinner.d.ts +5 -0
  102. package/dist/components/Spinner/Spinner.stories.d.ts +4 -0
  103. package/dist/components/Spinner/index.d.ts +1 -0
  104. package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -0
  105. package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +4 -0
  106. package/dist/components/StatusDrawer/index.d.ts +1 -0
  107. package/dist/components/StepDetail/StepDetail.d.ts +10 -0
  108. package/dist/components/StepDetail/StepDetail.stories.d.ts +5 -0
  109. package/dist/components/StepDetail/index.d.ts +1 -0
  110. package/dist/components/SwapContainer/SwapContainer.d.ts +6 -0
  111. package/dist/components/SwapContainer/SwapContainer.stories.d.ts +5 -0
  112. package/dist/components/SwapContainer/index.d.ts +1 -0
  113. package/dist/components/SwapDetail/SwapDetail.d.ts +8 -0
  114. package/dist/components/SwapDetail/SwapDetail.stories.d.ts +5 -0
  115. package/dist/components/SwapDetail/index.d.ts +1 -0
  116. package/dist/components/SwapDetail/mock.d.ts +2 -0
  117. package/dist/components/Switch/Switch.d.ts +5 -0
  118. package/dist/components/Switch/Switch.stories.d.ts +4 -0
  119. package/dist/components/Switch/index.d.ts +1 -0
  120. package/dist/components/TextField/TextField.d.ts +10 -0
  121. package/dist/components/TextField/TextField.stories.d.ts +7 -0
  122. package/dist/components/TextField/index.d.ts +1 -0
  123. package/dist/components/TokenList/TokenList.d.ts +14 -0
  124. package/dist/components/TokenList/TokenList.stories.d.ts +4 -0
  125. package/dist/components/TokenList/index.d.ts +1 -0
  126. package/dist/components/TokenList/mockData.d.ts +2 -0
  127. package/dist/components/TokenSelector/TokenSelector.d.ts +10 -0
  128. package/dist/components/TokenSelector/TokenSelector.stories.d.ts +4 -0
  129. package/dist/components/TokenSelector/index.d.ts +1 -0
  130. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  131. package/dist/components/Tooltip/Tooltip.stories.d.ts +5 -0
  132. package/dist/components/Tooltip/index.d.ts +1 -0
  133. package/dist/components/Typography/Typography.d.ts +14 -0
  134. package/dist/components/Typography/Typography.stories.d.ts +5 -0
  135. package/dist/components/Typography/index.d.ts +1 -0
  136. package/dist/components/VirtualizedList/VirtualizedList.d.ts +18 -0
  137. package/dist/components/Wallet/State.d.ts +6 -0
  138. package/dist/components/Wallet/Wallet.d.ts +6 -0
  139. package/dist/components/Wallet/Wallet.stories.d.ts +4 -0
  140. package/dist/components/Wallet/index.d.ts +1 -0
  141. package/dist/components/common/FilledCircle.d.ts +1 -0
  142. package/dist/components/common/index.d.ts +1 -0
  143. package/dist/components/index.d.ts +24 -0
  144. package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +23 -0
  145. package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +5 -0
  146. package/dist/containers/ConfirmSwap/index.d.ts +1 -0
  147. package/dist/containers/ConfirmSwap/mock.d.ts +2 -0
  148. package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +14 -0
  149. package/dist/containers/ConfirmWallets/ConfirmWallets.stories.d.ts +6 -0
  150. package/dist/containers/ConfirmWallets/index.d.ts +1 -0
  151. package/dist/containers/ConfirmWallets/mock.d.ts +5 -0
  152. package/dist/containers/ConfirmWallets/types.d.ts +8 -0
  153. package/dist/containers/History/History.d.ts +8 -0
  154. package/dist/containers/History/History.stories.d.ts +5 -0
  155. package/dist/containers/History/index.d.ts +1 -0
  156. package/dist/containers/History/mock.d.ts +2 -0
  157. package/dist/containers/History/types.d.ts +59 -0
  158. package/dist/containers/SwapHistory/SwapHistory.d.ts +7 -0
  159. package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +4 -0
  160. package/dist/containers/SwapHistory/index.d.ts +1 -0
  161. package/dist/containers/SwapHistory/mock.d.ts +2 -0
  162. package/dist/containers/index.d.ts +4 -0
  163. package/dist/helper/index.d.ts +6 -0
  164. package/dist/helper/swaps.d.ts +5 -0
  165. package/dist/helpers.d.ts +1 -0
  166. package/dist/index.d.ts +4 -0
  167. package/dist/index.js +8 -0
  168. package/dist/theme.d.ts +8 -0
  169. package/dist/types/index.d.ts +1 -0
  170. package/dist/types/meta.d.ts +22 -0
  171. package/dist/types/swaps.d.ts +22 -0
  172. package/dist/types/wallet.d.ts +14 -0
  173. package/dist/ui.cjs.development.js +4103 -0
  174. package/dist/ui.cjs.development.js.map +1 -0
  175. package/dist/ui.cjs.production.min.js +2 -0
  176. package/dist/ui.cjs.production.min.js.map +1 -0
  177. package/dist/ui.esm.js +4028 -0
  178. package/dist/ui.esm.js.map +1 -0
  179. package/package.json +89 -0
  180. package/src/components/Alert/Alert.stories.tsx +22 -0
  181. package/src/components/Alert/Alert.tsx +78 -0
  182. package/src/components/Alert/index.ts +1 -0
  183. package/src/components/BestRoute/BestRoute.stories.tsx +31 -0
  184. package/src/components/BestRoute/BestRoute.tsx +189 -0
  185. package/src/components/BestRoute/index.ts +1 -0
  186. package/src/components/BestRoute/mock.ts +544 -0
  187. package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +25 -0
  188. package/src/components/BlockchainSelector/BlockchainSelector.tsx +93 -0
  189. package/src/components/BlockchainSelector/index.ts +1 -0
  190. package/src/components/BlockchainsList/BlockchainsList.stories.tsx +25 -0
  191. package/src/components/BlockchainsList/BlockchainsList.tsx +60 -0
  192. package/src/components/BlockchainsList/index.ts +1 -0
  193. package/src/components/BlockchainsList/mockData.ts +2972 -0
  194. package/src/components/Button/Button.stories.tsx +59 -0
  195. package/src/components/Button/Button.tsx +407 -0
  196. package/src/components/Button/index.ts +1 -0
  197. package/src/components/Checkbox/Checkbox.stories.tsx +22 -0
  198. package/src/components/Checkbox/Checkbox.tsx +54 -0
  199. package/src/components/Checkbox/index.ts +1 -0
  200. package/src/components/Chip/Chip.stories.tsx +37 -0
  201. package/src/components/Chip/Chip.tsx +45 -0
  202. package/src/components/Chip/index.ts +1 -0
  203. package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +13 -0
  204. package/src/components/ConnectWalletsModal/ConnectWalletsModal.tsx +42 -0
  205. package/src/components/ConnectWalletsModal/index.ts +1 -0
  206. package/src/components/ConnectWalletsModal/mockData.ts +118 -0
  207. package/src/components/Drawer/Drawer.stories.tsx +86 -0
  208. package/src/components/Drawer/Drawer.tsx +128 -0
  209. package/src/components/Drawer/index.ts +1 -0
  210. package/src/components/Icon/AddCircleIcon.tsx +29 -0
  211. package/src/components/Icon/AddIcon.tsx +28 -0
  212. package/src/components/Icon/AddWalletIcon.tsx +48 -0
  213. package/src/components/Icon/AngleDownIcon.tsx +30 -0
  214. package/src/components/Icon/AngleLeftIcon.tsx +31 -0
  215. package/src/components/Icon/AngleRightIcon.tsx +30 -0
  216. package/src/components/Icon/AngleUpIcon.tsx +30 -0
  217. package/src/components/Icon/BagIcon.tsx +37 -0
  218. package/src/components/Icon/BanIcon.tsx +30 -0
  219. package/src/components/Icon/CheckCircleIcon.tsx +37 -0
  220. package/src/components/Icon/CheckIcon.tsx +28 -0
  221. package/src/components/Icon/CheckSquareIcon.tsx +35 -0
  222. package/src/components/Icon/CheckWalletIcon.tsx +43 -0
  223. package/src/components/Icon/CloseIcon.tsx +9 -0
  224. package/src/components/Icon/DeleteCircleIcon.tsx +29 -0
  225. package/src/components/Icon/DeleteWalletIcon.tsx +48 -0
  226. package/src/components/Icon/DownloadIcon.tsx +35 -0
  227. package/src/components/Icon/GasIcon.tsx +35 -0
  228. package/src/components/Icon/HistoryIcon.tsx +38 -0
  229. package/src/components/Icon/HorizontalSwapIcon.tsx +36 -0
  230. package/src/components/Icon/Icons.stories.tsx +44 -0
  231. package/src/components/Icon/InfoCircleIcon.tsx +37 -0
  232. package/src/components/Icon/MinusCircleIcon.tsx +29 -0
  233. package/src/components/Icon/RetryIcon.tsx +30 -0
  234. package/src/components/Icon/RetryLeftIcon.tsx +29 -0
  235. package/src/components/Icon/RetryRightIcon.tsx +29 -0
  236. package/src/components/Icon/SearchIcon.tsx +29 -0
  237. package/src/components/Icon/SearchMinusIcon.tsx +29 -0
  238. package/src/components/Icon/SettingIcon.tsx +37 -0
  239. package/src/components/Icon/SignatureIcon.tsx +30 -0
  240. package/src/components/Icon/SwapWalletIcon.tsx +48 -0
  241. package/src/components/Icon/TimeIcon.tsx +29 -0
  242. package/src/components/Icon/TrashIcon.tsx +29 -0
  243. package/src/components/Icon/TryAgainIcon.tsx +29 -0
  244. package/src/components/Icon/VerticalSwapIcon.tsx +36 -0
  245. package/src/components/Icon/WalletIconIcon.tsx +38 -0
  246. package/src/components/Icon/WarningIcon.tsx +35 -0
  247. package/src/components/Icon/common.ts +69 -0
  248. package/src/components/Icon/index.ts +44 -0
  249. package/src/components/Icon/types.tsx +44 -0
  250. package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +13 -0
  251. package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +114 -0
  252. package/src/components/LiquiditySourceList/index.ts +1 -0
  253. package/src/components/LiquiditySourceList/mockData.ts +316 -0
  254. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +16 -0
  255. package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +55 -0
  256. package/src/components/LiquiditySourcesSelector/index.ts +1 -0
  257. package/src/components/Modal/Modal.stories.tsx +22 -0
  258. package/src/components/Modal/Modal.tsx +76 -0
  259. package/src/components/Modal/index.ts +1 -0
  260. package/src/components/Radio/Radio.stories.tsx +23 -0
  261. package/src/components/Radio/Radio.tsx +95 -0
  262. package/src/components/Radio/index.ts +1 -0
  263. package/src/components/SecondaryPage/SecondaryPage.stories.tsx +7 -0
  264. package/src/components/SecondaryPage/SecondaryPage.tsx +95 -0
  265. package/src/components/SecondaryPage/index.ts +1 -0
  266. package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +14 -0
  267. package/src/components/SelectableWalletList/SelectableWalletList.tsx +113 -0
  268. package/src/components/SelectableWalletList/index.ts +1 -0
  269. package/src/components/SelectableWalletList/mock.ts +12 -0
  270. package/src/components/Settings/Settings.stories.tsx +34 -0
  271. package/src/components/Settings/Settings.tsx +160 -0
  272. package/src/components/Settings/index.ts +1 -0
  273. package/src/components/Skeleton/Skeleton.stories.tsx +24 -0
  274. package/src/components/Skeleton/Skeleton.tsx +66 -0
  275. package/src/components/Skeleton/index.ts +1 -0
  276. package/src/components/Spacer/Spacer.stories.tsx +18 -0
  277. package/src/components/Spacer/Spacer.tsx +98 -0
  278. package/src/components/Spacer/index.ts +1 -0
  279. package/src/components/Spinner/Spinner.stories.tsx +25 -0
  280. package/src/components/Spinner/Spinner.tsx +61 -0
  281. package/src/components/Spinner/index.ts +1 -0
  282. package/src/components/StatusDrawer/StatusDrawer.stories.tsx +38 -0
  283. package/src/components/StatusDrawer/StatusDrawer.tsx +81 -0
  284. package/src/components/StatusDrawer/index.ts +1 -0
  285. package/src/components/StepDetail/StepDetail.stories.tsx +37 -0
  286. package/src/components/StepDetail/StepDetail.tsx +97 -0
  287. package/src/components/StepDetail/index.ts +1 -0
  288. package/src/components/SwapContainer/SwapContainer.stories.tsx +13 -0
  289. package/src/components/SwapContainer/SwapContainer.tsx +35 -0
  290. package/src/components/SwapContainer/index.ts +1 -0
  291. package/src/components/SwapDetail/SwapDetail.stories.tsx +19 -0
  292. package/src/components/SwapDetail/SwapDetail.tsx +150 -0
  293. package/src/components/SwapDetail/index.ts +1 -0
  294. package/src/components/SwapDetail/mock.ts +275 -0
  295. package/src/components/Switch/Switch.stories.tsx +9 -0
  296. package/src/components/Switch/Switch.tsx +52 -0
  297. package/src/components/Switch/index.ts +1 -0
  298. package/src/components/TextField/TextField.stories.tsx +31 -0
  299. package/src/components/TextField/TextField.tsx +129 -0
  300. package/src/components/TextField/index.ts +1 -0
  301. package/src/components/TokenList/TokenList.stories.tsx +18 -0
  302. package/src/components/TokenList/TokenList.tsx +180 -0
  303. package/src/components/TokenList/index.ts +1 -0
  304. package/src/components/TokenList/mockData.ts +1721 -0
  305. package/src/components/TokenSelector/TokenSelector.stories.tsx +18 -0
  306. package/src/components/TokenSelector/TokenSelector.tsx +35 -0
  307. package/src/components/TokenSelector/index.ts +1 -0
  308. package/src/components/Tooltip/Tooltip.stories.tsx +52 -0
  309. package/src/components/Tooltip/Tooltip.tsx +110 -0
  310. package/src/components/Tooltip/index.ts +1 -0
  311. package/src/components/Typography/Typography.stories.tsx +68 -0
  312. package/src/components/Typography/Typography.tsx +199 -0
  313. package/src/components/Typography/index.ts +1 -0
  314. package/src/components/VirtualizedList/VirtualizedList.tsx +78 -0
  315. package/src/components/Wallet/State.tsx +36 -0
  316. package/src/components/Wallet/Wallet.stories.tsx +36 -0
  317. package/src/components/Wallet/Wallet.tsx +42 -0
  318. package/src/components/Wallet/index.ts +1 -0
  319. package/src/components/common/FilledCircle.tsx +8 -0
  320. package/src/components/common/index.ts +1 -0
  321. package/src/components/index.ts +24 -0
  322. package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +13 -0
  323. package/src/containers/ConfirmSwap/ConfirmSwap.tsx +154 -0
  324. package/src/containers/ConfirmSwap/index.ts +1 -0
  325. package/src/containers/ConfirmSwap/mock.ts +146 -0
  326. package/src/containers/ConfirmWallets/ConfirmWallets.stories.tsx +26 -0
  327. package/src/containers/ConfirmWallets/ConfirmWallets.tsx +98 -0
  328. package/src/containers/ConfirmWallets/index.ts +1 -0
  329. package/src/containers/ConfirmWallets/mock.ts +222 -0
  330. package/src/containers/ConfirmWallets/types.ts +9 -0
  331. package/src/containers/History/History.stories.tsx +14 -0
  332. package/src/containers/History/History.tsx +93 -0
  333. package/src/containers/History/index.ts +1 -0
  334. package/src/containers/History/mock.ts +825 -0
  335. package/src/containers/History/types.tsx +66 -0
  336. package/src/containers/SwapHistory/SwapHistory.stories.tsx +13 -0
  337. package/src/containers/SwapHistory/SwapHistory.tsx +165 -0
  338. package/src/containers/SwapHistory/index.ts +1 -0
  339. package/src/containers/SwapHistory/mock.ts +275 -0
  340. package/src/containers/index.ts +4 -0
  341. package/src/helper/index.ts +23 -0
  342. package/src/helper/swaps.ts +23 -0
  343. package/src/helpers.ts +2 -0
  344. package/src/index.ts +4 -0
  345. package/src/theme.ts +161 -0
  346. package/src/types/index.ts +1 -0
  347. package/src/types/meta.ts +20 -0
  348. package/src/types/swaps.tsx +36 -0
  349. package/src/types/wallet.ts +20 -0
package/dist/ui.esm.js ADDED
@@ -0,0 +1,4028 @@
1
+ import React__default, { forwardRef, createElement, useState, Fragment, useEffect, useRef } from 'react';
2
+ import { Indicator, Root } from '@radix-ui/react-checkbox';
3
+ import { createPortal } from 'react-dom';
4
+ import { detectInstallLink } from '@rango-dev/wallets-shared';
5
+ import { Root as Root$1, Thumb } from '@radix-ui/react-switch';
6
+ import { Root as Root$2, Item, Indicator as Indicator$1 } from '@radix-ui/react-radio-group';
7
+ import { VariableSizeList } from 'react-window';
8
+ import InfiniteLoader from 'react-window-infinite-loader';
9
+ import AutoSizer from 'react-virtualized-auto-sizer';
10
+ import { Provider, Root as Root$3, Portal, Trigger, Content as Content$1, Arrow as Arrow$1 } from '@radix-ui/react-tooltip';
11
+
12
+ function _extends() {
13
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
14
+ for (var i = 1; i < arguments.length; i++) {
15
+ var source = arguments[i];
16
+ for (var key in source) {
17
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
18
+ target[key] = source[key];
19
+ }
20
+ }
21
+ }
22
+ return target;
23
+ };
24
+ return _extends.apply(this, arguments);
25
+ }
26
+ function _objectWithoutPropertiesLoose(source, excluded) {
27
+ if (source == null) return {};
28
+ var target = {};
29
+ var sourceKeys = Object.keys(source);
30
+ var key, i;
31
+ for (i = 0; i < sourceKeys.length; i++) {
32
+ key = sourceKeys[i];
33
+ if (excluded.indexOf(key) >= 0) continue;
34
+ target[key] = source[key];
35
+ }
36
+ return target;
37
+ }
38
+
39
+ // TSDX + stiches doesn't work with import statement and has a bug.
40
+ // Solution: (https://github.com/stitchesjs/stitches/issues/833#issuecomment-950707025)
41
+ var _require = /*#__PURE__*/require('@stitches/react'),
42
+ createStitches = _require.createStitches;
43
+ /* ----------------------- Values ----------------------- */
44
+ var theme = {
45
+ colors: {
46
+ primary: '#5FA425',
47
+ primary100: '#9FC87C',
48
+ primary200: '#8FBF66',
49
+ primary300: '#7FB651',
50
+ primary400: '#6FAD3B',
51
+ primary500: '#5FA425',
52
+ primary600: '#4C831E',
53
+ primary700: '#396216',
54
+ primary800: '#26420F',
55
+ primary900: '#132107',
56
+ neutrals200: '#FAFAFA',
57
+ neutrals300: '#EAEAEA',
58
+ neutrals400: '#999999',
59
+ neutrals500: '#888888',
60
+ neutrals600: '#666666',
61
+ neutrals700: '#444444',
62
+ neutrals800: '#333333',
63
+ neutrals900: '#111111',
64
+ background: '#fff',
65
+ foreground: '#000',
66
+ success: '#0070F3',
67
+ success100: '#D3E5FF',
68
+ success300: '#3291FF',
69
+ success500: '#0070F3',
70
+ success700: '#0761D1',
71
+ warning: '#F5A623',
72
+ warning100: '#FFEFCF',
73
+ warning300: '#F7B955',
74
+ warning500: '#F5A623',
75
+ warning700: '#AB570A',
76
+ error: '#FF0000',
77
+ error100: '#F7D4D6',
78
+ error300: '#FF3333',
79
+ error500: '#FF0000',
80
+ error700: '#E60000'
81
+ },
82
+ space: {
83
+ 2: '2px',
84
+ 4: '4px',
85
+ 6: '6px',
86
+ 8: '8px',
87
+ 10: '10px',
88
+ 12: '12px',
89
+ 16: '16px',
90
+ 20: '20px',
91
+ 24: '24px',
92
+ 28: '28px',
93
+ 30: '30px',
94
+ 32: '32px'
95
+ },
96
+ fontSizes: {
97
+ 10: '10px',
98
+ 12: '12px',
99
+ 14: '14px',
100
+ 16: '16px',
101
+ 18: '18px',
102
+ 20: '20px',
103
+ 24: '24px',
104
+ 32: '32px',
105
+ 36: '36px',
106
+ 40: '40px',
107
+ 48: '48px'
108
+ },
109
+ fonts: {},
110
+ fontWeights: {
111
+ 400: '400',
112
+ 500: '500',
113
+ 600: '600',
114
+ 700: '700'
115
+ },
116
+ lineHeights: {},
117
+ letterSpacings: {},
118
+ sizes: {
119
+ 4: '4px',
120
+ 6: '6px',
121
+ 8: '8px',
122
+ 12: '12px',
123
+ 16: '16px',
124
+ 20: '20px',
125
+ 24: '24px',
126
+ 28: '28px',
127
+ 32: '32px',
128
+ 36: '36px',
129
+ 40: '40px',
130
+ 48: '48px'
131
+ },
132
+ borderWidths: {},
133
+ borderStyles: {},
134
+ radii: {
135
+ 5: '5px',
136
+ 10: '10px'
137
+ },
138
+ shadows: {
139
+ s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5'
140
+ },
141
+ zIndices: {},
142
+ transitions: {}
143
+ };
144
+ var media = {
145
+ sm: '(min-width: 640px)',
146
+ md: '(min-width: 768px)',
147
+ lg: '(min-width: 1024px)'
148
+ };
149
+ var utils = {
150
+ bc: function bc(value) {
151
+ return {
152
+ backgroundColor: value
153
+ };
154
+ }
155
+ };
156
+ /* ----------------------- End of Values ----------------------- */
157
+ var typedCreateStiches = createStitches;
158
+ // Note: it seems there is a bug on tsdx and when it compiles the code, it goes through an error
159
+ // We can directly check it with `tsc` to see if the error is correct or not.
160
+ // We `ignore` it for now, to get safety check on VSCode.
161
+ // @ts-ignore
162
+ var _typedCreateStiches = /*#__PURE__*/typedCreateStiches({
163
+ media: media,
164
+ theme: theme,
165
+ utils: utils
166
+ }),
167
+ styled = _typedCreateStiches.styled,
168
+ css = _typedCreateStiches.css,
169
+ createTheme = _typedCreateStiches.createTheme,
170
+ keyframes = _typedCreateStiches.keyframes,
171
+ globalCss = _typedCreateStiches.globalCss;
172
+ var lightTheme = /*#__PURE__*/createTheme({});
173
+ var darkTheme = /*#__PURE__*/createTheme({
174
+ colors: {
175
+ neutrals200: '#111111',
176
+ neutrals300: '#333333',
177
+ neutrals400: '#444444',
178
+ neutrals500: '#666666',
179
+ neutrals600: '#888888',
180
+ neutrals700: '#999999',
181
+ neutrals800: '#EAEAEA',
182
+ neutrals900: '#FAFAFA',
183
+ foreground: '#fff',
184
+ background: '#000'
185
+ },
186
+ shadows: {
187
+ s: '0px 3px 5px 3px #222, 0px 6px 10px 3px #222, 0px 1px 18px 3px #222'
188
+ }
189
+ });
190
+
191
+ var _black, _white, _black2, _white2;
192
+ var SvgWithStrokeColor = /*#__PURE__*/styled('svg', {
193
+ stroke: '$foreground',
194
+ variants: {
195
+ color: {
196
+ primary: {
197
+ stroke: '$primary'
198
+ },
199
+ error: {
200
+ stroke: '$error'
201
+ },
202
+ warning: {
203
+ stroke: '$warning'
204
+ },
205
+ success: {
206
+ stroke: '$success'
207
+ },
208
+ black: (_black = {
209
+ $$color: '$colors$foreground'
210
+ }, _black["." + darkTheme + " &"] = {
211
+ $$color: '$colors$background'
212
+ }, _black.stroke = '$$color', _black),
213
+ white: (_white = {
214
+ $$color: '$colors$background'
215
+ }, _white["." + darkTheme + " &"] = {
216
+ $$color: '$colors$foreground'
217
+ }, _white.stroke = '$$color', _white)
218
+ }
219
+ }
220
+ });
221
+ var SvgWithFillColor = /*#__PURE__*/styled('svg', {
222
+ fill: '$foreground',
223
+ variants: {
224
+ color: {
225
+ primary: {
226
+ fill: '$primary'
227
+ },
228
+ error: {
229
+ fill: '$error'
230
+ },
231
+ warning: {
232
+ fill: '$warning'
233
+ },
234
+ success: {
235
+ fill: '$success'
236
+ },
237
+ black: (_black2 = {
238
+ $$color: '$colors$foreground'
239
+ }, _black2["." + darkTheme + " &"] = {
240
+ $$color: '$colors$background'
241
+ }, _black2.fill = '$$color', _black2),
242
+ white: (_white2 = {
243
+ $$color: '$colors$background'
244
+ }, _white2["." + darkTheme + " &"] = {
245
+ $$color: '$colors$foreground'
246
+ }, _white2.fill = '$$color', _white2)
247
+ }
248
+ }
249
+ });
250
+
251
+ var _excluded = ["size", "color"];
252
+ var DeleteCircleIcon = /*#__PURE__*/forwardRef(function (_ref) {
253
+ var _ref$size = _ref.size,
254
+ size = _ref$size === void 0 ? 16 : _ref$size,
255
+ color = _ref.color,
256
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
257
+ return createElement(SvgWithStrokeColor, Object.assign({
258
+ width: size,
259
+ height: size,
260
+ viewBox: "0 0 24 24",
261
+ color: color,
262
+ fill: "none",
263
+ xmlns: "http://www.w3.org/2000/svg",
264
+ className: "_icon"
265
+ }, props), createElement("path", {
266
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17",
267
+ strokeWidth: 1.5,
268
+ strokeLinecap: "round",
269
+ strokeLinejoin: "round"
270
+ }));
271
+ });
272
+ DeleteCircleIcon.toString = function () {
273
+ return '._icon';
274
+ };
275
+
276
+ var _excluded$1 = ["size", "color"];
277
+ var CheckSquareIcon = /*#__PURE__*/forwardRef(function (_ref) {
278
+ var _ref$size = _ref.size,
279
+ size = _ref$size === void 0 ? 16 : _ref$size,
280
+ color = _ref.color,
281
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
282
+ return createElement(SvgWithStrokeColor, Object.assign({
283
+ width: size,
284
+ height: size,
285
+ viewBox: "0 0 24 24",
286
+ color: color,
287
+ fill: "none",
288
+ xmlns: "http://www.w3.org/2000/svg",
289
+ className: "_icon"
290
+ }, props), createElement("path", {
291
+ d: "M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z",
292
+ strokeWidth: 1.5,
293
+ strokeLinecap: "round",
294
+ strokeLinejoin: "round"
295
+ }), createElement("path", {
296
+ d: "m7.75 12 2.83 2.83 5.67-5.66",
297
+ strokeWidth: 1.5,
298
+ strokeLinecap: "round",
299
+ strokeLinejoin: "round"
300
+ }));
301
+ });
302
+ CheckSquareIcon.toString = function () {
303
+ return '._icon';
304
+ };
305
+
306
+ var _excluded$2 = ["size", "color"];
307
+ var AddIcon = /*#__PURE__*/forwardRef(function (_ref) {
308
+ var _ref$size = _ref.size,
309
+ size = _ref$size === void 0 ? 16 : _ref$size,
310
+ color = _ref.color,
311
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
312
+ return createElement(SvgWithStrokeColor, Object.assign({
313
+ width: size,
314
+ height: size,
315
+ viewBox: "0 0 24 24",
316
+ color: color,
317
+ fill: "none",
318
+ xmlns: "http://www.w3.org/2000/svg",
319
+ className: "_icon"
320
+ }, props), createElement("path", {
321
+ d: "M6 12h12M12 18V6",
322
+ strokeWidth: 1.5,
323
+ strokeLinecap: "round",
324
+ strokeLinejoin: "round"
325
+ }));
326
+ });
327
+ AddIcon.toString = function () {
328
+ return '._icon';
329
+ };
330
+
331
+ var _excluded$3 = ["size", "color"];
332
+ var InfoCircleIcon = /*#__PURE__*/forwardRef(function (_ref) {
333
+ var _ref$size = _ref.size,
334
+ size = _ref$size === void 0 ? 16 : _ref$size,
335
+ color = _ref.color,
336
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
337
+ return createElement(SvgWithFillColor, Object.assign({
338
+ width: size,
339
+ height: size,
340
+ viewBox: "0 0 24 24",
341
+ color: color,
342
+ fill: "none",
343
+ xmlns: "http://www.w3.org/2000/svg",
344
+ className: "_icon"
345
+ }, props), createElement("path", {
346
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5",
347
+ strokeWidth: 2,
348
+ strokeLinecap: "round",
349
+ strokeLinejoin: "round",
350
+ stroke: "#fff"
351
+ }), createElement("path", {
352
+ d: "M11.994 16h.01",
353
+ strokeWidth: 2,
354
+ strokeLinecap: "round",
355
+ strokeLinejoin: "round",
356
+ stroke: "#fff"
357
+ }));
358
+ });
359
+ InfoCircleIcon.toString = function () {
360
+ return '._icon';
361
+ };
362
+
363
+ var _excluded$4 = ["size", "color"];
364
+ var AddCircleIcon = /*#__PURE__*/forwardRef(function (_ref) {
365
+ var _ref$size = _ref.size,
366
+ size = _ref$size === void 0 ? 16 : _ref$size,
367
+ color = _ref.color,
368
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
369
+ return createElement(SvgWithStrokeColor, Object.assign({
370
+ width: size,
371
+ height: size,
372
+ viewBox: "0 0 24 24",
373
+ color: color,
374
+ fill: "none",
375
+ xmlns: "http://www.w3.org/2000/svg",
376
+ className: "_icon"
377
+ }, props), createElement("path", {
378
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8",
379
+ strokeWidth: 1.5,
380
+ strokeLinecap: "round",
381
+ strokeLinejoin: "round"
382
+ }));
383
+ });
384
+ AddCircleIcon.toString = function () {
385
+ return '._icon';
386
+ };
387
+
388
+ var _excluded$5 = ["size", "color"];
389
+ var MinusCircleIcon = /*#__PURE__*/forwardRef(function (_ref) {
390
+ var _ref$size = _ref.size,
391
+ size = _ref$size === void 0 ? 16 : _ref$size,
392
+ color = _ref.color,
393
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
394
+ return createElement(SvgWithStrokeColor, Object.assign({
395
+ width: size,
396
+ height: size,
397
+ viewBox: "0 0 24 24",
398
+ color: color,
399
+ fill: "none",
400
+ xmlns: "http://www.w3.org/2000/svg",
401
+ className: "_icon"
402
+ }, props), createElement("path", {
403
+ d: "M11.92 22c5.5 0 10-4.5 10-10s-4.5-10-10-10-10 4.5-10 10 4.5 10 10 10ZM7.92 12h8",
404
+ strokeWidth: 1.5,
405
+ strokeLinecap: "round",
406
+ strokeLinejoin: "round"
407
+ }));
408
+ });
409
+ MinusCircleIcon.toString = function () {
410
+ return '._icon';
411
+ };
412
+
413
+ var _excluded$6 = ["size", "color"];
414
+ var CheckCircleIcon = /*#__PURE__*/forwardRef(function (_ref) {
415
+ var _ref$size = _ref.size,
416
+ size = _ref$size === void 0 ? 16 : _ref$size,
417
+ color = _ref.color,
418
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
419
+ return createElement(SvgWithFillColor, Object.assign({
420
+ width: size,
421
+ height: size,
422
+ viewBox: "0 0 24 24",
423
+ color: color,
424
+ fill: "none",
425
+ xmlns: "http://www.w3.org/2000/svg",
426
+ className: "_icon"
427
+ }, props), createElement("path", {
428
+ d: "M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z",
429
+ strokeWidth: 1.5,
430
+ strokeLinecap: "round",
431
+ strokeLinejoin: "round",
432
+ stroke: "#fff"
433
+ }), createElement("path", {
434
+ d: "m7.75 12 2.83 2.83 5.67-5.66",
435
+ strokeWidth: 1.5,
436
+ strokeLinecap: "round",
437
+ strokeLinejoin: "round",
438
+ stroke: "#fff"
439
+ }));
440
+ });
441
+ CheckCircleIcon.toString = function () {
442
+ return '._icon';
443
+ };
444
+
445
+ var _excluded$7 = ["size", "color"];
446
+ var CheckIcon = /*#__PURE__*/forwardRef(function (_ref) {
447
+ var _ref$size = _ref.size,
448
+ size = _ref$size === void 0 ? 16 : _ref$size,
449
+ color = _ref.color,
450
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
451
+ return createElement(SvgWithFillColor, Object.assign({
452
+ width: size,
453
+ height: size,
454
+ viewBox: "0 0 15 15",
455
+ fill: "none",
456
+ xmlns: "http://www.w3.org/2000/svg",
457
+ color: color,
458
+ className: "_icon"
459
+ }, props), createElement("path", {
460
+ d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
461
+ fillRule: "evenodd",
462
+ clipRule: "evenodd"
463
+ }));
464
+ });
465
+ CheckIcon.toString = function () {
466
+ return '._icon';
467
+ };
468
+
469
+ var _excluded$8 = ["size", "color"];
470
+ var BanIcon = /*#__PURE__*/forwardRef(function (_ref) {
471
+ var _ref$size = _ref.size,
472
+ size = _ref$size === void 0 ? 16 : _ref$size,
473
+ color = _ref.color,
474
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
475
+ return createElement(SvgWithStrokeColor, Object.assign({
476
+ width: size,
477
+ height: size,
478
+ viewBox: "0 0 24 24",
479
+ color: color,
480
+ fill: "none",
481
+ xmlns: "http://www.w3.org/2000/svg",
482
+ className: "_icon"
483
+ }, props), createElement("path", {
484
+ d: "M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10ZM18.9 5l-14 14",
485
+ strokeWidth: 1.5,
486
+ strokeMiterlimit: 10,
487
+ strokeLinecap: "round",
488
+ strokeLinejoin: "round"
489
+ }));
490
+ });
491
+ BanIcon.toString = function () {
492
+ return '._icon';
493
+ };
494
+
495
+ var _excluded$9 = ["size", "color"];
496
+ var WarningIcon = /*#__PURE__*/forwardRef(function (_ref) {
497
+ var _ref$size = _ref.size,
498
+ size = _ref$size === void 0 ? 16 : _ref$size,
499
+ color = _ref.color,
500
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
501
+ return createElement(SvgWithStrokeColor, Object.assign({
502
+ width: size,
503
+ height: size,
504
+ viewBox: "0 0 24 24",
505
+ color: color,
506
+ fill: "none",
507
+ xmlns: "http://www.w3.org/2000/svg",
508
+ className: "_icon"
509
+ }, props), createElement("path", {
510
+ d: "M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z",
511
+ strokeWidth: 1.5,
512
+ strokeLinecap: "round",
513
+ strokeLinejoin: "round"
514
+ }), createElement("path", {
515
+ d: "M11.994 17h.01",
516
+ strokeWidth: 2,
517
+ strokeLinecap: "round",
518
+ strokeLinejoin: "round"
519
+ }));
520
+ });
521
+ WarningIcon.toString = function () {
522
+ return '._icon';
523
+ };
524
+
525
+ var _excluded$a = ["size", "color"];
526
+ var HistoryIcon = /*#__PURE__*/forwardRef(function (_ref) {
527
+ var _ref$size = _ref.size,
528
+ size = _ref$size === void 0 ? 16 : _ref$size,
529
+ color = _ref.color,
530
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
531
+ return createElement(SvgWithFillColor, Object.assign({
532
+ width: size,
533
+ height: size,
534
+ viewBox: "0 0 24 24",
535
+ color: color,
536
+ fill: "none",
537
+ xmlns: "http://www.w3.org/2000/svg",
538
+ className: "_icon"
539
+ }, props), createElement("path", {
540
+ fillRule: "evenodd",
541
+ clipRule: "evenodd",
542
+ d: "M16.767 1.5c-.7.002-1.267.57-1.267 1.26V9h2.67c.63 0 1.07-.196 1.352-.478C19.804 8.24 20 7.8 20 7.17V4.75c0-.89-.363-1.704-.952-2.301a3.27 3.27 0 0 0-2.281-.949ZM14 2.76C14 1.23 15.25 0 16.77 0h.007a4.77 4.77 0 0 1 3.333 1.39l.004.003A4.775 4.775 0 0 1 21.5 4.75v2.42c0 .95-.304 1.8-.917 2.413-.613.613-1.462.917-2.413.917h-3.42a.75.75 0 0 1-.75-.75V2.76Z"
543
+ }), createElement("path", {
544
+ fillRule: "evenodd",
545
+ clipRule: "evenodd",
546
+ d: "M1.057 1.431C1.862.5 3.097 0 4.75 0h12a.75.75 0 0 1 0 1.5c-.686 0-1.25.564-1.25 1.25v17c0 1.442-1.646 2.256-2.797 1.402l-.002-.002-1.718-1.285a.242.242 0 0 0-.313.025l-1.68 1.68a1.758 1.758 0 0 1-2.48 0l-.002-.001L4.85 19.9a.258.258 0 0 0-.34-.03l-1.707 1.278-.002.001C1.643 22.024 0 21.193 0 19.75v-15c0-1.203.27-2.408 1.057-3.319Zm13.245.069H4.75c-1.346 0-2.112.396-2.557.911C1.73 2.948 1.5 3.743 1.5 4.75v15c0 .216.235.325.397.202l.004-.002 1.709-1.28a1.757 1.757 0 0 1 2.3.17l.002.001L7.57 20.51a.259.259 0 0 0 .36 0l1.68-1.68c.61-.61 1.59-.688 2.283-.158l1.704 1.276c.17.125.403 0 .403-.198v-17c0-.45.109-.875.302-1.25Z"
547
+ }), createElement("path", {
548
+ fillRule: "evenodd",
549
+ clipRule: "evenodd",
550
+ d: "M4 7.75A.75.75 0 0 1 4.75 7h6a.75.75 0 0 1 0 1.5h-6A.75.75 0 0 1 4 7.75ZM4.75 11.75A.75.75 0 0 1 5.5 11H10a.75.75 0 0 1 0 1.5H5.5a.75.75 0 0 1-.75-.75Z"
551
+ }));
552
+ });
553
+ HistoryIcon.toString = function () {
554
+ return '._icon';
555
+ };
556
+
557
+ var _excluded$b = ["size", "color"];
558
+ var GasIcon = /*#__PURE__*/forwardRef(function (_ref) {
559
+ var _ref$size = _ref.size,
560
+ size = _ref$size === void 0 ? 16 : _ref$size,
561
+ color = _ref.color,
562
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
563
+ return createElement(SvgWithStrokeColor, Object.assign({
564
+ width: size,
565
+ height: size,
566
+ viewBox: "0 0 24 24",
567
+ color: color,
568
+ fill: "none",
569
+ xmlns: "http://www.w3.org/2000/svg",
570
+ className: "_icon"
571
+ }, props), createElement("path", {
572
+ d: "M4 22V5c0-2 1.34-3 3-3h8c1.66 0 3 1 3 3v17H4ZM2.5 22h17",
573
+ strokeWidth: 1.5,
574
+ strokeLinecap: "round",
575
+ strokeLinejoin: "round"
576
+ }), createElement("path", {
577
+ d: "M8.89 10h4.23c1.04 0 1.89-.5 1.89-1.89V6.88c0-1.39-.85-1.89-1.89-1.89H8.89C7.85 4.99 7 5.49 7 6.88v1.23C7 9.5 7.85 10 8.89 10ZM7 13h3M18 16.01l4.5-.01v-6l-2-1",
578
+ strokeWidth: 1.5,
579
+ strokeLinecap: "round",
580
+ strokeLinejoin: "round"
581
+ }));
582
+ });
583
+ GasIcon.toString = function () {
584
+ return '._icon';
585
+ };
586
+
587
+ var _excluded$c = ["size", "color"];
588
+ var SettingsIcon = /*#__PURE__*/forwardRef(function (_ref) {
589
+ var _ref$size = _ref.size,
590
+ size = _ref$size === void 0 ? 16 : _ref$size,
591
+ color = _ref.color,
592
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
593
+ return createElement(SvgWithStrokeColor, Object.assign({
594
+ width: size,
595
+ height: size,
596
+ viewBox: "0 0 24 24",
597
+ color: color,
598
+ fill: "none",
599
+ xmlns: "http://www.w3.org/2000/svg",
600
+ className: "_icon"
601
+ }, props), createElement("path", {
602
+ d: "M12.5 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",
603
+ strokeWidth: 1.5,
604
+ strokeMiterlimit: 10,
605
+ strokeLinecap: "round",
606
+ strokeLinejoin: "round"
607
+ }), createElement("path", {
608
+ d: "M2.5 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z",
609
+ strokeWidth: 1.5,
610
+ strokeMiterlimit: 10,
611
+ strokeLinecap: "round",
612
+ strokeLinejoin: "round"
613
+ }));
614
+ });
615
+ SettingsIcon.toString = function () {
616
+ return '._icon';
617
+ };
618
+
619
+ var _excluded$d = ["size", "color"];
620
+ var TrashIcon = /*#__PURE__*/forwardRef(function (_ref) {
621
+ var _ref$size = _ref.size,
622
+ size = _ref$size === void 0 ? 16 : _ref$size,
623
+ color = _ref.color,
624
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
625
+ return createElement(SvgWithStrokeColor, Object.assign({
626
+ width: size,
627
+ height: size,
628
+ viewBox: "0 0 24 24",
629
+ color: color,
630
+ fill: "none",
631
+ xmlns: "http://www.w3.org/2000/svg",
632
+ className: "_icon"
633
+ }, props), createElement("path", {
634
+ d: "M21.5 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3l-2.04.2M9 4.97l.22-1.31C9.38 2.71 9.5 2 11.19 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M19.35 9.14l-.65 10.07c-.11 1.57-.2 2.79-2.99 2.79H9.29c-2.79 0-2.88-1.22-2.99-2.79L5.65 9.14M10.83 16.5h3.33M10 12.5h5",
635
+ strokeWidth: 1.5,
636
+ strokeLinecap: "round",
637
+ strokeLinejoin: "round"
638
+ }));
639
+ });
640
+ TrashIcon.toString = function () {
641
+ return '._icon';
642
+ };
643
+
644
+ var _excluded$e = ["size", "color"];
645
+ var SearchMinusIcon = /*#__PURE__*/forwardRef(function (_ref) {
646
+ var _ref$size = _ref.size,
647
+ size = _ref$size === void 0 ? 16 : _ref$size,
648
+ color = _ref.color,
649
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
650
+ return createElement(SvgWithStrokeColor, Object.assign({
651
+ width: size,
652
+ height: size,
653
+ viewBox: "0 0 24 24",
654
+ color: color,
655
+ fill: "none",
656
+ xmlns: "http://www.w3.org/2000/svg",
657
+ className: "_icon"
658
+ }, props), createElement("path", {
659
+ d: "M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2",
660
+ strokeWidth: 1.5,
661
+ strokeLinecap: "round",
662
+ strokeLinejoin: "round"
663
+ }));
664
+ });
665
+ SearchMinusIcon.toString = function () {
666
+ return '._icon';
667
+ };
668
+
669
+ var _excluded$f = ["size", "color"];
670
+ var SearchIcon = /*#__PURE__*/forwardRef(function (_ref) {
671
+ var _ref$size = _ref.size,
672
+ size = _ref$size === void 0 ? 16 : _ref$size,
673
+ color = _ref.color,
674
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
675
+ return createElement(SvgWithStrokeColor, Object.assign({
676
+ width: size,
677
+ height: size,
678
+ viewBox: "0 0 24 24",
679
+ color: color,
680
+ fill: "none",
681
+ xmlns: "http://www.w3.org/2000/svg",
682
+ className: "_icon"
683
+ }, props), createElement("path", {
684
+ d: "M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2",
685
+ strokeWidth: 1.5,
686
+ strokeLinecap: "round",
687
+ strokeLinejoin: "round"
688
+ }));
689
+ });
690
+ SearchIcon.toString = function () {
691
+ return '._icon';
692
+ };
693
+
694
+ var _excluded$g = ["size", "color"];
695
+ var AngleRightIcon = /*#__PURE__*/forwardRef(function (_ref) {
696
+ var _ref$size = _ref.size,
697
+ size = _ref$size === void 0 ? 16 : _ref$size,
698
+ color = _ref.color,
699
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
700
+ return createElement(SvgWithStrokeColor, Object.assign({
701
+ width: size,
702
+ height: size,
703
+ fill: "none",
704
+ xmlns: "http://www.w3.org/2000/svg",
705
+ viewBox: "0 0 24 24",
706
+ color: color,
707
+ className: "_icon"
708
+ }, props), createElement("path", {
709
+ d: "m8.91 19.92 6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08",
710
+ strokeWidth: 1.5,
711
+ strokeMiterlimit: 10,
712
+ strokeLinecap: "round",
713
+ strokeLinejoin: "round"
714
+ }));
715
+ });
716
+ AngleRightIcon.toString = function () {
717
+ return '._icon';
718
+ };
719
+
720
+ var _excluded$h = ["size", "color"];
721
+ var AngleUpIcon = /*#__PURE__*/forwardRef(function (_ref) {
722
+ var _ref$size = _ref.size,
723
+ size = _ref$size === void 0 ? 16 : _ref$size,
724
+ color = _ref.color,
725
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
726
+ return createElement(SvgWithStrokeColor, Object.assign({
727
+ width: size,
728
+ height: size,
729
+ fill: "none",
730
+ xmlns: "http://www.w3.org/2000/svg",
731
+ viewBox: "0 0 24 24",
732
+ color: color,
733
+ className: "_icon"
734
+ }, props), createElement("path", {
735
+ d: "M19.92 15.05 13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52",
736
+ strokeWidth: 1.5,
737
+ strokeMiterlimit: 10,
738
+ strokeLinecap: "round",
739
+ strokeLinejoin: "round"
740
+ }));
741
+ });
742
+ AngleUpIcon.toString = function () {
743
+ return '._icon';
744
+ };
745
+
746
+ var _excluded$i = ["size", "color"];
747
+ var AngleDownIcon = /*#__PURE__*/forwardRef(function (_ref) {
748
+ var _ref$size = _ref.size,
749
+ size = _ref$size === void 0 ? 16 : _ref$size,
750
+ color = _ref.color,
751
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
752
+ return createElement(SvgWithStrokeColor, Object.assign({
753
+ width: size,
754
+ height: size,
755
+ viewBox: "0 0 24 24",
756
+ color: color,
757
+ fill: "none",
758
+ xmlns: "http://www.w3.org/2000/svg",
759
+ className: "_icon"
760
+ }, props), createElement("path", {
761
+ d: "m19.92 8.95-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95",
762
+ strokeWidth: 1.5,
763
+ strokeMiterlimit: 10,
764
+ strokeLinecap: "round",
765
+ strokeLinejoin: "round"
766
+ }));
767
+ });
768
+ AngleDownIcon.toString = function () {
769
+ return '._icon';
770
+ };
771
+
772
+ var _excluded$j = ["size", "color"];
773
+ var AngleLeftIcon = /*#__PURE__*/forwardRef(function (_ref) {
774
+ var _ref$size = _ref.size,
775
+ size = _ref$size === void 0 ? 16 : _ref$size,
776
+ color = _ref.color,
777
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
778
+ return createElement(SvgWithStrokeColor, Object.assign({
779
+ width: size,
780
+ height: size,
781
+ fill: "none",
782
+ viewBox: "0 0 24 24",
783
+ color: color,
784
+ xmlns: "http://www.w3.org/2000/svg",
785
+ className: "_icon"
786
+ }, props), createElement("path", {
787
+ d: "M15 19.92 8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08",
788
+ strokeWidth: 1.5,
789
+ strokeMiterlimit: 10,
790
+ strokeLinecap: "round",
791
+ strokeLinejoin: "round"
792
+ }));
793
+ });
794
+ AngleDownIcon.toString = function () {
795
+ return '._icon';
796
+ };
797
+
798
+ var _excluded$k = ["size", "color"];
799
+ var DownloadIcon = /*#__PURE__*/forwardRef(function (_ref) {
800
+ var _ref$size = _ref.size,
801
+ size = _ref$size === void 0 ? 16 : _ref$size,
802
+ color = _ref.color,
803
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
804
+ return createElement(SvgWithStrokeColor, Object.assign({
805
+ width: size,
806
+ height: size,
807
+ viewBox: "0 0 24 24",
808
+ color: color,
809
+ fill: "none",
810
+ xmlns: "http://www.w3.org/2000/svg",
811
+ className: "_icon"
812
+ }, props), createElement("path", {
813
+ d: "M16.44 8.9c3.6.31 5.07 2.16 5.07 6.21v.13c0 4.47-1.79 6.26-6.26 6.26H8.74c-4.47 0-6.26-1.79-6.26-6.26v-.13c0-4.02 1.45-5.87 4.99-6.2M12 2v12.88",
814
+ strokeWidth: 1.5,
815
+ strokeLinecap: "round",
816
+ strokeLinejoin: "round"
817
+ }), createElement("path", {
818
+ d: "M15.35 12.65 12 16l-3.35-3.35",
819
+ strokeWidth: 1.5,
820
+ strokeLinecap: "round",
821
+ strokeLinejoin: "round"
822
+ }));
823
+ });
824
+ DownloadIcon.toString = function () {
825
+ return '._icon';
826
+ };
827
+
828
+ var _excluded$l = ["size", "color"];
829
+ var RetryRightIcon = /*#__PURE__*/forwardRef(function (_ref) {
830
+ var _ref$size = _ref.size,
831
+ size = _ref$size === void 0 ? 16 : _ref$size,
832
+ color = _ref.color,
833
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
834
+ return createElement(SvgWithStrokeColor, Object.assign({
835
+ width: size,
836
+ height: size,
837
+ viewBox: "0 0 24 24",
838
+ color: color,
839
+ fill: "none",
840
+ xmlns: "http://www.w3.org/2000/svg",
841
+ className: "_icon"
842
+ }, props), createElement("path", {
843
+ d: "M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32 13.24 2M16.13 5.32l-3.37 2.46",
844
+ strokeWidth: 1.5,
845
+ strokeLinecap: "round",
846
+ strokeLinejoin: "round"
847
+ }));
848
+ });
849
+ RetryRightIcon.toString = function () {
850
+ return '._icon';
851
+ };
852
+
853
+ var _excluded$m = ["size", "color"];
854
+ var RetryLeftIcon = /*#__PURE__*/forwardRef(function (_ref) {
855
+ var _ref$size = _ref.size,
856
+ size = _ref$size === void 0 ? 16 : _ref$size,
857
+ color = _ref.color,
858
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
859
+ return createElement(SvgWithStrokeColor, Object.assign({
860
+ width: size,
861
+ height: size,
862
+ viewBox: "0 0 24 24",
863
+ color: color,
864
+ fill: "none",
865
+ xmlns: "http://www.w3.org/2000/svg",
866
+ className: "_icon"
867
+ }, props), createElement("path", {
868
+ d: "M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32 10.76 2M7.87 5.32l3.37 2.46",
869
+ strokeWidth: 1.5,
870
+ strokeLinecap: "round",
871
+ strokeLinejoin: "round"
872
+ }));
873
+ });
874
+ RetryLeftIcon.toString = function () {
875
+ return '._icon';
876
+ };
877
+
878
+ var _excluded$n = ["size", "color"];
879
+ var TryAgainIcon = /*#__PURE__*/forwardRef(function (_ref) {
880
+ var _ref$size = _ref.size,
881
+ size = _ref$size === void 0 ? 16 : _ref$size,
882
+ color = _ref.color,
883
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
884
+ return createElement(SvgWithStrokeColor, Object.assign({
885
+ width: size,
886
+ height: size,
887
+ viewBox: "0 0 24 24",
888
+ color: color,
889
+ fill: "none",
890
+ xmlns: "http://www.w3.org/2000/svg",
891
+ className: "_icon"
892
+ }, props), createElement("path", {
893
+ d: "M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44",
894
+ strokeWidth: 1.5,
895
+ strokeLinecap: "round",
896
+ strokeLinejoin: "round"
897
+ }));
898
+ });
899
+ TryAgainIcon.toString = function () {
900
+ return '._icon';
901
+ };
902
+
903
+ var _excluded$o = ["size", "color"];
904
+ var VerticalSwapIcon = /*#__PURE__*/forwardRef(function (_ref) {
905
+ var _ref$size = _ref.size,
906
+ size = _ref$size === void 0 ? 16 : _ref$size,
907
+ color = _ref.color,
908
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
909
+ return createElement(SvgWithStrokeColor, Object.assign({
910
+ width: size,
911
+ height: size,
912
+ viewBox: "0 0 24 24",
913
+ color: color,
914
+ fill: "none",
915
+ xmlns: "http://www.w3.org/2000/svg",
916
+ className: "_icon"
917
+ }, props), createElement("path", {
918
+ d: "m13.82 6.85 3.04 3.04M13.82 17.15V6.85M10.18 17.15l-3.04-3.04M10.18 6.85v10.3",
919
+ strokeWidth: 1.5,
920
+ strokeMiterlimit: 10,
921
+ strokeLinecap: "round",
922
+ strokeLinejoin: "round"
923
+ }), createElement("path", {
924
+ d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",
925
+ strokeWidth: 1.5,
926
+ strokeLinecap: "round",
927
+ strokeLinejoin: "round"
928
+ }));
929
+ });
930
+ VerticalSwapIcon.toString = function () {
931
+ return '._icon';
932
+ };
933
+
934
+ var _excluded$p = ["size", "color"];
935
+ var HorizontalSwapIcon = /*#__PURE__*/forwardRef(function (_ref) {
936
+ var _ref$size = _ref.size,
937
+ size = _ref$size === void 0 ? 16 : _ref$size,
938
+ color = _ref.color,
939
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
940
+ return createElement(SvgWithStrokeColor, Object.assign({
941
+ width: size,
942
+ height: size,
943
+ viewBox: "0 0 24 24",
944
+ color: color,
945
+ fill: "none",
946
+ xmlns: "http://www.w3.org/2000/svg",
947
+ className: "_icon"
948
+ }, props), createElement("path", {
949
+ d: "m17.15 13.82-3.04 3.04M6.85 13.82h10.3M6.85 10.18l3.04-3.04M17.15 10.18H6.85",
950
+ strokeWidth: 1.5,
951
+ strokeMiterlimit: 10,
952
+ strokeLinecap: "round",
953
+ strokeLinejoin: "round"
954
+ }), createElement("path", {
955
+ d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",
956
+ strokeWidth: 1.5,
957
+ strokeLinecap: "round",
958
+ strokeLinejoin: "round"
959
+ }));
960
+ });
961
+ HorizontalSwapIcon.toString = function () {
962
+ return '._icon';
963
+ };
964
+
965
+ var _excluded$q = ["color", "size"];
966
+ var RetryIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
967
+ var color = _ref.color,
968
+ _ref$size = _ref.size,
969
+ size = _ref$size === void 0 ? 16 : _ref$size,
970
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
971
+ return createElement(SvgWithFillColor, Object.assign({
972
+ width: size,
973
+ height: size,
974
+ fill: "none",
975
+ xmlns: "http://www.w3.org/2000/svg",
976
+ viewBox: "0 0 24 24",
977
+ color: color,
978
+ className: "_icon"
979
+ }, props, {
980
+ ref: forwardedRef
981
+ }), createElement("path", {
982
+ fillRule: "evenodd",
983
+ clipRule: "evenodd",
984
+ d: "M17.016 13.45c.199-.384.002-.842-.397-1.005-.406-.166-.864.033-1.077.416A6.17 6.17 0 0 1 13 15.345a6.051 6.051 0 0 1-4.244.513 6.127 6.127 0 0 1-3.543-2.425 6.286 6.286 0 0 1 .73-8.095A6.089 6.089 0 0 1 9.86 3.604a6.07 6.07 0 0 1 4.083 1.286 6.196 6.196 0 0 1 1.65 1.97l-1.053.363a.302.302 0 0 0-.073.534l2.607 1.758a.3.3 0 0 0 .45-.155l1.01-3.007a.298.298 0 0 0-.38-.378l-1.057.365a7.79 7.79 0 0 0-2.194-2.713 7.627 7.627 0 0 0-5.13-1.615A7.65 7.65 0 0 0 4.852 4.19a7.898 7.898 0 0 0-.917 10.17 7.7 7.7 0 0 0 4.452 3.048 7.604 7.604 0 0 0 5.333-.644 7.757 7.757 0 0 0 3.297-3.315Z",
985
+ fill: color
986
+ }));
987
+ });
988
+ RetryIcon.toString = function () {
989
+ return '._icon';
990
+ };
991
+
992
+ var _excluded$r = ["size", "color"];
993
+ var WalletIcon = /*#__PURE__*/forwardRef(function (_ref) {
994
+ var _ref$size = _ref.size,
995
+ size = _ref$size === void 0 ? 16 : _ref$size,
996
+ color = _ref.color,
997
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
998
+ return createElement(SvgWithFillColor, Object.assign({
999
+ width: size,
1000
+ height: size,
1001
+ viewBox: "0 0 24 24",
1002
+ color: color,
1003
+ fill: "none",
1004
+ xmlns: "http://www.w3.org/2000/svg",
1005
+ className: "_icon"
1006
+ }, props), createElement("path", {
1007
+ fillRule: "evenodd",
1008
+ clipRule: "evenodd",
1009
+ d: "M4.51 7.205a3.018 3.018 0 0 0-3.01 3.01v6.73a3.018 3.018 0 0 0 3.01 3.01h11.48a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.971-.82H19v-.69a3.018 3.018 0 0 0-3.01-3.01H4.51ZM0 10.215a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H4.51A4.518 4.518 0 0 1 0 16.945v-6.73Z"
1010
+ }), createElement("path", {
1011
+ fillRule: "evenodd",
1012
+ clipRule: "evenodd",
1013
+ d: "M12.35 2.655a1.15 1.15 0 0 0-1.554-1.079l-7.94 3A2.098 2.098 0 0 0 1.5 6.547v4.569a.75.75 0 1 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3s-.001 0 0 0c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM17.729 12.405c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.759 2.759 0 0 1 .816-2.227Z"
1014
+ }), createElement("path", {
1015
+ fillRule: "evenodd",
1016
+ clipRule: "evenodd",
1017
+ d: "M4.5 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75Z"
1018
+ }));
1019
+ });
1020
+ WalletIcon.toString = function () {
1021
+ return '._icon';
1022
+ };
1023
+
1024
+ var _excluded$s = ["size", "color"];
1025
+ var AddWalletIcon = /*#__PURE__*/forwardRef(function (_ref) {
1026
+ var _ref$size = _ref.size,
1027
+ size = _ref$size === void 0 ? 16 : _ref$size,
1028
+ color = _ref.color,
1029
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
1030
+ return createElement(SvgWithFillColor, Object.assign({
1031
+ width: size,
1032
+ height: size,
1033
+ viewBox: "0 0 24 24",
1034
+ color: color,
1035
+ fill: "none",
1036
+ xmlns: "http://www.w3.org/2000/svg",
1037
+ className: "_icon"
1038
+ }, props), createElement("path", {
1039
+ fillRule: "evenodd",
1040
+ clipRule: "evenodd",
1041
+ d: "M6.569 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.206 1.579-.574 2.25h8.564a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.569Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.014.014c-.266.26-.414.63-.377 1.022l.001.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H7.939a.75.75 0 0 1-.482-1.324c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-5.283-2.533.75.75 0 0 1-1.217-.587v-4.37Z"
1042
+ }), createElement("path", {
1043
+ fillRule: "evenodd",
1044
+ clipRule: "evenodd",
1045
+ d: "M14.409 2.655a1.15 1.15 0 0 0-1.555-1.078l-7.94 3a2.098 2.098 0 0 0-1.355 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.921-2.84 2.324-3.371l7.94-3c1.733-.657 3.586.629 3.586 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.787 12.405c-.359 0-.674.14-.902.374l-.014.013c-.266.26-.414.63-.377 1.022v.01c.054.634.664 1.181 1.413 1.181h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.777-1.03-2.907-2.553a2.759 2.759 0 0 1 .817-2.227Z"
1046
+ }), createElement("path", {
1047
+ fillRule: "evenodd",
1048
+ clipRule: "evenodd",
1049
+ d: "M6.559 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.309 14.455c-.762 0-1.469.267-2.033.717h-.001a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.184.468 1.667l.006.01a3.22 3.22 0 0 0 2.776 1.573 3.155 3.155 0 0 0 2.148-.824c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-3.25-3.25Zm-2.967-.457a4.749 4.749 0 0 1 7.717 3.707c0 .888-.248 1.73-.687 2.446-.25.427-.57.808-.941 1.12a4.656 4.656 0 0 1-3.122 1.184 4.72 4.72 0 0 1-4.062-2.301 4.671 4.671 0 0 1-.688-2.449 4.72 4.72 0 0 1 1.783-3.707Z"
1050
+ }), createElement("path", {
1051
+ fillRule: "evenodd",
1052
+ clipRule: "evenodd",
1053
+ d: "M3.07 17.685a.75.75 0 0 1 .75-.75H6.8a.75.75 0 0 1 0 1.5H3.82a.75.75 0 0 1-.75-.75Z"
1054
+ }), createElement("path", {
1055
+ fillRule: "evenodd",
1056
+ clipRule: "evenodd",
1057
+ d: "M5.309 15.475a.75.75 0 0 1 .75.75v2.99a.75.75 0 0 1-1.5 0v-2.99a.75.75 0 0 1 .75-.75Z"
1058
+ }));
1059
+ });
1060
+ AddWalletIcon.toString = function () {
1061
+ return '._icon';
1062
+ };
1063
+
1064
+ var _excluded$t = ["size", "color"];
1065
+ var DeleteWalletIcon = /*#__PURE__*/forwardRef(function (_ref) {
1066
+ var _ref$size = _ref.size,
1067
+ size = _ref$size === void 0 ? 16 : _ref$size,
1068
+ color = _ref.color,
1069
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
1070
+ return createElement(SvgWithFillColor, Object.assign({
1071
+ width: size,
1072
+ height: size,
1073
+ viewBox: "0 0 24 24",
1074
+ color: color,
1075
+ fill: "none",
1076
+ xmlns: "http://www.w3.org/2000/svg",
1077
+ className: "_icon"
1078
+ }, props), createElement("path", {
1079
+ fillRule: "evenodd",
1080
+ clipRule: "evenodd",
1081
+ d: "M6.627 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.205 1.579-.573 2.25h8.563a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.777-1.03-2.907-2.553a2.759 2.759 0 0 1 .817-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.627Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.359 0-.675.14-.902.373l-.014.014c-.266.26-.415.63-.377 1.022v.009c.054.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H7.997a.75.75 0 0 1-.482-1.325c.243-.203.457-.456.624-.743l.01-.016a3.17 3.17 0 0 0 .468-1.666 3.249 3.249 0 0 0-5.282-2.533.75.75 0 0 1-1.218-.587v-4.37Z"
1082
+ }), createElement("path", {
1083
+ fillRule: "evenodd",
1084
+ clipRule: "evenodd",
1085
+ d: "M14.467 2.655a1.15 1.15 0 0 0-1.554-1.079l-7.94 3a2.098 2.098 0 0 0-1.356 1.97v4.569a.75.75 0 1 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.846 12.405c-.359 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.377 1.022v.009c.053.635.664 1.182 1.413 1.182h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.759 2.759 0 0 1 .816-2.227Z"
1086
+ }), createElement("path", {
1087
+ fillRule: "evenodd",
1088
+ clipRule: "evenodd",
1089
+ d: "M6.617 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.367 14.455c-.761 0-1.468.267-2.032.717h-.002a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.183.469 1.666l.006.01a3.22 3.22 0 0 0 2.775 1.574 3.155 3.155 0 0 0 2.148-.825c.243-.203.457-.456.624-.743l.01-.016a3.17 3.17 0 0 0 .468-1.666 3.249 3.249 0 0 0-3.25-3.25ZM2.4 13.998a4.749 4.749 0 0 1 7.717 3.707 4.67 4.67 0 0 1-.687 2.446c-.25.427-.57.808-.94 1.12a4.655 4.655 0 0 1-3.123 1.184 4.72 4.72 0 0 1-4.061-2.301 4.67 4.67 0 0 1-.689-2.449A4.72 4.72 0 0 1 2.4 13.998Z"
1090
+ }), createElement("path", {
1091
+ fillRule: "evenodd",
1092
+ clipRule: "evenodd",
1093
+ d: "M3.785 16.106a.75.75 0 0 1 1.06-.003l2.12 2.11a.75.75 0 1 1-1.058 1.064l-2.12-2.11a.75.75 0 0 1-.002-1.061Z"
1094
+ }), createElement("path", {
1095
+ fillRule: "evenodd",
1096
+ clipRule: "evenodd",
1097
+ d: "M6.948 16.136a.75.75 0 0 1-.002 1.06l-2.12 2.11a.75.75 0 0 1-1.058-1.063l2.12-2.11a.75.75 0 0 1 1.06.003Z"
1098
+ }));
1099
+ });
1100
+ DeleteWalletIcon.toString = function () {
1101
+ return '._icon';
1102
+ };
1103
+
1104
+ var _excluded$u = ["size", "color"];
1105
+ var CheckWalletIcon = /*#__PURE__*/forwardRef(function (_ref) {
1106
+ var _ref$size = _ref.size,
1107
+ size = _ref$size === void 0 ? 16 : _ref$size,
1108
+ color = _ref.color,
1109
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
1110
+ return createElement(SvgWithFillColor, Object.assign({
1111
+ width: size,
1112
+ height: size,
1113
+ viewBox: "0 0 24 24",
1114
+ color: color,
1115
+ fill: "none",
1116
+ xmlns: "http://www.w3.org/2000/svg",
1117
+ className: "_icon"
1118
+ }, props), createElement("path", {
1119
+ fillRule: "evenodd",
1120
+ clipRule: "evenodd",
1121
+ d: "M6.686 7.205a3.018 3.018 0 0 0-3.01 3.01v3.076a4.749 4.749 0 0 1 6.5 4.414c0 .808-.205 1.579-.573 2.25h8.563a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H6.686Zm-4.51 3.01a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.36 0-.675.14-.903.373l-.013.014c-.266.26-.415.63-.378 1.022l.001.009c.053.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51H8.056a.75.75 0 0 1-.482-1.324c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-5.283-2.533.75.75 0 0 1-1.217-.587v-4.37Z"
1122
+ }), createElement("path", {
1123
+ fillRule: "evenodd",
1124
+ clipRule: "evenodd",
1125
+ d: "M14.526 2.655a1.15 1.15 0 0 0-1.554-1.078l-7.94 3a2.098 2.098 0 0 0-1.356 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.921-2.84 2.324-3.371l7.94-3c1.733-.657 3.586.629 3.586 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM19.905 12.405c-.36 0-.675.14-.903.374l-.014.013c-.265.26-.414.63-.377 1.022l.001.01c.053.634.664 1.181 1.413 1.181h1.942a.276.276 0 0 0 .268-.27v-2.06a.276.276 0 0 0-.268-.27h-2.062Zm-1.971-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.724 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.778-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227Z"
1126
+ }), createElement("path", {
1127
+ fillRule: "evenodd",
1128
+ clipRule: "evenodd",
1129
+ d: "M6.676 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM5.426 14.455c-.762 0-1.469.267-2.033.717h-.001a3.22 3.22 0 0 0-1.216 2.533c0 .61.17 1.184.468 1.667l.006.01a3.22 3.22 0 0 0 2.776 1.573 3.155 3.155 0 0 0 2.148-.824c.243-.204.457-.457.624-.744l.01-.015a3.17 3.17 0 0 0 .468-1.667 3.249 3.249 0 0 0-3.25-3.25Zm-2.967-.457a4.749 4.749 0 0 1 7.717 3.707c0 .888-.248 1.73-.687 2.446-.25.427-.57.808-.941 1.12a4.656 4.656 0 0 1-3.122 1.184 4.72 4.72 0 0 1-4.062-2.301 4.671 4.671 0 0 1-.688-2.449 4.72 4.72 0 0 1 1.783-3.707Z"
1130
+ }), createElement("path", {
1131
+ fillRule: "evenodd",
1132
+ clipRule: "evenodd",
1133
+ d: "M7.538 16.215a.75.75 0 0 1-.042 1.06l-2.13 1.97a.75.75 0 0 1-1.04-.02l-.99-.99a.75.75 0 1 1 1.062-1.06l.48.48 1.6-1.48a.75.75 0 0 1 1.06.04Z"
1134
+ }));
1135
+ });
1136
+ CheckWalletIcon.toString = function () {
1137
+ return '._icon';
1138
+ };
1139
+
1140
+ var _excluded$v = ["size", "color"];
1141
+ var SwapWalletIcon = /*#__PURE__*/forwardRef(function (_ref) {
1142
+ var _ref$size = _ref.size,
1143
+ size = _ref$size === void 0 ? 16 : _ref$size,
1144
+ color = _ref.color,
1145
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
1146
+ return createElement(SvgWithFillColor, Object.assign({
1147
+ width: size,
1148
+ height: size,
1149
+ viewBox: "0 0 24 24",
1150
+ color: color,
1151
+ fill: "none",
1152
+ xmlns: "http://www.w3.org/2000/svg",
1153
+ className: "_icon"
1154
+ }, props), createElement("path", {
1155
+ fillRule: "evenodd",
1156
+ clipRule: "evenodd",
1157
+ d: "M5.244 7.205a3.018 3.018 0 0 0-3.01 3.01v1.73a.75.75 0 0 1-1.5 0v-1.73a4.518 4.518 0 0 1 4.51-4.51h11.48a4.518 4.518 0 0 1 4.51 4.51v1.44a.75.75 0 0 1-.75.75h-2.02c-.359 0-.674.14-.902.373l-.014.014c-.266.26-.414.63-.377 1.022v.009c.054.635.664 1.182 1.413 1.182h1.9a.75.75 0 0 1 .75.75v1.19a4.518 4.518 0 0 1-4.51 4.51h-5.48a.75.75 0 0 1 0-1.5h5.48a3.018 3.018 0 0 0 3.01-3.01v-.44h-1.15c-1.41 0-2.777-1.03-2.907-2.553a2.758 2.758 0 0 1 .817-2.227 2.743 2.743 0 0 1 1.97-.82h1.27v-.69a3.018 3.018 0 0 0-3.01-3.01H5.244Z"
1158
+ }), createElement("path", {
1159
+ fillRule: "evenodd",
1160
+ clipRule: "evenodd",
1161
+ d: "M13.084 2.655a1.15 1.15 0 0 0-1.554-1.078l-7.94 3a2.098 2.098 0 0 0-1.356 1.968v4.57a.75.75 0 0 1-1.5 0v-4.57c0-1.5.922-2.84 2.325-3.371l7.94-3c1.732-.657 3.585.629 3.585 2.481v3.8a.75.75 0 0 1-1.5 0v-3.8ZM18.463 12.405c-.359 0-.675.14-.902.374l-.014.013c-.266.26-.415.63-.377 1.022v.01c.053.634.664 1.181 1.413 1.181h1.943a.276.276 0 0 0 .267-.27v-2.06a.276.276 0 0 0-.267-.27h-2.063Zm-1.97-.68a2.743 2.743 0 0 1 1.97-.82h2.107a1.777 1.777 0 0 1 1.723 1.77v2.06a1.777 1.777 0 0 1-1.75 1.77h-1.96c-1.41 0-2.777-1.03-2.907-2.553a2.758 2.758 0 0 1 .816-2.227Z"
1162
+ }), createElement("path", {
1163
+ fillRule: "evenodd",
1164
+ clipRule: "evenodd",
1165
+ d: "M5.234 10.705a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75ZM1.234 15.205a.75.75 0 0 1 .75-.75h5.34a1.91 1.91 0 0 1 1.91 1.91v1.28a.75.75 0 0 1-1.5 0v-1.28a.41.41 0 0 0-.41-.41h-5.34a.75.75 0 0 1-.75-.75Z"
1166
+ }), createElement("path", {
1167
+ fillRule: "evenodd",
1168
+ clipRule: "evenodd",
1169
+ d: "M3.735 13.455a.75.75 0 0 1 0 1.06l-.69.69.69.69a.75.75 0 1 1-1.061 1.06l-1.22-1.22a.75.75 0 0 1 0-1.06l1.22-1.22a.75.75 0 0 1 1.06 0ZM1.984 17.296a.75.75 0 0 1 .75.75v1.28c0 .225.185.41.41.41h5.34a.75.75 0 0 1 0 1.5h-5.34a1.91 1.91 0 0 1-1.91-1.91v-1.28a.75.75 0 0 1 .75-.75Z"
1170
+ }), createElement("path", {
1171
+ fillRule: "evenodd",
1172
+ clipRule: "evenodd",
1173
+ d: "M6.735 18.735a.75.75 0 0 1 1.061 0l1.22 1.22a.75.75 0 0 1 0 1.061l-1.22 1.22a.75.75 0 1 1-1.06-1.06l.689-.69-.69-.69a.75.75 0 0 1 0-1.06Z"
1174
+ }));
1175
+ });
1176
+ SwapWalletIcon.toString = function () {
1177
+ return '._icon';
1178
+ };
1179
+
1180
+ var _excluded$w = ["size", "color"];
1181
+ var BagIcon = /*#__PURE__*/forwardRef(function (_ref) {
1182
+ var _ref$size = _ref.size,
1183
+ size = _ref$size === void 0 ? 16 : _ref$size,
1184
+ color = _ref.color,
1185
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
1186
+ return createElement(SvgWithStrokeColor, Object.assign({
1187
+ width: size,
1188
+ height: size,
1189
+ viewBox: "0 0 32 32",
1190
+ color: color,
1191
+ fill: "none",
1192
+ xmlns: "http://www.w3.org/2000/svg",
1193
+ className: "_icon"
1194
+ }, props), createElement("g", {
1195
+ clipPath: "url(#a)",
1196
+ strokeWidth: 1.5
1197
+ }, createElement("path", {
1198
+ d: "M9.333 9.333V4.8a.8.8 0 0 1 .8-.8h11.734a.8.8 0 0 1 .8.8v4.533M13.333 4v5.333M16 4v5.333m9.333 17.334H6.667A2.667 2.667 0 0 1 4 24V12a2.667 2.667 0 0 1 2.667-2.667h18.666A2.667 2.667 0 0 1 28 12v12a2.667 2.667 0 0 1-2.667 2.667Z"
1199
+ }), createElement("path", {
1200
+ d: "M22 18.666a.667.667 0 1 1 0-1.334.667.667 0 0 1 0 1.334Z",
1201
+ fill: color,
1202
+ strokeLinecap: "round",
1203
+ strokeLinejoin: "round"
1204
+ })), createElement("defs", null, createElement("clipPath", {
1205
+ id: "a"
1206
+ }, createElement("path", {
1207
+ fill: color,
1208
+ d: "M0 0h32v32H0z"
1209
+ }))));
1210
+ });
1211
+ BagIcon.toString = function () {
1212
+ return '._icon';
1213
+ };
1214
+
1215
+ var _excluded$x = ["size"];
1216
+ var TimeIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
1217
+ var _ref$size = _ref.size,
1218
+ size = _ref$size === void 0 ? 16 : _ref$size,
1219
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
1220
+ return createElement(SvgWithStrokeColor, Object.assign({
1221
+ width: size,
1222
+ height: size,
1223
+ viewBox: "0 0 20 20",
1224
+ fill: "none",
1225
+ xmlns: "http://www.w3.org/2000/svg",
1226
+ className: "_icon"
1227
+ }, props, {
1228
+ ref: forwardedRef
1229
+ }), createElement("circle", {
1230
+ cx: 10,
1231
+ cy: 10,
1232
+ r: 7.25,
1233
+ strokeWidth: 1.5
1234
+ }), createElement("path", {
1235
+ fillRule: "evenodd",
1236
+ clipRule: "evenodd",
1237
+ d: "M10.134 6.6a.6.6 0 0 0-1.2 0v4.27a.6.6 0 0 0 .28.507c.009.01.018.019.029.028l2.59 2.373a.472.472 0 0 0 .753-.109.763.763 0 0 0-.133-.919l-2.319-2.123V6.6Z"
1238
+ }));
1239
+ });
1240
+ TimeIcon.toString = function () {
1241
+ return '._icon';
1242
+ };
1243
+
1244
+ var CloseIcon = /*#__PURE__*/styled(AddIcon, {
1245
+ transform: 'rotate(45deg)',
1246
+ cursor: 'pointer'
1247
+ });
1248
+ CloseIcon.toString = function () {
1249
+ return '._icon';
1250
+ };
1251
+
1252
+ var _excluded$y = ["size", "color"];
1253
+ var SignatureIcon = /*#__PURE__*/forwardRef(function (_ref) {
1254
+ var _ref$size = _ref.size,
1255
+ size = _ref$size === void 0 ? 16 : _ref$size,
1256
+ color = _ref.color,
1257
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
1258
+ return createElement(SvgWithFillColor, Object.assign({
1259
+ width: size,
1260
+ height: size,
1261
+ color: color,
1262
+ xmlns: "http://www.w3.org/2000/svg",
1263
+ viewBox: "0 0 122.88 107.95",
1264
+ xmlSpace: "preserve",
1265
+ className: "_icon"
1266
+ }, props), createElement("path", {
1267
+ d: "M82.19 0c1.22-.01 2.27.4 3.18 1.27l13.27 12.7c.86.82 1.28 1.91 1.3 3.11.02 1.22-.34 2.33-1.18 3.18l-7.06 7.35L72.09 8.67l6.99-7.28C79.94.5 80.98.02 82.19 0zM20.08 68.29a4.536 4.536 0 1 1 2.67 8.67c-6.98 2.14-11.66 6.28-13.21 10.17-.41 1.04-.55 1.99-.39 2.77.12.59.48 1.13 1.07 1.56 2.55 1.86 8.04 2.34 17.26.1 5.46-1.33 11.31-3.13 16.49-4.73 5.29-1.63 9.91-3.06 13.12-3.66 5.92-1.1 11.83-1.85 16.6-1.61 6.26.31 10.96 2.32 12.57 7.13 1.04 3.11.75 5.81.49 8.23-.09.87-.18 1.68-.14 2.21 0 .02.95-.05 5.53-.41 5.3-.42 10.79-2.51 16.21-4.58 2.78-1.06 5.54-2.11 8.67-3.07 2.4-.73 4.93.63 5.65 3.02.73 2.4-.63 4.93-3.02 5.65-2.43.74-5.24 1.82-8.06 2.89-6.04 2.3-12.14 4.63-18.74 5.15-12.07.95-14.87-2.46-15.3-7.95-.1-1.29.03-2.54.17-3.88.16-1.5.34-3.18-.07-4.39-.18-.54-1.89-.82-4.39-.94-3.99-.2-9.22.48-14.54 1.47-2.65.49-7.05 1.85-12.09 3.41-5.27 1.63-11.22 3.46-17.02 4.87-12.14 2.95-20.21 1.7-24.73-1.6-2.54-1.85-4.05-4.27-4.63-7-.54-2.54-.23-5.28.85-8 2.46-6.14 9.23-12.5 18.98-15.48zm21.19-19.84L53.3 60.02l-14.71 3.95c-.53.1-.74-.11-.65-.6l3.33-14.92zm24.6-33.34 19.59 18.87L58.7 62.23l-23.98 6.43c-.86.17-1.2-.17-1.06-.98l5.43-24.31 26.78-28.26z",
1268
+ style: {
1269
+ fillRule: 'evenodd',
1270
+ clipRule: 'evenodd'
1271
+ }
1272
+ }));
1273
+ });
1274
+ SignatureIcon.toString = function () {
1275
+ return '._icon';
1276
+ };
1277
+
1278
+ var _excluded$z = ["children"];
1279
+ var TypographyContainer = /*#__PURE__*/styled('span', {
1280
+ margin: 0,
1281
+ color: '$foreground',
1282
+ variants: {
1283
+ variant: {
1284
+ h1: {
1285
+ fontSize: '$36',
1286
+ fontWeight: '$700',
1287
+ '@md': {
1288
+ fontSize: '$40'
1289
+ },
1290
+ '@lg': {
1291
+ fontSize: '$48'
1292
+ }
1293
+ },
1294
+ h2: {
1295
+ fontSize: '$32',
1296
+ fontWeight: '$700',
1297
+ '@md': {
1298
+ fontSize: '$36'
1299
+ },
1300
+ '@lg': {
1301
+ fontSize: '$40'
1302
+ }
1303
+ },
1304
+ h3: {
1305
+ fontSize: '$20',
1306
+ fontWeight: '$700',
1307
+ '@md': {
1308
+ fontSize: '$24'
1309
+ },
1310
+ '@lg': {
1311
+ fontSize: '$32'
1312
+ }
1313
+ },
1314
+ h4: {
1315
+ fontSize: '$18',
1316
+ fontWeight: '$600',
1317
+ '@md': {
1318
+ fontSize: '$20'
1319
+ },
1320
+ '@lg': {
1321
+ fontSize: '$24'
1322
+ }
1323
+ },
1324
+ h5: {
1325
+ fontSize: '$16',
1326
+ fontWeight: '$600',
1327
+ '@md': {
1328
+ fontSize: '$18'
1329
+ },
1330
+ '@lg': {
1331
+ fontSize: '$20'
1332
+ }
1333
+ },
1334
+ h6: {
1335
+ fontSize: '$14',
1336
+ fontWeight: '$500',
1337
+ '@md': {
1338
+ fontSize: '$16'
1339
+ },
1340
+ '@lg': {
1341
+ fontSize: '$18'
1342
+ }
1343
+ },
1344
+ body1: {
1345
+ fontSize: '$14',
1346
+ fontWeight: '$400',
1347
+ '@md': {
1348
+ fontSize: '$16'
1349
+ },
1350
+ '@lg': {
1351
+ fontSize: '$18'
1352
+ }
1353
+ },
1354
+ body2: {
1355
+ fontSize: '$14',
1356
+ fontWeight: '$400',
1357
+ '@lg': {
1358
+ fontSize: '$16'
1359
+ }
1360
+ },
1361
+ caption: {
1362
+ fontSize: '$10',
1363
+ fontWeight: '$400',
1364
+ '@lg': {
1365
+ fontSize: '$12'
1366
+ }
1367
+ }
1368
+ },
1369
+ align: {
1370
+ center: {
1371
+ textAlign: 'center'
1372
+ },
1373
+ left: {
1374
+ textAlign: 'left'
1375
+ },
1376
+ right: {
1377
+ textAlign: 'right'
1378
+ }
1379
+ },
1380
+ noWrap: {
1381
+ "true": {
1382
+ whiteSpace: 'nowrap'
1383
+ }
1384
+ },
1385
+ ml: {
1386
+ 2: {
1387
+ marginLeft: '$2'
1388
+ },
1389
+ 4: {
1390
+ marginLeft: '$4'
1391
+ },
1392
+ 8: {
1393
+ marginLeft: '$8'
1394
+ },
1395
+ 12: {
1396
+ marginLeft: '$12'
1397
+ }
1398
+ },
1399
+ mt: {
1400
+ 2: {
1401
+ marginTop: '$2'
1402
+ },
1403
+ 4: {
1404
+ marginTop: '$4'
1405
+ },
1406
+ 8: {
1407
+ marginTop: '$8'
1408
+ },
1409
+ 12: {
1410
+ marginTop: '$12'
1411
+ }
1412
+ },
1413
+ mr: {
1414
+ 2: {
1415
+ marginRight: '$2'
1416
+ },
1417
+ 4: {
1418
+ marginRight: '$4'
1419
+ },
1420
+ 8: {
1421
+ marginRight: '$8'
1422
+ },
1423
+ 12: {
1424
+ marginRight: '$12'
1425
+ }
1426
+ },
1427
+ mb: {
1428
+ 2: {
1429
+ marginBottom: '$2'
1430
+ },
1431
+ 4: {
1432
+ marginBottom: '$4'
1433
+ },
1434
+ 8: {
1435
+ marginBottom: '$8'
1436
+ },
1437
+ 12: {
1438
+ marginBottom: '$12'
1439
+ }
1440
+ }
1441
+ }
1442
+ });
1443
+ function Typography(_ref) {
1444
+ var children = _ref.children,
1445
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
1446
+ return React__default.createElement(TypographyContainer, Object.assign({
1447
+ className: "_typography"
1448
+ }, props), children);
1449
+ }
1450
+ Typography.toString = function () {
1451
+ return '._typography';
1452
+ };
1453
+
1454
+ var StepLogoContainer = /*#__PURE__*/styled('div', {
1455
+ position: 'relative',
1456
+ width: '$28',
1457
+ height: '$28',
1458
+ variants: {
1459
+ direction: {
1460
+ vertical: {
1461
+ margin: 'auto'
1462
+ },
1463
+ horizontal: {}
1464
+ }
1465
+ }
1466
+ });
1467
+ var Logo = /*#__PURE__*/styled('img', {
1468
+ width: '$28',
1469
+ height: '$28',
1470
+ borderRadius: '50%'
1471
+ });
1472
+ var ChainLogo = /*#__PURE__*/styled('img', {
1473
+ position: 'absolute',
1474
+ bottom: 0,
1475
+ width: '$12',
1476
+ height: '$12',
1477
+ right: 0
1478
+ });
1479
+ var StepContainer = /*#__PURE__*/styled('div', {
1480
+ display: 'flex',
1481
+ variants: {
1482
+ direction: {
1483
+ horizontal: {
1484
+ alignItems: 'center'
1485
+ },
1486
+ vertical: {
1487
+ flexDirection: 'column',
1488
+ textAlign: 'center',
1489
+ justifyContent: 'center'
1490
+ }
1491
+ }
1492
+ }
1493
+ });
1494
+ var Detail = /*#__PURE__*/styled('div', {
1495
+ variants: {
1496
+ pl: {
1497
+ "true": {
1498
+ paddingLeft: '$4',
1499
+ '@lg': {
1500
+ paddingLeft: '$8'
1501
+ }
1502
+ },
1503
+ "false": {
1504
+ paddingTop: '$8'
1505
+ }
1506
+ }
1507
+ }
1508
+ });
1509
+ var SubTitle = /*#__PURE__*/styled(Typography, {
1510
+ color: '$neutrals600'
1511
+ });
1512
+ function StepDetail(_ref) {
1513
+ var logo = _ref.logo,
1514
+ chainLogo = _ref.chainLogo,
1515
+ amount = _ref.amount,
1516
+ symbol = _ref.symbol,
1517
+ blockchain = _ref.blockchain,
1518
+ _ref$direction = _ref.direction,
1519
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
1520
+ return React__default.createElement(StepContainer, {
1521
+ direction: direction
1522
+ }, React__default.createElement(StepLogoContainer, {
1523
+ direction: direction
1524
+ }, React__default.createElement(Logo, {
1525
+ src: logo,
1526
+ alt: symbol
1527
+ }), React__default.createElement(ChainLogo, {
1528
+ src: chainLogo,
1529
+ alt: blockchain
1530
+ })), React__default.createElement(Detail, {
1531
+ pl: direction === 'horizontal'
1532
+ }, React__default.createElement(Typography, {
1533
+ noWrap: true,
1534
+ variant: direction === 'vertical' ? 'body2' : 'h6'
1535
+ }, parseFloat(amount).toFixed(2), " ", symbol), React__default.createElement(SubTitle, {
1536
+ noWrap: true,
1537
+ variant: "caption"
1538
+ }, "on ", blockchain)));
1539
+ }
1540
+
1541
+ var secondsToString = function secondsToString(s) {
1542
+ var minutes = parseInt((s / 60).toString()).toString();
1543
+ return "" + minutes;
1544
+ };
1545
+ var totalArrivalTime = function totalArrivalTime(data) {
1546
+ var _data$result, _data$result$swaps;
1547
+ return (data == null ? void 0 : (_data$result = data.result) == null ? void 0 : (_data$result$swaps = _data$result.swaps) == null ? void 0 : _data$result$swaps.reduce(function (a, b) {
1548
+ return a + b.estimatedTimeInSeconds;
1549
+ }, 0)) || 0;
1550
+ };
1551
+ var rawFees = function rawFees(data) {
1552
+ var _data$result2, _data$result2$swaps;
1553
+ return ((data == null ? void 0 : (_data$result2 = data.result) == null ? void 0 : (_data$result2$swaps = _data$result2.swaps) == null ? void 0 : _data$result2$swaps.flatMap(function (s) {
1554
+ return s.fee.map(function (f) {
1555
+ return {
1556
+ swapperId: s.swapperId,
1557
+ fee: f
1558
+ };
1559
+ });
1560
+ })) || []).reduce(function (partialSum, a) {
1561
+ return partialSum + parseFloat(a.fee.amount);
1562
+ }, 0).toFixed(3);
1563
+ };
1564
+ var decimalNumber = function decimalNumber(number, toFixed) {
1565
+ if (number === void 0) {
1566
+ number = '0';
1567
+ }
1568
+ return parseFloat(number).toFixed(toFixed);
1569
+ };
1570
+ var containsText = function containsText(text, searchText) {
1571
+ return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
1572
+ };
1573
+
1574
+ var waveSquares = /*#__PURE__*/keyframes({
1575
+ '0%': {
1576
+ backgroundPosition: '-468px 0'
1577
+ },
1578
+ '100%': {
1579
+ backgroundPosition: '468px 0'
1580
+ }
1581
+ });
1582
+ var SkeletonContainer = /*#__PURE__*/styled('div', {
1583
+ borderRadius: '$5',
1584
+ backgroundColor: '$neutrals300',
1585
+ background: "linear-gradient(to right, rgba(130, 130, 130, 0.2) 8%, rgba(130, 130, 130, 0.3) 18%, rgba(130, 130, 130, 0.2) 33%)",
1586
+ backgroundSize: '800px 100px',
1587
+ animation: waveSquares + " 2s infinite ease-out",
1588
+ variants: {
1589
+ width: {
1590
+ 16: {
1591
+ width: '$16'
1592
+ },
1593
+ 20: {
1594
+ width: '$20'
1595
+ },
1596
+ 24: {
1597
+ width: '$24'
1598
+ },
1599
+ 36: {
1600
+ width: '$36'
1601
+ },
1602
+ 48: {
1603
+ width: '$48'
1604
+ }
1605
+ },
1606
+ height: {
1607
+ 16: {
1608
+ height: '$16'
1609
+ },
1610
+ 20: {
1611
+ height: '$20'
1612
+ },
1613
+ 24: {
1614
+ height: '$24'
1615
+ },
1616
+ 36: {
1617
+ height: '$36'
1618
+ },
1619
+ 48: {
1620
+ height: '$48'
1621
+ },
1622
+ 94: {
1623
+ height: 94
1624
+ }
1625
+ }
1626
+ }
1627
+ });
1628
+ function Skeleton(_ref) {
1629
+ var _ref$width = _ref.width,
1630
+ width = _ref$width === void 0 ? 20 : _ref$width,
1631
+ _ref$height = _ref.height,
1632
+ height = _ref$height === void 0 ? 20 : _ref$height;
1633
+ return React__default.createElement(SkeletonContainer, {
1634
+ width: width,
1635
+ height: height
1636
+ });
1637
+ }
1638
+
1639
+ var spin = /*#__PURE__*/keyframes({
1640
+ '100%': {
1641
+ transform: 'rotate(360deg)'
1642
+ }
1643
+ });
1644
+ var SpinnerContainer = /*#__PURE__*/styled('div', {
1645
+ borderRadius: '50%',
1646
+ position: 'relative',
1647
+ border: "2px solid $neutrals300",
1648
+ borderRight: "2px solid",
1649
+ animation: spin + " 1.5s linear infinite",
1650
+ margin: "0px $8",
1651
+ variants: {
1652
+ color: {
1653
+ primary: {
1654
+ borderRightColor: '$primary'
1655
+ },
1656
+ error: {
1657
+ borderRightColor: '$error'
1658
+ },
1659
+ warning: {
1660
+ borderRightColor: '$warning'
1661
+ },
1662
+ success: {
1663
+ borderRightColor: '$success'
1664
+ },
1665
+ black: {
1666
+ borderRightColor: '$black'
1667
+ },
1668
+ white: {
1669
+ borderRightColor: '$white'
1670
+ }
1671
+ },
1672
+ size: {
1673
+ 16: {
1674
+ width: '$16',
1675
+ height: '$16'
1676
+ },
1677
+ 20: {
1678
+ width: '$20',
1679
+ height: '$20'
1680
+ },
1681
+ 24: {
1682
+ width: '$24',
1683
+ height: '$24'
1684
+ }
1685
+ }
1686
+ }
1687
+ });
1688
+ function Spinner(_ref) {
1689
+ var _ref$size = _ref.size,
1690
+ size = _ref$size === void 0 ? 16 : _ref$size,
1691
+ _ref$color = _ref.color,
1692
+ color = _ref$color === void 0 ? 'primary' : _ref$color;
1693
+ return React__default.createElement(SpinnerContainer, {
1694
+ size: size,
1695
+ color: color
1696
+ });
1697
+ }
1698
+
1699
+ var Container = /*#__PURE__*/styled('div', {
1700
+ borderRadius: '$5',
1701
+ border: '1px solid $neutrals300',
1702
+ display: 'flex',
1703
+ alignItems: 'center',
1704
+ minHeight: 126,
1705
+ justifyContent: 'space-between'
1706
+ });
1707
+ var ErrorMsg = /*#__PURE__*/styled(Typography, {
1708
+ color: '$error'
1709
+ });
1710
+ var BestRouteContainer = /*#__PURE__*/styled('div', {
1711
+ display: 'flex',
1712
+ alignItems: 'center',
1713
+ margin: '0 auto',
1714
+ overflowX: 'auto',
1715
+ overflowY: 'hidden',
1716
+ alignSelf: 'stretch',
1717
+ padding: '$4',
1718
+ '@md': {
1719
+ padding: '$8'
1720
+ }
1721
+ });
1722
+ var Line = /*#__PURE__*/styled('div', {
1723
+ height: '0',
1724
+ width: '$20',
1725
+ border: '1px dashed $foreground',
1726
+ borderRadius: 'inherit',
1727
+ '@lg': {
1728
+ width: '$32'
1729
+ }
1730
+ });
1731
+ var HR = /*#__PURE__*/styled('hr', {
1732
+ width: '100%',
1733
+ background: '$neutrals200',
1734
+ margin: '$8 0'
1735
+ });
1736
+ var SwapperLogo = /*#__PURE__*/styled('img', {
1737
+ width: '$16',
1738
+ height: '$16'
1739
+ });
1740
+ var RelativeContainer = /*#__PURE__*/styled('div', {
1741
+ position: 'relative'
1742
+ });
1743
+ var Dot = /*#__PURE__*/styled('div', {
1744
+ width: '$6',
1745
+ height: '$6',
1746
+ backgroundColor: '$foreground',
1747
+ position: 'absolute',
1748
+ top: '45%',
1749
+ right: -5,
1750
+ marginLeft: '$8',
1751
+ borderRadius: '50%',
1752
+ '@md': {
1753
+ width: '$8',
1754
+ height: '$8',
1755
+ right: -8,
1756
+ top: '45%'
1757
+ }
1758
+ });
1759
+ var ArrowRight = /*#__PURE__*/styled('div', {
1760
+ width: '0px',
1761
+ height: '0px',
1762
+ borderTop: '5px solid transparent',
1763
+ borderBottom: '5px solid transparent',
1764
+ borderLeft: '5px solid $foreground'
1765
+ });
1766
+ var GasContainer = /*#__PURE__*/styled('div', {
1767
+ backgroundColor: '$neutrals300',
1768
+ borderRadius: '5px',
1769
+ margin: '$4',
1770
+ display: 'flex',
1771
+ flexDirection: 'column',
1772
+ justifyContent: 'center',
1773
+ alignItems: 'center',
1774
+ padding: '$4',
1775
+ '@md': {
1776
+ padding: '$8',
1777
+ margin: '$8'
1778
+ }
1779
+ });
1780
+ var SkeletonContainer$1 = /*#__PURE__*/styled('div', {
1781
+ padding: '$4',
1782
+ '@md': {
1783
+ padding: '$8'
1784
+ }
1785
+ });
1786
+ var SwapperContainer = /*#__PURE__*/styled('div', {
1787
+ display: 'flex',
1788
+ justifyContent: 'center',
1789
+ alignItems: 'center'
1790
+ });
1791
+ function BestRoute(_ref) {
1792
+ var _data$result;
1793
+ var data = _ref.data,
1794
+ loading = _ref.loading,
1795
+ error = _ref.error;
1796
+ var fee,
1797
+ time = '';
1798
+ if (!!data) {
1799
+ fee = rawFees(data);
1800
+ time = secondsToString(totalArrivalTime(data));
1801
+ }
1802
+ return React__default.createElement(Container, null, loading ? React__default.createElement(SkeletonContainer$1, null, React__default.createElement(Skeleton, {
1803
+ width: 48,
1804
+ height: 94
1805
+ })) : React__default.createElement(GasContainer, null, React__default.createElement(GasIcon, {
1806
+ size: 20
1807
+ }), React__default.createElement(Typography, {
1808
+ mt: 4,
1809
+ align: "center",
1810
+ variant: "caption"
1811
+ }, error && '-', !!data && "$" + fee), React__default.createElement(HR, null), React__default.createElement(TimeIcon, {
1812
+ size: 20
1813
+ }), React__default.createElement(Typography, {
1814
+ mt: 4,
1815
+ align: "center",
1816
+ variant: "caption"
1817
+ }, error && '-', !!data && "~" + time + "m")), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
1818
+ color: "primary"
1819
+ }), error && React__default.createElement(ErrorMsg, {
1820
+ variant: "caption"
1821
+ }, error), !!data && ((_data$result = data.result) == null ? void 0 : _data$result.swaps.map(function (swap, index) {
1822
+ var _data$result2;
1823
+ return React__default.createElement(React__default.Fragment, null, index === 0 && React__default.createElement(RelativeContainer, null, React__default.createElement(StepDetail, {
1824
+ direction: "vertical",
1825
+ logo: swap.from.logo,
1826
+ symbol: swap.from.symbol,
1827
+ chainLogo: swap.from.blockchainLogo,
1828
+ blockchain: swap.from.blockchain,
1829
+ amount: swap.fromAmount
1830
+ }), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(SwapperLogo, {
1831
+ src: swap.swapperLogo,
1832
+ alt: swap.swapperId
1833
+ }), React__default.createElement(Line, null)), index + 1 === ((_data$result2 = data.result) == null ? void 0 : _data$result2.swaps.length) && React__default.createElement(ArrowRight, null), React__default.createElement(StepDetail, {
1834
+ direction: "vertical",
1835
+ logo: swap.to.logo,
1836
+ symbol: swap.to.symbol,
1837
+ chainLogo: swap.to.blockchainLogo,
1838
+ blockchain: swap.to.blockchain,
1839
+ amount: swap.toAmount
1840
+ }));
1841
+ })), !!data && !(data != null && data.result) && React__default.createElement(Typography, {
1842
+ variant: "body2"
1843
+ }, "No routes found")));
1844
+ }
1845
+
1846
+ var containsText$1 = function containsText(text, searchText) {
1847
+ return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
1848
+ };
1849
+
1850
+ var _excluded$A = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
1851
+ var _ghost, _css, _css2, _css3, _css4;
1852
+ var ButtonContainer = /*#__PURE__*/styled('button', {
1853
+ borderRadius: '$5',
1854
+ fontSize: '$16',
1855
+ fontWeight: '$400',
1856
+ cursor: 'pointer',
1857
+ padding: '0 $12',
1858
+ display: 'flex',
1859
+ alignItems: 'center',
1860
+ justifyContent: 'center',
1861
+ variants: {
1862
+ align: {
1863
+ start: {
1864
+ display: 'flex',
1865
+ width: '100%'
1866
+ },
1867
+ grow: {
1868
+ display: 'flex',
1869
+ width: '100%'
1870
+ }
1871
+ },
1872
+ size: {
1873
+ small: {
1874
+ height: '$32'
1875
+ },
1876
+ medium: {
1877
+ height: '$40'
1878
+ },
1879
+ large: {
1880
+ height: '$48'
1881
+ }
1882
+ },
1883
+ variant: {
1884
+ contained: {
1885
+ backgroundColor: '$neutrals300',
1886
+ color: '$foreground',
1887
+ border: 0,
1888
+ '&:hover': {
1889
+ backgroundColor: '$neutrals200',
1890
+ color: '$foreground'
1891
+ },
1892
+ '&:disabled': {
1893
+ background: '$neutrals400 !important'
1894
+ }
1895
+ },
1896
+ outlined: {
1897
+ backgroundColor: '$background !important',
1898
+ borderColor: '$neutrals400 !important',
1899
+ color: '$foreground',
1900
+ '&:hover': {
1901
+ borderColor: '$neutrals600 !important',
1902
+ color: '$neutrals500 !important'
1903
+ },
1904
+ '&:disabled': {
1905
+ borderColor: '$neutrals300 !important',
1906
+ color: '$neutrals400 !important'
1907
+ },
1908
+ background: 'transparent',
1909
+ border: 1,
1910
+ borderStyle: 'solid'
1911
+ },
1912
+ ghost: (_ghost = {
1913
+ color: '$foreground',
1914
+ '&:hover': {
1915
+ backgroundColor: '$neutrals200'
1916
+ },
1917
+ '&:disabled': {
1918
+ color: '$neutrals400 !important'
1919
+ },
1920
+ background: 'transparent',
1921
+ border: 0
1922
+ }, _ghost["& " + Typography] = {
1923
+ color: 'inherit'
1924
+ }, _ghost)
1925
+ },
1926
+ fullWidth: {
1927
+ "true": {
1928
+ width: '100%'
1929
+ }
1930
+ },
1931
+ loading: {
1932
+ "true": {}
1933
+ },
1934
+ type: {
1935
+ primary: {},
1936
+ error: {},
1937
+ warning: {},
1938
+ success: {}
1939
+ }
1940
+ },
1941
+ compoundVariants: [{
1942
+ type: 'primary',
1943
+ variant: 'contained',
1944
+ css: (_css = {
1945
+ background: '$primary',
1946
+ $$color: '$colors$background'
1947
+ }, _css["." + darkTheme + " &"] = {
1948
+ $$color: '$colors$foreground'
1949
+ }, _css.color = '$$color !important', _css['&:hover'] = {
1950
+ background: '$primary700'
1951
+ }, _css['&:visited'] = {
1952
+ background: '$primary900'
1953
+ }, _css['&:focus'] = {
1954
+ background: '$primary600'
1955
+ }, _css)
1956
+ }, {
1957
+ type: 'primary',
1958
+ variant: 'outlined',
1959
+ css: {
1960
+ color: '$primary !important',
1961
+ borderColor: '$primary !important',
1962
+ '&:hover': {
1963
+ color: '$primary700 !important',
1964
+ borderColor: '$primary700 !important'
1965
+ },
1966
+ '&:visited': {
1967
+ color: '$primary900 !important',
1968
+ borderColor: '$primary900 !important'
1969
+ },
1970
+ '&:focus': {
1971
+ color: '$primary600 !important',
1972
+ borderColor: '$primary600 !important'
1973
+ }
1974
+ }
1975
+ }, {
1976
+ type: 'primary',
1977
+ variant: 'ghost',
1978
+ css: {
1979
+ color: '$primary',
1980
+ '&:hover': {
1981
+ color: '$primary700'
1982
+ },
1983
+ '&:visited': {
1984
+ color: '$primary900'
1985
+ },
1986
+ '&:focus': {
1987
+ color: '$primary600'
1988
+ }
1989
+ }
1990
+ }, {
1991
+ type: 'error',
1992
+ variant: 'contained',
1993
+ css: (_css2 = {
1994
+ background: '$error',
1995
+ $$color: '$colors$background'
1996
+ }, _css2["." + darkTheme + " &"] = {
1997
+ $$color: '$colors$foreground'
1998
+ }, _css2.color = '$$color !important', _css2['&:hover'] = {
1999
+ background: '$error300'
2000
+ }, _css2['&:visited'] = {
2001
+ background: '$error700'
2002
+ }, _css2['&:focus'] = {
2003
+ background: '$error700'
2004
+ }, _css2)
2005
+ }, {
2006
+ type: 'error',
2007
+ variant: 'outlined',
2008
+ css: {
2009
+ color: '$error !important',
2010
+ borderColor: '$error !important',
2011
+ '&:hover': {
2012
+ color: '$error300 !important',
2013
+ borderColor: '$error300 !important'
2014
+ },
2015
+ '&:visited': {
2016
+ color: '$error700 !important',
2017
+ borderColor: '$error700 !important'
2018
+ },
2019
+ '&:focus': {
2020
+ color: '$error700 !important',
2021
+ borderColor: '$error700 !important'
2022
+ }
2023
+ }
2024
+ }, {
2025
+ type: 'error',
2026
+ variant: 'ghost',
2027
+ css: {
2028
+ color: '$error',
2029
+ '&:hover': {
2030
+ color: '$error300'
2031
+ },
2032
+ '&:visited': {
2033
+ color: '$error700'
2034
+ },
2035
+ '&:focus': {
2036
+ color: '$error700'
2037
+ }
2038
+ }
2039
+ }, {
2040
+ type: 'warning',
2041
+ variant: 'contained',
2042
+ css: (_css3 = {
2043
+ background: '$warning',
2044
+ $$color: '$colors$background'
2045
+ }, _css3["." + darkTheme + " &"] = {
2046
+ $$color: '$colors$foreground'
2047
+ }, _css3.color = '$$color !important', _css3['&:hover'] = {
2048
+ background: '$warning300'
2049
+ }, _css3['&:visited'] = {
2050
+ background: '$warning700'
2051
+ }, _css3['&:focus'] = {
2052
+ background: '$warning700'
2053
+ }, _css3)
2054
+ }, {
2055
+ type: 'warning',
2056
+ variant: 'outlined',
2057
+ css: {
2058
+ color: '$warning !important',
2059
+ borderColor: '$warning !important',
2060
+ '&:hover': {
2061
+ color: '$warning300 !important',
2062
+ borderColor: '$warning300 !important'
2063
+ },
2064
+ '&:visited': {
2065
+ color: '$warning700 !important',
2066
+ borderColor: '$warning700 !important'
2067
+ },
2068
+ '&:focus': {
2069
+ color: '$warning700 !important',
2070
+ borderColor: '$warning700 !important'
2071
+ }
2072
+ }
2073
+ }, {
2074
+ type: 'warning',
2075
+ variant: 'ghost',
2076
+ css: {
2077
+ color: '$warning',
2078
+ '&:hover': {
2079
+ color: '$warning300'
2080
+ },
2081
+ '&:visited': {
2082
+ color: '$warning700'
2083
+ },
2084
+ '&:focus': {
2085
+ color: '$warning700'
2086
+ }
2087
+ }
2088
+ }, {
2089
+ type: 'success',
2090
+ variant: 'contained',
2091
+ css: (_css4 = {
2092
+ background: '$success',
2093
+ $$color: '$colors$background'
2094
+ }, _css4["." + darkTheme + " &"] = {
2095
+ $$color: '$colors$foreground'
2096
+ }, _css4.color = '$$color !important', _css4['&:hover'] = {
2097
+ background: '$success300'
2098
+ }, _css4['&:visited'] = {
2099
+ background: '$success700'
2100
+ }, _css4['&:focus'] = {
2101
+ background: '$success700'
2102
+ }, _css4)
2103
+ }, {
2104
+ type: 'success',
2105
+ variant: 'outlined',
2106
+ css: {
2107
+ color: '$success !important',
2108
+ borderColor: '$success !important',
2109
+ '&:hover': {
2110
+ color: '$success300 !important',
2111
+ borderColor: '$success300 !important'
2112
+ },
2113
+ '&:visited': {
2114
+ color: '$success700 !important',
2115
+ borderColor: '$success700 !important'
2116
+ },
2117
+ '&:focus': {
2118
+ color: '$success700 !important',
2119
+ borderColor: '$success700 !important'
2120
+ }
2121
+ }
2122
+ }, {
2123
+ type: 'success',
2124
+ variant: 'ghost',
2125
+ css: {
2126
+ color: '$success',
2127
+ '&:hover': {
2128
+ color: '$success300'
2129
+ },
2130
+ '&:visited': {
2131
+ color: '$success700'
2132
+ },
2133
+ '&:focus': {
2134
+ color: '$success700'
2135
+ }
2136
+ }
2137
+ }],
2138
+ defaultVariants: {
2139
+ size: 'medium',
2140
+ variant: 'contained'
2141
+ }
2142
+ });
2143
+ var Content = /*#__PURE__*/styled('div', {
2144
+ flex: 1,
2145
+ variants: {
2146
+ align: {
2147
+ start: {
2148
+ textAlign: 'left'
2149
+ },
2150
+ grow: {
2151
+ textAlign: 'center'
2152
+ }
2153
+ },
2154
+ ml: {
2155
+ "true": {
2156
+ marginLeft: '$8'
2157
+ }
2158
+ },
2159
+ mr: {
2160
+ "true": {
2161
+ marginRight: '$8'
2162
+ }
2163
+ },
2164
+ flexContent: {
2165
+ "true": {
2166
+ display: 'flex',
2167
+ alignItems: 'center'
2168
+ }
2169
+ }
2170
+ }
2171
+ });
2172
+ function Button(_ref) {
2173
+ var children = _ref.children,
2174
+ loading = _ref.loading,
2175
+ disabled = _ref.disabled,
2176
+ prefix = _ref.prefix,
2177
+ suffix = _ref.suffix,
2178
+ align = _ref.align,
2179
+ flexContent = _ref.flexContent,
2180
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
2181
+ var isDisabled = loading || disabled;
2182
+ return React__default.createElement(ButtonContainer, Object.assign({
2183
+ disabled: isDisabled
2184
+ }, props, {
2185
+ align: align
2186
+ }), prefix, children && React__default.createElement(Content, {
2187
+ align: align,
2188
+ ml: !!prefix,
2189
+ mr: !!suffix && !loading,
2190
+ flexContent: flexContent
2191
+ }, children), loading && React__default.createElement(Spinner, {
2192
+ size: 16,
2193
+ color: props.type
2194
+ }), suffix);
2195
+ }
2196
+
2197
+ var FilledCircle = /*#__PURE__*/styled('span', {
2198
+ width: '10px',
2199
+ height: '10px',
2200
+ backgroundColor: '$primary500',
2201
+ borderRadius: '99999px'
2202
+ });
2203
+
2204
+ var ListContainer = /*#__PURE__*/styled('div', {
2205
+ display: 'grid',
2206
+ gap: '.5rem',
2207
+ gridTemplateColumns: ' repeat(2, minmax(0, 1fr))',
2208
+ alignContent: 'baseline',
2209
+ width: '100%',
2210
+ height: '100%'
2211
+ });
2212
+ var Image = /*#__PURE__*/styled('img', {
2213
+ width: '1.5rem',
2214
+ maxHeight: '1.5rem',
2215
+ marginRight: '$4'
2216
+ });
2217
+ function BlockchainsList(props) {
2218
+ var list = props.list,
2219
+ onChange = props.onChange;
2220
+ var _useState = useState(props.selected),
2221
+ selected = _useState[0],
2222
+ setSelected = _useState[1];
2223
+ var changeSelectedBlockchain = function changeSelectedBlockchain(blockchain) {
2224
+ setSelected(blockchain);
2225
+ onChange(blockchain);
2226
+ };
2227
+ return React__default.createElement(ListContainer, null, list.map(function (blockchain, index) {
2228
+ return React__default.createElement(Button, {
2229
+ type: blockchain.name === (selected == null ? void 0 : selected.name) ? 'primary' : undefined,
2230
+ variant: "outlined",
2231
+ size: "large",
2232
+ prefix: React__default.createElement(Image, {
2233
+ src: blockchain.logo
2234
+ }),
2235
+ suffix: blockchain.name === (selected == null ? void 0 : selected.name) ? React__default.createElement(FilledCircle, null) : undefined,
2236
+ align: "start",
2237
+ onClick: changeSelectedBlockchain.bind(null, blockchain),
2238
+ key: index
2239
+ }, React__default.createElement(Typography, {
2240
+ variant: "body2"
2241
+ }, blockchain.displayName));
2242
+ }));
2243
+ }
2244
+
2245
+ var _excluded$B = ["label", "prefix", "suffix", "children", "size", "style"];
2246
+ var InputContainer = /*#__PURE__*/styled('div', {
2247
+ backgroundColor: '$background',
2248
+ boxSizing: 'border-box',
2249
+ border: '1px solid $neutrals400',
2250
+ borderRadius: '$5',
2251
+ height: '$48',
2252
+ display: 'flex',
2253
+ flexGrow: 1,
2254
+ position: 'relative',
2255
+ alignItems: 'center',
2256
+ color: '$foreground',
2257
+ transition: 'border-color ease .3s',
2258
+ '&:focus-within': {
2259
+ borderColor: '$primary500'
2260
+ },
2261
+ variants: {
2262
+ size: {
2263
+ small: {
2264
+ height: '$32'
2265
+ },
2266
+ medium: {
2267
+ height: '$40'
2268
+ },
2269
+ large: {
2270
+ height: '$48'
2271
+ }
2272
+ },
2273
+ disabled: {
2274
+ "true": {
2275
+ backgroundColor: '$neutrals300',
2276
+ cursor: 'not-allowed',
2277
+ filter: 'grayscale(100%)'
2278
+ }
2279
+ },
2280
+ prefix: {
2281
+ "true": {
2282
+ paddingLeft: '$16'
2283
+ },
2284
+ "false": {
2285
+ paddingLeft: '$0'
2286
+ }
2287
+ },
2288
+ suffix: {
2289
+ "true": {
2290
+ paddingRight: '$16'
2291
+ },
2292
+ "false": {
2293
+ paddingRight: '$0'
2294
+ }
2295
+ }
2296
+ },
2297
+ defaultVariants: {
2298
+ size: 'medium'
2299
+ }
2300
+ });
2301
+ var Input = /*#__PURE__*/styled('input', {
2302
+ color: '$text',
2303
+ paddingLeft: '$16',
2304
+ paddingRight: '$16',
2305
+ flexGrow: 1,
2306
+ width: '100%',
2307
+ border: 'none',
2308
+ borderRadius: '$5',
2309
+ outline: 'none',
2310
+ fontSize: '$l',
2311
+ backgroundColor: 'transparent',
2312
+ '-webkit-appearance': 'none',
2313
+ margin: 0,
2314
+ '&:disabled': {
2315
+ cursor: 'not-allowed'
2316
+ }
2317
+ });
2318
+ var Label = /*#__PURE__*/styled('label', {
2319
+ display: 'inline-block',
2320
+ fontSize: '$16',
2321
+ marginBottom: '$4'
2322
+ });
2323
+ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2324
+ var label = props.label,
2325
+ prefix = props.prefix,
2326
+ suffix = props.suffix,
2327
+ size = props.size,
2328
+ style = props.style,
2329
+ inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$B);
2330
+ return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({}, inputAttributes.id && {
2331
+ htmlFor: inputAttributes.id
2332
+ }), label), React__default.createElement(InputContainer, {
2333
+ disabled: inputAttributes.disabled,
2334
+ prefix: !!prefix,
2335
+ suffix: !!suffix,
2336
+ size: size,
2337
+ style: style
2338
+ }, prefix || null, React__default.createElement(Input, Object.assign({}, inputAttributes, {
2339
+ spellCheck: false,
2340
+ ref: ref
2341
+ })), suffix || null));
2342
+ });
2343
+
2344
+ var Container$1 = /*#__PURE__*/styled('div', {
2345
+ display: 'flex',
2346
+ flexDirection: 'column',
2347
+ height: '100%',
2348
+ width: '100%',
2349
+ padding: '$12 0',
2350
+ '@lg': {
2351
+ padding: '$16 0'
2352
+ }
2353
+ });
2354
+ var HeaderContainer = /*#__PURE__*/styled('div', {
2355
+ display: 'flex',
2356
+ justifyContent: 'center',
2357
+ alignItems: 'center',
2358
+ marginBottom: '$16',
2359
+ position: 'relative'
2360
+ });
2361
+ var BackIcon = /*#__PURE__*/styled(AngleLeftIcon, {
2362
+ position: 'absolute',
2363
+ left: '0'
2364
+ });
2365
+ var StyledBackIcon = /*#__PURE__*/styled(BackIcon, {
2366
+ cursor: 'pointer'
2367
+ });
2368
+ var ContentContainer = /*#__PURE__*/styled('div', {
2369
+ flex: '1',
2370
+ overflowY: 'auto',
2371
+ overflowX: 'hidden',
2372
+ marginTop: '$16'
2373
+ });
2374
+ function SecondaryPage(props) {
2375
+ var title = props.title,
2376
+ Footer = props.Footer,
2377
+ TopButton = props.TopButton,
2378
+ onBack = props.onBack,
2379
+ _props$hasHeader = props.hasHeader,
2380
+ hasHeader = _props$hasHeader === void 0 ? true : _props$hasHeader;
2381
+ var _useState = useState(''),
2382
+ searchedFor = _useState[0],
2383
+ setSearchedFor = _useState[1];
2384
+ return React__default.createElement(Container$1, null, hasHeader && React__default.createElement(HeaderContainer, null, React__default.createElement(StyledBackIcon, {
2385
+ size: 24,
2386
+ onClick: onBack
2387
+ }), React__default.createElement(Typography, {
2388
+ variant: "h4"
2389
+ }, title), TopButton), props.textField && React__default.createElement("div", null, React__default.createElement(TextField, {
2390
+ size: "large",
2391
+ prefix: React__default.createElement(SearchIcon, {
2392
+ size: 24
2393
+ }),
2394
+ placeholder: props.textFieldPlaceholder,
2395
+ onChange: function onChange(event) {
2396
+ return setSearchedFor(event.target.value);
2397
+ },
2398
+ value: searchedFor,
2399
+ autoFocus: true
2400
+ })), React__default.createElement(ContentContainer, null, props.textField && React__default.createElement(props.Content, {
2401
+ searchedFor: searchedFor
2402
+ }), !props.textField && props.Content), Footer);
2403
+ }
2404
+
2405
+ var MainContainer = /*#__PURE__*/styled('div', {
2406
+ display: 'flex',
2407
+ width: '100%',
2408
+ alignItems: 'center',
2409
+ padding: '$16',
2410
+ borderRadius: '$5',
2411
+ variants: {
2412
+ type: {
2413
+ primary: {
2414
+ backgroundColor: '$primary200'
2415
+ },
2416
+ secondary: {
2417
+ backgroundColor: '$neutrals400'
2418
+ },
2419
+ success: {
2420
+ backgroundColor: '$success300'
2421
+ },
2422
+ warning: {
2423
+ backgroundColor: '$warning300'
2424
+ },
2425
+ error: {
2426
+ backgroundColor: '$error300'
2427
+ }
2428
+ }
2429
+ }
2430
+ });
2431
+ var ContentContainer$1 = /*#__PURE__*/styled('div', {
2432
+ display: 'flex',
2433
+ flexDirection: 'column'
2434
+ });
2435
+ var TitleContainer = /*#__PURE__*/styled('div', {
2436
+ marginBottom: '$8'
2437
+ });
2438
+ var IconContainer = /*#__PURE__*/styled('div', {
2439
+ marginRight: '$24'
2440
+ });
2441
+ function Alert(props) {
2442
+ var type = props.type,
2443
+ description = props.description,
2444
+ title = props.title;
2445
+ var showIcon = ['error', 'success', 'warning'].includes(type);
2446
+ return React__default.createElement(MainContainer, {
2447
+ type: type
2448
+ }, showIcon && React__default.createElement(IconContainer, null, type === 'success' && React__default.createElement(CheckCircleIcon, {
2449
+ color: "success",
2450
+ size: 28
2451
+ }), type === 'warning' && React__default.createElement(WarningIcon, {
2452
+ size: 28
2453
+ }), type === 'error' && React__default.createElement(InfoCircleIcon, {
2454
+ color: "error",
2455
+ size: 28
2456
+ })), React__default.createElement(ContentContainer$1, null, title && React__default.createElement(TitleContainer, null, React__default.createElement(Typography, {
2457
+ variant: "h6"
2458
+ }, title)), React__default.createElement(Typography, {
2459
+ variant: "body2"
2460
+ }, description)));
2461
+ }
2462
+
2463
+ var ListContainer$1 = /*#__PURE__*/styled('div', {
2464
+ height: '450px',
2465
+ display: 'flex',
2466
+ justifyContent: 'center',
2467
+ alignItems: 'center'
2468
+ });
2469
+ var filterBlockchains = function filterBlockchains(list, searchedFor) {
2470
+ return list.filter(function (blockchain) {
2471
+ return containsText$1(blockchain.name, searchedFor) || containsText$1(blockchain.displayName, searchedFor);
2472
+ });
2473
+ };
2474
+ function BlockchainSelector(props) {
2475
+ var type = props.type,
2476
+ list = props.list,
2477
+ onChange = props.onChange,
2478
+ selected = props.selected,
2479
+ onBack = props.onBack,
2480
+ loadingStatus = props.loadingStatus,
2481
+ hasHeader = props.hasHeader,
2482
+ listContainerStyle = props.listContainerStyle;
2483
+ return React__default.createElement(SecondaryPage, {
2484
+ textField: true,
2485
+ textFieldPlaceholder: "Search Blockchain By Name",
2486
+ title: "Select " + type + " Network",
2487
+ hasHeader: hasHeader,
2488
+ onBack: onBack,
2489
+ Content: function Content(_ref) {
2490
+ var searchedFor = _ref.searchedFor;
2491
+ var filteredBlockchains = filterBlockchains(list, searchedFor);
2492
+ return React__default.createElement(ListContainer$1, {
2493
+ style: listContainerStyle
2494
+ }, loadingStatus === 'loading' && React__default.createElement("div", null, React__default.createElement(Spinner, {
2495
+ size: 24
2496
+ })), loadingStatus === 'failed' && React__default.createElement(Alert, {
2497
+ type: "error",
2498
+ description: "Error connecting server, please reload the app and try again"
2499
+ }), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length > 0 ? React__default.createElement(BlockchainsList, {
2500
+ list: filteredBlockchains,
2501
+ selected: selected,
2502
+ onChange: onChange
2503
+ }) : React__default.createElement(Alert, {
2504
+ type: "secondary",
2505
+ description: searchedFor + " not found"
2506
+ })));
2507
+ }
2508
+ });
2509
+ }
2510
+
2511
+ var _excluded$C = ["label", "id"];
2512
+ var CheckboxContainer = /*#__PURE__*/styled('div', {
2513
+ display: 'flex',
2514
+ alignItems: 'center'
2515
+ });
2516
+ var CheckboxRoot = /*#__PURE__*/styled(Root, {
2517
+ borderRadius: '5px',
2518
+ width: 20,
2519
+ padding: 0,
2520
+ height: 20,
2521
+ border: '1px solid',
2522
+ display: 'flex',
2523
+ alignItems: 'center',
2524
+ justifyContent: 'center',
2525
+ marginRight: '$2',
2526
+ backgroundColor: '$neutral-100'
2527
+ });
2528
+ var Label$1 = /*#__PURE__*/styled('label', {
2529
+ color: '$text',
2530
+ fontSize: '$m',
2531
+ marginLeft: '$8'
2532
+ });
2533
+ function Checkbox(_ref) {
2534
+ var label = _ref.label,
2535
+ id = _ref.id,
2536
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
2537
+ return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
2538
+ id: id
2539
+ }, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
2540
+ size: 20
2541
+ }))), React__default.createElement(Label$1, {
2542
+ htmlFor: id
2543
+ }, label, " "));
2544
+ }
2545
+
2546
+ var ChipCointainer = /*#__PURE__*/styled('div', {
2547
+ display: 'inline-flex',
2548
+ justifyContent: 'center',
2549
+ alignItems: 'center',
2550
+ borderRadius: '$5',
2551
+ padding: '$4 $8',
2552
+ height: '32',
2553
+ fontSize: '$14',
2554
+ cursor: 'pointer',
2555
+ '&:hover': {
2556
+ backgroundColor: '$neutrals300'
2557
+ },
2558
+ variants: {
2559
+ selected: {
2560
+ "true": {
2561
+ backgroundColor: '$neutrals400'
2562
+ },
2563
+ "false": {
2564
+ backgroundColor: '$background'
2565
+ }
2566
+ }
2567
+ }
2568
+ });
2569
+ function Chip(props) {
2570
+ var label = props.label,
2571
+ selected = props.selected,
2572
+ prefix = props.prefix,
2573
+ suffix = props.suffix,
2574
+ onClick = props.onClick,
2575
+ style = props.style;
2576
+ return React__default.createElement(ChipCointainer, {
2577
+ selected: selected,
2578
+ onClick: onClick,
2579
+ style: style
2580
+ }, prefix || null, React__default.createElement(Typography, {
2581
+ variant: "body2"
2582
+ }, label), suffix || null);
2583
+ }
2584
+
2585
+ var BackDrop = /*#__PURE__*/styled('div', {
2586
+ position: 'fixed',
2587
+ display: 'flex',
2588
+ justifyContent: 'center',
2589
+ alignItems: 'center',
2590
+ top: '0',
2591
+ left: '0',
2592
+ width: '100vw',
2593
+ height: '100vh',
2594
+ backgroundColor: 'rgba(0,0,0,.1)'
2595
+ });
2596
+ var ModalContainer = /*#__PURE__*/styled('div', {
2597
+ backgroundColor: '$background',
2598
+ borderRadius: '$10',
2599
+ padding: '$16 $16',
2600
+ display: 'flex',
2601
+ flexDirection: 'column',
2602
+ boxShadow: '$s'
2603
+ });
2604
+ var ModalHeader = /*#__PURE__*/styled('div', {
2605
+ display: 'flex',
2606
+ justifyContent: 'space-between',
2607
+ alignItems: 'center',
2608
+ position: 'relative',
2609
+ marginBottom: '$16'
2610
+ });
2611
+ var ContentContainer$2 = /*#__PURE__*/styled('div', {
2612
+ overflowY: 'scroll'
2613
+ });
2614
+ function Modal(props) {
2615
+ var title = props.title,
2616
+ content = props.content,
2617
+ open = props.open,
2618
+ onClose = props.onClose,
2619
+ containerStyle = props.containerStyle,
2620
+ contentStyle = props.contentStyle;
2621
+ var handleBackDropClick = function handleBackDropClick(event) {
2622
+ if (event.target === event.currentTarget) onClose();
2623
+ };
2624
+ return React__default.createElement(React__default.Fragment, null, open && createPortal(React__default.createElement(BackDrop, {
2625
+ onClick: handleBackDropClick
2626
+ }, React__default.createElement(ModalContainer, {
2627
+ style: containerStyle
2628
+ }, React__default.createElement(ModalHeader, null, React__default.createElement(Typography, {
2629
+ variant: "h4"
2630
+ }, title), React__default.createElement(CloseIcon, {
2631
+ size: 24,
2632
+ onClick: onClose
2633
+ })), React__default.createElement(ContentContainer$2, {
2634
+ style: contentStyle
2635
+ }, content))), document.body));
2636
+ }
2637
+
2638
+ var WalletState;
2639
+ (function (WalletState) {
2640
+ WalletState["NOT_INSTALLED"] = "not installed";
2641
+ WalletState["DISCONNECTED"] = "disconnected";
2642
+ WalletState["CONNECTING"] = "connecting";
2643
+ WalletState["CONNECTED"] = "connected";
2644
+ })(WalletState || (WalletState = {}));
2645
+
2646
+ var StateIconContainer = /*#__PURE__*/styled('span', {
2647
+ width: '$28',
2648
+ display: 'flex',
2649
+ justifyContent: 'center',
2650
+ alignItems: 'center'
2651
+ });
2652
+ var State = function State(_ref) {
2653
+ var walletState = _ref.walletState,
2654
+ installLink = _ref.installLink;
2655
+ return React__default.createElement(Fragment, null, walletState !== WalletState.DISCONNECTED && React__default.createElement(StateIconContainer, null, walletState === WalletState.NOT_INSTALLED && React__default.createElement("a", {
2656
+ href: detectInstallLink(installLink),
2657
+ target: "_blank"
2658
+ }, React__default.createElement(DownloadIcon, {
2659
+ size: 24,
2660
+ color: "success"
2661
+ })), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(FilledCircle, null)));
2662
+ };
2663
+
2664
+ var WalletImage = /*#__PURE__*/styled('img', {
2665
+ width: '$24',
2666
+ height: '$24',
2667
+ marginRight: '$12'
2668
+ });
2669
+ function Wallet(props) {
2670
+ var name = props.name,
2671
+ type = props.type,
2672
+ image = props.image,
2673
+ state = props.state,
2674
+ _onClick = props.onClick,
2675
+ installLink = props.installLink;
2676
+ return React__default.createElement(Button, {
2677
+ type: state === WalletState.CONNECTED ? 'primary' : undefined,
2678
+ disabled: !state,
2679
+ onClick: function onClick() {
2680
+ if (state === WalletState.NOT_INSTALLED) {
2681
+ window.open(detectInstallLink(installLink), '_blank');
2682
+ } else _onClick(type);
2683
+ },
2684
+ align: "start",
2685
+ variant: "outlined",
2686
+ size: "large",
2687
+ prefix: React__default.createElement(WalletImage, {
2688
+ src: image
2689
+ }),
2690
+ suffix: React__default.createElement(State, {
2691
+ walletState: state,
2692
+ installLink: installLink
2693
+ })
2694
+ }, React__default.createElement(Typography, {
2695
+ variant: "h5",
2696
+ noWrap: false
2697
+ }, name));
2698
+ }
2699
+
2700
+ var ModalContent = /*#__PURE__*/styled('div', {
2701
+ display: 'grid',
2702
+ gap: '$8',
2703
+ gridTemplateColumns: 'repeat(2, minmax(0, 1fr))'
2704
+ });
2705
+ function ConnectWalletsModal(props) {
2706
+ var open = props.open,
2707
+ list = props.list,
2708
+ onSelect = props.onSelect,
2709
+ onClose = props.onClose;
2710
+ var Content = React__default.createElement(ModalContent, null, list.map(function (info, index) {
2711
+ return React__default.createElement(Wallet, Object.assign({}, info, {
2712
+ key: index,
2713
+ onClick: onSelect
2714
+ }));
2715
+ }));
2716
+ return React__default.createElement(Modal, {
2717
+ title: "Connect Wallets",
2718
+ open: open,
2719
+ content: Content,
2720
+ onClose: onClose,
2721
+ containerStyle: {
2722
+ width: '75%',
2723
+ maxWidth: '30rem',
2724
+ height: '70%'
2725
+ }
2726
+ });
2727
+ }
2728
+
2729
+ var SpacerContainer = /*#__PURE__*/styled('div', {
2730
+ variants: {
2731
+ size: {
2732
+ 12: {},
2733
+ 16: {},
2734
+ 18: {},
2735
+ 20: {},
2736
+ 24: {}
2737
+ },
2738
+ direction: {
2739
+ vertical: {},
2740
+ horizontal: {}
2741
+ }
2742
+ },
2743
+ compoundVariants: [{
2744
+ size: 12,
2745
+ direction: 'horizontal',
2746
+ css: {
2747
+ width: '$12'
2748
+ }
2749
+ }, {
2750
+ size: 12,
2751
+ direction: 'vertical',
2752
+ css: {
2753
+ height: '$12'
2754
+ }
2755
+ }, {
2756
+ size: 16,
2757
+ direction: 'horizontal',
2758
+ css: {
2759
+ width: '$16'
2760
+ }
2761
+ }, {
2762
+ size: 16,
2763
+ direction: 'vertical',
2764
+ css: {
2765
+ height: '$16'
2766
+ }
2767
+ }, {
2768
+ size: 18,
2769
+ direction: 'horizontal',
2770
+ css: {
2771
+ width: '$18'
2772
+ }
2773
+ }, {
2774
+ size: 18,
2775
+ direction: 'vertical',
2776
+ css: {
2777
+ height: '$18'
2778
+ }
2779
+ }, {
2780
+ size: 20,
2781
+ direction: 'horizontal',
2782
+ css: {
2783
+ width: '$20'
2784
+ }
2785
+ }, {
2786
+ size: 20,
2787
+ direction: 'vertical',
2788
+ css: {
2789
+ height: '$20'
2790
+ }
2791
+ }, {
2792
+ size: 24,
2793
+ direction: 'horizontal',
2794
+ css: {
2795
+ width: '$24'
2796
+ }
2797
+ }, {
2798
+ size: 24,
2799
+ direction: 'vertical',
2800
+ css: {
2801
+ height: '$24'
2802
+ }
2803
+ }]
2804
+ });
2805
+ function Spacer(_ref) {
2806
+ var _ref$size = _ref.size,
2807
+ size = _ref$size === void 0 ? 12 : _ref$size,
2808
+ _ref$direction = _ref.direction,
2809
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
2810
+ return React__default.createElement(SpacerContainer, {
2811
+ size: size,
2812
+ direction: direction
2813
+ });
2814
+ }
2815
+
2816
+ var StyledSwitchRoot = /*#__PURE__*/styled(Root$1, {
2817
+ boxSizing: 'border-box',
2818
+ boxShadow: 'none',
2819
+ borderStyle: 'solid',
2820
+ width: '42px',
2821
+ height: '22px',
2822
+ backgroundColor: '$neutrals300',
2823
+ borderColor: '$neutrals400',
2824
+ borderRadius: '99999px',
2825
+ position: 'relative',
2826
+ cursor: 'pointer',
2827
+ '&[data-state="checked"]': {
2828
+ backgroundColor: '$primary100'
2829
+ },
2830
+ '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)'
2831
+ });
2832
+ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
2833
+ position: 'absolute',
2834
+ top: '0',
2835
+ boxSizing: 'border-box',
2836
+ display: 'block',
2837
+ width: '18px',
2838
+ height: '18px',
2839
+ backgroundColor: '$neutrals500',
2840
+ transition: ' transform 100ms',
2841
+ borderRadius: '999999px',
2842
+ willChange: 'transform',
2843
+ '&[data-state="checked"]': {
2844
+ transform: 'translateX(20px)',
2845
+ backgroundColor: '$primary500'
2846
+ }
2847
+ });
2848
+ function Switch(props) {
2849
+ var checked = props.checked,
2850
+ onChange = props.onChange;
2851
+ return React__default.createElement(StyledSwitchRoot, {
2852
+ checked: checked,
2853
+ onCheckedChange: onChange
2854
+ }, React__default.createElement(StyledSwitchThumb, null));
2855
+ }
2856
+
2857
+ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
2858
+ return {
2859
+ bridge: liquiditySources.filter(function (liquiditySource) {
2860
+ return liquiditySource.type === 'BRIDGE' || liquiditySource.type === 'AGGREGATOR';
2861
+ }),
2862
+ exchange: liquiditySources.filter(function (liquiditySource) {
2863
+ return liquiditySource.type === 'DEX';
2864
+ })
2865
+ };
2866
+ };
2867
+ var LiquiditySourceType = /*#__PURE__*/styled(Typography, {
2868
+ position: 'sticky',
2869
+ top: '0',
2870
+ marginTop: '$8',
2871
+ marginBottom: '$8',
2872
+ backgroundColor: '$background',
2873
+ zIndex: '9999',
2874
+ paddingTop: '$8',
2875
+ paddingBottom: '$8'
2876
+ });
2877
+ var LiquidityImage = /*#__PURE__*/styled('img', {
2878
+ width: '$20',
2879
+ maxHeight: '$20',
2880
+ marginRight: '$16'
2881
+ });
2882
+ function LiquiditySourceList(props) {
2883
+ var list = props.list,
2884
+ onChange = props.onChange,
2885
+ listContainerStyle = props.listContainerStyle;
2886
+ var _useState = useState(list.filter(function (item) {
2887
+ return item.selected;
2888
+ })),
2889
+ selected = _useState[0],
2890
+ setSelected = _useState[1];
2891
+ var changeLiquiditySources = function changeLiquiditySources(clickedItem) {
2892
+ clickedItem.selected = !clickedItem.selected;
2893
+ setSelected(function (prevState) {
2894
+ if (clickedItem.selected) return [].concat(prevState, [clickedItem]);
2895
+ return prevState.filter(function (item) {
2896
+ return item.title != clickedItem.title;
2897
+ });
2898
+ });
2899
+ onChange(clickedItem);
2900
+ };
2901
+ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
2902
+ var liquiditySource = _ref.liquiditySource,
2903
+ selected = _ref.selected;
2904
+ return React__default.createElement(Button, {
2905
+ size: "large",
2906
+ align: "start",
2907
+ variant: "outlined",
2908
+ prefix: React__default.createElement(LiquidityImage, {
2909
+ src: liquiditySource.logo
2910
+ }),
2911
+ suffix: React__default.createElement(Switch, {
2912
+ checked: selected
2913
+ }),
2914
+ style: {
2915
+ marginBottom: '12px'
2916
+ },
2917
+ type: selected ? 'primary' : undefined,
2918
+ onClick: changeLiquiditySources.bind(null, liquiditySource)
2919
+ }, React__default.createElement(Typography, {
2920
+ variant: "body1"
2921
+ }, liquiditySource.title));
2922
+ };
2923
+ var isSelected = function isSelected(liquiditySource) {
2924
+ return !!selected.find(function (item) {
2925
+ return liquiditySource.title === item.title;
2926
+ });
2927
+ };
2928
+ return React__default.createElement("div", {
2929
+ style: _extends({
2930
+ height: '450px'
2931
+ }, listContainerStyle)
2932
+ }, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
2933
+ variant: "h5"
2934
+ }, "Bridges"), React__default.createElement(Spacer, {
2935
+ size: 16,
2936
+ direction: "vertical"
2937
+ }), groupLiquiditySources(list).bridge.map(function (liquiditySource, index) {
2938
+ return React__default.createElement(LiquiditySourceItem, {
2939
+ liquiditySource: liquiditySource,
2940
+ key: index,
2941
+ selected: isSelected(liquiditySource)
2942
+ });
2943
+ })), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, {
2944
+ variant: "h5"
2945
+ }, "Exchanges"), React__default.createElement(Spacer, {
2946
+ size: 16,
2947
+ direction: "vertical"
2948
+ }), groupLiquiditySources(list).exchange.map(function (liquiditySource, index) {
2949
+ return React__default.createElement(LiquiditySourceItem, {
2950
+ liquiditySource: liquiditySource,
2951
+ key: index,
2952
+ selected: isSelected(liquiditySource)
2953
+ });
2954
+ })));
2955
+ }
2956
+
2957
+ var filterLiquiditySources = function filterLiquiditySources(liquiditySources, searchedFor) {
2958
+ return liquiditySources.filter(function (liquiditySource) {
2959
+ return containsText$1(liquiditySource.title, searchedFor || '');
2960
+ });
2961
+ };
2962
+ var ActionButton = /*#__PURE__*/styled(Button, {
2963
+ position: 'absolute',
2964
+ right: 0
2965
+ });
2966
+ function LiquiditySourcesSelector(props) {
2967
+ var list = props.list,
2968
+ onChange = props.onChange,
2969
+ onBack = props.onBack,
2970
+ hasHeader = props.hasHeader,
2971
+ listContainerStyle = props.listContainerStyle,
2972
+ toggleAll = props.toggleAll;
2973
+ return React__default.createElement(SecondaryPage, {
2974
+ textField: true,
2975
+ textFieldPlaceholder: "Search By Name",
2976
+ title: "Liquidity Sources",
2977
+ TopButton: React__default.createElement(ActionButton, {
2978
+ variant: "ghost",
2979
+ type: "primary",
2980
+ onClick: toggleAll
2981
+ }, list.find(function (item) {
2982
+ return item.selected;
2983
+ }) ? 'Clear all' : 'Select all'),
2984
+ hasHeader: hasHeader,
2985
+ onBack: onBack,
2986
+ Content: function Content(_ref) {
2987
+ var searchedFor = _ref.searchedFor;
2988
+ return React__default.createElement(LiquiditySourceList, {
2989
+ listContainerStyle: listContainerStyle,
2990
+ list: filterLiquiditySources(list, searchedFor),
2991
+ onChange: onChange
2992
+ });
2993
+ }
2994
+ });
2995
+ }
2996
+
2997
+ var Row = /*#__PURE__*/styled('div', {
2998
+ display: 'flex',
2999
+ flexWrap: 'wrap'
3000
+ });
3001
+ var Circle = /*#__PURE__*/styled('div', {
3002
+ width: 12,
3003
+ height: 12,
3004
+ borderRadius: 6,
3005
+ border: '1px solid $neutrals400',
3006
+ position: 'absolute',
3007
+ top: 12,
3008
+ right: 12,
3009
+ variants: {
3010
+ checked: {
3011
+ "true": {
3012
+ borderColor: '$success'
3013
+ },
3014
+ "false": {
3015
+ borderColor: '$neutrals400'
3016
+ }
3017
+ }
3018
+ }
3019
+ });
3020
+ var SolidCircle = /*#__PURE__*/styled('div', {
3021
+ width: 6,
3022
+ margin: '20% auto',
3023
+ height: 6,
3024
+ borderRadius: 3,
3025
+ variants: {
3026
+ checked: {
3027
+ "true": {
3028
+ backgroundColor: '$success'
3029
+ },
3030
+ "false": {
3031
+ backgroundColor: '$neutrals400'
3032
+ }
3033
+ }
3034
+ }
3035
+ });
3036
+ var Container$2 = /*#__PURE__*/styled('div', {
3037
+ border: '1.5px solid',
3038
+ borderRadius: '$5',
3039
+ padding: '$12',
3040
+ flexBasis: 'calc(33.33% - 10px)',
3041
+ margin: 5,
3042
+ display: 'flex',
3043
+ flexDirection: 'column',
3044
+ justifyContent: 'space-between',
3045
+ width: 124,
3046
+ height: 92,
3047
+ cursor: 'pointer',
3048
+ position: 'relative',
3049
+ variants: {
3050
+ checked: {
3051
+ "true": {
3052
+ borderColor: '$success',
3053
+ color: '$success'
3054
+ },
3055
+ "false": {
3056
+ borderColor: '$neutrals400',
3057
+ color: '$neutrals400'
3058
+ }
3059
+ }
3060
+ }
3061
+ });
3062
+ function SelectableWalletList(_ref) {
3063
+ var _list$find;
3064
+ var list = _ref.list,
3065
+ onChange = _ref.onChange;
3066
+ var _useState = useState(((_list$find = list.find(function (item) {
3067
+ return item.selected;
3068
+ })) == null ? void 0 : _list$find.walletType) || ''),
3069
+ active = _useState[0],
3070
+ setActive = _useState[1];
3071
+ var onClick = function onClick(w) {
3072
+ setActive(w.walletType);
3073
+ onChange(w);
3074
+ };
3075
+ useEffect(function () {
3076
+ var _list$find2;
3077
+ setActive(((_list$find2 = list.find(function (item) {
3078
+ return item.selected;
3079
+ })) == null ? void 0 : _list$find2.walletType) || '');
3080
+ }, [list]);
3081
+ return React__default.createElement(Row, null, list.map(function (w, index) {
3082
+ var checked = active === w.walletType;
3083
+ return React__default.createElement(Container$2, {
3084
+ checked: checked,
3085
+ onClick: onClick.bind(null, w),
3086
+ key: index
3087
+ }, React__default.createElement("img", {
3088
+ src: w.image,
3089
+ alt: w.walletType,
3090
+ width: 24,
3091
+ height: 24
3092
+ }), React__default.createElement(Typography, {
3093
+ variant: "body2"
3094
+ }, w.walletType), React__default.createElement(Circle, {
3095
+ checked: checked
3096
+ }, React__default.createElement(SolidCircle, {
3097
+ checked: checked
3098
+ })));
3099
+ }));
3100
+ }
3101
+
3102
+ var StyledRoot = /*#__PURE__*/styled(Root$2, {
3103
+ variants: {
3104
+ direction: {
3105
+ horizontal: {
3106
+ display: 'flex',
3107
+ flexDirection: 'row',
3108
+ flexWrap: 'wrap'
3109
+ },
3110
+ vertical: {
3111
+ display: 'grid',
3112
+ gridGap: '$24'
3113
+ }
3114
+ }
3115
+ }
3116
+ });
3117
+ var ItemContainer = /*#__PURE__*/styled('div', {
3118
+ display: 'flex',
3119
+ alignItems: 'center',
3120
+ marginRight: '$24'
3121
+ });
3122
+ var StyledItem = /*#__PURE__*/styled(Item, {
3123
+ backgroundColor: '$neutrals300',
3124
+ width: '20px',
3125
+ height: '20px',
3126
+ borderRadius: '100%',
3127
+ border: 'none',
3128
+ cursor: 'pointer',
3129
+ '&:hover': {
3130
+ backgroundColor: '$neutrals400'
3131
+ }
3132
+ });
3133
+ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
3134
+ display: 'flex',
3135
+ alignItems: 'center',
3136
+ justifyContent: 'center',
3137
+ width: '100%',
3138
+ height: '100%',
3139
+ position: 'relative',
3140
+ '&::after': {
3141
+ content: '',
3142
+ display: 'block',
3143
+ width: '10px',
3144
+ height: '10px',
3145
+ borderRadius: '50%',
3146
+ backgroundColor: '$primary'
3147
+ }
3148
+ });
3149
+ var Label$2 = /*#__PURE__*/styled('label', {
3150
+ paddingLeft: '$16',
3151
+ cursor: 'pointer'
3152
+ });
3153
+ function Radio(props) {
3154
+ var defaultValue = props.defaultValue,
3155
+ onChange = props.onChange,
3156
+ _props$direction = props.direction,
3157
+ direction = _props$direction === void 0 ? 'vertical' : _props$direction,
3158
+ style = props.style;
3159
+ return React__default.createElement("form", null, React__default.createElement(StyledRoot, {
3160
+ onValueChange: onChange,
3161
+ defaultValue: defaultValue,
3162
+ direction: direction,
3163
+ style: style
3164
+ }, props.options.map(function (option) {
3165
+ return React__default.createElement(ItemContainer, null, React__default.createElement(StyledItem, {
3166
+ value: option.value,
3167
+ id: option.value
3168
+ }, React__default.createElement(StyledIndicator, null)), React__default.createElement(Label$2, {
3169
+ htmlFor: option.value
3170
+ }, React__default.createElement(Typography, {
3171
+ variant: "body2"
3172
+ }, option.label)));
3173
+ })));
3174
+ }
3175
+
3176
+ var BaseContainer = /*#__PURE__*/styled('div', {
3177
+ borderRadius: '$5',
3178
+ backgroundColor: '$neutrals200',
3179
+ padding: '$16'
3180
+ });
3181
+ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
3182
+ display: 'flex',
3183
+ flexWrap: 'wrap',
3184
+ marginTop: '$16'
3185
+ });
3186
+ var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
3187
+ display: 'flex',
3188
+ justifyContent: 'space-between',
3189
+ marginTop: '$32',
3190
+ cursor: 'pointer'
3191
+ });
3192
+ var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
3193
+ marginLeft: '8px'
3194
+ });
3195
+ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
3196
+ display: 'flex',
3197
+ alignItems: 'center',
3198
+ justifyContent: 'center'
3199
+ });
3200
+ var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
3201
+ marginTop: '$32'
3202
+ });
3203
+ function Settings(props) {
3204
+ var slippages = props.slippages,
3205
+ selectedLiquiditySources = props.selectedLiquiditySources,
3206
+ liquiditySources = props.liquiditySources,
3207
+ onSlippageChange = props.onSlippageChange,
3208
+ onLiquiditySourcesClick = props.onLiquiditySourcesClick,
3209
+ onBack = props.onBack,
3210
+ customSlippage = props.customSlippage,
3211
+ onCustomSlippageChange = props.onCustomSlippageChange,
3212
+ maxSlippage = props.maxSlippage,
3213
+ minSlippage = props.minSlippage,
3214
+ selectedTheme = props.selectedTheme,
3215
+ onThemeChange = props.onThemeChange;
3216
+ var _useState = useState(props.selectedSlippage),
3217
+ selectedSlippage = _useState[0],
3218
+ setSelectedSlippage = _useState[1];
3219
+ var changeSlippage = function changeSlippage(slippage) {
3220
+ setSelectedSlippage(slippage);
3221
+ onSlippageChange(slippage);
3222
+ };
3223
+ var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Typography, {
3224
+ variant: "body1"
3225
+ }, "Slippage tolerance per swap"), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
3226
+ return React__default.createElement(Chip, {
3227
+ key: index,
3228
+ onClick: function onClick() {
3229
+ if (customSlippage) onCustomSlippageChange(null);
3230
+ changeSlippage(slippage);
3231
+ },
3232
+ selected: !customSlippage && slippage === selectedSlippage,
3233
+ label: slippage.toString() + " %",
3234
+ style: {
3235
+ marginRight: '8px'
3236
+ }
3237
+ });
3238
+ }), React__default.createElement(TextField, {
3239
+ type: "number",
3240
+ value: customSlippage,
3241
+ onChange: function onChange(event) {
3242
+ var parsedValue = parseFloat(event.target.value);
3243
+ if (!parsedValue || parsedValue >= minSlippage && parsedValue <= maxSlippage) onCustomSlippageChange(parsedValue);
3244
+ },
3245
+ suffix: customSlippage && React__default.createElement(Typography, {
3246
+ variant: "body2"
3247
+ }, "%"),
3248
+ size: "small",
3249
+ placeholder: "Custom",
3250
+ style: {
3251
+ width: '128px',
3252
+ flexGrow: 'initial',
3253
+ borderColor: customSlippage ? '$success' : 'initial'
3254
+ }
3255
+ }))), React__default.createElement(ThemesContainer, null, React__default.createElement(Typography, {
3256
+ variant: "body2"
3257
+ }, "Theme"), React__default.createElement(Radio, {
3258
+ defaultValue: selectedTheme,
3259
+ options: [{
3260
+ value: 'dark',
3261
+ label: 'Dark'
3262
+ }, {
3263
+ value: 'light',
3264
+ label: 'Light'
3265
+ }, {
3266
+ value: 'auto',
3267
+ label: 'Auto'
3268
+ }],
3269
+ onChange: function onChange(value) {
3270
+ return onThemeChange(value);
3271
+ },
3272
+ direction: "horizontal",
3273
+ style: {
3274
+ marginTop: '$24'
3275
+ }
3276
+ })), React__default.createElement(LiquiditySourceContainer, {
3277
+ onClick: onLiquiditySourcesClick
3278
+ }, React__default.createElement(Typography, {
3279
+ variant: "body1"
3280
+ }, "Liquidity Sources"), React__default.createElement(LiquiditySourceNumber, {
3281
+ onClick: onLiquiditySourcesClick
3282
+ }, React__default.createElement(Typography, {
3283
+ variant: "body2"
3284
+ }, "( " + selectedLiquiditySources.length + " / " + liquiditySources.length + " )"), React__default.createElement(StyledAngleRight, null))));
3285
+ return React__default.createElement(SecondaryPage, {
3286
+ title: "Settings",
3287
+ textField: false,
3288
+ Content: PageContent,
3289
+ onBack: onBack
3290
+ });
3291
+ }
3292
+
3293
+ var MainContainer$1 = /*#__PURE__*/styled('div', {
3294
+ borderRadius: '$10',
3295
+ maxWidth: '512px',
3296
+ boxShadow: '$s',
3297
+ minWidth: '375px',
3298
+ width: '100%',
3299
+ backgroundColor: '$background',
3300
+ display: 'flex',
3301
+ flexDirection: 'column',
3302
+ alignItems: 'end',
3303
+ padding: '$16 $24'
3304
+ });
3305
+ var ContentContainer$3 = /*#__PURE__*/styled('div', {
3306
+ width: '100%'
3307
+ });
3308
+ function SwapContainer(props) {
3309
+ var children = props.children,
3310
+ style = props.style;
3311
+ return React__default.createElement(MainContainer$1, {
3312
+ style: style
3313
+ }, React__default.createElement(ContentContainer$3, null, children));
3314
+ }
3315
+
3316
+ var Container$3 = /*#__PURE__*/styled('div', {
3317
+ position: 'relative'
3318
+ });
3319
+ var ButtonContainer$1 = /*#__PURE__*/styled('div', {
3320
+ paddingTop: '$8'
3321
+ });
3322
+ var SwapContainer$1 = /*#__PURE__*/styled('div', {
3323
+ display: 'flex',
3324
+ justifyContent: 'space-between',
3325
+ '@md': {
3326
+ padding: '$12'
3327
+ },
3328
+ '&:hover': {
3329
+ borderColor: '$primary'
3330
+ },
3331
+ variants: {
3332
+ status: {
3333
+ failed: {
3334
+ borderColor: '$error'
3335
+ },
3336
+ running: {
3337
+ borderColor: '$neutrals400'
3338
+ },
3339
+ success: {
3340
+ borderColor: '$success'
3341
+ }
3342
+ }
3343
+ }
3344
+ });
3345
+ var Arrow = /*#__PURE__*/styled('div', {
3346
+ display: 'flex',
3347
+ justifyContent: 'center',
3348
+ alignItems: 'center'
3349
+ });
3350
+ var Line$1 = /*#__PURE__*/styled('div', {
3351
+ height: '0',
3352
+ width: '$20',
3353
+ border: '1px dashed $foreground',
3354
+ borderRadius: 'inherit',
3355
+ '@md': {
3356
+ width: '$36'
3357
+ },
3358
+ '@lg': {
3359
+ width: '$48'
3360
+ }
3361
+ });
3362
+ var Dot$1 = /*#__PURE__*/styled('div', {
3363
+ width: '$6',
3364
+ height: '$6',
3365
+ backgroundColor: '$foreground',
3366
+ borderRadius: '50%',
3367
+ '@lg': {
3368
+ width: '$8',
3369
+ height: '$8'
3370
+ }
3371
+ });
3372
+ var ArrowRight$1 = /*#__PURE__*/styled('div', {
3373
+ width: '0px',
3374
+ height: '0px',
3375
+ borderTop: '5px solid transparent',
3376
+ borderBottom: '5px solid transparent',
3377
+ borderLeft: '5px solid $foreground'
3378
+ });
3379
+ var StatusContainer = /*#__PURE__*/styled('div', {
3380
+ position: 'absolute',
3381
+ right: '-8px',
3382
+ top: '30%',
3383
+ background: '$background',
3384
+ borderRadius: '50%',
3385
+ display: 'flex',
3386
+ justifyContent: 'center',
3387
+ '@md': {
3388
+ top: '40%',
3389
+ right: '-8px'
3390
+ }
3391
+ });
3392
+ function SwapDetail(_ref) {
3393
+ var swap = _ref.swap,
3394
+ status = _ref.status,
3395
+ onClick = _ref.onClick;
3396
+ var firstStep = swap.steps[0];
3397
+ var lastStep = swap.steps[swap.steps.length - 1];
3398
+ return React__default.createElement(Container$3, {
3399
+ onClick: onClick.bind(null, swap.requestId)
3400
+ }, React__default.createElement(ButtonContainer$1, null, React__default.createElement(Button, {
3401
+ variant: "outlined",
3402
+ align: "grow",
3403
+ size: "large",
3404
+ type: status === 'failed' ? 'error' : status === 'success' ? 'success' : undefined
3405
+ }, React__default.createElement(SwapContainer$1, null, React__default.createElement(StepDetail, {
3406
+ logo: firstStep.fromLogo,
3407
+ symbol: firstStep.fromSymbol,
3408
+ chainLogo: firstStep.fromBlockchainLogo,
3409
+ blockchain: firstStep.fromBlockchain,
3410
+ amount: swap.inputAmount
3411
+ }), React__default.createElement(Arrow, null, React__default.createElement(Dot$1, null), React__default.createElement(Line$1, null), React__default.createElement(ArrowRight$1, null)), React__default.createElement(StepDetail, {
3412
+ logo: lastStep.fromLogo,
3413
+ symbol: lastStep.fromSymbol,
3414
+ chainLogo: lastStep.fromBlockchainLogo,
3415
+ blockchain: lastStep.fromBlockchain,
3416
+ amount: lastStep.outputAmount
3417
+ })))), React__default.createElement(StatusContainer, null, status === 'running' ? React__default.createElement(TryAgainIcon, {
3418
+ size: 16
3419
+ }) : status === 'failed' ? React__default.createElement(InfoCircleIcon, {
3420
+ size: 18,
3421
+ color: "error"
3422
+ }) : React__default.createElement(CheckCircleIcon, {
3423
+ size: 18,
3424
+ color: "success"
3425
+ })));
3426
+ }
3427
+
3428
+ function VirtualizedList(props) {
3429
+ var itemCount = props.itemCount,
3430
+ hasNextPage = props.hasNextPage,
3431
+ isNextPageLoading = props.isNextPageLoading,
3432
+ loadNextPage = props.loadNextPage,
3433
+ Item = props.Item,
3434
+ innerElementType = props.innerElementType,
3435
+ size = props.size;
3436
+ var listRef = useRef(null);
3437
+ var isItemLoaded = function isItemLoaded(index) {
3438
+ return !hasNextPage || index < itemCount;
3439
+ };
3440
+ return React__default.createElement(InfiniteLoader, {
3441
+ isItemLoaded: isItemLoaded,
3442
+ itemCount: hasNextPage ? itemCount + 1 : itemCount,
3443
+ loadMoreItems: isNextPageLoading ? function () {
3444
+ // do nothing
3445
+ } : loadNextPage,
3446
+ threshold: 1
3447
+ }, function (_ref) {
3448
+ var onItemsRendered = _ref.onItemsRendered;
3449
+ return React__default.createElement(AutoSizer, null, function (_ref2) {
3450
+ var width = _ref2.width,
3451
+ height = _ref2.height;
3452
+ return React__default.createElement(VariableSizeList, {
3453
+ innerElementType: innerElementType,
3454
+ ref: listRef,
3455
+ itemSize: function itemSize() {
3456
+ return size;
3457
+ },
3458
+ itemCount: itemCount,
3459
+ height: height,
3460
+ width: width,
3461
+ onItemsRendered: onItemsRendered
3462
+ }, function (_ref3) {
3463
+ var index = _ref3.index,
3464
+ style = _ref3.style;
3465
+ return isItemLoaded(index) ? React__default.createElement(Item, {
3466
+ index: index,
3467
+ style: style
3468
+ }) : null;
3469
+ });
3470
+ });
3471
+ });
3472
+ }
3473
+
3474
+ var _excluded$D = ["style"];
3475
+ var PAGE_SIZE = 20;
3476
+ var TokenImage = /*#__PURE__*/styled('img', {
3477
+ width: '$32',
3478
+ maxHeight: '$32',
3479
+ marginRight: '$16'
3480
+ });
3481
+ var TokenNameContainer = /*#__PURE__*/styled('div', {
3482
+ display: 'flex',
3483
+ flexDirection: 'column'
3484
+ });
3485
+ var TokenAmountContainer = /*#__PURE__*/styled('div', {
3486
+ display: 'flex',
3487
+ flexDirection: 'column',
3488
+ alignItems: 'flex-end'
3489
+ });
3490
+ var filterTokens = function filterTokens(list, searchedText, outputCount) {
3491
+ if (searchedText) return list.filter(function (token) {
3492
+ return containsText$1(token.symbol, searchedText) || containsText$1(token.address || '', searchedText) || containsText$1(token.name || '', searchedText);
3493
+ }).slice(0, outputCount);else return list.slice(0, outputCount);
3494
+ };
3495
+ function TokenList(props) {
3496
+ var list = props.list,
3497
+ searchedText = props.searchedText,
3498
+ onChange = props.onChange;
3499
+ var _useState = useState(props.selected),
3500
+ selected = _useState[0],
3501
+ setSelected = _useState[1];
3502
+ var changeSelected = function changeSelected(token) {
3503
+ setSelected(token);
3504
+ onChange(token);
3505
+ };
3506
+ var Token = function Token(_ref) {
3507
+ var _currentToken$balance;
3508
+ var filteredTokens = _ref.filteredTokens,
3509
+ index = _ref.index,
3510
+ style = _ref.style;
3511
+ var currentToken = filteredTokens[index];
3512
+ return React__default.createElement("div", {
3513
+ style: _extends({
3514
+ display: 'flex',
3515
+ alignItems: 'center',
3516
+ width: '100%'
3517
+ }, style, {
3518
+ height: '48px',
3519
+ top: parseFloat(style == null ? void 0 : style.top) + 0 + "px"
3520
+ })
3521
+ }, React__default.createElement(Button, {
3522
+ variant: "outlined",
3523
+ size: "large",
3524
+ align: "start",
3525
+ onClick: changeSelected.bind(null, currentToken),
3526
+ type: (selected == null ? void 0 : selected.symbol) === currentToken.symbol && (selected == null ? void 0 : selected.address) === currentToken.address ? 'primary' : undefined,
3527
+ prefix: React__default.createElement(TokenImage, {
3528
+ src: currentToken.image
3529
+ }),
3530
+ suffix: ((_currentToken$balance = currentToken.balance) == null ? void 0 : _currentToken$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
3531
+ variant: "body2"
3532
+ }, currentToken.balance.amount), React__default.createElement(Typography, {
3533
+ variant: "caption"
3534
+ }, currentToken.balance.usdValue + "$"))
3535
+ }, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
3536
+ variant: "body1"
3537
+ }, currentToken.symbol), React__default.createElement(Typography, {
3538
+ variant: "body2"
3539
+ }, currentToken.name))));
3540
+ };
3541
+ var _useState2 = useState(true),
3542
+ hasNextPage = _useState2[0],
3543
+ setHasNextPage = _useState2[1];
3544
+ var _useState3 = useState(false),
3545
+ isNextPageLoading = _useState3[0],
3546
+ setIsNextPageLoading = _useState3[1];
3547
+ var _useState4 = useState(list),
3548
+ filteredTokens = _useState4[0],
3549
+ setFilteredTokens = _useState4[1];
3550
+ var loadNextPage = function loadNextPage() {
3551
+ setIsNextPageLoading(true);
3552
+ setTimeout(function () {
3553
+ setIsNextPageLoading(false);
3554
+ setFilteredTokens(filterTokens(list, searchedText, filteredTokens.length + PAGE_SIZE));
3555
+ }, 0);
3556
+ };
3557
+ useEffect(function () {
3558
+ setFilteredTokens(filterTokens(list, searchedText, PAGE_SIZE));
3559
+ }, [searchedText]);
3560
+ useEffect(function () {
3561
+ setHasNextPage(filterTokens(list, searchedText).length > filterTokens.length);
3562
+ }, [filteredTokens.length]);
3563
+ var innerElementType = forwardRef(function (_ref2, ref) {
3564
+ var style = _ref2.style,
3565
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded$D);
3566
+ return React__default.createElement("div", Object.assign({
3567
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3568
+ ref: ref,
3569
+ style: _extends({}, style, {
3570
+ // eslint-disable-next-line react/prop-types
3571
+ height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
3572
+ })
3573
+ }, rest));
3574
+ });
3575
+ return React__default.createElement("div", {
3576
+ style: {
3577
+ height: '450px'
3578
+ }
3579
+ }, React__default.createElement(VirtualizedList, {
3580
+ Item: function Item(_ref3) {
3581
+ var index = _ref3.index,
3582
+ style = _ref3.style;
3583
+ return React__default.createElement(Token, {
3584
+ filteredTokens: filteredTokens,
3585
+ style: style,
3586
+ index: index
3587
+ });
3588
+ },
3589
+ hasNextPage: hasNextPage,
3590
+ isNextPageLoading: isNextPageLoading,
3591
+ itemCount: filteredTokens.length,
3592
+ loadNextPage: loadNextPage,
3593
+ innerElementType: innerElementType,
3594
+ size: 56
3595
+ }));
3596
+ }
3597
+
3598
+ function TokenSelector(props) {
3599
+ var list = props.list,
3600
+ type = props.type,
3601
+ selected = props.selected,
3602
+ onChange = props.onChange,
3603
+ onBack = props.onBack,
3604
+ hasHeader = props.hasHeader;
3605
+ return React__default.createElement(SecondaryPage, {
3606
+ textField: true,
3607
+ textFieldPlaceholder: "Search Blockchain By Name",
3608
+ title: "Select " + type + " Token",
3609
+ hasHeader: hasHeader,
3610
+ onBack: onBack,
3611
+ Content: function Content(_ref) {
3612
+ var searchedFor = _ref.searchedFor;
3613
+ return React__default.createElement(TokenList, {
3614
+ searchedText: searchedFor,
3615
+ list: list,
3616
+ selected: selected,
3617
+ onChange: onChange
3618
+ });
3619
+ }
3620
+ });
3621
+ }
3622
+
3623
+ var TooltipTrigger = /*#__PURE__*/styled(Trigger, {
3624
+ border: 0,
3625
+ padding: 0,
3626
+ backgroundColor: 'transparent'
3627
+ });
3628
+ var TooltipContent = /*#__PURE__*/styled(Content$1, {
3629
+ borderRadius: '$5',
3630
+ padding: '$4 $8',
3631
+ fontSize: '$14',
3632
+ animationDuration: '400ms',
3633
+ animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
3634
+ willChange: 'transform, opacity',
3635
+ variants: {
3636
+ color: {
3637
+ primary: {
3638
+ backgroundColor: '$primary',
3639
+ color: '$white'
3640
+ },
3641
+ error: {
3642
+ backgroundColor: '$error',
3643
+ color: '$white'
3644
+ },
3645
+ warning: {
3646
+ backgroundColor: '$warning',
3647
+ color: '$white'
3648
+ },
3649
+ success: {
3650
+ backgroundColor: '$success',
3651
+ color: '$white'
3652
+ },
3653
+ gray: {
3654
+ backgroundColor: '$neutrals300',
3655
+ color: '$black'
3656
+ },
3657
+ black: {
3658
+ backgroundColor: '$black',
3659
+ color: '$white'
3660
+ },
3661
+ white: {
3662
+ backgroundColor: '$white',
3663
+ color: '$black'
3664
+ }
3665
+ }
3666
+ }
3667
+ });
3668
+ var TooltipArrow = /*#__PURE__*/styled(Arrow$1, {
3669
+ variants: {
3670
+ color: {
3671
+ primary: {
3672
+ fill: '$primary'
3673
+ },
3674
+ error: {
3675
+ fill: '$error'
3676
+ },
3677
+ warning: {
3678
+ fill: '$warning'
3679
+ },
3680
+ success: {
3681
+ fill: '$success'
3682
+ },
3683
+ gray: {
3684
+ fill: '$neutrals300'
3685
+ },
3686
+ black: {
3687
+ fill: '$black'
3688
+ },
3689
+ white: {
3690
+ fill: '$white'
3691
+ }
3692
+ }
3693
+ }
3694
+ });
3695
+ function Tooltip(_ref) {
3696
+ var children = _ref.children,
3697
+ content = _ref.content,
3698
+ _ref$side = _ref.side,
3699
+ side = _ref$side === void 0 ? 'top' : _ref$side,
3700
+ _ref$color = _ref.color,
3701
+ color = _ref$color === void 0 ? 'gray' : _ref$color;
3702
+ return React__default.createElement(Provider, null, React__default.createElement(Root$3, null, React__default.createElement(TooltipTrigger, null, children), React__default.createElement(Portal, null, React__default.createElement(TooltipContent, {
3703
+ color: color,
3704
+ side: side,
3705
+ sideOffset: 5
3706
+ }, content, React__default.createElement(TooltipArrow, {
3707
+ color: color
3708
+ })))));
3709
+ }
3710
+
3711
+ var Line$2 = /*#__PURE__*/styled('div', {
3712
+ width: '0',
3713
+ marginLeft: '$12',
3714
+ height: '36px',
3715
+ border: '1px dashed $foreground',
3716
+ borderRadius: 'inherit'
3717
+ });
3718
+ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
3719
+ display: 'flex',
3720
+ alignItems: 'center',
3721
+ marginLeft: '6px'
3722
+ });
3723
+ var Fee = /*#__PURE__*/styled('div', {
3724
+ display: 'flex',
3725
+ alignItems: 'center'
3726
+ });
3727
+ var SwapperLogo$1 = /*#__PURE__*/styled('img', {
3728
+ width: '$16',
3729
+ height: '$16'
3730
+ });
3731
+ var RelativeContainer$1 = /*#__PURE__*/styled('div', {
3732
+ position: 'relative'
3733
+ });
3734
+ var Footer = /*#__PURE__*/styled('div', {
3735
+ display: 'flex',
3736
+ alignItems: 'center'
3737
+ });
3738
+ var Dot$2 = /*#__PURE__*/styled('div', {
3739
+ width: '$8',
3740
+ height: '$8',
3741
+ backgroundColor: '$foreground',
3742
+ borderRadius: '4px',
3743
+ marginLeft: '$8'
3744
+ });
3745
+ var ArrowDown = /*#__PURE__*/styled('div', {
3746
+ width: '0px',
3747
+ height: '0px',
3748
+ borderLeft: '5px solid transparent',
3749
+ borderRight: '5px solid transparent',
3750
+ borderTop: '5px solid $foreground',
3751
+ marginLeft: '$8'
3752
+ });
3753
+ var Alerts = /*#__PURE__*/styled('div', {
3754
+ paddingBottom: '$16'
3755
+ });
3756
+ function ConfirmSwap(_ref) {
3757
+ var _bestRoute$result;
3758
+ var bestRoute = _ref.bestRoute,
3759
+ onBack = _ref.onBack,
3760
+ onConfirm = _ref.onConfirm,
3761
+ loading = _ref.loading,
3762
+ error = _ref.error,
3763
+ warning = _ref.warning;
3764
+ return React__default.createElement(SecondaryPage, {
3765
+ textField: false,
3766
+ title: "Swap",
3767
+ onBack: onBack,
3768
+ Footer: React__default.createElement(Footer, null, React__default.createElement(Button, {
3769
+ type: "primary",
3770
+ fullWidth: true,
3771
+ loading: loading,
3772
+ variant: "contained",
3773
+ onClick: onConfirm
3774
+ }, "Swap")),
3775
+ Content: bestRoute == null ? void 0 : (_bestRoute$result = bestRoute.result) == null ? void 0 : _bestRoute$result.swaps.map(function (swap, index) {
3776
+ var _bestRoute$result2;
3777
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(Alerts, null, error && React__default.createElement(Alert, {
3778
+ description: error,
3779
+ type: "error"
3780
+ }), warning && React__default.createElement(Alert, {
3781
+ description: warning,
3782
+ type: "warning"
3783
+ })), index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
3784
+ logo: swap.from.logo,
3785
+ symbol: swap.from.symbol,
3786
+ chainLogo: swap.from.blockchainLogo,
3787
+ blockchain: swap.from.blockchain,
3788
+ amount: swap.fromAmount
3789
+ }), React__default.createElement(Dot$2, null)), React__default.createElement(Line$2, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
3790
+ src: swap.swapperLogo,
3791
+ alt: swap.swapperId
3792
+ }), React__default.createElement("div", null, React__default.createElement(Typography, {
3793
+ ml: 4,
3794
+ variant: "caption"
3795
+ }, swap.swapperType, " from ", swap.from.symbol, " to ", swap.to.symbol, ' ', "via ", swap.swapperId, ' '), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
3796
+ ml: 4,
3797
+ variant: "caption"
3798
+ }, parseFloat(swap.fee[0].amount).toFixed(6), " estimated gas fee")))), React__default.createElement(Line$2, null), index + 1 === ((_bestRoute$result2 = bestRoute.result) == null ? void 0 : _bestRoute$result2.swaps.length) && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
3799
+ logo: swap.to.logo,
3800
+ symbol: swap.to.symbol,
3801
+ chainLogo: swap.to.blockchainLogo,
3802
+ blockchain: swap.to.blockchain,
3803
+ amount: swap.toAmount
3804
+ }));
3805
+ })
3806
+ });
3807
+ }
3808
+
3809
+ var Footer$1 = /*#__PURE__*/styled('div', {
3810
+ display: 'flex',
3811
+ alignItems: 'center'
3812
+ });
3813
+ var AlertContainer = /*#__PURE__*/styled('div', {
3814
+ padding: '$16 0'
3815
+ });
3816
+ function ConfirmWallets(_ref) {
3817
+ var _swap$result, _swap$result2, _swap$result3;
3818
+ var onBack = _ref.onBack,
3819
+ loading = _ref.loading,
3820
+ onConfirm = _ref.onConfirm,
3821
+ swap = _ref.swap,
3822
+ requiredWallets = _ref.requiredWallets,
3823
+ selectableWallets = _ref.selectableWallets,
3824
+ onChange = _ref.onChange,
3825
+ confirmDisabled = _ref.confirmDisabled;
3826
+ var firstStep = (_swap$result = swap.result) == null ? void 0 : _swap$result.swaps[0];
3827
+ var lastStep = (_swap$result2 = swap.result) == null ? void 0 : _swap$result2.swaps[((_swap$result3 = swap.result) == null ? void 0 : _swap$result3.swaps.length) - 1];
3828
+ var fromAmount = decimalNumber(firstStep == null ? void 0 : firstStep.fromAmount, 3);
3829
+ var toAmount = decimalNumber(lastStep == null ? void 0 : lastStep.toAmount, 3);
3830
+ return React__default.createElement(SecondaryPage, {
3831
+ textField: false,
3832
+ title: "Swap",
3833
+ onBack: onBack,
3834
+ Footer: React__default.createElement(Footer$1, null, React__default.createElement(Button, {
3835
+ fullWidth: true,
3836
+ loading: loading,
3837
+ type: "primary",
3838
+ variant: "contained",
3839
+ onClick: onConfirm,
3840
+ disabled: confirmDisabled
3841
+ }, "Confirm")),
3842
+ Content: React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
3843
+ variant: "h6",
3844
+ mb: 12
3845
+ }, "Confirm swap ", fromAmount, " ", lastStep == null ? void 0 : lastStep.from.symbol, " (", firstStep == null ? void 0 : firstStep.from.blockchain, ") to ", toAmount, " ", lastStep == null ? void 0 : lastStep.to.symbol, ' ', "(on ", lastStep == null ? void 0 : lastStep.to.blockchain, ")"), requiredWallets.map(function (wallet, index) {
3846
+ var list = selectableWallets.filter(function (w) {
3847
+ return wallet === w.chain;
3848
+ });
3849
+ return React__default.createElement("div", {
3850
+ key: index
3851
+ }, React__default.createElement(Typography, {
3852
+ variant: "body2",
3853
+ mb: 12,
3854
+ mt: 12
3855
+ }, index + 1, ") Your ", wallet, " Wallet"), list.length === 0 && React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
3856
+ type: "error",
3857
+ description: "You should connect a " + wallet + " supported wallet"
3858
+ })), list.length != 0 && React__default.createElement(SelectableWalletList, {
3859
+ list: list,
3860
+ onChange: onChange
3861
+ }));
3862
+ }))
3863
+ });
3864
+ }
3865
+
3866
+ function groupingOfSwaps(list) {
3867
+ return list.reduce(function (acc, swap) {
3868
+ var categoryIndex = acc.findIndex(function (item) {
3869
+ return swap.status === 'running' && item.title == 'Active Swaps' || swap.status !== 'running' && item.title == 'Recent Swaps';
3870
+ });
3871
+ if (categoryIndex > -1) {
3872
+ acc[categoryIndex].swaps.push(swap);
3873
+ } else {
3874
+ acc.push({
3875
+ title: swap.status === 'running' ? 'Active Swaps' : 'Recent Swaps',
3876
+ swaps: [swap]
3877
+ });
3878
+ }
3879
+ return acc;
3880
+ }, []);
3881
+ }
3882
+
3883
+ var BodyError = /*#__PURE__*/styled('div', {
3884
+ height: '100%',
3885
+ display: 'flex',
3886
+ justifyContent: 'center',
3887
+ alignItems: 'center'
3888
+ });
3889
+ var ErrorMsg$1 = /*#__PURE__*/styled(Typography, {
3890
+ color: '$error'
3891
+ });
3892
+ var filteredHistory = function filteredHistory(list, searchedFor) {
3893
+ return list.filter(function (swap) {
3894
+ var firstStep = swap.steps[0];
3895
+ var lastStep = swap.steps[swap.steps.length - 1];
3896
+ return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
3897
+ });
3898
+ };
3899
+ var Group = /*#__PURE__*/styled('div', {
3900
+ marginBottom: '$24',
3901
+ paddingRight: '$8'
3902
+ });
3903
+ var GroupTitle = /*#__PURE__*/styled(Typography, {
3904
+ color: '$neutrals500'
3905
+ });
3906
+ var SwapsGroup = function SwapsGroup(props) {
3907
+ var list = props.list,
3908
+ onSwapClick = props.onSwapClick;
3909
+ var swapsInGroup = groupingOfSwaps(list);
3910
+ return React__default.createElement(React__default.Fragment, null, swapsInGroup.map(function (group) {
3911
+ return React__default.createElement(Group, null, React__default.createElement(GroupTitle, {
3912
+ variant: "body2"
3913
+ }, group.title), group.swaps.map(function (swap) {
3914
+ return React__default.createElement(SwapDetail, {
3915
+ swap: swap,
3916
+ status: swap.status,
3917
+ onClick: onSwapClick
3918
+ });
3919
+ }));
3920
+ }));
3921
+ };
3922
+ function History(_ref) {
3923
+ var _ref$list = _ref.list,
3924
+ list = _ref$list === void 0 ? [] : _ref$list,
3925
+ onBack = _ref.onBack,
3926
+ onSwapClick = _ref.onSwapClick;
3927
+ return React__default.createElement(SecondaryPage, {
3928
+ onBack: onBack,
3929
+ textField: true,
3930
+ textFieldPlaceholder: "Search By Blockchain Or Token",
3931
+ title: "History",
3932
+ Content: function Content(_ref2) {
3933
+ var searchedFor = _ref2.searchedFor;
3934
+ var filterSwaps = filteredHistory(list, searchedFor);
3935
+ return filterSwaps.length ? React__default.createElement(SwapsGroup, {
3936
+ list: filterSwaps,
3937
+ onSwapClick: onSwapClick
3938
+ }) : React__default.createElement(BodyError, null, React__default.createElement(ErrorMsg$1, {
3939
+ variant: "caption"
3940
+ }, "Not Found"));
3941
+ }
3942
+ });
3943
+ }
3944
+
3945
+ var StyledAnchor = /*#__PURE__*/styled('a', {
3946
+ color: '$primary',
3947
+ fontWeight: '$600',
3948
+ marginLeft: '$12'
3949
+ });
3950
+ var InternalDetailsContainer = /*#__PURE__*/styled('div', {
3951
+ display: 'flex'
3952
+ });
3953
+ var InternalDetail = /*#__PURE__*/styled('div', {
3954
+ display: 'flex',
3955
+ padding: '$10'
3956
+ });
3957
+ var DescriptionContainer = /*#__PURE__*/styled('div', {
3958
+ display: 'flex',
3959
+ alignItems: 'center'
3960
+ });
3961
+ var Description = /*#__PURE__*/styled(Typography, {
3962
+ color: '$success',
3963
+ marginLeft: '$8'
3964
+ });
3965
+ var Error = /*#__PURE__*/styled(Description, {
3966
+ color: '$error'
3967
+ });
3968
+ var Line$3 = /*#__PURE__*/styled('div', {
3969
+ width: '0',
3970
+ marginLeft: '$12',
3971
+ border: '1px dashed $foreground',
3972
+ borderRadius: 'inherit'
3973
+ });
3974
+ function SwapHistory(props) {
3975
+ var pendingSwap = props.pendingSwap,
3976
+ onBack = props.onBack;
3977
+ return React__default.createElement(SecondaryPage, {
3978
+ title: "History",
3979
+ textField: false,
3980
+ onBack: onBack,
3981
+ Content: React__default.createElement(React__default.Fragment, null, pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
3982
+ return React__default.createElement(React__default.Fragment, null, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
3983
+ logo: step.fromLogo,
3984
+ symbol: step.fromSymbol,
3985
+ chainLogo: step.fromBlockchainLogo,
3986
+ blockchain: step.fromBlockchain,
3987
+ amount: pendingSwap.inputAmount
3988
+ }), React__default.createElement(Dot$2, null)), React__default.createElement(Line$3, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
3989
+ src: step.swapperLogo,
3990
+ alt: step.swapperId
3991
+ }), React__default.createElement("div", null, React__default.createElement(Typography, {
3992
+ ml: 4,
3993
+ variant: "caption"
3994
+ }, step.swapperType, " from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
3995
+ ml: 4,
3996
+ variant: "caption"
3997
+ }, "fee")))), React__default.createElement("div", {
3998
+ style: {
3999
+ display: 'flex'
4000
+ }
4001
+ }, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$3, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
4002
+ return React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
4003
+ color: "success"
4004
+ }), React__default.createElement(Description, {
4005
+ variant: "body2"
4006
+ }, !item.description ? React__default.createElement("b", null, "View transaction") : React__default.createElement("b", null, item.description.substring(0, 1).toUpperCase(), item.description.substring(1)))), React__default.createElement(StyledAnchor, {
4007
+ href: item.url,
4008
+ target: "_blank",
4009
+ rel: "noreferrer",
4010
+ key: index
4011
+ }, "TX-Link"));
4012
+ }), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
4013
+ color: "error"
4014
+ }), React__default.createElement(Error, {
4015
+ variant: "body2"
4016
+ }, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
4017
+ logo: step.toLogo,
4018
+ symbol: step.toSymbol,
4019
+ chainLogo: step.toBlockchainLogo,
4020
+ blockchain: step.toBlockchain,
4021
+ amount: step.outputAmount
4022
+ }));
4023
+ }))
4024
+ });
4025
+ }
4026
+
4027
+ export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, Chip, CloseIcon, ConfirmSwap, ConfirmWallets, ConnectWalletsModal, DeleteCircleIcon, DeleteWalletIcon, DownloadIcon, GasIcon, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, MinusCircleIcon, Modal, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
4028
+ //# sourceMappingURL=ui.esm.js.map