1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[915],{50915:(v,f,n)=>{n.r(f),n.d(f,{W3mModal:()=>a});var m=n(10467),i=n(11160),w=n(40040),p=n(6403),h=n(39672);const g=p.AH` 2 :host { 3 z-index: var(--w3m-z-index); 4 display: block; 5 backface-visibility: hidden; 6 will-change: opacity; 7 position: fixed; 8 top: 0; 9 left: 0; 10 right: 0; 11 bottom: 0; 12 pointer-events: none; 13 opacity: 0; 14 background-color: var(--wui-cover); 15 transition: opacity 0.2s var(--wui-ease-out-power-2); 16 will-change: opacity; 17 } 18 19 :host(.open) { 20 opacity: 1; 21 } 22 23 @keyframes zoom-in { 24 0% { 25 transform: scale(0.95) translateY(0); 26 } 27 100% { 28 transform: scale(1) translateY(0); 29 } 30 } 31 32 @keyframes slide-in { 33 0% { 34 transform: scale(1) translateY(50px); 35 } 36 100% { 37 transform: scale(1) translateY(0); 38 } 39 } 40 41 wui-card { 42 max-width: var(--w3m-modal-width); 43 width: 100%; 44 position: relative; 45 animation-duration: 0.2s; 46 animation-name: zoom-in; 47 animation-fill-mode: backwards; 48 animation-timing-function: var(--wui-ease-out-power-2); 49 outline: none; 50 } 51 52 wui-flex { 53 overflow-x: hidden; 54 overflow-y: auto; 55 display: flex; 56 align-items: center; 57 justify-content: center; 58 width: 100%; 59 height: 100%; 60 } 61 62 @media (max-height: 700px) and (min-width: 431px) { 63 wui-flex { 64 align-items: flex-start; 65 } 66 67 wui-card { 68 margin: var(--wui-spacing-xxl) 0px; 69 } 70 } 71 72 @media (max-width: 430px) { 73 wui-flex { 74 align-items: flex-end; 75 } 76 77 wui-card { 78 max-width: 100%; 79 border-bottom-left-radius: 0; 80 border-bottom-right-radius: 0; 81 border-bottom: none; 82 animation-name: slide-in; 83 } 84 } 85`;var c=function(u,e,t,o){var l,d=arguments.length,s=d<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(u,e,t,o);else for(var r=u.length-1;r>=0;r--)(l=u[r])&&(s=(d<3?l(s):d>3?l(e,t,s):l(e,t))||s);return d>3&&s&&Object.defineProperty(e,t,s),s};const b="scroll-lock";let a=class extends p.WF{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=i.W3.state.open,this.caipAddress=i.Uj.state.caipAddress,this.isSiweEnabled=i.Hd.state.isSiweEnabled,this.connected=i.Uj.state.isConnected,this.loading=i.W3.state.loading,this.initializeTheming(),i.Np.prefetch(),this.unsubscribe.push(i.W3.subscribeKey("open",e=>e?this.onOpen():this.onClose()),i.W3.subscribeKey("loading",e=>{this.loading=e,this.onNewAddress(i.Uj.state.caipAddress)}),i.Uj.subscribeKey("isConnected",e=>this.connected=e),i.Uj.subscribeKey("caipAddress",e=>this.onNewAddress(e)),i.Hd.subscribeKey("isSiweEnabled",e=>this.isSiweEnabled=e)),i.En.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.open?p.qy` 86 <wui-flex @click=${this.onOverlayClick.bind(this)}> 87 <wui-card role="alertdialog" aria-modal="true" tabindex="0"> 88 <w3m-header></w3m-header> 89 <w3m-router></w3m-router> 90 <w3m-snackbar></w3m-snackbar> 91 </wui-card> 92 </wui-flex> 93 <w3m-tooltip></w3m-tooltip> 94 `:null}onOverlayClick(e){var t=this;return(0,m.A)(function*(){e.target===e.currentTarget&&(yield t.handleClose())})()}handleClose(){var e=this;return(0,m.A)(function*(){if(e.isSiweEnabled){const{SIWEController:t}=yield n.e(4198).then(n.bind(n,84198));"success"!==t.state.status&&e.connected&&(yield i.x4.disconnect())}i.W3.close()})()}initializeTheming(){const{themeVariables:e,themeMode:t}=i.Wn.state,o=w.UiHelperUtil.getColorTheme(t);(0,w.initializeTheming)(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),i.Pt.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){const e=document.createElement("style");e.dataset.w3m=b,e.textContent="\n body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n ",document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${b}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;const e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){const{tagName:o}=t.target;o&&!o.includes("W3M-")&&!o.includes("WUI-")&&e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}onNewAddress(e){var t=this;return(0,m.A)(function*(){if(!t.connected||t.loading)return;const o=i.wE.getPlainAddress(t.caipAddress),d=i.wE.getPlainAddress(e),s=i.wE.getNetworkId(t.caipAddress),l=i.wE.getNetworkId(e);if(t.caipAddress=e,t.isSiweEnabled){const{SIWEController:r}=yield n.e(4198).then(n.bind(n,84198)),y=yield r.getSession();if(y&&o&&d&&o!==d)return void(r.state._client?.options.signOutOnAccountChange&&(yield r.signOut(),t.onSiweNavigation()));if(y&&s&&l&&s!==l)return void(r.state._client?.options.signOutOnNetworkChange&&(yield r.signOut(),t.onSiweNavigation()));t.onSiweNavigation()}})()}onSiweNavigation(){this.open?i.IN.push("ConnectingSiwe"):i.W3.open({view:"ConnectingSiwe"})}};a.styles=g,c([(0,h.wk)()],a.prototype,"open",void 0),c([(0,h.wk)()],a.prototype,"caipAddress",void 0),c([(0,h.wk)()],a.prototype,"isSiweEnabled",void 0),c([(0,h.wk)()],a.prototype,"connected",void 0),c([(0,h.wk)()],a.prototype,"loading",void 0),a=c([(0,w.customElement)("w3m-modal")],a)}}]);
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.