1import{u as M,a as U,b as I}from"./useValidationTranslation.CKRRkcpZ.js";import{L as T,q as N,d as O,S as D,U as j,v as A,w as z,n as $,y as q}from"./entry.CcJPRZll.js";import{d as S,s as G,r as H,b as g,e as h,t as b,A as w,u as e,m as n,x as W,p as J,G as K,S as Q,z as X,l as Y,j as Z,T as ee}from"./vendor-vue.CbeIOTrE.js";import{r as oe}from"./redirectToPage.WfMau5MA.js";import{u as se}from"./usePageSeoMeta.CrpLujaI.js";import"./i18n.AiQ4g02z.js";const ae={class:"flex items-center justify-center py-5"},te={class:"col-span-full"},re={key:0,class:"col-span-full text-center text-error text-[length:var(--s-font-p)]"},ne="error",le="Invalid reset code",ie=S({__name:"ChangePasswordForm",setup(C){const r=(o,s,i,f)=>({vertical:i,lang:f,password:o.password,code:s}),c=async o=>await z("getChangePassword",o,{useFallback:!1}),p=()=>{y("error",a.value?.code_error??"",5e3)},l=()=>{y("error",a.value?.api_error??"",5e3)},v=o=>!!o.youre_a_bot,u=o=>ne in o&&!!o.error,m=o=>o.error.message===le,E=()=>{oe("thank-you","changePassword")},F=async()=>{await $("/")},k=async()=>{_.value=!0;try{if(v(t)){await F();return}const o=r(t,R,A.strapiService,B.value),s=await c(o);if(!s){l();return}if(u(s)){m(s)?p():l();return}E()}catch{l()}finally{_.value=!1}},{showAlert:y}=T(),{getLanguage:B}=G(N()),R=O().query.code,{translateData:a}=D("change-password"),{formData:t,invalidFields:x,getFieldValidation:L,markFieldAsTouched:P}=M({password:"",confirm_password:"",youre_a_bot:""}),{getValidationWithTranslation:V}=U(L),_=H(!1);return X("isButtonLoading",_),(o,s)=>{const i=I,f=j;return g(),h("section",ae,[b("form",{class:"w-[35%] max-lg:w-auto bg-[var(--c-black)] rounded-[var(--s-border-radius-card)] p-[3.625rem] grid grid-cols-5 gap-y-8 gap-x-4",onSubmit:Q(k,["prevent"])},[b("span",te,w(e(a)?.descriptive_text),1),n(i,{class:"col-span-full","auto-complete":"off",validation:e(V)("password"),"input-id":"password","on-field-touched":e(P),label:e(a)?.password_text??"",type:"password",modelValue:e(t).password,"onUpdate:modelValue":s[0]||(s[0]=d=>e(t).password=d),modelModifiers:{trim:!0}},null,8,["validation","on-field-touched","label","modelValue"]),n(i,{class:"col-span-full","auto-complete":"off",validation:e(V)("confirm_password"),"input-id":"confirm_password","on-field-touched":e(P),label:e(a)?.confirm_password_text??"",type:"password",modelValue:e(t).confirm_password,"onUpdate:modelValue":s[1]||(s[1]=d=>e(t).confirm_password=d),modelModifiers:{trim:!0}},null,8,["validation","on-field-touched","label","modelValue"]),n(i,{class:"hidden","input-id":"otherPassword",label:e(a)?.youre_a_bot_text??"",modelValue:e(t).youre_a_bot,"onUpdate:modelValue":s[2]||(s[2]=d=>e(t).youre_a_bot=d),modelModifiers:{trim:!0}},null,8,["label","modelValue"]),e(x)?(g(),h("p",re,w(e(a)?.general_error),1)):W("",!0),n(f,{class:"col-span-full bg-[var(--c-primary)] text-[var(--c-static-black)]",disabled:e(x),type:"'submit'",accesskey:"s"},{default:J(()=>[K(w(e(a)?.button_text),1)]),_:1},8,["disabled"])],32)])}}}),de=Object.assign(ie,{__name:"AuthChangePasswordForm"}),ce={class:"relative"},he=S({__name:"changePassword",async setup(C){let r,c;const{resetAlert:p}=T(),{data:l}=([r,c]=Y(()=>q("change-password")),r=await r,c(),r);return Z(()=>{p()}),se({getMeta:()=>({title:l?.seo_title??A.seo.defaultTitle,robots:"noindex, nofollow"})}),(v,u)=>{const m=de;return g(),h("section",ce,[n(m),n(ee,{class:"fixed bottom-0 z-10",name:"alert"}),u[0]||(u[0]=b("section",{class:"fixed inset-0 w-full h-full -z-10 bg-[var(--c-black)]"},null,-1))])}}});export{he 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.