TelegramPWA/dist/7405.99e2c0edc403580b2f2c.js
Alexander Zinchuk 5af6178460 [Build]
2025-08-21 12:08:29 +02:00

2 lines
14 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{101:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051),i=r(87679),s=r(56863);function a(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,i.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),i=r(31481),s=r(58443),a=r(14737),o=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)((({isPasswordVisible:e,isBig:t})=>{const[r,m]=(0,u.A)(!1),[g,y]=(0,u.A)(!1),{isMobile:f}=(0,o.Ay)(),v=f?i.UyP:i.H6l;(0,a.A)(y,2e3);const b=(0,n.hb)(m,[m]);return(0,l.FD)("div",{id:"monkey",className:t?"big":"",children:[!r&&(0,l.Y)("div",{className:"monkey-preview"}),(0,l.Y)(c.A,{size:t?i.r2x:v,className:g?"hidden":"shown",tgsUrl:s.w.MonkeyClose,playSegment:d,noLoop:!0,onLoad:b}),(0,l.Y)(c.A,{size:t?i.r2x:v,className:g?"shown":"hidden",tgsUrl:s.w.MonkeyPeek,playSegment:e?p:h,noLoop:!0})]})}))},14680:(e,t,r)=>{r.d(t,{FD:()=>i,ZJ:()=>a,wb:()=>s});let n=0;function i(){n+=1}function s(){n-=1}function a(){return n>0}},14737:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(84051),i=r(17712);const s=function(e,t){const r=(0,i.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:()=>g});var n=r(84051),i=r(31481),s=r(66644),a=r(96454),o=r(87357),u=r(83868),c=r(14737),l=r(43874),d=r(59030),p=r(64493),h=r(18276),m=r(20021);const g=(0,n.ph)((({isLoading:e=!1,isPasswordVisible:t,error:r,hint:g,placeholder:y="Password",submitLabel:f="Next",description:v,shouldShowSubmit:b,shouldResetValue:I,shouldDisablePasswordManager:A=!1,noRipple:w=!1,clearError:S,onChangePasswordVisibility:T,onInputChange:C,onSubmit:N})=>{const P=(0,n.li)(),k=(0,d.A)(),{isMobile:Y}=(0,l.Ay)(),[U,L]=(0,n.J0)(""),[K,D]=(0,n.J0)(!1),F=Y?550:400;return(0,n.vJ)((()=>{I&&L("")}),[I]),(0,c.A)((()=>{a.TF||P.current.focus()}),F),(0,n.vJ)((()=>{r&&(0,s.RK)((()=>{P.current.focus(),P.current.select()}))}),[r]),(0,m.FD)("form",{action:"",onSubmit:N?function(t){t.preventDefault(),e||K&&N(U)}:u.A,autoComplete:"off",children:[(0,m.FD)("div",{className:(0,o.A)("input-group password-input",U&&"touched",r&&"error"),dir:k.isRtl?"rtl":void 0,children:[A&&(0,m.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,m.Y)("input",{ref:P,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:U||"",autoComplete:A?"one-time-code":"current-password",onChange:function(e){r&&S();const{target:t}=e;L(t.value),D(t.value.length>=i.AGC),C&&C(t.value)},maxLength:256,dir:"auto"}),(0,m.Y)("label",{children:r||g||y}),(0,m.Y)("div",{className:"div-button toggle-password",onClick:function(){T(!t)},role:"button",tabIndex:0,title:"Toggle password visibility","aria-label":"Toggle password visibility",children:(0,m.Y)(h.A,{name:t?"eye":"eye-crossed"})})]}),v&&(0,m.Y)("p",{className:"description",children:v}),N&&(K||b)&&(0,m.Y)(p.A,{size:"smaller",type:"submit",ripple:!w,isLoading:e,disabled:!K,children:f})]})}))},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 i=0;n>=0&&(i=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[i].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:()=>T});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(58443),p=r(43874),h=r(18104),m=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,y=(0,n.hb)((()=>o(!0)),[]);return(0,m.FD)("div",{id:"monkey",className:s?"big":"",children:[!a&&(0,m.Y)("div",{className:"monkey-preview"}),(0,m.Y)(h.A,{size:s?l.r2x:g,className:i?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!i,onLoad:y}),(0,m.Y)(h.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 y=r(40664),f=r(52745);const v=(0,n.ph)((0,i.EK)((e=>(0,a.Up)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authErrorKey"])))((({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:r,authErrorKey:a})=>{const{setAuthCode:l,returnToAuthPhoneNumber:d,clearAuthErrorKey:p}=(0,i.ko)(),h=(0,u.A)(),v=(0,n.li)(),[b,I]=(0,n.J0)(""),[A,w]=(0,n.J0)(!1),[S,T]=(0,n.J0)(1);(0,n.vJ)((()=>{s.TF||v.current.focus()}),[]),(0,o.A)({isActive:!0,onBack:d});const C=(0,n.hb)((e=>{a&&p();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==b&&(I(t.value),A?t.value.length||w(!1):w(!0),b&&b.length>t.value.length?T(-1):T(1),5===t.value.length&&l({code:t.value}))}),[a,b,A,l]);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:b,codeLength:5,isTracking:A,trackingDirection:S}),(0,m.FD)("h1",{children:[e,(0,m.Y)("div",{className:"auth-number-edit div-button",onClick:function(){d()},role:"button",tabIndex:0,title:h("WrongNumber"),"aria-label":h("WrongNumber"),children:(0,m.Y)(c.A,{name:"edit"})})]}),(0,m.Y)("p",{className:"note",children:h(t?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,m.Y)(y.A,{ref:v,id:"sign-in-code",label:h("Code"),onInput:C,value:b,error:a&&h.withRegular(a),autoComplete:"off",inputMode:"numeric"}),r&&(0,m.Y)(f.A,{})]})})})));var b=r(15535),I=r(3178);const A=(0,n.ph)((0,i.EK)((e=>(0,a.Up)(e,["authIsLoading","authErrorKey","authHint"])))((({authIsLoading:e,authErrorKey:t,authHint:r})=>{const{setAuthPassword:s,clearAuthErrorKey:a}=(0,i.ko)(),o=(0,u.A)(),[c,l]=(0,n.J0)(!1),d=(0,n.hb)((e=>{l(e)}),[]),p=(0,n.hb)((e=>{s({password:e})}),[s]);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:c}),(0,m.Y)("h1",{children:o("LoginHeaderPassword")}),(0,m.Y)("p",{className:"note",children:o("LoginEnterPasswordDescription")}),(0,m.Y)(b.A,{clearError:a,error:t&&o.withRegular(t),hint:r,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:d,onSubmit:p})]})})})));var w=r(43434),S=r(64493);const T=(0,n.ph)((0,i.EK)((e=>(0,a.Up)(e,["authIsLoading","authErrorKey"])))((({authIsLoading:e,authErrorKey:t})=>{const{signUp:r,clearAuthErrorKey:s,uploadProfilePhoto:a}=(0,i.ko)(),o=(0,u.A)(),[c,l]=(0,n.J0)(!1),[d,p]=(0,n.J0)(),[h,g]=(0,n.J0)(""),[f,v]=(0,n.J0)(""),b=(0,n.hb)((e=>{t&&s();const{target:r}=e;g(r.value),l(r.value.length>0)}),[t]),I=(0,n.hb)((e=>{const{target:t}=e;v(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(),r({firstName:h,lastName:f}),d&&a({file:d})},children:[(0,m.Y)(w.A,{onChange:p}),(0,m.Y)("h2",{children:o("YourName")}),(0,m.Y)("p",{className:"note",children:o("LoginRegisterDesc")}),(0,m.Y)(y.A,{id:"registration-first-name",label:o("LoginRegisterFirstNamePlaceholder"),onChange:b,value:h,error:t&&o.withRegular(t),autoComplete:"given-name"}),(0,m.Y)(y.A,{id:"registration-last-name",label:o("LoginRegisterLastNamePlaceholder"),onChange:I,value:f,autoComplete:"family-name"}),c&&(0,m.Y)(S.A,{size:"smaller",type:"submit",ripple:!0,isLoading:e,children:o("Next")})]})})})})))},37859:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(84051);const i=(e,t,r)=>{const i=(0,n.li)();return(0,n.Nf)((()=>{const r=i.current;return i.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:()=>o});var n=r(31481),i=r(5930),s=r(17142),a=r(60919);function o(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,i=(0,a.PVB)(e,n);if(!i)return;return{type:"stargiftResale",slug:r,peer:i,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:i,message:s,shouldUpgrade:o}=t,u=(0,a.PVB)(e,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:i,message:s,shouldUpgrade:o}}if("starsgift"===t.type){const{userId:r,stars:n,amount:i,currency:s}=t,o=(0,a.mBe)(e,r);if(!o)return;return{type:"stars",purpose:{type:"starsgift",user:o,stars:n,amount:i,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,a.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:i}=t,s=(0,a.mBe)(e,n);if(!s)return;return{type:"premiumGiftStars",months:r,message:i,user:s}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:i,currency:s,option:o,message:u}=t;return{type:"giveaway",option:o,purpose:{type:"giftcode",amount:i,currency:s,users:r.map((t=>(0,a.mBe)(e,t))).filter(Boolean),boostChannel:n?(0,a.hds)(e,n):void 0,message:u}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:i,currency:s,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}=t,m=(0,a.hds)(e,r);if(!m)return;const g=n?.map((t=>(0,a.hds)(e,t))).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:i,currency:s,chat:m,additionalChannels:g,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:i,currency:s,option:o,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,h=(0,a.hds)(e,r);if(!h)return;const m=n?.map((t=>(0,a.hds)(e,t))).filter(Boolean);return{type:"giveaway",option:o,purpose:{type:"giveaway",amount:i,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,i=u(e,r);if(!i)return;return{type:"stargiftUpgrade",inputSavedGift:i,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,i=u(e,r),s=(0,a.PVB)(e,n);if(!i||!s)return;return{type:"stargiftTransfer",inputSavedGift:i,recipient:s}}}function u(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,a.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:i}=t;return{id:r,amount:{currency:n.OUy,amount:i,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:i}=t;return{id:r,amount:{currency:n.ykW,amount:i},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:i,boostPeerId:s}=t;return{id:r,amount:{currency:n.OUy,amount:i,nanos:0},peer:{type:"peer",id:s},date:e.date,giveawayPostId:e.id}}function g(e,t){return(0,i.A)(e,t)}},91034:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(84051);function i(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.99e2c0edc403580b2f2c.js.map