TelegramPWA/dist/6806.8cb2ee8fa224096bd3eb.js
Alexander Zinchuk 9fa7ed54bd [Build]
2026-05-05 18:30:20 +02:00

2 lines
16 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[6806],{2578(e,t,r){r.d(t,{A:()=>i});var n=r(84051),s=r(39351),o=r(20021);const i=(0,n.ph)(({fakeType:e})=>{const t=(0,s.A)();return(0,o.Y)("span",{className:"FakeIcon",children:t("fake"===e?"FakeMessage":"ScamMessage")})})},34431(e,t,r){r.d(t,{A:()=>A});var n=r(84051),s=r(13439),o=r(31481),i=r(90709),a=r(70636),c=r(87357),u=r(95807),l=r(85982),d=r(83868),p=r(4961),f=r(39351),m=r(17712),y=r(59030),g=r(41036),I=r(87412),h=r(2578),v=r(95773),S=r(9267),b=r(20021);const T=()=>(0,b.FD)("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24",children:[(0,b.Y)("path",{d:"M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z",style:"fill: var(--color-fill)"}),(0,b.Y)("path",{d:"M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z",style:"fill: var(--color-checkmark)"})]}),A=(0,n.ph)(({className:e,style:t,peer:r,noVerified:A,noFake:w,withEmojiStatus:C,emojiStatusSize:k,isSavedMessages:N,isSavedDialog:P,noLoopLimit:B,canCopyTitle:O,iconElement:K,isMonoforum:D,monoforumBadgeClassName:F,withStatusTextColor:U,onEmojiStatusClick:M,observeIntersection:V})=>{const{showNotification:z}=(0,s.ko)(),G=(0,y.A)(),L=(0,f.A)(),x="id"in r?r:void 0,Y="isCustomPeer"in r?r:void 0,j=x&&(0,a.mO)(x),E=x&&(j?(0,i.Yg)(x):(0,i.Js)(G,x)),$=j&&x.isPremium||Y?.isPremium,W=C&&!N,J=x?.emojiStatus||(Y?.emojiStatusId?{type:"regular",documentId:Y.emojiStatusId}:void 0),H=(0,m.A)(e=>{E&&O&&((0,d.A)(e),(0,l.eM)(E),z({message:(j?"User":"Chat")+" name was copied"}))}),R=(0,n.Kr)(()=>Y?(0,p.A)(Y.title||G(Y.titleKey)):N?G(P?"MyNotes":"SavedMessages"):(0,i.Qe)(x.id)?G("AnonymousForward"):(0,i.kE)(x.id)?G("RepliesTitle"):(0,i.Rl)(x.id)?G("VerifyCodesNotifications"):void 0,[Y,P,N,G,x]),Z=N||P?void 0:x?.botVerificationIconId;return(0,b.FD)("div",{className:(0,c.A)("title","QljEeKI5",e),style:(0,u.A)(k?`--_status-size: ${k}px`:void 0,t),children:[Z&&(0,b.Y)(I.A,{documentId:Z,size:k,loopLimit:B?void 0:o.J$1,observeIntersectionForLoading:V}),(0,b.Y)("h3",{dir:"auto",role:"button",className:(0,c.A)("fullName","AS54Cntu",O&&"vr53L_9p"),onClick:H,children:R||(0,p.A)(E||"")}),!K&&r&&(0,b.FD)(b.FK,{children:[!A&&r?.isVerified&&(0,b.Y)(T,{}),!w&&r?.fakeType&&(0,b.Y)(h.A,{fakeType:r.fakeType}),W&&J&&(0,b.Y)(g.Ay,{className:"KBZgFSv7",slideClassName:"xmVxyvNy",activeKey:Number(J.documentId),name:"slideFade",direction:-1,shouldCleanup:!0,children:(0,b.Y)(v.A,{withSparkles:"collectible"===J.type,sparklesClassName:"statusSparkles",sparklesColor:"collectible"!==J.type||U?void 0:J.textColor,children:(0,b.Y)(I.A,{className:(0,c.A)("no-selection",!U&&"z1sLOAjr"),documentId:J.documentId,size:k,loopLimit:B?void 0:o.J$1,observeIntersectionForLoading:V,onClick:M})})}),W&&!J&&$&&(0,b.Y)(S.A,{}),D&&(0,b.Y)("div",{className:(0,c.A)("Sdwfc851",F),children:L("MonoforumBadge")})]}),K]})})},95773(e,t,r){r.d(t,{A:()=>c});var n=r(84051),s=r(87357),o=r(95807),i=r(85118);var a=r(20021);const c=(0,n.ph)(({children:e,ref:t,className:r,style:c,withSparkles:u,sparklesClassName:l,sparklesColor:d,glowColor:p,onClick:f})=>{let m=(0,n.li)();return t&&(m=t),(0,a.FD)("div",{ref:m,className:(0,s.A)("Z9JWyzAs",r),style:(0,o.A)(p&&`--glow-color: ${p}`,c),onClick:f,children:[u&&(0,a.Y)(i.A,{preset:"button",className:(0,s.A)("fQBp2vKr",l),style:(0,o.A)(d&&`color: ${d}`)}),e]})})},86046(e,t,r){r.d(t,{D5:()=>m,HT:()=>c,M6:()=>f,MA:()=>u,Pc:()=>l,ZF:()=>p,hk:()=>d,j6:()=>y,jA:()=>a});var n=r(31481),s=r(27102),o=r(17142),i=r(11597);function a(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,s=(0,i.PVB)(e,n);if(!s)return;return{type:"stargiftResale",slug:r,peer:s,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:s,message:o,shouldUpgrade:a}=t,c=(0,i.PVB)(e,r);if(!c)return;return{type:"stargift",peer:c,shouldHideName:n,giftId:s,message:o,shouldUpgrade:a}}if("starsgift"===t.type){const{userId:r,stars:n,amount:s,currency:o}=t,a=(0,i.mBe)(e,r);if(!a)return;return{type:"stars",purpose:{type:"starsgift",user:a,stars:n,amount:s,currency:o}}}if("stars"===t.type){const{stars:r,amount:n,currency:s,spendPurposePeerId:o}=t;return{type:"stars",purpose:{type:"stars",stars:r,amount:n,currency:s,spendPurposePeer:o?(0,i.PVB)(e,o):void 0}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,i.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:s}=t,o=(0,i.mBe)(e,n);if(!o)return;return{type:"premiumGiftStars",months:r,message:s,user:o}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:s,currency:o,option:a,message:c}=t;return{type:"giveaway",option:a,purpose:{type:"giftcode",amount:s,currency:o,users:r.map(t=>(0,i.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,i.hds)(e,n):void 0,message:c}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:o,untilDate:a,areWinnersVisible:c,countries:u,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:f}=t,m=(0,i.hds)(e,r);if(!m)return;const y=n?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:s,currency:o,chat:m,additionalChannels:y,untilDate:a,areWinnersVisible:c,countries:u,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:f}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:o,option:a,untilDate:c,areWinnersVisible:u,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,f=(0,i.hds)(e,r);if(!f)return;const m=n?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:a,purpose:{type:"giveaway",amount:s,currency:o,chat:f,additionalChannels:m,untilDate:c,areWinnersVisible:u,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,s=c(e,r);if(!s)return;return{type:"stargiftUpgrade",inputSavedGift:s,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,s=c(e,r),o=(0,i.PVB)(e,n);if(!s||!o)return;return{type:"stargiftTransfer",inputSavedGift:s,recipient:o}}if("stargiftDropOriginalDetails"===t.type){const{inputSavedGift:r}=t,n=c(e,r);if(!n)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:n}}if("stargiftPrepaidUpgrade"===t.type){const{peerId:r,hash:n}=t,s=(0,i.PVB)(e,r);if(!s)return;return{type:"stargiftPrepaidUpgrade",peer:s,hash:n}}if("stargiftAuctionBid"===t.type){const{giftId:r,bidAmount:n,peerId:s,message:o,shouldHideName:a,isUpdateBid:c}=t;return{type:"stargiftAuctionBid",giftId:r,bidAmount:n,peer:s?(0,i.PVB)(e,s):void 0,message:o,shouldHideName:a,isUpdateBid:c}}}function c(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,i.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function u(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,o.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 f(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:s}=t;return{id:r,amount:{currency:n.OUy,amount:s,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:s}=t;return{id:r,amount:{currency:n.ykW,amount:s},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:s,boostPeerId:o}=t;return{id:r,amount:{currency:n.OUy,amount:s,nanos:0},peer:{type:"peer",id:o},date:e.date,giveawayPostId:e.id}}function y(e,t){return(0,s.Lz)(e,t)}},72730(e,t,r){r.d(t,{A:()=>a});var n=r(84051),s=r(46536);const o=".Modal.with-balance-bar",i=(0,s.h)();function a(e,t){const[r,s]=(0,n.J0)(!0);return(0,n.vJ)(()=>{if(!t)return;const r=()=>{s(function(e){if(!e)return!0;const t=e.closest(o);if(!t)return!0;const r=document.querySelectorAll(o);if(r.length<=1)return!0;let n,s=-1/0;return r.forEach(e=>{const t=parseInt(getComputedStyle(e).zIndex,10)||0;t>=s&&(s=t,n=e)}),t===n}(e.current))};r();const n=i.addCallback(r);return i.runCallbacks(),()=>{n(),i.runCallbacks()}},[t,e]),r}},1455(e,t,r){r.d(t,{A:()=>s});var n=r(84051);function s(e,t,r){const s=(0,n.li)(e);if(t){if(r?.length){const t={};for(const n of r)t[n]=e[n];s.current={...s.current,...t}}}else s.current=e;return s.current}},96374(e,t,r){r.d(t,{A:()=>l});var n=r(84051),s=r(89925),o=r(87894),i=r(30857),a=r(17712),c=r(73767);function u(e,t,r,n){const{length:o}=e,i=n?e.indexOf(n):0,a=t===s.TN.Forwards?i:i+1||o,c=Math.max(0,a-r),u=a+r-1,l=e.slice(Math.max(0,c),u+1);let d,p;switch(t){case s.TN.Forwards:d=a>=0,p=c>=0;break;case s.TN.Backwards:d=a<o,p=u<=o-1}return{newViewportIds:l,areSomeLocal:d,areAllLocal:p,newIsOnTop:l[0]===e[0],fromOffset:c}}const l=(e,t,r=!1,l=30)=>{const d=(0,n.li)(),p=(0,n.li)();if(!p.current&&t&&!r){const{newViewportIds:e,newIsOnTop:r,fromOffset:n}=u(t,s.TN.Forwards,l,t[0]);p.current={viewportIds:e,isOnTop:r,offset:n}}const f=(0,i.A)();r&&(d.current={});const m=(0,c.A)(t),y=(0,c.A)(r);if(!t||r||t===m&&r===y)t||(p.current=void 0);else{const{viewportIds:e,isOnTop:r}=p.current||{},n=e&&!r?e[Math.round(e.length/2)]:void 0,i=n&&t.includes(n)?n:t[0],{offsetId:a=i,direction:c=s.TN.Forwards}=d.current||{},{newViewportIds:f,newIsOnTop:m,fromOffset:y}=u(t,c,l,a);d.current={},e&&(0,o.k)(e,f)||(p.current={viewportIds:f,isOnTop:m,offset:y})}const g=(0,a.A)(({direction:r,noScroll:n})=>{const{viewportIds:i}=p.current||{},a=i?r===s.TN.Backwards?i[i.length-1]:i[0]:void 0;if(!t)return void(e&&e({offsetId:a}));const{newViewportIds:c,areSomeLocal:m,areAllLocal:y,newIsOnTop:g,fromOffset:I}=u(t,r,l,a);!m||i&&(0,o.k)(i,c)||(p.current={viewportIds:c,isOnTop:g,offset:I},f()),!y&&e&&(n||(d.current={...d.current,direction:r,offsetId:a}),e({offsetId:a}))});return r?[t]:[p.current?.viewportIds,g,p.current?.offset]}},37859(e,t,r){r.d(t,{A:()=>s});var n=r(84051);const s=(e,t,r)=>{const s=(0,n.li)();return(0,n.Nf)(()=>{const r=s.current;return s.current=t,e(r||[])},t,r)}},14680(e,t,r){r.d(t,{FD:()=>s,ZJ:()=>i,wb:()=>o});let n=0;function s(){n+=1}function o(){n-=1}function i(){return n>0}},9718(e,t,r){r.d(t,{A:()=>s});var n=r(96454);const s=(e,t)=>{n.pz&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),n.pz&&(e.style.overflow="")}},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 s=0;n>=0&&(s=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[s].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})},32587(e,t,r){r.d(t,{A:()=>o});const n=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],s=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function o(e,t,r,o,i,a,c){if(Number.isNaN(a)||a<1)return;a|=0,Number.isNaN(c)&&(c=1),(c|=0)>3&&(c=3),c<1&&(c=1);const u=e.getImageData(t,r,o,i),l=u.data;let d,p,f,m,y,g,I,h,v,S,b,T,A=o-1,w=i-1,C=a+1,k=[],N=[],P=[],B=n[a],O=s[a],K=[],D=[];for(;c-- >0;){for(T=b=0,y=0;y<i;y++){for(d=l[T]*C,p=l[T+1]*C,f=l[T+2]*C,g=1;g<=a;g++)I=T+((g>A?A:g)<<2),d+=l[I++],p+=l[I++],f+=l[I++];for(m=0;m<o;m++)k[b]=d,N[b]=p,P[b]=f,0==y&&(K[m]=((I=m+C)<A?I:A)<<2,D[m]=(I=m-a)>0?I<<2:0),h=T+K[m],v=T+D[m],d+=l[h++]-l[v++],p+=l[h++]-l[v++],f+=l[h++]-l[v++],b++;T+=o<<2}for(m=0;m<o;m++){for(S=m,d=k[S]*C,p=N[S]*C,f=P[S]*C,g=1;g<=a;g++)S+=g>w?0:o,d+=k[S],p+=N[S],f+=P[S];for(b=m<<2,y=0;y<i;y++)l[b]=d*B>>>O,l[b+1]=p*B>>>O,l[b+2]=f*B>>>O,0==m&&(K[y]=((I=y+C)<w?I:w)*o,D[y]=(I=y-a)>0?I*o:0),h=m+K[y],v=m+D[y],d+=k[h]-k[v],p+=N[h]-N[v],f+=P[h]-P[v],b+=o<<2}}e.putImageData(u,t,r)}}}]);
//# sourceMappingURL=6806.8cb2ee8fa224096bd3eb.js.map