1import{F as k,I as P,a as I}from"./FormItem-iRFNNYeq.js";import{B as E}from"./Button-CWc0jDsI.js";import{u as B}from"./use-message-Cy6_w79y.js";import{J as N,P as S,V as s,X as m,H as a,L as l,u as w,W as $,_ as L,r as p}from"./vue-core-Ce-OtiEx.js";import{u as M,b as V,h as A,a as C}from"./app-BbcNV1r3.js";import{u as D}from"./useGlobal-5RBGmIa0.js";import"./Loading-d_UTUtl1.js";import"./replaceable-BUF4Swd8.js";import"./fade-in.cssr-BljNB1hT.js";import"./get-BMW5nFnH.js";import"./context-mocZgCVj.js";import"./index-BLY1U1P8.js";const H={class:"full_flex text-sm font-medium min-h-[calc(100dvh_-_80px)] py-10"},T={class:"mt-10 bg-white p-10 rounded-2xl max-w-fit mx-auto"},U={class:"md:text-[36px] text-3xl font-medium"},W={class:"w-full"},G={class:"text-[#676E76] mt-1.5 leading-snug"},J={class:"w-full mt-2"},ae={__name:"index",setup(X){const i=B(),{t:r}=M(),v=V(),{isLoading:c}=D(),f=p(),_=A(),g=C(),t=p({email:null,token:null,password:null,password_confirmation:null}),b={password:[{required:!0,message:r("authForm.fieldRequired"),trigger:"blur"}],password_confirmation:[{required:!0,message:r("authForm.fieldRequired"),trigger:"blur"},{validator:(e,o)=>o&&o!==t.value.password?new Error(r("authForm.passwordsDoNotMatch")):!0,trigger:["input","blur","password-input"]}]},h=p();function F(){var e;t.value.password_confirmation&&((e=h.value)==null||e.validate({trigger:"password-input"}).catch(()=>{}))}function y(){var e;(e=f.value)==null||e.validate(o=>{if(o)i.error(r("authForm.completeRequiredFields"));else{const n=x(t.value.password);n===!0?(t.value.email=_.query.email,t.value.token=_.query.token,v.resetPassword(t.value).then(u=>{i.success(r("authForm.passwordChangedSuccess")),g.push({name:"Login"})}).catch(u=>{})):i.error(n)}})}function x(e){return(e==null?void 0:e.length)<8?r("authForm.passwordMinLengthError"):/[\d\W]/.test(e)?!0:r("authForm.passwordSymbolRequiredError")}return(e,o)=>{const n=P,u=k,q=E,R=I;return N(),S("section",H,[s("div",null,[s("div",T,[s("h1",U,m(e.$t("authForm.enterNewPasswordTitle")),1),s("div",null,[a(R,{ref_key:"formRef",ref:f,model:t.value,rules:b,"label-placement":"top",onSubmit:L(y,["prevent"])},{default:l(()=>[a(u,{class:"col-span-2",label:e.$t("authForm.newPassword"),required:"",path:"password"},{default:l(()=>[s("div",W,[a(n,{placeholder:"",value:t.value.password,"onUpdate:value":o[0]||(o[0]=d=>t.value.password=d),type:"password","show-password-on":"click",onInput:F},null,8,["value"]),s("p",G,m(e.$t("authForm.newPasswordHint")),1)])]),_:1},8,["label"]),a(u,{ref_key:"confirmItemRef",ref:h,class:"col-span-2",label:e.$t("authForm.reEnterPassword"),required:"",path:"password_confirmation"},{default:l(()=>[a(n,{placeholder:"",value:t.value.password_confirmation,"onUpdate:value":o[1]||(o[1]=d=>t.value.password_confirmation=d),type:"password","show-password-on":"click"},null,8,["value"])]),_:1},8,["label"]),s("div",J,[a(q,{loading:w(c),disabled:w(c),"attr-type":"submit",class:"!px-7 !py-3 !w-full",type:"primary"},{default:l(()=>[$(m(e.$t("authForm.changePassword")),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["model"])])])])])}}};export{ae 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.