PageSourceSearch

https://assets.erank.com/production/de2078b/build/assets/ConfirmEmail-BB0kKax0.js

js erank.com collected 2026-09-25 03:52:21 UTC 7,522 bytes, 2 lines download raw bytes

1import{d as F,z as H,B as O,k as q,D as s,H as G,c as p,e as r,i as l,t as $,b as d,O as w,q as A,a as E,I as K,p as Q,w as L,F as W,g as j,u as J,r as k,j as I,v as Y,o as m,L as M,K as X,_ as V,M as N,N as S,l as f,m as Z,J as R,E as ee}from"./app-HPiLX-0W.js";import{u as ae,i as te}from"./recaptchaBypass-DTg_bwXZ.js";import{u as re}from"./script-provider-BxwEhzzQ.js";import{u as ne}from"./auth-B7z8vqO2.js";/* empty css            *//* empty css            */const se={class:"text-center text-[--color-neutral-neutral]"},oe={class:"text-[--color-neutral-black]"},ie={key:1,class:"flex w-full flex-col gap-4"},le={class:"flex flex-col gap-2"},ue={key:2,class:"text-center text-[--color-neutral-neutral]"},ce={key:3},de={key:0,class:"leading-8 text-[--color-neutral-neutral]"},me={key:1,class:"leading-8 text-[--color-neutral-neutral]"},Ce=F({__name:"ConfirmEmail",setup(ge){re();const T=ne(),{email:u}=H(T),a=j(),B=J(),v=O(),C=k(!1),g=k(null),c=k(!1),y=k(!1),b=k(!1),P=I(()=>c.value?"Verifying code...":"Continue with Login Code"),{execute:_}=ae("submit"),n=I(()=>ee(u.value));q(()=>{s("Magic link confirmation page mounted",{email:n.value,routeName:a.name}),a.name==="registration.confirm"&&!u.value&&(s("Registration confirmation page missing email; redirecting to registration",{routeName:a.name}),B.replace({name:"registration.entry"}))});const x=async()=>{if(!u.value){s("Verification code submission blocked because email is missing",{stage:"verify-code",routeName:a.name}),v.add({severity:"error",summary:"Error",detail:"Please return and enter your email address again.",life:3e3,errorCode:"EMAIL_REQUIRED"});return}c.value=!0;const o=u.value;s("Attempting verification code submission",{codeLength:String(g.value??"").length,email:n.value,routeName:a.name}),f("Viewed Magic Link Confirmation Page",{"Used Manual Code Entry":!0,"Resent Magic Link":!1,"Back to Sign In":!1,"Authentication error":"","Erank Version":3});try{await N();const e=await S.post("/auth/verify-code",{email:o,code:g.value});if(s("Verification code accepted",{email:n.value}),a.name==="login.confirm"){f(Z.LOGGED_IN,{"Erank Version":3,"Login Method":"Magic Link","First Time":e.data.last_login?"False":"True"});let t=a.query.location||"dashboard",i=typeof t=="string"&&t.startsWith("/")?t:"/"+t;window.location.href=i}else s("Registration flow continuing after code verification",{email:n.value}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"user_signup",email:o}),window.fpr&&o&&window.fpr("referral",{email:o}),window.location.href="/onboarding/newsletter?registered_via_magiclink=1"}catch(e){y.value=!0,R(e,{email:n.value,stage:"verify-code",status:e.response?.status}),f("Received Error on Registration",{Source:"Registration","Error Message":e.response?.data??e.message,"Erank Version":3}),f("Viewed Magic Link Confirmation Page",{"Used Manual Code Entry":!1,"Resent Magic Link":!1,"Back to Sign In":!1,"Authentication error":e.response?.data??e.message,"Erank Version":3}),c.value=!1}},D=async()=>{if(!u.value){s("Resend magic link blocked because email is missing",{stage:"resend-code",routeName:a.name}),v.add({severity:"error",summary:"Error",detail:"Please return and enter your email address again.",life:3e3,errorCode:"EMAIL_REQUIRED"});return}c.value=!0;let o="/auth/register";a.name==="login.confirm"&&(o="/auth/email"),f("Viewed Magic Link Confirmation Page",{"Used Manual Code Entry":!1,"Resent Magic Link":!0,"Back to Sign In":!1,"Authentication error":"","Erank Version":3}),s("Resend magic link requested",{email:n.value,routeName:a.name});try{const t=!te(u.value??"");let i="";if(t&&(s("Executing resend reCAPTCHA",{email:n.value}),i=await _()),t&&!i){R(new Error("Resend reCAPTCHA token missing"),{email:n.value}),v.add({severity:"error",summary:"Error",detail:"reCAPTCHA verification failed. Please try again.",life:3e3,errorCode:"RECAPTCHA_VERIFICATION_FAILED"}),c.value=!1;return}const h={email:u.value,resend:!0};t&&(h["g-recaptcha-response"]=i),await N(),await S.post(o,h),s("Resent magic link request succeeded",{email:n.value,routeName:a.name}
1),b.value=!0,v.add({severity:"success",summary:"Success",detail:"Resent successfully",life:3e3})}catch(e){R(e,{email:n.value,stage:"resend-code",status:e.response?.status}),f("Received Error on Registration",{Source:"Registration","Error Message":e.response?.data??e.message,"Erank Version":3});const t=e.response?.status?`${e.response.status}`:"",i=t?`${t} REGISTRATION_FAILED`:"REGISTRATION_FAILED";v.add({severity:"error",summary:"Error",detail:e.response?.data??e.message,life:3e3,errorCode:i})}finally{c.value=!1}},U=()=>{s("Returning to sign in from confirmation page",{email:n.value,routeName:a.name}),f("Viewed Magic Link Confirmation Page",{"Used Manual Code Entry":!1,"Resent Magic Link":!1,"Back to Sign In":!0,"Authentication error":"","Erank Version":3})},z=o=>{g.value=o.target.value.toUpperCase()};return G(g,()=>{y.value=!1}),(o,e)=>{const t=Y("RouterLink");return m(),p(W,null,[e[12]||(e[12]=r("p",{class:"text-lg font-semibold text-black"}," Check Your Email! ",-1)),r("p",se,[e[2]||(e[2]=l(" We've sent a one-time login link to ",-1)),e[3]||(e[3]=r("br",null,null,-1)),r("span",oe,$(d(u)),1)]),C.value?A("",!0):(m(),w(d(M),{key:0,loading:c.value,label:"Enter code manually",class:"my-2 w-full",size:"large","label-class":"font-medium text-base",severity:"tertiary",onClick:e[0]||(e[0]=i=>C.value=!0)},null,8,["loading"])),C.value?(m(),p("div",ie,[r("div",le,[E(d(X),{modelValue:g.value,"onUpdate:modelValue":e[1]||(e[1]=i=>g.value=i),placeholder:"Enter code",class:"!h-[48px] w-full",disabled:c.value,invalid:y.value,onKeydown:K(x,["enter"]),onInput:z},null,8,["modelValue","disabled","invalid"]),r("small",{class:Q(["hidden text-[--v3-input-field-inputerrorbordercolor]",{"!block":y.value}])},"Please enter a valid verification code.",2)]),E(d(M),{loading:c.value,disabled:!g.value||!d(u),label:P.value,class:"w-full",size:"large","label-class":"font-medium text-base",onClick:x},null,8,["loading","disabled","label"])])):A("",!0),b.value?(m(),p("div",ce,[e[9]||(e[9]=r("p",{class:"text-regular-medium mb-4 text-center"}," Still no email? ",-1)),d(a).name==="login.confirm"?(m(),p("p",de,[...e[7]||(e[7]=[l(" 1. Make sure your address is correct.",-1),r("br",null,null,-1),l(" 2. Still no luck? ",-1),r("a",{class:"font-medium text-[--v3-theme-primarycolor]",href:"/contact"},"Contact support",-1)])])):(m(),p("p",me,[...e[8]||(e[8]=[l(" 1. Make sure your address is correct.",-1),r("br",null,null,-1),l(" 2. Try a different email.",-1),r("br",null,null,-1),l(" 3. Still no luck? ",-1),r("a",{class:"font-medium text-[--v3-theme-primarycolor]",href:"/contact"},"Contact support",-1)])]))])):(m(),p("p",ue,[e[4]||(e[4]=l(" Didn't get the email?",-1)),e[5]||(e[5]=r("br",null,null,-1)),e[6]||(e[6]=l(" Check spam or ",-1)),r("button",{class:"text-[--v3-theme-primarycolor] underline",onClick:D}," Click to resend ")])),d(a).name==="registration.confirm"?(m(),w(t,{key:4,to:{name:"registration.entry"},class:"flex items-center gap-2 text-center text-[--color-neutral-neutral-light]"},{default:L(()=>[E(d(V),{name:"arrow-back",class:"size-[18px]"}),e[10]||(e[10]=l(" Back to sign up ",-1))]),_:1})):(m(),w(t,{key:5,to:{name:"login.entry"},class:"flex items-center gap-2 text-center text-[--color-neutral-neutral-light]",onClick:U},{default:L(()=>[E(d(V),{name:"arrow-back",class:"size-[18px]"}),e[11]||(e[11]=l(" Back to sign in ",-1))]),_:1}))],64)}}});export{Ce as default};
2//# sourceMappingURL=ConfirmEmail-BB0kKax0.js.map

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.