1import{bf as a,b2 as v,I as b,bW as t,$ as o,Y as d,br as n,G as g,bZ as c,bY as P,bE as y,P as u}from"./yzds40HC.js";const _={class:"overline"},$={name:"ResetPassword",auth:"guest",data(){return{isLoading:!1,newPassword:"",email:"",errorNewPasswordMessage:"",showPassword:!1,rules:{required:r=>r&&!!r||"Câmp Obligatoriu"}}},head(){return{title:"Resetare parolÄ"}},mounted(){this.email=(this._.provides[u]||this.$route).query.email},methods:{async confirmPasswordReset(){const{valid:r}=await this.$refs.form.validate();if(r){this.isLoading=!0;try{const{$axios:e}=y();await e.post("/api/citizens/reset-password",{token:(this._.provides[u]||this.$route).query.token,email:this.email,password:this.newPassword,password_confirmation:this.newPassword}),await this.$auth.loginWith("citizen",{data:{email:this.email,password:this.newPassword},redirect:!1}),await this.$router.push("/")}catch(e){this.errorNewPasswordMessage=e.response?.data?.errors?.password?.[0]||""}this.isLoading=!1}},resetErrors(){this.errorNewPasswordMessage=""}}},C=Object.assign($,{setup(r){return(e,s)=>{const w=a("v-card-title"),l=a("v-text-field"),m=a("v-btn"),p=a("v-form"),f=a("v-card-text"),h=a("v-card");return v(),b(h,{class:"pa-2",elevation:"10",light:""},{default:t(()=>[o(w,{class:"justify-center display-1 mb-2"},{default:t(()=>[d(n(e.$t("reset.title")),1)]),_:1}),g("div",_,n(e.$t("reset.status")),1),o(f,null,{default:t(()=>[o(p,{ref:"form","lazy-validation":"",onSubmit:c(e.confirmPasswordReset,["prevent"])},{default:t(()=>[o(l,{"model-value":e.email,"onUpdate:modelValue":s[0]||(s[0]=i=>e.email=i),rules:[e.rules.required],label:e.$t("fields.email"),variant:"outlined","validate-on-blur":!1,class:"mt-4",disabled:""},null,8,["model-value","rules","label"]),o(l,{"model-value":e.newPassword,"onUpdate:modelValue":s[1]||(s[1]=i=>e.newPassword=i),"append-inner-icon":e.showPassword?"mdi-eye":"mdi-eye-off",rules:[e.rules.required],type:e.showPassword?"text":"password","error-messages":e.errorNewPasswordMessage,label:e.$t("fields.new_password"),"validate-on-blur":!1,variant:"outlined",onChange:e.resetErrors,onKeyup:P(e.confirmPasswordReset,["enter"]),"onClick:appendInner":s[2]||(s[2]=i=>e.showPassword=!e.showPassword)},null,8,["model-value","append-inner-icon","rules","type","error-messages","label","onChange","onKeyup"]),o(m,{loading:e.isLoading,disabled:e.isLoading,block:"",depressed:"",height:"56",size:"large",color:"primary",onClick:e.confirmPasswordReset},{default:t(()=>[d(n(e.$t("reset.button")),1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["onSubmit"])]),_:1})]),_:1})}}});
1export{C 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.