2021-08-16 19:54:56 +02:00
|
|
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[133],{1133:(e,t,n)=>{n.r(t),n.d(t,{AuthCode:()=>P,AuthPassword:()=>E,AuthRegister:()=>w});var a=n(4050),r=n(5116),o=n(7361),s=n(782),i=n(2340),l=n(6590),c=n(9107),d=n(7687),u=n(4288),m=n(3716),h=n(7324),p=n(7799);const g=o.wB?m.qp:m.z7,Z=(0,a.X$)((({code:e,codeLength:t,trackingDirection:n,isTracking:r,isBig:o})=>{const[s,i]=(0,a.eJ)(),[l,c]=(0,a.eJ)(),[d,u]=(0,a.eJ)(!1),Z=165/t;(0,a.d4)((()=>{s||(0,h.Z)("MonkeyIdle").then(i)}),[s]),(0,a.d4)((()=>{l||(0,h.Z)("MonkeyTracking").then(c)}),[l]);const P=(0,a.I4)((()=>u(!0)),[]);return a.ZP.createElement("div",{id:"monkey",className:o?"big":""},!d&&a.ZP.createElement("div",{className:"monkey-preview"}),s&&a.ZP.createElement(p.Z,{id:"idleMonkey",size:o?m.K2:g,className:r?"hidden":void 0,animationData:s,play:!r,onLoad:P}),l&&a.ZP.createElement(p.Z,{id:"trackingMonkey",size:o?m.K2:g,className:r?"shown":"hidden",animationData:l,playSegment:r?function(){const a=e&&e.length>1||n<0?15+Z*(e.length-1):0,r=e.length===t?180:15+Z*e.length;return n<1?[r,a]:[a,r]}():void 0,speed:2,noLoop:!0}))})),P=(0,a.X$)((0,r.c$)((e=>(0,s.ei)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"])),((e,t)=>(0,s.ei)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"])))((({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:n,authError:r,setAuthCode:s,returnToAuthPhoneNumber:m,clearAuthError:h})=>{const p=(0,c.Z)(),g=(0,a.sO)(null),[P,v]=(0,a.eJ)(""),[f,E]=(0,a.eJ)(!1),[b,y]=(0,a.eJ)(1);(0,a.d4)((()=>{o.$b||g.current.focus()}),[]),(0,l.ZP)(!0,m);const w=(0,a.I4)((e=>{r&&h();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==P&&(v(t.value),f?t.value.length||E(!1):E(!0),P&&P.length>t.value.length?y(-1):y(1),5===t.value.length&&s({code:t.value}))}),[r,h,P,f,s]);return a.ZP.createElement("div",{id:"auth-code-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement(Z,{code:P,codeLength:5,isTracking:f,trackingDirection:b}),a.ZP.createElement("h2",null,e,a.ZP.createElement("div",{className:"auth-number-edit",onClick:m,role:"button",tabIndex:0,title:p("WrongNumber")},a.ZP.createElement("i",{className:"icon-edit"}))),a.ZP.createElement("p",{className:"note"},(0,i.Z)(p(t?"SentAppCode":"Login.JustSentSms"),["simple_markdown"])),a.ZP.createElement(d.Z,{ref:g,id:"sign-in-code",label:p("Code"),onInput:w,value:P,error:r&&p(r),autoComplete:"one-time-code",inputMode:"numeric"}),n&&a.ZP.createElement(u.Z,null)))})));var v=n(3490),f=n(9364);const E=(0,a.X$)((0,r.c$)((e=>(0,s.ei)(e,["authIsLoading","authError","authHint"])),((e,t)=>(0,s.ei)(t,["setAuthPassword","clearAuthError"])))((({authIsLoading:e,authError:t,authHint:n,setAuthPassword:r,clearAuthError:o})=>{const s=(0,c.Z)(),[i,l]=(0,a.eJ)(!1),d=(0,a.I4)((e=>{l(e)}),[]),u=(0,a.I4)((e=>{r({password:e})}),[r]);return a.ZP.createElement("div",{id:"auth-password-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement(v.Z,{isPasswordVisible:i}),a.ZP.createElement("h2",null,s("Login.Header.Password")),a.ZP.createElement("p",{className:"note"},s("Login.EnterPasswordDescription")),a.ZP.createElement(f.Z,{clearError:o,error:t&&s(t),hint:n,isLoading:e,isPasswordVisible:i,onChangePasswordVisibility:d,onSubmit:u})))})));var b=n(231),y=n(710);const w=(0,a.X$)((0,r.c$)((e=>(0,s.ei)(e,["authIsLoading","authError"])),((e,t)=>(0,s.ei)(t,["signUp","clearAuthError","uploadProfilePhoto"])))((({authIsLoading:e,authError:t,signUp:n,clearAuthError:r,uploadProfilePhoto:o})=>{const s=(0,c.Z)(),[i,l]=(0,a.eJ)(!1),[u,m]=(0,a.eJ)(),[h,p]=(0,a.eJ)(""),[g,Z]=(0,a.eJ)("");return a.ZP.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),n({firstName:h,lastName:g}),u&&o({file:u})}},a.ZP.createElement(y.Z,{onChange:m}),a.ZP.createElement("h2",null,s("YourName")),a.ZP.createElement("p",{className:"note"},s("Login.Register.D
|