PageSourceSearch

https://lounge.com/cdn/shop/t/1060/assets/Register-C52he0VG.js

js lounge.com collected 2026-10-01 10:30:34 UTC 4,815 bytes, 2 lines download raw bytes

1import{r as _,u,j as e}from"./vendor-DK5BRhkN.js";import{aj as r,ak as b,p as n,T as m,al as S,u as I,D as P,am as T,A as l,Q as E,N as R,L as F,an as C}from"./index-entry-CM0FfdjI.js";import{C as D}from"./CreatePasswordRequirements-DgplN6M6.js";import"./motion-D6knLWPS.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="810e74ec-555d-42a5-9f90-5ab54f671491",a._sentryDebugIdIdentifier="sentry-dbid-810e74ec-555d-42a5-9f90-5ab54f671491")}catch{}{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a._sentryModuleMetadata=a._sentryModuleMetadata||{},a._sentryModuleMetadata[new a.Error().stack]=Object.assign({},a._sentryModuleMetadata[new a.Error().stack],{"_sentryBundlerPluginAppKey:frontend/theme":!0})}const L=()=>{const a=_.useId(),{t:s}=u();return e.jsx(r.Step,{title:s("account.register_form.set_password"),className:"grid gap-6 w-full",validationSchema:b.pick({password:!0,confirmPassword:!0,acceptsMarketing:!0}).superRefine(S),children:({formState:c})=>{const d=c.errors.password;return e.jsxs(e.Fragment,{children:[e.jsx(n.Password,{name:"password",variant:"underlined",label:s("account.password"),required:!0,placeholder:s("account.enter_password"),"aria-describedby":a,errorText:d?s("account.errors.password_invalid"):void 0}),e.jsx(n.Password,{name:"confirmPassword",variant:"underlined",label:s("account.retype_password"),required:!0,placeholder:s("account.retype_password")}),e.jsx(D,{id:a,passwordFieldName:"password"}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(n.Checkbox,{name:"acceptsMarketing",className:"justify-start items-start",label:s("account.register_form.accept_marketing_label")}),e.jsx(m,{variant:"body-xs",dangerouslySetInnerHTML:{__html:s("account.privacy_policy_statement")}})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 justify-between",children:[e.jsx(r.Back,{size:"md",className:"w-full order-1 md:order-0",children:s("action.back")}),e.jsx(r.Next,{size:"md",className:"w-full md:order-1",children:s("action.next")})]})]})}})},q=()=>{const{t:a}=u();return e.jsxs(r.Step,{title:a("account.register_form.personal_details"),className:"grid gap-6 grid-cols-1 md:grid-cols-2 w-full",validationSchema:b.pick({firstName:!0,lastName:!0,email:!0}),children:[e.jsx(n.Input,{name:"firstName",variant:"underlined",label:`${a("account.first_name")} *`,placeholder:a("account.enter_first_name")}),e.jsx(n.Input,{name:"lastName",variant:"underlined",label:`${a("account.last_name")} *`,placeholder:a("account.enter_last_name")}),e.jsx(n.Input,{name:"email",variant:"underlined",label:`${a("account.email_address")} *`,className:"md:col-span-2",placeholder:"[email protected]"}),e.jsx("div",{className:"flex justify-end md:col-span-2",children:e.jsx(r.Next,{size:"md",className:"w-full",children:a("action.next")})})]})},z={firstName:"",lastName:"",email:"",password:"",confirmPassword:"",acceptsMarketing:!1},G=({data:{title:a,subtitle:s,image:c,imageAlt:d,video:w}={}})=>{const{t:i}=u(),{register:j}=I(),[p,f]=_.useState(),{routes:x,shop:g}=P(),{identify:N,consent:h,events:k,update:M}=T(),v=async({confirmPassword:y,...t})=>{try{const o={first_name:t.firstName,last_name:t.lastName};await j({...t,callbackFn:async()=>{await N(t.email,{...o,domain:g}),t.acceptsMarketing&&(h("email",!0),h("sms",!0)),k.signup({firstName:t.firstName,lastName:t.lastName,email:t.email,acceptsMarketing:t.acceptsMarketing,tags:["register"]}),M({domain:g,first_name:t.firstName,last_name:t.lastName})}})}catch(o){o instanceof C?f(o.data.response):f(i("account.errors.unexpected"))}};return e.jsxs(l,{children:[e.jsxs(l.FormContainer,{backHref:x.account_login_url,className:"h-full relative",children:[e.jsx(r,{onSubmit:v,initialValues:z,children:({activeStep:y,totalSteps:t})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center lg:text-left",children:[e.jsx(E,{className:"inline-block mb-6 w-[148px] h-[24px] text-black"}),e.jsx(m,{variant:"body-md",className:"font-regular mb-4 text-subtle",children:i("general.step_x_of_y",{x:y+1,y:t})}),s&&e.jsx(l.Subtitle,{children:s})]}),e.jsxs(r.Steps,{className:"w-full mb-5",children:[e.jsx(q,{}),e.jsx(L,{})]})]})}),p?e.jsx(R,{severity:"critical",title:`${i("general.error")}:`,children:p}):e.jsxs(m,{variant:"body-sm",className:"text-center mt-6 text-black block",children:[i("account.register_form.already_have_account")," ",e.jsx(F,{variant:"body-sm",href:x.account_login_url,className:"underline hover:opacity-70 transition-opacity",children:i("account.login")})]})]}),e.jsx(l.Media,{image:c,imageAlt:d,video:w})]})};export{G as Register,G as default};
2//# sourceMappingURL=Register-C52he0VG.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.