2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{101:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051),a=r(87679),s=r(56863);function o(e){const t=(0,n.li)(),{result:r}=(0,s.A)(()=>{if(!e)return Promise.resolve(void 0);t.current&&URL.revokeObjectURL(t.current);const r=URL.createObjectURL(e);return t.current=r,(0,a.NN)(r)},[e]);return(0,n.vJ)(()=>()=>{t.current&&(URL.revokeObjectURL(t.current),t.current=void 0)},[]),{image:r}}},3178:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(84051),a=r(31481),s=r(58443),o=r(14737),i=r(43874),u=r(37661),c=r(18104),l=r(20021);const d=[0,50],p=[0,20],h=[20,0],m=(0,n.ph)(e=>{let{isPasswordVisible:t,isBig:r}=e;const[m,g]=(0,u.A)(!1),[y,f]=(0,u.A)(!1),{isMobile:v}=(0,i.Ay)(),b=v?a.UyP:a.H6l;(0,o.A)(f,2e3);const I=(0,n.hb)(g,[g]);return(0,l.FD)("div",{id:"monkey",className:r?"big":"",children:[!m&&(0,l.Y)("div",{className:"monkey-preview"}),(0,l.Y)(c.A,{size:r?a.r2x:b,className:y?"hidden":"shown",tgsUrl:s.w.MonkeyClose,playSegment:d,noLoop:!0,onLoad:I}),(0,l.Y)(c.A,{size:r?a.r2x:b,className:y?"shown":"hidden",tgsUrl:s.w.MonkeyPeek,playSegment:t?p:h,noLoop:!0})]})})},14680:(e,t,r)=>{r.d(t,{FD:()=>a,ZJ:()=>o,wb:()=>s});let n=0;function a(){n+=1}function s(){n-=1}function o(){return n>0}},14737:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(84051),a=r(17712);const s=function(e,t){const r=(0,a.A)(e);(0,n.vJ)(()=>{if("number"!=typeof t)return;const e=setTimeout(()=>r(),t);return()=>clearTimeout(e)},[t])}},15535:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(84051),a=r(31481),s=r(66644),o=r(63495),i=r(96454),u=r(87357),c=r(83868),l=r(14737),d=r(43874),p=r(39351),h=r(64493),m=r(18276),g=r(20021);const y=(0,n.ph)(e=>{let{isLoading:t=!1,isPasswordVisible:r,error:y,hint:f,placeholder:v,submitLabel:b,description:I,shouldShowSubmit:A,shouldResetValue:w,shouldDisablePasswordManager:S=!1,noRipple:C=!1,onClearError:T,onChangePasswordVisibility:P,onInputChange:N,onSubmit:k}=e;const Y=(0,n.li)(),U=(0,p.A)(),{isMobile:L}=(0,d.Ay)(),[K,D]=(0,n.J0)(""),[F,R]=(0,n.J0)(!1),B=L?550:400;return(0,n.vJ)(()=>{w&&D("")},[w]),(0,l.A)(()=>{i.TF||Y.current.focus()},B),(0,n.vJ)(()=>{y&&(0,s.RK)(()=>{Y.current.focus(),Y.current.select()})},[y]),(0,g.FD)("form",{action:"",onSubmit:k?function(e){e.preventDefault(),t||F&&k(K)}:c.A,autoComplete:"off",children:[(0,g.FD)("div",{className:(0,u.A)("input-group password-input",K&&"touched",y&&"error"),dir:U.isRtl?"rtl":void 0,children:[S&&(0,g.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,g.Y)("input",{ref:Y,className:"form-control",type:r?"text":"password",id:"sign-in-password",value:K||"",autoComplete:S?"one-time-code":"current-password",spellCheck:!o.Vq&&void 0,onChange:function(e){y&&T();const{target:t}=e;D(t.value),R(t.value.length>=a.AGC),N&&N(t.value)},maxLength:256,dir:"auto"}),(0,g.Y)("label",{children:y||f||v||U("PasswordFormPlaceholder")}),(0,g.Y)("div",{className:"div-button toggle-password",onClick:function(){P(!r)},role:"button",tabIndex:0,title:U("AriaPasswordToggle"),"aria-label":U("AriaPasswordToggle"),children:(0,g.Y)(m.A,{name:r?"eye":"eye-crossed"})})]}),I&&(0,g.Y)("p",{className:"description",children:I}),k&&(F||A)&&(0,g.Y)(h.A,{type:"submit",ripple:!C,isLoading:t,disabled:!F,children:b||U("PasswordFormSubmit")})]})})},15640:(e,t,r)=>{function n(e){return"touches"in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}r.d(t,{A:()=>n})},29441:(e,t,r)=>{function n(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const r=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const n=r.findIndex(e=>e.isSameNode(document.activeElement));let a=0;n>=0&&(a=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})},32794:(e,t,r)=>{r.r(t),r.d(t,{AuthCode:()=>v,AuthPassword:()=>A,AuthRegister:()=>C});var n=r(84051),a=r(13439),s=r(96454),o=r(87894),i=r(26072),u=r(39351),c=r(18276),l=r(31481),d=r(58443),p=r(43874),h=r(18104),m=r(20021);const g=(0,n.ph)(e=>{let{code:t,codeLength:r,trackingDirection:a,isTracking:s,isBig:o}=e;const[i,u]=(0,n.J0)(!1),{isMobile:c}=(0,p.Ay)(),g=165/r,y=c?l.UyP:l.H6l,f=(0,n.hb)(()=>u(!0),[]);return(0,m.FD)("div",{id:"monkey",className:o?"big":"",children:[!i&&(0,m.Y)("div",{className:"monkey-preview"}),(0,m.Y)(h.A,{size:o?l.r2x:y,className:s?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!s,onLoad:f}),(0,m.Y)(h.A,{size:o?l.r2x:y,className:s?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:s?function(){const e=t&&t.length>1||a<0?15+g*(t.length-1):0,n=t.length===r?180:15+g*t.length;return a<1?[n,e]:[e,n]}():void 0,speed:2,noLoop:!0})]})});var y=r(40664),f=r(52745);const v=(0,n.ph)((0,a.EK)(e=>(0,o.Up)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authErrorKey"]))(e=>{let{authPhoneNumber:t,authIsCodeViaApp:r,authIsLoading:o,authErrorKey:l}=e;const{setAuthCode:d,returnToAuthPhoneNumber:p,clearAuthErrorKey:h}=(0,a.ko)(),v=(0,u.A)(),b=(0,n.li)(),[I,A]=(0,n.J0)(""),[w,S]=(0,n.J0)(!1),[C,T]=(0,n.J0)(1);(0,n.vJ)(()=>{s.TF||b.current.focus()},[]),(0,i.A)({isActive:!0,onBack:p});const P=(0,n.hb)(e=>{l&&h();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==I&&(A(t.value),w?t.value.length||S(!1):S(!0),I&&I.length>t.value.length?T(-1):T(1),5===t.value.length&&d({code:t.value}))},[l,I,w,d]);return(0,m.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,m.FD)("div",{className:"auth-form",children:[(0,m.Y)(g,{code:I,codeLength:5,isTracking:w,trackingDirection:C}),(0,m.FD)("h1",{children:[t,(0,m.Y)("div",{className:"auth-number-edit div-button",onClick:function(){p()},role:"button",tabIndex:0,title:v("WrongNumber"),"aria-label":v("WrongNumber"),children:(0,m.Y)(c.A,{name:"edit"})})]}),(0,m.Y)("p",{className:"note",children:v(r?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,m.Y)(y.A,{ref:b,id:"sign-in-code",label:v("Code"),onInput:P,value:I,error:l&&v.withRegular(l),autoComplete:"off",inputMode:"numeric"}),o&&(0,m.Y)(f.A,{})]})})}));var b=r(15535),I=r(3178);const A=(0,n.ph)((0,a.EK)(e=>(0,o.Up)(e,["authIsLoading","authErrorKey","authHint"]))(e=>{let{authIsLoading:t,authErrorKey:r,authHint:s}=e;const{setAuthPassword:o,clearAuthErrorKey:i}=(0,a.ko)(),c=(0,u.A)(),[l,d]=(0,n.J0)(!1),p=(0,n.hb)(e=>{d(e)},[]),h=(0,n.hb)(e=>{o({password:e})},[o]);return(0,m.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,m.FD)("div",{className:"auth-form",children:[(0,m.Y)(I.A,{isPasswordVisible:l}),(0,m.Y)("h1",{children:c("LoginHeaderPassword")}),(0,m.Y)("p",{className:"note",children:c("LoginEnterPasswordDescription")}),(0,m.Y)(b.A,{onClearError:i,error:r&&c.withRegular(r),hint:s,isLoading:t,isPasswordVisible:l,onChangePasswordVisibility:p,onSubmit:h})]})})}));var w=r(43434),S=r(64493);const C=(0,n.ph)((0,a.EK)(e=>(0,o.Up)(e,["authIsLoading","authErrorKey"]))(e=>{let{authIsLoading:t,authErrorKey:r}=e;const{signUp:s,clearAuthErrorKey:o,uploadProfilePhoto:i}=(0,a.ko)(),c=(0,u.A)(),[l,d]=(0,n.J0)(!1),[p,h]=(0,n.J0)(),[g,f]=(0,n.J0)(""),[v,b]=(0,n.J0)(""),I=(0,n.hb)(e=>{r&&o();const{target:t}=e;f(t.value),d(t.value.length>0)},[r]),A=(0,n.hb)(e=>{const{target:t}=e;b(t.value)},[]);return(0,m.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,m.Y)("div",{className:"auth-form",children:(0,m.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),s({firstName:g,lastName:v}),p&&i({file:p})},children:[(0,m.Y)(w.A,{onChange:h}),(0,m.Y)("h2",{children:c("YourName")}),(0,m.Y)("p",{className:"note",children:c("LoginRegisterDesc")}),(0,m.Y)(y.A,{id:"registration-first-name",label:c("LoginRegisterFirstNamePlaceholder"),onChange:I,value:g,error:r&&c.withRegular(r),autoComplete:"given-name"}),(0,m.Y)(y.A,{id:"registration-last-name",label:c("LoginRegisterLastNamePlaceholder"),onChange:A,value:v,autoComplete:"family-name"}),l&&(0,m.Y)(S.A,{type:"submit",ripple:!0,isLoading:t,children:c("Next")})]})})})}))},37859:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);const a=(e,t,r)=>{const a=(0,n.li)();return(0,n.Nf)(()=>{const r=a.current;return a.current=t,e(r||[])},t,r)}},86046:(e,t,r)=>{r.d(t,{D5:()=>m,HT:()=>u,M6:()=>h,MA:()=>c,Pc:()=>l,ZF:()=>p,hk:()=>d,j6:()=>g,jA:()=>i});var n=r(31481),a=r(5930),s=r(17142),o=r(91048);function i(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,a=(0,o.PVB)(e,n);if(!a)return;return{type:"stargiftResale",slug:r,peer:a,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:a,message:s,shouldUpgrade:i}=t,u=(0,o.PVB)(e,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:a,message:s,shouldUpgrade:i}}if("starsgift"===t.type){const{userId:r,stars:n,amount:a,currency:s}=t,i=(0,o.mBe)(e,r);if(!i)return;return{type:"stars",purpose:{type:"starsgift",user:i,stars:n,amount:a,currency:s}}}if("stars"===t.type){const{stars:e,amount:r,currency:n}=t;return{type:"stars",purpose:{type:"stars",stars:e,amount:r,currency:n}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,o.hds)(e,t.chatId);if(!r)return;return{type:"message",chat:r,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:r,userId:n,message:a}=t,s=(0,o.mBe)(e,n);if(!s)return;return{type:"premiumGiftStars",months:r,message:a,user:s}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:a,currency:s,option:i,message:u}=t;return{type:"giveaway",option:i,purpose:{type:"giftcode",amount:a,currency:s,users:r.map(t=>(0,o.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,o.hds)(e,n):void 0,message:u}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:s,untilDate:i,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}=t,m=(0,o.hds)(e,r);if(!m)return;const g=n?.map(t=>(0,o.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:a,currency:s,chat:m,additionalChannels:g,untilDate:i,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:s,option:i,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,h=(0,o.hds)(e,r);if(!h)return;const m=n?.map(t=>(0,o.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:i,purpose:{type:"giveaway",amount:a,currency:s,chat:h,additionalChannels:m,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,a=u(e,r);if(!a)return;return{type:"stargiftUpgrade",inputSavedGift:a,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,a=u(e,r),s=(0,o.PVB)(e,n);if(!a||!s)return;return{type:"stargiftTransfer",inputSavedGift:a,recipient:s}}}function u(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,o.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function c(e){return"peer"!==e.peer.type||Boolean(e.isPostsSearch)}function l(e){const{peer:t}=e,r=e.amount.currency===n.ykW;return e.isPostsSearch?{avatarIcon:"search",isCustomPeer:!0,title:"",peerColorId:5}:"appStore"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===t.type?r?{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Gift.Received.Title",subtitleKey:"Stars.Intro.Transaction.Gift.UnknownUser",customPeerAvatarColor:"#000000"}:{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===t.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function d(e,t){if(t.currency===n.OUy){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}if(t.currency===n.ykW){const r=(0,s.wD)(t.amount),n=Math.abs(r);return r<0?`- ${e.preciseNumber(n)}`:`+ ${e.preciseNumber(n)}`}}function p(e,t){return e.number(t.amount+t.nanos/1e9)}function h(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:a}=t;return{id:r,amount:{currency:n.OUy,amount:a,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}if("giftTon"===t?.type){const{transactionId:r,cryptoAmount:a}=t;return{id:r,amount:{currency:n.ykW,amount:a},peer:{type:"fragment"},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}}function m(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:a,boostPeerId:s}=t;return{id:r,amount:{currency:n.OUy,amount:a,nanos:0},peer:{type:"peer",id:s},date:e.date,giveawayPostId:e.id}}function g(e,t){return(0,a.A)(e,t)}},91034:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);function a(e){return function(t){const r=(0,n.li)(t);return t.ignoreFreeze?e(t):(t.isOpen?r.current=t:r.current={...r.current,isOpen:!1},e(r.current))}}}}]);
|
|
//# sourceMappingURL=7405.6ee2c0394b63defb899a.js.map
|