1import{d as j,c as D,a as F,aD as A,r,p as H,aE as R,e as _,j as d,h as v,m as o,ai as G,q as l,f as e,a9 as J,g as K,M as m,t as i,v as n,x as y,_ as Q,R as W,l as X}from"./JTGkqvXa.js";import{_ as c}from"./Yo0n_eQ8.js";import{H as Y}from"./XzcKr1g2.js";import{_ as S}from"./v_D0j1dp.js";import{_ as Z}from"./CVhPUN3Z.js";import"./Q27x1Ny1.js";import"./BajsZfPk.js";const ee={class:"container xs:bg-transparent bg-white min-h-screen flex items-center Signup"},ae={class:"flex shadow-box rounded-2xl bg-white lg:flex-row flex-col xs:gap-y-16 gap-y-12 mx-auto 2xl:max-w-none max-w-[108rem] w-full my-24"},se={class:"flex gap-y-14 mt-16 flex-col"},te={class:"flex sm:flex-row flex-col sm:gap-y-0 gap-y-14 gap-x-8"},le={class:"mt-10 mb-6 flex flex-col gap-y-4"},oe={key:0,class:"mb-12 text-3xs leading-normal font-semibold text-red flex flex-col"},ne={key:0},re={key:1},ie={class:"flex flex-col items-center"},ce={class:"text-3xs leading-normal font-medium mt-5"},_e={__name:"index",props:{slice:{type:Object,required:!0,default:()=>({})}},setup(h){const N=j(),w=D(),I=X(),{t}=F(),{gtag:P}=A(),U=r(null),a=r({entity:"",firstName:"",lastName:"",email:"",password:"",confirmPassword:""}),u=r(!1),p=r(!1),b=r(!1),f=r(!1);H(()=>{N.setVisibility(!1)}),R(()=>{N.setVisibility(!0)});const B=async()=>{if(a.value.password!==a.value.confirmPassword){u.value=!0;return}else u.value=!1;try{const s=await fetch(`${I.public.apiUrl}/signup`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.value.email,pwd:a.value.password,fname:a.value.firstName,lname:a.value.lastName,company:a.value.entity,birthdate:new Date,test:0})}),{code:g,redirect_to:x}=await s.json();switch(g){case"signup_success":P("event","conversion_event_signup_1",{event_category:"engagement",gclid:w.gclid}),setTimeout(()=>{window.location.href=x},150);break;case"existing_email":p.value=!0;break;case"signup_blocked":b.value=!0;break;case"signup_fail":f.value=!0;break}}catch(s){console.error("Signup error:",s),f.value=!0}},M=s=>{a.value.password=s,u.value&&s===a.value.confirmPassword&&(u.value=!1)},q=s=>{a.value.confirmPassword=s},z=s=>{a.value.entity=s},C=s=>{a.value.firstName=s},E=s=>{a.value.lastName=s},V=s=>{a.value.email=s},L=()=>{p.value&&(p.value=!1)},O=_(()=>w.loginLink),T=_(()=>w.legalPages),k=_(()=>T.value.tos||{}),$=_(()=>!!(a.value.entity&&a.value.firstName&&a.value.lastName&&a.value.email&&a.value.password&&a.value.confirmPassword));return(s,g)=>{const x=W;return d(),v("section",ee,[o("div",ae,[o("div",{class:"lg:mx-0 mx-auto flex relative items-center bg-center bg-cover lg:w-[45%] w-full rounded-tl-2xl lg:rounded-bl-2xl lg:rounded-tr-none rounded-tr-2xl lg:h-auto xs:h-[30rem] h-60",style:G({backgroundImage:`url(${h.slice.primary.image.url})`})},[l(e(Z),{"is-static":"",classes:{"absolute xs:left-16 xs:top-16 top-8 left-8 z-10":!0}}),g[0]||(g[0]=o("div",{class:"u-blue-overlay inset-0 absolute z-1"},null,-1))],4),o("form",{onSubmit:J(B,["prevent"]),class:"lg:w-5/12 lg:pt-16 pb-16 lg:px-30 sm:px-18 px-8 flex-grow",ref_key:"form",ref:U},[l(e(Y),{title:h.slice.primary.title,description:h.slice.primary.description,"has-entry-animation":""},null,8,["title","description"]),o("div",se,[l(e(c),{required:"",name:"entity",onInput:z,placeholder:e(t)("form.fields.entityName"),autocomplete:"organization"},null,8,["placeholder"]),o("div",te,[l(e(c),{required:"",name:"firstName",onInput:C,placeholder:e(t)("form.fields.firstName"),autocomplete:"given-name"},null,8,["placeholder"]),l(e(c),{required:"",name:"lastName",onInput:E,placeholder:e(t)("form.fields.lastName"),autocomplete:"family-name"},null,8,["placeholder"])]),l(e(c),{required:"",type:"email",name:"email",onInput:V,onFocus:L,"error-message":"isMailAlreadyExisting",placeholder:e(t)("form.fields.email"),"has-error":e(p)},null,8,["placeholder","has-error"]),l(e(c),{required:"",type:"password",name:"password",onInput:M,"error-message":"passwordMismatch","has-error":e(u),placeholder:e(t)("form.fields.password")},null,8,["has-error","placeholder"]),l(e(c),{type:"password",name:"confirmPassword",onInput:q,placeholder:e(t)("form.fields.confirmPassword")},null,8,["placeholder"])]),o("div",le,[e(k)&&e(k).url?(d(),K(e(S),{key:0,id:"acceptTos"},{default:m(()=>[o("div",null,[i(n(e(t)("signUp.accept"))+" ",1),l(x,{field:e(k),target:"_blank",class:"u-link underline text-secondary u-link--secondaryBase"},{default:m(()=>
1[i(n(e(t)("signUp.tos")),1)]),_:1},8,["field"])])]),_:1})):y("",!0),l(e(S),{id:"organizerConfirm"},{default:m(()=>[i(n(e(t)("signUp.organizerConfirm")),1)]),_:1})]),e(b)||e(f)?(d(),v("div",oe,[o("span",null,n(e(t)("signUp.errorOccured")),1),e(b)?(d(),v("span",ne,n(e(t)("signUp.blocked"))+". ",1)):y("",!0),e(f)?(d(),v("span",re,n(e(t)("signUp.failed"))+". ",1)):y("",!0)])):y("",!0),o("div",ie,[l(e(Q),{type:"submit",classes:"u-text-regular-1",disabled:!e($),secondary:""},{default:m(()=>[i(n(e(t)("signUp.createAccount")),1)]),_:1},8,["disabled"]),o("div",ce,[i(n(e(t)("signUp.alreadyOrganizer"))+" ",1),l(x,{class:"u-link underline text-secondary u-link--secondaryBase",field:e(O)},{default:m(()=>[i(n(e(t)("signUp.login")),1)]),_:1},8,["field"])])])],544)])])}}};export{_e as default};
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.