@dcl/vesting-dashboard 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/assets/PhArrowCircleDown-b4d1b9f0.js +14 -0
  2. package/assets/PhArrowClockwise-35e72491.js +14 -0
  3. package/assets/PhArrowDown-57c22b7e.js +14 -0
  4. package/assets/PhArrowLeft-f48f6a32.js +14 -0
  5. package/assets/PhArrowRight-86fee956.js +14 -0
  6. package/assets/PhArrowSquareOut-7b8bc76d.js +14 -0
  7. package/assets/PhArrowUp-cb14a0b1.js +14 -0
  8. package/assets/PhArrowUpRight-72a93a0e.js +14 -0
  9. package/assets/PhArrowsClockwise-ecc02e05.js +14 -0
  10. package/assets/PhArrowsDownUp-336a1435.js +14 -0
  11. package/assets/PhArrowsLeftRight-fbdccc02.js +14 -0
  12. package/assets/PhBank-31d2eba3.js +14 -0
  13. package/assets/PhBrowser-90d21d12.js +14 -0
  14. package/assets/PhCaretDown-3aabbdc5.js +14 -0
  15. package/assets/PhCaretLeft-282326ec.js +14 -0
  16. package/assets/PhCaretRight-7b09ae84.js +14 -0
  17. package/assets/PhCaretUp-e4584d94.js +14 -0
  18. package/assets/PhCheck-5730aae2.js +14 -0
  19. package/assets/PhCircleHalf-7d16bc06.js +14 -0
  20. package/assets/PhClock-8b060e99.js +14 -0
  21. package/assets/PhCompass-45d3bde6.js +14 -0
  22. package/assets/PhCopy-f77992ef.js +14 -0
  23. package/assets/PhCreditCard-c353277e.js +14 -0
  24. package/assets/PhCurrencyDollar-510272c7.js +14 -0
  25. package/assets/PhDesktop-49e8128e.js +14 -0
  26. package/assets/PhDeviceMobile-cfdf19ef.js +14 -0
  27. package/assets/PhDotsThree-69a484e4.js +14 -0
  28. package/assets/PhEnvelope-fc3dd2a0.js +14 -0
  29. package/assets/PhFunnelSimple-5abe9858.js +14 -0
  30. package/assets/PhGlobe-a1b4ca91.js +14 -0
  31. package/assets/PhIdentificationCard-80541484.js +14 -0
  32. package/assets/PhImage-6bbac6b7.js +14 -0
  33. package/assets/PhInfo-3481abef.js +14 -0
  34. package/assets/PhLightbulb-26b52ed2.js +14 -0
  35. package/assets/PhMagnifyingGlass-4dfb76cc.js +14 -0
  36. package/assets/PhPaperPlaneRight-e6cf54ef.js +14 -0
  37. package/assets/PhPlus-f5753116.js +14 -0
  38. package/assets/PhPower-8bf5c9c7.js +14 -0
  39. package/assets/PhPuzzlePiece-93f1c92b.js +14 -0
  40. package/assets/PhQrCode-03aa9f8a.js +14 -0
  41. package/assets/PhQuestion-6c2bd1ad.js +14 -0
  42. package/assets/PhQuestionMark-820f14af.js +14 -0
  43. package/assets/PhSealCheck-137e0b1b.js +14 -0
  44. package/assets/PhSignOut-ed65c268.js +14 -0
  45. package/assets/PhSpinner-19f53f69.js +14 -0
  46. package/assets/PhTrash-acb3ad59.js +14 -0
  47. package/assets/PhUser-92aa32ba.js +14 -0
  48. package/assets/PhVault-ed94ef20.js +14 -0
  49. package/assets/PhWarning-b2396b99.js +14 -0
  50. package/assets/PhWarningCircle-0f363973.js +14 -0
  51. package/assets/PhX-522d79dd.js +14 -0
  52. package/assets/basic-71b752f4.js +1435 -0
  53. package/assets/core-4faee1c5.js +254 -0
  54. package/assets/features-9e115e67.js +5 -0
  55. package/assets/{fortmatic-544d83cd.js → fortmatic-a2f74f79.js} +1 -1
  56. package/assets/{index-083f8aea.css → index-26cb9523.css} +7 -7
  57. package/assets/{index-eabed5f8.js → index-416f2a23.js} +1 -1
  58. package/assets/index-5365642e.js +40 -0
  59. package/assets/{index-fa03581b.js → index-79609ed9.js} +136 -130
  60. package/assets/index-7b29924c.js +7 -0
  61. package/assets/index-a7da0042.js +1321 -0
  62. package/assets/{index-c655b8a4.js → index-f2910622.js} +1 -1
  63. package/assets/index-fa32959a.js +26 -0
  64. package/assets/{index-4f5a2d6d.js → index-fc294794.js} +1 -1
  65. package/assets/native-88be1c15.js +1 -0
  66. package/assets/property-70d704fc.js +27 -0
  67. package/assets/w3m-modal-1eda3798.js +1209 -0
  68. package/index.html +4 -4
  69. package/package.json +3 -3
  70. package/assets/add-acf9b1b4.js +0 -15
  71. package/assets/all-wallets-8da20287.js +0 -6
  72. package/assets/app-store-e67aed93.js +0 -17
  73. package/assets/apple-729c27b3.js +0 -18
  74. package/assets/arrow-bottom-circle-813b263a.js +0 -11
  75. package/assets/arrow-bottom-d6bb311f.js +0 -8
  76. package/assets/arrow-left-3f704ffa.js +0 -8
  77. package/assets/arrow-right-17ab2e3f.js +0 -8
  78. package/assets/arrow-top-54da8ce5.js +0 -8
  79. package/assets/bank-e1f4c3fc.js +0 -14
  80. package/assets/basic-ad614917.js +0 -2128
  81. package/assets/browser-eb97127f.js +0 -14
  82. package/assets/card-b0c5c8c1.js +0 -14
  83. package/assets/checkmark-bf5ef01d.js +0 -11
  84. package/assets/checkmark-bold-7e354e06.js +0 -8
  85. package/assets/chevron-bottom-d89d2664.js +0 -8
  86. package/assets/chevron-left-c5f39fe4.js +0 -8
  87. package/assets/chevron-right-d3c55332.js +0 -8
  88. package/assets/chevron-top-d80ad128.js +0 -8
  89. package/assets/chrome-store-d9e64081.js +0 -61
  90. package/assets/clock-e0f81e9c.js +0 -8
  91. package/assets/close-27f760b9.js +0 -8
  92. package/assets/coinPlaceholder-7de9c936.js +0 -8
  93. package/assets/compass-b58b98ec.js +0 -8
  94. package/assets/copy-be90f370.js +0 -15
  95. package/assets/core-22576ab2.js +0 -910
  96. package/assets/cursor-57ee0abd.js +0 -3
  97. package/assets/cursor-transparent-57538744.js +0 -12
  98. package/assets/desktop-5acc8b3e.js +0 -9
  99. package/assets/disconnect-d3f01128.js +0 -8
  100. package/assets/discord-8dae2632.js +0 -17
  101. package/assets/etherscan-81f5f92a.js +0 -6
  102. package/assets/exclamation-triangle-886b7149.js +0 -4
  103. package/assets/extension-0e9ba8a4.js +0 -8
  104. package/assets/external-link-b676fc52.js +0 -8
  105. package/assets/facebook-8d75c929.js +0 -26
  106. package/assets/farcaster-aa884f8f.js +0 -12
  107. package/assets/filters-90e66ffd.js +0 -8
  108. package/assets/github-693f2bd4.js +0 -18
  109. package/assets/google-484b54cf.js +0 -18
  110. package/assets/help-circle-45787a88.js +0 -12
  111. package/assets/id-3b4cbdd1.js +0 -12
  112. package/assets/image-96c3f9d0.js +0 -4
  113. package/assets/index-22afa741.js +0 -7
  114. package/assets/index-f40605ee.js +0 -394
  115. package/assets/index.es-6a347079.js +0 -26
  116. package/assets/info-165d435a.js +0 -3
  117. package/assets/info-circle-5b599100.js +0 -12
  118. package/assets/lightbulb-c8f2bf4d.js +0 -3
  119. package/assets/mail-30ba2d81.js +0 -8
  120. package/assets/mobile-e938b174.js +0 -9
  121. package/assets/more-4e55b5a2.js +0 -11
  122. package/assets/network-placeholder-9e336806.js +0 -14
  123. package/assets/nftPlaceholder-8e616704.js +0 -8
  124. package/assets/off-a0926c5e.js +0 -8
  125. package/assets/play-store-dc96d93b.js +0 -32
  126. package/assets/plus-db04badc.js +0 -13
  127. package/assets/qr-code-e9ab5aef.js +0 -6
  128. package/assets/recycle-horizontal-e5f00cf2.js +0 -9
  129. package/assets/refresh-6674ef4c.js +0 -8
  130. package/assets/reown-logo-377bcb99.js +0 -12
  131. package/assets/search-3013ef36.js +0 -8
  132. package/assets/secp256k1-20c931a5.js +0 -1
  133. package/assets/secp256k1-c7caed23.js +0 -1
  134. package/assets/send-042fe740.js +0 -15
  135. package/assets/swapHorizontal-cdd26797.js +0 -8
  136. package/assets/swapHorizontalBold-c0c1ec1e.js +0 -8
  137. package/assets/swapHorizontalMedium-12dd3e75.js +0 -16
  138. package/assets/swapHorizontalRoundedBold-d4067e2b.js +0 -8
  139. package/assets/swapVertical-2c2ae8b1.js +0 -8
  140. package/assets/telegram-c0a71203.js +0 -16
  141. package/assets/three-dots-8119300b.js +0 -5
  142. package/assets/twitch-8d0de139.js +0 -18
  143. package/assets/twitterIcon-26917bdd.js +0 -6
  144. package/assets/verify-a135ffbd.js +0 -8
  145. package/assets/verify-filled-29fa924e.js +0 -8
  146. package/assets/w3m-modal-742fa0d2.js +0 -642
  147. package/assets/wallet-5649743f.js +0 -8
  148. package/assets/wallet-placeholder-32773694.js +0 -14
  149. package/assets/walletconnect-3189ad6b.js +0 -30
  150. package/assets/warning-circle-37a8b22f.js +0 -12
  151. package/assets/x-ee5c9ccd.js +0 -12
@@ -0,0 +1,1435 @@
1
+ import{i as k,C as j,A as S,a as _,b as R,c as qe,x as u,E as O,R as E,O as N,d as P,e as Lt,f as ge,g as ue,H as Cn,r as V,h as de,T as bt,S as Le,M as Ht,j as Kt,k as Gt,l as Qt,m as We,n as le,o as xn,p as En,q as Nt,s as Jt,W as yt}from"./core-4faee1c5.js";import{n as d,r as C,c as I,o as A,U as oe,i as Tn,t as Rn,e as _n}from"./index-a7da0042.js";import"./index-79609ed9.js";import"./index-fa32959a.js";var Ie=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let me=class extends k{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=j.state.connectors,this.count=S.state.count,this.filteredCount=S.state.filteredWallets.length,this.isFetchingRecommendedWallets=S.state.isFetchingRecommendedWallets,this.unsubscribe.push(j.subscribeKey("connectors",e=>this.connectors=e),S.subscribeKey("count",e=>this.count=e),S.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),S.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.find(c=>c.id==="walletConnect"),{allWallets:n}=N.state;if(!e||n==="HIDE"||n==="ONLY_MOBILE"&&!_.isMobile())return null;const o=S.state.featured.length,r=this.count+o,i=r<10?r:Math.floor(r/10)*10,s=this.filteredCount>0?this.filteredCount:i;let a=`${s}`;this.filteredCount>0?a=`${this.filteredCount}`:s<r&&(a=`${s}+`);const l=R.hasAnyConnection(qe.CONNECTOR_ID.WALLET_CONNECT);return u`
2
+ <wui-list-wallet
3
+ name="Search Wallet"
4
+ walletIcon="search"
5
+ showAllWallets
6
+ @click=${this.onAllWallets.bind(this)}
7
+ tagLabel=${a}
8
+ tagVariant="info"
9
+ data-testid="all-wallets"
10
+ tabIdx=${A(this.tabIdx)}
11
+ .loading=${this.isFetchingRecommendedWallets}
12
+ ?disabled=${l}
13
+ size="sm"
14
+ ></wui-list-wallet>
15
+ `}onAllWallets(){var e;O.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),E.push("AllWallets",{redirectView:(e=E.state.data)==null?void 0:e.redirectView})}};Ie([d()],me.prototype,"tabIdx",void 0);Ie([C()],me.prototype,"connectors",void 0);Ie([C()],me.prototype,"count",void 0);Ie([C()],me.prototype,"filteredCount",void 0);Ie([C()],me.prototype,"isFetchingRecommendedWallets",void 0);me=Ie([I("w3m-all-wallets-widget")],me);const Sn=P`
16
+ :host {
17
+ margin-top: ${({spacing:t})=>t[1]};
18
+ }
19
+ wui-separator {
20
+ margin: ${({spacing:t})=>t[3]} calc(${({spacing:t})=>t[3]} * -1)
21
+ ${({spacing:t})=>t[2]} calc(${({spacing:t})=>t[3]} * -1);
22
+ width: calc(100% + ${({spacing:t})=>t[3]} * 2);
23
+ }
24
+ `;var se=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let G=class extends k{constructor(){super(),this.unsubscribe=[],this.connectors=j.state.connectors,this.recommended=S.state.recommended,this.featured=S.state.featured,this.explorerWallets=S.state.explorerWallets,this.connections=R.state.connections,this.connectorImages=Lt.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(j.subscribeKey("connectors",e=>this.connectors=e),R.subscribeKey("connections",e=>this.connections=e),Lt.subscribeKey("connectorImages",e=>this.connectorImages=e),S.subscribeKey("recommended",e=>this.recommended=e),S.subscribeKey("featured",e=>this.featured=e),S.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e!=null&&e.length?e:S.state.explorerWallets}),S.subscribeKey("explorerWallets",e=>{var n;(n=this.explorerWallets)!=null&&n.length||(this.explorerWallets=e)})),_.isTelegram()&&_.isIos()&&(this.loadingTelegram=!R.state.wcUri,this.unsubscribe.push(R.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return u`
25
+ <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex>
26
+ `}mapConnectorsToExplorerWallets(e,n){return e.map(o=>{if(o.type==="MULTI_CHAIN"&&o.connectors){const i=o.connectors.map(c=>c.id),s=o.connectors.map(c=>c.name),a=o.connectors.map(c=>{var h;return(h=c.info)==null?void 0:h.rdns}),l=n==null?void 0:n.find(c=>i.includes(c.id)||s.includes(c.name)||c.rdns&&(a.includes(c.rdns)||i.includes(c.rdns)));return o.explorerWallet=l??o.explorerWallet,o}const r=n==null?void 0:n.find(i=>{var s;return i.id===o.id||i.rdns===((s=o.info)==null?void 0:s.rdns)||i.name===o.name});return o.explorerWallet=r??o.explorerWallet,o})}processConnectorsByType(e,n=!0){const o=ge.sortConnectorsByExplorerWallet([...e]);return n?o.filter(ge.showConnector):o}connectorListTemplate(){const e=this.mapConnectorsToExplorerWallets(this.connectors,this.explorerWallets??[]),n=ge.getConnectorsByType(e,this.recommended,this.featured),o=this.processConnectorsByType(n.announced.filter(p=>p.id!=="walletConnect")),r=this.processConnectorsByType(n.injected),i=this.processConnectorsByType(n.multiChain.filter(p=>p.name!=="WalletConnect"),!1),s=n.custom,a=n.recent,l=this.processConnectorsByType(n.external.filter(p=>p.id!==qe.CONNECTOR_ID.COINBASE_SDK)),c=n.recommended,h=n.featured,T=ge.getConnectorTypeOrder({custom:s,recent:a,announced:o,injected:r,multiChain:i,recommended:c,featured:h,external:l}),v=this.connectors.find(p=>p.id==="walletConnect"),y=_.isMobile(),$=[];for(const p of T)switch(p){case"walletConnect":{!y&&v&&$.push({kind:"connector",subtype:"walletConnect",connector:v});break}case"recent":{ge.getFilteredRecentWallets().forEach(f=>$.push({kind:"wallet",subtype:"recent",wallet:f}));break}case"injected":{i.forEach(w=>$.push({kind:"connector",subtype:"multiChain",connector:w})),o.forEach(w=>$.push({kind:"connector",subtype:"announced",connector:w})),r.forEach(w=>$.push({kind:"connector",subtype:"injected",connector:w}));break}case"featured":{h.forEach(w=>$.push({kind:"wallet",subtype:"featured",wallet:w}));break}case"custom":{ge.getFilteredCustomWallets(s??[]).forEach(f=>$.push({kind:"wallet",subtype:"custom",wallet:f}));break}case"external":{l.forEach(w=>$.push({kind:"connector",subtype:"external",connector:w}));break}case"recommended":{ge.getCappedRecommendedWallets(c).forEach(f=>$.push({kind:"wallet",subtype:"recommended",wallet:f}));break}default:console.warn(`Unknown connector type: ${p}`)}return $.map((p,w)=>p.kind==="connector"?this.renderConnector(p,w):this.renderWallet(p,w))}renderConnector(e,n){var T,v;const o=e.connector,r=ue.getConnectorImage(o)||this.connectorImages[(o==null?void 0:o.imageId)??""],s=(this.connections.get(o.chain)??[]).some(y=>Cn.isLowerCaseMatch(y.connectorId,o.id));let a,l;e.subtype==="multiChain"?(a="multichain",l="info"):e.subtype==="walletConnect"?(a="qr code",l="accent"):e.subtype==="injected"||e.subtype==="announced"?(a=s?"connected":"installed",l=s?"info":"success"):(a=void 0,l=void 0);const c=R.hasAnyConnection(qe.CONNECTOR_ID.WALLET_CONNECT),h=e.subtype==="walletConnect"||e.subtype==="external"?c:!1;return u`
27
+ <w3m-list-wallet
28
+ displayIndex=${n}
29
+ imageSrc=${A(r)}
30
+ .installed=${!0}
31
+ name=${o.name??"Unknown"}
32
+ .tagVariant=${l}
33
+ tagLabel=${A(a)}
34
+ data-testid=${`wallet-selector-${o.id.toLowerCase()}`}
35
+ size="sm"
36
+ @click=${()=>this.onClickConnector(e)}
37
+ tabIdx=${A(this.tabIdx)}
38
+ ?disabled=${h}
39
+ rdnsId=${A(((T=o.explorerWallet)==null?void 0:T.rdns)||void 0)}
40
+ walletRank=${A((v=o.explorerWallet)==null?void 0:v.order)}
41
+ >
42
+ </w3m-list-wallet>
43
+ `}onClickConnector(e){var o;const n=(o=E.state.data)==null?void 0:o.redirectView;if(e.subtype==="walletConnect"){j.setActiveConnector(e.connector),_.isMobile()?E.push("AllWallets"):E.push("ConnectingWalletConnect",{redirectView:n});return}if(e.subtype==="multiChain"){j.setActiveConnector(e.connector),E.push("ConnectingMultiChain",{redirectView:n});return}if(e.subtype==="injected"){j.setActiveConnector(e.connector),E.push("ConnectingExternal",{connector:e.connector,redirectView:n,wallet:e.connector.explorerWallet});return}if(e.subtype==="announced"){if(e.connector.id==="walletConnect"){_.isMobile()?E.push("AllWallets"):E.push("ConnectingWalletConnect",{redirectView:n});return}E.push("ConnectingExternal",{connector:e.connector,redirectView:n,wallet:e.connector.explorerWallet});return}E.push("ConnectingExternal",{connector:e.connector,redirectView:n})}renderWallet(e,n){const o=e.wallet,r=ue.getWalletImage(o),s=R.hasAnyConnection(qe.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,l=e.subtype==="recent"?"recent":void 0,c=e.subtype==="recent"?"info":void 0;return u`
44
+ <w3m-list-wallet
45
+ displayIndex=${n}
46
+ imageSrc=${A(r)}
47
+ name=${o.name??"Unknown"}
48
+ @click=${()=>this.onClickWallet(e)}
49
+ size="sm"
50
+ data-testid=${`wallet-selector-${o.id}`}
51
+ tabIdx=${A(this.tabIdx)}
52
+ ?loading=${a}
53
+ ?disabled=${s}
54
+ rdnsId=${A(o.rdns||void 0)}
55
+ walletRank=${A(o.order)}
56
+ tagLabel=${A(l)}
57
+ .tagVariant=${c}
58
+ >
59
+ </w3m-list-wallet>
60
+ `}onClickWallet(e){var r;const n=(r=E.state.data)==null?void 0:r.redirectView;if(e.subtype==="featured"){j.selectWalletConnector(e.wallet);return}if(e.subtype==="recent"){if(this.loadingTelegram)return;j.selectWalletConnector(e.wallet);return}if(e.subtype==="custom"){if(this.loadingTelegram)return;E.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:n});return}if(this.loadingTelegram)return;const o=j.getConnector({id:e.wallet.id,rdns:e.wallet.rdns});o?E.push("ConnectingExternal",{connector:o,redirectView:n}):E.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:n})}};G.styles=Sn;se([d({type:Number})],G.prototype,"tabIdx",void 0);se([C()],G.prototype,"connectors",void 0);se([C()],G.prototype,"recommended",void 0);se([C()],G.prototype,"featured",void 0);se([C()],G.prototype,"explorerWallets",void 0);se([C()],G.prototype,"connections",void 0);se([C()],G.prototype,"connectorImages",void 0);se([C()],G.prototype,"loadingTelegram",void 0);G=se([I("w3m-connector-list")],G);const In=P`
61
+ :host {
62
+ flex: 1;
63
+ height: 100%;
64
+ }
65
+
66
+ button {
67
+ width: 100%;
68
+ height: 100%;
69
+ display: inline-flex;
70
+ align-items: center;
71
+ padding: ${({spacing:t})=>t[1]} ${({spacing:t})=>t[2]};
72
+ column-gap: ${({spacing:t})=>t[1]};
73
+ color: ${({tokens:t})=>t.theme.textSecondary};
74
+ border-radius: ${({borderRadius:t})=>t[20]};
75
+ background-color: transparent;
76
+ transition: background-color ${({durations:t})=>t.lg}
77
+ ${({easings:t})=>t["ease-out-power-2"]};
78
+ will-change: background-color;
79
+ }
80
+
81
+ /* -- Hover & Active states ----------------------------------------------------------- */
82
+ button[data-active='true'] {
83
+ color: ${({tokens:t})=>t.theme.textPrimary};
84
+ background-color: ${({tokens:t})=>t.theme.foregroundTertiary};
85
+ }
86
+
87
+ button:hover:enabled:not([data-active='true']),
88
+ button:active:enabled:not([data-active='true']) {
89
+ wui-text,
90
+ wui-icon {
91
+ color: ${({tokens:t})=>t.theme.textPrimary};
92
+ }
93
+ }
94
+ `;var Oe=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};const kn={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},An={lg:"md",md:"sm",sm:"sm"};let we=class extends k{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return u`
95
+ <button data-active=${this.active}>
96
+ ${this.icon?u`<wui-icon size=${An[this.size]} name=${this.icon}></wui-icon>`:""}
97
+ <wui-text variant=${kn[this.size]}> ${this.label} </wui-text>
98
+ </button>
99
+ `}};we.styles=[V,de,In];Oe([d()],we.prototype,"icon",void 0);Oe([d()],we.prototype,"size",void 0);Oe([d()],we.prototype,"label",void 0);Oe([d({type:Boolean})],we.prototype,"active",void 0);we=Oe([I("wui-tab-item")],we);const Wn=P`
100
+ :host {
101
+ display: inline-flex;
102
+ align-items: center;
103
+ background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
104
+ border-radius: ${({borderRadius:t})=>t[32]};
105
+ padding: ${({spacing:t})=>t["01"]};
106
+ box-sizing: border-box;
107
+ }
108
+
109
+ :host([data-size='sm']) {
110
+ height: 26px;
111
+ }
112
+
113
+ :host([data-size='md']) {
114
+ height: 36px;
115
+ }
116
+ `;var Me=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let be=class extends k{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,n)=>{var r;const o=n===this.activeTab;return u`
117
+ <wui-tab-item
118
+ @click=${()=>this.onTabClick(n)}
119
+ icon=${e.icon}
120
+ size=${this.size}
121
+ label=${e.label}
122
+ ?active=${o}
123
+ data-active=${o}
124
+ data-testid="tab-${(r=e.label)==null?void 0:r.toLowerCase()}"
125
+ ></wui-tab-item>
126
+ `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};be.styles=[V,de,Wn];Me([d({type:Array})],be.prototype,"tabs",void 0);Me([d()],be.prototype,"onTabChange",void 0);Me([d()],be.prototype,"size",void 0);Me([C()],be.prototype,"activeTab",void 0);be=Me([I("wui-tabs")],be);var Tt=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let He=class extends k{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 u`
127
+ <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}>
128
+ <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>
129
+ </wui-flex>
130
+ `}generateTabs(){const e=this.platforms.map(n=>n==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:n==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:n==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:n==="web"?{label:"Webapp",icon:"browser",platform:"web"}:n==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:n})=>n),e}onTabChange(e){var o;const n=this.platformTabs[e];n&&((o=this.onSelectPlatfrom)==null||o.call(this,n))}};Tt([d({type:Array})],He.prototype,"platforms",void 0);Tt([d()],He.prototype,"onSelectPlatfrom",void 0);He=Tt([I("w3m-connecting-header")],He);const Pn=P`
131
+ :host {
132
+ display: block;
133
+ width: 100px;
134
+ height: 100px;
135
+ }
136
+
137
+ svg {
138
+ width: 100px;
139
+ height: 100px;
140
+ }
141
+
142
+ rect {
143
+ fill: none;
144
+ stroke: ${t=>t.colors.accent100};
145
+ stroke-width: 3px;
146
+ stroke-linecap: round;
147
+ animation: dash 1s linear infinite;
148
+ }
149
+
150
+ @keyframes dash {
151
+ to {
152
+ stroke-dashoffset: 0px;
153
+ }
154
+ }
155
+ `;var Yt=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Ke=class extends k{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,o=36-e,r=116+o,i=245+o,s=360+o*1.75;return u`
156
+ <svg viewBox="0 0 110 110" width="110" height="110">
157
+ <rect
158
+ x="2"
159
+ y="2"
160
+ width="106"
161
+ height="106"
162
+ rx=${e}
163
+ stroke-dasharray="${r} ${i}"
164
+ stroke-dashoffset=${s}
165
+ />
166
+ </svg>
167
+ `}};Ke.styles=[V,Pn];Yt([d({type:Number})],Ke.prototype,"radius",void 0);Ke=Yt([I("wui-loading-thumbnail")],Ke);const Bn=P`
168
+ wui-flex {
169
+ width: 100%;
170
+ height: 52px;
171
+ box-sizing: border-box;
172
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
173
+ border-radius: ${({borderRadius:t})=>t[5]};
174
+ padding-left: ${({spacing:t})=>t[3]};
175
+ padding-right: ${({spacing:t})=>t[3]};
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: space-between;
179
+ gap: ${({spacing:t})=>t[6]};
180
+ }
181
+
182
+ wui-text {
183
+ color: ${({tokens:t})=>t.theme.textSecondary};
184
+ }
185
+
186
+ wui-icon {
187
+ width: 12px;
188
+ height: 12px;
189
+ }
190
+ `;var ot=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let xe=class extends k{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return u`
191
+ <wui-flex justifyContent="space-between" alignItems="center">
192
+ <wui-text variant="lg-regular" color="inherit">${this.label}</wui-text>
193
+ <wui-button variant="accent-secondary" size="sm">
194
+ ${this.buttonLabel}
195
+ <wui-icon name="chevronRight" color="inherit" size="inherit" slot="iconRight"></wui-icon>
196
+ </wui-button>
197
+ </wui-flex>
198
+ `}};xe.styles=[V,de,Bn];ot([d({type:Boolean})],xe.prototype,"disabled",void 0);ot([d()],xe.prototype,"label",void 0);ot([d()],xe.prototype,"buttonLabel",void 0);xe=ot([I("wui-cta-button")],xe);const Ln=P`
199
+ :host {
200
+ display: block;
201
+ padding: 0 ${({spacing:t})=>t[5]} ${({spacing:t})=>t[5]};
202
+ }
203
+ `;var Xt=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Ge=class extends k{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:n,play_store:o,chrome_store:r,homepage:i}=this.wallet,s=_.isMobile(),a=_.isIos(),l=_.isAndroid(),c=[n,o,i,r].filter(Boolean).length>1,h=oe.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!s?u`
204
+ <wui-cta-button
205
+ label=${`Don't have ${h}?`}
206
+ buttonLabel="Get"
207
+ @click=${()=>E.push("Downloads",{wallet:this.wallet})}
208
+ ></wui-cta-button>
209
+ `:!c&&i?u`
210
+ <wui-cta-button
211
+ label=${`Don't have ${h}?`}
212
+ buttonLabel="Get"
213
+ @click=${this.onHomePage.bind(this)}
214
+ ></wui-cta-button>
215
+ `:n&&a?u`
216
+ <wui-cta-button
217
+ label=${`Don't have ${h}?`}
218
+ buttonLabel="Get"
219
+ @click=${this.onAppStore.bind(this)}
220
+ ></wui-cta-button>
221
+ `:o&&l?u`
222
+ <wui-cta-button
223
+ label=${`Don't have ${h}?`}
224
+ buttonLabel="Get"
225
+ @click=${this.onPlayStore.bind(this)}
226
+ ></wui-cta-button>
227
+ `:(this.style.display="none",null)}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&_.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&_.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&_.openHref(this.wallet.homepage,"_blank")}};Ge.styles=[Ln];Xt([d({type:Object})],Ge.prototype,"wallet",void 0);Ge=Xt([I("w3m-mobile-download-links")],Ge);const Nn=P`
228
+ @keyframes shake {
229
+ 0% {
230
+ transform: translateX(0);
231
+ }
232
+ 25% {
233
+ transform: translateX(3px);
234
+ }
235
+ 50% {
236
+ transform: translateX(-3px);
237
+ }
238
+ 75% {
239
+ transform: translateX(3px);
240
+ }
241
+ 100% {
242
+ transform: translateX(0);
243
+ }
244
+ }
245
+
246
+ wui-flex:first-child:not(:only-child) {
247
+ position: relative;
248
+ }
249
+
250
+ wui-wallet-image {
251
+ width: 56px;
252
+ height: 56px;
253
+ }
254
+
255
+ wui-loading-thumbnail {
256
+ position: absolute;
257
+ }
258
+
259
+ wui-icon-box {
260
+ position: absolute;
261
+ right: calc(${({spacing:t})=>t[1]} * -1);
262
+ bottom: calc(${({spacing:t})=>t[1]} * -1);
263
+ opacity: 0;
264
+ transform: scale(0.5);
265
+ transition-property: opacity, transform;
266
+ transition-duration: ${({durations:t})=>t.lg};
267
+ transition-timing-function: ${({easings:t})=>t["ease-out-power-2"]};
268
+ will-change: opacity, transform;
269
+ }
270
+
271
+ wui-text[align='center'] {
272
+ width: 100%;
273
+ padding: 0px ${({spacing:t})=>t[4]};
274
+ }
275
+
276
+ [data-error='true'] wui-icon-box {
277
+ opacity: 1;
278
+ transform: scale(1);
279
+ }
280
+
281
+ [data-error='true'] > wui-flex:first-child {
282
+ animation: shake 250ms ${({easings:t})=>t["ease-out-power-2"]} both;
283
+ }
284
+
285
+ [data-retry='false'] wui-link {
286
+ display: none;
287
+ }
288
+
289
+ [data-retry='true'] wui-link {
290
+ display: block;
291
+ opacity: 1;
292
+ }
293
+
294
+ w3m-mobile-download-links {
295
+ padding: 0px;
296
+ width: 100%;
297
+ }
298
+ `;var Q=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};class L extends k{constructor(){var e,n,o,r,i;super(),this.wallet=(e=E.state.data)==null?void 0:e.wallet,this.connector=(n=E.state.data)==null?void 0:n.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=ue.getConnectorImage(this.connector)??ue.getWalletImage(this.wallet),this.name=((o=this.wallet)==null?void 0:o.name)??((r=this.connector)==null?void 0:r.name)??"Wallet",this.isRetrying=!1,this.uri=R.state.wcUri,this.error=R.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(R.subscribeKey("wcUri",s=>{var a;this.uri=s,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(a=this.onConnect)==null||a.call(this))}),R.subscribeKey("wcError",s=>this.error=s)),(_.isTelegram()||_.isSafari())&&_.isIos()&&R.state.wcUri&&((i=this.onConnect)==null||i.call(this))}firstUpdated(){var e;(e=this.onAutoConnect)==null||e.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),R.setWcError(!1),clearTimeout(this.timeout)}render(){var o;(o=this.onRender)==null||o.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let n="";return this.label?n=this.label:(n=`Continue in ${this.name}`,this.error&&(n="Connection declined")),u`
299
+ <wui-flex
300
+ data-error=${A(this.error)}
301
+ data-retry=${this.showRetry}
302
+ flexDirection="column"
303
+ alignItems="center"
304
+ .padding=${["10","5","5","5"]}
305
+ gap="6"
306
+ >
307
+ <wui-flex gap="2" justifyContent="center" alignItems="center">
308
+ <wui-wallet-image size="lg" imageSrc=${A(this.imageSrc)}></wui-wallet-image>
309
+
310
+ ${this.error?null:this.loaderTemplate()}
311
+
312
+ <wui-icon-box
313
+ color="error"
314
+ icon="close"
315
+ size="sm"
316
+ border
317
+ borderColor="wui-color-bg-125"
318
+ ></wui-icon-box>
319
+ </wui-flex>
320
+
321
+ <wui-flex flexDirection="column" alignItems="center" gap="6"> <wui-flex
322
+ flexDirection="column"
323
+ alignItems="center"
324
+ gap="2"
325
+ .padding=${["2","0","0","0"]}
326
+ >
327
+ <wui-text align="center" variant="lg-medium" color=${this.error?"error":"primary"}>
328
+ ${n}
329
+ </wui-text>
330
+ <wui-text align="center" variant="lg-regular" color="secondary">${e}</wui-text>
331
+ </wui-flex>
332
+
333
+ ${this.secondaryBtnLabel?u`
334
+ <wui-button
335
+ variant="neutral-secondary"
336
+ size="md"
337
+ ?disabled=${this.isRetrying||this.isLoading}
338
+ @click=${this.onTryAgain.bind(this)}
339
+ data-testid="w3m-connecting-widget-secondary-button"
340
+ >
341
+ <wui-icon
342
+ color="inherit"
343
+ slot="iconLeft"
344
+ name=${this.secondaryBtnIcon}
345
+ ></wui-icon>
346
+ ${this.secondaryBtnLabel}
347
+ </wui-button>
348
+ `:null}
349
+ </wui-flex>
350
+
351
+ ${this.isWalletConnect?u`
352
+ <wui-flex .padding=${["0","5","5","5"]} justifyContent="center">
353
+ <wui-link
354
+ @click=${this.onCopyUri}
355
+ variant="secondary"
356
+ icon="copy"
357
+ data-testid="wui-link-copy"
358
+ >
359
+ Copy link
360
+ </wui-link>
361
+ </wui-flex>
362
+ `:null}
363
+
364
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links></wui-flex>
365
+ </wui-flex>
366
+ `}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const n=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");n==null||n.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var e,n;R.setWcError(!1),this.onRetry?(this.isRetrying=!0,(e=this.onRetry)==null||e.call(this)):(n=this.onConnect)==null||n.call(this)}loaderTemplate(){const e=bt.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return u`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(_.copyToClopboard(this.uri),Le.showSuccess("Link copied"))}catch{Le.showError("Failed to copy")}}}L.styles=Nn;Q([C()],L.prototype,"isRetrying",void 0);Q([C()],L.prototype,"uri",void 0);Q([C()],L.prototype,"error",void 0);Q([C()],L.prototype,"ready",void 0);Q([C()],L.prototype,"showRetry",void 0);Q([C()],L.prototype,"label",void 0);Q([C()],L.prototype,"secondaryBtnLabel",void 0);Q([C()],L.prototype,"secondaryLabel",void 0);Q([C()],L.prototype,"isLoading",void 0);Q([d({type:Boolean})],L.prototype,"isMobile",void 0);Q([d()],L.prototype,"onRetry",void 0);var On=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Ot=class extends L{constructor(){var e;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),O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:(e=this.wallet)==null?void 0:e.display_index,walletRank:this.wallet.order,view:E.state.view}})}async onConnectProxy(){var e,n;try{this.error=!1;const{connectors:o}=j.state,r=o.find(i=>{var s,a,l;return i.type==="ANNOUNCED"&&((s=i.info)==null?void 0:s.rdns)===((a=this.wallet)==null?void 0:a.rdns)||i.type==="INJECTED"||i.name===((l=this.wallet)==null?void 0:l.name)});if(r)await R.connectExternal(r,r.chain);else throw new Error("w3m-connecting-wc-browser: No connector found");Ht.close(),O.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((e=this.wallet)==null?void 0:e.name)||"Unknown",view:E.state.view,walletRank:(n=this.wallet)==null?void 0:n.order}})}catch(o){o instanceof Kt&&o.originalName===Gt.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?O.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:o.message}}):O.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(o==null?void 0:o.message)??"Unknown"}}),this.error=!0}}};Ot=On([I("w3m-connecting-wc-browser")],Ot);var Mn=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Mt=class extends L{constructor(){var e;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),O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:(e=this.wallet)==null?void 0:e.display_index,walletRank:this.wallet.order,view:E.state.view}})}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:n,name:o}=this.wallet,{redirect:r,href:i}=_.formatNativeUrl(n,this.uri);R.setWcLinking({name:o,href:i}),R.setRecentWallet(this.wallet),_.openHref(r,"_blank")}catch{this.error=!0}}};Mt=Mn([I("w3m-connecting-wc-desktop")],Mt);var ke=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let ye=class extends L{constructor(){var e;if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=N.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{var n;if((n=this.wallet)!=null&&n.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:o,link_mode:r,name:i}=this.wallet,{redirect:s,redirectUniversalLink:a,href:l}=_.formatNativeUrl(o,this.uri,r);this.redirectDeeplink=s,this.redirectUniversalLink=a,this.target=_.isIframe()?"_top":"_self",R.setWcLinking({name:i,href:l}),R.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?_.openHref(this.redirectUniversalLink,this.target):_.openHref(this.redirectDeeplink,this.target)}catch(o){O.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:o instanceof Error?o.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=Qt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(R.subscribeKey("wcUri",()=>{this.onHandleURI()})),O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:(e=this.wallet)==null?void 0:e.display_index,walletRank:this.wallet.order,view:E.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){var e;this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onTryAgain(){var e;R.setWcError(!1),(e=this.onConnect)==null||e.call(this)}};ke([C()],ye.prototype,"redirectDeeplink",void 0);ke([C()],ye.prototype,"redirectUniversalLink",void 0);ke([C()],ye.prototype,"target",void 0);ke([C()],ye.prototype,"preferUniversalLinks",void 0);ke([C()],ye.prototype,"isLoading",void 0);ye=ke([I("w3m-connecting-wc-mobile")],ye);var De={},Dn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Zt={},U={};let Rt;const jn=[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];U.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 e*4+17};U.getSymbolTotalCodewords=function(e){return jn[e]};U.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};U.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Rt=e};U.isKanjiModeEnabled=function(){return typeof Rt<"u"};U.toSJIS=function(e){return Rt(e)};var rt={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,r){if(t.isValid(o))return o;try{return e(o)}catch{return r}}})(rt);function en(){this.buffer=[],this.length=0}en.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Un=en;function je(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}je.prototype.set=function(t,e,n,o){const r=t*this.size+e;this.data[r]=n,o&&(this.reservedBit[r]=!0)};je.prototype.get=function(t,e){return this.data[t*this.size+e]};je.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};je.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var zn=je,tn={};(function(t){const e=U.getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const r=Math.floor(o/7)+2,i=e(o),s=i===145?26:Math.ceil((i-13)/(2*r-2))*2,a=[i-7];for(let l=1;l<r-1;l++)a[l]=a[l-1]-s;return a.push(6),a.reverse()},t.getPositions=function(o){const r=[],i=t.getRowColCoords(o),s=i.length;for(let a=0;a<s;a++)for(let l=0;l<s;l++)a===0&&l===0||a===0&&l===s-1||a===s-1&&l===0||r.push([i[a],i[l]]);return r}})(tn);var nn={};const Fn=U.getSymbolSize,Dt=7;nn.getPositions=function(e){const n=Fn(e);return[[0,0],[n-Dt,0],[0,n-Dt]]};var on={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const i=r.size;let s=0,a=0,l=0,c=null,h=null;for(let T=0;T<i;T++){a=l=0,c=h=null;for(let v=0;v<i;v++){let y=r.get(T,v);y===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=y,a=1),y=r.get(v,T),y===h?l++:(l>=5&&(s+=e.N1+(l-5)),h=y,l=1)}a>=5&&(s+=e.N1+(a-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(r){const i=r.size;let s=0;for(let a=0;a<i-1;a++)for(let l=0;l<i-1;l++){const c=r.get(a,l)+r.get(a,l+1)+r.get(a+1,l)+r.get(a+1,l+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(r){const i=r.size;let s=0,a=0,l=0;for(let c=0;c<i;c++){a=l=0;for(let h=0;h<i;h++)a=a<<1&2047|r.get(c,h),h>=10&&(a===1488||a===93)&&s++,l=l<<1&2047|r.get(h,c),h>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(r){let i=0;const s=r.data.length;for(let l=0;l<s;l++)i+=r.data[l];return Math.abs(Math.ceil(i*100/s/5)-10)*e.N4};function n(o,r,i){switch(o){case t.Patterns.PATTERN000:return(r+i)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return i%3===0;case t.Patterns.PATTERN011:return(r+i)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2===0;case t.Patterns.PATTERN101:return r*i%2+r*i%3===0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2===0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(r,i){const s=i.size;for(let a=0;a<s;a++)for(let l=0;l<s;l++)i.isReserved(l,a)||i.xor(l,a,n(r,l,a))},t.getBestMask=function(r,i){const s=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let c=0;c<s;c++){i(c),t.applyMask(c,r);const h=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(c,r),h<l&&(l=h,a=c)}return a}})(on);var st={};const ce=rt,Fe=[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],Ve=[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];st.getBlocksCount=function(e,n){switch(n){case ce.L:return Fe[(e-1)*4+0];case ce.M:return Fe[(e-1)*4+1];case ce.Q:return Fe[(e-1)*4+2];case ce.H:return Fe[(e-1)*4+3];default:return}};st.getTotalCodewordsCount=function(e,n){switch(n){case ce.L:return Ve[(e-1)*4+0];case ce.M:return Ve[(e-1)*4+1];case ce.Q:return Ve[(e-1)*4+2];case ce.H:return Ve[(e-1)*4+3];default:return}};var rn={},at={};const Pe=new Uint8Array(512),Qe=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)Pe[n]=e,Qe[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)Pe[n]=Pe[n-255]})();at.log=function(e){if(e<1)throw new Error("log("+e+")");return Qe[e]};at.exp=function(e){return Pe[e]};at.mul=function(e,n){return e===0||n===0?0:Pe[Qe[e]+Qe[n]]};(function(t){const e=at;t.mul=function(o,r){const i=new Uint8Array(o.length+r.length-1);for(let s=0;s<o.length;s++)for(let a=0;a<r.length;a++)i[s+a]^=e.mul(o[s],r[a]);return i},t.mod=function(o,r){let i=new Uint8Array(o);for(;i.length-r.length>=0;){const s=i[0];for(let l=0;l<r.length;l++)i[l]^=e.mul(r[l],s);let a=0;for(;a<i.length&&i[a]===0;)a++;i=i.slice(a)}return i},t.generateECPolynomial=function(o){let r=new Uint8Array([1]);for(let i=0;i<o;i++)r=t.mul(r,new Uint8Array([1,e.exp(i)]));return r}})(rn);const sn=rn;function _t(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}_t.prototype.initialize=function(e){this.degree=e,this.genPoly=sn.generateECPolynomial(this.degree)};_t.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const o=sn.mod(n,this.genPoly),r=this.degree-o.length;if(r>0){const i=new Uint8Array(this.degree);return i.set(o,r),i}return o};var Vn=_t,an={},he={},St={};St.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Z={};const ln="[0-9]+",qn="[A-Z $%*+\\-./:]+";let Ne="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ne=Ne.replace(/u/g,"\\u");const Hn="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ne+`)(?:.|[\r
367
+ ]))+`;Z.KANJI=new RegExp(Ne,"g");Z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Z.BYTE=new RegExp(Hn,"g");Z.NUMERIC=new RegExp(ln,"g");Z.ALPHANUMERIC=new RegExp(qn,"g");const Kn=new RegExp("^"+Ne+"$"),Gn=new RegExp("^"+ln+"$"),Qn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Z.testKanji=function(e){return Kn.test(e)};Z.testNumeric=function(e){return Gn.test(e)};Z.testAlphanumeric=function(e){return Qn.test(e)};(function(t){const e=St,n=Z;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function o(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(i,s){if(t.isValid(i))return i;try{return o(i)}catch{return s}}})(he);(function(t){const e=U,n=st,o=rt,r=he,i=St,s=7973,a=e.getBCHDigit(s);function l(v,y,$){for(let p=1;p<=40;p++)if(y<=t.getCapacity(p,$,v))return p}function c(v,y){return r.getCharCountIndicator(v,y)+4}function h(v,y){let $=0;return v.forEach(function(p){const w=c(p.mode,y);$+=w+p.getBitsLength()}),$}function T(v,y){for(let $=1;$<=40;$++)if(h(v,$)<=t.getCapacity($,y,r.MIXED))return $}t.from=function(y,$){return i.isValid(y)?parseInt(y,10):$},t.getCapacity=function(y,$,p){if(!i.isValid(y))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=r.BYTE);const w=e.getSymbolTotalCodewords(y),f=n.getTotalCodewordsCount(y,$),m=(w-f)*8;if(p===r.MIXED)return m;const b=m-c(p,y);switch(p){case r.NUMERIC:return Math.floor(b/10*3);case r.ALPHANUMERIC:return Math.floor(b/11*2);case r.KANJI:return Math.floor(b/13);case r.BYTE:default:return Math.floor(b/8)}},t.getBestVersionForData=function(y,$){let p;const w=o.from($,o.M);if(Array.isArray(y)){if(y.length>1)return T(y,w);if(y.length===0)return 1;p=y[0]}else p=y;return l(p.mode,p.getLength(),w)},t.getEncodedBits=function(y){if(!i.isValid(y)||y<7)throw new Error("Invalid QR Code version");let $=y<<12;for(;e.getBCHDigit($)-a>=0;)$^=s<<e.getBCHDigit($)-a;return y<<12|$}})(an);var cn={};const $t=U,un=1335,Jn=21522,jt=$t.getBCHDigit(un);cn.getEncodedBits=function(e,n){const o=e.bit<<3|n;let r=o<<10;for(;$t.getBCHDigit(r)-jt>=0;)r^=un<<$t.getBCHDigit(r)-jt;return(o<<10|r)^Jn};var dn={};const Yn=he;function Ee(t){this.mode=Yn.NUMERIC,this.data=t.toString()}Ee.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Ee.prototype.getLength=function(){return this.data.length};Ee.prototype.getBitsLength=function(){return Ee.getBitsLength(this.data.length)};Ee.prototype.write=function(e){let n,o,r;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),r=parseInt(o,10),e.put(r,10);const i=this.data.length-n;i>0&&(o=this.data.substr(n),r=parseInt(o,10),e.put(r,i*3+1))};var Xn=Ee;const Zn=he,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 Te(t){this.mode=Zn.ALPHANUMERIC,this.data=t}Te.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Te.prototype.getLength=function(){return this.data.length};Te.prototype.getBitsLength=function(){return Te.getBitsLength(this.data.length)};Te.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let o=dt.indexOf(this.data[n])*45;o+=dt.indexOf(this.data[n+1]),e.put(o,11)}this.data.length%2&&e.put(dt.indexOf(this.data[n]),6)};var ei=Te,ti=function(e){for(var n=[],o=e.length,r=0;r<o;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&o>r+1){var s=e.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,r+=1)}if(i<128){n.push(i);continue}if(i<2048){n.push(i>>6|192),n.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128);continue}if(i>=65536&&i<=1114111){n.push(i>>18|240),n.push(i>>12&63|128),n.push(i>>6&63|128),n.push(i&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const ni=ti,ii=he;function Re(t){this.mode=ii.BYTE,typeof t=="string"&&(t=ni(t)),this.data=new Uint8Array(t)}Re.getBitsLength=function(e){return e*8};Re.prototype.getLength=function(){return this.data.length};Re.prototype.getBitsLength=function(){return Re.getBitsLength(this.data.length)};Re.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var oi=Re;const ri=he,si=U;function _e(t){this.mode=ri.KANJI,this.data=t}_e.getBitsLength=function(e){return e*13};_e.prototype.getLength=function(){return this.data.length};_e.prototype.getBitsLength=function(){return _e.getBitsLength(this.data.length)};_e.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=si.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
368
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var ai=_e,hn={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,o,r){var i={},s={};s[o]=0;var a=e.PriorityQueue.make();a.push(o,0);for(var l,c,h,T,v,y,$,p,w;!a.empty();){l=a.pop(),c=l.value,T=l.cost,v=n[c]||{};for(h in v)v.hasOwnProperty(h)&&(y=v[h],$=T+y,p=s[h],w=typeof s[h]>"u",(w||p>$)&&(s[h]=$,a.push(h,$),i[h]=c))}if(typeof r<"u"&&typeof s[r]>"u"){var f=["Could not find a path from ",o," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(n,o){for(var r=[],i=o;i;)r.push(i),n[i],i=n[i];return r.reverse(),r},find_path:function(n,o,r){var i=e.single_source_shortest_paths(n,o,r);return e.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(n){var o=e.PriorityQueue,r={},i;n=n||{};for(i in o)o.hasOwnProperty(i)&&(r[i]=o[i]);return r.queue=[],r.sorter=n.sorter||o.default_sorter,r},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var r={value:n,cost:o};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(hn);var li=hn.exports;(function(t){const e=he,n=Xn,o=ei,r=oi,i=ai,s=Z,a=U,l=li;function c(f){return unescape(encodeURIComponent(f)).length}function h(f,m,b){const g=[];let x;for(;(x=f.exec(b))!==null;)g.push({data:x[0],index:x.index,mode:m,length:x[0].length});return g}function T(f){const m=h(s.NUMERIC,e.NUMERIC,f),b=h(s.ALPHANUMERIC,e.ALPHANUMERIC,f);let g,x;return a.isKanjiModeEnabled()?(g=h(s.BYTE,e.BYTE,f),x=h(s.KANJI,e.KANJI,f)):(g=h(s.BYTE_KANJI,e.BYTE,f),x=[]),m.concat(b,g,x).sort(function(B,K){return B.index-K.index}).map(function(B){return{data:B.data,mode:B.mode,length:B.length}})}function v(f,m){switch(m){case e.NUMERIC:return n.getBitsLength(f);case e.ALPHANUMERIC:return o.getBitsLength(f);case e.KANJI:return i.getBitsLength(f);case e.BYTE:return r.getBitsLength(f)}}function y(f){return f.reduce(function(m,b){const g=m.length-1>=0?m[m.length-1]:null;return g&&g.mode===b.mode?(m[m.length-1].data+=b.data,m):(m.push(b),m)},[])}function $(f){const m=[];for(let b=0;b<f.length;b++){const g=f[b];switch(g.mode){case e.NUMERIC:m.push([g,{data:g.data,mode:e.ALPHANUMERIC,length:g.length},{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.ALPHANUMERIC:m.push([g,{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.KANJI:m.push([g,{data:g.data,mode:e.BYTE,length:c(g.data)}]);break;case e.BYTE:m.push([{data:g.data,mode:e.BYTE,length:c(g.data)}])}}return m}function p(f,m){const b={},g={start:{}};let x=["start"];for(let W=0;W<f.length;W++){const B=f[W],K=[];for(let ae=0;ae<B.length;ae++){const J=B[ae],Ae=""+W+ae;K.push(Ae),b[Ae]={node:J,lastCount:0},g[Ae]={};for(let ut=0;ut<x.length;ut++){const ne=x[ut];b[ne]&&b[ne].node.mode===J.mode?(g[ne][Ae]=v(b[ne].lastCount+J.length,J.mode)-v(b[ne].lastCount,J.mode),b[ne].lastCount+=J.length):(b[ne]&&(b[ne].lastCount=J.length),g[ne][Ae]=v(J.length,J.mode)+4+e.getCharCountIndicator(J.mode,m))}}x=K}for(let W=0;W<x.length;W++)g[x[W]].end=0;return{map:g,table:b}}function w(f,m){let b;const g=e.getBestModeForData(f);if(b=e.from(m,g),b!==e.BYTE&&b.bit<g.bit)throw new Error('"'+f+'" cannot be encoded with mode '+e.toString(b)+`.
369
+ Suggested mode is: `+e.toString(g));switch(b===e.KANJI&&!a.isKanjiModeEnabled()&&(b=e.BYTE),b){case e.NUMERIC:return new n(f);case e.ALPHANUMERIC:return new o(f);case e.KANJI:return new i(f);case e.BYTE:return new r(f)}}t.fromArray=function(m){return m.reduce(function(b,g){return typeof g=="string"?b.push(w(g,null)):g.data&&b.push(w(g.data,g.mode)),b},[])},t.fromString=function(m,b){const g=T(m,a.isKanjiModeEnabled()),x=$(g),W=p(x,b),B=l.find_path(W.map,"start","end"),K=[];for(let ae=1;ae<B.length-1;ae++)K.push(W.table[B[ae]].node);return t.fromArray(y(K))},t.rawSplit=function(m){return t.fromArray(T(m,a.isKanjiModeEnabled()))}})(dn);const lt=U,ht=rt,ci=Un,ui=zn,di=tn,hi=nn,vt=on,Ct=st,pi=Vn,Je=an,fi=cn,gi=he,pt=dn;function mi(t,e){const n=t.size,o=hi.getPositions(e);for(let r=0;r<o.length;r++){const i=o[r][0],s=o[r][1];for(let a=-1;a<=7;a++)if(!(i+a<=-1||n<=i+a))for(let l=-1;l<=7;l++)s+l<=-1||n<=s+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(i+a,s+l,!0,!0):t.set(i+a,s+l,!1,!0))}}function wi(t){const e=t.size;for(let n=8;n<e-8;n++){const o=n%2===0;t.set(n,6,o,!0),t.set(6,n,o,!0)}}function bi(t,e){const n=di.getPositions(e);for(let o=0;o<n.length;o++){const r=n[o][0],i=n[o][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?t.set(r+s,i+a,!0,!0):t.set(r+s,i+a,!1,!0)}}function yi(t,e){const n=t.size,o=Je.getEncodedBits(e);let r,i,s;for(let a=0;a<18;a++)r=Math.floor(a/3),i=a%3+n-8-3,s=(o>>a&1)===1,t.set(r,i,s,!0),t.set(i,r,s,!0)}function ft(t,e,n){const o=t.size,r=fi.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=(r>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(o-15+i,8,s,!0),i<8?t.set(8,o-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(o-8,8,1,!0)}function $i(t,e){const n=t.size;let o=-1,r=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(r,a-l)){let c=!1;s<e.length&&(c=(e[s]>>>i&1)===1),t.set(r,a-l,c),i--,i===-1&&(s++,i=7)}if(r+=o,r<0||n<=r){r-=o,o=-o;break}}}function vi(t,e,n){const o=new ci;n.forEach(function(l){o.put(l.mode.bit,4),o.put(l.getLength(),gi.getCharCountIndicator(l.mode,t)),l.write(o)});const r=lt.getSymbolTotalCodewords(t),i=Ct.getTotalCodewordsCount(t,e),s=(r-i)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const a=(s-o.getLengthInBits())/8;for(let l=0;l<a;l++)o.put(l%2?17:236,8);return Ci(o,t,e)}function Ci(t,e,n){const o=lt.getSymbolTotalCodewords(e),r=Ct.getTotalCodewordsCount(e,n),i=o-r,s=Ct.getBlocksCount(e,n),a=o%s,l=s-a,c=Math.floor(o/s),h=Math.floor(i/s),T=h+1,v=c-h,y=new pi(v);let $=0;const p=new Array(s),w=new Array(s);let f=0;const m=new Uint8Array(t.buffer);for(let B=0;B<s;B++){const K=B<l?h:T;p[B]=m.slice($,$+K),w[B]=y.encode(p[B]),$+=K,f=Math.max(f,K)}const b=new Uint8Array(o);let g=0,x,W;for(x=0;x<f;x++)for(W=0;W<s;W++)x<p[W].length&&(b[g++]=p[W][x]);for(x=0;x<v;x++)for(W=0;W<s;W++)b[g++]=w[W][x];return b}function xi(t,e,n,o){let r;if(Array.isArray(t))r=pt.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const h=pt.rawSplit(t);c=Je.getBestVersionForData(h,n)}r=pt.fromString(t,c||40)}else throw new Error("Invalid data");const i=Je.getBestVersionForData(r,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(`
370
+ The chosen QR Code version cannot contain this amount of data.
371
+ Minimum version required to store current data is: `+i+`.
372
+ `);const s=vi(e,n,r),a=lt.getSymbolSize(e),l=new ui(a);return mi(l,e),wi(l),bi(l,e),ft(l,n,0),e>=7&&yi(l,e),$i(l,s),isNaN(o)&&(o=vt.getBestMask(l,ft.bind(null,l,n))),vt.applyMask(o,l),ft(l,n,o),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:o,segments:r}}Zt.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let o=ht.M,r,i;return typeof n<"u"&&(o=ht.from(n.errorCorrectionLevel,ht.M),r=Je.from(n.version),i=vt.from(n.maskPattern),n.toSJISFunc&&lt.setToSJISFunction(n.toSJISFunc)),xi(e,r,o,i)};var pn={},It={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const r=parseInt(o.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const r=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:r,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,r){return r.width&&r.width>=o+r.margin*2?r.width/(o+r.margin*2):r.scale},t.getImageWidth=function(o,r){const i=t.getScale(o,r);return Math.floor((o+r.margin*2)*i)},t.qrToImageData=function(o,r,i){const s=r.modules.size,a=r.modules.data,l=t.getScale(s,i),c=Math.floor((s+i.margin*2)*l),h=i.margin*l,T=[i.color.light,i.color.dark];for(let v=0;v<c;v++)for(let y=0;y<c;y++){let $=(v*c+y)*4,p=i.color.light;if(v>=h&&y>=h&&v<c-h&&y<c-h){const w=Math.floor((v-h)/l),f=Math.floor((y-h)/l);p=T[a[w*s+f]?1:0]}o[$++]=p.r,o[$++]=p.g,o[$++]=p.b,o[$]=p.a}}})(It);(function(t){const e=It;function n(r,i,s){r.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(i,s,a){let l=a,c=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(c=o()),l=e.getOptions(l);const h=e.getImageWidth(i.modules.size,l),T=c.getContext("2d"),v=T.createImageData(h,h);return e.qrToImageData(v.data,i,l),n(T,c,h),T.putImageData(v,0,0),c},t.renderToDataURL=function(i,s,a){let l=a;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const c=t.render(i,s,l),h=l.type||"image/png",T=l.rendererOpts||{};return c.toDataURL(h,T.quality)}})(pn);var fn={};const Ei=It;function Ut(t,e){const n=t.a/255,o=e+'="'+t.hex+'"';return n<1?o+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function gt(t,e,n){let o=t+e;return typeof n<"u"&&(o+=" "+n),o}function Ti(t,e,n){let o="",r=0,i=!1,s=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e),c=Math.floor(a/e);!l&&!i&&(i=!0),t[a]?(s++,a>0&&l>0&&t[a-1]||(o+=i?gt("M",l+n,.5+c+n):gt("m",r,0),r=0,i=!1),l+1<e&&t[a+1]||(o+=gt("h",s),s=0)):r++}return o}fn.render=function(e,n,o){const r=Ei.getOptions(n),i=e.modules.size,s=e.modules.data,a=i+r.margin*2,l=r.color.light.a?"<path "+Ut(r.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+Ut(r.color.dark,"stroke")+' d="'+Ti(s,i,r.margin)+'"/>',h='viewBox="0 0 '+a+" "+a+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+c+`</svg>
373
+ `;return typeof o=="function"&&o(null,v),v};const Ri=Dn,xt=Zt,gn=pn,_i=fn;function kt(t,e,n,o,r){const i=[].slice.call(arguments,1),s=i.length,a=typeof i[s-1]=="function";if(!a&&!Ri())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(r=n,n=e,e=o=void 0):s===3&&(e.getContext&&typeof r>"u"?(r=o,o=void 0):(r=o,o=n,n=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=e,e=o=void 0):s===2&&!e.getContext&&(o=n,n=e,e=void 0),new Promise(function(l,c){try{const h=xt.create(n,o);l(t(h,e,o))}catch(h){c(h)}})}try{const l=xt.create(n,o);r(null,t(l,e,o))}catch(l){r(l)}}De.create=xt.create;De.toCanvas=kt.bind(null,gn.render);De.toDataURL=kt.bind(null,gn.renderToDataURL);De.toString=kt.bind(null,function(t,e,n){return _i.render(t,n)});const Si=.1,zt=2.5,ie=7;function mt(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+Si}function Ii(t,e){const n=Array.prototype.slice.call(De.create(t,{errorCorrectionLevel:e}).modules.data,0),o=Math.sqrt(n.length);return n.reduce((r,i,s)=>(s%o===0?r.push([i]):r[r.length-1].push(i))&&r,[])}const ki={generate({uri:t,size:e,logoSize:n,padding:o=8,dotColor:r="var(--apkt-colors-black)"}){const s=[],a=Ii(t,"Q"),l=(e-2*o)/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach(({x:p,y:w})=>{const f=(a.length-ie)*l*p+o,m=(a.length-ie)*l*w+o,b=.45;for(let g=0;g<c.length;g+=1){const x=l*(ie-g*2);s.push(We`
374
+ <rect
375
+ fill=${g===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
376
+ width=${g===0?x-10:x}
377
+ rx= ${g===0?(x-10)*b:x*b}
378
+ ry= ${g===0?(x-10)*b:x*b}
379
+ stroke=${r}
380
+ stroke-width=${g===0?10:0}
381
+ height=${g===0?x-10:x}
382
+ x= ${g===0?m+l*g+10/2:m+l*g}
383
+ y= ${g===0?f+l*g+10/2:f+l*g}
384
+ />
385
+ `)}});const h=Math.floor((n+25)/l),T=a.length/2-h/2,v=a.length/2+h/2-1,y=[];a.forEach((p,w)=>{p.forEach((f,m)=>{if(a[w][m]&&!(w<ie&&m<ie||w>a.length-(ie+1)&&m<ie||w<ie&&m>a.length-(ie+1))&&!(w>T&&w<v&&m>T&&m<v)){const b=w*l+l/2+o,g=m*l+l/2+o;y.push([b,g])}})});const $={};return y.forEach(([p,w])=>{var f;$[p]?(f=$[p])==null||f.push(w):$[p]=[w]}),Object.entries($).map(([p,w])=>{const f=w.filter(m=>w.every(b=>!mt(m,b,l)));return[Number(p),f]}).forEach(([p,w])=>{w.forEach(f=>{s.push(We`<circle cx=${p} cy=${f} fill=${r} r=${l/zt} />`)})}),Object.entries($).filter(([p,w])=>w.length>1).map(([p,w])=>{const f=w.filter(m=>w.some(b=>mt(m,b,l)));return[Number(p),f]}).map(([p,w])=>{w.sort((m,b)=>m<b?-1:1);const f=[];for(const m of w){const b=f.find(g=>g.some(x=>mt(m,x,l)));b?b.push(m):f.push([m])}return[p,f.map(m=>[m[0],m[m.length-1]])]}).forEach(([p,w])=>{w.forEach(([f,m])=>{s.push(We`
386
+ <line
387
+ x1=${p}
388
+ x2=${p}
389
+ y1=${f}
390
+ y2=${m}
391
+ stroke=${r}
392
+ stroke-width=${l/(zt/2)}
393
+ stroke-linecap="round"
394
+ />
395
+ `)})}),s}},Ai=P`
396
+ :host {
397
+ position: relative;
398
+ user-select: none;
399
+ display: block;
400
+ overflow: hidden;
401
+ aspect-ratio: 1 / 1;
402
+ width: 100%;
403
+ height: 100%;
404
+ background-color: ${({colors:t})=>t.white};
405
+ border: 1px solid ${({tokens:t})=>t.theme.borderPrimary};
406
+ }
407
+
408
+ :host {
409
+ border-radius: ${({borderRadius:t})=>t[4]};
410
+ display: flex;
411
+ align-items: center;
412
+ justify-content: center;
413
+ }
414
+
415
+ :host([data-clear='true']) > wui-icon {
416
+ display: none;
417
+ }
418
+
419
+ svg:first-child,
420
+ wui-image,
421
+ wui-icon {
422
+ position: absolute;
423
+ top: 50%;
424
+ left: 50%;
425
+ transform: translateY(-50%) translateX(-50%);
426
+ background-color: ${({tokens:t})=>t.theme.backgroundPrimary};
427
+ box-shadow: inset 0 0 0 4px ${({tokens:t})=>t.theme.backgroundPrimary};
428
+ border-radius: ${({borderRadius:t})=>t[6]};
429
+ }
430
+
431
+ wui-image {
432
+ width: 25%;
433
+ height: 25%;
434
+ border-radius: ${({borderRadius:t})=>t[2]};
435
+ }
436
+
437
+ wui-icon {
438
+ width: 100%;
439
+ height: 100%;
440
+ color: #3396ff !important;
441
+ transform: translateY(-50%) translateX(-50%) scale(0.25);
442
+ }
443
+
444
+ wui-icon > svg {
445
+ width: inherit;
446
+ height: inherit;
447
+ }
448
+ `;var pe=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Y=class extends k{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),u`<wui-flex
449
+ alignItems="center"
450
+ justifyContent="center"
451
+ class="wui-qr-code"
452
+ direction="column"
453
+ gap="4"
454
+ width="100%"
455
+ style="height: 100%"
456
+ >
457
+ ${this.templateVisual()} ${this.templateSvg()}
458
+ </wui-flex>`}templateSvg(){return We`
459
+ <svg viewBox="0 0 ${this.size} ${this.size}" width="100%" height="100%">
460
+ ${ki.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})}
461
+ </svg>
462
+ `}templateVisual(){return this.imageSrc?u`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?u`<wui-icon
463
+ class="farcaster"
464
+ size="inherit"
465
+ color="inherit"
466
+ name="farcaster"
467
+ ></wui-icon>`:u`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};Y.styles=[V,Ai];pe([d()],Y.prototype,"uri",void 0);pe([d({type:Number})],Y.prototype,"size",void 0);pe([d()],Y.prototype,"theme",void 0);pe([d()],Y.prototype,"imageSrc",void 0);pe([d()],Y.prototype,"alt",void 0);pe([d({type:Boolean})],Y.prototype,"arenaClear",void 0);pe([d({type:Boolean})],Y.prototype,"farcaster",void 0);Y=pe([I("wui-qr-code")],Y);const Wi=P`
468
+ :host {
469
+ display: block;
470
+ background: linear-gradient(
471
+ 90deg,
472
+ ${({tokens:t})=>t.theme.foregroundSecondary} 0%,
473
+ ${({tokens:t})=>t.theme.foregroundTertiary} 50%,
474
+ ${({tokens:t})=>t.theme.foregroundSecondary} 100%
475
+ );
476
+ background-size: 200% 100%;
477
+ animation: shimmer 1s ease-in-out infinite;
478
+ border-radius: ${({borderRadius:t})=>t[2]};
479
+ }
480
+
481
+ :host([data-rounded='true']) {
482
+ border-radius: ${({borderRadius:t})=>t[16]};
483
+ }
484
+
485
+ @keyframes shimmer {
486
+ 0% {
487
+ background-position: 200% 0;
488
+ }
489
+ 100% {
490
+ background-position: -200% 0;
491
+ }
492
+ }
493
+ `;var Ue=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let $e=class extends k{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=`
494
+ width: ${this.width};
495
+ height: ${this.height};
496
+ `,this.dataset.rounded=this.rounded?"true":"false",u`<slot></slot>`}};$e.styles=[Wi];Ue([d()],$e.prototype,"width",void 0);Ue([d()],$e.prototype,"height",void 0);Ue([d()],$e.prototype,"variant",void 0);Ue([d({type:Boolean})],$e.prototype,"rounded",void 0);$e=Ue([I("wui-shimmer")],$e);const Pi=P`
497
+ wui-shimmer {
498
+ width: 100%;
499
+ aspect-ratio: 1 / 1;
500
+ border-radius: ${({borderRadius:t})=>t[4]};
501
+ }
502
+
503
+ wui-qr-code {
504
+ opacity: 0;
505
+ animation-duration: ${({durations:t})=>t.xl};
506
+ animation-timing-function: ${({easings:t})=>t["ease-out-power-2"]};
507
+ animation-name: fade-in;
508
+ animation-fill-mode: forwards;
509
+ }
510
+
511
+ @keyframes fade-in {
512
+ from {
513
+ opacity: 0;
514
+ }
515
+ to {
516
+ opacity: 1;
517
+ }
518
+ }
519
+ `;var mn=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Ye=class extends L{constructor(){super(),this.basic=!1}firstUpdated(){var e,n,o;this.basic||O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((e=this.wallet)==null?void 0:e.name)??"WalletConnect",platform:"qrcode",displayIndex:(n=this.wallet)==null?void 0:n.display_index,walletRank:(o=this.wallet)==null?void 0:o.order,view:E.state.view}})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.unsubscribe)==null||e.forEach(n=>n())}render(){return this.onRenderProxy(),u`
520
+ <wui-flex
521
+ flexDirection="column"
522
+ alignItems="center"
523
+ .padding=${["0","5","5","5"]}
524
+ gap="5"
525
+ >
526
+ <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
527
+ <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text>
528
+ ${this.copyTemplate()}
529
+ </wui-flex>
530
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
531
+ `}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;return R.setWcLinking(void 0),R.setRecentWallet(this.wallet),u` <wui-qr-code
532
+ theme=${bt.state.themeMode}
533
+ uri=${this.uri}
534
+ imageSrc=${A(ue.getWalletImage(this.wallet))}
535
+ color=${A(bt.state.themeVariables["--w3m-qr-color"])}
536
+ alt=${A(e)}
537
+ data-testid="wui-qr-code"
538
+ ></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return u`<wui-button
539
+ .disabled=${e}
540
+ @click=${this.onCopyUri}
541
+ variant="neutral-secondary"
542
+ size="sm"
543
+ data-testid="copy-wc2-uri"
544
+ >
545
+ Copy link
546
+ <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon>
547
+ </wui-button>`}};Ye.styles=Pi;mn([d({type:Boolean})],Ye.prototype,"basic",void 0);Ye=mn([I("w3m-connecting-wc-qrcode")],Ye);var Bi=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Ft=class extends k{constructor(){var e,n,o;if(super(),this.wallet=(e=E.state.data)==null?void 0:e.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:(n=this.wallet)==null?void 0:n.display_index,walletRank:(o=this.wallet)==null?void 0:o.order,view:E.state.view}})}render(){return u`
548
+ <wui-flex
549
+ flexDirection="column"
550
+ alignItems="center"
551
+ .padding=${["10","5","5","5"]}
552
+ gap="5"
553
+ >
554
+ <wui-wallet-image
555
+ size="lg"
556
+ imageSrc=${A(ue.getWalletImage(this.wallet))}
557
+ ></wui-wallet-image>
558
+
559
+ <wui-text variant="md-regular" color="primary">Not Detected</wui-text>
560
+ </wui-flex>
561
+
562
+ <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
563
+ `}};Ft=Bi([I("w3m-connecting-wc-unsupported")],Ft);var wn=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Et=class extends L{constructor(){var e,n;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=Qt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(R.subscribeKey("wcUri",()=>{this.updateLoadingState()})),O.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:(e=this.wallet)==null?void 0:e.display_index,walletRank:(n=this.wallet)==null?void 0:n.order,view:E.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:n,name:o}=this.wallet,{redirect:r,href:i}=_.formatUniversalUrl(n,this.uri);R.setWcLinking({name:o,href:i}),R.setRecentWallet(this.wallet),_.openHref(r,"_blank")}catch{this.error=!0}}};wn([C()],Et.prototype,"isLoading",void 0);Et=wn([I("w3m-connecting-wc-web")],Et);const Li=P`
564
+ :host([data-mobile-fullscreen='true']) {
565
+ height: 100%;
566
+ display: flex;
567
+ flex-direction: column;
568
+ }
569
+
570
+ :host([data-mobile-fullscreen='true']) wui-ux-by-reown {
571
+ margin-top: auto;
572
+ }
573
+ `;var Ce=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let re=class extends k{constructor(){var e;super(),this.wallet=(e=E.state.data)==null?void 0:e.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!N.state.siwx,this.remoteFeatures=N.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(N.subscribeKey("remoteFeatures",n=>this.remoteFeatures=n))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return N.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),u`
574
+ ${this.headerTemplate()}
575
+ <div class="platform-container">${this.platformTemplate()}</div>
576
+ ${this.reownBrandingTemplate()}
577
+ `}reownBrandingTemplate(){var e;return!((e=this.remoteFeatures)!=null&&e.reownBranding)||!this.displayBranding?null:u`<wui-ux-by-reown></wui-ux-by-reown>`}async initializeConnection(e=!1){var n,o;if(!(this.platform==="browser"||N.state.manualWCControl&&!e))try{const{wcPairingExpiry:r,status:i}=R.state,{redirectView:s}=E.state.data??{};if(e||N.state.enableEmbedded||_.isPairingExpired(r)||i==="connecting"){const a=R.getConnections(le.state.activeChain),l=(n=this.remoteFeatures)==null?void 0:n.multiWallet,c=a.length>0;await R.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(c&&l?(E.replace("ProfileWallets"),Le.showSuccess("New Wallet Added")):s?E.replace(s):Ht.close())}}catch(r){if(r instanceof Error&&r.message.includes("An error occurred when attempting to switch chain")&&!N.state.enableNetworkSwitch&&le.state.activeChain){le.setActiveCaipNetwork(xn.getUnsupportedNetwork(`${le.state.activeChain}:${(o=le.state.activeCaipNetwork)==null?void 0:o.id}`)),le.showUnsupportedChainUI();return}r instanceof Kt&&r.originalName===Gt.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?O.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:r.message}}):O.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(r==null?void 0:r.message)??"Unknown"}}),R.setWcError(!0),Le.showError(r.message??"Connection error"),R.resetWcConnection(),E.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;const{mobile_link:e,desktop_link:n,webapp_link:o,injected:r,rdns:i}=this.wallet,s=r==null?void 0:r.map(({injected_id:$})=>$).filter(Boolean),a=[...i?[i]:s??[]],l=N.state.isUniversalProvider?!1:a.length,c=e,h=o,T=R.checkInstalled(a),v=l&&T,y=n&&!_.isMobile();v&&!le.state.noAdapters&&this.platforms.push("browser"),c&&this.platforms.push(_.isMobile()?"mobile":"qrcode"),h&&this.platforms.push("web"),y&&this.platforms.push("desktop"),!v&&l&&!le.state.noAdapters&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return u`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return u`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return u`
578
+ <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
579
+ </w3m-connecting-wc-desktop>
580
+ `;case"mobile":return u`
581
+ <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
582
+ </w3m-connecting-wc-mobile>
583
+ `;case"qrcode":return u`<w3m-connecting-wc-qrcode ?basic=${this.basic}></w3m-connecting-wc-qrcode>`;default:return u`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?u`
584
+ <w3m-connecting-header
585
+ .platforms=${this.platforms}
586
+ .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
587
+ >
588
+ </w3m-connecting-header>
589
+ `:null}async onSelectPlatform(e){var o;const n=(o=this.shadowRoot)==null?void 0:o.querySelector("div");n&&(await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};re.styles=Li;Ce([C()],re.prototype,"platform",void 0);Ce([C()],re.prototype,"platforms",void 0);Ce([C()],re.prototype,"isSiwxEnabled",void 0);Ce([C()],re.prototype,"remoteFeatures",void 0);Ce([d({type:Boolean})],re.prototype,"displayBranding",void 0);Ce([d({type:Boolean})],re.prototype,"basic",void 0);re=Ce([I("w3m-connecting-wc-view")],re);var At=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Xe=class extends k{constructor(){super(),this.unsubscribe=[],this.isMobile=_.isMobile(),this.remoteFeatures=N.state.remoteFeatures,this.unsubscribe.push(N.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){const{featured:e,recommended:n}=S.state,{customWallets:o}=N.state,r=En.getRecentWallets(),i=e.length||n.length||(o==null?void 0:o.length)||r.length;return u`<wui-flex flexDirection="column" gap="2" .margin=${["1","3","3","3"]}>
590
+ ${i?u`<w3m-connector-list></w3m-connector-list>`:null}
591
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
592
+ </wui-flex>`}return u`<wui-flex flexDirection="column" .padding=${["0","0","4","0"]}>
593
+ <w3m-connecting-wc-view ?basic=${!0} .displayBranding=${!1}></w3m-connecting-wc-view>
594
+ <wui-flex flexDirection="column" .padding=${["0","3","0","3"]}>
595
+ <w3m-all-wallets-widget></w3m-all-wallets-widget>
596
+ </wui-flex>
597
+ </wui-flex>
598
+ ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){var e;return(e=this.remoteFeatures)!=null&&e.reownBranding?u` <wui-flex flexDirection="column" .padding=${["1","0","1","0"]}>
599
+ <wui-ux-by-reown></wui-ux-by-reown>
600
+ </wui-flex>`:null}};At([C()],Xe.prototype,"isMobile",void 0);At([C()],Xe.prototype,"remoteFeatures",void 0);Xe=At([I("w3m-connecting-wc-basic-view")],Xe);/**
601
+ * @license
602
+ * Copyright 2020 Google LLC
603
+ * SPDX-License-Identifier: BSD-3-Clause
604
+ */const Ni=t=>t.strings===void 0;/**
605
+ * @license
606
+ * Copyright 2017 Google LLC
607
+ * SPDX-License-Identifier: BSD-3-Clause
608
+ */const Be=(t,e)=>{var o;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(o=r._$AO)==null||o.call(r,e,!1),Be(r,e);return!0},Ze=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},bn=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),Di(e)}};function Oi(t){this._$AN!==void 0?(Ze(this),this._$AM=t,bn(this)):this._$AM=t}function Mi(t,e=!1,n=0){const o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(o))for(let i=n;i<o.length;i++)Be(o[i],!1),Ze(o[i]);else o!=null&&(Be(o,!1),Ze(o));else Be(this,t)}const Di=t=>{t.type==Rn.CHILD&&(t._$AP??(t._$AP=Mi),t._$AQ??(t._$AQ=Oi))};class ji extends Tn{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,o){super._$AT(e,n,o),bn(this),this.isConnected=e._$AU}_$AO(e,n=!0){var o,r;e!==this.isConnected&&(this.isConnected=e,e?(o=this.reconnected)==null||o.call(this):(r=this.disconnected)==null||r.call(this)),n&&(Be(this,e),Ze(this))}setValue(e){if(Ni(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
609
+ * @license
610
+ * Copyright 2020 Google LLC
611
+ * SPDX-License-Identifier: BSD-3-Clause
612
+ */const Wt=()=>new Ui;class Ui{}const wt=new WeakMap,Pt=_n(class extends ji{render(t){return Nt}update(t,[e]){var o;const n=e!==this.G;return n&&this.G!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=(o=t.options)==null?void 0:o.host,this.rt(this.ct=t.element)),Nt}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let n=wt.get(e);n===void 0&&(n=new WeakMap,wt.set(e,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=wt.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),zi=P`
613
+ :host {
614
+ display: flex;
615
+ align-items: center;
616
+ justify-content: center;
617
+ }
618
+
619
+ label {
620
+ position: relative;
621
+ display: inline-block;
622
+ user-select: none;
623
+ transition:
624
+ background-color ${({durations:t})=>t.lg}
625
+ ${({easings:t})=>t["ease-out-power-2"]},
626
+ color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
627
+ border ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
628
+ box-shadow ${({durations:t})=>t.lg}
629
+ ${({easings:t})=>t["ease-out-power-2"]},
630
+ width ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
631
+ height ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
632
+ transform ${({durations:t})=>t.lg}
633
+ ${({easings:t})=>t["ease-out-power-2"]},
634
+ opacity ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]};
635
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
636
+ }
637
+
638
+ input {
639
+ width: 0;
640
+ height: 0;
641
+ opacity: 0;
642
+ }
643
+
644
+ span {
645
+ position: absolute;
646
+ cursor: pointer;
647
+ top: 0;
648
+ left: 0;
649
+ right: 0;
650
+ bottom: 0;
651
+ background-color: ${({colors:t})=>t.neutrals300};
652
+ border-radius: ${({borderRadius:t})=>t.round};
653
+ border: 1px solid transparent;
654
+ will-change: border;
655
+ transition:
656
+ background-color ${({durations:t})=>t.lg}
657
+ ${({easings:t})=>t["ease-out-power-2"]},
658
+ color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
659
+ border ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
660
+ box-shadow ${({durations:t})=>t.lg}
661
+ ${({easings:t})=>t["ease-out-power-2"]},
662
+ width ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
663
+ height ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]},
664
+ transform ${({durations:t})=>t.lg}
665
+ ${({easings:t})=>t["ease-out-power-2"]},
666
+ opacity ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]};
667
+ will-change: background-color, color, border, box-shadow, width, height, transform, opacity;
668
+ }
669
+
670
+ span:before {
671
+ content: '';
672
+ position: absolute;
673
+ background-color: ${({colors:t})=>t.white};
674
+ border-radius: 50%;
675
+ }
676
+
677
+ /* -- Sizes --------------------------------------------------------- */
678
+ label[data-size='lg'] {
679
+ width: 48px;
680
+ height: 32px;
681
+ }
682
+
683
+ label[data-size='md'] {
684
+ width: 40px;
685
+ height: 28px;
686
+ }
687
+
688
+ label[data-size='sm'] {
689
+ width: 32px;
690
+ height: 22px;
691
+ }
692
+
693
+ label[data-size='lg'] > span:before {
694
+ height: 24px;
695
+ width: 24px;
696
+ left: 4px;
697
+ top: 3px;
698
+ }
699
+
700
+ label[data-size='md'] > span:before {
701
+ height: 20px;
702
+ width: 20px;
703
+ left: 4px;
704
+ top: 3px;
705
+ }
706
+
707
+ label[data-size='sm'] > span:before {
708
+ height: 16px;
709
+ width: 16px;
710
+ left: 3px;
711
+ top: 2px;
712
+ }
713
+
714
+ /* -- Focus states --------------------------------------------------- */
715
+ input:focus-visible:not(:checked) + span,
716
+ input:focus:not(:checked) + span {
717
+ border: 1px solid ${({tokens:t})=>t.core.iconAccentPrimary};
718
+ background-color: ${({tokens:t})=>t.theme.textTertiary};
719
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
720
+ }
721
+
722
+ input:focus-visible:checked + span,
723
+ input:focus:checked + span {
724
+ border: 1px solid ${({tokens:t})=>t.core.iconAccentPrimary};
725
+ box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2);
726
+ }
727
+
728
+ /* -- Checked states --------------------------------------------------- */
729
+ input:checked + span {
730
+ background-color: ${({tokens:t})=>t.core.iconAccentPrimary};
731
+ }
732
+
733
+ label[data-size='lg'] > input:checked + span:before {
734
+ transform: translateX(calc(100% - 9px));
735
+ }
736
+
737
+ label[data-size='md'] > input:checked + span:before {
738
+ transform: translateX(calc(100% - 9px));
739
+ }
740
+
741
+ label[data-size='sm'] > input:checked + span:before {
742
+ transform: translateX(calc(100% - 7px));
743
+ }
744
+
745
+ /* -- Hover states ------------------------------------------------------- */
746
+ label:hover > input:not(:checked):not(:disabled) + span {
747
+ background-color: ${({colors:t})=>t.neutrals400};
748
+ }
749
+
750
+ label:hover > input:checked:not(:disabled) + span {
751
+ background-color: ${({colors:t})=>t.accent080};
752
+ }
753
+
754
+ /* -- Disabled state --------------------------------------------------- */
755
+ label:has(input:disabled) {
756
+ pointer-events: none;
757
+ user-select: none;
758
+ }
759
+
760
+ input:not(:checked):disabled + span {
761
+ background-color: ${({colors:t})=>t.neutrals700};
762
+ }
763
+
764
+ input:checked:disabled + span {
765
+ background-color: ${({colors:t})=>t.neutrals700};
766
+ }
767
+
768
+ input:not(:checked):disabled + span::before {
769
+ background-color: ${({colors:t})=>t.neutrals400};
770
+ }
771
+
772
+ input:checked:disabled + span::before {
773
+ background-color: ${({tokens:t})=>t.theme.textTertiary};
774
+ }
775
+ `;var ct=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let Se=class extends k{constructor(){super(...arguments),this.inputElementRef=Wt(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return u`
776
+ <label data-size=${this.size}>
777
+ <input
778
+ ${Pt(this.inputElementRef)}
779
+ type="checkbox"
780
+ ?checked=${this.checked}
781
+ ?disabled=${this.disabled}
782
+ @change=${this.dispatchChangeEvent.bind(this)}
783
+ />
784
+ <span></span>
785
+ </label>
786
+ `}dispatchChangeEvent(){var e;this.dispatchEvent(new CustomEvent("switchChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.checked,bubbles:!0,composed:!0}))}};Se.styles=[V,de,zi];ct([d({type:Boolean})],Se.prototype,"checked",void 0);ct([d({type:Boolean})],Se.prototype,"disabled",void 0);ct([d()],Se.prototype,"size",void 0);Se=ct([I("wui-toggle")],Se);const Fi=P`
787
+ :host {
788
+ height: auto;
789
+ }
790
+
791
+ :host > wui-flex {
792
+ height: 100%;
793
+ display: flex;
794
+ align-items: center;
795
+ justify-content: center;
796
+ column-gap: ${({spacing:t})=>t[2]};
797
+ padding: ${({spacing:t})=>t[2]} ${({spacing:t})=>t[3]};
798
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
799
+ border-radius: ${({borderRadius:t})=>t[4]};
800
+ box-shadow: inset 0 0 0 1px ${({tokens:t})=>t.theme.foregroundPrimary};
801
+ transition: background-color ${({durations:t})=>t.lg}
802
+ ${({easings:t})=>t["ease-out-power-2"]};
803
+ will-change: background-color;
804
+ cursor: pointer;
805
+ }
806
+
807
+ wui-switch {
808
+ pointer-events: none;
809
+ }
810
+ `;var yn=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let et=class extends k{constructor(){super(...arguments),this.checked=!1}render(){return u`
811
+ <wui-flex>
812
+ <wui-icon size="xl" name="walletConnectBrown"></wui-icon>
813
+ <wui-toggle
814
+ ?checked=${this.checked}
815
+ size="sm"
816
+ @switchChange=${this.handleToggleChange.bind(this)}
817
+ ></wui-toggle>
818
+ </wui-flex>
819
+ `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};et.styles=[V,de,Fi];yn([d({type:Boolean})],et.prototype,"checked",void 0);et=yn([I("wui-certified-switch")],et);const Vi=P`
820
+ :host {
821
+ position: relative;
822
+ width: 100%;
823
+ display: inline-flex;
824
+ flex-direction: column;
825
+ gap: ${({spacing:t})=>t[3]};
826
+ color: ${({tokens:t})=>t.theme.textPrimary};
827
+ caret-color: ${({tokens:t})=>t.core.textAccentPrimary};
828
+ }
829
+
830
+ .wui-input-text-container {
831
+ position: relative;
832
+ display: flex;
833
+ }
834
+
835
+ input {
836
+ width: 100%;
837
+ border-radius: ${({borderRadius:t})=>t[4]};
838
+ color: inherit;
839
+ background: transparent;
840
+ border: 1px solid ${({tokens:t})=>t.theme.borderPrimary};
841
+ caret-color: ${({tokens:t})=>t.core.textAccentPrimary};
842
+ padding: ${({spacing:t})=>t[3]} ${({spacing:t})=>t[3]}
843
+ ${({spacing:t})=>t[3]} ${({spacing:t})=>t[10]};
844
+ font-size: ${({textSize:t})=>t.large};
845
+ line-height: ${({typography:t})=>t["lg-regular"].lineHeight};
846
+ letter-spacing: ${({typography:t})=>t["lg-regular"].letterSpacing};
847
+ font-weight: ${({fontWeight:t})=>t.regular};
848
+ font-family: ${({fontFamily:t})=>t.regular};
849
+ }
850
+
851
+ input[data-size='lg'] {
852
+ padding: ${({spacing:t})=>t[4]} ${({spacing:t})=>t[3]}
853
+ ${({spacing:t})=>t[4]} ${({spacing:t})=>t[10]};
854
+ }
855
+
856
+ @media (hover: hover) and (pointer: fine) {
857
+ input:hover:enabled {
858
+ border: 1px solid ${({tokens:t})=>t.theme.borderSecondary};
859
+ }
860
+ }
861
+
862
+ input:disabled {
863
+ cursor: unset;
864
+ border: 1px solid ${({tokens:t})=>t.theme.borderPrimary};
865
+ }
866
+
867
+ input::placeholder {
868
+ color: ${({tokens:t})=>t.theme.textSecondary};
869
+ }
870
+
871
+ input:focus:enabled {
872
+ border: 1px solid ${({tokens:t})=>t.theme.borderSecondary};
873
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
874
+ -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040};
875
+ -moz-box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040};
876
+ box-shadow: 0px 0px 0px 4px ${({tokens:t})=>t.core.foregroundAccent040};
877
+ }
878
+
879
+ div.wui-input-text-container:has(input:disabled) {
880
+ opacity: 0.5;
881
+ }
882
+
883
+ wui-icon.wui-input-text-left-icon {
884
+ position: absolute;
885
+ top: 50%;
886
+ transform: translateY(-50%);
887
+ pointer-events: none;
888
+ left: ${({spacing:t})=>t[4]};
889
+ color: ${({tokens:t})=>t.theme.iconDefault};
890
+ }
891
+
892
+ button.wui-input-text-submit-button {
893
+ position: absolute;
894
+ top: 50%;
895
+ transform: translateY(-50%);
896
+ right: ${({spacing:t})=>t[3]};
897
+ width: 24px;
898
+ height: 24px;
899
+ border: none;
900
+ background: transparent;
901
+ border-radius: ${({borderRadius:t})=>t[2]};
902
+ color: ${({tokens:t})=>t.core.textAccentPrimary};
903
+ }
904
+
905
+ button.wui-input-text-submit-button:disabled {
906
+ opacity: 1;
907
+ }
908
+
909
+ button.wui-input-text-submit-button.loading wui-icon {
910
+ animation: spin 1s linear infinite;
911
+ }
912
+
913
+ button.wui-input-text-submit-button:hover {
914
+ background: ${({tokens:t})=>t.core.foregroundAccent010};
915
+ }
916
+
917
+ input:has(+ .wui-input-text-submit-button) {
918
+ padding-right: ${({spacing:t})=>t[12]};
919
+ }
920
+
921
+ input[type='number'] {
922
+ -moz-appearance: textfield;
923
+ }
924
+
925
+ input[type='search']::-webkit-search-decoration,
926
+ input[type='search']::-webkit-search-cancel-button,
927
+ input[type='search']::-webkit-search-results-button,
928
+ input[type='search']::-webkit-search-results-decoration {
929
+ -webkit-appearance: none;
930
+ }
931
+
932
+ /* -- Keyframes --------------------------------------------------- */
933
+ @keyframes spin {
934
+ from {
935
+ transform: rotate(0deg);
936
+ }
937
+ to {
938
+ transform: rotate(360deg);
939
+ }
940
+ }
941
+ `;var q=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let M=class extends k{constructor(){super(...arguments),this.inputElementRef=Wt(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return u` <div class="wui-input-text-container">
942
+ ${this.templateLeftIcon()}
943
+ <input
944
+ data-size=${this.size}
945
+ ${Pt(this.inputElementRef)}
946
+ data-testid="wui-input-text"
947
+ type=${this.type}
948
+ enterkeyhint=${A(this.enterKeyHint)}
949
+ ?disabled=${this.disabled}
950
+ placeholder=${this.placeholder}
951
+ @input=${this.dispatchInputChangeEvent.bind(this)}
952
+ @keydown=${this.onKeyDown}
953
+ .value=${this.value||""}
954
+ />
955
+ ${this.templateSubmitButton()}
956
+ <slot class="wui-input-text-slot"></slot>
957
+ </div>
958
+ ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?u`<wui-icon
959
+ class="wui-input-text-left-icon"
960
+ size="md"
961
+ data-size=${this.size}
962
+ color="inherit"
963
+ name=${this.icon}
964
+ ></wui-icon>`:null}templateSubmitButton(){var e;return this.onSubmit?u`<button
965
+ class="wui-input-text-submit-button ${this.loading?"loading":""}"
966
+ @click=${(e=this.onSubmit)==null?void 0:e.bind(this)}
967
+ ?disabled=${this.disabled||this.loading}
968
+ >
969
+ ${this.loading?u`<wui-icon name="spinner" size="md"></wui-icon>`:u`<wui-icon name="chevronRight" size="md"></wui-icon>`}
970
+ </button>`:null}templateError(){return this.errorText?u`<wui-text variant="sm-regular" color="error">${this.errorText}</wui-text>`:null}templateWarning(){return this.warningText?u`<wui-text variant="sm-regular" color="warning">${this.warningText}</wui-text>`:null}dispatchInputChangeEvent(){var e;this.dispatchEvent(new CustomEvent("inputChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.value,bubbles:!0,composed:!0}))}};M.styles=[V,de,Vi];q([d()],M.prototype,"icon",void 0);q([d({type:Boolean})],M.prototype,"disabled",void 0);q([d({type:Boolean})],M.prototype,"loading",void 0);q([d()],M.prototype,"placeholder",void 0);q([d()],M.prototype,"type",void 0);q([d()],M.prototype,"value",void 0);q([d()],M.prototype,"errorText",void 0);q([d()],M.prototype,"warningText",void 0);q([d()],M.prototype,"onSubmit",void 0);q([d()],M.prototype,"size",void 0);q([d({attribute:!1})],M.prototype,"onKeyDown",void 0);M=q([I("wui-input-text")],M);const qi=P`
971
+ :host {
972
+ position: relative;
973
+ display: inline-block;
974
+ width: 100%;
975
+ }
976
+
977
+ wui-icon {
978
+ position: absolute;
979
+ top: 50%;
980
+ transform: translateY(-50%);
981
+ right: ${({spacing:t})=>t[3]};
982
+ color: ${({tokens:t})=>t.theme.iconDefault};
983
+ cursor: pointer;
984
+ padding: ${({spacing:t})=>t[2]};
985
+ background-color: transparent;
986
+ border-radius: ${({borderRadius:t})=>t[4]};
987
+ transition: background-color ${({durations:t})=>t.lg}
988
+ ${({easings:t})=>t["ease-out-power-2"]};
989
+ }
990
+
991
+ @media (hover: hover) {
992
+ wui-icon:hover {
993
+ background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
994
+ }
995
+ }
996
+ `;var $n=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let tt=class extends k{constructor(){super(...arguments),this.inputComponentRef=Wt(),this.inputValue=""}render(){return u`
997
+ <wui-input-text
998
+ ${Pt(this.inputComponentRef)}
999
+ placeholder="Search wallet"
1000
+ icon="search"
1001
+ type="search"
1002
+ enterKeyHint="search"
1003
+ size="sm"
1004
+ @inputChange=${this.onInputChange}
1005
+ >
1006
+ ${this.inputValue?u`<wui-icon
1007
+ @click=${this.clearValue}
1008
+ color="inherit"
1009
+ size="sm"
1010
+ name="close"
1011
+ ></wui-icon>`:null}
1012
+ </wui-input-text>
1013
+ `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){const e=this.inputComponentRef.value,n=e==null?void 0:e.inputElementRef.value;n&&(n.value="",this.inputValue="",n.focus(),n.dispatchEvent(new Event("input")))}};tt.styles=[V,qi];$n([d()],tt.prototype,"inputValue",void 0);tt=$n([I("wui-search-bar")],tt);const Hi=We`<svg viewBox="0 0 48 54" fill="none">
1014
+ <path
1015
+ d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
1016
+ />
1017
+ </svg>`,Ki=P`
1018
+ :host {
1019
+ display: flex;
1020
+ flex-direction: column;
1021
+ justify-content: center;
1022
+ align-items: center;
1023
+ height: 104px;
1024
+ width: 104px;
1025
+ row-gap: ${({spacing:t})=>t[2]};
1026
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
1027
+ border-radius: ${({borderRadius:t})=>t[5]};
1028
+ position: relative;
1029
+ }
1030
+
1031
+ wui-shimmer[data-type='network'] {
1032
+ border: none;
1033
+ -webkit-clip-path: var(--apkt-path-network);
1034
+ clip-path: var(--apkt-path-network);
1035
+ }
1036
+
1037
+ svg {
1038
+ position: absolute;
1039
+ width: 48px;
1040
+ height: 54px;
1041
+ z-index: 1;
1042
+ }
1043
+
1044
+ svg > path {
1045
+ stroke: ${({tokens:t})=>t.theme.foregroundSecondary};
1046
+ stroke-width: 1px;
1047
+ }
1048
+
1049
+ @media (max-width: 350px) {
1050
+ :host {
1051
+ width: 100%;
1052
+ }
1053
+ }
1054
+ `;var vn=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let nt=class extends k{constructor(){super(...arguments),this.type="wallet"}render(){return u`
1055
+ ${this.shimmerTemplate()}
1056
+ <wui-shimmer width="80px" height="20px"></wui-shimmer>
1057
+ `}shimmerTemplate(){return this.type==="network"?u` <wui-shimmer data-type=${this.type} width="48px" height="54px"></wui-shimmer>
1058
+ ${Hi}`:u`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}};nt.styles=[V,de,Ki];vn([d()],nt.prototype,"type",void 0);nt=vn([I("wui-card-select-loader")],nt);const Gi=Jt`
1059
+ :host {
1060
+ display: grid;
1061
+ width: inherit;
1062
+ height: inherit;
1063
+ }
1064
+ `;var H=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let D=class extends k{render(){return this.style.cssText=`
1065
+ grid-template-rows: ${this.gridTemplateRows};
1066
+ grid-template-columns: ${this.gridTemplateColumns};
1067
+ justify-items: ${this.justifyItems};
1068
+ align-items: ${this.alignItems};
1069
+ justify-content: ${this.justifyContent};
1070
+ align-content: ${this.alignContent};
1071
+ column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`};
1072
+ row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`};
1073
+ gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`};
1074
+ padding-top: ${this.padding&&oe.getSpacingStyles(this.padding,0)};
1075
+ padding-right: ${this.padding&&oe.getSpacingStyles(this.padding,1)};
1076
+ padding-bottom: ${this.padding&&oe.getSpacingStyles(this.padding,2)};
1077
+ padding-left: ${this.padding&&oe.getSpacingStyles(this.padding,3)};
1078
+ margin-top: ${this.margin&&oe.getSpacingStyles(this.margin,0)};
1079
+ margin-right: ${this.margin&&oe.getSpacingStyles(this.margin,1)};
1080
+ margin-bottom: ${this.margin&&oe.getSpacingStyles(this.margin,2)};
1081
+ margin-left: ${this.margin&&oe.getSpacingStyles(this.margin,3)};
1082
+ `,u`<slot></slot>`}};D.styles=[V,Gi];H([d()],D.prototype,"gridTemplateRows",void 0);H([d()],D.prototype,"gridTemplateColumns",void 0);H([d()],D.prototype,"justifyItems",void 0);H([d()],D.prototype,"alignItems",void 0);H([d()],D.prototype,"justifyContent",void 0);H([d()],D.prototype,"alignContent",void 0);H([d()],D.prototype,"columnGap",void 0);H([d()],D.prototype,"rowGap",void 0);H([d()],D.prototype,"gap",void 0);H([d()],D.prototype,"padding",void 0);H([d()],D.prototype,"margin",void 0);D=H([I("wui-grid")],D);const Qi=P`
1083
+ button {
1084
+ display: flex;
1085
+ flex-direction: column;
1086
+ justify-content: center;
1087
+ align-items: center;
1088
+ cursor: pointer;
1089
+ width: 104px;
1090
+ row-gap: ${({spacing:t})=>t[2]};
1091
+ padding: ${({spacing:t})=>t[3]} ${({spacing:t})=>t[0]};
1092
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
1093
+ border-radius: clamp(0px, ${({borderRadius:t})=>t[4]}, 20px);
1094
+ transition:
1095
+ color ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-1"]},
1096
+ background-color ${({durations:t})=>t.lg}
1097
+ ${({easings:t})=>t["ease-out-power-1"]},
1098
+ border-radius ${({durations:t})=>t.lg}
1099
+ ${({easings:t})=>t["ease-out-power-1"]};
1100
+ will-change: background-color, color, border-radius;
1101
+ outline: none;
1102
+ border: none;
1103
+ }
1104
+
1105
+ button > wui-flex > wui-text {
1106
+ color: ${({tokens:t})=>t.theme.textPrimary};
1107
+ max-width: 86px;
1108
+ white-space: nowrap;
1109
+ overflow: hidden;
1110
+ text-overflow: ellipsis;
1111
+ justify-content: center;
1112
+ }
1113
+
1114
+ button > wui-flex > wui-text.certified {
1115
+ max-width: 66px;
1116
+ }
1117
+
1118
+ @media (hover: hover) and (pointer: fine) {
1119
+ button:hover:enabled {
1120
+ background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
1121
+ }
1122
+ }
1123
+
1124
+ button:disabled > wui-flex > wui-text {
1125
+ color: ${({tokens:t})=>t.core.glass010};
1126
+ }
1127
+
1128
+ [data-selected='true'] {
1129
+ background-color: ${({colors:t})=>t.accent020};
1130
+ }
1131
+
1132
+ @media (hover: hover) and (pointer: fine) {
1133
+ [data-selected='true']:hover:enabled {
1134
+ background-color: ${({colors:t})=>t.accent010};
1135
+ }
1136
+ }
1137
+
1138
+ [data-selected='true']:active:enabled {
1139
+ background-color: ${({colors:t})=>t.accent010};
1140
+ }
1141
+
1142
+ @media (max-width: 350px) {
1143
+ button {
1144
+ width: 100%;
1145
+ }
1146
+ }
1147
+ `;var ee=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let z=class extends k{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(n=>{n.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var n,o;const e=((n=this.wallet)==null?void 0:n.badge_type)==="certified";return u`
1148
+ <button>
1149
+ ${this.imageTemplate()}
1150
+ <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1">
1151
+ <wui-text
1152
+ variant="md-regular"
1153
+ color="inherit"
1154
+ class=${A(e?"certified":void 0)}
1155
+ >${(o=this.wallet)==null?void 0:o.name}</wui-text
1156
+ >
1157
+ ${e?u`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null}
1158
+ </wui-flex>
1159
+ </button>
1160
+ `}imageTemplate(){var e,n;return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():u`
1161
+ <wui-wallet-image
1162
+ size="lg"
1163
+ imageSrc=${A(this.imageSrc)}
1164
+ name=${A((e=this.wallet)==null?void 0:e.name)}
1165
+ .installed=${((n=this.wallet)==null?void 0:n.installed)??!1}
1166
+ badgeSize="sm"
1167
+ >
1168
+ </wui-wallet-image>
1169
+ `}shimmerTemplate(){return u`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=ue.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await ue.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){!this.wallet||this.isImpressed||(this.isImpressed=!0,O.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:E.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};z.styles=Qi;ee([C()],z.prototype,"visible",void 0);ee([C()],z.prototype,"imageSrc",void 0);ee([C()],z.prototype,"imageLoading",void 0);ee([C()],z.prototype,"isImpressed",void 0);ee([d()],z.prototype,"explorerId",void 0);ee([d()],z.prototype,"walletQuery",void 0);ee([d()],z.prototype,"certified",void 0);ee([d()],z.prototype,"displayIndex",void 0);ee([d({type:Object})],z.prototype,"wallet",void 0);z=ee([I("w3m-all-wallets-list-item")],z);const Ji=P`
1170
+ wui-grid {
1171
+ max-height: clamp(360px, 400px, 80vh);
1172
+ overflow: scroll;
1173
+ scrollbar-width: none;
1174
+ grid-auto-rows: min-content;
1175
+ grid-template-columns: repeat(auto-fill, 104px);
1176
+ }
1177
+
1178
+ :host([data-mobile-fullscreen='true']) wui-grid {
1179
+ max-height: none;
1180
+ }
1181
+
1182
+ @media (max-width: 350px) {
1183
+ wui-grid {
1184
+ grid-template-columns: repeat(2, 1fr);
1185
+ }
1186
+ }
1187
+
1188
+ wui-grid[data-scroll='false'] {
1189
+ overflow: hidden;
1190
+ }
1191
+
1192
+ wui-grid::-webkit-scrollbar {
1193
+ display: none;
1194
+ }
1195
+
1196
+ w3m-all-wallets-list-item {
1197
+ opacity: 0;
1198
+ animation-duration: ${({durations:t})=>t.xl};
1199
+ animation-timing-function: ${({easings:t})=>t["ease-inout-power-2"]};
1200
+ animation-name: fade-in;
1201
+ animation-fill-mode: forwards;
1202
+ }
1203
+
1204
+ @keyframes fade-in {
1205
+ from {
1206
+ opacity: 0;
1207
+ }
1208
+ to {
1209
+ opacity: 1;
1210
+ }
1211
+ }
1212
+
1213
+ wui-loading-spinner {
1214
+ padding-top: ${({spacing:t})=>t[4]};
1215
+ padding-bottom: ${({spacing:t})=>t[4]};
1216
+ justify-content: center;
1217
+ grid-column: 1 / span 4;
1218
+ }
1219
+ `;var fe=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};const Vt="local-paginator";let X=class extends k{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!S.state.wallets.length,this.wallets=S.state.wallets,this.recommended=S.state.recommended,this.featured=S.state.featured,this.filteredWallets=S.state.filteredWallets,this.mobileFullScreen=N.state.enableMobileFullScreen,this.unsubscribe.push(S.subscribeKey("wallets",e=>this.wallets=e),S.subscribeKey("recommended",e=>this.recommended=e),S.subscribeKey("featured",e=>this.featured=e),S.subscribeKey("filteredWallets",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var e;this.unsubscribe.forEach(n=>n()),(e=this.paginationObserver)==null||e.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),u`
1220
+ <wui-grid
1221
+ data-scroll=${!this.loading}
1222
+ .padding=${["0","3","3","3"]}
1223
+ gap="2"
1224
+ justifyContent="space-between"
1225
+ >
1226
+ ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}
1227
+ ${this.paginationLoaderTemplate()}
1228
+ </wui-grid>
1229
+ `}async initialFetch(){var n;this.loading=!0;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("wui-grid");e&&(await S.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,n){return[...Array(e)].map(()=>u`
1230
+ <wui-card-select-loader type="wallet" id=${A(n)}></wui-card-select-loader>
1231
+ `)}getWallets(){var r;const e=[...this.featured,...this.recommended];((r=this.filteredWallets)==null?void 0:r.length)>0?e.push(...this.filteredWallets):e.push(...this.wallets);const n=_.uniqueBy(e,"id"),o=yt.markWalletsAsInstalled(n);return yt.markWalletsWithDisplayIndex(o)}walletsTemplate(){return this.getWallets().map((n,o)=>u`
1232
+ <w3m-all-wallets-list-item
1233
+ data-testid="wallet-search-item-${n.id}"
1234
+ @click=${()=>this.onConnectWallet(n)}
1235
+ .wallet=${n}
1236
+ explorerId=${n.id}
1237
+ certified=${this.badge==="certified"}
1238
+ displayIndex=${o}
1239
+ ></w3m-all-wallets-list-item>
1240
+ `)}paginationLoaderTemplate(){const{wallets:e,recommended:n,featured:o,count:r,mobileFilteredOutWalletsLength:i}=S.state,s=window.innerWidth<352?3:4,a=e.length+n.length;let c=Math.ceil(a/s)*s-a+s;return c-=e.length?o.length%s:0,r===0&&o.length>0?null:r===0||[...o,...e,...n].length<r-(i??0)?this.shimmerTemplate(c,Vt):null}createPaginationObserver(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${Vt}`);e&&(this.paginationObserver=new IntersectionObserver(([o])=>{if(o!=null&&o.isIntersecting&&!this.loading){const{page:r,count:i,wallets:s}=S.state;s.length<i&&S.fetchWalletsByPage({page:r+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){j.selectWalletConnector(e)}};X.styles=Ji;fe([C()],X.prototype,"loading",void 0);fe([C()],X.prototype,"wallets",void 0);fe([C()],X.prototype,"recommended",void 0);fe([C()],X.prototype,"featured",void 0);fe([C()],X.prototype,"filteredWallets",void 0);fe([C()],X.prototype,"badge",void 0);fe([C()],X.prototype,"mobileFullScreen",void 0);X=fe([I("w3m-all-wallets-list")],X);const Yi=Jt`
1241
+ wui-grid,
1242
+ wui-loading-spinner,
1243
+ wui-flex {
1244
+ height: 360px;
1245
+ }
1246
+
1247
+ wui-grid {
1248
+ overflow: scroll;
1249
+ scrollbar-width: none;
1250
+ grid-auto-rows: min-content;
1251
+ grid-template-columns: repeat(auto-fill, 104px);
1252
+ }
1253
+
1254
+ :host([data-mobile-fullscreen='true']) wui-grid {
1255
+ max-height: none;
1256
+ height: auto;
1257
+ }
1258
+
1259
+ wui-grid[data-scroll='false'] {
1260
+ overflow: hidden;
1261
+ }
1262
+
1263
+ wui-grid::-webkit-scrollbar {
1264
+ display: none;
1265
+ }
1266
+
1267
+ wui-loading-spinner {
1268
+ justify-content: center;
1269
+ align-items: center;
1270
+ }
1271
+
1272
+ @media (max-width: 350px) {
1273
+ wui-grid {
1274
+ grid-template-columns: repeat(2, 1fr);
1275
+ }
1276
+ }
1277
+ `;var ze=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let ve=class extends k{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=N.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?u`<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 S.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:e}=S.state,n=yt.markWalletsAsInstalled(e);return e.length?u`
1278
+ <wui-grid
1279
+ data-testid="wallet-list"
1280
+ .padding=${["0","3","3","3"]}
1281
+ rowGap="4"
1282
+ columngap="2"
1283
+ justifyContent="space-between"
1284
+ >
1285
+ ${n.map((o,r)=>u`
1286
+ <w3m-all-wallets-list-item
1287
+ @click=${()=>this.onConnectWallet(o)}
1288
+ .wallet=${o}
1289
+ data-testid="wallet-search-item-${o.id}"
1290
+ explorerId=${o.id}
1291
+ certified=${this.badge==="certified"}
1292
+ walletQuery=${this.query}
1293
+ displayIndex=${r}
1294
+ ></w3m-all-wallets-list-item>
1295
+ `)}
1296
+ </wui-grid>
1297
+ `:u`
1298
+ <wui-flex
1299
+ data-testid="no-wallet-found"
1300
+ justifyContent="center"
1301
+ alignItems="center"
1302
+ gap="3"
1303
+ flexDirection="column"
1304
+ >
1305
+ <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box>
1306
+ <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium">
1307
+ No Wallet found
1308
+ </wui-text>
1309
+ </wui-flex>
1310
+ `}onConnectWallet(e){j.selectWalletConnector(e)}};ve.styles=Yi;ze([C()],ve.prototype,"loading",void 0);ze([C()],ve.prototype,"mobileFullScreen",void 0);ze([d()],ve.prototype,"query",void 0);ze([d()],ve.prototype,"badge",void 0);ve=ze([I("w3m-all-wallets-search")],ve);var Bt=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let it=class extends k{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=_.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return u`
1311
+ <wui-flex .padding=${["1","3","3","3"]} gap="2" alignItems="center">
1312
+ <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
1313
+ <wui-certified-switch
1314
+ ?checked=${this.badge==="certified"}
1315
+ @certifiedSwitchChange=${this.onCertifiedSwitchChange.bind(this)}
1316
+ data-testid="wui-certified-switch"
1317
+ ></wui-certified-switch>
1318
+ ${this.qrButtonTemplate()}
1319
+ </wui-flex>
1320
+ ${e||this.badge?u`<w3m-all-wallets-search
1321
+ query=${this.search}
1322
+ .badge=${this.badge}
1323
+ ></w3m-all-wallets-search>`:u`<w3m-all-wallets-list .badge=${this.badge}></w3m-all-wallets-list>`}
1324
+ `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",Le.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return _.isMobile()?u`
1325
+ <wui-icon-box
1326
+ size="xl"
1327
+ iconSize="xl"
1328
+ color="accent-primary"
1329
+ icon="qrCode"
1330
+ border
1331
+ borderColor="wui-accent-glass-010"
1332
+ @click=${this.onWalletConnectQr.bind(this)}
1333
+ ></wui-icon-box>
1334
+ `:null}onWalletConnectQr(){E.push("ConnectingWalletConnect")}};Bt([C()],it.prototype,"search",void 0);Bt([C()],it.prototype,"badge",void 0);it=Bt([I("w3m-all-wallets-view")],it);const Xi=P`
1335
+ :host {
1336
+ width: 100%;
1337
+ }
1338
+
1339
+ button {
1340
+ display: flex;
1341
+ align-items: center;
1342
+ justify-content: space-between;
1343
+ padding: ${({spacing:t})=>t[3]};
1344
+ width: 100%;
1345
+ background-color: ${({tokens:t})=>t.theme.backgroundPrimary};
1346
+ border-radius: ${({borderRadius:t})=>t[4]};
1347
+ transition:
1348
+ background-color ${({durations:t})=>t.lg}
1349
+ ${({easings:t})=>t["ease-out-power-2"]},
1350
+ scale ${({durations:t})=>t.lg} ${({easings:t})=>t["ease-out-power-2"]};
1351
+ will-change: background-color, scale;
1352
+ }
1353
+
1354
+ wui-text {
1355
+ text-transform: capitalize;
1356
+ }
1357
+
1358
+ wui-image {
1359
+ color: ${({tokens:t})=>t.theme.textPrimary};
1360
+ }
1361
+
1362
+ @media (hover: hover) {
1363
+ button:hover:enabled {
1364
+ background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
1365
+ }
1366
+ }
1367
+
1368
+ button:disabled {
1369
+ opacity: 0.5;
1370
+ cursor: not-allowed;
1371
+ }
1372
+ `;var te=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let F=class extends k{constructor(){super(...arguments),this.imageSrc="google",this.loading=!1,this.disabled=!1,this.rightIcon=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",u`
1373
+ <button
1374
+ ?disabled=${this.loading?!0:!!this.disabled}
1375
+ data-loading=${this.loading}
1376
+ tabindex=${A(this.tabIdx)}
1377
+ >
1378
+ <wui-flex gap="2" alignItems="center">
1379
+ ${this.templateLeftIcon()}
1380
+ <wui-flex gap="1">
1381
+ <slot></slot>
1382
+ </wui-flex>
1383
+ </wui-flex>
1384
+ ${this.templateRightIcon()}
1385
+ </button>
1386
+ `}templateLeftIcon(){return this.icon?u`<wui-image
1387
+ icon=${this.icon}
1388
+ iconColor=${A(this.iconColor)}
1389
+ ?boxed=${!0}
1390
+ ?rounded=${this.rounded}
1391
+ ></wui-image>`:u`<wui-image
1392
+ ?boxed=${!0}
1393
+ ?rounded=${this.rounded}
1394
+ ?fullSize=${this.fullSize}
1395
+ src=${this.imageSrc}
1396
+ ></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?u`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:u`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};F.styles=[V,de,Xi];te([d()],F.prototype,"imageSrc",void 0);te([d()],F.prototype,"icon",void 0);te([d()],F.prototype,"iconColor",void 0);te([d({type:Boolean})],F.prototype,"loading",void 0);te([d()],F.prototype,"tabIdx",void 0);te([d({type:Boolean})],F.prototype,"disabled",void 0);te([d({type:Boolean})],F.prototype,"rightIcon",void 0);te([d({type:Boolean})],F.prototype,"rounded",void 0);te([d({type:Boolean})],F.prototype,"fullSize",void 0);F=te([I("wui-list-item")],F);var Zi=globalThis&&globalThis.__decorate||function(t,e,n,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(r<3?s(i):r>3?s(e,n,i):s(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i};let qt=class extends k{constructor(){var e;super(...arguments),this.wallet=(e=E.state.data)==null?void 0:e.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return u`
1397
+ <wui-flex gap="2" flexDirection="column" .padding=${["3","3","4","3"]}>
1398
+ ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
1399
+ ${this.homepageTemplate()}
1400
+ </wui-flex>
1401
+ `}chromeTemplate(){var e;return(e=this.wallet)!=null&&e.chrome_store?u`<wui-list-item
1402
+ variant="icon"
1403
+ icon="chromeStore"
1404
+ iconVariant="square"
1405
+ @click=${this.onChromeStore.bind(this)}
1406
+ chevron
1407
+ >
1408
+ <wui-text variant="md-medium" color="primary">Chrome Extension</wui-text>
1409
+ </wui-list-item>`:null}iosTemplate(){var e;return(e=this.wallet)!=null&&e.app_store?u`<wui-list-item
1410
+ variant="icon"
1411
+ icon="appStore"
1412
+ iconVariant="square"
1413
+ @click=${this.onAppStore.bind(this)}
1414
+ chevron
1415
+ >
1416
+ <wui-text variant="md-medium" color="primary">iOS App</wui-text>
1417
+ </wui-list-item>`:null}androidTemplate(){var e;return(e=this.wallet)!=null&&e.play_store?u`<wui-list-item
1418
+ variant="icon"
1419
+ icon="playStore"
1420
+ iconVariant="square"
1421
+ @click=${this.onPlayStore.bind(this)}
1422
+ chevron
1423
+ >
1424
+ <wui-text variant="md-medium" color="primary">Android App</wui-text>
1425
+ </wui-list-item>`:null}homepageTemplate(){var e;return(e=this.wallet)!=null&&e.homepage?u`
1426
+ <wui-list-item
1427
+ variant="icon"
1428
+ icon="browser"
1429
+ iconVariant="square-blue"
1430
+ @click=${this.onHomePage.bind(this)}
1431
+ chevron
1432
+ >
1433
+ <wui-text variant="md-medium" color="primary">Website</wui-text>
1434
+ </wui-list-item>
1435
+ `:null}openStore(e){e.href&&this.wallet&&(O.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),_.openHref(e.href,"_blank"))}onChromeStore(){var e;(e=this.wallet)!=null&&e.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};qt=Zi([I("w3m-downloads-view")],qt);export{it as W3mAllWalletsView,Xe as W3mConnectingWcBasicView,qt as W3mDownloadsView};