1import{_ as C}from"./Input.B0zO46lR.js";import{d as S,h as M,g as N}from"./entry.2ehg4ZD6.js";import{d as P,a as l,C as R,G as w,L as v,_ as s,Q as h,u as a,q as b,a8 as k,M as x,V as B,S as q}from"./swiper-vue.iPC35nDh.js";const D={class:"reset-page"},E={class:"c-form-row c-form-row--inputs"},U={class:"c-form-col c-form-col--fullwidth"},j={class:"c-form-field"},z={class:"c-form-col c-form-col--fullwidth"},A={class:"c-form-field"},G={key:0,class:"c-form-col c-form-col--fullwidth c-form-col--error"},I={class:"c-form-field-error-message"},L={class:"c-form-col c-form-col--fullwidth"},Q={class:"c-form-field c-form-field--action"},F=["disabled"],T=P({__name:"reset",setup(H){var f;const{resetPassword:g}=S(),u=M(),m=l(((f=N().query)==null?void 0:f.code)||""),t=l(""),n=l("");R(()=>{m.value||u.push("/")});const d=l(""),c=l(!1),V=async p=>{var e,r,o,_;d.value="",c.value=!0;try{await g({code:m.value,password:t.value,passwordConfirmation:n.value}),u.push("/")}catch(i){p.preventDefault(),d.value=(((r=(e=i.error.details)==null?void 0:e.errors)==null?void 0:r.length)>0?(_=(o=i.error.details)==null?void 0:o.errors)==null?void 0:_.map(y=>y.message):[i.error.message]).join(` 2`),c.value=!1}};return(p,e)=>{const r=C;return w(),v("div",D,[s("form",{class:"c-form",onSubmit:q(V,["prevent"])},[s("div",E,[s("div",U,[s("div",j,[h(r,{modelValue:a(t),"onUpdate:modelValue":e[0]||(e[0]=o=>b(t)?t.value=o:null),name:"new-password",type:"password",autocomplete:"new-password",label:"Password",placeholder:"New password",class:"password"},null,8,["modelValue"])])]),s("div",z,[s("div",A,[h(r,{modelValue:a(n),"onUpdate:modelValue":e[1]||(e[1]=o=>b(n)?n.value=o:null),name:"confirm-new-password",type:"password",autocomplete:"new-password",label:"Confirm Password",placeholder:"Confirm new password",class:"confirm-new-password"},null,8,["modelValue"])])]),a(d)?(w(),v("div",G,[s("div",I,[s("span",null,k(a(d)),1)])])):x("",!0)]),s("div",L,[s("div",Q,[s("input",{type:"submit",value:"Reset Password",class:B(["el-button el-button--is-gradient",{"is-disabled":a(c)}]),disabled:a(c)},null,10,F)])])],32)])}}});export{T 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.