1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2647],{23104:(e,t,i)=>{i.d(t,{T:()=>o});let o={URLS:{FAQ:"https://walletconnect.com/faq"}}},37458:(e,t,i)=>{i.d(t,{Up:()=>w});var o=i(11731),a=i(69485),r=i(18539),n=i(4537),s=i(66699),l=i(83503),c=i(10840),d=i(59085),u=i(38623);async function p(){l.I.push("ConnectingFarcaster");let e=n.a.getAuthConnector();if(e&&!a.U.state.farcasterUrl)try{let{url:t}=await e.provider.getFarcasterUri();a.U.setFarcasterUrl(t,r.W.state.activeChain)}catch(e){l.I.goBack(),c.P.showError(e)}}async function h(e){l.I.push("ConnectingSocial");let t=n.a.getAuthConnector(),i=null;try{let n=setTimeout(()=>{throw Error("Social login timed out. Please try again.")},45e3);if(t&&e){if(d.w.isTelegram()||(i=function(){try{return d.w.returnOpenHref(`${o.o.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes")}catch(e){throw Error("Could not open social popup")}}()),i)a.U.setSocialWindow(i,r.W.state.activeChain);else if(!d.w.isTelegram())throw Error("Could not create social popup");let{uri:s}=await t.provider.getSocialRedirectUri({provider:e});if(!s)throw i?.close(),Error("Could not fetch the social redirect uri");if(i&&(i.location.href=s),d.w.isTelegram()){u.i.setTelegramSocialProvider(e);let t=d.w.formatTelegramSocialLoginUrl(s);d.w.openHref(t,"_top")}clearTimeout(n)}}catch(e){i?.close(),c.P.showError(e?.message)}}async function w(e){a.U.setSocialProvider(e,r.W.state.activeChain),s.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),"farcaster"===e?await p():await h(e)}},52647:(e,t,i)=>{i.r(t),i.d(t,{AppKitAccountButton:()=>C,AppKitButton:()=>E,AppKitConnectButton:()=>P,AppKitNetworkButton:()=>F,W3mAccountButton:()=>k,W3mAccountSettingsView:()=>es,W3mAccountView:()=>eZ,W3mAllWalletsView:()=>tF,W3mButton:()=>A,W3mChooseAccountNameView:()=>on,W3mConnectButton:()=>M,W3mConnectView:()=>iq,W3mConnectWalletsView:()=>og,W3mConnectingExternalView:()=>iJ,W3mConnectingMultiChainView:()=>iY,W3mConnectingWcBasicView:()=>oi,W3mConnectingWcView:()=>oe,W3mDownloadsView:()=>os,W3mGetWalletView:()=>ol,W3mNetworkButton:()=>B,W3mNetworkSwitchView:()=>oy,W3mNetworksView:()=>oA,W3mProfileView:()=>eK,W3mProfileWalletsView:()=>tu,W3mRouter:()=>H.J,W3mSIWXSignMessageView:()=>oG,W3mSwitchActiveChainView:()=>oW,W3mSwitchAddressView:()=>e1,W3mUnsupportedChainView:()=>oj,W3mWalletCompatibleNetworksView:()=>oZ,W3mWhatIsANetworkView:()=>oN,W3mWhatIsAWalletView:()=>op});var o=i(41270),a=i(12456),r=i(81440),n=i(68129),s=i(18539),l=i(57754),c=i(17826),d=i(69485),u=i(59085),p=i(25315),h=i(97778);i(55602),i(88337),i(13076),i(7202);var w=i(67998),g=i(49231),b=i(45857);i(76178),i(38542);let f=(0,o.AH)` 2 :host { 3 display: block; 4 } 5 6 button { 7 border-radius: var(--wui-border-radius-3xl); 8 background: var(--wui-color-gray-glass-002); 9 display: flex; 10 gap: var(--wui-spacing-xs); 11 padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs) 12 var(--wui-spacing-xs); 13 border: 1px solid var(--wui-color-gray-glass-005); 14 } 15 16 button:disabled { 17 background: var(--wui-color-gray-glass-015); 18 } 19 20 button:disabled > wui-text { 21 color: var(--wui-color-gray-glass-015); 22 } 23 24 button:disabled > wui-flex > wui-text { 25 color: var(--wui-color-gray-glass-015); 26 } 27 28 button:disabled > wui-image, 29 button:disabled > wui-flex > wui-avatar { 30 filter: grayscale(1); 31 } 32 33 button:has(wui-image) { 34 padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs) 35 var(--wui-spacing-xs); 36 } 37 38 wui-text { 39 color: var(--wui-color-fg-100); 40 } 41 42 wui-flex > wui-text { 43 color: var(--wui-color-fg-200); 44 } 45 46 wui-image, 47 wui-icon-box { 48 border-radius: var(--wui-border-radius-3xl); 49 width: 24px; 50 height: 24px; 51 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 52 } 53 54 wui-flex { 55 border-radius: var(--wui-border-radius-3xl); 56 border: 1px solid var(--wui-color-gray-glass-005); 57 background: var(--wui-color-gray-glass-005); 58 padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs); 59 } 60 61 button.local-no-balance { 62 border-radius: 0px; 63 border: none; 64 background: transparent; 65 } 66 67 wui-avatar {
68 width: 20px; 69 height: 20px; 70 box-shadow: 0 0 0 2px var(--wui-color-accent-glass-010); 71 } 72 73 @media (max-width: 500px) { 74 button { 75 gap: 0px; 76 padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important; 77 height: 32px; 78 } 79 wui-image, 80 wui-icon-box, 81 button > wui-text { 82 visibility: hidden; 83 width: 0px; 84 height: 0px; 85 } 86 button { 87 border-radius: 0px; 88 border: none; 89 background: transparent; 90 padding: 0px; 91 } 92 } 93 94 @media (hover: hover) and (pointer: fine) { 95 button:hover:enabled > wui-flex > wui-text { 96 color: var(--wui-color-fg-175); 97 } 98 99 button:active:enabled > wui-flex > wui-text { 100 color: var(--wui-color-fg-175); 101 } 102 } 103`;var m=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let v=class extends o.WF{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.loading=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return(0,o.qy)` 104 <button 105 ?disabled=${this.disabled} 106 class=${(0,r.J)(this.balance?void 0:"local-no-balance")} 107 > 108 ${this.balanceTemplate()} 109 <wui-flex gap="xxs" alignItems="center"> 110 <wui-avatar 111 .imageSrc=${this.avatarSrc} 112 alt=${this.address} 113 address=${this.address} 114 ></wui-avatar> 115 <wui-text variant="paragraph-600" color="inherit"> 116 ${this.address?g.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null} 117 </wui-text> 118 </wui-flex> 119 </button> 120 `}balanceTemplate(){if(this.isUnsupportedChain)return(0,o.qy)` <wui-icon-box 121 size="sm" 122 iconColor="error-100" 123 backgroundColor="error-100" 124 icon="warningCircle" 125 ></wui-icon-box> 126 <wui-text variant="paragraph-600" color="inherit"> Switch Network</wui-text>`;if(this.balance){let e=this.networkSrc?(0,o.qy)`<wui-image src=${this.networkSrc}></wui-image>`:(0,o.qy)` 127 <wui-icon-box 128 size="sm" 129 iconColor="fg-200" 130 backgroundColor="fg-300" 131 icon="networkPlaceholder" 132 ></wui-icon-box> 133 `,t=this.loading?(0,o.qy)`<wui-loading-spinner size="md" color="fg-200"></wui-loading-spinner>`:(0,o.qy)`<wui-text variant="paragraph-600" color="inherit"> ${this.balance}</wui-text>`;return(0,o.qy)`${e} ${t}`}return null}};v.styles=[w.W5,w.fD,f],m([(0,a.MZ)()],v.prototype,"networkSrc",void 0),m([(0,a.MZ)()],v.prototype,"avatarSrc",void 0),m([(0,a.MZ)()],v.prototype,"balance",void 0),m([(0,a.MZ)({type:Boolean})],v.prototype,"isUnsupportedChain",void 0),m([(0,a.MZ)({type:Boolean})],v.prototype,"disabled",void 0),m([(0,a.MZ)({type:Boolean})],v.prototype,"loading",void 0),m([(0,a.MZ)()],v.prototype,"address",void 0),m([(0,a.MZ)()],v.prototype,"profileName",void 0),m([(0,a.MZ)()],v.prototype,"charsStart",void 0),m([(0,a.MZ)()],v.prototype,"charsEnd",void 0),v=m([(0,b.E)("wui-account-button")],v);var y=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class x extends o.WF{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.namespace=void 0,this.isSupported=!!n.H.state.allowUnsupportedChain||!s.W.state.activeChain||s.W.checkIfSupportedNetwork(s.W.state.activeChain)}connectedCallback(){super.connectedCallback(),this.setAccountData(s.W.getAccountData(this.namespace)),this.setNetworkData(s.W.getNetworkData(this.namespace))}firstUpdated(){let e=this.namespace;e?this.unsubscribe.push(s.W.subscribeChainProp("accountState",e=>{this.setAccountData(e)},e),s.W.subscribeChainProp("networkState",t=>{this.setNetworkData(t),this.isSupported=s.W.checkIfSupportedNetwork(e,t?.caipNetwork)},e)):this.unsubscribe.push(l.j.subscribeNetworkImages(()=>{this.networkImage=c.$.getNetworkImage(this.network)}),s.W.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),d.U.subscribeKey("balance",e=>this.balanceVal=e),d.U.subscribeKey("balanceSymbol",e=>this.balanceSymbol=e),d.U.subscribeKey("profileName",e=>this.profileName=e),d.U.subscribeKey("profileImage",e=>this.profileImage=e),s.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.$.getNetworkImage(e),this.isSupported=!e?.chainNamespace||s.W.checkIfSupportedNetwork(e?.chainNamespace),this.fetchNetworkImage(e)}))}updated(){this.fetchNetworkImage(this.network)}
133disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!s.W.state.activeChain)return null;let e="show"===this.balance,t="string"!=typeof this.balanceVal;return(0,o.qy)` 134 <wui-account-button 135 .disabled=${!!this.disabled} 136 .isUnsupportedChain=${!n.H.state.allowUnsupportedChain&&!this.isSupported} 137 address=${(0,r.J)(u.w.getPlainAddress(this.caipAddress))} 138 profileName=${(0,r.J)(this.profileName)} 139 networkSrc=${(0,r.J)(this.networkImage)} 140 avatarSrc=${(0,r.J)(this.profileImage)} 141 balance=${e?u.w.formatBalance(this.balanceVal,this.balanceSymbol):""} 142 @click=${this.onClick.bind(this)} 143 data-testid=${`account-button${this.namespace?`-${this.namespace}`:""}`} 144 .charsStart=${this.charsStart} 145 .charsEnd=${this.charsEnd} 146 ?loading=${t} 147 > 148 </wui-account-button> 149 `}onClick(){this.isSupported||n.H.state.allowUnsupportedChain?p.W.open({namespace:this.namespace}):p.W.open({view:"UnsupportedChain"})}async fetchNetworkImage(e){e?.assets?.imageId&&(this.networkImage=await c.$.fetchNetworkImage(e?.assets?.imageId))}setAccountData(e){e&&(this.caipAddress=e.caipAddress,this.balanceVal=e.balance,this.balanceSymbol=e.balanceSymbol,this.profileName=e.profileName,this.profileImage=e.profileImage)}setNetworkData(e){e&&(this.network=e.caipNetwork,this.networkImage=c.$.getNetworkImage(e.caipNetwork))}}y([(0,a.MZ)({type:Boolean})],x.prototype,"disabled",void 0),y([(0,a.MZ)()],x.prototype,"balance",void 0),y([(0,a.MZ)()],x.prototype,"charsStart",void 0),y([(0,a.MZ)()],x.prototype,"charsEnd",void 0),y([(0,a.MZ)()],x.prototype,"namespace",void 0),y([(0,a.wk)()],x.prototype,"caipAddress",void 0),y([(0,a.wk)()],x.prototype,"balanceVal",void 0),y([(0,a.wk)()],x.prototype,"balanceSymbol",void 0),y([(0,a.wk)()],x.prototype,"profileName",void 0),y([(0,a.wk)()],x.prototype,"profileImage",void 0),y([(0,a.wk)()],x.prototype,"network",void 0),y([(0,a.wk)()],x.prototype,"networkImage",void 0),y([(0,a.wk)()],x.prototype,"isSupported",void 0);let k=class extends x{};k=y([(0,h.EM)("w3m-account-button")],k);let C=class extends x{};C=y([(0,h.EM)("appkit-account-button")],C);let $=(0,o.AH)` 150 :host { 151 display: block; 152 width: max-content; 153 } 154`;var S=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class I extends o.WF{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.namespace=void 0}connectedCallback(){super.connectedCallback(),this.caipAddress=this.namespace?s.W.state.chains.get(this.namespace)?.accountState?.caipAddress:s.W.state.activeCaipAddress}firstUpdated(){this.namespace?this.unsubscribe.push(s.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},this.namespace)):this.unsubscribe.push(s.W.subscribeKey("activeCaipAddress",e=>this.caipAddress=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.caipAddress?(0,o.qy)` 155 <appkit-account-button 156 .disabled=${!!this.disabled} 157 balance=${(0,r.J)(this.balance)} 158 .charsStart=${(0,r.J)(this.charsStart)} 159 .charsEnd=${(0,r.J)(this.charsEnd)} 160 namespace=${(0,r.J)(this.namespace)} 161 > 162 </appkit-account-button> 163 `:(0,o.qy)` 164 <appkit-connect-button 165 size=${(0,r.J)(this.size)} 166 label=${(0,r.J)(this.label)} 167 loadingLabel=${(0,r.J)(this.loadingLabel)} 168 namespace=${(0,r.J)(this.namespace)} 169 ></appkit-connect-button> 170 `}}I.styles=$,S([(0,a.MZ)({type:Boolean})],I.prototype,"disabled",void 0),S([(0,a.MZ)()],I.prototype,"balance",void 0),S([(0,a.MZ)()],I.prototype,"size",void 0),S([(0,a.MZ)()],I.prototype,"label",void 0),S([(0,a.MZ)()],I.prototype,"loadingLabel",void 0),S([(0,a.MZ)()],I.prototype,"charsStart",void 0),S([(0,a.MZ)()],I.prototype,"charsEnd",void 0),S([(0,a.MZ)()],I.prototype,"namespace",void 0),S([(0,a.wk)()],I.prototype,"caipAddress",void 0);let A=class extends I{};A=S([(0,h.EM)("w3m-button")],A);let E=class extends I{};E=S([(0,h.EM)("appkit-button")],E);let T=(0,o.AH)` 171 :host { 172 position: relative; 173 display: block; 174 } 175 176 button { 177 background: var(--wui-color-accent-100); 178 border: 1px solid var(--wui-color-gray-glass-010); 179 border-radius: var(--wui-border-radius-m); 180 gap: var(--wui-spacing-xs); 181 } 182 183 button.loading { 184 background: var(--wui-color-gray-glass-010); 185 border: 1px solid var(--wui-color-gray-glass-010); 186 pointer-events: none; 187 } 188 189 button:disabled { 190 background-color: var(--wui-color-gray-glass-015); 191 border: 1px solid var(--wui-color-gray-glass-010); 192 } 193 194 button:disabled > wui-text { 195 color: var(--wui-color-gray-glass-015); 196 } 197 198 @media (hover: hover) and (pointer: fine) { 199 button:hover:enabled { 200 background-color: var(--wui-color-accent-090); 201 } 202 203 button:active:enabled { 204 background-color: var(--wui-color-accent-080); 205 } 206 } 207 208 button:focus-visible { 209 border: 1px solid var(--wui-color-gray-glass-010); 210 background-color: var(--wui-color-accent-090);
211 -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 212 -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 213 box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); 214 } 215 216 button[data-size='sm'] { 217 padding: 6.75px 10px 7.25px; 218 } 219 220 ::slotted(*) { 221 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 222 will-change: opacity; 223 opacity: var(--local-opacity-100); 224 } 225 226 button > wui-text { 227 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 228 will-change: opacity; 229 opacity: var(--local-opacity-100); 230 color: var(--wui-color-inverse-100); 231 } 232 233 button[data-size='md'] { 234 padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l); 235 } 236 237 button[data-size='md'] + wui-text { 238 padding-left: var(--wui-spacing-3xs); 239 } 240 241 @media (max-width: 500px) { 242 button[data-size='md'] { 243 height: 32px; 244 padding: 5px 12px; 245 } 246 247 button[data-size='md'] > wui-text > slot { 248 font-size: 14px !important; 249 } 250 } 251 252 wui-loading-spinner { 253 width: 14px; 254 height: 14px; 255 } 256 257 wui-loading-spinner::slotted(svg) { 258 width: 10px !important; 259 height: 10px !important; 260 } 261 262 button[data-size='sm'] > wui-loading-spinner { 263 width: 12px; 264 height: 12px; 265 } 266`;var R=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let W=class extends o.WF{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){let e="md"===this.size?"paragraph-600":"small-600";return(0,o.qy)` 267 <button data-size=${this.size} ?disabled=${this.loading}> 268 ${this.loadingTemplate()} 269 <wui-text variant=${e} color=${this.loading?"accent-100":"inherit"}> 270 <slot></slot> 271 </wui-text> 272 </button> 273 `}loadingTemplate(){return this.loading?(0,o.qy)`<wui-loading-spinner size=${this.size} color="accent-100"></wui-loading-spinner>`:null}};W.styles=[w.W5,w.fD,T],R([(0,a.MZ)()],W.prototype,"size",void 0),R([(0,a.MZ)({type:Boolean})],W.prototype,"loading",void 0),W=R([(0,b.E)("wui-connect-button")],W);var O=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends o.WF{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=p.W.state.open,this.loading=this.namespace?p.W.state.loadingNamespaceMap.get(this.namespace):p.W.state.loading,this.unsubscribe.push(p.W.subscribe(e=>{this.open=e.open,this.loading=this.namespace?e.loadingNamespaceMap.get(this.namespace):e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 274 <wui-connect-button 275 size=${(0,r.J)(this.size)} 276 .loading=${this.loading} 277 @click=${this.onClick.bind(this)} 278 data-testid=${`connect-button${this.namespace?`-${this.namespace}`:""}`} 279 > 280 ${this.loading?this.loadingLabel:this.label} 281 </wui-connect-button> 282 `}onClick(){this.open?p.W.close():this.loading||p.W.open({view:"Connect",namespace:this.namespace})}}O([(0,a.MZ)()],N.prototype,"size",void 0),O([(0,a.MZ)()],N.prototype,"label",void 0),O([(0,a.MZ)()],N.prototype,"loadingLabel",void 0),O([(0,a.MZ)()],N.prototype,"namespace",void 0),O([(0,a.wk)()],N.prototype,"open",void 0),O([(0,a.wk)()],N.prototype,"loading",void 0);let M=class extends N{};M=O([(0,h.EM)("w3m-connect-button")],M);let P=class extends N{};P=O([(0,h.EM)("appkit-connect-button")],P);var j=i(66699);let q=(0,o.AH)` 283 :host { 284 display: block; 285 } 286 287 button { 288 border-radius: var(--wui-border-radius-3xl); 289 display: flex; 290 gap: var(--wui-spacing-xs); 291 padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs) 292 var(--wui-spacing-xs); 293 border: 1px solid var(--wui-color-gray-glass-010); 294 background-color: var(--wui-color-gray-glass-005); 295 color: var(--wui-color-fg-100); 296 } 297 298 button:disabled { 299 border: 1px solid var(--wui-color-gray-glass-005); 300 background-color: var(--wui-color-gray-glass-015); 301 color: var(--wui-color-gray-glass-015); 302 } 303 304 @media (hover: hover) and (pointer: fine) { 305 button:hover:enabled { 306 background-color: var(--wui-color-gray-glass-010); 307 } 308 309 button:active:enabled { 310 background-color: var(--wui-color-gray-glass-015); 311 } 312 } 313 314 wui-image, 315 wui-icon-box { 316 border-radius: var(--wui-border-radius-3xl); 317 width: 24px; 318 height: 24px; 319 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 320 } 321`;var D=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let U=class extends o.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return(0,o.qy)` 322 <button data-testid="wui-network-button" ?disabled=${this.disabled}> 323 ${this.visualTemplate()} 324 <wui-text variant="paragraph-600" color="inherit"> 325 <slot></slot> 326 </wui-text> 327 </button> 328 `}visualTemplate(){return this.isUnsupportedChain?(0,o.qy)` 329 <wui-icon-box 330 size="sm" 331 iconColor="error-100" 332 backgroundColor="error-100" 333 icon="warningCircle" 334 ></wui-icon-box> 335 `:this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc}></wui-image>`:(0,o.qy)` 336 <wui-icon-box 337 size="sm" 338 iconColor="inverse-100" 339 backgroundColor="fg-100" 340 icon="networkPlaceholder" 341 ></wui-icon-box> 342 `}};U.styles=[w.W5,w.fD,q],D([(0,a.MZ)()],U.prototype,"imageSrc",void 0),D([(0,a.MZ)({type:Boolean})],U.prototype,"isUnsupportedChain",void 0),D([(0,a.MZ)({type:Boolean})],U.prototype,"disabled",void 0),U=D([(0,b.E)("wui-network-button")],U);let L=(0,o.AH)` 343 :host { 344 display: block; 345 width: max-content; 346 } 347`;var z=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class Z extends o.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=s.W.state.activeCaipNetwork,this.networkImage=c.$.getNetworkImage(this.network),this.caipAddress=s.W.state.activeCaipAddress,this.loading=p.W.state.loading,this.isSupported=!!n.H.state.allowUnsupportedChain||!s.W.state.activeChain||s.W.checkIfSupportedNetwork(s.W.state.activeChain),this.unsubscribe.push(l.j.subscribeNetworkImages(()=>{this.networkImage=c.$.getNetworkImage(this.network)}),s.W.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),s.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.$.getNetworkImage(e),this.isSupported=!e?.chainNamespace||s.W.checkIfSupportedNetwork(e.chainNamespace),c.$.fetchNetworkImage(e?.assets?.imageId)}),p.W.subscribeKey("loading",e=>this.loading=e))}firstUpdated(){c.$.fetchNetworkImage(this.network?.assets?.imageId)}
347disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=!this.network||s.W.checkIfSupportedNetwork(this.network.chainNamespace);return(0,o.qy)` 348 <wui-network-button 349 .disabled=${!!(this.disabled||this.loading)} 350 .isUnsupportedChain=${!n.H.state.allowUnsupportedChain&&!e} 351 imageSrc=${(0,r.J)(this.networkImage)} 352 @click=${this.onClick.bind(this)} 353 data-testid="w3m-network-button" 354 > 355 ${this.getLabel()} 356 <slot></slot> 357 </wui-network-button> 358 `}getLabel(){return this.network?this.isSupported||n.H.state.allowUnsupportedChain?this.network.name:"Switch Network":this.label?this.label:this.caipAddress?"Unknown Network":"Select Network"}onClick(){this.loading||(j.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),p.W.open({view:"Networks"}))}}Z.styles=L,z([(0,a.MZ)({type:Boolean})],Z.prototype,"disabled",void 0),z([(0,a.MZ)({type:String})],Z.prototype,"label",void 0),z([(0,a.wk)()],Z.prototype,"network",void 0),z([(0,a.wk)()],Z.prototype,"networkImage",void 0),z([(0,a.wk)()],Z.prototype,"caipAddress",void 0),z([(0,a.wk)()],Z.prototype,"loading",void 0),z([(0,a.wk)()],Z.prototype,"isSupported",void 0);let B=class extends Z{};B=z([(0,h.EM)("w3m-network-button")],B);let F=class extends Z{};F=z([(0,h.EM)("appkit-network-button")],F);var H=i(68588),_=i(11731),V=i(4537),J=i(88515),K=i(10840),G=i(83503),Y=i(85845),X=i(24492);i(58301),i(12026),i(77749),i(28009),i(64001);let Q=(0,o.AH)` 359 :host { 360 display: block; 361 } 362 363 button { 364 width: 100%; 365 display: block; 366 padding-top: var(--wui-spacing-l); 367 padding-bottom: var(--wui-spacing-l); 368 padding-left: var(--wui-spacing-s); 369 padding-right: var(--wui-spacing-2l); 370 border-radius: var(--wui-border-radius-s); 371 background-color: var(--wui-color-accent-glass-010); 372 } 373 374 button:hover { 375 background-color: var(--wui-color-accent-glass-015) !important; 376 } 377 378 button:active { 379 background-color: var(--wui-color-accent-glass-020) !important; 380 } 381`;var ee=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let et=class extends o.WF{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return(0,o.qy)` 382 <button> 383 <wui-flex gap="m" alignItems="center" justifyContent="space-between"> 384 <wui-icon-box 385 size="lg" 386 iconcolor="accent-100" 387 backgroundcolor="accent-100" 388 icon=${this.icon} 389 background="transparent" 390 ></wui-icon-box> 391 392 <wui-flex flexDirection="column" gap="3xs"> 393 <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text> 394 <wui-text variant="small-400" color="fg-200">${this.description}</wui-text> 395 </wui-flex> 396 397 <wui-icon size="md" color="fg-200" name="chevronRight"></wui-icon> 398 </wui-flex> 399 </button> 400 `}};et.styles=[w.W5,w.fD,Q],ee([(0,a.MZ)()],et.prototype,"label",void 0),ee([(0,a.MZ)()],et.prototype,"description",void 0),ee([(0,a.MZ)()],et.prototype,"icon",void 0),et=ee([(0,b.E)("wui-notice-card")],et),i(85893);var ei=i(32375),eo=i(38623),ea=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let er=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=eo.i.getConnectedSocialProvider(),this.socialUsername=eo.i.getConnectedSocialUsername(),this.namespace=s.W.state.activeChain,this.unsubscribe.push(s.W.subscribeKey("activeChain",e=>{this.namespace=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=V.a.getConnectorId(this.namespace),t=V.a.getAuthConnector();if(!t||e!==_.o.CONNECTOR_ID.AUTH)return this.style.cssText="display: none",null;let i=t.provider.getEmail()??"";return i||this.socialUsername?(0,o.qy)` 401 <wui-list-item 402 variant="icon" 403 iconVariant="overlay" 404 icon=${this.socialProvider??"mail"} 405 iconSize=${this.socialProvider?"xxl":"sm"} 406 data-testid="w3m-account-email-update" 407 ?chevron=${!this.socialProvider} 408 @click=${()=>{this.onGoToUpdateEmail(i,this.socialProvider)}} 409 > 410 <wui-text variant="paragraph-500" color="fg-100">${this.getAuthName(i)}</wui-text> 411 </wui-list-item> 412 `:(this.style.cssText="display: none",null)}onGoToUpdateEmail(e,t){t||G.I.push("UpdateEmailWallet",{email:e,redirectView:"Account"})}getAuthName(e){return this.socialUsername?"discord"===this.socialProvider&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};ea([(0,a.wk)()],er.prototype,"namespace",void 0),er=ea([(0,h.EM)("w3m-account-auth-button")],er);var en=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let es=class extends o.WF{constructor(){super(),this.usubscribe=[],this.networkImages=l.j.state.networkImages,this.address=d.U.state.address,this.profileImage=d.U.state.profileImage,this.profileName=d.U.state.profileName,this.network=s.W.state.activeCaipNetwork,this.preferredAccountTypes=d.U.state.preferredAccountTypes,this.disconnecting=!1,this.loading=!1,this.switched=!1,this.text="",this.usubscribe.push(d.U.subscribe(e=>{e.address&&(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountTypes=e.preferredAccountTypes)}),d.U.subscribeKey("preferredAccountTypes",e=>this.preferredAccountTypes=e),s.W.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}))}
412disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-account-settings-view: No account provided");let e=this.networkImages[this.network?.assets?.imageId??""];return(0,o.qy)` 413 <wui-flex 414 flexDirection="column" 415 alignItems="center" 416 gap="l" 417 .padding=${["0","xl","m","xl"]} 418 > 419 <wui-avatar 420 alt=${this.address} 421 address=${this.address} 422 imageSrc=${(0,r.J)(this.profileImage)} 423 size="2lg" 424 ></wui-avatar> 425 <wui-flex flexDirection="column" alignItems="center"> 426 <wui-flex gap="3xs" alignItems="center" justifyContent="center"> 427 <wui-text variant="title-6-600" color="fg-100" data-testid="account-settings-address"> 428 ${h.Zv.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} 429 </wui-text> 430 <wui-icon-link 431 size="md" 432 icon="copy" 433 iconColor="fg-200" 434 @click=${this.onCopyAddress} 435 ></wui-icon-link> 436 </wui-flex> 437 </wui-flex> 438 </wui-flex> 439 <wui-flex flexDirection="column" gap="m"> 440 <wui-flex flexDirection="column" gap="xs" .padding=${["0","l","m","l"]}> 441 ${this.authCardTemplate()} 442 <w3m-account-auth-button></w3m-account-auth-button> 443 <wui-list-item 444 .variant=${e?"image":"icon"} 445 iconVariant="overlay" 446 icon="networkPlaceholder" 447 imageSrc=${(0,r.J)(e)} 448 ?chevron=${this.isAllowedNetworkSwitch()} 449 @click=${this.onNetworks.bind(this)} 450 data-testid="account-switch-network-button" 451 > 452 <wui-text variant="paragraph-500" color="fg-100"> 453 ${this.network?.name??"Unknown"} 454 </wui-text> 455 </wui-list-item> 456 ${this.togglePreferredAccountBtnTemplate()} ${this.chooseNameButtonTemplate()} 457 <wui-list-item 458 variant="icon" 459 iconVariant="overlay" 460 icon="disconnect" 461 ?chevron=${!1} 462 .loading=${this.disconnecting} 463 @click=${this.onDisconnect.bind(this)} 464 data-testid="disconnect-button" 465 > 466 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 467 </wui-list-item> 468 </wui-flex> 469 </wui-flex> 470 `}chooseNameButtonTemplate(){let e=this.network?.chainNamespace,t=V.a.getConnectorId(e),i=V.a.getAuthConnector();return s.W.checkIfNamesSupported()&&i&&t===_.o.CONNECTOR_ID.AUTH&&!this.profileName?(0,o.qy)` 471 <wui-list-item 472 variant="icon" 473 iconVariant="overlay" 474 icon="id" 475 iconSize="sm" 476 ?chevron=${!0} 477 @click=${this.onChooseName.bind(this)} 478 data-testid="account-choose-name-button" 479 > 480 <wui-text variant="paragraph-500" color="fg-100">Choose account name </wui-text> 481 </wui-list-item> 482 `:null}authCardTemplate(){let e=this.network?.chainNamespace,t=V.a.getConnectorId(e),i=V.a.getAuthConnector(),{origin:a}=location;return!i||t!==_.o.CONNECTOR_ID.AUTH||a.includes(J.oU.SECURE_SITE)?null:(0,o.qy)` 483 <wui-notice-card 484 @click=${this.onGoToUpgradeView.bind(this)} 485 label="Upgrade your wallet" 486 description="Transition to a self-custodial wallet" 487 icon="wallet" 488 data-testid="w3m-wallet-upgrade-card" 489 ></wui-notice-card> 490 `}isAllowedNetworkSwitch(){let e=s.W.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find(({id:e})=>e===this.network?.id);return t||!i}onCopyAddress(){try{this.address&&(u.w.copyToClopboard(this.address),K.P.showSuccess("Address copied"))}catch{K.P.showError("Failed to copy")}}togglePreferredAccountBtnTemplate(){let e=this.network?.chainNamespace,t=s.W.checkIfSmartAccountEnabled(),i=V.a.getConnectorId(e);return V.a.getAuthConnector()&&i===_.o.CONNECTOR_ID.AUTH&&t?(this.switched||(this.text=this.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account"),(0,o.qy)` 491 <wui-list-item 492 variant="icon" 493 iconVariant="overlay" 494 icon="swapHorizontalBold" 495 iconSize="sm" 496 ?chevron=${!0} 497 ?loading=${this.loading} 498 @click=${this.changePreferredAccountType.bind(this)} 499 data-testid="account-toggle-preferred-account-type" 500 > 501 <wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text> 502 </wui-list-item> 503 `):null}onChooseName(){G.I.push("ChooseAccountName")}async changePreferredAccountType(){let e=this.network?.chainNamespace,t=s.W.checkIfSmartAccountEnabled(),i=this.preferredAccountTypes?.[e]!==ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT&&t?ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT:ei.Vl.ACCOUNT_TYPES.EOA;V.a.getAuthConnector()&&(this.loading=!0,await Y.x.setPreferredAccountType(i,e),this.text=i===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account",this.switched=!0,X.R.resetSend(),this.loading=!1,this.requestUpdate())}onNetworks(){this.isAllowedNetworkSwitch()&&G.I.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await Y.x.disconnect(),p.W.close()}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),K.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onGoToUpgradeView(){j.E.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),G.I.push("UpgradeEmailWallet")}};en([(0,a.wk)()],es.prototype,"address",void 0),en([(0,a.wk)()],es.prototype,"profileImage",void 0),en([(0,a.wk)()],es.prototype,"profileName",void 0),en([(0,a.wk)()],es.prototype,"network",void 0),en([(0,a.wk)()],es.prototype,"preferredAccountTypes",void 0),en([(0,a.wk)()],es.prototype,"disconnecting",void 0),en([(0,a.wk)()],es.prototype,"loading",void 0),en([(0,a.wk)()],es.prototype,"switched",void 0),en([(0,a.wk)()],es.prototype,"text",void 0),es=en([(0,h.EM)("w3m-account-settings-view")],es),i(83066),i(66571);let el=(0,o.AH)` 504 button { 505 background-color: var(--wui-color-gray-glass-002); 506 border-radius: var(--wui-border-radius-3xl); 507 border: 1px solid var(--wui-color-gray-glass-002); 508 padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs); 509 position: relative; 510 } 511 512 wui-avatar { 513 width: 32px; 514 height: 32px; 515 box-shadow: 0 0 0 0; 516 outline: 3px solid var(--wui-color-gray-glass-005); 517 } 518 519 wui-icon-box, 520 wui-image { 521 width: 16px; 522 height: 16px; 523 border-radius: var(--wui-border-radius-3xl); 524 position: absolute; 525 left: 26px; 526 top: 24px; 527 } 528 529 wui-image { 530 outline: 2px solid var(--wui-color-bg-125); 531 } 532 533 wui-icon-box { 534 outline: 2px solid var(--wui-color-bg-200); 535 background-color: var(--wui-color-bg-250); 536 } 537`;var ec=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ed=class extends o.WF{constructor(){super(...arguments),this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="mail"}render(){let e=s.W.state.activeChain,t=V.a.getConnectorId(e)===_.o.CONNECTOR_ID.AUTH;return(0,o.qy)`<button data-testid="wui-profile-button" @click=${this.handleClick}> 538 <wui-flex gap="xs" alignItems="center"> 539 <wui-avatar 540 .imageSrc=${this.avatarSrc} 541 alt=${this.address} 542 address=${this.address} 543 ></wui-avatar> 544 ${t?this.getIconTemplate(this.icon):""} 545 <wui-flex gap="xs" alignItems="center"> 546 <wui-text variant="large-600" color="fg-100"> 547 ${g.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 548 </wui-text> 549 <wui-icon size="sm" color="fg-200" name="copy" id="copy-address"></wui-icon> 550 </wui-flex> 551 </wui-flex> 552 </button>`}handleClick(e){if(e.target instanceof HTMLElement&&"copy-address"===e.target.id){this.onCopyClick?.(e);return}this.onProfileClick?.(e)}getIconTemplate(e){return(0,o.qy)` 553 <wui-icon-box 554 size="xxs" 555 iconColor="fg-200" 556 backgroundColor="bg-100" 557 icon="${e||"networkPlaceholder"}" 558 ></wui-icon-box> 559 `}};ed.styles=[w.W5,w.fD,el],ec([(0,a.MZ)()],ed.prototype,"avatarSrc",void 0),ec([(0,a.MZ)()],ed.prototype,"profileName",void 0),ec([(0,a.MZ)()],ed.prototype,"address",void 0),ec([(0,a.MZ)()],ed.prototype,"icon",void 0),ec([(0,a.MZ)()],ed.prototype,"onProfileClick",void 0),ec([(0,a.MZ)()],ed.prototype,"onCopyClick",void 0),ed=ec([(0,b.E)("wui-profile-button-v2")],ed);let eu=(0,o.AH)` 560 :host { 561 display: inline-flex; 562 background-color: var(--wui-color-gray-glass-002); 563 border-radius: var(--wui-border-radius-3xl); 564 padding: var(--wui-spacing-3xs); 565 position: relative; 566 height: 36px; 567 min-height: 36px; 568 overflow: hidden; 569 } 570 571 :host::before { 572 content: ''; 573 position: absolute; 574 pointer-events: none; 575 top: 4px; 576 left: 4px; 577 display: block; 578 width: var(--local-tab-width); 579 height: 28px; 580 border-radius: var(--wui-border-radius-3xl); 581 background-color: var(--wui-color-gray-glass-002); 582 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 583 transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); 584 transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md); 585 will-change: background-color, opacity; 586 } 587 588 :host([data-type='flex'])::before { 589 left: 3px; 590 transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); 591 } 592 593 :host([data-type='flex']) { 594 display: flex; 595 padding: 0px 0px 0px 12px; 596 gap: 4px; 597 } 598 599 :host([data-type='flex']) > button > wui-text { 600 position: absolute; 601 left: 18px; 602 opacity: 0; 603 } 604 605 button[data-active='true'] > wui-icon, 606 button[data-active='true'] > wui-text { 607 color: var(--wui-color-fg-100); 608 } 609 610 button[data-active='false'] > wui-icon, 611 button[data-active='false'] > wui-text { 612 color: var(--wui-color-fg-200); 613 } 614 615 button[data-active='true']:disabled, 616 button[data-active='false']:disabled { 617 background-color: transparent; 618 opacity: 0.5;
619 cursor: not-allowed; 620 } 621 622 button[data-active='true']:disabled > wui-text { 623 color: var(--wui-color-fg-200); 624 } 625 626 button[data-active='false']:disabled > wui-text { 627 color: var(--wui-color-fg-300); 628 } 629 630 button > wui-icon, 631 button > wui-text { 632 pointer-events: none; 633 transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md); 634 will-change: color; 635 } 636 637 button { 638 width: var(--local-tab-width); 639 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 640 will-change: background-color; 641 } 642 643 :host([data-type='flex']) > button { 644 width: 34px; 645 position: relative; 646 display: flex; 647 justify-content: flex-start; 648 } 649 650 button:hover:enabled, 651 button:active:enabled { 652 background-color: transparent !important; 653 } 654 655 button:hover:enabled > wui-icon, 656 button:active:enabled > wui-icon { 657 transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); 658 color: var(--wui-color-fg-125); 659 } 660 661 button:hover:enabled > wui-text, 662 button:active:enabled > wui-text { 663 transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); 664 color: var(--wui-color-fg-125); 665 } 666 667 button { 668 border-radius: var(--wui-border-radius-3xl); 669 } 670`;var ep=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eh=class extends o.WF{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=` 671 --local-tab: ${this.activeTab}; 672 --local-tab-width: ${this.localTabWidth}; 673 `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,t)=>{let i=t===this.activeTab;return(0,o.qy)` 674 <button 675 ?disabled=${this.disabled} 676 @click=${()=>this.onTabClick(t)} 677 data-active=${i} 678 data-testid="tab-${e.label?.toLowerCase()}" 679 > 680 ${this.iconTemplate(e)} 681 <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text> 682 </button> 683 `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?(0,o.qy)`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){let i=this.buttons[this.activeTab],o=this.buttons[e],a=i?.querySelector("wui-text"),r=o?.querySelector("wui-text"),n=o?.getBoundingClientRect(),s=r?.getBoundingClientRect();i&&a&&!t&&e!==this.activeTab&&(a.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),i.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),o&&n&&s&&r&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(n.width+s.width)+6}px`,o.animate([{width:`${n.width+s.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),r.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};eh.styles=[w.W5,w.fD,eu],ep([(0,a.MZ)({type:Array})],eh.prototype,"tabs",void 0),ep([(0,a.MZ)()],eh.prototype,"onTabChange",void 0),ep([(0,a.MZ)({type:Array})],eh.prototype,"buttons",void 0),ep([(0,a.MZ)({type:Boolean})],eh.prototype,"disabled",void 0),ep([(0,a.MZ)()],eh.prototype,"localTabWidth",void 0),ep([(0,a.wk)()],eh.prototype,"activeTab",void 0),ep([(0,a.wk)()],eh.prototype,"isDense",void 0),eh=ep([(0,b.E)("wui-tabs")],eh),i(23166);let ew=(0,o.AH)` 684 wui-flex { 685 width: 100%; 686 } 687 688 :host > wui-flex:first-child { 689 transform: translateY(calc(var(--wui-spacing-xxs) * -1)); 690 } 691 692 wui-icon-link { 693 margin-right: calc(var(--wui-icon-box-size-md) * -1); 694 } 695 696 wui-notice-card { 697 margin-bottom: var(--wui-spacing-3xs); 698 } 699 700 wui-list-item > wui-text { 701 flex: 1; 702 } 703 704 w3m-transactions-view { 705 max-height: 200px; 706 } 707 708 .tab-content-container { 709 height: 300px; 710 overflow-y: auto; 711 overflow-x: hidden; 712 scrollbar-width: none; 713 } 714 715 .tab-content-container::-webkit-scrollbar {
716 display: none; 717 } 718 719 .account-button { 720 width: auto; 721 border: none; 722 display: flex; 723 align-items: center; 724 justify-content: center; 725 gap: var(--wui-spacing-s); 726 height: 48px; 727 padding: var(--wui-spacing-xs); 728 padding-right: var(--wui-spacing-s); 729 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 730 background-color: var(--wui-color-gray-glass-002); 731 border-radius: 24px; 732 transition: background-color 0.2s linear; 733 } 734 735 .account-button:hover { 736 background-color: var(--wui-color-gray-glass-005); 737 } 738 739 .avatar-container { 740 position: relative; 741 } 742 743 wui-avatar.avatar { 744 width: 32px; 745 height: 32px; 746 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 747 } 748 749 wui-avatar.network-avatar { 750 width: 16px; 751 height: 16px; 752 position: absolute; 753 left: 100%; 754 top: 100%; 755 transform: translate(-75%, -75%); 756 box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); 757 } 758 759 .account-links { 760 display: flex; 761 justify-content: space-between; 762 align-items: center; 763 } 764 765 .account-links wui-flex { 766 cursor: pointer; 767 display: flex; 768 align-items: center; 769 justify-content: center; 770 flex: 1; 771 background: red; 772 align-items: center; 773 justify-content: center; 774 height: 48px; 775 padding: 10px; 776 flex: 1 0 0; 777 border-radius: var(--XS, 16px); 778 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 779 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 780 transition: 781 background-color var(--wui-ease-out-power-1) var(--wui-duration-md), 782 opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 783 will-change: background-color, opacity; 784 } 785 786 .account-links wui-flex:hover { 787 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 788 } 789 790 .account-links wui-flex wui-icon { 791 width: var(--S, 20px); 792 height: var(--S, 20px); 793 } 794 795 .account-links wui-flex wui-icon svg path { 796 stroke: #667dff; 797 } 798`;var eg=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eb=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.caipAddress=d.U.state.caipAddress,this.address=u.w.getPlainAddress(d.U.state.caipAddress),this.allAccounts=d.U.state.allAccounts,this.profileImage=d.U.state.profileImage,this.profileName=d.U.state.profileName,this.disconnecting=!1,this.balance=d.U.state.balance,this.balanceSymbol=d.U.state.balanceSymbol,this.features=n.H.state.features,this.remoteFeatures=n.H.state.remoteFeatures,this.namespace=s.W.state.activeChain,this.chainId=s.W.state.activeCaipNetwork?.id,this.unsubscribe.push(d.U.subscribeKey("caipAddress",e=>{this.address=u.w.getPlainAddress(e),this.caipAddress=e}),d.U.subscribeKey("balance",e=>this.balance=e),d.U.subscribeKey("balanceSymbol",e=>this.balanceSymbol=e),d.U.subscribeKey("profileName",e=>this.profileName=e),d.U.subscribeKey("profileImage",e=>this.profileImage=e),n.H.subscribeKey("features",e=>this.features=e),n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),d.U.subscribeKey("allAccounts",e=>{this.allAccounts=e}),n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),s.W.subscribeKey("activeChain",e=>this.namespace=e),s.W.subscribeKey("activeCaipNetwork",e=>{if(e){let[t,i]=e?.caipNetworkId?.split(":")||[];t&&i&&(this.namespace=t,this.chainId=i)}}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.caipAddress)return null;let e=s.W.state.activeChain!==_.o.CHAIN.SOLANA&&this.allAccounts.length>1;return(0,o.qy)`<wui-flex 799 flexDirection="column" 800 .padding=${["0","xl","m","xl"]} 801 alignItems="center" 802 gap="l" 803 > 804 ${e?this.multiAccountTemplate():this.singleAccountTemplate()} 805 <wui-flex flexDirection="column" alignItems="center"> 806 <wui-text variant="paragraph-500" color="fg-200"> 807 ${u.w.formatBalance(this.balance,this.balanceSymbol)} 808 </wui-text> 809 </wui-flex> 810 ${this.explorerBtnTemplate()} 811 </wui-flex> 812 813 <wui-flex flexDirection="column" gap="xs" .padding=${["0","s","s","s"]}> 814 ${this.authCardTemplate()} <w3m-account-auth-button></w3m-account-auth-button> 815 ${this.orderedFeaturesTemplate()} ${this.activityTemplate()} 816 <wui-list-item 817 variant="icon" 818 iconVariant="overlay" 819 icon="disconnect" 820 ?chevron=${!1} 821 .loading=${this.disconnecting} 822 @click=${this.onDisconnect.bind(this)} 823 data-testid="disconnect-button" 824 > 825 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 826 </wui-list-item> 827 </wui-flex>`}onrampTemplate(){if(!this.namespace)return null;let e=this.remoteFeatures?.onramp,t=J.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace);return e&&t?(0,o.qy)` 828 <wui-list-item 829 data-testid="w3m-account-default-onramp-button" 830 iconVariant="blue" 831 icon="card" 832 ?chevron=${!0} 833 @click=${this.handleClickPay.bind(this)} 834 > 835 <wui-text variant="paragraph-500" color="fg-100">Buy crypto</wui-text> 836 </wui-list-item> 837 `:null}orderedFeaturesTemplate(){return(this.features?.walletFeaturesOrder||J.oU.DEFAULT_FEATURES.walletFeaturesOrder).map(e=>{switch(e){case"onramp":return this.onrampTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})}activityTemplate(){return this.namespace&&this.remoteFeatures?.activity&&J.oU.ACTIVITY_ENABLED_CHAIN_NAMESPACES.includes(this.namespace)?(0,o.qy)` <wui-list-item 838 iconVariant="blue" 839 icon="clock" 840 iconSize="sm" 841 ?chevron=${!0} 842 @click=${this.onTransactions.bind(this)} 843 data-testid="w3m-account-default-activity-button" 844 > 845 <wui-text variant="paragraph-500" color="fg-100">Activity</wui-text> 846 </wui-list-item>`:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=s.W.state.activeChain===_.o.CHAIN.EVM;return e&&t?(0,o.qy)` 847 <wui-list-item 848 iconVariant="blue" 849 icon="recycleHorizontal" 850 ?chevron=${!0} 851 @click=${this.handleClickSwap.bind(this)} 852 data-testid="w3m-account-default-swaps-button" 853 > 854 <wui-text variant="paragraph-500" color="fg-100">Swap</wui-text> 855 </wui-list-item> 856 `:null}sendTemplate(){let e=this.features?.send,t=s.W.state.activeChain,i=J.oU.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&i?(0,o.qy)` 857 <wui-list-item 858 iconVariant="blue" 859 icon="send" 860 ?chevron=${!0} 861 @click=${this.handleClickSend.bind(this)} 862 data-testid="w3m-account-default-send-button" 863 > 864 <wui-text variant="paragraph-500" color="fg-100">Send</wui-text> 865 </wui-list-item> 866 `:null}authCardTemplate(){let e=s.W.state.activeChain,t=V.a.getConnectorId(e),i=V.a.getAuthConnector(),{origin:a}=location;return!i||t!==_.o.CONNECTOR_ID.AUTH||a.includes(J.oU.SECURE_SITE)?null:(0,o.qy)` 867 <wui-notice-card 868 @click=${this.onGoToUpgradeView.bind(this)} 869 label="Upgrade your wallet" 870 description="Transition to a self-custodial wallet" 871 icon="wallet" 872 data-testid="w3m-wallet-upgrade-card" 873 ></wui-notice-card> 874 `}handleSwitchAccountsView(){G.I.push("SwitchAddress")}
874handleClickPay(){G.I.push("OnRampProviders")}handleClickSwap(){G.I.push("Swap")}handleClickSend(){G.I.push("WalletSend")}explorerBtnTemplate(){return d.U.state.addressExplorerUrl?(0,o.qy)` 875 <wui-button size="md" variant="neutral" @click=${this.onExplorer.bind(this)}> 876 <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon> 877 Block Explorer 878 <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon> 879 </wui-button> 880 `:null}singleAccountTemplate(){return(0,o.qy)` 881 <wui-avatar 882 alt=${(0,r.J)(this.caipAddress)} 883 address=${(0,r.J)(u.w.getPlainAddress(this.caipAddress))} 884 imageSrc=${(0,r.J)(null===this.profileImage?void 0:this.profileImage)} 885 data-testid="single-account-avatar" 886 ></wui-avatar> 887 <wui-flex flexDirection="column" alignItems="center"> 888 <wui-flex gap="3xs" alignItems="center" justifyContent="center"> 889 <wui-text variant="large-600" color="fg-100"> 890 ${this.profileName?h.Zv.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):h.Zv.getTruncateString({string:this.address||"",charsStart:4,charsEnd:4,truncate:"middle"})} 891 </wui-text> 892 <wui-icon-link 893 size="md" 894 icon="copy" 895 iconColor="fg-200" 896 @click=${this.onCopyAddress} 897 ></wui-icon-link> </wui-flex 898 ></wui-flex> 899 `}multiAccountTemplate(){if(!this.address)throw Error("w3m-account-view: No account provided");let e=this.allAccounts.find(e=>e.address===this.address),t=d.U.state.addressLabels.get(this.address);return"bip122"===this.namespace?this.btcAccountsTemplate():(0,o.qy)` 900 <wui-profile-button-v2 901 .onProfileClick=${this.handleSwitchAccountsView.bind(this)} 902 address=${(0,r.J)(this.address)} 903 icon="${e?.type===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT&&s.W.state.activeChain===_.o.CHAIN.EVM?"lightbulb":"mail"}" 904 avatarSrc=${(0,r.J)(this.profileImage?this.profileImage:void 0)} 905 profileName=${(0,r.J)(t||this.profileName)} 906 .onCopyClick=${this.onCopyAddress.bind(this)} 907 ></wui-profile-button-v2> 908 `}btcAccountsTemplate(){return(0,o.qy)`<wui-flex gap="m" alignItems="center" flexDirection="column"> 909 <wui-avatar 910 .imageSrc=${(0,r.J)(this.profileImage?this.profileImage:void 0)} 911 alt=${this.address} 912 address=${this.address} 913 ></wui-avatar> 914 <wui-tabs 915 .tabs=${[{label:"Payment"},{label:"Ordinals"}]} 916 .onTabChange=${e=>d.U.setCaipAddress(`bip122:${this.chainId}:${this.allAccounts[e]?.address||""}`,this.namespace)} 917 ></wui-tabs> 918 <wui-flex gap="xs" alignItems="center" justifyContent="center"> 919 <wui-text variant="large-600" color="fg-100"> 920 ${h.Zv.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 921 </wui-text> 922 <wui-icon-link 923 size="md" 924 icon="copy" 925 iconColor="fg-200" 926 @click=${this.onCopyAddress} 927 ></wui-icon-link> 928 </wui-flex> 929 </wui-flex>`}onCopyAddress(){try{this.address&&(u.w.copyToClopboard(this.address),K.P.showSuccess("Address copied"))}catch{K.P.showError("Failed to copy")}}onTransactions(){let e=s.W.state.activeChain;j.E.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:d.U.state.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),G.I.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await Y.x.disconnect(),p.W.close()}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),K.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){let e=d.U.state.addressExplorerUrl;e&&u.w.openHref(e,"_blank")}onGoToUpgradeView(){j.E.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),G.I.push("UpgradeEmailWallet")}};eb.styles=ew,eg([(0,a.wk)()],eb.prototype,"caipAddress",void 0),eg([(0,a.wk)()],eb.prototype,"address",void 0),eg([(0,a.wk)()],eb.prototype,"allAccounts",void 0),eg([(0,a.wk)()],eb.prototype,"profileImage",void 0),eg([(0,a.wk)()],eb.prototype,"profileName",void 0),eg([(0,a.wk)()],eb.prototype,"disconnecting",void 0),eg([(0,a.wk)()],eb.prototype,"balance",void 0),eg([(0,a.wk)()],eb.prototype,"balanceSymbol",void 0),eg([(0,a.wk)()],eb.prototype,"features",void 0),eg([(0,a.wk)()],eb.prototype,"remoteFeatures",void 0),eg([(0,a.wk)()],eb.prototype,"namespace",void 0),eg([(0,a.wk)()],eb.prototype,"chainId",void 0),eb=eg([(0,h.EM)("w3m-account-default-widget")],eb);let ef=(0,o.AH)` 930 span { 931 font-weight: 500; 932 font-size: 40px; 933 color: var(--wui-color-fg-100); 934 line-height: 130%; /* 52px */ 935 letter-spacing: -1.6px; 936 text-align: center; 937 } 938 939 .pennies { 940 color: var(--wui-color-fg-200); 941 } 942`;var em=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ev=class extends o.WF{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return(0,o.qy)`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}};ev.styles=[w.W5,ef],em([(0,a.MZ)()],ev.prototype,"dollars",void 0),em([(0,a.MZ)()],ev.prototype,"pennies",void 0),ev=em([(0,b.E)("wui-balance")],ev),i(49925);let ey=(0,o.AH)` 943 button { 944 background-color: var(--wui-color-gray-glass-002); 945 border-radius: var(--wui-border-radius-3xl); 946 border: 1px solid var(--wui-color-gray-glass-002); 947 padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs); 948 position: relative; 949 } 950 951 wui-avatar { 952 width: 32px; 953 height: 32px; 954 box-shadow: 0 0 0 0; 955 outline: 3px solid var(--wui-color-gray-glass-005); 956 } 957 958 wui-icon-box, 959 wui-image { 960 width: 16px; 961 height: 16px; 962 border-radius: var(--wui-border-radius-3xl); 963 position: absolute; 964 left: 26px; 965 top: 24px; 966 } 967 968 wui-image { 969 outline: 2px solid var(--wui-color-bg-125); 970 } 971 972 wui-icon-box { 973 outline: 2px solid var(--wui-color-bg-200); 974 background-color: var(--wui-color-bg-250); 975 } 976`;var ex=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ek=class extends o.WF{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="chevronBottom"}render(){return(0,o.qy)`<button data-testid="wui-profile-button"> 977 <wui-flex gap="xs" alignItems="center"> 978 <wui-avatar 979 .imageSrc=${this.avatarSrc} 980 alt=${this.address} 981 address=${this.address} 982 ></wui-avatar> 983 ${this.networkImageTemplate()} 984 <wui-flex gap="xs" alignItems="center"> 985 <wui-text variant="large-600" color="fg-100"> 986 ${g.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} 987 </wui-text> 988 <wui-icon size="sm" color="fg-200" name=${this.icon}></wui-icon> 989 </wui-flex> 990 </wui-flex> 991 </button>`}networkImageTemplate(){return this.networkSrc?(0,o.qy)`<wui-image src=${this.networkSrc}></wui-image>`:(0,o.qy)` 992 <wui-icon-box 993 size="xxs" 994 iconColor="fg-200" 995 backgroundColor="bg-100" 996 icon="networkPlaceholder" 997 ></wui-icon-box> 998 `}};ek.styles=[w.W5,w.fD,ey],ex([(0,a.MZ)()],ek.prototype,"networkSrc",void 0),ex([(0,a.MZ)()],ek.prototype,"avatarSrc",void 0),ex([(0,a.MZ)()],ek.prototype,"profileName",void 0),ex([(0,a.MZ)()],ek.prototype,"address",void 0),ex([(0,a.MZ)()],ek.prototype,"icon",void 0),ek=ex([(0,b.E)("wui-profile-button")],ek);let eC=(0,o.AH)` 999 :host { 1000 display: block; 1001 padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); 1002 border-radius: var(--wui-border-radius-xxs); 1003 1004 color: var(--wui-color-bg-100); 1005 position: relative; 1006 } 1007 1008 :host([data-variant='shade']) { 1009 background-color: var(--wui-color-bg-150); 1010 border: 1px solid var(--wui-color-gray-glass-005); 1011 } 1012 1013 :host([data-variant='shade']) > wui-text { 1014 color: var(--wui-color-fg-150); 1015 } 1016 1017 :host([data-variant='fill']) { 1018 background-color: var(--wui-color-fg-100); 1019 border: none; 1020 } 1021 1022 wui-icon { 1023 position: absolute; 1024 width: 12px !important; 1025 height: 4px !important; 1026 } 1027 1028 wui-icon[data-placement='top'] { 1029 bottom: 0px; 1030 left: 50%; 1031 transform: translate(-50%, 95%); 1032 } 1033 1034 wui-icon[data-placement='bottom'] { 1035 top: 0; 1036 left: 50%; 1037 transform: translate(-50%, -95%) rotate(180deg); 1038 } 1039 1040 wui-icon[data-placement='right'] { 1041 top: 50%; 1042 left: 0; 1043 transform: translate(-65%, -50%) rotate(90deg); 1044 } 1045 1046 wui-icon[data-placement='left'] { 1047 top: 50%; 1048 right: 0%; 1049 transform: translate(65%, -50%) rotate(270deg); 1050 } 1051`;var e$=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eS=class extends o.WF{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,(0,o.qy)`<wui-icon 1052 data-placement=${this.placement} 1053 color="fg-100" 1054 size="inherit"
1055 name=${"fill"===this.variant?"cursor":"cursorTransparent"} 1056 ></wui-icon> 1057 <wui-text color="inherit" variant="small-500">${this.message}</wui-text>`}};eS.styles=[w.W5,w.fD,eC],e$([(0,a.MZ)()],eS.prototype,"placement",void 0),e$([(0,a.MZ)()],eS.prototype,"variant",void 0),e$([(0,a.MZ)()],eS.prototype,"message",void 0),eS=e$([(0,b.E)("wui-tooltip")],eS);var eI=i(35437);let eA={getTabsByNamespace:e=>e&&e===_.o.CHAIN.EVM?n.H.state.remoteFeatures?.activity===!1?eI.o.ACCOUNT_TABS.filter(e=>"Activity"!==e.label):eI.o.ACCOUNT_TABS:[]};i(12477);let eE=(0,o.AH)` 1058 :host { 1059 width: 100%; 1060 max-height: 280px; 1061 overflow: scroll; 1062 scrollbar-width: none; 1063 } 1064 1065 :host::-webkit-scrollbar { 1066 display: none; 1067 } 1068`,eT=class extends o.WF{render(){return(0,o.qy)`<w3m-activity-list page="account"></w3m-activity-list>`}};eT.styles=eE,eT=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-account-activity-widget")],eT),i(46783),i(51482);let eR=(0,o.AH)` 1069 .contentContainer { 1070 height: 280px; 1071 } 1072 1073 .contentContainer > wui-icon-box { 1074 width: 40px; 1075 height: 40px; 1076 border-radius: var(--wui-border-radius-xxs); 1077 } 1078 1079 .contentContainer > .textContent { 1080 width: 65%; 1081 } 1082`,eW=class extends o.WF{render(){return(0,o.qy)`${this.nftTemplate()}`}nftTemplate(){return(0,o.qy)` <wui-flex 1083 class="contentContainer" 1084 alignItems="center" 1085 justifyContent="center" 1086 flexDirection="column" 1087 gap="l" 1088 > 1089 <wui-icon-box 1090 icon="wallet" 1091 size="inherit" 1092 iconColor="fg-200" 1093 backgroundColor="fg-200" 1094 iconSize="lg" 1095 ></wui-icon-box> 1096 <wui-flex 1097 class="textContent" 1098 gap="xs" 1099 flexDirection="column" 1100 justifyContent="center" 1101 flexDirection="column" 1102 > 1103 <wui-text 1104 variant="paragraph-500" 1105 align="center" 1106 color="fg-100" 1107 data-testid="nft-template-title" 1108 >Coming soon</wui-text 1109 > 1110 <wui-text 1111 variant="small-400" 1112 align="center" 1113 color="fg-200" 1114 data-testid="nft-template-description" 1115 >Stay tuned for our upcoming NFT feature</wui-text 1116 > 1117 </wui-flex> 1118 <wui-link @click=${this.onReceiveClick.bind(this)} data-testid="link-receive-funds" 1119 >Receive funds</wui-link 1120 > 1121 </wui-flex>`}onReceiveClick(){G.I.push("WalletReceive")}};eW.styles=eR,eW=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-account-nfts-widget")],eW),i(58037);let eO=(0,o.AH)` 1122 button { 1123 width: 100%; 1124 display: flex; 1125 gap: var(--wui-spacing-s); 1126 align-items: center; 1127 justify-content: flex-start; 1128 padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s); 1129 background-color: var(--wui-color-gray-glass-002); 1130 border-radius: var(--wui-border-radius-xs); 1131 } 1132 1133 wui-icon-box { 1134 width: var(--wui-spacing-2xl); 1135 height: var(--wui-spacing-2xl); 1136 } 1137 1138 wui-flex { 1139 width: auto; 1140 } 1141`;var eN=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eM=class extends o.WF{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return(0,o.qy)` 1142 <button ?disabled=${this.disabled}> 1143 <wui-icon-box 1144 iconColor=${this.iconColor}
1145 backgroundColor=${this.iconBackgroundColor} 1146 size="inherit" 1147 icon=${this.icon} 1148 iconSize="md" 1149 ></wui-icon-box> 1150 <wui-flex flexDirection="column" justifyContent="spaceBetween"> 1151 ${this.titleTemplate()} 1152 <wui-text variant="small-400" color="fg-200"> ${this.description}</wui-text></wui-flex 1153 > 1154 </button> 1155 `}titleTemplate(){return this.tag?(0,o.qy)` <wui-flex alignItems="center" gap="xxs" 1156 ><wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text 1157 ><wui-tag tagType="main" size="md">${this.tag}</wui-tag> 1158 </wui-flex>`:(0,o.qy)`<wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>`}};eM.styles=[w.W5,w.fD,eO],eN([(0,a.MZ)()],eM.prototype,"icon",void 0),eN([(0,a.MZ)()],eM.prototype,"text",void 0),eN([(0,a.MZ)()],eM.prototype,"description",void 0),eN([(0,a.MZ)()],eM.prototype,"tag",void 0),eN([(0,a.MZ)()],eM.prototype,"iconBackgroundColor",void 0),eN([(0,a.MZ)()],eM.prototype,"iconColor",void 0),eN([(0,a.MZ)({type:Boolean})],eM.prototype,"disabled",void 0),eM=eN([(0,b.E)("wui-list-description")],eM),i(62156);let eP=(0,o.AH)` 1159 :host { 1160 width: 100%; 1161 } 1162 1163 wui-flex { 1164 width: 100%; 1165 } 1166 1167 .contentContainer { 1168 max-height: 280px; 1169 overflow: scroll; 1170 scrollbar-width: none; 1171 } 1172 1173 .contentContainer::-webkit-scrollbar {
1174 display: none; 1175 } 1176`;var ej=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eq=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=d.U.state.tokenBalance,this.remoteFeatures=n.H.state.remoteFeatures,this.unsubscribe.push(d.U.subscribe(e=>{this.tokenBalance=e.tokenBalance}),n.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?(0,o.qy)`<wui-flex class="contentContainer" flexDirection="column" gap="xs"> 1177 ${this.tokenItemTemplate()} 1178 </wui-flex>`:(0,o.qy)` <wui-flex flexDirection="column" gap="xs" 1179 >${this.onRampTemplate()} 1180 <wui-list-description 1181 @click=${this.onReceiveClick.bind(this)} 1182 text="Receive funds" 1183 description="Transfer tokens on your wallet" 1184 icon="arrowBottomCircle" 1185 iconColor="fg-200" 1186 iconBackgroundColor="fg-200" 1187 data-testid="receive-funds" 1188 ></wui-list-description 1189 ></wui-flex>`}onRampTemplate(){return this.remoteFeatures?.onramp?(0,o.qy)`<wui-list-description 1190 @click=${this.onBuyClick.bind(this)} 1191 text="Buy Crypto" 1192 description="Easy with card or bank account" 1193 icon="card" 1194 iconColor="success-100" 1195 iconBackgroundColor="success-100" 1196 tag="popular" 1197 data-testid="buy-crypto" 1198 ></wui-list-description>`:(0,o.qy)``}tokenItemTemplate(){return this.tokenBalance?.map(e=>o.qy`<wui-list-token 1199 tokenName=${e.name} 1200 tokenImageUrl=${e.iconUrl} 1201 tokenAmount=${e.quantity.numeric} 1202 tokenValue=${e.value} 1203 tokenCurrency=${e.symbol} 1204 ></wui-list-token>`)}onReceiveClick(){G.I.push("WalletReceive")}onBuyClick(){let e=s.W.state.activeChain;j.E.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:d.U.state.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}
1204),G.I.push("OnRampProviders")}};eq.styles=eP,ej([(0,a.wk)()],eq.prototype,"tokenBalance",void 0),ej([(0,a.wk)()],eq.prototype,"remoteFeatures",void 0),eq=ej([(0,h.EM)("w3m-account-tokens-widget")],eq),i(10968),i(50499);let eD=(0,o.AH)` 1205 wui-flex { 1206 width: 100%; 1207 } 1208 1209 wui-promo { 1210 position: absolute; 1211 top: -32px; 1212 } 1213 1214 wui-profile-button { 1215 margin-top: calc(-1 * var(--wui-spacing-2l)); 1216 } 1217 1218 wui-promo + wui-profile-button { 1219 margin-top: var(--wui-spacing-2l); 1220 } 1221 1222 wui-tabs { 1223 width: 100%; 1224 } 1225 1226 .contentContainer { 1227 height: 280px; 1228 } 1229 1230 .contentContainer > wui-icon-box { 1231 width: 40px; 1232 height: 40px; 1233 border-radius: var(--wui-border-radius-xxs); 1234 } 1235 1236 .contentContainer > .textContent { 1237 width: 65%; 1238 } 1239`;var eU=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eL=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.address=d.U.state.address,this.profileImage=d.U.state.profileImage,this.profileName=d.U.state.profileName,this.network=s.W.state.activeCaipNetwork,this.currentTab=d.U.state.currentTab,this.tokenBalance=d.U.state.tokenBalance,this.features=n.H.state.features,this.remoteFeatures=n.H.state.remoteFeatures,this.networkImage=c.$.getNetworkImage(this.network),this.unsubscribe.push(l.j.subscribeNetworkImages(()=>{this.networkImage=c.$.getNetworkImage(this.network)}),d.U.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance):p.W.close()}),s.W.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.$.getNetworkImage(this.network)}),n.H.subscribeKey("features",e=>this.features=e),n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}firstUpdated(){d.U.fetchTokenBalance()}render(){if(!this.address)throw Error("w3m-account-view: No account provided");return(0,o.qy)`<wui-flex 1240 flexDirection="column" 1241 .padding=${["0","xl","m","xl"]} 1242 alignItems="center" 1243 gap="m" 1244 data-testid="w3m-account-wallet-features-widget" 1245 > 1246 <wui-profile-button 1247 @click=${this.onProfileButtonClick.bind(this)} 1248 address=${(0,r.J)(this.address)} 1249 networkSrc=${(0,r.J)(this.networkImage)} 1250 icon="chevronBottom" 1251 avatarSrc=${(0,r.J)(this.profileImage?this.profileImage:void 0)} 1252 profileName=${(0,r.J)(this.profileName??void 0)} 1253 data-testid="w3m-profile-button" 1254 ></wui-profile-button> 1255 1256 ${this.tokenBalanceTemplate()} ${this.orderedWalletFeatures()} ${this.tabsTemplate()} 1257 ${this.listContentTemplate()} 1258 </wui-flex>`}orderedWalletFeatures(){let e=this.features?.walletFeaturesOrder||J.oU.DEFAULT_FEATURES.walletFeaturesOrder;return e.every(e=>"send"===e||"receive"===e?!this.features?.[e]:"swaps"!==e&&"onramp"!==e||!this.remoteFeatures?.[e])?null:(0,o.qy)`<wui-flex gap="s"> 1259 ${e.map(e=>{switch(e){case"onramp":return this.onrampTemplate();case"swaps":return this.swapsTemplate();case"receive":return this.receiveTemplate();case"send":return this.sendTemplate();default:return null}})} 1260 </wui-flex>`}onrampTemplate(){return this.remoteFeatures?.onramp?(0,o.qy)` 1261 <w3m-tooltip-trigger text="Buy"> 1262 <wui-icon-button 1263 data-testid="wallet-features-onramp-button" 1264 @click=${this.onBuyClick.bind(this)} 1265 icon="card" 1266 ></wui-icon-button> 1267 </w3m-tooltip-trigger> 1268 `:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=s.W.state.activeChain===_.o.CHAIN.EVM;return e&&t?(0,o.qy)` 1269 <w3m-tooltip-trigger text="Swap"> 1270 <wui-icon-button 1271 data-testid="wallet-features-swaps-button" 1272 @click=${this.onSwapClick.bind(this)} 1273 icon="recycleHorizontal" 1274 > 1275 </wui-icon-button> 1276 </w3m-tooltip-trigger> 1277 `:null}receiveTemplate(){return this.features?.receive?(0,o.qy)` 1278 <w3m-tooltip-trigger text="Receive"> 1279 <wui-icon-button 1280 data-testid="wallet-features-receive-button" 1281 @click=${this.onReceiveClick.bind(this)} 1282 icon="arrowBottomCircle" 1283 > 1284 </wui-icon-button> 1285 </w3m-tooltip-trigger> 1286 `:null}sendTemplate(){let e=this.features?.send,t=s.W.state.activeChain,i=J.oU.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&i?(0,o.qy)` 1287 <w3m-tooltip-trigger text="Send"> 1288 <wui-icon-button 1289 data-testid="wallet-features-send-button" 1290 @click=${this.onSendClick.bind(this)} 1291 icon="send" 1292 ></wui-icon-button> 1293 </w3m-tooltip-trigger> 1294 `:null}watchSwapValues(){this.watchTokenBalance=setInterval(()=>d.U.fetchTokenBalance(e=>this.onTokenBalanceError(e)),1e4)}onTokenBalanceError(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===_.o.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE&&clearInterval(this.watchTokenBalance)}listContentTemplate(){return 0===this.currentTab?(0,o.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:1===this.currentTab?(0,o.qy)`<w3m-account-nfts-widget></w3m-account-nfts-widget>`:2===this.currentTab?(0,o.qy)`<w3m-account-activity-widget></w3m-account-activity-widget>`:(0,o.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){let e=u.w.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:i="00"}=u.w.formatTokenBalance(e);return(0,o.qy)`<wui-balance dollars=${t} pennies=${i}></wui-balance>`}return(0,o.qy)`<wui-balance dollars="0" pennies="00"></wui-balance>`}tabsTemplate(){let e=eA.getTabsByNamespace(s.W.state.activeChain);if(0===e.length)return null;let t=u.w.isMobile()&&window.innerWidth<430,i="104px";return i=t?`${(window.innerWidth-48)/e.length}px`:2===e.length?"156px":"104px",(0,o.qy)`<wui-tabs 1295 .onTabChange=${this.onTabChange.bind(this)} 1296 .activeTab=${this.currentTab} 1297 localTabWidth=${i} 1298 .tabs=${e} 1299 ></wui-tabs>`}onTabChange(e){d.U.setCurrentTab(e)}onProfileButtonClick(){let{allAccounts:e}=d.U.state;e.length>1?G.I.push("Profile"):G.I.push("AccountSettings")}
1299onBuyClick(){G.I.push("OnRampProviders")}onSwapClick(){let e=s.W.state.activeChain;this.network?.caipNetworkId&&!J.oU.SWAP_SUPPORTED_NETWORKS.includes(this.network?.caipNetworkId)?G.I.push("UnsupportedChain",{swapUnsupportedChain:!0}):(j.E.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:d.U.state.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),G.I.push("Swap"))}onReceiveClick(){G.I.push("WalletReceive")}onSendClick(){let e=s.W.state.activeChain;j.E.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:d.U.state.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),G.I.push("WalletSend")}};eL.styles=eD,eU([(0,a.wk)()],eL.prototype,"watchTokenBalance",void 0),eU([(0,a.wk)()],eL.prototype,"address",void 0),eU([(0,a.wk)()],eL.prototype,"profileImage",void 0),eU([(0,a.wk)()],eL.prototype,"profileName",void 0),eU([(0,a.wk)()],eL.prototype,"network",void 0),eU([(0,a.wk)()],eL.prototype,"currentTab",void 0),eU([(0,a.wk)()],eL.prototype,"tokenBalance",void 0),eU([(0,a.wk)()],eL.prototype,"features",void 0),eU([(0,a.wk)()],eL.prototype,"remoteFeatures",void 0),eU([(0,a.wk)()],eL.prototype,"networkImage",void 0),eL=eU([(0,h.EM)("w3m-account-wallet-features-widget")],eL);var ez=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eZ=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.namespace=s.W.state.activeChain,this.unsubscribe.push(s.W.subscribeKey("activeChain",e=>{this.namespace=e}))}render(){if(!this.namespace)return null;let e=V.a.getConnectorId(this.namespace),t=V.a.getAuthConnector();return(0,o.qy)` 1300 ${t&&e===_.o.CONNECTOR_ID.AUTH?this.walletFeaturesTemplate():this.defaultTemplate()} 1301 `}walletFeaturesTemplate(){return(0,o.qy)`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return(0,o.qy)`<w3m-account-default-widget></w3m-account-default-widget>`}};ez([(0,a.wk)()],eZ.prototype,"namespace",void 0),eZ=ez([(0,h.EM)("w3m-account-view")],eZ);var eB=i(636);let eF=(0,o.AH)` 1302 button { 1303 padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); 1304 display: flex; 1305 justify-content: space-between; 1306 width: 100%; 1307 border-radius: var(--wui-border-radius-xs); 1308 background-color: var(--wui-color-gray-glass-002); 1309 } 1310 1311 button[data-clickable='false'] { 1312 pointer-events: none; 1313 background-color: transparent; 1314 } 1315 1316 wui-image { 1317 width: var(--wui-spacing-3xl); 1318 height: var(--wui-spacing-3xl); 1319 border-radius: var(--wui-border-radius-3xl); 1320 } 1321 1322 wui-avatar { 1323 width: var(--wui-spacing-3xl); 1324 height: var(--wui-spacing-3xl); 1325 box-shadow: 0 0 0 0; 1326 } 1327 .address { 1328 color: var(--wui-color-fg-base-100); 1329 } 1330 .address-description { 1331 text-transform: capitalize; 1332 color: var(--wui-color-fg-base-200); 1333 } 1334 1335 wui-icon-box { 1336 position: relative; 1337 right: 15px; 1338 top: 15px; 1339 border: 2px solid var(--wui-color-bg-150); 1340 background-color: var(--wui-color-bg-125); 1341 } 1342`;var eH=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let e_=class extends o.WF{constructor(){super(...arguments),this.accountAddress="",this.accountType="",this.labels=d.U.state.addressLabels,this.caipNetwork=s.W.state.activeCaipNetwork,this.socialProvider=eo.i.getConnectedSocialProvider(),this.balance=0,this.fetchingBalance=!0,this.shouldShowIcon=!1,this.selected=!1}connectedCallback(){super.connectedCallback(),eB.T.getBalance(this.accountAddress,this.caipNetwork?.caipNetworkId).then(e=>{let t=this.balance;e.balances.length>0&&(t=e.balances.reduce((e,t)=>
1342e+(t?.value||0),0)),this.balance=t,this.fetchingBalance=!1,this.requestUpdate()}).catch(()=>{this.fetchingBalance=!1,this.requestUpdate()})}render(){let e=this.getLabel(),t=s.W.state.activeChain,i=V.a.getConnectorId(t);return this.shouldShowIcon=i===_.o.CONNECTOR_ID.AUTH,(0,o.qy)` 1343 <wui-flex 1344 flexDirection="row" 1345 justifyContent="space-between" 1346 .padding=${["0","0","s","1xs"]} 1347 > 1348 <wui-flex gap="md" alignItems="center"> 1349 <wui-avatar address=${this.accountAddress}></wui-avatar> 1350 ${this.shouldShowIcon?(0,o.qy)`<wui-icon-box 1351 size="sm" 1352 iconcolor="fg-200" 1353 backgroundcolor="fg-300" 1354 icon=${this.accountType===ei.Vl.ACCOUNT_TYPES.EOA?this.socialProvider??"mail":"lightbulb"} 1355 background="fg-300" 1356 ></wui-icon-box>`:(0,o.qy)`<wui-flex .padding="${["0","0","0","s"]}"></wui-flex>`} 1357 <wui-flex flexDirection="column"> 1358 <wui-text class="address" variant="paragraph-500" color="fg-100" 1359 >${g.Z.getTruncateString({string:this.accountAddress,charsStart:4,charsEnd:6,truncate:"middle"})}</wui-text 1360 > 1361 <wui-text class="address-description" variant="small-400">${e}</wui-text></wui-flex 1362 > 1363 </wui-flex> 1364 <wui-flex gap="s" alignItems="center"> 1365 <slot name="action"></slot> 1366 ${this.fetchingBalance?(0,o.qy)`<wui-loading-spinner size="sm" color="accent-100"></wui-loading-spinner>`:(0,o.qy)` <wui-text variant="small-400">$${this.balance.toFixed(2)}</wui-text>`} 1367 </wui-flex> 1368 </wui-flex> 1369 `}getLabel(){let e=this.labels?.get(this.accountAddress),t=s.W.state.activeChain,i=V.a.getConnectorId(t);return e||i!==_.o.CONNECTOR_ID.AUTH?e||(e="EOA"):e=`${"eoa"===this.accountType?this.socialProvider??"Email":"Smart"} Account`,e}};e_.styles=[w.W5,w.fD,eF],eH([(0,a.MZ)()],e_.prototype,"accountAddress",void 0),eH([(0,a.MZ)()],e_.prototype,"accountType",void 0),eH([(0,a.MZ)({type:Boolean})],e_.prototype,"selected",void 0),eH([(0,a.MZ)({type:Function})],e_.prototype,"onSelect",void 0),e_=eH([(0,b.E)("wui-list-account")],e_);let eV=(0,o.AH)` 1370 wui-flex { 1371 width: 100%; 1372 } 1373 1374 wui-icon-link { 1375 margin-right: calc(var(--wui-icon-box-size-md) * -1); 1376 } 1377 1378 .account-links { 1379 display: flex; 1380 justify-content: space-between; 1381 align-items: center; 1382 } 1383 1384 .account-links wui-flex { 1385 cursor: pointer; 1386 display: flex; 1387 align-items: center; 1388 justify-content: center; 1389 flex: 1; 1390 background: red; 1391 align-items: center; 1392 justify-content: center; 1393 height: 48px; 1394 padding: 10px; 1395 flex: 1 0 0; 1396 1397 border-radius: var(--XS, 16px); 1398 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 1399 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 1400 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 1401 will-change: background-color; 1402 } 1403 1404 .account-links wui-flex:hover { 1405 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 1406 } 1407 1408 .account-links wui-flex wui-icon { 1409 width: var(--S, 20px); 1410 height: var(--S, 20px); 1411 } 1412 1413 .account-links wui-flex wui-icon svg path { 1414 stroke: #47a1ff; 1415 } 1416 1417 .account-settings-button { 1418 padding: calc(var(--wui-spacing-m) - 1px) var(--wui-spacing-2l); 1419 height: 40px; 1420 border-radius: var(--wui-border-radius-xxs); 1421 border: 1px solid var(--wui-color-gray-glass-002); 1422 background: var(--wui-color-gray-glass-002); 1423 cursor: pointer; 1424 } 1425 1426 .account-settings-button:hover { 1427 background: var(--wui-color-gray-glass-005); 1428 } 1429`;var eJ=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eK=class extends o.WF{constructor(){super(),this.usubscribe=[],this.address=d.U.state.address,this.profileImage=d.U.state.profileImage,this.profileName=d.U.state.profileName,this.accounts=d.U.state.allAccounts,this.loading=!1,this.usubscribe.push(d.U.subscribeKey("address",e=>{e?this.address=e:p.W.close()})),this.usubscribe.push(d.U.subscribeKey("profileImage",e=>{this.profileImage=e})),this.usubscribe.push(d.U.subscribeKey("profileName",e=>{this.profileName=e}))}
1429disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-profile-view: No account provided");return(0,o.qy)` 1430 <wui-flex flexDirection="column" gap="l" .padding=${["0","xl","m","xl"]}> 1431 <wui-flex flexDirection="column" alignItems="center" gap="l"> 1432 <wui-avatar 1433 alt=${this.address} 1434 address=${this.address} 1435 imageSrc=${(0,r.J)(this.profileImage)} 1436 size="2lg" 1437 ></wui-avatar> 1438 <wui-flex flexDirection="column" alignItems="center"> 1439 <wui-flex gap="3xs" alignItems="center" justifyContent="center"> 1440 <wui-text variant="title-6-600" color="fg-100" data-testid="account-settings-address"> 1441 ${this.profileName?h.Zv.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):h.Zv.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} 1442 </wui-text> 1443 <wui-icon-link 1444 size="md" 1445 icon="copy" 1446 iconColor="fg-200" 1447 @click=${this.onCopyAddress} 1448 ></wui-icon-link> 1449 </wui-flex> 1450 </wui-flex> 1451 </wui-flex> 1452 <wui-flex 1453 data-testid="account-settings-button" 1454 justifyContent="center" 1455 alignItems="center" 1456 class="account-settings-button" 1457 @click=${()=>G.I.push("AccountSettings")} 1458 > 1459 <wui-text variant="paragraph-500" color="fg-100">Account Settings</wui-text> 1460 </wui-flex> 1461 ${this.accountsTemplate()} 1462 </wui-flex> 1463 `}accountsTemplate(){return(0,o.qy)`<wui-flex flexDirection="column"> 1464 <wui-flex .padding=${["3xs","m","s","s"]}> 1465 <wui-text color="fg-200" variant="paragraph-400">Your accounts</wui-text> 1466 </wui-flex> 1467 <wui-flex flexDirection="column" gap="xxs"> 1468 ${this.accounts.map(e=>this.accountTemplate(e))} 1469 </wui-flex> 1470 </wui-flex>`}async onSwitchAccount(e){let t=s.W.state.activeCaipNetwork?.chainNamespace;if(this.loading=!0,V.a.getAuthConnector()){let i=e.type;await Y.x.setPreferredAccountType(i,t)}d.U.setShouldUpdateToAddress(e.address,t),this.loading=!1}accountTemplate(e){return(0,o.qy)`<wui-list-account accountAddress=${e.address} accountType=${e.type}> 1471 ${e.address===this.address?"":(0,o.qy)`<wui-button 1472 slot="action" 1473 textVariant="small-600" 1474 size="md" 1475 variant="accent" 1476 @click=${()=>this.onSwitchAccount(e)} 1477 .loading=${this.loading} 1478 >Switch</wui-button 1479 >`} 1480 </wui-list-account>`}onCopyAddress(){try{this.address&&(u.w.copyToClopboard(this.address),K.P.showSuccess("Address copied"))}catch{K.P.showError("Failed to copy")}}};eK.styles=eV,eJ([(0,a.wk)()],eK.prototype,"address",void 0),eJ([(0,a.wk)()],eK.prototype,"profileImage",void 0),eJ([(0,a.wk)()],eK.prototype,"profileName",void 0),eJ([(0,a.wk)()],eK.prototype,"accounts",void 0),eJ([(0,a.wk)()],eK.prototype,"loading",void 0),eK=eJ([(0,h.EM)("w3m-profile-view")],eK);let eG=(0,o.AH)` 1481 wui-flex { 1482 width: 100%; 1483 background-color: var(--wui-color-gray-glass-005); 1484 border-radius: var(--wui-border-radius-m); 1485 padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) 1486 var(--wui-spacing-1xs); 1487 } 1488`;var eY=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let eX=class extends o.WF{constructor(){super(...arguments),this.imageSrc="",this.text="",this.size=""}render(){return(0,o.qy)` 1489 <wui-flex gap="1xs" alignItems="center"> 1490 <wui-avatar size=${this.size} imageSrc=${this.imageSrc}></wui-avatar> 1491 <wui-text variant="small-400" color="fg-200">${this.text}</wui-text> 1492 </wui-flex> 1493 `}};eX.styles=[w.W5,w.fD,eG],eY([(0,a.MZ)()],eX.prototype,"imageSrc",void 0),eY([(0,a.MZ)()],eX.prototype,"text",void 0),eY([(0,a.MZ)()],eX.prototype,"size",void 0),eX=eY([(0,b.E)("wui-banner-img")],eX);let eQ=(0,o.AH)` 1494 wui-avatar { 1495 width: var(--wui-spacing-3xl); 1496 height: var(--wui-spacing-3xl); 1497 box-shadow: 0 0 0 0; 1498 } 1499 1500 wui-icon-box { 1501 position: relative; 1502 right: 15px; 1503 top: 15px; 1504 border: 2px solid var(--wui-color-bg-150); 1505 background-color: var(--wui-color-bg-125); 1506 } 1507`;var e0=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let e1=class extends o.WF{constructor(){super(),this.metadata=n.H.state.metadata,this.allAccounts=d.U.state.allAccounts||[],this.balances={},this.labels=d.U.state.addressLabels,this.currentAddress=d.U.state.address||"",this.caipNetwork=s.W.state.activeCaipNetwork,d.U.subscribeKey("allAccounts",e=>{this.allAccounts=e})}connectedCallback(){super.connectedCallback(),this.allAccounts.forEac
1507h(e=>{eB.T.getBalance(e.address,this.caipNetwork?.caipNetworkId).then(t=>{let i=this.balances[e.address]||0;t.balances.length>0&&(i=t.balances.reduce((e,t)=>e+(t?.value||0),0)),this.balances[e.address]=i,this.requestUpdate()})})}getAddressIcon(e){return"smartAccount"===e?"lightbulb":"mail"}render(){return(0,o.qy)` 1508 <wui-flex justifyContent="center" .padding=${["xl","0","xl","0"]}> 1509 <wui-banner-img 1510 imageSrc=${(0,r.J)(this.metadata?.icons[0])} 1511 text=${(0,r.J)(this.metadata?.url)} 1512 size="sm" 1513 ></wui-banner-img> 1514 </wui-flex> 1515 <wui-flex flexDirection="column" gap="xxl" .padding=${["l","xl","xl","xl"]}> 1516 ${this.allAccounts.map((e,t)=>this.getAddressTemplate(e,t))} 1517 </wui-flex> 1518 `}getAddressTemplate(e,t){let i=this.labels?.get(e.address),a=s.W.state.activeChain,r=V.a.getConnectorId(a)===_.o.CONNECTOR_ID.AUTH;return(0,o.qy)` 1519 <wui-flex 1520 flexDirection="row" 1521 justifyContent="space-between" 1522 data-testid="switch-address-item" 1523 > 1524 <wui-flex alignItems="center"> 1525 <wui-avatar address=${e.address}></wui-avatar> 1526 ${r?(0,o.qy)`<wui-icon-box 1527 size="sm" 1528 iconcolor="fg-200" 1529 backgroundcolor="glass-002" 1530 background="gray" 1531 icon="${this.getAddressIcon(e.type)}" 1532 ?border=${!0} 1533 ></wui-icon-box>`:(0,o.qy)`<wui-flex .padding="${["0","0","0","s"]}"></wui-flex>`} 1534 <wui-flex flexDirection="column"> 1535 <wui-text class="address" variant="paragraph-500" color="fg-100" 1536 >${i||h.Zv.getTruncateString({string:e.address,charsStart:4,charsEnd:6,truncate:"middle"})}</wui-text 1537 > 1538 <wui-text class="address-description" variant="small-400"> 1539 ${"number"==typeof this.balances[e.address]?`$${this.balances[e.address]?.toFixed(2)}`:(0,o.qy)`<wui-loading-spinner size="sm" color="accent-100"></wui-loading-spinner>`} 1540 </wui-text> 1541 </wui-flex> 1542 </wui-flex> 1543 <wui-flex gap="s" alignItems="center"> 1544 ${e.address?.toLowerCase()===this.currentAddress?.toLowerCase()?"":(0,o.qy)` 1545 <wui-button 1546 data-testid=${`w3m-switch-address-button-${t}`} 1547 textVariant="small-600" 1548 size="md" 1549 variant="accent" 1550 @click=${()=>this.onSwitchAddress(e.address)} 1551 >Switch to</wui-button 1552 > 1553 `} 1554 </wui-flex> 1555 </wui-flex> 1556 `}onSwitchAddress(e){let t=s.W.state.activeCaipNetwork,i=t?.chainNamespace,o=`${i}:${t?.id}:${e}`;d.U.setCaipAddress(o,i),p.W.close()}};e1.styles=eQ,e0([(0,a.wk)()],e1.prototype,"allAccounts",void 0),e0([(0,a.wk)()],e1.prototype,"balances",void 0),e1=e0([(0,h.EM)("w3m-switch-address-view")],e1);var e3=i(31689),e5=i(71281),e2=i(72610);i(94441),i(72190);let e6=(0,o.AH)` 1557 wui-image { 1558 width: var(--wui-spacing-2xl); 1559 height: var(--wui-spacing-2xl); 1560 border-radius: var(--wui-border-radius-3xs); 1561 } 1562 1563 wui-image, 1564 .icon-box { 1565 width: var(--wui-spacing-2xl); 1566 height: var(--wui-spacing-2xl); 1567 border-radius: var(--wui-border-radius-3xs); 1568 } 1569 1570 wui-icon:not(.custom-icon, .icon-badge) { 1571 cursor: pointer; 1572 } 1573 1574 .icon-box { 1575 position: relative; 1576 background-color: var(--wui-color-gray-glass-002); 1577 } 1578 1579 .icon-badge { 1580 position: absolute; 1581 top: 18px; 1582 left: 23px; 1583 z-index: 3; 1584 background-color: var(--wui-color-gray-glass-005); 1585 border: 2px solid var(--wui-color-modal-bg); 1586 border-radius: 50%; 1587 padding: var(--wui-spacing-4xs); 1588 } 1589`;var e4=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let e8=class extends o.WF{constructor(){super(...arguments),this.address="",this.profileName="",this.content=[],this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadge=void 0,this.iconBadgeSize="md",this.buttonVariant="neutral",this.enableMoreButton=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,o.qy)` 1590 <wui-flex flexDirection="column" rowGap="xs"> 1591 ${this.topTemplate()} ${this.bottomTemplate()} 1592 </wui-flex> 1593 `}topTemplate(){return(0,o.qy)` 1594 <wui-flex alignItems="flex-start" justifyContent="space-between"> 1595 ${this.imageOrIconTemplate()} 1596 <wui-icon-link 1597 iconColor="fg-200" 1598 size="sm" 1599 icon="copy" 1600 @click=${this.dispatchCopyEvent} 1601 ></wui-icon-link> 1602 <wui-icon-link 1603 iconColor="fg-200" 1604 size="sm" 1605 icon="externalLink" 1606 @click=${this.dispatchExternalLinkEvent} 1607 ></wui-icon-link> 1608 ${this.enableMoreButton?(0,o.qy)`<wui-icon-link 1609 iconColor="fg-200" 1610 size="sm" 1611 icon="threeDots" 1612 @click=${this.dispatchMoreButtonEvent} 1613 ></wui-icon-link>`:null} 1614 </wui-flex> 1615 `}bottomTemplate(){return(0,o.qy)` <wui-flex flexDirection="column">${this.contentTemplate()}</wui-flex> `}imageOrIconTemplate(){return this.icon?(0,o.qy)` 1616 <wui-flex flexGrow="1" alignItems="center"> 1617 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1618 <wui-icon 1619 size=${this.iconSize} 1620 color="fg-200" 1621 name=${this.icon} 1622 class="custom-icon" 1623 ></wui-icon> 1624 1625 ${this.iconBadge?(0,o.qy)`<wui-icon 1626 color="fg-175" 1627 size=${this.iconBadgeSize} 1628 name=${this.iconBadge} 1629 class="icon-badge" 1630 ></wui-icon>`:null} 1631 </wui-flex> 1632 </wui-flex> 1633 `:(0,o.qy)` 1634 <wui-flex flexGrow="1" alignItems="center"> 1635 <wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image> 1636 </wui-flex> 1637 `}contentTemplate(){return 0===this.content.length?null:(0,o.qy)` 1638 <wui-flex flexDirection="column" rowGap="s"> 1639 ${this.content.map(e=>this.labelAndTagTemplate(e))} 1640 </wui-flex> 1641 `}labelAndTagTemplate({address:e,profileName:t,label:i,description:a,enableButton:r,tagVariant:n,tagLabel:s,alignItems:l="flex-end"}){return(0,o.qy)` 1642 <wui-flex justifyContent="space-between" alignItems=${l} columnGap="3xs"> 1643 <wui-flex flexDirection="column" rowGap="4xs"> 1644 ${i?(0,o.qy)`<wui-text variant="micro-600" color="fg-200">${i}</wui-text>`:null} 1645 1646 <wui-flex alignItems="center" columnGap="3xs"> 1647 <wui-text variant="small-500" color="fg-100"> 1648 ${g.Z.getTruncateString({string:t||e,charsStart:t?16:this.charsStart,charsEnd:t?0:this.charsEnd,truncate:t?"end":"middle"})} 1649 </wui-text> 1650 1651 ${n&&s?(0,o.qy)`<wui-tag variant=${n} size="xs">${s}</wui-tag>`:null} 1652 </wui-flex> 1653 1654 ${a?(0,o.qy)`<wui-text variant="tiny-500" color="fg-200">${a}</wui-text>`:null} 1655 </wui-flex> 1656 1657 ${r?this.disconnectTemplate():null} 1658 </wui-flex> 1659 `}disconnectTemplate(){return(0,o.qy)` 1660 <wui-button 1661 size="xs" 1662 variant=${this.buttonVariant} 1663 @click=${this.dispatchDisconnectEvent.bind(this)} 1664 > 1665 Disconnect 1666 </wui-button>
1666 1667 `}dispatchDisconnectEvent(){this.dispatchEvent(new CustomEvent("disconnect",{bubbles:!0,composed:!0}))}dispatchExternalLinkEvent(){this.dispatchEvent(new CustomEvent("externalLink",{bubbles:!0,composed:!0}))}dispatchMoreButtonEvent(){this.dispatchEvent(new CustomEvent("more",{bubbles:!0,composed:!0}))}dispatchCopyEvent(){this.dispatchEvent(new CustomEvent("copy",{bubbles:!0,composed:!0}))}};e8.styles=[w.W5,w.fD,e6],e4([(0,a.MZ)()],e8.prototype,"address",void 0),e4([(0,a.MZ)()],e8.prototype,"profileName",void 0),e4([(0,a.MZ)({type:Array})],e8.prototype,"content",void 0),e4([(0,a.MZ)()],e8.prototype,"alt",void 0),e4([(0,a.MZ)()],e8.prototype,"imageSrc",void 0),e4([(0,a.MZ)()],e8.prototype,"icon",void 0),e4([(0,a.MZ)()],e8.prototype,"iconSize",void 0),e4([(0,a.MZ)()],e8.prototype,"iconBadge",void 0),e4([(0,a.MZ)()],e8.prototype,"iconBadgeSize",void 0),e4([(0,a.MZ)()],e8.prototype,"buttonVariant",void 0),e4([(0,a.MZ)({type:Boolean})],e8.prototype,"enableMoreButton",void 0),e4([(0,a.MZ)({type:Number})],e8.prototype,"charsStart",void 0),e4([(0,a.MZ)({type:Number})],e8.prototype,"charsEnd",void 0),e8=e4([(0,b.E)("wui-active-profile-wallet-item")],e8);let e7=(0,o.AH)` 1668 wui-image, 1669 .icon-box { 1670 width: var(--wui-spacing-2xl); 1671 height: var(--wui-spacing-2xl); 1672 border-radius: var(--wui-border-radius-3xs); 1673 } 1674 1675 .right-icon { 1676 cursor: pointer; 1677 } 1678 1679 .icon-box { 1680 position: relative; 1681 background-color: var(--wui-color-gray-glass-002); 1682 } 1683 1684 .icon-badge { 1685 position: absolute; 1686 top: 18px; 1687 left: 23px; 1688 z-index: 3; 1689 background-color: var(--wui-color-gray-glass-005); 1690 border: 2px solid var(--wui-color-modal-bg); 1691 border-radius: 50%; 1692 padding: var(--wui-spacing-4xs); 1693 } 1694`;var e9=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let te=class extends o.WF{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.buttonLabel="",this.buttonVariant="accent",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadgeSize="md",this.rightIcon="off",this.rightIconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,o.qy)` 1695 <wui-flex alignItems="center" columnGap="xs"> 1696 ${this.imageOrIconTemplate()} ${this.labelAndDescriptionTemplate()} 1697 ${this.buttonActionTemplate()} 1698 </wui-flex> 1699 `}imageOrIconTemplate(){return this.icon?(0,o.qy)` 1700 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1701 <wui-flex alignItems="center" justifyContent="center" class="icon-box"> 1702 <wui-icon 1703 size=${this.iconSize} 1704 color="fg-200" 1705 name=${this.icon} 1706 class="custom-icon" 1707 ></wui-icon> 1708 1709 ${this.iconBadge?(0,o.qy)`<wui-icon 1710 color="fg-175" 1711 size=${this.iconBadgeSize} 1712 name=${this.iconBadge} 1713 class="icon-badge" 1714 ></wui-icon>`:null} 1715 </wui-flex> 1716 </wui-flex> 1717 `:(0,o.qy)`<wui-image objectFit="contain" src=${this.imageSrc} alt=${this.alt}></wui-image>`}labelAndDescriptionTemplate(){return(0,o.qy)` 1718 <wui-flex 1719 flexDirection="column" 1720 flexGrow="1" 1721 justifyContent="flex-start" 1722 alignItems="flex-start" 1723 > 1724 <wui-text variant="small-500" color="fg-100"> 1725 ${g.Z.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})} 1726 </wui-text> 1727 </wui-flex> 1728 `}buttonActionTemplate(){return(0,o.qy)` 1729 <wui-flex columnGap="3xs" alignItems="center" justifyContent="center"> 1730 <wui-button 1731 size="xs" 1732 variant=${this.buttonVariant} 1733 .loading=${this.loading} 1734 @click=${this.handleButtonClick} 1735 > 1736 ${this.buttonLabel} 1737 </wui-button>
1737 1738 1739 <wui-icon-link 1740 iconColor="fg-200" 1741 size=${this.rightIconSize} 1742 icon=${this.rightIcon} 1743 class="right-icon" 1744 @click=${this.handleIconClick} 1745 ></wui-icon-link> 1746 </wui-flex> 1747 `}handleButtonClick(){this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,composed:!0}))}handleIconClick(){this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,composed:!0}))}};te.styles=[w.W5,w.fD,e7],e9([(0,a.MZ)()],te.prototype,"address",void 0),e9([(0,a.MZ)()],te.prototype,"profileName",void 0),e9([(0,a.MZ)()],te.prototype,"alt",void 0),e9([(0,a.MZ)()],te.prototype,"buttonLabel",void 0),e9([(0,a.MZ)()],te.prototype,"buttonVariant",void 0),e9([(0,a.MZ)()],te.prototype,"imageSrc",void 0),e9([(0,a.MZ)()],te.prototype,"icon",void 0),e9([(0,a.MZ)()],te.prototype,"iconSize",void 0),e9([(0,a.MZ)()],te.prototype,"iconBadge",void 0),e9([(0,a.MZ)()],te.prototype,"iconBadgeSize",void 0),e9([(0,a.MZ)()],te.prototype,"rightIcon",void 0),e9([(0,a.MZ)()],te.prototype,"rightIconSize",void 0),e9([(0,a.MZ)({type:Boolean})],te.prototype,"loading",void 0),e9([(0,a.MZ)({type:Number})],te.prototype,"charsStart",void 0),e9([(0,a.MZ)({type:Number})],te.prototype,"charsEnd",void 0),te=e9([(0,b.E)("wui-inactive-profile-wallet-item")],te),i(33575);var tt=i(91189),ti=i(2867);let to={getAuthData(e){let t=e.connectorId===_.o.CONNECTOR_ID.AUTH;if(!t)return{isAuth:!1,icon:void 0,iconSize:void 0,name:void 0};let i=e?.auth?.name??eo.i.getConnectedSocialProvider(),o=e?.auth?.username??eo.i.getConnectedSocialUsername(),a=V.a.getAuthConnector(),r=a?.provider.getEmail()??"";return{isAuth:!0,icon:i??"mail",iconSize:i?"xl":"md",name:t?ti.g.getAuthName({email:r,socialUsername:o,socialProvider:i}):void 0}}},ta=(0,o.AH)` 1748 :host { 1749 --connect-scroll--top-opacity: 0; 1750 --connect-scroll--bottom-opacity: 0; 1751 } 1752 1753 .balance-amount { 1754 flex: 1; 1755 } 1756 1757 .wallet-list { 1758 scrollbar-width: none; 1759 overflow-y: scroll; 1760 overflow-x: hidden; 1761 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 1762 will-change: opacity; 1763 mask-image: linear-gradient( 1764 to bottom, 1765 rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, 1766 rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, 1767 black 40px, 1768 black calc(100% - 40px), 1769 rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), 1770 rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% 1771 ); 1772 } 1773 1774 .active-wallets { 1775 background-color: var(--wui-color-gray-glass-002); 1776 border-radius: var(--wui-border-radius-xs); 1777 } 1778 1779 .active-wallets-box { 1780 height: 330px; 1781 } 1782 1783 .empty-wallet-list-box { 1784 height: 400px; 1785 } 1786 1787 .empty-box { 1788 width: 100%; 1789 padding: var(--wui-spacing-l); 1790 background-color: var(--wui-color-gray-glass-002); 1791 border-radius: var(--wui-border-radius-xs); 1792 } 1793 1794 wui-separator { 1795 margin: var(--wui-spacing-xs) 0 var(--wui-spacing-xs) 0; 1796 } 1797 1798 .active-connection { 1799 padding: var(--wui-spacing-xs); 1800 } 1801 1802 .recent-connection { 1803 padding: var(--wui-spacing-xs) 0 var(--wui-spacing-xs) 0; 1804 } 1805 1806 @media (max-width: 430px) { 1807 .active-wallets-box, 1808 .empty-wallet-list-box { 1809 height: auto; 1810 max-height: clamp(360px, 470px, 80vh); 1811 } 1812 } 1813`;var tr=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tn={ADDRESS_DISPLAY:{START:4,END:6},BADGE:{SIZE:"md",ICON:"lightbulb"},SCROLL_THRESHOLD:50,OPACITY_RANGE:[0,1]},ts={eip155:"ethereum",solana:"solana",bip122:"bitcoin"},tl=[{namespace:"eip155",icon:ts.eip155,label:"EVM"},{namespace:"solana",icon:ts.solana,label:"Solana"},{namespace:"bip122",icon:ts.bip122,label:"Bitcoin"}],tc={1:320,2:160,3:106},td={eip155:{title:"Add EVM Wallet",description:"Add your first EVM wallet"},solana:{title:"Add Solana Wallet",description:"Add your first Solana wallet"},bip122:{title:"Add Bitcoin Wallet",description:"Add your first Bitcoin wallet"}},tu=class extends o.WF{constructor(){super(),this.unsubscribers=[],this.currentTab=0,this.namespace=s.W.state.activeChain,this.namespaces=Array.from(s.W.state.chains.keys()),this.caipAddress=void 0,this.profileName=void 0,this.activeConnectorIds=V.a.state.activeConnectorIds,this.lastSelectedAddress="",this.lastSelectedConnectorId="",this.isSwitching=!1,this.caipNetwork=s.W.state.activeCaipNetwork,this.currentTab=this.namespace?this.namespaces.indexOf(this.namespace):0,this.caipAddress=s.W.getAccountData(this.namespace)?.caipAddress,this.profileName=s.W.getAccountData(this.namespace)?.profileName,this.unsubscribers.push(Y.x.subscribeKey("connections",()=>this.requestUpdate()),V.a.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),s.W.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e)),this.chainListener=s.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress,this.profileName=e?.profileName},this.namespace)}
1813disconnectedCallback(){this.unsubscribers.forEach(e=>e()),this.resizeObserver?.disconnect(),this.removeScrollListener(),this.chainListener?.()}firstUpdated(){let e=this.shadowRoot?.querySelector(".wallet-list");if(!e)return;let t=()=>this.updateScrollOpacity(e);requestAnimationFrame(t),e.addEventListener("scroll",t),this.resizeObserver=new ResizeObserver(t),this.resizeObserver.observe(e),t()}render(){let e=this.namespace;if(!e)throw Error("Namespace is not set");return(0,o.qy)` 1814 <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="l"> 1815 ${this.renderTabs()} ${this.renderHeader(e)} ${this.renderConnections(e)} 1816 ${this.renderAddConnectionButton(e)} 1817 </wui-flex> 1818 `}renderTabs(){let e=tl.filter(e=>this.namespaces.includes(e.namespace)),t=e.length,i=tc[t]??tc[1];return t>1?(0,o.qy)` 1819 <wui-tabs 1820 .onTabChange=${e=>this.handleTabChange(e)} 1821 .activeTab=${this.currentTab} 1822 localTabWidth=${u.w.isMobile()&&window.innerWidth<=430?`${(window.innerWidth-40)/t}px`:`${i}px`} 1823 .tabs=${e} 1824 ></wui-tabs> 1825 `:null}renderHeader(e){let t=this.getActiveConnections(e).flatMap(({accounts:e})=>e).length+(this.caipAddress?1:0);return(0,o.qy)` 1826 <wui-flex alignItems="center" columnGap="3xs"> 1827 <wui-icon 1828 name=${ts[e]??ts.eip155} 1829 size="lg" 1830 ></wui-icon> 1831 <wui-text color="fg-200" variant="small-400" 1832 >${t>1?"Wallets":"Wallet"}</wui-text 1833 > 1834 <wui-text 1835 color="fg-100" 1836 variant="small-400" 1837 class="balance-amount" 1838 data-testid="balance-amount" 1839 > 1840 ${t} 1841 </wui-text> 1842 <wui-link 1843 color="fg-200" 1844 @click=${()=>this.handleDisconnectAll(e)} 1845 ?disabled=${!this.hasAnyConnections(e)} 1846 data-testid="disconnect-all-button" 1847 > 1848 Disconnect All 1849 </wui-link> 1850 </wui-flex> 1851 `}renderConnections(e){let t=this.hasAnyConnections(e);return(0,o.qy)` 1852 <wui-flex flexDirection="column" class=${(0,e3.H)({"wallet-list":!0,"active-wallets-box":t,"empty-wallet-list-box":!t})} rowGap="s"> 1853 ${t?this.renderActiveConnections(e):this.renderEmptyState(e)} 1854 </wui-flex> 1855 `}renderActiveConnections(e){let t=this.getActiveConnections(e),i=this.activeConnectorIds[e],a=this.getPlainAddress();return(0,o.qy)` 1856 ${a||i||t.length>0?(0,o.qy)`<wui-flex 1857 flexDirection="column" 1858 .padding=${["l","0","xs","0"]} 1859 class="active-wallets" 1860 > 1861 ${this.renderActiveProfile(e)} ${this.renderActiveConnectionsList(e)} 1862 </wui-flex>`:null} 1863 ${this.renderRecentConnections(e)} 1864 `}renderActiveProfile(e){let t=this.activeConnectorIds[e];if(!t)return null;let{connections:i}=e2.b.getConnectionsData(e),a=V.a.getConnectorById(t),r=c.$.getConnectorImage(a),n=this.getPlainAddress();if(!n)return null;let s=to.getAuthData({connectorId:t,accounts:[]}),l=this.getActiveConnections(e).flatMap(e=>e.accounts).length>0;return(0,o.qy)` 1865 <wui-flex flexDirection="column" .padding=${["0","l","0","l"]}> 1866 <wui-active-profile-wallet-item 1867 address=${n} 1868 alt=${a?.name} 1869 .content=${this.getProfileContent({address:n,connections:i,connectorId:t,namespace:e})} 1870 .charsStart=${tn.ADDRESS_DISPLAY.START} 1871 .charsEnd=${tn.ADDRESS_DISPLAY.END} 1872 .icon=${s.icon} 1873 .iconSize=${s.iconSize} 1874 .iconBadge=${this.isSmartAccount(n)?tn.BADGE.ICON:void 0} 1875 .iconBadgeSize=${this.isSmartAccount(n)?tn.BADGE.SIZE:void 0} 1876 imageSrc=${r} 1877 ?enableMoreButton=${s.isAuth} 1878 @copy=${()=>this.handleCopyAddress(n)} 1879 @disconnect=${()=>this.handleDisconnect(e,{})} 1880 @externalLink=${()=>this.handleExternalLink(n)} 1881 @more=${()=>this.handleMore()} 1882 ></wui-active-profile-wallet-item> 1883 ${l?(0,o.qy)`<wui-separator></wui-separator>`:null} 1884 </wui-flex> 1885 `}renderActiveConnectionsList(e){let t=this.getActiveConnections(e);return 0===t.length?null:(0,o.qy)` 1886 <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]}> 1887 ${this.renderConnectionList(t,!1,e)} 1888 </wui-flex> 1889 `}renderRecentConnections(e){let{recentConnections:t}=e2.b.getConnectionsData(e);return(e===_.o.CHAIN.BITCOIN&&(t=t.map(e=>({...e,accounts:e.accounts.filter(e=>"string"!=typeof e.type||"payment"===e.type)}))),0===t.flatMap(e=>e.accounts).length)?null:(0,o.qy)` 1890 <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]} rowGap="xs"> 1891 <wui-text color="fg-200" variant="micro-500" data-testid="recently-connected-text" 1892 >RECENTLY CONNECTED</wui-text 1893 > 1894 <wui-flex flexDirection="column" .padding=${["0","xs","0","xs"]}> 1895 ${this.renderConnectionList(t,!0,e)} 1896 </wui-flex> 1897 </wui-flex> 1898 `}renderConnectionList(e,t,i){return e.filter(e=>e.accounts.length>0).map((e,a)=>{let r=V.a.getConnectorById(e.connectorId),n=c.$.getConnectorImage(r)??"",s=to.getAuthData(e);return e.accounts.map((r,l)=>{let c=this.isAccountLoading(e.connectorId,r.address);return(0,o.qy)` 1899 <wui-flex flexDirection="column"> 1900 ${0!==a||0!==l?(0,o.qy)`<wui-separator></wui-separator>`:null} 1901 <wui-inactive-profile-wallet-item 1902 address=${r.address} 1903 alt=${e.connectorId} 1904 buttonLabel=${t?"Connect":"Switch"} 1905 buttonVariant=${t?"neutral":"accent"} 1906 rightIcon=${t?"bin":"off"} 1907 rightIconSize="sm" 1908 class=${t?"recent-connection":"active-connection"} 1909 data-testid=${t?"recent-connection":"active-connection"} 1910 imageSrc=${n} 1911 .iconBadge=${this.isSmartAccount(r.address)?tn.BADGE.ICON:void 0} 1912 .iconBadgeSize=${this.isSmartAccount(r.address)?tn.BADGE.SIZE:void 0} 1913 .icon=${s.icon} 1914 .iconSize=${s.iconSize} 1915 .loading=${c} 1916 .showBalance=${!1} 1917 .charsStart=${tn.ADDRESS_DISPLAY.START} 1918 .charsEnd=${tn.ADDRESS_DISPLAY.END} 1919 @buttonClick=${()=>this.handleSwitchWallet(e,r.address,i)} 1920 @iconClick=${()=>this.handleWalletAction({connection:e,address:r.address,isRecentConnection:t,namespace:i})} 1921 ></wui-inactive-profile-wallet-item> 1922 </wui-flex> 1923 `})})}renderAddConnectionButton(e){if(!this.hasAnyConnections(e))return null;let{title:t}=this.getChainLabelInfo(e);return(0,o.qy)` 1924 <wui-list-item 1925 variant="icon" 1926 iconVariant="overlay" 1927 icon="plus" 1928 iconSize="sm" 1929 ?chevron=${!0} 1930 @click=${()=>this.handleAddConnection(e)} 1931 data-testid="add-connection-button" 1932 > 1933 <wui-text variant="paragraph-500" color="fg-200">${t}</wui-text> 1934 </wui-list-item> 1935 `}renderEmptyState(e){let{title:t,description:i}=this.getChainLabelInfo(e);return(0,o.qy)` 1936 <wui-flex alignItems="flex-start" class="empty-template" data-testid="empty-template"> 1937 <wui-flex 1938 flexDirection="column" 1939 alignItems="center" 1940 justifyContent="center" 1941 rowGap="s" 1942 class="empty-box" 1943 > 1944 <wui-icon-box 1945 size="lg" 1946 icon="wallet" 1947 background="gray" 1948 iconColor="fg-200" 1949 backgroundColor="glass-002" 1950 ></wui-icon-box> 1951 1952 <wui-flex flexDirection="column" alignItems="center" justifyContent="center" gap="3xs"> 1953 <wui-text color="fg-100" variant="paragraph-500" data-testid="empty-state-text" 1954 >No wallet connected</wui-text 1955 > 1956 <wui-text color="fg-200" variant="tiny-500" data-testid="empty-state-description" 1957 >${i}</wui-text 1958 > 1959 </wui-flex> 1960 1961 <wui-button 1962 variant="neutral" 1963 size="md" 1964 @click=${()=>this.handleAddConnection(e)} 1965 data-testid="empty-state-button" 1966 > 1967 <wui-icon color="inherit" slot="iconLeft" name="plus"></wui-icon> 1968 ${t} 1969 </wui-button>
1969 1970 </wui-flex> 1971 </wui-flex> 1972 `}handleTabChange(e){let t=this.namespaces[e];t&&(this.chainListener?.(),this.currentTab=this.namespaces.indexOf(t),this.namespace=t,this.caipAddress=s.W.getAccountData(t)?.caipAddress,this.profileName=s.W.getAccountData(t)?.profileName,this.chainListener=s.W.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},t))}handleDisconnectAll(e){Y.x.disconnect({namespace:e})}async handleSwitchWallet(e,t,i){try{this.isSwitching=!0,this.lastSelectedConnectorId=e.connectorId,this.lastSelectedAddress=t,await Y.x.switchConnection({connection:e,address:t,namespace:i,closeModalOnConnect:!1,onChange({hasSwitchedAccount:e,hasSwitchedWallet:t}){t?K.P.showSuccess("Wallet switched"):e&&K.P.showSuccess("Account switched")}})}catch(e){K.P.showError("Failed to switch wallet")}finally{this.isSwitching=!1}}handleWalletAction(e){let{connection:t,address:i,isRecentConnection:o,namespace:a}=e;o?(eo.i.deleteAddressFromConnection({connectorId:t.connectorId,address:i,namespace:a}),K.P.showSuccess("Wallet deleted"),this.requestUpdate()):this.handleDisconnect(a,{id:t.connectorId})}async handleDisconnect(e,{id:t}){try{await Y.x.disconnect({id:t,namespace:e}),K.P.showSuccess("Wallet disconnected")}catch{K.P.showError("Failed to disconnect wallet")}}handleCopyAddress(e){u.w.copyToClopboard(e),K.P.showSuccess("Address copied")}handleMore(){G.I.push("AccountSettings")}handleExternalLink(e){let t=this.caipNetwork?.blockExplorers?.default.url;t&&u.w.openHref(`${t}/address/${e}`,"_blank")}handleAddConnection(e){V.a.setFilterByNamespace(e),G.I.push("Connect")}getChainLabelInfo(e){return td[e]??{title:"Add Wallet",description:"Add your first wallet"}}isSmartAccount(e){if(!this.namespace)return!1;let{connections:t,recentConnections:i}=e2.b.getConnectionsData(this.namespace);return[...t,...i].flatMap(e=>e.accounts).filter(e=>"smart"===e.type).some(t=>tt.y.isLowerCaseMatch(t.address,e))}getPlainAddress(){return this.caipAddress?u.w.getPlainAddress(this.caipAddress):void 0}getActiveConnections(e){let t=this.activeConnectorIds[e],{connections:i}=e2.b.getConnectionsData(e);if(!t)return i;let{address:o}=this.caipAddress?e5.C.parseCaipAddress(this.caipAddress):{},a=e===_.o.CHAIN.BITCOIN;return e2.b.excludeConnectorAddressFromConnections({connectorId:t,addresses:o?[o]:[],connections:a?e2.b.filterConnectionsByAccountType(i,"payment"):i})}hasAnyConnections(e){let t=this.getActiveConnections(e),{recentConnections:i}=e2.b.getConnectionsData(e);return!!this.caipAddress||t.length>0||i.length>0}isAccountLoading(e,t){return tt.y.isLowerCaseMatch(this.lastSelectedConnectorId,e)&&tt.y.isLowerCaseMatch(this.lastSelectedAddress,t)&&this.isSwitching}getProfileContent(e){let{address:t,connections:i,connectorId:o,namespace:a}=e,[r]=i.filter(e=>tt.y.isLowerCaseMatch(e.connectorId,o));if(a===_.o.CHAIN.BITCOIN&&r?.accounts.every(e=>"string"==typeof e.type))return this.getBitcoinProfileContent(r.accounts,t);let n=to.getAuthData({connectorId:o,accounts:[]});return[{address:t,tagLabel:"Active",tagVariant:"success",enableButton:!0,profileName:this.profileName,...n.isAuth?{description:this.isSmartAccount(t)?"Smart Account":"EOA Account"}:{}}]}getBitcoinProfileContent(e,t){let i=e.length>1;return e.map((o,a)=>({address:o.address,tagLabel:tt.y.isLowerCaseMatch(o.address,t)?"Active":void 0,tagVariant:tt.y.isLowerCaseMatch(o.address,t)?"success":void 0,enableButton:a===e.length-1,...i?{label:o.type?.toUpperCase(),alignItems:"flex-end"}:{alignItems:"center"}}))}removeScrollListener(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&e.removeEventListener("scroll",()=>this.handleConnectListScroll())}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&this.updateScrollOpacity(e)}updateScrollOpacity(e){e.style.setProperty("--connect-scroll--top-opacity",h.z8.interpolate([0,tn.SCROLL_THRESHOLD],tn.OPACITY_RANGE,e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.z8.interpolate([0,tn.SCROLL_THRESHOLD],tn.OPACITY_RANGE,e.scrollHeight-e.scrollTop-e.offsetHeight).toString())}};tu.styles=ta,tr([(0,a.wk)()],tu.prototype,"currentTab",void 0),tr([(0,a.wk)()],tu.prototype,"namespace",void 0),tr([(0,a.wk)()],tu.prototype,"namespaces",void 0),tr([(0,a.wk)()],tu.prototype,"caipAddress",void 0),tr([(0,a.wk)()],tu.prototype,"profileName",void 0),tr([(0,a.wk)()],tu.prototype,"activeConnectorIds",void 0),tr([(0,a.wk)()],tu.prototype,"lastSelectedAddress",void 0),tr([(0,a.wk)()],tu.prototype,"lastSelectedConnectorId",void 0),tr([(0,a.wk)()],tu.prototype,"isSwitching",void 0),tr([(0,a.wk)()],tu.prototype,"caipNetwork",void 0),tu=tr([(0,h.EM)("w3m-profile-wallets-view")],tu);
1972var tp=i(55549);let th=(0,o.AH)` 1973 :host { 1974 display: flex; 1975 align-items: center; 1976 justify-content: center; 1977 } 1978 1979 label { 1980 position: relative; 1981 display: inline-block; 1982 width: 32px; 1983 height: 22px; 1984 } 1985 1986 input { 1987 width: 0; 1988 height: 0; 1989 opacity: 0; 1990 } 1991 1992 span { 1993 position: absolute; 1994 cursor: pointer; 1995 top: 0; 1996 left: 0; 1997 right: 0; 1998 bottom: 0; 1999 background-color: var(--wui-color-blue-100); 2000 border-width: 1px; 2001 border-style: solid; 2002 border-color: var(--wui-color-gray-glass-002); 2003 border-radius: 999px; 2004 transition: 2005 background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), 2006 border-color var(--wui-ease-inout-power-1) var(--wui-duration-md); 2007 will-change: background-color, border-color; 2008 } 2009 2010 span:before { 2011 position: absolute; 2012 content: ''; 2013 height: 16px; 2014 width: 16px; 2015 left: 3px; 2016 top: 2px; 2017 background-color: var(--wui-color-inverse-100); 2018 transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg); 2019 will-change: transform; 2020 border-radius: 50%; 2021 } 2022 2023 input:checked + span { 2024 border-color: var(--wui-color-gray-glass-005); 2025 background-color: var(--wui-color-blue-100); 2026 } 2027 2028 input:not(:checked) + span { 2029 background-color: var(--wui-color-gray-glass-010); 2030 } 2031 2032 input:checked + span:before { 2033 transform: translateX(calc(100% - 7px)); 2034 } 2035`;var tw=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tg=class extends o.WF{constructor(){super(...arguments),this.inputElementRef=(0,tp._)(),this.checked=void 0}render(){return(0,o.qy)` 2036 <label> 2037 <input 2038 ${(0,tp.K)(this.inputElementRef)} 2039 type="checkbox" 2040 ?checked=${(0,r.J)(this.checked)} 2041 @change=${this.dispatchChangeEvent.bind(this)} 2042 /> 2043 <span></span> 2044 </label> 2045 `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};tg.styles=[w.W5,w.fD,w.ck,th],tw([(0,a.MZ)({type:Boolean})],tg.prototype,"checked",void 0),tg=tw([(0,b.E)("wui-switch")],tg);let tb=(0,o.AH)` 2046 :host { 2047 height: 100%; 2048 } 2049 2050 button { 2051 display: flex; 2052 align-items: center; 2053 justify-content: center; 2054 column-gap: var(--wui-spacing-1xs); 2055 padding: var(--wui-spacing-xs) var(--wui-spacing-s); 2056 background-color: var(--wui-color-gray-glass-002); 2057 border-radius: var(--wui-border-radius-xs); 2058 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 2059 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 2060 will-change: background-color; 2061 cursor: pointer; 2062 } 2063 2064 wui-switch { 2065 pointer-events: none; 2066 } 2067`;var tf=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tm=class extends o.WF{constructor(){super(...arguments),this.checked=void 0}render(){return(0,o.qy)` 2068 <button> 2069 <wui-icon size="xl" name="walletConnectBrown"></wui-icon> 2070 <wui-switch ?checked=${(0,r.J)(this.checked)}></wui-switch> 2071 </button> 2072 `}};tm.styles=[w.W5,w.fD,tb],tf([(0,a.MZ)({type:Boolean})],tm.prototype,"checked",void 0),tm=tf([(0,b.E)("wui-certified-switch")],tm);let tv=(0,o.AH)` 2073 button { 2074 background-color: var(--wui-color-fg-300); 2075 border-radius: var(--wui-border-radius-4xs); 2076 width: 16px; 2077 height: 16px; 2078 } 2079 2080 button:disabled { 2081 background-color: var(--wui-color-bg-300); 2082 } 2083 2084 wui-icon { 2085 color: var(--wui-color-bg-200) !important; 2086 } 2087 2088 button:focus-visible { 2089 background-color: var(--wui-color-fg-250); 2090 border: 1px solid var(--wui-color-accent-100); 2091 } 2092 2093 @media (hover: hover) and (pointer: fine) { 2094 button:hover:enabled { 2095 background-color: var(--wui-color-fg-250); 2096 } 2097 2098 button:active:enabled { 2099 background-color: var(--wui-color-fg-225); 2100 } 2101 } 2102`;var ty=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tx=class extends o.WF{constructor(){super(...arguments),this.icon="copy"}render(){return(0,o.qy)` 2103 <button> 2104 <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon> 2105 </button> 2106 `}};tx.styles=[w.W5,w.fD,tv],ty([(0,a.MZ)()],tx.prototype,"icon",void 0),tx=ty([(0,b.E)("wui-input-element")],tx),i(60665);let tk=(0,o.AH)` 2107 :host { 2108 position: relative; 2109 display: inline-block; 2110 width: 100%; 2111 } 2112`,tC=class extends o.WF{constructor(){super(...arguments),this.inputComponentRef=(0,tp._)()}render(){return(0,o.qy)` 2113 <wui-input-text 2114 ${(0,tp.K)(this.inputComponentRef)} 2115 placeholder="Search wallet" 2116 icon="search" 2117 type="search" 2118 enterKeyHint="search" 2119 size="sm" 2120 > 2121 <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element> 2122 </wui-input-text> 2123 `}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};tC.styles=[w.W5,tk],tC=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,b.E)("wui-search-bar")],tC);var t$=i(62586),tS=i(39211);i(36e3);let tI=(0,o.AH)` 2124 :host { 2125 display: flex; 2126 flex-direction: column; 2127 align-items: center; 2128 width: 104px; 2129 row-gap: var(--wui-spacing-xs); 2130 padding: var(--wui-spacing-xs) 10px; 2131 background-color: var(--wui-color-gray-glass-002); 2132 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 2133 position: relative; 2134 } 2135 2136 wui-shimmer[data-type='network'] { 2137 border: none; 2138 -webkit-clip-path: var(--wui-path-network); 2139 clip-path: var(--wui-path-network); 2140 } 2141 2142 svg { 2143 position: absolute; 2144 width: 48px; 2145 height: 54px; 2146 z-index: 1; 2147 } 2148 2149 svg > path { 2150 stroke: var(--wui-color-gray-glass-010); 2151 stroke-width: 1px; 2152 } 2153 2154 @media (max-width: 350px) { 2155 :host { 2156 width: 100%; 2157 } 2158 } 2159`;var tA=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tE=class extends o.WF{constructor(){super(...arguments),this.type="wallet"}render(){return(0,o.qy)` 2160 ${this.shimmerTemplate()} 2161 <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer> 2162 `}shimmerTemplate(){return"network"===this.type?(0,o.qy)` <wui-shimmer 2163 data-type=${this.type} 2164 width="48px" 2165 height="54px" 2166 borderRadius="xs" 2167 ></wui-shimmer> 2168 ${tS.a}`:(0,o.qy)`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};tE.styles=[w.W5,w.fD,tI],tA([(0,a.MZ)()],tE.prototype,"type",void 0),tE=tA([(0,b.E)("wui-card-select-loader")],tE);let tT=(0,o.AH)` 2169 :host { 2170 display: grid; 2171 width: inherit; 2172 height: inherit; 2173 } 2174`;var tR=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tW=class extends o.WF{render(){return this.style.cssText=` 2175 grid-template-rows: ${this.gridTemplateRows}; 2176 grid-template-columns: ${this.gridTemplateColumns}; 2177 justify-items: ${this.justifyItems}; 2178 align-items: ${this.alignItems}; 2179 justify-content: ${this.justifyContent}; 2180 align-content: ${this.alignContent}; 2181 column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; 2182 row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; 2183 gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; 2184 padding-top: ${this.padding&&g.Z.getSpacingStyles(this.padding,0)}; 2185 padding-right: ${this.padding&&g.Z.getSpacingStyles(this.padding,1)}; 2186 padding-bottom: ${this.padding&&g.Z.getSpacingStyles(this.padding,2)}; 2187 padding-left: ${this.padding&&g.Z.getSpacingStyles(this.padding,3)}; 2188 margin-top: ${this.margin&&g.Z.getSpacingStyles(this.margin,
21880)}; 2189 margin-right: ${this.margin&&g.Z.getSpacingStyles(this.margin,1)}; 2190 margin-bottom: ${this.margin&&g.Z.getSpacingStyles(this.margin,2)}; 2191 margin-left: ${this.margin&&g.Z.getSpacingStyles(this.margin,3)}; 2192 `,(0,o.qy)`<slot></slot>`}};tW.styles=[w.W5,tT],tR([(0,a.MZ)()],tW.prototype,"gridTemplateRows",void 0),tR([(0,a.MZ)()],tW.prototype,"gridTemplateColumns",void 0),tR([(0,a.MZ)()],tW.prototype,"justifyItems",void 0),tR([(0,a.MZ)()],tW.prototype,"alignItems",void 0),tR([(0,a.MZ)()],tW.prototype,"justifyContent",void 0),tR([(0,a.MZ)()],tW.prototype,"alignContent",void 0),tR([(0,a.MZ)()],tW.prototype,"columnGap",void 0),tR([(0,a.MZ)()],tW.prototype,"rowGap",void 0),tR([(0,a.MZ)()],tW.prototype,"gap",void 0),tR([(0,a.MZ)()],tW.prototype,"padding",void 0),tR([(0,a.MZ)()],tW.prototype,"margin",void 0),tW=tR([(0,b.E)("wui-grid")],tW);var tO=i(36037);i(817),i(89991);let tN=(0,o.AH)` 2193 button { 2194 display: flex; 2195 flex-direction: column; 2196 justify-content: center; 2197 align-items: center; 2198 cursor: pointer; 2199 width: 104px; 2200 row-gap: var(--wui-spacing-xs); 2201 padding: var(--wui-spacing-s) var(--wui-spacing-0); 2202 background-color: var(--wui-color-gray-glass-002); 2203 border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); 2204 transition: 2205 color var(--wui-duration-lg) var(--wui-ease-out-power-1), 2206 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1), 2207 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1); 2208 will-change: background-color, color, border-radius; 2209 outline: none; 2210 border: none; 2211 } 2212 2213 button > wui-flex > wui-text { 2214 color: var(--wui-color-fg-100); 2215 max-width: 86px; 2216 white-space: nowrap; 2217 overflow: hidden; 2218 text-overflow: ellipsis; 2219 justify-content: center; 2220 } 2221 2222 button > wui-flex > wui-text.certified { 2223 max-width: 66px; 2224 } 2225 2226 button:hover:enabled { 2227 background-color: var(--wui-color-gray-glass-005); 2228 } 2229 2230 button:disabled > wui-flex > wui-text { 2231 color: var(--wui-color-gray-glass-015); 2232 } 2233 2234 [data-selected='true'] { 2235 background-color: var(--wui-color-accent-glass-020); 2236 } 2237 2238 @media (hover: hover) and (pointer: fine) { 2239 [data-selected='true']:hover:enabled { 2240 background-color: var(--wui-color-accent-glass-015); 2241 } 2242 } 2243 2244 [data-selected='true']:active:enabled { 2245 background-color: var(--wui-color-accent-glass-010); 2246 } 2247 2248 @media (max-width: 350px) { 2249 button { 2250 width: 100%; 2251 } 2252 } 2253`;var tM=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tP=class extends o.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return(0,o.qy)` 2254 <button> 2255 ${this.imageTemplate()} 2256 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="3xs"> 2257 <wui-text 2258 variant="tiny-500" 2259 color="inherit" 2260 class=${(0,r.J)(e?"certified":void 0)} 2261 >${this.wallet?.name}</wui-text 2262 > 2263 ${e?(0,o.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 2264 </wui-flex> 2265 </button> 2266 `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,o.qy)` 2267 <wui-wallet-image 2268 size="md" 2269 imageSrc=${(0,r.J)(this.imageSrc)} 2270 name=${this.wallet?.name} 2271 .installed=${this.wallet?.installed} 2272 badgeSize="sm" 2273 > 2274 </wui-wallet-image> 2275 `:this.shimmerTemplate()}shimmerTemplate(){return(0,o.qy)`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=c.$.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await c.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};tP.styles=tN,tM([(0,a.wk)()],tP.prototype,"visible",void 0),tM([(0,a.wk)()],tP.prototype,"imageSrc",void 0),tM([(0,a.wk)()],tP.prototype,"imageLoading",void 0),tM([(0,a.MZ)()],tP.prototype,"wallet",void 0),tP=tM([(0,h.EM)("w3m-all-wallets-list-item")],tP);let tj=(0,o.AH)` 2276 wui-grid { 2277 max-height: clamp(360px, 400px, 80vh); 2278 overflow: scroll; 2279 scrollbar-width: none; 2280 grid-auto-rows: min-content; 2281 grid-template-columns: repeat(auto-fill, 104px); 2282 } 2283 2284 @media (max-width: 350px) { 2285 wui-grid { 2286 grid-template-columns: repeat(2, 1fr); 2287 } 2288 } 2289 2290 wui-grid[data-scroll='false'] { 2291 overflow: hidden; 2292 } 2293 2294 wui-grid::-webkit-scrollbar {
2295 display: none; 2296 } 2297 2298 wui-loading-spinner { 2299 padding-top: var(--wui-spacing-l); 2300 padding-bottom: var(--wui-spacing-l); 2301 justify-content: center; 2302 grid-column: 1 / span 4; 2303 } 2304`;var tq=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tD="local-paginator",tU=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!t$.N.state.wallets.length,this.wallets=t$.N.state.wallets,this.recommended=t$.N.state.recommended,this.featured=t$.N.state.featured,this.filteredWallets=t$.N.state.filteredWallets,this.unsubscribe.push(t$.N.subscribeKey("wallets",e=>this.wallets=e),t$.N.subscribeKey("recommended",e=>this.recommended=e),t$.N.subscribeKey("featured",e=>this.featured=e),t$.N.subscribeKey("filteredWallets",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return(0,o.qy)` 2305 <wui-grid 2306 data-scroll=${!this.loading} 2307 .padding=${["0","s","s","s"]} 2308 columnGap="xxs" 2309 rowGap="l" 2310 justifyContent="space-between" 2311 > 2312 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 2313 ${this.paginationLoaderTemplate()} 2314 </wui-grid> 2315 `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await t$.N.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,o.qy)` 2316 <wui-card-select-loader type="wallet" id=${(0,r.J)(t)}></wui-card-select-loader> 2317 `)}walletsTemplate(){let e=this.filteredWallets?.length>0?u.w.uniqueBy([...this.featured,...this.recommended,...this.filteredWallets],"id"):u.w.uniqueBy([...this.featured,...this.recommended,...this.wallets],"id");return tO.A.markWalletsAsInstalled(e).map(e=>(0,o.qy)` 2318 <w3m-all-wallets-list-item 2319 @click=${()=>this.onConnectWallet(e)} 2320 .wallet=${e} 2321 ></w3m-all-wallets-list-item> 2322 `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:i,count:o}=t$.N.state,a=window.innerWidth<352?3:4,r=e.length+t.length,n=Math.ceil(r/a)*a-r+a;return(n-=e.length?i.length%a:0,0===o&&i.length>0)?null:0===o||[...i,...e,...t].length<o?this.shimmerTemplate(n,tD):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${tD}`);e&&(this.paginationObserver=new IntersectionObserver(([e])=>{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:i}=t$.N.state;i.length<t&&t$.N.fetchWalletsByPage({page:e+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){V.a.selectWalletConnector(e)}};tU.styles=tj,tq([(0,a.wk)()],tU.prototype,"loading",void 0),tq([(0,a.wk)()],tU.prototype,"wallets",void 0),tq([(0,a.wk)()],tU.prototype,"recommended",void 0),tq([(0,a.wk)()],tU.prototype,"featured",void 0),tq([(0,a.wk)()],tU.prototype,"filteredWallets",void 0),tU=tq([(0,h.EM)("w3m-all-wallets-list")],tU),i(93278);let tL=(0,o.AH)` 2323 wui-grid, 2324 wui-loading-spinner, 2325 wui-flex { 2326 height: 360px; 2327 } 2328 2329 wui-grid { 2330 overflow: scroll; 2331 scrollbar-width: none; 2332 grid-auto-rows: min-content; 2333 grid-template-columns: repeat(auto-fill, 104px); 2334 } 2335 2336 wui-grid[data-scroll='false'] { 2337 overflow: hidden; 2338 } 2339 2340 wui-grid::-webkit-scrollbar {
2341 display: none; 2342 } 2343 2344 wui-loading-spinner { 2345 justify-content: center; 2346 align-items: center; 2347 } 2348 2349 @media (max-width: 350px) { 2350 wui-grid { 2351 grid-template-columns: repeat(2, 1fr); 2352 } 2353 } 2354`;var tz=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tZ=class extends o.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?(0,o.qy)`<wui-loading-spinner color="accent-100"></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 t$.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=t$.N.state,t=tO.A.markWalletsAsInstalled(e);return e.length?(0,o.qy)` 2355 <wui-grid 2356 data-testid="wallet-list" 2357 .padding=${["0","s","s","s"]} 2358 rowGap="l" 2359 columnGap="xs" 2360 justifyContent="space-between" 2361 > 2362 ${t.map(e=>(0,o.qy)` 2363 <w3m-all-wallets-list-item 2364 @click=${()=>this.onConnectWallet(e)} 2365 .wallet=${e} 2366 data-testid="wallet-search-item-${e.id}" 2367 ></w3m-all-wallets-list-item> 2368 `)} 2369 </wui-grid> 2370 `:(0,o.qy)` 2371 <wui-flex 2372 data-testid="no-wallet-found" 2373 justifyContent="center" 2374 alignItems="center" 2375 gap="s" 2376 flexDirection="column" 2377 > 2378 <wui-icon-box 2379 size="lg" 2380 iconColor="fg-200" 2381 backgroundColor="fg-300" 2382 icon="wallet" 2383 background="transparent" 2384 ></wui-icon-box> 2385 <wui-text data-testid="no-wallet-found-text" color="fg-200" variant="paragraph-500"> 2386 No Wallet found 2387 </wui-text> 2388 </wui-flex> 2389 `}onConnectWallet(e){V.a.selectWalletConnector(e)}};tZ.styles=tL,tz([(0,a.wk)()],tZ.prototype,"loading",void 0),tz([(0,a.MZ)()],tZ.prototype,"query",void 0),tz([(0,a.MZ)()],tZ.prototype,"badge",void 0),tZ=tz([(0,h.EM)("w3m-all-wallets-search")],tZ);var tB=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tF=class extends o.WF{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=u.w.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,o.qy)` 2390 <wui-flex .padding=${["0","s","s","s"]} gap="xs"> 2391 <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar> 2392 <wui-certified-switch 2393 ?checked=${this.badge} 2394 @click=${this.onClick.bind(this)} 2395 data-testid="wui-certified-switch" 2396 ></wui-certified-switch> 2397 ${this.qrButtonTemplate()} 2398 </wui-flex> 2399 ${e||this.badge?(0,o.qy)`<w3m-all-wallets-search 2400 query=${this.search} 2401 badge=${(0,r.J)(this.badge)} 2402 ></w3m-all-wallets-search>`:(0,o.qy)`<w3m-all-wallets-list badge=${(0,r.J)(this.badge)}></w3m-all-wallets-list>`} 2403 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onClick(){if("certified"===this.badge){this.badge=void 0;return}this.badge="certified",K.P.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})}qrButtonTemplate(){return u.w.isMobile()?(0,o.qy)` 2404 <wui-icon-box 2405 size="lg" 2406 iconSize="xl" 2407 iconColor="accent-100" 2408 backgroundColor="accent-100" 2409 icon="qrCode" 2410 background="transparent" 2411 border 2412 borderColor="wui-accent-glass-010" 2413 @click=${this.onWalletConnectQr.bind(this)} 2414 ></wui-icon-box> 2415 `:null}onWalletConnectQr(){G.I.push("ConnectingWalletConnect")}};tB([(0,a.wk)()],tF.prototype,"search",void 0),tB([(0,a.wk)()],tF.prototype,"badge",void 0),tF=tB([(0,h.EM)("w3m-all-wallets-view")],tF);var tH=i(43501),t_=i(5185);let tV=(0,o.AH)` 2416 button { 2417 column-gap: var(--wui-spacing-s); 2418 padding: 16.5px var(--wui-spacing-l) 16.5px var(--wui-spacing-xs); 2419 width: 100%; 2420 background-color: var(--wui-color-gray-glass-002); 2421 border-radius: var(--wui-border-radius-xs); 2422 color: var(--wui-color-fg-100); 2423 justify-content: center;
2424 align-items: center; 2425 } 2426 2427 button:disabled { 2428 background-color: var(--wui-color-gray-glass-015); 2429 color: var(--wui-color-gray-glass-015); 2430 } 2431`;var tJ=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tK=class extends o.WF{constructor(){super(...arguments),this.text="",this.disabled=!1,this.tabIdx=void 0}render(){return(0,o.qy)` 2432 <button ?disabled=${this.disabled} tabindex=${(0,r.J)(this.tabIdx)}> 2433 <wui-text align="center" variant="paragraph-500" color="inherit">${this.text}</wui-text> 2434 </button> 2435 `}};tK.styles=[w.W5,w.fD,tV],tJ([(0,a.MZ)()],tK.prototype,"text",void 0),tJ([(0,a.MZ)({type:Boolean})],tK.prototype,"disabled",void 0),tJ([(0,a.MZ)()],tK.prototype,"tabIdx",void 0),tK=tJ([(0,b.E)("wui-list-button")],tK);var tG=i(153);i(38878);let tY=(0,o.AH)` 2436 wui-separator { 2437 margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); 2438 width: calc(100% + var(--wui-spacing-s) * 2); 2439 } 2440 2441 wui-email-input { 2442 width: 100%; 2443 } 2444 2445 form { 2446 width: 100%; 2447 display: block; 2448 position: relative; 2449 } 2450 2451 wui-icon-link, 2452 wui-loading-spinner { 2453 position: absolute; 2454 top: 50%; 2455 transform: translateY(-50%); 2456 } 2457 2458 wui-icon-link { 2459 right: var(--wui-spacing-xs); 2460 } 2461 2462 wui-loading-spinner { 2463 right: var(--wui-spacing-m); 2464 } 2465 2466 wui-text { 2467 margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); 2468 } 2469`;var tX=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let tQ=class extends o.WF{constructor(){super(...arguments),this.unsubscribe=[],this.formRef=(0,tp._)(),this.email="",this.loading=!1,this.error=""}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{"Enter"===e.key&&this.onSubmitEmail(e)})}render(){return(0,o.qy)` 2470 <form ${(0,tp.K)(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 2471 <wui-email-input 2472 @focus=${this.onFocusEvent.bind(this)} 2473 .disabled=${this.loading} 2474 @inputChange=${this.onEmailInputChange.bind(this)} 2475 tabIdx=${(0,r.J)(this.tabIdx)} 2476 > 2477 </wui-email-input> 2478 2479 ${this.submitButtonTemplate()}${this.loadingTemplate()} 2480 <input type="submit" hidden /> 2481 </form> 2482 ${this.templateError()} 2483 `}submitButtonTemplate(){return!this.loading&&this.email.length>3?(0,o.qy)` 2484 <wui-icon-link 2485 size="sm" 2486 icon="chevronRight" 2487 iconcolor="accent-100" 2488 @click=${this.onSubmitEmail.bind(this)} 2489 > 2490 </wui-icon-link> 2491 `:null}loadingTemplate(){return this.loading?(0,o.qy)`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}templateError(){return this.error?(0,o.qy)`<wui-text variant="tiny-500" color="error-100">${this.error}</wui-text>`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){if(!_.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===s.W.state.activeChain)){let e=s.W.getFirstCaipNetworkSupportsAuthConnector();if(e){G.I.push("SwitchNetwork",{network:e});return}}try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=V.a.getAuthConnector();if(!t)throw Error("w3m-email-login-widget: Auth connector not found");let{action:i}=await t.provider.connectEmail({email:this.email});j.E.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===i?(j.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),G.I.push("EmailVerifyOtp",{email:this.email})):"VERIFY_DEVICE"===i?G.I.push("EmailVerifyDevice",{email:this.email}
2491):"CONNECT"===i&&(await Y.x.connectExternal(t,s.W.state.activeChain),G.I.replace("Account"))}catch(t){let e=u.w.parseError(t);e?.includes("Invalid email")?this.error="Invalid email. Try again.":K.P.showError(t)}finally{this.loading=!1}}onFocusEvent(){j.E.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};tQ.styles=tY,tX([(0,a.MZ)()],tQ.prototype,"tabIdx",void 0),tX([(0,a.wk)()],tQ.prototype,"email",void 0),tX([(0,a.wk)()],tQ.prototype,"loading",void 0),tX([(0,a.wk)()],tQ.prototype,"error",void 0),tQ=tX([(0,h.EM)("w3m-email-login-widget")],tQ),i(61735),i(20669);var t0=i(97268),t1=i(37458);i(12716),i(88944);let t3=(0,o.AH)` 2492 :host { 2493 display: block; 2494 width: 100%; 2495 } 2496 2497 button { 2498 width: 100%; 2499 height: 56px; 2500 background: var(--wui-color-gray-glass-002); 2501 border-radius: var(--wui-border-radius-xs); 2502 } 2503`;var t5=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let t2=class extends o.WF{constructor(){super(...arguments),this.logo="google",this.disabled=!1,this.tabIdx=void 0}render(){return(0,o.qy)` 2504 <button ?disabled=${this.disabled} tabindex=${(0,r.J)(this.tabIdx)}> 2505 <wui-logo logo=${this.logo}></wui-logo> 2506 </button> 2507 `}};t2.styles=[w.W5,w.fD,t3],t5([(0,a.MZ)()],t2.prototype,"logo",void 0),t5([(0,a.MZ)({type:Boolean})],t2.prototype,"disabled",void 0),t5([(0,a.MZ)()],t2.prototype,"tabIdx",void 0),t2=t5([(0,b.E)("wui-logo-select")],t2);var t6=i(70132);let t4=(0,o.AH)` 2508 wui-separator { 2509 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-m) 2510 calc(var(--wui-spacing-m) * -1); 2511 width: calc(100% + var(--wui-spacing-s) * 2); 2512 } 2513`;var t8=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let t7=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.walletGuide="get-started",this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.remoteFeatures=n.H.state.remoteFeatures,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isPwaLoading=!1,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type)}),n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 2514 <wui-flex 2515 class="container" 2516 flexDirection="column" 2517 gap="xs" 2518 data-testid="w3m-social-login-widget" 2519 > 2520 ${this.topViewTemplate()}${this.bottomViewTemplate()} 2521 </wui-flex> 2522 `}topViewTemplate(){let e="explore"===this.walletGuide,t=this.remoteFeatures?.socials;return!t&&e?(t=J.oU.DEFAULT_SOCIALS,this.renderTopViewContent(t)):t?this.renderTopViewContent(t):null}renderTopViewContent(e){return 2===e.length?(0,o.qy)` <wui-flex gap="xs"> 2523 ${e.slice(0,2).map(e=>(0,o.qy)`<wui-logo-select 2524 data-testid=${`social-selector-${e}`} 2525 @click=${()=>{this.onSocialClick(e)}} 2526 logo=${e} 2527 tabIdx=${(0,r.J)(this.tabIdx)} 2528 ?disabled=${this.isPwaLoading} 2529 ></wui-logo-select>`)} 2530 </wui-flex>`:(0,o.qy)` <wui-list-social 2531 data-testid=${`social-selector-${e[0]}`} 2532 @click=${()=>{this.onSocialClick(e[0])}} 2533 logo=${(0,r.J)(e[0])} 2534 align="center" 2535 name=${`Continue with ${e[0]}`} 2536 tabIdx=${(0,r.J)(this.tabIdx)} 2537 ?disabled=${this.isPwaLoading} 2538 ></wui-list-social>`}bottomViewTemplate(){let e=this.remoteFeatures?.socials,t="explore"===this.walletGuide;return(this.authConnector&&e&&0!==e.length||!t||(e=J.oU.DEFAULT_SOCIALS),!e||e.length<=2)?null:e&&e.length>6?(0,o.qy)`<wui-flex gap="xs"> 2539 ${e.slice(1,5).map(e=>(0,o.qy)`<wui-logo-select 2540 data-testid=${`social-selector-${e}`} 2541 @click=${()=>{this.onSocialClick(e)}} 2542 logo=${e} 2543 tabIdx=${(0,r.J)(this.tabIdx)} 2544 ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} 2545 ?disabled=${this.isPwaLoading} 2546 ></wui-logo-select>`)} 2547 <wui-logo-select 2548 logo="more" 2549 tabIdx=${(0,r.J)(this.tabIdx)} 2550 @click=${this.onMoreSocialsClick.bind(this)} 2551 ?disabled=${this.isPwaLoading} 2552 data-testid="social-selector-more" 2553 ></wui-logo-select> 2554 </wui-flex>`:e?(0,o.qy)`<wui-flex gap="xs"> 2555 ${e.slice(1,e.length).map(e=>(0,o.qy)`<wui-logo-select 2556 data-testid=${`social-selector-${e}`} 2557 @click=${()=>{this.onSocialClick(e)}} 2558 logo=${e} 2559 tabIdx=${(0,r.J)(this.tabIdx)} 2560 ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} 2561 ?disabled=${this.isPwaLoading} 2562 ></wui-logo-select>`)} 2563 </wui-flex>`:null}onMoreSocialsClick(){G.I.push("ConnectSocials")}async onSocialClick(e){if(!_.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===s.W.state.activeChain)){let e=s.W.getFirstCaipNetworkSupportsAuthConnector();if(e){G.I.push("SwitchNetwork",{network:e});return}}e&&await (0,t1.Up)(e)}async handlePwaFrameLoad(){if(u.w.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof t6.Y&&await this.authConnector.provider.init()}catch(e){t0.h.open({shortMessage:"Error loading embedded wallet in PWA",longMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}};t7.styles=t4,t8([(0,a.MZ)()],t7.prototype,"walletGuide",void 0),t8([(0,a.MZ)()],t7.prototype,"tabIdx",void 0),t8([(0,a.wk)()],t7.prototype,"connectors",void 0),t8([(0,a.wk)()],t7.prototype,"remoteFeatures",void 0),t8([(0,a.wk)()],t7.prototype,"authConnector",void 0),t8([(0,a.wk)()],t7.prototype,"isPwaLoading",void 0),t7=t8([(0,h.EM)("w3m-social-login-widget")],t7),i(49577);let t9=(0,o.AH)` 2564 wui-flex { 2565 width: 100%; 2566 } 2567 2568 .wallet-guide { 2569 width: 100%; 2570 } 2571 2572 .chip-box { 2573 width: fit-content; 2574 background-color: var(--wui-color-gray-glass-005); 2575 border-radius: var(--wui-border-radius-3xl); 2576 } 2577`;var ie=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let it=class extends o.WF{constructor(){super(...arguments),this.walletGuide="get-started"}render(){return"explore"===this.walletGuide?(0,o.qy)`<wui-flex 2578 class="wallet-guide" 2579 flexDirection="column" 2580 alignItems="center" 2581 justifyContent="center" 2582 rowGap="xs" 2583 data-testid="w3m-wallet-guide-explore" 2584 > 2585 <wui-text variant="small-400" color="fg-200" align="center"> 2586 Looking for a self-custody wallet? 2587 </wui-text> 2588 2589 <wui-flex class="chip-box"> 2590 <wui-chip 2591 imageIcon="walletConnectLightBrown" 2592 icon="externalLink" 2593 variant="transparent" 2594 href="https://walletguide.walletconnect.network" 2595 title="Find one on WalletGuide" 2596 ></wui-chip> 2597 </wui-flex> 2598 </wui-flex>`:(0,o.qy)`<wui-flex 2599 columnGap="4xs" 2600 flexDirection="row" 2601 alignItems="center" 2602 justifyContent="center" 2603 .padding=${["s","0","s","0"]} 2604 > 2605 <wui-text variant="small-400" class="title" color="fg-200" 2606 >Haven't got a wallet?</wui-text 2607 > 2608 <wui-link 2609 data-testid="w3m-wallet-guide-get-started" 2610 color="blue-100" 2611 class="get-started-link" 2612 @click=${this.onGetStarted} 2613 tabIdx=${(0,r.J)(this.tabIdx)} 2614 > 2615 Get started 2616 </wui-link> 2617 </wui-flex>`}onGetStarted(){G.I.push("Create")}};it.styles=t9,ie([(0,a.MZ)()],it.prototype,"tabIdx",void 0),ie([(0,a.MZ)()],it.prototype,"walletGuide",void 0),it=ie([(0,h.EM)("w3m-wallet-guide")],it);let ii=(0,o.AH)` 2618 :host { 2619 position: relative; 2620 border-radius: var(--wui-border-radius-xxs); 2621 width: 40px; 2622 height: 40px; 2623 overflow: hidden; 2624 background: var(--wui-color-gray-glass-002); 2625 display: flex; 2626 justify-content: center;
2627 align-items: center; 2628 flex-wrap: wrap; 2629 gap: var(--wui-spacing-4xs); 2630 padding: 3.75px !important; 2631 } 2632 2633 :host::after { 2634 content: ''; 2635 position: absolute; 2636 top: 0; 2637 bottom: 0; 2638 left: 0; 2639 right: 0; 2640 border-radius: inherit; 2641 border: 1px solid var(--wui-color-gray-glass-010); 2642 pointer-events: none; 2643 } 2644 2645 :host > wui-wallet-image { 2646 width: 14px; 2647 height: 14px; 2648 border-radius: var(--wui-border-radius-5xs); 2649 } 2650 2651 :host > wui-flex { 2652 padding: 2px; 2653 position: fixed; 2654 overflow: hidden; 2655 left: 34px; 2656 bottom: 8px; 2657 background: var(--dark-background-150, #1e1f1f); 2658 border-radius: 50%; 2659 z-index: 2; 2660 display: flex; 2661 } 2662`;var io=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ia=class extends o.WF{constructor(){super(...arguments),this.walletImages=[]}render(){let e=this.walletImages.length<4;return(0,o.qy)`${this.walletImages.slice(0,4).map(({src:e,walletName:t})=>(0,o.qy)` 2663 <wui-wallet-image 2664 size="inherit" 2665 imageSrc=${e} 2666 name=${(0,r.J)(t)} 2667 ></wui-wallet-image> 2668 `)} 2669 ${e?[...Array(4-this.walletImages.length)].map(()=>(0,o.qy)` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null} 2670 <wui-flex> 2671 <wui-icon-box 2672 size="xxs" 2673 iconSize="xxs" 2674 iconcolor="success-100" 2675 backgroundcolor="success-100" 2676 icon="checkmark" 2677 background="opaque" 2678 ></wui-icon-box> 2679 </wui-flex>`}};ia.styles=[w.W5,ii],io([(0,a.MZ)({type:Array})],ia.prototype,"walletImages",void 0),ia=io([(0,b.E)("wui-all-wallets-image")],ia);let ir=(0,o.AH)` 2680 button { 2681 column-gap: var(--wui-spacing-s); 2682 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 2683 width: 100%; 2684 background-color: var(--wui-color-gray-glass-002); 2685 border-radius: var(--wui-border-radius-xs); 2686 color: var(--wui-color-fg-100); 2687 } 2688 2689 button > wui-text:nth-child(2) { 2690 display: flex; 2691 flex: 1; 2692 } 2693 2694 button:disabled { 2695 background-color: var(--wui-color-gray-glass-015); 2696 color: var(--wui-color-gray-glass-015); 2697 } 2698 2699 button:disabled > wui-tag { 2700 background-color: var(--wui-color-gray-glass-010); 2701 color: var(--wui-color-fg-300); 2702 } 2703 2704 wui-icon { 2705 color: var(--wui-color-fg-200) !important; 2706 } 2707`;var is=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let il=class extends o.WF{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return(0,o.qy)` 2708 <button ?disabled=${this.disabled} tabindex=${(0,r.J)(this.tabIdx)}> 2709 ${this.templateAllWallets()} ${this.templateWalletImage()} 2710 <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text> 2711 ${this.templateStatus()} 2712 </button> 2713 `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?(0,o.qy)` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?(0,o.qy)` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?(0,o.qy)`<wui-wallet-image 2714 size="sm" 2715 imageSrc=${this.imageSrc} 2716 name=${this.name} 2717 .installed=${this.installed} 2718 ></wui-wallet-image>`:this.showAllWallets||this.imageSrc?null:(0,o.qy)`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`}templateStatus(){return this.loading?(0,o.qy)`<wui-loading-spinner 2719 size="lg" 2720 color=${this.loadingSpinnerColor} 2721 ></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?(0,o.qy)`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?(0,o.qy)`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};il.styles=[w.W5,w.fD,ir],is([(0,a.MZ)({type:Array})],il.prototype,"walletImages",void 0),is([(0,a.MZ)()],il.prototype,"imageSrc",void 0),is([(0,a.MZ)()],il.prototype,"name",void 0),is([(0,a.MZ)()],il.prototype,"tagLabel",void 0),is([(0,a.MZ)()],il.prototype,"tagVariant",void 0),is([(0,a.MZ)()],il.prototype,"icon",void 0),is([(0,a.MZ)()],il.prototype,"walletIcon",void 0),is([(0,a.MZ)()],il.prototype,"tabIdx",void 0),is([(0,a.MZ)({type:Boolean})],il.prototype,"installed",void 0),is([(0,a.MZ)({type:Boolean})],il.prototype,"disabled",void 0),is([(0,a.MZ)({type:Boolean})],il.prototype,"showAllWallets",void 0),is([(0,a.MZ)({type:Boolean})],il.prototype,"loading",void 0),is([(0,a.MZ)({type:String})],il.prototype,"loadingSpinnerColor",void 0),il=is([(0,b.E)("wui-list-wallet")],il);var ic=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let id=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.count=t$.N.state.count,this.filteredCount=t$.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=t$.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e),t$.N.subscribeKey("count",e=>this.count=e),t$.N.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),t$.N.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}
2721disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=n.H.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!u.w.isMobile())return null;let i=t$.N.state.featured.length,a=this.count+i,s=a<10?a:10*Math.floor(a/10),l=this.filteredCount>0?this.filteredCount:s,c=`${l}`;return this.filteredCount>0?c=`${this.filteredCount}`:l<a&&(c=`${l}+`),(0,o.qy)` 2722 <wui-list-wallet 2723 name="All Wallets" 2724 walletIcon="allWallets" 2725 showAllWallets 2726 @click=${this.onAllWallets.bind(this)} 2727 tagLabel=${c} 2728 tagVariant="shade" 2729 data-testid="all-wallets" 2730 tabIdx=${(0,r.J)(this.tabIdx)} 2731 .loading=${this.isFetchingRecommendedWallets} 2732 loadingSpinnerColor=${this.isFetchingRecommendedWallets?"fg-300":"accent-100"} 2733 ></wui-list-wallet> 2734 `}onAllWallets(){j.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),G.I.push("AllWallets")}};ic([(0,a.MZ)()],id.prototype,"tabIdx",void 0),ic([(0,a.wk)()],id.prototype,"connectors",void 0),ic([(0,a.wk)()],id.prototype,"count",void 0),ic([(0,a.wk)()],id.prototype,"filteredCount",void 0),ic([(0,a.wk)()],id.prototype,"isFetchingRecommendedWallets",void 0),id=ic([(0,h.EM)("w3m-all-wallets-widget")],id);var iu=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ip=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.filter(e=>"ANNOUNCED"===e.type);return e?.length?(0,o.qy)` 2735 <wui-flex flexDirection="column" gap="xs"> 2736 ${e.filter(ti.g.showConnector).map(e=>(0,o.qy)` 2737 <wui-list-wallet 2738 imageSrc=${(0,r.J)(c.$.getConnectorImage(e))} 2739 name=${e.name??"Unknown"} 2740 @click=${()=>this.onConnector(e)} 2741 tagVariant="success" 2742 tagLabel="installed" 2743 data-testid=${`wallet-selector-${e.id}`} 2744 .installed=${!0} 2745 tabIdx=${(0,r.J)(this.tabIdx)} 2746 > 2747 </wui-list-wallet> 2748 `)} 2749 </wui-flex> 2750 `:(this.style.cssText="display: none",null)}onConnector(e){"walletConnect"===e.id?u.w.isMobile()?G.I.push("AllWallets"):G.I.push("ConnectingWalletConnect"):G.I.push("ConnectingExternal",{connector:e})}};iu([(0,a.MZ)()],ip.prototype,"tabIdx",void 0),iu([(0,a.wk)()],ip.prototype,"connectors",void 0),ip=iu([(0,h.EM)("w3m-connect-announced-widget")],ip);var ih=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iw=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.loading=!1,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e)),u.w.isTelegram()&&u.w.isIos()&&(this.loading=!Y.x.state.wcUri,this.unsubscribe.push(Y.x.subscribeKey("wcUri",e=>this.loading=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{customWallets:e}=n.H.state;if(!e?.length)return this.style.cssText="display: none",null;let t=this.filterOutDuplicateWallets(e);return(0,o.qy)`<wui-flex flexDirection="column" gap="xs"> 2751 ${t.map(e=>(0,o.qy)` 2752 <wui-list-wallet 2753 imageSrc=${(0,r.J)(c.$.getWalletImage(e))} 2754 name=${e.name??"Unknown"} 2755 @click=${()=>this.onConnectWallet(e)} 2756 data-testid=${`wallet-selector-${e.id}`} 2757 tabIdx=${(0,r.J)(this.tabIdx)} 2758 ?loading=${this.loading} 2759 > 2760 </wui-list-wallet> 2761 `)} 2762 </wui-flex>`}filterOutDuplicateWallets(e){let t=eo.i.getRecentWallets(),i=this.connectors.map(e=>
2762e.info?.rdns).filter(Boolean),o=t.map(e=>e.rdns).filter(Boolean),a=i.concat(o);if(a.includes("io.metamask.mobile")&&u.w.isMobile()){let e=a.indexOf("io.metamask.mobile");a[e]="io.metamask"}return e.filter(e=>!a.includes(String(e?.rdns)))}onConnectWallet(e){this.loading||G.I.push("ConnectingWalletConnect",{wallet:e})}};ih([(0,a.MZ)()],iw.prototype,"tabIdx",void 0),ih([(0,a.wk)()],iw.prototype,"connectors",void 0),ih([(0,a.wk)()],iw.prototype,"loading",void 0),iw=ih([(0,h.EM)("w3m-connect-custom-widget")],iw);var ig=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ib=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.filter(e=>"EXTERNAL"===e.type).filter(ti.g.showConnector).filter(e=>e.id!==_.o.CONNECTOR_ID.COINBASE_SDK);return e?.length?(0,o.qy)` 2763 <wui-flex flexDirection="column" gap="xs"> 2764 ${e.map(e=>(0,o.qy)` 2765 <wui-list-wallet 2766 imageSrc=${(0,r.J)(c.$.getConnectorImage(e))} 2767 .installed=${!0} 2768 name=${e.name??"Unknown"} 2769 data-testid=${`wallet-selector-external-${e.id}`} 2770 @click=${()=>this.onConnector(e)} 2771 tabIdx=${(0,r.J)(this.tabIdx)} 2772 > 2773 </wui-list-wallet> 2774 `)} 2775 </wui-flex> 2776 `:(this.style.cssText="display: none",null)}onConnector(e){G.I.push("ConnectingExternal",{connector:e})}};ig([(0,a.MZ)()],ib.prototype,"tabIdx",void 0),ig([(0,a.wk)()],ib.prototype,"connectors",void 0),ib=ig([(0,h.EM)("w3m-connect-external-widget")],ib);var im=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iv=class extends o.WF{constructor(){super(...arguments),this.tabIdx=void 0,this.wallets=[]}render(){return this.wallets.length?(0,o.qy)` 2777 <wui-flex flexDirection="column" gap="xs"> 2778 ${this.wallets.map(e=>(0,o.qy)` 2779 <wui-list-wallet 2780 data-testid=${`wallet-selector-featured-${e.id}`} 2781 imageSrc=${(0,r.J)(c.$.getWalletImage(e))} 2782 name=${e.name??"Unknown"} 2783 @click=${()=>this.onConnectWallet(e)} 2784 tabIdx=${(0,r.J)(this.tabIdx)} 2785 > 2786 </wui-list-wallet> 2787 `)} 2788 </wui-flex> 2789 `:(this.style.cssText="display: none",null)}onConnectWallet(e){V.a.selectWalletConnector(e)}};im([(0,a.MZ)()],iv.prototype,"tabIdx",void 0),im([(0,a.MZ)()],iv.prototype,"wallets",void 0),iv=im([(0,h.EM)("w3m-connect-featured-widget")],iv);var iy=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let ix=class extends o.WF{constructor(){super(...arguments),this.tabIdx=void 0,this.connectors=[]}render(){let e=this.connectors.filter(ti.g.showConnector);return 0===e.length?(this.style.cssText="display: none",null):(0,o.qy)` 2790 <wui-flex flexDirection="column" gap="xs"> 2791 ${e.map(e=>(0,o.qy)` 2792 <wui-list-wallet 2793 imageSrc=${(0,r.J)(c.$.getConnectorImage(e))} 2794 .installed=${!0} 2795 name=${e.name??"Unknown"} 2796 tagVariant="success" 2797 tagLabel="installed" 2798 data-testid=${`wallet-selector-${e.id}`} 2799 @click=${()=>this.onConnector(e)} 2800 tabIdx=${(0,r.J)(this.tabIdx)} 2801 > 2802 </wui-list-wallet> 2803 `)} 2804 </wui-flex> 2805 `}onConnector(e){V.a.setActiveConnector(e),G.I.push("ConnectingExter
2805nal",{connector:e})}};iy([(0,a.MZ)()],ix.prototype,"tabIdx",void 0),iy([(0,a.MZ)()],ix.prototype,"connectors",void 0),ix=iy([(0,h.EM)("w3m-connect-injected-widget")],ix);var ik=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iC=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.filter(e=>"MULTI_CHAIN"===e.type&&"WalletConnect"!==e.name);return e?.length?(0,o.qy)` 2806 <wui-flex flexDirection="column" gap="xs"> 2807 ${e.map(e=>(0,o.qy)` 2808 <wui-list-wallet 2809 imageSrc=${(0,r.J)(c.$.getConnectorImage(e))} 2810 .installed=${!0} 2811 name=${e.name??"Unknown"} 2812 tagVariant="shade" 2813 tagLabel="multichain" 2814 data-testid=${`wallet-selector-${e.id}`} 2815 @click=${()=>this.onConnector(e)} 2816 tabIdx=${(0,r.J)(this.tabIdx)} 2817 > 2818 </wui-list-wallet> 2819 `)} 2820 </wui-flex> 2821 `:(this.style.cssText="display: none",null)}onConnector(e){V.a.setActiveConnector(e),G.I.push("ConnectingMultiChain")}};ik([(0,a.MZ)()],iC.prototype,"tabIdx",void 0),ik([(0,a.wk)()],iC.prototype,"connectors",void 0),iC=ik([(0,h.EM)("w3m-connect-multi-chain-widget")],iC);var i$=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iS=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.loading=!1,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e)),u.w.isTelegram()&&u.w.isIos()&&(this.loading=!Y.x.state.wcUri,this.unsubscribe.push(Y.x.subscribeKey("wcUri",e=>this.loading=!e)))}render(){let e=eo.i.getRecentWallets().filter(e=>!tO.A.isExcluded(e)).filter(e=>!this.hasWalletConnector(e)).filter(e=>this.isWalletCompatibleWithCurrentChain(e));return e.length?(0,o.qy)` 2822 <wui-flex flexDirection="column" gap="xs"> 2823 ${e.map(e=>(0,o.qy)` 2824 <wui-list-wallet 2825 imageSrc=${(0,r.J)(c.$.getWalletImage(e))} 2826 name=${e.name??"Unknown"} 2827 @click=${()=>this.onConnectWallet(e)} 2828 tagLabel="recent" 2829 tagVariant="shade" 2830 tabIdx=${(0,r.J)(this.tabIdx)} 2831 ?loading=${this.loading} 2832 > 2833 </wui-list-wallet> 2834 `)} 2835 </wui-flex> 2836 `:(this.style.cssText="display: none",null)}onConnectWallet(e){this.loading||V.a.selectWalletConnector(e)}hasWalletConnector(e){return this.connectors.some(t=>t.id===e.id||t.name===e.name)}isWalletCompatibleWithCurrentChain(e){let t=s.W.state.activeChain;return!t||!e.chains||e.chains.some(e=>t===e.split(":")[0])}};i$([(0,a.MZ)()],iS.prototype,"tabIdx",void 0),i$([(0,a.wk)()],iS.prototype,"connectors",void 0),i$([(0,a.wk)()],iS.prototype,"loading",void 0),iS=i$([(0,h.EM)("w3m-connect-recent-widget")],iS);var iI=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iA=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.wallets=[],this.loading=!1,u.w.isTelegram()&&u.w.isIos()&&(this.loading=!Y.x.state.wcUri,this.unsubscribe.push(Y.x.subscribeKey("wcUri",e=>this.loading=!e)))}render(){let{connectors:e}=V.a.state,{customWallets:t,featuredWalletIds:i}=n.H.state,a=eo.i.getRecentWallets(),s=e.find(e=>"walletConnect"===e.id),l=e.filter(e=>"INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type).filter(e=>"Browser Wallet"!==e.name);if(!s)return null;if(i||t||!this.wallets.length)return this.style.cssText="display: none",null;let d=Math.max(0,2-(l.length+a.length)),u=tO.A.filterOutDuplicateWallets(this.wallets).slice(0,d);return u.length?(0,o.qy)` 2837 <wui-flex flexDirection="column" gap="xs"> 2838 ${u.map(e=>(0,o.qy)` 2839 <wui-list-wallet 2840 imageSrc=${(0,r.J)(c.$.getWalletImage(e))} 2841 name=${e?.name??"Unknown"} 2842 @click=${()=>this.onConnectWallet(e)} 2843 tabIdx=${(0,r.J)(this.tabIdx)} 2844 ?loading=${this.loading} 2845 > 2846 </wui-list-wallet> 2847 `)} 2848 </wui-flex> 2849 `:(this.style.cssText="display: none",null)}onConnectWallet(e){if(this.loading)return;let t=V.a.getConnector(e.id,e.rdns);
2849t?G.I.push("ConnectingExternal",{connector:t}):G.I.push("ConnectingWalletConnect",{wallet:e})}};iI([(0,a.MZ)()],iA.prototype,"tabIdx",void 0),iI([(0,a.MZ)()],iA.prototype,"wallets",void 0),iI([(0,a.wk)()],iA.prototype,"loading",void 0),iA=iI([(0,h.EM)("w3m-connect-recommended-widget")],iA);var iE=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iT=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.connectorImages=l.j.state.connectorImages,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e),l.j.subscribeKey("connectorImages",e=>this.connectorImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(u.w.isMobile())return this.style.cssText="display: none",null;let e=this.connectors.find(e=>"walletConnect"===e.id);if(!e)return this.style.cssText="display: none",null;let t=e.imageUrl||this.connectorImages[e?.imageId??""];return(0,o.qy)` 2850 <wui-list-wallet 2851 imageSrc=${(0,r.J)(t)} 2852 name=${e.name??"Unknown"} 2853 @click=${()=>this.onConnector(e)} 2854 tagLabel="qr code" 2855 tagVariant="main" 2856 tabIdx=${(0,r.J)(this.tabIdx)} 2857 data-testid="wallet-selector-walletconnect" 2858 > 2859 </wui-list-wallet> 2860 `}onConnector(e){V.a.setActiveConnector(e),G.I.push("ConnectingWalletConnect")}};iE([(0,a.MZ)()],iT.prototype,"tabIdx",void 0),iE([(0,a.wk)()],iT.prototype,"connectors",void 0),iE([(0,a.wk)()],iT.prototype,"connectorImages",void 0),iT=iE([(0,h.EM)("w3m-connect-walletconnect-widget")],iT);let iR=(0,o.AH)` 2861 :host { 2862 margin-top: var(--wui-spacing-3xs); 2863 } 2864 wui-separator { 2865 margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) 2866 calc(var(--wui-spacing-m) * -1); 2867 width: calc(100% + var(--wui-spacing-s) * 2); 2868 } 2869`;var iW=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iO=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=V.a.state.connectors,this.recommended=t$.N.state.recommended,this.featured=t$.N.state.featured,this.unsubscribe.push(V.a.subscribeKey("connectors",e=>this.connectors=e),t$.N.subscribeKey("recommended",e=>this.recommended=e),t$.N.subscribeKey("featured",e=>this.featured=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 2870 <wui-flex flexDirection="column" gap="xs"> ${this.connectorListTemplate()} </wui-flex> 2871 `}connectorListTemplate(){let{custom:e,recent:t,announced:i,injected:a,multiChain:n,recommended:s,featured:l,external:c}=ti.g.getConnectorsByType(this.connectors,this.recommended,this.featured);return ti.g.getConnectorTypeOrder({custom:e,recent:t,announced:i,injected:a,multiChain:n,recommended:s,featured:l,external:c}).map(e=>{switch(e){case"injected":return(0,o.qy)` 2872 ${n.length?(0,o.qy)`<w3m-connect-multi-chain-widget 2873 tabIdx=${(0,r.J)(this.tabIdx)} 2874 ></w3m-connect-multi-chain-widget>`:null} 2875 ${i.length?(0,o.qy)`<w3m-connect-announced-widget 2876 tabIdx=${(0,r.J)(this.tabIdx)} 2877 ></w3m-connect-announced-widget>`:null} 2878 ${a.length?(0,o.qy)`<w3m-connect-injected-widget 2879 .connectors=${a} 2880 tabIdx=${(0,r.J)(this.tabIdx)} 2881 ></w3m-connect-injected-widget>`:null} 2882 `;case"walletConnect":return(0,o.qy)`<w3m-connect-walletconnect-widget 2883 tabIdx=${(0,r.J)(this.tabIdx)} 2884 ></w3m-connect-walletconnect-widget>`;case"recent":return(0,o.qy)`<w3m-connect-recent-widget 2885 tabIdx=${(0,r.J)(this.tabIdx)} 2886 ></w3m-connect-recent-widget>`;case"featured":return(0,o.qy)`<w3m-connect-featured-widget 2887 .wallets=${l} 2888 tabIdx=${(0,r.J)(this.tabIdx)} 2889 ></w3m-connect-featured-widget>`;
2889case"custom":return(0,o.qy)`<w3m-connect-custom-widget 2890 tabIdx=${(0,r.J)(this.tabIdx)} 2891 ></w3m-connect-custom-widget>`;case"external":return(0,o.qy)`<w3m-connect-external-widget 2892 tabIdx=${(0,r.J)(this.tabIdx)} 2893 ></w3m-connect-external-widget>`;case"recommended":return(0,o.qy)`<w3m-connect-recommended-widget 2894 .wallets=${s} 2895 tabIdx=${(0,r.J)(this.tabIdx)} 2896 ></w3m-connect-recommended-widget>`;default:return console.warn(`Unknown connector type: ${e}`),null}})}};iO.styles=iR,iW([(0,a.MZ)()],iO.prototype,"tabIdx",void 0),iW([(0,a.wk)()],iO.prototype,"connectors",void 0),iW([(0,a.wk)()],iO.prototype,"recommended",void 0),iW([(0,a.wk)()],iO.prototype,"featured",void 0),iO=iW([(0,h.EM)("w3m-connector-list")],iO);var iN=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iM=class extends o.WF{constructor(){super(...arguments),this.tabIdx=void 0}render(){return(0,o.qy)` 2897 <wui-flex flexDirection="column" gap="xs"> 2898 <w3m-connector-list tabIdx=${(0,r.J)(this.tabIdx)}></w3m-connector-list> 2899 <w3m-all-wallets-widget tabIdx=${(0,r.J)(this.tabIdx)}></w3m-all-wallets-widget> 2900 </wui-flex> 2901 `}};iN([(0,a.MZ)()],iM.prototype,"tabIdx",void 0),iM=iN([(0,h.EM)("w3m-wallet-login-list")],iM);let iP=(0,o.AH)` 2902 :host { 2903 --connect-scroll--top-opacity: 0; 2904 --connect-scroll--bottom-opacity: 0; 2905 --connect-mask-image: none; 2906 } 2907 2908 .connect { 2909 max-height: clamp(360px, 470px, 80vh); 2910 scrollbar-width: none; 2911 overflow-y: scroll; 2912 overflow-x: hidden; 2913 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 2914 will-change: opacity; 2915 mask-image: var(--connect-mask-image); 2916 } 2917 2918 .guide { 2919 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 2920 will-change: opacity; 2921 } 2922 2923 .connect::-webkit-scrollbar {
2924 display: none; 2925 } 2926 2927 .all-wallets { 2928 flex-flow: column; 2929 } 2930 2931 .connect.disabled, 2932 .guide.disabled { 2933 opacity: 0.3; 2934 pointer-events: none; 2935 user-select: none; 2936 } 2937 2938 wui-separator { 2939 margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); 2940 width: calc(100% + var(--wui-spacing-s) * 2); 2941 } 2942`;var ij=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iq=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.connectors=V.a.state.connectors,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.features=n.H.state.features,this.remoteFeatures=n.H.state.remoteFeatures,this.enableWallets=n.H.state.enableWallets,this.noAdapters=s.W.state.noAdapters,this.walletGuide="get-started",this.checked=t_.o.state.isLegalCheckboxChecked,this.isEmailEnabled=this.remoteFeatures?.email&&!s.W.state.noAdapters,this.isSocialEnabled=this.remoteFeatures?.socials&&this.remoteFeatures.socials.length>0&&!s.W.state.noAdapters,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors),this.unsubscribe.push(V.a.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)}),n.H.subscribeKey("features",e=>{this.features=e}),n.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e,this.setEmailAndSocialEnableCheck(this.noAdapters,this.remoteFeatures)}),n.H.subscribeKey("enableWallets",e=>this.enableWallets=e),s.W.subscribeKey("noAdapters",e=>this.setEmailAndSocialEnableCheck(e,this.remoteFeatures)),t_.o.subscribeKey("isLegalCheckboxChecked",e=>this.checked=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.resizeObserver?.disconnect();let e=this.shadowRoot?.querySelector(".connect");e?.removeEventListener("scroll",this.handleConnectListScroll.bind(this))}firstUpdated(){let e=this.shadowRoot?.querySelector(".connect");e&&(requestAnimationFrame(this.handleConnectListScroll.bind(this)),e?.addEventListener("scroll",this.handleConnectListScroll.bind(this)),this.resizeObserver=new ResizeObserver(()=>{this.handleConnectListScroll()}),this.resizeObserver?.observe(e),this.handleConnectListScroll())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=n.H.state,i=n.H.state.features?.legalCheckbox,a=!!(e||t)&&!!i&&"get-started"===this.walletGuide&&!this.checked,r=n.H.state.enableWalletGuide,s=this.enableWallets,l=this.isSocialEnabled||this.authConnector,c=a?-1:void 0;return(0,o.qy)` 2943 <wui-flex flexDirection="column"> 2944 ${this.legalCheckboxTemplate()} 2945 <wui-flex 2946 data-testid="w3m-connect-scroll-view" 2947 flexDirection="column" 2948 class=${(0,e3.H)({connect:!0,disabled:a})} 2949 > 2950 <wui-flex 2951 class="connect-methods" 2952 flexDirection="column" 2953 gap="s" 2954 .padding=${l&&s&&r&&"get-started"===this.walletGuide?["3xs","s","0","s"]:["3xs","s","s","s"]} 2955 > 2956 ${this.renderConnectMethod(c)} 2957 </wui-flex> 2958 </wui-flex> 2959 ${this.guideTemplate(a)} 2960 <w3m-legal-footer></w3m-legal-footer> 2961 </wui-flex> 2962 `}setEmailAndSocialEnableCheck(e,t){this.isEmailEnabled=t?.email&&!e,this.isSocialEnabled=t?.socials&&t.socials.length>0&&!e,this.remoteFeatures=t,this.noAdapters=e}checkIfAuthEnabled(e){let t=e.filter(e=>e.type===tG.o.CONNECTOR_TYPE_AUTH).map(e=>e.chain);return _.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>t.includes(e))}renderConnectMethod(e){let t=tO.A.getConnectOrderMethod(this.features,this.connectors);return(0,o.qy)`${t.map((t,i)=>{switch(t){case"email":return(0,o.qy)`${this.emailTemplate(e)} ${this.separatorTemplate(i,"email")}`;case"social":return(0,o.qy)`${this.socialListTemplate(e)} 2963 ${this.separatorTemplate(i,"social")}`;case"wallet":return(0,o.qy)`${this.walletListTemplate(e)} 2964 ${this.separatorTemplate(i,"wallet")}`;default:return null}})}`}checkMethodEnabled(e){switch(e){case"wallet":return this.enableWallets;case"social":return this.isSocialEnabled&&this.isAuthEnabled;case"email":return this.isEmailEnabled&&this.isAuthEnabled;default:return null}}checkIsThereNextMethod(e){let t=tO.A.getConnectOrderMethod(this.features,this.connectors)[e+1];return t?this.checkMethodEnabled(t)?t:this.checkIsThereNextMethod(e+1):void 0}separatorTemplate(e,t){let i=this.checkIsThereNextMethod(e),a="explore"===this.walletGuide;switch(t){case"wallet":return this.enableWallets&&i&&!a?(0,o.qy)`<wui-separator data-testid="wui-separator" text="or"></wui-separator>`:null;case"email":return this.isAuthEnabled&&this.isEmailEnabled&&"social"!==i&&i?(0,o.qy)`<wui-separator 2965 data-testid="w3m-email-login-or-separator" 2966 text="or" 2967 ></wui-separator>`:null;case"social":return this.isAuthEnabled&&this.isSocialEnabled&&"email"!==i&&i?(0,o.qy)`<wui-separator data-testid="wui-separator" text="or"></wui-separator>`:null;default:return null}}emailTemplate(e){return this.isEmailEnabled&&this.isAuthEnabled?(0,o.qy)`<w3m-email-login-widget 2968 walletGuide=${this.walletGuide} 2969 tabIdx=${(0,r.J)(e)} 2970 ></w3m-email-login-widget>`:null}socialListTemplate(e){return this.isSocialEnabled&&this.isAuthEnabled?(0,o.qy)`<w3m-social-login-widget 2971 walletGuide=${this.walletGuide} 2972 tabIdx=${(0,r.J)(e)} 2973 ></w3m-social-login-widget>`:null}walletListTemplate(e){let t=this.enableWallets,i=this.features?.emailShowWallets===!1,a=this.features?.collapseWallets;return t?(u.w.isTelegram()&&(u.w.isSafari()||u.w.isIos())&&Y.x.connectWalletConnect().catch(e=>({})),"explore"===this.walletGuide)?null:this.isAuthEnabled&&(this.isEmailEnabled||this.isSocialEnabled)&&(i||a)?(0,o.qy)`<wui-list-button 2974 data-testid="w3m-collapse-wallets-button" 2975 tabIdx=${(0,r.J)(e)} 2976 @click=${this.onContinueWalletClick.bind(this)} 2977 text="Continue with a wallet" 2978 ></wui-list-button>`:(0,o.qy)`<w3m-wallet-login-list tabIdx=${(0,r.J)(e)}></w3m-wallet-login-list>`:null}guideTemplate(e=!1){return n.H.state.enableWalletGuide&&(this.authConnector||this.isSocialEnabled)?(0,o.qy)` 2979 ${"explore"!==this.walletGuide||s.W.state.noAdapters?null:(0,o.qy)`<wui-separator data-testid="wui-separator" id="explore" text="or"></wui-separator>`} 2980 <w3m-wallet-guide 2981 class=${(0,e3.H)({guide:!0,disabled:e})} 2982 tabIdx=${(0,r.J)(e?-1:void 0)} 2983 walletGuide=${this.walletGuide} 2984 ></w3m-wallet-guide> 2985 `:null}legalCheckboxTemplate(){return"explore"===this.walletGuide?null:(0,o.qy)`<w3m-legal-checkbox data-testid="w3m-legal-checkbox"></w3m-legal-checkbox>`}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".connect");e&&(e.scrollHeight>470?(e.style.setProperty("--connect-mask-image",`linear-gradient( 2986 to bottom, 2987 rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, 2988 rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, 2989 black 40px, 2990 black calc(100% - 40px), 2991 rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), 2992 rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% 2993 )`),e.style.setProperty("--connect-scroll--top-opacity",h.z8.interpolate([0,50],[0,1],e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.z8.interpolate([0,50],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString())):(e.style.setProperty("--connect-mask-image","none"),e.style.setProperty("--connect-scroll--top-opacity","0"),e.style.setProperty("--connect-scroll--bottom-opacity","0")))}onContinueWalletClick(){G.I.push("ConnectWallets")}};iq.styles=iP,ij([(0,tH.w)()],iq.prototype,"connectors",void 0),ij([(0,tH.w)()],iq.prototype,"authConnector",void 0),ij([(0,tH.w)()],iq.prototype,"features",void 0),ij([(0,tH.w)()],iq.prototype,"remoteFeatures",void 0),ij([(0,tH.w)()],iq.prototype,"enableWallets",void 0),ij([(0,tH.w)()],iq.prototype,"noAdapters",void 0),ij([(0,a.MZ)()],iq.prototype,"walletGuide",void 0),ij([(0,tH.w)()],iq.prototype,"checked",void 0),ij([(0,tH.w)()],iq.prototype,"isEmailEnabled",void 0),ij([(0,tH.w)()],iq.prototype,"isSocialEnabled",void 0),ij([(0,tH.w)()],iq.prototype,"isAuthEnabled",void 0),iq=ij([(0,h.EM)("w3m-connect-view")],iq);var iD=i(39519);i(39515),i(11778);let iU=(0,o.AH)` 2994 wui-flex { 2995 width: 100%; 2996 background-color: var(--wui-color-gray-glass-002); 2997 border-radius: var(--wui-border-radius-xs); 2998 } 2999`;var iL=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iz=class extends o.WF{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,o.qy)` 3000 <wui-flex 3001 justifyContent="space-between" 3002 alignItems="center" 3003 .padding=${["1xs","2l","1xs","2l"]} 3004 > 3005 <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text> 3006 <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight"> 3007 </wui-chip-button>
3007 3008 </wui-flex> 3009 `}};iz.styles=[w.W5,w.fD,iU],iL([(0,a.MZ)({type:Boolean})],iz.prototype,"disabled",void 0),iL([(0,a.MZ)()],iz.prototype,"label",void 0),iL([(0,a.MZ)()],iz.prototype,"buttonLabel",void 0),iz=iL([(0,b.E)("wui-cta-button")],iz);let iZ=(0,o.AH)` 3010 :host { 3011 display: block; 3012 padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); 3013 } 3014`;var iB=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iF=class extends o.WF{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:i,chrome_store:a,homepage:r}=this.wallet,n=u.w.isMobile(),s=u.w.isIos(),l=u.w.isAndroid(),c=[t,i,r,a].filter(Boolean).length>1,d=h.Zv.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!n?(0,o.qy)` 3015 <wui-cta-button 3016 label=${`Don't have ${d}?`} 3017 buttonLabel="Get" 3018 @click=${()=>G.I.push("Downloads",{wallet:this.wallet})} 3019 ></wui-cta-button> 3020 `:!c&&r?(0,o.qy)` 3021 <wui-cta-button 3022 label=${`Don't have ${d}?`} 3023 buttonLabel="Get" 3024 @click=${this.onHomePage.bind(this)} 3025 ></wui-cta-button> 3026 `:t&&s?(0,o.qy)` 3027 <wui-cta-button 3028 label=${`Don't have ${d}?`} 3029 buttonLabel="Get" 3030 @click=${this.onAppStore.bind(this)} 3031 ></wui-cta-button> 3032 `:i&&l?(0,o.qy)` 3033 <wui-cta-button 3034 label=${`Don't have ${d}?`} 3035 buttonLabel="Get" 3036 @click=${this.onPlayStore.bind(this)} 3037 ></wui-cta-button> 3038 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&u.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&u.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&u.w.openHref(this.wallet.homepage,"_blank")}};iF.styles=[iZ],iB([(0,a.MZ)({type:Object})],iF.prototype,"wallet",void 0),iF=iB([(0,h.EM)("w3m-mobile-download-links")],iF);let iH=(0,o.AH)` 3039 @keyframes shake { 3040 0% { 3041 transform: translateX(0); 3042 } 3043 25% { 3044 transform: translateX(3px); 3045 } 3046 50% { 3047 transform: translateX(-3px); 3048 } 3049 75% { 3050 transform: translateX(3px); 3051 } 3052 100% { 3053 transform: translateX(0); 3054 } 3055 } 3056 3057 wui-flex:first-child:not(:only-child) { 3058 position: relative; 3059 } 3060 3061 wui-loading-thumbnail { 3062 position: absolute; 3063 } 3064 3065 wui-icon-box { 3066 position: absolute; 3067 right: calc(var(--wui-spacing-3xs) * -1); 3068 bottom: calc(var(--wui-spacing-3xs) * -1); 3069 opacity: 0; 3070 transform: scale(0.5); 3071 transition-property: opacity, transform; 3072 transition-duration: var(--wui-duration-lg); 3073 transition-timing-function: var(--wui-ease-out-power-2); 3074 will-change: opacity, transform; 3075 } 3076 3077 wui-text[align='center'] { 3078 width: 100%; 3079 padding: 0px var(--wui-spacing-l); 3080 } 3081 3082 [data-error='true'] wui-icon-box { 3083 opacity: 1; 3084 transform: scale(1); 3085 } 3086 3087 [data-error='true'] > wui-flex:first-child { 3088 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 3089 } 3090 3091 [data-retry='false'] wui-link { 3092 display: none; 3093 } 3094 3095 [data-retry='true'] wui-link { 3096 display: block; 3097 opacity: 1; 3098 } 3099`;var i_=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class iV extends o.WF{constructor(){super(),this.wallet=G.I.state.data?.wallet,this.connector=G.I.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=c.$.getWalletImage(this.wallet)??c.$.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=Y.x.state.wcUri,this.error=Y.x.state.wcError,this.ready=!1,this.showRetry=!1,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(Y.x.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),Y.x.subscribeKey("wcError",e=>this.error=e)),(u.w.isTelegram()||u.w.isSafari())&&u.w.isIos()&&Y.x.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}
3099disconnectedCallback(){this.unsubscribe.forEach(e=>e()),Y.x.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,t=`Continue in ${this.name}`;return this.error&&(t="Connection declined"),(0,o.qy)` 3100 <wui-flex 3101 data-error=${(0,r.J)(this.error)} 3102 data-retry=${this.showRetry} 3103 flexDirection="column" 3104 alignItems="center" 3105 .padding=${["3xl","xl","xl","xl"]} 3106 gap="xl" 3107 > 3108 <wui-flex justifyContent="center" alignItems="center"> 3109 <wui-wallet-image size="lg" imageSrc=${(0,r.J)(this.imageSrc)}></wui-wallet-image> 3110 3111 ${this.error?null:this.loaderTemplate()} 3112 3113 <wui-icon-box 3114 backgroundColor="error-100" 3115 background="opaque" 3116 iconColor="error-100" 3117 icon="close" 3118 size="sm" 3119 border 3120 borderColor="wui-color-bg-125" 3121 ></wui-icon-box> 3122 </wui-flex> 3123 3124 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 3125 <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}> 3126 ${t} 3127 </wui-text> 3128 <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text> 3129 </wui-flex> 3130 3131 ${this.secondaryBtnLabel?(0,o.qy)` 3132 <wui-button 3133 variant="accent" 3134 size="md" 3135 ?disabled=${this.isRetrying||this.isLoading} 3136 @click=${this.onTryAgain.bind(this)} 3137 data-testid="w3m-connecting-widget-secondary-button" 3138 > 3139 <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon> 3140 ${this.secondaryBtnLabel} 3141 </wui-button> 3142 `:null} 3143 </wui-flex> 3144 3145 ${this.isWalletConnect?(0,o.qy)` 3146 <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center"> 3147 <wui-link @click=${this.onCopyUri} color="fg-200" data-testid="wui-link-copy"> 3148 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 3149 Copy link 3150 </wui-link> 3151 </wui-flex> 3152 `:null} 3153 3154 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 3155 `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){Y.x.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=iD.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,o.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(u.w.copyToClopboard(this.uri),K.P.showSuccess("Link copied"))}catch{K.P.showError("Failed to copy")}}}iV.styles=iH,i_([(0,a.wk)()],iV.prototype,"isRetrying",void 0),i_([(0,a.wk)()],iV.prototype,"uri",void 0),i_([(0,a.wk)()],iV.prototype,"error",void 0),i_([(0,a.wk)()],iV.prototype,"ready",void 0),i_([(0,a.wk)()],iV.prototype,"showRetry",void 0),i_([(0,a.wk)()],iV.prototype,"secondaryBtnLabel",void 0),i_([(0,a.wk)()],iV.prototype,"secondaryLabel",void 0),i_([(0,a.wk)()],iV.prototype,"isLoading",void 0),i_([(0,a.MZ)({type:Boolean})],iV.prototype,"isMobile",void 0),i_([(0,a.MZ)()],iV.prototype,"onRetry",void 0);let iJ=class extends iV{constructor(){if(super(),this.externalViewUnsubscribe=[],!this.connector)throw Error("w3m-connecting-view: No connector provided");j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1,this.externalViewUnsubscribe.push(s.W.subscribeKey("activeCaipAddress",e=>{e&&p.W.close()}))}disconnectedCallback(){this.externalViewUnsubscribe.forEach(e=>e())}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.id!==_.o.CONNECTOR_ID.COINBASE_SDK||!this.error)&&(await Y.x.
3155connectExternal(this.connector,this.connector.chain),j.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};iJ=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-connecting-external-view")],iJ);let iK=(0,o.AH)` 3156 wui-flex, 3157 wui-list-wallet { 3158 width: 100%; 3159 } 3160`;var iG=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iY=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.activeConnector=V.a.state.activeConnector,this.unsubscribe.push(V.a.subscribeKey("activeConnector",e=>this.activeConnector=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 3161 <wui-flex 3162 flexDirection="column" 3163 alignItems="center" 3164 .padding=${["m","xl","xl","xl"]} 3165 gap="xl" 3166 > 3167 <wui-flex justifyContent="center" alignItems="center"> 3168 <wui-wallet-image 3169 size="lg" 3170 imageSrc=${(0,r.J)(c.$.getConnectorImage(this.activeConnector))} 3171 ></wui-wallet-image> 3172 </wui-flex> 3173 <wui-flex 3174 flexDirection="column" 3175 alignItems="center" 3176 gap="xs" 3177 .padding=${["0","s","0","s"]} 3178 > 3179 <wui-text variant="paragraph-500" color="fg-100"> 3180 Select Chain for ${this.activeConnector?.name} 3181 </wui-text> 3182 <wui-text align="center" variant="small-500" color="fg-200" 3183 >Select which chain to connect to your multi chain wallet</wui-text 3184 > 3185 </wui-flex> 3186 <wui-flex 3187 flexGrow="1" 3188 flexDirection="column" 3189 alignItems="center" 3190 gap="xs" 3191 .padding=${["xs","0","xs","0"]} 3192 > 3193 ${this.networksTemplate()} 3194 </wui-flex> 3195 </wui-flex> 3196 `}networksTemplate(){return this.activeConnector?.connectors?.map(e=>e.name?o.qy` 3197 <wui-list-wallet 3198 imageSrc=${r.J(c.$.getChainImage(e.chain))} 3199 name=${_.o.CHAIN_NAME_MAP[e.chain]} 3200 @click=${()=>this.onConnector(e)} 3201 data-testid="wui-list-chain-${e.chain}" 3202 ></wui-list-wallet> 3203 `:null)}onConnector(e){let t=this.activeConnector?.connectors?.find(t=>t.chain===e.chain);if(!t){K.P.showError("Failed to find connector");return}"walletConnect"===t.id?u.w.isMobile()?G.I.push("AllWallets"):G.I.push("ConnectingWalletConnect"):G.I.push("ConnectingExternal",{connector:t})}};iY.styles=iK,iG([(0,a.wk)()],iY.prototype,"activeConnector",void 0),iY=iG([(0,h.EM)("w3m-connecting-multi-chain-view")],iY);var iX=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let iQ=class extends o.WF{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,o.qy)` 3204 <wui-flex justifyContent="center" .padding=${["0","0","l","0"]}> 3205 <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 3206 </wui-flex> 3207 `}generateTabs(){let e=this.platforms.map(e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:e})=>e),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};iX([(0,a.MZ)({type:Array})],iQ.prototype,"platforms",void 0),iX([(0,a.MZ)()],iQ.prototype,"onSelectPlatfrom",void 0),iQ=iX([(0,h.EM)("w3m-connecting-header")],iQ);let i0=class extends iV{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=V.a.state,t=e.find(e=>
3207"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await Y.x.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");p.W.close(),j.E.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};i0=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-connecting-wc-browser")],i0);let i1=class extends iV{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:i,href:o}=u.w.formatNativeUrl(e,this.uri);Y.x.setWcLinking({name:t,href:o}),Y.x.setRecentWallet(this.wallet),u.w.openHref(i,"_blank")}catch{this.error=!0}}};i1=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-connecting-wc-desktop")],i1);var i3=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let i5=class extends iV{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=n.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,link_mode:t,name:i}=this.wallet,{redirect:o,redirectUniversalLink:a,href:r}=u.w.formatNativeUrl(e,this.uri,t);this.redirectDeeplink=o,this.redirectUniversalLink=a,this.target=u.w.isIframe()?"_top":"_self",Y.x.setWcLinking({name:i,href:r}),Y.x.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?u.w.openHref(this.redirectUniversalLink,this.target):u.w.openHref(this.redirectDeeplink,this.target)}catch(e){j.E.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=J.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(Y.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){Y.x.setWcError(!1),this.onConnect?.()}};i3([(0,a.wk)()],i5.prototype,"redirectDeeplink",void 0),i3([(0,a.wk)()],i5.prototype,"redirectUniversalLink",void 0),i3([(0,a.wk)()],i5.prototype,"target",void 0),i3([(0,a.wk)()],i5.prototype,"preferUniversalLinks",void 0),i3([(0,a.wk)()],i5.prototype,"isLoading",void 0),i5=i3([(0,h.EM)("w3m-connecting-wc-mobile")],i5),i(68146
3207),i(19291);let i2=(0,o.AH)` 3208 @keyframes fadein { 3209 from { 3210 opacity: 0; 3211 } 3212 to { 3213 opacity: 1; 3214 } 3215 } 3216 3217 wui-shimmer { 3218 width: 100%; 3219 aspect-ratio: 1 / 1; 3220 border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; 3221 } 3222 3223 wui-qr-code { 3224 opacity: 0; 3225 animation-duration: 200ms; 3226 animation-timing-function: ease; 3227 animation-name: fadein; 3228 animation-fill-mode: forwards; 3229 } 3230`,i6=class extends iV{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),(0,o.qy)` 3231 <wui-flex 3232 flexDirection="column" 3233 alignItems="center" 3234 .padding=${["0","xl","xl","xl"]} 3235 gap="xl" 3236 > 3237 <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 3238 3239 <wui-text variant="paragraph-500" color="fg-100"> 3240 Scan this QR Code with your phone 3241 </wui-text> 3242 ${this.copyTemplate()} 3243 </wui-flex> 3244 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 3245 `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return Y.x.setWcLinking(void 0),Y.x.setRecentWallet(this.wallet),(0,o.qy)` <wui-qr-code 3246 size=${e} 3247 theme=${iD.W.state.themeMode} 3248 uri=${this.uri} 3249 imageSrc=${(0,r.J)(c.$.getWalletImage(this.wallet))} 3250 color=${(0,r.J)(iD.W.state.themeVariables["--w3m-qr-color"])} 3251 alt=${(0,r.J)(t)} 3252 data-testid="wui-qr-code" 3253 ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,o.qy)`<wui-link 3254 .disabled=${e} 3255 @click=${this.onCopyUri} 3256 color="fg-200" 3257 data-testid="copy-wc2-uri" 3258 > 3259 <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon> 3260 Copy link 3261 </wui-link>`}};i6.styles=i2,i6=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-connecting-wc-qrcode")],i6);let i4=class extends o.WF{constructor(){if(super(),this.wallet=G.I.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return(0,o.qy)` 3262 <wui-flex 3263 flexDirection="column" 3264 alignItems="center" 3265 .padding=${["3xl","xl","xl","xl"]} 3266 gap="xl" 3267 > 3268 <wui-wallet-image 3269 size="lg" 3270 imageSrc=${(0,r.J)(c.$.getWalletImage(this.wallet))} 3271 ></wui-wallet-image> 3272 3273 <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text> 3274 </wui-flex> 3275 3276 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 3277 `}};i4=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-connecting-wc-unsupported")],i4);var i8=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let i7=class extends iV{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=J.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(Y.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),j.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:i,href:o}=u.w.formatUniversalUrl(e,this.uri);Y.x.setWcLinking({name:t,href:o}),Y.x.setRecentWallet(this.wallet),u.w.openHref(i,"_blank")}catch{this.error=!0}}};i8([(0,a.wk)()],i7.prototype,"isLoading",void 0),i7=i8([(0,h.EM)("w3m-connecting-wc-web")],i7);var i9=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oe=class extends o.WF{constructor(){super(),this.wallet=G.I.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!n.H.state.siwx,this.remoteFeatures=n.H.state.remoteFeatures,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}
3277disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 3278 ${this.headerTemplate()} 3279 <div>${this.platformTemplate()}</div> 3280 ${this.reownBrandingTemplate()} 3281 `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,o.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!n.H.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:i}=Y.x.state;(e||n.H.state.enableEmbedded||u.w.isPairingExpired(t)||"connecting"===i)&&(await Y.x.connectWalletConnect(),this.isSiwxEnabled||p.W.close())}catch(e){j.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),Y.x.setWcError(!0),K.P.showError(e.message??"Connection error"),Y.x.resetWcConnection(),G.I.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:i,injected:o,rdns:a}=this.wallet,r=o?.map(({injected_id:e})=>
3281e).filter(Boolean),l=[...a?[a]:r??[]],c=!n.H.state.isUniversalProvider&&l.length,d=Y.x.checkInstalled(l),p=c&&d,h=t&&!u.w.isMobile();p&&!s.W.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(u.w.isMobile()?"mobile":"qrcode"),i&&this.platforms.push("web"),h&&this.platforms.push("desktop"),p||!c||s.W.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,o.qy)`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"web":return(0,o.qy)`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case"desktop":return(0,o.qy)` 3282 <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}> 3283 </w3m-connecting-wc-desktop> 3284 `;case"mobile":return(0,o.qy)` 3285 <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}> 3286 </w3m-connecting-wc-mobile> 3287 `;case"qrcode":return(0,o.qy)`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return(0,o.qy)`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?(0,o.qy)` 3288 <w3m-connecting-header 3289 .platforms=${this.platforms} 3290 .onSelectPlatfrom=${this.onSelectPlatform.bind(this)} 3291 > 3292 </w3m-connecting-header> 3293 `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};i9([(0,a.wk)()],oe.prototype,"platform",void 0),i9([(0,a.wk)()],oe.prototype,"platforms",void 0),i9([(0,a.wk)()],oe.prototype,"isSiwxEnabled",void 0),i9([(0,a.wk)()],oe.prototype,"remoteFeatures",void 0),oe=i9([(0,h.EM)("w3m-connecting-wc-view")],oe);var ot=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oi=class extends o.WF{constructor(){super(...arguments),this.isMobile=u.w.isMobile()}render(){if(this.isMobile){let{featured:e,recommended:t}=t$.N.state,{customWallets:i}=n.H.state,a=eo.i.getRecentWallets(),r=e.length||t.length||i?.length||a.length;return(0,o.qy)`<wui-flex 3294 flexDirection="column" 3295 gap="xs" 3296 .margin=${["3xs","s","s","s"]} 3297 > 3298 ${r?(0,o.qy)`<w3m-connector-list></w3m-connector-list>`:null} 3299 <w3m-all-wallets-widget></w3m-all-wallets-widget> 3300 </wui-flex>`}return(0,o.qy)`<wui-flex flexDirection="column" .padding=${["0","0","l","0"]}> 3301 <w3m-connecting-wc-view></w3m-connecting-wc-view> 3302 <wui-flex flexDirection="column" .padding=${["0","m","0","m"]}> 3303 <w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex 3304 ></wui-flex>`}};ot([(0,a.wk)()],oi.prototype,"isMobile",void 0),oi=ot([(0,h.EM)("w3m-connecting-wc-basic-view")],oi);var oo=i(23104);let oa=(0,o.AH)` 3305 .continue-button-container { 3306 width: 100%; 3307 } 3308`;var or=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let on=class extends o.WF{constructor(){super(...arguments),this.loading=!1}render(){return(0,o.qy)` 3309 <wui-flex 3310 flexDirection="column" 3311 alignItems="center" 3312 gap="xxl" 3313 .padding=${["0","0","l","0"]} 3314 > 3315 ${this.onboardingTemplate()} ${this.buttonsTemplate()} 3316 <wui-link 3317 @click=${()=>{u.w.openHref(oo.T.URLS.FAQ,"_blank")}} 3318 > 3319 Learn more about names 3320 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 3321 </wui-link> 3322 </wui-flex> 3323 `}onboardingTemplate(){return(0,o.qy)` <wui-flex 3324 flexDirection="column" 3325 gap="xxl" 3326 alignItems="center" 3327 .padding=${["0","xxl","0","xxl"]} 3328 > 3329 <wui-flex gap="s" alignItems="center" justifyContent="center"> 3330 <wui-icon-box 3331 icon="id" 3332 size="xl" 3333 iconSize="xxl" 3334 iconColor="fg-200" 3335 backgroundColor="fg-200" 3336 ></wui-icon-box> 3337 </wui-flex> 3338 <wui-flex flexDirection="column" alignItems="center" gap="s"> 3339 <wui-text align="center" variant="medium-600" color="fg-100"> 3340 Choose your account name 3341 </wui-text> 3342 <wui-text align="center" variant="paragraph-400" color="fg-100"> 3343 Finally say goodbye to 0x addresses, name your account to make it easier to exchange 3344 assets 3345 </wui-text> 3346 </wui-flex> 3347 </wui-flex>`}buttonsTemplate(){return(0,o.qy)`<wui-flex 3348 .padding=${["0","2l","0","2l"]} 3349 gap="s" 3350 class="continue-button-container" 3351 > 3352 <wui-button 3353 fullWidth 3354 .loading=${this.loading} 3355 size="lg" 3356 borderRadius="xs" 3357 @click=${this.handleContinue.bind(this)} 3358 >Choose name 3359 </wui-button>
3359 3360 </wui-flex>`}handleContinue(){let e=s.W.state.activeChain;G.I.push("RegisterAccountName"),j.E.sendEvent({type:"track",event:"OPEN_ENS_FLOW",properties:{isSmartAccount:d.U.state.preferredAccountTypes?.[e]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}})}};on.styles=oa,or([(0,a.wk)()],on.prototype,"loading",void 0),on=or([(0,h.EM)("w3m-choose-account-name-view")],on);let os=class extends o.WF{constructor(){super(...arguments),this.wallet=G.I.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,o.qy)` 3361 <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}> 3362 ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} 3363 ${this.homepageTemplate()} 3364 </wui-flex> 3365 `}chromeTemplate(){return this.wallet?.chrome_store?(0,o.qy)`<wui-list-item 3366 variant="icon" 3367 icon="chromeStore" 3368 iconVariant="square" 3369 @click=${this.onChromeStore.bind(this)} 3370 chevron 3371 > 3372 <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text> 3373 </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?(0,o.qy)`<wui-list-item 3374 variant="icon" 3375 icon="appStore" 3376 iconVariant="square" 3377 @click=${this.onAppStore.bind(this)} 3378 chevron 3379 > 3380 <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text> 3381 </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?(0,o.qy)`<wui-list-item 3382 variant="icon" 3383 icon="playStore" 3384 iconVariant="square" 3385 @click=${this.onPlayStore.bind(this)} 3386 chevron 3387 > 3388 <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text> 3389 </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?(0,o.qy)` 3390 <wui-list-item 3391 variant="icon" 3392 icon="browser" 3393 iconVariant="square-blue" 3394 @click=${this.onHomePage.bind(this)} 3395 chevron 3396 > 3397 <wui-text variant="paragraph-500" color="fg-100">Website</wui-text> 3398 </wui-list-item> 3399 `:null}onChromeStore(){this.wallet?.chrome_store&&u.w.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){this.wallet?.app_store&&u.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&u.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&u.w.openHref(this.wallet.homepage,"_blank")}};os=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-downloads-view")],os);let ol=class extends o.WF{render(){return(0,o.qy)` 3400 <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs"> 3401 ${this.recommendedWalletsTemplate()} 3402 <wui-list-wallet 3403 name="Explore all" 3404 showAllWallets 3405 walletIcon="allWallets" 3406 icon="externalLink" 3407 @click=${()=>{u.w.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} 3408 ></wui-list-wallet> 3409 </wui-flex> 3410 `}recommendedWalletsTemplate(){let{recommended:e,featured:t}=t$.N.state,{customWallets:i}=n.H.state;return[...t,...i??[],...e].slice(0,4).map(e=>(0,o.qy)` 3411 <wui-list-wallet 3412 name=${e.name??"Unknown"} 3413 tagVariant="main" 3414 imageSrc=${(0,r.J)(c.$.getWalletImage(e))} 3415 @click=${()=>{u.w.openHref(e.homepage??"https://walletconnect.com/explorer","_blank")}} 3416 ></wui-list-wallet> 3417 `)}};ol=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-get-wallet-view")],ol),i(97363);var oc=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let od=class extends o.WF{constructor(){super(...arguments),this.data=[]}render(){return(0,o.qy)` 3418 <wui-flex flexDirection="column" alignItems="center" gap="l"> 3419 ${this.data.map(e=>(0,o.qy)` 3420 <wui-flex flexDirection="column" alignItems="center" gap="xl"> 3421 <wui-flex flexDirection="row" justifyContent="center" gap="1xs"> 3422 ${e.images.map(e=>(0,o.qy)`<wui-visual name=${e}></wui-visual>`)} 3423 </wui-flex> 3424 </wui-flex> 3425 <wui-flex flexDirection="column" alignItems="center" gap="xxs"> 3426 <wui-text variant="paragraph-500" color="fg-100" align="center"> 3427 ${e.title} 3428 </wui-text> 3429 <wui-text variant="small-500" color="fg-200" align="center">${e.text}</wui-text> 3430 </wui-flex> 3431 `)} 3432 </wui-flex> 3433 `}};oc([(0,a.MZ)({type:Array})],od.prototype,"data",void 0),od=oc([(0,h.EM)("w3m-help-widget")],od);let ou=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}],op=class extends o.WF{render(){return(0,o.qy)` 3434 <wui-flex 3435 flexDirection="column" 3436 .padding=${["xxl","xl","xl","xl"]} 3437 alignItems="center" 3438 gap="xl" 3439 > 3440 <w3m-help-widget .data=${ou}></w3m-help-widget> 3441 <wui-button variant="main" size="md" @click=${this.onGetWallet.bind(this)}> 3442 <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon> 3443 Get a wallet 3444 </wui-button>
3444 3445 </wui-flex> 3446 `}onGetWallet(){j.E.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),G.I.push("GetWallet")}};op=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-what-is-a-wallet-view")],op);let oh=(0,o.AH)` 3447 wui-flex { 3448 max-height: clamp(360px, 540px, 80vh); 3449 overflow: scroll; 3450 scrollbar-width: none; 3451 transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); 3452 will-change: opacity; 3453 } 3454 wui-flex::-webkit-scrollbar { 3455 display: none; 3456 } 3457 wui-flex.disabled { 3458 opacity: 0.3; 3459 pointer-events: none; 3460 user-select: none; 3461 } 3462`;var ow=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let og=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.checked=t_.o.state.isLegalCheckboxChecked,this.unsubscribe.push(t_.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=n.H.state,i=n.H.state.features?.legalCheckbox,a=!!(e||t)&&!!i,s=a&&!this.checked;return(0,o.qy)` 3463 <w3m-legal-checkbox></w3m-legal-checkbox> 3464 <wui-flex 3465 flexDirection="column" 3466 .padding=${a?["0","s","s","s"]:"s"} 3467 gap="xs" 3468 class=${(0,r.J)(s?"disabled":void 0)} 3469 > 3470 <w3m-wallet-login-list tabIdx=${(0,r.J)(s?-1:void 0)}></w3m-wallet-login-list> 3471 </wui-flex> 3472 <w3m-legal-footer></w3m-legal-footer> 3473 `}};og.styles=oh,ow([(0,a.wk)()],og.prototype,"checked",void 0),og=ow([(0,h.EM)("w3m-connect-wallets-view")],og);let ob=(0,o.AH)` 3474 :host { 3475 display: block; 3476 width: var(--wui-box-size-lg); 3477 height: var(--wui-box-size-lg); 3478 } 3479 3480 svg { 3481 width: var(--wui-box-size-lg); 3482 height: var(--wui-box-size-lg); 3483 fill: none; 3484 stroke: transparent; 3485 stroke-linecap: round; 3486 } 3487 3488 use { 3489 stroke: var(--wui-color-accent-100); 3490 stroke-width: 2px; 3491 stroke-dasharray: 54, 118; 3492 stroke-dashoffset: 172; 3493 animation: dash 1s linear infinite; 3494 } 3495 3496 @keyframes dash { 3497 to { 3498 stroke-dashoffset: 0px; 3499 } 3500 } 3501`,of=class extends o.WF{render(){return(0,o.qy)` 3502 <svg viewBox="0 0 54 59"> 3503 <path 3504 id="wui-loader-path" 3505 d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z" 3506 /> 3507 <use xlink:href="#wui-loader-path"></use> 3508 </svg> 3509 `}};of.styles=[w.W5,ob],of=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,b.E)("wui-loading-hexagon")],of),i(61856);let om=(0,o.AH)` 3510 @keyframes shake { 3511 0% { 3512 transform: translateX(0); 3513 } 3514 25% { 3515 transform: translateX(3px); 3516 } 3517 50% { 3518 transform: translateX(-3px); 3519 } 3520 75% { 3521 transform: translateX(3px); 3522 } 3523 100% { 3524 transform: translateX(0); 3525 } 3526 } 3527 3528 wui-flex:first-child:not(:only-child) { 3529 position: relative; 3530 } 3531 3532 wui-loading-hexagon { 3533 position: absolute; 3534 } 3535 3536 wui-icon-box { 3537 position: absolute; 3538 right: 4px; 3539 bottom: 0; 3540 opacity: 0; 3541 transform: scale(0.5); 3542 z-index: 1; 3543 } 3544 3545 wui-button { 3546 display: none; 3547 } 3548 3549 [data-error='true'] wui-icon-box { 3550 opacity: 1; 3551 transform: scale(1); 3552 } 3553 3554 [data-error='true'] > wui-flex:first-child { 3555 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 3556 } 3557 3558 wui-button[data-retry='true'] { 3559 display: block; 3560 opacity: 1; 3561 } 3562`;var ov=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oy=class extends o.WF{constructor(){super(),this.network=G.I.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}
3562disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw Error("w3m-network-switch-view: No network provided");this.onShowRetry();let e=this.getLabel(),t=this.getSubLabel();return(0,o.qy)` 3563 <wui-flex 3564 data-error=${this.error} 3565 flexDirection="column" 3566 alignItems="center" 3567 .padding=${["3xl","xl","3xl","xl"]} 3568 gap="xl" 3569 > 3570 <wui-flex justifyContent="center" alignItems="center"> 3571 <wui-network-image 3572 size="lg" 3573 imageSrc=${(0,r.J)(c.$.getNetworkImage(this.network))} 3574 ></wui-network-image> 3575 3576 ${this.error?null:(0,o.qy)`<wui-loading-hexagon></wui-loading-hexagon>`} 3577 3578 <wui-icon-box 3579 backgroundColor="error-100" 3580 background="opaque" 3581 iconColor="error-100" 3582 icon="close" 3583 size="sm" 3584 ?border=${!0} 3585 borderColor="wui-color-bg-125" 3586 ></wui-icon-box> 3587 </wui-flex> 3588 3589 <wui-flex flexDirection="column" alignItems="center" gap="xs"> 3590 <wui-text align="center" variant="paragraph-500" color="fg-100">${e}</wui-text> 3591 <wui-text align="center" variant="small-500" color="fg-200">${t}</wui-text> 3592 </wui-flex> 3593 3594 <wui-button 3595 data-retry=${this.showRetry} 3596 variant="accent" 3597 size="md" 3598 .disabled=${!this.error} 3599 @click=${this.onSwitchNetwork.bind(this)} 3600 > 3601 <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon> 3602 Try again 3603 </wui-button> 3604 </wui-flex> 3605 `}getSubLabel(){let e=s.W.state.activeChain,t=V.a.getConnectorId(e);return V.a.getAuthConnector()&&t===_.o.CONNECTOR_ID.AUTH?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){let e=s.W.state.activeChain,t=V.a.getConnectorId(e);return V.a.getAuthConnector()&&t===_.o.CONNECTOR_ID.AUTH?`Switching to ${this.network?.name??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onSwitchNetwork(){try{this.error=!1,s.W.state.activeChain!==this.network?.chainNamespace&&s.W.setIsSwitchingNamespace(!0),this.network&&s.W.switchActiveNetwork(this.network)}catch(e){this.error=!0}}};oy.styles=om,ov([(0,a.wk)()],oy.prototype,"showRetry",void 0),ov([(0,a.wk)()],oy.prototype,"error",void 0),oy=ov([(0,h.EM)("w3m-network-switch-view")],oy);var ox=i(62580);i(98082),i(83081);let ok=(0,o.AH)` 3606 button { 3607 column-gap: var(--wui-spacing-s); 3608 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 3609 width: 100%; 3610 transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); 3611 border-radius: var(--wui-border-radius-xs); 3612 color: var(--wui-color-fg-100); 3613 } 3614 3615 button > wui-text:nth-child(2) { 3616 display: flex; 3617 flex: 1; 3618 } 3619 3620 button[data-transparent='true'] { 3621 pointer-events: none; 3622 background-color: transparent; 3623 } 3624 3625 button:hover { 3626 background-color: var(--wui-color-gray-glass-002); 3627 } 3628 3629 button:active { 3630 background-color: var(--wui-color-gray-glass-005); 3631 } 3632 3633 wui-image { 3634 width: var(--wui-spacing-3xl); 3635 height: var(--wui-spacing-3xl); 3636 border-radius: 100%; 3637 } 3638 3639 button:disabled { 3640 background-color: var(--wui-color-gray-glass-002); 3641 opacity: 0.5; 3642 cursor: not-allowed; 3643 } 3644 3645 button:disabled > wui-tag { 3646 background-color: var(--wui-color-gray-glass-010); 3647 color: var(--wui-color-fg-300); 3648 } 3649`;var oC=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let o$=class extends o.WF{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.selected=!1,this.transparent=!1}render(){return(0,o.qy)` 3650 <button data-transparent=${this.transparent} ?disabled=${this.disabled}> 3651 <wui-flex gap="s" alignItems="center"> 3652 ${this.templateNetworkImage()} 3653 <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text></wui-flex 3654 > 3655 ${this.checkmarkTemplate()} 3656 </button> 3657 `}checkmarkTemplate(){return this.selected?(0,o.qy)`<wui-icon size="sm" color="accent-100" name="checkmarkBold"></wui-icon>`:null}templateNetworkImage(){return this.imageSrc?(0,o.qy)`<wui-image size="sm" src=${this.imageSrc} name=${this.name}></wui-image>`:this.imageSrc?null:(0,o.qy)`<wui-network-image 3658 ?round=${!0} 3659 size="md" 3660 name=${this.name} 3661 ></wui-network-image>`}};o$.styles=[w.W5,w.fD,ok],oC([(0,a.MZ)()],o$.prototype,"imageSrc",void 0),oC([(0,a.MZ)()],o$.prototype,"name",void 0),oC([(0,a.MZ)({type:Boolean})],o$.prototype,"disabled",void 0),oC([(0,a.MZ)({type:Boolean})],o$.prototype,"selected",void 0),oC([(0,a.MZ)({type:Boolean})],o$.prototype,"transparent",void 0),o$=oC([(0,b.E)("wui-list-network")],o$);let oS=(0,o.AH)` 3662 .container { 3663 max-height: 360px; 3664 overflow: auto; 3665 } 3666 3667 .container::-webkit-scrollbar {
3668 display: none; 3669 } 3670`;var oI=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oA=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.network=s.W.state.activeCaipNetwork,this.requestedCaipNetworks=s.W.getCaipNetworks(),this.search="",this.onDebouncedSearch=u.w.debounce(e=>{this.search=e},100),this.unsubscribe.push(l.j.subscribeNetworkImages(()=>this.requestUpdate()),s.W.subscribeKey("activeCaipNetwork",e=>this.network=e),s.W.subscribe(()=>{this.requestedCaipNetworks=s.W.getAllRequestedCaipNetworks()}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 3671 ${this.templateSearchInput()} 3672 <wui-flex 3673 class="container" 3674 .padding=${["0","s","s","s"]} 3675 flexDirection="column" 3676 gap="xs" 3677 > 3678 ${this.networksTemplate()} 3679 </wui-flex> 3680 3681 <wui-separator></wui-separator> 3682 3683 <wui-flex padding="s" flexDirection="column" gap="m" alignItems="center"> 3684 <wui-text variant="small-400" color="fg-300" align="center"> 3685 Your connected wallet may not support some of the networks available for this dApp 3686 </wui-text> 3687 <wui-link @click=${this.onNetworkHelp.bind(this)}> 3688 <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon> 3689 What is a network 3690 </wui-link> 3691 </wui-flex> 3692 `}templateSearchInput(){return(0,o.qy)` 3693 <wui-flex gap="xs" .padding=${["0","s","s","s"]}> 3694 <wui-input-text 3695 @inputChange=${this.onInputChange.bind(this)} 3696 class="network-search-input" 3697 size="md" 3698 placeholder="Search network" 3699 icon="search" 3700 ></wui-input-text> 3701 </wui-flex> 3702 `}onInputChange(e){this.onDebouncedSearch(e.detail)}onNetworkHelp(){j.E.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),G.I.push("WhatIsANetwork")}networksTemplate(){let e=s.W.getAllApprovedCaipNetworkIds(),t=u.w.sortRequestedNetworks(e,this.requestedCaipNetworks);return this.search?this.filteredNetworks=t?.filter(e=>e?.name?.toLowerCase().includes(this.search.toLowerCase())):this.filteredNetworks=t,this.filteredNetworks?.map(e=>o.qy` 3703 <wui-list-network 3704 .selected=${this.network?.id===e.id} 3705 imageSrc=${r.J(c.$.getNetworkImage(e))} 3706 type="network" 3707 name=${e.name??e.id} 3708 @click=${()=>this.onSwitchNetwork(e)} 3709 .disabled=${this.getNetworkDisabled(e)} 3710 data-testid=${`w3m-network-switch-${e.name??e.id}`} 3711 ></wui-list-network> 3712 `)}getNetworkDisabled(e){let t=e.chainNamespace,i=d.U.getCaipAddress(t),o=s.W.getAllApprovedCaipNetworkIds(),a=!1!==s.W.getNetworkProp("supportsAllNetworks",t),r=V.a.getConnectorId(t),n=V.a.getAuthConnector(),l=r===_.o.CONNECTOR_ID.AUTH&&n;return!!i&&!a&&!l&&!o?.includes(e.caipNetworkId)}onSwitchNetwork(e){ox.L.onSwitchNetwork({network:e})}};oA.styles=oS,oI([(0,a.wk)()],oA.prototype,"network",void 0),oI([(0,a.wk)()],oA.prototype,"requestedCaipNetworks",void 0),oI([(0,a.wk)()],oA.prototype,"filteredNetworks",void 0),oI([(0,a.wk)()],oA.prototype,"search",void 0),oA=oI([(0,h.EM)("w3m-networks-view")],oA);let oE=(0,o.AH)` 3713 @keyframes shake { 3714 0% { 3715 transform: translateX(0); 3716 } 3717 25% { 3718 transform: translateX(3px); 3719 } 3720 50% { 3721 transform: translateX(-3px); 3722 } 3723 75% { 3724 transform: translateX(3px); 3725 } 3726 100% { 3727 transform: translateX(0); 3728 } 3729 } 3730 3731 wui-flex:first-child:not(:only-child) { 3732 position: relative; 3733 } 3734 3735 wui-loading-thumbnail { 3736 position: absolute; 3737 } 3738 3739 wui-visual { 3740 width: var(--wui-wallet-image-size-lg); 3741 height: var(--wui-wallet-image-size-lg); 3742 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 3743 position: relative; 3744 overflow: hidden; 3745 } 3746 3747 wui-visual::after { 3748 content: ''; 3749 display: block; 3750 width: 100%; 3751 height: 100%; 3752 position: absolute; 3753 inset: 0; 3754 border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); 3755 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 3756 } 3757 3758 wui-icon-box { 3759 position: absolute; 3760 right: calc(var(--wui-spacing-3xs) * -1); 3761 bottom: calc(var(--wui-spacing-3xs) * -1); 3762 opacity: 0; 3763 transform: scale(0.5); 3764 transition: 3765 opacity var(--wui-ease-out-power-2) var(--wui-duration-lg), 3766 transform var(--wui-ease-out-power-2) var(--wui-duration-lg); 3767 will-change: opacity, transform; 3768 } 3769 3770 wui-text[align='center'] { 3771 width: 100%; 3772 padding: 0px var(--wui-spacing-l); 3773 } 3774 3775 [data-error='true'] wui-icon-box { 3776 opacity: 1; 3777 transform: scale(1); 3778 } 3779 3780 [data-error='true'] > wui-flex:first-child { 3781 animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 3782 } 3783 3784 [data-retry='false'] wui-link { 3785 display: none; 3786 } 3787 3788 [data-retry='true'] wui-link { 3789 display: block; 3790 opacity: 1; 3791 } 3792 3793 wui-link { 3794 padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); 3795 } 3796 3797 .capitalize { 3798 text-transform: capitalize; 3799 } 3800`;var oT=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oR={eip155:"eth",solana:"solana",bip122:"bitcoin",polkadot:void 0},oW=class extends o.WF{constructor(){super(...arguments),this.unsubscribe=[],this.switchToChain=G.I.state.data?.switchToChain,this.caipNetwork=G.I.state.data?.network,this.activeChain=s.W.state.activeChain}firstUpdated(){this.unsubscribe.push(s.W.subscribeKey("activeChain",e=>this.activeChain=e))}
3800disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.switchToChain?_.o.CHAIN_NAME_MAP[this.switchToChain]:"supported";if(!this.switchToChain)return null;let t=_.o.CHAIN_NAME_MAP[this.switchToChain];return(0,o.qy)` 3801 <wui-flex 3802 flexDirection="column" 3803 alignItems="center" 3804 .padding=${["3xl","xl","xl","xl"]} 3805 gap="xl" 3806 > 3807 <wui-flex justifyContent="center" flexDirection="column" alignItems="center" gap="xl"> 3808 <wui-visual name=${(0,r.J)(oR[this.switchToChain])}></wui-visual> 3809 <wui-text 3810 data-testid=${`w3m-switch-active-chain-to-${t}`} 3811 variant="paragraph-500" 3812 color="fg-100" 3813 align="center" 3814 >Switch to <span class="capitalize">${t}</span></wui-text 3815 > 3816 <wui-text variant="small-400" color="fg-200" align="center"> 3817 Connected wallet doesn't support connecting to ${e} chain. You 3818 need to connect with a different wallet. 3819 </wui-text> 3820 <wui-button 3821 data-testid="w3m-switch-active-chain-button" 3822 size="md" 3823 @click=${this.switchActiveChain.bind(this)} 3824 >Switch</wui-button 3825 > 3826 </wui-flex> 3827 </wui-flex> 3828 `}async switchActiveChain(){this.switchToChain&&(s.W.setIsSwitchingNamespace(!0),V.a.setFilterByNamespace(this.switchToChain),this.caipNetwork?await s.W.switchActiveNetwork(this.caipNetwork):s.W.setActiveNamespace(this.switchToChain),G.I.reset("Connect"))}};oW.styles=oE,oT([(0,a.MZ)()],oW.prototype,"activeChain",void 0),oW=oT([(0,h.EM)("w3m-switch-active-chain-view")],oW);let oO=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}],oN=class extends o.WF{render(){return(0,o.qy)` 3829 <wui-flex 3830 flexDirection="column" 3831 .padding=${["xxl","xl","xl","xl"]} 3832 alignItems="center" 3833 gap="xl" 3834 > 3835 <w3m-help-widget .data=${oO}></w3m-help-widget> 3836 <wui-button 3837 variant="main" 3838 size="md" 3839 @click=${()=>{u.w.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} 3840 > 3841 Learn more 3842 <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon> 3843 </wui-button> 3844 </wui-flex> 3845 `}};oN=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-what-is-a-network-view")],oN);let oM=(0,o.AH)` 3846 :host > wui-flex { 3847 max-height: clamp(360px, 540px, 80vh); 3848 overflow: scroll; 3849 scrollbar-width: none; 3850 } 3851 3852 :host > wui-flex::-webkit-scrollbar {
3853 display: none; 3854 } 3855`;var oP=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oj=class extends o.WF{constructor(){super(),this.swapUnsupportedChain=G.I.state.data?.swapUnsupportedChain,this.unsubscribe=[],this.disconecting=!1,this.unsubscribe.push(l.j.subscribeNetworkImages(()=>this.requestUpdate()))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` 3856 <wui-flex class="container" flexDirection="column" gap="0"> 3857 <wui-flex 3858 class="container" 3859 flexDirection="column" 3860 .padding=${["m","xl","xs","xl"]} 3861 alignItems="center" 3862 gap="xl" 3863 > 3864 ${this.descriptionTemplate()} 3865 </wui-flex> 3866 3867 <wui-flex flexDirection="column" padding="s" gap="xs"> 3868 ${this.networksTemplate()} 3869 </wui-flex> 3870 3871 <wui-separator text="or"></wui-separator> 3872 <wui-flex flexDirection="column" padding="s" gap="xs"> 3873 <wui-list-item 3874 variant="icon" 3875 iconVariant="overlay" 3876 icon="disconnect" 3877 ?chevron=${!1} 3878 .loading=${this.disconecting} 3879 @click=${this.onDisconnect.bind(this)} 3880 data-testid="disconnect-button" 3881 > 3882 <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text> 3883 </wui-list-item> 3884 </wui-flex> 3885 </wui-flex> 3886 `}descriptionTemplate(){return this.swapUnsupportedChain?(0,o.qy)` 3887 <wui-text variant="small-400" color="fg-200" align="center"> 3888 The swap feature doesn’t support your current network. Switch to an available option to 3889 continue. 3890 </wui-text> 3891 `:(0,o.qy)` 3892 <wui-text variant="small-400" color="fg-200" align="center"> 3893 This app doesn’t support your current network. Switch to an available option to continue. 3894 </wui-text> 3895 `}networksTemplate(){let e=s.W.getAllRequestedCaipNetworks(),t=s.W.getAllApprovedCaipNetworkIds(),i=u.w.sortRequestedNetworks(t,e);return(this.swapUnsupportedChain?i.filter(e=>J.oU.SWAP_SUPPORTED_NETWORKS.includes(e.caipNetworkId)):i).map(e=>(0,o.qy)` 3896 <wui-list-network 3897 imageSrc=${(0,r.J)(c.$.getNetworkImage(e))} 3898 name=${e.name??"Unknown"} 3899 @click=${()=>this.onSwitchNetwork(e)} 3900 > 3901 </wui-list-network> 3902 `)}async onDisconnect(){try{this.disconecting=!0,await Y.x.disconnect(),p.W.close()}catch{j.E.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),K.P.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){let t=d.U.state.caipAddress,i=s.W.getAllApprovedCaipNetworkIds(),o=(s.W.getNetworkProp("supportsAllNetworks",e.chainNamespace),G.I.state.data);t?i?.includes(e.caipNetworkId)?await s.W.switchActiveNetwork(e):G.I.push("SwitchNetwork",{...o,network:e}):t||(s.W.setActiveCaipNetwork(e),G.I.push("Connect"))}};oj.styles=oM,oP([(0,a.wk)()],oj.prototype,"disconecting",void 0),oj=oP([(0,h.EM)("w3m-unsupported-chain-view")],oj);let oq=(0,o.AH)` 3903 wui-flex { 3904 width: 100%; 3905 background-color: var(--wui-color-gray-glass-005); 3906 border-radius: var(--wui-border-radius-s); 3907 padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) 3908 var(--wui-spacing-1xs); 3909 } 3910`;var oD=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oU=class extends o.WF{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return(0,o.qy)` 3911 <wui-flex gap="1xs" alignItems="center"> 3912 <wui-icon-box 3913 size="sm" 3914 iconcolor="fg-200" 3915 backgroundcolor="fg-200" 3916 icon=${this.icon} 3917 background="transparent" 3918 ></wui-icon-box> 3919 <wui-text variant="small-400" color="fg-200">${this.text}</wui-text> 3920 </wui-flex> 3921 `}};oU.styles=[w.W5,w.fD,oq],oD([(0,a.MZ)()],oU.prototype,"icon",void 0),oD([(0,a.MZ)()],oU.prototype,"text",void 0),oU=oD([(0,b.E)("wui-banner")],oU);let oL=(0,o.AH)` 3922 :host > wui-flex { 3923 max-height: clamp(360px, 540px, 80vh); 3924 overflow: scroll; 3925 scrollbar-width: none; 3926 } 3927 3928 :host > wui-flex::-webkit-scrollbar {
3929 display: none; 3930 } 3931`;var oz=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oZ=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.preferredAccountTypes=d.U.state.preferredAccountTypes,this.unsubscribe.push(d.U.subscribeKey("preferredAccountTypes",e=>{this.preferredAccountTypes=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.qy)` <wui-flex 3932 flexDirection="column" 3933 .padding=${["xs","s","m","s"]} 3934 gap="xs" 3935 > 3936 <wui-banner 3937 icon="warningCircle" 3938 text="You can only receive assets on these networks" 3939 ></wui-banner> 3940 ${this.networkTemplate()} 3941 </wui-flex>`}networkTemplate(){let e=s.W.getAllRequestedCaipNetworks(),t=s.W.getAllApprovedCaipNetworkIds(),i=s.W.state.activeCaipNetwork,a=s.W.checkIfSmartAccountEnabled(),n=u.w.sortRequestedNetworks(t,e);if(a&&this.preferredAccountTypes?.[i?.chainNamespace]===ei.Vl.ACCOUNT_TYPES.SMART_ACCOUNT){if(!i)return null;n=[i]}return n.filter(e=>e.chainNamespace===i?.chainNamespace).map(e=>(0,o.qy)` 3942 <wui-list-network 3943 imageSrc=${(0,r.J)(c.$.getNetworkImage(e))} 3944 name=${e.name??"Unknown"} 3945 ?transparent=${!0} 3946 > 3947 </wui-list-network> 3948 `)}};oZ.styles=oL,oz([(0,a.wk)()],oZ.prototype,"preferredAccountTypes",void 0),oZ=oz([(0,h.EM)("w3m-wallet-compatible-networks-view")],oZ);var oB=i(69737);let oF=(0,o.AH)` 3949 :host { 3950 display: flex; 3951 justify-content: center; 3952 align-items: center; 3953 width: var(--wui-icon-box-size-xl); 3954 height: var(--wui-icon-box-size-xl); 3955 box-shadow: 0 0 0 8px var(--wui-thumbnail-border); 3956 border-radius: var(--local-border-radius); 3957 overflow: hidden; 3958 } 3959 3960 wui-icon { 3961 width: 32px; 3962 height: 32px; 3963 } 3964`;var oH=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let o_=class extends o.WF{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"}; background-color: var(--wui-color-modal-bg);`,(0,o.qy)`${this.templateVisual()}`}templateVisual(){return this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:(0,o.qy)`<wui-icon 3965 data-parent-size="md" 3966 size="inherit" 3967 color="inherit" 3968 name="walletPlaceholder" 3969 ></wui-icon>`}};o_.styles=[w.W5,oF],oH([(0,a.MZ)()],o_.prototype,"imageSrc",void 0),oH([(0,a.MZ)()],o_.prototype,"alt",void 0),oH([(0,a.MZ)({type:Boolean})],o_.prototype,"borderRadiusFull",void 0),o_=oH([(0,b.E)("wui-visual-thumbnail")],o_);let oV=(0,o.AH)` 3970 :host { 3971 display: flex; 3972 justify-content: center; 3973 gap: var(--wui-spacing-2xl); 3974 } 3975 3976 wui-visual-thumbnail:nth-child(1) { 3977 z-index: 1; 3978 } 3979`,oJ=class extends o.WF{constructor(){super(...arguments),this.dappImageUrl=n.H.state.metadata?.icons,this.walletImageUrl=d.U.state.connectedWalletInfo?.icon}firstUpdated(){let e=this.shadowRoot?.querySelectorAll("wui-visual-thumbnail");e?.[0]&&this.createAnimation(e[0],"translate(18px)"),e?.[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){return(0,o.qy)` 3980 <wui-visual-thumbnail 3981 ?borderRadiusFull=${!0} 3982 .imageSrc=${this.dappImageUrl?.[0]} 3983 ></wui-visual-thumbnail> 3984 <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail> 3985 `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};oJ.styles=oV,oJ=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n}([(0,h.EM)("w3m-siwx-sign-message-thumbnails")],oJ);var oK=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let oG=class extends o.WF{constructor(){super(...arguments),this.dappName=n.H.state.metadata?.name,this.isCancelling=!1,this.isSigning=!1}render(){return(0,o.qy)` 3986 <wui-flex justifyContent="center" .padding=${["2xl","0","xxl","0"]}> 3987 <w3m-siwx-sign-message-thumbnails></w3m-siwx-sign-message-thumbnails> 3988 </wui-flex> 3989 <wui-flex 3990 .padding=${["0","4xl","l","4xl"]} 3991 gap="s" 3992 justifyContent="space-between" 3993 > 3994 <wui-text variant="paragraph-500" align="center" color="fg-100" 3995 >${this.dappName??"Dapp"} needs to connect to your wallet</wui-text 3996 > 3997 </wui-flex> 3998 <wui-flex 3999 .padding=${["0","3xl","l","3xl"]} 4000 gap="s" 4001 justifyContent="space-between" 4002 > 4003 <wui-text variant="small-400" align="center" color="fg-200" 4004 >Sign this message to prove you own this wallet and proceed. Canceling will disconnect 4005 you.</wui-text 4006 > 4007 </wui-flex> 4008 <wui-flex .padding=${["l","xl","xl","xl"]}
4008 gap="s" justifyContent="space-between"> 4009 <wui-button 4010 size="lg" 4011 borderRadius="xs" 4012 fullWidth 4013 variant="neutral" 4014 ?loading=${this.isCancelling} 4015 @click=${this.onCancel.bind(this)} 4016 data-testid="w3m-connecting-siwe-cancel" 4017 > 4018 ${this.isCancelling?"Cancelling...":"Cancel"} 4019 </wui-button> 4020 <wui-button 4021 size="lg" 4022 borderRadius="xs" 4023 fullWidth 4024 variant="main" 4025 @click=${this.onSign.bind(this)} 4026 ?loading=${this.isSigning} 4027 data-testid="w3m-connecting-siwe-sign" 4028 > 4029 ${this.isSigning?"Signing...":"Sign"} 4030 </wui-button> 4031 </wui-flex> 4032 `}async onSign(){this.isSigning=!0,await oB.U.requestSignMessage().finally(()=>this.isSigning=!1)}async onCancel(){this.isCancelling=!0,await oB.U.cancelSignMessage().finally(()=>this.isCancelling=!1)}};oK([(0,a.wk)()],oG.prototype,"isCancelling",void 0),oK([(0,a.wk)()],oG.prototype,"isSigning",void 0),oG=oK([(0,h.EM)("w3m-siwx-sign-message-view")],oG)},10968:(e,t,i)=>{var o=i(41270),a=i(12456),r=i(64129),n=i(83503),s=i(25315),l=i(97778);let c=(0,o.AH)` 4033 :host { 4034 width: 100%; 4035 display: block; 4036 } 4037`;var d=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let u=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.text="",this.open=r.I.state.open,this.unsubscribe.push(n.I.subscribeKey("view",()=>{r.I.hide()}),s.W.subscribeKey("open",e=>{e||r.I.hide()}),r.I.subscribeKey("open",e=>{this.open=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),r.I.hide()}render(){return(0,o.qy)` 4038 <div 4039 @pointermove=${this.onMouseEnter.bind(this)} 4040 @pointerleave=${this.onMouseLeave.bind(this)} 4041 > 4042 ${this.renderChildren()} 4043 </div> 4044 `}renderChildren(){return(0,o.qy)`<slot></slot> `}onMouseEnter(){let e=this.getBoundingClientRect();this.open||r.I.showTooltip({message:this.text,triggerRect:{width:e.width,height:e.height,left:e.left,top:e.top},variant:"shade"})}onMouseLeave(e){this.contains(e.relatedTarget)||r.I.hide()}};u.styles=[c],d([(0,a.MZ)()],u.prototype,"text",void 0),d([(0,a.wk)()],u.prototype,"open",void 0),u=d([(0,l.EM)("w3m-tooltip-trigger")],u)},49577:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009),i(55602),i(13076);var r=i(67998),n=i(49231),s=i(45857);let l=(0,o.AH)` 4045 a { 4046 border: 1px solid var(--wui-color-gray-glass-010); 4047 border-radius: var(--wui-border-radius-3xl); 4048 } 4049 4050 wui-image { 4051 border-radius: var(--wui-border-radius-3xl); 4052 overflow: hidden; 4053 } 4054 4055 a.disabled > wui-icon:not(.image-icon), 4056 a.disabled > wui-image { 4057 filter: grayscale(1); 4058 } 4059 4060 a[data-variant='fill'] { 4061 color: var(--wui-color-inverse-100); 4062 background-color: var(--wui-color-accent-100); 4063 } 4064 4065 a[data-variant='shade'], 4066 a[data-variant='shadeSmall'] { 4067 background-color: transparent; 4068 background-color: var(--wui-color-gray-glass-010); 4069 color: var(--wui-color-fg-200); 4070 } 4071 4072 a[data-variant='success'] { 4073 column-gap: var(--wui-spacing-xxs); 4074 border: 1px solid var(--wui-color-success-glass-010); 4075 background-color: var(--wui-color-success-glass-010); 4076 color: var(--wui-color-success-100); 4077 } 4078 4079 a[data-variant='error'] { 4080 column-gap: var(--wui-spacing-xxs); 4081 border: 1px solid var(--wui-color-error-glass-010); 4082 background-color: var(--wui-color-error-glass-010); 4083 color: var(--wui-color-error-100); 4084 } 4085 4086 a[data-variant='transparent'] { 4087 column-gap: var(--wui-spacing-xxs); 4088 background-color: transparent; 4089 color: var(--wui-color-fg-150); 4090 } 4091 4092 a[data-variant='transparent'], 4093 a[data-variant='success'], 4094 a[data-variant='shadeSmall'], 4095 a[data-variant='error'] { 4096 padding: 7px var(--wui-spacing-s) 7px 10px; 4097 } 4098 4099 a[data-variant='transparent']:has(wui-text:first-child), 4100 a[data-variant='success']:has(wui-text:first-child), 4101 a[data-variant='shadeSmall']:has(wui-text:first-child), 4102 a[data-variant='error']:has(wui-text:first-child) { 4103 padding: 7px var(--wui-spacing-s); 4104 } 4105 4106 a[data-variant='fill'], 4107 a[data-variant='shade'] { 4108 column-gap: var(--wui-spacing-xs); 4109 padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs) 4110 var(--wui-spacing-xs); 4111 } 4112 4113 a[data-variant='fill']:has(wui-text:first-child), 4114 a[data-variant='shade']:has(wui-text:first-child) { 4115 padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m); 4116 } 4117 4118 a[data-variant='fill'] > wui-image, 4119 a[data-variant='shade'] > wui-image { 4120 width: 24px; 4121 height: 24px; 4122 } 4123 4124 a[data-variant='fill'] > wui-image { 4125 box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); 4126 } 4127 4128 a[data-variant='shade'] > wui-image, 4129 a[data-variant='shadeSmall'] > wui-image { 4130 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4131 } 4132 4133 a[data-variant='fill'] > wui-icon:not(.image-icon), 4134 a[data-variant='shade'] > wui-icon:not(.image-icon) { 4135 width: 14px; 4136 height: 14px; 4137 } 4138 4139 a[data-variant='transparent'] > wui-image, 4140 a[data-variant='success'] > wui-image, 4141 a[data-variant='shadeSmall'] > wui-image, 4142 a[data-variant='error'] > wui-image { 4143 width: 14px; 4144 height: 14px; 4145 } 4146 4147 a[data-variant='transparent'] > wui-icon:not(.image-icon), 4148 a[data-variant='success'] > wui-icon:not(.image-icon), 4149 a[data-variant='shadeSmall'] > wui-icon:not(.image-icon), 4150 a[data-variant='error'] > wui-icon:not(.image-icon) { 4151 width: 12px; 4152 height: 12px; 4153 } 4154 4155 a[data-variant='fill']:focus-visible { 4156 background-color: var(--wui-color-accent-090); 4157 } 4158 4159 a[data-variant='shade']:focus-visible, 4160 a[data-variant='shadeSmall']:focus-visible { 4161 background-color: var(--wui-color-gray-glass-015); 4162 } 4163 4164 a[data-variant='transparent']:focus-visible { 4165 background-color: var(--wui-color-gray-glass-005); 4166 } 4167 4168 a[data-variant='success']:focus-visible { 4169 background-color: var(--wui-color-success-glass-015); 4170 } 4171 4172 a[data-variant='error']:focus-visible { 4173 background-color: var(--wui-color-error-glass-015); 4174 } 4175 4176 a.disabled { 4177 color: var(--wui-color-gray-glass-015); 4178 background-color: var(--wui-color-gray-glass-015); 4179 pointer-events: none; 4180 } 4181 4182 @media (hover: hover) and (pointer: fine) { 4183 a[data-variant='fill']:hover { 4184 background-color: var(--wui-color-accent-090); 4185 } 4186 4187 a[data-variant='shade']:hover, 4188 a[data-variant='shadeSmall']:hover { 4189 background-color: var(--wui-color-gray-glass-015); 4190 } 4191 4192 a[data-variant='transparent']:hover { 4193 background-color: var(--wui-color-gray-glass-005); 4194 } 4195 4196 a[data-variant='success']:hover { 4197 background-color: var(--wui-color-success-glass-015); 4198 } 4199 4200 a[data-variant='error']:hover { 4201 background-color: var(--wui-color-error-glass-015); 4202 } 4203 } 4204 4205 a[data-variant='fill']:active { 4206 background-color: var(--wui-color-accent-080); 4207 } 4208 4209 a[data-variant='shade']:active, 4210 a[data-variant='shadeSmall']:active { 4211 background-color: var(--wui-color-gray-glass-020); 4212 } 4213 4214 a[data-variant='transparent']:active { 4215 background-color: var(--wui-color-gray-glass-010); 4216 } 4217 4218 a[data-variant='success']:active { 4219 background-color: var(--wui-color-success-glass-020); 4220 } 4221 4222 a[data-variant='error']:active { 4223 background-color: var(--wui-color-error-glass-020); 4224 } 4225`;var c=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let d=class extends o.WF{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.imageIcon=void 0,this.imageIconSize="md",this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){let e="success"===this.variant||"transparent"===this.variant||"shadeSmall"===this.variant;return(0,o.qy)` 4226 <a 4227 rel="noreferrer" 4228 target="_blank" 4229 href=${this.href} 4230 class=${this.disabled?"disabled":""} 4231 data-variant=${this.variant} 4232 > 4233 ${this.imageTemplate()} 4234 <wui-text variant=${e?"small-600":"paragraph-600"} color="inherit"> 4235 ${this.title?this.title:n.Z.getHostName(this.href)} 4236 </wui-text> 4237 <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon> 4238 </a> 4239 `}imageTemplate(){return this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc}></wui-image>`:this.imageIcon?(0,o.qy)`<wui-icon 4240 name=${this.imageIcon} 4241 color="inherit" 4242 size=${this.imageIconSize} 4243 class="image-icon" 4244 ></wui-icon>`:null}};d.styles=[r.W5,r.fD,l],c([(0,a.MZ)()],d.prototype,"variant",void 0),c([(0,a.MZ)()],d.prototype,"imageSrc",void 0),c([(0,a.MZ)()],d.prototype,"imageIcon",void 0),c([(0,a.MZ)()],d.prototype,"imageIconSize",void 0),c([(0,a.MZ)({type:Boolean})],d.prototype,"disabled",void 0),c([(0,a.MZ)()],d.prototype,"icon",void 0),c([(0,a.MZ)()],d.prototype,"href",void 0),c([(0,a.MZ)()],d.prototype,"text",void 0),d=c([(0,s.E)("wui-chip")],d)},38878:(e,t,i)=>{var o=i(41270),a=i(12456),r=i(81440);i(13076);var n=i(67998),s=i(45857);i(60665);let l=(0,o.AH)` 4245 :host { 4246 position: relative; 4247 display: inline-block; 4248 } 4249 4250 wui-text { 4251 margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); 4252 } 4253`;var c=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let d=class extends o.WF{constructor(){super(...arguments),this.disabled=!1}render(){return(0,o.qy)` 4254 <wui-input-text 4255 type="email" 4256 placeholder="Email" 4257 icon="mail" 4258 size="mdl" 4259 .disabled=${this.disabled} 4260 .value=${this.value} 4261 data-testid="wui-email-input" 4262 tabIdx=${(0,r.J)(this.tabIdx)} 4263 ></wui-input-text> 4264 ${this.templateError()} 4265 `}templateError(){return this.errorMessage?(0,o.qy)`<wui-text variant="tiny-500" color="error-100">${this.errorMessage}</wui-text>`:null}};d.styles=[n.W5,l],c([(0,a.MZ)()],d.prototype,"errorMessage",void 0),c([(0,a.MZ)({type:Boolean})],d.prototype,"disabled",void 0),c([(0,a.MZ)()],d.prototype,"value",void 0),c([(0,a.MZ)()],d.prototype,"tabIdx",void 0),d=c([(0,s.E)("wui-email-input")],d)},49925:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009);var r=i(67998),n=i(45857);let s=(0,o.AH)` 4266 :host { 4267 position: relative; 4268 } 4269 4270 button { 4271 display: flex; 4272 justify-content: center;
4273 align-items: center; 4274 height: 48px; 4275 width: 100%; 4276 background-color: var(--wui-color-accent-glass-010); 4277 border-radius: var(--wui-border-radius-xs); 4278 border: 1px solid var(--wui-color-accent-glass-010); 4279 transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); 4280 will-change: background-color; 4281 } 4282 4283 wui-tooltip { 4284 padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s); 4285 position: absolute; 4286 top: -8px; 4287 left: 50%; 4288 transform: translate(-50%, -100%); 4289 opacity: 0; 4290 display: none; 4291 } 4292 4293 @media (hover: hover) and (pointer: fine) { 4294 button:hover:enabled { 4295 background-color: var(--wui-color-accent-glass-015); 4296 } 4297 4298 button:active:enabled { 4299 background-color: var(--wui-color-accent-glass-020); 4300 } 4301 } 4302`;var l=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let c=class extends o.WF{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return(0,o.qy)`<button> 4303 <wui-icon color="accent-100" name=${this.icon} size="lg"></wui-icon> 4304 </button>`}};c.styles=[r.W5,r.fD,s],l([(0,a.MZ)()],c.prototype,"text",void 0),l([(0,a.MZ)()],c.prototype,"icon",void 0),c=l([(0,n.E)("wui-icon-button")],c)},12716:(e,t,i)=>{var o=i(41270),a=i(12456),r=i(81440);i(13076);var n=i(67998),s=i(45857);i(88944);let l=(0,o.AH)` 4305 button { 4306 column-gap: var(--wui-spacing-s); 4307 padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); 4308 width: 100%; 4309 justify-content: flex-start; 4310 background-color: var(--wui-color-gray-glass-002); 4311 border-radius: var(--wui-border-radius-xs); 4312 color: var(--wui-color-fg-100); 4313 } 4314 4315 wui-text { 4316 text-transform: capitalize; 4317 } 4318 4319 wui-text[data-align='left'] { 4320 display: flex; 4321 flex: 1; 4322 } 4323 4324 wui-text[data-align='center'] { 4325 display: flex; 4326 flex: 1; 4327 justify-content: center; 4328 } 4329 4330 .invisible { 4331 opacity: 0; 4332 pointer-events: none; 4333 } 4334 4335 button:disabled { 4336 background-color: var(--wui-color-gray-glass-015); 4337 color: var(--wui-color-gray-glass-015); 4338 } 4339`;var c=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let d=class extends o.WF{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.align="left",this.disabled=!1}render(){return(0,o.qy)` 4340 <button ?disabled=${this.disabled} tabindex=${(0,r.J)(this.tabIdx)}> 4341 <wui-logo logo=${this.logo}></wui-logo> 4342 <wui-text 4343 data-align=${this.align} 4344 variant="paragraph-500" 4345 color="inherit" 4346 align=${this.align} 4347 >${this.name}</wui-text 4348 > 4349 ${this.templatePlacement()} 4350 </button> 4351 `}templatePlacement(){return"center"===this.align?(0,o.qy)` <wui-logo class="invisible" logo=${this.logo}></wui-logo>`:null}};d.styles=[n.W5,n.fD,l],c([(0,a.MZ)()],d.prototype,"logo",void 0),c([(0,a.MZ)()],d.prototype,"name",void 0),c([(0,a.MZ)()],d.prototype,"align",void 0),c([(0,a.MZ)()],d.prototype,"tabIdx",void 0),c([(0,a.MZ)({type:Boolean})],d.prototype,"disabled",void 0),d=c([(0,s.E)("wui-list-social")],d)},62156:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009),i(55602),i(13076),i(7202);var r=i(67998),n=i(49231),s=i(45857);let l=(0,o.AH)` 4352 button { 4353 padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); 4354 display: flex; 4355 justify-content: space-between; 4356 width: 100%; 4357 border-radius: var(--wui-border-radius-xs); 4358 background-color: var(--wui-color-gray-glass-002); 4359 } 4360 4361 button[data-clickable='false'] { 4362 pointer-events: none; 4363 background-color: transparent; 4364 } 4365 4366 wui-image, 4367 wui-icon { 4368 width: var(--wui-spacing-3xl); 4369 height: var(--wui-spacing-3xl); 4370 } 4371 4372 wui-image { 4373 border-radius: var(--wui-border-radius-3xl); 4374 } 4375`;var c=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let d=class extends o.WF{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return(0,o.qy)` 4376 <button data-clickable=${String(this.clickable)}> 4377 <wui-flex gap="s" alignItems="center"> 4378 ${this.visualTemplate()} 4379 <wui-flex flexDirection="column" justifyContent="spaceBetween"> 4380 <wui-text variant="paragraph-500" color="fg-100">${this.tokenName}</wui-text> 4381 <wui-text variant="small-400" color="fg-200"> 4382 ${n.Z.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency} 4383 </wui-text> 4384 </wui-flex> 4385 </wui-flex> 4386 <wui-text variant="paragraph-500" color="fg-100">$${this.tokenValue.toFixed(2)}</wui-text> 4387 </button> 4388 `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?(0,o.qy)`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:(0,o.qy)`<wui-icon name="coinPlaceholder" color="fg-100"></wui-icon>`}};d.styles=[r.W5,r.fD,l],c([(0,a.MZ)()],d.prototype,"tokenName",void 0),c([(0,a.MZ)()],d.prototype,"tokenImageUrl",void 0),c([(0,a.MZ)({type:Number})],d.prototype,"tokenValue",void 0),c([(0,a.MZ)()],d.prototype,"tokenAmount",void 0),c([(0,a.MZ)()],d.prototype,"tokenCurrency",void 0),c([(0,a.MZ)({type:Boolean})],d.prototype,"clickable",void 0),d=c([(0,s.E)("wui-list-token")],d)},61856:(e,t,i)=>{i(83081)},33575:(e,t,i)=>{var o=i(41270),a=i(12456);i(13076);var r=i(67998),n=i(45857);let s=(0,o.AH)` 4389 :host { 4390 position: relative; 4391 display: flex; 4392 width: 100%; 4393 height: 1px; 4394 background-color: var(--wui-color-gray-glass-005); 4395 justify-content: center;
4396 align-items: center; 4397 } 4398 4399 :host > wui-text { 4400 position: absolute; 4401 padding: 0px 10px; 4402 background-color: var(--wui-color-modal-bg); 4403 transition: background-color var(--wui-duration-lg) var(--wui-ease-out-power-1); 4404 will-change: background-color; 4405 } 4406`;var l=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let c=class extends o.WF{constructor(){super(...arguments),this.text=""}render(){return(0,o.qy)`${this.template()}`}template(){return this.text?(0,o.qy)`<wui-text variant="small-500" color="fg-200">${this.text}</wui-text>`:null}};c.styles=[r.W5,s],l([(0,a.MZ)()],c.prototype,"text",void 0),c=l([(0,n.E)("wui-separator")],c)},817:(e,t,i)=>{i(36e3)},89991:(e,t,i)=>{i(72190)},39211:(e,t,i)=>{i.d(t,{a:()=>a});var o=i(41270);let a=(0,o.JW)`<svg viewBox="0 0 48 54" fill="none"> 4407 <path 4408 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" 4409 /> 4410</svg>`},76178:(e,t,i)=>{var o=i(41270),a=i(12456);i(55602);var r=i(67998),n=i(49231),s=i(45857);let l=(0,o.AH)` 4411 :host { 4412 display: block; 4413 width: var(--local-width); 4414 height: var(--local-height); 4415 border-radius: var(--wui-border-radius-3xl); 4416 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 4417 overflow: hidden; 4418 position: relative; 4419 } 4420 4421 :host([data-variant='generated']) { 4422 --mixed-local-color-1: var(--local-color-1); 4423 --mixed-local-color-2: var(--local-color-2); 4424 --mixed-local-color-3: var(--local-color-3); 4425 --mixed-local-color-4: var(--local-color-4); 4426 --mixed-local-color-5: var(--local-color-5); 4427 } 4428 4429 @supports (background: color-mix(in srgb, white 50%, black)) { 4430 :host([data-variant='generated']) { 4431 --mixed-local-color-1: color-mix( 4432 in srgb, 4433 var(--w3m-color-mix) var(--w3m-color-mix-strength), 4434 var(--local-color-1) 4435 ); 4436 --mixed-local-color-2: color-mix( 4437 in srgb, 4438 var(--w3m-color-mix) var(--w3m-color-mix-strength), 4439 var(--local-color-2) 4440 ); 4441 --mixed-local-color-3: color-mix( 4442 in srgb, 4443 var(--w3m-color-mix) var(--w3m-color-mix-strength), 4444 var(--local-color-3) 4445 ); 4446 --mixed-local-color-4: color-mix( 4447 in srgb, 4448 var(--w3m-color-mix) var(--w3m-color-mix-strength), 4449 var(--local-color-4) 4450 ); 4451 --mixed-local-color-5: color-mix( 4452 in srgb, 4453 var(--w3m-color-mix) var(--w3m-color-mix-strength), 4454 var(--local-color-5) 4455 ); 4456 } 4457 } 4458 4459 :host([data-variant='generated']) { 4460 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 4461 background: radial-gradient( 4462 var(--local-radial-circle), 4463 #fff 0.52%, 4464 var(--mixed-local-color-5) 31.25%, 4465 var(--mixed-local-color-3) 51.56%, 4466 var(--mixed-local-color-2) 65.63%, 4467 var(--mixed-local-color-1) 82.29%, 4468 var(--mixed-local-color-4) 100% 4469 ); 4470 } 4471 4472 :host([data-variant='default']) { 4473 box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); 4474 background: radial-gradient( 4475 75.29% 75.29% at 64.96% 24.36%, 4476 #fff 0.52%, 4477 #f5ccfc 31.25%, 4478 #dba4f5 51.56%, 4479 #9a8ee8 65.63%, 4480 #6493da 82.29%, 4481 #6ebdea 100% 4482 ); 4483 } 4484`;var c=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let d=class extends o.WF{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}render(){return this.style.cssText=` 4485 --local-width: var(--wui-icon-box-size-${this.size}); 4486 --local-height: var(--wui-icon-box-size-${this.size}); 4487 `,(0,o.qy)`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",(0,o.qy)`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";let e=n.Z.generateAvatarColors(this.address);return this.style.cssText+=` 4488 ${e}`,null}return this.dataset.variant="default",null}};d.styles=[r.W5,l],c([(0,a.MZ)()],d.prototype,"imageSrc",void 0),c([(0,a.MZ)()],d.prototype,"alt",void 0),c([(0,a.MZ)()],d.prototype,"address",void 0),c([(0,a.MZ)()],d.prototype,"size",void 0),d=c([(0,s.E)("wui-avatar")],d)},11778:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009),i(55602),i(13076);var r=i(67998),n=i(45857);let s=(0,o.AH)` 4489 button { 4490 border: none; 4491 border-radius: var(--wui-border-radius-3xl); 4492 } 4493 4494 button[data-variant='main'] { 4495 background-color: var(--wui-color-accent-100); 4496 color: var(--wui-color-inverse-100); 4497 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4498 } 4499 4500 button[data-variant='accent'] { 4501 background-color: var(--wui-color-accent-glass-010); 4502 color: var(--wui-color-accent-100); 4503 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); 4504 } 4505 4506 button[data-variant='gray'] { 4507 background-color: transparent; 4508 color: var(--wui-color-fg-200); 4509 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4510 } 4511 4512 button[data-variant='shade'] { 4513 background-color: transparent; 4514 color: var(--wui-color-accent-100); 4515 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4516 } 4517 4518 button[data-size='sm'] { 4519 height: 32px; 4520 padding: 0 var(--wui-spacing-s); 4521 } 4522 4523 button[data-size='md'] { 4524 height: 40px; 4525 padding: 0 var(--wui-spacing-l); 4526 } 4527 4528 button[data-size='sm'] > wui-image { 4529 width: 16px; 4530 height: 16px; 4531 } 4532 4533 button[data-size='md'] > wui-image { 4534 width: 24px; 4535 height: 24px; 4536 } 4537 4538 button[data-size='sm'] > wui-icon { 4539 width: 12px; 4540 height: 12px; 4541 } 4542 4543 button[data-size='md'] > wui-icon { 4544 width: 14px; 4545 height: 14px; 4546 } 4547 4548 wui-image { 4549 border-radius: var(--wui-border-radius-3xl); 4550 overflow: hidden; 4551 } 4552 4553 button.disabled > wui-icon, 4554 button.disabled > wui-image { 4555 filter: grayscale(1); 4556 } 4557 4558 button[data-variant='main'] > wui-image { 4559 box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); 4560 } 4561 4562 button[data-variant='shade'] > wui-image, 4563 button[data-variant='gray'] > wui-image { 4564 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); 4565 } 4566 4567 @media (hover: hover) and (pointer: fine) { 4568 button[data-variant='main']:focus-visible { 4569 background-color: var(--wui-color-accent-090); 4570 } 4571 4572 button[data-variant='main']:hover:enabled { 4573 background-color: var(--wui-color-accent-090); 4574 } 4575 4576 button[data-variant='main']:active:enabled { 4577 background-color: var(--wui-color-accent-080); 4578 } 4579 4580 button[data-variant='accent']:hover:enabled { 4581 background-color: var(--wui-color-accent-glass-015); 4582 } 4583 4584 button[data-variant='accent']:active:enabled { 4585 background-color: var(--wui-color-accent-glass-020); 4586 } 4587 4588 button[data-variant='shade']:focus-visible, 4589 button[data-variant='gray']:focus-visible, 4590 button[data-variant='shade']:hover, 4591 button[data-variant='gray']:hover { 4592 background-color: var(--wui-color-gray-glass-002); 4593 } 4594 4595 button[data-variant='gray']:active, 4596 button[data-variant='shade']:active { 4597 background-color: var(--wui-color-gray-glass-005); 4598 } 4599 } 4600 4601 button.disabled { 4602 color: var(--wui-color-gray-glass-020); 4603 background-color: var(--wui-color-gray-glass-002); 4604 box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); 4605 pointer-events: none; 4606 } 4607`;var l=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let c=class extends o.WF{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){let e="sm"===this.size?"small-600":"paragraph-600";return(0,o.qy)` 4608 <button 4609 class=${this.disabled?"disabled":""} 4610 data-variant=${this.variant} 4611 data-size=${this.size} 4612 > 4613 ${this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc}></wui-image>`:null} 4614 <wui-text variant=${e} color="inherit"> ${this.text} </wui-text> 4615 <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon> 4616 </button> 4617 `}};c.styles=[r.W5,r.fD,s],l([(0,a.MZ)()],c.prototype,"variant",void 0),l([(0,a.MZ)()],c.prototype,"imageSrc",void 0),l([(0,a.MZ)({type:Boolean})],c.prototype,"disabled",void 0),l([(0,a.MZ)()],c.prototype,"icon",void 0),l([(0,a.MZ)()],c.prototype,"size",void 0),l([(0,a.MZ)()],c.prototype,"text",void 0),c=l([(0,n.E)("wui-chip-button")],c)},88944:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009);var r=i(67998),n=i(45857);let s=(0,o.AH)` 4618 :host { 4619 display: flex; 4620 justify-content: center;
4621 align-items: center; 4622 width: 40px; 4623 height: 40px; 4624 border-radius: var(--wui-border-radius-3xl); 4625 border: 1px solid var(--wui-color-gray-glass-005); 4626 overflow: hidden; 4627 } 4628 4629 wui-icon { 4630 width: 100%; 4631 height: 100%; 4632 } 4633`;var l=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let c=class extends o.WF{constructor(){super(...arguments),this.logo="google"}render(){return(0,o.qy)`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}};c.styles=[r.W5,s],l([(0,a.MZ)()],c.prototype,"logo",void 0),c=l([(0,n.E)("wui-logo")],c)},83081:(e,t,i)=>{var o=i(41270),a=i(12456);let r=(0,o.JW)`<svg width="86" height="96" fill="none"> 4634 <path 4635 d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z" 4636 /> 4637</svg>`;var n=i(39211);let s=(0,o.JW)` 4638 <svg fill="none" viewBox="0 0 36 40"> 4639 <path 4640 d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z" 4641 /> 4642 </svg> 4643`;i(28009),i(55602);var l=i(67998),c=i(45857);let d=(0,o.AH)` 4644 :host { 4645 position: relative; 4646 border-radius: inherit; 4647 display: flex; 4648 justify-content: center; 4649 align-items: center; 4650 width: var(--local-width); 4651 height: var(--local-height); 4652 } 4653 4654 :host([data-round='true']) { 4655 background: var(--wui-color-gray-glass-002); 4656 border-radius: 100%; 4657 outline: 1px solid var(--wui-color-gray-glass-005); 4658 } 4659 4660 svg { 4661 position: absolute; 4662 top: 0; 4663 left: 0; 4664 width: 100%; 4665 height: 100%; 4666 z-index: 1; 4667 fill: var(--wui-color-gray-glass-002); 4668 } 4669 4670 svg > path { 4671 stroke: var(--local-stroke); 4672 } 4673 4674 wui-image { 4675 width: 100%; 4676 height: 100%; 4677 -webkit-clip-path: var(--local-path); 4678 clip-path: var(--local-path); 4679 background: var(--wui-color-gray-glass-002); 4680 } 4681 4682 wui-icon { 4683 transform: translateY(-5%); 4684 width: var(--local-icon-size); 4685 height: var(--local-icon-size); 4686 } 4687`;var u=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let p=class extends o.WF{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:s,md:n.a,lg:r},this.selected=!1,this.round=!1}render(){return this.round?(this.dataset.round="true",this.style.cssText=` 4688 --local-width: var(--wui-spacing-3xl); 4689 --local-height: var(--wui-spacing-3xl); 4690 --local-icon-size: var(--wui-spacing-l); 4691 `):this.style.cssText=` 4692 4693 --local-path: var(--wui-path-network-${this.size}); 4694 --local-width: var(--wui-width-network-${this.size}); 4695 --local-height: var(--wui-height-network-${this.size}); 4696 --local-icon-size: var(--wui-icon-size-network-${this.size}); 4697 `,(0,o.qy)`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:(0,o.qy)`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};p.styles=[l.W5,d],u([(0,a.MZ)()],p.prototype,"size",void 0),u([(0,a.MZ)()],p.prototype,"name",void 0),u([(0,a.MZ)({type:Object})],p.prototype,"networkImagesBySize",void 0),u([(0,a.MZ)()],p.prototype,"imageSrc",void 0),u([(0,a.MZ)({type:Boolean})],p.prototype,"selected",void 0),u([(0,a.MZ)({type:Boolean})],p.prototype,"round",void 0),p=u([(0,c.E)("wui-network-image")],p)},72190:(e,t,i)=>{var o=i(41270),a=i(12456);i(28009),i(55602),i(7202);var r=i(67998),n=i(45857);i(38542);let s=(0,o.AH)` 4698 :host { 4699 position: relative; 4700 background-color: var(--wui-color-gray-glass-002); 4701 display: flex; 4702 justify-content: center;
4703 align-items: center; 4704 width: var(--local-size); 4705 height: var(--local-size); 4706 border-radius: inherit; 4707 border-radius: var(--local-border-radius); 4708 } 4709 4710 :host > wui-flex { 4711 overflow: hidden; 4712 border-radius: inherit; 4713 border-radius: var(--local-border-radius); 4714 } 4715 4716 :host::after { 4717 content: ''; 4718 position: absolute; 4719 top: 0; 4720 bottom: 0; 4721 left: 0; 4722 right: 0; 4723 border-radius: inherit; 4724 border: 1px solid var(--wui-color-gray-glass-010); 4725 pointer-events: none; 4726 } 4727 4728 :host([name='Extension'])::after { 4729 border: 1px solid var(--wui-color-accent-glass-010); 4730 } 4731 4732 :host([data-wallet-icon='allWallets']) { 4733 background-color: var(--wui-all-wallets-bg-100); 4734 } 4735 4736 :host([data-wallet-icon='allWallets'])::after { 4737 border: 1px solid var(--wui-color-accent-glass-010); 4738 } 4739 4740 wui-icon[data-parent-size='inherit'] { 4741 width: 75%; 4742 height: 75%; 4743 align-items: center; 4744 } 4745 4746 wui-icon[data-parent-size='sm'] { 4747 width: 18px; 4748 height: 18px; 4749 } 4750 4751 wui-icon[data-parent-size='md'] { 4752 width: 24px; 4753 height: 24px; 4754 } 4755 4756 wui-icon[data-parent-size='lg'] { 4757 width: 42px; 4758 height: 42px; 4759 } 4760 4761 wui-icon[data-parent-size='full'] { 4762 width: 100%; 4763 height: 100%; 4764 } 4765 4766 :host > wui-icon-box { 4767 position: absolute; 4768 overflow: hidden; 4769 right: -1px; 4770 bottom: -2px; 4771 z-index: 1; 4772 border: 2px solid var(--wui-color-bg-150, #1e1f1f); 4773 padding: 1px; 4774 } 4775`;var l=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};let c=class extends o.WF{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return e="lg"===this.size?"m":"md"===this.size?"xs":"xxs",this.style.cssText=` 4776 --local-border-radius: var(--wui-border-radius-${e}); 4777 --local-size: var(--wui-wallet-image-size-${this.size}); 4778 `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),(0,o.qy)` 4779 <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex> 4780 `}templateVisual(){return this.imageSrc?(0,o.qy)`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?(0,o.qy)`<wui-icon 4781 data-parent-size="md" 4782 size="md" 4783 color="inherit" 4784 name=${this.walletIcon} 4785 ></wui-icon>`:(0,o.qy)`<wui-icon 4786 data-parent-size=${this.size} 4787 size="inherit" 4788 color="inherit" 4789 name="walletPlaceholder" 4790 ></wui-icon>`}};c.styles=[r.fD,r.W5,s],l([(0,a.MZ)()],c.prototype,"size",void 0),l([(0,a.MZ)()],c.prototype,"name",void 0),l([(0,a.MZ)()],c.prototype,"imageSrc",void 0),l([(0,a.MZ)()],c.prototype,"walletIcon",void 0),l([(0,a.MZ)({type:Boolean})],c.prototype,"installed",void 0),l([(0,a.MZ)()],c.prototype,"badgeSize",void 0),c=l([(0,n.E)("wui-wallet-image")],c)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.