1import{_ as U}from"./CJbG-lx0.js";import{b as j,a as q,t as H,s as L,i as R,n as z,d as A,o as D,F as E}from"./3Ps77TiH.js";import M from"./CN_Obp83.js";import Y from"./DydeJOUH.js";import G from"./CQsczvyr.js";import{r as J,l as K}from"./D3pctV-p.js";import{b as O,U as i,M as s,V as n,$ as g,u as e,P as c,a6 as V,Y as a,z as k,S as h}from"./B9WjbkLb.js";import"./BnxB1Wlx.js";import"./BV042yML.js";const Q={class:"py-8 px-4 flex flex-col items-center"},W={class:"flex flex-wrap justify-center pb-6 font-medium"},X={class:"text-brand-500 focus:underline hover:underline cursor-pointer"},Z={class:"flex w-full gap-3 md:gap-2 flex-col md:flex-row pb-2"},ee={class:"flex-1"},te={key:0,id:"email-help",class:"p-error w-full text-sm"},oe={class:"flex-1"},se={key:0,id:"password-help",class:"p-error w-full text-sm"},le={key:1,id:"password-help",class:"p-error w-full text-sm"},ne={class:"flex items-center w-full justify-end pt-1 pb-8"},ge={__name:"login",setup(ae){const d=j(),{t:o}=q(),w=H(),{error:p,loading:S}=L(w),{login:F}=w;p.value="";const x={email:"email|required",password:"required"},{handleSubmit:B,defineField:b,errors:r,meta:$}=R({validationSchema:x,initialValues:{email:"",password:""}}),[m]=b("email"),[u]=b("password"),N=O(!0),v=B(t=>{const l={...t,remember:N.value};F(l).then(f=>{f.status==="success"&&z(d("/"))})});return A({title:"".concat(o("login_title")," | ").concat(o("store_name")),meta:[{property:"og:title",content:"".concat(o("login_title")," | ").concat(o("store_name"))},{name:"description",content:o("login_description")},{property:"og:description",content:o("login_description")},{name:"twitter:title",content:"".concat(o("login_title")," | ").concat(o("store_name"))},{name:"twitter:description",content:o("login_description")}]}),(t,l)=>{const f=U,y=D,T=M,C=Y,I=G,P=E;return c(),i("div",Q,[s(f,{class:"!text-black",text:t.$t("login_title")},null,8,["text"]),n("div",W,[s(y,{to:e(d)("/register"),"data-testid":"register-button"},{default:g(()=>[V(a(t.$t("dont_have_account"))+" ",1),n("span",X,a(t.$t("sign_up")),1)]),_:1},8,["to"])]),s(P,{name:"form-login","validation-schema":x,class:"w-full flex flex-col items-center max-w-xl",onSubmit:e(v)},{default:g(()=>[n("div",Z,[n("div",ee,[s(T,{modelValue:e(m),"onUpdate:modelValue":l[0]||(l[0]=_=>k(m)?m.value=_:null),name:"email",placeholder:t.$t("email"),pt:e(J),class:"h-12"},null,8,["modelValue","placeholder","pt"]),e(r).email&&e($).touched?(c(),i("p",te,a(e(r).email),1)):h("",!0)]),n("div",oe,[s(C,{modelValue:e(u),"onUpdate:modelValue":l[1]||(l[1]=_=>k(u)?u.value=_:null),name:"password",feedback:!1,placeholder:t.$t("password"),pt:t.passInput,class:"w-full h-12","toggle-mask":""},null,8,["modelValue","placeholder","pt"]),e(p)?(c(),i("p",se,a(e(p)),1)):h("",!0),e(r).password&&e($).touched?(c(),i("p",le,a(e(r).password),1)):h("",!0)])]),n("div",ne,[s(y,{to:e(d)("/password-reset"),class:"text-sm text-end text-neutral-400 font-medium focus:underline hover:underline cursor-pointer","data-testid":"forgot-password"},{default:g(()=>[V(a(t.$t("forgotten_password")),1)]),_:1},8,["to"])]),s(I,{name:"btn-login",type:"submit",icon:"pi pi-sign-in",label:t.$t("login"),loading:e(S),pt:e(K),class:"w-full sm:w-fit self-center min-w-52",onClick:e(v)},null,8,["label","loading","pt","onClick"])]),_:1},8,["onSubmit"])])}}};export{ge 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.