@reown/appkit-cdn 1.8.15-e95f0d61c614677233e13ea9f055d3f75fcdba81.0 → 1.8.15-viem-upgrade.0

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 (429) hide show
  1. package/package.json +10 -10
  2. package/dist/ConstantsUtil-C2Ed2H2U.js +0 -24
  3. package/dist/ConstantsUtil-C2Ed2H2U.js.map +0 -1
  4. package/dist/ExchangeController-h_95bqSB.js +0 -265
  5. package/dist/ExchangeController-h_95bqSB.js.map +0 -1
  6. package/dist/HelpersUtil-xYeUfp1A.js +0 -141
  7. package/dist/HelpersUtil-xYeUfp1A.js.map +0 -1
  8. package/dist/NavigationUtil-Ci15WS4K.js +0 -9
  9. package/dist/NavigationUtil-Ci15WS4K.js.map +0 -1
  10. package/dist/PhArrowCircleDown-B41iUlWV.js +0 -74
  11. package/dist/PhArrowCircleDown-B41iUlWV.js.map +0 -1
  12. package/dist/PhArrowClockwise-BY8u5n41.js +0 -74
  13. package/dist/PhArrowClockwise-BY8u5n41.js.map +0 -1
  14. package/dist/PhArrowDown-ClD8GZ65.js +0 -74
  15. package/dist/PhArrowDown-ClD8GZ65.js.map +0 -1
  16. package/dist/PhArrowLeft-B8MXUz60.js +0 -74
  17. package/dist/PhArrowLeft-B8MXUz60.js.map +0 -1
  18. package/dist/PhArrowRight-Cewa_Slb.js +0 -74
  19. package/dist/PhArrowRight-Cewa_Slb.js.map +0 -1
  20. package/dist/PhArrowSquareOut-whgWh-lD.js +0 -74
  21. package/dist/PhArrowSquareOut-whgWh-lD.js.map +0 -1
  22. package/dist/PhArrowUp-B1HXBxie.js +0 -74
  23. package/dist/PhArrowUp-B1HXBxie.js.map +0 -1
  24. package/dist/PhArrowUpRight-CfFYe4FP.js +0 -74
  25. package/dist/PhArrowUpRight-CfFYe4FP.js.map +0 -1
  26. package/dist/PhArrowsClockwise-gL1Gkrtx.js +0 -74
  27. package/dist/PhArrowsClockwise-gL1Gkrtx.js.map +0 -1
  28. package/dist/PhArrowsDownUp-BqUEdUQr.js +0 -74
  29. package/dist/PhArrowsDownUp-BqUEdUQr.js.map +0 -1
  30. package/dist/PhArrowsLeftRight-BlZU63eY.js +0 -74
  31. package/dist/PhArrowsLeftRight-BlZU63eY.js.map +0 -1
  32. package/dist/PhBank-gbg_jlI7.js +0 -74
  33. package/dist/PhBank-gbg_jlI7.js.map +0 -1
  34. package/dist/PhBrowser-CMlD-YJw.js +0 -74
  35. package/dist/PhBrowser-CMlD-YJw.js.map +0 -1
  36. package/dist/PhCaretDown-3agTO8Jp.js +0 -74
  37. package/dist/PhCaretDown-3agTO8Jp.js.map +0 -1
  38. package/dist/PhCaretLeft-_MTni7Z5.js +0 -74
  39. package/dist/PhCaretLeft-_MTni7Z5.js.map +0 -1
  40. package/dist/PhCaretRight-Ci9fAHPG.js +0 -74
  41. package/dist/PhCaretRight-Ci9fAHPG.js.map +0 -1
  42. package/dist/PhCaretUp-vFG4Fame.js +0 -74
  43. package/dist/PhCaretUp-vFG4Fame.js.map +0 -1
  44. package/dist/PhCheck-mChGK6K_.js +0 -74
  45. package/dist/PhCheck-mChGK6K_.js.map +0 -1
  46. package/dist/PhCircleHalf-DZ7-vfxf.js +0 -74
  47. package/dist/PhCircleHalf-DZ7-vfxf.js.map +0 -1
  48. package/dist/PhClock-Bc5XWXb6.js +0 -74
  49. package/dist/PhClock-Bc5XWXb6.js.map +0 -1
  50. package/dist/PhCompass-Cu2MB-55.js +0 -74
  51. package/dist/PhCompass-Cu2MB-55.js.map +0 -1
  52. package/dist/PhCopy-BGUjyTts.js +0 -74
  53. package/dist/PhCopy-BGUjyTts.js.map +0 -1
  54. package/dist/PhCreditCard-vxFWID4B.js +0 -74
  55. package/dist/PhCreditCard-vxFWID4B.js.map +0 -1
  56. package/dist/PhCurrencyDollar-BfOoDhJr.js +0 -74
  57. package/dist/PhCurrencyDollar-BfOoDhJr.js.map +0 -1
  58. package/dist/PhDesktop-Cq6jwzbS.js +0 -74
  59. package/dist/PhDesktop-Cq6jwzbS.js.map +0 -1
  60. package/dist/PhDeviceMobile-BCtTp6jj.js +0 -74
  61. package/dist/PhDeviceMobile-BCtTp6jj.js.map +0 -1
  62. package/dist/PhDotsThree-BGgD-WIO.js +0 -74
  63. package/dist/PhDotsThree-BGgD-WIO.js.map +0 -1
  64. package/dist/PhEnvelope-CQiV0-zG.js +0 -74
  65. package/dist/PhEnvelope-CQiV0-zG.js.map +0 -1
  66. package/dist/PhFunnelSimple-BHGtxTNf.js +0 -74
  67. package/dist/PhFunnelSimple-BHGtxTNf.js.map +0 -1
  68. package/dist/PhGlobe-Q8oVkf6X.js +0 -74
  69. package/dist/PhGlobe-Q8oVkf6X.js.map +0 -1
  70. package/dist/PhIdentificationCard-Cz9LzvVR.js +0 -74
  71. package/dist/PhIdentificationCard-Cz9LzvVR.js.map +0 -1
  72. package/dist/PhImage-CP5_qKk-.js +0 -74
  73. package/dist/PhImage-CP5_qKk-.js.map +0 -1
  74. package/dist/PhInfo-CTlE1X9Z.js +0 -74
  75. package/dist/PhInfo-CTlE1X9Z.js.map +0 -1
  76. package/dist/PhLightbulb-CcLpnAAb.js +0 -74
  77. package/dist/PhLightbulb-CcLpnAAb.js.map +0 -1
  78. package/dist/PhMagnifyingGlass-n58GUAck.js +0 -74
  79. package/dist/PhMagnifyingGlass-n58GUAck.js.map +0 -1
  80. package/dist/PhPaperPlaneRight-C0sf2XV8.js +0 -74
  81. package/dist/PhPaperPlaneRight-C0sf2XV8.js.map +0 -1
  82. package/dist/PhPlus-BJxvt7Uc.js +0 -74
  83. package/dist/PhPlus-BJxvt7Uc.js.map +0 -1
  84. package/dist/PhPower-BvktxO2-.js +0 -74
  85. package/dist/PhPower-BvktxO2-.js.map +0 -1
  86. package/dist/PhPuzzlePiece-CDDyUPYo.js +0 -74
  87. package/dist/PhPuzzlePiece-CDDyUPYo.js.map +0 -1
  88. package/dist/PhQrCode-BlGI8529.js +0 -74
  89. package/dist/PhQrCode-BlGI8529.js.map +0 -1
  90. package/dist/PhQuestion-DGZj6iDZ.js +0 -74
  91. package/dist/PhQuestion-DGZj6iDZ.js.map +0 -1
  92. package/dist/PhQuestionMark-CTmeI7MQ.js +0 -74
  93. package/dist/PhQuestionMark-CTmeI7MQ.js.map +0 -1
  94. package/dist/PhSealCheck-BSlqkxnH.js +0 -74
  95. package/dist/PhSealCheck-BSlqkxnH.js.map +0 -1
  96. package/dist/PhSignOut-CEXxlRk3.js +0 -74
  97. package/dist/PhSignOut-CEXxlRk3.js.map +0 -1
  98. package/dist/PhSpinner-Do1pY8fG.js +0 -74
  99. package/dist/PhSpinner-Do1pY8fG.js.map +0 -1
  100. package/dist/PhTrash-JNKavmpg.js +0 -74
  101. package/dist/PhTrash-JNKavmpg.js.map +0 -1
  102. package/dist/PhUser-BW7E-xYg.js +0 -74
  103. package/dist/PhUser-BW7E-xYg.js.map +0 -1
  104. package/dist/PhVault-mzxUgBYN.js +0 -74
  105. package/dist/PhVault-mzxUgBYN.js.map +0 -1
  106. package/dist/PhWallet-BR9JThKU.js +0 -74
  107. package/dist/PhWallet-BR9JThKU.js.map +0 -1
  108. package/dist/PhWarning-DxuQ70WM.js +0 -74
  109. package/dist/PhWarning-DxuQ70WM.js.map +0 -1
  110. package/dist/PhWarningCircle-DCI0JC1F.js +0 -74
  111. package/dist/PhWarningCircle-DCI0JC1F.js.map +0 -1
  112. package/dist/PhX-CWNXqpGn.js +0 -74
  113. package/dist/PhX-CWNXqpGn.js.map +0 -1
  114. package/dist/SwapController-CwWMKLPL.js +0 -684
  115. package/dist/SwapController-CwWMKLPL.js.map +0 -1
  116. package/dist/WebCryptoP256-B0F1BoHd.js +0 -3299
  117. package/dist/WebCryptoP256-B0F1BoHd.js.map +0 -1
  118. package/dist/add-emiZFWKE.js +0 -20
  119. package/dist/add-emiZFWKE.js.map +0 -1
  120. package/dist/all-wallets-BsUQMPgW.js +0 -11
  121. package/dist/all-wallets-BsUQMPgW.js.map +0 -1
  122. package/dist/app-store-C_L7BoYc.js +0 -22
  123. package/dist/app-store-C_L7BoYc.js.map +0 -1
  124. package/dist/appkit-DY7XpK4K.js +0 -118074
  125. package/dist/appkit-DY7XpK4K.js.map +0 -1
  126. package/dist/appkit.js +0 -11
  127. package/dist/appkit.js.map +0 -1
  128. package/dist/apple-c3IhsqlY.js +0 -23
  129. package/dist/apple-c3IhsqlY.js.map +0 -1
  130. package/dist/arrow-bottom-BZnD_9In.js +0 -13
  131. package/dist/arrow-bottom-BZnD_9In.js.map +0 -1
  132. package/dist/arrow-bottom-circle-C9HRc3sW.js +0 -16
  133. package/dist/arrow-bottom-circle-C9HRc3sW.js.map +0 -1
  134. package/dist/arrow-left-DFlXkOXB.js +0 -13
  135. package/dist/arrow-left-DFlXkOXB.js.map +0 -1
  136. package/dist/arrow-right-_EPGORWI.js +0 -13
  137. package/dist/arrow-right-_EPGORWI.js.map +0 -1
  138. package/dist/arrow-top-CrBCvUsj.js +0 -13
  139. package/dist/arrow-top-CrBCvUsj.js.map +0 -1
  140. package/dist/async-directive-CEBoIWb8.js +0 -73
  141. package/dist/async-directive-CEBoIWb8.js.map +0 -1
  142. package/dist/bank-IrtkQnW0.js +0 -19
  143. package/dist/bank-IrtkQnW0.js.map +0 -1
  144. package/dist/basic-CCVK4Xb-.js +0 -4914
  145. package/dist/basic-CCVK4Xb-.js.map +0 -1
  146. package/dist/browser-5XoTmr4n.js +0 -1991
  147. package/dist/browser-5XoTmr4n.js.map +0 -1
  148. package/dist/browser-DGJ1T57R.js +0 -19
  149. package/dist/browser-DGJ1T57R.js.map +0 -1
  150. package/dist/card-euIrImBb.js +0 -19
  151. package/dist/card-euIrImBb.js.map +0 -1
  152. package/dist/ccip-BnHcw2Q9.js +0 -164
  153. package/dist/ccip-BnHcw2Q9.js.map +0 -1
  154. package/dist/checkmark-DOfVZz7v.js +0 -16
  155. package/dist/checkmark-DOfVZz7v.js.map +0 -1
  156. package/dist/checkmark-bold-CBk9rneH.js +0 -13
  157. package/dist/checkmark-bold-CBk9rneH.js.map +0 -1
  158. package/dist/chevron-bottom-DqxWxVi0.js +0 -13
  159. package/dist/chevron-bottom-DqxWxVi0.js.map +0 -1
  160. package/dist/chevron-left-JKsYvrX0.js +0 -13
  161. package/dist/chevron-left-JKsYvrX0.js.map +0 -1
  162. package/dist/chevron-right-0IHVmnlN.js +0 -13
  163. package/dist/chevron-right-0IHVmnlN.js.map +0 -1
  164. package/dist/chevron-top-q1UXuE7C.js +0 -13
  165. package/dist/chevron-top-q1UXuE7C.js.map +0 -1
  166. package/dist/chrome-store-C1gUHLGC.js +0 -66
  167. package/dist/chrome-store-C1gUHLGC.js.map +0 -1
  168. package/dist/class-map-CqyLxUs0.js +0 -101
  169. package/dist/class-map-CqyLxUs0.js.map +0 -1
  170. package/dist/clock-CRgBEN3N.js +0 -13
  171. package/dist/clock-CRgBEN3N.js.map +0 -1
  172. package/dist/close-DqwtanuV.js +0 -13
  173. package/dist/close-DqwtanuV.js.map +0 -1
  174. package/dist/clsx.m-D57qXwfE.js +0 -21
  175. package/dist/clsx.m-D57qXwfE.js.map +0 -1
  176. package/dist/coinPlaceholder-DGuEyon3.js +0 -13
  177. package/dist/coinPlaceholder-DGuEyon3.js.map +0 -1
  178. package/dist/compass-D3Lk_JmD.js +0 -13
  179. package/dist/compass-D3Lk_JmD.js.map +0 -1
  180. package/dist/copy-0bHy8N_r.js +0 -20
  181. package/dist/copy-0bHy8N_r.js.map +0 -1
  182. package/dist/core-C111yg8v.js +0 -16288
  183. package/dist/core-C111yg8v.js.map +0 -1
  184. package/dist/cursor-Bnlh8YKu.js +0 -8
  185. package/dist/cursor-Bnlh8YKu.js.map +0 -1
  186. package/dist/cursor-transparent-BqTVTA3D.js +0 -17
  187. package/dist/cursor-transparent-BqTVTA3D.js.map +0 -1
  188. package/dist/data-capture-BtdmOx65.js +0 -549
  189. package/dist/data-capture-BtdmOx65.js.map +0 -1
  190. package/dist/desktop-BKaI6I0c.js +0 -14
  191. package/dist/desktop-BKaI6I0c.js.map +0 -1
  192. package/dist/disconnect-CJtwIHdJ.js +0 -13
  193. package/dist/disconnect-CJtwIHdJ.js.map +0 -1
  194. package/dist/discord-oHqb6ClE.js +0 -22
  195. package/dist/discord-oHqb6ClE.js.map +0 -1
  196. package/dist/email-9QNGgeQQ.js +0 -421
  197. package/dist/email-9QNGgeQQ.js.map +0 -1
  198. package/dist/embedded-wallet-C_CLs-ZL.js +0 -952
  199. package/dist/embedded-wallet-C_CLs-ZL.js.map +0 -1
  200. package/dist/etherscan-Dkkz1Mfh.js +0 -11
  201. package/dist/etherscan-Dkkz1Mfh.js.map +0 -1
  202. package/dist/exclamation-triangle-BQbUCEhi.js +0 -9
  203. package/dist/exclamation-triangle-BQbUCEhi.js.map +0 -1
  204. package/dist/extension-C2hKzEZZ.js +0 -13
  205. package/dist/extension-C2hKzEZZ.js.map +0 -1
  206. package/dist/external-link-CIjsnb3X.js +0 -13
  207. package/dist/external-link-CIjsnb3X.js.map +0 -1
  208. package/dist/facebook-1Hufe3sI.js +0 -31
  209. package/dist/facebook-1Hufe3sI.js.map +0 -1
  210. package/dist/farcaster-DlSxA8AD.js +0 -17
  211. package/dist/farcaster-DlSxA8AD.js.map +0 -1
  212. package/dist/features-CubAsZN1.js +0 -319
  213. package/dist/features-CubAsZN1.js.map +0 -1
  214. package/dist/filters-Bx5zOyri.js +0 -13
  215. package/dist/filters-Bx5zOyri.js.map +0 -1
  216. package/dist/github-CT_NtR6h.js +0 -23
  217. package/dist/github-CT_NtR6h.js.map +0 -1
  218. package/dist/google-Dkv0ZPY6.js +0 -23
  219. package/dist/google-Dkv0ZPY6.js.map +0 -1
  220. package/dist/hashTypedData-Q6QDIxse.js +0 -262
  221. package/dist/hashTypedData-Q6QDIxse.js.map +0 -1
  222. package/dist/help-circle-Dh0SYux9.js +0 -17
  223. package/dist/help-circle-Dh0SYux9.js.map +0 -1
  224. package/dist/id-Dc_gfIHE.js +0 -17
  225. package/dist/id-Dc_gfIHE.js.map +0 -1
  226. package/dist/if-defined-B5CxFQec.js +0 -11
  227. package/dist/if-defined-B5CxFQec.js.map +0 -1
  228. package/dist/image-DPwaTi09.js +0 -9
  229. package/dist/image-DPwaTi09.js.map +0 -1
  230. package/dist/index-AsDH-m9e.js +0 -456
  231. package/dist/index-AsDH-m9e.js.map +0 -1
  232. package/dist/index-B-AePZns.js +0 -1514
  233. package/dist/index-B-AePZns.js.map +0 -1
  234. package/dist/index-B0nuzWGd.js +0 -153
  235. package/dist/index-B0nuzWGd.js.map +0 -1
  236. package/dist/index-BFK8rn8f.js +0 -985
  237. package/dist/index-BFK8rn8f.js.map +0 -1
  238. package/dist/index-BGtDVhOX.js +0 -218
  239. package/dist/index-BGtDVhOX.js.map +0 -1
  240. package/dist/index-BXRoNn9X.js +0 -147
  241. package/dist/index-BXRoNn9X.js.map +0 -1
  242. package/dist/index-BYnWTIsP.js +0 -257
  243. package/dist/index-BYnWTIsP.js.map +0 -1
  244. package/dist/index-B_yrV2-r.js +0 -7258
  245. package/dist/index-B_yrV2-r.js.map +0 -1
  246. package/dist/index-BcCvzVg5.js +0 -716
  247. package/dist/index-BcCvzVg5.js.map +0 -1
  248. package/dist/index-BeSFhM_p.js +0 -120
  249. package/dist/index-BeSFhM_p.js.map +0 -1
  250. package/dist/index-BgnNrRDq.js +0 -967
  251. package/dist/index-BgnNrRDq.js.map +0 -1
  252. package/dist/index-BqpTTobE.js +0 -984
  253. package/dist/index-BqpTTobE.js.map +0 -1
  254. package/dist/index-BxPoDEMu.js +0 -7481
  255. package/dist/index-BxPoDEMu.js.map +0 -1
  256. package/dist/index-ByLuz3My.js +0 -182
  257. package/dist/index-ByLuz3My.js.map +0 -1
  258. package/dist/index-BzPjzg08.js +0 -62
  259. package/dist/index-BzPjzg08.js.map +0 -1
  260. package/dist/index-C2E-8AS5.js +0 -249
  261. package/dist/index-C2E-8AS5.js.map +0 -1
  262. package/dist/index-C4icMnjM.js +0 -521
  263. package/dist/index-C4icMnjM.js.map +0 -1
  264. package/dist/index-C8av2G6v.js +0 -136
  265. package/dist/index-C8av2G6v.js.map +0 -1
  266. package/dist/index-CE9D5nR3.js +0 -441
  267. package/dist/index-CE9D5nR3.js.map +0 -1
  268. package/dist/index-CI83C2eb.js +0 -124
  269. package/dist/index-CI83C2eb.js.map +0 -1
  270. package/dist/index-CK8vtUMI.js +0 -181
  271. package/dist/index-CK8vtUMI.js.map +0 -1
  272. package/dist/index-CY_gr4c7.js +0 -286
  273. package/dist/index-CY_gr4c7.js.map +0 -1
  274. package/dist/index-CZmyXVNe.js +0 -198
  275. package/dist/index-CZmyXVNe.js.map +0 -1
  276. package/dist/index-CemyBXIP.js +0 -8825
  277. package/dist/index-CemyBXIP.js.map +0 -1
  278. package/dist/index-CkrKEace.js +0 -180
  279. package/dist/index-CkrKEace.js.map +0 -1
  280. package/dist/index-Cl94CXn7.js +0 -110
  281. package/dist/index-Cl94CXn7.js.map +0 -1
  282. package/dist/index-CwK6o8Hz.js +0 -18322
  283. package/dist/index-CwK6o8Hz.js.map +0 -1
  284. package/dist/index-Cy1DAN6W.js +0 -542
  285. package/dist/index-Cy1DAN6W.js.map +0 -1
  286. package/dist/index-CziMS40-.js +0 -281
  287. package/dist/index-CziMS40-.js.map +0 -1
  288. package/dist/index-D6qUKJRD.js +0 -1178
  289. package/dist/index-D6qUKJRD.js.map +0 -1
  290. package/dist/index-DDYN4XOm.js +0 -211
  291. package/dist/index-DDYN4XOm.js.map +0 -1
  292. package/dist/index-DHcBAN0Q.js +0 -9350
  293. package/dist/index-DHcBAN0Q.js.map +0 -1
  294. package/dist/index-DPEv06yg.js +0 -520
  295. package/dist/index-DPEv06yg.js.map +0 -1
  296. package/dist/index-DShG1B5f.js +0 -131
  297. package/dist/index-DShG1B5f.js.map +0 -1
  298. package/dist/index-DTOiAL1i.js +0 -52
  299. package/dist/index-DTOiAL1i.js.map +0 -1
  300. package/dist/index-DVyI9O5i.js +0 -92
  301. package/dist/index-DVyI9O5i.js.map +0 -1
  302. package/dist/index-DvXemhcG.js +0 -611
  303. package/dist/index-DvXemhcG.js.map +0 -1
  304. package/dist/index-Fvw4sbfL.js +0 -198
  305. package/dist/index-Fvw4sbfL.js.map +0 -1
  306. package/dist/index-PiXpeN5n.js +0 -3987
  307. package/dist/index-PiXpeN5n.js.map +0 -1
  308. package/dist/index-btvyw5xW.js +0 -126
  309. package/dist/index-btvyw5xW.js.map +0 -1
  310. package/dist/index-dsKNiJml.js +0 -70
  311. package/dist/index-dsKNiJml.js.map +0 -1
  312. package/dist/index-gEaD8hfK.js +0 -109
  313. package/dist/index-gEaD8hfK.js.map +0 -1
  314. package/dist/index-isOxTzum.js +0 -147
  315. package/dist/index-isOxTzum.js.map +0 -1
  316. package/dist/index-nWSgWKaF.js +0 -2277
  317. package/dist/index-nWSgWKaF.js.map +0 -1
  318. package/dist/index-qQiVpif7.js +0 -1372
  319. package/dist/index-qQiVpif7.js.map +0 -1
  320. package/dist/index-tv-dalA1.js +0 -73
  321. package/dist/index-tv-dalA1.js.map +0 -1
  322. package/dist/index.es-BzCqYMc8.js +0 -8391
  323. package/dist/index.es-BzCqYMc8.js.map +0 -1
  324. package/dist/info-4ssFoXJS.js +0 -8
  325. package/dist/info-4ssFoXJS.js.map +0 -1
  326. package/dist/info-circle-BnqHwvcX.js +0 -17
  327. package/dist/info-circle-BnqHwvcX.js.map +0 -1
  328. package/dist/jsxRuntime.module-CWsrm3KZ.js +0 -14
  329. package/dist/jsxRuntime.module-CWsrm3KZ.js.map +0 -1
  330. package/dist/lightbulb-BEEbBBZQ.js +0 -8
  331. package/dist/lightbulb-BEEbBBZQ.js.map +0 -1
  332. package/dist/localBatchGatewayRequest-Dryp85EG.js +0 -103
  333. package/dist/localBatchGatewayRequest-Dryp85EG.js.map +0 -1
  334. package/dist/mail-CJLCh290.js +0 -13
  335. package/dist/mail-CJLCh290.js.map +0 -1
  336. package/dist/metamask-sdk-4u4X6Xn3.js +0 -16699
  337. package/dist/metamask-sdk-4u4X6Xn3.js.map +0 -1
  338. package/dist/mobile-Deau0Za4.js +0 -14
  339. package/dist/mobile-Deau0Za4.js.map +0 -1
  340. package/dist/more-BeXo-Pwn.js +0 -16
  341. package/dist/more-BeXo-Pwn.js.map +0 -1
  342. package/dist/native-DOlbMZnh.js +0 -17
  343. package/dist/native-DOlbMZnh.js.map +0 -1
  344. package/dist/network-placeholder-BoityKSt.js +0 -19
  345. package/dist/network-placeholder-BoityKSt.js.map +0 -1
  346. package/dist/nftPlaceholder-PTHT5Ulj.js +0 -13
  347. package/dist/nftPlaceholder-PTHT5Ulj.js.map +0 -1
  348. package/dist/off-BWWypY2E.js +0 -13
  349. package/dist/off-BWWypY2E.js.map +0 -1
  350. package/dist/onramp-DnL6ChSq.js +0 -979
  351. package/dist/onramp-DnL6ChSq.js.map +0 -1
  352. package/dist/parseAbiParameters-DfJcIE_w.js +0 -757
  353. package/dist/parseAbiParameters-DfJcIE_w.js.map +0 -1
  354. package/dist/parseSignature-CxTkG24t.js +0 -4690
  355. package/dist/parseSignature-CxTkG24t.js.map +0 -1
  356. package/dist/pay-with-exchange-CpuGLivJ.js +0 -603
  357. package/dist/pay-with-exchange-CpuGLivJ.js.map +0 -1
  358. package/dist/play-store-DkxQRJyA.js +0 -37
  359. package/dist/play-store-DkxQRJyA.js.map +0 -1
  360. package/dist/plus-DaGtBhNd.js +0 -18
  361. package/dist/plus-DaGtBhNd.js.map +0 -1
  362. package/dist/property-8UcTqffH.js +0 -623
  363. package/dist/property-8UcTqffH.js.map +0 -1
  364. package/dist/qr-code-DGvMTPaF.js +0 -11
  365. package/dist/qr-code-DGvMTPaF.js.map +0 -1
  366. package/dist/receive-CVWmkRpl.js +0 -262
  367. package/dist/receive-CVWmkRpl.js.map +0 -1
  368. package/dist/recycle-horizontal-DDVEtj7J.js +0 -14
  369. package/dist/recycle-horizontal-DDVEtj7J.js.map +0 -1
  370. package/dist/ref-DAjgVrGH.js +0 -43
  371. package/dist/ref-DAjgVrGH.js.map +0 -1
  372. package/dist/refresh-BmNFE8Pg.js +0 -13
  373. package/dist/refresh-BmNFE8Pg.js.map +0 -1
  374. package/dist/reown-logo-B-UO-SeO.js +0 -17
  375. package/dist/reown-logo-B-UO-SeO.js.map +0 -1
  376. package/dist/search-DR_B_4SQ.js +0 -13
  377. package/dist/search-DR_B_4SQ.js.map +0 -1
  378. package/dist/secp256k1-DnXqhCKw.js +0 -2031
  379. package/dist/secp256k1-DnXqhCKw.js.map +0 -1
  380. package/dist/send-BNU8VrfM.js +0 -20
  381. package/dist/send-BNU8VrfM.js.map +0 -1
  382. package/dist/send-DHzM4I8V.js +0 -1365
  383. package/dist/send-DHzM4I8V.js.map +0 -1
  384. package/dist/socials-DsoFf1B8.js +0 -796
  385. package/dist/socials-DsoFf1B8.js.map +0 -1
  386. package/dist/swapHorizontal-BQOjfwRW.js +0 -13
  387. package/dist/swapHorizontal-BQOjfwRW.js.map +0 -1
  388. package/dist/swapHorizontalBold-DMKR9Zys.js +0 -13
  389. package/dist/swapHorizontalBold-DMKR9Zys.js.map +0 -1
  390. package/dist/swapHorizontalMedium-DVsqt18q.js +0 -21
  391. package/dist/swapHorizontalMedium-DVsqt18q.js.map +0 -1
  392. package/dist/swapHorizontalRoundedBold-CM5U-o8X.js +0 -13
  393. package/dist/swapHorizontalRoundedBold-CM5U-o8X.js.map +0 -1
  394. package/dist/swapVertical-P9UnfCR-.js +0 -13
  395. package/dist/swapVertical-P9UnfCR-.js.map +0 -1
  396. package/dist/swaps-F0roy6mK.js +0 -2121
  397. package/dist/swaps-F0roy6mK.js.map +0 -1
  398. package/dist/telegram-Bd4DGbnk.js +0 -21
  399. package/dist/telegram-Bd4DGbnk.js.map +0 -1
  400. package/dist/three-dots-M94oc7-3.js +0 -10
  401. package/dist/three-dots-M94oc7-3.js.map +0 -1
  402. package/dist/transactions-DwtZvXx1.js +0 -38
  403. package/dist/transactions-DwtZvXx1.js.map +0 -1
  404. package/dist/twitch--lJ-X_Y6.js +0 -23
  405. package/dist/twitch--lJ-X_Y6.js.map +0 -1
  406. package/dist/twitterIcon-DDp_lnzc.js +0 -11
  407. package/dist/twitterIcon-DDp_lnzc.js.map +0 -1
  408. package/dist/vanilla-CgG5xMJO.js +0 -448
  409. package/dist/vanilla-CgG5xMJO.js.map +0 -1
  410. package/dist/verify-Doojt-tK.js +0 -13
  411. package/dist/verify-Doojt-tK.js.map +0 -1
  412. package/dist/verify-filled-EHdbo2B7.js +0 -13
  413. package/dist/verify-filled-EHdbo2B7.js.map +0 -1
  414. package/dist/w3m-modal-CVsid-gN.js +0 -1725
  415. package/dist/w3m-modal-CVsid-gN.js.map +0 -1
  416. package/dist/w3m-modal-CZ4s4A2R.js +0 -2008
  417. package/dist/w3m-modal-CZ4s4A2R.js.map +0 -1
  418. package/dist/wallet-CowxEORz.js +0 -13
  419. package/dist/wallet-CowxEORz.js.map +0 -1
  420. package/dist/wallet-placeholder-B7p7Oae2.js +0 -19
  421. package/dist/wallet-placeholder-B7p7Oae2.js.map +0 -1
  422. package/dist/wallet-standard-BUMbKbZo.js +0 -523
  423. package/dist/wallet-standard-BUMbKbZo.js.map +0 -1
  424. package/dist/walletconnect-CKMr88Pk.js +0 -39
  425. package/dist/walletconnect-CKMr88Pk.js.map +0 -1
  426. package/dist/warning-circle-CjIPgJnm.js +0 -17
  427. package/dist/warning-circle-CjIPgJnm.js.map +0 -1
  428. package/dist/x-CaxhfhgU.js +0 -17
  429. package/dist/x-CaxhfhgU.js.map +0 -1
@@ -1,4914 +0,0 @@
1
- import { q as i, o as i$1, x, l as b } from "./appkit-DY7XpK4K.js";
2
- import { n, r, a as e$1 } from "./class-map-CqyLxUs0.js";
3
- import { e as elementStyles, r as resetStyles, g as ConnectorController, j as ApiController, O as OptionsController, l as CoreHelperUtil, E as EventsController, R as RouterController, n as ConnectorUtil, b as AssetUtil, o as ConnectionController, q as StorageUtil, m as ConstantsUtil, W as WalletUtil, C as ChainController, d as AssetController, T as ThemeController, i as SnackController, M as ModalController, t as ConstantsUtil$1, c as colorStyles } from "./core-C111yg8v.js";
4
- import { c as customElement, U as UiHelperUtil } from "./index-BgnNrRDq.js";
5
- import { o } from "./if-defined-B5CxFQec.js";
6
- import { b as browser } from "./browser-5XoTmr4n.js";
7
- import { e, n as n$1 } from "./ref-DAjgVrGH.js";
8
- const styles$q = i`
9
- :host {
10
- position: relative;
11
- background-color: var(--wui-color-gray-glass-002);
12
- display: flex;
13
- justify-content: center;
14
- align-items: center;
15
- width: var(--local-size);
16
- height: var(--local-size);
17
- border-radius: inherit;
18
- border-radius: var(--local-border-radius);
19
- }
20
-
21
- :host > wui-flex {
22
- overflow: hidden;
23
- border-radius: inherit;
24
- border-radius: var(--local-border-radius);
25
- }
26
-
27
- :host::after {
28
- content: '';
29
- position: absolute;
30
- top: 0;
31
- bottom: 0;
32
- left: 0;
33
- right: 0;
34
- border-radius: inherit;
35
- border: 1px solid var(--wui-color-gray-glass-010);
36
- pointer-events: none;
37
- }
38
-
39
- :host([name='Extension'])::after {
40
- border: 1px solid var(--wui-color-accent-glass-010);
41
- }
42
-
43
- :host([data-wallet-icon='allWallets']) {
44
- background-color: var(--wui-all-wallets-bg-100);
45
- }
46
-
47
- :host([data-wallet-icon='allWallets'])::after {
48
- border: 1px solid var(--wui-color-accent-glass-010);
49
- }
50
-
51
- wui-icon[data-parent-size='inherit'] {
52
- width: 75%;
53
- height: 75%;
54
- align-items: center;
55
- }
56
-
57
- wui-icon[data-parent-size='sm'] {
58
- width: 18px;
59
- height: 18px;
60
- }
61
-
62
- wui-icon[data-parent-size='md'] {
63
- width: 24px;
64
- height: 24px;
65
- }
66
-
67
- wui-icon[data-parent-size='lg'] {
68
- width: 42px;
69
- height: 42px;
70
- }
71
-
72
- wui-icon[data-parent-size='full'] {
73
- width: 100%;
74
- height: 100%;
75
- }
76
-
77
- :host > wui-icon-box {
78
- position: absolute;
79
- overflow: hidden;
80
- right: -1px;
81
- bottom: -2px;
82
- z-index: 1;
83
- border: 2px solid var(--wui-color-bg-150, #1e1f1f);
84
- padding: 1px;
85
- }
86
- `;
87
- var __decorate$K = function(decorators, target, key, desc) {
88
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
90
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
91
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
92
- };
93
- let WuiWalletImage = class WuiWalletImage2 extends i$1 {
94
- constructor() {
95
- super(...arguments);
96
- this.size = "md";
97
- this.name = "";
98
- this.installed = false;
99
- this.badgeSize = "xs";
100
- }
101
- render() {
102
- let borderRadius = "xxs";
103
- if (this.size === "lg") {
104
- borderRadius = "m";
105
- } else if (this.size === "md") {
106
- borderRadius = "xs";
107
- } else {
108
- borderRadius = "xxs";
109
- }
110
- this.style.cssText = `
111
- --local-border-radius: var(--wui-border-radius-${borderRadius});
112
- --local-size: var(--wui-wallet-image-size-${this.size});
113
- `;
114
- if (this.walletIcon) {
115
- this.dataset["walletIcon"] = this.walletIcon;
116
- }
117
- return x`
118
- <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
119
- `;
120
- }
121
- templateVisual() {
122
- if (this.imageSrc) {
123
- return x`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`;
124
- } else if (this.walletIcon) {
125
- return x`<wui-icon
126
- data-parent-size="md"
127
- size="md"
128
- color="inherit"
129
- name=${this.walletIcon}
130
- ></wui-icon>`;
131
- }
132
- return x`<wui-icon
133
- data-parent-size=${this.size}
134
- size="inherit"
135
- color="inherit"
136
- name="walletPlaceholder"
137
- ></wui-icon>`;
138
- }
139
- };
140
- WuiWalletImage.styles = [elementStyles, resetStyles, styles$q];
141
- __decorate$K([
142
- n()
143
- ], WuiWalletImage.prototype, "size", void 0);
144
- __decorate$K([
145
- n()
146
- ], WuiWalletImage.prototype, "name", void 0);
147
- __decorate$K([
148
- n()
149
- ], WuiWalletImage.prototype, "imageSrc", void 0);
150
- __decorate$K([
151
- n()
152
- ], WuiWalletImage.prototype, "walletIcon", void 0);
153
- __decorate$K([
154
- n({ type: Boolean })
155
- ], WuiWalletImage.prototype, "installed", void 0);
156
- __decorate$K([
157
- n()
158
- ], WuiWalletImage.prototype, "badgeSize", void 0);
159
- WuiWalletImage = __decorate$K([
160
- customElement("wui-wallet-image")
161
- ], WuiWalletImage);
162
- const styles$p = i`
163
- :host {
164
- position: relative;
165
- border-radius: var(--wui-border-radius-xxs);
166
- width: 40px;
167
- height: 40px;
168
- overflow: hidden;
169
- background: var(--wui-color-gray-glass-002);
170
- display: flex;
171
- justify-content: center;
172
- align-items: center;
173
- flex-wrap: wrap;
174
- gap: var(--wui-spacing-4xs);
175
- padding: 3.75px !important;
176
- }
177
-
178
- :host::after {
179
- content: '';
180
- position: absolute;
181
- top: 0;
182
- bottom: 0;
183
- left: 0;
184
- right: 0;
185
- border-radius: inherit;
186
- border: 1px solid var(--wui-color-gray-glass-010);
187
- pointer-events: none;
188
- }
189
-
190
- :host > wui-wallet-image {
191
- width: 14px;
192
- height: 14px;
193
- border-radius: var(--wui-border-radius-5xs);
194
- }
195
-
196
- :host > wui-flex {
197
- padding: 2px;
198
- position: fixed;
199
- overflow: hidden;
200
- left: 34px;
201
- bottom: 8px;
202
- background: var(--dark-background-150, #1e1f1f);
203
- border-radius: 50%;
204
- z-index: 2;
205
- display: flex;
206
- }
207
- `;
208
- var __decorate$J = function(decorators, target, key, desc) {
209
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
210
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
211
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
212
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
213
- };
214
- const TOTAL_IMAGES = 4;
215
- let WuiAllWalletsImage = class WuiAllWalletsImage2 extends i$1 {
216
- constructor() {
217
- super(...arguments);
218
- this.walletImages = [];
219
- }
220
- render() {
221
- const isPlaceholders = this.walletImages.length < TOTAL_IMAGES;
222
- return x`${this.walletImages.slice(0, TOTAL_IMAGES).map(({ src, walletName }) => x`
223
- <wui-wallet-image
224
- size="inherit"
225
- imageSrc=${src}
226
- name=${o(walletName)}
227
- ></wui-wallet-image>
228
- `)}
229
- ${isPlaceholders ? [...Array(TOTAL_IMAGES - this.walletImages.length)].map(() => x` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`) : null}
230
- <wui-flex>
231
- <wui-icon-box
232
- size="xxs"
233
- iconSize="xxs"
234
- iconcolor="success-100"
235
- backgroundcolor="success-100"
236
- icon="checkmark"
237
- background="opaque"
238
- ></wui-icon-box>
239
- </wui-flex>`;
240
- }
241
- };
242
- WuiAllWalletsImage.styles = [resetStyles, styles$p];
243
- __decorate$J([
244
- n({ type: Array })
245
- ], WuiAllWalletsImage.prototype, "walletImages", void 0);
246
- WuiAllWalletsImage = __decorate$J([
247
- customElement("wui-all-wallets-image")
248
- ], WuiAllWalletsImage);
249
- const styles$o = i`
250
- button {
251
- column-gap: var(--wui-spacing-s);
252
- padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
253
- width: 100%;
254
- background-color: var(--wui-color-gray-glass-002);
255
- border-radius: var(--wui-border-radius-xs);
256
- color: var(--wui-color-fg-100);
257
- }
258
-
259
- button > wui-text:nth-child(2) {
260
- display: flex;
261
- flex: 1;
262
- }
263
-
264
- button:disabled {
265
- background-color: var(--wui-color-gray-glass-015);
266
- color: var(--wui-color-gray-glass-015);
267
- }
268
-
269
- button:disabled > wui-tag {
270
- background-color: var(--wui-color-gray-glass-010);
271
- color: var(--wui-color-fg-300);
272
- }
273
-
274
- wui-icon {
275
- color: var(--wui-color-fg-200) !important;
276
- }
277
- `;
278
- var __decorate$I = function(decorators, target, key, desc) {
279
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
280
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
281
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
282
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
283
- };
284
- let WuiListWallet = class WuiListWallet2 extends i$1 {
285
- constructor() {
286
- super(...arguments);
287
- this.walletImages = [];
288
- this.imageSrc = "";
289
- this.name = "";
290
- this.tabIdx = void 0;
291
- this.installed = false;
292
- this.disabled = false;
293
- this.showAllWallets = false;
294
- this.loading = false;
295
- this.loadingSpinnerColor = "accent-100";
296
- }
297
- render() {
298
- return x`
299
- <button ?disabled=${this.disabled} tabindex=${o(this.tabIdx)}>
300
- ${this.templateAllWallets()} ${this.templateWalletImage()}
301
- <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
302
- ${this.templateStatus()}
303
- </button>
304
- `;
305
- }
306
- templateAllWallets() {
307
- if (this.showAllWallets && this.imageSrc) {
308
- return x` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `;
309
- } else if (this.showAllWallets && this.walletIcon) {
310
- return x` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `;
311
- }
312
- return null;
313
- }
314
- templateWalletImage() {
315
- if (!this.showAllWallets && this.imageSrc) {
316
- return x`<wui-wallet-image
317
- size="sm"
318
- imageSrc=${this.imageSrc}
319
- name=${this.name}
320
- .installed=${this.installed}
321
- ></wui-wallet-image>`;
322
- } else if (!this.showAllWallets && !this.imageSrc) {
323
- return x`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`;
324
- }
325
- return null;
326
- }
327
- templateStatus() {
328
- if (this.loading) {
329
- return x`<wui-loading-spinner
330
- size="lg"
331
- color=${this.loadingSpinnerColor}
332
- ></wui-loading-spinner>`;
333
- } else if (this.tagLabel && this.tagVariant) {
334
- return x`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`;
335
- } else if (this.icon) {
336
- return x`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`;
337
- }
338
- return null;
339
- }
340
- };
341
- WuiListWallet.styles = [resetStyles, elementStyles, styles$o];
342
- __decorate$I([
343
- n({ type: Array })
344
- ], WuiListWallet.prototype, "walletImages", void 0);
345
- __decorate$I([
346
- n()
347
- ], WuiListWallet.prototype, "imageSrc", void 0);
348
- __decorate$I([
349
- n()
350
- ], WuiListWallet.prototype, "name", void 0);
351
- __decorate$I([
352
- n()
353
- ], WuiListWallet.prototype, "tagLabel", void 0);
354
- __decorate$I([
355
- n()
356
- ], WuiListWallet.prototype, "tagVariant", void 0);
357
- __decorate$I([
358
- n()
359
- ], WuiListWallet.prototype, "icon", void 0);
360
- __decorate$I([
361
- n()
362
- ], WuiListWallet.prototype, "walletIcon", void 0);
363
- __decorate$I([
364
- n()
365
- ], WuiListWallet.prototype, "tabIdx", void 0);
366
- __decorate$I([
367
- n({ type: Boolean })
368
- ], WuiListWallet.prototype, "installed", void 0);
369
- __decorate$I([
370
- n({ type: Boolean })
371
- ], WuiListWallet.prototype, "disabled", void 0);
372
- __decorate$I([
373
- n({ type: Boolean })
374
- ], WuiListWallet.prototype, "showAllWallets", void 0);
375
- __decorate$I([
376
- n({ type: Boolean })
377
- ], WuiListWallet.prototype, "loading", void 0);
378
- __decorate$I([
379
- n({ type: String })
380
- ], WuiListWallet.prototype, "loadingSpinnerColor", void 0);
381
- WuiListWallet = __decorate$I([
382
- customElement("wui-list-wallet")
383
- ], WuiListWallet);
384
- var __decorate$H = function(decorators, target, key, desc) {
385
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
386
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
387
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
388
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
389
- };
390
- let W3mAllWalletsWidget = class W3mAllWalletsWidget2 extends i$1 {
391
- constructor() {
392
- super();
393
- this.unsubscribe = [];
394
- this.tabIdx = void 0;
395
- this.connectors = ConnectorController.state.connectors;
396
- this.count = ApiController.state.count;
397
- this.filteredCount = ApiController.state.filteredWallets.length;
398
- this.isFetchingRecommendedWallets = ApiController.state.isFetchingRecommendedWallets;
399
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val), ApiController.subscribeKey("count", (val) => this.count = val), ApiController.subscribeKey("filteredWallets", (val) => this.filteredCount = val.length), ApiController.subscribeKey("isFetchingRecommendedWallets", (val) => this.isFetchingRecommendedWallets = val));
400
- }
401
- disconnectedCallback() {
402
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
403
- }
404
- render() {
405
- const wcConnector = this.connectors.find((c) => c.id === "walletConnect");
406
- const { allWallets } = OptionsController.state;
407
- if (!wcConnector || allWallets === "HIDE") {
408
- return null;
409
- }
410
- if (allWallets === "ONLY_MOBILE" && !CoreHelperUtil.isMobile()) {
411
- return null;
412
- }
413
- const featuredCount = ApiController.state.featured.length;
414
- const rawCount = this.count + featuredCount;
415
- const roundedCount = rawCount < 10 ? rawCount : Math.floor(rawCount / 10) * 10;
416
- const count = this.filteredCount > 0 ? this.filteredCount : roundedCount;
417
- let tagLabel = `${count}`;
418
- if (this.filteredCount > 0) {
419
- tagLabel = `${this.filteredCount}`;
420
- } else if (count < rawCount) {
421
- tagLabel = `${count}+`;
422
- }
423
- return x`
424
- <wui-list-wallet
425
- name="All Wallets"
426
- walletIcon="allWallets"
427
- showAllWallets
428
- @click=${this.onAllWallets.bind(this)}
429
- tagLabel=${tagLabel}
430
- tagVariant="shade"
431
- data-testid="all-wallets"
432
- tabIdx=${o(this.tabIdx)}
433
- .loading=${this.isFetchingRecommendedWallets}
434
- loadingSpinnerColor=${this.isFetchingRecommendedWallets ? "fg-300" : "accent-100"}
435
- ></wui-list-wallet>
436
- `;
437
- }
438
- onAllWallets() {
439
- EventsController.sendEvent({ type: "track", event: "CLICK_ALL_WALLETS" });
440
- RouterController.push("AllWallets");
441
- }
442
- };
443
- __decorate$H([
444
- n()
445
- ], W3mAllWalletsWidget.prototype, "tabIdx", void 0);
446
- __decorate$H([
447
- r()
448
- ], W3mAllWalletsWidget.prototype, "connectors", void 0);
449
- __decorate$H([
450
- r()
451
- ], W3mAllWalletsWidget.prototype, "count", void 0);
452
- __decorate$H([
453
- r()
454
- ], W3mAllWalletsWidget.prototype, "filteredCount", void 0);
455
- __decorate$H([
456
- r()
457
- ], W3mAllWalletsWidget.prototype, "isFetchingRecommendedWallets", void 0);
458
- W3mAllWalletsWidget = __decorate$H([
459
- customElement("w3m-all-wallets-widget")
460
- ], W3mAllWalletsWidget);
461
- var __decorate$G = function(decorators, target, key, desc) {
462
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
463
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
464
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
465
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
466
- };
467
- let W3mConnectAnnouncedWidget = class W3mConnectAnnouncedWidget2 extends i$1 {
468
- constructor() {
469
- super();
470
- this.unsubscribe = [];
471
- this.tabIdx = void 0;
472
- this.connectors = ConnectorController.state.connectors;
473
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val));
474
- }
475
- disconnectedCallback() {
476
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
477
- }
478
- render() {
479
- const announcedConnectors = this.connectors.filter((connector) => connector.type === "ANNOUNCED");
480
- if (!(announcedConnectors == null ? void 0 : announcedConnectors.length)) {
481
- this.style.cssText = `display: none`;
482
- return null;
483
- }
484
- return x`
485
- <wui-flex flexDirection="column" gap="xs">
486
- ${announcedConnectors.filter(ConnectorUtil.showConnector).map((connector) => x`
487
- <wui-list-wallet
488
- imageSrc=${o(AssetUtil.getConnectorImage(connector))}
489
- name=${connector.name ?? "Unknown"}
490
- @click=${() => this.onConnector(connector)}
491
- tagVariant="success"
492
- tagLabel="installed"
493
- data-testid=${`wallet-selector-${connector.id}`}
494
- .installed=${true}
495
- tabIdx=${o(this.tabIdx)}
496
- >
497
- </wui-list-wallet>
498
- `)}
499
- </wui-flex>
500
- `;
501
- }
502
- onConnector(connector) {
503
- if (connector.id === "walletConnect") {
504
- if (CoreHelperUtil.isMobile()) {
505
- RouterController.push("AllWallets");
506
- } else {
507
- RouterController.push("ConnectingWalletConnect");
508
- }
509
- } else {
510
- RouterController.push("ConnectingExternal", { connector });
511
- }
512
- }
513
- };
514
- __decorate$G([
515
- n()
516
- ], W3mConnectAnnouncedWidget.prototype, "tabIdx", void 0);
517
- __decorate$G([
518
- r()
519
- ], W3mConnectAnnouncedWidget.prototype, "connectors", void 0);
520
- W3mConnectAnnouncedWidget = __decorate$G([
521
- customElement("w3m-connect-announced-widget")
522
- ], W3mConnectAnnouncedWidget);
523
- var __decorate$F = function(decorators, target, key, desc) {
524
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
525
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
526
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
527
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
528
- };
529
- let W3mConnectCustomWidget = class W3mConnectCustomWidget2 extends i$1 {
530
- constructor() {
531
- super();
532
- this.unsubscribe = [];
533
- this.tabIdx = void 0;
534
- this.connectors = ConnectorController.state.connectors;
535
- this.loading = false;
536
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val));
537
- if (CoreHelperUtil.isTelegram() && CoreHelperUtil.isIos()) {
538
- this.loading = !ConnectionController.state.wcUri;
539
- this.unsubscribe.push(ConnectionController.subscribeKey("wcUri", (val) => this.loading = !val));
540
- }
541
- }
542
- disconnectedCallback() {
543
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
544
- }
545
- render() {
546
- const { customWallets } = OptionsController.state;
547
- if (!(customWallets == null ? void 0 : customWallets.length)) {
548
- this.style.cssText = `display: none`;
549
- return null;
550
- }
551
- const wallets = this.filterOutDuplicateWallets(customWallets);
552
- return x`<wui-flex flexDirection="column" gap="xs">
553
- ${wallets.map((wallet) => x`
554
- <wui-list-wallet
555
- imageSrc=${o(AssetUtil.getWalletImage(wallet))}
556
- name=${wallet.name ?? "Unknown"}
557
- @click=${() => this.onConnectWallet(wallet)}
558
- data-testid=${`wallet-selector-${wallet.id}`}
559
- tabIdx=${o(this.tabIdx)}
560
- ?loading=${this.loading}
561
- >
562
- </wui-list-wallet>
563
- `)}
564
- </wui-flex>`;
565
- }
566
- filterOutDuplicateWallets(wallets) {
567
- const recent = StorageUtil.getRecentWallets();
568
- const connectorRDNSs = this.connectors.map((connector) => {
569
- var _a;
570
- return (_a = connector.info) == null ? void 0 : _a.rdns;
571
- }).filter(Boolean);
572
- const recentRDNSs = recent.map((wallet) => wallet.rdns).filter(Boolean);
573
- const allRDNSs = connectorRDNSs.concat(recentRDNSs);
574
- if (allRDNSs.includes("io.metamask.mobile") && CoreHelperUtil.isMobile()) {
575
- const index = allRDNSs.indexOf("io.metamask.mobile");
576
- allRDNSs[index] = "io.metamask";
577
- }
578
- const filtered = wallets.filter((wallet) => !allRDNSs.includes(String(wallet == null ? void 0 : wallet.rdns)));
579
- return filtered;
580
- }
581
- onConnectWallet(wallet) {
582
- if (this.loading) {
583
- return;
584
- }
585
- RouterController.push("ConnectingWalletConnect", { wallet });
586
- }
587
- };
588
- __decorate$F([
589
- n()
590
- ], W3mConnectCustomWidget.prototype, "tabIdx", void 0);
591
- __decorate$F([
592
- r()
593
- ], W3mConnectCustomWidget.prototype, "connectors", void 0);
594
- __decorate$F([
595
- r()
596
- ], W3mConnectCustomWidget.prototype, "loading", void 0);
597
- W3mConnectCustomWidget = __decorate$F([
598
- customElement("w3m-connect-custom-widget")
599
- ], W3mConnectCustomWidget);
600
- var __decorate$E = function(decorators, target, key, desc) {
601
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
602
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
603
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
604
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
605
- };
606
- let W3mConnectExternalWidget = class W3mConnectExternalWidget2 extends i$1 {
607
- constructor() {
608
- super();
609
- this.unsubscribe = [];
610
- this.tabIdx = void 0;
611
- this.connectors = ConnectorController.state.connectors;
612
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val));
613
- }
614
- disconnectedCallback() {
615
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
616
- }
617
- render() {
618
- const externalConnectors = this.connectors.filter((connector) => connector.type === "EXTERNAL");
619
- const filteredOutExcludedConnectors = externalConnectors.filter(ConnectorUtil.showConnector);
620
- const filteredOutCoinbaseConnectors = filteredOutExcludedConnectors.filter((connector) => connector.id !== ConstantsUtil.CONNECTOR_ID.COINBASE_SDK);
621
- if (!(filteredOutCoinbaseConnectors == null ? void 0 : filteredOutCoinbaseConnectors.length)) {
622
- this.style.cssText = `display: none`;
623
- return null;
624
- }
625
- return x`
626
- <wui-flex flexDirection="column" gap="xs">
627
- ${filteredOutCoinbaseConnectors.map((connector) => x`
628
- <wui-list-wallet
629
- imageSrc=${o(AssetUtil.getConnectorImage(connector))}
630
- .installed=${true}
631
- name=${connector.name ?? "Unknown"}
632
- data-testid=${`wallet-selector-external-${connector.id}`}
633
- @click=${() => this.onConnector(connector)}
634
- tabIdx=${o(this.tabIdx)}
635
- >
636
- </wui-list-wallet>
637
- `)}
638
- </wui-flex>
639
- `;
640
- }
641
- onConnector(connector) {
642
- RouterController.push("ConnectingExternal", { connector });
643
- }
644
- };
645
- __decorate$E([
646
- n()
647
- ], W3mConnectExternalWidget.prototype, "tabIdx", void 0);
648
- __decorate$E([
649
- r()
650
- ], W3mConnectExternalWidget.prototype, "connectors", void 0);
651
- W3mConnectExternalWidget = __decorate$E([
652
- customElement("w3m-connect-external-widget")
653
- ], W3mConnectExternalWidget);
654
- var __decorate$D = function(decorators, target, key, desc) {
655
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
656
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
657
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
658
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
659
- };
660
- let W3mConnectFeaturedWidget = class W3mConnectFeaturedWidget2 extends i$1 {
661
- constructor() {
662
- super(...arguments);
663
- this.tabIdx = void 0;
664
- this.wallets = [];
665
- }
666
- render() {
667
- if (!this.wallets.length) {
668
- this.style.cssText = `display: none`;
669
- return null;
670
- }
671
- return x`
672
- <wui-flex flexDirection="column" gap="xs">
673
- ${this.wallets.map((wallet) => x`
674
- <wui-list-wallet
675
- data-testid=${`wallet-selector-featured-${wallet.id}`}
676
- imageSrc=${o(AssetUtil.getWalletImage(wallet))}
677
- name=${wallet.name ?? "Unknown"}
678
- @click=${() => this.onConnectWallet(wallet)}
679
- tabIdx=${o(this.tabIdx)}
680
- >
681
- </wui-list-wallet>
682
- `)}
683
- </wui-flex>
684
- `;
685
- }
686
- onConnectWallet(wallet) {
687
- ConnectorController.selectWalletConnector(wallet);
688
- }
689
- };
690
- __decorate$D([
691
- n()
692
- ], W3mConnectFeaturedWidget.prototype, "tabIdx", void 0);
693
- __decorate$D([
694
- n()
695
- ], W3mConnectFeaturedWidget.prototype, "wallets", void 0);
696
- W3mConnectFeaturedWidget = __decorate$D([
697
- customElement("w3m-connect-featured-widget")
698
- ], W3mConnectFeaturedWidget);
699
- var __decorate$C = function(decorators, target, key, desc) {
700
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
701
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
702
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
703
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
704
- };
705
- let W3mConnectInjectedWidget = class W3mConnectInjectedWidget2 extends i$1 {
706
- constructor() {
707
- super(...arguments);
708
- this.tabIdx = void 0;
709
- this.connectors = [];
710
- }
711
- render() {
712
- const injectedConnectors = this.connectors.filter(ConnectorUtil.showConnector);
713
- if (injectedConnectors.length === 0) {
714
- this.style.cssText = `display: none`;
715
- return null;
716
- }
717
- return x`
718
- <wui-flex flexDirection="column" gap="xs">
719
- ${injectedConnectors.map((connector) => x`
720
- <wui-list-wallet
721
- imageSrc=${o(AssetUtil.getConnectorImage(connector))}
722
- .installed=${true}
723
- name=${connector.name ?? "Unknown"}
724
- tagVariant="success"
725
- tagLabel="installed"
726
- data-testid=${`wallet-selector-${connector.id}`}
727
- @click=${() => this.onConnector(connector)}
728
- tabIdx=${o(this.tabIdx)}
729
- >
730
- </wui-list-wallet>
731
- `)}
732
- </wui-flex>
733
- `;
734
- }
735
- onConnector(connector) {
736
- ConnectorController.setActiveConnector(connector);
737
- RouterController.push("ConnectingExternal", { connector });
738
- }
739
- };
740
- __decorate$C([
741
- n()
742
- ], W3mConnectInjectedWidget.prototype, "tabIdx", void 0);
743
- __decorate$C([
744
- n()
745
- ], W3mConnectInjectedWidget.prototype, "connectors", void 0);
746
- W3mConnectInjectedWidget = __decorate$C([
747
- customElement("w3m-connect-injected-widget")
748
- ], W3mConnectInjectedWidget);
749
- var __decorate$B = function(decorators, target, key, desc) {
750
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
751
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
752
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
753
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
754
- };
755
- let W3mConnectMultiChainWidget = class W3mConnectMultiChainWidget2 extends i$1 {
756
- constructor() {
757
- super();
758
- this.unsubscribe = [];
759
- this.tabIdx = void 0;
760
- this.connectors = ConnectorController.state.connectors;
761
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val));
762
- }
763
- disconnectedCallback() {
764
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
765
- }
766
- render() {
767
- const multiChainConnectors = this.connectors.filter((connector) => connector.type === "MULTI_CHAIN" && connector.name !== "WalletConnect");
768
- if (!(multiChainConnectors == null ? void 0 : multiChainConnectors.length)) {
769
- this.style.cssText = `display: none`;
770
- return null;
771
- }
772
- return x`
773
- <wui-flex flexDirection="column" gap="xs">
774
- ${multiChainConnectors.map((connector) => x`
775
- <wui-list-wallet
776
- imageSrc=${o(AssetUtil.getConnectorImage(connector))}
777
- .installed=${true}
778
- name=${connector.name ?? "Unknown"}
779
- tagVariant="shade"
780
- tagLabel="multichain"
781
- data-testid=${`wallet-selector-${connector.id}`}
782
- @click=${() => this.onConnector(connector)}
783
- tabIdx=${o(this.tabIdx)}
784
- >
785
- </wui-list-wallet>
786
- `)}
787
- </wui-flex>
788
- `;
789
- }
790
- onConnector(connector) {
791
- ConnectorController.setActiveConnector(connector);
792
- RouterController.push("ConnectingMultiChain");
793
- }
794
- };
795
- __decorate$B([
796
- n()
797
- ], W3mConnectMultiChainWidget.prototype, "tabIdx", void 0);
798
- __decorate$B([
799
- r()
800
- ], W3mConnectMultiChainWidget.prototype, "connectors", void 0);
801
- W3mConnectMultiChainWidget = __decorate$B([
802
- customElement("w3m-connect-multi-chain-widget")
803
- ], W3mConnectMultiChainWidget);
804
- var __decorate$A = function(decorators, target, key, desc) {
805
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
806
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
807
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
808
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
809
- };
810
- let W3mConnectRecentWidget = class W3mConnectRecentWidget2 extends i$1 {
811
- constructor() {
812
- super();
813
- this.unsubscribe = [];
814
- this.tabIdx = void 0;
815
- this.connectors = ConnectorController.state.connectors;
816
- this.loading = false;
817
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val));
818
- if (CoreHelperUtil.isTelegram() && CoreHelperUtil.isIos()) {
819
- this.loading = !ConnectionController.state.wcUri;
820
- this.unsubscribe.push(ConnectionController.subscribeKey("wcUri", (val) => this.loading = !val));
821
- }
822
- }
823
- render() {
824
- const recentWallets = StorageUtil.getRecentWallets();
825
- const filteredRecentWallets = recentWallets.filter((wallet) => !WalletUtil.isExcluded(wallet)).filter((wallet) => !this.hasWalletConnector(wallet)).filter((wallet) => this.isWalletCompatibleWithCurrentChain(wallet));
826
- if (!filteredRecentWallets.length) {
827
- this.style.cssText = `display: none`;
828
- return null;
829
- }
830
- return x`
831
- <wui-flex flexDirection="column" gap="xs">
832
- ${filteredRecentWallets.map((wallet) => x`
833
- <wui-list-wallet
834
- imageSrc=${o(AssetUtil.getWalletImage(wallet))}
835
- name=${wallet.name ?? "Unknown"}
836
- @click=${() => this.onConnectWallet(wallet)}
837
- tagLabel="recent"
838
- tagVariant="shade"
839
- tabIdx=${o(this.tabIdx)}
840
- ?loading=${this.loading}
841
- >
842
- </wui-list-wallet>
843
- `)}
844
- </wui-flex>
845
- `;
846
- }
847
- onConnectWallet(wallet) {
848
- if (this.loading) {
849
- return;
850
- }
851
- ConnectorController.selectWalletConnector(wallet);
852
- }
853
- hasWalletConnector(wallet) {
854
- return this.connectors.some((connector) => connector.id === wallet.id || connector.name === wallet.name);
855
- }
856
- isWalletCompatibleWithCurrentChain(wallet) {
857
- const currentNamespace = ChainController.state.activeChain;
858
- if (currentNamespace && wallet.chains) {
859
- return wallet.chains.some((c) => {
860
- const chainNamespace = c.split(":")[0];
861
- return currentNamespace === chainNamespace;
862
- });
863
- }
864
- return true;
865
- }
866
- };
867
- __decorate$A([
868
- n()
869
- ], W3mConnectRecentWidget.prototype, "tabIdx", void 0);
870
- __decorate$A([
871
- r()
872
- ], W3mConnectRecentWidget.prototype, "connectors", void 0);
873
- __decorate$A([
874
- r()
875
- ], W3mConnectRecentWidget.prototype, "loading", void 0);
876
- W3mConnectRecentWidget = __decorate$A([
877
- customElement("w3m-connect-recent-widget")
878
- ], W3mConnectRecentWidget);
879
- var __decorate$z = function(decorators, target, key, desc) {
880
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
881
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
882
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
883
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
884
- };
885
- let W3mConnectRecommendedWidget = class W3mConnectRecommendedWidget2 extends i$1 {
886
- constructor() {
887
- super();
888
- this.unsubscribe = [];
889
- this.tabIdx = void 0;
890
- this.wallets = [];
891
- this.loading = false;
892
- if (CoreHelperUtil.isTelegram() && CoreHelperUtil.isIos()) {
893
- this.loading = !ConnectionController.state.wcUri;
894
- this.unsubscribe.push(ConnectionController.subscribeKey("wcUri", (val) => this.loading = !val));
895
- }
896
- }
897
- render() {
898
- const { connectors } = ConnectorController.state;
899
- const { customWallets, featuredWalletIds } = OptionsController.state;
900
- const recentWallets = StorageUtil.getRecentWallets();
901
- const wcConnector = connectors.find((c) => c.id === "walletConnect");
902
- const injectedConnectors = connectors.filter((c) => c.type === "INJECTED" || c.type === "ANNOUNCED" || c.type === "MULTI_CHAIN");
903
- const injectedWallets = injectedConnectors.filter((i2) => i2.name !== "Browser Wallet");
904
- if (!wcConnector) {
905
- return null;
906
- }
907
- if (featuredWalletIds || customWallets || !this.wallets.length) {
908
- this.style.cssText = `display: none`;
909
- return null;
910
- }
911
- const overrideLength = injectedWallets.length + recentWallets.length;
912
- const maxRecommended = Math.max(0, 2 - overrideLength);
913
- const wallets = WalletUtil.filterOutDuplicateWallets(this.wallets).slice(0, maxRecommended);
914
- if (!wallets.length) {
915
- this.style.cssText = `display: none`;
916
- return null;
917
- }
918
- return x`
919
- <wui-flex flexDirection="column" gap="xs">
920
- ${wallets.map((wallet) => x`
921
- <wui-list-wallet
922
- imageSrc=${o(AssetUtil.getWalletImage(wallet))}
923
- name=${(wallet == null ? void 0 : wallet.name) ?? "Unknown"}
924
- @click=${() => this.onConnectWallet(wallet)}
925
- tabIdx=${o(this.tabIdx)}
926
- ?loading=${this.loading}
927
- >
928
- </wui-list-wallet>
929
- `)}
930
- </wui-flex>
931
- `;
932
- }
933
- onConnectWallet(wallet) {
934
- if (this.loading) {
935
- return;
936
- }
937
- const connector = ConnectorController.getConnector(wallet.id, wallet.rdns);
938
- if (connector) {
939
- RouterController.push("ConnectingExternal", { connector });
940
- } else {
941
- RouterController.push("ConnectingWalletConnect", { wallet });
942
- }
943
- }
944
- };
945
- __decorate$z([
946
- n()
947
- ], W3mConnectRecommendedWidget.prototype, "tabIdx", void 0);
948
- __decorate$z([
949
- n()
950
- ], W3mConnectRecommendedWidget.prototype, "wallets", void 0);
951
- __decorate$z([
952
- r()
953
- ], W3mConnectRecommendedWidget.prototype, "loading", void 0);
954
- W3mConnectRecommendedWidget = __decorate$z([
955
- customElement("w3m-connect-recommended-widget")
956
- ], W3mConnectRecommendedWidget);
957
- var __decorate$y = function(decorators, target, key, desc) {
958
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
959
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
960
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
961
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
962
- };
963
- let W3mConnectWalletConnectWidget = class W3mConnectWalletConnectWidget2 extends i$1 {
964
- constructor() {
965
- super();
966
- this.unsubscribe = [];
967
- this.tabIdx = void 0;
968
- this.connectors = ConnectorController.state.connectors;
969
- this.connectorImages = AssetController.state.connectorImages;
970
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val), AssetController.subscribeKey("connectorImages", (val) => this.connectorImages = val));
971
- }
972
- disconnectedCallback() {
973
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
974
- }
975
- render() {
976
- if (CoreHelperUtil.isMobile()) {
977
- this.style.cssText = `display: none`;
978
- return null;
979
- }
980
- const connector = this.connectors.find((c) => c.id === "walletConnect");
981
- if (!connector) {
982
- this.style.cssText = `display: none`;
983
- return null;
984
- }
985
- const connectorImage = connector.imageUrl || this.connectorImages[(connector == null ? void 0 : connector.imageId) ?? ""];
986
- return x`
987
- <wui-list-wallet
988
- imageSrc=${o(connectorImage)}
989
- name=${connector.name ?? "Unknown"}
990
- @click=${() => this.onConnector(connector)}
991
- tagLabel="qr code"
992
- tagVariant="main"
993
- tabIdx=${o(this.tabIdx)}
994
- data-testid="wallet-selector-walletconnect"
995
- >
996
- </wui-list-wallet>
997
- `;
998
- }
999
- onConnector(connector) {
1000
- ConnectorController.setActiveConnector(connector);
1001
- RouterController.push("ConnectingWalletConnect");
1002
- }
1003
- };
1004
- __decorate$y([
1005
- n()
1006
- ], W3mConnectWalletConnectWidget.prototype, "tabIdx", void 0);
1007
- __decorate$y([
1008
- r()
1009
- ], W3mConnectWalletConnectWidget.prototype, "connectors", void 0);
1010
- __decorate$y([
1011
- r()
1012
- ], W3mConnectWalletConnectWidget.prototype, "connectorImages", void 0);
1013
- W3mConnectWalletConnectWidget = __decorate$y([
1014
- customElement("w3m-connect-walletconnect-widget")
1015
- ], W3mConnectWalletConnectWidget);
1016
- const styles$n = i`
1017
- :host {
1018
- margin-top: var(--wui-spacing-3xs);
1019
- }
1020
- wui-separator {
1021
- margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
1022
- calc(var(--wui-spacing-m) * -1);
1023
- width: calc(100% + var(--wui-spacing-s) * 2);
1024
- }
1025
- `;
1026
- var __decorate$x = function(decorators, target, key, desc) {
1027
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1028
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1029
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1030
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1031
- };
1032
- let W3mConnectorList = class W3mConnectorList2 extends i$1 {
1033
- constructor() {
1034
- super();
1035
- this.unsubscribe = [];
1036
- this.tabIdx = void 0;
1037
- this.connectors = ConnectorController.state.connectors;
1038
- this.recommended = ApiController.state.recommended;
1039
- this.featured = ApiController.state.featured;
1040
- this.unsubscribe.push(ConnectorController.subscribeKey("connectors", (val) => this.connectors = val), ApiController.subscribeKey("recommended", (val) => this.recommended = val), ApiController.subscribeKey("featured", (val) => this.featured = val));
1041
- }
1042
- disconnectedCallback() {
1043
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
1044
- }
1045
- render() {
1046
- return x`
1047
- <wui-flex flexDirection="column" gap="xs"> ${this.connectorListTemplate()} </wui-flex>
1048
- `;
1049
- }
1050
- connectorListTemplate() {
1051
- const { custom, recent, announced, injected, multiChain, recommended, featured, external } = ConnectorUtil.getConnectorsByType(this.connectors, this.recommended, this.featured);
1052
- const connectorTypeOrder = ConnectorUtil.getConnectorTypeOrder({
1053
- custom,
1054
- recent,
1055
- announced,
1056
- injected,
1057
- multiChain,
1058
- recommended,
1059
- featured,
1060
- external
1061
- });
1062
- return connectorTypeOrder.map((type) => {
1063
- switch (type) {
1064
- case "injected":
1065
- return x`
1066
- ${multiChain.length ? x`<w3m-connect-multi-chain-widget
1067
- tabIdx=${o(this.tabIdx)}
1068
- ></w3m-connect-multi-chain-widget>` : null}
1069
- ${announced.length ? x`<w3m-connect-announced-widget
1070
- tabIdx=${o(this.tabIdx)}
1071
- ></w3m-connect-announced-widget>` : null}
1072
- ${injected.length ? x`<w3m-connect-injected-widget
1073
- .connectors=${injected}
1074
- tabIdx=${o(this.tabIdx)}
1075
- ></w3m-connect-injected-widget>` : null}
1076
- `;
1077
- case "walletConnect":
1078
- return x`<w3m-connect-walletconnect-widget
1079
- tabIdx=${o(this.tabIdx)}
1080
- ></w3m-connect-walletconnect-widget>`;
1081
- case "recent":
1082
- return x`<w3m-connect-recent-widget
1083
- tabIdx=${o(this.tabIdx)}
1084
- ></w3m-connect-recent-widget>`;
1085
- case "featured":
1086
- return x`<w3m-connect-featured-widget
1087
- .wallets=${featured}
1088
- tabIdx=${o(this.tabIdx)}
1089
- ></w3m-connect-featured-widget>`;
1090
- case "custom":
1091
- return x`<w3m-connect-custom-widget
1092
- tabIdx=${o(this.tabIdx)}
1093
- ></w3m-connect-custom-widget>`;
1094
- case "external":
1095
- return x`<w3m-connect-external-widget
1096
- tabIdx=${o(this.tabIdx)}
1097
- ></w3m-connect-external-widget>`;
1098
- case "recommended":
1099
- return x`<w3m-connect-recommended-widget
1100
- .wallets=${recommended}
1101
- tabIdx=${o(this.tabIdx)}
1102
- ></w3m-connect-recommended-widget>`;
1103
- default:
1104
- console.warn(`Unknown connector type: ${type}`);
1105
- return null;
1106
- }
1107
- });
1108
- }
1109
- };
1110
- W3mConnectorList.styles = styles$n;
1111
- __decorate$x([
1112
- n()
1113
- ], W3mConnectorList.prototype, "tabIdx", void 0);
1114
- __decorate$x([
1115
- r()
1116
- ], W3mConnectorList.prototype, "connectors", void 0);
1117
- __decorate$x([
1118
- r()
1119
- ], W3mConnectorList.prototype, "recommended", void 0);
1120
- __decorate$x([
1121
- r()
1122
- ], W3mConnectorList.prototype, "featured", void 0);
1123
- W3mConnectorList = __decorate$x([
1124
- customElement("w3m-connector-list")
1125
- ], W3mConnectorList);
1126
- const styles$m = i`
1127
- :host {
1128
- display: inline-flex;
1129
- background-color: var(--wui-color-gray-glass-002);
1130
- border-radius: var(--wui-border-radius-3xl);
1131
- padding: var(--wui-spacing-3xs);
1132
- position: relative;
1133
- height: 36px;
1134
- min-height: 36px;
1135
- overflow: hidden;
1136
- }
1137
-
1138
- :host::before {
1139
- content: '';
1140
- position: absolute;
1141
- pointer-events: none;
1142
- top: 4px;
1143
- left: 4px;
1144
- display: block;
1145
- width: var(--local-tab-width);
1146
- height: 28px;
1147
- border-radius: var(--wui-border-radius-3xl);
1148
- background-color: var(--wui-color-gray-glass-002);
1149
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
1150
- transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
1151
- transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
1152
- will-change: background-color, opacity;
1153
- }
1154
-
1155
- :host([data-type='flex'])::before {
1156
- left: 3px;
1157
- transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
1158
- }
1159
-
1160
- :host([data-type='flex']) {
1161
- display: flex;
1162
- padding: 0px 0px 0px 12px;
1163
- gap: 4px;
1164
- }
1165
-
1166
- :host([data-type='flex']) > button > wui-text {
1167
- position: absolute;
1168
- left: 18px;
1169
- opacity: 0;
1170
- }
1171
-
1172
- button[data-active='true'] > wui-icon,
1173
- button[data-active='true'] > wui-text {
1174
- color: var(--wui-color-fg-100);
1175
- }
1176
-
1177
- button[data-active='false'] > wui-icon,
1178
- button[data-active='false'] > wui-text {
1179
- color: var(--wui-color-fg-200);
1180
- }
1181
-
1182
- button[data-active='true']:disabled,
1183
- button[data-active='false']:disabled {
1184
- background-color: transparent;
1185
- opacity: 0.5;
1186
- cursor: not-allowed;
1187
- }
1188
-
1189
- button[data-active='true']:disabled > wui-text {
1190
- color: var(--wui-color-fg-200);
1191
- }
1192
-
1193
- button[data-active='false']:disabled > wui-text {
1194
- color: var(--wui-color-fg-300);
1195
- }
1196
-
1197
- button > wui-icon,
1198
- button > wui-text {
1199
- pointer-events: none;
1200
- transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
1201
- will-change: color;
1202
- }
1203
-
1204
- button {
1205
- width: var(--local-tab-width);
1206
- transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
1207
- will-change: background-color;
1208
- }
1209
-
1210
- :host([data-type='flex']) > button {
1211
- width: 34px;
1212
- position: relative;
1213
- display: flex;
1214
- justify-content: flex-start;
1215
- }
1216
-
1217
- button:hover:enabled,
1218
- button:active:enabled {
1219
- background-color: transparent !important;
1220
- }
1221
-
1222
- button:hover:enabled > wui-icon,
1223
- button:active:enabled > wui-icon {
1224
- transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
1225
- color: var(--wui-color-fg-125);
1226
- }
1227
-
1228
- button:hover:enabled > wui-text,
1229
- button:active:enabled > wui-text {
1230
- transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
1231
- color: var(--wui-color-fg-125);
1232
- }
1233
-
1234
- button {
1235
- border-radius: var(--wui-border-radius-3xl);
1236
- }
1237
- `;
1238
- var __decorate$w = function(decorators, target, key, desc) {
1239
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1240
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1241
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1242
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1243
- };
1244
- let WuiTabs = class WuiTabs2 extends i$1 {
1245
- constructor() {
1246
- super(...arguments);
1247
- this.tabs = [];
1248
- this.onTabChange = () => null;
1249
- this.buttons = [];
1250
- this.disabled = false;
1251
- this.localTabWidth = "100px";
1252
- this.activeTab = 0;
1253
- this.isDense = false;
1254
- }
1255
- render() {
1256
- this.isDense = this.tabs.length > 3;
1257
- this.style.cssText = `
1258
- --local-tab: ${this.activeTab};
1259
- --local-tab-width: ${this.localTabWidth};
1260
- `;
1261
- this.dataset["type"] = this.isDense ? "flex" : "block";
1262
- return this.tabs.map((tab, index) => {
1263
- var _a;
1264
- const isActive = index === this.activeTab;
1265
- return x`
1266
- <button
1267
- ?disabled=${this.disabled}
1268
- @click=${() => this.onTabClick(index)}
1269
- data-active=${isActive}
1270
- data-testid="tab-${(_a = tab.label) == null ? void 0 : _a.toLowerCase()}"
1271
- >
1272
- ${this.iconTemplate(tab)}
1273
- <wui-text variant="small-600" color="inherit"> ${tab.label} </wui-text>
1274
- </button>
1275
- `;
1276
- });
1277
- }
1278
- firstUpdated() {
1279
- if (this.shadowRoot && this.isDense) {
1280
- this.buttons = [...this.shadowRoot.querySelectorAll("button")];
1281
- setTimeout(() => {
1282
- this.animateTabs(0, true);
1283
- }, 0);
1284
- }
1285
- }
1286
- iconTemplate(tab) {
1287
- if (tab.icon) {
1288
- return x`<wui-icon size="xs" color="inherit" name=${tab.icon}></wui-icon>`;
1289
- }
1290
- return null;
1291
- }
1292
- onTabClick(index) {
1293
- if (this.buttons) {
1294
- this.animateTabs(index, false);
1295
- }
1296
- this.activeTab = index;
1297
- this.onTabChange(index);
1298
- }
1299
- animateTabs(index, initialAnimation) {
1300
- const passiveBtn = this.buttons[this.activeTab];
1301
- const activeBtn = this.buttons[index];
1302
- const passiveBtnText = passiveBtn == null ? void 0 : passiveBtn.querySelector("wui-text");
1303
- const activeBtnText = activeBtn == null ? void 0 : activeBtn.querySelector("wui-text");
1304
- const activeBtnBounds = activeBtn == null ? void 0 : activeBtn.getBoundingClientRect();
1305
- const activeBtnTextBounds = activeBtnText == null ? void 0 : activeBtnText.getBoundingClientRect();
1306
- if (passiveBtn && passiveBtnText && !initialAnimation && index !== this.activeTab) {
1307
- passiveBtnText.animate([{ opacity: 0 }], {
1308
- duration: 50,
1309
- easing: "ease",
1310
- fill: "forwards"
1311
- });
1312
- passiveBtn.animate([{ width: `34px` }], {
1313
- duration: 500,
1314
- easing: "ease",
1315
- fill: "forwards"
1316
- });
1317
- }
1318
- if (activeBtn && activeBtnBounds && activeBtnTextBounds && activeBtnText) {
1319
- if (index !== this.activeTab || initialAnimation) {
1320
- this.localTabWidth = `${Math.round(activeBtnBounds.width + activeBtnTextBounds.width) + 6}px`;
1321
- activeBtn.animate([{ width: `${activeBtnBounds.width + activeBtnTextBounds.width}px` }], {
1322
- duration: initialAnimation ? 0 : 500,
1323
- fill: "forwards",
1324
- easing: "ease"
1325
- });
1326
- activeBtnText.animate([{ opacity: 1 }], {
1327
- duration: initialAnimation ? 0 : 125,
1328
- delay: initialAnimation ? 0 : 200,
1329
- fill: "forwards",
1330
- easing: "ease"
1331
- });
1332
- }
1333
- }
1334
- }
1335
- };
1336
- WuiTabs.styles = [resetStyles, elementStyles, styles$m];
1337
- __decorate$w([
1338
- n({ type: Array })
1339
- ], WuiTabs.prototype, "tabs", void 0);
1340
- __decorate$w([
1341
- n()
1342
- ], WuiTabs.prototype, "onTabChange", void 0);
1343
- __decorate$w([
1344
- n({ type: Array })
1345
- ], WuiTabs.prototype, "buttons", void 0);
1346
- __decorate$w([
1347
- n({ type: Boolean })
1348
- ], WuiTabs.prototype, "disabled", void 0);
1349
- __decorate$w([
1350
- n()
1351
- ], WuiTabs.prototype, "localTabWidth", void 0);
1352
- __decorate$w([
1353
- r()
1354
- ], WuiTabs.prototype, "activeTab", void 0);
1355
- __decorate$w([
1356
- r()
1357
- ], WuiTabs.prototype, "isDense", void 0);
1358
- WuiTabs = __decorate$w([
1359
- customElement("wui-tabs")
1360
- ], WuiTabs);
1361
- var __decorate$v = function(decorators, target, key, desc) {
1362
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1363
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1364
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1365
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1366
- };
1367
- let W3mConnectingHeader = class W3mConnectingHeader2 extends i$1 {
1368
- constructor() {
1369
- super(...arguments);
1370
- this.platformTabs = [];
1371
- this.unsubscribe = [];
1372
- this.platforms = [];
1373
- this.onSelectPlatfrom = void 0;
1374
- }
1375
- disconnectCallback() {
1376
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
1377
- }
1378
- render() {
1379
- const tabs = this.generateTabs();
1380
- return x`
1381
- <wui-flex justifyContent="center" .padding=${["0", "0", "l", "0"]}>
1382
- <wui-tabs .tabs=${tabs} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
1383
- </wui-flex>
1384
- `;
1385
- }
1386
- generateTabs() {
1387
- const tabs = this.platforms.map((platform) => {
1388
- if (platform === "browser") {
1389
- return { label: "Browser", icon: "extension", platform: "browser" };
1390
- } else if (platform === "mobile") {
1391
- return { label: "Mobile", icon: "mobile", platform: "mobile" };
1392
- } else if (platform === "qrcode") {
1393
- return { label: "Mobile", icon: "mobile", platform: "qrcode" };
1394
- } else if (platform === "web") {
1395
- return { label: "Webapp", icon: "browser", platform: "web" };
1396
- } else if (platform === "desktop") {
1397
- return { label: "Desktop", icon: "desktop", platform: "desktop" };
1398
- }
1399
- return { label: "Browser", icon: "extension", platform: "unsupported" };
1400
- });
1401
- this.platformTabs = tabs.map(({ platform }) => platform);
1402
- return tabs;
1403
- }
1404
- onTabChange(index) {
1405
- var _a;
1406
- const tab = this.platformTabs[index];
1407
- if (tab) {
1408
- (_a = this.onSelectPlatfrom) == null ? void 0 : _a.call(this, tab);
1409
- }
1410
- }
1411
- };
1412
- __decorate$v([
1413
- n({ type: Array })
1414
- ], W3mConnectingHeader.prototype, "platforms", void 0);
1415
- __decorate$v([
1416
- n()
1417
- ], W3mConnectingHeader.prototype, "onSelectPlatfrom", void 0);
1418
- W3mConnectingHeader = __decorate$v([
1419
- customElement("w3m-connecting-header")
1420
- ], W3mConnectingHeader);
1421
- const styles$l = i`
1422
- :host {
1423
- width: var(--local-width);
1424
- position: relative;
1425
- }
1426
-
1427
- button {
1428
- border: none;
1429
- border-radius: var(--local-border-radius);
1430
- width: var(--local-width);
1431
- white-space: nowrap;
1432
- }
1433
-
1434
- /* -- Sizes --------------------------------------------------- */
1435
- button[data-size='md'] {
1436
- padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
1437
- height: 36px;
1438
- }
1439
-
1440
- button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
1441
- padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
1442
- }
1443
-
1444
- button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
1445
- padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
1446
- }
1447
-
1448
- button[data-size='lg'] {
1449
- padding: var(--wui-spacing-m) var(--wui-spacing-2l);
1450
- height: 48px;
1451
- }
1452
-
1453
- /* -- Variants --------------------------------------------------------- */
1454
- button[data-variant='main'] {
1455
- background-color: var(--wui-color-accent-100);
1456
- color: var(--wui-color-inverse-100);
1457
- border: none;
1458
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1459
- }
1460
-
1461
- button[data-variant='inverse'] {
1462
- background-color: var(--wui-color-inverse-100);
1463
- color: var(--wui-color-inverse-000);
1464
- border: none;
1465
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1466
- }
1467
-
1468
- button[data-variant='accent'] {
1469
- background-color: var(--wui-color-accent-glass-010);
1470
- color: var(--wui-color-accent-100);
1471
- border: none;
1472
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
1473
- }
1474
-
1475
- button[data-variant='accent-error'] {
1476
- background: var(--wui-color-error-glass-015);
1477
- color: var(--wui-color-error-100);
1478
- border: none;
1479
- box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
1480
- }
1481
-
1482
- button[data-variant='accent-success'] {
1483
- background: var(--wui-color-success-glass-015);
1484
- color: var(--wui-color-success-100);
1485
- border: none;
1486
- box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
1487
- }
1488
-
1489
- button[data-variant='neutral'] {
1490
- background: transparent;
1491
- color: var(--wui-color-fg-100);
1492
- border: none;
1493
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
1494
- }
1495
-
1496
- /* -- Focus states --------------------------------------------------- */
1497
- button[data-variant='main']:focus-visible:enabled {
1498
- background-color: var(--wui-color-accent-090);
1499
- box-shadow:
1500
- inset 0 0 0 1px var(--wui-color-accent-100),
1501
- 0 0 0 4px var(--wui-color-accent-glass-020);
1502
- }
1503
- button[data-variant='inverse']:focus-visible:enabled {
1504
- background-color: var(--wui-color-inverse-100);
1505
- box-shadow:
1506
- inset 0 0 0 1px var(--wui-color-gray-glass-010),
1507
- 0 0 0 4px var(--wui-color-accent-glass-020);
1508
- }
1509
- button[data-variant='accent']:focus-visible:enabled {
1510
- background-color: var(--wui-color-accent-glass-010);
1511
- box-shadow:
1512
- inset 0 0 0 1px var(--wui-color-accent-100),
1513
- 0 0 0 4px var(--wui-color-accent-glass-020);
1514
- }
1515
- button[data-variant='accent-error']:focus-visible:enabled {
1516
- background: var(--wui-color-error-glass-015);
1517
- box-shadow:
1518
- inset 0 0 0 1px var(--wui-color-error-100),
1519
- 0 0 0 4px var(--wui-color-error-glass-020);
1520
- }
1521
- button[data-variant='accent-success']:focus-visible:enabled {
1522
- background: var(--wui-color-success-glass-015);
1523
- box-shadow:
1524
- inset 0 0 0 1px var(--wui-color-success-100),
1525
- 0 0 0 4px var(--wui-color-success-glass-020);
1526
- }
1527
- button[data-variant='neutral']:focus-visible:enabled {
1528
- background: var(--wui-color-gray-glass-005);
1529
- box-shadow:
1530
- inset 0 0 0 1px var(--wui-color-gray-glass-010),
1531
- 0 0 0 4px var(--wui-color-gray-glass-002);
1532
- }
1533
-
1534
- /* -- Hover & Active states ----------------------------------------------------------- */
1535
- @media (hover: hover) and (pointer: fine) {
1536
- button[data-variant='main']:hover:enabled {
1537
- background-color: var(--wui-color-accent-090);
1538
- }
1539
-
1540
- button[data-variant='main']:active:enabled {
1541
- background-color: var(--wui-color-accent-080);
1542
- }
1543
-
1544
- button[data-variant='accent']:hover:enabled {
1545
- background-color: var(--wui-color-accent-glass-015);
1546
- }
1547
-
1548
- button[data-variant='accent']:active:enabled {
1549
- background-color: var(--wui-color-accent-glass-020);
1550
- }
1551
-
1552
- button[data-variant='accent-error']:hover:enabled {
1553
- background: var(--wui-color-error-glass-020);
1554
- color: var(--wui-color-error-100);
1555
- }
1556
-
1557
- button[data-variant='accent-error']:active:enabled {
1558
- background: var(--wui-color-error-glass-030);
1559
- color: var(--wui-color-error-100);
1560
- }
1561
-
1562
- button[data-variant='accent-success']:hover:enabled {
1563
- background: var(--wui-color-success-glass-020);
1564
- color: var(--wui-color-success-100);
1565
- }
1566
-
1567
- button[data-variant='accent-success']:active:enabled {
1568
- background: var(--wui-color-success-glass-030);
1569
- color: var(--wui-color-success-100);
1570
- }
1571
-
1572
- button[data-variant='neutral']:hover:enabled {
1573
- background: var(--wui-color-gray-glass-002);
1574
- }
1575
-
1576
- button[data-variant='neutral']:active:enabled {
1577
- background: var(--wui-color-gray-glass-005);
1578
- }
1579
-
1580
- button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
1581
- padding-left: var(--wui-spacing-m);
1582
- }
1583
-
1584
- button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
1585
- padding-right: var(--wui-spacing-m);
1586
- }
1587
- }
1588
-
1589
- /* -- Disabled state --------------------------------------------------- */
1590
- button:disabled {
1591
- background-color: var(--wui-color-gray-glass-002);
1592
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
1593
- color: var(--wui-color-gray-glass-020);
1594
- cursor: not-allowed;
1595
- }
1596
-
1597
- button > wui-text {
1598
- transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
1599
- will-change: opacity;
1600
- opacity: var(--local-opacity-100);
1601
- }
1602
-
1603
- ::slotted(*) {
1604
- transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
1605
- will-change: opacity;
1606
- opacity: var(--local-opacity-100);
1607
- }
1608
-
1609
- wui-loading-spinner {
1610
- position: absolute;
1611
- left: 50%;
1612
- top: 50%;
1613
- transform: translate(-50%, -50%);
1614
- opacity: var(--local-opacity-000);
1615
- }
1616
- `;
1617
- var __decorate$u = function(decorators, target, key, desc) {
1618
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1619
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1620
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1621
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1622
- };
1623
- const SPINNER_COLOR_BY_VARIANT = {
1624
- main: "inverse-100",
1625
- inverse: "inverse-000",
1626
- accent: "accent-100",
1627
- "accent-error": "error-100",
1628
- "accent-success": "success-100",
1629
- neutral: "fg-100",
1630
- disabled: "gray-glass-020"
1631
- };
1632
- const TEXT_VARIANT_BY_SIZE = {
1633
- lg: "paragraph-600",
1634
- md: "small-600"
1635
- };
1636
- const SPINNER_SIZE_BY_SIZE = {
1637
- lg: "md",
1638
- md: "md"
1639
- };
1640
- let WuiButton = class WuiButton2 extends i$1 {
1641
- constructor() {
1642
- super(...arguments);
1643
- this.size = "lg";
1644
- this.disabled = false;
1645
- this.fullWidth = false;
1646
- this.loading = false;
1647
- this.variant = "main";
1648
- this.hasIconLeft = false;
1649
- this.hasIconRight = false;
1650
- this.borderRadius = "m";
1651
- }
1652
- render() {
1653
- this.style.cssText = `
1654
- --local-width: ${this.fullWidth ? "100%" : "auto"};
1655
- --local-opacity-100: ${this.loading ? 0 : 1};
1656
- --local-opacity-000: ${this.loading ? 1 : 0};
1657
- --local-border-radius: var(--wui-border-radius-${this.borderRadius});
1658
- `;
1659
- const textVariant = this.textVariant ?? TEXT_VARIANT_BY_SIZE[this.size];
1660
- return x`
1661
- <button
1662
- data-variant=${this.variant}
1663
- data-icon-left=${this.hasIconLeft}
1664
- data-icon-right=${this.hasIconRight}
1665
- data-size=${this.size}
1666
- ?disabled=${this.disabled}
1667
- >
1668
- ${this.loadingTemplate()}
1669
- <slot name="iconLeft" @slotchange=${() => this.handleSlotLeftChange()}></slot>
1670
- <wui-text variant=${textVariant} color="inherit">
1671
- <slot></slot>
1672
- </wui-text>
1673
- <slot name="iconRight" @slotchange=${() => this.handleSlotRightChange()}></slot>
1674
- </button>
1675
- `;
1676
- }
1677
- handleSlotLeftChange() {
1678
- this.hasIconLeft = true;
1679
- }
1680
- handleSlotRightChange() {
1681
- this.hasIconRight = true;
1682
- }
1683
- loadingTemplate() {
1684
- if (this.loading) {
1685
- const size = SPINNER_SIZE_BY_SIZE[this.size];
1686
- const color = this.disabled ? SPINNER_COLOR_BY_VARIANT["disabled"] : SPINNER_COLOR_BY_VARIANT[this.variant];
1687
- return x`<wui-loading-spinner color=${color} size=${size}></wui-loading-spinner>`;
1688
- }
1689
- return x``;
1690
- }
1691
- };
1692
- WuiButton.styles = [resetStyles, elementStyles, styles$l];
1693
- __decorate$u([
1694
- n()
1695
- ], WuiButton.prototype, "size", void 0);
1696
- __decorate$u([
1697
- n({ type: Boolean })
1698
- ], WuiButton.prototype, "disabled", void 0);
1699
- __decorate$u([
1700
- n({ type: Boolean })
1701
- ], WuiButton.prototype, "fullWidth", void 0);
1702
- __decorate$u([
1703
- n({ type: Boolean })
1704
- ], WuiButton.prototype, "loading", void 0);
1705
- __decorate$u([
1706
- n()
1707
- ], WuiButton.prototype, "variant", void 0);
1708
- __decorate$u([
1709
- n({ type: Boolean })
1710
- ], WuiButton.prototype, "hasIconLeft", void 0);
1711
- __decorate$u([
1712
- n({ type: Boolean })
1713
- ], WuiButton.prototype, "hasIconRight", void 0);
1714
- __decorate$u([
1715
- n()
1716
- ], WuiButton.prototype, "borderRadius", void 0);
1717
- __decorate$u([
1718
- n()
1719
- ], WuiButton.prototype, "textVariant", void 0);
1720
- WuiButton = __decorate$u([
1721
- customElement("wui-button")
1722
- ], WuiButton);
1723
- const styles$k = i`
1724
- button {
1725
- padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
1726
- border-radius: var(--wui-border-radius-3xs);
1727
- background-color: transparent;
1728
- color: var(--wui-color-accent-100);
1729
- }
1730
-
1731
- button:disabled {
1732
- background-color: transparent;
1733
- color: var(--wui-color-gray-glass-015);
1734
- }
1735
-
1736
- button:hover {
1737
- background-color: var(--wui-color-gray-glass-005);
1738
- }
1739
- `;
1740
- var __decorate$t = function(decorators, target, key, desc) {
1741
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1742
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1743
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1744
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1745
- };
1746
- let WuiLink = class WuiLink2 extends i$1 {
1747
- constructor() {
1748
- super(...arguments);
1749
- this.tabIdx = void 0;
1750
- this.disabled = false;
1751
- this.color = "inherit";
1752
- }
1753
- render() {
1754
- return x`
1755
- <button ?disabled=${this.disabled} tabindex=${o(this.tabIdx)}>
1756
- <slot name="iconLeft"></slot>
1757
- <wui-text variant="small-600" color=${this.color}>
1758
- <slot></slot>
1759
- </wui-text>
1760
- <slot name="iconRight"></slot>
1761
- </button>
1762
- `;
1763
- }
1764
- };
1765
- WuiLink.styles = [resetStyles, elementStyles, styles$k];
1766
- __decorate$t([
1767
- n()
1768
- ], WuiLink.prototype, "tabIdx", void 0);
1769
- __decorate$t([
1770
- n({ type: Boolean })
1771
- ], WuiLink.prototype, "disabled", void 0);
1772
- __decorate$t([
1773
- n()
1774
- ], WuiLink.prototype, "color", void 0);
1775
- WuiLink = __decorate$t([
1776
- customElement("wui-link")
1777
- ], WuiLink);
1778
- const styles$j = i`
1779
- :host {
1780
- display: block;
1781
- width: var(--wui-box-size-md);
1782
- height: var(--wui-box-size-md);
1783
- }
1784
-
1785
- svg {
1786
- width: var(--wui-box-size-md);
1787
- height: var(--wui-box-size-md);
1788
- }
1789
-
1790
- rect {
1791
- fill: none;
1792
- stroke: var(--wui-color-accent-100);
1793
- stroke-width: 4px;
1794
- stroke-linecap: round;
1795
- animation: dash 1s linear infinite;
1796
- }
1797
-
1798
- @keyframes dash {
1799
- to {
1800
- stroke-dashoffset: 0px;
1801
- }
1802
- }
1803
- `;
1804
- var __decorate$s = function(decorators, target, key, desc) {
1805
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1806
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1807
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1808
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1809
- };
1810
- let WuiLoadingThumbnail = class WuiLoadingThumbnail2 extends i$1 {
1811
- constructor() {
1812
- super(...arguments);
1813
- this.radius = 36;
1814
- }
1815
- render() {
1816
- return this.svgLoaderTemplate();
1817
- }
1818
- svgLoaderTemplate() {
1819
- const radius = this.radius > 50 ? 50 : this.radius;
1820
- const standardValue = 36;
1821
- const radiusFactor = standardValue - radius;
1822
- const dashArrayStart = 116 + radiusFactor;
1823
- const dashArrayEnd = 245 + radiusFactor;
1824
- const dashOffset = 360 + radiusFactor * 1.75;
1825
- return x`
1826
- <svg viewBox="0 0 110 110" width="110" height="110">
1827
- <rect
1828
- x="2"
1829
- y="2"
1830
- width="106"
1831
- height="106"
1832
- rx=${radius}
1833
- stroke-dasharray="${dashArrayStart} ${dashArrayEnd}"
1834
- stroke-dashoffset=${dashOffset}
1835
- />
1836
- </svg>
1837
- `;
1838
- }
1839
- };
1840
- WuiLoadingThumbnail.styles = [resetStyles, styles$j];
1841
- __decorate$s([
1842
- n({ type: Number })
1843
- ], WuiLoadingThumbnail.prototype, "radius", void 0);
1844
- WuiLoadingThumbnail = __decorate$s([
1845
- customElement("wui-loading-thumbnail")
1846
- ], WuiLoadingThumbnail);
1847
- const styles$i = i`
1848
- button {
1849
- border: none;
1850
- border-radius: var(--wui-border-radius-3xl);
1851
- }
1852
-
1853
- button[data-variant='main'] {
1854
- background-color: var(--wui-color-accent-100);
1855
- color: var(--wui-color-inverse-100);
1856
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1857
- }
1858
-
1859
- button[data-variant='accent'] {
1860
- background-color: var(--wui-color-accent-glass-010);
1861
- color: var(--wui-color-accent-100);
1862
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
1863
- }
1864
-
1865
- button[data-variant='gray'] {
1866
- background-color: transparent;
1867
- color: var(--wui-color-fg-200);
1868
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1869
- }
1870
-
1871
- button[data-variant='shade'] {
1872
- background-color: transparent;
1873
- color: var(--wui-color-accent-100);
1874
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1875
- }
1876
-
1877
- button[data-size='sm'] {
1878
- height: 32px;
1879
- padding: 0 var(--wui-spacing-s);
1880
- }
1881
-
1882
- button[data-size='md'] {
1883
- height: 40px;
1884
- padding: 0 var(--wui-spacing-l);
1885
- }
1886
-
1887
- button[data-size='sm'] > wui-image {
1888
- width: 16px;
1889
- height: 16px;
1890
- }
1891
-
1892
- button[data-size='md'] > wui-image {
1893
- width: 24px;
1894
- height: 24px;
1895
- }
1896
-
1897
- button[data-size='sm'] > wui-icon {
1898
- width: 12px;
1899
- height: 12px;
1900
- }
1901
-
1902
- button[data-size='md'] > wui-icon {
1903
- width: 14px;
1904
- height: 14px;
1905
- }
1906
-
1907
- wui-image {
1908
- border-radius: var(--wui-border-radius-3xl);
1909
- overflow: hidden;
1910
- }
1911
-
1912
- button.disabled > wui-icon,
1913
- button.disabled > wui-image {
1914
- filter: grayscale(1);
1915
- }
1916
-
1917
- button[data-variant='main'] > wui-image {
1918
- box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
1919
- }
1920
-
1921
- button[data-variant='shade'] > wui-image,
1922
- button[data-variant='gray'] > wui-image {
1923
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
1924
- }
1925
-
1926
- @media (hover: hover) and (pointer: fine) {
1927
- button[data-variant='main']:focus-visible {
1928
- background-color: var(--wui-color-accent-090);
1929
- }
1930
-
1931
- button[data-variant='main']:hover:enabled {
1932
- background-color: var(--wui-color-accent-090);
1933
- }
1934
-
1935
- button[data-variant='main']:active:enabled {
1936
- background-color: var(--wui-color-accent-080);
1937
- }
1938
-
1939
- button[data-variant='accent']:hover:enabled {
1940
- background-color: var(--wui-color-accent-glass-015);
1941
- }
1942
-
1943
- button[data-variant='accent']:active:enabled {
1944
- background-color: var(--wui-color-accent-glass-020);
1945
- }
1946
-
1947
- button[data-variant='shade']:focus-visible,
1948
- button[data-variant='gray']:focus-visible,
1949
- button[data-variant='shade']:hover,
1950
- button[data-variant='gray']:hover {
1951
- background-color: var(--wui-color-gray-glass-002);
1952
- }
1953
-
1954
- button[data-variant='gray']:active,
1955
- button[data-variant='shade']:active {
1956
- background-color: var(--wui-color-gray-glass-005);
1957
- }
1958
- }
1959
-
1960
- button.disabled {
1961
- color: var(--wui-color-gray-glass-020);
1962
- background-color: var(--wui-color-gray-glass-002);
1963
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
1964
- pointer-events: none;
1965
- }
1966
- `;
1967
- var __decorate$r = function(decorators, target, key, desc) {
1968
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1969
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
1970
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
1971
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
1972
- };
1973
- let WuiChipButton = class WuiChipButton2 extends i$1 {
1974
- constructor() {
1975
- super(...arguments);
1976
- this.variant = "accent";
1977
- this.imageSrc = "";
1978
- this.disabled = false;
1979
- this.icon = "externalLink";
1980
- this.size = "md";
1981
- this.text = "";
1982
- }
1983
- render() {
1984
- const textVariant = this.size === "sm" ? "small-600" : "paragraph-600";
1985
- return x`
1986
- <button
1987
- class=${this.disabled ? "disabled" : ""}
1988
- data-variant=${this.variant}
1989
- data-size=${this.size}
1990
- >
1991
- ${this.imageSrc ? x`<wui-image src=${this.imageSrc}></wui-image>` : null}
1992
- <wui-text variant=${textVariant} color="inherit"> ${this.text} </wui-text>
1993
- <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
1994
- </button>
1995
- `;
1996
- }
1997
- };
1998
- WuiChipButton.styles = [resetStyles, elementStyles, styles$i];
1999
- __decorate$r([
2000
- n()
2001
- ], WuiChipButton.prototype, "variant", void 0);
2002
- __decorate$r([
2003
- n()
2004
- ], WuiChipButton.prototype, "imageSrc", void 0);
2005
- __decorate$r([
2006
- n({ type: Boolean })
2007
- ], WuiChipButton.prototype, "disabled", void 0);
2008
- __decorate$r([
2009
- n()
2010
- ], WuiChipButton.prototype, "icon", void 0);
2011
- __decorate$r([
2012
- n()
2013
- ], WuiChipButton.prototype, "size", void 0);
2014
- __decorate$r([
2015
- n()
2016
- ], WuiChipButton.prototype, "text", void 0);
2017
- WuiChipButton = __decorate$r([
2018
- customElement("wui-chip-button")
2019
- ], WuiChipButton);
2020
- const styles$h = i`
2021
- wui-flex {
2022
- width: 100%;
2023
- background-color: var(--wui-color-gray-glass-002);
2024
- border-radius: var(--wui-border-radius-xs);
2025
- }
2026
- `;
2027
- var __decorate$q = function(decorators, target, key, desc) {
2028
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2029
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2030
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2031
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2032
- };
2033
- let WuiCtaButton = class WuiCtaButton2 extends i$1 {
2034
- constructor() {
2035
- super(...arguments);
2036
- this.disabled = false;
2037
- this.label = "";
2038
- this.buttonLabel = "";
2039
- }
2040
- render() {
2041
- return x`
2042
- <wui-flex
2043
- justifyContent="space-between"
2044
- alignItems="center"
2045
- .padding=${["1xs", "2l", "1xs", "2l"]}
2046
- >
2047
- <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
2048
- <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
2049
- </wui-chip-button>
2050
- </wui-flex>
2051
- `;
2052
- }
2053
- };
2054
- WuiCtaButton.styles = [resetStyles, elementStyles, styles$h];
2055
- __decorate$q([
2056
- n({ type: Boolean })
2057
- ], WuiCtaButton.prototype, "disabled", void 0);
2058
- __decorate$q([
2059
- n()
2060
- ], WuiCtaButton.prototype, "label", void 0);
2061
- __decorate$q([
2062
- n()
2063
- ], WuiCtaButton.prototype, "buttonLabel", void 0);
2064
- WuiCtaButton = __decorate$q([
2065
- customElement("wui-cta-button")
2066
- ], WuiCtaButton);
2067
- const styles$g = i`
2068
- :host {
2069
- display: block;
2070
- padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
2071
- }
2072
- `;
2073
- var __decorate$p = function(decorators, target, key, desc) {
2074
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2075
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2076
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2077
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2078
- };
2079
- let W3mMobileDownloadLinks = class W3mMobileDownloadLinks2 extends i$1 {
2080
- constructor() {
2081
- super(...arguments);
2082
- this.wallet = void 0;
2083
- }
2084
- render() {
2085
- if (!this.wallet) {
2086
- this.style.display = "none";
2087
- return null;
2088
- }
2089
- const { name, app_store, play_store, chrome_store, homepage } = this.wallet;
2090
- const isMobile = CoreHelperUtil.isMobile();
2091
- const isIos = CoreHelperUtil.isIos();
2092
- const isAndroid = CoreHelperUtil.isAndroid();
2093
- const isMultiple = [app_store, play_store, homepage, chrome_store].filter(Boolean).length > 1;
2094
- const shortName = UiHelperUtil.getTruncateString({
2095
- string: name,
2096
- charsStart: 12,
2097
- charsEnd: 0,
2098
- truncate: "end"
2099
- });
2100
- if (isMultiple && !isMobile) {
2101
- return x`
2102
- <wui-cta-button
2103
- label=${`Don't have ${shortName}?`}
2104
- buttonLabel="Get"
2105
- @click=${() => RouterController.push("Downloads", { wallet: this.wallet })}
2106
- ></wui-cta-button>
2107
- `;
2108
- }
2109
- if (!isMultiple && homepage) {
2110
- return x`
2111
- <wui-cta-button
2112
- label=${`Don't have ${shortName}?`}
2113
- buttonLabel="Get"
2114
- @click=${this.onHomePage.bind(this)}
2115
- ></wui-cta-button>
2116
- `;
2117
- }
2118
- if (app_store && isIos) {
2119
- return x`
2120
- <wui-cta-button
2121
- label=${`Don't have ${shortName}?`}
2122
- buttonLabel="Get"
2123
- @click=${this.onAppStore.bind(this)}
2124
- ></wui-cta-button>
2125
- `;
2126
- }
2127
- if (play_store && isAndroid) {
2128
- return x`
2129
- <wui-cta-button
2130
- label=${`Don't have ${shortName}?`}
2131
- buttonLabel="Get"
2132
- @click=${this.onPlayStore.bind(this)}
2133
- ></wui-cta-button>
2134
- `;
2135
- }
2136
- this.style.display = "none";
2137
- return null;
2138
- }
2139
- onAppStore() {
2140
- var _a;
2141
- if ((_a = this.wallet) == null ? void 0 : _a.app_store) {
2142
- CoreHelperUtil.openHref(this.wallet.app_store, "_blank");
2143
- }
2144
- }
2145
- onPlayStore() {
2146
- var _a;
2147
- if ((_a = this.wallet) == null ? void 0 : _a.play_store) {
2148
- CoreHelperUtil.openHref(this.wallet.play_store, "_blank");
2149
- }
2150
- }
2151
- onHomePage() {
2152
- var _a;
2153
- if ((_a = this.wallet) == null ? void 0 : _a.homepage) {
2154
- CoreHelperUtil.openHref(this.wallet.homepage, "_blank");
2155
- }
2156
- }
2157
- };
2158
- W3mMobileDownloadLinks.styles = [styles$g];
2159
- __decorate$p([
2160
- n({ type: Object })
2161
- ], W3mMobileDownloadLinks.prototype, "wallet", void 0);
2162
- W3mMobileDownloadLinks = __decorate$p([
2163
- customElement("w3m-mobile-download-links")
2164
- ], W3mMobileDownloadLinks);
2165
- const styles$f = i`
2166
- @keyframes shake {
2167
- 0% {
2168
- transform: translateX(0);
2169
- }
2170
- 25% {
2171
- transform: translateX(3px);
2172
- }
2173
- 50% {
2174
- transform: translateX(-3px);
2175
- }
2176
- 75% {
2177
- transform: translateX(3px);
2178
- }
2179
- 100% {
2180
- transform: translateX(0);
2181
- }
2182
- }
2183
-
2184
- wui-flex:first-child:not(:only-child) {
2185
- position: relative;
2186
- }
2187
-
2188
- wui-loading-thumbnail {
2189
- position: absolute;
2190
- }
2191
-
2192
- wui-icon-box {
2193
- position: absolute;
2194
- right: calc(var(--wui-spacing-3xs) * -1);
2195
- bottom: calc(var(--wui-spacing-3xs) * -1);
2196
- opacity: 0;
2197
- transform: scale(0.5);
2198
- transition-property: opacity, transform;
2199
- transition-duration: var(--wui-duration-lg);
2200
- transition-timing-function: var(--wui-ease-out-power-2);
2201
- will-change: opacity, transform;
2202
- }
2203
-
2204
- wui-text[align='center'] {
2205
- width: 100%;
2206
- padding: 0px var(--wui-spacing-l);
2207
- }
2208
-
2209
- [data-error='true'] wui-icon-box {
2210
- opacity: 1;
2211
- transform: scale(1);
2212
- }
2213
-
2214
- [data-error='true'] > wui-flex:first-child {
2215
- animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
2216
- }
2217
-
2218
- [data-retry='false'] wui-link {
2219
- display: none;
2220
- }
2221
-
2222
- [data-retry='true'] wui-link {
2223
- display: block;
2224
- opacity: 1;
2225
- }
2226
- `;
2227
- var __decorate$o = function(decorators, target, key, desc) {
2228
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2229
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2230
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2231
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2232
- };
2233
- class W3mConnectingWidget extends i$1 {
2234
- constructor() {
2235
- var _a, _b, _c, _d, _e;
2236
- super();
2237
- this.wallet = (_a = RouterController.state.data) == null ? void 0 : _a.wallet;
2238
- this.connector = (_b = RouterController.state.data) == null ? void 0 : _b.connector;
2239
- this.timeout = void 0;
2240
- this.secondaryBtnIcon = "refresh";
2241
- this.onConnect = void 0;
2242
- this.onRender = void 0;
2243
- this.onAutoConnect = void 0;
2244
- this.isWalletConnect = true;
2245
- this.unsubscribe = [];
2246
- this.imageSrc = AssetUtil.getWalletImage(this.wallet) ?? AssetUtil.getConnectorImage(this.connector);
2247
- this.name = ((_c = this.wallet) == null ? void 0 : _c.name) ?? ((_d = this.connector) == null ? void 0 : _d.name) ?? "Wallet";
2248
- this.isRetrying = false;
2249
- this.uri = ConnectionController.state.wcUri;
2250
- this.error = ConnectionController.state.wcError;
2251
- this.ready = false;
2252
- this.showRetry = false;
2253
- this.secondaryBtnLabel = "Try again";
2254
- this.secondaryLabel = "Accept connection request in the wallet";
2255
- this.isLoading = false;
2256
- this.isMobile = false;
2257
- this.onRetry = void 0;
2258
- this.unsubscribe.push(...[
2259
- ConnectionController.subscribeKey("wcUri", (val) => {
2260
- var _a2;
2261
- this.uri = val;
2262
- if (this.isRetrying && this.onRetry) {
2263
- this.isRetrying = false;
2264
- (_a2 = this.onConnect) == null ? void 0 : _a2.call(this);
2265
- }
2266
- }),
2267
- ConnectionController.subscribeKey("wcError", (val) => this.error = val)
2268
- ]);
2269
- if ((CoreHelperUtil.isTelegram() || CoreHelperUtil.isSafari()) && CoreHelperUtil.isIos() && ConnectionController.state.wcUri) {
2270
- (_e = this.onConnect) == null ? void 0 : _e.call(this);
2271
- }
2272
- }
2273
- firstUpdated() {
2274
- var _a;
2275
- (_a = this.onAutoConnect) == null ? void 0 : _a.call(this);
2276
- this.showRetry = !this.onAutoConnect;
2277
- }
2278
- disconnectedCallback() {
2279
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
2280
- ConnectionController.setWcError(false);
2281
- clearTimeout(this.timeout);
2282
- }
2283
- render() {
2284
- var _a;
2285
- (_a = this.onRender) == null ? void 0 : _a.call(this);
2286
- this.onShowRetry();
2287
- const subLabel = this.error ? "Connection can be declined if a previous request is still active" : this.secondaryLabel;
2288
- let label = `Continue in ${this.name}`;
2289
- if (this.error) {
2290
- label = "Connection declined";
2291
- }
2292
- return x`
2293
- <wui-flex
2294
- data-error=${o(this.error)}
2295
- data-retry=${this.showRetry}
2296
- flexDirection="column"
2297
- alignItems="center"
2298
- .padding=${["3xl", "xl", "xl", "xl"]}
2299
- gap="xl"
2300
- >
2301
- <wui-flex justifyContent="center" alignItems="center">
2302
- <wui-wallet-image size="lg" imageSrc=${o(this.imageSrc)}></wui-wallet-image>
2303
-
2304
- ${this.error ? null : this.loaderTemplate()}
2305
-
2306
- <wui-icon-box
2307
- backgroundColor="error-100"
2308
- background="opaque"
2309
- iconColor="error-100"
2310
- icon="close"
2311
- size="sm"
2312
- border
2313
- borderColor="wui-color-bg-125"
2314
- ></wui-icon-box>
2315
- </wui-flex>
2316
-
2317
- <wui-flex flexDirection="column" alignItems="center" gap="xs">
2318
- <wui-text variant="paragraph-500" color=${this.error ? "error-100" : "fg-100"}>
2319
- ${label}
2320
- </wui-text>
2321
- <wui-text align="center" variant="small-500" color="fg-200">${subLabel}</wui-text>
2322
- </wui-flex>
2323
-
2324
- ${this.secondaryBtnLabel ? x`
2325
- <wui-button
2326
- variant="accent"
2327
- size="md"
2328
- ?disabled=${this.isRetrying || this.isLoading}
2329
- @click=${this.onTryAgain.bind(this)}
2330
- data-testid="w3m-connecting-widget-secondary-button"
2331
- >
2332
- <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
2333
- ${this.secondaryBtnLabel}
2334
- </wui-button>
2335
- ` : null}
2336
- </wui-flex>
2337
-
2338
- ${this.isWalletConnect ? x`
2339
- <wui-flex .padding=${["0", "xl", "xl", "xl"]} justifyContent="center">
2340
- <wui-link @click=${this.onCopyUri} color="fg-200" data-testid="wui-link-copy">
2341
- <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
2342
- Copy link
2343
- </wui-link>
2344
- </wui-flex>
2345
- ` : null}
2346
-
2347
- <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
2348
- `;
2349
- }
2350
- onShowRetry() {
2351
- var _a;
2352
- if (this.error && !this.showRetry) {
2353
- this.showRetry = true;
2354
- const retryButton = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("wui-button");
2355
- retryButton == null ? void 0 : retryButton.animate([{ opacity: 0 }, { opacity: 1 }], {
2356
- fill: "forwards",
2357
- easing: "ease"
2358
- });
2359
- }
2360
- }
2361
- onTryAgain() {
2362
- var _a, _b;
2363
- ConnectionController.setWcError(false);
2364
- if (this.onRetry) {
2365
- this.isRetrying = true;
2366
- (_a = this.onRetry) == null ? void 0 : _a.call(this);
2367
- } else {
2368
- (_b = this.onConnect) == null ? void 0 : _b.call(this);
2369
- }
2370
- }
2371
- loaderTemplate() {
2372
- const borderRadiusMaster = ThemeController.state.themeVariables["--w3m-border-radius-master"];
2373
- const radius = borderRadiusMaster ? parseInt(borderRadiusMaster.replace("px", ""), 10) : 4;
2374
- return x`<wui-loading-thumbnail radius=${radius * 9}></wui-loading-thumbnail>`;
2375
- }
2376
- onCopyUri() {
2377
- try {
2378
- if (this.uri) {
2379
- CoreHelperUtil.copyToClopboard(this.uri);
2380
- SnackController.showSuccess("Link copied");
2381
- }
2382
- } catch {
2383
- SnackController.showError("Failed to copy");
2384
- }
2385
- }
2386
- }
2387
- W3mConnectingWidget.styles = styles$f;
2388
- __decorate$o([
2389
- r()
2390
- ], W3mConnectingWidget.prototype, "isRetrying", void 0);
2391
- __decorate$o([
2392
- r()
2393
- ], W3mConnectingWidget.prototype, "uri", void 0);
2394
- __decorate$o([
2395
- r()
2396
- ], W3mConnectingWidget.prototype, "error", void 0);
2397
- __decorate$o([
2398
- r()
2399
- ], W3mConnectingWidget.prototype, "ready", void 0);
2400
- __decorate$o([
2401
- r()
2402
- ], W3mConnectingWidget.prototype, "showRetry", void 0);
2403
- __decorate$o([
2404
- r()
2405
- ], W3mConnectingWidget.prototype, "secondaryBtnLabel", void 0);
2406
- __decorate$o([
2407
- r()
2408
- ], W3mConnectingWidget.prototype, "secondaryLabel", void 0);
2409
- __decorate$o([
2410
- r()
2411
- ], W3mConnectingWidget.prototype, "isLoading", void 0);
2412
- __decorate$o([
2413
- n({ type: Boolean })
2414
- ], W3mConnectingWidget.prototype, "isMobile", void 0);
2415
- __decorate$o([
2416
- n()
2417
- ], W3mConnectingWidget.prototype, "onRetry", void 0);
2418
- var __decorate$n = function(decorators, target, key, desc) {
2419
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2420
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2421
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2422
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2423
- };
2424
- let W3mConnectingWcBrowser = class W3mConnectingWcBrowser2 extends W3mConnectingWidget {
2425
- constructor() {
2426
- super();
2427
- if (!this.wallet) {
2428
- throw new Error("w3m-connecting-wc-browser: No wallet provided");
2429
- }
2430
- this.onConnect = this.onConnectProxy.bind(this);
2431
- this.onAutoConnect = this.onConnectProxy.bind(this);
2432
- EventsController.sendEvent({
2433
- type: "track",
2434
- event: "SELECT_WALLET",
2435
- properties: { name: this.wallet.name, platform: "browser" }
2436
- });
2437
- }
2438
- async onConnectProxy() {
2439
- var _a;
2440
- try {
2441
- this.error = false;
2442
- const { connectors } = ConnectorController.state;
2443
- const connector = connectors.find((c) => {
2444
- var _a2, _b, _c;
2445
- return c.type === "ANNOUNCED" && ((_a2 = c.info) == null ? void 0 : _a2.rdns) === ((_b = this.wallet) == null ? void 0 : _b.rdns) || c.type === "INJECTED" || c.name === ((_c = this.wallet) == null ? void 0 : _c.name);
2446
- });
2447
- if (connector) {
2448
- await ConnectionController.connectExternal(connector, connector.chain);
2449
- } else {
2450
- throw new Error("w3m-connecting-wc-browser: No connector found");
2451
- }
2452
- ModalController.close();
2453
- EventsController.sendEvent({
2454
- type: "track",
2455
- event: "CONNECT_SUCCESS",
2456
- properties: { method: "browser", name: ((_a = this.wallet) == null ? void 0 : _a.name) || "Unknown" }
2457
- });
2458
- } catch (error) {
2459
- EventsController.sendEvent({
2460
- type: "track",
2461
- event: "CONNECT_ERROR",
2462
- properties: { message: (error == null ? void 0 : error.message) ?? "Unknown" }
2463
- });
2464
- this.error = true;
2465
- }
2466
- }
2467
- };
2468
- W3mConnectingWcBrowser = __decorate$n([
2469
- customElement("w3m-connecting-wc-browser")
2470
- ], W3mConnectingWcBrowser);
2471
- var __decorate$m = function(decorators, target, key, desc) {
2472
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2473
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2474
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2475
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2476
- };
2477
- let W3mConnectingWcDesktop = class W3mConnectingWcDesktop2 extends W3mConnectingWidget {
2478
- constructor() {
2479
- super();
2480
- if (!this.wallet) {
2481
- throw new Error("w3m-connecting-wc-desktop: No wallet provided");
2482
- }
2483
- this.onConnect = this.onConnectProxy.bind(this);
2484
- this.onRender = this.onRenderProxy.bind(this);
2485
- EventsController.sendEvent({
2486
- type: "track",
2487
- event: "SELECT_WALLET",
2488
- properties: { name: this.wallet.name, platform: "desktop" }
2489
- });
2490
- }
2491
- onRenderProxy() {
2492
- var _a;
2493
- if (!this.ready && this.uri) {
2494
- this.ready = true;
2495
- (_a = this.onConnect) == null ? void 0 : _a.call(this);
2496
- }
2497
- }
2498
- onConnectProxy() {
2499
- var _a;
2500
- if (((_a = this.wallet) == null ? void 0 : _a.desktop_link) && this.uri) {
2501
- try {
2502
- this.error = false;
2503
- const { desktop_link, name } = this.wallet;
2504
- const { redirect, href } = CoreHelperUtil.formatNativeUrl(desktop_link, this.uri);
2505
- ConnectionController.setWcLinking({ name, href });
2506
- ConnectionController.setRecentWallet(this.wallet);
2507
- CoreHelperUtil.openHref(redirect, "_blank");
2508
- } catch {
2509
- this.error = true;
2510
- }
2511
- }
2512
- }
2513
- };
2514
- W3mConnectingWcDesktop = __decorate$m([
2515
- customElement("w3m-connecting-wc-desktop")
2516
- ], W3mConnectingWcDesktop);
2517
- var __decorate$l = function(decorators, target, key, desc) {
2518
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2519
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2520
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2521
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2522
- };
2523
- let W3mConnectingWcMobile = class W3mConnectingWcMobile2 extends W3mConnectingWidget {
2524
- constructor() {
2525
- super();
2526
- this.btnLabelTimeout = void 0;
2527
- this.redirectDeeplink = void 0;
2528
- this.redirectUniversalLink = void 0;
2529
- this.target = void 0;
2530
- this.preferUniversalLinks = OptionsController.state.experimental_preferUniversalLinks;
2531
- this.isLoading = true;
2532
- this.onConnect = () => {
2533
- var _a;
2534
- if (((_a = this.wallet) == null ? void 0 : _a.mobile_link) && this.uri) {
2535
- try {
2536
- this.error = false;
2537
- const { mobile_link, link_mode, name } = this.wallet;
2538
- const { redirect, redirectUniversalLink, href } = CoreHelperUtil.formatNativeUrl(mobile_link, this.uri, link_mode);
2539
- this.redirectDeeplink = redirect;
2540
- this.redirectUniversalLink = redirectUniversalLink;
2541
- this.target = CoreHelperUtil.isIframe() ? "_top" : "_self";
2542
- ConnectionController.setWcLinking({ name, href });
2543
- ConnectionController.setRecentWallet(this.wallet);
2544
- if (this.preferUniversalLinks && this.redirectUniversalLink) {
2545
- CoreHelperUtil.openHref(this.redirectUniversalLink, this.target);
2546
- } else {
2547
- CoreHelperUtil.openHref(this.redirectDeeplink, this.target);
2548
- }
2549
- } catch (e2) {
2550
- EventsController.sendEvent({
2551
- type: "track",
2552
- event: "CONNECT_PROXY_ERROR",
2553
- properties: {
2554
- message: e2 instanceof Error ? e2.message : "Error parsing the deeplink",
2555
- uri: this.uri,
2556
- mobile_link: this.wallet.mobile_link,
2557
- name: this.wallet.name
2558
- }
2559
- });
2560
- this.error = true;
2561
- }
2562
- }
2563
- };
2564
- if (!this.wallet) {
2565
- throw new Error("w3m-connecting-wc-mobile: No wallet provided");
2566
- }
2567
- this.secondaryBtnLabel = "Open";
2568
- this.secondaryLabel = ConstantsUtil$1.CONNECT_LABELS.MOBILE;
2569
- this.secondaryBtnIcon = "externalLink";
2570
- this.onHandleURI();
2571
- this.unsubscribe.push(ConnectionController.subscribeKey("wcUri", () => {
2572
- this.onHandleURI();
2573
- }));
2574
- EventsController.sendEvent({
2575
- type: "track",
2576
- event: "SELECT_WALLET",
2577
- properties: { name: this.wallet.name, platform: "mobile" }
2578
- });
2579
- }
2580
- disconnectedCallback() {
2581
- super.disconnectedCallback();
2582
- clearTimeout(this.btnLabelTimeout);
2583
- }
2584
- onHandleURI() {
2585
- var _a;
2586
- this.isLoading = !this.uri;
2587
- if (!this.ready && this.uri) {
2588
- this.ready = true;
2589
- (_a = this.onConnect) == null ? void 0 : _a.call(this);
2590
- }
2591
- }
2592
- onTryAgain() {
2593
- var _a;
2594
- ConnectionController.setWcError(false);
2595
- (_a = this.onConnect) == null ? void 0 : _a.call(this);
2596
- }
2597
- };
2598
- __decorate$l([
2599
- r()
2600
- ], W3mConnectingWcMobile.prototype, "redirectDeeplink", void 0);
2601
- __decorate$l([
2602
- r()
2603
- ], W3mConnectingWcMobile.prototype, "redirectUniversalLink", void 0);
2604
- __decorate$l([
2605
- r()
2606
- ], W3mConnectingWcMobile.prototype, "target", void 0);
2607
- __decorate$l([
2608
- r()
2609
- ], W3mConnectingWcMobile.prototype, "preferUniversalLinks", void 0);
2610
- __decorate$l([
2611
- r()
2612
- ], W3mConnectingWcMobile.prototype, "isLoading", void 0);
2613
- W3mConnectingWcMobile = __decorate$l([
2614
- customElement("w3m-connecting-wc-mobile")
2615
- ], W3mConnectingWcMobile);
2616
- const CONNECTING_ERROR_MARGIN = 0.1;
2617
- const CIRCLE_SIZE_MODIFIER = 2.5;
2618
- const QRCODE_MATRIX_MARGIN = 7;
2619
- function isAdjecentDots(cy, otherCy, cellSize) {
2620
- if (cy === otherCy) {
2621
- return false;
2622
- }
2623
- const diff = cy - otherCy < 0 ? otherCy - cy : cy - otherCy;
2624
- return diff <= cellSize + CONNECTING_ERROR_MARGIN;
2625
- }
2626
- function getMatrix(value, errorCorrectionLevel) {
2627
- const arr = Array.prototype.slice.call(browser.create(value, { errorCorrectionLevel }).modules.data, 0);
2628
- const sqrt = Math.sqrt(arr.length);
2629
- return arr.reduce((rows, key, index) => (index % sqrt === 0 ? rows.push([key]) : rows[rows.length - 1].push(key)) && rows, []);
2630
- }
2631
- const QrCodeUtil = {
2632
- generate({ uri, size, logoSize, dotColor = "#141414" }) {
2633
- const edgeColor = "transparent";
2634
- const strokeWidth = 5;
2635
- const dots = [];
2636
- const matrix = getMatrix(uri, "Q");
2637
- const cellSize = size / matrix.length;
2638
- const qrList = [
2639
- { x: 0, y: 0 },
2640
- { x: 1, y: 0 },
2641
- { x: 0, y: 1 }
2642
- ];
2643
- qrList.forEach(({ x: x2, y }) => {
2644
- const x1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * x2;
2645
- const y1 = (matrix.length - QRCODE_MATRIX_MARGIN) * cellSize * y;
2646
- const borderRadius = 0.45;
2647
- for (let i2 = 0; i2 < qrList.length; i2 += 1) {
2648
- const dotSize = cellSize * (QRCODE_MATRIX_MARGIN - i2 * 2);
2649
- dots.push(b`
2650
- <rect
2651
- fill=${i2 === 2 ? dotColor : edgeColor}
2652
- width=${i2 === 0 ? dotSize - strokeWidth : dotSize}
2653
- rx= ${i2 === 0 ? (dotSize - strokeWidth) * borderRadius : dotSize * borderRadius}
2654
- ry= ${i2 === 0 ? (dotSize - strokeWidth) * borderRadius : dotSize * borderRadius}
2655
- stroke=${dotColor}
2656
- stroke-width=${i2 === 0 ? strokeWidth : 0}
2657
- height=${i2 === 0 ? dotSize - strokeWidth : dotSize}
2658
- x= ${i2 === 0 ? y1 + cellSize * i2 + strokeWidth / 2 : y1 + cellSize * i2}
2659
- y= ${i2 === 0 ? x1 + cellSize * i2 + strokeWidth / 2 : x1 + cellSize * i2}
2660
- />
2661
- `);
2662
- }
2663
- });
2664
- const clearArenaSize = Math.floor((logoSize + 25) / cellSize);
2665
- const matrixMiddleStart = matrix.length / 2 - clearArenaSize / 2;
2666
- const matrixMiddleEnd = matrix.length / 2 + clearArenaSize / 2 - 1;
2667
- const circles = [];
2668
- matrix.forEach((row, i2) => {
2669
- row.forEach((_, j) => {
2670
- if (matrix[i2][j]) {
2671
- if (!(i2 < QRCODE_MATRIX_MARGIN && j < QRCODE_MATRIX_MARGIN || i2 > matrix.length - (QRCODE_MATRIX_MARGIN + 1) && j < QRCODE_MATRIX_MARGIN || i2 < QRCODE_MATRIX_MARGIN && j > matrix.length - (QRCODE_MATRIX_MARGIN + 1))) {
2672
- if (!(i2 > matrixMiddleStart && i2 < matrixMiddleEnd && j > matrixMiddleStart && j < matrixMiddleEnd)) {
2673
- const cx = i2 * cellSize + cellSize / 2;
2674
- const cy = j * cellSize + cellSize / 2;
2675
- circles.push([cx, cy]);
2676
- }
2677
- }
2678
- }
2679
- });
2680
- });
2681
- const circlesToConnect = {};
2682
- circles.forEach(([cx, cy]) => {
2683
- var _a;
2684
- if (circlesToConnect[cx]) {
2685
- (_a = circlesToConnect[cx]) == null ? void 0 : _a.push(cy);
2686
- } else {
2687
- circlesToConnect[cx] = [cy];
2688
- }
2689
- });
2690
- Object.entries(circlesToConnect).map(([cx, cys]) => {
2691
- const newCys = cys.filter((cy) => cys.every((otherCy) => !isAdjecentDots(cy, otherCy, cellSize)));
2692
- return [Number(cx), newCys];
2693
- }).forEach(([cx, cys]) => {
2694
- cys.forEach((cy) => {
2695
- dots.push(b`<circle cx=${cx} cy=${cy} fill=${dotColor} r=${cellSize / CIRCLE_SIZE_MODIFIER} />`);
2696
- });
2697
- });
2698
- Object.entries(circlesToConnect).filter(([_, cys]) => cys.length > 1).map(([cx, cys]) => {
2699
- const newCys = cys.filter((cy) => cys.some((otherCy) => isAdjecentDots(cy, otherCy, cellSize)));
2700
- return [Number(cx), newCys];
2701
- }).map(([cx, cys]) => {
2702
- cys.sort((a, b2) => a < b2 ? -1 : 1);
2703
- const groups = [];
2704
- for (const cy of cys) {
2705
- const group = groups.find((item) => item.some((otherCy) => isAdjecentDots(cy, otherCy, cellSize)));
2706
- if (group) {
2707
- group.push(cy);
2708
- } else {
2709
- groups.push([cy]);
2710
- }
2711
- }
2712
- return [cx, groups.map((item) => [item[0], item[item.length - 1]])];
2713
- }).forEach(([cx, groups]) => {
2714
- groups.forEach(([y1, y2]) => {
2715
- dots.push(b`
2716
- <line
2717
- x1=${cx}
2718
- x2=${cx}
2719
- y1=${y1}
2720
- y2=${y2}
2721
- stroke=${dotColor}
2722
- stroke-width=${cellSize / (CIRCLE_SIZE_MODIFIER / 2)}
2723
- stroke-linecap="round"
2724
- />
2725
- `);
2726
- });
2727
- });
2728
- return dots;
2729
- }
2730
- };
2731
- const styles$e = i`
2732
- :host {
2733
- position: relative;
2734
- user-select: none;
2735
- display: block;
2736
- overflow: hidden;
2737
- aspect-ratio: 1 / 1;
2738
- width: var(--local-size);
2739
- }
2740
-
2741
- :host([data-theme='dark']) {
2742
- border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
2743
- background-color: var(--wui-color-inverse-100);
2744
- padding: var(--wui-spacing-l);
2745
- }
2746
-
2747
- :host([data-theme='light']) {
2748
- box-shadow: 0 0 0 1px var(--wui-color-bg-125);
2749
- background-color: var(--wui-color-bg-125);
2750
- }
2751
-
2752
- :host([data-clear='true']) > wui-icon {
2753
- display: none;
2754
- }
2755
-
2756
- svg:first-child,
2757
- wui-image,
2758
- wui-icon {
2759
- position: absolute;
2760
- top: 50%;
2761
- left: 50%;
2762
- transform: translateY(-50%) translateX(-50%);
2763
- }
2764
-
2765
- wui-image {
2766
- width: 25%;
2767
- height: 25%;
2768
- border-radius: var(--wui-border-radius-xs);
2769
- }
2770
-
2771
- wui-icon {
2772
- width: 100%;
2773
- height: 100%;
2774
- color: var(--local-icon-color) !important;
2775
- transform: translateY(-50%) translateX(-50%) scale(0.25);
2776
- }
2777
- `;
2778
- var __decorate$k = function(decorators, target, key, desc) {
2779
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2780
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2781
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2782
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2783
- };
2784
- const DEFAULT_ICON_COLOR = "#3396ff";
2785
- let WuiQrCode = class WuiQrCode2 extends i$1 {
2786
- constructor() {
2787
- super(...arguments);
2788
- this.uri = "";
2789
- this.size = 0;
2790
- this.theme = "dark";
2791
- this.imageSrc = void 0;
2792
- this.alt = void 0;
2793
- this.arenaClear = void 0;
2794
- this.farcaster = void 0;
2795
- }
2796
- render() {
2797
- this.dataset["theme"] = this.theme;
2798
- this.dataset["clear"] = String(this.arenaClear);
2799
- this.style.cssText = `
2800
- --local-size: ${this.size}px;
2801
- --local-icon-color: ${this.color ?? DEFAULT_ICON_COLOR}
2802
- `;
2803
- return x`${this.templateVisual()} ${this.templateSvg()}`;
2804
- }
2805
- templateSvg() {
2806
- const size = this.theme === "light" ? this.size : this.size - 16 * 2;
2807
- return b`
2808
- <svg height=${size} width=${size}>
2809
- ${QrCodeUtil.generate({
2810
- uri: this.uri,
2811
- size,
2812
- logoSize: this.arenaClear ? 0 : size / 4,
2813
- dotColor: this.color
2814
- })}
2815
- </svg>
2816
- `;
2817
- }
2818
- templateVisual() {
2819
- if (this.imageSrc) {
2820
- return x`<wui-image src=${this.imageSrc} alt=${this.alt ?? "logo"}></wui-image>`;
2821
- }
2822
- if (this.farcaster) {
2823
- return x`<wui-icon
2824
- class="farcaster"
2825
- size="inherit"
2826
- color="inherit"
2827
- name="farcaster"
2828
- ></wui-icon>`;
2829
- }
2830
- return x`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`;
2831
- }
2832
- };
2833
- WuiQrCode.styles = [resetStyles, styles$e];
2834
- __decorate$k([
2835
- n()
2836
- ], WuiQrCode.prototype, "uri", void 0);
2837
- __decorate$k([
2838
- n({ type: Number })
2839
- ], WuiQrCode.prototype, "size", void 0);
2840
- __decorate$k([
2841
- n()
2842
- ], WuiQrCode.prototype, "theme", void 0);
2843
- __decorate$k([
2844
- n()
2845
- ], WuiQrCode.prototype, "imageSrc", void 0);
2846
- __decorate$k([
2847
- n()
2848
- ], WuiQrCode.prototype, "alt", void 0);
2849
- __decorate$k([
2850
- n()
2851
- ], WuiQrCode.prototype, "color", void 0);
2852
- __decorate$k([
2853
- n({ type: Boolean })
2854
- ], WuiQrCode.prototype, "arenaClear", void 0);
2855
- __decorate$k([
2856
- n({ type: Boolean })
2857
- ], WuiQrCode.prototype, "farcaster", void 0);
2858
- WuiQrCode = __decorate$k([
2859
- customElement("wui-qr-code")
2860
- ], WuiQrCode);
2861
- const styles$d = i`
2862
- :host {
2863
- display: block;
2864
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
2865
- background: linear-gradient(
2866
- 120deg,
2867
- var(--wui-color-bg-200) 5%,
2868
- var(--wui-color-bg-200) 48%,
2869
- var(--wui-color-bg-300) 55%,
2870
- var(--wui-color-bg-300) 60%,
2871
- var(--wui-color-bg-300) calc(60% + 10px),
2872
- var(--wui-color-bg-200) calc(60% + 12px),
2873
- var(--wui-color-bg-200) 100%
2874
- );
2875
- background-size: 250%;
2876
- animation: shimmer 3s linear infinite reverse;
2877
- }
2878
-
2879
- :host([variant='light']) {
2880
- background: linear-gradient(
2881
- 120deg,
2882
- var(--wui-color-bg-150) 5%,
2883
- var(--wui-color-bg-150) 48%,
2884
- var(--wui-color-bg-200) 55%,
2885
- var(--wui-color-bg-200) 60%,
2886
- var(--wui-color-bg-200) calc(60% + 10px),
2887
- var(--wui-color-bg-150) calc(60% + 12px),
2888
- var(--wui-color-bg-150) 100%
2889
- );
2890
- background-size: 250%;
2891
- }
2892
-
2893
- @keyframes shimmer {
2894
- from {
2895
- background-position: -250% 0;
2896
- }
2897
- to {
2898
- background-position: 250% 0;
2899
- }
2900
- }
2901
- `;
2902
- var __decorate$j = function(decorators, target, key, desc) {
2903
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2904
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2905
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2906
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2907
- };
2908
- let WuiShimmer = class WuiShimmer2 extends i$1 {
2909
- constructor() {
2910
- super(...arguments);
2911
- this.width = "";
2912
- this.height = "";
2913
- this.borderRadius = "m";
2914
- this.variant = "default";
2915
- }
2916
- render() {
2917
- this.style.cssText = `
2918
- width: ${this.width};
2919
- height: ${this.height};
2920
- border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
2921
- `;
2922
- return x`<slot></slot>`;
2923
- }
2924
- };
2925
- WuiShimmer.styles = [styles$d];
2926
- __decorate$j([
2927
- n()
2928
- ], WuiShimmer.prototype, "width", void 0);
2929
- __decorate$j([
2930
- n()
2931
- ], WuiShimmer.prototype, "height", void 0);
2932
- __decorate$j([
2933
- n()
2934
- ], WuiShimmer.prototype, "borderRadius", void 0);
2935
- __decorate$j([
2936
- n()
2937
- ], WuiShimmer.prototype, "variant", void 0);
2938
- WuiShimmer = __decorate$j([
2939
- customElement("wui-shimmer")
2940
- ], WuiShimmer);
2941
- const REOWN_URL = "https://reown.com";
2942
- const styles$c = i`
2943
- .reown-logo {
2944
- height: var(--wui-spacing-xxl);
2945
- }
2946
-
2947
- a {
2948
- text-decoration: none;
2949
- cursor: pointer;
2950
- }
2951
-
2952
- a:hover {
2953
- opacity: 0.9;
2954
- }
2955
- `;
2956
- var __decorate$i = function(decorators, target, key, desc) {
2957
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2958
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
2959
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
2960
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
2961
- };
2962
- let WuiUxByReown = class WuiUxByReown2 extends i$1 {
2963
- render() {
2964
- return x`
2965
- <a
2966
- data-testid="ux-branding-reown"
2967
- href=${REOWN_URL}
2968
- rel="noreferrer"
2969
- target="_blank"
2970
- style="text-decoration: none;"
2971
- >
2972
- <wui-flex
2973
- justifyContent="center"
2974
- alignItems="center"
2975
- gap="xs"
2976
- .padding=${["0", "0", "l", "0"]}
2977
- >
2978
- <wui-text variant="small-500" color="fg-100"> UX by </wui-text>
2979
- <wui-icon name="reown" size="xxxl" class="reown-logo"></wui-icon>
2980
- </wui-flex>
2981
- </a>
2982
- `;
2983
- }
2984
- };
2985
- WuiUxByReown.styles = [resetStyles, elementStyles, styles$c];
2986
- WuiUxByReown = __decorate$i([
2987
- customElement("wui-ux-by-reown")
2988
- ], WuiUxByReown);
2989
- const styles$b = i`
2990
- @keyframes fadein {
2991
- from {
2992
- opacity: 0;
2993
- }
2994
- to {
2995
- opacity: 1;
2996
- }
2997
- }
2998
-
2999
- wui-shimmer {
3000
- width: 100%;
3001
- aspect-ratio: 1 / 1;
3002
- border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
3003
- }
3004
-
3005
- wui-qr-code {
3006
- opacity: 0;
3007
- animation-duration: 200ms;
3008
- animation-timing-function: ease;
3009
- animation-name: fadein;
3010
- animation-fill-mode: forwards;
3011
- }
3012
- `;
3013
- var __decorate$h = function(decorators, target, key, desc) {
3014
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3015
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3016
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3017
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3018
- };
3019
- let W3mConnectingWcQrcode = class W3mConnectingWcQrcode2 extends W3mConnectingWidget {
3020
- constructor() {
3021
- var _a;
3022
- super();
3023
- this.forceUpdate = () => {
3024
- this.requestUpdate();
3025
- };
3026
- window.addEventListener("resize", this.forceUpdate);
3027
- EventsController.sendEvent({
3028
- type: "track",
3029
- event: "SELECT_WALLET",
3030
- properties: { name: ((_a = this.wallet) == null ? void 0 : _a.name) ?? "WalletConnect", platform: "qrcode" }
3031
- });
3032
- }
3033
- disconnectedCallback() {
3034
- var _a;
3035
- super.disconnectedCallback();
3036
- (_a = this.unsubscribe) == null ? void 0 : _a.forEach((unsub) => unsub());
3037
- window.removeEventListener("resize", this.forceUpdate);
3038
- }
3039
- render() {
3040
- this.onRenderProxy();
3041
- return x`
3042
- <wui-flex
3043
- flexDirection="column"
3044
- alignItems="center"
3045
- .padding=${["0", "xl", "xl", "xl"]}
3046
- gap="xl"
3047
- >
3048
- <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
3049
-
3050
- <wui-text variant="paragraph-500" color="fg-100">
3051
- Scan this QR Code with your phone
3052
- </wui-text>
3053
- ${this.copyTemplate()}
3054
- </wui-flex>
3055
- <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
3056
- `;
3057
- }
3058
- onRenderProxy() {
3059
- if (!this.ready && this.uri) {
3060
- this.timeout = setTimeout(() => {
3061
- this.ready = true;
3062
- }, 200);
3063
- }
3064
- }
3065
- qrCodeTemplate() {
3066
- if (!this.uri || !this.ready) {
3067
- return null;
3068
- }
3069
- const size = this.getBoundingClientRect().width - 40;
3070
- const alt = this.wallet ? this.wallet.name : void 0;
3071
- ConnectionController.setWcLinking(void 0);
3072
- ConnectionController.setRecentWallet(this.wallet);
3073
- return x` <wui-qr-code
3074
- size=${size}
3075
- theme=${ThemeController.state.themeMode}
3076
- uri=${this.uri}
3077
- imageSrc=${o(AssetUtil.getWalletImage(this.wallet))}
3078
- color=${o(ThemeController.state.themeVariables["--w3m-qr-color"])}
3079
- alt=${o(alt)}
3080
- data-testid="wui-qr-code"
3081
- ></wui-qr-code>`;
3082
- }
3083
- copyTemplate() {
3084
- const inactive = !this.uri || !this.ready;
3085
- return x`<wui-link
3086
- .disabled=${inactive}
3087
- @click=${this.onCopyUri}
3088
- color="fg-200"
3089
- data-testid="copy-wc2-uri"
3090
- >
3091
- <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
3092
- Copy link
3093
- </wui-link>`;
3094
- }
3095
- };
3096
- W3mConnectingWcQrcode.styles = styles$b;
3097
- W3mConnectingWcQrcode = __decorate$h([
3098
- customElement("w3m-connecting-wc-qrcode")
3099
- ], W3mConnectingWcQrcode);
3100
- var __decorate$g = function(decorators, target, key, desc) {
3101
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3102
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3103
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3104
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3105
- };
3106
- let W3mConnectingWcUnsupported = class W3mConnectingWcUnsupported2 extends i$1 {
3107
- constructor() {
3108
- var _a;
3109
- super();
3110
- this.wallet = (_a = RouterController.state.data) == null ? void 0 : _a.wallet;
3111
- if (!this.wallet) {
3112
- throw new Error("w3m-connecting-wc-unsupported: No wallet provided");
3113
- }
3114
- EventsController.sendEvent({
3115
- type: "track",
3116
- event: "SELECT_WALLET",
3117
- properties: { name: this.wallet.name, platform: "browser" }
3118
- });
3119
- }
3120
- render() {
3121
- return x`
3122
- <wui-flex
3123
- flexDirection="column"
3124
- alignItems="center"
3125
- .padding=${["3xl", "xl", "xl", "xl"]}
3126
- gap="xl"
3127
- >
3128
- <wui-wallet-image
3129
- size="lg"
3130
- imageSrc=${o(AssetUtil.getWalletImage(this.wallet))}
3131
- ></wui-wallet-image>
3132
-
3133
- <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
3134
- </wui-flex>
3135
-
3136
- <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
3137
- `;
3138
- }
3139
- };
3140
- W3mConnectingWcUnsupported = __decorate$g([
3141
- customElement("w3m-connecting-wc-unsupported")
3142
- ], W3mConnectingWcUnsupported);
3143
- var __decorate$f = function(decorators, target, key, desc) {
3144
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3145
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3146
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3147
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3148
- };
3149
- let W3mConnectingWcWeb = class W3mConnectingWcWeb2 extends W3mConnectingWidget {
3150
- constructor() {
3151
- super();
3152
- this.isLoading = true;
3153
- if (!this.wallet) {
3154
- throw new Error("w3m-connecting-wc-web: No wallet provided");
3155
- }
3156
- this.onConnect = this.onConnectProxy.bind(this);
3157
- this.secondaryBtnLabel = "Open";
3158
- this.secondaryLabel = ConstantsUtil$1.CONNECT_LABELS.MOBILE;
3159
- this.secondaryBtnIcon = "externalLink";
3160
- this.updateLoadingState();
3161
- this.unsubscribe.push(ConnectionController.subscribeKey("wcUri", () => {
3162
- this.updateLoadingState();
3163
- }));
3164
- EventsController.sendEvent({
3165
- type: "track",
3166
- event: "SELECT_WALLET",
3167
- properties: { name: this.wallet.name, platform: "web" }
3168
- });
3169
- }
3170
- updateLoadingState() {
3171
- this.isLoading = !this.uri;
3172
- }
3173
- onConnectProxy() {
3174
- var _a;
3175
- if (((_a = this.wallet) == null ? void 0 : _a.webapp_link) && this.uri) {
3176
- try {
3177
- this.error = false;
3178
- const { webapp_link, name } = this.wallet;
3179
- const { redirect, href } = CoreHelperUtil.formatUniversalUrl(webapp_link, this.uri);
3180
- ConnectionController.setWcLinking({ name, href });
3181
- ConnectionController.setRecentWallet(this.wallet);
3182
- CoreHelperUtil.openHref(redirect, "_blank");
3183
- } catch {
3184
- this.error = true;
3185
- }
3186
- }
3187
- }
3188
- };
3189
- __decorate$f([
3190
- r()
3191
- ], W3mConnectingWcWeb.prototype, "isLoading", void 0);
3192
- W3mConnectingWcWeb = __decorate$f([
3193
- customElement("w3m-connecting-wc-web")
3194
- ], W3mConnectingWcWeb);
3195
- var __decorate$e = function(decorators, target, key, desc) {
3196
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3197
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3198
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3199
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3200
- };
3201
- let W3mConnectingWcView = class W3mConnectingWcView2 extends i$1 {
3202
- constructor() {
3203
- var _a;
3204
- super();
3205
- this.wallet = (_a = RouterController.state.data) == null ? void 0 : _a.wallet;
3206
- this.unsubscribe = [];
3207
- this.platform = void 0;
3208
- this.platforms = [];
3209
- this.isSiwxEnabled = Boolean(OptionsController.state.siwx);
3210
- this.remoteFeatures = OptionsController.state.remoteFeatures;
3211
- this.determinePlatforms();
3212
- this.initializeConnection();
3213
- this.unsubscribe.push(OptionsController.subscribeKey("remoteFeatures", (val) => this.remoteFeatures = val));
3214
- }
3215
- disconnectedCallback() {
3216
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
3217
- }
3218
- render() {
3219
- return x`
3220
- ${this.headerTemplate()}
3221
- <div>${this.platformTemplate()}</div>
3222
- ${this.reownBrandingTemplate()}
3223
- `;
3224
- }
3225
- reownBrandingTemplate() {
3226
- var _a;
3227
- if (!((_a = this.remoteFeatures) == null ? void 0 : _a.reownBranding)) {
3228
- return null;
3229
- }
3230
- return x`<wui-ux-by-reown></wui-ux-by-reown>`;
3231
- }
3232
- async initializeConnection(retry = false) {
3233
- if (this.platform === "browser" || OptionsController.state.manualWCControl && !retry) {
3234
- return;
3235
- }
3236
- try {
3237
- const { wcPairingExpiry, status } = ConnectionController.state;
3238
- if (retry || OptionsController.state.enableEmbedded || CoreHelperUtil.isPairingExpired(wcPairingExpiry) || status === "connecting") {
3239
- await ConnectionController.connectWalletConnect();
3240
- if (!this.isSiwxEnabled) {
3241
- ModalController.close();
3242
- }
3243
- }
3244
- } catch (error) {
3245
- EventsController.sendEvent({
3246
- type: "track",
3247
- event: "CONNECT_ERROR",
3248
- properties: { message: (error == null ? void 0 : error.message) ?? "Unknown" }
3249
- });
3250
- ConnectionController.setWcError(true);
3251
- SnackController.showError(error.message ?? "Connection error");
3252
- ConnectionController.resetWcConnection();
3253
- RouterController.goBack();
3254
- }
3255
- }
3256
- determinePlatforms() {
3257
- if (!this.wallet) {
3258
- this.platforms.push("qrcode");
3259
- this.platform = "qrcode";
3260
- return;
3261
- }
3262
- if (this.platform) {
3263
- return;
3264
- }
3265
- const { mobile_link, desktop_link, webapp_link, injected, rdns } = this.wallet;
3266
- const injectedIds = injected == null ? void 0 : injected.map(({ injected_id }) => injected_id).filter(Boolean);
3267
- const browserIds = [...rdns ? [rdns] : injectedIds ?? []];
3268
- const isBrowser = OptionsController.state.isUniversalProvider ? false : browserIds.length;
3269
- const hasMobileWCLink = mobile_link;
3270
- const isWebWc = webapp_link;
3271
- const isBrowserInstalled = ConnectionController.checkInstalled(browserIds);
3272
- const isBrowserWc = isBrowser && isBrowserInstalled;
3273
- const isDesktopWc = desktop_link && !CoreHelperUtil.isMobile();
3274
- if (isBrowserWc && !ChainController.state.noAdapters) {
3275
- this.platforms.push("browser");
3276
- }
3277
- if (hasMobileWCLink) {
3278
- this.platforms.push(CoreHelperUtil.isMobile() ? "mobile" : "qrcode");
3279
- }
3280
- if (isWebWc) {
3281
- this.platforms.push("web");
3282
- }
3283
- if (isDesktopWc) {
3284
- this.platforms.push("desktop");
3285
- }
3286
- if (!isBrowserWc && isBrowser && !ChainController.state.noAdapters) {
3287
- this.platforms.push("unsupported");
3288
- }
3289
- this.platform = this.platforms[0];
3290
- }
3291
- platformTemplate() {
3292
- switch (this.platform) {
3293
- case "browser":
3294
- return x`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;
3295
- case "web":
3296
- return x`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;
3297
- case "desktop":
3298
- return x`
3299
- <w3m-connecting-wc-desktop .onRetry=${() => this.initializeConnection(true)}>
3300
- </w3m-connecting-wc-desktop>
3301
- `;
3302
- case "mobile":
3303
- return x`
3304
- <w3m-connecting-wc-mobile isMobile .onRetry=${() => this.initializeConnection(true)}>
3305
- </w3m-connecting-wc-mobile>
3306
- `;
3307
- case "qrcode":
3308
- return x`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;
3309
- default:
3310
- return x`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`;
3311
- }
3312
- }
3313
- headerTemplate() {
3314
- const multiPlatform = this.platforms.length > 1;
3315
- if (!multiPlatform) {
3316
- return null;
3317
- }
3318
- return x`
3319
- <w3m-connecting-header
3320
- .platforms=${this.platforms}
3321
- .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
3322
- >
3323
- </w3m-connecting-header>
3324
- `;
3325
- }
3326
- async onSelectPlatform(platform) {
3327
- var _a;
3328
- const container = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("div");
3329
- if (container) {
3330
- await container.animate([{ opacity: 1 }, { opacity: 0 }], {
3331
- duration: 200,
3332
- fill: "forwards",
3333
- easing: "ease"
3334
- }).finished;
3335
- this.platform = platform;
3336
- container.animate([{ opacity: 0 }, { opacity: 1 }], {
3337
- duration: 200,
3338
- fill: "forwards",
3339
- easing: "ease"
3340
- });
3341
- }
3342
- }
3343
- };
3344
- __decorate$e([
3345
- r()
3346
- ], W3mConnectingWcView.prototype, "platform", void 0);
3347
- __decorate$e([
3348
- r()
3349
- ], W3mConnectingWcView.prototype, "platforms", void 0);
3350
- __decorate$e([
3351
- r()
3352
- ], W3mConnectingWcView.prototype, "isSiwxEnabled", void 0);
3353
- __decorate$e([
3354
- r()
3355
- ], W3mConnectingWcView.prototype, "remoteFeatures", void 0);
3356
- W3mConnectingWcView = __decorate$e([
3357
- customElement("w3m-connecting-wc-view")
3358
- ], W3mConnectingWcView);
3359
- var __decorate$d = function(decorators, target, key, desc) {
3360
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3361
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3362
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3363
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3364
- };
3365
- let W3mConnectingWcBasicView = class W3mConnectingWcBasicView2 extends i$1 {
3366
- constructor() {
3367
- super(...arguments);
3368
- this.isMobile = CoreHelperUtil.isMobile();
3369
- }
3370
- render() {
3371
- if (this.isMobile) {
3372
- const { featured, recommended } = ApiController.state;
3373
- const { customWallets } = OptionsController.state;
3374
- const recent = StorageUtil.getRecentWallets();
3375
- const showConnectors = featured.length || recommended.length || (customWallets == null ? void 0 : customWallets.length) || recent.length;
3376
- return x`<wui-flex
3377
- flexDirection="column"
3378
- gap="xs"
3379
- .margin=${["3xs", "s", "s", "s"]}
3380
- >
3381
- ${showConnectors ? x`<w3m-connector-list></w3m-connector-list>` : null}
3382
- <w3m-all-wallets-widget></w3m-all-wallets-widget>
3383
- </wui-flex>`;
3384
- }
3385
- return x`<wui-flex flexDirection="column" .padding=${["0", "0", "l", "0"]}>
3386
- <w3m-connecting-wc-view></w3m-connecting-wc-view>
3387
- <wui-flex flexDirection="column" .padding=${["0", "m", "0", "m"]}>
3388
- <w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex
3389
- ></wui-flex>`;
3390
- }
3391
- };
3392
- __decorate$d([
3393
- r()
3394
- ], W3mConnectingWcBasicView.prototype, "isMobile", void 0);
3395
- W3mConnectingWcBasicView = __decorate$d([
3396
- customElement("w3m-connecting-wc-basic-view")
3397
- ], W3mConnectingWcBasicView);
3398
- const styles$a = i`
3399
- :host {
3400
- display: flex;
3401
- align-items: center;
3402
- justify-content: center;
3403
- }
3404
-
3405
- label {
3406
- position: relative;
3407
- display: inline-block;
3408
- width: 32px;
3409
- height: 22px;
3410
- }
3411
-
3412
- input {
3413
- width: 0;
3414
- height: 0;
3415
- opacity: 0;
3416
- }
3417
-
3418
- span {
3419
- position: absolute;
3420
- cursor: pointer;
3421
- top: 0;
3422
- left: 0;
3423
- right: 0;
3424
- bottom: 0;
3425
- background-color: var(--wui-color-blue-100);
3426
- border-width: 1px;
3427
- border-style: solid;
3428
- border-color: var(--wui-color-gray-glass-002);
3429
- border-radius: 999px;
3430
- transition:
3431
- background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3432
- border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);
3433
- will-change: background-color, border-color;
3434
- }
3435
-
3436
- span:before {
3437
- position: absolute;
3438
- content: '';
3439
- height: 16px;
3440
- width: 16px;
3441
- left: 3px;
3442
- top: 2px;
3443
- background-color: var(--wui-color-inverse-100);
3444
- transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);
3445
- will-change: transform;
3446
- border-radius: 50%;
3447
- }
3448
-
3449
- input:checked + span {
3450
- border-color: var(--wui-color-gray-glass-005);
3451
- background-color: var(--wui-color-blue-100);
3452
- }
3453
-
3454
- input:not(:checked) + span {
3455
- background-color: var(--wui-color-gray-glass-010);
3456
- }
3457
-
3458
- input:checked + span:before {
3459
- transform: translateX(calc(100% - 7px));
3460
- }
3461
- `;
3462
- var __decorate$c = function(decorators, target, key, desc) {
3463
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3464
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3465
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3466
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3467
- };
3468
- let WuiSwitch = class WuiSwitch2 extends i$1 {
3469
- constructor() {
3470
- super(...arguments);
3471
- this.inputElementRef = e();
3472
- this.checked = void 0;
3473
- }
3474
- render() {
3475
- return x`
3476
- <label>
3477
- <input
3478
- ${n$1(this.inputElementRef)}
3479
- type="checkbox"
3480
- ?checked=${o(this.checked)}
3481
- @change=${this.dispatchChangeEvent.bind(this)}
3482
- />
3483
- <span></span>
3484
- </label>
3485
- `;
3486
- }
3487
- dispatchChangeEvent() {
3488
- var _a;
3489
- this.dispatchEvent(new CustomEvent("switchChange", {
3490
- detail: (_a = this.inputElementRef.value) == null ? void 0 : _a.checked,
3491
- bubbles: true,
3492
- composed: true
3493
- }));
3494
- }
3495
- };
3496
- WuiSwitch.styles = [resetStyles, elementStyles, colorStyles, styles$a];
3497
- __decorate$c([
3498
- n({ type: Boolean })
3499
- ], WuiSwitch.prototype, "checked", void 0);
3500
- WuiSwitch = __decorate$c([
3501
- customElement("wui-switch")
3502
- ], WuiSwitch);
3503
- const styles$9 = i`
3504
- :host {
3505
- height: 100%;
3506
- }
3507
-
3508
- button {
3509
- display: flex;
3510
- align-items: center;
3511
- justify-content: center;
3512
- column-gap: var(--wui-spacing-1xs);
3513
- padding: var(--wui-spacing-xs) var(--wui-spacing-s);
3514
- background-color: var(--wui-color-gray-glass-002);
3515
- border-radius: var(--wui-border-radius-xs);
3516
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
3517
- transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
3518
- will-change: background-color;
3519
- cursor: pointer;
3520
- }
3521
-
3522
- wui-switch {
3523
- pointer-events: none;
3524
- }
3525
- `;
3526
- var __decorate$b = function(decorators, target, key, desc) {
3527
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3528
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3529
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3530
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3531
- };
3532
- let WuiCertifiedSwitch = class WuiCertifiedSwitch2 extends i$1 {
3533
- constructor() {
3534
- super(...arguments);
3535
- this.checked = void 0;
3536
- }
3537
- render() {
3538
- return x`
3539
- <button>
3540
- <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
3541
- <wui-switch ?checked=${o(this.checked)}></wui-switch>
3542
- </button>
3543
- `;
3544
- }
3545
- };
3546
- WuiCertifiedSwitch.styles = [resetStyles, elementStyles, styles$9];
3547
- __decorate$b([
3548
- n({ type: Boolean })
3549
- ], WuiCertifiedSwitch.prototype, "checked", void 0);
3550
- WuiCertifiedSwitch = __decorate$b([
3551
- customElement("wui-certified-switch")
3552
- ], WuiCertifiedSwitch);
3553
- const styles$8 = i`
3554
- button {
3555
- background-color: var(--wui-color-fg-300);
3556
- border-radius: var(--wui-border-radius-4xs);
3557
- width: 16px;
3558
- height: 16px;
3559
- }
3560
-
3561
- button:disabled {
3562
- background-color: var(--wui-color-bg-300);
3563
- }
3564
-
3565
- wui-icon {
3566
- color: var(--wui-color-bg-200) !important;
3567
- }
3568
-
3569
- button:focus-visible {
3570
- background-color: var(--wui-color-fg-250);
3571
- border: 1px solid var(--wui-color-accent-100);
3572
- }
3573
-
3574
- @media (hover: hover) and (pointer: fine) {
3575
- button:hover:enabled {
3576
- background-color: var(--wui-color-fg-250);
3577
- }
3578
-
3579
- button:active:enabled {
3580
- background-color: var(--wui-color-fg-225);
3581
- }
3582
- }
3583
- `;
3584
- var __decorate$a = function(decorators, target, key, desc) {
3585
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3586
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3587
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3588
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3589
- };
3590
- let WuiInputElement = class WuiInputElement2 extends i$1 {
3591
- constructor() {
3592
- super(...arguments);
3593
- this.icon = "copy";
3594
- }
3595
- render() {
3596
- return x`
3597
- <button>
3598
- <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
3599
- </button>
3600
- `;
3601
- }
3602
- };
3603
- WuiInputElement.styles = [resetStyles, elementStyles, styles$8];
3604
- __decorate$a([
3605
- n()
3606
- ], WuiInputElement.prototype, "icon", void 0);
3607
- WuiInputElement = __decorate$a([
3608
- customElement("wui-input-element")
3609
- ], WuiInputElement);
3610
- const styles$7 = i`
3611
- :host {
3612
- position: relative;
3613
- width: 100%;
3614
- display: inline-block;
3615
- color: var(--wui-color-fg-275);
3616
- }
3617
-
3618
- input {
3619
- width: 100%;
3620
- border-radius: var(--wui-border-radius-xs);
3621
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
3622
- background: var(--wui-color-gray-glass-002);
3623
- font-size: var(--wui-font-size-paragraph);
3624
- letter-spacing: var(--wui-letter-spacing-paragraph);
3625
- color: var(--wui-color-fg-100);
3626
- transition:
3627
- background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3628
- border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
3629
- box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
3630
- will-change: background-color, border-color, box-shadow;
3631
- caret-color: var(--wui-color-accent-100);
3632
- }
3633
-
3634
- input:disabled {
3635
- cursor: not-allowed;
3636
- border: 1px solid var(--wui-color-gray-glass-010);
3637
- }
3638
-
3639
- input:disabled::placeholder,
3640
- input:disabled + wui-icon {
3641
- color: var(--wui-color-fg-300);
3642
- }
3643
-
3644
- input::placeholder {
3645
- color: var(--wui-color-fg-275);
3646
- }
3647
-
3648
- input:focus:enabled {
3649
- background-color: var(--wui-color-gray-glass-005);
3650
- -webkit-box-shadow:
3651
- inset 0 0 0 1px var(--wui-color-accent-100),
3652
- 0px 0px 0px 4px var(--wui-box-shadow-blue);
3653
- -moz-box-shadow:
3654
- inset 0 0 0 1px var(--wui-color-accent-100),
3655
- 0px 0px 0px 4px var(--wui-box-shadow-blue);
3656
- box-shadow:
3657
- inset 0 0 0 1px var(--wui-color-accent-100),
3658
- 0px 0px 0px 4px var(--wui-box-shadow-blue);
3659
- }
3660
-
3661
- input:hover:enabled {
3662
- background-color: var(--wui-color-gray-glass-005);
3663
- }
3664
-
3665
- wui-icon {
3666
- position: absolute;
3667
- top: 50%;
3668
- transform: translateY(-50%);
3669
- pointer-events: none;
3670
- }
3671
-
3672
- .wui-size-sm {
3673
- padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
3674
- }
3675
-
3676
- wui-icon + .wui-size-sm {
3677
- padding: 9px var(--wui-spacing-m) 10px 36px;
3678
- }
3679
-
3680
- wui-icon[data-input='sm'] {
3681
- left: var(--wui-spacing-s);
3682
- }
3683
-
3684
- .wui-size-md {
3685
- padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
3686
- }
3687
-
3688
- wui-icon + .wui-size-md,
3689
- wui-loading-spinner + .wui-size-md {
3690
- padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
3691
- }
3692
-
3693
- wui-icon[data-input='md'] {
3694
- left: var(--wui-spacing-l);
3695
- }
3696
-
3697
- .wui-size-lg {
3698
- padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
3699
- letter-spacing: var(--wui-letter-spacing-medium-title);
3700
- font-size: var(--wui-font-size-medium-title);
3701
- font-weight: var(--wui-font-weight-light);
3702
- line-height: 130%;
3703
- color: var(--wui-color-fg-100);
3704
- height: 64px;
3705
- }
3706
-
3707
- .wui-padding-right-xs {
3708
- padding-right: var(--wui-spacing-xs);
3709
- }
3710
-
3711
- .wui-padding-right-s {
3712
- padding-right: var(--wui-spacing-s);
3713
- }
3714
-
3715
- .wui-padding-right-m {
3716
- padding-right: var(--wui-spacing-m);
3717
- }
3718
-
3719
- .wui-padding-right-l {
3720
- padding-right: var(--wui-spacing-l);
3721
- }
3722
-
3723
- .wui-padding-right-xl {
3724
- padding-right: var(--wui-spacing-xl);
3725
- }
3726
-
3727
- .wui-padding-right-2xl {
3728
- padding-right: var(--wui-spacing-2xl);
3729
- }
3730
-
3731
- .wui-padding-right-3xl {
3732
- padding-right: var(--wui-spacing-3xl);
3733
- }
3734
-
3735
- .wui-padding-right-4xl {
3736
- padding-right: var(--wui-spacing-4xl);
3737
- }
3738
-
3739
- .wui-padding-right-5xl {
3740
- padding-right: var(--wui-spacing-5xl);
3741
- }
3742
-
3743
- wui-icon + .wui-size-lg,
3744
- wui-loading-spinner + .wui-size-lg {
3745
- padding-left: 50px;
3746
- }
3747
-
3748
- wui-icon[data-input='lg'] {
3749
- left: var(--wui-spacing-l);
3750
- }
3751
-
3752
- .wui-size-mdl {
3753
- padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
3754
- }
3755
- wui-icon + .wui-size-mdl,
3756
- wui-loading-spinner + .wui-size-mdl {
3757
- padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
3758
- }
3759
- wui-icon[data-input='mdl'] {
3760
- left: var(--wui-spacing-m);
3761
- }
3762
-
3763
- input:placeholder-shown ~ ::slotted(wui-input-element),
3764
- input:placeholder-shown ~ ::slotted(wui-icon) {
3765
- opacity: 0;
3766
- pointer-events: none;
3767
- }
3768
-
3769
- input::-webkit-outer-spin-button,
3770
- input::-webkit-inner-spin-button {
3771
- -webkit-appearance: none;
3772
- margin: 0;
3773
- }
3774
-
3775
- input[type='number'] {
3776
- -moz-appearance: textfield;
3777
- }
3778
-
3779
- ::slotted(wui-input-element),
3780
- ::slotted(wui-icon) {
3781
- position: absolute;
3782
- top: 50%;
3783
- transform: translateY(-50%);
3784
- }
3785
-
3786
- ::slotted(wui-input-element) {
3787
- right: var(--wui-spacing-m);
3788
- }
3789
-
3790
- ::slotted(wui-icon) {
3791
- right: 0px;
3792
- }
3793
- `;
3794
- var __decorate$9 = function(decorators, target, key, desc) {
3795
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3796
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3797
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3798
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3799
- };
3800
- let WuiInputText = class WuiInputText2 extends i$1 {
3801
- constructor() {
3802
- super(...arguments);
3803
- this.inputElementRef = e();
3804
- this.size = "md";
3805
- this.disabled = false;
3806
- this.placeholder = "";
3807
- this.type = "text";
3808
- this.value = "";
3809
- }
3810
- render() {
3811
- const inputClass = `wui-padding-right-${this.inputRightPadding}`;
3812
- const sizeClass = `wui-size-${this.size}`;
3813
- const classes = {
3814
- [sizeClass]: true,
3815
- [inputClass]: Boolean(this.inputRightPadding)
3816
- };
3817
- return x`${this.templateIcon()}
3818
- <input
3819
- data-testid="wui-input-text"
3820
- ${n$1(this.inputElementRef)}
3821
- class=${e$1(classes)}
3822
- type=${this.type}
3823
- enterkeyhint=${o(this.enterKeyHint)}
3824
- ?disabled=${this.disabled}
3825
- placeholder=${this.placeholder}
3826
- @input=${this.dispatchInputChangeEvent.bind(this)}
3827
- .value=${this.value || ""}
3828
- tabindex=${o(this.tabIdx)}
3829
- />
3830
- <slot></slot>`;
3831
- }
3832
- templateIcon() {
3833
- if (this.icon) {
3834
- return x`<wui-icon
3835
- data-input=${this.size}
3836
- size=${this.size}
3837
- color="inherit"
3838
- name=${this.icon}
3839
- ></wui-icon>`;
3840
- }
3841
- return null;
3842
- }
3843
- dispatchInputChangeEvent() {
3844
- var _a;
3845
- this.dispatchEvent(new CustomEvent("inputChange", {
3846
- detail: (_a = this.inputElementRef.value) == null ? void 0 : _a.value,
3847
- bubbles: true,
3848
- composed: true
3849
- }));
3850
- }
3851
- };
3852
- WuiInputText.styles = [resetStyles, elementStyles, styles$7];
3853
- __decorate$9([
3854
- n()
3855
- ], WuiInputText.prototype, "size", void 0);
3856
- __decorate$9([
3857
- n()
3858
- ], WuiInputText.prototype, "icon", void 0);
3859
- __decorate$9([
3860
- n({ type: Boolean })
3861
- ], WuiInputText.prototype, "disabled", void 0);
3862
- __decorate$9([
3863
- n()
3864
- ], WuiInputText.prototype, "placeholder", void 0);
3865
- __decorate$9([
3866
- n()
3867
- ], WuiInputText.prototype, "type", void 0);
3868
- __decorate$9([
3869
- n()
3870
- ], WuiInputText.prototype, "keyHint", void 0);
3871
- __decorate$9([
3872
- n()
3873
- ], WuiInputText.prototype, "value", void 0);
3874
- __decorate$9([
3875
- n()
3876
- ], WuiInputText.prototype, "inputRightPadding", void 0);
3877
- __decorate$9([
3878
- n()
3879
- ], WuiInputText.prototype, "tabIdx", void 0);
3880
- WuiInputText = __decorate$9([
3881
- customElement("wui-input-text")
3882
- ], WuiInputText);
3883
- const styles$6 = i`
3884
- :host {
3885
- position: relative;
3886
- display: inline-block;
3887
- width: 100%;
3888
- }
3889
- `;
3890
- var __decorate$8 = function(decorators, target, key, desc) {
3891
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3892
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3893
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3894
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3895
- };
3896
- let WuiSearchBar = class WuiSearchBar2 extends i$1 {
3897
- constructor() {
3898
- super(...arguments);
3899
- this.inputComponentRef = e();
3900
- }
3901
- render() {
3902
- return x`
3903
- <wui-input-text
3904
- ${n$1(this.inputComponentRef)}
3905
- placeholder="Search wallet"
3906
- icon="search"
3907
- type="search"
3908
- enterKeyHint="search"
3909
- size="sm"
3910
- >
3911
- <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
3912
- </wui-input-text>
3913
- `;
3914
- }
3915
- clearValue() {
3916
- const inputComponent = this.inputComponentRef.value;
3917
- const inputElement = inputComponent == null ? void 0 : inputComponent.inputElementRef.value;
3918
- if (inputElement) {
3919
- inputElement.value = "";
3920
- inputElement.focus();
3921
- inputElement.dispatchEvent(new Event("input"));
3922
- }
3923
- }
3924
- };
3925
- WuiSearchBar.styles = [resetStyles, styles$6];
3926
- WuiSearchBar = __decorate$8([
3927
- customElement("wui-search-bar")
3928
- ], WuiSearchBar);
3929
- const networkSvgMd = b`<svg viewBox="0 0 48 54" fill="none">
3930
- <path
3931
- d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
3932
- />
3933
- </svg>`;
3934
- const styles$5 = i`
3935
- :host {
3936
- display: flex;
3937
- flex-direction: column;
3938
- align-items: center;
3939
- width: 104px;
3940
- row-gap: var(--wui-spacing-xs);
3941
- padding: var(--wui-spacing-xs) 10px;
3942
- background-color: var(--wui-color-gray-glass-002);
3943
- border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
3944
- position: relative;
3945
- }
3946
-
3947
- wui-shimmer[data-type='network'] {
3948
- border: none;
3949
- -webkit-clip-path: var(--wui-path-network);
3950
- clip-path: var(--wui-path-network);
3951
- }
3952
-
3953
- svg {
3954
- position: absolute;
3955
- width: 48px;
3956
- height: 54px;
3957
- z-index: 1;
3958
- }
3959
-
3960
- svg > path {
3961
- stroke: var(--wui-color-gray-glass-010);
3962
- stroke-width: 1px;
3963
- }
3964
-
3965
- @media (max-width: 350px) {
3966
- :host {
3967
- width: 100%;
3968
- }
3969
- }
3970
- `;
3971
- var __decorate$7 = function(decorators, target, key, desc) {
3972
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3973
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
3974
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
3975
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
3976
- };
3977
- let WuiCardSelectLoader = class WuiCardSelectLoader2 extends i$1 {
3978
- constructor() {
3979
- super(...arguments);
3980
- this.type = "wallet";
3981
- }
3982
- render() {
3983
- return x`
3984
- ${this.shimmerTemplate()}
3985
- <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
3986
- `;
3987
- }
3988
- shimmerTemplate() {
3989
- if (this.type === "network") {
3990
- return x` <wui-shimmer
3991
- data-type=${this.type}
3992
- width="48px"
3993
- height="54px"
3994
- borderRadius="xs"
3995
- ></wui-shimmer>
3996
- ${networkSvgMd}`;
3997
- }
3998
- return x`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`;
3999
- }
4000
- };
4001
- WuiCardSelectLoader.styles = [resetStyles, elementStyles, styles$5];
4002
- __decorate$7([
4003
- n()
4004
- ], WuiCardSelectLoader.prototype, "type", void 0);
4005
- WuiCardSelectLoader = __decorate$7([
4006
- customElement("wui-card-select-loader")
4007
- ], WuiCardSelectLoader);
4008
- const styles$4 = i`
4009
- :host {
4010
- display: grid;
4011
- width: inherit;
4012
- height: inherit;
4013
- }
4014
- `;
4015
- var __decorate$6 = function(decorators, target, key, desc) {
4016
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4017
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4018
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4019
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4020
- };
4021
- let WuiGrid = class WuiGrid2 extends i$1 {
4022
- render() {
4023
- this.style.cssText = `
4024
- grid-template-rows: ${this.gridTemplateRows};
4025
- grid-template-columns: ${this.gridTemplateColumns};
4026
- justify-items: ${this.justifyItems};
4027
- align-items: ${this.alignItems};
4028
- justify-content: ${this.justifyContent};
4029
- align-content: ${this.alignContent};
4030
- column-gap: ${this.columnGap && `var(--wui-spacing-${this.columnGap})`};
4031
- row-gap: ${this.rowGap && `var(--wui-spacing-${this.rowGap})`};
4032
- gap: ${this.gap && `var(--wui-spacing-${this.gap})`};
4033
- padding-top: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 0)};
4034
- padding-right: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 1)};
4035
- padding-bottom: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 2)};
4036
- padding-left: ${this.padding && UiHelperUtil.getSpacingStyles(this.padding, 3)};
4037
- margin-top: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 0)};
4038
- margin-right: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 1)};
4039
- margin-bottom: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 2)};
4040
- margin-left: ${this.margin && UiHelperUtil.getSpacingStyles(this.margin, 3)};
4041
- `;
4042
- return x`<slot></slot>`;
4043
- }
4044
- };
4045
- WuiGrid.styles = [resetStyles, styles$4];
4046
- __decorate$6([
4047
- n()
4048
- ], WuiGrid.prototype, "gridTemplateRows", void 0);
4049
- __decorate$6([
4050
- n()
4051
- ], WuiGrid.prototype, "gridTemplateColumns", void 0);
4052
- __decorate$6([
4053
- n()
4054
- ], WuiGrid.prototype, "justifyItems", void 0);
4055
- __decorate$6([
4056
- n()
4057
- ], WuiGrid.prototype, "alignItems", void 0);
4058
- __decorate$6([
4059
- n()
4060
- ], WuiGrid.prototype, "justifyContent", void 0);
4061
- __decorate$6([
4062
- n()
4063
- ], WuiGrid.prototype, "alignContent", void 0);
4064
- __decorate$6([
4065
- n()
4066
- ], WuiGrid.prototype, "columnGap", void 0);
4067
- __decorate$6([
4068
- n()
4069
- ], WuiGrid.prototype, "rowGap", void 0);
4070
- __decorate$6([
4071
- n()
4072
- ], WuiGrid.prototype, "gap", void 0);
4073
- __decorate$6([
4074
- n()
4075
- ], WuiGrid.prototype, "padding", void 0);
4076
- __decorate$6([
4077
- n()
4078
- ], WuiGrid.prototype, "margin", void 0);
4079
- WuiGrid = __decorate$6([
4080
- customElement("wui-grid")
4081
- ], WuiGrid);
4082
- const styles$3 = i`
4083
- button {
4084
- display: flex;
4085
- flex-direction: column;
4086
- justify-content: center;
4087
- align-items: center;
4088
- cursor: pointer;
4089
- width: 104px;
4090
- row-gap: var(--wui-spacing-xs);
4091
- padding: var(--wui-spacing-s) var(--wui-spacing-0);
4092
- background-color: var(--wui-color-gray-glass-002);
4093
- border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
4094
- transition:
4095
- color var(--wui-duration-lg) var(--wui-ease-out-power-1),
4096
- background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
4097
- border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);
4098
- will-change: background-color, color, border-radius;
4099
- outline: none;
4100
- border: none;
4101
- }
4102
-
4103
- button > wui-flex > wui-text {
4104
- color: var(--wui-color-fg-100);
4105
- max-width: 86px;
4106
- white-space: nowrap;
4107
- overflow: hidden;
4108
- text-overflow: ellipsis;
4109
- justify-content: center;
4110
- }
4111
-
4112
- button > wui-flex > wui-text.certified {
4113
- max-width: 66px;
4114
- }
4115
-
4116
- button:hover:enabled {
4117
- background-color: var(--wui-color-gray-glass-005);
4118
- }
4119
-
4120
- button:disabled > wui-flex > wui-text {
4121
- color: var(--wui-color-gray-glass-015);
4122
- }
4123
-
4124
- [data-selected='true'] {
4125
- background-color: var(--wui-color-accent-glass-020);
4126
- }
4127
-
4128
- @media (hover: hover) and (pointer: fine) {
4129
- [data-selected='true']:hover:enabled {
4130
- background-color: var(--wui-color-accent-glass-015);
4131
- }
4132
- }
4133
-
4134
- [data-selected='true']:active:enabled {
4135
- background-color: var(--wui-color-accent-glass-010);
4136
- }
4137
-
4138
- @media (max-width: 350px) {
4139
- button {
4140
- width: 100%;
4141
- }
4142
- }
4143
- `;
4144
- var __decorate$5 = function(decorators, target, key, desc) {
4145
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4146
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4147
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4148
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4149
- };
4150
- let W3mAllWalletsListItem = class W3mAllWalletsListItem2 extends i$1 {
4151
- constructor() {
4152
- super();
4153
- this.observer = new IntersectionObserver(() => void 0);
4154
- this.visible = false;
4155
- this.imageSrc = void 0;
4156
- this.imageLoading = false;
4157
- this.wallet = void 0;
4158
- this.observer = new IntersectionObserver((entries) => {
4159
- entries.forEach((entry) => {
4160
- if (entry.isIntersecting) {
4161
- this.visible = true;
4162
- this.fetchImageSrc();
4163
- } else {
4164
- this.visible = false;
4165
- }
4166
- });
4167
- }, { threshold: 0.01 });
4168
- }
4169
- firstUpdated() {
4170
- this.observer.observe(this);
4171
- }
4172
- disconnectedCallback() {
4173
- this.observer.disconnect();
4174
- }
4175
- render() {
4176
- var _a, _b;
4177
- const certified = ((_a = this.wallet) == null ? void 0 : _a.badge_type) === "certified";
4178
- return x`
4179
- <button>
4180
- ${this.imageTemplate()}
4181
- <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="3xs">
4182
- <wui-text
4183
- variant="tiny-500"
4184
- color="inherit"
4185
- class=${o(certified ? "certified" : void 0)}
4186
- >${(_b = this.wallet) == null ? void 0 : _b.name}</wui-text
4187
- >
4188
- ${certified ? x`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>` : null}
4189
- </wui-flex>
4190
- </button>
4191
- `;
4192
- }
4193
- imageTemplate() {
4194
- var _a, _b;
4195
- if (!this.visible && !this.imageSrc || this.imageLoading) {
4196
- return this.shimmerTemplate();
4197
- }
4198
- return x`
4199
- <wui-wallet-image
4200
- size="md"
4201
- imageSrc=${o(this.imageSrc)}
4202
- name=${(_a = this.wallet) == null ? void 0 : _a.name}
4203
- .installed=${(_b = this.wallet) == null ? void 0 : _b.installed}
4204
- badgeSize="sm"
4205
- >
4206
- </wui-wallet-image>
4207
- `;
4208
- }
4209
- shimmerTemplate() {
4210
- return x`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`;
4211
- }
4212
- async fetchImageSrc() {
4213
- if (!this.wallet) {
4214
- return;
4215
- }
4216
- this.imageSrc = AssetUtil.getWalletImage(this.wallet);
4217
- if (this.imageSrc) {
4218
- return;
4219
- }
4220
- this.imageLoading = true;
4221
- this.imageSrc = await AssetUtil.fetchWalletImage(this.wallet.image_id);
4222
- this.imageLoading = false;
4223
- }
4224
- };
4225
- W3mAllWalletsListItem.styles = styles$3;
4226
- __decorate$5([
4227
- r()
4228
- ], W3mAllWalletsListItem.prototype, "visible", void 0);
4229
- __decorate$5([
4230
- r()
4231
- ], W3mAllWalletsListItem.prototype, "imageSrc", void 0);
4232
- __decorate$5([
4233
- r()
4234
- ], W3mAllWalletsListItem.prototype, "imageLoading", void 0);
4235
- __decorate$5([
4236
- n()
4237
- ], W3mAllWalletsListItem.prototype, "wallet", void 0);
4238
- W3mAllWalletsListItem = __decorate$5([
4239
- customElement("w3m-all-wallets-list-item")
4240
- ], W3mAllWalletsListItem);
4241
- const styles$2 = i`
4242
- wui-grid {
4243
- max-height: clamp(360px, 400px, 80vh);
4244
- overflow: scroll;
4245
- scrollbar-width: none;
4246
- grid-auto-rows: min-content;
4247
- grid-template-columns: repeat(auto-fill, 104px);
4248
- }
4249
-
4250
- @media (max-width: 350px) {
4251
- wui-grid {
4252
- grid-template-columns: repeat(2, 1fr);
4253
- }
4254
- }
4255
-
4256
- wui-grid[data-scroll='false'] {
4257
- overflow: hidden;
4258
- }
4259
-
4260
- wui-grid::-webkit-scrollbar {
4261
- display: none;
4262
- }
4263
-
4264
- wui-loading-spinner {
4265
- padding-top: var(--wui-spacing-l);
4266
- padding-bottom: var(--wui-spacing-l);
4267
- justify-content: center;
4268
- grid-column: 1 / span 4;
4269
- }
4270
- `;
4271
- var __decorate$4 = function(decorators, target, key, desc) {
4272
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4273
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4274
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4275
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4276
- };
4277
- const PAGINATOR_ID = "local-paginator";
4278
- let W3mAllWalletsList = class W3mAllWalletsList2 extends i$1 {
4279
- constructor() {
4280
- super();
4281
- this.unsubscribe = [];
4282
- this.paginationObserver = void 0;
4283
- this.loading = !ApiController.state.wallets.length;
4284
- this.wallets = ApiController.state.wallets;
4285
- this.recommended = ApiController.state.recommended;
4286
- this.featured = ApiController.state.featured;
4287
- this.filteredWallets = ApiController.state.filteredWallets;
4288
- this.unsubscribe.push(...[
4289
- ApiController.subscribeKey("wallets", (val) => this.wallets = val),
4290
- ApiController.subscribeKey("recommended", (val) => this.recommended = val),
4291
- ApiController.subscribeKey("featured", (val) => this.featured = val),
4292
- ApiController.subscribeKey("filteredWallets", (val) => this.filteredWallets = val)
4293
- ]);
4294
- }
4295
- firstUpdated() {
4296
- this.initialFetch();
4297
- this.createPaginationObserver();
4298
- }
4299
- disconnectedCallback() {
4300
- var _a;
4301
- this.unsubscribe.forEach((unsubscribe) => unsubscribe());
4302
- (_a = this.paginationObserver) == null ? void 0 : _a.disconnect();
4303
- }
4304
- render() {
4305
- return x`
4306
- <wui-grid
4307
- data-scroll=${!this.loading}
4308
- .padding=${["0", "s", "s", "s"]}
4309
- columnGap="xxs"
4310
- rowGap="l"
4311
- justifyContent="space-between"
4312
- >
4313
- ${this.loading ? this.shimmerTemplate(16) : this.walletsTemplate()}
4314
- ${this.paginationLoaderTemplate()}
4315
- </wui-grid>
4316
- `;
4317
- }
4318
- async initialFetch() {
4319
- var _a;
4320
- this.loading = true;
4321
- const gridEl = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("wui-grid");
4322
- if (gridEl) {
4323
- await ApiController.fetchWalletsByPage({ page: 1 });
4324
- await gridEl.animate([{ opacity: 1 }, { opacity: 0 }], {
4325
- duration: 200,
4326
- fill: "forwards",
4327
- easing: "ease"
4328
- }).finished;
4329
- this.loading = false;
4330
- gridEl.animate([{ opacity: 0 }, { opacity: 1 }], {
4331
- duration: 200,
4332
- fill: "forwards",
4333
- easing: "ease"
4334
- });
4335
- }
4336
- }
4337
- shimmerTemplate(items, id) {
4338
- return [...Array(items)].map(() => x`
4339
- <wui-card-select-loader type="wallet" id=${o(id)}></wui-card-select-loader>
4340
- `);
4341
- }
4342
- walletsTemplate() {
4343
- var _a;
4344
- const wallets = ((_a = this.filteredWallets) == null ? void 0 : _a.length) > 0 ? CoreHelperUtil.uniqueBy([...this.featured, ...this.recommended, ...this.filteredWallets], "id") : CoreHelperUtil.uniqueBy([...this.featured, ...this.recommended, ...this.wallets], "id");
4345
- const walletsWithInstalled = WalletUtil.markWalletsAsInstalled(wallets);
4346
- return walletsWithInstalled.map((wallet) => x`
4347
- <w3m-all-wallets-list-item
4348
- @click=${() => this.onConnectWallet(wallet)}
4349
- .wallet=${wallet}
4350
- ></w3m-all-wallets-list-item>
4351
- `);
4352
- }
4353
- paginationLoaderTemplate() {
4354
- const { wallets, recommended, featured, count } = ApiController.state;
4355
- const columns = window.innerWidth < 352 ? 3 : 4;
4356
- const currentWallets = wallets.length + recommended.length;
4357
- const minimumRows = Math.ceil(currentWallets / columns);
4358
- let shimmerCount = minimumRows * columns - currentWallets + columns;
4359
- shimmerCount -= wallets.length ? featured.length % columns : 0;
4360
- if (count === 0 && featured.length > 0) {
4361
- return null;
4362
- }
4363
- if (count === 0 || [...featured, ...wallets, ...recommended].length < count) {
4364
- return this.shimmerTemplate(shimmerCount, PAGINATOR_ID);
4365
- }
4366
- return null;
4367
- }
4368
- createPaginationObserver() {
4369
- var _a;
4370
- const loaderEl = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(`#${PAGINATOR_ID}`);
4371
- if (loaderEl) {
4372
- this.paginationObserver = new IntersectionObserver(([element]) => {
4373
- if ((element == null ? void 0 : element.isIntersecting) && !this.loading) {
4374
- const { page, count, wallets } = ApiController.state;
4375
- if (wallets.length < count) {
4376
- ApiController.fetchWalletsByPage({ page: page + 1 });
4377
- }
4378
- }
4379
- });
4380
- this.paginationObserver.observe(loaderEl);
4381
- }
4382
- }
4383
- onConnectWallet(wallet) {
4384
- ConnectorController.selectWalletConnector(wallet);
4385
- }
4386
- };
4387
- W3mAllWalletsList.styles = styles$2;
4388
- __decorate$4([
4389
- r()
4390
- ], W3mAllWalletsList.prototype, "loading", void 0);
4391
- __decorate$4([
4392
- r()
4393
- ], W3mAllWalletsList.prototype, "wallets", void 0);
4394
- __decorate$4([
4395
- r()
4396
- ], W3mAllWalletsList.prototype, "recommended", void 0);
4397
- __decorate$4([
4398
- r()
4399
- ], W3mAllWalletsList.prototype, "featured", void 0);
4400
- __decorate$4([
4401
- r()
4402
- ], W3mAllWalletsList.prototype, "filteredWallets", void 0);
4403
- W3mAllWalletsList = __decorate$4([
4404
- customElement("w3m-all-wallets-list")
4405
- ], W3mAllWalletsList);
4406
- const styles$1 = i`
4407
- wui-grid,
4408
- wui-loading-spinner,
4409
- wui-flex {
4410
- height: 360px;
4411
- }
4412
-
4413
- wui-grid {
4414
- overflow: scroll;
4415
- scrollbar-width: none;
4416
- grid-auto-rows: min-content;
4417
- grid-template-columns: repeat(auto-fill, 104px);
4418
- }
4419
-
4420
- wui-grid[data-scroll='false'] {
4421
- overflow: hidden;
4422
- }
4423
-
4424
- wui-grid::-webkit-scrollbar {
4425
- display: none;
4426
- }
4427
-
4428
- wui-loading-spinner {
4429
- justify-content: center;
4430
- align-items: center;
4431
- }
4432
-
4433
- @media (max-width: 350px) {
4434
- wui-grid {
4435
- grid-template-columns: repeat(2, 1fr);
4436
- }
4437
- }
4438
- `;
4439
- var __decorate$3 = function(decorators, target, key, desc) {
4440
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4441
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4442
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4443
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4444
- };
4445
- let W3mAllWalletsSearch = class W3mAllWalletsSearch2 extends i$1 {
4446
- constructor() {
4447
- super(...arguments);
4448
- this.prevQuery = "";
4449
- this.prevBadge = void 0;
4450
- this.loading = true;
4451
- this.query = "";
4452
- }
4453
- render() {
4454
- this.onSearch();
4455
- return this.loading ? x`<wui-loading-spinner color="accent-100"></wui-loading-spinner>` : this.walletsTemplate();
4456
- }
4457
- async onSearch() {
4458
- if (this.query.trim() !== this.prevQuery.trim() || this.badge !== this.prevBadge) {
4459
- this.prevQuery = this.query;
4460
- this.prevBadge = this.badge;
4461
- this.loading = true;
4462
- await ApiController.searchWallet({ search: this.query, badge: this.badge });
4463
- this.loading = false;
4464
- }
4465
- }
4466
- walletsTemplate() {
4467
- const { search } = ApiController.state;
4468
- const wallets = WalletUtil.markWalletsAsInstalled(search);
4469
- if (!search.length) {
4470
- return x`
4471
- <wui-flex
4472
- data-testid="no-wallet-found"
4473
- justifyContent="center"
4474
- alignItems="center"
4475
- gap="s"
4476
- flexDirection="column"
4477
- >
4478
- <wui-icon-box
4479
- size="lg"
4480
- iconColor="fg-200"
4481
- backgroundColor="fg-300"
4482
- icon="wallet"
4483
- background="transparent"
4484
- ></wui-icon-box>
4485
- <wui-text data-testid="no-wallet-found-text" color="fg-200" variant="paragraph-500">
4486
- No Wallet found
4487
- </wui-text>
4488
- </wui-flex>
4489
- `;
4490
- }
4491
- return x`
4492
- <wui-grid
4493
- data-testid="wallet-list"
4494
- .padding=${["0", "s", "s", "s"]}
4495
- rowGap="l"
4496
- columnGap="xs"
4497
- justifyContent="space-between"
4498
- >
4499
- ${wallets.map((wallet) => x`
4500
- <w3m-all-wallets-list-item
4501
- @click=${() => this.onConnectWallet(wallet)}
4502
- .wallet=${wallet}
4503
- data-testid="wallet-search-item-${wallet.id}"
4504
- ></w3m-all-wallets-list-item>
4505
- `)}
4506
- </wui-grid>
4507
- `;
4508
- }
4509
- onConnectWallet(wallet) {
4510
- ConnectorController.selectWalletConnector(wallet);
4511
- }
4512
- };
4513
- W3mAllWalletsSearch.styles = styles$1;
4514
- __decorate$3([
4515
- r()
4516
- ], W3mAllWalletsSearch.prototype, "loading", void 0);
4517
- __decorate$3([
4518
- n()
4519
- ], W3mAllWalletsSearch.prototype, "query", void 0);
4520
- __decorate$3([
4521
- n()
4522
- ], W3mAllWalletsSearch.prototype, "badge", void 0);
4523
- W3mAllWalletsSearch = __decorate$3([
4524
- customElement("w3m-all-wallets-search")
4525
- ], W3mAllWalletsSearch);
4526
- var __decorate$2 = function(decorators, target, key, desc) {
4527
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4528
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4529
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4530
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4531
- };
4532
- let W3mAllWalletsView = class W3mAllWalletsView2 extends i$1 {
4533
- constructor() {
4534
- super(...arguments);
4535
- this.search = "";
4536
- this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {
4537
- this.search = value;
4538
- });
4539
- }
4540
- render() {
4541
- const isSearch = this.search.length >= 2;
4542
- return x`
4543
- <wui-flex .padding=${["0", "s", "s", "s"]} gap="xs">
4544
- <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
4545
- <wui-certified-switch
4546
- ?checked=${this.badge}
4547
- @click=${this.onClick.bind(this)}
4548
- data-testid="wui-certified-switch"
4549
- ></wui-certified-switch>
4550
- ${this.qrButtonTemplate()}
4551
- </wui-flex>
4552
- ${isSearch || this.badge ? x`<w3m-all-wallets-search
4553
- query=${this.search}
4554
- badge=${o(this.badge)}
4555
- ></w3m-all-wallets-search>` : x`<w3m-all-wallets-list badge=${o(this.badge)}></w3m-all-wallets-list>`}
4556
- `;
4557
- }
4558
- onInputChange(event) {
4559
- this.onDebouncedSearch(event.detail);
4560
- }
4561
- onClick() {
4562
- if (this.badge === "certified") {
4563
- this.badge = void 0;
4564
- return;
4565
- }
4566
- this.badge = "certified";
4567
- SnackController.showSvg("Only WalletConnect certified", {
4568
- icon: "walletConnectBrown",
4569
- iconColor: "accent-100"
4570
- });
4571
- }
4572
- qrButtonTemplate() {
4573
- if (CoreHelperUtil.isMobile()) {
4574
- return x`
4575
- <wui-icon-box
4576
- size="lg"
4577
- iconSize="xl"
4578
- iconColor="accent-100"
4579
- backgroundColor="accent-100"
4580
- icon="qrCode"
4581
- background="transparent"
4582
- border
4583
- borderColor="wui-accent-glass-010"
4584
- @click=${this.onWalletConnectQr.bind(this)}
4585
- ></wui-icon-box>
4586
- `;
4587
- }
4588
- return null;
4589
- }
4590
- onWalletConnectQr() {
4591
- RouterController.push("ConnectingWalletConnect");
4592
- }
4593
- };
4594
- __decorate$2([
4595
- r()
4596
- ], W3mAllWalletsView.prototype, "search", void 0);
4597
- __decorate$2([
4598
- r()
4599
- ], W3mAllWalletsView.prototype, "badge", void 0);
4600
- W3mAllWalletsView = __decorate$2([
4601
- customElement("w3m-all-wallets-view")
4602
- ], W3mAllWalletsView);
4603
- const styles = i`
4604
- button {
4605
- column-gap: var(--wui-spacing-s);
4606
- padding: 11px 18px 11px var(--wui-spacing-s);
4607
- width: 100%;
4608
- background-color: var(--wui-color-gray-glass-002);
4609
- border-radius: var(--wui-border-radius-xs);
4610
- color: var(--wui-color-fg-250);
4611
- transition:
4612
- color var(--wui-ease-out-power-1) var(--wui-duration-md),
4613
- background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
4614
- will-change: color, background-color;
4615
- }
4616
-
4617
- button[data-iconvariant='square'],
4618
- button[data-iconvariant='square-blue'] {
4619
- padding: 6px 18px 6px 9px;
4620
- }
4621
-
4622
- button > wui-flex {
4623
- flex: 1;
4624
- }
4625
-
4626
- button > wui-image {
4627
- width: 32px;
4628
- height: 32px;
4629
- box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
4630
- border-radius: var(--wui-border-radius-3xl);
4631
- }
4632
-
4633
- button > wui-icon {
4634
- width: 36px;
4635
- height: 36px;
4636
- transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
4637
- will-change: opacity;
4638
- }
4639
-
4640
- button > wui-icon-box[data-variant='blue'] {
4641
- box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
4642
- }
4643
-
4644
- button > wui-icon-box[data-variant='overlay'] {
4645
- box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
4646
- }
4647
-
4648
- button > wui-icon-box[data-variant='square-blue'] {
4649
- border-radius: var(--wui-border-radius-3xs);
4650
- position: relative;
4651
- border: none;
4652
- width: 36px;
4653
- height: 36px;
4654
- }
4655
-
4656
- button > wui-icon-box[data-variant='square-blue']::after {
4657
- content: '';
4658
- position: absolute;
4659
- top: 0;
4660
- bottom: 0;
4661
- left: 0;
4662
- right: 0;
4663
- border-radius: inherit;
4664
- border: 1px solid var(--wui-color-accent-glass-010);
4665
- pointer-events: none;
4666
- }
4667
-
4668
- button > wui-icon:last-child {
4669
- width: 14px;
4670
- height: 14px;
4671
- }
4672
-
4673
- button:disabled {
4674
- color: var(--wui-color-gray-glass-020);
4675
- }
4676
-
4677
- button[data-loading='true'] > wui-icon {
4678
- opacity: 0;
4679
- }
4680
-
4681
- wui-loading-spinner {
4682
- position: absolute;
4683
- right: 18px;
4684
- top: 50%;
4685
- transform: translateY(-50%);
4686
- }
4687
- `;
4688
- var __decorate$1 = function(decorators, target, key, desc) {
4689
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4690
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4691
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4692
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4693
- };
4694
- let WuiListItem = class WuiListItem2 extends i$1 {
4695
- constructor() {
4696
- super(...arguments);
4697
- this.tabIdx = void 0;
4698
- this.variant = "icon";
4699
- this.disabled = false;
4700
- this.imageSrc = void 0;
4701
- this.alt = void 0;
4702
- this.chevron = false;
4703
- this.loading = false;
4704
- }
4705
- render() {
4706
- return x`
4707
- <button
4708
- ?disabled=${this.loading ? true : Boolean(this.disabled)}
4709
- data-loading=${this.loading}
4710
- data-iconvariant=${o(this.iconVariant)}
4711
- tabindex=${o(this.tabIdx)}
4712
- >
4713
- ${this.loadingTemplate()} ${this.visualTemplate()}
4714
- <wui-flex gap="3xs">
4715
- <slot></slot>
4716
- </wui-flex>
4717
- ${this.chevronTemplate()}
4718
- </button>
4719
- `;
4720
- }
4721
- visualTemplate() {
4722
- if (this.variant === "image" && this.imageSrc) {
4723
- return x`<wui-image src=${this.imageSrc} alt=${this.alt ?? "list item"}></wui-image>`;
4724
- }
4725
- if (this.iconVariant === "square" && this.icon && this.variant === "icon") {
4726
- return x`<wui-icon name=${this.icon}></wui-icon>`;
4727
- }
4728
- if (this.variant === "icon" && this.icon && this.iconVariant) {
4729
- const color = ["blue", "square-blue"].includes(this.iconVariant) ? "accent-100" : "fg-200";
4730
- const size = this.iconVariant === "square-blue" ? "mdl" : "md";
4731
- const iconSize = this.iconSize ? this.iconSize : size;
4732
- return x`
4733
- <wui-icon-box
4734
- data-variant=${this.iconVariant}
4735
- icon=${this.icon}
4736
- iconSize=${iconSize}
4737
- background="transparent"
4738
- iconColor=${color}
4739
- backgroundColor=${color}
4740
- size=${size}
4741
- ></wui-icon-box>
4742
- `;
4743
- }
4744
- return null;
4745
- }
4746
- loadingTemplate() {
4747
- if (this.loading) {
4748
- return x`<wui-loading-spinner
4749
- data-testid="wui-list-item-loading-spinner"
4750
- color="fg-300"
4751
- ></wui-loading-spinner>`;
4752
- }
4753
- return x``;
4754
- }
4755
- chevronTemplate() {
4756
- if (this.chevron) {
4757
- return x`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`;
4758
- }
4759
- return null;
4760
- }
4761
- };
4762
- WuiListItem.styles = [resetStyles, elementStyles, styles];
4763
- __decorate$1([
4764
- n()
4765
- ], WuiListItem.prototype, "icon", void 0);
4766
- __decorate$1([
4767
- n()
4768
- ], WuiListItem.prototype, "iconSize", void 0);
4769
- __decorate$1([
4770
- n()
4771
- ], WuiListItem.prototype, "tabIdx", void 0);
4772
- __decorate$1([
4773
- n()
4774
- ], WuiListItem.prototype, "variant", void 0);
4775
- __decorate$1([
4776
- n()
4777
- ], WuiListItem.prototype, "iconVariant", void 0);
4778
- __decorate$1([
4779
- n({ type: Boolean })
4780
- ], WuiListItem.prototype, "disabled", void 0);
4781
- __decorate$1([
4782
- n()
4783
- ], WuiListItem.prototype, "imageSrc", void 0);
4784
- __decorate$1([
4785
- n()
4786
- ], WuiListItem.prototype, "alt", void 0);
4787
- __decorate$1([
4788
- n({ type: Boolean })
4789
- ], WuiListItem.prototype, "chevron", void 0);
4790
- __decorate$1([
4791
- n({ type: Boolean })
4792
- ], WuiListItem.prototype, "loading", void 0);
4793
- WuiListItem = __decorate$1([
4794
- customElement("wui-list-item")
4795
- ], WuiListItem);
4796
- var __decorate = function(decorators, target, key, desc) {
4797
- var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4798
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
4799
- else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
4800
- return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
4801
- };
4802
- let W3mDownloadsView = class W3mDownloadsView2 extends i$1 {
4803
- constructor() {
4804
- var _a;
4805
- super(...arguments);
4806
- this.wallet = (_a = RouterController.state.data) == null ? void 0 : _a.wallet;
4807
- }
4808
- render() {
4809
- if (!this.wallet) {
4810
- throw new Error("w3m-downloads-view");
4811
- }
4812
- return x`
4813
- <wui-flex gap="xs" flexDirection="column" .padding=${["s", "s", "l", "s"]}>
4814
- ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
4815
- ${this.homepageTemplate()}
4816
- </wui-flex>
4817
- `;
4818
- }
4819
- chromeTemplate() {
4820
- var _a;
4821
- if (!((_a = this.wallet) == null ? void 0 : _a.chrome_store)) {
4822
- return null;
4823
- }
4824
- return x`<wui-list-item
4825
- variant="icon"
4826
- icon="chromeStore"
4827
- iconVariant="square"
4828
- @click=${this.onChromeStore.bind(this)}
4829
- chevron
4830
- >
4831
- <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
4832
- </wui-list-item>`;
4833
- }
4834
- iosTemplate() {
4835
- var _a;
4836
- if (!((_a = this.wallet) == null ? void 0 : _a.app_store)) {
4837
- return null;
4838
- }
4839
- return x`<wui-list-item
4840
- variant="icon"
4841
- icon="appStore"
4842
- iconVariant="square"
4843
- @click=${this.onAppStore.bind(this)}
4844
- chevron
4845
- >
4846
- <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
4847
- </wui-list-item>`;
4848
- }
4849
- androidTemplate() {
4850
- var _a;
4851
- if (!((_a = this.wallet) == null ? void 0 : _a.play_store)) {
4852
- return null;
4853
- }
4854
- return x`<wui-list-item
4855
- variant="icon"
4856
- icon="playStore"
4857
- iconVariant="square"
4858
- @click=${this.onPlayStore.bind(this)}
4859
- chevron
4860
- >
4861
- <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
4862
- </wui-list-item>`;
4863
- }
4864
- homepageTemplate() {
4865
- var _a;
4866
- if (!((_a = this.wallet) == null ? void 0 : _a.homepage)) {
4867
- return null;
4868
- }
4869
- return x`
4870
- <wui-list-item
4871
- variant="icon"
4872
- icon="browser"
4873
- iconVariant="square-blue"
4874
- @click=${this.onHomePage.bind(this)}
4875
- chevron
4876
- >
4877
- <wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
4878
- </wui-list-item>
4879
- `;
4880
- }
4881
- onChromeStore() {
4882
- var _a;
4883
- if ((_a = this.wallet) == null ? void 0 : _a.chrome_store) {
4884
- CoreHelperUtil.openHref(this.wallet.chrome_store, "_blank");
4885
- }
4886
- }
4887
- onAppStore() {
4888
- var _a;
4889
- if ((_a = this.wallet) == null ? void 0 : _a.app_store) {
4890
- CoreHelperUtil.openHref(this.wallet.app_store, "_blank");
4891
- }
4892
- }
4893
- onPlayStore() {
4894
- var _a;
4895
- if ((_a = this.wallet) == null ? void 0 : _a.play_store) {
4896
- CoreHelperUtil.openHref(this.wallet.play_store, "_blank");
4897
- }
4898
- }
4899
- onHomePage() {
4900
- var _a;
4901
- if ((_a = this.wallet) == null ? void 0 : _a.homepage) {
4902
- CoreHelperUtil.openHref(this.wallet.homepage, "_blank");
4903
- }
4904
- }
4905
- };
4906
- W3mDownloadsView = __decorate([
4907
- customElement("w3m-downloads-view")
4908
- ], W3mDownloadsView);
4909
- export {
4910
- W3mAllWalletsView,
4911
- W3mConnectingWcBasicView,
4912
- W3mDownloadsView
4913
- };
4914
- //# sourceMappingURL=basic-CCVK4Xb-.js.map