2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
|
|
"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[7405],{32794(e,t,r){r.r(t),r.d(t,{AuthCode:()=>v,AuthPassword:()=>A,AuthRegister:()=>P});var n=r(84051),i=r(13439),s=r(96454),a=r(87894),o=r(26072),u=r(39351),c=r(18276),l=r(31481),d=r(44029),p=r(43874),m=r(18104),h=r(20021);const g=(0,n.ph)(({code:e,codeLength:t,trackingDirection:r,isTracking:i,isBig:s})=>{const[a,o]=(0,n.J0)(!1),{isMobile:u}=(0,p.Ay)(),c=165/t,g=u?l.UyP:l.H6l,f=(0,n.hb)(()=>o(!0),[]);return(0,h.FD)("div",{id:"monkey",className:s?"big":"",children:[!a&&(0,h.Y)("div",{className:"monkey-preview"}),(0,h.Y)(m.A,{size:s?l.r2x:g,className:i?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!i,onLoad:f}),(0,h.Y)(m.A,{size:s?l.r2x:g,className:i?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:i?function(){const n=e&&e.length>1||r<0?15+c*(e.length-1):0,i=e.length===t?180:15+c*e.length;return r<1?[i,n]:[n,i]}():void 0,speed:2,noLoop:!0})]})});var f=r(40664),y=r(52745);const v=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{setAuthCode:t,returnToAuthPhoneNumber:r,clearAuthErrorKey:a}=(0,i.ko)(),{phoneNumber:l,isCodeViaApp:d,isLoading:p,errorKey:m}=e,v=(0,u.A)(),b=(0,n.li)(),[I,A]=(0,n.J0)(""),[w,S]=(0,n.J0)(!1),[P,C]=(0,n.J0)(1);(0,n.vJ)(()=>{s.TF||b.current.focus()},[]),(0,o.A)({isActive:!0,onBack:r});const T=(0,n.hb)(e=>{m&&a();const{currentTarget:r}=e;r.value=r.value.replace(/[^\d]+/,"").substr(0,5),r.value!==I&&(A(r.value),w?r.value.length||S(!1):S(!0),I&&I.length>r.value.length?C(-1):C(1),5===r.value.length&&t({code:r.value}))},[m,I,w]);return(0,h.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(g,{code:I,codeLength:5,isTracking:w,trackingDirection:P}),(0,h.FD)("h1",{children:[l,(0,h.Y)("div",{className:"auth-number-edit div-button",onClick:function(){r()},role:"button",tabIndex:0,title:v("WrongNumber"),"aria-label":v("WrongNumber"),children:(0,h.Y)(c.A,{name:"edit"})})]}),(0,h.Y)("p",{className:"note",children:v(d?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,h.Y)(f.A,{ref:b,id:"sign-in-code",label:v("Code"),onInput:T,value:I,error:m&&v.withRegular(m),autoComplete:"off",inputMode:"numeric"}),p&&(0,h.Y)(y.A,{})]})})}));var b=r(15535),I=r(3178);const A=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{setAuthPassword:t,clearAuthErrorKey:r}=(0,i.ko)(),{isLoading:s,errorKey:a,hint:o}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),p=(0,n.hb)(e=>{d(e)},[]),m=(0,n.hb)(e=>{t({password:e})},[t]);return(0,h.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(I.A,{isPasswordVisible:l}),(0,h.Y)("h1",{children:c("LoginHeaderPassword")}),(0,h.Y)("p",{className:"note",children:c("LoginEnterPasswordDescription")}),(0,h.Y)(b.A,{onClearError:r,error:a&&c.withRegular(a),hint:o,isLoading:s,isPasswordVisible:l,onChangePasswordVisibility:p,onSubmit:m})]})})}));var w=r(43434),S=r(64493);const P=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{signUp:t,clearAuthErrorKey:r,uploadProfilePhoto:s}=(0,i.ko)(),{isLoading:a,errorKey:o}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),[p,m]=(0,n.J0)(),[g,y]=(0,n.J0)(""),[v,b]=(0,n.J0)(""),I=(0,n.hb)(e=>{o&&r();const{target:t}=e;y(t.value),d(t.value.length>0)},[o]),A=(0,n.hb)(e=>{const{target:t}=e;b(t.value)},[]);return(0,h.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,h.Y)("div",{className:"auth-form",children:(0,h.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),t({firstName:g,lastName:v}),p&&s({file:p})},children:[(0,h.Y)(w.A,{onChange:m}),(0,h.Y)("h2",{children:c("YourName")}),(0,h.Y)("p",{className:"note",children:c("LoginRegisterDesc")}),(0,h.Y)(f.A,{id:"registration-first-name",label:c("LoginRegisterFirstNamePlaceholder"),onChange:I,value:g,error:o&&c.withRegular(o),autoComplete:"given-name"}),(0,h.Y)(f.A,{id:"registration-last-name",label:c("LoginRegisterLastNamePlaceholder"),onChange:A,value:v,autoComplete:"family-name"}),l&&(0,h.Y)(S.A,{type:"submit
|
||
|
|
//# sourceMappingURL=7405.5c640f361c3102008bfb.js.map
|