PageSourceSearch

https://svyazsrazy.ru/_nuxt/index.0f6e09de.js

js svyazsrazy.ru collected 2026-10-09 01:29:34 UTC 5,248 bytes, 1 lines download raw bytes

1import{_ as B}from"./nuxt-link.56f64095.js";import E from"./inputmask.esm.5e9a970f.js";import{g as L,r as c,h as Q,i as F,o as C,c as S,b as r,t as u,e as N,d as t,w as d,j as e,k as X,l as Z,C as D,m as K,n as O,s as q,_ as x,q as ee,v as oe,x as ne,y as te,a as P,p as se,f as le}from"./entry.75abe3db.js";import A from"./inputgroup.esm.9baceaad.js";import{_ as M}from"./index.abda7c38.js";import{g as T}from"./getErrorData.0df4c324.js";import{f as ae}from"./format-phone.984e0733.js";import{_ as R}from"./main-logo.bcb48515.js";import{s as U}from"./floatlabel.esm.0ea4148b.js";import{i as re}from"./validators.2e675077.js";const ie={class:"wrapper"},ue={class:"login-title"},ce={class:"link-privacy-policy"},de={for:"phone"},pe=L({__name:"index",props:{errorLabel:{},loading:{type:Boolean}},emits:["input","onKeyupEnter"],setup(y,{emit:g}){const _=g,s=c(""),f=c(""),{data:b}=Q(D),{t:w}=F(),V=()=>{if(!s.value){f.value=w("requiredField");return}_("input",s.value)};return(o,i)=>{var k;const p=B,v=E,h=q,a=A,$=M;return C(),S("div",ie,[r("div",ue,u(o.$t("login.enterLk")),1),r("div",ce,[N(u(o.$t("privacyPolicy.hintText"))+" ",1),t(p,{to:"/privacy-policy",class:"special-button"},{default:d(()=>[N(u(o.$t("privacyPolicy.hintTextLink")),1)]),_:1})]),t($,{"has-error":!!e(f)||!!o.errorLabel,"error-label":e(f)||o.errorLabel},{default:d(()=>[t(a,{class:"input-group"},{default:d(()=>[t(e(U),null,{default:d(()=>[t(v,{id:"phone",modelValue:e(s),"onUpdate:modelValue":i[0]||(i[0]=I=>K(s)?s.value=I:null),mask:"+7 999 999 9999",placeholder:"+7",unmask:!0,"auto-clear":!1,name:"phone",autocomplete:"off",onKeydown:i[1]||(i[1]=O(I=>_("onKeyupEnter",e(s)),["enter"]))},null,8,["modelValue"]),r("label",de,u(o.$t("input.labelPhone")),1)]),_:1}),t(h,{class:"input-group__button",disabled:!("isValidPhone"in o?o.isValidPhone:e(re))(e(s)),label:o.$t("next"),loading:o.loading,onClick:V},null,8,["disabled","label","loading"])]),_:1})]),_:1},8,["has-error","error-label"]),(k=e(b))!=null&&k.ozonLink?(C(),X(p,{key:0,to:e(b).ozonLink,class:"login-no-account"},{default:d(()=>[N(u(o.$t("login.notHaveАccount")),1)]),_:1},8,["to"])):Z("",!0)])}}});const me=x(pe,[["__scopeId","data-v-0633035a"]]),z=y=>(se("data-v-a8ecbcc6"),y=y(),le(),y),_e={class:"login-container"},fe={key:0,class:"login-wrapper"},ve=z(()=>r("img",{class:"login-icon",src:R,alt:"logo"},null,-1)),he={key:1,class:"login-wrapper"},ge=z(()=>r("img",{class:"login-icon",src:R,alt:"logo"},null,-1)),be={class:"login-title login-title_sms"},ke={class:"login-not-have"},ye={class:"login-not-have-number"},$e={for:"smsCode"},Ie=L({__name:"index",setup(y){const{t:g}=F(),_=c(null),s=c(60);let f=null;const b=()=>{_.value=null,f!==null&&(clearInterval(f),f=null),i.value=!1},w=()=>{b(),s.value=60,_.value=` (${s.value}с)`,i.value=!0,f=setInterval(()=>{s.value>0?(s.value-=1,_.value=`(${s.value}с)`):(b(),_.value="",i.value=!1)},1e3)};ee(()=>{b()});const V=oe(),o=c(!1),i=c(!1),p=c(""),v=c(""),h=c(!1),a=ne({phone:"",sms:""}),$=c(!1),k=async n=>{if(!i.value){p.value=n,h.value=!0,$.value=!1,a.sms="",v.value="";try{await $fetch(P.auth.otp,{method:"POST",body:{phone:p.value}}),w(),o.value=!0}catch(l){const m=T(l);a.phone=g("login.error.number.incorrectNumber"),(m==null?void 0:m.statusCode)===404&&(a.phone=g("login.error.number.notFoundPhone")),(m==null?void 0:m.statusCode)===429&&(a.phone=g("login.error.number.tooManyRequest"))}finally{h.value=!1}}},I=async()=>{try{h.value=!0;const n=await $fetch(P.auth.login,{method:"POST",body:{phone:p.value,password:v.value}});localStorage.setItem("token",n.accessToken),localStorage.setItem("refreshToken",n.refreshToken),localStorage.setItem("isAuth","true"),V.push("/lk")}catch(n){const l=T(n);a.sms=g("login.error.sms.incorrectRequest"),(l==null?void 0:l.statusCode)===404&&(a.sms=g("login.error.sms.notFound")),(l==null?void 0:l.statusCode)===429&&($.value=!0),v.value=""}finally{h.value=!1}},G=()=>{o.value=!1,i.value=!1,p.value="",a.sms=""};return(n,l)=>{const m=B,W=E,j=q,H=A,Y=M;return C(),S("section",_e,[e(o)?(C(),S("div",he,[t(m,{to:"/"},{default:d(()=>[ge]),_:1}),r("div",null,[r("div",be,u(n.$t("login.numberForSms")),1),r("div",ke,[r("span",ye,u(`${("formatPhone"in n?n.formatPhone:e(ae))(e(p),!0)}`),1),r("span",{class:"login-not-have-link",onClick:G},u(n.$t("login.changeNumber")),1)])]),t(Y,{"has-error":!!e(a).sms,"error-label":e(a).sms},{default:d(()=>[t(H,{class:"input-group"},{default:d(()=>[t(e(U),null,{default:d(()=>[t(W,{id:"smsCode",modelValue:e(v),"onUpdate:modelValue":l[0]||(l[0]=J=>K(v)?v.value=J:null),unmask:!0,"auto-clear":!1,autocomplete:"off",mask:"9 9 9 9 9 9",placeholder:"_ _ _ _ _ _",onKeydown:O(I,["enter"])},null,8,["modelValue"]),r("label",$e,u(n.$t("login.smsCode")),1)]),_:1}),t(j,{disabled:e($),label:n.$t("login.enter"),loading:e(h),onClick:I},null,8,["disabled","label","loading"])]),_:1})]),_:1},8,["has-error","error-label"]),r("div",{class:te(["login-timer",{"timer-disabled":e(i)}]),onClick:l[1]||(l[1]=()=>
1k(e(p)))},u(n.$t("login.sendAgain"))+" "+u(e(_)),3)])):(C(),S("div",fe,[t(m,{to:"/"},{default:d(()=>[ve]),_:1}),t(me,{"error-label":e(a).phone,loading:e(h),onInput:k,onOnKeyupEnter:k},null,8,["error-label","loading"])]))])}}});const Fe=x(Ie,[["__scopeId","data-v-a8ecbcc6"]]);export{Fe 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.