2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{101(e,r,o){o.d(r,{A:()=>s});var t=o(84051),n=o(87679),i=o(56863);function s(e){const r=(0,t.li)(),{result:o}=(0,i.A)(()=>{if(!e)return Promise.resolve(void 0);r.current&&URL.revokeObjectURL(r.current);const o=URL.createObjectURL(e);return r.current=o,(0,n.NN)(o)},[e]);return(0,t.vJ)(()=>()=>{r.current&&(URL.revokeObjectURL(r.current),r.current=void 0)},[]),{image:o}}},3178(e,r,o){o.d(r,{A:()=>g});var t=o(84051),n=o(31481),i=o(14957),s=o(14737),a=o(43874),l=o(37661),c=o(18104),d=o(20021);const u=[0,50],h=[0,20],m=[20,0],g=(0,t.ph)(({isPasswordVisible:e,isBig:r})=>{const[o,g]=(0,l.A)(!1),[p,v]=(0,l.A)(!1),{isMobile:b}=(0,a.Ay)(),A=b?n.UyP:n.H6l;(0,s.A)(v,2e3);const f=(0,t.hb)(g,[g]);return(0,d.FD)("div",{id:"monkey",className:r?"big":"",children:[!o&&(0,d.Y)("div",{className:"monkey-preview"}),(0,d.Y)(c.A,{size:r?n.r2x:A,className:p?"hidden":"shown",tgsUrl:i.w.MonkeyClose,playSegment:u,noLoop:!0,onLoad:f}),(0,d.Y)(c.A,{size:r?n.r2x:A,className:p?"shown":"hidden",tgsUrl:i.w.MonkeyPeek,playSegment:e?h:m,noLoop:!0})]})})},14737(e,r,o){o.d(r,{A:()=>i});var t=o(84051),n=o(17712);const i=function(e,r){const o=(0,n.A)(e);(0,t.vJ)(()=>{if("number"!=typeof r)return;const e=setTimeout(()=>o(),r);return()=>clearTimeout(e)},[r])}},15535(e,r,o){o.d(r,{A:()=>v});var t=o(84051),n=o(31481),i=o(66644),s=o(63495),a=o(96454),l=o(87357),c=o(83868),d=o(14737),u=o(43874),h=o(39351),m=o(64493),g=o(18276),p=o(20021);const v=(0,t.ph)(({isLoading:e=!1,isPasswordVisible:r,error:o,hint:v,placeholder:b,submitLabel:A,description:f,shouldShowSubmit:w,shouldResetValue:y,shouldDisablePasswordManager:N=!1,noRipple:Y=!1,onClearError:L,onChangePasswordVisibility:k,onInputChange:C,onSubmit:P})=>{const J=(0,t.li)(),R=(0,h.A)(),{isMobile:U}=(0,u.Ay)(),[D,F]=(0,t.J0)(""),[S,x]=(0,t.J0)(!1),T=U?550:400;return(0,t.vJ)(()=>{y&&F("")},[y]),(0,d.A)(()=>{a.TF||J.current.focus()},T),(0,t.vJ)(()=>{o&&(0,i.RK)(()=>{J.current.focus(),J.current.select()})},[o]),(0,p.FD)("form",{action:"",onSubmit:P?function(r){r.preventDefault(),e||S&&P(D)}:c.A,autoComplete:"off",children:[(0,p.FD)("div",{className:(0,l.A)("input-group password-input",D&&"touched",o&&"error"),dir:R.isRtl?"rtl":void 0,children:[N&&(0,p.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,p.Y)("input",{ref:J,className:"form-control",type:r?"text":"password",id:"sign-in-password",value:D||"",autoComplete:N?"one-time-code":"current-password",spellCheck:!s.Vq&&void 0,onChange:function(e){o&&L();const{target:r}=e;F(r.value),x(r.value.length>=n.AGC),C&&C(r.value)},maxLength:256,dir:"auto"}),(0,p.Y)("label",{children:o||v||b||R("PasswordFormPlaceholder")}),(0,p.Y)("div",{className:"div-button toggle-password",onClick:function(){k(!r)},role:"button",tabIndex:0,title:R("AriaPasswordToggle"),"aria-label":R("AriaPasswordToggle"),children:(0,p.Y)(g.A,{name:r?"eye":"eye-crossed"})})]}),f&&(0,p.Y)("p",{className:"description",children:f}),P&&(S||w)&&(0,p.Y)(m.A,{type:"submit",ripple:!Y,isLoading:e,disabled:!S,children:A||R("PasswordFormSubmit")})]})})},15640(e,r,o){function t(e){return"touches"in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}o.d(r,{A:()=>t})},32794(e,r,o){o.r(r),o.d(r,{AuthCode:()=>A,AuthPassword:()=>y,AuthRegister:()=>L});var t=o(84051),n=o(13439),i=o(96454),s=o(87894),a=o(26072),l=o(39351),c=o(18276),d=o(31481),u=o(14957),h=o(43874),m=o(18104),g=o(20021);const p=(0,t.ph)(({code:e,codeLength:r,trackingDirection:o,isTracking:n,isBig:i})=>{const[s,a]=(0,t.J0)(!1),{isMobile:l}=(0,h.Ay)(),c=165/r,p=l?d.UyP:d.H6l,v=(0,t.hb)(()=>a(!0),[]);return(0,g.FD)("div",{id:"monkey",className:i?"big":"",children:[!s&&(0,g.Y)("div",{className:"monkey-preview"}),(0,g.Y)(m.A,{size:i?d.r2x:p,className:n?"hidden":void 0,tgsUrl:u.w.MonkeyIdle,play:!n,onLoad:v}),(0,g.Y)(m.A,{size:i?d.r2x:p,className:n?"shown":"hidden",tgsUrl:u.w.MonkeyTracking,playSegment:n?function(){const t=e&&e.length>1||o<0?15+c*(e.length-1):0,n=e.length===r?180:15+c*e.length;return o<1?[n,t]:[t,n]}():void 0,speed:2,noLoop:!0})]})});var v=o(40664),b=o(52745);const A=(0,t.ph)((0,n.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{setAuthCode:r,returnToAuthPhoneNumber:o,clearAuthErrorKey:s}=(0,n.ko)(),{phoneNumber:d,isCodeViaApp:u,isLoading:h,errorKey:m}=e,A=(0,l.A)(),f=(0,t.li)(),[w,y]=(0,t.J0)(""),[N,Y]=(0,t.J0)(!1),[L,k]=(0,t.J0)(1);(0,t.vJ)(()=>{i.TF||f.current.focus()},[]),(0,a.A)({isActive:!0,onBack:o});const C=(0,t.hb)(e=>{m&&s();const{currentTarget:o}=e;o.value=o.value.replace(/[^\d]+/,"").substr(0,5),o.value!==w&&(y(o.value),N?o.value.length||Y(!1):Y(!0),w&&w.length>o.value.length?k(-1):k(1),5===o.value.length&&r({code:o.value}))},[m,w,N]);return(0,g.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,g.FD)("div",{className:"auth-form",children:[(0,g.Y)(p,{code:w,codeLength:5,isTracking:N,trackingDirection:L}),(0,g.FD)("h1",{children:[d,(0,g.Y)("div",{className:"auth-number-edit div-button",onClick:function(){o()},role:"button",tabIndex:0,title:A("WrongNumber"),"aria-label":A("WrongNumber"),children:(0,g.Y)(c.A,{name:"edit"})})]}),(0,g.Y)("p",{className:"note",children:A(u?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,g.Y)(v.A,{ref:f,id:"sign-in-code",label:A("Code"),onInput:C,value:w,error:m&&A.withRegular(m),autoComplete:"off",inputMode:"numeric"}),h&&(0,g.Y)(b.A,{})]})})}));var f=o(15535),w=o(3178);const y=(0,t.ph)((0,n.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{setAuthPassword:r,clearAuthErrorKey:o}=(0,n.ko)(),{isLoading:i,errorKey:s,hint:a}=e,c=(0,l.A)(),[d,u]=(0,t.J0)(!1),h=(0,t.hb)(e=>{u(e)},[]),m=(0,t.hb)(e=>{r({password:e})},[r]);return(0,g.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,g.FD)("div",{className:"auth-form",children:[(0,g.Y)(w.A,{isPasswordVisible:d}),(0,g.Y)("h1",{children:c("LoginHeaderPassword")}),(0,g.Y)("p",{className:"note",children:c("LoginEnterPasswordDescription")}),(0,g.Y)(f.A,{onClearError:o,error:s&&c.withRegular(s),hint:a,isLoading:i,isPasswordVisible:d,onChangePasswordVisibility:h,onSubmit:m})]})})}));var N=o(43434),Y=o(64493);const L=(0,t.ph)((0,n.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{signUp:r,clearAuthErrorKey:o,uploadProfilePhoto:i}=(0,n.ko)(),{isLoading:s,errorKey:a}=e,c=(0,l.A)(),[d,u]=(0,t.J0)(!1),[h,m]=(0,t.J0)(),[p,b]=(0,t.J0)(""),[A,f]=(0,t.J0)(""),w=(0,t.hb)(e=>{a&&o();const{target:r}=e;b(r.value),u(r.value.length>0)},[a]),y=(0,t.hb)(e=>{const{target:r}=e;f(r.value)},[]);return(0,g.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,g.Y)("div",{className:"auth-form",children:(0,g.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),r({firstName:p,lastName:A}),h&&i({file:h})},children:[(0,g.Y)(N.A,{onChange:m}),(0,g.Y)("h2",{children:c("YourName")}),(0,g.Y)("p",{className:"note",children:c("LoginRegisterDesc")}),(0,g.Y)(v.A,{id:"registration-first-name",label:c("LoginRegisterFirstNamePlaceholder"),onChange:w,value:p,error:a&&c.withRegular(a),autoComplete:"given-name"}),(0,g.Y)(v.A,{id:"registration-last-name",label:c("LoginRegisterLastNamePlaceholder"),onChange:y,value:A,autoComplete:"family-name"}),d&&(0,g.Y)(Y.A,{type:"submit",ripple:!0,isLoading:s,children:c("Next")})]})})})}))}}]);
|
|
//# sourceMappingURL=7405.7682fdedae1198a45de4.js.map
|