"use strict";(self.webpackChunkfrog=self.webpackChunkfrog||[]).push([[6654],{4784:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(68342),s=i(6229),c=i(12525),l=i(66955);const u=n.AH` wui-separator { margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); width: calc(100% + var(--wui-spacing-s) * 2); } wui-email-input { width: 100%; } form { width: 100%; display: block; position: relative; } wui-icon-link, wui-loading-spinner { position: absolute; top: 50%; transform: translateY(-50%); } wui-icon-link { right: var(--wui-spacing-xs); } wui-loading-spinner { right: var(--wui-spacing-m); } wui-text { margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); } `;var d=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let p=class extends n.WF{constructor(){super(...arguments),this.unsubscribe=[],this.formRef=(0,r._)(),this.email="",this.loading=!1,this.error=""}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){return n.qy`
${this.submitButtonTemplate()}${this.loadingTemplate()}
${this.templateError()} `}submitButtonTemplate(){return!this.loading&&this.email.length>3?n.qy` `:null}loadingTemplate(){return this.loading?n.qy``:null}templateError(){return this.error?n.qy`${this.error}`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){if(!s.oU.AUTH_CONNECTOR_SUPPORTED_CHAINS.find((e=>e===c.WB.state.activeChain))){const e=c.WB.getFirstCaipNetworkSupportsAuthConnector();if(e)return void c.IN.push("SwitchNetwork",{network:e})}try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=c.aK.getAuthConnector();if(!t)throw new Error("w3m-email-login-widget: Auth connector not found");const{action:i}=await t.provider.connectEmail({email:this.email});c.En.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===i?(c.En.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),c.IN.push("EmailVerifyOtp",{email:this.email})):"VERIFY_DEVICE"===i?c.IN.push("EmailVerifyDevice",{email:this.email}):"CONNECT"===i&&(await c.x4.connectExternal(t,c.WB.state.activeChain),c.IN.replace("Account"))}catch(e){const t=c.wE.parseError(e);t?.includes("Invalid email")?this.error="Invalid email. Try again.":c.Pt.showError(e)}finally{this.loading=!1}}onFocusEvent(){c.En.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};p.styles=u,d([(0,o.MZ)()],p.prototype,"tabIdx",void 0),d([(0,o.wk)()],p.prototype,"email",void 0),d([(0,o.wk)()],p.prototype,"loading",void 0),d([(0,o.wk)()],p.prototype,"error",void 0),p=d([(0,l.customElement)("w3m-email-login-widget")],p)},4971:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=i(56092);const l=n.AH` :host { margin-top: var(--wui-spacing-3xs); } wui-separator { margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) calc(var(--wui-spacing-m) * -1); width: calc(100% + var(--wui-spacing-s) * 2); } `;var u=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let d=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{custom:e,recent:t,announced:i,injected:o,multiChain:s,recommended:l,featured:u,external:d}=c.g.getConnectorsByType(this.connectors),p=r.Hd.state.enableWalletConnect;return n.qy` ${p?n.qy``:null} ${t.length?n.qy``:null} ${s.length?n.qy``:null} ${i.length?n.qy``:null} ${o.length?n.qy``:null} ${u.length?n.qy``:null} ${e?.length?n.qy``:null} ${d.length?n.qy``:null} ${l.length?n.qy``:null} `}};d.styles=l,u([(0,o.MZ)()],d.prototype,"tabIdx",void 0),u([(0,o.wk)()],d.prototype,"connectors",void 0),d=u([(0,s.customElement)("w3m-connector-list")],d)},9121:(e,t,i)=>{var n=i(12618),o=i(66955);const a=n.AH` :host { width: 100%; max-height: 280px; overflow: scroll; scrollbar-width: none; } :host::-webkit-scrollbar { display: none; } `;var r=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let s=class extends n.WF{render(){return n.qy``}};s.styles=a,s=r([(0,o.customElement)("w3m-account-activity-widget")],s)},11529:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=i(65042),l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(...arguments),this.unsubscribe=[],this.tabIdx=void 0}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{featured:e}=r.Np.state;if(!e.length)return this.style.cssText="display: none",null;const t=c.A.filterOutDuplicateWallets(e);return n.qy` ${t.map((e=>n.qy` this.onConnectWallet(e)} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `}onConnectWallet(e){r.aK.selectWalletConnector(e)}};l([(0,o.MZ)()],u.prototype,"tabIdx",void 0),u=l([(0,s.customElement)("w3m-connect-featured-widget")],u)},14873:(e,t,i)=>{var n=i(12525),o=i(66955),a=i(18149),r=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let s=class extends a.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),n.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){try{this.error=!1;const{connectors:e}=n.aK.state,t=e.find((e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name));if(!t)throw new Error("w3m-connecting-wc-browser: No connector found");await n.x4.connectExternal(t,t.chain),n.W3.close(),n.En.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.wallet?.name||"Unknown"}})}catch(e){n.En.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};s=r([(0,o.customElement)("w3m-connecting-wc-browser")],s)},24379:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"INJECTED"===e.type));return!e?.length||1===e.length&&"Browser Wallet"===e[0]?.name&&!r.wE.isMobile()?(this.style.cssText="display: none",null):n.qy` ${e.map((e=>{if(!r.wE.isMobile()&&"Browser Wallet"===e.name)return null;const t=e.info?.rdns;return t||r.x4.checkInstalled(void 0)?t&&r.Np.state.excludedRDNS&&r.Np.state.excludedRDNS.includes(t)?null:n.qy` this.onConnector(e)} tabIdx=${(0,a.J)(this.tabIdx)} > `:(this.style.cssText="display: none",null)}))} `}onConnector(e){r.aK.setActiveConnector(e),r.IN.push("ConnectingExternal",{connector:e})}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),l=c([(0,s.customElement)("w3m-connect-injected-widget")],l)},26233:(e,t,i)=>{var n=i(12618),o=i(60031),a=i(12525),r=i(66955),s=i(18149);const c=n.AH` @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } wui-shimmer { width: 100%; aspect-ratio: 1 / 1; border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; } wui-qr-code { opacity: 0; animation-duration: 200ms; animation-timing-function: ease; animation-name: fadein; animation-fill-mode: forwards; } `;var l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends s.o{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),a.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach((e=>e())),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),n.qy` ${this.qrCodeTemplate()} Scan this QR Code with your phone ${this.copyTemplate()} `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout((()=>{this.ready=!0}),200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return a.x4.setWcLinking(void 0),a.x4.setRecentWallet(this.wallet),n.qy` `}copyTemplate(){const e=!this.uri||!this.ready;return n.qy` Copy link `}};u.styles=c,u=l([(0,r.customElement)("w3m-connecting-wc-qrcode")],u)},31337:(e,t,i)=>{var n=i(12618),o=i(12525),a=i(66955);const r=n.AH` .contentContainer { height: 280px; } .contentContainer > wui-icon-box { width: 40px; height: 40px; border-radius: var(--wui-border-radius-xxs); } .contentContainer > .textContent { width: 65%; } `;var s=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let c=class extends n.WF{render(){return n.qy`${this.nftTemplate()}`}nftTemplate(){return n.qy` Coming soon Stay tuned for our upcoming NFT feature Receive funds `}onReceiveClick(){o.IN.push("WalletReceive")}};c.styles=r,c=s([(0,a.customElement)("w3m-account-nfts-widget")],c)},32212:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=i(65042);const l=n.AH` wui-grid { max-height: clamp(360px, 400px, 80vh); overflow: scroll; scrollbar-width: none; grid-auto-rows: min-content; grid-template-columns: repeat(auto-fill, 104px); } @media (max-width: 350px) { wui-grid { grid-template-columns: repeat(2, 1fr); } } wui-grid[data-scroll='false'] { overflow: hidden; } wui-grid::-webkit-scrollbar { display: none; } wui-loading-spinner { padding-top: var(--wui-spacing-l); padding-bottom: var(--wui-spacing-l); justify-content: center; grid-column: 1 / span 4; } `;var u=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const d="local-paginator";let p=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!r.Np.state.wallets.length,this.wallets=r.Np.state.wallets,this.recommended=r.Np.state.recommended,this.featured=r.Np.state.featured,this.unsubscribe.push(r.Np.subscribeKey("wallets",(e=>this.wallets=e)),r.Np.subscribeKey("recommended",(e=>this.recommended=e)),r.Np.subscribeKey("featured",(e=>this.featured=e)))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),this.paginationObserver?.disconnect()}render(){return n.qy` ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} ${this.paginationLoaderTemplate()} `}async initialFetch(){this.loading=!0;const e=this.shadowRoot?.querySelector("wui-grid");e&&(await r.Np.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map((()=>n.qy` `))}walletsTemplate(){const e=[...this.featured,...this.recommended,...this.wallets];return c.A.markWalletsAsInstalled(e).map((e=>n.qy` this.onConnectWallet(e)} .wallet=${e} > `))}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:i,count:n}=r.Np.state,o=window.innerWidth<352?3:4,a=e.length+t.length;let s=Math.ceil(a/o)*o-a+o;return s-=e.length?i.length%o:0,0===n&&i.length>0?null:0===n||[...i,...e,...t].length{if(e?.isIntersecting&&!this.loading){const{page:e,count:t,wallets:i}=r.Np.state;i.length{var n=i(12618),o=i(25707),a=i(60031),r=i(6229),s=i(12525),c=i(66955),l=i(41457);const u=n.AH` wui-flex { width: 100%; } :host > wui-flex:first-child { transform: translateY(calc(var(--wui-spacing-xxs) * -1)); } wui-icon-link { margin-right: calc(var(--wui-icon-box-size-md) * -1); } wui-notice-card { margin-bottom: var(--wui-spacing-3xs); } wui-list-item > wui-text { flex: 1; } w3m-transactions-view { max-height: 200px; } .tab-content-container { height: 300px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; } .tab-content-container::-webkit-scrollbar { display: none; } .account-button { width: auto; border: none; display: flex; align-items: center; justify-content: center; gap: var(--wui-spacing-s); height: 48px; padding: var(--wui-spacing-xs); padding-right: var(--wui-spacing-s); box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); background-color: var(--wui-color-gray-glass-002); border-radius: 24px; transition: background-color 0.2s linear; } .account-button:hover { background-color: var(--wui-color-gray-glass-005); } .avatar-container { position: relative; } wui-avatar.avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); } wui-avatar.network-avatar { width: 16px; height: 16px; position: absolute; left: 100%; top: 100%; transform: translate(-75%, -75%); box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); } .account-links { display: flex; justify-content: space-between; align-items: center; } .account-links wui-flex { cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 1; background: red; align-items: center; justify-content: center; height: 48px; padding: 10px; flex: 1 0 0; border-radius: var(--XS, 16px); border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md), opacity var(--wui-ease-out-power-1) var(--wui-duration-md); will-change: background-color, opacity; } .account-links wui-flex:hover { background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); } .account-links wui-flex wui-icon { width: var(--S, 20px); height: var(--S, 20px); } .account-links wui-flex wui-icon svg path { stroke: #667dff; } `;var d=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let p=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.caipAddress=s.Uj.state.caipAddress,this.address=s.wE.getPlainAddress(s.Uj.state.caipAddress),this.allAccounts=s.Uj.state.allAccounts,this.profileImage=s.Uj.state.profileImage,this.profileName=s.Uj.state.profileName,this.disconnecting=!1,this.balance=s.Uj.state.balance,this.balanceSymbol=s.Uj.state.balanceSymbol,this.features=s.Hd.state.features,this.namespace=s.WB.state.activeChain,this.chainId=s.WB.state.activeCaipNetwork?.id,this.unsubscribe.push(s.Uj.subscribeKey("caipAddress",(e=>{this.address=s.wE.getPlainAddress(e),this.caipAddress=e})),s.Uj.subscribeKey("balance",(e=>this.balance=e)),s.Uj.subscribeKey("balanceSymbol",(e=>this.balanceSymbol=e)),s.Uj.subscribeKey("profileName",(e=>this.profileName=e)),s.Uj.subscribeKey("profileImage",(e=>this.profileImage=e)),s.Hd.subscribeKey("features",(e=>this.features=e)),s.Uj.subscribeKey("allAccounts",(e=>{this.allAccounts=e})),s.WB.subscribeKey("activeChain",(e=>this.namespace=e)),s.WB.subscribeKey("activeCaipNetwork",(e=>{if(e){const[t,i]=e?.caipNetworkId?.split(":")||[];t&&i&&(this.namespace=t,this.chainId=i)}})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!this.caipAddress)return null;const e=s.WB.state.activeChain!==r.oU.CHAIN.SOLANA&&this.allAccounts.length>1;return n.qy` ${e?this.multiAccountTemplate():this.singleAccountTemplate()} ${s.wE.formatBalance(this.balance,this.balanceSymbol)} ${this.explorerBtnTemplate()} ${this.authCardTemplate()} ${this.orderedFeaturesTemplate()} ${this.activityTemplate()} Disconnect `}onrampTemplate(){if(!this.namespace)return null;const e=this.features?.onramp,t=s.oU.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace);return e&&t?n.qy` Buy crypto `:null}orderedFeaturesTemplate(){return(this.features?.walletFeaturesOrder||s.oU.DEFAULT_FEATURES.walletFeaturesOrder).map((e=>{switch(e){case"onramp":return this.onrampTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}}))}activityTemplate(){if(!this.namespace)return null;const e=s.WB.state.activeChain===r.oU.CHAIN.SOLANA;return this.features?.history&&s.oU.ACTIVITY_ENABLED_CHAIN_NAMESPACES.includes(this.namespace)?n.qy` Activity ${e?n.qy`Coming soon`:""} `:null}swapsTemplate(){const e=this.features?.swaps,t=s.WB.state.activeChain===r.oU.CHAIN.EVM;return e&&t?n.qy` Swap `:null}sendTemplate(){const e=this.features?.send,t=s.WB.state.activeChain===r.oU.CHAIN.EVM;return e&&t?n.qy` Send `:null}authCardTemplate(){const e=s.WB.state.activeChain,t=s.iT.getConnectedConnectorId(e),i=s.aK.getAuthConnector(),{origin:o}=location;return!i||t!==r.oU.CONNECTOR_ID.AUTH||o.includes(s.oU.SECURE_SITE)?null:n.qy` `}handleSwitchAccountsView(){s.IN.push("SwitchAddress")}handleClickPay(){s.IN.push("OnRampProviders")}handleClickSwap(){s.IN.push("Swap")}handleClickSend(){s.IN.push("WalletSend")}explorerBtnTemplate(){return s.Uj.state.addressExplorerUrl?n.qy` Block Explorer `:null}singleAccountTemplate(){return n.qy` ${this.profileName?c.UiHelperUtil.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):c.UiHelperUtil.getTruncateString({string:this.address||"",charsStart:4,charsEnd:4,truncate:"middle"})} `}multiAccountTemplate(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=this.allAccounts.find((e=>e.address===this.address)),t=s.Uj.state.addressLabels.get(this.address);return"bip122"===this.namespace?this.btcAccountsTemplate():n.qy` `}btcAccountsTemplate(){return n.qy` s.Uj.setCaipAddress(`bip122:${this.chainId}:${this.allAccounts[e]?.address||""}`,this.namespace)} > ${c.UiHelperUtil.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})} `}onCopyAddress(){try{this.address&&(s.wE.copyToClopboard(this.address),s.Pt.showSuccess("Address copied"))}catch{s.Pt.showError("Failed to copy")}}onTransactions(){s.En.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:s.Uj.state.preferredAccountType===l.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),s.IN.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await s.x4.disconnect(),s.En.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),s.W3.close()}catch{s.En.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),s.Pt.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const e=s.Uj.state.addressExplorerUrl;e&&s.wE.openHref(e,"_blank")}onGoToUpgradeView(){s.En.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),s.IN.push("UpgradeEmailWallet")}};p.styles=u,d([(0,o.wk)()],p.prototype,"caipAddress",void 0),d([(0,o.wk)()],p.prototype,"address",void 0),d([(0,o.wk)()],p.prototype,"allAccounts",void 0),d([(0,o.wk)()],p.prototype,"profileImage",void 0),d([(0,o.wk)()],p.prototype,"profileName",void 0),d([(0,o.wk)()],p.prototype,"disconnecting",void 0),d([(0,o.wk)()],p.prototype,"balance",void 0),d([(0,o.wk)()],p.prototype,"balanceSymbol",void 0),d([(0,o.wk)()],p.prototype,"features",void 0),d([(0,o.wk)()],p.prototype,"namespace",void 0),d([(0,o.wk)()],p.prototype,"chainId",void 0),p=d([(0,c.customElement)("w3m-account-default-widget")],p)},34606:(e,t,i)=>{var n=i(12618),o=i(60031),a=i(12525),r=i(66955),s=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let c=class extends n.WF{constructor(){if(super(),this.wallet=a.IN.state.data?.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");a.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return n.qy` Not Detected `}};c=s([(0,r.customElement)("w3m-connecting-wc-unsupported")],c)},36634:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(12525),r=i(66955),s=i(41457);const c=n.AH` :host { width: 100%; } wui-flex { width: 100%; } .contentContainer { max-height: 280px; overflow: scroll; scrollbar-width: none; } .contentContainer::-webkit-scrollbar { display: none; } `;var l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tokenBalance=a.Uj.state.tokenBalance,this.unsubscribe.push(a.Uj.subscribe((e=>{this.tokenBalance=e.tokenBalance})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return n.qy`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?n.qy` ${this.tokenItemTemplate()} `:n.qy` `}tokenItemTemplate(){return this.tokenBalance?.map((e=>n.qy``))}onReceiveClick(){a.IN.push("WalletReceive")}onBuyClick(){a.En.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:a.Uj.state.preferredAccountType===s.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),a.IN.push("OnRampProviders")}};u.styles=c,l([(0,o.wk)()],u.prototype,"tokenBalance",void 0),u=l([(0,r.customElement)("w3m-account-tokens-widget")],u)},39159:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(12525),r=i(66955),s=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let c=class extends n.WF{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(a.x4.subscribeKey("buffering",(e=>this.buffering=e)))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.generateTabs();return n.qy` `}generateTabs(){const e=this.platforms.map((e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"}));return this.platformTabs=e.map((({platform:e})=>e)),e}onTabChange(e){const t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};s([(0,o.MZ)({type:Array})],c.prototype,"platforms",void 0),s([(0,o.MZ)()],c.prototype,"onSelectPlatfrom",void 0),s([(0,o.wk)()],c.prototype,"buffering",void 0),c=s([(0,r.customElement)("w3m-connecting-header")],c)},50250:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=i(41482);const l=n.AH` :host { height: 64px; } wui-text { text-transform: capitalize; } wui-flex.w3m-header-title { transform: translateY(0); opacity: 1; } wui-flex.w3m-header-title[view-direction='prev'] { animation: slide-down-out 120ms forwards var(--wui-ease-out-power-2), slide-down-in 120ms forwards var(--wui-ease-out-power-2); animation-delay: 0ms, 200ms; } wui-flex.w3m-header-title[view-direction='next'] { animation: slide-up-out 120ms forwards var(--wui-ease-out-power-2), slide-up-in 120ms forwards var(--wui-ease-out-power-2); animation-delay: 0ms, 200ms; } wui-icon-link[data-hidden='true'] { opacity: 0 !important; pointer-events: none; } @keyframes slide-up-out { from { transform: translateY(0px); opacity: 1; } to { transform: translateY(3px); opacity: 0; } } @keyframes slide-up-in { from { transform: translateY(-3px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes slide-down-out { from { transform: translateY(0px); opacity: 1; } to { transform: translateY(-3px); opacity: 0; } } @keyframes slide-down-in { from { transform: translateY(3px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } `;var u=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const d=["SmartSessionList"];function p(){const e=r.IN.state.data?.connector?.name,t=r.IN.state.data?.wallet?.name,i=r.IN.state.data?.network?.name,n=t??e,o=r.aK.getConnectors();return{Connect:`Connect ${1===o.length&&"w3m-email"===o[0]?.id?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Profile:void 0,SwitchNetwork:i??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:r.Uj.state.socialProvider?r.Uj.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In"}}let h=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.heading=p()[r.IN.state.view],this.network=r.WB.state.activeCaipNetwork,this.networkImage=r.$m.getNetworkImage(this.network),this.buffering=!1,this.showBack=!1,this.prevHistoryLength=1,this.view=r.IN.state.view,this.viewDirection="",this.headerText=p()[r.IN.state.view],this.unsubscribe.push(r.jQ.subscribeNetworkImages((()=>{this.networkImage=r.$m.getNetworkImage(this.network)})),r.IN.subscribeKey("view",(e=>{setTimeout((()=>{this.view=e,this.headerText=p()[e]}),c.o.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()})),r.x4.subscribeKey("buffering",(e=>this.buffering=e)),r.WB.subscribeKey("activeCaipNetwork",(e=>{this.network=e,this.networkImage=r.$m.getNetworkImage(this.network)})))}disconnectCallback(){this.unsubscribe.forEach((e=>e()))}render(){return n.qy` ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()} `}onWalletHelp(){r.En.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),r.IN.push("WhatIsAWallet")}async onClose(){"UnsupportedChain"===r.IN.state.view||await r.UG.isSIWXCloseDisabled()?r.W3.shake():r.W3.close()}rightHeaderTemplate(){const e=r.Hd?.state?.features?.smartSessions;return"Account"===r.IN.state.view&&e?n.qy` r.IN.push("SmartSessionList")} data-testid="w3m-header-smart-sessions" > ${this.closeButtonTemplate()} `:this.closeButtonTemplate()}closeButtonTemplate(){return n.qy` `}titleTemplate(){const e=d.includes(this.view);return n.qy` ${this.headerText} ${e?n.qy`Beta`:null} `}leftHeaderTemplate(){const{view:e}=r.IN.state,t="Connect"===e,i=r.Hd.state.enableEmbedded,o="ApproveTransaction"===e||"ConnectingSiwe"===e||t&&i;return"Account"===e?n.qy``:this.showBack&&!o?n.qy``:n.qy``}onNetworks(){this.isAllowedNetworkSwitch()&&(r.En.sendEvent({type:"track",event:"CLICK_NETWORKS"}),r.IN.push("Networks"))}isAllowedNetworkSwitch(){const e=r.WB.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,i=e?.find((({id:e})=>e===this.network?.id));return t||!i}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=r.IN.state;let t=c.o.VIEW_DIRECTION.Next;e.length1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){r.IN.goBack()}};h.styles=l,u([(0,o.wk)()],h.prototype,"heading",void 0),u([(0,o.wk)()],h.prototype,"network",void 0),u([(0,o.wk)()],h.prototype,"networkImage",void 0),u([(0,o.wk)()],h.prototype,"buffering",void 0),u([(0,o.wk)()],h.prototype,"showBack",void 0),u([(0,o.wk)()],h.prototype,"prevHistoryLength",void 0),u([(0,o.wk)()],h.prototype,"view",void 0),u([(0,o.wk)()],h.prototype,"viewDirection",void 0),u([(0,o.wk)()],h.prototype,"headerText",void 0),h=u([(0,s.customElement)("w3m-header")],h)},50502:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(6229),s=i(12525),c=i(66955),l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=s.aK.state.connectors,this.unsubscribe.push(s.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"EXTERNAL"===e.type)).filter((e=>e.id!==r.oU.CONNECTOR_ID.COINBASE_SDK));return e?.length?n.qy` ${e.map((e=>n.qy` this.onConnector(e)} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `:(this.style.cssText="display: none",null)}onConnector(e){s.IN.push("ConnectingExternal",{connector:e})}};l([(0,o.MZ)()],u.prototype,"tabIdx",void 0),l([(0,o.wk)()],u.prototype,"connectors",void 0),u=l([(0,c.customElement)("w3m-connect-external-widget")],u)},53554:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{customWallets:e}=r.Hd.state;if(!e?.length)return this.style.cssText="display: none",null;const t=this.filterOutDuplicateWallets(e);return n.qy` ${t.map((e=>n.qy` this.onConnectWallet(e)} data-testid=${`wallet-selector-${e.id}`} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `}filterOutDuplicateWallets(e){const t=r.iT.getRecentWallets(),i=this.connectors.map((e=>e.info?.rdns)).filter(Boolean),n=t.map((e=>e.rdns)).filter(Boolean),o=i.concat(n);if(o.includes("io.metamask.mobile")&&r.wE.isMobile()){const e=o.indexOf("io.metamask.mobile");o[e]="io.metamask"}return e.filter((e=>!o.includes(String(e?.rdns))))}onConnectWallet(e){r.IN.push("ConnectingWalletConnect",{wallet:e})}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),l=c([(0,s.customElement)("w3m-connect-custom-widget")],l)},55298:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}render(){const e=r.iT.getRecentWallets().filter((e=>!this.connectors.some((t=>t.id===e.id||t.name===e.name))));return e.length?n.qy` ${e.map((e=>n.qy` this.onConnectWallet(e)} tagLabel="recent" tagVariant="shade" tabIdx=${(0,a.J)(this.tabIdx)} > `))} `:(this.style.cssText="display: none",null)}onConnectWallet(e){r.aK.selectWalletConnector(e)}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),l=c([(0,s.customElement)("w3m-connect-recent-widget")],l)},57348:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"ANNOUNCED"===e.type));return e?.length?n.qy` ${e.map((e=>e.info?.rdns&&r.Np.state.excludedRDNS&&r.Np.state.excludedRDNS.includes(e?.info?.rdns)?null:n.qy` this.onConnector(e)} tagVariant="success" tagLabel="installed" data-testid=${`wallet-selector-${e.id}`} .installed=${!0} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `:(this.style.cssText="display: none",null)}onConnector(e){"walletConnect"===e.id?r.wE.isMobile()?r.IN.push("AllWallets"):r.IN.push("ConnectingWalletConnect"):r.IN.push("ConnectingExternal",{connector:e})}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),l=c([(0,s.customElement)("w3m-connect-announced-widget")],l)},58336:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(12525),r=i(66955),s=i(65042);const c=n.AH` wui-grid, wui-loading-spinner, wui-flex { height: 360px; } wui-grid { overflow: scroll; scrollbar-width: none; grid-auto-rows: min-content; grid-template-columns: repeat(auto-fill, 104px); } wui-grid[data-scroll='false'] { overflow: hidden; } wui-grid::-webkit-scrollbar { display: none; } wui-loading-spinner { justify-content: center; align-items: center; } @media (max-width: 350px) { wui-grid { grid-template-columns: repeat(2, 1fr); } } `;var l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?n.qy``: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 a.Np.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){const{search:e}=a.Np.state,t=s.A.markWalletsAsInstalled(e);return e.length?n.qy` ${t.map((e=>n.qy` this.onConnectWallet(e)} .wallet=${e} data-testid="wallet-search-item-${e.id}" > `))} `:n.qy` No Wallet found `}onConnectWallet(e){a.aK.selectWalletConnector(e)}};u.styles=c,l([(0,o.wk)()],u.prototype,"loading",void 0),l([(0,o.MZ)()],u.prototype,"query",void 0),l([(0,o.MZ)()],u.prototype,"badge",void 0),u=l([(0,r.customElement)("w3m-all-wallets-search")],u)},66888:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.filter((e=>"MULTI_CHAIN"===e.type&&"WalletConnect"!==e.name));return e?.length?n.qy` ${e.map((e=>n.qy` this.onConnector(e)} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `:(this.style.cssText="display: none",null)}onConnector(e){r.aK.setActiveConnector(e),r.IN.push("ConnectingMultiChain")}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),l=c([(0,s.customElement)("w3m-connect-multi-chain-widget")],l)},68392:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955);const c=n.AH` button { display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; width: 104px; row-gap: var(--wui-spacing-xs); padding: var(--wui-spacing-s) var(--wui-spacing-0); background-color: var(--wui-color-gray-glass-002); border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); transition: color var(--wui-duration-lg) var(--wui-ease-out-power-1), background-color var(--wui-duration-lg) var(--wui-ease-out-power-1), border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1); will-change: background-color, color, border-radius; outline: none; border: none; } button > wui-flex > wui-text { color: var(--wui-color-fg-100); max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; } button > wui-flex > wui-text.certified { max-width: 66px; } button:hover:enabled { background-color: var(--wui-color-gray-glass-005); } button:disabled > wui-flex > wui-text { color: var(--wui-color-gray-glass-015); } [data-selected='true'] { background-color: var(--wui-color-accent-glass-020); } @media (hover: hover) and (pointer: fine) { [data-selected='true']:hover:enabled { background-color: var(--wui-color-accent-glass-015); } } [data-selected='true']:active:enabled { background-color: var(--wui-color-accent-glass-010); } @media (max-width: 350px) { button { width: 100%; } } `;var l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(),this.observer=new IntersectionObserver((()=>{})),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1}))}),{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){const e="certified"===this.wallet?.badge_type;return n.qy` `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():n.qy` `}shimmerTemplate(){return n.qy``}async fetchImageSrc(){this.wallet&&(this.imageSrc=r.$m.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await r.$m.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};u.styles=c,l([(0,o.wk)()],u.prototype,"visible",void 0),l([(0,o.wk)()],u.prototype,"imageSrc",void 0),l([(0,o.wk)()],u.prototype,"imageLoading",void 0),l([(0,o.MZ)()],u.prototype,"wallet",void 0),u=l([(0,s.customElement)("w3m-all-wallets-list-item")],u)},69037:(e,t,i)=>{var n=i(12525),o=i(66955),a=i(18149),r=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let s=class extends a.o{constructor(){if(super(),this.btnLabelTimeout=void 0,this.labelTimeout=void 0,this.onRender=()=>{!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())},this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:e,name:t}=this.wallet,{redirect:i,href:o}=n.wE.formatNativeUrl(e,this.uri);n.x4.setWcLinking({name:t,href:o}),n.x4.setRecentWallet(this.wallet);const a=n.wE.isIframe()?"_top":"_self";n.wE.openHref(i,a),clearTimeout(this.labelTimeout),this.secondaryLabel=n.oU.CONNECT_LABELS.MOBILE}catch(e){n.En.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:e instanceof Error?e.message:"Error parsing the deeplink",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel=void 0,this.secondaryLabel=n.oU.CONNECT_LABELS.MOBILE,document.addEventListener("visibilitychange",this.onBuffering.bind(this)),n.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}}),this.btnLabelTimeout=setTimeout((()=>{this.secondaryBtnLabel="Try again",this.secondaryLabel=n.oU.CONNECT_LABELS.MOBILE}),n.oU.FIVE_SEC_MS),this.labelTimeout=setTimeout((()=>{this.secondaryLabel="Hold tight... it's taking longer than expected"}),n.oU.THREE_SEC_MS)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this)),clearTimeout(this.btnLabelTimeout),clearTimeout(this.labelTimeout)}onBuffering(){const e=n.wE.isIos();"visible"===document?.visibilityState&&!this.error&&e&&(n.x4.setBuffering(!0),setTimeout((()=>{n.x4.setBuffering(!1)}),5e3))}onTryAgain(){this.buffering||(n.x4.setWcError(!1),this.onConnect())}};s=r([(0,o.customElement)("w3m-connecting-wc-mobile")],s)},69650:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.count=r.Np.state.count,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)),r.Np.subscribeKey("count",(e=>this.count=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=this.connectors.find((e=>"walletConnect"===e.id)),{allWallets:t}=r.Hd.state;if(!e||"HIDE"===t)return null;if("ONLY_MOBILE"===t&&!r.wE.isMobile())return null;const i=r.Np.state.featured.length,o=this.count+i,s=o<10?o:10*Math.floor(o/10),c=s `}onAllWallets(){r.En.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),r.IN.push("AllWallets")}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),c([(0,o.wk)()],l.prototype,"count",void 0),l=c([(0,s.customElement)("w3m-all-wallets-widget")],l)},70777:(e,t,i)=>{var n=i(12525),o=i(66955),a=i(18149),r=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let s=class extends a.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),n.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:e,name:t}=this.wallet,{redirect:i,href:o}=n.wE.formatNativeUrl(e,this.uri);n.x4.setWcLinking({name:t,href:o}),n.x4.setRecentWallet(this.wallet),n.wE.openHref(i,"_blank")}catch{this.error=!0}}};s=r([(0,o.customElement)("w3m-connecting-wc-desktop")],s)},77463:(e,t,i)=>{var n=i(12525),o=i(66955),a=i(18149),r=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let s=class extends a.o{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",n.En.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:e,name:t}=this.wallet,{redirect:i,href:o}=n.wE.formatUniversalUrl(e,this.uri);n.x4.setWcLinking({name:t,href:o}),n.x4.setRecentWallet(this.wallet),n.wE.openHref(i,"_blank")}catch{this.error=!0}}};s=r([(0,o.customElement)("w3m-connecting-wc-web")],s)},78306:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=i(65042),l=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let u=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!this.connectors.find((e=>"walletConnect"===e.id)))return null;const{recommended:e}=r.Np.state,{customWallets:t,featuredWalletIds:i}=r.Hd.state,{connectors:o}=r.aK.state,s=r.iT.getRecentWallets(),l=o.filter((e=>"INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type)).filter((e=>"Browser Wallet"!==e.name));if(i||t||!e.length)return this.style.cssText="display: none",null;const u=l.length+s.length,d=Math.max(0,2-u),p=c.A.filterOutDuplicateWallets(e).slice(0,d);return p.length?n.qy` ${p.map((e=>n.qy` this.onConnectWallet(e)} tabIdx=${(0,a.J)(this.tabIdx)} > `))} `:(this.style.cssText="display: none",null)}onConnectWallet(e){const t=r.aK.getConnector(e.id,e.rdns);t?r.IN.push("ConnectingExternal",{connector:t}):r.IN.push("ConnectingWalletConnect",{wallet:e})}};l([(0,o.MZ)()],u.prototype,"tabIdx",void 0),l([(0,o.wk)()],u.prototype,"connectors",void 0),u=l([(0,s.customElement)("w3m-connect-recommended-widget")],u)},78936:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(12525),r=i(66955);const s=n.AH` :host { display: block; position: absolute; top: var(--wui-spacing-s); left: var(--wui-spacing-l); right: var(--wui-spacing-l); opacity: 0; pointer-events: none; } `;var c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const l={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"exclamationTriangle"}};let u=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.open=a.hG.state.open,this.onOpen(!0),this.unsubscribe.push(a.hG.subscribeKey("open",(e=>{this.open=e,this.onOpen(!1)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const{message:e,variant:t}=a.hG.state,i=l[t];return n.qy` `}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};u.styles=s,c([(0,o.wk)()],u.prototype,"open",void 0),u=c([(0,r.customElement)("w3m-alertbar")],u)},81592:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(6229),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=r.iT.getConnectedSocialProvider(),this.socialUsername=r.iT.getConnectedSocialUsername(),this.namespace=r.WB.state.activeChain,this.unsubscribe.push(r.WB.subscribeKey("activeChain",(e=>{this.namespace=e})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){const e=r.iT.getConnectedConnectorId(this.namespace),t=r.aK.getAuthConnector();if(!t||e!==a.oU.CONNECTOR_ID.AUTH)return this.style.cssText="display: none",null;const i=t.provider.getEmail()??"";return n.qy` {this.onGoToUpdateEmail(i,this.socialProvider)}} > ${this.getAuthName(i)} `}onGoToUpdateEmail(e,t){t||r.IN.push("UpdateEmailWallet",{email:e})}getAuthName(e){return this.socialUsername?"discord"===this.socialProvider&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};c([(0,o.wk)()],l.prototype,"namespace",void 0),l=c([(0,s.customElement)("w3m-account-auth-button")],l)},88287:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(6229),r=i(12525),s=i(66955),c=i(41457);const l=n.AH` :host { min-height: 100%; } .group-container[last-group='true'] { padding-bottom: var(--wui-spacing-m); } .contentContainer { height: 280px; } .contentContainer > wui-icon-box { width: 40px; height: 40px; border-radius: var(--wui-border-radius-xxs); } .contentContainer > .textContent { width: 65%; } .emptyContainer { height: 100%; } `;var u=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const d="last-transaction";let p=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=r.WB.state.activeCaipAddress,this.transactionsByYear=r.WC.state.transactionsByYear,this.loading=r.WC.state.loading,this.empty=r.WC.state.empty,this.next=r.WC.state.next,r.WC.clearCursor(),this.unsubscribe.push(r.WB.subscribeKey("activeCaipAddress",(e=>{e&&this.caipAddress!==e&&(r.WC.resetTransactions(),r.WC.fetchTransactions(e)),this.caipAddress=e})),r.WB.subscribeKey("activeCaipNetwork",(()=>{this.updateTransactionView()})),r.WC.subscribe((e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next})))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){return n.qy` ${this.empty?null:this.templateTransactionsByYear()} ${this.loading?this.templateLoading():null} ${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){const e=r.WB.state.activeCaipNetwork?.caipNetworkId;r.WC.state.lastNetworkInView!==e&&(r.WC.resetTransactions(),this.caipAddress&&r.WC.fetchTransactions(r.wE.getPlainAddress(this.caipAddress))),r.WC.setLastNetworkInView(e)}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map((e=>{const t=parseInt(e,10),i=new Array(12).fill(null).map(((e,i)=>{const n=s.TransactionUtil.getTransactionGroupTitle(t,i),o=this.transactionsByYear[t]?.[i];return{groupTitle:n,transactions:o}})).filter((({transactions:e})=>e)).reverse();return i.map((({groupTitle:e,transactions:t},o)=>{const a=o===i.length-1;return t?n.qy` ${e} ${this.templateTransactions(t,a)} `:null}))}))}templateRenderTransaction(e,t){const{date:i,descriptions:o,direction:a,isAllNFT:r,images:c,status:l,transfers:u,type:p}=this.getTransactionListItemProps(e),h=u?.length>1;return 2===u?.length&&!r?n.qy` `:h?u.map(((e,o)=>{const a=s.TransactionUtil.getTransferDescription(e),r=t&&o===u.length-1;return n.qy` `})):n.qy` `}templateTransactions(e,t){return e.map(((i,o)=>{const a=t&&o===e.length-1;return n.qy`${this.templateRenderTransaction(i,a)}`}))}emptyStateActivity(){return n.qy` No Transactions yet Start trading on dApps
to grow your wallet!
`}emptyStateAccount(){return n.qy` No activity yet Your next transactions will appear here Trade `}templateEmpty(){return"account"===this.page?n.qy`${this.emptyStateAccount()}`:n.qy`${this.emptyStateActivity()}`}templateLoading(){return"activity"===this.page?Array(7).fill(n.qy` `).map((e=>e)):null}onReceiveClick(){r.IN.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=r.Hd.state;this.paginationObserver=new IntersectionObserver((([t])=>{t?.isIntersecting&&!this.loading&&(r.WC.fetchTransactions(r.wE.getPlainAddress(this.caipAddress)),r.En.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:r.wE.getPlainAddress(this.caipAddress),projectId:e,cursor:this.next,isSmartAccount:r.Uj.state.preferredAccountType===c.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}))}),{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();const e=this.shadowRoot?.querySelector(`#${d}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){const t=a.rL.formatDate(e?.metadata?.minedAt),i=s.TransactionUtil.getTransactionDescriptions(e),n=e?.transfers,o=e?.transfers?.[0],r=Boolean(o)&&e?.transfers?.every((e=>Boolean(e.nft_info))),c=s.TransactionUtil.getTransactionImages(n);return{date:t,direction:o?.direction,descriptions:i,isAllNFT:r,images:c,status:e.metadata?.status,transfers:n,type:e.metadata?.operationType}}};p.styles=l,u([(0,o.MZ)()],p.prototype,"page",void 0),u([(0,o.wk)()],p.prototype,"caipAddress",void 0),u([(0,o.wk)()],p.prototype,"transactionsByYear",void 0),u([(0,o.wk)()],p.prototype,"loading",void 0),u([(0,o.wk)()],p.prototype,"empty",void 0),u([(0,o.wk)()],p.prototype,"next",void 0),p=u([(0,s.customElement)("w3m-activity-list")],p)},98704:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(12525),s=i(66955),c=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let l=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=r.aK.state.connectors,this.connectorImages=r.jQ.state.connectorImages,this.unsubscribe.push(r.aK.subscribeKey("connectors",(e=>this.connectors=e)),r.jQ.subscribeKey("connectorImages",(e=>this.connectorImages=e)))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(r.wE.isMobile())return this.style.cssText="display: none",null;const e=this.connectors.find((e=>"walletConnect"===e.id));if(!e)return this.style.cssText="display: none",null;const t=e.imageUrl||this.connectorImages[e?.imageId??""];return n.qy` this.onConnector(e)} tagLabel="qr code" tagVariant="main" tabIdx=${(0,a.J)(this.tabIdx)} data-testid="wallet-selector-walletconnect" > `}onConnector(e){r.aK.setActiveConnector(e),r.IN.push("ConnectingWalletConnect")}};c([(0,o.MZ)()],l.prototype,"tabIdx",void 0),c([(0,o.wk)()],l.prototype,"connectors",void 0),c([(0,o.wk)()],l.prototype,"connectorImages",void 0),l=c([(0,s.customElement)("w3m-connect-walletconnect-widget")],l)},99317:(e,t,i)=>{var n=i(12618),o=i(25707),a=i(60031),r=i(6229),s=i(12525),c=i(66955),l=i(41457),u=i(41482);const d=n.AH` wui-flex { width: 100%; } wui-promo { position: absolute; top: -32px; } wui-profile-button { margin-top: calc(-1 * var(--wui-spacing-2l)); } wui-promo + wui-profile-button { margin-top: var(--wui-spacing-2l); } wui-tabs { width: 100%; } .contentContainer { height: 280px; } .contentContainer > wui-icon-box { width: 40px; height: 40px; border-radius: var(--wui-border-radius-xxs); } .contentContainer > .textContent { width: 65%; } `;var p=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let h=class extends n.WF{constructor(){super(),this.unsubscribe=[],this.address=s.Uj.state.address,this.profileImage=s.Uj.state.profileImage,this.profileName=s.Uj.state.profileName,this.network=s.WB.state.activeCaipNetwork,this.currentTab=s.Uj.state.currentTab,this.tokenBalance=s.Uj.state.tokenBalance,this.features=s.Hd.state.features,this.networkImage=s.$m.getNetworkImage(this.network),this.unsubscribe.push(s.jQ.subscribeNetworkImages((()=>{this.networkImage=s.$m.getNetworkImage(this.network)})),s.Uj.subscribe((e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance):s.W3.close()})),s.WB.subscribeKey("activeCaipNetwork",(e=>this.network=e)),s.Hd.subscribeKey("features",(e=>this.features=e))),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach((e=>e())),clearInterval(this.watchTokenBalance)}firstUpdated(){s.Uj.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");return n.qy` ${this.network&&n.qy``} ${this.tokenBalanceTemplate()} ${this.orderedWalletFeatures()} ${this.listContentTemplate()} `}orderedWalletFeatures(){const e=this.features?.walletFeaturesOrder||s.oU.DEFAULT_FEATURES.walletFeaturesOrder;return e.every((e=>!this.features?.[e]))?null:n.qy` ${e.map((e=>{switch(e){case"onramp":return this.onrampTemplate();case"swaps":return this.swapsTemplate();case"receive":return this.receiveTemplate();case"send":return this.sendTemplate();default:return null}}))} `}onrampTemplate(){const e=this.features?.onramp;return e?n.qy` `:null}swapsTemplate(){const e=this.features?.swaps,t=s.WB.state.activeChain===r.oU.CHAIN.EVM;return e&&t?n.qy` `:null}receiveTemplate(){const e=this.features?.receive;return e?n.qy` `:null}sendTemplate(){const e=this.features?.send,t=s.WB.state.activeChain===r.oU.CHAIN.EVM;return e&&t?n.qy` `:null}watchSwapValues(){this.watchTokenBalance=setInterval((()=>s.Uj.fetchTokenBalance((e=>this.onTokenBalanceError(e)))),1e4)}onTokenBalanceError(e){if(e instanceof Error&&e.cause instanceof Response){e.cause.status===r.oU.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE&&clearInterval(this.watchTokenBalance)}}listContentTemplate(){return 0===this.currentTab?n.qy``:1===this.currentTab?n.qy``:2===this.currentTab?n.qy``:n.qy``}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){const e=s.wE.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:i="00"}=s.wE.formatTokenBalance(e);return n.qy``}return n.qy``}onTabChange(e){s.Uj.setCurrentTab(e)}onProfileButtonClick(){const{allAccounts:e}=s.Uj.state;e.length>1?s.IN.push("Profile"):s.IN.push("AccountSettings")}onBuyClick(){s.IN.push("OnRampProviders")}onSwapClick(){this.network?.caipNetworkId&&!s.oU.SWAP_SUPPORTED_NETWORKS.includes(this.network?.caipNetworkId)?s.IN.push("UnsupportedChain",{swapUnsupportedChain:!0}):(s.En.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:s.Uj.state.preferredAccountType===l.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),s.IN.push("Swap"))}onReceiveClick(){s.IN.push("WalletReceive")}onSendClick(){s.En.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:s.Uj.state.preferredAccountType===l.Vl.ACCOUNT_TYPES.SMART_ACCOUNT}}),s.IN.push("WalletSend")}};h.styles=d,p([(0,o.wk)()],h.prototype,"watchTokenBalance",void 0),p([(0,o.wk)()],h.prototype,"address",void 0),p([(0,o.wk)()],h.prototype,"profileImage",void 0),p([(0,o.wk)()],h.prototype,"profileName",void 0),p([(0,o.wk)()],h.prototype,"network",void 0),p([(0,o.wk)()],h.prototype,"currentTab",void 0),p([(0,o.wk)()],h.prototype,"tokenBalance",void 0),p([(0,o.wk)()],h.prototype,"features",void 0),p([(0,o.wk)()],h.prototype,"networkImage",void 0),h=p([(0,c.customElement)("w3m-account-wallet-features-widget")],h)}}]);