1import ae from"./BYLZ39uc.js";import te from"./CIXZKRtx.js";import oe from"./D-U0FH9P.js";import se from"./-5Frk9g6.js";import ne from"./OdhQVY2D.js";import ie from"./CgjAXfr9.js";import{aw as re,ay as me,aN as de,a_ as ue,b0 as pe,ax as ce,aO as B,b1 as fe,aC as n,aQ as m,aD as r,aW as c,aR as i,aE as L,aF as e,aV as d,aT as u,b5 as v,b6 as ve,aM as ye,b2 as Ne,aU as ge,aJ as s}from"./BLYA1jys.js";import{t as be,u as xe}from"./ucGj8QyW.js";import{d as Te,o as O,l as F,s as y,b as G}from"./CFRNOYpp.js";import"./CUJ29YeE.js";import"./BZAnBXaF.js";import"./Buy-cWFm.js";import"./C8-Qk3ko.js";import"./DsZjhiNb.js";import"./EFzMhR5b.js";import"./d9OdSw94.js";import"./CFvIEwPC.js";import"./BmtYUuDY.js";(function(){try{var g=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},V=new g.Error().stack;V&&(g._sentryDebugIds=g._sentryDebugIds||{},g._sentryDebugIds[V]="64e1e5d4-a269-4ee6-a5e9-64938fc6b702",g._sentryDebugIdIdentifier="sentry-dbid-64e1e5d4-a269-4ee6-a5e9-64938fc6b702")}catch{}})();const Ve={class:"mb-[20vh] flex w-full flex-col flex-nowrap items-center gap-4 p-4 xs:mt-8"},we={class:"grid w-full max-w-[42rem] grid-cols-1"},he={class:"flex flex-col gap-4 pt-8"},_e={class:"text-center font-artcurial text-5xl"},$e={key:"index0",class:"grid grid-cols-1 gap-2"},Se={key:0,class:"text-sm"},ke={key:0,class:"w-full text-sm"},Pe={key:"index1",class:"grid grid-cols-1 gap-2 md:grid-cols-2"},Ue={key:0,class:"text-sm"},Ce={key:0,class:"w-full text-sm"},Ae={key:0,class:"w-full text-sm"},De={key:0,class:"w-full text-sm"},Ie={key:0,class:"w-full text-sm"},Re={key:0,class:"w-full text-sm"},Ee={class:"mt-2 text-lg font-bold"},Be={class:"flex items-start gap-2"},Le={class:"flex flex-wrap gap-4"},Oe={class:"flex items-center gap-2"},Fe={class:"flex items-center gap-2"},Ge={class:"flex w-full flex-col items-center gap-2"},nl=re({__name:"index",setup(g){const{$api:V}=me(),P=de(),{refresh:H,signOut:M}=ue(),U=pe(),{locale:C}=ce(),w=B(0),h=B(!1),j=[{label:"SAS",value:"SAS"},{label:"SARL",value:"SARL"},{label:"EURL",value:"EURL"},{label:"SNC",value:"SNC"},{label:"SA",value:"SA"},{label:"SCS",value:"SCS"},{label:"SCA",value:"SCA"},{label:"GIE",value:"GIE"},{label:"OTHER",value:"OTHER"}],q=be(Te("personType",[O({comPref:G(),firstName:y().min(2).max(50),lastName:y().min(2).max(50),personType:F("individual")}),O({comPref:G(),companyName:y().min(2).max(50),companyType:y().min(2).max(50),firstName:y().min(2).max(50),intracomNumber:y().min(2).max(50),lastName:y().min(2).max(50),personType:F("professional"),siren:y().optional()})])),{defineField:f,errors:t,handleSubmit:J}=xe({initialValues:{comPref:!0,personType:"individual"},validateOnMount:!1,validationSchema:q}),[A]=f("personType"),[b,D]=f("firstName"),[x,I]=f("lastName"),[_,Q]=f("companyName"),[$,W]=f("companyType"),[S,z]=f("intracomNumber"),[k,K]=f("siren"),[T]=f("comPref"),X=J(async a=>{h.value=!0;try{a.personType==="individual"?await V.user.registerCustomer({firstName:a.firstName,lastName:a.lastName,locale:C.value,personType:a.personType}):await V.user.registerCustomer({companyName:a.companyName,companyType:a.companyType,firstName:a.firstName,intracomNumber:a.intracomNumber,lastName:a.lastName,locale:C.value,personType:a.personType,siren:a.siren}),await H();const l=String(P.query.callbackUrl||"");fe({path:l||U("/en/register/complete")}
1)}catch(l){console.error(l)}h.value=!1});return(a,l)=>{const R=ae,Y=te,N=oe,Z=se,E=ne,ee=ie,le=Ne,p=ve("auto-animate");return s(),n("div",Ve,[m("div",we,[m("div",he,[m("h1",_e,i(a.$t("register.title")),1),r(Y,{"active-index":e(w),"onUpdate:activeIndex":l[0]||(l[0]=o=>d(w)?w.value=o:null),"pt:panelcontainer":"p-0",class:"mb-2 h-16 w-full",onTabChange:l[1]||(l[1]=o=>{o.index===0?A.value="individual":A.value="professional"})},{default:L(()=>[r(R,{header:a.$t("register.individual")},null,8,["header"]),r(R,{header:a.$t("register.professional")},null,8,["header"])]),_:1},8,["active-index"]),c((s(),n("div",null,[e(w)===0?(s(),n("div",$e,[c((s(),n("div",null,[r(N,v({modelValue:e(x),"onUpdate:modelValue":l[2]||(l[2]=o=>d(x)?x.value=o:null),class:"w-full"},e(I),{invalid:!!e(t).lastName,type:"text",placeholder:a.$t("register.form.lastName")}),null,16,["modelValue","invalid","placeholder"]),e(t).lastName?(s(),n("div",Se,i(e(t).lastName),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(N,v({modelValue:e(b),"onUpdate:modelValue":l[3]||(l[3]=o=>d(b)?b.value=o:null),class:"w-full"},e(D),{type:"text",invalid:!!e(t).firstName,placeholder:a.$t("register.form.firstName")}),null,16,["modelValue","invalid","placeholder"]),e(t).firstName?(s(),n("div",ke,i(e(t).firstName),1)):u("",!0)])),[[p]])])):u("",!0),e(w)===1?(s(),n("div",Pe,[c((s(),n("div",null,[r(N,v({modelValue:e(x),"onUpdate:modelValue":l[4]||(l[4]=o=>d(x)?x.value=o:null),class:"w-full"},e(I),{invalid:!!e(t).lastName,type:"text",placeholder:a.$t("register.form.lastName")}),null,16,["modelValue","invalid","placeholder"]),e(t).lastName?(s(),n("div",Ue,i(e(t).lastName),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(N,v({modelValue:e(b),"onUpdate:modelValue":l[5]||(l[5]=o=>d(b)?b.value=o:null),class:"w-full"},e(D),{type:"text",invalid:!!e(t).firstName,placeholder:a.$t("register.form.firstName")}),null,16,["modelValue","invalid","placeholder"]),e(t).firstName?(s(),n("div",Ce,i(e(t).firstName),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(N,v(e(Q),{modelValue:e(_),"onUpdate:modelValue":l[6]||(l[6]=o=>d(_)?_.value=o:null),type:"text",class:"w-full",invalid:!!e(t).companyName,placeholder:a.$t("register.form.companyName")}),null,16,["modelValue","invalid","placeholder"]),e(t).companyName?(s(),n("div",Ae,i(e(t).companyName),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(N,v(e(K),{modelValue:e(k),"onUpdate:modelValue":l[7]||(l[7]=o=>d(k)?k.value=o:null),type:"text",class:"w-full",invalid:!!e(t).siren,placeholder:a.$t("register.form.siren")}),null,16,["modelValue","invalid","placeholder"]),e(t).siren?(s(),n("div",De,i(e(t).siren),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(Z,v({modelValue:e($),"onUpdate:modelValue":l[8]||(l[8]=o=>d($)?$.value=o:null),options:j,"option-label":"value","option-value":"value",class:"w-full text-left"},e(W),{invalid:!!e(t).companyType,placeholder:a.$t("register.form.companyType")}),null,16,["modelValue","invalid","placeholder"]),e(t).companyType?(s(),n("div",Ie,i(e(t).companyType),1)):u("",!0)])),[[p]]),c((s(),n("div",null,[r(N,v(e(z),{modelValue:e(S),"onUpdate:modelValue":l[9]||(l[9]=o=>d(S)?S.value=o:null),type:"text",class:"w-full",invalid:!!e(t).intracomNumber,placeholder:a.$t("register.form.intracomNumber")}),null,16,["modelValue","invalid","placeholder"]),e(t).intracomNumber?(s(),n("div",Re,i(e(t).intracomNumber),1)):u("",!0)])),[[p]])])):u("",!0)])),[[p]]),m("div",Ee,i(a.$t("register.communicationPreferences")),1),m("div",Be,i(a.$t("register.communicationPreferencesDescription")),1),m("div",Le,[m("div",Oe,[r(E,{modelValue:e(T),"onUpdate:modelValue":l[10]||(l[10]=o=>d(T)?T.value=o:null),value:!0},null,8,["modelValue"]),m("label",null,i(a.$t("register.agree")),1)]),m("div",Fe,[r(E,{modelValue:e(T),"onUpdate:modelValue":l[11]||(l[11]=o=>d(T)?T.value=o:null),value:!1},null,8,["modelValue"]),m("label",null,i(a.$t("register.disagree")),1)])]),c((s(),n("div",Ge,[e(h)?(s(),ye(ee,{key:0,style:{width:"50px",height:"50px"}})):u("",!0),r(le,{class:"w-full",type:"submit",loading:e(h),disabled:e(h),onClick:e(X)},{default:L(()=>[ge(i(a.$t("register.createAccount")),1)]),_:1},8,["loading","disabled","onClick"])])),[[p]]),m("a",{class:"cursor-pointer self-center underline",onClick:l[12]||(l[12]=()=>e(M)({callbackUrl:e(U)("/")}))},i(a.$t("register.logout")),1)])])])}}});
1export{nl 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.