1import{r as p,o as h,c as w,a as s,t as a,d as c,w as n,v as d,f as u}from"./vue-router-Cc0Ijf1R.js";import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";const f={data(){return{password:"",passwordConfirmation:"",status:"",showPassword:!1}},mounted(){this.addTitleAndDescription(this.$t("newPassword"),"")},methods:{resetPassword(){if(!this.status){if(this.password.length<8){Snackbar.show(this.$t("passwordMinLength"));return}if(this.password!==this.passwordConfirmation){Snackbar.show(this.$t("passwordsDoNotMatch"));return}this.status="processing",Snackbar.show(this.$t("processing"),0),axios.patch("/update-password",{password:this.password,password_confirmation:this.passwordConfirmation}).then(()=>{this.$root.auth_user.profile.needs_password_reset=!1,Snackbar.show(this.$t("passwordSuccessfullyReset")),this.$root.auth_user.profile.timezone==="UTC"||!this.$root.auth_user.profile.timezone?this.$router.push({name:"select-timezone",query:{welcome:this.$route.query.welcome}}):this.$route.query.welcome?this.$router.push(this.$path("attribution-survey")):this.$router.push(this.$path("upcoming"))}).catch(t=>Snackbar.show(this.getErrorMessage(t))).finally(()=>this.status="")}},togglePasswordVisibility(){this.showPassword=!this.showPassword;const t=document.getElementById("password");t.type=this.showPassword?"text":"password"}}},_={class:"p-4 border-bottom"},b={class:"h3"},y={class:"p-4 border-bottom"},g={class:"mb-3"},v={class:"d-flex"},P={class:"flex-grow-1 me-2"},$=["placeholder"],k={class:"mb-3"},C={class:"d-flex"},S=["placeholder"],V={type:"submit",class:"btn btn-sm btn-primary"};function M(t,o,q,x,r,i){const l=p("vue-feather");return h(),w("div",null,[s("div",_,[s("h1",b,a(t.$route.query.welcome?t.$t("forcePasswordResetWelcome"):t.$t("newPassword")),1)]),s("div",y,[s("form",{onSubmit:o[3]||(o[3]=c((...e)=>i.resetPassword&&i.resetPassword(...e),["prevent"]))},[s("div",g,[s("div",v,[s("div",P,[n(s("input",{type:"password",class:"form-control","onUpdate:modelValue":o[0]||(o[0]=e=>r.password=e),id:"password",placeholder:t.$t("password")},null,8,$),[[d,r.password]])]),s("button",{type:"button",class:"btn btn-secondary d-flex align-items-center",onClick:o[1]||(o[1]=(...e)=>i.togglePasswordVisibility&&i.togglePasswordVisibility(...e))},[u(l,{type:r.showPassword?"eye-off":"eye",size:"1.3rem"},null,8,["type"])])])]),s("div",k,[s("div",C,[n(s("input",{type:"password",class:"form-control","onUpdate:modelValue":o[2]||(o[2]=e=>r.passwordConfirmation=e),id:"password_confirmation",placeholder:t.$t("confirmPassword")},null,8,S),[[d,r.passwordConfirmation]])])]),s("button",V,a(t.$t("submit")),1)],32)])])}const D=m(f,[["render",M]]);export{D 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.