1"use strict";(()=>{var q=Object.defineProperty;var O=(j,L)=>q(j,"name",{value:L,configurable:!0});(self.webpackChunk=self.webpackChunk||[]).push([[2670],{58253(j,L,t){var a,l;t.d(L,{R:O(()=>n,"R"),b:O(()=>s,"b")});var e=t(75826),d=t(59262),m=t(72430),g=t(25967),y=t(65811),$=t(55262),W=t(4436),f=t(93982),C=t(86695),w=t(17885),c=t(25029),o=O(function(u,v,h,p){var E=arguments.length,b=E<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,h):p,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(u,v,h,p);else for(var I=u.length-1;I>=0;I--)(T=u[I])&&(b=(E<3?T(b):E>3?T(v,h,b):T(v,h))||b);return E>3&&b&&Object.defineProperty(v,h,b),b},"__decorate");const r=class r extends e.WF{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.namespace=void 0,this.isSupported=W.H.state.allowUnsupportedChain?!0:y.W.state.activeChain?y.W.checkIfSupportedNetwork(y.W.state.activeChain):!0}connectedCallback(){super.connectedCallback(),this.setAccountData(y.W.getAccountData(this.namespace)),this.setNetworkData(y.W.getNetworkData(this.namespace))}firstUpdated(){const v=this.namespace;v?this.unsubscribe.push(y.W.subscribeChainProp("accountState",h=>{this.setAccountData(h)},v),y.W.subscribeChainProp("networkState",h=>{this.setNetworkData(h),this.isSupported=y.W.checkIfSupportedNetwork(v,h?.caipNetwork?.caipNetworkId)},v)):this.unsubscribe.push($.j.subscribeNetworkImages(()=>{this.networkImage=f.$.getNetworkImage(this.network)}),y.W.subscribeKey("activeCaipAddress",h=>{this.caipAddress=h}),y.W.subscribeChainProp("accountState",h=>{this.setAccountData(h)}),y.W.subscribeKey("activeCaipNetwork",h=>{this.network=h,this.networkImage=f.$.getNetworkImage(h),this.isSupported=h?.chainNamespace?y.W.checkIfSupportedNetwork(h?.chainNamespace):!0,this.fetchNetworkImage(h)}))}updated(){this.fetchNetworkImage(this.network)}disconnectedCallback(){this.unsubscribe.forEach(v=>v())}render(){if(!y.W.state.activeChain)return null;const v=this.balance==="show",h=typeof this.balanceVal!="string",{formattedText:p}=C.w.parseBalance(this.balanceVal,this.balanceSymbol);return(0,e.qy)` 2 <wui-account-button 3 .disabled=${!!this.disabled} 4 .isUnsupportedChain=${W.H.state.allowUnsupportedChain?!1:!this.isSupported} 5 address=${(0,m.J)(C.w.getPlainAddress(this.caipAddress))} 6 profileName=${(0,m.J)(this.profileName)} 7 networkSrc=${(0,m.J)(this.networkImage)} 8 avatarSrc=${(0,m.J)(this.profileImage)} 9 balance=${v?p:""} 10 @click=${this.onClick.bind(this)} 11 data-testid=${`account-button${this.namespace?`-${this.namespace}`:""}`} 12 .charsStart=${this.charsStart} 13 .charsEnd=${this.charsEnd} 14 ?loading=${h} 15 > 16 </wui-account-button> 17 `}onClick(){this.isSupported||W.H.state.allowUnsupportedChain?g.W.open({namespace:this.namespace}):g.W.open({view:"UnsupportedChain"})}async fetchNetworkImage(v){v?.assets?.imageId&&(this.networkImage=await f.$.fetchNetworkImage(v?.assets?.imageId))}setAccountData(v){v&&(this.caipAddress=v.caipAddress,this.balanceVal=v.balance,this.balanceSymbol=v.balanceSymbol,this.profileName=v.profileName,this.profileImage=v.profileImage)}setNetworkData(v){v&&(this.network=v.caipNetwork,this.networkImage=f.$.getNetworkImage(v.caipNetwork))}};O(r,"W3mAccountButtonBase");let i=r;o([(0,d.MZ)({type:Boolean})],i.prototype,"disabled",void 0),o([(0,d.MZ)()],i.prototype,"balance",void 0),o([(0,d.MZ)()],i.prototype,"charsStart",void 0),o([(0,d.MZ)()],i.prototype,"charsEnd",void 0),o([(0,d.MZ)()],i.prototype,"namespace",void 0),o([(0,d.wk)()],i.prototype,"caipAddress",void 0),o([(0,d.wk)()],i.prototype,"balanceVal",void 0),o([(0,d.wk)()],i.prototype,"balanceSymbol",void 0),o([(0,d.wk)()],i.prototype,"profileName",void 0),o([(0,d.wk)()],i.prototype,"profileImage",void 0),o([(0,d.wk)()],i.prototype,"network",void 0),o([(0,d.wk)()],i.prototype,"networkImage",void 0),o([(0,d.wk)()],i.prototype,"isSupported",void 0);let s=(a=class extends i{},O(a,"W3mAccountButton2"),a);s=o([(0,w.EM)("w3m-account-button")],s);let n=(l=class extends i{},O(l,"AppKitAccountButton2"),l);n=o([(0,w.EM)("appkit-account-button")],n)},54420(j,L,t){var o,i;t.d(L,{C:O(()=>w,"C"),j:O(()=>C,"j")});
17var e=t(75826),d=t(59262),m=t(72430),g=t(65811),y=t(17885);const $=(0,e.AH)` 18 :host { 19 display: block; 20 width: max-content; 21 } 22`;var W=O(function(s,n,r,a){var l=arguments.length,u=l<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,r):a,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(s,n,r,a);else for(var h=s.length-1;h>=0;h--)(v=s[h])&&(u=(l<3?v(u):l>3?v(n,r,u):v(n,r))||u);return l>3&&u&&Object.defineProperty(n,r,u),u},"__decorate");const c=class c extends e.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}firstUpdated(){this.caipAddress=this.namespace?g.W.getAccountData(this.namespace)?.caipAddress:g.W.state.activeCaipAddress,this.namespace?this.unsubscribe.push(g.W.subscribeChainProp("accountState",n=>{this.caipAddress=n?.caipAddress},this.namespace)):this.unsubscribe.push(g.W.subscribeKey("activeCaipAddress",n=>this.caipAddress=n))}disconnectedCallback(){this.unsubscribe.forEach(n=>n())}render(){return this.caipAddress?(0,e.qy)` 23 <appkit-account-button 24 .disabled=${!!this.disabled} 25 balance=${(0,m.J)(this.balance)} 26 .charsStart=${(0,m.J)(this.charsStart)} 27 .charsEnd=${(0,m.J)(this.charsEnd)} 28 namespace=${(0,m.J)(this.namespace)} 29 > 30 </appkit-account-button> 31 `:(0,e.qy)` 32 <appkit-connect-button 33 size=${(0,m.J)(this.size)} 34 label=${(0,m.J)(this.label)} 35 loadingLabel=${(0,m.J)(this.loadingLabel)} 36 namespace=${(0,m.J)(this.namespace)} 37 ></appkit-connect-button> 38 `}};O(c,"W3mButtonBase");let f=c;f.styles=$,W([(0,d.MZ)({type:Boolean})],f.prototype,"disabled",void 0),W([(0,d.MZ)()],f.prototype,"balance",void 0),W([(0,d.MZ)()],f.prototype,"size",void 0),W([(0,d.MZ)()],f.prototype,"label",void 0),W([(0,d.MZ)()],f.prototype,"loadingLabel",void 0),W([(0,d.MZ)()],f.prototype,"charsStart",void 0),W([(0,d.MZ)()],f.prototype,"charsEnd",void 0),W([(0,d.MZ)()],f.prototype,"namespace",void 0),W([(0,d.wk)()],f.prototype,"caipAddress",void 0);let C=(o=class extends f{},O(o,"W3mButton2"),o);C=W([(0,y.EM)("w3m-button")],C);let w=(i=class extends f{},O(i,"AppKitButton2"),i);w=W([(0,y.EM)("appkit-button")],w)},93234(j,L,t){var o,i;t.d(L,{M:O(()=>w,"M"),q:O(()=>C,"q")});var e=t(75826),d=t(59262),m=t(72430),g=t(25967),y=t(17885),$=t(89194),W=O(function(s,n,r,a){var l=arguments.length,u=l<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,r):a,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(s,n,r,a);else for(var h=s.length-1;h>=0;h--)(v=s[h])&&(u=(l<3?v(u):l>3?v(n,r,u):v(n,r))||u);return l>3&&u&&Object.defineProperty(n,r,u),u},"__decorate");const c=class c extends e.WF{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=g.W.state.open,this.loading=this.namespace?g.W.state.loadingNamespaceMap.get(this.namespace):g.W.state.loading,this.unsubscribe.push(g.W.subscribe(n=>{this.open=n.open,this.loading=this.namespace?n.loadingNamespaceMap.get(this.namespace):n.loading}))}disconnectedCallback(){this.unsubscribe.forEach(n=>n())}render(){return(0,e.qy)` 39 <wui-connect-button 40 size=${(0,m.J)(this.size)} 41 .loading=${this.loading} 42 @click=${this.onClick.bind(this)} 43 data-testid=${`connect-button${this.namespace?`-${this.namespace}`:""}`} 44 > 45 ${this.loading?this.loadingLabel:this.label} 46 </wui-connect-button> 47 `}onClick(){this.open?g.W.close():this.loading||g.W.open({view:"Connect",namespace:this.namespace})}};O(c,"W3mConnectButtonBase");let f=c;W([(0,d.MZ)()],f.prototype,"size",void 0),W([(0,d.MZ)()],f.prototype,"label",void 0),W([(0,d.MZ)()],f.prototype,"loadingLabel",void 0),W([(0,d.MZ)()],f.prototype,"namespace",void 0),W([(0,d.wk)()],f.prototype,"open",void 0),W([(0,d.wk)()],f.prototype,"loading",void 0);let C=(o=class extends f{},O(o,"W3mConnectButton2"),o);C=W([(0,y.EM)("w3m-connect-button")],C);let w=(i=class extends f{},O(i,"AppKitConnectButton2"),i);w=W([(0,y.EM)("appkit-connect-button")],w)},93289(j,L,t){var o;t.d(L,{H:O(()=>c,"H")});
47var e=t(75826),d=t(59262),m=t(98229),g=t(82741),y=t(17885),$=t(81560),W=t(19847),f=t(43435);const C=(0,y.AH)` 48 :host { 49 display: block; 50 } 51 52 div.container { 53 position: absolute; 54 bottom: 0; 55 left: 0; 56 right: 0; 57 overflow: hidden; 58 height: auto; 59 display: block; 60 } 61 62 div.container[status='hide'] { 63 animation: fade-out; 64 animation-duration: var(--apkt-duration-dynamic); 65 animation-timing-function: ${({easings:i})=>i["ease-out-power-2"]}; 66 animation-fill-mode: both; 67 animation-delay: 0s; 68 } 69 70 div.container[status='show'] { 71 animation: fade-in; 72 animation-duration: var(--apkt-duration-dynamic); 73 animation-timing-function: ${({easings:i})=>i["ease-out-power-2"]}; 74 animation-fill-mode: both; 75 animation-delay: var(--apkt-duration-dynamic); 76 } 77 78 @keyframes fade-in { 79 from { 80 opacity: 0; 81 filter: blur(6px); 82 } 83 to { 84 opacity: 1; 85 filter: blur(0px); 86 } 87 } 88 89 @keyframes fade-out { 90 from { 91 opacity: 1; 92 filter: blur(0px); 93 } 94 to { 95 opacity: 0; 96 filter: blur(6px); 97 } 98 } 99`;var w=O(function(i,s,n,r){var a=arguments.length,l=a<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,n):r,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,s,n,r);else for(var v=i.length-1;v>=0;v--)(u=i[v])&&(l=(a<3?u(l):a>3?u(s,n,l):u(s,n))||l);return a>3&&l&&Object.defineProperty(s,n,l),l},"__decorate");let c=(o=class extends e.WF{constructor(){super(...arguments),this.resizeObserver=void 0,this.unsubscribe=[],this.status="hide",this.view=m.I.state.view}firstUpdated(){this.status=f.y.hasFooter()?"show":"hide",this.unsubscribe.push(m.I.subscribeKey("view",s=>{this.view=s,this.status=f.y.hasFooter()?"show":"hide",this.status==="hide"&&document.documentElement.style.setProperty("--apkt-footer-height","0px")})),this.resizeObserver=new ResizeObserver(s=>{for(const n of s)if(n.target===this.getWrapper()){const r=`${n.contentRect.height}px`;document.documentElement.style.setProperty("--apkt-footer-height",r)}}),this.resizeObserver.observe(this.getWrapper())}render(){return(0,e.qy)` 100 <div class="container" status=${this.status}>${this.templatePageContainer()}</div> 101 `}templatePageContainer(){return f.y.hasFooter()?(0,e.qy)` ${this.templateFooter()}`:null}templateFooter(){switch(this.view){case"Networks":return this.templateNetworksFooter();case"Connect":case"ConnectWallets":case"OnRampFiatSelect":case"OnRampTokenSelect":return(0,e.qy)`<w3m-legal-footer></w3m-legal-footer>`;case"OnRampProviders":return(0,e.qy)`<w3m-onramp-providers-footer></w3m-onramp-providers-footer>`;default:return null}}templateNetworksFooter(){return(0,e.qy)` <wui-flex 102 class="footer-in" 103 padding="3" 104 flexDirection="column" 105 gap="3" 106 alignItems="center" 107 > 108 <wui-text variant="md-regular" color="secondary" align="center"> 109 Your connected wallet may not support some of the networks available for this dApp 110 </wui-text> 111 <wui-link @click=${this.onNetworkHelp.bind(this)}> 112 <wui-icon size="sm" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon> 113 What is a network 114 </wui-link> 115 </wui-flex>`}onNetworkHelp(){g.E.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),m.I.push("WhatIsANetwork")}getWrapper(){return this.shadowRoot?.querySelector("div.container")}},O(o,"W3mFooter2"),o);c.styles=[C],w([(0,d.wk)()],c.prototype,"status",void 0),w([(0,d.wk)()],c.prototype,"view",void 0),c=w([(0,y.EM)("w3m-footer")],c)},52711(j,L,t){var l,u;t.d(L,{i:O(()=>r,"i"),W:O(()=>n,"W")});var e=t(75826),d=t(59262),m=t(72430),g=t(65811),y=t(93982),$=t(25967),W=t(4436),f=t(55262),C=t(82741),w=t(17885),c=t(79034);const o=(0,e.AH)` 116 :host { 117 display: block; 118 width: max-content; 119 } 120`;var i=O(function(v,h,p,E){var b=arguments.length,T=b<3?h:E===null?E=Object.getOwnPropertyDescriptor(h,p):E,I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,h,p,E);else for(var x=v.length-1;x>=0;x--)(I=v[x])&&(T=(b<3?I(T):b>3?I(h,p,T):I(h,p))||T);return b>3&&T&&Object.defineProperty(h,p,T),T},"__decorate");const a=class a extends e.WF{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=g.W.state.activeCaipNetwork,this.networkImage=y.$.getNetworkImage(this.network),this.caipAddress=g.W.state.activeCaipAddress,this.loading=$.W.state.loading,this.isSupported=W.H.state.allowUnsupportedChain?!0:g.W.state.activeChain?g.W.checkIfSupportedNetwork(g.W.state.activeChain):!0,this.unsubscribe.push(f.j.subscribeNetworkImages(()=>{this.networkImage=y.$.getNetworkImage(this.network)}),g.W.subscribeKey("activeCaipAddress",h=>{this.caipAddress=h}),g.W.subscribeKey("activeCaipNetwork",h=>{this.network=h,this.networkImage=y.$.getNetworkImage(h),this.isSupported=h?.chainNamespace?g.W.checkIfSupportedNetwork(h.chainNamespace):!0,y.$.fetchNetworkImage(h?.assets?.imageId)}),$.W.subscribeKey("loading",h=>this.loading=h))}firstUpdated(){y.$.fetchNetworkImage(this.network?.assets?.imageId)}disconnectedCallback(){this.unsubscribe.forEach(h=>h())}render(){const h=this.network?g.W.checkIfSupportedNetwork(this.network.chainNamespace):!0;return(0,e.qy)` 121 <wui-network-button 122 .disabled=${!!(this.disabled||this.loading)} 123 .isUnsupportedChain=${W.H.state.allowUnsupportedChain?!1:!h} 124 imageSrc=${(0,m.J)(this.networkImage)} 125 @click=${this.onClick.bind(this)} 126 data-testid="w3m-network-button" 127 > 128 ${this.getLabel()} 129 <slot></slot> 130 </wui-network-button>
130 131 `}getLabel(){return this.network?!this.isSupported&&!W.H.state.allowUnsupportedChain?"Switch Network":this.network.name:this.label?this.label:this.caipAddress?"Unknown Network":"Select Network"}onClick(){this.loading||(C.E.sendEvent({type:"track",event:"CLICK_NETWORKS"}),$.W.open({view:"Networks"}))}};O(a,"W3mNetworkButtonBase");let s=a;s.styles=o,i([(0,d.MZ)({type:Boolean})],s.prototype,"disabled",void 0),i([(0,d.MZ)({type:String})],s.prototype,"label",void 0),i([(0,d.wk)()],s.prototype,"network",void 0),i([(0,d.wk)()],s.prototype,"networkImage",void 0),i([(0,d.wk)()],s.prototype,"caipAddress",void 0),i([(0,d.wk)()],s.prototype,"loading",void 0),i([(0,d.wk)()],s.prototype,"isSupported",void 0);let n=(l=class extends s{},O(l,"W3mNetworkButton2"),l);n=i([(0,w.EM)("w3m-network-button")],n);let r=(u=class extends s{},O(u,"AppKitNetworkButton2"),u);r=i([(0,w.EM)("appkit-network-button")],r)},36227(j,L,t){var C;t.d(L,{J:O(()=>f,"J")});var e=t(75826),d=t(59262),m=t(98229),g=t(17885),y=t(93289);const $=(0,g.AH)` 132 :host { 133 display: block; 134 width: inherit; 135 } 136`;var W=O(function(w,c,o,i){var s=arguments.length,n=s<3?c:i===null?i=Object.getOwnPropertyDescriptor(c,o):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(w,c,o,i);else for(var a=w.length-1;a>=0;a--)(r=w[a])&&(n=(s<3?r(n):s>3?r(c,o,n):r(c,o))||n);return s>3&&n&&Object.defineProperty(c,o,n),n},"__decorate");let f=(C=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.viewState=m.I.state.view,this.history=m.I.state.history.join(","),this.unsubscribe.push(m.I.subscribeKey("view",()=>{this.history=m.I.state.history.join(","),document.documentElement.style.setProperty("--apkt-duration-dynamic","var(--apkt-durations-lg)")}))}disconnectedCallback(){this.unsubscribe.forEach(c=>c()),document.documentElement.style.setProperty("--apkt-duration-dynamic","0s")}render(){return(0,e.qy)`${this.templatePageContainer()}`}templatePageContainer(){return(0,e.qy)`<w3m-router-container 137 history=${this.history} 138 .setView=${()=>{this.viewState=m.I.state.view}} 139 > 140 ${this.viewTemplate(this.viewState)} 141 </w3m-router-container>`}viewTemplate(c){switch(c){case"AccountSettings":return(0,e.qy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,e.qy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,e.qy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,e.qy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,e.qy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,e.qy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":return(0,e.qy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,e.qy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,e.qy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,e.qy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return(0,e.qy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,e.qy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,e.qy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,e.qy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,e.qy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"DataCapture":return(0,e.qy)`<w3m-data-capture-view></w3m-data-capture-view>`;case"DataCaptureOtpConfirm":return(0,e.qy)`<w3m-data-capture-otp-confirm-view></w3m-data-capture-otp-confirm-view>`;case"Downloads":return(0,e.qy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,e.qy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,e.qy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,e.qy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,e.qy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,e.qy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,e.qy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"ProfileWallets":return(0,e.qy)`<w3m-profile-wallets-view></w3m-profile-wallets-view>`;case"Transactions":return(0,e.qy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,e.qy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampTokenSelect":return(0,e.qy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,e.qy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,e.qy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,e.qy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,e.qy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,e.qy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,e.qy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,e.qy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,e.qy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,e.qy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,e.qy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,e.qy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,e.qy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WalletSendConfirmed":return(0,e.qy)`<w3m-send-confirmed-view></w3m-send-confirmed-view>`;case"WhatIsABuy":return(0,e.qy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,e.qy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,e.qy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,e.qy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,e.qy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,e.qy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,e.qy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,e.qy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,e.qy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,e.qy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,e.qy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,e.qy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,e.qy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,e.qy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,e.qy)`<w3m-pay-loading-view></w3m-pay-loading-view>`;case"PayQuote":return(0,e.qy)`<w3m-pay-quote-view></w3m-pay-quote-view>`;case"FundWallet":return(0,e.qy)`<w3m-fund-wallet-view></w3m-fund-wallet-view>`;case"PayWithExchange":return(0,e.qy)`<w3m-deposit-from-exchange-view></w3m-deposit-from-exchange-view>`;case"PayWithExchangeSelectAsset":return(0,e.qy)`<w3m-deposit-from-exchange-select-asset-view></w3m-deposit-from-exchange-select-asset-view>`;case"UsageExceeded":return(0,e.qy)`<w3m-usage-exceeded-view></w3m-usage-exceeded-view>`;case"SmartAccountSettings":return(0,e.qy)`<w3m-smart-account-settings-view></w3m-smart-account-settings-view>`;default:return(0,e.qy)`<w3m-connect-view></w3m-connect-view>`}}},O(C,"W3mRouter2"),C);f.styles=[$],W([(0,d.wk)()],f.prototype,"viewState",void 0),W([(0,d.wk)()],f.prototype,"history",void 0),f=W([(0,g.EM)("w3m-router")],f)},79631(j,L,t){var i;
141var e=t(75826),d=t(59262),m=t(93236),g=t(98229),y=t(65811),$=t(3469),W=t(40799),f=t(17885),C=t(39227),w=t(19832),c=O(function(s,n,r,a){var l=arguments.length,u=l<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,r):a,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(s,n,r,a);else for(var h=s.length-1;h>=0;h--)(v=s[h])&&(u=(l<3?v(u):l>3?v(n,r,u):v(n,r))||u);return l>3&&u&&Object.defineProperty(n,r,u),u},"__decorate");let o=(i=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=W.i.getConnectedSocialProvider(),this.socialUsername=W.i.getConnectedSocialUsername(),this.namespace=y.W.state.activeChain,this.unsubscribe.push(y.W.subscribeKey("activeChain",n=>{this.namespace=n}))}disconnectedCallback(){this.unsubscribe.forEach(n=>n())}render(){const n=$.a.getConnectorId(this.namespace),r=$.a.getAuthConnector();if(!r||n!==m.o.CONNECTOR_ID.AUTH)return this.style.cssText="display: none",null;const a=r.provider.getEmail()??"";return!a&&!this.socialUsername?(this.style.cssText="display: none",null):(0,e.qy)` 142 <wui-list-item 143 ?rounded=${!0} 144 icon=${this.socialProvider??"mail"} 145 data-testid="w3m-account-email-update" 146 ?chevron=${!this.socialProvider} 147 @click=${()=>{this.onGoToUpdateEmail(a,this.socialProvider)}} 148 > 149 <wui-text variant="lg-regular" color="primary">${this.getAuthName(a)}</wui-text> 150 </wui-list-item> 151 `}onGoToUpdateEmail(n,r){r||g.I.push("UpdateEmailWallet",{email:n,redirectView:"Account"})}getAuthName(n){return this.socialUsername?this.socialProvider==="discord"&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:n.length>30?`${n.slice(0,-3)}...`:n}},O(i,"W3mAccountAuthButton2"),i);c([(0,d.wk)()],o.prototype,"namespace",void 0),o=c([(0,f.EM)("w3m-account-auth-button")],o)},64915(j,L,t){var Y;var e=t(75826),d=t(59262),m=t(72430),g=t(93236),y=t(65811),$=t(86695),W=t(4436),f=t(3469),C=t(93982),w=t(65051),c=t(21321),o=t(98229),i=t(82741),s=t(50735),n=t(1056),r=t(4020),a=t(17885),l=t(58246),u=t(81679),v=t(34592),h=t(10174),p=t(16735),E=t(39227),b=t(16314),T=t(39583),I=t(15795),x=t(19832),P=t(45551),M=t(43071),R=t(79631);const k=(0,a.AH)` 152 wui-icon-link { 153 margin-right: calc(${({spacing:S})=>S[8]} * -1); 154 } 155 156 wui-notice-card { 157 margin-bottom: ${({spacing:S})=>S[1]}; 158 } 159 160 wui-list-item > wui-text { 161 flex: 1; 162 } 163 164 w3m-transactions-view { 165 max-height: 200px; 166 } 167 168 .balance-container { 169 display: inline; 170 } 171 172 .tab-content-container { 173 height: 300px; 174 overflow-y: auto; 175 overflow-x: hidden; 176 scrollbar-width: none; 177 } 178 179 .symbol { 180 transform: translateY(-2px); 181 } 182 183 .tab-content-container::-webkit-scrollbar {
184 display: none; 185 } 186 187 .account-button { 188 width: auto; 189 border: none; 190 display: flex; 191 align-items: center; 192 justify-content: center; 193 gap: ${({spacing:S})=>S[3]}; 194 height: 48px; 195 padding: ${({spacing:S})=>S[2]}; 196 padding-right: ${({spacing:S})=>S[3]}; 197 box-shadow: inset 0 0 0 1px ${({tokens:S})=>S.theme.foregroundPrimary}; 198 background-color: ${({tokens:S})=>S.theme.foregroundPrimary}; 199 border-radius: ${({borderRadius:S})=>S[6]}; 200 transition: background-color ${({durations:S})=>S.lg} 201 ${({easings:S})=>S["ease-out-power-2"]}; 202 } 203 204 .account-button:hover { 205 background-color: ${({tokens:S})=>S.core.glass010}; 206 } 207 208 .avatar-container { 209 position: relative; 210 } 211 212 wui-avatar.avatar { 213 width: 32px; 214 height: 32px; 215 box-shadow: 0 0 0 2px ${({tokens:S})=>S.core.glass010}; 216 } 217 218 wui-wallet-switch { 219 margin-top: ${({spacing:S})=>S[2]}; 220 } 221 222 wui-avatar.network-avatar { 223 width: 16px; 224 height: 16px; 225 position: absolute; 226 left: 100%; 227 top: 100%; 228 transform: translate(-75%, -75%); 229 box-shadow: 0 0 0 2px ${({tokens:S})=>S.core.glass010}; 230 } 231 232 .account-links { 233 display: flex; 234 justify-content: space-between; 235 align-items: center; 236 } 237 238 .account-links wui-flex { 239 cursor: pointer; 240 display: flex; 241 align-items: center; 242 justify-content: center; 243 flex: 1; 244 background: red; 245 align-items: center; 246 justify-content: center; 247 height: 48px; 248 padding: 10px; 249 flex: 1 0 0; 250 border-radius: var(--XS, 16px); 251 border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 252 background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); 253 transition: 254 background-color ${({durations:S})=>S.md} 255 ${({easings:S})=>S["ease-out-power-1"]}, 256 opacity ${({durations:S})=>S.md} ${({easings:S})=>S["ease-out-power-1"]}; 257 will-change: background-color, opacity; 258 } 259 260 .account-links wui-flex:hover { 261 background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); 262 } 263 264 .account-links wui-flex wui-icon { 265 width: var(--S, 20px); 266 height: var(--S, 20px); 267 } 268 269 .account-links wui-flex wui-icon svg path { 270 stroke: #667dff; 271 } 272`;var U=O(function(S,D,_,F){var z=arguments.length,Z=z<3?D:F===null?F=Object.getOwnPropertyDescriptor(D,_):F,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(S,D,_,F);else for(var J=S.length-1;J>=0;J--)(Q=S[J])&&(Z=(z<3?Q(Z):z>3?Q(D,_,Z):Q(D,_))||Z);return z>3&&Z&&Object.defineProperty(D,_,Z),Z},"__decorate");let B=(Y=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.caipAddress=y.W.getAccountData()?.caipAddress,this.address=$.w.getPlainAddress(y.W.getAccountData()?.caipAddress),this.profileImage=y.W.getAccountData()?.profileImage,this.profileName=y.W.getAccountData()?.profileName,this.disconnecting=!1,this.balance=y.W.getAccountData()?.balance,this.balanceSymbol=y.W.getAccountData()?.balanceSymbol,this.features=W.H.state.features,this.remoteFeatures=W.H.state.remoteFeatures,this.namespace=y.W.state.activeChain,this.activeConnectorIds=f.a.state.activeConnectorIds,this.unsubscribe.push(y.W.subscribeChainProp("accountState",D=>{this.address=$.w.getPlainAddress(D?.caipAddress),this.caipAddress=D?.caipAddress,this.balance=D?.balance,this.balanceSymbol=D?.balanceSymbol,this.profileName=D?.profileName,this.profileImage=D?.profileImage}),W.H.subscribeKey("features",D=>this.features=D),W.H.subscribeKey("remoteFeatures",D=>this.remoteFeatures=D),f.a.subscribeKey("activeConnectorIds",D=>{this.activeConnectorIds=D}),y.W.subscribeKey("activeChain",D=>this.namespace=D),y.W.subscribeKey("activeCaipNetwork",D=>{D?.chainNamespace&&(this.namespace=D?.chainNamespace)}))}disconnectedCallback(){this.unsubscribe.forEach(D=>D())}render(){if(!this.caipAddress||!this.namespace)return null;const D=this.activeConnectorIds[this.namespace],_=D?f.a.getConnectorById(D):void 0,F=C.$.getConnectorImage(_),{value:z,decimals:Z,symbol:Q}=$.w.parseBalance(this.balance,this.balanceSymbol);return(0,e.qy)`<wui-flex 273 flexDirection="column" 274 .padding=${["0","5","4","5"]} 275 alignItems="center" 276 gap="3" 277 > 278 <wui-avatar 279 alt=${(0,m.J)(this.caipAddress)} 280 address=${(0,m.J)($.w.getPlainAddress(this.caipAddress))} 281 imageSrc=${(0,m.J)(this.profileImage===null?void 0:this.profileImage)} 282 data-testid="single-account-avatar" 283 ></wui-avatar> 284 <wui-wallet-switch 285 profileName=${this.profileName} 286 address=${this.address} 287 imageSrc=${F} 288 alt=${_?.name} 289 @click=${this.onGoToProfileWalletsView.bind(this)} 290 data-testid="wui-wallet-switch" 291 ></wui-wallet-switch> 292 <div class="balance-container"> 293 <wui-text variant="h3-regular" color="primary">${z}</wui-text> 294 <wui-text variant="h3-regular" color="secondary">.${Z}</wui-text> 295 <wui-text variant="h6-medium" color="primary" class="symbol">${Q}</wui-text> 296 </div> 297 ${this.explorerBtnTemplate()} 298 </wui-flex> 299 300 <wui-flex flexDirection="column" gap="2" .padding=${["0","3","3","3"]}> 301 ${this.authCardTemplate()} <w3m-account-auth-button></w3m-account-auth-button> 302 ${this.orderedFeaturesTemplate()} ${this.activityTemplate()} 303 <wui-list-item 304 .rounded=${!0} 305 icon="power" 306 iconColor="error" 307 ?chevron=${!1} 308 .loading=${this.disconnecting} 309 .rightIcon=${!1} 310 @click=${this.onDisconnect.bind(this)} 311 data-testid="disconnect-button" 312 > 313 <wui-text variant="lg-regular" color="primary">Disconnect</wui-text> 314 </wui-list-item> 315 </wui-flex>`}fundWalletTemplate(){if(!this.namespace)return null;const D=w.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),_=!!this.features?.receive,F=this.remoteFeatures?.onramp&&D,z=c.g.isPayWithExchangeEnabled();return!F&&!_&&!z?null:(0,e.qy)` 316 <wui-list-item 317 .rounded=${!0} 318 data-testid="w3m-account-default-fund-wallet-button" 319 iconVariant="blue" 320 icon="dollar" 321 ?chevron=${!0}
322 @click=${this.handleClickFundWallet.bind(this)} 323 > 324 <wui-text variant="lg-regular" color="primary">Fund wallet</wui-text> 325 </wui-list-item> 326 `}orderedFeaturesTemplate(){return(this.features?.walletFeaturesOrder||w.oU.DEFAULT_FEATURES.walletFeaturesOrder).map(_=>{switch(_){case"onramp":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})}activityTemplate(){return this.namespace&&this.remoteFeatures?.activity&&w.oU.ACTIVITY_ENABLED_CHAIN_NAMESPACES.includes(this.namespace)?(0,e.qy)` <wui-list-item 327 .rounded=${!0} 328 icon="clock" 329 ?chevron=${!0} 330 @click=${this.onTransactions.bind(this)} 331 data-testid="w3m-account-default-activity-button" 332 > 333 <wui-text variant="lg-regular" color="primary">Activity</wui-text> 334 </wui-list-item>`:null}swapsTemplate(){const D=this.remoteFeatures?.swaps,_=y.W.state.activeChain===g.o.CHAIN.EVM;return!D||!_?null:(0,e.qy)` 335 <wui-list-item 336 .rounded=${!0} 337 icon="recycleHorizontal" 338 ?chevron=${!0} 339 @click=${this.handleClickSwap.bind(this)} 340 data-testid="w3m-account-default-swaps-button" 341 > 342 <wui-text variant="lg-regular" color="primary">Swap</wui-text> 343 </wui-list-item> 344 `}sendTemplate(){const D=this.features?.send,_=y.W.state.activeChain;if(!_)throw new Error("SendController:sendTemplate - namespace is required");const F=w.oU.SEND_SUPPORTED_NAMESPACES.includes(_);return!D||!F?null:(0,e.qy)` 345 <wui-list-item 346 .rounded=${!0} 347 icon="send" 348 ?chevron=${!0} 349 @click=${this.handleClickSend.bind(this)} 350 data-testid="w3m-account-default-send-button" 351 > 352 <wui-text variant="lg-regular" color="primary">Send</wui-text> 353 </wui-list-item> 354 `}authCardTemplate(){const D=y.W.state.activeChain;if(!D)throw new Error("AuthCardTemplate:authCardTemplate - namespace is required");const _=f.a.getConnectorId(D),F=f.a.getAuthConnector(),{origin:z}=location;return!F||_!==g.o.CONNECTOR_ID.AUTH||z.includes(w.oU.SECURE_SITE)?null:(0,e.qy)` 355 <wui-notice-card 356 @click=${this.onGoToUpgradeView.bind(this)} 357 label="Upgrade your wallet" 358 description="Transition to a self-custodial wallet" 359 icon="wallet" 360 data-testid="w3m-wallet-upgrade-card" 361 ></wui-notice-card> 362 `}handleClickFundWallet(){o.I.push("FundWallet")}handleClickSwap(){o.I.push("Swap")}handleClickSend(){o.I.push("WalletSend")}explorerBtnTemplate(){return y.W.getAccountData()?.addressExplorerUrl?(0,e.qy)` 363 <wui-button size="md" variant="accent-primary" @click=${this.onExplorer.bind(this)}> 364 <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon> 365 Block Explorer 366 <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon> 367 </wui-button> 368 `:null}onTransactions(){i.E.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:(0,s.lj)(y.W.state.activeChain)===M.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),o.I.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0;const _=n.x.getConnections(this.namespace).length>0,F=this.namespace&&f.a.state.activeConnectorIds[this.namespace],z=this.remoteFeatures?.multiWallet;await n.x.disconnect(z?{id:F,namespace:this.namespace}:{}),_&&z&&(o.I.push("ProfileWallets"),r.P.showSuccess("Wallet deleted"))}catch{i.E.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),r.P.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const D=y.W.getAccountData()?.addressExplorerUrl;D&&$.w.openHref(D,"_blank")}onGoToUpgradeView(){i.E.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),o.I.push("UpgradeEmailWallet")}onGoToProfileWalletsView(){o.I.push("ProfileWallets")}},O(Y,"W3mAccountDefaultWidget2"),Y);B.styles=k,U([(0,d.wk)()],B.prototype,"caipAddress",void 0),U([(0,d.wk)()],B.prototype,"address",void 0),U([(0,d.wk)()],B.prototype,"profileImage",void 0),U([(0,d.wk)()],B.prototype,"profileName",void 0),U([(0,d.wk)()],B.prototype,"disconnecting",void 0),U([(0,d.wk)()],B.prototype,"balance",void 0),U([(0,d.wk)()],B.prototype,"balanceSymbol",void 0),U([(0,d.wk)()],B.prototype,"features",void 0),U([(0,d.wk)()],B.prototype,"remoteFeatures",void 0),U([(0,d.wk)()],B.prototype,"namespace",void 0),U([(0,d.wk)()],B.prototype,"activeConnectorIds",void 0),B=U([(0,a.EM)("w3m-account-default-widget")],B)},94526(j,L,t){var z,Z,Q;
368var e=t(75826),d=t(59262),m=t(93236),g=t(65811),y=t(4436),$=t(3469),W=t(25967),f=t(65051),C=t(21321),w=t(86695),c=t(98229),o=t(82741),i=t(50735),s=t(40799),n=t(32873),r=t(17885),a=t(17903),l=t(81679),u=t(34592),v=t(39583),h=t(66532),p=t(45551),E=t(43071),b=t(43435),T=t(28937);const I=(0,e.AH)` 369 :host { 370 width: 100%; 371 max-height: 280px; 372 overflow: scroll; 373 scrollbar-width: none; 374 } 375 376 :host::-webkit-scrollbar { 377 display: none; 378 } 379`;var x=O(function(J,A,K,H){var V=arguments.length,N=V<3?A:H===null?H=Object.getOwnPropertyDescriptor(A,K):H,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(J,A,K,H);else for(var X=J.length-1;X>=0;X--)(G=J[X])&&(N=(V<3?G(N):V>3?G(A,K,N):G(A,K))||N);return V>3&&N&&Object.defineProperty(A,K,N),N},"__decorate");let P=(z=class extends e.WF{render(){return(0,e.qy)`<w3m-activity-list page="account"></w3m-activity-list>`}},O(z,"W3mAccountActivityWidget2"),z);P.styles=I,P=x([(0,r.EM)("w3m-account-activity-widget")],P);var M=t(57484),R=t(57583);const k=(0,e.AH)` 380 :host { 381 width: 100%; 382 } 383 384 wui-flex { 385 width: 100%; 386 } 387 388 .contentContainer { 389 max-height: 280px; 390 overflow: scroll; 391 scrollbar-width: none; 392 } 393 394 .contentContainer::-webkit-scrollbar {
395 display: none; 396 } 397`;var U=O(function(J,A,K,H){var V=arguments.length,N=V<3?A:H===null?H=Object.getOwnPropertyDescriptor(A,K):H,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(J,A,K,H);else for(var X=J.length-1;X>=0;X--)(G=J[X])&&(N=(V<3?G(N):V>3?G(A,K,N):G(A,K))||N);return V>3&&N&&Object.defineProperty(A,K,N),N},"w3m_account_tokens_widget_decorate");let B=(Z=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=g.W.getAccountData()?.tokenBalance,this.remoteFeatures=y.H.state.remoteFeatures,this.unsubscribe.push(g.W.subscribeChainProp("accountState",A=>{this.tokenBalance=A?.tokenBalance}),y.H.subscribeKey("remoteFeatures",A=>{this.remoteFeatures=A}))}disconnectedCallback(){this.unsubscribe.forEach(A=>A())}render(){return(0,e.qy)`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?(0,e.qy)`<wui-flex class="contentContainer" flexDirection="column" gap="2"> 398 ${this.tokenItemTemplate()} 399 </wui-flex>`:(0,e.qy)` <wui-flex flexDirection="column"> 400 ${this.onRampTemplate()} 401 <wui-list-description 402 @click=${this.onReceiveClick.bind(this)} 403 text="Receive funds" 404 description="Scan the QR code and receive funds" 405 icon="qrCode" 406 iconColor="fg-200" 407 iconBackgroundColor="fg-200" 408 data-testid="w3m-account-receive-button" 409 ></wui-list-description 410 ></wui-flex>`}onRampTemplate(){return this.remoteFeatures?.onramp?(0,e.qy)`<wui-list-description 411 @click=${this.onBuyClick.bind(this)} 412 text="Buy Crypto" 413 description="Easy with card or bank account" 414 icon="card" 415 iconColor="success-100" 416 iconBackgroundColor="success-100" 417 tag="popular" 418 data-testid="w3m-account-onramp-button" 419 ></wui-list-description>`:(0,e.qy)``}tokenItemTemplate(){return this.tokenBalance?.map(A=>(0,e.qy)`<wui-list-token 420 tokenName=${A.name} 421 tokenImageUrl=${A.iconUrl} 422 tokenAmount=${A.quantity.numeric} 423 tokenValue=${A.value} 424 tokenCurrency=${A.symbol} 425 ></wui-list-token>`)}onReceiveClick(){c.I.push("WalletReceive")}onBuyClick(){o.E.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:(0,i.lj)(g.W.state.activeChain)===E.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),c.I.push("OnRampProviders")}},O(Z,"W3mAccountTokensWidget2"),Z);B.styles=k,U([(0,d.wk)()],B.prototype,"tokenBalance",void 0),U([(0,d.wk)()],B.prototype,"remoteFeatures",void 0),B=U([(0,r.EM)("w3m-account-tokens-widget")],B);var Y=t(64911),S=t(60060);const D=(0,r.AH)` 426 wui-flex { 427 width: 100%; 428 } 429 430 wui-promo { 431 position: absolute; 432 top: -32px; 433 } 434 435 wui-profile-button { 436 margin-top: calc(-1 * ${({spacing:J})=>J[4]}); 437 } 438 439 wui-promo + wui-profile-button { 440 margin-top: ${({spacing:J})=>J[4]}; 441 } 442 443 wui-tabs { 444 width: 100%; 445 } 446 447 .contentContainer { 448 height: 280px; 449 } 450 451 .contentContainer > wui-icon-box { 452 width: 40px; 453 height: 40px; 454 border-radius: ${({borderRadius:J})=>J[3]}; 455 } 456 457 .contentContainer > .textContent { 458 width: 65%; 459 } 460`;var _=O(function(J,A,K,H){var V=arguments.length,N=V<3?A:H===null?H=Object.getOwnPropertyDescriptor(A,K):H,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(J,A,K,H);else for(var X=J.length-1;X>=0;X--)(G=J[X])&&(N=(V<3?G(N):V>3?G(A,K,N):G(A,K))||N);return V>3&&N&&Object.defineProperty(A,K,N),N},"w3m_account_wallet_features_widget_decorate");let F=(Q=class extends e.WF{constructor(){super(...arguments),this.unsubscribe=[],this.network=g.W.state.activeCaipNetwork,this.profileName=g.W.getAccountData()?.profileName,this.address=g.W.getAccountData()?.address,this.currentTab=g.W.getAccountData()?.currentTab,this.tokenBalance=g.W.getAccountData()?.tokenBalance,this.features=y.H.state.features,this.namespace=g.W.state.activeChain,this.activeConnectorIds=$.a.state.activeConnectorIds,this.remoteFeatures=y.H.state.remoteFeatures}firstUpdated(){g.W.fetchTokenBalance(),this.unsubscribe.push(g.W.subscribeChainProp("accountState",A=>{A?.address?(this.address=A.address,this.profileName=A.profileName,this.currentTab=A.currentTab,this.tokenBalance=A.tokenBalance):W.W.close()}),$.a.subscribeKey("activeConnectorIds",A=>{this.activeConnectorIds=A}),g.W.subscribeKey("activeChain",A=>this.namespace=A),g.W.subscribeKey("activeCaipNetwork",A=>this.network=A),y.H.subscribeKey("features",A=>this.features=A),y.H.subscribeKey("remoteFeatures",A=>this.remoteFeatures=A)),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach(A=>A()),clearInterval(this.watchTokenBalance)}
460render(){if(!this.address)throw new Error("w3m-account-features-widget: No account provided");if(!this.namespace)return null;const A=this.activeConnectorIds[this.namespace],K=A?$.a.getConnectorById(A):void 0,{icon:H,iconSize:V}=this.getAuthData();return(0,e.qy)`<wui-flex 461 flexDirection="column" 462 .padding=${["0","3","4","3"]} 463 alignItems="center" 464 gap="4" 465 data-testid="w3m-account-wallet-features-widget" 466 > 467 <wui-flex flexDirection="column" justifyContent="center" alignItems="center" gap="2"> 468 <wui-wallet-switch 469 profileName=${this.profileName} 470 address=${this.address} 471 icon=${H} 472 iconSize=${V} 473 alt=${K?.name} 474 @click=${this.onGoToProfileWalletsView.bind(this)} 475 data-testid="wui-wallet-switch" 476 ></wui-wallet-switch> 477 478 ${this.tokenBalanceTemplate()} 479 </wui-flex> 480 ${this.orderedWalletFeatures()} ${this.tabsTemplate()} ${this.listContentTemplate()} 481 </wui-flex>`}orderedWalletFeatures(){const A=this.features?.walletFeaturesOrder||f.oU.DEFAULT_FEATURES.walletFeaturesOrder;if(A.every(N=>N==="send"||N==="receive"?!this.features?.[N]:N==="swaps"||N==="onramp"?!this.remoteFeatures?.[N]:!0))return null;const H=A.map(N=>N==="receive"||N==="onramp"?"fund":N),V=[...new Set(H)];return(0,e.qy)`<wui-flex gap="2"> 482 ${V.map(N=>{switch(N){case"fund":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})} 483 </wui-flex>`}fundWalletTemplate(){if(!this.namespace)return null;const A=f.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),K=this.features?.receive,H=this.remoteFeatures?.onramp&&A,V=C.g.isPayWithExchangeEnabled();return!H&&!K&&!V?null:(0,e.qy)` 484 <w3m-tooltip-trigger text="Fund wallet"> 485 <wui-button 486 data-testid="wallet-features-fund-wallet-button" 487 @click=${this.onFundWalletClick.bind(this)} 488 variant="accent-secondary" 489 size="lg" 490 fullWidth 491 > 492 <wui-icon name="dollar"></wui-icon> 493 </wui-button> 494 </w3m-tooltip-trigger> 495 `}swapsTemplate(){const A=this.remoteFeatures?.swaps,K=g.W.state.activeChain===m.o.CHAIN.EVM;return!A||!K?null:(0,e.qy)` 496 <w3m-tooltip-trigger text="Swap"> 497 <wui-button 498 fullWidth 499 data-testid="wallet-features-swaps-button" 500 @click=${this.onSwapClick.bind(this)} 501 variant="accent-secondary" 502 size="lg" 503 > 504 <wui-icon name="recycleHorizontal"></wui-icon> 505 </wui-button> 506 </w3m-tooltip-trigger> 507 `}sendTemplate(){const A=this.features?.send,K=g.W.state.activeChain,H=f.oU.SEND_SUPPORTED_NAMESPACES.includes(K);return!A||!H?null:(0,e.qy)` 508 <w3m-tooltip-trigger text="Send"> 509 <wui-button 510 fullWidth 511 data-testid="wallet-features-send-button" 512 @click=${this.onSendClick.bind(this)} 513 variant="accent-secondary" 514 size="lg" 515 > 516 <wui-icon name="send"></wui-icon> 517 </wui-button> 518 </w3m-tooltip-trigger> 519 `}watchSwapValues(){this.watchTokenBalance=setInterval(()=>g.W.fetchTokenBalance(A=>this.onTokenBalanceError(A)),1e4)}onTokenBalanceError(A){A instanceof Error&&A.cause instanceof Response&&A.cause.status===m.o.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE&&clearInterval(this.watchTokenBalance)}listContentTemplate(){return this.currentTab===0?(0,e.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:this.currentTab===1?(0,e.qy)`<w3m-account-activity-widget></w3m-account-activity-widget>`:(0,e.qy)`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){const A=w.w.calculateBalance(this.tokenBalance),{dollars:K="0",pennies:H="00"}=w.w.formatTokenBalance(A);return(0,e.qy)`<wui-balance dollars=${K} pennies=${H}></wui-balance>`}return(0,e.qy)`<wui-balance dollars="0" pennies="00"></wui-balance>`}tabsTemplate(){const A=b.y.getTabsByNamespace(g.W.state.activeChain);return A.length===0?null:(0,e.qy)`<wui-tabs 520 .onTabChange=${this.onTabChange.bind(this)} 521 .activeTab=${this.currentTab} 522 .tabs=${A} 523 ></wui-tabs>`}onTabChange(A){g.W.setAccountProp("currentTab",A,this.namespace)}onFundWalletClick(){c.I.push("FundWallet")}onSwapClick(){this.network?.caipNetworkId&&!f.oU.SWAP_SUPPORTED_NETWORKS.includes(this.network?.caipNetworkId)?c.I.push("UnsupportedChain",{swapUnsupportedChain:!0}):(o.E.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,i.lj)(g.W.state.activeChain)===E.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),c.I.push("Swap"))}getAuthData(){const A=s.i.getConnectedSocialProvider(),K=s.i.getConnectedSocialUsername(),V=$.a.getAuthConnector()?.provider.getEmail()??"";return{name:n.g.getAuthName({email:V,socialUsername:K,socialProvider:A}),icon:A??"mail",iconSize:A?"xl":"md"}}onGoToProfileWalletsView(){c.I.push("ProfileWallets")}onSendClick(){o.E.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,i.lj)(g.W.state.activeChain)===E.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),c.I.push("WalletSend")}},O(Q,"W3mAccountWalletFeaturesWidget2"),Q);F.styles=D,_([(0,d.wk)()],F.prototype,"watchTokenBalance",void 0),_([(0,d.wk)()],F.prototype,"network",void 0),_([(0,d.wk)()],F.prototype,"profileName",void 0),_([(0,d.wk)()],F.prototype,"address",void 0),_([(0,d.wk)()],F.prototype,"currentTab",void 0),_([(0,d.wk)()],F.prototype,"tokenBalance",void 0),_([(0,d.wk)()],F.prototype,"features",void 0),_([(0,d.wk)()],F.prototype,"namespace",void 0),_([(0,d.wk)()],F.prototype,"activeConnectorIds",void 0),_([(0,d.wk)()],F.prototype,"remoteFeatures",void 0),F=_([(0,r.EM)("w3m-account-wallet-features-widget")],F)},28937(j,L,t){var b;
523var e=t(75826),d=t(59262),m=t(69421),g=t(65811),y=t(94065),$=t(86695),W=t(98229),f=t(4436),C=t(82741),w=t(50735),c=t(17885),o=t(34592),i=t(83554),s=t(36083),n=t(19832),r=t(61253),a=t(14532),l=t(43071);const u=(0,c.AH)` 524 :host { 525 min-height: 100%; 526 } 527 528 .group-container[last-group='true'] { 529 padding-bottom: ${({spacing:T})=>T[3]}; 530 } 531 532 .contentContainer { 533 height: 280px; 534 } 535 536 .contentContainer > wui-icon-box { 537 width: 40px; 538 height: 40px; 539 border-radius: ${({borderRadius:T})=>T[3]}; 540 } 541 542 .contentContainer > .textContent { 543 width: 65%; 544 } 545 546 .emptyContainer { 547 height: 100%; 548 } 549`;var v=O(function(T,I,x,P){var M=arguments.length,R=M<3?I:P===null?P=Object.getOwnPropertyDescriptor(I,x):P,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(T,I,x,P);else for(var U=T.length-1;U>=0;U--)(k=T[U])&&(R=(M<3?k(R):M>3?k(I,x,R):k(I,x))||R);return M>3&&R&&Object.defineProperty(I,x,R),R},"__decorate");const h="last-transaction",p=7;let E=(b=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=g.W.state.activeCaipAddress,this.transactionsByYear=y.W.state.transactionsByYear,this.loading=y.W.state.loading,this.empty=y.W.state.empty,this.next=y.W.state.next,y.W.clearCursor(),this.unsubscribe.push(g.W.subscribeKey("activeCaipAddress",I=>{I&&this.caipAddress!==I&&(y.W.resetTransactions(),y.W.fetchTransactions(I)),this.caipAddress=I}),g.W.subscribeKey("activeCaipNetwork",()=>{this.updateTransactionView()}),y.W.subscribe(I=>{this.transactionsByYear=I.transactionsByYear,this.loading=I.loading,this.empty=I.empty,this.next=I.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(I=>I())}render(){return(0,e.qy)` ${this.empty?null:this.templateTransactionsByYear()} 550 ${this.loading?this.templateLoading():null} 551 ${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){y.W.resetTransactions(),this.caipAddress&&y.W.fetchTransactions($.w.getPlainAddress(this.caipAddress))}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(x=>{const P=parseInt(x,10),M=new Array(12).fill(null).map((R,k)=>{const U=c.tt.getTransactionGroupTitle(P,k),B=this.transactionsByYear[P]?.[k];return{groupTitle:U,transactions:B}}).filter(({transactions:R})=>R).reverse();return M.map(({groupTitle:R,transactions:k},U)=>{const B=U===M.length-1;return k?(0,e.qy)` 552 <wui-flex 553 flexDirection="column" 554 class="group-container" 555 last-group="${B?"true":"false"}" 556 data-testid="month-indexes" 557 > 558 <wui-flex 559 alignItems="center" 560 flexDirection="row" 561 .padding=${["2","3","3","3"]} 562 > 563 <wui-text variant="md-medium" color="secondary" data-testid="group-title"> 564 ${R} 565 </wui-text> 566 </wui-flex> 567 <wui-flex flexDirection="column" gap="2"> 568 ${this.templateTransactions(k,B)} 569 </wui-flex> 570 </wui-flex> 571 `:null})})}templateRenderTransaction(I,x){const{date:P,descriptions:M,direction:R,images:k,status:U,type:B,transfers:Y,isAllNFT:S}=this.getTransactionListItemProps(I);return(0,e.qy)` 572 <wui-transaction-list-item 573 date=${P} 574 .direction=${R} 575 id=${x&&this.next?h:""} 576 status=${U} 577 type=${B} 578 .images=${k} 579 .onlyDirectionIcon=${S||Y.length===1} 580 .descriptions=${M} 581 ></wui-transaction-list-item> 582 `}templateTransactions(I,x){return I.map((P,M)=>{const R=x&&M===I.length-1;return(0,e.qy)`${this.templateRenderTransaction(P,R)}`})}emptyStateActivity(){return(0,e.qy)`<wui-flex 583 class="emptyContainer" 584 flexGrow="1" 585 flexDirection="column" 586 justifyContent="center" 587 alignItems="center" 588 .padding=${["10","5","10","5"]} 589 gap="5" 590 data-testid="empty-activity-state" 591 > 592 <wui-icon-box color="default" icon="wallet" size="xl"></wui-icon-box> 593 <wui-flex flexDirection="column" alignItems="center" gap="2"> 594 <wui-text align="center" variant="lg-medium" color="primary">No Transactions yet</wui-text> 595 <wui-text align="center" variant="lg-regular" color="secondary" 596 >Start trading on dApps <br /> 597 to grow your wallet!</wui-text 598 > 599 </wui-flex> 600 </wui-flex>`}emptyStateAccount(){return(0,e.qy)`<wui-flex 601 class="contentContainer" 602 alignItems="center" 603 justifyContent="center" 604 flexDirection="column" 605 gap="4" 606 data-testid="empty-account-state" 607 > 608 <wui-icon-box icon="swapHorizontal" size="lg" color="default"></wui-icon-box> 609 <wui-flex 610 class="textContent" 611 gap="2" 612 flexDirection="column" 613 justifyContent="center" 614 flexDirection="column" 615 > 616 <wui-text variant="md-regular" align="center" color="primary">No activity yet</wui-text> 617 <wui-text variant="sm-regular" align="center" color="secondary" 618 >Your next transactions will appear here</wui-text 619 > 620 </wui-flex> 621 <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link> 622 </wui-flex>`}templateEmpty(){return this.page==="account"?(0,e.qy)`${this.emptyStateAccount()}`:(0,e.qy)`${this.emptyStateActivity()}`}
622templateLoading(){return this.page==="activity"?(0,e.qy)` <wui-flex flexDirection="column" width="100%"> 623 <wui-flex .padding=${["2","3","3","3"]}> 624 <wui-shimmer width="70px" height="16px" rounded></wui-shimmer> 625 </wui-flex> 626 <wui-flex flexDirection="column" gap="2" width="100%"> 627 ${Array(p).fill((0,e.qy)` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(I=>I)} 628 </wui-flex> 629 </wui-flex>`:null}onReceiveClick(){W.I.push("WalletReceive")}createPaginationObserver(){const{projectId:I}=f.H.state;this.paginationObserver=new IntersectionObserver(([x])=>{x?.isIntersecting&&!this.loading&&(y.W.fetchTransactions($.w.getPlainAddress(this.caipAddress)),C.E.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:$.w.getPlainAddress(this.caipAddress),projectId:I,cursor:this.next,isSmartAccount:(0,w.lj)(g.W.state.activeChain)===l.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();const I=this.shadowRoot?.querySelector(`#${h}`);I&&this.paginationObserver?.observe(I)}getTransactionListItemProps(I){const x=m.r.formatDate(I?.metadata?.minedAt),P=c.tt.mergeTransfers(I?.transfers||[]),M=c.tt.getTransactionDescriptions(I,P),R=P?.[0],k=!!R&&P?.every(B=>!!B.nft_info),U=c.tt.getTransactionImages(P);return{date:x,direction:R?.direction,descriptions:M,isAllNFT:k,images:U,status:I.metadata?.status,transfers:P,type:I.metadata?.operationType}}},O(b,"W3mActivityList2"),b);E.styles=u,v([(0,d.MZ)()],E.prototype,"page",void 0),v([(0,d.wk)()],E.prototype,"caipAddress",void 0),v([(0,d.wk)()],E.prototype,"transactionsByYear",void 0),v([(0,d.wk)()],E.prototype,"loading",void 0),v([(0,d.wk)()],E.prototype,"empty",void 0),v([(0,d.wk)()],E.prototype,"next",void 0),E=v([(0,c.EM)("w3m-activity-list")],E)},28362(j,L,t){var r;var e=t(75826),d=t(59262),m=t(72430),g=t(93982),y=t(82741),$=t(98229),W=t(17885),f=t(34592),C=t(10174),w=t(9220),c=t(19832),o=t(4570);const i=(0,W.AH)` 630 button { 631 display: flex; 632 flex-direction: column; 633 justify-content: center; 634 align-items: center; 635 cursor: pointer; 636 width: 104px; 637 row-gap: ${({spacing:a})=>a[2]}; 638 padding: ${({spacing:a})=>a[3]} ${({spacing:a})=>a[0]}; 639 background-color: ${({tokens:a})=>a.theme.foregroundPrimary}; 640 border-radius: clamp(0px, ${({borderRadius:a})=>a[4]}, 20px); 641 transition: 642 color ${({durations:a})=>a.lg} ${({easings:a})=>a["ease-out-power-1"]}, 643 background-color ${({durations:a})=>a.lg} 644 ${({easings:a})=>a["ease-out-power-1"]}, 645 border-radius ${({durations:a})=>a.lg} 646 ${({easings:a})=>a["ease-out-power-1"]}; 647 will-change: background-color, color, border-radius; 648 outline: none; 649 border: none; 650 } 651 652 button > wui-flex > wui-text { 653 color: ${({tokens:a})=>a.theme.textPrimary}; 654 max-width: 86px; 655 white-space: nowrap; 656 overflow: hidden; 657 text-overflow: ellipsis; 658 justify-content: center; 659 } 660 661 button > wui-flex > wui-text.certified { 662 max-width: 66px; 663 } 664 665 @media (hover: hover) and (pointer: fine) { 666 button:hover:enabled { 667 background-color: ${({tokens:a})=>a.theme.foregroundSecondary}; 668 } 669 } 670 671 button:disabled > wui-flex > wui-text { 672 color: ${({tokens:a})=>a.core.glass010}; 673 } 674 675 [data-selected='true'] { 676 background-color: ${({colors:a})=>a.accent020}; 677 } 678 679 @media (hover: hover) and (pointer: fine) { 680 [data-selected='true']:hover:enabled { 681 background-color: ${({colors:a})=>a.accent010}; 682 } 683 } 684 685 [data-selected='true']:active:enabled { 686 background-color: ${({colors:a})=>a.accent010}; 687 } 688 689 @media (max-width: 350px) { 690 button { 691 width: 100%; 692 } 693 } 694`;var s=O(function(a,l,u,v){var h=arguments.length,p=h<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,u):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,l,u,v);else for(var b=a.length-1;b>=0;b--)(E=a[b])&&(p=(h<3?E(p):h>3?E(l,u,p):E(l,u))||p);return h>3&&p&&Object.defineProperty(l,u,p),p},"__decorate");let n=(r=class extends e.WF{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(l=>{l.forEach(u=>{u.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){const l=this.wallet?.badge_type==="certified";return(0,e.qy)` 695 <button> 696 ${this.imageTemplate()} 697 <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="1"> 698 <wui-text 699 variant="md-regular" 700 color="inherit" 701 class=${(0,m.J)(l?"certified":void 0)} 702 >${this.wallet?.name}</wui-text 703 > 704 ${l?(0,e.qy)`<wui-icon size="sm" name="walletConnectBrown"></wui-icon>`:null} 705 </wui-flex> 706 </button> 707 `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():(0,e.qy)` 708 <wui-wallet-image 709 size="lg" 710 imageSrc=${(0,m.J)(this.imageSrc)}
711 name=${(0,m.J)(this.wallet?.name)} 712 .installed=${this.wallet?.installed??!1} 713 badgeSize="sm" 714 > 715 </wui-wallet-image> 716 `}shimmerTemplate(){return(0,e.qy)`<wui-shimmer width="56px" height="56px"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=g.$.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await g.$.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){!this.wallet||this.isImpressed||(this.isImpressed=!0,y.E.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:$.I.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}},O(r,"W3mAllWalletsListItem2"),r);n.styles=i,s([(0,d.wk)()],n.prototype,"visible",void 0),s([(0,d.wk)()],n.prototype,"imageSrc",void 0),s([(0,d.wk)()],n.prototype,"imageLoading",void 0),s([(0,d.wk)()],n.prototype,"isImpressed",void 0),s([(0,d.MZ)()],n.prototype,"explorerId",void 0),s([(0,d.MZ)()],n.prototype,"walletQuery",void 0),s([(0,d.MZ)()],n.prototype,"certified",void 0),s([(0,d.MZ)()],n.prototype,"displayIndex",void 0),s([(0,d.MZ)({type:Object})],n.prototype,"wallet",void 0),n=s([(0,W.EM)("w3m-all-wallets-list-item")],n)},24320(j,L,t){var r;var e=t(75826),d=t(59262),m=t(72430),g=t(27546),y=t(4436),$=t(13777),W=t(3469),f=t(17885),C=t(32080),w=t(72099),c=t(28362);const o=(0,f.AH)` 717 wui-grid { 718 max-height: clamp(360px, 400px, 80vh); 719 overflow: scroll; 720 scrollbar-width: none; 721 grid-auto-rows: min-content; 722 grid-template-columns: repeat(auto-fill, 104px); 723 } 724 725 :host([data-mobile-fullscreen='true']) wui-grid { 726 max-height: none; 727 } 728 729 @media (max-width: 350px) { 730 wui-grid { 731 grid-template-columns: repeat(2, 1fr); 732 } 733 } 734 735 wui-grid[data-scroll='false'] { 736 overflow: hidden; 737 } 738 739 wui-grid::-webkit-scrollbar {
740 display: none; 741 } 742 743 w3m-all-wallets-list-item { 744 opacity: 0; 745 animation-duration: ${({durations:a})=>a.xl}; 746 animation-timing-function: ${({easings:a})=>a["ease-inout-power-2"]}; 747 animation-name: fade-in; 748 animation-fill-mode: forwards; 749 } 750 751 @keyframes fade-in { 752 from { 753 opacity: 0; 754 } 755 to { 756 opacity: 1; 757 } 758 } 759 760 wui-loading-spinner { 761 padding-top: ${({spacing:a})=>a[4]}; 762 padding-bottom: ${({spacing:a})=>a[4]}; 763 justify-content: center; 764 grid-column: 1 / span 4; 765 } 766`;var i=O(function(a,l,u,v){var h=arguments.length,p=h<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,u):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,l,u,v);else for(var b=a.length-1;b>=0;b--)(E=a[b])&&(p=(h<3?E(p):h>3?E(l,u,p):E(l,u))||p);return h>3&&p&&Object.defineProperty(l,u,p),p},"__decorate");const s="local-paginator";let n=(r=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!g.N.state.wallets.length,this.wallets=g.N.state.wallets,this.mobileFullScreen=y.H.state.enableMobileFullScreen,this.unsubscribe.push(g.N.subscribeKey("wallets",l=>this.wallets=l))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(l=>l()),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,e.qy)` 767 <wui-grid 768 data-scroll=${!this.loading} 769 .padding=${["0","3","3","3"]} 770 gap="2" 771 justifyContent="space-between" 772 > 773 ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} 774 ${this.paginationLoaderTemplate()} 775 </wui-grid> 776 `}async initialFetch(){this.loading=!0;const l=this.shadowRoot?.querySelector("wui-grid");l&&(await g.N.fetchWalletsByPage({page:1}),await l.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,l.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(l,u){return[...Array(l)].map(()=>(0,e.qy)` 777 <wui-card-select-loader type="wallet" id=${(0,m.J)(u)}></wui-card-select-loader> 778 `)}walletsTemplate(){return $.A.getWalletConnectWallets(this.wallets).map((l,u)=>(0,e.qy)` 779 <w3m-all-wallets-list-item 780 data-testid="wallet-search-item-${l.id}" 781 @click=${()=>this.onConnectWallet(l)} 782 .wallet=${l} 783 explorerId=${l.id} 784 certified=${this.badge==="certified"} 785 displayIndex=${u} 786 ></w3m-all-wallets-list-item> 787 `)}paginationLoaderTemplate(){const{wallets:l,recommended:u,featured:v,count:h,mobileFilteredOutWalletsLength:p}=g.N.state,E=window.innerWidth<352?3:4,b=l.length+u.length;let I=Math.ceil(b/E)*E-b+E;return I-=l.length?v.length%E:0,h===0&&v.length>0?null:h===0||[...v,...l,...u].length<h-(p??0)?this.shimmerTemplate(I,s):null}createPaginationObserver(){const l=this.shadowRoot?.querySelector(`#${s}`);l&&(this.paginationObserver=new IntersectionObserver(([u])=>{if(u?.isIntersecting&&!this.loading){const{page:v,count:h,wallets:p}=g.N.state;p.length<h&&g.N.fetchWalletsByPage({page:v+1})}}),this.paginationObserver.observe(l))}onConnectWallet(l){W.a.selectWalletConnector(l)}},O(r,"W3mAllWalletsList2"),r);n.styles=o,i([(0,d.wk)()],n.prototype,"loading",void 0),i([(0,d.wk)()],n.prototype,"wallets",void 0),i([(0,d.wk)()],n.prototype,"badge",void 0),i([(0,d.wk)()],n.prototype,"mobileFullScreen",void 0),n=i([(0,f.EM)("w3m-all-wallets-list")],n)},66960(j,L,t){var a;var e=t(75826),d=t(59262),m=t(4436),g=t(27546),y=t(13777),$=t(3469),W=t(17885),f=t(34592),C=t(72099),w=t(83554),c=t(3411),o=t(19832),i=t(28362);const s=(0,e.AH)` 788 wui-grid, 789 wui-loading-spinner, 790 wui-flex { 791 height: 360px; 792 } 793 794 wui-grid { 795 overflow: scroll; 796 scrollbar-width: none; 797 grid-auto-rows: min-content; 798 grid-template-columns: repeat(auto-fill, 104px); 799 } 800 801 :host([data-mobile-fullscreen='true']) wui-grid { 802 max-height: none; 803 height: auto; 804 } 805 806 wui-grid[data-scroll='false'] { 807 overflow: hidden; 808 } 809 810 wui-grid::-webkit-scrollbar {
811 display: none; 812 } 813 814 wui-loading-spinner { 815 justify-content: center; 816 align-items: center; 817 } 818 819 @media (max-width: 350px) { 820 wui-grid { 821 grid-template-columns: repeat(2, 1fr); 822 } 823 } 824`;var n=O(function(l,u,v,h){var p=arguments.length,E=p<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,v):h,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,u,v,h);else for(var T=l.length-1;T>=0;T--)(b=l[T])&&(E=(p<3?b(E):p>3?b(u,v,E):b(u,v))||E);return p>3&&E&&Object.defineProperty(u,v,E),E},"__decorate");let r=(a=class extends e.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=m.H.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,e.qy)`<wui-loading-spinner color="accent-primary"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await g.N.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:u}=g.N.state,v=y.A.markWalletsAsInstalled(u),h=y.A.filterWalletsByWcSupport(v);return h.length?(0,e.qy)` 825 <wui-grid 826 data-testid="wallet-list" 827 .padding=${["0","3","3","3"]} 828 rowGap="4" 829 columngap="2" 830 justifyContent="space-between" 831 > 832 ${h.map((p,E)=>(0,e.qy)` 833 <w3m-all-wallets-list-item 834 @click=${()=>this.onConnectWallet(p)} 835 .wallet=${p} 836 data-testid="wallet-search-item-${p.id}" 837 explorerId=${p.id} 838 certified=${this.badge==="certified"} 839 walletQuery=${this.query} 840 displayIndex=${E} 841 ></w3m-all-wallets-list-item> 842 `)} 843 </wui-grid> 844 `:(0,e.qy)` 845 <wui-flex 846 data-testid="no-wallet-found" 847 justifyContent="center" 848 alignItems="center" 849 gap="3" 850 flexDirection="column" 851 > 852 <wui-icon-box size="lg" color="default" icon="wallet"></wui-icon-box> 853 <wui-text data-testid="no-wallet-found-text" color="secondary" variant="md-medium"> 854 No Wallet found 855 </wui-text> 856 </wui-flex> 857 `}onConnectWallet(u){$.a.selectWalletConnector(u)}},O(a,"W3mAllWalletsSearch2"),a);r.styles=s,n([(0,d.wk)()],r.prototype,"loading",void 0),n([(0,d.wk)()],r.prototype,"mobileFullScreen",void 0),n([(0,d.MZ)()],r.prototype,"query",void 0),n([(0,d.MZ)()],r.prototype,"badge",void 0),r=n([(0,W.EM)("w3m-all-wallets-search")],r)},82811(j,L,t){var r;var e=t(75826),d=t(59262),m=t(72430),g=t(93236),y=t(98229),$=t(1056),W=t(3469),f=t(27546),C=t(4436),w=t(82741),c=t(86695),o=t(17885),i=t(77825),s=O(function(a,l,u,v){var h=arguments.length,p=h<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,u):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,l,u,v);else for(var b=a.length-1;b>=0;b--)(E=a[b])&&(p=(h<3?E(p):h>3?E(l,u,p):E(l,u))||p);return h>3&&p&&Object.defineProperty(l,u,p),p},"__decorate");let n=(r=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=W.a.state.connectors,this.count=f.N.state.count,this.filteredCount=f.N.state.filteredWallets.length,this.isFetchingRecommendedWallets=f.N.state.isFetchingRecommendedWallets,this.unsubscribe.push(W.a.subscribeKey("connectors",l=>this.connectors=l),f.N.subscribeKey("count",l=>this.count=l),f.N.subscribeKey("filteredWallets",l=>this.filteredCount=l.length),f.N.subscribeKey("isFetchingRecommendedWallets",l=>this.isFetchingRecommendedWallets=l))}disconnectedCallback(){this.unsubscribe.forEach(l=>l())}render(){const l=this.connectors.find(I=>I.id==="walletConnect"),{allWallets:u}=C.H.state;if(!l||u==="HIDE"||u==="ONLY_MOBILE"&&!c.w.isMobile())return null;const v=f.N.state.featured.length,h=this.count+v,p=h<10?h:Math.floor(h/10)*10,E=this.filteredCount>0?this.filteredCount:p;let b=`${E}`;this.filteredCount>0?b=`${this.filteredCount}`:E<h&&(b=`${E}+`);const T=$.x.hasAnyConnection(g.o.CONNECTOR_ID.WALLET_CONNECT);return(0,e.qy)` 858 <wui-list-wallet 859 name="Search Wallet" 860 walletIcon="search" 861 showAllWallets 862 @click=${this.onAllWallets.bind(this)} 863 tagLabel=${b} 864 tagVariant="info" 865 data-testid="all-wallets" 866 tabIdx=${(0,m.J)(this.tabIdx)} 867 .loading=${this.isFetchingRecommendedWallets} 868 ?disabled=${T} 869 size="sm" 870 ></wui-list-wallet> 871 `}onAllWallets(){w.E.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),y.I.push("AllWallets",{redirectView:y.I.state.data?.redirectView})}},O(r,"W3mAllWalletsWidget2"),r);s([(0,d.MZ)()],n.prototype,"tabIdx",void 0),s([(0,d.wk)()],n.prototype,"connectors",void 0),s([(0,d.wk)()],n.prototype,"count",void 0),s([(0,d.wk)()],n.prototype,"filteredCount",void 0),s([(0,d.wk)()],n.prototype,"isFetchingRecommendedWallets",void 0),n=s([(0,o.EM)("w3m-all-wallets-widget")],n)},66928(j,L,t){var f;
871var e=t(75826),d=t(59262),m=t(17885),g=t(34592),y=t(39583),$=O(function(C,w,c,o){var i=arguments.length,s=i<3?w:o===null?o=Object.getOwnPropertyDescriptor(w,c):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(C,w,c,o);else for(var r=C.length-1;r>=0;r--)(n=C[r])&&(s=(i<3?n(s):i>3?n(w,c,s):n(w,c))||s);return i>3&&s&&Object.defineProperty(w,c,s),s},"__decorate");let W=(f=class extends e.WF{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(w=>w())}render(){const w=this.generateTabs();return(0,e.qy)` 872 <wui-flex justifyContent="center" .padding=${["0","0","4","0"]}> 873 <wui-tabs .tabs=${w} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs> 874 </wui-flex> 875 `}generateTabs(){const w=this.platforms.map(c=>c==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:c==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:c==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:c==="web"?{label:"Webapp",icon:"browser",platform:"web"}:c==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=w.map(({platform:c})=>c),w}onTabChange(w){const c=this.platformTabs[w];c&&this.onSelectPlatfrom?.(c)}},O(f,"W3mConnectingHeader2"),f);$([(0,d.MZ)({type:Array})],W.prototype,"platforms",void 0),$([(0,d.MZ)()],W.prototype,"onSelectPlatfrom",void 0),W=$([(0,m.EM)("w3m-connecting-header")],W)},48446(j,L,t){var o;var e=t(46015),d=t(25967),m=t(98229),g=t(1056),y=t(3469),$=t(82741),W=t(58162),f=t(17885),C=t(75521),w=O(function(i,s,n,r){var a=arguments.length,l=a<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,n):r,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,s,n,r);else for(var v=i.length-1;v>=0;v--)(u=i[v])&&(l=(a<3?u(l):a>3?u(s,n,l):u(s,n))||l);return a>3&&l&&Object.defineProperty(s,n,l),l},"__decorate");let c=(o=class extends C.o{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),$.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:m.I.state.view}})}async onConnectProxy(){try{this.error=!1;const{connectors:s}=y.a.state,n=s.find(r=>r.type==="ANNOUNCED"&&r.info?.rdns===this.wallet?.rdns||r.type==="INJECTED"||r.name===this.wallet?.name);if(n)await g.x.connectExternal(n,n.chain);else throw new Error("w3m-connecting-wc-browser: No connector found");d.W.close()}catch(s){s instanceof W.A&&s.originalName===e.RQ.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?$.E.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:s.message}}):$.E.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:s?.message??"Unknown"}}),this.error=!0}}},O(o,"W3mConnectingWcBrowser2"),o);c=w([(0,f.EM)("w3m-connecting-wc-browser")],c)},69474(j,L,t){var C;var e=t(98229),d=t(1056),m=t(82741),g=t(86695),y=t(17885),$=t(75521),W=O(function(w,c,o,i){var s=arguments.length,n=s<3?c:i===null?i=Object.getOwnPropertyDescriptor(c,o):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(w,c,o,i);else for(var a=w.length-1;a>=0;a--)(r=w[a])&&(n=(s<3?r(n):s>3?r(c,o,n):r(c,o))||n);return s>3&&n&&Object.defineProperty(c,o,n),n},"__decorate");let f=(C=class extends $.o{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),m.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:e.I.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:c,name:o}=this.wallet,{redirect:i,href:s}=g.w.formatNativeUrl(c,this.uri);d.x.setWcLinking({name:o,href:s}),d.x.setRecentWallet(this.wallet),g.w.openHref(i,"_blank")}catch{this.error=!0}}},O(C,"W3mConnectingWcDesktop2"),C);
875f=W([(0,y.EM)("w3m-connecting-wc-desktop")],f)},93848(j,L,t){var o;var e=t(59262),d=t(98229),m=t(1056),g=t(6300),y=t(4436),$=t(82741),W=t(65051),f=t(17885),C=t(75521),w=O(function(i,s,n,r){var a=arguments.length,l=a<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,n):r,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,s,n,r);else for(var v=i.length-1;v>=0;v--)(u=i[v])&&(l=(a<3?u(l):a>3?u(s,n,l):u(s,n))||l);return a>3&&l&&Object.defineProperty(s,n,l),l},"__decorate");let c=(o=class extends C.o{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=y.H.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{g.b.onConnectMobile(this.wallet)},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=W.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(m.x.subscribeKey("wcUri",()=>{this.onHandleURI()})),$.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:d.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){m.x.setWcError(!1),this.onConnect?.()}},O(o,"W3mConnectingWcMobile2"),o);w([(0,e.wk)()],c.prototype,"redirectDeeplink",void 0),w([(0,e.wk)()],c.prototype,"redirectUniversalLink",void 0),w([(0,e.wk)()],c.prototype,"target",void 0),w([(0,e.wk)()],c.prototype,"preferUniversalLinks",void 0),w([(0,e.wk)()],c.prototype,"isLoading",void 0),c=w([(0,f.EM)("w3m-connecting-wc-mobile")],c)},33821(j,L,t){var p;var e=t(75826),d=t(59262),m=t(72430),g=t(82741),y=t(98229),$=t(1056),W=t(55527),f=t(93982),C=t(17885),w=t(34592),c=t(10174),o=t(36083),i=t(69320),s=t(9220),n=t(19832),r=t(53252),a=t(75521),l=t(34370);const u=(0,C.AH)` 876 wui-shimmer { 877 width: 100%; 878 aspect-ratio: 1 / 1; 879 border-radius: ${({borderRadius:E})=>E[4]}; 880 } 881 882 wui-qr-code { 883 opacity: 0; 884 animation-duration: ${({durations:E})=>E.xl}; 885 animation-timing-function: ${({easings:E})=>E["ease-out-power-2"]}; 886 animation-name: fade-in; 887 animation-fill-mode: forwards; 888 } 889 890 @keyframes fade-in { 891 from { 892 opacity: 0; 893 } 894 to { 895 opacity: 1; 896 } 897 } 898`;var v=O(function(E,b,T,I){var x=arguments.length,P=x<3?b:I===null?I=Object.getOwnPropertyDescriptor(b,T):I,M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(E,b,T,I);else for(var R=E.length-1;R>=0;R--)(M=E[R])&&(P=(x<3?M(P):x>3?M(b,T,P):M(b,T))||P);return x>3&&P&&Object.defineProperty(b,T,P),P},"__decorate");let h=(p=class extends a.o{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:y.I.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(b=>b())}render(){return this.onRenderProxy(),(0,e.qy)` 899 <wui-flex 900 flexDirection="column" 901 alignItems="center" 902 .padding=${["0","5","5","5"]} 903 gap="5" 904 > 905 <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer> 906 <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text> 907 ${this.copyTemplate()} 908 </wui-flex> 909 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 910 `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const b=this.wallet?this.wallet.name:void 0;$.x.setWcLinking(void 0),$.x.setRecentWallet(this.wallet);const T=W.W.state.themeVariables["--apkt-qr-color"]??W.W.state.themeVariables["--w3m-qr-color"];
910return(0,e.qy)` <wui-qr-code 911 theme=${W.W.state.themeMode} 912 uri=${this.uri} 913 imageSrc=${(0,m.J)(f.$.getWalletImage(this.wallet))} 914 color=${(0,m.J)(T)} 915 alt=${(0,m.J)(b)} 916 data-testid="wui-qr-code" 917 ></wui-qr-code>`}copyTemplate(){const b=!this.uri||!this.ready;return(0,e.qy)`<wui-button 918 .disabled=${b} 919 @click=${this.onCopyUri} 920 variant="neutral-secondary" 921 size="sm" 922 data-testid="copy-wc2-uri" 923 > 924 Copy link 925 <wui-icon size="sm" color="inherit" name="copy" slot="iconRight"></wui-icon> 926 </wui-button>`}},O(p,"W3mConnectingWcQrcode2"),p);h.styles=u,v([(0,d.MZ)({type:Boolean})],h.prototype,"basic",void 0),h=v([(0,C.EM)("w3m-connecting-wc-qrcode")],h)},76665(j,L,t){var i;var e=t(75826),d=t(72430),m=t(98229),g=t(82741),y=t(93982),$=t(17885),W=t(34592),f=t(19832),C=t(4570),w=t(34370),c=O(function(s,n,r,a){var l=arguments.length,u=l<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,r):a,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(s,n,r,a);else for(var h=s.length-1;h>=0;h--)(v=s[h])&&(u=(l<3?v(u):l>3?v(n,r,u):v(n,r))||u);return l>3&&u&&Object.defineProperty(n,r,u),u},"__decorate");let o=(i=class extends e.WF{constructor(){if(super(),this.wallet=m.I.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:m.I.state.view}})}render(){return(0,e.qy)` 927 <wui-flex 928 flexDirection="column" 929 alignItems="center" 930 .padding=${["10","5","5","5"]} 931 gap="5" 932 > 933 <wui-wallet-image 934 size="lg" 935 imageSrc=${(0,d.J)(y.$.getWalletImage(this.wallet))} 936 ></wui-wallet-image> 937 938 <wui-text variant="md-regular" color="primary">Not Detected</wui-text> 939 </wui-flex> 940 941 <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links> 942 `}},O(i,"W3mConnectingWcUnsupported2"),i);o=c([(0,$.EM)("w3m-connecting-wc-unsupported")],o)},16072(j,L,t){var c;var e=t(59262),d=t(98229),m=t(1056),g=t(82741),y=t(65051),$=t(86695),W=t(17885),f=t(75521),C=O(function(o,i,s,n){var r=arguments.length,a=r<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,s):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,i,s,n);else for(var u=o.length-1;u>=0;u--)(l=o[u])&&(a=(r<3?l(a):r>3?l(i,s,a):l(i,s))||a);return r>3&&a&&Object.defineProperty(i,s,a),a},"__decorate");let w=(c=class extends f.o{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=y.oU.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(m.x.subscribeKey("wcUri",()=>{this.updateLoadingState()})),g.E.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:d.I.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:i,name:s}=this.wallet,{redirect:n,href:r}=$.w.formatUniversalUrl(i,this.uri);m.x.setWcLinking({name:s,href:r}),m.x.setRecentWallet(this.wallet),$.w.openHref(n,"_blank")}catch{this.error=!0}}},O(c,"W3mConnectingWcWeb2"),c);C([(0,e.wk)()],w.prototype,"isLoading",void 0),w=C([(0,W.EM)("w3m-connecting-wc-web")],w)},65203(j,L,t){var v;var e=t(75826),d=t(59262),m=t(72430),g=t(93236),y=t(27546),$=t(1056),W=t(55262),f=t(86695),C=t(32873),w=t(93982),c=t(98229),o=t(3469),i=t(65811),s=t(17885),n=t(34592),r=t(72188);const a=(0,s.AH)` 943 :host { 944 margin-top: ${({spacing:h})=>h[1]}; 945 } 946 wui-separator { 947 margin: ${({spacing:h})=>h[3]} calc(${({spacing:h})=>h[3]} * -1) 948 ${({spacing:h})=>h[2]} calc(${({spacing:h})=>h[3]} * -1); 949 width: calc(100% + ${({spacing:h})=>h[3]} * 2); 950 } 951`;var l=O(function(h,p,E,b){var T=arguments.length,I=T<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,E):b,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(h,p,E,b);else for(var P=h.length-1;P>=0;P--)(x=h[P])&&(I=(T<3?x(I):T>3?x(p,E,I):x(p,E))||I);return T>3&&I&&Object.defineProperty(p,E,I),I},"__decorate");let u=(v=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.explorerWallets=y.N.state.explorerWallets,this.connections=$.x.state.connections,this.connectorImages=W.j.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push($.x.subscribeKey("connections",p=>this.connections=p),W.j.subscribeKey("connectorImages",p=>this.connectorImages=p),y.N.subscribeKey("explorerFilteredWallets",p=>{this.explorerWallets=p?.length?p:y.N.state.explorerWallets}),y.N.subscribeKey("explorerWallets",p=>{this.explorerWallets?.length||(this.explorerWallets=p)})),f.w.isTelegram()&&f.w.isIos()&&(this.loadingTelegram=!$.x.state.wcUri,this.unsubscribe.push($.x.subscribeKey("wcUri",p=>this.loadingTelegram=!p)))}disconnectedCallback(){this.unsubscribe.forEach(p=>p())}render(){return(0,e.qy)` 952 <wui-flex flexDirection="column" gap="2"> ${this.connectorListTemplate()} </wui-flex> 953 `}connectorListTemplate(){return C.g.connectorList().map((p,E)=>p.kind==="connector"?this.renderConnector(p,E):this.renderWallet(p,E))}getConnectorNamespaces(p){return p.subtype==="walletConnect"?[]:p.subtype==="multiChain"?p.connector.connectors?.map(E=>
953E.chain)||[]:[p.connector.chain]}renderConnector(p,E){const b=p.connector,T=w.$.getConnectorImage(b)||this.connectorImages[b?.imageId??""],x=(this.connections.get(b.chain)??[]).some(U=>r.y.isLowerCaseMatch(U.connectorId,b.id));let P,M;p.subtype==="walletConnect"?(P="qr code",M="accent"):p.subtype==="injected"||p.subtype==="announced"?(P=x?"connected":"installed",M=x?"info":"success"):(P=void 0,M=void 0);const R=$.x.hasAnyConnection(g.o.CONNECTOR_ID.WALLET_CONNECT),k=p.subtype==="walletConnect"||p.subtype==="external"?R:!1;return(0,e.qy)` 954 <w3m-list-wallet 955 displayIndex=${E} 956 imageSrc=${(0,m.J)(T)} 957 .installed=${!0} 958 name=${b.name??"Unknown"} 959 .tagVariant=${M} 960 tagLabel=${(0,m.J)(P)} 961 data-testid=${`wallet-selector-${b.id.toLowerCase()}`} 962 size="sm" 963 @click=${()=>this.onClickConnector(p)} 964 tabIdx=${(0,m.J)(this.tabIdx)} 965 ?disabled=${k} 966 rdnsId=${(0,m.J)(b.explorerWallet?.rdns||void 0)} 967 walletRank=${(0,m.J)(b.explorerWallet?.order)} 968 .namespaces=${this.getConnectorNamespaces(p)} 969 > 970 </w3m-list-wallet> 971 `}onClickConnector(p){const E=c.I.state.data?.redirectView;if(p.subtype==="walletConnect"){o.a.setActiveConnector(p.connector),f.w.isMobile()?c.I.push("AllWallets"):c.I.push("ConnectingWalletConnect",{redirectView:E});return}if(p.subtype==="multiChain"){o.a.setActiveConnector(p.connector),c.I.push("ConnectingMultiChain",{redirectView:E});return}if(p.subtype==="injected"){o.a.setActiveConnector(p.connector),c.I.push("ConnectingExternal",{connector:p.connector,redirectView:E,wallet:p.connector.explorerWallet});return}if(p.subtype==="announced"){if(p.connector.id==="walletConnect"){f.w.isMobile()?c.I.push("AllWallets"):c.I.push("ConnectingWalletConnect",{redirectView:E});return}c.I.push("ConnectingExternal",{connector:p.connector,redirectView:E,wallet:p.connector.explorerWallet});return}c.I.push("ConnectingExternal",{connector:p.connector,redirectView:E})}renderWallet(p,E){const b=p.wallet,T=w.$.getWalletImage(b),x=$.x.hasAnyConnection(g.o.CONNECTOR_ID.WALLET_CONNECT),P=this.loadingTelegram,M=p.subtype==="recent"?"recent":void 0,R=p.subtype==="recent"?"info":void 0;return(0,e.qy)` 972 <w3m-list-wallet 973 displayIndex=${E} 974 imageSrc=${(0,m.J)(T)} 975 name=${b.name??"Unknown"} 976 @click=${()=>this.onClickWallet(p)} 977 size="sm" 978 data-testid=${`wallet-selector-${b.id}`} 979 tabIdx=${(0,m.J)(this.tabIdx)} 980 ?loading=${P} 981 ?disabled=${x} 982 rdnsId=${(0,m.J)(b.rdns||void 0)} 983 walletRank=${(0,m.J)(b.order)} 984 tagLabel=${(0,m.J)(M)} 985 .tagVariant=${R} 986 > 987 </w3m-list-wallet> 988 `}onClickWallet(p){const E=c.I.state.data?.redirectView,b=i.W.state.activeChain;if(p.subtype==="featured"){o.a.selectWalletConnector(p.wallet);return}if(p.subtype==="recent"){if(this.loadingTelegram)return;o.a.selectWalletConnector(p.wallet);return}if(p.subtype==="custom"){if(this.loadingTelegram)return;c.I.push("ConnectingWalletConnect",{wallet:p.wallet,redirectView:E});return}if(this.loadingTelegram)return;const T=b?o.a.getConnector({id:p.wallet.id,namespace:b}):void 0;T?c.I.push("ConnectingExternal",{connector:T,redirectView:E}):c.I.push("ConnectingWalletConnect",{wallet:p.wallet,redirectView:E})}},O(v,"W3mConnectorList2"),v);u.styles=a,l([(0,d.MZ)({type:Number})],u.prototype,"tabIdx",void 0),l([(0,d.wk)()],u.prototype,"explorerWallets",void 0),l([(0,d.wk)()],u.prototype,"connections",void 0),l([(0,d.wk)()],u.prototype,"connectorImages",void 0),l([(0,d.wk)()],u.prototype,"loadingTelegram",void 0),u=l([(0,s.EM)("w3m-connector-list")],u)},93996(j,L,t){var I;var e=t(75826),d=t(59262),m=t(72430),g=t(70192),y=t(93236),$=t(4436),W=t(27546),f=t(1056),C=t(40980),w=t(65811),c=t(3469),o=t(86695),i=t(98229),s=t(82741),n=t(4020),r=t(17885),a=t(99282),l=t(16735),u=t(3411),v=t(19832),h=t(9571),p=t(43435);const E=(0,r.AH)` 989 wui-separator { 990 margin: ${({spacing:x})=>x[3]} calc(${({spacing:x})=>x[3]} * -1); 991 width: calc(100% + ${({spacing:x})=>x[3]} * 2); 992 } 993 994 wui-email-input { 995 width: 100%; 996 } 997 998 form { 999 width: 100%; 1000 display: block; 1001 position: relative; 1002 } 1003 1004 wui-icon-link, 1005 wui-loading-spinner { 1006 position: absolute; 1007 top: 50%; 1008 transform: translateY(-50%); 1009 } 1010 1011 wui-icon-link {
1012 right: ${({spacing:x})=>x[2]}; 1013 } 1014 1015 wui-loading-spinner { 1016 right: ${({spacing:x})=>x[3]}; 1017 } 1018 1019 wui-text { 1020 margin: ${({spacing:x})=>x[2]} ${({spacing:x})=>x[3]} 1021 ${({spacing:x})=>x[0]} ${({spacing:x})=>x[3]}; 1022 } 1023`;var b=O(function(x,P,M,R){var k=arguments.length,U=k<3?P:R===null?R=Object.getOwnPropertyDescriptor(P,M):R,B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(x,P,M,R);else for(var Y=x.length-1;Y>=0;Y--)(B=x[Y])&&(U=(k<3?B(U):k>3?B(P,M,U):B(P,M))||U);return k>3&&U&&Object.defineProperty(P,M,U),U},"__decorate");let T=(I=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.formRef=(0,g._)(),this.email="",this.loading=!1,this.error="",this.remoteFeatures=$.H.state.remoteFeatures,this.hasExceededUsageLimit=W.N.state.plan.hasExceededUsageLimit,this.unsubscribe.push($.H.subscribeKey("remoteFeatures",P=>{this.remoteFeatures=P}),W.N.subscribeKey("plan",P=>this.hasExceededUsageLimit=P.hasExceededUsageLimit))}disconnectedCallback(){this.unsubscribe.forEach(P=>P())}firstUpdated(){this.formRef.value?.addEventListener("keydown",P=>{P.key==="Enter"&&this.onSubmitEmail(P)})}render(){const P=f.x.hasAnyConnection(y.o.CONNECTOR_ID.AUTH);return(0,e.qy)` 1024 <form ${(0,g.K)(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 1025 <wui-email-input 1026 @focus=${this.onFocusEvent.bind(this)} 1027 .disabled=${this.loading} 1028 @inputChange=${this.onEmailInputChange.bind(this)} 1029 tabIdx=${(0,m.J)(this.tabIdx)} 1030 ?disabled=${P||this.hasExceededUsageLimit} 1031 > 1032 </wui-email-input> 1033 1034 ${this.submitButtonTemplate()}${this.loadingTemplate()} 1035 <input type="submit" hidden /> 1036 </form> 1037 ${this.templateError()} 1038 `}submitButtonTemplate(){return!this.loading&&this.email.length>3?(0,e.qy)` 1039 <wui-icon-link 1040 size="lg" 1041 icon="chevronRight" 1042 iconcolor="accent-100" 1043 @click=${this.onSubmitEmail.bind(this)} 1044 > 1045 </wui-icon-link> 1046 `:null}loadingTemplate(){return this.loading?(0,e.qy)`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:null}templateError(){return this.error?(0,e.qy)`<wui-text variant="sm-medium" color="error">${this.error}</wui-text>`:null}onEmailInputChange(P){this.email=P.detail.trim(),this.error=""}async onSubmitEmail(P){if(!p.y.isValidEmail(this.email)){C.h.open({displayMessage:h.R.ALERT_WARNINGS.INVALID_EMAIL.displayMessage},"warning");return}if(!y.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(R=>R===w.W.state.activeChain)){const R=w.W.getFirstCaipNetworkSupportsAuthConnector();if(R){i.I.push("SwitchNetwork",{network:R});return}}try{if(this.loading)return;this.loading=!0,P.preventDefault();const R=c.a.getAuthConnector();if(!R)throw new Error("w3m-email-login-widget: Auth connector not found");const{action:k}=await R.provider.connectEmail({email:this.email});if(s.E.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),k==="VERIFY_OTP")s.E.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),i.I.push("EmailVerifyOtp",{email:this.email});else if(k==="VERIFY_DEVICE")i.I.push("EmailVerifyDevice",{email:this.email});else if(k==="CONNECT"){const U=this.remoteFeatures?.multiWallet;await f.x.connectExternal(R,w.W.state.activeChain),U?(i.I.replace("ProfileWallets"),n.P.showSuccess("New Wallet Added")):i.I.replace("Account")}}catch(R){o.w.parseError(R)?.includes("Invalid email")?this.error="Invalid email. Try again.":n.P.showError(R)}finally{this.loading=!1}}onFocusEvent(){s.E.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}},O(I,"W3mEmailLoginWidget2"),I);T.styles=E,b([(0,d.MZ)()],T.prototype,"tabIdx",void 0),b([(0,d.wk)()],T.prototype,"email",void 0),b([(0,d.wk)()],T.prototype,"loading",void 0),b([(0,d.wk)()],T.prototype,"error",void 0),b([(0,d.wk)()],T.prototype,"remoteFeatures",void 0),b([(0,d.wk)()],T.prototype,"hasExceededUsageLimit",void 0),T=b([(0,r.EM)("w3m-email-login-widget")],T)},77050(j,L,t){var C;var e=t(75826),d=t(59262),m=t(17885),g=t(34592),y=t(19832),$=t(30295),W=O(function(w,c,o,i){var s=arguments.length,n=s<3?c:i===null?i=Object.getOwnPropertyDescriptor(c,o):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(w,c,o,i);else for(var a=w.length-1;a>=0;a--)(r=w[a])&&(n=(s<3?r(n):s>3?r(c,o,n):r(c,o))||n);return s>3&&n&&Object.defineProperty(c,o,n),n},"__decorate");let f=(C=class extends e.WF{constructor(){super(...arguments),this.data=[]}render(){return(0,e.qy)` 1047 <wui-flex flexDirection="column" alignItems="center" gap="4"> 1048 ${this.data.map(c=>(0,e.qy)` 1049 <wui-flex flexDirection="column" alignItems="center" gap="5"> 1050 <wui-flex flexDirection="row" justifyContent="center" gap="1"> 1051 ${c.images.map(o=>(0,e.qy)`<wui-visual size="sm" name=${o}></wui-visual>`)} 1052 </wui-flex> 1053 </wui-flex> 1054 <wui-flex flexDirection="column" alignItems="center" gap="1"> 1055 <wui-text variant="md-regular" color="primary" align="center">${c.title}</wui-text> 1056 <wui-text variant="sm-regular" color="secondary" align="center" 1057 >${c.text}</wui-text 1058 > 1059 </wui-flex> 1060 `)} 1061 </wui-flex> 1062 `}},O(C,"W3mHelpWidget2"),C);W([(0,d.MZ)({type:Array})],f.prototype,"data",void 0),f=W([(0,m.EM)("w3m-help-widget")],f)},92930(j,L,t){var c;
1062var e=t(75826),d=t(59262),m=t(2339),g=t(4436),y=t(17885),$=t(80542),W=t(19832);const f=(0,y.AH)` 1063 :host { 1064 display: flex; 1065 align-items: center; 1066 justify-content: center; 1067 } 1068 wui-checkbox { 1069 padding: ${({spacing:o})=>o[3]}; 1070 } 1071 a { 1072 text-decoration: none; 1073 color: ${({tokens:o})=>o.theme.textSecondary}; 1074 font-weight: 500; 1075 } 1076`;var C=O(function(o,i,s,n){var r=arguments.length,a=r<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,s):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,i,s,n);else for(var u=o.length-1;u>=0;u--)(l=o[u])&&(a=(r<3?l(a):r>3?l(i,s,a):l(i,s))||a);return r>3&&a&&Object.defineProperty(i,s,a),a},"__decorate");let w=(c=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.checked=m.o.state.isLegalCheckboxChecked,this.unsubscribe.push(m.o.subscribeKey("isLegalCheckboxChecked",i=>{this.checked=i}))}disconnectedCallback(){this.unsubscribe.forEach(i=>i())}render(){const{termsConditionsUrl:i,privacyPolicyUrl:s}=g.H.state,n=g.H.state.features?.legalCheckbox;return!i&&!s||!n?null:(0,e.qy)` 1077 <wui-checkbox 1078 ?checked=${this.checked} 1079 @checkboxChange=${this.onCheckboxChange.bind(this)} 1080 data-testid="wui-checkbox" 1081 > 1082 <wui-text color="secondary" variant="sm-regular" align="left"> 1083 I agree to our ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} 1084 </wui-text> 1085 </wui-checkbox> 1086 `}andTemplate(){const{termsConditionsUrl:i,privacyPolicyUrl:s}=g.H.state;return i&&s?"and":""}termsTemplate(){const{termsConditionsUrl:i}=g.H.state;return i?(0,e.qy)`<a rel="noreferrer" target="_blank" href=${i}>terms of service</a>`:null}privacyTemplate(){const{privacyPolicyUrl:i}=g.H.state;return i?(0,e.qy)`<a rel="noreferrer" target="_blank" href=${i}>privacy policy</a>`:null}onCheckboxChange(){m.o.setIsLegalCheckboxChecked(!this.checked)}},O(c,"W3mLegalCheckbox2"),c);w.styles=[f],C([(0,d.wk)()],w.prototype,"checked",void 0),w=C([(0,y.EM)("w3m-legal-checkbox")],w)},81560(j,L,t){var c;var e=t(75826),d=t(59262),m=t(4436),g=t(17885),y=t(34592),$=t(19832),W=t(53252);const f=(0,g.AH)` 1087 :host wui-ux-by-reown { 1088 padding-top: 0; 1089 } 1090 1091 :host wui-ux-by-reown.branding-only { 1092 padding-top: ${({spacing:o})=>o[3]}; 1093 } 1094 1095 a { 1096 text-decoration: none; 1097 color: ${({tokens:o})=>o.core.textAccentPrimary}; 1098 font-weight: 500; 1099 } 1100`;var C=O(function(o,i,s,n){var r=arguments.length,a=r<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,s):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,i,s,n);else for(var u=o.length-1;u>=0;u--)(l=o[u])&&(a=(r<3?l(a):r>3?l(i,s,a):l(i,s))||a);return r>3&&a&&Object.defineProperty(i,s,a),a},"__decorate");let w=(c=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.remoteFeatures=m.H.state.remoteFeatures,this.unsubscribe.push(m.H.subscribeKey("remoteFeatures",i=>this.remoteFeatures=i))}disconnectedCallback(){this.unsubscribe.forEach(i=>i())}render(){const{termsConditionsUrl:i,privacyPolicyUrl:s}=m.H.state,n=m.H.state.features?.legalCheckbox;return!i&&!s||n?(0,e.qy)` 1101 <wui-flex flexDirection="column"> ${this.reownBrandingTemplate(!0)} </wui-flex> 1102 `:(0,e.qy)` 1103 <wui-flex flexDirection="column"> 1104 <wui-flex .padding=${["4","3","3","3"]} justifyContent="center"> 1105 <wui-text color="secondary" variant="md-regular" align="center"> 1106 By connecting your wallet, you agree to our <br /> 1107 ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} 1108 </wui-text> 1109 </wui-flex> 1110 ${this.reownBrandingTemplate()} 1111 </wui-flex> 1112 `}andTemplate(){const{termsConditionsUrl:i,privacyPolicyUrl:s}=m.H.state;return i&&s?"and":""}termsTemplate(){const{termsConditionsUrl:i}=m.H.state;return i?(0,e.qy)`<a href=${i} target="_blank" rel="noopener noreferrer" 1113 >Terms of Service</a 1114 >`:null}privacyTemplate(){const{privacyPolicyUrl:i}=m.H.state;return i?(0,e.qy)`<a href=${i} target="_blank" rel="noopener noreferrer" 1115 >Privacy Policy</a 1116 >`:null}reownBrandingTemplate(i=!1){return this.remoteFeatures?.reownBranding?i?(0,e.qy)`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>`:(0,e.qy)`<wui-ux-by-reown></wui-ux-by-reown>`:null}},O(c,"W3mLegalFooter2"),c);w.styles=[f],C([(0,d.wk)()],w.prototype,"remoteFeatures",void 0),w=C([(0,g.EM)("w3m-legal-footer")],w)},34370(j,L,t){var w;
1116var e=t(75826),d=t(59262),m=t(86695),g=t(98229),y=t(17885),$=t(65350);const W=(0,y.AH)` 1117 :host { 1118 display: block; 1119 padding: 0 ${({spacing:c})=>c[5]} ${({spacing:c})=>c[5]}; 1120 } 1121`;var f=O(function(c,o,i,s){var n=arguments.length,r=n<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,i):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(c,o,i,s);else for(var l=c.length-1;l>=0;l--)(a=c[l])&&(r=(n<3?a(r):n>3?a(o,i,r):a(o,i))||r);return n>3&&r&&Object.defineProperty(o,i,r),r},"__decorate");let C=(w=class extends e.WF{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:o,app_store:i,play_store:s,chrome_store:n,homepage:r}=this.wallet,a=m.w.isMobile(),l=m.w.isIos(),u=m.w.isAndroid(),v=[i,s,r,n].filter(Boolean).length>1,h=y.Zv.getTruncateString({string:o,charsStart:12,charsEnd:0,truncate:"end"});return v&&!a?(0,e.qy)` 1122 <wui-cta-button 1123 label=${`Don't have ${h}?`} 1124 buttonLabel="Get" 1125 @click=${()=>g.I.push("Downloads",{wallet:this.wallet})} 1126 ></wui-cta-button> 1127 `:!v&&r?(0,e.qy)` 1128 <wui-cta-button 1129 label=${`Don't have ${h}?`} 1130 buttonLabel="Get" 1131 @click=${this.onHomePage.bind(this)} 1132 ></wui-cta-button> 1133 `:i&&l?(0,e.qy)` 1134 <wui-cta-button 1135 label=${`Don't have ${h}?`} 1136 buttonLabel="Get" 1137 @click=${this.onAppStore.bind(this)} 1138 ></wui-cta-button> 1139 `:s&&u?(0,e.qy)` 1140 <wui-cta-button 1141 label=${`Don't have ${h}?`} 1142 buttonLabel="Get" 1143 @click=${this.onPlayStore.bind(this)} 1144 ></wui-cta-button> 1145 `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&m.w.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&m.w.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&m.w.openHref(this.wallet.homepage,"_blank")}},O(w,"W3mMobileDownloadLinks2"),w);C.styles=[W],f([(0,d.MZ)({type:Object})],C.prototype,"wallet",void 0),C=f([(0,y.EM)("w3m-mobile-download-links")],C)},19847(j,L,t){var r;
1145var e=t(75826),d=t(4436),m=t(82741),g=t(50735),y=t(65811),$=t(98229),W=t(17885),f=t(34592),C=t(10174),w=t(36083),c=t(19832),o=t(43071);const i=(0,e.AH)``;var s=O(function(a,l,u,v){var h=arguments.length,p=h<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,u):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(a,l,u,v);else for(var b=a.length-1;b>=0;b--)(E=a[b])&&(p=(h<3?E(p):h>3?E(l,u,p):E(l,u))||p);return h>3&&p&&Object.defineProperty(l,u,p),p},"__decorate");let n=(r=class extends e.WF{render(){const{termsConditionsUrl:l,privacyPolicyUrl:u}=d.H.state;return!l&&!u?null:(0,e.qy)` 1146 <wui-flex 1147 .padding=${["4","3","3","3"]} 1148 flexDirection="column" 1149 alignItems="center" 1150 justifyContent="center" 1151 gap="3" 1152 > 1153 <wui-text color="secondary" variant="md-regular" align="center"> 1154 We work with the best providers to give you the lowest fees and best support. More options 1155 coming soon! 1156 </wui-text> 1157 1158 ${this.howDoesItWorkTemplate()} 1159 </wui-flex> 1160 `}howDoesItWorkTemplate(){return(0,e.qy)` <wui-link @click=${this.onWhatIsBuy.bind(this)}> 1161 <wui-icon size="xs" color="accent-primary" slot="iconLeft" name="helpCircle"></wui-icon> 1162 How does it work? 1163 </wui-link>`}onWhatIsBuy(){m.E.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:(0,g.lj)(y.W.state.activeChain)===o.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),$.I.push("WhatIsABuy")}},O(r,"W3mOnRampProvidersFooter2"),r);n.styles=[i],n=s([(0,W.EM)("w3m-onramp-providers-footer")],n)},40710(j,L,t){var C;
1163var e=t(75826),d=t(4436),m=t(65811),g=t(17885),y=t(40038);const $=(0,g.AH)` 1164 :host { 1165 display: flex; 1166 justify-content: center; 1167 gap: ${({spacing:w})=>w[4]}; 1168 } 1169 1170 wui-visual-thumbnail:nth-child(1) { 1171 z-index: 1; 1172 } 1173`;var W=O(function(w,c,o,i){var s=arguments.length,n=s<3?c:i===null?i=Object.getOwnPropertyDescriptor(c,o):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(w,c,o,i);else for(var a=w.length-1;a>=0;a--)(r=w[a])&&(n=(s<3?r(n):s>3?r(c,o,n):r(c,o))||n);return s>3&&n&&Object.defineProperty(c,o,n),n},"__decorate");let f=(C=class extends e.WF{constructor(){super(...arguments),this.dappImageUrl=d.H.state.metadata?.icons,this.walletImageUrl=m.W.getAccountData()?.connectedWalletInfo?.icon}firstUpdated(){const c=this.shadowRoot?.querySelectorAll("wui-visual-thumbnail");c?.[0]&&this.createAnimation(c[0],"translate(18px)"),c?.[1]&&this.createAnimation(c[1],"translate(-18px)")}render(){return(0,e.qy)` 1174 <wui-visual-thumbnail 1175 ?borderRadiusFull=${!0} 1176 .imageSrc=${this.dappImageUrl?.[0]} 1177 ></wui-visual-thumbnail> 1178 <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail> 1179 `}createAnimation(c,o){c.animate([{transform:"translateX(0px)"},{transform:o}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}},O(C,"W3mSIWXSignMessageThumbnails2"),C);f.styles=$,f=W([(0,g.EM)("w3m-siwx-sign-message-thumbnails")],f)},21631(j,L,t){var T;var e=t(75826),d=t(59262),m=t(72430),g=t(93236),y=t(3469),$=t(4436),W=t(27546),f=t(65051),C=t(98229),w=t(65811),c=t(40980),o=t(1056),i=t(40918),s=t(86695),n=t(17885),r=t(34592),a=t(45323),l=t(725),u=t(26044);const v=(0,n.AH)` 1180 wui-separator { 1181 margin: ${({spacing:I})=>I[3]} calc(${({spacing:I})=>I[3]} * -1) 1182 ${({spacing:I})=>I[3]} calc(${({spacing:I})=>I[3]} * -1); 1183 width: calc(100% + ${({spacing:I})=>I[3]} * 2); 1184 } 1185`;var h=O(function(I,x,P,M){var R=arguments.length,k=R<3?x:M===null?M=Object.getOwnPropertyDescriptor(x,P):M,U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(I,x,P,M);else for(var B=I.length-1;B>=0;B--)(U=I[B])&&(k=(R<3?U(k):R>3?U(x,P,k):U(x,P))||k);return R>3&&k&&Object.defineProperty(x,P,k),k},"__decorate");const p=2,E=6;let b=(T=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.walletGuide="get-started",this.tabIdx=void 0,this.connectors=y.a.state.connectors,this.remoteFeatures=$.H.state.remoteFeatures,this.authConnector=this.connectors.find(x=>x.type==="AUTH"),this.isPwaLoading=!1,this.hasExceededUsageLimit=W.N.state.plan.hasExceededUsageLimit,this.unsubscribe.push(y.a.subscribeKey("connectors",x=>{this.connectors=x,this.authConnector=this.connectors.find(P=>P.type==="AUTH")}),$.H.subscribeKey("remoteFeatures",x=>this.remoteFeatures=x),W.N.subscribeKey("plan",x=>this.hasExceededUsageLimit=x.hasExceededUsageLimit))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(x=>x())}render(){return(0,e.qy)` 1186 <wui-flex 1187 class="container" 1188 flexDirection="column" 1189 gap="2" 1190 data-testid="w3m-social-login-widget" 1191 > 1192 ${this.topViewTemplate()}${this.bottomViewTemplate()} 1193 </wui-flex> 1194 `}topViewTemplate(){const x=this.walletGuide==="explore";let P=this.remoteFeatures?.socials;return!P&&x?(P=f.oU.DEFAULT_SOCIALS,this.renderTopViewContent(P)):P?this.renderTopViewContent(P):null}renderTopViewContent(x){return x.length===2?(0,e.qy)` <wui-flex gap="2"> 1195 ${x.slice(0,p).map(P=>(0,e.qy)`<wui-logo-select 1196 data-testid=${`social-selector-${P}`} 1197 @click=${()=>{this.onSocialClick(P)}} 1198 logo=${P} 1199 tabIdx=${(0,m.J)(this.tabIdx)} 1200 ?disabled=${this.isPwaLoading||this.hasConnection()} 1201 ></wui-logo-select>`)} 1202 </wui-flex>`:(0,e.qy)` <wui-list-button 1203 data-testid=${`social-selector-${x[0]}`} 1204 @click=${()=>{this.onSocialClick(x[0])}} 1205 size="lg" 1206 icon=${(0,m.J)(x[0])} 1207 text=${`Continue with ${n.Zv.capitalize(x[0])}`} 1208 tabIdx=${(0,m.J)(this.tabIdx)} 1209 ?disabled=${this.isPwaLoading||this.hasConnection()} 1210 ></wui-list-button>`}bottomViewTemplate(){let x=this.remoteFeatures?.socials;const P=this.walletGuide==="explore";return(!this.authConnector||!x||x.length===0)&&P&&(x=f.oU.DEFAULT_SOCIALS),!x||x.length<=p?null:x&&x.length>E?(0,e.qy)`<wui-flex gap="2"> 1211 ${x.slice(1,E-1).map(R=>(0,e.qy)`<wui-logo-select 1212 data-testid=${`social-selector-${R}`} 1213 @click=${()=>{this.onSocialClick(R)}} 1214 logo=${R} 1215 tabIdx=${(0,m.J)(this.tabIdx)} 1216 ?focusable=${this.tabIdx!==void 0&&this.tabIdx>=0} 1217 ?disabled=${this.isPwaLoading||this.hasConnection()} 1218 ></wui-logo-select>`)} 1219 <wui-logo-select 1220 logo="more" 1221 tabIdx=${(0,m.J)(this.tabIdx)} 1222 @click=${this.onMoreSocialsClick.bind(this)} 1223 ?disabled=${this.isPwaLoading||this.hasConnection()} 1224 data-testid="social-selector-more" 1225 ></wui-logo-select> 1226 </wui-flex>`:x?(0,e.qy)`<wui-flex gap="2"> 1227 ${x.slice(1,x.length).map(R=>(0,e.qy)`<wui-logo-select 1228 data-testid=${`social-selector-${R}`} 1229 @click=${()=>{this.onSocialClick(R)}} 1230 logo=${R} 1231 tabIdx=${(0,m.J)(this.tabIdx)} 1232 ?focusable=${this.tabIdx!==void 0&&this.tabIdx>=0} 1233 ?disabled=${this.isPwaLoading||this.hasConnection()} 1234 ></wui-logo-select>`)} 1235 </wui-flex>`:null}onMoreSocialsClick(){C.I.push("ConnectSocials")}async onSocialClick(x){if(this.hasExceededUsageLimit){C.I.push("UsageExceeded");return}if(!g.o.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(M=>M===w.W.state.activeChain)){const M=w.W.getFirstCaipNetworkSupportsAuthConnector();if(M){C.I.push("SwitchNetwork",{network:M});return}}x&&await(0,i.Up)(x)}async handlePwaFrameLoad(){if(s.w.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof u.Y&&await this.authConnector.provider.init()}catch(x){c.h.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:x.message},"error")}finally{this.isPwaLoading=!1}}}hasConnection(){return o.x.hasAnyConnection(g.o.CONNECTOR_ID.AUTH)}},O(T,"W3mSocialLoginWidget2"),T);b.styles=v,h([(0,d.MZ)()],b.prototype,"walletGuide",void 0),h([(0,d.MZ)()],b.prototype,"tabIdx",void 0),h([(0,d.wk)()],b.prototype,"connectors",void 0),h([(0,d.wk)()],b.prototype,"remoteFeatures",void 0),h([(0,d.wk)()],b.prototype,"authConnector",void 0),h([(0,d.wk)()],b.prototype,"isPwaLoading",void 0),h([(0,d.wk)()],b.prototype,"hasExceededUsageLimit",void 0),b=h([(0,n.EM)("w3m-social-login-widget")],b)},64911(j,L,t){var w;
1235var e=t(75826),d=t(59262),m=t(83937),g=t(98229),y=t(25967),$=t(17885);const W=(0,e.AH)` 1236 :host { 1237 width: 100%; 1238 display: block; 1239 } 1240`;var f=O(function(c,o,i,s){var n=arguments.length,r=n<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,i):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(c,o,i,s);else for(var l=c.length-1;l>=0;l--)(a=c[l])&&(r=(n<3?a(r):n>3?a(o,i,r):a(o,i))||r);return n>3&&r&&Object.defineProperty(o,i,r),r},"__decorate");let C=(w=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.text="",this.open=m.I.state.open,this.unsubscribe.push(g.I.subscribeKey("view",()=>{m.I.hide()}),y.W.subscribeKey("open",o=>{o||m.I.hide()}),m.I.subscribeKey("open",o=>{this.open=o}))}disconnectedCallback(){this.unsubscribe.forEach(o=>o()),m.I.hide()}render(){return(0,e.qy)` 1241 <div 1242 @pointermove=${this.onMouseEnter.bind(this)} 1243 @pointerleave=${this.onMouseLeave.bind(this)} 1244 > 1245 ${this.renderChildren()} 1246 </div> 1247 `}renderChildren(){return(0,e.qy)`<slot></slot> `}onMouseEnter(){const o=this.getBoundingClientRect();if(!this.open){const i=document.querySelector("w3m-modal"),s={width:o.width,height:o.height,left:o.left,top:o.top};if(i){const n=i.getBoundingClientRect();s.left=o.left-(window.innerWidth-n.width)/2,s.top=o.top-(window.innerHeight-n.height)/2}m.I.showTooltip({message:this.text,triggerRect:s,variant:"shade"})}}onMouseLeave(o){this.contains(o.relatedTarget)||m.I.hide()}},O(w,"WuiTooltipTrigger2"),w);C.styles=[W],f([(0,d.MZ)()],C.prototype,"text",void 0),f([(0,d.wk)()],C.prototype,"open",void 0),C=f([(0,$.EM)("w3m-tooltip-trigger")],C)},60060(j,L,t){var c;var e=t(75826),d=t(59262),m=t(83937),g=t(17885),y=t(34592),$=t(10174),W=t(19832);const f=(0,g.AH)` 1248 :host { 1249 pointer-events: none; 1250 } 1251 1252 :host > wui-flex { 1253 display: var(--w3m-tooltip-display); 1254 opacity: var(--w3m-tooltip-opacity); 1255 padding: 9px ${({spacing:o})=>o[3]} 10px ${({spacing:o})=>o[3]}; 1256 border-radius: ${({borderRadius:o})=>o[3]}; 1257 color: ${({tokens:o})=>o.theme.backgroundPrimary}; 1258 position: absolute; 1259 top: var(--w3m-tooltip-top); 1260 left: var(--w3m-tooltip-left); 1261 transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); 1262 max-width: calc(var(--apkt-modal-width) - ${({spacing:o})=>o[5]}); 1263 transition: opacity ${({durations:o})=>o.lg} 1264 ${({easings:o})=>o["ease-out-power-2"]}; 1265 will-change: opacity; 1266 opacity: 0; 1267 animation-duration: ${({durations:o})=>o.xl}; 1268 animation-timing-function: ${({easings:o})=>o["ease-out-power-2"]}; 1269 animation-name: fade-in; 1270 animation-fill-mode: forwards; 1271 } 1272 1273 :host([data-variant='shade']) > wui-flex { 1274 background-color: ${({tokens:o})=>o.theme.foregroundPrimary}; 1275 } 1276 1277 :host([data-variant='shade']) > wui-flex > wui-text { 1278 color: ${({tokens:o})=>o.theme.textSecondary}; 1279 } 1280 1281 :host([data-variant='fill']) > wui-flex { 1282 background-color: ${({tokens:o})=>o.theme.backgroundPrimary}; 1283 border: 1px solid ${({tokens:o})=>o.theme.borderPrimary}; 1284 } 1285 1286 wui-icon { 1287 position: absolute; 1288 width: 12px !important; 1289 height: 4px !important; 1290 color: ${({tokens:o})=>o.theme.foregroundPrimary}; 1291 } 1292 1293 wui-icon[data-placement='top'] { 1294 bottom: 0px; 1295 left: 50%; 1296 transform: translate(-50%, 95%); 1297 } 1298 1299 wui-icon[data-placement='bottom'] { 1300 top: 0; 1301 left: 50%; 1302 transform: translate(-50%, -95%) rotate(180deg); 1303 } 1304 1305 wui-icon[data-placement='right'] { 1306 top: 50%; 1307 left: 0; 1308 transform: translate(-65%, -50%) rotate(90deg); 1309 } 1310 1311 wui-icon[data-placement='left'] { 1312 top: 50%; 1313 right: 0%; 1314 transform: translate(65%, -50%) rotate(270deg); 1315 } 1316 1317 @keyframes fade-in { 1318 from { 1319 opacity: 0; 1320 } 1321 to { 1322 opacity: 1; 1323 } 1324 } 1325`;var C=O(function(o,i,s,n){var r=arguments.length,a=r<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,s):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,i,s,n);else for(var u=o.length-1;u>=0;u--)(l=o[u])&&(a=(r<3?l(a):r>3?l(i,s,a):l(i,s))||a);return r>3&&a&&Object.defineProperty(i,s,a),a},"__decorate");let w=(c=class extends e.WF{constructor(){super(),this.unsubscribe=[],this.open=m.I.state.open,this.message=m.I.state.message,this.triggerRect=m.I.state.triggerRect,this.variant=m.I.state.variant,this.unsubscribe.push(m.I.subscribe(i=>{this.open=i.open,this.message=i.message,this.triggerRect=i.triggerRect,this.variant=i.variant}))}disconnectedCallback(){this.unsubscribe.forEach(i=>
1325i())}render(){this.dataset.variant=this.variant;const i=this.triggerRect.top,s=this.triggerRect.left;return this.style.cssText=` 1326 --w3m-tooltip-top: ${i}px; 1327 --w3m-tooltip-left: ${s}px; 1328 --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; 1329 --w3m-tooltip-display: ${this.open?"flex":"none"}; 1330 --w3m-tooltip-opacity: ${this.open?1:0}; 1331 `,(0,e.qy)`<wui-flex> 1332 <wui-icon data-placement="top" size="inherit" name="cursor"></wui-icon> 1333 <wui-text color="primary" variant="sm-regular">${this.message}</wui-text> 1334 </wui-flex>`}},O(c,"W3mTooltip2"),c);w.styles=[f],C([(0,d.wk)()],w.prototype,"open",void 0),C([(0,d.wk)()],w.prototype,"message",void 0),C([(0,d.wk)()],w.prototype,"triggerRect",void 0),C([(0,d.wk)()],w.prototype,"variant",void 0),w=C([(0,g.EM)("w3m-tooltip")],w)},39520(j,L,t){var w;var e=t(75826),d=t(59262),m=t(72430),g=t(17885),y=t(34592),$=t(82811),W=t(65203),f=O(function(c,o,i,s){var n=arguments.length,r=n<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,i):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(c,o,i,s);else for(var l=c.length-1;l>=0;l--)(a=c[l])&&(r=(n<3?a(r):n>3?a(o,i,r):a(o,i))||r);return n>3&&r&&Object.defineProperty(o,i,r),r},"__decorate");let C=(w=class extends e.WF{constructor(){super(...arguments),this.tabIdx=void 0}render(){return(0,e.qy)` 1335 <wui-flex flexDirection="column" gap="2"> 1336 <w3m-connector-list tabIdx=${(0,m.J)(this.tabIdx)}></w3m-connector-list> 1337 <w3m-all-wallets-widget tabIdx=${(0,m.J)(this.tabIdx)}></w3m-all-wallets-widget> 1338 </wui-flex> 1339 `}},O(w,"W3mWalletLoginList2"),w);f([(0,d.MZ)()],C.prototype,"tabIdx",void 0),C=f([(0,g.EM)("w3m-wallet-login-list")],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.