1import{w as _}from"./runtime-dom.esm-bundler.hR_rE5am.js";import{K as y,a3 as x,J as C,L as g,O as m,P as u,S as n,Q as l,W as e,k as V,R as b,U as E,_ as L,F as M}from"./runtime-core.esm-bundler.B6keTsmA.js";import{g as N}from"./recaptcha.B_UqH8TD.js";import{t as o}from"./translate.C4wggBpu.js";import{_ as B}from"./InputField.vue_vue_type_script_setup_true_lang.DzLGia64.js";import{m as f,f as F}from"./useProfileApi.BbSHL9GU.js";import{u as I}from"./useAuthApi.CbmEB9Gy.js";import{p as P}from"./processErrorResponse.DeiosO_S.js";import"./_commonjsHelpers.Cpj98o6Y.js";import"./convertToUrlSearchParams.D6QR1eDk.js";import"./index.D_5av9BF.js";function R(){const i=y(0);let d=null;const s=()=>{d!==null&&(clearInterval(d),d=null)},t=c=>{s(),i.value=c,d=setInterval(()=>{i.value>0?i.value--:s()},1e3)};return x(s),{secondsLeft:i,start:t,stop:s}}const T={class:"m-header"},U={class:"c-title text-2xl mb-5"},A={class:"opacity-60"},$=["aria-label"],j={class:"m-body"},q={key:0,class:"grid gap-y-4"},z={key:0,disabled:"",class:"f-btn f-btn--primary w-full rounded-full"},D=["disabled"],J={key:0,class:"text-center mt-4"},se=C({__name:"ForgotPasswordModal",props:{email:{default:""}},setup(i){const s=y(i.email||null),t=g({isSending:!1,isSent:!1,description:o("ÐведÑÑÑ ÐµÐ»ÐµÐºÑÑÐ¾Ð½Ð½Ñ Ð¿Ð¾ÑÑÑ, ÑÐºÑ Ð²Ð¸ вказали пÑд ÑÐ°Ñ ÑеÑÑÑÑаÑÑÑ â надÑÑлемо поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð·Ð¼Ñни паÑолÑ")}),c=g({}),{forgotPassword:S}=I(),{secondsLeft:p,start:h}=R(),w=()=>{f.navigate("LoginModal",{email:s.value??""})},k=async()=>{if(t.isSending||!s.value)return;t.isSending=!0;const v=await N("forgot_password");try{await S({recaptcha:v,email:s.value}),t.isSent=!0,h(60),t.description=[o("Ðи надÑÑлали лиÑÑ Ð½Ð° ваÑÑ Ð¿Ð¾ÑÑÑ Ð· поÑиланнÑм Ð´Ð»Ñ Ð²ÑÐ´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°ÑолÑ")+".",o("ÐеÑевÑÑÑе ÑÐ²Ð¾Ñ Ð¿Ð¾ÑÑÑ Ñ Ð¿ÐµÑейдÑÑÑ Ð·Ð° поÑиланнÑм, Ñоб ÑÑвоÑиÑи новий паÑолÑ")+"."].join(" ")}catch(a){const r=await P(a);r&&r.errors&&F(c,r.errors)}finally{t.isSending=!1}};return(v,a)=>(m(),u(M,null,[n("div",T,[n("hgroup",null,[n("h2",U,l(e(o)("ÐÑÐ´Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°ÑолÑ")),1),n("p",A,l(t.description),1)]),n("button",{type:"button",class:"m-close","aria-label":e(o)("ÐакÑиÑи модалÑне вÑкно"),onClick:a[0]||(a[0]=(...r)=>e(f).close&&e(f).close(...r))},a[3]||(a[3]=[n("i",{class:"i-icon i-icon-close"},null,-1)]),8,$)]),n("div",j,[n("form",{onSubmit:_(k,["prevent"])}
1,[t.isSent?b("",!0):(m(),u("div",q,[V(B,{modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=r=>s.value=r),name:"email",placeholder:"Email",error:c.email,type:"email",required:!0,onInput:a[2]||(a[2]=r=>delete c.email)},null,8,["modelValue","error"])])),n("div",{class:E([e(p)?"":"mt-6"])},[e(p)?(m(),u("button",z,l(e(o)("ÐадÑÑлаÑи повÑоÑно"))+" ("+l(e(p))+" "+l(e(o)("{seconds-left} Ñ").replace("{seconds-left}",""))+" ) ",1)):(m(),u("button",{key:1,type:"submit",class:"f-btn f-btn--primary w-full rounded-full",disabled:t.isSending||!s.value},l(t.isSending?e(o)("ÐадÑиланнÑ")+"â¦":e(o)("ÐадÑÑлаÑи")),9,D))],2)],32),t.isSent?b("",!0):(m(),u("div",J,[L(l(e(o)("Ðгадали паÑолÑ?"))+" ",1),n("a",{href:"#login",rel:"nofollow",class:"text-primary underline",onClick:_(w,["prevent"])},l(e(o)("ÐовеÑнÑÑиÑÑ Ð´Ð¾ вÑ
одÑ")),1)]))])],64))}});export{se 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.