@dodoex/wallet-web3 0.6.4 → 0.6.5

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 (215) hide show
  1. package/dist/PhArrowCircleDown-4a08ae8e.js +14 -0
  2. package/dist/PhArrowClockwise-401ea1c0.js +14 -0
  3. package/dist/PhArrowDown-789ae7d2.js +14 -0
  4. package/dist/PhArrowLeft-2e6d4940.js +14 -0
  5. package/dist/PhArrowRight-2928b0dc.js +14 -0
  6. package/dist/PhArrowSquareOut-17d61d08.js +14 -0
  7. package/dist/PhArrowUp-1cfcf9df.js +14 -0
  8. package/dist/PhArrowUpRight-552c41cb.js +14 -0
  9. package/dist/PhArrowsClockwise-92a70162.js +14 -0
  10. package/dist/PhArrowsDownUp-ce27c8a7.js +14 -0
  11. package/dist/PhArrowsLeftRight-ed549dc7.js +14 -0
  12. package/dist/PhBank-92a1a1df.js +14 -0
  13. package/dist/PhBrowser-495dc3ce.js +14 -0
  14. package/dist/PhCaretDown-610f20fc.js +14 -0
  15. package/dist/PhCaretLeft-2a86ee53.js +14 -0
  16. package/dist/PhCaretRight-f3057f58.js +14 -0
  17. package/dist/PhCaretUp-7b74b8cb.js +14 -0
  18. package/dist/PhCheck-c514f32c.js +14 -0
  19. package/dist/PhCircleHalf-3bfd24c9.js +14 -0
  20. package/dist/PhClock-29284ead.js +14 -0
  21. package/dist/PhCompass-101d3241.js +14 -0
  22. package/dist/PhCopy-d92dcd27.js +14 -0
  23. package/dist/PhCreditCard-d8d77fc2.js +14 -0
  24. package/dist/PhCurrencyDollar-6553df79.js +14 -0
  25. package/dist/PhDesktop-91653c8e.js +14 -0
  26. package/dist/PhDeviceMobile-0f3d8fa2.js +14 -0
  27. package/dist/PhDotsThree-67debca2.js +14 -0
  28. package/dist/PhEnvelope-f83faab2.js +14 -0
  29. package/dist/PhFunnelSimple-5058af43.js +14 -0
  30. package/dist/PhGlobe-c4653621.js +14 -0
  31. package/dist/PhIdentificationCard-848bf9a1.js +14 -0
  32. package/dist/PhImage-de71fc6b.js +14 -0
  33. package/dist/PhInfo-9614a766.js +14 -0
  34. package/dist/PhLightbulb-7d582ae7.js +14 -0
  35. package/dist/PhMagnifyingGlass-c926bd63.js +14 -0
  36. package/dist/PhPaperPlaneRight-76b25832.js +14 -0
  37. package/dist/PhPlus-767ddc55.js +14 -0
  38. package/dist/PhPower-95f188dd.js +14 -0
  39. package/dist/PhPuzzlePiece-f016afe5.js +14 -0
  40. package/dist/PhQrCode-e9b7ab93.js +14 -0
  41. package/dist/PhQuestion-ea0e639d.js +14 -0
  42. package/dist/PhQuestionMark-13d6338e.js +14 -0
  43. package/dist/PhSealCheck-45bb7b9c.js +14 -0
  44. package/dist/PhSignOut-6b91c59c.js +14 -0
  45. package/dist/PhSpinner-eb9b7ac1.js +14 -0
  46. package/dist/PhTrash-758cc3b3.js +14 -0
  47. package/dist/PhUser-0834861d.js +14 -0
  48. package/dist/PhVault-e4d6f9af.js +14 -0
  49. package/dist/PhWallet-5e257abe.js +14 -0
  50. package/dist/PhWarning-6af3740e.js +14 -0
  51. package/dist/PhWarningCircle-a78fd8e8.js +14 -0
  52. package/dist/PhX-60c46532.js +14 -0
  53. package/dist/{__tslib-83c7dd77.js → __tslib-6d6a586c.js} +1 -1
  54. package/dist/{alchemy-provider-5870b6fa-ef26112b.js → alchemy-provider-5870b6fa-a9fe5aa5.js} +1 -1
  55. package/dist/{alchemy-websocket-provider-213da986-2d698146.js → alchemy-websocket-provider-213da986-16164c2e.js} +1 -1
  56. package/dist/basic-77fe1b96.js +1320 -0
  57. package/dist/{blocto-05d7faf5.js → blocto-ab8ba330.js} +1 -1
  58. package/dist/{ccip-ea7099a8.js → ccip-e246f9cf.js} +1 -1
  59. package/dist/cjs/PhArrowCircleDown-df23d036.cjs +14 -0
  60. package/dist/cjs/PhArrowClockwise-440d23dc.cjs +14 -0
  61. package/dist/cjs/PhArrowDown-252590ed.cjs +14 -0
  62. package/dist/cjs/PhArrowLeft-d480faa4.cjs +14 -0
  63. package/dist/cjs/PhArrowRight-969dbdd8.cjs +14 -0
  64. package/dist/cjs/PhArrowSquareOut-eabfdecb.cjs +14 -0
  65. package/dist/cjs/PhArrowUp-66bd5f15.cjs +14 -0
  66. package/dist/cjs/PhArrowUpRight-6df3b31b.cjs +14 -0
  67. package/dist/cjs/PhArrowsClockwise-3a9d2dc6.cjs +14 -0
  68. package/dist/cjs/PhArrowsDownUp-47a7788f.cjs +14 -0
  69. package/dist/cjs/PhArrowsLeftRight-f90368dd.cjs +14 -0
  70. package/dist/cjs/PhBank-670a2708.cjs +14 -0
  71. package/dist/cjs/PhBrowser-b9c35fd1.cjs +14 -0
  72. package/dist/cjs/PhCaretDown-11a46455.cjs +14 -0
  73. package/dist/cjs/PhCaretLeft-04f11ca7.cjs +14 -0
  74. package/dist/cjs/PhCaretRight-391111c1.cjs +14 -0
  75. package/dist/cjs/PhCaretUp-b17dccf6.cjs +14 -0
  76. package/dist/cjs/PhCheck-08bf36b0.cjs +14 -0
  77. package/dist/cjs/PhCircleHalf-0a9eac35.cjs +14 -0
  78. package/dist/cjs/PhClock-cf1cc2cb.cjs +14 -0
  79. package/dist/cjs/PhCompass-e9671b30.cjs +14 -0
  80. package/dist/cjs/PhCopy-9132cbc5.cjs +14 -0
  81. package/dist/cjs/PhCreditCard-853e1556.cjs +14 -0
  82. package/dist/cjs/PhCurrencyDollar-34eea829.cjs +14 -0
  83. package/dist/cjs/PhDesktop-c02b883b.cjs +14 -0
  84. package/dist/cjs/PhDeviceMobile-93c2088c.cjs +14 -0
  85. package/dist/cjs/PhDotsThree-69beaba7.cjs +14 -0
  86. package/dist/cjs/PhEnvelope-86ee730e.cjs +14 -0
  87. package/dist/cjs/PhFunnelSimple-056c2f76.cjs +14 -0
  88. package/dist/cjs/PhGlobe-64c4ee8e.cjs +14 -0
  89. package/dist/cjs/PhIdentificationCard-ec7a98e0.cjs +14 -0
  90. package/dist/cjs/PhImage-07904cbb.cjs +14 -0
  91. package/dist/cjs/PhInfo-34eeeace.cjs +14 -0
  92. package/dist/cjs/PhLightbulb-39ebe854.cjs +14 -0
  93. package/dist/cjs/PhMagnifyingGlass-2fbe4400.cjs +14 -0
  94. package/dist/cjs/PhPaperPlaneRight-e06c210f.cjs +14 -0
  95. package/dist/cjs/PhPlus-03a04ed3.cjs +14 -0
  96. package/dist/cjs/PhPower-4cc2ecb8.cjs +14 -0
  97. package/dist/cjs/PhPuzzlePiece-035d561e.cjs +14 -0
  98. package/dist/cjs/PhQrCode-37e23b36.cjs +14 -0
  99. package/dist/cjs/PhQuestion-bfba435e.cjs +14 -0
  100. package/dist/cjs/PhQuestionMark-8ef38ecf.cjs +14 -0
  101. package/dist/cjs/PhSealCheck-5458de15.cjs +14 -0
  102. package/dist/cjs/PhSignOut-2d177ea1.cjs +14 -0
  103. package/dist/cjs/PhSpinner-e7c590df.cjs +14 -0
  104. package/dist/cjs/PhTrash-1920f5dc.cjs +14 -0
  105. package/dist/cjs/PhUser-84a1a685.cjs +14 -0
  106. package/dist/cjs/PhVault-1493c03f.cjs +14 -0
  107. package/dist/cjs/PhWallet-f0502f03.cjs +14 -0
  108. package/dist/cjs/PhWarning-1bf637ba.cjs +14 -0
  109. package/dist/cjs/PhWarningCircle-b1747661.cjs +14 -0
  110. package/dist/cjs/PhX-f864d86c.cjs +14 -0
  111. package/dist/cjs/{__tslib-12e41834.cjs → __tslib-a9f27ba6.cjs} +1 -1
  112. package/dist/cjs/{alchemy-provider-5870b6fa-683a7f2e.cjs → alchemy-provider-5870b6fa-bb1c607e.cjs} +1 -1
  113. package/dist/cjs/{alchemy-websocket-provider-213da986-5c9807c6.cjs → alchemy-websocket-provider-213da986-521569b5.cjs} +1 -1
  114. package/dist/cjs/basic-b777d2b1.cjs +1320 -0
  115. package/dist/cjs/{blocto-4db38a28.cjs → blocto-09e0d574.cjs} +1 -1
  116. package/dist/cjs/{ccip-82e883e4.cjs → ccip-6ebee1cf.cjs} +1 -1
  117. package/dist/cjs/core-78a709db.cjs +210 -0
  118. package/dist/cjs/{draggabilly-308ac2a9.cjs → draggabilly-76af6217.cjs} +1 -1
  119. package/dist/cjs/features-fa5c5622.cjs +1 -0
  120. package/dist/cjs/id-c0538166.cjs +1 -0
  121. package/dist/cjs/{index-2c097978.cjs → index-07e81389.cjs} +1 -1
  122. package/dist/cjs/{index-eae76bd0.cjs → index-093cef5a.cjs} +2 -2
  123. package/dist/cjs/{index-362be9fb.cjs → index-208df3f3.cjs} +1 -1
  124. package/dist/cjs/{index-c8fa7932.cjs → index-253e7cce.cjs} +1 -1
  125. package/dist/cjs/index-2e8e7a50.cjs +4 -0
  126. package/dist/cjs/index-395b933d.cjs +2 -0
  127. package/dist/cjs/{index-281d00df.cjs → index-54d7fc75.cjs} +1 -1
  128. package/dist/cjs/{index-3714da35.cjs → index-5d28acf4.cjs} +2 -2
  129. package/dist/cjs/{index-85a2526e.cjs → index-5dac528b.cjs} +7 -7
  130. package/dist/cjs/index-702e8f89.cjs +15 -0
  131. package/dist/cjs/{index-ceda42fb.cjs → index-823e17e6.cjs} +1 -1
  132. package/dist/cjs/{index-9325806f.cjs → index-916994aa.cjs} +1 -1
  133. package/dist/cjs/{index-00b0ab99.cjs → index-a2b665f4.cjs} +1 -1
  134. package/dist/cjs/{index-c6b53b3f.cjs → index-b099293c.cjs} +1 -1
  135. package/dist/cjs/index-d72ddbc1.cjs +17 -0
  136. package/dist/cjs/index-ef4ef0cc.cjs +1449 -0
  137. package/dist/cjs/index.cjs +1 -1
  138. package/dist/cjs/{interface-10b0ba33.cjs → interface-4947cfa6.cjs} +1 -1
  139. package/dist/cjs/{lib-typedarrays-012f607a.cjs → lib-typedarrays-a9baf142.cjs} +1 -1
  140. package/dist/cjs/native-55bb141d.cjs +1 -0
  141. package/dist/cjs/{portis-2144bb98.cjs → portis-08d9d731.cjs} +1 -1
  142. package/dist/cjs/property-29e6f732.cjs +29 -0
  143. package/dist/cjs/providers/connector/safeGnosis/query.d.ts +2 -1
  144. package/dist/cjs/providers/connector/types.d.ts +1 -1
  145. package/dist/cjs/providers/wallets/index.d.ts +1 -0
  146. package/dist/cjs/rainbow-6e84bcfa.cjs +1 -0
  147. package/dist/cjs/sha224-b46bc3e6.cjs +1 -0
  148. package/dist/cjs/sha256-ccd47519.cjs +1 -0
  149. package/dist/cjs/{typed-data-e878587d.cjs → typed-data-5176b792.cjs} +1 -1
  150. package/dist/cjs/uAuth-b29d2670.cjs +1 -0
  151. package/dist/cjs/w3m-modal-70bcf6d8.cjs +2380 -0
  152. package/dist/cjs/walletConnect-20d477a9.cjs +1 -0
  153. package/dist/cjs/{walletLink-8e49b6d5.cjs → walletLink-08b8da20.cjs} +2 -2
  154. package/dist/core-4d7ad6f2.js +210 -0
  155. package/dist/{draggabilly-c6f65920.js → draggabilly-daf3b444.js} +1 -1
  156. package/dist/features-d8d1c9ce.js +1 -0
  157. package/dist/id-d4d22b29.js +1 -0
  158. package/dist/{index-227927b5.js → index-09298bd0.js} +7 -7
  159. package/dist/{index-f360d801.js → index-244a8189.js} +1 -1
  160. package/dist/{index-f4727f94.js → index-2ad0fb2a.js} +1 -1
  161. package/dist/index-35d87b79.js +17 -0
  162. package/dist/{index-eb473b84.js → index-587ff998.js} +1 -1
  163. package/dist/{index-a6b10e09.js → index-750a7dfe.js} +1 -1
  164. package/dist/{index-abb4eaf1.js → index-8bd12de1.js} +1 -1
  165. package/dist/{index-1e0435b6.js → index-938686fb.js} +1 -1
  166. package/dist/{index-1db47472.js → index-9d7fee1e.js} +2 -2
  167. package/dist/{index-af823ebd.js → index-aa744ca0.js} +1 -1
  168. package/dist/{index-cfa6ef57.js → index-b7d25e8a.js} +2 -2
  169. package/dist/index-bb1a0019.js +15 -0
  170. package/dist/index-c5ca8a4e.js +4 -0
  171. package/dist/{index-1cf97dd7.js → index-cddbc8e8.js} +1 -1
  172. package/dist/index-f095c09e.js +2 -0
  173. package/dist/index-ffdf981b.js +1449 -0
  174. package/dist/index.js +1 -1
  175. package/dist/{interface-ec064b7d.js → interface-0c535796.js} +1 -1
  176. package/dist/{lib-typedarrays-ecebfb2c.js → lib-typedarrays-979d2723.js} +1 -1
  177. package/dist/native-029c50f7.js +1 -0
  178. package/dist/{portis-e3d3d420.js → portis-9602ac9f.js} +1 -1
  179. package/dist/property-8eb37909.js +35 -0
  180. package/dist/providers/connector/safeGnosis/query.d.ts +2 -1
  181. package/dist/providers/connector/types.d.ts +1 -1
  182. package/dist/providers/wallets/index.d.ts +1 -0
  183. package/dist/rainbow-ccab7a95.js +1 -0
  184. package/dist/sha224-fe98e1bf.js +1 -0
  185. package/dist/sha256-5a24dfd5.js +1 -0
  186. package/dist/{typed-data-0f706378.js → typed-data-3a3d44dc.js} +1 -1
  187. package/dist/uAuth-27f5728d.js +1 -0
  188. package/dist/w3m-modal-49add722.js +2380 -0
  189. package/dist/walletConnect-a541881e.js +1 -0
  190. package/dist/{walletLink-68441960.js → walletLink-67264328.js} +2 -2
  191. package/package.json +3 -3
  192. package/dist/_commonjs-dynamic-modules-7cfc9805.js +0 -1
  193. package/dist/cjs/_commonjs-dynamic-modules-f09a98c7.cjs +0 -1
  194. package/dist/cjs/id-ea22b6ce.cjs +0 -1
  195. package/dist/cjs/index-35edc6a0.cjs +0 -60
  196. package/dist/cjs/index-8a25465c.cjs +0 -6
  197. package/dist/cjs/index-9f2a69d5.cjs +0 -1
  198. package/dist/cjs/index-fdda1836.cjs +0 -17
  199. package/dist/cjs/index.es-80622213.cjs +0 -9
  200. package/dist/cjs/rainbow-18d05876.cjs +0 -1
  201. package/dist/cjs/sha224-1c092a15.cjs +0 -1
  202. package/dist/cjs/sha256-9e1680c1.cjs +0 -1
  203. package/dist/cjs/uAuth-b89f7081.cjs +0 -1
  204. package/dist/cjs/walletConnect-b79e1e97.cjs +0 -1
  205. package/dist/id-397f0303.js +0 -1
  206. package/dist/index-02e42cd2.js +0 -17
  207. package/dist/index-65d96278.js +0 -60
  208. package/dist/index-89717995.js +0 -6
  209. package/dist/index-f08d6a6b.js +0 -1
  210. package/dist/index.es-7adbb6c0.js +0 -9
  211. package/dist/rainbow-73b82cd7.js +0 -1
  212. package/dist/sha224-51e5e6a9.js +0 -1
  213. package/dist/sha256-549e482b.js +0 -1
  214. package/dist/uAuth-ce19d386.js +0 -1
  215. package/dist/walletConnect-b0b635de.js +0 -1
@@ -0,0 +1,1320 @@
1
+ import{i as e,C as t,A as i,a as n,b as o,c as r,d as s,E as a,R as l,O as c,e as d,f as u,g as h,h as p,H as g,j as f,r as w,k as m,T as b,S as y,M as v,l as x,m as $,n as C,o as k,w as E,p as R,q as T,s as I,t as P,u as S,W as A}from"./core-4d7ad6f2.js";import{n as L,r as j,c as O,o as B,U as N,i as _,t as M,e as W,a as z}from"./index-ffdf981b.js";import"events";import"./index-c5ca8a4e.js";import"./__tslib-6d6a586c.js";import"./index-09298bd0.js";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/address";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"@ethersproject/constants";import"@ethersproject/transactions";var D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let U=class extends e{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=t.state.connectors,this.count=i.state.count,this.filteredCount=i.state.filteredWallets.length,this.isFetchingRecommendedWallets=i.state.isFetchingRecommendedWallets,this.unsubscribe.push(t.subscribeKey("connectors",(e=>this.connectors=e)),i.subscribeKey("count",(e=>this.count=e)),i.subscribeKey("filteredWallets",(e=>this.filteredCount=e.length)),i.subscribeKey("isFetchingRecommendedWallets",(e=>this.isFetchingRecommendedWallets=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.find((e=>"walletConnect"===e.id)),{allWallets:t}=c.state;if(!e||"HIDE"===t)return null;if("ONLY_MOBILE"===t&&!n.isMobile())return null;const a=i.state.featured.length,l=this.count+a,d=l<10?l:10*Math.floor(l/10),u=this.filteredCount>0?this.filteredCount:d;let h=`${u}`;this.filteredCount>0?h=`${this.filteredCount}`:u<l&&(h=`${u}+`);const p=o.hasAnyConnection(r.CONNECTOR_ID.WALLET_CONNECT);return s`
2
+ <wui-list-wallet
3
+ name="Search Wallet"
4
+ walletIcon="search"
5
+ showAllWallets
6
+ @click=${this.onAllWallets.bind(this)}
7
+ tagLabel=${h}
8
+ tagVariant="info"
9
+ data-testid="all-wallets"
10
+ tabIdx=${B(this.tabIdx)}
11
+ .loading=${this.isFetchingRecommendedWallets}
12
+ ?disabled=${p}
13
+ size="sm"
14
+ ></wui-list-wallet>
15
+ `}onAllWallets(){a.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),l.push("AllWallets",{redirectView:l.state.data?.redirectView})}};D([L()],U.prototype,"tabIdx",void 0),D([j()],U.prototype,"connectors",void 0),D([j()],U.prototype,"count",void 0),D([j()],U.prototype,"filteredCount",void 0),D([j()],U.prototype,"isFetchingRecommendedWallets",void 0),U=D([O("w3m-all-wallets-widget")],U);var F=d`
16
+ :host {
17
+ margin-top: ${({spacing:e})=>e[1]};
18
+ }
19
+ wui-separator {
20
+ margin: ${({spacing:e})=>e[3]} calc(${({spacing:e})=>e[3]} * -1)
21
+ ${({spacing:e})=>e[2]} calc(${({spacing:e})=>e[3]} * -1);
22
+ width: calc(100% + ${({spacing:e})=>e[3]} * 2);
23
+ }
24
+ `,q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let V=class extends e{constructor(){super(),this.unsubscribe=[],this.explorerWallets=i.state.explorerWallets,this.connections=o.state.connections,this.connectorImages=u.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(o.subscribeKey("connections",(e=>this.connections=e)),u.subscribeKey("connectorImages",(e=>this.connectorImages=e)),i.subscribeKey("explorerFilteredWallets",(e=>{this.explorerWallets=e?.length?e:i.state.explorerWallets})),i.subscribeKey("explorerWallets",(e=>{this.explorerWallets?.length||(this.explorerWallets=e)}))),n.isTelegram()&&n.isIos()&&(this.loadingTelegram=!o.state.wcUri,this.unsubscribe.push(o.subscribeKey("wcUri",(e=>this.loadingTelegram=!e))))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return s`
25
+ <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex>
26
+ `}connectorListTemplate(){return h.connectorList().map(((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t)))}getConnectorNamespaces(e){return"walletConnect"===e.subtype?[]:"multiChain"===e.subtype?e.connector.connectors?.map((e=>e.chain))||[]:[e.connector.chain]}renderConnector(e,t){const i=e.connector,n=p.getConnectorImage(i)||this.connectorImages[i?.imageId??""],a=(this.connections.get(i.chain)??[]).some((e=>g.isLowerCaseMatch(e.connectorId,i.id)));let l,c;"walletConnect"===e.subtype?(l="qr code",c="accent"):"injected"===e.subtype||"announced"===e.subtype?(l=a?"connected":"installed",c=a?"info":"success"):(l=void 0,c=void 0);const d=o.hasAnyConnection(r.CONNECTOR_ID.WALLET_CONNECT),u=("walletConnect"===e.subtype||"external"===e.subtype)&&d;return s`
27
+ <w3m-list-wallet
28
+ displayIndex=${t}
29
+ imageSrc=${B(n)}
30
+ .installed=${!0}
31
+ name=${i.name??"Unknown"}
32
+ .tagVariant=${c}
33
+ tagLabel=${B(l)}
34
+ data-testid=${`wallet-selector-${i.id.toLowerCase()}`}
35
+ size="sm"
36
+ @click=${()=>this.onClickConnector(e)}
37
+ tabIdx=${B(this.tabIdx)}
38
+ ?disabled=${u}
39
+ rdnsId=${B(i.explorerWallet?.rdns||void 0)}
40
+ walletRank=${B(i.explorerWallet?.order)}
41
+ .namespaces=${this.getConnectorNamespaces(e)}
42
+ >
43
+ </w3m-list-wallet>
44
+ `}onClickConnector(e){const i=l.state.data?.redirectView;return"walletConnect"===e.subtype?(t.setActiveConnector(e.connector),void(n.isMobile()?l.push("AllWallets"):l.push("ConnectingWalletConnect",{redirectView:i}))):"multiChain"===e.subtype?(t.setActiveConnector(e.connector),void l.push("ConnectingMultiChain",{redirectView:i})):"injected"===e.subtype?(t.setActiveConnector(e.connector),void l.push("ConnectingExternal",{connector:e.connector,redirectView:i,wallet:e.connector.explorerWallet})):"announced"===e.subtype?"walletConnect"===e.connector.id?void(n.isMobile()?l.push("AllWallets"):l.push("ConnectingWalletConnect",{redirectView:i})):void l.push("ConnectingExternal",{connector:e.connector,redirectView:i,wallet:e.connector.explorerWallet}):void l.push("ConnectingExternal",{connector:e.connector,redirectView:i})}renderWallet(e,t){const i=e.wallet,n=p.getWalletImage(i),a=o.hasAnyConnection(r.CONNECTOR_ID.WALLET_CONNECT),l=this.loadingTelegram,c="recent"===e.subtype?"recent":void 0,d="recent"===e.subtype?"info":void 0;return s`
45
+ <w3m-list-wallet
46
+ displayIndex=${t}
47
+ imageSrc=${B(n)}
48
+ name=${i.name??"Unknown"}
49
+ @click=${()=>this.onClickWallet(e)}
50
+ size="sm"
51
+ data-testid=${`wallet-selector-${i.id}`}
52
+ tabIdx=${B(this.tabIdx)}
53
+ ?loading=${l}
54
+ ?disabled=${a}
55
+ rdnsId=${B(i.rdns||void 0)}
56
+ walletRank=${B(i.order)}
57
+ tagLabel=${B(c)}
58
+ .tagVariant=${d}
59
+ >
60
+ </w3m-list-wallet>
61
+ `}onClickWallet(e){const i=l.state.data?.redirectView,n=f.state.activeChain;if("featured"===e.subtype)return void t.selectWalletConnector(e.wallet);if("recent"===e.subtype){if(this.loadingTelegram)return;return void t.selectWalletConnector(e.wallet)}if("custom"===e.subtype){if(this.loadingTelegram)return;return void l.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:i})}if(this.loadingTelegram)return;const o=n?t.getConnector({id:e.wallet.id,namespace:n}):void 0;o?l.push("ConnectingExternal",{connector:o,redirectView:i}):l.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:i})}};V.styles=F,q([L({type:Number})],V.prototype,"tabIdx",void 0),q([j()],V.prototype,"explorerWallets",void 0),q([j()],V.prototype,"connections",void 0),q([j()],V.prototype,"connectorImages",void 0),q([j()],V.prototype,"loadingTelegram",void 0),V=q([O("w3m-connector-list")],V);var H=d`
62
+ :host {
63
+ flex: 1;
64
+ height: 100%;
65
+ }
66
+
67
+ button {
68
+ width: 100%;
69
+ height: 100%;
70
+ display: inline-flex;
71
+ align-items: center;
72
+ padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]};
73
+ column-gap: ${({spacing:e})=>e[1]};
74
+ color: ${({tokens:e})=>e.theme.textSecondary};
75
+ border-radius: ${({borderRadius:e})=>e[20]};
76
+ background-color: transparent;
77
+ transition: background-color ${({durations:e})=>e.lg}
78
+ ${({easings:e})=>e["ease-out-power-2"]};
79
+ will-change: background-color;
80
+ }
81
+
82
+ /* -- Hover & Active states ----------------------------------------------------------- */
83
+ button[data-active='true'] {
84
+ color: ${({tokens:e})=>e.theme.textPrimary};
85
+ background-color: ${({tokens:e})=>e.theme.foregroundTertiary};
86
+ }
87
+
88
+ button:hover:enabled:not([data-active='true']),
89
+ button:active:enabled:not([data-active='true']) {
90
+ wui-text,
91
+ wui-icon {
92
+ color: ${({tokens:e})=>e.theme.textPrimary};
93
+ }
94
+ }
95
+ `,K=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Y={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},J={lg:"md",md:"sm",sm:"sm"};let Q=class extends e{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return s`
96
+ <button data-active=${this.active}>
97
+ ${this.icon?s`<wui-icon size=${J[this.size]} name=${this.icon}></wui-icon>`:""}
98
+ <wui-text variant=${Y[this.size]}> ${this.label} </wui-text>
99
+ </button>
100
+ `}};Q.styles=[w,m,H],K([L()],Q.prototype,"icon",void 0),K([L()],Q.prototype,"size",void 0),K([L()],Q.prototype,"label",void 0),K([L({type:Boolean})],Q.prototype,"active",void 0),Q=K([O("wui-tab-item")],Q);var G=d`
101
+ :host {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
105
+ border-radius: ${({borderRadius:e})=>e[32]};
106
+ padding: ${({spacing:e})=>e["01"]};
107
+ box-sizing: border-box;
108
+ }
109
+
110
+ :host([data-size='sm']) {
111
+ height: 26px;
112
+ }
113
+
114
+ :host([data-size='md']) {
115
+ height: 36px;
116
+ }
117
+ `,X=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Z=class extends e{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map(((e,t)=>{const i=t===this.activeTab;return s`
118
+ <wui-tab-item
119
+ @click=${()=>this.onTabClick(t)}
120
+ icon=${e.icon}
121
+ size=${this.size}
122
+ label=${e.label}
123
+ ?active=${i}
124
+ data-active=${i}
125
+ data-testid="tab-${e.label?.toLowerCase()}"
126
+ ></wui-tab-item>
127
+ `}))}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};Z.styles=[w,m,G],X([L({type:Array})],Z.prototype,"tabs",void 0),X([L()],Z.prototype,"onTabChange",void 0),X([L()],Z.prototype,"size",void 0),X([j()],Z.prototype,"activeTab",void 0),Z=X([O("wui-tabs")],Z);var ee=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let te=class extends e{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.generateTabs();return s`
128
+ <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}>
129
+ <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
130
+ </wui-flex>
131
+ `}generateTabs(){const e=this.platforms.map((e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"}));return this.platformTabs=e.map((({platform:e})=>e)),e}onTabChange(e){const t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};ee([L({type:Array})],te.prototype,"platforms",void 0),ee([L()],te.prototype,"onSelectPlatfrom",void 0),te=ee([O("w3m-connecting-header")],te);var ie=d`
132
+ :host {
133
+ display: block;
134
+ width: 100px;
135
+ height: 100px;
136
+ }
137
+
138
+ svg {
139
+ width: 100px;
140
+ height: 100px;
141
+ }
142
+
143
+ rect {
144
+ fill: none;
145
+ stroke: ${e=>e.colors.accent100};
146
+ stroke-width: 3px;
147
+ stroke-linecap: round;
148
+ animation: dash 1s linear infinite;
149
+ }
150
+
151
+ @keyframes dash {
152
+ to {
153
+ stroke-dashoffset: 0px;
154
+ }
155
+ }
156
+ `,ne=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let oe=class extends e{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,t=36-e;return s`
157
+ <svg viewBox="0 0 110 110" width="110" height="110">
158
+ <rect
159
+ x="2"
160
+ y="2"
161
+ width="106"
162
+ height="106"
163
+ rx=${e}
164
+ stroke-dasharray="${116+t} ${245+t}"
165
+ stroke-dashoffset=${360+1.75*t}
166
+ />
167
+ </svg>
168
+ `}};oe.styles=[w,ie],ne([L({type:Number})],oe.prototype,"radius",void 0),oe=ne([O("wui-loading-thumbnail")],oe);var re=d`
169
+ wui-flex {
170
+ width: 100%;
171
+ height: 52px;
172
+ box-sizing: border-box;
173
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
174
+ border-radius: ${({borderRadius:e})=>e[5]};
175
+ padding-left: ${({spacing:e})=>e[3]};
176
+ padding-right: ${({spacing:e})=>e[3]};
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: space-between;
180
+ gap: ${({spacing:e})=>e[6]};
181
+ }
182
+
183
+ wui-text {
184
+ color: ${({tokens:e})=>e.theme.textSecondary};
185
+ }
186
+
187
+ wui-icon {
188
+ width: 12px;
189
+ height: 12px;
190
+ }
191
+ `,se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ae=class extends e{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return s`
192
+ <wui-flex justifyContent="space-between" alignItems="center">
193
+ <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text>
194
+ <wui-button variant="accent-secondary" size="sm">
195
+ ${this.buttonLabel}
196
+ <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon>
197
+ </wui-button>
198
+ </wui-flex>
199
+ `}};ae.styles=[w,m,re],se([L({type:Boolean})],ae.prototype,"disabled",void 0),se([L()],ae.prototype,"label",void 0),se([L()],ae.prototype,"buttonLabel",void 0),ae=se([O("wui-cta-button")],ae);var le=d`
200
+ :host {
201
+ display: block;
202
+ padding: 0 ${({spacing:e})=>e[5]} ${({spacing:e})=>e[5]};
203
+ }
204
+ `,ce=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let de=class extends e{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:i,chrome_store:o,homepage:r}=this.wallet,a=n.isMobile(),c=n.isIos(),d=n.isAndroid(),u=[t,i,r,o].filter(Boolean).length>1,h=N.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return u&&!a?s`
205
+ <wui-cta-button
206
+ label=${`Don't have ${h}?`}
207
+ buttonLabel="Get"
208
+ @click=${()=>l.push("Downloads",{wallet:this.wallet})}
209
+ ></wui-cta-button>
210
+ `:!u&&r?s`
211
+ <wui-cta-button
212
+ label=${`Don't have ${h}?`}
213
+ buttonLabel="Get"
214
+ @click=${this.onHomePage.bind(this)}
215
+ ></wui-cta-button>
216
+ `:t&&c?s`
217
+ <wui-cta-button
218
+ label=${`Don't have ${h}?`}
219
+ buttonLabel="Get"
220
+ @click=${this.onAppStore.bind(this)}
221
+ ></wui-cta-button>
222
+ `:i&&d?s`
223
+ <wui-cta-button
224
+ label=${`Don't have ${h}?`}
225
+ buttonLabel="Get"
226
+ @click=${this.onPlayStore.bind(this)}
227
+ ></wui-cta-button>
228
+ `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&n.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&n.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&n.openHref(this.wallet.homepage,"_blank")}};de.styles=[le],ce([L({type:Object})],de.prototype,"wallet",void 0),de=ce([O("w3m-mobile-download-links")],de);var ue=d`
229
+ @keyframes shake {
230
+ 0% {
231
+ transform: translateX(0);
232
+ }
233
+ 25% {
234
+ transform: translateX(3px);
235
+ }
236
+ 50% {
237
+ transform: translateX(-3px);
238
+ }
239
+ 75% {
240
+ transform: translateX(3px);
241
+ }
242
+ 100% {
243
+ transform: translateX(0);
244
+ }
245
+ }
246
+
247
+ wui-flex:first-child:not(:only-child) {
248
+ position: relative;
249
+ }
250
+
251
+ wui-wallet-image {
252
+ width: 56px;
253
+ height: 56px;
254
+ }
255
+
256
+ wui-loading-thumbnail {
257
+ position: absolute;
258
+ }
259
+
260
+ wui-icon-box {
261
+ position: absolute;
262
+ right: calc(${({spacing:e})=>e[1]} * -1);
263
+ bottom: calc(${({spacing:e})=>e[1]} * -1);
264
+ opacity: 0;
265
+ transform: scale(0.5);
266
+ transition-property: opacity, transform;
267
+ transition-duration: ${({durations:e})=>e.lg};
268
+ transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
269
+ will-change: opacity, transform;
270
+ }
271
+
272
+ wui-text[align='center'] {
273
+ width: 100%;
274
+ padding: 0px ${({spacing:e})=>e[4]};
275
+ }
276
+
277
+ [data-error='true'] wui-icon-box {
278
+ opacity: 1;
279
+ transform: scale(1);
280
+ }
281
+
282
+ [data-error='true'] > wui-flex:first-child {
283
+ animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both;
284
+ }
285
+
286
+ [data-retry='false'] wui-link {
287
+ display: none;
288
+ }
289
+
290
+ [data-retry='true'] wui-link {
291
+ display: block;
292
+ opacity: 1;
293
+ }
294
+
295
+ w3m-mobile-download-links {
296
+ padding: 0px;
297
+ width: 100%;
298
+ }
299
+ `,he=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class pe extends e{constructor(){super(),this.wallet=l.state.data?.wallet,this.connector=l.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=p.getConnectorImage(this.connector)??p.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=o.state.wcUri,this.error=o.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(o.subscribeKey("wcUri",(e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())})),o.subscribeKey("wcError",(e=>this.error=e))),(n.isTelegram()||n.isSafari())&&n.isIos()&&o.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),o.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),s`
300
+ <wui-flex
301
+ data-error=${B(this.error)}
302
+ data-retry=${this.showRetry}
303
+ flexDirection="column"
304
+ alignItems="center"
305
+ .padding=${["10","5","5","5"]}
306
+ gap="6"
307
+ >
308
+ <wui-flex gap="2" justifyContent="center" alignItems="center">
309
+ <wui-wallet-image size="lg" imageSrc=${B(this.imageSrc)}></wui-wallet-image>
310
+
311
+ ${this.error?null:this.loaderTemplate()}
312
+
313
+ <wui-icon-box
314
+ color="error"
315
+ icon="close"
316
+ size="sm"
317
+ border
318
+ borderColor="wui-color-bg-125"
319
+ ></wui-icon-box>
320
+ </wui-flex>
321
+
322
+ <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex
323
+ flexDirection="column"
324
+ alignItems="center"
325
+ gap="2"
326
+ .padding=${["2","0","0","0"]}
327
+ >
328
+ <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}>
329
+ ${t}
330
+ </wui-text>
331
+ <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text>
332
+ </wui-flex>
333
+
334
+ ${this.secondaryBtnLabel?s`
335
+ <wui-button
336
+ variant="neutral-secondary"
337
+ size="md"
338
+ ?disabled=${this.isRetrying||this.isLoading}
339
+ @click=${this.onTryAgain.bind(this)}
340
+ data-testid="w3m-connecting-widget-secondary-button"
341
+ >
342
+ <wui-icon
343
+ color="inherit"
344
+ slot="iconLeft"
345
+ name=${this.secondaryBtnIcon}
346
+ ></wui-icon>
347
+ ${this.secondaryBtnLabel}
348
+ </wui-button>
349
+ `:null}
350
+ </wui-flex>
351
+
352
+ ${this.isWalletConnect?s`
353
+ <wui-flex .padding=${["0","5","5","5"]} justifyContent="center">
354
+ <wui-link
355
+ @click=${this.onCopyUri}
356
+ variant="secondary"
357
+ icon="copy"
358
+ data-testid="wui-link-copy"
359
+ >
360
+ Copy link
361
+ </wui-link>
362
+ </wui-flex>
363
+ `:null}
364
+
365
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex>
366
+ </wui-flex>
367
+ `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;const e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){o.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){const e=b.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return s`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(n.copyToClopboard(this.uri),y.showSuccess("Link copied"))}catch{y.showError("Failed to copy")}}}pe.styles=ue,he([j()],pe.prototype,"isRetrying",void 0),he([j()],pe.prototype,"uri",void 0),he([j()],pe.prototype,"error",void 0),he([j()],pe.prototype,"ready",void 0),he([j()],pe.prototype,"showRetry",void 0),he([j()],pe.prototype,"label",void 0),he([j()],pe.prototype,"secondaryBtnLabel",void 0),he([j()],pe.prototype,"secondaryLabel",void 0),he([j()],pe.prototype,"isLoading",void 0),he([L({type:Boolean})],pe.prototype,"isMobile",void 0),he([L()],pe.prototype,"onRetry",void 0);var ge=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let fe=class extends pe{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:l.state.view}})}async onConnectProxy(){try{this.error=!1;const{connectors:e}=t.state,i=e.find((e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name));if(!i)throw new Error("w3m-connecting-wc-browser: No connector found");await o.connectExternal(i,i.chain),v.close()}catch(e){e instanceof x&&e.originalName===$.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?a.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):a.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};fe=ge([O("w3m-connecting-wc-browser")],fe);var we=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let me=class extends pe{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:l.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.formatNativeUrl(e,this.uri);o.setWcLinking({name:t,href:r}),o.setRecentWallet(this.wallet),n.openHref(i,"_blank")}catch{this.error=!0}}};me=we([O("w3m-connecting-wc-desktop")],me);var be=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ye=class extends pe{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=c.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{C.onConnectMobile(this.wallet)},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=k.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(o.subscribeKey("wcUri",(()=>{this.onHandleURI()}))),a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:l.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){o.setWcError(!1),this.onConnect?.()}};be([j()],ye.prototype,"redirectDeeplink",void 0),be([j()],ye.prototype,"redirectUniversalLink",void 0),be([j()],ye.prototype,"target",void 0),be([j()],ye.prototype,"preferUniversalLinks",void 0),be([j()],ye.prototype,"isLoading",void 0),ye=be([O("w3m-connecting-wc-mobile")],ye);var ve={},xe={},$e={};let Ce;const ke=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];$e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},$e.getSymbolTotalCodewords=function(e){return ke[e]},$e.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},$e.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');Ce=e},$e.isKanjiModeEnabled=function(){return void 0!==Ce},$e.toSJIS=function(e){return Ce(e)};var Ee,Re={};function Te(){this.buffer=[],this.length=0}(Ee=Re).L={bit:1},Ee.M={bit:0},Ee.Q={bit:3},Ee.H={bit:2},Ee.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},Ee.from=function(e,t){if(Ee.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return Ee.L;case"m":case"medium":return Ee.M;case"q":case"quartile":return Ee.Q;case"h":case"high":return Ee.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}},Te.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let i=0;i<t;i++)this.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Ie=Te;function Pe(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Pe.prototype.set=function(e,t,i,n){const o=e*this.size+t;this.data[o]=i,n&&(this.reservedBit[o]=!0)},Pe.prototype.get=function(e,t){return this.data[e*this.size+t]},Pe.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},Pe.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Se=Pe,Ae={};!function(e){const t=$e.getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const i=Math.floor(e/7)+2,n=t(e),o=145===n?26:2*Math.ceil((n-13)/(2*i-2)),r=[n-7];for(let e=1;e<i-1;e++)r[e]=r[e-1]-o;return r.push(6),r.reverse()},e.getPositions=function(t){const i=[],n=e.getRowColCoords(t),o=n.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)0===e&&0===t||0===e&&t===o-1||e===o-1&&0===t||i.push([n[e],n[t]]);return i}}(Ae);var Le={};const je=$e.getSymbolSize;Le.getPositions=function(e){const t=je(e);return[[0,0],[t-7,0],[0,t-7]]};var Oe={};!function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,i=3,n=40,o=10;function r(t,i,n){switch(t){case e.Patterns.PATTERN000:return(i+n)%2==0;case e.Patterns.PATTERN001:return i%2==0;case e.Patterns.PATTERN010:return n%3==0;case e.Patterns.PATTERN011:return(i+n)%3==0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(n/3))%2==0;case e.Patterns.PATTERN101:return i*n%2+i*n%3==0;case e.Patterns.PATTERN110:return(i*n%2+i*n%3)%2==0;case e.Patterns.PATTERN111:return(i*n%3+(i+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const i=e.size;let n=0,o=0,r=0,s=null,a=null;for(let l=0;l<i;l++){o=r=0,s=a=null;for(let c=0;c<i;c++){let i=e.get(l,c);i===s?o++:(o>=5&&(n+=t+(o-5)),s=i,o=1),i=e.get(c,l),i===a?r++:(r>=5&&(n+=t+(r-5)),a=i,r=1)}o>=5&&(n+=t+(o-5)),r>=5&&(n+=t+(r-5))}return n},e.getPenaltyN2=function(e){const t=e.size;let n=0;for(let i=0;i<t-1;i++)for(let o=0;o<t-1;o++){const t=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);4!==t&&0!==t||n++}return n*i},e.getPenaltyN3=function(e){const t=e.size;let i=0,o=0,r=0;for(let n=0;n<t;n++){o=r=0;for(let s=0;s<t;s++)o=o<<1&2047|e.get(n,s),s>=10&&(1488===o||93===o)&&i++,r=r<<1&2047|e.get(s,n),s>=10&&(1488===r||93===r)&&i++}return i*n},e.getPenaltyN4=function(e){let t=0;const i=e.data.length;for(let n=0;n<i;n++)t+=e.data[n];return Math.abs(Math.ceil(100*t/i/5)-10)*o},e.applyMask=function(e,t){const i=t.size;for(let n=0;n<i;n++)for(let o=0;o<i;o++)t.isReserved(o,n)||t.xor(o,n,r(e,o,n))},e.getBestMask=function(t,i){const n=Object.keys(e.Patterns).length;let o=0,r=1/0;for(let s=0;s<n;s++){i(s),e.applyMask(s,t);const n=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(s,t),n<r&&(r=n,o=s)}return o}}(Oe);var Be={};const Ne=Re,_e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Me=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Be.getBlocksCount=function(e,t){switch(t){case Ne.L:return _e[4*(e-1)+0];case Ne.M:return _e[4*(e-1)+1];case Ne.Q:return _e[4*(e-1)+2];case Ne.H:return _e[4*(e-1)+3];default:return}},Be.getTotalCodewordsCount=function(e,t){switch(t){case Ne.L:return Me[4*(e-1)+0];case Ne.M:return Me[4*(e-1)+1];case Ne.Q:return Me[4*(e-1)+2];case Ne.H:return Me[4*(e-1)+3];default:return}};var We={},ze={};const De=new Uint8Array(512),Ue=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)De[t]=e,Ue[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)De[e]=De[e-255]}(),ze.log=function(e){if(e<1)throw new Error("log("+e+")");return Ue[e]},ze.exp=function(e){return De[e]},ze.mul=function(e,t){return 0===e||0===t?0:De[Ue[e]+Ue[t]]},function(e){const t=ze;e.mul=function(e,i){const n=new Uint8Array(e.length+i.length-1);for(let o=0;o<e.length;o++)for(let r=0;r<i.length;r++)n[o+r]^=t.mul(e[o],i[r]);return n},e.mod=function(e,i){let n=new Uint8Array(e);for(;n.length-i.length>=0;){const e=n[0];for(let o=0;o<i.length;o++)n[o]^=t.mul(i[o],e);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=e.mul(n,new Uint8Array([1,t.exp(o)]));return n}}(We);const Fe=We;function qe(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}qe.prototype.initialize=function(e){this.degree=e,this.genPoly=Fe.generateECPolynomial(this.degree)},qe.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const i=Fe.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(i,n),e}return i};var Ve=qe,He={},Ke={},Ye={isValid:function(e){return!isNaN(e)&&e>=1&&e<=40}},Je={};const Qe="[0-9]+";let Ge="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ge=Ge.replace(/u/g,"\\u");const Xe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ge+")(?:.|[\r\n]))+";Je.KANJI=new RegExp(Ge,"g"),Je.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Je.BYTE=new RegExp(Xe,"g"),Je.NUMERIC=new RegExp(Qe,"g"),Je.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const Ze=new RegExp("^"+Ge+"$"),et=new RegExp("^"+Qe+"$"),tt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Je.testKanji=function(e){return Ze.test(e)},Je.testNumeric=function(e){return et.test(e)},Je.testAlphanumeric=function(e){return tt.test(e)},function(e){const t=Ye,i=Je;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,i){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?e.ccBits[0]:i<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,i){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return i}}}(Ke),function(e){const t=$e,i=Be,n=Re,o=Ke,r=Ye,s=t.getBCHDigit(7973);function a(e,t){return o.getCharCountIndicator(e,t)+4}function l(e,t){let i=0;return e.forEach((function(e){const n=a(e.mode,t);i+=n+e.getBitsLength()})),i}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,n,s){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===s&&(s=o.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,n));if(s===o.MIXED)return l;const c=l-a(s,e);switch(s){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(t,i){let r;const s=n.from(i,n.M);if(Array.isArray(t)){if(t.length>1)return function(t,i){for(let n=1;n<=40;n++)if(l(t,n)<=e.getCapacity(n,i,o.MIXED))return n}(t,s);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,i,n){for(let o=1;o<=40;o++)if(i<=e.getCapacity(o,n,t))return o}(r.mode,r.getLength(),s)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let i=e<<12;for(;t.getBCHDigit(i)-s>=0;)i^=7973<<t.getBCHDigit(i)-s;return e<<12|i}}(He);var it={};const nt=$e,ot=nt.getBCHDigit(1335);it.getEncodedBits=function(e,t){const i=e.bit<<3|t;let n=i<<10;for(;nt.getBCHDigit(n)-ot>=0;)n^=1335<<nt.getBCHDigit(n)-ot;return 21522^(i<<10|n)};var rt={};const st=Ke;function at(e){this.mode=st.NUMERIC,this.data=e.toString()}at.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},at.prototype.getLength=function(){return this.data.length},at.prototype.getBitsLength=function(){return at.getBitsLength(this.data.length)},at.prototype.write=function(e){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);const o=this.data.length-t;o>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,3*o+1))};var lt=at;const ct=Ke,dt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ut(e){this.mode=ct.ALPHANUMERIC,this.data=e}ut.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},ut.prototype.getLength=function(){return this.data.length},ut.prototype.getBitsLength=function(){return ut.getBitsLength(this.data.length)},ut.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*dt.indexOf(this.data[t]);i+=dt.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(dt.indexOf(this.data[t]),6)};var ht=ut;const pt=function(e){for(var t=[],i=e.length,n=0;n<i;n++){var o=e.charCodeAt(n);if(o>=55296&&o<=56319&&i>n+1){var r=e.charCodeAt(n+1);r>=56320&&r<=57343&&(o=1024*(o-55296)+r-56320+65536,n+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer},gt=Ke;function ft(e){this.mode=gt.BYTE,"string"==typeof e&&(e=pt(e)),this.data=new Uint8Array(e)}ft.getBitsLength=function(e){return 8*e},ft.prototype.getLength=function(){return this.data.length},ft.prototype.getBitsLength=function(){return ft.getBitsLength(this.data.length)},ft.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var wt=ft;const mt=Ke,bt=$e;function yt(e){this.mode=mt.KANJI,this.data=e}yt.getBitsLength=function(e){return 13*e},yt.prototype.getLength=function(){return this.data.length},yt.prototype.getBitsLength=function(){return yt.getBitsLength(this.data.length)},yt.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=bt.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}};var vt=yt,xt={exports:{}};!function(e){var t={single_source_shortest_paths:function(e,i,n){var o={},r={};r[i]=0;var s,a,l,c,d,u,h,p=t.PriorityQueue.make();for(p.push(i,0);!p.empty();)for(l in a=(s=p.pop()).value,c=s.cost,d=e[a]||{})d.hasOwnProperty(l)&&(u=c+d[l],h=r[l],(void 0===r[l]||h>u)&&(r[l]=u,p.push(l,u),o[l]=a));if(void 0!==n&&void 0===r[n]){var g=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],n=t;n;)i.push(n),e[n],n=e[n];return i.reverse(),i},find_path:function(e,i,n){var o=t.single_source_shortest_paths(e,i,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(e){var i,n=t.PriorityQueue,o={};for(i in e=e||{},n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=e.sorter||n.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(xt),function(e){const t=Ke,i=lt,n=ht,o=wt,r=vt,s=Je,a=$e,l=xt.exports;function c(e){return unescape(encodeURIComponent(e)).length}function d(e,t,i){const n=[];let o;for(;null!==(o=e.exec(i));)n.push({data:o[0],index:o.index,mode:t,length:o[0].length});return n}function u(e){const i=d(s.NUMERIC,t.NUMERIC,e),n=d(s.ALPHANUMERIC,t.ALPHANUMERIC,e);let o,r;a.isKanjiModeEnabled()?(o=d(s.BYTE,t.BYTE,e),r=d(s.KANJI,t.KANJI,e)):(o=d(s.BYTE_KANJI,t.BYTE,e),r=[]);return i.concat(n,o,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,s){switch(s){case t.NUMERIC:return i.getBitsLength(e);case t.ALPHANUMERIC:return n.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return o.getBitsLength(e)}}function p(e,s){let l;const c=t.getBestModeForData(e);if(l=t.from(s,c),l!==t.BYTE&&l.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(c));switch(l!==t.KANJI||a.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new i(e);case t.ALPHANUMERIC:return new n(e);case t.KANJI:return new r(e);case t.BYTE:return new o(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e}),[])},e.fromString=function(i,n){const o=function(e){const i=[];for(let n=0;n<e.length;n++){const o=e[n];switch(o.mode){case t.NUMERIC:i.push([o,{data:o.data,mode:t.ALPHANUMERIC,length:o.length},{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.ALPHANUMERIC:i.push([o,{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.KANJI:i.push([o,{data:o.data,mode:t.BYTE,length:c(o.data)}]);break;case t.BYTE:i.push([{data:o.data,mode:t.BYTE,length:c(o.data)}])}}return i}(u(i,a.isKanjiModeEnabled())),r=function(e,i){const n={},o={start:{}};let r=["start"];for(let s=0;s<e.length;s++){const a=e[s],l=[];for(let e=0;e<a.length;e++){const c=a[e],d=""+s+e;l.push(d),n[d]={node:c,lastCount:0},o[d]={};for(let e=0;e<r.length;e++){const s=r[e];n[s]&&n[s].node.mode===c.mode?(o[s][d]=h(n[s].lastCount+c.length,c.mode)-h(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),o[s][d]=h(c.length,c.mode)+4+t.getCharCountIndicator(c.mode,i))}}r=l}for(let e=0;e<r.length;e++)o[r[e]].end=0;return{map:o,table:n}}(o,n),s=l.find_path(r.map,"start","end"),d=[];for(let e=1;e<s.length-1;e++)d.push(r.table[s[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(d))},e.rawSplit=function(t){return e.fromArray(u(t,a.isKanjiModeEnabled()))}}(rt);const $t=$e,Ct=Re,kt=Ie,Et=Se,Rt=Ae,Tt=Le,It=Oe,Pt=Be,St=Ve,At=He,Lt=it,jt=Ke,Ot=rt;function Bt(e,t,i){const n=e.size,o=Lt.getEncodedBits(t,i);let r,s;for(r=0;r<15;r++)s=1==(o>>r&1),r<6?e.set(r,8,s,!0):r<8?e.set(r+1,8,s,!0):e.set(n-15+r,8,s,!0),r<8?e.set(8,n-r-1,s,!0):r<9?e.set(8,15-r-1+1,s,!0):e.set(8,15-r-1,s,!0);e.set(n-8,8,1,!0)}function Nt(e,t,i){const n=new kt;i.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),jt.getCharCountIndicator(t.mode,e)),t.write(n)}));const o=8*($t.getSymbolTotalCodewords(e)-Pt.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const r=(o-n.getLengthInBits())/8;for(let e=0;e<r;e++)n.put(e%2?17:236,8);return function(e,t,i){const n=$t.getSymbolTotalCodewords(t),o=Pt.getTotalCodewordsCount(t,i),r=n-o,s=Pt.getBlocksCount(t,i),a=n%s,l=s-a,c=Math.floor(n/s),d=Math.floor(r/s),u=d+1,h=c-d,p=new St(h);let g=0;const f=new Array(s),w=new Array(s);let m=0;const b=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<l?d:u;f[e]=b.slice(g,g+t),w[e]=p.encode(f[e]),g+=t,m=Math.max(m,t)}const y=new Uint8Array(n);let v,x,$=0;for(v=0;v<m;v++)for(x=0;x<s;x++)v<f[x].length&&(y[$++]=f[x][v]);for(v=0;v<h;v++)for(x=0;x<s;x++)y[$++]=w[x][v];return y}(n,e,t)}function _t(e,t,i,n){let o;if(Array.isArray(e))o=Ot.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=Ot.rawSplit(e);n=At.getBestVersionForData(t,i)}o=Ot.fromString(e,n||40)}}const r=At.getBestVersionForData(o,i);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<r)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+r+".\n")}else t=r;const s=Nt(t,i,o),a=$t.getSymbolSize(t),l=new Et(a);return function(e,t){const i=e.size,n=Tt.getPositions(t);for(let t=0;t<n.length;t++){const o=n[t][0],r=n[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1||i<=o+t))for(let n=-1;n<=7;n++)r+n<=-1||i<=r+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(o+t,r+n,!0,!0):e.set(o+t,r+n,!1,!0))}}(l,t),function(e){const t=e.size;for(let i=8;i<t-8;i++){const t=i%2==0;e.set(i,6,t,!0),e.set(6,i,t,!0)}}(l),function(e,t){const i=Rt.getPositions(t);for(let t=0;t<i.length;t++){const n=i[t][0],o=i[t][1];for(let t=-2;t<=2;t++)for(let i=-2;i<=2;i++)-2===t||2===t||-2===i||2===i||0===t&&0===i?e.set(n+t,o+i,!0,!0):e.set(n+t,o+i,!1,!0)}}(l,t),Bt(l,i,0),t>=7&&function(e,t){const i=e.size,n=At.getEncodedBits(t);let o,r,s;for(let t=0;t<18;t++)o=Math.floor(t/3),r=t%3+i-8-3,s=1==(n>>t&1),e.set(o,r,s,!0),e.set(r,o,s,!0)}(l,t),function(e,t){const i=e.size;let n=-1,o=i-1,r=7,s=0;for(let a=i-1;a>0;a-=2)for(6===a&&a--;;){for(let i=0;i<2;i++)if(!e.isReserved(o,a-i)){let n=!1;s<t.length&&(n=1==(t[s]>>>r&1)),e.set(o,a-i,n),r--,-1===r&&(s++,r=7)}if(o+=n,o<0||i<=o){o-=n,n=-n;break}}}(l,s),isNaN(n)&&(n=It.getBestMask(l,Bt.bind(null,l,i))),It.applyMask(n,l),Bt(l,i,n),{modules:l,version:t,errorCorrectionLevel:i,maskPattern:n,segments:o}}xe.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let i,n,o=Ct.M;return void 0!==t&&(o=Ct.from(t.errorCorrectionLevel,Ct.M),i=At.from(t.version),n=It.from(t.maskPattern),t.toSJISFunc&&$t.setToSJISFunction(t.toSJISFunc)),_t(e,i,o,n)};var Mt={},Wt={};!function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const i=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:n,scale:n?4:o,margin:i,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,i){const n=e.getScale(t,i);return Math.floor((t+2*i.margin)*n)},e.qrToImageData=function(t,i,n){const o=i.modules.size,r=i.modules.data,s=e.getScale(o,n),a=Math.floor((o+2*n.margin)*s),l=n.margin*s,c=[n.color.light,n.color.dark];for(let e=0;e<a;e++)for(let i=0;i<a;i++){let d=4*(e*a+i),u=n.color.light;if(e>=l&&i>=l&&e<a-l&&i<a-l){u=c[r[Math.floor((e-l)/s)*o+Math.floor((i-l)/s)]?1:0]}t[d++]=u.r,t[d++]=u.g,t[d++]=u.b,t[d]=u.a}}}(Wt),function(e){const t=Wt;e.render=function(e,i,n){let o=n,r=i;void 0!==o||i&&i.getContext||(o=i,i=void 0),i||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=t.getOptions(o);const s=t.getImageWidth(e.modules.size,o),a=r.getContext("2d"),l=a.createImageData(s,s);return t.qrToImageData(l.data,e,o),function(e,t,i){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=i,t.width=i,t.style.height=i+"px",t.style.width=i+"px"}(a,r,s),a.putImageData(l,0,0),r},e.renderToDataURL=function(t,i,n){let o=n;void 0!==o||i&&i.getContext||(o=i,i=void 0),o||(o={});const r=e.render(t,i,o),s=o.type||"image/png",a=o.rendererOpts||{};return r.toDataURL(s,a.quality)}}(Mt);var zt={};const Dt=Wt;function Ut(e,t){const i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function Ft(e,t,i){let n=e+t;return void 0!==i&&(n+=" "+i),n}zt.render=function(e,t,i){const n=Dt.getOptions(t),o=e.modules.size,r=e.modules.data,s=o+2*n.margin,a=n.color.light.a?"<path "+Ut(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",l="<path "+Ut(n.color.dark,"stroke")+' d="'+function(e,t,i){let n="",o=0,r=!1,s=0;for(let a=0;a<e.length;a++){const l=Math.floor(a%t),c=Math.floor(a/t);l||r||(r=!0),e[a]?(s++,a>0&&l>0&&e[a-1]||(n+=r?Ft("M",l+i,.5+c+i):Ft("m",o,0),o=0,r=!1),l+1<t&&e[a+1]||(n+=Ft("h",s),s=0)):o++}return n}(r,o,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+a+l+"</svg>\n";return"function"==typeof i&&i(null,d),d};const qt=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},Vt=xe,Ht=Mt,Kt=zt;function Yt(e,t,i,n,o){const r=[].slice.call(arguments,1),s=r.length,a="function"==typeof r[s-1];if(!a&&!qt())throw new Error("Callback required as last argument");if(!a){if(s<1)throw new Error("Too few arguments provided");return 1===s?(i=t,t=n=void 0):2!==s||t.getContext||(n=i,i=t,t=void 0),new Promise((function(o,r){try{const r=Vt.create(i,n);o(e(r,t,n))}catch(e){r(e)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(o=i,i=t,t=n=void 0):3===s&&(t.getContext&&void 0===o?(o=n,n=void 0):(o=n,n=i,i=t,t=void 0));try{const r=Vt.create(i,n);o(null,e(r,t,n))}catch(e){o(e)}}ve.create=Vt.create,ve.toCanvas=Yt.bind(null,Ht.render),ve.toDataURL=Yt.bind(null,Ht.renderToDataURL),ve.toString=Yt.bind(null,(function(e,t,i){return Kt.render(e,i)}));function Jt(e,t,i){if(e===t)return!1;return(e-t<0?t-e:e-t)<=i+.1}const Qt={generate({uri:e,size:t,logoSize:i,padding:n=8,dotColor:o="var(--apkt-colors-black)"}){const r=10,s=[],a=function(e,t){const i=Array.prototype.slice.call(ve.create(e,{errorCorrectionLevel:t}).modules.data,0),n=Math.sqrt(i.length);return i.reduce(((e,t,i)=>(i%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e,"Q"),l=(t-2*n)/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const i=(a.length-7)*l*e+n,d=(a.length-7)*l*t+n,u=.45;for(let e=0;e<c.length;e+=1){const t=l*(7-2*e);s.push(E`
368
+ <rect
369
+ fill=${2===e?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
370
+ width=${0===e?t-r:t}
371
+ rx= ${0===e?(t-r)*u:t*u}
372
+ ry= ${0===e?(t-r)*u:t*u}
373
+ stroke=${o}
374
+ stroke-width=${0===e?r:0}
375
+ height=${0===e?t-r:t}
376
+ x= ${0===e?d+l*e+5:d+l*e}
377
+ y= ${0===e?i+l*e+5:i+l*e}
378
+ />
379
+ `)}}));const d=Math.floor((i+25)/l),u=a.length/2-d/2,h=a.length/2+d/2-1,p=[];a.forEach(((e,t)=>{e.forEach(((e,i)=>{if(a[t][i]&&!(t<7&&i<7||t>a.length-8&&i<7||t<7&&i>a.length-8||t>u&&t<h&&i>u&&i<h)){const e=t*l+l/2+n,o=i*l+l/2+n;p.push([e,o])}}))}));const g={};return p.forEach((([e,t])=>{g[e]?g[e]?.push(t):g[e]=[t]})),Object.entries(g).map((([e,t])=>{const i=t.filter((e=>t.every((t=>!Jt(e,t,l)))));return[Number(e),i]})).forEach((([e,t])=>{t.forEach((t=>{s.push(E`<circle cx=${e} cy=${t} fill=${o} r=${l/2.5} />`)}))})),Object.entries(g).filter((([e,t])=>t.length>1)).map((([e,t])=>{const i=t.filter((e=>t.some((t=>Jt(e,t,l)))));return[Number(e),i]})).map((([e,t])=>{t.sort(((e,t)=>e<t?-1:1));const i=[];for(const e of t){const t=i.find((t=>t.some((t=>Jt(e,t,l)))));t?t.push(e):i.push([e])}return[e,i.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,i])=>{s.push(E`
380
+ <line
381
+ x1=${e}
382
+ x2=${e}
383
+ y1=${t}
384
+ y2=${i}
385
+ stroke=${o}
386
+ stroke-width=${l/1.25}
387
+ stroke-linecap="round"
388
+ />
389
+ `)}))})),s}};var Gt=d`
390
+ :host {
391
+ position: relative;
392
+ user-select: none;
393
+ display: block;
394
+ overflow: hidden;
395
+ aspect-ratio: 1 / 1;
396
+ width: 100%;
397
+ height: 100%;
398
+ background-color: ${({colors:e})=>e.white};
399
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
400
+ }
401
+
402
+ :host {
403
+ border-radius: ${({borderRadius:e})=>e[4]};
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: center;
407
+ }
408
+
409
+ :host([data-clear='true']) > wui-icon {
410
+ display: none;
411
+ }
412
+
413
+ svg:first-child,
414
+ wui-image,
415
+ wui-icon {
416
+ position: absolute;
417
+ top: 50%;
418
+ left: 50%;
419
+ transform: translateY(-50%) translateX(-50%);
420
+ background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
421
+ box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary};
422
+ border-radius: ${({borderRadius:e})=>e[6]};
423
+ }
424
+
425
+ wui-image {
426
+ width: 25%;
427
+ height: 25%;
428
+ border-radius: ${({borderRadius:e})=>e[2]};
429
+ }
430
+
431
+ wui-icon {
432
+ width: 100%;
433
+ height: 100%;
434
+ color: #3396ff !important;
435
+ transform: translateY(-50%) translateX(-50%) scale(0.25);
436
+ }
437
+
438
+ wui-icon > svg {
439
+ width: inherit;
440
+ height: inherit;
441
+ }
442
+ `,Xt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Zt=class extends e{constructor(){super(...arguments),this.uri="",this.size=500,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),s`<wui-flex
443
+ alignItems="center"
444
+ justifyContent="center"
445
+ class="wui-qr-code"
446
+ direction="column"
447
+ gap="4"
448
+ width="100%"
449
+ style="height: 100%"
450
+ >
451
+ ${this.templateVisual()} ${this.templateSvg()}
452
+ </wui-flex>`}templateSvg(){return E`
453
+ <svg viewBox="0 0 ${this.size} ${this.size}" width="100%" height="100%">
454
+ ${Qt.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})}
455
+ </svg>
456
+ `}templateVisual(){return this.imageSrc?s`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?s`<wui-icon
457
+ class="farcaster"
458
+ size="inherit"
459
+ color="inherit"
460
+ name="farcaster"
461
+ ></wui-icon>`:s`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};Zt.styles=[w,Gt],Xt([L()],Zt.prototype,"uri",void 0),Xt([L({type:Number})],Zt.prototype,"size",void 0),Xt([L()],Zt.prototype,"theme",void 0),Xt([L()],Zt.prototype,"imageSrc",void 0),Xt([L()],Zt.prototype,"alt",void 0),Xt([L({type:Boolean})],Zt.prototype,"arenaClear",void 0),Xt([L({type:Boolean})],Zt.prototype,"farcaster",void 0),Zt=Xt([O("wui-qr-code")],Zt);var ei=d`
462
+ wui-shimmer {
463
+ width: 100%;
464
+ aspect-ratio: 1 / 1;
465
+ border-radius: ${({borderRadius:e})=>e[4]};
466
+ }
467
+
468
+ wui-qr-code {
469
+ opacity: 0;
470
+ animation-duration: ${({durations:e})=>e.xl};
471
+ animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
472
+ animation-name: fade-in;
473
+ animation-fill-mode: forwards;
474
+ }
475
+
476
+ @keyframes fade-in {
477
+ from {
478
+ opacity: 0;
479
+ }
480
+ to {
481
+ opacity: 1;
482
+ }
483
+ }
484
+ `,ti=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ii=class extends pe{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:l.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach((e=>e()))}render(){return this.onRenderProxy(),s`
485
+ <wui-flex
486
+ flexDirection="column"
487
+ alignItems="center"
488
+ .padding=${["0","5","5","5"]}
489
+ gap="5"
490
+ >
491
+ <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
492
+ <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text>
493
+ ${this.copyTemplate()}
494
+ </wui-flex>
495
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
496
+ `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.wallet?this.wallet.name:void 0;o.setWcLinking(void 0),o.setRecentWallet(this.wallet);const t=b.state.themeVariables["--apkt-qr-color"]??b.state.themeVariables["--w3m-qr-color"];return s` <wui-qr-code
497
+ theme=${b.state.themeMode}
498
+ uri=${this.uri}
499
+ imageSrc=${B(p.getWalletImage(this.wallet))}
500
+ color=${B(t)}
501
+ alt=${B(e)}
502
+ data-testid="wui-qr-code"
503
+ ></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return s`<wui-button
504
+ .disabled=${e}
505
+ @click=${this.onCopyUri}
506
+ variant="neutral-secondary"
507
+ size="sm"
508
+ data-testid="copy-wc2-uri"
509
+ >
510
+ Copy link
511
+ <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon>
512
+ </wui-button>`}};ii.styles=ei,ti([L({type:Boolean})],ii.prototype,"basic",void 0),ii=ti([O("w3m-connecting-wc-qrcode")],ii);var ni=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let oi=class extends e{constructor(){if(super(),this.wallet=l.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:l.state.view}})}render(){return s`
513
+ <wui-flex
514
+ flexDirection="column"
515
+ alignItems="center"
516
+ .padding=${["10","5","5","5"]}
517
+ gap="5"
518
+ >
519
+ <wui-wallet-image
520
+ size="lg"
521
+ imageSrc=${B(p.getWalletImage(this.wallet))}
522
+ ></wui-wallet-image>
523
+
524
+ <wui-text variant="md-regular" color="primary">Not Detected</wui-text>
525
+ </wui-flex>
526
+
527
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
528
+ `}};oi=ni([O("w3m-connecting-wc-unsupported")],oi);var ri=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let si=class extends pe{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=k.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(o.subscribeKey("wcUri",(()=>{this.updateLoadingState()}))),a.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:l.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:e,name:t}=this.wallet,{redirect:i,href:r}=n.formatUniversalUrl(e,this.uri);o.setWcLinking({name:t,href:r}),o.setRecentWallet(this.wallet),n.openHref(i,"_blank")}catch{this.error=!0}}};ri([j()],si.prototype,"isLoading",void 0),si=ri([O("w3m-connecting-wc-web")],si);var ai=d`
529
+ :host([data-mobile-fullscreen='true']) {
530
+ height: 100%;
531
+ display: flex;
532
+ flex-direction: column;
533
+ }
534
+
535
+ :host([data-mobile-fullscreen='true']) wui-ux-by-reown {
536
+ margin-top: auto;
537
+ }
538
+ `,li=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ci=class extends e{constructor(){super(),this.wallet=l.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=Boolean(c.state.siwx),this.remoteFeatures=c.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(c.subscribeKey("remoteFeatures",(e=>this.remoteFeatures=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return c.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),s`
539
+ ${this.headerTemplate()}
540
+ <div class="platform-container">${this.platformTemplate()}</div>
541
+ ${this.reownBrandingTemplate()}
542
+ `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?s`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!c.state.manualWCControl||e))try{const{wcPairingExpiry:t,status:i}=o.state,{redirectView:r}=l.state.data??{};if(e||c.state.enableEmbedded||n.isPairingExpired(t)||"connecting"===i){const e=o.getConnections(f.state.activeChain),t=this.remoteFeatures?.multiWallet,i=e.length>0;await o.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(i&&t?(l.replace("ProfileWallets"),y.showSuccess("New Wallet Added")):r?l.replace(r):v.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!c.state.enableNetworkSwitch&&f.state.activeChain)return f.setActiveCaipNetwork(R.getUnsupportedNetwork(`${f.state.activeChain}:${f.state.activeCaipNetwork?.id}`)),void f.showUnsupportedChainUI();e instanceof x&&e.originalName===$.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?a.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):a.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),o.setWcError(!0),y.showError(e.message??"Connection error"),o.resetWcConnection(),l.goBack()}}determinePlatforms(){if(!this.wallet)return this.platforms.push("qrcode"),void(this.platform="qrcode");if(this.platform)return;const{mobile_link:e,desktop_link:t,webapp_link:i,injected:r,rdns:s}=this.wallet,a=r?.map((({injected_id:e})=>e)).filter(Boolean),l=[...s?[s]:a??[]],d=!c.state.isUniversalProvider&&l.length,u=e,h=i,p=o.checkInstalled(l),g=d&&p,w=t&&!n.isMobile();g&&!f.state.noAdapters&&this.platforms.push("browser"),u&&this.platforms.push(n.isMobile()?"mobile":"qrcode"),h&&this.platforms.push("web"),w&&this.platforms.push("desktop");const m=T.isCustomDeeplinkWallet(this.wallet.id,f.state.activeChain);g||!d||f.state.noAdapters||m||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return s`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return s`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return s`
543
+ <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
544
+ </w3m-connecting-wc-desktop>
545
+ `;case"mobile":return s`
546
+ <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
547
+ </w3m-connecting-wc-mobile>
548
+ `;case"qrcode":return s`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return s`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?s`
549
+ <w3m-connecting-header
550
+ .platforms=${this.platforms}
551
+ .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
552
+ >
553
+ </w3m-connecting-header>
554
+ `:null}async onSelectPlatform(e){const t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};ci.styles=ai,li([j()],ci.prototype,"platform",void 0),li([j()],ci.prototype,"platforms",void 0),li([j()],ci.prototype,"isSiwxEnabled",void 0),li([j()],ci.prototype,"remoteFeatures",void 0),li([L({type:Boolean})],ci.prototype,"displayBranding",void 0),li([L({type:Boolean})],ci.prototype,"basic",void 0),ci=li([O("w3m-connecting-wc-view")],ci);var di=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let ui=class extends e{constructor(){super(),this.unsubscribe=[],this.isMobile=n.isMobile(),this.remoteFeatures=c.state.remoteFeatures,this.unsubscribe.push(c.subscribeKey("remoteFeatures",(e=>this.remoteFeatures=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(this.isMobile){const{featured:e,recommended:t}=i.state,{customWallets:n}=c.state,o=I.getRecentWallets(),r=e.length||t.length||n?.length||o.length;return s`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}>
555
+ ${r?s`<w3m-connector-list></w3m-connector-list>`:null}
556
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
557
+ </wui-flex>`}return s`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}>
558
+ <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view>
559
+ <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}>
560
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
561
+ </wui-flex>
562
+ </wui-flex>
563
+ ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?s` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}>
564
+ <wui-ux-by-reown></wui-ux-by-reown>
565
+ </wui-flex>`:null}};di([j()],ui.prototype,"isMobile",void 0),di([j()],ui.prototype,"remoteFeatures",void 0),ui=di([O("w3m-connecting-wc-basic-view")],ui);
566
+ /**
567
+ * @license
568
+ * Copyright 2020 Google LLC
569
+ * SPDX-License-Identifier: BSD-3-Clause
570
+ */
571
+ const hi=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),hi(e,t);return!0},pi=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},gi=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),mi(t)}};
572
+ /**
573
+ * @license
574
+ * Copyright 2017 Google LLC
575
+ * SPDX-License-Identifier: BSD-3-Clause
576
+ */function fi(e){void 0!==this._$AN?(pi(this),this._$AM=e,gi(this)):this._$AM=e}function wi(e,t=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(n))for(let e=i;e<n.length;e++)hi(n[e],!1),pi(n[e]);else null!=n&&(hi(n,!1),pi(n));else hi(this,e)}const mi=e=>{e.type==M.CHILD&&(e._$AP??=wi,e._$AQ??=fi)};class bi extends _{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),gi(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(hi(this,e),pi(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}
577
+ /**
578
+ * @license
579
+ * Copyright 2020 Google LLC
580
+ * SPDX-License-Identifier: BSD-3-Clause
581
+ */const yi=()=>new vi;class vi{}const xi=new WeakMap,$i=W(class extends bi{render(e){return P}update(e,[t]){const i=t!==this.G;return i&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),P}rt(e){if(void 0!==this.G)if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let i=xi.get(t);void 0===i&&(i=new WeakMap,xi.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?xi.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Ci=d`
582
+ :host {
583
+ display: flex;
584
+ align-items: center;
585
+ justify-content: center;
586
+ }
587
+
588
+ label {
589
+ position: relative;
590
+ display: inline-block;
591
+ user-select: none;
592
+ transition:
593
+ background-color ${({durations:e})=>e.lg}
594
+ ${({easings:e})=>e["ease-out-power-2"]},
595
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
596
+ border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
597
+ box-shadow ${({durations:e})=>e.lg}
598
+ ${({easings:e})=>e["ease-out-power-2"]},
599
+ width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
600
+ height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
601
+ transform ${({durations:e})=>e.lg}
602
+ ${({easings:e})=>e["ease-out-power-2"]},
603
+ opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]};
604
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
605
+ }
606
+
607
+ input {
608
+ width: 0;
609
+ height: 0;
610
+ opacity: 0;
611
+ }
612
+
613
+ span {
614
+ position: absolute;
615
+ cursor: pointer;
616
+ top: 0;
617
+ left: 0;
618
+ right: 0;
619
+ bottom: 0;
620
+ background-color: ${({colors:e})=>e.neutrals300};
621
+ border-radius: ${({borderRadius:e})=>e.round};
622
+ border: 1px solid transparent;
623
+ will-change: border;
624
+ transition:
625
+ background-color ${({durations:e})=>e.lg}
626
+ ${({easings:e})=>e["ease-out-power-2"]},
627
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
628
+ border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
629
+ box-shadow ${({durations:e})=>e.lg}
630
+ ${({easings:e})=>e["ease-out-power-2"]},
631
+ width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
632
+ height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
633
+ transform ${({durations:e})=>e.lg}
634
+ ${({easings:e})=>e["ease-out-power-2"]},
635
+ opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]};
636
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
637
+ }
638
+
639
+ span:before {
640
+ content: '';
641
+ position: absolute;
642
+ background-color: ${({colors:e})=>e.white};
643
+ border-radius: 50%;
644
+ }
645
+
646
+ /* -- Sizes --------------------------------------------------------- */
647
+ label[data-size='lg'] {
648
+ width: 48px;
649
+ height: 32px;
650
+ }
651
+
652
+ label[data-size='md'] {
653
+ width: 40px;
654
+ height: 28px;
655
+ }
656
+
657
+ label[data-size='sm'] {
658
+ width: 32px;
659
+ height: 22px;
660
+ }
661
+
662
+ label[data-size='lg'] > span:before {
663
+ height: 24px;
664
+ width: 24px;
665
+ left: 4px;
666
+ top: 3px;
667
+ }
668
+
669
+ label[data-size='md'] > span:before {
670
+ height: 20px;
671
+ width: 20px;
672
+ left: 4px;
673
+ top: 3px;
674
+ }
675
+
676
+ label[data-size='sm'] > span:before {
677
+ height: 16px;
678
+ width: 16px;
679
+ left: 3px;
680
+ top: 2px;
681
+ }
682
+
683
+ /* -- Focus states --------------------------------------------------- */
684
+ input:focus-visible:not(:checked) + span,
685
+ input:focus:not(:checked) + span {
686
+ border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
687
+ background-color: ${({tokens:e})=>e.theme.textTertiary};
688
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
689
+ }
690
+
691
+ input:focus-visible:checked + span,
692
+ input:focus:checked + span {
693
+ border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary};
694
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
695
+ }
696
+
697
+ /* -- Checked states --------------------------------------------------- */
698
+ input:checked + span {
699
+ background-color: ${({tokens:e})=>e.core.iconAccentPrimary};
700
+ }
701
+
702
+ label[data-size='lg'] > input:checked + span:before {
703
+ transform: translateX(calc(100% - 9px));
704
+ }
705
+
706
+ label[data-size='md'] > input:checked + span:before {
707
+ transform: translateX(calc(100% - 9px));
708
+ }
709
+
710
+ label[data-size='sm'] > input:checked + span:before {
711
+ transform: translateX(calc(100% - 7px));
712
+ }
713
+
714
+ /* -- Hover states ------------------------------------------------------- */
715
+ label:hover > input:not(:checked):not(:disabled) + span {
716
+ background-color: ${({colors:e})=>e.neutrals400};
717
+ }
718
+
719
+ label:hover > input:checked:not(:disabled) + span {
720
+ background-color: ${({colors:e})=>e.accent080};
721
+ }
722
+
723
+ /* -- Disabled state --------------------------------------------------- */
724
+ label:has(input:disabled) {
725
+ pointer-events: none;
726
+ user-select: none;
727
+ }
728
+
729
+ input:not(:checked):disabled + span {
730
+ background-color: ${({colors:e})=>e.neutrals700};
731
+ }
732
+
733
+ input:checked:disabled + span {
734
+ background-color: ${({colors:e})=>e.neutrals700};
735
+ }
736
+
737
+ input:not(:checked):disabled + span::before {
738
+ background-color: ${({colors:e})=>e.neutrals400};
739
+ }
740
+
741
+ input:checked:disabled + span::before {
742
+ background-color: ${({tokens:e})=>e.theme.textTertiary};
743
+ }
744
+ `,ki=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Ei=class extends e{constructor(){super(...arguments),this.inputElementRef=yi(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return s`
745
+ <label data-size=${this.size}>
746
+ <input
747
+ ${$i(this.inputElementRef)}
748
+ type="checkbox"
749
+ ?checked=${this.checked}
750
+ ?disabled=${this.disabled}
751
+ @change=${this.dispatchChangeEvent.bind(this)}
752
+ />
753
+ <span></span>
754
+ </label>
755
+ `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};Ei.styles=[w,m,Ci],ki([L({type:Boolean})],Ei.prototype,"checked",void 0),ki([L({type:Boolean})],Ei.prototype,"disabled",void 0),ki([L()],Ei.prototype,"size",void 0),Ei=ki([O("wui-toggle")],Ei);var Ri=d`
756
+ :host {
757
+ height: auto;
758
+ }
759
+
760
+ :host > wui-flex {
761
+ height: 100%;
762
+ display: flex;
763
+ align-items: center;
764
+ justify-content: center;
765
+ column-gap: ${({spacing:e})=>e[2]};
766
+ padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]};
767
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
768
+ border-radius: ${({borderRadius:e})=>e[4]};
769
+ box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary};
770
+ transition: background-color ${({durations:e})=>e.lg}
771
+ ${({easings:e})=>e["ease-out-power-2"]};
772
+ will-change: background-color;
773
+ cursor: pointer;
774
+ }
775
+
776
+ wui-switch {
777
+ pointer-events: none;
778
+ }
779
+ `,Ti=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Ii=class extends e{constructor(){super(...arguments),this.checked=!1}render(){return s`
780
+ <wui-flex>
781
+ <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
782
+ <wui-toggle
783
+ ?checked=${this.checked}
784
+ size="sm"
785
+ @switchChange=${this.handleToggleChange.bind(this)}
786
+ ></wui-toggle>
787
+ </wui-flex>
788
+ `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};Ii.styles=[w,m,Ri],Ti([L({type:Boolean})],Ii.prototype,"checked",void 0),Ii=Ti([O("wui-certified-switch")],Ii);var Pi=d`
789
+ :host {
790
+ position: relative;
791
+ width: 100%;
792
+ display: inline-flex;
793
+ flex-direction: column;
794
+ gap: ${({spacing:e})=>e[3]};
795
+ color: ${({tokens:e})=>e.theme.textPrimary};
796
+ caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
797
+ }
798
+
799
+ .wui-input-text-container {
800
+ position: relative;
801
+ display: flex;
802
+ }
803
+
804
+ input {
805
+ width: 100%;
806
+ border-radius: ${({borderRadius:e})=>e[4]};
807
+ color: inherit;
808
+ background: transparent;
809
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
810
+ caret-color: ${({tokens:e})=>e.core.textAccentPrimary};
811
+ padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]}
812
+ ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]};
813
+ font-size: ${({textSize:e})=>e.large};
814
+ line-height: ${({typography:e})=>e["lg-regular"].lineHeight};
815
+ letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing};
816
+ font-weight: ${({fontWeight:e})=>e.regular};
817
+ font-family: ${({fontFamily:e})=>e.regular};
818
+ }
819
+
820
+ input[data-size='lg'] {
821
+ padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}
822
+ ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]};
823
+ }
824
+
825
+ @media (hover: hover) and (pointer: fine) {
826
+ input:hover:enabled {
827
+ border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
828
+ }
829
+ }
830
+
831
+ input:disabled {
832
+ cursor: unset;
833
+ border: 1px solid ${({tokens:e})=>e.theme.borderPrimary};
834
+ }
835
+
836
+ input::placeholder {
837
+ color: ${({tokens:e})=>e.theme.textSecondary};
838
+ }
839
+
840
+ input:focus:enabled {
841
+ border: 1px solid ${({tokens:e})=>e.theme.borderSecondary};
842
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
843
+ -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
844
+ -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
845
+ box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040};
846
+ }
847
+
848
+ div.wui-input-text-container:has(input:disabled) {
849
+ opacity: 0.5;
850
+ }
851
+
852
+ wui-icon.wui-input-text-left-icon {
853
+ position: absolute;
854
+ top: 50%;
855
+ transform: translateY(-50%);
856
+ pointer-events: none;
857
+ left: ${({spacing:e})=>e[4]};
858
+ color: ${({tokens:e})=>e.theme.iconDefault};
859
+ }
860
+
861
+ button.wui-input-text-submit-button {
862
+ position: absolute;
863
+ top: 50%;
864
+ transform: translateY(-50%);
865
+ right: ${({spacing:e})=>e[3]};
866
+ width: 24px;
867
+ height: 24px;
868
+ border: none;
869
+ background: transparent;
870
+ border-radius: ${({borderRadius:e})=>e[2]};
871
+ color: ${({tokens:e})=>e.core.textAccentPrimary};
872
+ }
873
+
874
+ button.wui-input-text-submit-button:disabled {
875
+ opacity: 1;
876
+ }
877
+
878
+ button.wui-input-text-submit-button.loading wui-icon {
879
+ animation: spin 1s linear infinite;
880
+ }
881
+
882
+ button.wui-input-text-submit-button:hover {
883
+ background: ${({tokens:e})=>e.core.foregroundAccent010};
884
+ }
885
+
886
+ input:has(+ .wui-input-text-submit-button) {
887
+ padding-right: ${({spacing:e})=>e[12]};
888
+ }
889
+
890
+ input[type='number'] {
891
+ -moz-appearance: textfield;
892
+ }
893
+
894
+ input[type='search']::-webkit-search-decoration,
895
+ input[type='search']::-webkit-search-cancel-button,
896
+ input[type='search']::-webkit-search-results-button,
897
+ input[type='search']::-webkit-search-results-decoration {
898
+ -webkit-appearance: none;
899
+ }
900
+
901
+ /* -- Keyframes --------------------------------------------------- */
902
+ @keyframes spin {
903
+ from {
904
+ transform: rotate(0deg);
905
+ }
906
+ to {
907
+ transform: rotate(360deg);
908
+ }
909
+ }
910
+ `,Si=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Ai=class extends e{constructor(){super(...arguments),this.inputElementRef=yi(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return s` <div class="wui-input-text-container">
911
+ ${this.templateLeftIcon()}
912
+ <input
913
+ data-size=${this.size}
914
+ ${$i(this.inputElementRef)}
915
+ data-testid="wui-input-text"
916
+ type=${this.type}
917
+ enterkeyhint=${B(this.enterKeyHint)}
918
+ ?disabled=${this.disabled}
919
+ placeholder=${this.placeholder}
920
+ @input=${this.dispatchInputChangeEvent.bind(this)}
921
+ @keydown=${this.onKeyDown}
922
+ .value=${this.value||""}
923
+ />
924
+ ${this.templateSubmitButton()}
925
+ <slot class="wui-input-text-slot"></slot>
926
+ </div>
927
+ ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?s`<wui-icon
928
+ class="wui-input-text-left-icon"
929
+ size="md"
930
+ data-size=${this.size}
931
+ color="inherit"
932
+ name=${this.icon}
933
+ ></wui-icon>`:null}templateSubmitButton(){return this.onSubmit?s`<button
934
+ class="wui-input-text-submit-button ${this.loading?"loading":""}"
935
+ @click=${this.onSubmit?.bind(this)}
936
+ ?disabled=${this.disabled||this.loading}
937
+ >
938
+ ${this.loading?s`<wui-icon name="spinner" size="md"></wui-icon>`:s`<wui-icon name="chevronRight" size="md"></wui-icon>`}
939
+ </button>`:null}templateError(){return this.errorText?s`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?s`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};Ai.styles=[w,m,Pi],Si([L()],Ai.prototype,"icon",void 0),Si([L({type:Boolean})],Ai.prototype,"disabled",void 0),Si([L({type:Boolean})],Ai.prototype,"loading",void 0),Si([L()],Ai.prototype,"placeholder",void 0),Si([L()],Ai.prototype,"type",void 0),Si([L()],Ai.prototype,"value",void 0),Si([L()],Ai.prototype,"errorText",void 0),Si([L()],Ai.prototype,"warningText",void 0),Si([L()],Ai.prototype,"onSubmit",void 0),Si([L()],Ai.prototype,"size",void 0),Si([L({attribute:!1})],Ai.prototype,"onKeyDown",void 0),Ai=Si([O("wui-input-text")],Ai);var Li=d`
940
+ :host {
941
+ position: relative;
942
+ display: inline-block;
943
+ width: 100%;
944
+ }
945
+
946
+ wui-icon {
947
+ position: absolute;
948
+ top: 50%;
949
+ transform: translateY(-50%);
950
+ right: ${({spacing:e})=>e[3]};
951
+ color: ${({tokens:e})=>e.theme.iconDefault};
952
+ cursor: pointer;
953
+ padding: ${({spacing:e})=>e[2]};
954
+ background-color: transparent;
955
+ border-radius: ${({borderRadius:e})=>e[4]};
956
+ transition: background-color ${({durations:e})=>e.lg}
957
+ ${({easings:e})=>e["ease-out-power-2"]};
958
+ }
959
+
960
+ @media (hover: hover) {
961
+ wui-icon:hover {
962
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
963
+ }
964
+ }
965
+ `,ji=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Oi=class extends e{constructor(){super(...arguments),this.inputComponentRef=yi(),this.inputValue=""}render(){return s`
966
+ <wui-input-text
967
+ ${$i(this.inputComponentRef)}
968
+ placeholder="Search wallet"
969
+ icon="search"
970
+ type="search"
971
+ enterKeyHint="search"
972
+ size="sm"
973
+ @inputChange=${this.onInputChange}
974
+ >
975
+ ${this.inputValue?s`<wui-icon
976
+ @click=${this.clearValue}
977
+ color="inherit"
978
+ size="sm"
979
+ name="close"
980
+ ></wui-icon>`:null}
981
+ </wui-input-text>
982
+ `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){const e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};Oi.styles=[w,Li],ji([L()],Oi.prototype,"inputValue",void 0),Oi=ji([O("wui-search-bar")],Oi);var Bi=d`
983
+ :host {
984
+ display: flex;
985
+ flex-direction: column;
986
+ justify-content: center;
987
+ align-items: center;
988
+ height: 104px;
989
+ width: 104px;
990
+ row-gap: ${({spacing:e})=>e[2]};
991
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
992
+ border-radius: ${({borderRadius:e})=>e[5]};
993
+ position: relative;
994
+ }
995
+
996
+ wui-shimmer[data-type='network'] {
997
+ border: none;
998
+ -webkit-clip-path: var(--apkt-path-network);
999
+ clip-path: var(--apkt-path-network);
1000
+ }
1001
+
1002
+ svg {
1003
+ position: absolute;
1004
+ width: 48px;
1005
+ height: 54px;
1006
+ z-index: 1;
1007
+ }
1008
+
1009
+ svg > path {
1010
+ stroke: ${({tokens:e})=>e.theme.foregroundSecondary};
1011
+ stroke-width: 1px;
1012
+ }
1013
+
1014
+ @media (max-width: 350px) {
1015
+ :host {
1016
+ width: 100%;
1017
+ }
1018
+ }
1019
+ `,Ni=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let _i=class extends e{constructor(){super(...arguments),this.type="wallet"}render(){return s`
1020
+ ${this.shimmerTemplate()}
1021
+ <wui-shimmer width="80px" height="20px"></wui-shimmer>
1022
+ `}shimmerTemplate(){return"network"===this.type?s` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer>
1023
+ ${z}`:s`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};_i.styles=[w,m,Bi],Ni([L()],_i.prototype,"type",void 0),_i=Ni([O("wui-card-select-loader")],_i);var Mi=S`
1024
+ :host {
1025
+ display: grid;
1026
+ width: inherit;
1027
+ height: inherit;
1028
+ }
1029
+ `,Wi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let zi=class extends e{render(){return this.style.cssText=`\n grid-template-rows: ${this.gridTemplateRows};\n grid-template-columns: ${this.gridTemplateColumns};\n justify-items: ${this.justifyItems};\n align-items: ${this.alignItems};\n justify-content: ${this.justifyContent};\n align-content: ${this.alignContent};\n column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`};\n row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`};\n gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`};\n padding-top: ${this.padding&&N.getSpacingStyles(this.padding,0)};\n padding-right: ${this.padding&&N.getSpacingStyles(this.padding,1)};\n padding-bottom: ${this.padding&&N.getSpacingStyles(this.padding,2)};\n padding-left: ${this.padding&&N.getSpacingStyles(this.padding,3)};\n margin-top: ${this.margin&&N.getSpacingStyles(this.margin,0)};\n margin-right: ${this.margin&&N.getSpacingStyles(this.margin,1)};\n margin-bottom: ${this.margin&&N.getSpacingStyles(this.margin,2)};\n margin-left: ${this.margin&&N.getSpacingStyles(this.margin,3)};\n `,s`<slot></slot>`}};zi.styles=[w,Mi],Wi([L()],zi.prototype,"gridTemplateRows",void 0),Wi([L()],zi.prototype,"gridTemplateColumns",void 0),Wi([L()],zi.prototype,"justifyItems",void 0),Wi([L()],zi.prototype,"alignItems",void 0),Wi([L()],zi.prototype,"justifyContent",void 0),Wi([L()],zi.prototype,"alignContent",void 0),Wi([L()],zi.prototype,"columnGap",void 0),Wi([L()],zi.prototype,"rowGap",void 0),Wi([L()],zi.prototype,"gap",void 0),Wi([L()],zi.prototype,"padding",void 0),Wi([L()],zi.prototype,"margin",void 0),zi=Wi([O("wui-grid")],zi);var Di=d`
1030
+ button {
1031
+ display: flex;
1032
+ flex-direction: column;
1033
+ justify-content: center;
1034
+ align-items: center;
1035
+ cursor: pointer;
1036
+ width: 104px;
1037
+ row-gap: ${({spacing:e})=>e[2]};
1038
+ padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[0]};
1039
+ background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
1040
+ border-radius: clamp(0px, ${({borderRadius:e})=>e[4]}, 20px);
1041
+ transition:
1042
+ color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]},
1043
+ background-color ${({durations:e})=>e.lg}
1044
+ ${({easings:e})=>e["ease-out-power-1"]},
1045
+ border-radius ${({durations:e})=>e.lg}
1046
+ ${({easings:e})=>e["ease-out-power-1"]};
1047
+ will-change: background-color, color, border-radius;
1048
+ outline: none;
1049
+ border: none;
1050
+ }
1051
+
1052
+ button > wui-flex > wui-text {
1053
+ color: ${({tokens:e})=>e.theme.textPrimary};
1054
+ max-width: 86px;
1055
+ white-space: nowrap;
1056
+ overflow: hidden;
1057
+ text-overflow: ellipsis;
1058
+ justify-content: center;
1059
+ }
1060
+
1061
+ button > wui-flex > wui-text.certified {
1062
+ max-width: 66px;
1063
+ }
1064
+
1065
+ @media (hover: hover) and (pointer: fine) {
1066
+ button:hover:enabled {
1067
+ background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
1068
+ }
1069
+ }
1070
+
1071
+ button:disabled > wui-flex > wui-text {
1072
+ color: ${({tokens:e})=>e.core.glass010};
1073
+ }
1074
+
1075
+ [data-selected='true'] {
1076
+ background-color: ${({colors:e})=>e.accent020};
1077
+ }
1078
+
1079
+ @media (hover: hover) and (pointer: fine) {
1080
+ [data-selected='true']:hover:enabled {
1081
+ background-color: ${({colors:e})=>e.accent010};
1082
+ }
1083
+ }
1084
+
1085
+ [data-selected='true']:active:enabled {
1086
+ background-color: ${({colors:e})=>e.accent010};
1087
+ }
1088
+
1089
+ @media (max-width: 350px) {
1090
+ button {
1091
+ width: 100%;
1092
+ }
1093
+ }
1094
+ `,Ui=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Fi=class extends e{constructor(){super(),this.observer=new IntersectionObserver((()=>{})),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1}))}),{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){const e="certified"===this.wallet?.badge_type;return s`
1095
+ <button>
1096
+ ${this.imageTemplate()}
1097
+ <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1">
1098
+ <wui-text
1099
+ variant="md-regular"
1100
+ color="inherit"
1101
+ class=${B(e?"certified":void 0)}
1102
+ >${this.wallet?.name}</wui-text
1103
+ >
1104
+ ${e?s`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
1105
+ </wui-flex>
1106
+ </button>
1107
+ `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():s`
1108
+ <wui-wallet-image
1109
+ size="lg"
1110
+ imageSrc=${B(this.imageSrc)}
1111
+ name=${B(this.wallet?.name)}
1112
+ .installed=${this.wallet?.installed??!1}
1113
+ badgeSize="sm"
1114
+ >
1115
+ </wui-wallet-image>
1116
+ `}shimmerTemplate(){return s`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=p.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await p.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,a.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:l.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};Fi.styles=Di,Ui([j()],Fi.prototype,"visible",void 0),Ui([j()],Fi.prototype,"imageSrc",void 0),Ui([j()],Fi.prototype,"imageLoading",void 0),Ui([j()],Fi.prototype,"isImpressed",void 0),Ui([L()],Fi.prototype,"explorerId",void 0),Ui([L()],Fi.prototype,"walletQuery",void 0),Ui([L()],Fi.prototype,"certified",void 0),Ui([L()],Fi.prototype,"displayIndex",void 0),Ui([L({type:Object})],Fi.prototype,"wallet",void 0),Fi=Ui([O("w3m-all-wallets-list-item")],Fi);var qi=d`
1117
+ wui-grid {
1118
+ max-height: clamp(360px, 400px, 80vh);
1119
+ overflow: scroll;
1120
+ scrollbar-width: none;
1121
+ grid-auto-rows: min-content;
1122
+ grid-template-columns: repeat(auto-fill, 104px);
1123
+ }
1124
+
1125
+ :host([data-mobile-fullscreen='true']) wui-grid {
1126
+ max-height: none;
1127
+ }
1128
+
1129
+ @media (max-width: 350px) {
1130
+ wui-grid {
1131
+ grid-template-columns: repeat(2, 1fr);
1132
+ }
1133
+ }
1134
+
1135
+ wui-grid[data-scroll='false'] {
1136
+ overflow: hidden;
1137
+ }
1138
+
1139
+ wui-grid::-webkit-scrollbar {
1140
+ display: none;
1141
+ }
1142
+
1143
+ w3m-all-wallets-list-item {
1144
+ opacity: 0;
1145
+ animation-duration: ${({durations:e})=>e.xl};
1146
+ animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]};
1147
+ animation-name: fade-in;
1148
+ animation-fill-mode: forwards;
1149
+ }
1150
+
1151
+ @keyframes fade-in {
1152
+ from {
1153
+ opacity: 0;
1154
+ }
1155
+ to {
1156
+ opacity: 1;
1157
+ }
1158
+ }
1159
+
1160
+ wui-loading-spinner {
1161
+ padding-top: ${({spacing:e})=>e[4]};
1162
+ padding-bottom: ${({spacing:e})=>e[4]};
1163
+ justify-content: center;
1164
+ grid-column: 1 / span 4;
1165
+ }
1166
+ `,Vi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Hi="local-paginator";let Ki=class extends e{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!i.state.wallets.length,this.wallets=i.state.wallets,this.mobileFullScreen=c.state.enableMobileFullScreen,this.unsubscribe.push(i.subscribeKey("wallets",(e=>this.wallets=e)))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),s`
1167
+ <wui-grid
1168
+ data-scroll=${!this.loading}
1169
+ .padding=${["0","3","3","3"]}
1170
+ gap="2"
1171
+ justifyContent="space-between"
1172
+ >
1173
+ ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
1174
+ ${this.paginationLoaderTemplate()}
1175
+ </wui-grid>
1176
+ `}async initialFetch(){this.loading=!0;const e=this.shadowRoot?.querySelector("wui-grid");e&&(await i.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map((()=>s`
1177
+ <wui-card-select-loader type="wallet" id=${B(t)}></wui-card-select-loader>
1178
+ `))}walletsTemplate(){return A.getWalletConnectWallets(this.wallets).map(((e,t)=>s`
1179
+ <w3m-all-wallets-list-item
1180
+ data-testid="wallet-search-item-${e.id}"
1181
+ @click=${()=>this.onConnectWallet(e)}
1182
+ .wallet=${e}
1183
+ explorerId=${e.id}
1184
+ certified=${"certified"===this.badge}
1185
+ displayIndex=${t}
1186
+ ></w3m-all-wallets-list-item>
1187
+ `))}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:n,count:o,mobileFilteredOutWalletsLength:r}=i.state,s=window.innerWidth<352?3:4,a=e.length+t.length;let l=Math.ceil(a/s)*s-a+s;return l-=e.length?n.length%s:0,0===o&&n.length>0?null:0===o||[...n,...e,...t].length<o-(r??0)?this.shimmerTemplate(l,Hi):null}createPaginationObserver(){const e=this.shadowRoot?.querySelector(`#${Hi}`);e&&(this.paginationObserver=new IntersectionObserver((([e])=>{if(e?.isIntersecting&&!this.loading){const{page:e,count:t,wallets:n}=i.state;n.length<t&&i.fetchWalletsByPage({page:e+1})}})),this.paginationObserver.observe(e))}onConnectWallet(e){t.selectWalletConnector(e)}};Ki.styles=qi,Vi([j()],Ki.prototype,"loading",void 0),Vi([j()],Ki.prototype,"wallets",void 0),Vi([j()],Ki.prototype,"badge",void 0),Vi([j()],Ki.prototype,"mobileFullScreen",void 0),Ki=Vi([O("w3m-all-wallets-list")],Ki);var Yi=S`
1188
+ wui-grid,
1189
+ wui-loading-spinner,
1190
+ wui-flex {
1191
+ height: 360px;
1192
+ }
1193
+
1194
+ wui-grid {
1195
+ overflow: scroll;
1196
+ scrollbar-width: none;
1197
+ grid-auto-rows: min-content;
1198
+ grid-template-columns: repeat(auto-fill, 104px);
1199
+ }
1200
+
1201
+ :host([data-mobile-fullscreen='true']) wui-grid {
1202
+ max-height: none;
1203
+ height: auto;
1204
+ }
1205
+
1206
+ wui-grid[data-scroll='false'] {
1207
+ overflow: hidden;
1208
+ }
1209
+
1210
+ wui-grid::-webkit-scrollbar {
1211
+ display: none;
1212
+ }
1213
+
1214
+ wui-loading-spinner {
1215
+ justify-content: center;
1216
+ align-items: center;
1217
+ }
1218
+
1219
+ @media (max-width: 350px) {
1220
+ wui-grid {
1221
+ grid-template-columns: repeat(2, 1fr);
1222
+ }
1223
+ }
1224
+ `,Ji=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Qi=class extends e{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=c.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?s`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){this.query.trim()===this.prevQuery.trim()&&this.badge===this.prevBadge||(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await i.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:e}=i.state,t=A.markWalletsAsInstalled(e),n=A.filterWalletsByWcSupport(t);return n.length?s`
1225
+ <wui-grid
1226
+ data-testid="wallet-list"
1227
+ .padding=${["0","3","3","3"]}
1228
+ rowGap="4"
1229
+ columngap="2"
1230
+ justifyContent="space-between"
1231
+ >
1232
+ ${n.map(((e,t)=>s`
1233
+ <w3m-all-wallets-list-item
1234
+ @click=${()=>this.onConnectWallet(e)}
1235
+ .wallet=${e}
1236
+ data-testid="wallet-search-item-${e.id}"
1237
+ explorerId=${e.id}
1238
+ certified=${"certified"===this.badge}
1239
+ walletQuery=${this.query}
1240
+ displayIndex=${t}
1241
+ ></w3m-all-wallets-list-item>
1242
+ `))}
1243
+ </wui-grid>
1244
+ `:s`
1245
+ <wui-flex
1246
+ data-testid="no-wallet-found"
1247
+ justifyContent="center"
1248
+ alignItems="center"
1249
+ gap="3"
1250
+ flexDirection="column"
1251
+ >
1252
+ <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box>
1253
+ <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium">
1254
+ No Wallet found
1255
+ </wui-text>
1256
+ </wui-flex>
1257
+ `}onConnectWallet(e){t.selectWalletConnector(e)}};Qi.styles=Yi,Ji([j()],Qi.prototype,"loading",void 0),Ji([j()],Qi.prototype,"mobileFullScreen",void 0),Ji([L()],Qi.prototype,"query",void 0),Ji([L()],Qi.prototype,"badge",void 0),Qi=Ji([O("w3m-all-wallets-search")],Qi);var Gi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let Xi=class extends e{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=n.debounce((e=>{this.search=e}))}render(){const e=this.search.length>=2;return s`
1258
+ <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center">
1259
+ <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
1260
+ <wui-certified-switch
1261
+ ?checked=${"certified"===this.badge}
1262
+ @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)}
1263
+ data-testid="wui-certified-switch"
1264
+ ></wui-certified-switch>
1265
+ ${this.qrButtonTemplate()}
1266
+ </wui-flex>
1267
+ ${e||this.badge?s`<w3m-all-wallets-search
1268
+ query=${this.search}
1269
+ .badge=${this.badge}
1270
+ ></w3m-all-wallets-search>`:s`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`}
1271
+ `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",y.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return n.isMobile()?s`
1272
+ <wui-icon-box
1273
+ size="xl"
1274
+ iconSize="xl"
1275
+ color="accent-primary"
1276
+ icon="qrCode"
1277
+ border
1278
+ borderColor="wui-accent-glass-010"
1279
+ @click=${this.onWalletConnectQr.bind(this)}
1280
+ ></wui-icon-box>
1281
+ `:null}onWalletConnectQr(){l.push("ConnectingWalletConnect")}};Gi([j()],Xi.prototype,"search",void 0),Gi([j()],Xi.prototype,"badge",void 0),Xi=Gi([O("w3m-all-wallets-view")],Xi);var Zi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let en=class extends e{constructor(){super(...arguments),this.wallet=l.state.data?.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return s`
1282
+ <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}>
1283
+ ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
1284
+ ${this.homepageTemplate()}
1285
+ </wui-flex>
1286
+ `}chromeTemplate(){return this.wallet?.chrome_store?s`<wui-list-item
1287
+ variant="icon"
1288
+ icon="chromeStore"
1289
+ iconVariant="square"
1290
+ @click=${this.onChromeStore.bind(this)}
1291
+ chevron
1292
+ >
1293
+ <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text>
1294
+ </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?s`<wui-list-item
1295
+ variant="icon"
1296
+ icon="appStore"
1297
+ iconVariant="square"
1298
+ @click=${this.onAppStore.bind(this)}
1299
+ chevron
1300
+ >
1301
+ <wui-text variant="md-medium" color="primary">iOS App</wui-text>
1302
+ </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?s`<wui-list-item
1303
+ variant="icon"
1304
+ icon="playStore"
1305
+ iconVariant="square"
1306
+ @click=${this.onPlayStore.bind(this)}
1307
+ chevron
1308
+ >
1309
+ <wui-text variant="md-medium" color="primary">Android App</wui-text>
1310
+ </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?s`
1311
+ <wui-list-item
1312
+ variant="icon"
1313
+ icon="browser"
1314
+ iconVariant="square-blue"
1315
+ @click=${this.onHomePage.bind(this)}
1316
+ chevron
1317
+ >
1318
+ <wui-text variant="md-medium" color="primary">Website</wui-text>
1319
+ </wui-list-item>
1320
+ `:null}openStore(e){e.href&&this.wallet&&(a.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),n.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};en=Zi([O("w3m-downloads-view")],en);export{Xi as W3mAllWalletsView,ui as W3mConnectingWcBasicView,en as W3mDownloadsView};