1import{g as L,d as S,B as Y,o as u,a as $,e,m as w,i as t,b as l,k as h,ai as ee,F as te,f as ae,c as ne,a9 as oe,D as se,ab as re,n as ie,I as c,J as T,L as ce,M as le,ag as ue,l as o,ac as me,H as d,a8 as pe,R as _e,aa as de,q as fe,ad as he,ae as M,ah as ye,X as ge}from"./Ch2brTLv.js";import{_ as ve}from"./Dy7i7C1p.js";import{u as $e,_ as we,a as Se}from"./Cz-EXvS1.js";import{_ as be,a as ke}from"./Bs5dXdB0.js";import{_ as Fe}from"./DcwNwZ1f.js";import{_ as xe}from"./CxUAxrHd.js";import{_ as V}from"./CM00PoZr.js";import{u as B}from"./Bzvq5i0S.js";import{z as f,t as Ce}from"./DyeUJQVc.js";import{u as v}from"./CfBT87Td.js";/** 2 * @license lucide-vue-next v0.456.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Ie=L("EyeOffIcon",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 7 * @license lucide-vue-next v0.456.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Pe=L("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Ae={class:"relative"},Ee=S({inheritAttrs:!1,__name:"SaasPasswordInput",props:{modelValue:{},name:{},onBlur:{type:Function},onInput:{type:Function},onChange:{type:Function},"onUpdate:modelValue":{type:Function}},setup(s){const p=s,m=Y(!1);return(y,_)=>{const g=V;return u(),$("div",Ae,[e(g,w({...y.$attrs,...p},{type:t(m)?"text":"password",class:"pr-10"}),null,16,["type"]),l("button",{type:"button",onClick:_[0]||(_[0]=r=>m.value=!t(m)),class:"absolute inset-y-0 right-0 flex items-center pr-4 text-xl text-primary"},[(u(),h(ee(t(m)?t(Ie):t(Pe)),{class:"size-4"}))])])}}}),Te=f.string().min(8).max(255).refine(s=>/[A-Z]/.test(s),{params:{i18n:{key:"uppercase_character_required",values:{character:"A-Z"}}}}).refine(s=>/[a-z]/.test(s),{params:{i18n:{key:"lowercase_character_required",values:{character:"a-z"}}}}).refine(s=>/[0-9]/.test(s),{params:{i18n:{key:"number_required",values:{character:"0-9"}}}}),Le=M(ye),Me={class:"text-3xl font-bold"},Ve={class:"text-muted-foreground mb-6 mt-2"},Be={class:"text-muted-foreground"},qe=S({__name:"SaasSignupForm.client",setup(s){const p=_e(),{apiCaller:m}=te(),{t:y}=B(),_=ae(),g=Ce(f.object({root:f.string().optional(),email:f.string().email(),password:Te})),{searchQuery:r}=v({name:"invitationCode",replace:!0}),{searchQuery:q}=v({name:"redirectTo",replace:!0}),{searchQuery:b}=v({name:"email",replace:!0}),z=ne(()=>r.value?`/team/invitation?code=${r.value}`:q.value||p.public.auth.redirectPath),{zodErrorMap:N,setApiErrorsToForm:U}=$e();f.setErrorMap(N);const k=oe({validationSchema:g,initialValues:{email:"",password:""}}),{handleSubmit:R,setFieldValue:j,isSubmitting:D,values:O,errors:F}=k;se(()=>{b.value&&j("email",b.value)});const x=R(async a=>{try{await m.auth.signup.mutate({email:a.email,password:a.password,callbackUrl:re(p.public.siteUrl,"/auth/verify")});const n=new URLSearchParams;n.set("type","SIGNUP"),n.set("redirectTo",z.value),r&&n.set("invitationCode",r.value),a.email&&n.set("identifier",a.email),ie(_(`/auth/otp?${n.toString()}`),{replace:!0})}catch(n){U(n,k,{defaultError:y("auth.signup.hints.signupFailed.message")})}});return(a,n)=>{const Q=ve,H=Le,Z=we,G=Se,C=Fe,J=V,I=be,P=xe,A=ke,E=de,X=Ee,K=fe,W=he;return u(),$("div",null,[l("h1",Me,c(a.$t("auth.signup.title")),1),l("p",Ve,c(a.$t("auth.signup.message")),1),t(r)?(u(),h(Q,{key:0,class:"mb-6"})):T("",!0),l("div",null,[(u(!0),$(ce,null,le(Object.keys(t(ue)),i=>(u(),h(H,{key:i,provider:i},null,8,["provider"]))),128))]),n[1]||(n[1]=l("hr",{class:"my-8"},null,-1)),l("form",{onSubmit:n[0]||(n[0]=pe((...i)=>t(x)&&t(x)(...i),["prevent"])),class:"flex flex-col items-stretch gap-6"},[t(F).root?(u(),h(G,{key:0,variant:"error"},{default:o(()=>[e(t(me),{class:"size-6"}),e(Z,null,{default:o(()=>[d(c(t(F).root),1)]),_:1})]),_:1})):T("",!0),e(E,{name:"email"},{default:o(({componentField:i})=>[e(A,null,{default:o(()=>[e(C,{for:"name",required:""},{default:o(()=>[d(c(a.$t("auth.signup.email")),1)]),_:1}),e(I,null,{default:o(()=>[e(J,w(i,{autocomplete:"email"}),null,16)]),_:2},1024),e(P)]),_:2},1024)]),_:1}),e(E,{name:"password"},{default:o(({componentField:i})=>[e(A,null,{default:o(()=>[e(C,{for:"password",required:""},{default:o(()=>[d(c(a.$t("auth.signup.password")),1)]),_:1}),e(I,null,{default:o(()=>[e(X,w(i,{autocomplete:"new-password",required:""}),null,16)]),_:2},1024),e(P)]),_:2},1024)]),_:1}),e(K,{loading:t(D),type:"submit"},{default:o(()=>[d(c(a.$t("auth.signup.submit"))+" â ",1)]),_:1},8,["loading"]),l("p",null,[l("span",Be,c(a.$t("auth.signup.alreadyHaveAccount"))+"Â ",1),e(W,{to:`/auth/login${t(r)?`?invitationCode=${t(r)}&email=${t(O).email}`:""}`},{default:o(()=>[d(c(a.$t("auth.signup.signIn"))+" â ",1)]),_:1},8,["to"])])],32)])}}}),ze=M(qe),Je=S({__name:"signup",setup(s){const{t:p}=B();return ge({title:p("auth.signup.title")}),(m,y)=>{const _=ze;return u(),h(_)}}});
11export{Je 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.