1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2452],{22452:function(e,t,i){i.r(t),i.d(t,{AppKitModal:function(){return ev},W3mModal:function(){return eh},W3mModalBase:function(){return em}});var o=i(31133),r=i(19848),a=i(32801),n=i(44649),s=i(48415),l=i(49425),c=i(6943),d=i(35652),w=i(17766),p=i(86777),u=i(41505);let m={isUnsupportedChainView:()=>"UnsupportedChain"===p.RouterController.state.view||"SwitchNetwork"===p.RouterController.state.view&&p.RouterController.state.history.includes("UnsupportedChain"),async safeClose(){if(this.isUnsupportedChainView()||await u.w.isSIWXCloseDisabled()){l.I.shake();return}l.I.close()}};var h=i(52005),v=i(66909),g=i(53357),y=i(30795),f=i(84249),b=i(57116),C=(0,o.iv)` 2 :host { 3 display: block; 4 border-radius: clamp(0px, var(--wui-border-radius-l), 44px); 5 box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005); 6 background-color: var(--wui-color-modal-bg); 7 overflow: hidden; 8 } 9 10 :host([data-embedded='true']) { 11 box-shadow: 12 0 0 0 1px var(--wui-color-gray-glass-005), 13 0px 4px 12px 4px var(--w3m-card-embedded-shadow-color); 14 } 15`;let k=class extends o.oi{render(){return(0,o.dy)`<slot></slot>`}};k.styles=[f.ET,C],k=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n}([(0,b.M)("wui-card")],k),i(96277);var x=i(72723);i(95137),i(18360),i(5680);var S=(0,o.iv)` 16 :host { 17 display: flex; 18 align-items: center; 19 justify-content: center; 20 padding: var(--wui-spacing-s); 21 border-radius: var(--wui-border-radius-s); 22 border: 1px solid var(--wui-color-dark-glass-100); 23 box-sizing: border-box; 24 background-color: var(--wui-color-bg-325); 25 box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25); 26 } 27 28 wui-flex { 29 width: 100%; 30 } 31 32 wui-text { 33 word-break: break-word; 34 flex: 1; 35 } 36 37 .close { 38 cursor: pointer; 39 } 40 41 .icon-box { 42 height: 40px; 43 width: 40px; 44 border-radius: var(--wui-border-radius-3xs); 45 background-color: var(--local-icon-bg-value); 46 } 47`,R=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let N=class extends o.oi{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=` 48 --local-icon-bg-value: var(--wui-color-${this.backgroundColor}); 49 `,(0,o.dy)` 50 <wui-flex flexDirection="row" justifyContent="space-between" alignItems="center"> 51 <wui-flex columnGap="xs" flexDirection="row" alignItems="center"> 52 <wui-flex 53 flexDirection="row" 54 alignItems="center" 55 justifyContent="center" 56 class="icon-box" 57 > 58 <wui-icon color=${this.iconColor} size="md" name=${this.icon}></wui-icon> 59 </wui-flex> 60 <wui-text variant="small-500" color="bg-350" data-testid="wui-alertbar-text" 61 >${this.message}</wui-text 62 > 63 </wui-flex> 64 <wui-icon 65 class="close" 66 color="bg-350" 67 size="sm" 68 name="close" 69 @click=${this.onClose} 70 ></wui-icon> 71 </wui-flex> 72 `}onClose(){x.AlertController.close()}};N.styles=[f.ET,S],R([(0,r.Cb)()],N.prototype,"message",void 0),R([(0,r.Cb)()],N.prototype,"backgroundColor",void 0),R([(0,r.Cb)()],N.prototype,"iconColor",void 0),R([(0,r.Cb)()],N.prototype,"icon",void 0),N=R([(0,b.M)("wui-alertbar")],N);var O=(0,o.iv)` 73 :host { 74 display: block; 75 position: absolute; 76 top: var(--wui-spacing-s); 77 left: var(--wui-spacing-l); 78 right: var(--wui-spacing-l); 79 opacity: 0; 80 pointer-events: none; 81 } 82`,T=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let A={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"}},E=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.open=x.AlertController.state.open,this.onOpen(!0),this.unsubscribe.push(x.AlertController.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}
82disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=x.AlertController.state,i=A[t];return(0,o.dy)` 83 <wui-alertbar 84 message=${e} 85 backgroundColor=${i?.backgroundColor} 86 iconColor=${i?.iconColor} 87 icon=${i?.icon} 88 ></wui-alertbar> 89 `}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")}};E.styles=O,T([(0,r.SB)()],E.prototype,"open",void 0),E=T([(0,y.Mo)("w3m-alertbar")],E);var I=i(68584),W=i(63043),$=i(22472),P=i(31929),B=(0,o.iv)` 90 button { 91 border-radius: var(--local-border-radius); 92 color: var(--wui-color-fg-100); 93 padding: var(--local-padding); 94 } 95 96 @media (max-width: 700px) { 97 button { 98 padding: var(--wui-spacing-s); 99 } 100 } 101 102 button > wui-icon { 103 pointer-events: none; 104 } 105 106 button:disabled > wui-icon { 107 color: var(--wui-color-bg-300) !important; 108 } 109 110 button:disabled { 111 background-color: transparent; 112 } 113`,j=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let D=class extends o.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}
113render(){let e="lg"===this.size?"--wui-border-radius-xs":"--wui-border-radius-xxs",t="lg"===this.size?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=` 114 --local-border-radius: var(${e}); 115 --local-padding: var(${t}); 116`,(0,o.dy)` 117 <button ?disabled=${this.disabled}> 118 <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon> 119 </button> 120 `}};D.styles=[f.ET,f.ZM,f.Bp,B],j([(0,r.Cb)()],D.prototype,"size",void 0),j([(0,r.Cb)({type:Boolean})],D.prototype,"disabled",void 0),j([(0,r.Cb)()],D.prototype,"icon",void 0),j([(0,r.Cb)()],D.prototype,"iconColor",void 0),D=j([(0,b.M)("wui-icon-link")],D),i(23805),i(1736);var L=(0,o.iv)` 121 button { 122 display: block; 123 display: flex; 124 align-items: center; 125 padding: var(--wui-spacing-xxs); 126 gap: var(--wui-spacing-xxs); 127 transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); 128 border-radius: var(--wui-border-radius-xxs); 129 } 130 131 wui-image { 132 border-radius: 100%; 133 width: var(--wui-spacing-xl); 134 height: var(--wui-spacing-xl); 135 } 136 137 wui-icon-box { 138 width: var(--wui-spacing-xl); 139 height: var(--wui-spacing-xl); 140 } 141 142 button:hover { 143 background-color: var(--wui-color-gray-glass-002); 144 } 145 146 button:active { 147 background-color: var(--wui-color-gray-glass-005); 148 } 149`,z=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let M=class extends o.oi{constructor(){super(...arguments),this.imageSrc=""}render(){return(0,o.dy)`<button> 150 ${this.imageTemplate()} 151 <wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon> 152 </button>`}imageTemplate(){return this.imageSrc?(0,o.dy)`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:(0,o.dy)`<wui-icon-box 153 size="xxs" 154 iconColor="fg-200" 155 backgroundColor="fg-100" 156 background="opaque" 157 icon="networkPlaceholder" 158 ></wui-icon-box>`}};M.styles=[f.ET,f.ZM,f.Bp,L],z([(0,r.Cb)()],M.prototype,"imageSrc",void 0),M=z([(0,b.M)("wui-select")],M),i(80675),i(44732);var U=i(54946),H=(0,o.iv)` 159 :host { 160 height: 64px; 161 } 162 163 wui-text { 164 text-transform: capitalize; 165 } 166 167 wui-flex.w3m-header-title { 168 transform: translateY(0); 169 opacity: 1; 170 } 171 172 wui-flex.w3m-header-title[view-direction='prev'] { 173 animation: 174 slide-down-out 120ms forwards var(--wui-ease-out-power-2), 175 slide-down-in 120ms forwards var(--wui-ease-out-power-2); 176 animation-delay: 0ms, 200ms; 177 } 178 179 wui-flex.w3m-header-title[view-direction='next'] { 180 animation: 181 slide-up-out 120ms forwards var(--wui-ease-out-power-2), 182 slide-up-in 120ms forwards var(--wui-ease-out-power-2); 183 animation-delay: 0ms, 200ms; 184 } 185 186 wui-icon-link[data-hidden='true'] { 187 opacity: 0 !important; 188 pointer-events: none; 189 } 190 191 @keyframes slide-up-out { 192 from { 193 transform: translateY(0px); 194 opacity: 1; 195 } 196 to { 197 transform: translateY(3px); 198 opacity: 0; 199 } 200 } 201 202 @keyframes slide-up-in { 203 from { 204 transform: translateY(-3px); 205 opacity: 0; 206 } 207 to { 208 transform: translateY(0); 209 opacity: 1; 210 } 211 } 212 213 @keyframes slide-down-out { 214 from { 215 transform: translateY(0px); 216 opacity: 1; 217 } 218 to { 219 transform: translateY(-3px); 220 opacity: 0; 221 } 222 } 223 224 @keyframes slide-down-in { 225 from { 226 transform: translateY(3px); 227 opacity: 0; 228 } 229 to { 230 transform: translateY(0); 231 opacity: 1; 232 } 233 } 234`,K=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let X=["SmartSessionList"];function V(){let e=p.RouterController.state.data?.connector?.name,t=p.RouterController.state.data?.wallet?.name,i=p.RouterController.state.data?.network?.name,o=t??e,r=d.ConnectorController.getConnectors(),a=1===r.length&&r[0]?.id==="w3m-email";return{Connect:`Connect ${a?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExter
234nal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",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:I.N.state.socialProvider?I.N.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in progress"}}let _=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.heading=V()[p.RouterController.state.view],this.network=c.R.state.activeCaipNetwork,this.networkImage=W.f.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=p.RouterController.state.view,this.viewDirection="",this.headerText=V()[p.RouterController.state.view],this.unsubscribe.push($.W.subscribeNetworkImages(()=>{this.networkImage=W.f.getNetworkImage(this.network)}),p.RouterController.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=V()[e]},U.b.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),c.R.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=W.f.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.dy)` 235 <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center"> 236 ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()} 237 </wui-flex> 238 `}onWalletHelp(){P.X.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),p.RouterController.push("WhatIsAWallet")}async onClose(){await m.safeClose()}rightHeaderTemplate(){let e=s.OptionsController?.state?.features?.smartSessions;return"Account"===p.RouterController.state.view&&e?(0,o.dy)`<wui-flex> 239 <wui-icon-link 240 icon="clock" 241 @click=${()=>p.RouterController.push("SmartSessionList")} 242 data-testid="w3m-header-smart-sessions" 243 ></wui-icon-link> 244 ${this.closeButtonTemplate()} 245 </wui-flex> `:this.closeButtonTemplate()}closeButtonTemplate(){return(0,o.dy)` 246 <wui-icon-link 247 icon="close" 248 @click=${this.onClose.bind(this)} 249 data-testid="w3m-header-close" 250 ></wui-icon-link> 251 `}titleTemplate(){let e=X.includes(this.view);return(0,o.dy)` 252 <wui-flex 253 view-direction="${this.viewDirection}" 254 class="w3m-header-title" 255 alignItems="center" 256 gap="xs" 257 > 258 <wui-text variant="paragraph-700" color="fg-100" data-testid="w3m-header-text" 259 >${this.headerText}</wui-text 260 > 261 ${e?(0,o.dy)`<wui-tag variant="main">Beta</wui-tag>`:null} 262 </wui-flex> 263 `}leftHeaderTemplate(){let{view:e}=p.RouterController.state,t="Connect"===e,i=s.OptionsController.state.enableEmbedded,r=s.OptionsController.state.enableNetworkSwitch;return"Account"===e&&r?(0,o.dy)`<wui-select 264 id="dynamic" 265 data-testid="w3m-account-select-network" 266 active-network=${(0,a.o)(this.network?.name)}
266 267 @click=${this.onNetworks.bind(this)} 268 imageSrc=${(0,a.o)(this.networkImage)} 269 ></wui-select>`:this.showBack&&!("ApproveTransaction"===e||"ConnectingSiwe"===e||t&&i)?(0,o.dy)`<wui-icon-link 270 data-testid="header-back" 271 id="dynamic" 272 icon="chevronLeft" 273 @click=${this.onGoBack.bind(this)} 274 ></wui-icon-link>`:(0,o.dy)`<wui-icon-link 275 data-hidden=${!t} 276 id="dynamic" 277 icon="helpCircle" 278 @click=${this.onWalletHelp.bind(this)} 279 ></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(P.X.sendEvent({type:"track",event:"CLICK_NETWORKS"}),p.RouterController.push("Networks"))}isAllowedNetworkSwitch(){let e=c.R.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(){let{history:e}=p.RouterController.state,t=U.b.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=U.b.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){let{history:e}=p.RouterController.state,t=this.shadowRoot?.querySelector("#dynamic");e.length>1&&!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(){p.RouterController.goBack()}};_.styles=H,K([(0,r.SB)()],_.prototype,"heading",void 0),K([(0,r.SB)()],_.prototype,"network",void 0),K([(0,r.SB)()],_.prototype,"networkImage",void 0),K([(0,r.SB)()],_.prototype,"showBack",void 0),K([(0,r.SB)()],_.prototype,"prevHistoryLength",void 0),K([(0,r.SB)()],_.prototype,"view",void 0),K([(0,r.SB)()],_.prototype,"viewDirection",void 0),K([(0,r.SB)()],_.prototype,"headerText",void 0),_=K([(0,y.Mo)("w3m-header")],_),i(21793);var Y=(0,o.iv)` 280 :host { 281 display: flex; 282 column-gap: var(--wui-spacing-s); 283 align-items: center; 284 padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); 285 border-radius: var(--wui-border-radius-s); 286 border: 1px solid var(--wui-color-gray-glass-005); 287 box-sizing: border-box; 288 background-color: var(--wui-color-bg-175); 289 box-shadow: 290 0px 14px 64px -4px rgba(0, 0, 0, 0.15), 291 0px 8px 22px -6px rgba(0, 0, 0, 0.15); 292 293 max-width: 300px; 294 } 295 296 :host wui-loading-spinner { 297 margin-left: var(--wui-spacing-3xs); 298 } 299`,G=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let q=class extends o.oi{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return(0,o.dy)` 300 ${this.templateIcon()} 301 <wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message" 302 >${this.message}</wui-text 303 > 304 `}templateIcon(){return this.loading?(0,o.dy)`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:"default"===this.iconType?(0,o.dy)`<wui-icon size="xl" color=${this.iconColor} name=${this.icon}></wui-icon>`:(0,o.dy)`<wui-icon-box 305 size="sm" 306 iconSize="xs" 307 iconColor=${this.iconColor} 308 backgroundColor=${this.backgroundColor} 309 icon=${this.icon} 310 background="opaque" 311 ></wui-icon-box>`}};q.styles=[f.ET,Y],G([(0,r.Cb)()],q.prototype,"backgroundColor",void 0),G([(0,r.Cb)()],q.prototype,"iconColor",void 0),G([(0,r.Cb)()],q.prototype,"icon",void 0),G([(0,r.Cb)()],q.prototype,"message",void 0),G([(0,r.Cb)()],q.prototype,"loading",void 0),G([(0,r.Cb)()],q.prototype,"iconType",void 0),q=G([(0,b.M)("wui-snackbar")],q);var F=(0,o.iv)` 312 :host { 313 display: block; 314 position: absolute; 315 opacity: 0; 316 pointer-events: none; 317 top: 11px; 318 left: 50%; 319 width: max-content; 320 } 321`,Z=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let J={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}},Q=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=v.SnackController.state.open,this.unsubscribe.push(v.SnackController.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e
321=>e())}render(){let{message:e,variant:t,svg:i}=v.SnackController.state,r=J[t],{icon:a,iconColor:n}=i??r??{};return(0,o.dy)` 322 <wui-snackbar 323 message=${e} 324 backgroundColor=${r?.backgroundColor} 325 iconColor=${n} 326 icon=${a} 327 .loading=${"loading"===t} 328 ></wui-snackbar> 329 `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),v.SnackController.state.autoClose&&(this.timeout=setTimeout(()=>v.SnackController.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Q.styles=F,Z([(0,r.SB)()],Q.prototype,"open",void 0),Q=Z([(0,y.Mo)("w3m-snackbar")],Q);var ee=i(33085),et=i(55543),ei=i(59388);let eo=(0,ee.sj)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),er=(0,ei.P)({state:eo,subscribe:e=>(0,ee.Ld)(eo,()=>e(eo)),subscribeKey:(e,t)=>(0,et.VW)(eo,e,t),showTooltip({message:e,triggerRect:t,variant:i}){eo.open=!0,eo.message=e,eo.triggerRect=t,eo.variant=i},hide(){eo.open=!1,eo.message="",eo.triggerRect={width:0,height:0,top:0,left:0}}});i(4594);var ea=(0,o.iv)` 330 :host { 331 pointer-events: none; 332 } 333 334 :host > wui-flex { 335 display: var(--w3m-tooltip-display); 336 opacity: var(--w3m-tooltip-opacity); 337 padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); 338 border-radius: var(--wui-border-radius-xxs); 339 color: var(--wui-color-bg-100); 340 position: fixed; 341 top: var(--w3m-tooltip-top); 342 left: var(--w3m-tooltip-left); 343 transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); 344 max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl)); 345 transition: opacity 0.2s var(--wui-ease-out-power-2); 346 will-change: opacity; 347 } 348 349 :host([data-variant='shade']) > wui-flex { 350 background-color: var(--wui-color-bg-150); 351 border: 1px solid var(--wui-color-gray-glass-005); 352 } 353 354 :host([data-variant='shade']) > wui-flex > wui-text { 355 color: var(--wui-color-fg-150); 356 } 357 358 :host([data-variant='fill']) > wui-flex { 359 background-color: var(--wui-color-fg-100); 360 border: none; 361 } 362 363 wui-icon { 364 position: absolute; 365 width: 12px !important; 366 height: 4px !important; 367 color: var(--wui-color-bg-150); 368 } 369 370 wui-icon[data-placement='top'] { 371 bottom: 0px; 372 left: 50%; 373 transform: translate(-50%, 95%); 374 } 375 376 wui-icon[data-placement='bottom'] { 377 top: 0; 378 left: 50%; 379 transform: translate(-50%, -95%) rotate(180deg); 380 } 381 382 wui-icon[data-placement='right'] { 383 top: 50%; 384 left: 0; 385 transform: translate(-65%, -50%) rotate(90deg); 386 } 387 388 wui-icon[data-placement='left'] { 389 top: 50%; 390 right: 0%; 391 transform: translate(65%, -50%) rotate(270deg); 392 } 393`,en=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let es=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.open=er.state.open,this.message=er.state.message,this.triggerRect=er.state.triggerRect,this.variant=er.state.variant,this.unsubscribe.push(er.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=` 394 --w3m-tooltip-top: ${e}px; 395 --w3m-tooltip-left: ${t}px; 396 --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; 397 --w3m-tooltip-display: ${this.open?"flex":"none"}; 398 --w3m-tooltip-opacity: ${this.open?1:0}; 399 `,(0,o.dy)`<wui-flex> 400 <wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon> 401 <wui-text color="inherit" variant="small-500">${this.message}</wui-text> 402 </wui-flex>`}};es.styles=[ea],en([(0,r.SB)()],es.prototype,"open",void 0),en([(0,r.SB)()],es.prototype,"message",void 0),en([(0,r.SB)()],es.prototype,"triggerRect",void 0),en([(0,r.SB)()],es.prototype,"variant",void 0),es=en([(0,y.Mo)("w3m-tooltip"),(0,y.Mo)("w3m-tooltip")],es);var el=(0,o.iv)` 403 :host { 404 --prev-height: 0px; 405 --new-height: 0px; 406 display: block; 407 } 408 409 div.w3m-router-container { 410 transform: translateY(0); 411 opacity: 1; 412 } 413 414 div.w3m-router-container[view-direction='prev'] { 415 animation: 416 slide-left-out 150ms forwards ease, 417 slide-left-in 150ms forwards ease; 418 animation-delay: 0ms, 200ms; 419 } 420 421 div.w3m-router-container[view-direction='next'] { 422 animation: 423 slide-right-out 150ms forwards ease, 424 slide-right-in 150ms forwards ease; 425 animation-delay: 0ms, 200ms; 426 } 427 428 @keyframes slide-left-out { 429 from { 430 transform: translateX(0px); 431 opacity: 1; 432 } 433 to { 434 transform: translateX(10px); 435 opacity: 0; 436 } 437 } 438 439 @keyframes slide-left-in { 440 from { 441 transform: translateX(-10px); 442 opacity: 0; 443 } 444 to { 445 transform: translateX(0); 446 opacity: 1; 447 } 448 } 449 450 @keyframes slide-right-out { 451 from { 452 transform: translateX(0px); 453 opacity: 1; 454 } 455 to { 456 transform: translateX(-10px); 457 opacity: 0; 458 } 459 } 460 461 @keyframes slide-right-in { 462 from { 463 transform: translateX(10px); 464 opacity: 0; 465 } 466 to { 467 transform: translateX(0); 468 opacity: 1; 469 } 470 } 471`,ec=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let ed=class extends o.oi{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=p.RouterController.state.view,this.viewDirection="",this.unsubscribe.push(p.RouterController.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{let t=`${e?.contentRect.height}px`;"0px"!==this.prevHeight&&(this.style.setProperty("--prev-height",this.prevHeight),this.style.setProperty("--new-height",t),this.style.animation="w3m-view-height 150ms forwards ease",this.style.height="auto"),setTimeout(()=>{this.prevHeight=t,this.style.animation="unset"}
471,U.b.ANIMATION_DURATIONS.ModalHeight)}),this.resizeObserver?.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach(e=>e())}render(){return(0,o.dy)`<div class="w3m-router-container" view-direction="${this.viewDirection}"> 472 ${this.viewTemplate()} 473 </div>`}viewTemplate(){switch(this.view){case"AccountSettings":return(0,o.dy)`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return(0,o.dy)`<w3m-account-view></w3m-account-view>`;case"AllWallets":return(0,o.dy)`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return(0,o.dy)`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return(0,o.dy)`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return(0,o.dy)`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":default:return(0,o.dy)`<w3m-connect-view></w3m-connect-view>`;case"Create":return(0,o.dy)`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return(0,o.dy)`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return(0,o.dy)`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return(0,o.dy)`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return(0,o.dy)`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return(0,o.dy)`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return(0,o.dy)`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return(0,o.dy)`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return(0,o.dy)`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return(0,o.dy)`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return(0,o.dy)`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return(0,o.dy)`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return(0,o.dy)`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return(0,o.dy)`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return(0,o.dy)`<w3m-network-switch-view></w3m-network-switch-view>`;case"Profile":return(0,o.dy)`<w3m-profile-view></w3m-profile-view>`;case"SwitchAddress":return(0,o.dy)`<w3m-switch-address-view></w3m-switch-address-view>`;case"Transactions":return(0,o.dy)`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return(0,o.dy)`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return(0,o.dy)`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return(0,o.dy)`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return(0,o.dy)`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return(0,o.dy)`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return(0,o.dy)`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return(0,o.dy)`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return(0,o.dy)`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return(0,o.dy)`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return(0,o.dy)`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return(0,o.dy)`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return(0,o.dy)`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return(0,o.dy)`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return(0,o.dy)`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return(0,o.dy)`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return(0,o.dy)`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return(0,o.dy)`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return(0,o.dy)`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return(0,o.dy)`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return(0,o.dy)`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return(0,o.dy)`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return(0,o.dy)`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return(0,o.dy)`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return(0,o.dy)`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return(0,o.dy)`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return(0,o.dy)`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return(0,o.dy)`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return(0,o.dy)`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return(0,o.dy)`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return(0,o.dy)`<w3m-pay-loading-view></w3m-pay-loading-view>`}}onViewChange(e){er.hide();let t=U.b.VIEW_DIRECTION.Next,{history:i}=p.RouterController.state;i.length<this.prevHistoryLength&&(t=U.b.VIEW_DIRECTION.Prev),this.prevHistoryLength=i.length,this.viewDirection=t,setTimeout(()=>{this.view=e},U.b.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){return this.shadowRoot?.querySelector("div")}};ed.styles=el,ec([(0,r.SB)()],ed.prototype,"view",void 0),ec([(0,r.SB)()],ed.prototype,"viewDirection",void 0),ed=ec([(0,y.Mo)("w3m-router")],ed);var ew=(0,o.iv)` 474 :host { 475 z-index: var(--w3m-z-index); 476 display: block; 477 backface-visibility: hidden; 478 will-change: opacity; 479 position: fixed; 480 top: 0; 481 left: 0; 482 right: 0; 483 bottom: 0; 484 pointer-events: none; 485 opacity: 0; 486 background-color: var(--wui-cover); 487 transition: opacity 0.2s var(--wui-ease-out-power-2); 488 will-change: opacity; 489 } 490 491 :host(.open) { 492 opacity: 1; 493 } 494 495 :host(.appkit-modal) { 496 position: relative; 497 pointer-events: unset; 498 background: none; 499 width: 100%; 500 opacity: 1; 501 } 502 503 wui-card { 504 max-width: var(--w3m-modal-width); 505 width: 100%; 506 position: relative; 507 animation: zoom-in 0.2s var(--wui-ease-out-power-2); 508 animation-fill-mode: backwards; 509 outline: none; 510 transition: 511 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1), 512 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1); 513 will-change: border-radius, background-color; 514 } 515 516 :host(.appkit-modal) wui-card { 517 max-width: 400px; 518 } 519 520 wui-card[shake='true'] { 521 animation: 522 zoom-in 0.2s var(--wui-ease-out-power-2), 523 w3m-shake 0.5s var(--wui-ease-out-power-2); 524 } 525 526 wui-flex { 527 overflow-x: hidden; 528 overflow-y: auto; 529 display: flex; 530 align-items: center; 531 justify-content: center; 532 width: 100%; 533 height: 100%; 534 } 535 536 @media (max-height: 700px) and (min-width: 431px) { 537 wui-flex { 538 align-items: flex-start; 539 } 540 541 wui-card { 542 margin: var(--wui-spacing-xxl) 0px; 543 } 544 } 545 546 @media (max-width: 430px) { 547 wui-flex { 548 align-items: flex-end; 549 } 550 551 wui-card { 552 max-width: 100%; 553 border-bottom-left-radius: var(--local-border-bottom-mobile-radius); 554 border-bottom-right-radius: var(--local-border-bottom-mobile-radius); 555 border-bottom: none; 556 animation: slide-in 0.2s var(--wui-ease-out-power-2); 557 } 558 559 wui-card[shake='true'] { 560 animation: 561 slide-in 0.2s var(--wui-ease-out-power-2), 562 w3m-shake 0.5s var(--wui-ease-out-power-2); 563 } 564 } 565 566 @keyframes zoom-in { 567 0% { 568 transform: scale(0.95) translateY(0); 569 } 570 100% { 571 transform: scale(1) translateY(0); 572 } 573 } 574 575 @keyframes slide-in { 576 0% { 577 transform: scale(1) translateY(50px); 578 } 579 100% { 580 transform: scale(1) translateY(0); 581 } 582 } 583 584 @keyframes w3m-shake { 585 0% { 586 transform: scale(1) rotate(0deg); 587 } 588 20% { 589 transform: scale(1) rotate(-1deg); 590 } 591 40% { 592 transform: scale(1) rotate(1.5deg); 593 } 594 60% { 595 transform: scale(1) rotate(-1.5deg); 596 } 597 80% { 598 transform: scale(1) rotate(1deg); 599 } 600 100% { 601 transform: scale(1) rotate(0deg); 602 } 603 } 604 605 @keyframes w3m-view-height { 606 from { 607 height: var(--prev-height); 608 } 609 to { 610 height: var(--new-height); 611 } 612 } 613`,ep=function(e,t,i,o){var r,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,i,n):r(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};let eu="scroll-lock";class em extends o.oi{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=s.OptionsController.state.enableEmbedded,this.open=l.I.state.open,this.caipAddress=c.R.state.activeCaipAddress,this.caipNetwork=c.R.state.activeCaipNetwork,this.shake=l.I.state.shake,this.filterByNamespace=d.ConnectorController.state.filterByNamespace,this.initializeTheming(),w.ApiController.prefetchAnalyticsConfig(),this.unsubscribe.push(l.I.subscribeKey("open",e=>e?this.onOpen():this.onClose()),l.I.subscribeKey("shake",e=>this.shake=e),c.R.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),c.R.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),s.OptionsController.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),d.ConnectorController.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||c.R.getAccountData(e)?.caipAddress||(w.ApiController.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded){l.I.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}
613disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return(this.style.cssText=` 614 --local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"}; 615 `,this.enableEmbedded)?(0,o.dy)`${this.contentTemplate()} 616 <w3m-tooltip></w3m-tooltip> `:this.open?(0,o.dy)` 617 <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay"> 618 ${this.contentTemplate()} 619 </wui-flex> 620 <w3m-tooltip></w3m-tooltip> 621 `:null}contentTemplate(){return(0,o.dy)` <wui-card 622 shake="${this.shake}" 623 data-embedded="${(0,a.o)(this.enableEmbedded)}" 624 role="alertdialog" 625 aria-modal="true" 626 tabindex="0" 627 data-testid="w3m-modal-card" 628 > 629 <w3m-header></w3m-header> 630 <w3m-router></w3m-router> 631 <w3m-snackbar></w3m-snackbar> 632 <w3m-alertbar></w3m-alertbar> 633 </wui-card>`}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){await m.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:t}=h.ThemeController.state,i=y.Hg.getColorTheme(t);(0,y.n)(e,i)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),v.SnackController.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement("style");e.dataset.w3m=eu,e.textContent=` 634 body { 635 touch-action: none; 636 overflow: hidden; 637 overscroll-behavior: contain; 638 } 639 w3m-modal { 640 pointer-events: auto; 641 } 642 `,document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m="${eu}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){let{tagName:i}=t.target;!i||i.includes("W3M-")||i.includes("WUI-")||e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){let t=c.R.state.isSwitchingNamespace,i=g.j.getPlainAddress(e);i||t?t&&i&&p.RouterController.goBack():l.I.close(),await u.w.initializeIfEnabled(),this.caipAddress=e,c.R.setIsSwitchingNamespace(!1)}onNewNetwork(e){let t=this.caipNetwork,i=t?.caipNetworkId?.toString(),o=t?.chainNamespace,r=e?.caipNetworkId?.toString(),a=e?.chainNamespace,s=i!==r,d=t?.name===n.b.UNSUPPORTED_NETWORK_NAME,w="ConnectingExternal"===p.RouterController.state.view,u=!c.R.getAccountData(e?.chainNamespace)?.caipAddress,m="UnsupportedChain"===p.RouterController.state.view,h=l.I.state.open,v=!1;h&&!w&&(u?s&&(v=!0):m?v=!0:!s||o!==a||d||(v=!0)),v&&"SIWXSignMessage"!==p.RouterController.state.view&&p.RouterController.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(w.ApiController.prefetch(),w.ApiController.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}em.styles=ew,ep([(0,r.Cb)({type:Boolean})],em.prototype,"enableEmbedded",void 0),ep([(0,r.SB)()],em.prototype,"open",void 0),ep([(0,r.SB)()],em.prototype,"caipAddress",void 0),ep([(0,r.SB)()],em.prototype,"caipNetwork",void 0),ep([(0,r.SB)()],em.prototype,"shake",void 0),ep([(0,r.SB)()],em.prototype,"filterByNamespace",void 0);let eh=class extends em{};eh=ep([(0,y.Mo)("w3m-modal")],eh);let ev=class extends em{};ev=ep([(0,y.Mo)("appkit-modal")],ev)}}]);
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.