1import{q as E,G as j,ad as P,r as a,ag as b,j as e,O as v,B as u,k as w,P as S,c as g,u as _,aw as N}from"./index-CvIN_HVY.js";import{m as k,C as G}from"./customerAuthErrors-k2DMWuDm.js";import{I}from"./InputField-DTV5jKIQ.js";import{E as R,i as T}from"./customer-EUQWz3y0.js";import{A as L,a as B}from"./Alert-B5BEPa66.js";const F="/assets/email-verification-Nvj0GWTL.png",$=()=>{const d=E(),p=j(),h=P(),[s,C]=a.useState(""),[o,n]=a.useState(!1),[x,A]=a.useState(!1),[i,c]=a.useState(null),[y,f]=a.useState(!1);a.useEffect(()=>{b("https://www.google.com/recaptcha/enterprise.js?render=6LeymTcpAAAAAGnDJ4l-pRZsI3Kiv8GB73WOmm0E","script",()=>f(!0))},[]);const l=()=>T(s)&&y&&!o,m=()=>{l()&&(n(!0),c(null),grecaptcha.enterprise.ready(async()=>{try{const t=await grecaptcha.enterprise.execute("6LeymTcpAAAAAGnDJ4l-pRZsI3Kiv8GB73WOmm0E",{action:"register_customer"});await p.registerCustomer({email:s,security_token:t}),A(!0)}catch(t){const r=k({err:t,byStatus:{422:"Please check the submitted information and try again.",409:"Registration conflicted with a concurrent request. Please try again."},serverError:{copy:"Unable to create account right now. Please try again shortly."},fallbackCopy:"Registration failed. Please try again."});r.kind===G.Toast?d(N(r.message)):c(r.message),n(!1)}}))};return e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Create account",robotsFollow:!1}),e.jsx(M,{className:"CustomerCreateAccountPage midwidth",children:x?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"h1",children:"Check your inbox"}),e.jsxs("p",{className:"CustomerCreateAccountPage_signIn",children:["To confirm your email, tap on the link we sent to ",s]}),e.jsx("p",{className:"CustomerCreateAccountPage_emailGraphic",children:e.jsx("img",{src:F,width:182,height:182,title:"Email verification",alt:"Email verification"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"h1",children:"Create your account"}),e.jsx("p",{className:"CustomerCreateAccountPage_signIn",children:"Enter your email address to get started."}),e.jsxs("form",{onSubmit:t=>{t.preventDefault(),m()},children:[e.jsx(I,{type:"email",id:"customerCreateAccountEmail",label:"Email",placeholder:"Enter your email",value:s,autocomplete:"email",maxLength:R,onChange:t=>C(t.target.value),required:!0}),i&&e.jsx("div",{className:"CustomerCreateAccountPage_alert",children:e.jsx(L,{type:B.Urgent,message:i})}),e.jsxs("div",{className:"CustomerCreateAccountPage_submit",children:[e.jsx(u,{text:"Next",onClick:m,disabled:!l(),loading:o}),e.jsx(u,{text:"Cancel",type:w.Secondary,onClick:()=>h(S.CustomerSignInPage)})]})]})]})})]})},M=_.section` 2 padding: 40px 0 24px 0; 3 4 h1, 5 .CustomerCreateAccountPage_signIn { 6 text-align: center; 7 } 8 9 .CustomerCreateAccountPage_signIn { 10 padding-bottom: 0.5rem; 11 font-weight: 300; 12 color: ${g.neutral400}; 13 14 a { 15 font-weight: 400; 16 color: ${g.blue400}; 17 text-decoration: underline; 18 } 19 } 20 21 .CustomerCreateAccountPage_emailGraphic { 22 text-align: center; 23 24 img { 25 margin: 0 auto; 26 } 27 } 28 29 .CustomerCreateAccountPage_alert { 30 margin: 1em 0; 31 } 32 33 .CustomerCreateAccountPage_submit { 34 margin-top: 1.5rem; 35 } 36`;export{$ as CustomerCreateAccountPage};
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.