1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8895],{73283:function(e,t,i){i.r(t),i.d(t,{W3mEmailLoginView:function(){return P},W3mEmailOtpWidget:function(){return h.m},W3mEmailVerifyDeviceView:function(){return E},W3mEmailVerifyOtpView:function(){return m},W3mUpdateEmailPrimaryOtpView:function(){return R},W3mUpdateEmailSecondaryOtpView:function(){return S},W3mUpdateEmailWalletView:function(){return O}});var n=i(59757),o=i(29460),r=i(35428),a=i(51440),l=i(4511),s=i(83662),c=i(82879),u=i(83241),d=i(28740),h=i(19617),p=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let m=class extends h.m{constructor(){super(...arguments),this.onOtpSubmit=async e=>{try{if(this.authConnector){const t=n.R.state.activeChain,i=o.ConnectionController.getConnections(t),u=r.OptionsController.state.remoteFeatures?.multiWallet,d=i.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),!t)throw new Error("Active chain is not set on ChainControll");
1if(await o.ConnectionController.connectExternal(this.authConnector,t),a.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.authConnector.name||"Unknown",view:l.RouterController.state.view,walletRank:void 0}}),r.OptionsController.state.remoteFeatures?.emailCapture)return;if(r.OptionsController.state.siwx)return void s.I.close();if(d&&u)return l.RouterController.replace("ProfileWallets"),void c.SnackController.showSuccess("New Wallet Added");s.I.close()}}catch(t){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(t)}}),t}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};m=p([(0,d.Mo)("w3m-email-verify-otp-view")],m);var f=i(33834),w=i(80489),g=i(9793),v=(i(82100),i(12441),i(69804),i(68390),d.iv` 2 wui-icon-box { 3 height: ${({spacing:e})=>e[16]}; 4 width: ${({spacing:e})=>e[16]}; 5 } 6`),y=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let E=class extends f.oi{constructor(){super(),this.email=l.RouterController.state.data?.email,this.authConnector=g.ConnectorController.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return f.dy` 7 <wui-flex 8 flexDirection="column" 9 alignItems="center" 10 .padding=${["6","3","6","3"]} 11 gap="4" 12 > 13 <wui-icon-box size="xl" color="accent-primary" icon="sealCheck"></wui-icon-box> 14 15 <wui-flex flexDirection="column" alignItems="center" gap="3"> 16 <wui-flex flexDirection="column" alignItems="center"> 17 <wui-text variant="md-regular" color="primary"> 18 Approve the login link we sent to 19 </wui-text> 20 <wui-text variant="md-regular" color="primary"><b>${this.email}</b></wui-text> 21 </wui-flex> 22 23 <wui-text variant="sm-regular" color="secondary" align="center"> 24 The code expires in 20 minutes 25 </wui-text> 26 27 <wui-flex alignItems="center" id="w3m-resend-section" gap="2"> 28 <wui-text variant="sm-regular" color="primary" align="center"> 29 Didn't receive it? 30 </wui-text> 31 <wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}> 32 Resend email 33 </wui-link> 34 </wui-flex> 35 </wui-flex> 36 </wui-flex> 37 `}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),a.X.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),l.RouterController.replace("EmailVerifyOtp",{email:this.email})}catch(e){l.RouterController.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),c.SnackController.showSuccess("Code email resent")}}catch(e){c.SnackController.showError(e)}finally{this.loading=!1}}};E.styles=v,y([(0,w.SB)()],E.prototype,"loading",void 0),E=y([(0,d.Mo)("w3m-email-verify-device-view")],E);var b=i(72633),C=(i(37826),i(6167),f.iv` 38 wui-email-input { 39 width: 100%; 40 } 41 42 form { 43 width: 100%; 44 display: block; 45 position: relative; 46 } 47`),x=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let O=class extends f.oi{constructor(){super(...arguments),this.formRef=(0,b.V)(),this.initialEmail=l.RouterController.state.data?.email??"",this.redirectView=l.RouterController.state.data?.redirectView,this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",(e=>{"Enter"===e.key&&this.onSubmitEmail(e)}))}render(){return f.dy` 48 <wui-flex flexDirection="column" padding="4" gap="4"> 49 <form ${(0,b.i)(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}> 50 <wui-email-input 51 value=${this.initialEmail} 52 .disabled=${this.loading} 53 @inputChange=${this.onEmailInputChange.bind(this)} 54 > 55 </wui-email-input> 56 <input type="submit" hidden /> 57 </form> 58 ${this.buttonsTemplate()} 59 </wui-flex> 60 `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=g.ConnectorController.getAuthConnector();if(!t)throw new Error("w3m-update-email-wallet: Auth connector not found");const i=await t.provider.updateEmail({email:this.email});a.X.sendEvent({type:"track",event:"EMAIL_EDIT"}),"VERIFY_SECONDARY_OTP"===i.action?l.RouterController.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView}):l.RouterController.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView})}catch(t){c.SnackController.showError(t),this.loading=!1}}buttonsTemplate(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return this.redirectView?f.dy` 61 <wui-flex gap="3"> 62 <wui-button size="md" variant="neutral" fullWidth @click=${l.RouterController.goBack}> 63 Cancel 64 </wui-button>
64 65 66 <wui-button 67 size="md" 68 variant="accent-primary" 69 fullWidth 70 @click=${this.onSubmitEmail.bind(this)} 71 .disabled=${!e} 72 .loading=${this.loading} 73 > 74 Save 75 </wui-button> 76 </wui-flex> 77 `:f.dy` 78 <wui-button 79 size="md" 80 variant="accent-primary" 81 fullWidth 82 @click=${this.onSubmitEmail.bind(this)} 83 .disabled=${!e} 84 .loading=${this.loading} 85 > 86 Save 87 </wui-button> 88 `}};O.styles=C,x([(0,w.SB)()],O.prototype,"email",void 0),x([(0,w.SB)()],O.prototype,"loading",void 0),O=x([(0,d.Mo)("w3m-update-email-wallet-view")],O);var I=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let R=class extends h.m{constructor(){super(),this.email=l.RouterController.state.data?.email,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),l.RouterController.replace("UpdateEmailSecondaryOtp",l.RouterController.state.data))}catch(t){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(t)}}),t}},this.onStartOver=()=>{l.RouterController.replace("UpdateEmailWallet",l.RouterController.state.data)}}};R=I([(0,d.Mo)("w3m-update-email-primary-otp-view")],R);var k=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let S=class extends h.m{constructor(){super(),this.email=l.RouterController.state.data?.newEmail,this.redirectView=l.RouterController.state.data?.redirectView,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),this.redirectView&&l.RouterController.reset(this.redirectView))}catch(t){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(t)}}),t}},this.onStartOver=()=>{l.RouterController.replace("UpdateEmailWallet",l.RouterController.state.data)}}};S=k([(0,d.Mo)("w3m-update-email-secondary-otp-view")],S);var T=i(68314),$=i(99013),A=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let P=class extends f.oi{constructor(){super(),this.authConnector=g.ConnectorController.getAuthConnector(),this.isEmailEnabled=r.OptionsController.state.remoteFeatures?.email,this.isAuthEnabled=this.checkIfAuthEnabled(g.ConnectorController.state.connectors),this.connectors=g.ConnectorController.state.connectors,g.ConnectorController.subscribeKey("connectors",(e=>{this.connectors=e,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)}))}render(){if(!this.isEmailEnabled)throw new Error("w3m-email-login-view: Email is not enabled");if(!this.isAuthEnabled)throw new Error("w3m-email-login-view: No auth connector provided");return f.dy`<wui-flex flexDirection="column" .padding=${["1","3","3","3"]} gap="4"> 89 <w3m-email-login-widget></w3m-email-login-widget> 90 </wui-flex> `}checkIfAuthEnabled(e){const t=e.filter((e=>e.type===$.b.CONNECTOR_TYPE_AUTH)).map((e=>e.chain));return T.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.some((e=>t.includes(e)))}};A([(0,w.SB)()],P.prototype,"connectors",void 0),P=A([(0,d.Mo)("w3m-email-login-view")],P)},19617:function(e,t,i){i.d(t,{m:function(){return I}});var n=i(33834),o=i(80489),r=i(4511),a=i(9793),l=i(83241),s=i(82879),c=i(28740),u=(i(82100),i(69804),i(73049),i(34615)),d=i(38895),h=(i(76630),i(24134)),p=i(1512),m=i(25729),f=i(95636).iv` 91 :host { 92 position: relative; 93 display: inline-block; 94 } 95 96 input { 97 width: 48px; 98 height: 48px; 99 background: ${({tokens:e})=>e.theme.foregroundPrimary}; 100 border-radius: ${({borderRadius:e})=>e[4]}; 101 border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; 102 font-family: ${({fontFamily:e})=>e.regular}; 103 font-size: ${({textSize:e})=>e.large}; 104 line-height: 18px; 105 letter-spacing: -0.16px; 106 text-align: center; 107 color: ${({tokens:e})=>e.theme.textPrimary}; 108 caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; 109 transition: 110 background-color ${({durations:e})=>e.lg} 111 ${({easings:e})=>e["ease-out-power-2"]}, 112 border-color ${({durations:e})=>e.lg} 113 ${({easings:e})=>e["ease-out-power-2"]}, 114 box-shadow ${({durations:e})=>e.lg} 115 ${({easings:e})=>e["ease-out-power-2"]}; 116 will-change: background-color, border-color, box-shadow; 117 box-sizing: border-box; 118 -webkit-appearance: none; 119 -moz-appearance: textfield; 120 padding: ${({spacing:e})=>e[4]}; 121 } 122 123 input::-webkit-outer-spin-button, 124 input::-webkit-inner-spin-button { 125 -webkit-appearance: none; 126 margin: 0; 127 } 128 129 input[type='number'] { 130 -moz-appearance: textfield; 131 } 132 133 input:disabled {
134 cursor: not-allowed; 135 opacity: 0.5; 136 } 137 138 input:focus-visible:enabled { 139 background-color: transparent; 140 border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; 141 box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; 142 } 143`,w=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let g=class extends u.oi{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return u.dy`<input 144 type="number" 145 maxlength="1" 146 inputmode="numeric" 147 autofocus 148 ?disabled=${this.disabled} 149 value=${this.value} 150 /> `}};g.styles=[h.ET,h.ZM,f],w([(0,d.Cb)({type:Boolean})],g.prototype,"disabled",void 0),w([(0,d.Cb)({type:String})],g.prototype,"value",void 0),g=w([(0,m.M)("wui-input-numeric")],g);var v=u.iv` 151 :host { 152 position: relative; 153 display: block; 154 } 155`,y=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let E=class extends u.oi{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map((()=>"")),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every((e=>""!==e)),this.handleKeyDown=(e,t)=>{const i=e.target,n=this.getInputElement(i);if(!n)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();const o=n.selectionStart;switch(e.key){case"ArrowLeft":o&&n.setSelectionRange(o+1,o+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===n.value?this.focusInputField("prev",t):this.updateInput(n,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){const e=t+1;if(!this.shouldInputBeEnabled(e))return;const i=this.numerics[e<this.length?e:t],n=i?this.getInputElement(i):void 0;n&&(n.disabled=!1,n.focus())}if("prev"===e){const e=t-1,i=this.numerics[e>-1?e:t],n=i?this.getInputElement(i):void 0;n&&n.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));const e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return u.dy` 156 <wui-flex gap="1" data-testid="wui-otp-input"> 157 ${Array.from({length:this.length}).map(((e,t)=>u.dy` 158 <wui-input-numeric 159 @input=${e=>this.handleInput(e,t)} 160 @click=${e=>this.selectInput(e)} 161 @keydown=${e=>this.handleKeyDown(e,t)} 162 .disabled=${!this.shouldInputBeEnabled(t)} 163 .value=${this.values[t]||""} 164 > 165 </wui-input-numeric> 166 `))} 167 </wui-flex> 168 `}updateInput(e,t,i){const n=this.numerics[t],o=e||(n?this.getInputElement(n):void 0);o&&(o.value=i,this.values=this.values.map(((e,n)=>n===t?i:e)))}selectInput(e){const t=e.target;if(t){this.getInputElement(t)?.select()}}handleInput(e,t){const i=e.target,n=this.getInputElement(i);if(n){const i=n.value;if("insertFromPaste"===e.inputType)this.handlePaste(n,i,t);else{p.H.isNumber(i)&&e.data?(this.updateInput(n,t,e.data),this.focusInputField("next",t)):this.updateInput(n,t,"")}}this.dispatchInputChangeEvent()}handlePaste(e,t,i){const n=t[0];if(n&&p.H.isNumber(n)){this.updateInput(e,i,n);const o=t.substring(1);if(i+1<this.length&&o.length){const e=this.numerics[i+1],t=e?this.getInputElement(e):void 0;t&&this.handlePaste(t,o,i+1)}else this.focusInputField("next",i)}else this.updateInput(e,i,"")}getInputElement(e){return e.shadowRoot?.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}};E.styles=[h.ET,v],y([(0,d.Cb)({type:Number})],E.prototype,"length",void 0),y([(0,d.Cb)({type:String})],E.prototype,"otp",void 0),y([(0,d.SB)()],E.prototype,"values",void 0),E=y([(0,m.M)("wui-otp")],E);i(68390);var b,C=i(19445),x=n.iv` 169 wui-loading-spinner { 170 margin: 9px auto; 171 } 172 173 .email-display, 174 .email-display wui-text { 175 max-width: 100%; 176 } 177`,O=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let I=b=class extends n.oi{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=C.$.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=r.RouterController.state.data?.email,this.authConnector=a.ConnectorController.getAuthConnector()}
177render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=Boolean(this.timeoutTimeLeft),t=this.getFooterLabels(e);return n.dy` 178 <wui-flex 179 flexDirection="column" 180 alignItems="center" 181 .padding=${["4","0","4","0"]} 182 gap="4" 183 > 184 <wui-flex 185 class="email-display" 186 flexDirection="column" 187 alignItems="center" 188 .padding=${["0","5","0","5"]} 189 > 190 <wui-text variant="md-regular" color="primary" align="center"> 191 Enter the code we sent to 192 </wui-text> 193 <wui-text variant="md-medium" color="primary" lineClamp="1" align="center"> 194 ${this.email} 195 </wui-text> 196 </wui-flex> 197 198 <wui-text variant="sm-regular" color="secondary">The code expires in 20 minutes</wui-text> 199 200 ${this.loading?n.dy`<wui-loading-spinner size="xl" color="accent-primary"></wui-loading-spinner>`:n.dy` <wui-flex flexDirection="column" alignItems="center" gap="2"> 201 <wui-otp 202 dissabled 203 length="6" 204 @inputChange=${this.onOtpInputChange.bind(this)} 205 .otp=${this.otp} 206 ></wui-otp> 207 ${this.error?n.dy` 208 <wui-text variant="sm-regular" align="center" color="error"> 209 ${this.error}. Try Again 210 </wui-text> 211 `:null} 212 </wui-flex>`} 213 214 <wui-flex alignItems="center" gap="2"> 215 <wui-text variant="sm-regular" color="secondary">${t.title}</wui-text> 216 <wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}> 217 ${t.action} 218 </wui-link> 219 </wui-flex> 220 </wui-flex> 221 `}startOTPTimeout(){this.timeoutTimeLeft=C.$.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval((()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=C.$.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)}),1e3)}async onOtpInputChange(e){try{this.loading||(this.otp=e.detail,this.shouldSubmitOnOtpChange()&&(this.loading=!0,await(this.onOtpSubmit?.(this.otp))))}catch(t){this.error=l.j.parseError(t),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){this.error="",this.otp="";if(!a.ConnectorController.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),s.SnackController.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){s.SnackController.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:"Try again "+(e?`in ${this.timeoutTimeLeft}s`:"")}:{title:"Didn't receive it?",action:"Resend "+(e?`in ${this.timeoutTimeLeft}s`:"Code")}}shouldSubmitOnOtpChange(){return this.authConnector&&this.otp.length===b.OTP_LENGTH}};I.OTP_LENGTH=6,I.styles=x,O([(0,o.SB)()],I.prototype,"loading",void 0),O([(0,o.SB)()],I.prototype,"timeoutTimeLeft",void 0),O([(0,o.SB)()],I.prototype,"error",void 0),I=b=O([(0,c.Mo)("w3m-email-otp-widget")],I)}}]);
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.