@m0-foundation/swap-component 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/dist/m0-swap-component/ConstantsUtil-btJ3XIXu.js +28 -0
  2. package/dist/m0-swap-component/ConstantsUtil-btJ3XIXu.js.map +1 -0
  3. package/dist/m0-swap-component/HelpersUtil-5wkO4kIW.js +142 -0
  4. package/dist/m0-swap-component/HelpersUtil-5wkO4kIW.js.map +1 -0
  5. package/dist/m0-swap-component/PhArrowCircleDown-BiDIiYXi.js +76 -0
  6. package/dist/m0-swap-component/PhArrowCircleDown-BiDIiYXi.js.map +1 -0
  7. package/dist/m0-swap-component/PhArrowClockwise-BRnlxNUR.js +76 -0
  8. package/dist/m0-swap-component/PhArrowClockwise-BRnlxNUR.js.map +1 -0
  9. package/dist/m0-swap-component/PhArrowDown-Co2hyXIs.js +76 -0
  10. package/dist/m0-swap-component/PhArrowDown-Co2hyXIs.js.map +1 -0
  11. package/dist/m0-swap-component/PhArrowLeft-Cb8ijwK6.js +76 -0
  12. package/dist/m0-swap-component/PhArrowLeft-Cb8ijwK6.js.map +1 -0
  13. package/dist/m0-swap-component/PhArrowRight-B9t--Gmh.js +76 -0
  14. package/dist/m0-swap-component/PhArrowRight-B9t--Gmh.js.map +1 -0
  15. package/dist/m0-swap-component/PhArrowSquareOut-eGBMEr5T.js +76 -0
  16. package/dist/m0-swap-component/PhArrowSquareOut-eGBMEr5T.js.map +1 -0
  17. package/dist/m0-swap-component/PhArrowUp-CjSpT-xh.js +76 -0
  18. package/dist/m0-swap-component/PhArrowUp-CjSpT-xh.js.map +1 -0
  19. package/dist/m0-swap-component/PhArrowUpRight-B8u6wk-A.js +76 -0
  20. package/dist/m0-swap-component/PhArrowUpRight-B8u6wk-A.js.map +1 -0
  21. package/dist/m0-swap-component/PhArrowsClockwise-CBcfV6j6.js +76 -0
  22. package/dist/m0-swap-component/PhArrowsClockwise-CBcfV6j6.js.map +1 -0
  23. package/dist/m0-swap-component/PhArrowsDownUp-CMVR84b1.js +76 -0
  24. package/dist/m0-swap-component/PhArrowsDownUp-CMVR84b1.js.map +1 -0
  25. package/dist/m0-swap-component/PhArrowsLeftRight-CmXk8rs2.js +76 -0
  26. package/dist/m0-swap-component/PhArrowsLeftRight-CmXk8rs2.js.map +1 -0
  27. package/dist/m0-swap-component/PhBank-BigtjnS8.js +76 -0
  28. package/dist/m0-swap-component/PhBank-BigtjnS8.js.map +1 -0
  29. package/dist/m0-swap-component/PhBrowser-BOulLD8D.js +76 -0
  30. package/dist/m0-swap-component/PhBrowser-BOulLD8D.js.map +1 -0
  31. package/dist/m0-swap-component/PhCaretDown-BvvZ65ad.js +76 -0
  32. package/dist/m0-swap-component/PhCaretDown-BvvZ65ad.js.map +1 -0
  33. package/dist/m0-swap-component/PhCaretLeft-DtwjZbZ7.js +76 -0
  34. package/dist/m0-swap-component/PhCaretLeft-DtwjZbZ7.js.map +1 -0
  35. package/dist/m0-swap-component/PhCaretRight-C8LuSZkO.js +76 -0
  36. package/dist/m0-swap-component/PhCaretRight-C8LuSZkO.js.map +1 -0
  37. package/dist/m0-swap-component/PhCaretUp-B2lAObip.js +76 -0
  38. package/dist/m0-swap-component/PhCaretUp-B2lAObip.js.map +1 -0
  39. package/dist/m0-swap-component/PhCheck-DQtuVrQf.js +76 -0
  40. package/dist/m0-swap-component/PhCheck-DQtuVrQf.js.map +1 -0
  41. package/dist/m0-swap-component/PhCircleHalf-CXfZ0QZv.js +76 -0
  42. package/dist/m0-swap-component/PhCircleHalf-CXfZ0QZv.js.map +1 -0
  43. package/dist/m0-swap-component/PhClock-CXsmuc_a.js +76 -0
  44. package/dist/m0-swap-component/PhClock-CXsmuc_a.js.map +1 -0
  45. package/dist/m0-swap-component/PhCompass-Cg-qnMon.js +76 -0
  46. package/dist/m0-swap-component/PhCompass-Cg-qnMon.js.map +1 -0
  47. package/dist/m0-swap-component/PhCopy-kGRKcvb4.js +76 -0
  48. package/dist/m0-swap-component/PhCopy-kGRKcvb4.js.map +1 -0
  49. package/dist/m0-swap-component/PhCreditCard-jYFausLO.js +76 -0
  50. package/dist/m0-swap-component/PhCreditCard-jYFausLO.js.map +1 -0
  51. package/dist/m0-swap-component/PhCurrencyDollar-C8vSY3fy.js +76 -0
  52. package/dist/m0-swap-component/PhCurrencyDollar-C8vSY3fy.js.map +1 -0
  53. package/dist/m0-swap-component/PhDesktop-AczlBCho.js +76 -0
  54. package/dist/m0-swap-component/PhDesktop-AczlBCho.js.map +1 -0
  55. package/dist/m0-swap-component/PhDeviceMobile-3rFbdWLA.js +76 -0
  56. package/dist/m0-swap-component/PhDeviceMobile-3rFbdWLA.js.map +1 -0
  57. package/dist/m0-swap-component/PhDotsThree-cJsXXsvY.js +76 -0
  58. package/dist/m0-swap-component/PhDotsThree-cJsXXsvY.js.map +1 -0
  59. package/dist/m0-swap-component/PhEnvelope-C1bxHVXw.js +76 -0
  60. package/dist/m0-swap-component/PhEnvelope-C1bxHVXw.js.map +1 -0
  61. package/dist/m0-swap-component/PhFunnelSimple-DhqB9fsu.js +76 -0
  62. package/dist/m0-swap-component/PhFunnelSimple-DhqB9fsu.js.map +1 -0
  63. package/dist/m0-swap-component/PhGlobe-BFp6kx95.js +76 -0
  64. package/dist/m0-swap-component/PhGlobe-BFp6kx95.js.map +1 -0
  65. package/dist/m0-swap-component/PhIdentificationCard-BdYxckWB.js +76 -0
  66. package/dist/m0-swap-component/PhIdentificationCard-BdYxckWB.js.map +1 -0
  67. package/dist/m0-swap-component/PhImage-CXxX5oq3.js +76 -0
  68. package/dist/m0-swap-component/PhImage-CXxX5oq3.js.map +1 -0
  69. package/dist/m0-swap-component/PhInfo-BcuP36hY.js +76 -0
  70. package/dist/m0-swap-component/PhInfo-BcuP36hY.js.map +1 -0
  71. package/dist/m0-swap-component/PhLightbulb-DkWwRl94.js +76 -0
  72. package/dist/m0-swap-component/PhLightbulb-DkWwRl94.js.map +1 -0
  73. package/dist/m0-swap-component/PhMagnifyingGlass-B_fFjslY.js +76 -0
  74. package/dist/m0-swap-component/PhMagnifyingGlass-B_fFjslY.js.map +1 -0
  75. package/dist/m0-swap-component/PhPaperPlaneRight-BIzGG3QW.js +76 -0
  76. package/dist/m0-swap-component/PhPaperPlaneRight-BIzGG3QW.js.map +1 -0
  77. package/dist/m0-swap-component/PhPlus-BGosT2zu.js +76 -0
  78. package/dist/m0-swap-component/PhPlus-BGosT2zu.js.map +1 -0
  79. package/dist/m0-swap-component/PhPower-BMqDnP1n.js +76 -0
  80. package/dist/m0-swap-component/PhPower-BMqDnP1n.js.map +1 -0
  81. package/dist/m0-swap-component/PhPuzzlePiece-DNMpiJNU.js +76 -0
  82. package/dist/m0-swap-component/PhPuzzlePiece-DNMpiJNU.js.map +1 -0
  83. package/dist/m0-swap-component/PhQrCode-DrHkqrU4.js +76 -0
  84. package/dist/m0-swap-component/PhQrCode-DrHkqrU4.js.map +1 -0
  85. package/dist/m0-swap-component/PhQuestion-zTfvwqNz.js +76 -0
  86. package/dist/m0-swap-component/PhQuestion-zTfvwqNz.js.map +1 -0
  87. package/dist/m0-swap-component/PhQuestionMark-h3Nk1Yf1.js +76 -0
  88. package/dist/m0-swap-component/PhQuestionMark-h3Nk1Yf1.js.map +1 -0
  89. package/dist/m0-swap-component/PhSealCheck-DPPqSt6G.js +76 -0
  90. package/dist/m0-swap-component/PhSealCheck-DPPqSt6G.js.map +1 -0
  91. package/dist/m0-swap-component/PhSignOut-CJgnrE_v.js +76 -0
  92. package/dist/m0-swap-component/PhSignOut-CJgnrE_v.js.map +1 -0
  93. package/dist/m0-swap-component/PhSpinner-CMTEIWbw.js +76 -0
  94. package/dist/m0-swap-component/PhSpinner-CMTEIWbw.js.map +1 -0
  95. package/dist/m0-swap-component/PhTrash-CeDVW4am.js +76 -0
  96. package/dist/m0-swap-component/PhTrash-CeDVW4am.js.map +1 -0
  97. package/dist/m0-swap-component/PhUser-lQ9WUtAV.js +76 -0
  98. package/dist/m0-swap-component/PhUser-lQ9WUtAV.js.map +1 -0
  99. package/dist/m0-swap-component/PhVault-EnLnS_IQ.js +76 -0
  100. package/dist/m0-swap-component/PhVault-EnLnS_IQ.js.map +1 -0
  101. package/dist/m0-swap-component/PhWallet-CUeDZydd.js +76 -0
  102. package/dist/m0-swap-component/PhWallet-CUeDZydd.js.map +1 -0
  103. package/dist/m0-swap-component/PhWarning-CokeGZs2.js +76 -0
  104. package/dist/m0-swap-component/PhWarning-CokeGZs2.js.map +1 -0
  105. package/dist/m0-swap-component/PhWarningCircle-vWtA7S0R.js +76 -0
  106. package/dist/m0-swap-component/PhWarningCircle-vWtA7S0R.js.map +1 -0
  107. package/dist/m0-swap-component/PhX-DwCRIvoc.js +76 -0
  108. package/dist/m0-swap-component/PhX-DwCRIvoc.js.map +1 -0
  109. package/dist/m0-swap-component/data-capture-BmovBbKV.js +573 -0
  110. package/dist/m0-swap-component/data-capture-BmovBbKV.js.map +1 -0
  111. package/dist/m0-swap-component/email-B4niz3Ms.js +445 -0
  112. package/dist/m0-swap-component/email-B4niz3Ms.js.map +1 -0
  113. package/dist/m0-swap-component/embedded-wallet-D6bzjX_K.js +988 -0
  114. package/dist/m0-swap-component/embedded-wallet-D6bzjX_K.js.map +1 -0
  115. package/dist/m0-swap-component/features-EhJNVE-M.js +355 -0
  116. package/dist/m0-swap-component/features-EhJNVE-M.js.map +1 -0
  117. package/dist/m0-swap-component/if-defined-2CMpVr2R.js +12 -0
  118. package/dist/m0-swap-component/if-defined-2CMpVr2R.js.map +1 -0
  119. package/dist/m0-swap-component/index-B4xuj7uR.js +965 -0
  120. package/dist/m0-swap-component/index-B4xuj7uR.js.map +1 -0
  121. package/dist/m0-swap-component/index-BVZ66GYf.js +206 -0
  122. package/dist/m0-swap-component/index-BVZ66GYf.js.map +1 -0
  123. package/dist/m0-swap-component/index-BZXyMieH.js +150 -0
  124. package/dist/m0-swap-component/index-BZXyMieH.js.map +1 -0
  125. package/dist/m0-swap-component/index-Bj5sA_Ri.js +252 -0
  126. package/dist/m0-swap-component/index-Bj5sA_Ri.js.map +1 -0
  127. package/dist/m0-swap-component/index-Bs-pPJYj.js +129 -0
  128. package/dist/m0-swap-component/index-Bs-pPJYj.js.map +1 -0
  129. package/dist/m0-swap-component/index-CMS76VPf.js +474 -0
  130. package/dist/m0-swap-component/index-CMS76VPf.js.map +1 -0
  131. package/dist/m0-swap-component/index-CoMTkqee.js +95 -0
  132. package/dist/m0-swap-component/index-CoMTkqee.js.map +1 -0
  133. package/dist/m0-swap-component/index-DE0OtbL2.js +3566 -0
  134. package/dist/m0-swap-component/index-DE0OtbL2.js.map +1 -0
  135. package/dist/m0-swap-component/index-DEG-YczD.js +231 -0
  136. package/dist/m0-swap-component/index-DEG-YczD.js.map +1 -0
  137. package/dist/m0-swap-component/index-DY_Ijq_4.js +4345 -0
  138. package/dist/m0-swap-component/index-DY_Ijq_4.js.map +1 -0
  139. package/dist/m0-swap-component/index-IRpGhIhy.js +9394 -0
  140. package/dist/m0-swap-component/index-IRpGhIhy.js.map +1 -0
  141. package/dist/m0-swap-component/index-Z70nBYWG.js +113 -0
  142. package/dist/m0-swap-component/index-Z70nBYWG.js.map +1 -0
  143. package/dist/m0-swap-component/index-iNFotRMa.js +73 -0
  144. package/dist/m0-swap-component/index-iNFotRMa.js.map +1 -0
  145. package/dist/m0-swap-component/index-n1fooC-v.js +37757 -0
  146. package/dist/m0-swap-component/index-n1fooC-v.js.map +1 -0
  147. package/dist/m0-swap-component/index.esm.js +2 -0
  148. package/dist/m0-swap-component/index.esm.js.map +1 -0
  149. package/dist/m0-swap-component/loader.esm.js.map +1 -0
  150. package/dist/m0-swap-component/m0-swap-component.esm.js +48 -0
  151. package/dist/m0-swap-component/m0-swap-component.esm.js.map +1 -0
  152. package/dist/m0-swap-component/native-CPtqJIn7.js +18 -0
  153. package/dist/m0-swap-component/native-CPtqJIn7.js.map +1 -0
  154. package/dist/m0-swap-component/onramp-BppY2eDR.js +1003 -0
  155. package/dist/m0-swap-component/onramp-BppY2eDR.js.map +1 -0
  156. package/dist/m0-swap-component/pay-with-exchange-BJYQgTMB.js +639 -0
  157. package/dist/m0-swap-component/pay-with-exchange-BJYQgTMB.js.map +1 -0
  158. package/dist/m0-swap-component/property-BN-VaT99.js +625 -0
  159. package/dist/m0-swap-component/property-BN-VaT99.js.map +1 -0
  160. package/dist/m0-swap-component/receive-BptRM_5_.js +281 -0
  161. package/dist/m0-swap-component/receive-BptRM_5_.js.map +1 -0
  162. package/dist/m0-swap-component/ref-3xALOvo5.js +25 -0
  163. package/dist/m0-swap-component/ref-3xALOvo5.js.map +1 -0
  164. package/dist/m0-swap-component/send-BCyHM4Zr.js +1408 -0
  165. package/dist/m0-swap-component/send-BCyHM4Zr.js.map +1 -0
  166. package/dist/m0-swap-component/socials-BbajCSWV.js +824 -0
  167. package/dist/m0-swap-component/socials-BbajCSWV.js.map +1 -0
  168. package/dist/m0-swap-component/swap-module-5ZLM-vAV.js +140887 -0
  169. package/dist/m0-swap-component/swap-module-5ZLM-vAV.js.map +1 -0
  170. package/dist/m0-swap-component/swap-module.entry.esm.js.map +1 -0
  171. package/dist/m0-swap-component/swap-module.entry.js +15 -0
  172. package/dist/m0-swap-component/swaps-DyGe65DR.js +2121 -0
  173. package/dist/m0-swap-component/swaps-DyGe65DR.js.map +1 -0
  174. package/dist/m0-swap-component/transactions-BZ9l4zt5.js +60 -0
  175. package/dist/m0-swap-component/transactions-BZ9l4zt5.js.map +1 -0
  176. package/dist/m0-swap-component/utils-RCeZbvdb.js +95 -0
  177. package/dist/m0-swap-component/utils-RCeZbvdb.js.map +1 -0
  178. package/dist/m0-swap-component/w3m-modal-D0HWVPsj.js +2097 -0
  179. package/dist/m0-swap-component/w3m-modal-D0HWVPsj.js.map +1 -0
  180. package/dist/m0-swap-component/wui-button-BeTWD3Va.js +223 -0
  181. package/dist/m0-swap-component/wui-button-BeTWD3Va.js.map +1 -0
  182. package/dist/m0-swap-component/wui-email-input-CgnfUH0c.js +65 -0
  183. package/dist/m0-swap-component/wui-email-input-CgnfUH0c.js.map +1 -0
  184. package/dist/m0-swap-component/wui-icon-B0uTDhW-.js +4 -0
  185. package/dist/m0-swap-component/wui-icon-B0uTDhW-.js.map +1 -0
  186. package/dist/m0-swap-component/wui-icon-box-s87lODBB.js +4 -0
  187. package/dist/m0-swap-component/wui-icon-box-s87lODBB.js.map +1 -0
  188. package/dist/m0-swap-component/wui-icon-link-BFpV9kPE.js +127 -0
  189. package/dist/m0-swap-component/wui-icon-link-BFpV9kPE.js.map +1 -0
  190. package/dist/m0-swap-component/wui-image-BvjxoR51.js +4 -0
  191. package/dist/m0-swap-component/wui-image-BvjxoR51.js.map +1 -0
  192. package/dist/m0-swap-component/wui-input-amount-CWQfP3RO.js +182 -0
  193. package/dist/m0-swap-component/wui-input-amount-CWQfP3RO.js.map +1 -0
  194. package/dist/m0-swap-component/wui-input-text-g0sN4B2y.js +4 -0
  195. package/dist/m0-swap-component/wui-input-text-g0sN4B2y.js.map +1 -0
  196. package/dist/m0-swap-component/wui-link-VqM3wLny.js +123 -0
  197. package/dist/m0-swap-component/wui-link-VqM3wLny.js.map +1 -0
  198. package/dist/m0-swap-component/wui-list-item-BIijofqN.js +170 -0
  199. package/dist/m0-swap-component/wui-list-item-BIijofqN.js.map +1 -0
  200. package/dist/m0-swap-component/wui-list-social-C7GhkRc8.js +119 -0
  201. package/dist/m0-swap-component/wui-list-social-C7GhkRc8.js.map +1 -0
  202. package/dist/m0-swap-component/wui-list-token-C94lmAbT.js +134 -0
  203. package/dist/m0-swap-component/wui-list-token-C94lmAbT.js.map +1 -0
  204. package/dist/m0-swap-component/wui-list-wallet-C7fnQvCW.js +622 -0
  205. package/dist/m0-swap-component/wui-list-wallet-C7fnQvCW.js.map +1 -0
  206. package/dist/m0-swap-component/wui-loading-spinner-CW2_5SKA.js +4 -0
  207. package/dist/m0-swap-component/wui-loading-spinner-CW2_5SKA.js.map +1 -0
  208. package/dist/m0-swap-component/wui-loading-thumbnail-y3sGkT5j.js +337 -0
  209. package/dist/m0-swap-component/wui-loading-thumbnail-y3sGkT5j.js.map +1 -0
  210. package/dist/m0-swap-component/wui-qr-code-DekJTDGf.js +3412 -0
  211. package/dist/m0-swap-component/wui-qr-code-DekJTDGf.js.map +1 -0
  212. package/dist/m0-swap-component/wui-separator-DMZIL_Av.js +67 -0
  213. package/dist/m0-swap-component/wui-separator-DMZIL_Av.js.map +1 -0
  214. package/dist/m0-swap-component/wui-shimmer-CVFC8fMx.js +4 -0
  215. package/dist/m0-swap-component/wui-shimmer-CVFC8fMx.js.map +1 -0
  216. package/dist/m0-swap-component/wui-text-BS_lZKY4.js +1127 -0
  217. package/dist/m0-swap-component/wui-text-BS_lZKY4.js.map +1 -0
  218. package/dist/m0-swap-component/wui-token-button-CsOFoNJG.js +214 -0
  219. package/dist/m0-swap-component/wui-token-button-CsOFoNJG.js.map +1 -0
  220. package/dist/m0-swap-component/wui-visual-hU2Mkyrv.js +565 -0
  221. package/dist/m0-swap-component/wui-visual-hU2Mkyrv.js.map +1 -0
  222. package/dist/m0-swap-component/wui-wallet-switch-CWbdtfbN.js +459 -0
  223. package/dist/m0-swap-component/wui-wallet-switch-CWbdtfbN.js.map +1 -0
  224. package/dist/types/components/swap-module/balances.d.ts +16 -0
  225. package/dist/types/components/swap-module/chains.d.ts +16 -0
  226. package/dist/types/components/swap-module/store.d.ts +34 -0
  227. package/dist/types/components/swap-module/swap-module.d.ts +113 -0
  228. package/dist/types/components/swap-module/utils/constants.d.ts +7 -0
  229. package/dist/types/components/swap-module/utils/formatters.d.ts +23 -0
  230. package/dist/types/components/swap-module/utils/reown.d.ts +59 -0
  231. package/dist/types/components/swap-module/utils/wallet.d.ts +83 -0
  232. package/dist/types/components.d.ts +165 -0
  233. package/dist/types/index.d.ts +1 -0
  234. package/dist/types/stencil-public-runtime.d.ts +1732 -0
  235. package/loader/cdn.js +1 -0
  236. package/loader/index.cjs.js +1 -0
  237. package/loader/index.d.ts +24 -0
  238. package/loader/index.es2017.js +1 -0
  239. package/loader/index.js +2 -0
  240. package/package.json +60 -0
@@ -0,0 +1,2097 @@
1
+ import { d as css, a as i, b, r as resetStyles, c as customElement, t as AlertController, e as elementStyles, h as ChainController, L as vars, R as RouterController, C as ConnectorController, D as AssetUtil, J as AssetController, o as EventsController, aa as ModalUtil, O as OptionsController, i as i$1, p as SnackController, M as ModalController, A as ApiController, T as ThemeController, U as UiHelperUtil, ab as initializeTheming, a1 as SIWXUtil, x as SwapController, ac as AdapterController } from './swap-module-5ZLM-vAV.js';
2
+ import { n, r } from './wui-text-BS_lZKY4.js';
3
+ import { o } from './if-defined-2CMpVr2R.js';
4
+ import { PayController } from './index-DE0OtbL2.js';
5
+ import './index-BZXyMieH.js';
6
+ import './wui-list-wallet-C7fnQvCW.js';
7
+ import { C as ConstantsUtil } from './ConstantsUtil-btJ3XIXu.js';
8
+ import './index-CoMTkqee.js';
9
+ import './index-Bs-pPJYj.js';
10
+ import './index-DEG-YczD.js';
11
+ import { H as HelpersUtil } from './HelpersUtil-5wkO4kIW.js';
12
+ import './wui-button-BeTWD3Va.js';
13
+ import './wui-icon-B0uTDhW-.js';
14
+ import './index-DY_Ijq_4.js';
15
+ import 'buffer';
16
+ import 'ox/BlockOverrides';
17
+ import 'ox/erc8010';
18
+ import 'ox/AbiConstructor';
19
+ import 'ox/AbiFunction';
20
+ import 'ox/erc6492';
21
+ import 'events';
22
+ import 'ox';
23
+ import 'ox/tempo';
24
+ import 'ox/Hex';
25
+ import 'ox/Secp256k1';
26
+ import 'ox/Signature';
27
+ import './wui-icon-link-BFpV9kPE.js';
28
+ import './wui-image-BvjxoR51.js';
29
+ import './wui-list-item-BIijofqN.js';
30
+ import './wui-loading-spinner-CW2_5SKA.js';
31
+ import './wui-wallet-switch-CWbdtfbN.js';
32
+ import './wui-separator-DMZIL_Av.js';
33
+ import './utils-RCeZbvdb.js';
34
+ import './wui-shimmer-CVFC8fMx.js';
35
+ import './index-iNFotRMa.js';
36
+ import './index-BVZ66GYf.js';
37
+ import './wui-link-VqM3wLny.js';
38
+
39
+ var styles$b = css `
40
+ :host {
41
+ display: block;
42
+ border-radius: clamp(0px, ${({ borderRadius }) => borderRadius['8']}, 44px);
43
+ box-shadow: 0 0 0 1px ${({ tokens }) => tokens.theme.foregroundPrimary};
44
+ overflow: hidden;
45
+ }
46
+ `;
47
+
48
+ var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
49
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
50
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
51
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
53
+ };
54
+ let WuiCard = class WuiCard extends i {
55
+ render() {
56
+ return b `<slot></slot>`;
57
+ }
58
+ };
59
+ WuiCard.styles = [resetStyles, styles$b];
60
+ WuiCard = __decorate$b([
61
+ customElement('wui-card')
62
+ ], WuiCard);
63
+
64
+ var styles$a = css `
65
+ :host {
66
+ width: 100%;
67
+ }
68
+
69
+ :host > wui-flex {
70
+ width: 100%;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ gap: ${({ spacing }) => spacing[2]};
75
+ padding: ${({ spacing }) => spacing[3]};
76
+ border-radius: ${({ borderRadius }) => borderRadius[6]};
77
+ border: 1px solid ${({ tokens }) => tokens.theme.borderPrimary};
78
+ box-sizing: border-box;
79
+ background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
80
+ box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);
81
+ color: ${({ tokens }) => tokens.theme.textPrimary};
82
+ }
83
+
84
+ :host > wui-flex[data-type='info'] {
85
+ .icon-box {
86
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
87
+
88
+ wui-icon {
89
+ color: ${({ tokens }) => tokens.theme.iconDefault};
90
+ }
91
+ }
92
+ }
93
+ :host > wui-flex[data-type='success'] {
94
+ .icon-box {
95
+ background-color: ${({ tokens }) => tokens.core.backgroundSuccess};
96
+
97
+ wui-icon {
98
+ color: ${({ tokens }) => tokens.core.borderSuccess};
99
+ }
100
+ }
101
+ }
102
+ :host > wui-flex[data-type='warning'] {
103
+ .icon-box {
104
+ background-color: ${({ tokens }) => tokens.core.backgroundWarning};
105
+
106
+ wui-icon {
107
+ color: ${({ tokens }) => tokens.core.borderWarning};
108
+ }
109
+ }
110
+ }
111
+ :host > wui-flex[data-type='error'] {
112
+ .icon-box {
113
+ background-color: ${({ tokens }) => tokens.core.backgroundError};
114
+
115
+ wui-icon {
116
+ color: ${({ tokens }) => tokens.core.borderError};
117
+ }
118
+ }
119
+ }
120
+
121
+ wui-flex {
122
+ width: 100%;
123
+ }
124
+
125
+ wui-text {
126
+ word-break: break-word;
127
+ flex: 1;
128
+ }
129
+
130
+ .close {
131
+ cursor: pointer;
132
+ color: ${({ tokens }) => tokens.theme.iconDefault};
133
+ }
134
+
135
+ .icon-box {
136
+ height: 40px;
137
+ width: 40px;
138
+ border-radius: ${({ borderRadius }) => borderRadius['2']};
139
+ background-color: var(--local-icon-bg-value);
140
+ }
141
+ `;
142
+
143
+ var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
144
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
145
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
146
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
147
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
148
+ };
149
+ const TYPE_ICON_NAME = {
150
+ info: 'info',
151
+ success: 'checkmark',
152
+ warning: 'warningCircle',
153
+ error: 'warning'
154
+ };
155
+ let WuiAlertBar = class WuiAlertBar extends i {
156
+ constructor() {
157
+ super(...arguments);
158
+ this.message = '';
159
+ this.type = 'info';
160
+ }
161
+ render() {
162
+ return b `
163
+ <wui-flex
164
+ data-type=${o(this.type)}
165
+ flexDirection="row"
166
+ justifyContent="space-between"
167
+ alignItems="center"
168
+ gap="2"
169
+ >
170
+ <wui-flex columnGap="2" flexDirection="row" alignItems="center">
171
+ <wui-flex
172
+ flexDirection="row"
173
+ alignItems="center"
174
+ justifyContent="center"
175
+ class="icon-box"
176
+ >
177
+ <wui-icon color="inherit" size="md" name=${TYPE_ICON_NAME[this.type]}></wui-icon>
178
+ </wui-flex>
179
+ <wui-text variant="md-medium" color="inherit" data-testid="wui-alertbar-text"
180
+ >${this.message}</wui-text
181
+ >
182
+ </wui-flex>
183
+ <wui-icon
184
+ class="close"
185
+ color="inherit"
186
+ size="sm"
187
+ name="close"
188
+ @click=${this.onClose}
189
+ ></wui-icon>
190
+ </wui-flex>
191
+ `;
192
+ }
193
+ onClose() {
194
+ AlertController.close();
195
+ }
196
+ };
197
+ WuiAlertBar.styles = [resetStyles, styles$a];
198
+ __decorate$a([
199
+ n()
200
+ ], WuiAlertBar.prototype, "message", void 0);
201
+ __decorate$a([
202
+ n()
203
+ ], WuiAlertBar.prototype, "type", void 0);
204
+ WuiAlertBar = __decorate$a([
205
+ customElement('wui-alertbar')
206
+ ], WuiAlertBar);
207
+
208
+ var styles$9 = css `
209
+ :host {
210
+ display: block;
211
+ position: absolute;
212
+ top: ${({ spacing }) => spacing['3']};
213
+ left: ${({ spacing }) => spacing['4']};
214
+ right: ${({ spacing }) => spacing['4']};
215
+ opacity: 0;
216
+ pointer-events: none;
217
+ }
218
+ `;
219
+
220
+ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
221
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
222
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
223
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
224
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
225
+ };
226
+ const presets = {
227
+ info: {
228
+ backgroundColor: 'fg-350',
229
+ iconColor: 'fg-325',
230
+ icon: 'info'
231
+ },
232
+ success: {
233
+ backgroundColor: 'success-glass-reown-020',
234
+ iconColor: 'success-125',
235
+ icon: 'checkmark'
236
+ },
237
+ warning: {
238
+ backgroundColor: 'warning-glass-reown-020',
239
+ iconColor: 'warning-100',
240
+ icon: 'warningCircle'
241
+ },
242
+ error: {
243
+ backgroundColor: 'error-glass-reown-020',
244
+ iconColor: 'error-125',
245
+ icon: 'warning'
246
+ }
247
+ };
248
+ let W3mAlertBar = class W3mAlertBar extends i {
249
+ constructor() {
250
+ super();
251
+ this.unsubscribe = [];
252
+ this.open = AlertController.state.open;
253
+ this.onOpen(true);
254
+ this.unsubscribe.push(AlertController.subscribeKey('open', val => {
255
+ this.open = val;
256
+ this.onOpen(false);
257
+ }));
258
+ }
259
+ disconnectedCallback() {
260
+ this.unsubscribe.forEach(unsubscribe => unsubscribe());
261
+ }
262
+ render() {
263
+ const { message, variant } = AlertController.state;
264
+ const preset = presets[variant];
265
+ return b `
266
+ <wui-alertbar
267
+ message=${message}
268
+ backgroundColor=${preset?.backgroundColor}
269
+ iconColor=${preset?.iconColor}
270
+ icon=${preset?.icon}
271
+ type=${variant}
272
+ ></wui-alertbar>
273
+ `;
274
+ }
275
+ onOpen(isMounted) {
276
+ if (this.open) {
277
+ this.animate([
278
+ { opacity: 0, transform: 'scale(0.85)' },
279
+ { opacity: 1, transform: 'scale(1)' }
280
+ ], {
281
+ duration: 150,
282
+ fill: 'forwards',
283
+ easing: 'ease'
284
+ });
285
+ this.style.cssText = `pointer-events: auto`;
286
+ }
287
+ else if (!isMounted) {
288
+ this.animate([
289
+ { opacity: 1, transform: 'scale(1)' },
290
+ { opacity: 0, transform: 'scale(0.85)' }
291
+ ], {
292
+ duration: 150,
293
+ fill: 'forwards',
294
+ easing: 'ease'
295
+ });
296
+ this.style.cssText = `pointer-events: none`;
297
+ }
298
+ }
299
+ };
300
+ W3mAlertBar.styles = styles$9;
301
+ __decorate$9([
302
+ r()
303
+ ], W3mAlertBar.prototype, "open", void 0);
304
+ W3mAlertBar = __decorate$9([
305
+ customElement('w3m-alertbar')
306
+ ], W3mAlertBar);
307
+
308
+ var styles$8 = css `
309
+ button {
310
+ display: block;
311
+ display: flex;
312
+ align-items: center;
313
+ padding: ${({ spacing }) => spacing[1]};
314
+ transition: background-color ${({ durations }) => durations['lg']}
315
+ ${({ easings }) => easings['ease-out-power-2']};
316
+ will-change: background-color;
317
+ border-radius: ${({ borderRadius }) => borderRadius[32]};
318
+ }
319
+
320
+ wui-image {
321
+ border-radius: 100%;
322
+ }
323
+
324
+ wui-text {
325
+ padding-left: ${({ spacing }) => spacing[1]};
326
+ }
327
+
328
+ .left-icon-container,
329
+ .right-icon-container {
330
+ width: 24px;
331
+ height: 24px;
332
+ justify-content: center;
333
+ align-items: center;
334
+ }
335
+
336
+ wui-icon {
337
+ color: ${({ tokens }) => tokens.theme.iconDefault};
338
+ }
339
+
340
+ /* -- Sizes --------------------------------------------------- */
341
+ button[data-size='lg'] {
342
+ height: 32px;
343
+ }
344
+
345
+ button[data-size='md'] {
346
+ height: 28px;
347
+ }
348
+
349
+ button[data-size='sm'] {
350
+ height: 24px;
351
+ }
352
+
353
+ button[data-size='lg'] wui-image {
354
+ width: 24px;
355
+ height: 24px;
356
+ }
357
+
358
+ button[data-size='md'] wui-image {
359
+ width: 20px;
360
+ height: 20px;
361
+ }
362
+
363
+ button[data-size='sm'] wui-image {
364
+ width: 16px;
365
+ height: 16px;
366
+ }
367
+
368
+ button[data-size='lg'] .left-icon-container {
369
+ width: 24px;
370
+ height: 24px;
371
+ }
372
+
373
+ button[data-size='md'] .left-icon-container {
374
+ width: 20px;
375
+ height: 20px;
376
+ }
377
+
378
+ button[data-size='sm'] .left-icon-container {
379
+ width: 16px;
380
+ height: 16px;
381
+ }
382
+
383
+ /* -- Variants --------------------------------------------------------- */
384
+ button[data-type='filled-dropdown'] {
385
+ background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
386
+ }
387
+
388
+ button[data-type='text-dropdown'] {
389
+ background-color: transparent;
390
+ }
391
+
392
+ /* -- Focus states --------------------------------------------------- */
393
+ button:focus-visible:enabled {
394
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
395
+ box-shadow: 0 0 0 4px ${({ tokens }) => tokens.core.foregroundAccent040};
396
+ }
397
+
398
+ /* -- Hover & Active states ----------------------------------------------------------- */
399
+ @media (hover: hover) and (pointer: fine) {
400
+ button:hover:enabled,
401
+ button:active:enabled {
402
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
403
+ }
404
+ }
405
+
406
+ /* -- Disabled states --------------------------------------------------- */
407
+ button:disabled {
408
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
409
+ opacity: 0.5;
410
+ }
411
+ `;
412
+
413
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
414
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
415
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
416
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
417
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
418
+ };
419
+ const TEXT_VARIANT_BY_SIZE = {
420
+ lg: 'lg-regular',
421
+ md: 'md-regular',
422
+ sm: 'sm-regular'
423
+ };
424
+ const ICON_SIZE_BY_SIZE = {
425
+ lg: 'lg',
426
+ md: 'md',
427
+ sm: 'sm'
428
+ };
429
+ let WuiSelect = class WuiSelect extends i {
430
+ constructor() {
431
+ super(...arguments);
432
+ this.imageSrc = '';
433
+ this.text = '';
434
+ this.size = 'lg';
435
+ this.type = 'text-dropdown';
436
+ this.disabled = false;
437
+ }
438
+ render() {
439
+ return b `<button ?disabled=${this.disabled} data-size=${this.size} data-type=${this.type}>
440
+ ${this.imageTemplate()} ${this.textTemplate()}
441
+ <wui-flex class="right-icon-container">
442
+ <wui-icon name="chevronBottom"></wui-icon>
443
+ </wui-flex>
444
+ </button>`;
445
+ }
446
+ textTemplate() {
447
+ const textSize = TEXT_VARIANT_BY_SIZE[this.size];
448
+ if (this.text) {
449
+ return b `<wui-text color="primary" variant=${textSize}>${this.text}</wui-text>`;
450
+ }
451
+ return null;
452
+ }
453
+ imageTemplate() {
454
+ if (this.imageSrc) {
455
+ return b `<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`;
456
+ }
457
+ const iconSize = ICON_SIZE_BY_SIZE[this.size];
458
+ return b ` <wui-flex class="left-icon-container">
459
+ <wui-icon size=${iconSize} name="networkPlaceholder"></wui-icon>
460
+ </wui-flex>`;
461
+ }
462
+ };
463
+ WuiSelect.styles = [resetStyles, elementStyles, styles$8];
464
+ __decorate$8([
465
+ n()
466
+ ], WuiSelect.prototype, "imageSrc", void 0);
467
+ __decorate$8([
468
+ n()
469
+ ], WuiSelect.prototype, "text", void 0);
470
+ __decorate$8([
471
+ n()
472
+ ], WuiSelect.prototype, "size", void 0);
473
+ __decorate$8([
474
+ n()
475
+ ], WuiSelect.prototype, "type", void 0);
476
+ __decorate$8([
477
+ n({ type: Boolean })
478
+ ], WuiSelect.prototype, "disabled", void 0);
479
+ WuiSelect = __decorate$8([
480
+ customElement('wui-select')
481
+ ], WuiSelect);
482
+
483
+ var styles$7 = css `
484
+ wui-image {
485
+ border-radius: ${({ borderRadius }) => borderRadius.round};
486
+ }
487
+
488
+ .transfers-badge {
489
+ background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
490
+ border: 1px solid ${({ tokens }) => tokens.theme.foregroundSecondary};
491
+ border-radius: ${({ borderRadius }) => borderRadius[4]};
492
+ }
493
+ `;
494
+
495
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
496
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
497
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
498
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
499
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
500
+ };
501
+ let W3mPayHeader = class W3mPayHeader extends i {
502
+ constructor() {
503
+ super();
504
+ this.unsubscribe = [];
505
+ this.paymentAsset = PayController.state.paymentAsset;
506
+ this.amount = PayController.state.amount;
507
+ this.unsubscribe.push(PayController.subscribeKey('paymentAsset', val => {
508
+ this.paymentAsset = val;
509
+ }), PayController.subscribeKey('amount', val => {
510
+ this.amount = val;
511
+ }));
512
+ }
513
+ disconnectedCallback() {
514
+ this.unsubscribe.forEach(unsubscribe => unsubscribe());
515
+ }
516
+ render() {
517
+ const allNetworks = ChainController.getAllRequestedCaipNetworks();
518
+ const targetNetwork = allNetworks.find(net => net.caipNetworkId === this.paymentAsset.network);
519
+ return b `<wui-flex
520
+ alignItems="center"
521
+ gap="1"
522
+ .padding=${['1', '2', '1', '1']}
523
+ class="transfers-badge"
524
+ >
525
+ <wui-image src=${o(this.paymentAsset.metadata.logoURI)} size="xl"></wui-image>
526
+ <wui-text variant="lg-regular" color="primary">
527
+ ${this.amount} ${this.paymentAsset.metadata.symbol}
528
+ </wui-text>
529
+ <wui-text variant="sm-regular" color="secondary">
530
+ on ${targetNetwork?.name ?? 'Unknown'}
531
+ </wui-text>
532
+ </wui-flex>`;
533
+ }
534
+ };
535
+ W3mPayHeader.styles = [styles$7];
536
+ __decorate$7([
537
+ n()
538
+ ], W3mPayHeader.prototype, "paymentAsset", void 0);
539
+ __decorate$7([
540
+ n()
541
+ ], W3mPayHeader.prototype, "amount", void 0);
542
+ W3mPayHeader = __decorate$7([
543
+ customElement('w3m-pay-header')
544
+ ], W3mPayHeader);
545
+
546
+ var styles$6 = css `
547
+ :host {
548
+ height: 60px;
549
+ }
550
+
551
+ :host > wui-flex {
552
+ box-sizing: border-box;
553
+ background-color: var(--local-header-background-color);
554
+ }
555
+
556
+ wui-text {
557
+ background-color: var(--local-header-background-color);
558
+ }
559
+
560
+ wui-flex.w3m-header-title {
561
+ transform: translateY(0);
562
+ opacity: 1;
563
+ }
564
+
565
+ wui-flex.w3m-header-title[view-direction='prev'] {
566
+ animation:
567
+ slide-down-out 120ms forwards ${({ easings }) => easings['ease-out-power-2']},
568
+ slide-down-in 120ms forwards ${({ easings }) => easings['ease-out-power-2']};
569
+ animation-delay: 0ms, 200ms;
570
+ }
571
+
572
+ wui-flex.w3m-header-title[view-direction='next'] {
573
+ animation:
574
+ slide-up-out 120ms forwards ${({ easings }) => easings['ease-out-power-2']},
575
+ slide-up-in 120ms forwards ${({ easings }) => easings['ease-out-power-2']};
576
+ animation-delay: 0ms, 200ms;
577
+ }
578
+
579
+ wui-icon-button[data-hidden='true'] {
580
+ opacity: 0 !important;
581
+ pointer-events: none;
582
+ }
583
+
584
+ @keyframes slide-up-out {
585
+ from {
586
+ transform: translateY(0px);
587
+ opacity: 1;
588
+ }
589
+ to {
590
+ transform: translateY(3px);
591
+ opacity: 0;
592
+ }
593
+ }
594
+
595
+ @keyframes slide-up-in {
596
+ from {
597
+ transform: translateY(-3px);
598
+ opacity: 0;
599
+ }
600
+ to {
601
+ transform: translateY(0);
602
+ opacity: 1;
603
+ }
604
+ }
605
+
606
+ @keyframes slide-down-out {
607
+ from {
608
+ transform: translateY(0px);
609
+ opacity: 1;
610
+ }
611
+ to {
612
+ transform: translateY(-3px);
613
+ opacity: 0;
614
+ }
615
+ }
616
+
617
+ @keyframes slide-down-in {
618
+ from {
619
+ transform: translateY(3px);
620
+ opacity: 0;
621
+ }
622
+ to {
623
+ transform: translateY(0);
624
+ opacity: 1;
625
+ }
626
+ }
627
+ `;
628
+
629
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
630
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
631
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
632
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
633
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
634
+ };
635
+ const BETA_SCREENS = ['SmartSessionList'];
636
+ const BACKGROUND_OVERRIDES = {
637
+ PayWithExchange: vars.tokens.theme.foregroundPrimary
638
+ };
639
+ function headings() {
640
+ const connectorName = RouterController.state.data?.connector?.name;
641
+ const walletName = RouterController.state.data?.wallet?.name;
642
+ const networkName = RouterController.state.data?.network?.name;
643
+ const name = walletName ?? connectorName;
644
+ const connectors = ConnectorController.getConnectors();
645
+ const isEmail = connectors.length === 1 && connectors[0]?.id === 'w3m-email';
646
+ const socialProvider = ChainController.getAccountData()?.socialProvider;
647
+ const socialTitle = socialProvider
648
+ ? socialProvider.charAt(0).toUpperCase() + socialProvider.slice(1)
649
+ : 'Connect Social';
650
+ return {
651
+ Connect: `Connect ${isEmail ? 'Email' : ''} Wallet`,
652
+ Create: 'Create Wallet',
653
+ ChooseAccountName: undefined,
654
+ Account: undefined,
655
+ AccountSettings: undefined,
656
+ AllWallets: 'All Wallets',
657
+ ApproveTransaction: 'Approve Transaction',
658
+ BuyInProgress: 'Buy',
659
+ UsageExceeded: 'Usage Exceeded',
660
+ ConnectingExternal: name ?? 'Connect Wallet',
661
+ ConnectingWalletConnect: name ?? 'WalletConnect',
662
+ ConnectingWalletConnectBasic: 'WalletConnect',
663
+ ConnectingSiwe: 'Sign In',
664
+ Convert: 'Convert',
665
+ ConvertSelectToken: 'Select token',
666
+ ConvertPreview: 'Preview Convert',
667
+ Downloads: name ? `Get ${name}` : 'Downloads',
668
+ EmailLogin: 'Email Login',
669
+ EmailVerifyOtp: 'Confirm Email',
670
+ EmailVerifyDevice: 'Register Device',
671
+ GetWallet: 'Get a Wallet',
672
+ Networks: 'Choose Network',
673
+ OnRampProviders: 'Choose Provider',
674
+ OnRampActivity: 'Activity',
675
+ OnRampTokenSelect: 'Select Token',
676
+ OnRampFiatSelect: 'Select Currency',
677
+ Pay: 'How you pay',
678
+ ProfileWallets: 'Wallets',
679
+ SwitchNetwork: networkName ?? 'Switch Network',
680
+ Transactions: 'Activity',
681
+ UnsupportedChain: 'Switch Network',
682
+ UpgradeEmailWallet: 'Upgrade Your Wallet',
683
+ UpdateEmailWallet: 'Edit Email',
684
+ UpdateEmailPrimaryOtp: 'Confirm Current Email',
685
+ UpdateEmailSecondaryOtp: 'Confirm New Email',
686
+ WhatIsABuy: 'What is Buy?',
687
+ RegisterAccountName: 'Choose Name',
688
+ RegisterAccountNameSuccess: '',
689
+ WalletReceive: 'Receive',
690
+ WalletCompatibleNetworks: 'Compatible Networks',
691
+ Swap: 'Swap',
692
+ SwapSelectToken: 'Select Token',
693
+ SwapPreview: 'Preview Swap',
694
+ WalletSend: 'Send',
695
+ WalletSendPreview: 'Review Send',
696
+ WalletSendSelectToken: 'Select Token',
697
+ WalletSendConfirmed: 'Confirmed',
698
+ WhatIsANetwork: 'What is a network?',
699
+ WhatIsAWallet: 'What is a Wallet?',
700
+ ConnectWallets: 'Connect Wallet',
701
+ ConnectSocials: 'All Socials',
702
+ ConnectingSocial: socialTitle,
703
+ ConnectingMultiChain: 'Select Chain',
704
+ ConnectingFarcaster: 'Farcaster',
705
+ SwitchActiveChain: 'Switch Chain',
706
+ SmartSessionCreated: undefined,
707
+ SmartSessionList: 'Smart Sessions',
708
+ SIWXSignMessage: 'Sign In',
709
+ PayLoading: 'Processing payment...',
710
+ PayQuote: 'Payment Quote',
711
+ DataCapture: 'Profile',
712
+ DataCaptureOtpConfirm: 'Confirm Email',
713
+ FundWallet: 'Fund Wallet',
714
+ PayWithExchange: 'Deposit from Exchange',
715
+ PayWithExchangeSelectAsset: 'Select Asset',
716
+ SmartAccountSettings: 'Smart Account Settings'
717
+ };
718
+ }
719
+ let W3mHeader = class W3mHeader extends i {
720
+ constructor() {
721
+ super();
722
+ this.unsubscribe = [];
723
+ this.heading = headings()[RouterController.state.view];
724
+ this.network = ChainController.state.activeCaipNetwork;
725
+ this.networkImage = AssetUtil.getNetworkImage(this.network);
726
+ this.showBack = false;
727
+ this.prevHistoryLength = 1;
728
+ this.view = RouterController.state.view;
729
+ this.viewDirection = '';
730
+ this.unsubscribe.push(AssetController.subscribeNetworkImages(() => {
731
+ this.networkImage = AssetUtil.getNetworkImage(this.network);
732
+ }), RouterController.subscribeKey('view', val => {
733
+ setTimeout(() => {
734
+ this.view = val;
735
+ this.heading = headings()[val];
736
+ }, ConstantsUtil.ANIMATION_DURATIONS.HeaderText);
737
+ this.onViewChange();
738
+ this.onHistoryChange();
739
+ }), ChainController.subscribeKey('activeCaipNetwork', val => {
740
+ this.network = val;
741
+ this.networkImage = AssetUtil.getNetworkImage(this.network);
742
+ }));
743
+ }
744
+ disconnectCallback() {
745
+ this.unsubscribe.forEach(unsubscribe => unsubscribe());
746
+ }
747
+ render() {
748
+ const backgroundColor = BACKGROUND_OVERRIDES[RouterController.state.view] ?? vars.tokens.theme.backgroundPrimary;
749
+ this.style.setProperty('--local-header-background-color', backgroundColor);
750
+ return b `
751
+ <wui-flex
752
+ .padding=${['0', '4', '0', '4']}
753
+ justifyContent="space-between"
754
+ alignItems="center"
755
+ >
756
+ ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
757
+ </wui-flex>
758
+ `;
759
+ }
760
+ onWalletHelp() {
761
+ EventsController.sendEvent({ type: 'track', event: 'CLICK_WALLET_HELP' });
762
+ RouterController.push('WhatIsAWallet');
763
+ }
764
+ async onClose() {
765
+ await ModalUtil.safeClose();
766
+ }
767
+ rightHeaderTemplate() {
768
+ const isSmartSessionsEnabled = OptionsController?.state?.features?.smartSessions;
769
+ if (RouterController.state.view !== 'Account' || !isSmartSessionsEnabled) {
770
+ return this.closeButtonTemplate();
771
+ }
772
+ return b `<wui-flex>
773
+ <wui-icon-button
774
+ icon="clock"
775
+ size="lg"
776
+ iconSize="lg"
777
+ type="neutral"
778
+ variant="primary"
779
+ @click=${() => RouterController.push('SmartSessionList')}
780
+ data-testid="w3m-header-smart-sessions"
781
+ ></wui-icon-button>
782
+ ${this.closeButtonTemplate()}
783
+ </wui-flex> `;
784
+ }
785
+ closeButtonTemplate() {
786
+ return b `
787
+ <wui-icon-button
788
+ icon="close"
789
+ size="lg"
790
+ type="neutral"
791
+ variant="primary"
792
+ iconSize="lg"
793
+ @click=${this.onClose.bind(this)}
794
+ data-testid="w3m-header-close"
795
+ ></wui-icon-button>
796
+ `;
797
+ }
798
+ titleTemplate() {
799
+ if (this.view === 'PayQuote') {
800
+ return b `<w3m-pay-header></w3m-pay-header>`;
801
+ }
802
+ const isBeta = BETA_SCREENS.includes(this.view);
803
+ return b `
804
+ <wui-flex
805
+ view-direction="${this.viewDirection}"
806
+ class="w3m-header-title"
807
+ alignItems="center"
808
+ gap="2"
809
+ >
810
+ <wui-text
811
+ display="inline"
812
+ variant="lg-regular"
813
+ color="primary"
814
+ data-testid="w3m-header-text"
815
+ >
816
+ ${this.heading}
817
+ </wui-text>
818
+ ${isBeta ? b `<wui-tag variant="accent" size="md">Beta</wui-tag>` : null}
819
+ </wui-flex>
820
+ `;
821
+ }
822
+ leftHeaderTemplate() {
823
+ const { view } = RouterController.state;
824
+ const isConnectHelp = view === 'Connect';
825
+ const isEmbeddedEnable = OptionsController.state.enableEmbedded;
826
+ const isApproveTransaction = view === 'ApproveTransaction';
827
+ const isConnectingSIWEView = view === 'ConnectingSiwe';
828
+ const isAccountView = view === 'Account';
829
+ const enableNetworkSwitch = OptionsController.state.enableNetworkSwitch;
830
+ const shouldHideBack = isApproveTransaction || isConnectingSIWEView || (isConnectHelp && isEmbeddedEnable);
831
+ if (isAccountView && enableNetworkSwitch) {
832
+ return b `<wui-select
833
+ id="dynamic"
834
+ data-testid="w3m-account-select-network"
835
+ active-network=${o(this.network?.name)}
836
+ @click=${this.onNetworks.bind(this)}
837
+ imageSrc=${o(this.networkImage)}
838
+ ></wui-select>`;
839
+ }
840
+ if (this.showBack && !shouldHideBack) {
841
+ return b `<wui-icon-button
842
+ data-testid="header-back"
843
+ id="dynamic"
844
+ icon="chevronLeft"
845
+ size="lg"
846
+ iconSize="lg"
847
+ type="neutral"
848
+ variant="primary"
849
+ @click=${this.onGoBack.bind(this)}
850
+ ></wui-icon-button>`;
851
+ }
852
+ return b `<wui-icon-button
853
+ data-hidden=${!isConnectHelp}
854
+ id="dynamic"
855
+ icon="helpCircle"
856
+ size="lg"
857
+ iconSize="lg"
858
+ type="neutral"
859
+ variant="primary"
860
+ @click=${this.onWalletHelp.bind(this)}
861
+ ></wui-icon-button>`;
862
+ }
863
+ onNetworks() {
864
+ if (this.isAllowedNetworkSwitch()) {
865
+ EventsController.sendEvent({ type: 'track', event: 'CLICK_NETWORKS' });
866
+ RouterController.push('Networks');
867
+ }
868
+ }
869
+ isAllowedNetworkSwitch() {
870
+ const requestedCaipNetworks = ChainController.getAllRequestedCaipNetworks();
871
+ const isMultiNetwork = requestedCaipNetworks ? requestedCaipNetworks.length > 1 : false;
872
+ const isValidNetwork = requestedCaipNetworks?.find(({ id }) => id === this.network?.id);
873
+ return isMultiNetwork || !isValidNetwork;
874
+ }
875
+ onViewChange() {
876
+ const { history } = RouterController.state;
877
+ let direction = ConstantsUtil.VIEW_DIRECTION.Next;
878
+ if (history.length < this.prevHistoryLength) {
879
+ direction = ConstantsUtil.VIEW_DIRECTION.Prev;
880
+ }
881
+ this.prevHistoryLength = history.length;
882
+ this.viewDirection = direction;
883
+ }
884
+ async onHistoryChange() {
885
+ const { history } = RouterController.state;
886
+ const buttonEl = this.shadowRoot?.querySelector('#dynamic');
887
+ if (history.length > 1 && !this.showBack && buttonEl) {
888
+ await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {
889
+ duration: 200,
890
+ fill: 'forwards',
891
+ easing: 'ease'
892
+ }).finished;
893
+ this.showBack = true;
894
+ buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {
895
+ duration: 200,
896
+ fill: 'forwards',
897
+ easing: 'ease'
898
+ });
899
+ }
900
+ else if (history.length <= 1 && this.showBack && buttonEl) {
901
+ await buttonEl.animate([{ opacity: 1 }, { opacity: 0 }], {
902
+ duration: 200,
903
+ fill: 'forwards',
904
+ easing: 'ease'
905
+ }).finished;
906
+ this.showBack = false;
907
+ buttonEl.animate([{ opacity: 0 }, { opacity: 1 }], {
908
+ duration: 200,
909
+ fill: 'forwards',
910
+ easing: 'ease'
911
+ });
912
+ }
913
+ }
914
+ onGoBack() {
915
+ RouterController.goBack();
916
+ }
917
+ };
918
+ W3mHeader.styles = styles$6;
919
+ __decorate$6([
920
+ r()
921
+ ], W3mHeader.prototype, "heading", void 0);
922
+ __decorate$6([
923
+ r()
924
+ ], W3mHeader.prototype, "network", void 0);
925
+ __decorate$6([
926
+ r()
927
+ ], W3mHeader.prototype, "networkImage", void 0);
928
+ __decorate$6([
929
+ r()
930
+ ], W3mHeader.prototype, "showBack", void 0);
931
+ __decorate$6([
932
+ r()
933
+ ], W3mHeader.prototype, "prevHistoryLength", void 0);
934
+ __decorate$6([
935
+ r()
936
+ ], W3mHeader.prototype, "view", void 0);
937
+ __decorate$6([
938
+ r()
939
+ ], W3mHeader.prototype, "viewDirection", void 0);
940
+ W3mHeader = __decorate$6([
941
+ customElement('w3m-header')
942
+ ], W3mHeader);
943
+
944
+ var styles$5 = css `
945
+ :host {
946
+ display: flex;
947
+ align-items: center;
948
+ gap: ${({ spacing }) => spacing[1]};
949
+ padding: ${({ spacing }) => spacing[2]} ${({ spacing }) => spacing[3]}
950
+ ${({ spacing }) => spacing[2]} ${({ spacing }) => spacing[2]};
951
+ border-radius: ${({ borderRadius }) => borderRadius[20]};
952
+ background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
953
+ box-shadow:
954
+ 0px 0px 8px 0px rgba(0, 0, 0, 0.1),
955
+ inset 0 0 0 1px ${({ tokens }) => tokens.theme.borderPrimary};
956
+ max-width: 320px;
957
+ }
958
+
959
+ wui-icon-box {
960
+ border-radius: ${({ borderRadius }) => borderRadius.round} !important;
961
+ overflow: hidden;
962
+ }
963
+
964
+ wui-loading-spinner {
965
+ padding: ${({ spacing }) => spacing[1]};
966
+ background-color: ${({ tokens }) => tokens.core.foregroundAccent010};
967
+ border-radius: ${({ borderRadius }) => borderRadius.round} !important;
968
+ }
969
+ `;
970
+
971
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
972
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
973
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
974
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
975
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
976
+ };
977
+ let WuiSnackbar = class WuiSnackbar extends i {
978
+ constructor() {
979
+ super(...arguments);
980
+ this.message = '';
981
+ this.variant = 'success';
982
+ }
983
+ render() {
984
+ return b `
985
+ ${this.templateIcon()}
986
+ <wui-text variant="lg-regular" color="primary" data-testid="wui-snackbar-message"
987
+ >${this.message}</wui-text
988
+ >
989
+ `;
990
+ }
991
+ templateIcon() {
992
+ const COLOR = {
993
+ success: 'success',
994
+ error: 'error',
995
+ warning: 'warning',
996
+ info: 'default'
997
+ };
998
+ const ICON = {
999
+ success: 'checkmark',
1000
+ error: 'warning',
1001
+ warning: 'warningCircle',
1002
+ info: 'info'
1003
+ };
1004
+ if (this.variant === 'loading') {
1005
+ return b `<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`;
1006
+ }
1007
+ return b `<wui-icon-box
1008
+ size="md"
1009
+ color=${COLOR[this.variant]}
1010
+ icon=${ICON[this.variant]}
1011
+ ></wui-icon-box>`;
1012
+ }
1013
+ };
1014
+ WuiSnackbar.styles = [resetStyles, styles$5];
1015
+ __decorate$5([
1016
+ n()
1017
+ ], WuiSnackbar.prototype, "message", void 0);
1018
+ __decorate$5([
1019
+ n()
1020
+ ], WuiSnackbar.prototype, "variant", void 0);
1021
+ WuiSnackbar = __decorate$5([
1022
+ customElement('wui-snackbar')
1023
+ ], WuiSnackbar);
1024
+
1025
+ var styles$4 = i$1 `
1026
+ :host {
1027
+ display: block;
1028
+ position: absolute;
1029
+ opacity: 0;
1030
+ pointer-events: none;
1031
+ top: 11px;
1032
+ left: 50%;
1033
+ width: max-content;
1034
+ }
1035
+ `;
1036
+
1037
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1038
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1039
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1040
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1041
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1042
+ };
1043
+ let W3mSnackBar = class W3mSnackBar extends i {
1044
+ constructor() {
1045
+ super();
1046
+ this.unsubscribe = [];
1047
+ this.timeout = undefined;
1048
+ this.open = SnackController.state.open;
1049
+ this.unsubscribe.push(SnackController.subscribeKey('open', val => {
1050
+ this.open = val;
1051
+ this.onOpen();
1052
+ }));
1053
+ }
1054
+ disconnectedCallback() {
1055
+ clearTimeout(this.timeout);
1056
+ this.unsubscribe.forEach(unsubscribe => unsubscribe());
1057
+ }
1058
+ render() {
1059
+ const { message, variant } = SnackController.state;
1060
+ return b ` <wui-snackbar message=${message} variant=${variant}></wui-snackbar> `;
1061
+ }
1062
+ onOpen() {
1063
+ clearTimeout(this.timeout);
1064
+ if (this.open) {
1065
+ this.animate([
1066
+ { opacity: 0, transform: 'translateX(-50%) scale(0.85)' },
1067
+ { opacity: 1, transform: 'translateX(-50%) scale(1)' }
1068
+ ], {
1069
+ duration: 150,
1070
+ fill: 'forwards',
1071
+ easing: 'ease'
1072
+ });
1073
+ if (this.timeout) {
1074
+ clearTimeout(this.timeout);
1075
+ }
1076
+ if (SnackController.state.autoClose) {
1077
+ this.timeout = setTimeout(() => SnackController.hide(), 2500);
1078
+ }
1079
+ }
1080
+ else {
1081
+ this.animate([
1082
+ { opacity: 1, transform: 'translateX(-50%) scale(1)' },
1083
+ { opacity: 0, transform: 'translateX(-50%) scale(0.85)' }
1084
+ ], {
1085
+ duration: 150,
1086
+ fill: 'forwards',
1087
+ easing: 'ease'
1088
+ });
1089
+ }
1090
+ }
1091
+ };
1092
+ W3mSnackBar.styles = styles$4;
1093
+ __decorate$4([
1094
+ r()
1095
+ ], W3mSnackBar.prototype, "open", void 0);
1096
+ W3mSnackBar = __decorate$4([
1097
+ customElement('w3m-snackbar')
1098
+ ], W3mSnackBar);
1099
+
1100
+ var styles$3 = css `
1101
+ :host {
1102
+ z-index: ${({ tokens }) => tokens.core.zIndex};
1103
+ display: block;
1104
+ backface-visibility: hidden;
1105
+ will-change: opacity;
1106
+ position: fixed;
1107
+ top: 0;
1108
+ left: 0;
1109
+ right: 0;
1110
+ bottom: 0;
1111
+ pointer-events: none;
1112
+ opacity: 0;
1113
+ background-color: ${({ tokens }) => tokens.theme.overlay};
1114
+ backdrop-filter: blur(0px);
1115
+ transition:
1116
+ opacity ${({ durations }) => durations['lg']} ${({ easings }) => easings['ease-out-power-2']},
1117
+ backdrop-filter ${({ durations }) => durations['lg']}
1118
+ ${({ easings }) => easings['ease-out-power-2']};
1119
+ will-change: opacity;
1120
+ }
1121
+
1122
+ :host(.open) {
1123
+ opacity: 1;
1124
+ backdrop-filter: blur(8px);
1125
+ }
1126
+
1127
+ :host(.appkit-modal) {
1128
+ position: relative;
1129
+ pointer-events: unset;
1130
+ background: none;
1131
+ width: 100%;
1132
+ opacity: 1;
1133
+ }
1134
+
1135
+ wui-card {
1136
+ max-width: var(--apkt-modal-width);
1137
+ width: 100%;
1138
+ position: relative;
1139
+ outline: none;
1140
+ transform: translateY(4px);
1141
+ box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
1142
+ transition:
1143
+ transform ${({ durations }) => durations['lg']}
1144
+ ${({ easings }) => easings['ease-out-power-2']},
1145
+ border-radius ${({ durations }) => durations['lg']}
1146
+ ${({ easings }) => easings['ease-out-power-1']},
1147
+ background-color ${({ durations }) => durations['lg']}
1148
+ ${({ easings }) => easings['ease-out-power-1']},
1149
+ box-shadow ${({ durations }) => durations['lg']}
1150
+ ${({ easings }) => easings['ease-out-power-1']};
1151
+ will-change: border-radius, background-color, transform, box-shadow;
1152
+ background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
1153
+ padding: var(--local-modal-padding);
1154
+ box-sizing: border-box;
1155
+ }
1156
+
1157
+ :host(.open) wui-card {
1158
+ transform: translateY(0px);
1159
+ }
1160
+
1161
+ wui-card::before {
1162
+ z-index: 1;
1163
+ pointer-events: none;
1164
+ content: '';
1165
+ position: absolute;
1166
+ inset: 0;
1167
+ border-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
1168
+ transition: box-shadow ${({ durations }) => durations['lg']}
1169
+ ${({ easings }) => easings['ease-out-power-2']};
1170
+ transition-delay: ${({ durations }) => durations['md']};
1171
+ will-change: box-shadow;
1172
+ }
1173
+
1174
+ :host([data-mobile-fullscreen='true']) wui-card::before {
1175
+ border-radius: 0px;
1176
+ }
1177
+
1178
+ :host([data-border='true']) wui-card::before {
1179
+ box-shadow: inset 0px 0px 0px 4px ${({ tokens }) => tokens.theme.foregroundSecondary};
1180
+ }
1181
+
1182
+ :host([data-border='false']) wui-card::before {
1183
+ box-shadow: inset 0px 0px 0px 1px ${({ tokens }) => tokens.theme.borderPrimaryDark};
1184
+ }
1185
+
1186
+ :host([data-border='true']) wui-card {
1187
+ animation:
1188
+ fade-in ${({ durations }) => durations['lg']} ${({ easings }) => easings['ease-out-power-2']},
1189
+ card-background-border var(--apkt-duration-dynamic)
1190
+ ${({ easings }) => easings['ease-out-power-2']};
1191
+ animation-fill-mode: backwards, both;
1192
+ animation-delay: var(--apkt-duration-dynamic);
1193
+ }
1194
+
1195
+ :host([data-border='false']) wui-card {
1196
+ animation:
1197
+ fade-in ${({ durations }) => durations['lg']} ${({ easings }) => easings['ease-out-power-2']},
1198
+ card-background-default var(--apkt-duration-dynamic)
1199
+ ${({ easings }) => easings['ease-out-power-2']};
1200
+ animation-fill-mode: backwards, both;
1201
+ animation-delay: 0s;
1202
+ }
1203
+
1204
+ :host(.appkit-modal) wui-card {
1205
+ max-width: var(--apkt-modal-width);
1206
+ }
1207
+
1208
+ wui-card[shake='true'] {
1209
+ animation:
1210
+ fade-in ${({ durations }) => durations['lg']} ${({ easings }) => easings['ease-out-power-2']},
1211
+ w3m-shake ${({ durations }) => durations['xl']}
1212
+ ${({ easings }) => easings['ease-out-power-2']};
1213
+ }
1214
+
1215
+ wui-flex {
1216
+ overflow-x: hidden;
1217
+ overflow-y: auto;
1218
+ display: flex;
1219
+ align-items: center;
1220
+ justify-content: center;
1221
+ width: 100%;
1222
+ height: 100%;
1223
+ }
1224
+
1225
+ @media (max-height: 700px) and (min-width: 431px) {
1226
+ wui-flex {
1227
+ align-items: flex-start;
1228
+ }
1229
+
1230
+ wui-card {
1231
+ margin: var(--apkt-spacing-6) 0px;
1232
+ }
1233
+ }
1234
+
1235
+ @media (max-width: 430px) {
1236
+ :host([data-mobile-fullscreen='true']) {
1237
+ height: 100dvh;
1238
+ }
1239
+ :host([data-mobile-fullscreen='true']) wui-flex {
1240
+ align-items: stretch;
1241
+ }
1242
+ :host([data-mobile-fullscreen='true']) wui-card {
1243
+ max-width: 100%;
1244
+ height: 100%;
1245
+ border-radius: 0;
1246
+ border: none;
1247
+ }
1248
+ :host(:not([data-mobile-fullscreen='true'])) wui-flex {
1249
+ align-items: flex-end;
1250
+ }
1251
+
1252
+ :host(:not([data-mobile-fullscreen='true'])) wui-card {
1253
+ max-width: 100%;
1254
+ border-bottom: none;
1255
+ }
1256
+
1257
+ :host(:not([data-mobile-fullscreen='true'])) wui-card[data-embedded='true'] {
1258
+ border-bottom-left-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
1259
+ border-bottom-right-radius: clamp(0px, var(--apkt-borderRadius-8), 44px);
1260
+ }
1261
+
1262
+ :host(:not([data-mobile-fullscreen='true'])) wui-card:not([data-embedded='true']) {
1263
+ border-bottom-left-radius: 0px;
1264
+ border-bottom-right-radius: 0px;
1265
+ }
1266
+
1267
+ wui-card[shake='true'] {
1268
+ animation: w3m-shake 0.5s ${({ easings }) => easings['ease-out-power-2']};
1269
+ }
1270
+ }
1271
+
1272
+ @keyframes fade-in {
1273
+ 0% {
1274
+ transform: scale(0.99) translateY(4px);
1275
+ }
1276
+ 100% {
1277
+ transform: scale(1) translateY(0);
1278
+ }
1279
+ }
1280
+
1281
+ @keyframes w3m-shake {
1282
+ 0% {
1283
+ transform: scale(1) rotate(0deg);
1284
+ }
1285
+ 20% {
1286
+ transform: scale(1) rotate(-1deg);
1287
+ }
1288
+ 40% {
1289
+ transform: scale(1) rotate(1.5deg);
1290
+ }
1291
+ 60% {
1292
+ transform: scale(1) rotate(-1.5deg);
1293
+ }
1294
+ 80% {
1295
+ transform: scale(1) rotate(1deg);
1296
+ }
1297
+ 100% {
1298
+ transform: scale(1) rotate(0deg);
1299
+ }
1300
+ }
1301
+
1302
+ @keyframes card-background-border {
1303
+ from {
1304
+ background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
1305
+ }
1306
+ to {
1307
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
1308
+ }
1309
+ }
1310
+
1311
+ @keyframes card-background-default {
1312
+ from {
1313
+ background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
1314
+ }
1315
+ to {
1316
+ background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
1317
+ }
1318
+ }
1319
+ `;
1320
+
1321
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1322
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1323
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1324
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1325
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1326
+ };
1327
+ const SCROLL_LOCK = 'scroll-lock';
1328
+ const PADDING_OVERRIDES = {
1329
+ PayWithExchange: '0',
1330
+ PayWithExchangeSelectAsset: '0',
1331
+ Pay: '0',
1332
+ PayQuote: '0',
1333
+ PayLoading: '0'
1334
+ };
1335
+ class W3mModalBase extends i {
1336
+ constructor() {
1337
+ super();
1338
+ this.unsubscribe = [];
1339
+ this.abortController = undefined;
1340
+ this.hasPrefetched = false;
1341
+ this.enableEmbedded = OptionsController.state.enableEmbedded;
1342
+ this.open = ModalController.state.open;
1343
+ this.caipAddress = ChainController.state.activeCaipAddress;
1344
+ this.caipNetwork = ChainController.state.activeCaipNetwork;
1345
+ this.shake = ModalController.state.shake;
1346
+ this.filterByNamespace = ConnectorController.state.filterByNamespace;
1347
+ this.padding = vars.spacing[1];
1348
+ this.mobileFullScreen = OptionsController.state.enableMobileFullScreen;
1349
+ this.initializeTheming();
1350
+ ApiController.prefetchAnalyticsConfig();
1351
+ this.unsubscribe.push(...[
1352
+ ModalController.subscribeKey('open', val => (val ? this.onOpen() : this.onClose())),
1353
+ ModalController.subscribeKey('shake', val => (this.shake = val)),
1354
+ ChainController.subscribeKey('activeCaipNetwork', val => this.onNewNetwork(val)),
1355
+ ChainController.subscribeKey('activeCaipAddress', val => this.onNewAddress(val)),
1356
+ OptionsController.subscribeKey('enableEmbedded', val => (this.enableEmbedded = val)),
1357
+ ConnectorController.subscribeKey('filterByNamespace', val => {
1358
+ if (this.filterByNamespace !== val && !ChainController.getAccountData(val)?.caipAddress) {
1359
+ ApiController.fetchRecommendedWallets();
1360
+ this.filterByNamespace = val;
1361
+ }
1362
+ }),
1363
+ RouterController.subscribeKey('view', () => {
1364
+ this.dataset['border'] = HelpersUtil.hasFooter() ? 'true' : 'false';
1365
+ this.padding = PADDING_OVERRIDES[RouterController.state.view] ?? vars.spacing[1];
1366
+ })
1367
+ ]);
1368
+ }
1369
+ firstUpdated() {
1370
+ this.dataset['border'] = HelpersUtil.hasFooter() ? 'true' : 'false';
1371
+ if (this.mobileFullScreen) {
1372
+ this.setAttribute('data-mobile-fullscreen', 'true');
1373
+ }
1374
+ if (this.caipAddress) {
1375
+ if (this.enableEmbedded) {
1376
+ ModalController.close();
1377
+ this.prefetch();
1378
+ return;
1379
+ }
1380
+ this.onNewAddress(this.caipAddress);
1381
+ }
1382
+ if (this.open) {
1383
+ this.onOpen();
1384
+ }
1385
+ if (this.enableEmbedded) {
1386
+ this.prefetch();
1387
+ }
1388
+ }
1389
+ disconnectedCallback() {
1390
+ this.unsubscribe.forEach(unsubscribe => unsubscribe());
1391
+ this.onRemoveKeyboardListener();
1392
+ }
1393
+ render() {
1394
+ this.style.setProperty('--local-modal-padding', this.padding);
1395
+ if (this.enableEmbedded) {
1396
+ return b `${this.contentTemplate()}
1397
+ <w3m-tooltip></w3m-tooltip> `;
1398
+ }
1399
+ return this.open
1400
+ ? b `
1401
+ <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
1402
+ ${this.contentTemplate()}
1403
+ </wui-flex>
1404
+ <w3m-tooltip></w3m-tooltip>
1405
+ `
1406
+ : null;
1407
+ }
1408
+ contentTemplate() {
1409
+ return b ` <wui-card
1410
+ shake="${this.shake}"
1411
+ data-embedded="${o(this.enableEmbedded)}"
1412
+ role="alertdialog"
1413
+ aria-modal="true"
1414
+ tabindex="0"
1415
+ data-testid="w3m-modal-card"
1416
+ >
1417
+ <w3m-header></w3m-header>
1418
+ <w3m-router></w3m-router>
1419
+ <w3m-footer></w3m-footer>
1420
+ <w3m-snackbar></w3m-snackbar>
1421
+ <w3m-alertbar></w3m-alertbar>
1422
+ </wui-card>`;
1423
+ }
1424
+ async onOverlayClick(event) {
1425
+ if (event.target === event.currentTarget) {
1426
+ if (this.mobileFullScreen) {
1427
+ return;
1428
+ }
1429
+ await this.handleClose();
1430
+ }
1431
+ }
1432
+ async handleClose() {
1433
+ await ModalUtil.safeClose();
1434
+ }
1435
+ initializeTheming() {
1436
+ const { themeVariables, themeMode } = ThemeController.state;
1437
+ const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);
1438
+ initializeTheming(themeVariables, defaultThemeMode);
1439
+ }
1440
+ onClose() {
1441
+ this.open = false;
1442
+ this.classList.remove('open');
1443
+ this.onScrollUnlock();
1444
+ SnackController.hide();
1445
+ this.onRemoveKeyboardListener();
1446
+ }
1447
+ onOpen() {
1448
+ this.open = true;
1449
+ this.classList.add('open');
1450
+ this.onScrollLock();
1451
+ this.onAddKeyboardListener();
1452
+ }
1453
+ onScrollLock() {
1454
+ const styleTag = document.createElement('style');
1455
+ styleTag.dataset['w3m'] = SCROLL_LOCK;
1456
+ styleTag.textContent = `
1457
+ body {
1458
+ touch-action: none;
1459
+ overflow: hidden;
1460
+ overscroll-behavior: contain;
1461
+ }
1462
+ w3m-modal {
1463
+ pointer-events: auto;
1464
+ }
1465
+ `;
1466
+ document.head.appendChild(styleTag);
1467
+ }
1468
+ onScrollUnlock() {
1469
+ const styleTag = document.head.querySelector(`style[data-w3m="${SCROLL_LOCK}"]`);
1470
+ if (styleTag) {
1471
+ styleTag.remove();
1472
+ }
1473
+ }
1474
+ onAddKeyboardListener() {
1475
+ this.abortController = new AbortController();
1476
+ const card = this.shadowRoot?.querySelector('wui-card');
1477
+ card?.focus();
1478
+ window.addEventListener('keydown', event => {
1479
+ if (event.key === 'Escape') {
1480
+ this.handleClose();
1481
+ }
1482
+ else if (event.key === 'Tab') {
1483
+ const { tagName } = event.target;
1484
+ if (tagName && !tagName.includes('W3M-') && !tagName.includes('WUI-')) {
1485
+ card?.focus();
1486
+ }
1487
+ }
1488
+ }, this.abortController);
1489
+ }
1490
+ onRemoveKeyboardListener() {
1491
+ this.abortController?.abort();
1492
+ this.abortController = undefined;
1493
+ }
1494
+ async onNewAddress(caipAddress) {
1495
+ const isSwitchingNamespace = ChainController.state.isSwitchingNamespace;
1496
+ const isInProfileView = RouterController.state.view === 'ProfileWallets';
1497
+ const shouldClose = !caipAddress && !isSwitchingNamespace && !isInProfileView;
1498
+ if (shouldClose) {
1499
+ ModalController.close();
1500
+ }
1501
+ await SIWXUtil.initializeIfEnabled(caipAddress);
1502
+ this.caipAddress = caipAddress;
1503
+ ChainController.setIsSwitchingNamespace(false);
1504
+ }
1505
+ onNewNetwork(nextCaipNetwork) {
1506
+ const prevCaipNetwork = this.caipNetwork;
1507
+ const prevCaipNetworkId = prevCaipNetwork?.caipNetworkId?.toString();
1508
+ const nextNetworkId = nextCaipNetwork?.caipNetworkId?.toString();
1509
+ const didNetworkChange = prevCaipNetworkId !== nextNetworkId;
1510
+ const isUnsupportedNetworkScreen = RouterController.state.view === 'UnsupportedChain';
1511
+ const isModalOpen = ModalController.state.open;
1512
+ let shouldGoBack = false;
1513
+ if (this.enableEmbedded && RouterController.state.view === 'SwitchNetwork') {
1514
+ shouldGoBack = true;
1515
+ }
1516
+ if (didNetworkChange) {
1517
+ SwapController.resetState();
1518
+ }
1519
+ if (isModalOpen && isUnsupportedNetworkScreen) {
1520
+ shouldGoBack = true;
1521
+ }
1522
+ if (shouldGoBack && RouterController.state.view !== 'SIWXSignMessage') {
1523
+ RouterController.goBack();
1524
+ }
1525
+ this.caipNetwork = nextCaipNetwork;
1526
+ }
1527
+ prefetch() {
1528
+ if (!this.hasPrefetched) {
1529
+ ApiController.prefetch();
1530
+ ApiController.fetchWalletsByPage({ page: 1 });
1531
+ this.hasPrefetched = true;
1532
+ }
1533
+ }
1534
+ }
1535
+ W3mModalBase.styles = styles$3;
1536
+ __decorate$3([
1537
+ n({ type: Boolean })
1538
+ ], W3mModalBase.prototype, "enableEmbedded", void 0);
1539
+ __decorate$3([
1540
+ r()
1541
+ ], W3mModalBase.prototype, "open", void 0);
1542
+ __decorate$3([
1543
+ r()
1544
+ ], W3mModalBase.prototype, "caipAddress", void 0);
1545
+ __decorate$3([
1546
+ r()
1547
+ ], W3mModalBase.prototype, "caipNetwork", void 0);
1548
+ __decorate$3([
1549
+ r()
1550
+ ], W3mModalBase.prototype, "shake", void 0);
1551
+ __decorate$3([
1552
+ r()
1553
+ ], W3mModalBase.prototype, "filterByNamespace", void 0);
1554
+ __decorate$3([
1555
+ r()
1556
+ ], W3mModalBase.prototype, "padding", void 0);
1557
+ __decorate$3([
1558
+ r()
1559
+ ], W3mModalBase.prototype, "mobileFullScreen", void 0);
1560
+ let W3mModal = class W3mModal extends W3mModalBase {
1561
+ };
1562
+ W3mModal = __decorate$3([
1563
+ customElement('w3m-modal')
1564
+ ], W3mModal);
1565
+ let AppKitModal = class AppKitModal extends W3mModalBase {
1566
+ };
1567
+ AppKitModal = __decorate$3([
1568
+ customElement('appkit-modal')
1569
+ ], AppKitModal);
1570
+
1571
+ var styles$2 = css `
1572
+ .icon-box {
1573
+ width: 64px;
1574
+ height: 64px;
1575
+ border-radius: ${({ borderRadius }) => borderRadius[5]};
1576
+ background-color: ${({ colors }) => colors.semanticError010};
1577
+ }
1578
+ `;
1579
+
1580
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1581
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1582
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1583
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1584
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1585
+ };
1586
+ let W3mUsageExceededView = class W3mUsageExceededView extends i {
1587
+ constructor() {
1588
+ super();
1589
+ }
1590
+ render() {
1591
+ return b `
1592
+ <wui-flex
1593
+ flexDirection="column"
1594
+ alignItems="center"
1595
+ gap="4"
1596
+ .padding="${['1', '3', '4', '3']}"
1597
+ >
1598
+ <wui-flex justifyContent="center" alignItems="center" class="icon-box">
1599
+ <wui-icon size="xxl" color="error" name="warningCircle"></wui-icon>
1600
+ </wui-flex>
1601
+
1602
+ <wui-text variant="lg-medium" color="primary" align="center">
1603
+ The app isn't responding as expected
1604
+ </wui-text>
1605
+ <wui-text variant="md-regular" color="secondary" align="center">
1606
+ Try again or reach out to the app team for help.
1607
+ </wui-text>
1608
+
1609
+ <wui-button
1610
+ variant="neutral-secondary"
1611
+ size="md"
1612
+ @click=${this.onTryAgainClick.bind(this)}
1613
+ data-testid="w3m-usage-exceeded-button"
1614
+ >
1615
+ <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
1616
+ Try Again
1617
+ </wui-button>
1618
+ </wui-flex>
1619
+ `;
1620
+ }
1621
+ onTryAgainClick() {
1622
+ RouterController.goBack();
1623
+ }
1624
+ };
1625
+ W3mUsageExceededView.styles = styles$2;
1626
+ W3mUsageExceededView = __decorate$2([
1627
+ customElement('w3m-usage-exceeded-view')
1628
+ ], W3mUsageExceededView);
1629
+
1630
+ var styles$1 = css `
1631
+ :host {
1632
+ width: 100%;
1633
+ }
1634
+ `;
1635
+
1636
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1637
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1638
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1639
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1640
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1641
+ };
1642
+ let W3mListWallet = class W3mListWallet extends i {
1643
+ constructor() {
1644
+ super(...arguments);
1645
+ this.hasImpressionSent = false;
1646
+ this.walletImages = [];
1647
+ this.imageSrc = '';
1648
+ this.name = '';
1649
+ this.size = 'md';
1650
+ this.tabIdx = undefined;
1651
+ this.disabled = false;
1652
+ this.showAllWallets = false;
1653
+ this.loading = false;
1654
+ this.loadingSpinnerColor = 'accent-100';
1655
+ this.rdnsId = '';
1656
+ this.displayIndex = undefined;
1657
+ this.walletRank = undefined;
1658
+ this.namespaces = [];
1659
+ }
1660
+ connectedCallback() {
1661
+ super.connectedCallback();
1662
+ }
1663
+ disconnectedCallback() {
1664
+ super.disconnectedCallback();
1665
+ this.cleanupIntersectionObserver();
1666
+ }
1667
+ updated(changedProperties) {
1668
+ super.updated(changedProperties);
1669
+ if (changedProperties.has('name') ||
1670
+ changedProperties.has('imageSrc') ||
1671
+ changedProperties.has('walletRank')) {
1672
+ this.hasImpressionSent = false;
1673
+ }
1674
+ const hasWalletRankChanged = changedProperties.has('walletRank') && this.walletRank;
1675
+ if (hasWalletRankChanged && !this.intersectionObserver) {
1676
+ this.setupIntersectionObserver();
1677
+ }
1678
+ }
1679
+ setupIntersectionObserver() {
1680
+ this.intersectionObserver = new IntersectionObserver(entries => {
1681
+ entries.forEach(entry => {
1682
+ if (entry.isIntersecting && !this.loading && !this.hasImpressionSent) {
1683
+ this.sendImpressionEvent();
1684
+ }
1685
+ });
1686
+ }, { threshold: 0.1 });
1687
+ this.intersectionObserver.observe(this);
1688
+ }
1689
+ cleanupIntersectionObserver() {
1690
+ if (this.intersectionObserver) {
1691
+ this.intersectionObserver.disconnect();
1692
+ this.intersectionObserver = undefined;
1693
+ }
1694
+ }
1695
+ sendImpressionEvent() {
1696
+ if (!this.name || this.hasImpressionSent || !this.walletRank) {
1697
+ return;
1698
+ }
1699
+ this.hasImpressionSent = true;
1700
+ if (this.rdnsId || this.name) {
1701
+ EventsController.sendWalletImpressionEvent({
1702
+ name: this.name,
1703
+ walletRank: this.walletRank,
1704
+ rdnsId: this.rdnsId,
1705
+ view: RouterController.state.view,
1706
+ displayIndex: this.displayIndex
1707
+ });
1708
+ }
1709
+ }
1710
+ handleGetWalletNamespaces() {
1711
+ const isMultiChain = Object.keys(AdapterController.state.adapters).length > 1;
1712
+ if (isMultiChain) {
1713
+ return this.namespaces;
1714
+ }
1715
+ return [];
1716
+ }
1717
+ render() {
1718
+ return b `
1719
+ <wui-list-wallet
1720
+ .walletImages=${this.walletImages}
1721
+ imageSrc=${o(this.imageSrc)}
1722
+ name=${this.name}
1723
+ size=${o(this.size)}
1724
+ tagLabel=${o(this.tagLabel)}
1725
+ .tagVariant=${this.tagVariant}
1726
+ .walletIcon=${this.walletIcon}
1727
+ .tabIdx=${this.tabIdx}
1728
+ .disabled=${this.disabled}
1729
+ .showAllWallets=${this.showAllWallets}
1730
+ .loading=${this.loading}
1731
+ loadingSpinnerColor=${this.loadingSpinnerColor}
1732
+ .namespaces=${this.handleGetWalletNamespaces()}
1733
+ ></wui-list-wallet>
1734
+ `;
1735
+ }
1736
+ };
1737
+ W3mListWallet.styles = styles$1;
1738
+ __decorate$1([
1739
+ n({ type: Array })
1740
+ ], W3mListWallet.prototype, "walletImages", void 0);
1741
+ __decorate$1([
1742
+ n()
1743
+ ], W3mListWallet.prototype, "imageSrc", void 0);
1744
+ __decorate$1([
1745
+ n()
1746
+ ], W3mListWallet.prototype, "name", void 0);
1747
+ __decorate$1([
1748
+ n()
1749
+ ], W3mListWallet.prototype, "size", void 0);
1750
+ __decorate$1([
1751
+ n()
1752
+ ], W3mListWallet.prototype, "tagLabel", void 0);
1753
+ __decorate$1([
1754
+ n()
1755
+ ], W3mListWallet.prototype, "tagVariant", void 0);
1756
+ __decorate$1([
1757
+ n()
1758
+ ], W3mListWallet.prototype, "walletIcon", void 0);
1759
+ __decorate$1([
1760
+ n()
1761
+ ], W3mListWallet.prototype, "tabIdx", void 0);
1762
+ __decorate$1([
1763
+ n({ type: Boolean })
1764
+ ], W3mListWallet.prototype, "disabled", void 0);
1765
+ __decorate$1([
1766
+ n({ type: Boolean })
1767
+ ], W3mListWallet.prototype, "showAllWallets", void 0);
1768
+ __decorate$1([
1769
+ n({ type: Boolean })
1770
+ ], W3mListWallet.prototype, "loading", void 0);
1771
+ __decorate$1([
1772
+ n({ type: String })
1773
+ ], W3mListWallet.prototype, "loadingSpinnerColor", void 0);
1774
+ __decorate$1([
1775
+ n()
1776
+ ], W3mListWallet.prototype, "rdnsId", void 0);
1777
+ __decorate$1([
1778
+ n()
1779
+ ], W3mListWallet.prototype, "displayIndex", void 0);
1780
+ __decorate$1([
1781
+ n()
1782
+ ], W3mListWallet.prototype, "walletRank", void 0);
1783
+ __decorate$1([
1784
+ n({ type: Array })
1785
+ ], W3mListWallet.prototype, "namespaces", void 0);
1786
+ W3mListWallet = __decorate$1([
1787
+ customElement('w3m-list-wallet')
1788
+ ], W3mListWallet);
1789
+
1790
+ var styles = css `
1791
+ :host {
1792
+ --local-duration-height: 0s;
1793
+ --local-duration: ${({ durations }) => durations['lg']};
1794
+ --local-transition: ${({ easings }) => easings['ease-out-power-2']};
1795
+ }
1796
+
1797
+ .container {
1798
+ display: block;
1799
+ overflow: hidden;
1800
+ overflow: hidden;
1801
+ position: relative;
1802
+ height: var(--local-container-height);
1803
+ transition: height var(--local-duration-height) var(--local-transition);
1804
+ will-change: height, padding-bottom;
1805
+ }
1806
+
1807
+ .container[data-mobile-fullscreen='true'] {
1808
+ overflow: scroll;
1809
+ }
1810
+
1811
+ .page {
1812
+ position: absolute;
1813
+ top: 0;
1814
+ left: 0;
1815
+ right: 0;
1816
+ width: 100%;
1817
+ height: auto;
1818
+ width: inherit;
1819
+ box-sizing: border-box;
1820
+ display: flex;
1821
+ flex-direction: column;
1822
+ background-color: ${({ tokens }) => tokens.theme.backgroundPrimary};
1823
+ border-bottom-left-radius: var(--local-border-bottom-radius);
1824
+ border-bottom-right-radius: var(--local-border-bottom-radius);
1825
+ transition: border-bottom-left-radius var(--local-duration) var(--local-transition);
1826
+ }
1827
+
1828
+ .page[data-mobile-fullscreen='true'] {
1829
+ height: 100%;
1830
+ }
1831
+
1832
+ .page-content {
1833
+ display: flex;
1834
+ flex-direction: column;
1835
+ min-height: 100%;
1836
+ }
1837
+
1838
+ .footer {
1839
+ height: var(--apkt-footer-height);
1840
+ }
1841
+
1842
+ div.page[view-direction^='prev-'] .page-content {
1843
+ animation:
1844
+ slide-left-out var(--local-duration) forwards var(--local-transition),
1845
+ slide-left-in var(--local-duration) forwards var(--local-transition);
1846
+ animation-delay: 0ms, var(--local-duration, ${({ durations }) => durations['lg']});
1847
+ }
1848
+
1849
+ div.page[view-direction^='next-'] .page-content {
1850
+ animation:
1851
+ slide-right-out var(--local-duration) forwards var(--local-transition),
1852
+ slide-right-in var(--local-duration) forwards var(--local-transition);
1853
+ animation-delay: 0ms, var(--local-duration, ${({ durations }) => durations['lg']});
1854
+ }
1855
+
1856
+ @keyframes slide-left-out {
1857
+ from {
1858
+ transform: translateX(0px) scale(1);
1859
+ opacity: 1;
1860
+ filter: blur(0px);
1861
+ }
1862
+ to {
1863
+ transform: translateX(8px) scale(0.99);
1864
+ opacity: 0;
1865
+ filter: blur(4px);
1866
+ }
1867
+ }
1868
+
1869
+ @keyframes slide-left-in {
1870
+ from {
1871
+ transform: translateX(-8px) scale(0.99);
1872
+ opacity: 0;
1873
+ filter: blur(4px);
1874
+ }
1875
+ to {
1876
+ transform: translateX(0) translateY(0) scale(1);
1877
+ opacity: 1;
1878
+ filter: blur(0px);
1879
+ }
1880
+ }
1881
+
1882
+ @keyframes slide-right-out {
1883
+ from {
1884
+ transform: translateX(0px) scale(1);
1885
+ opacity: 1;
1886
+ filter: blur(0px);
1887
+ }
1888
+ to {
1889
+ transform: translateX(-8px) scale(0.99);
1890
+ opacity: 0;
1891
+ filter: blur(4px);
1892
+ }
1893
+ }
1894
+
1895
+ @keyframes slide-right-in {
1896
+ from {
1897
+ transform: translateX(8px) scale(0.99);
1898
+ opacity: 0;
1899
+ filter: blur(4px);
1900
+ }
1901
+ to {
1902
+ transform: translateX(0) translateY(0) scale(1);
1903
+ opacity: 1;
1904
+ filter: blur(0px);
1905
+ }
1906
+ }
1907
+ `;
1908
+
1909
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1910
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1911
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1912
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1913
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1914
+ };
1915
+ const HEADER_HEIGHT = 60;
1916
+ let W3mRouterContainer = class W3mRouterContainer extends i {
1917
+ constructor() {
1918
+ super(...arguments);
1919
+ this.resizeObserver = undefined;
1920
+ this.transitionDuration = '0.15s';
1921
+ this.transitionFunction = '';
1922
+ this.history = '';
1923
+ this.view = '';
1924
+ this.setView = undefined;
1925
+ this.viewDirection = '';
1926
+ this.historyState = '';
1927
+ this.previousHeight = '0px';
1928
+ this.mobileFullScreen = OptionsController.state.enableMobileFullScreen;
1929
+ this.onViewportResize = () => {
1930
+ this.updateContainerHeight();
1931
+ };
1932
+ }
1933
+ updated(changedProps) {
1934
+ if (changedProps.has('history')) {
1935
+ const newHistory = this.history;
1936
+ if (this.historyState !== '' && this.historyState !== newHistory) {
1937
+ this.onViewChange(newHistory);
1938
+ }
1939
+ }
1940
+ if (changedProps.has('transitionDuration')) {
1941
+ this.style.setProperty('--local-duration', this.transitionDuration);
1942
+ }
1943
+ if (changedProps.has('transitionFunction')) {
1944
+ this.style.setProperty('--local-transition', this.transitionFunction);
1945
+ }
1946
+ }
1947
+ firstUpdated() {
1948
+ if (this.transitionFunction) {
1949
+ this.style.setProperty('--local-transition', this.transitionFunction);
1950
+ }
1951
+ this.style.setProperty('--local-duration', this.transitionDuration);
1952
+ this.historyState = this.history;
1953
+ this.resizeObserver = new ResizeObserver(entries => {
1954
+ for (const entry of entries) {
1955
+ if (entry.target === this.getWrapper()) {
1956
+ let newHeight = entry.contentRect.height;
1957
+ const footerHeight = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--apkt-footer-height') ||
1958
+ '0');
1959
+ if (this.mobileFullScreen) {
1960
+ const viewportHeight = window.visualViewport?.height || window.innerHeight;
1961
+ const headerHeight = this.getHeaderHeight();
1962
+ newHeight = viewportHeight - headerHeight - footerHeight;
1963
+ this.style.setProperty('--local-border-bottom-radius', '0px');
1964
+ }
1965
+ else {
1966
+ const totalHeight = newHeight + footerHeight;
1967
+ newHeight = totalHeight;
1968
+ this.style.setProperty('--local-border-bottom-radius', footerHeight ? 'var(--apkt-borderRadius-5)' : '0px');
1969
+ }
1970
+ this.style.setProperty('--local-container-height', `${newHeight}px`);
1971
+ if (this.previousHeight !== '0px') {
1972
+ this.style.setProperty('--local-duration-height', this.transitionDuration);
1973
+ }
1974
+ this.previousHeight = `${newHeight}px`;
1975
+ }
1976
+ }
1977
+ });
1978
+ this.resizeObserver.observe(this.getWrapper());
1979
+ this.updateContainerHeight();
1980
+ window.addEventListener('resize', this.onViewportResize);
1981
+ window.visualViewport?.addEventListener('resize', this.onViewportResize);
1982
+ }
1983
+ disconnectedCallback() {
1984
+ const wrapper = this.getWrapper();
1985
+ if (wrapper && this.resizeObserver) {
1986
+ this.resizeObserver.unobserve(wrapper);
1987
+ }
1988
+ window.removeEventListener('resize', this.onViewportResize);
1989
+ window.visualViewport?.removeEventListener('resize', this.onViewportResize);
1990
+ }
1991
+ render() {
1992
+ return b `
1993
+ <div class="container" data-mobile-fullscreen="${o(this.mobileFullScreen)}">
1994
+ <div
1995
+ class="page"
1996
+ data-mobile-fullscreen="${o(this.mobileFullScreen)}"
1997
+ view-direction="${this.viewDirection}"
1998
+ >
1999
+ <div class="page-content">
2000
+ <slot></slot>
2001
+ </div>
2002
+ </div>
2003
+ </div>
2004
+ `;
2005
+ }
2006
+ onViewChange(history) {
2007
+ const historyArr = history.split(',').filter(Boolean);
2008
+ const prevArr = this.historyState.split(',').filter(Boolean);
2009
+ const prevLength = prevArr.length;
2010
+ const newLength = historyArr.length;
2011
+ const newView = historyArr[historyArr.length - 1] || '';
2012
+ const duration = UiHelperUtil.cssDurationToNumber(this.transitionDuration);
2013
+ let direction = '';
2014
+ if (newLength > prevLength) {
2015
+ direction = 'next';
2016
+ }
2017
+ else if (newLength < prevLength) {
2018
+ direction = 'prev';
2019
+ }
2020
+ else if (newLength === prevLength && historyArr[newLength - 1] !== prevArr[prevLength - 1]) {
2021
+ direction = 'next';
2022
+ }
2023
+ this.viewDirection = `${direction}-${newView}`;
2024
+ setTimeout(() => {
2025
+ this.historyState = history;
2026
+ this.setView?.(newView);
2027
+ }, duration);
2028
+ setTimeout(() => {
2029
+ this.viewDirection = '';
2030
+ }, duration * 2);
2031
+ }
2032
+ getWrapper() {
2033
+ return this.shadowRoot?.querySelector('div.page');
2034
+ }
2035
+ updateContainerHeight() {
2036
+ const wrapper = this.getWrapper();
2037
+ if (!wrapper) {
2038
+ return;
2039
+ }
2040
+ const footerHeight = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--apkt-footer-height') || '0');
2041
+ let newHeight = 0;
2042
+ if (this.mobileFullScreen) {
2043
+ const viewportHeight = window.visualViewport?.height || window.innerHeight;
2044
+ const headerHeight = this.getHeaderHeight();
2045
+ newHeight = viewportHeight - headerHeight - footerHeight;
2046
+ this.style.setProperty('--local-border-bottom-radius', '0px');
2047
+ }
2048
+ else {
2049
+ newHeight = wrapper.getBoundingClientRect().height + footerHeight;
2050
+ this.style.setProperty('--local-border-bottom-radius', footerHeight ? 'var(--apkt-borderRadius-5)' : '0px');
2051
+ }
2052
+ this.style.setProperty('--local-container-height', `${newHeight}px`);
2053
+ if (this.previousHeight !== '0px') {
2054
+ this.style.setProperty('--local-duration-height', this.transitionDuration);
2055
+ }
2056
+ this.previousHeight = `${newHeight}px`;
2057
+ }
2058
+ getHeaderHeight() {
2059
+ return HEADER_HEIGHT;
2060
+ }
2061
+ };
2062
+ W3mRouterContainer.styles = [styles];
2063
+ __decorate([
2064
+ n({ type: String })
2065
+ ], W3mRouterContainer.prototype, "transitionDuration", void 0);
2066
+ __decorate([
2067
+ n({ type: String })
2068
+ ], W3mRouterContainer.prototype, "transitionFunction", void 0);
2069
+ __decorate([
2070
+ n({ type: String })
2071
+ ], W3mRouterContainer.prototype, "history", void 0);
2072
+ __decorate([
2073
+ n({ type: String })
2074
+ ], W3mRouterContainer.prototype, "view", void 0);
2075
+ __decorate([
2076
+ n({ attribute: false })
2077
+ ], W3mRouterContainer.prototype, "setView", void 0);
2078
+ __decorate([
2079
+ r()
2080
+ ], W3mRouterContainer.prototype, "viewDirection", void 0);
2081
+ __decorate([
2082
+ r()
2083
+ ], W3mRouterContainer.prototype, "historyState", void 0);
2084
+ __decorate([
2085
+ r()
2086
+ ], W3mRouterContainer.prototype, "previousHeight", void 0);
2087
+ __decorate([
2088
+ r()
2089
+ ], W3mRouterContainer.prototype, "mobileFullScreen", void 0);
2090
+ W3mRouterContainer = __decorate([
2091
+ customElement('w3m-router-container')
2092
+ ], W3mRouterContainer);
2093
+
2094
+ export { AppKitModal, W3mListWallet, W3mModal, W3mModalBase, W3mRouterContainer, W3mUsageExceededView };
2095
+ //# sourceMappingURL=w3m-modal-D0HWVPsj.js.map
2096
+
2097
+ //# sourceMappingURL=w3m-modal-D0HWVPsj.js.map