telegram-tt/dist/824.99496e45ca79e9811441.js

2 lines
10 KiB
JavaScript
Raw Normal View History

2021-11-27 17:45:33 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[824],{7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),o=n(9118),c=n(6752),s=n(8674),a=n(5332);let l,i;async function d(){return l||(l=n.e(941).then(n.bind(n,7941)),i=(await l).default),l}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:l,playSegment:u,speed:m,noLoop:f,size:h,quality:p,isLowPriority:v,onLoad:g,color:w})=>{const[Z,y]=(0,r.eJ)(),E=(0,r.sO)(null),C=(0,r.sO)(!1),b=(0,r.sO)(!1),I=(0,r.sO)();I.current=l;const A=(0,r.sO)();A.current=u,(0,r.d4)((()=>{if(Z||!n)return;const e=()=>{if(!E.current)return;const e=new i(t,E.current,n,{noLoop:f,size:h,quality:p,isLowPriority:v},g,w);m&&e.setSpeed(m),y(e)};i?e():d().then((()=>{(0,o.T2)((()=>{E.current&&e()}))}))}),[w,Z,n,t,v,f,g,p,h,m]),(0,r.d4)((()=>{Z&&Z.setColor(w)}),[w,Z]),(0,r.d4)((()=>()=>{Z&&Z.destroy()}),[Z]);const T=(0,r.I4)(((e=!1)=>{Z&&(I.current||A.current)&&(A.current?Z.playSegment(A.current):e?Z.goToAndPlay(0):Z.play())}),[Z]),P=(0,r.I4)((()=>{Z&&Z.pause()}),[Z]),N=(0,r.I4)((()=>{b.current=!0,Z&&(C.current||(C.current=Z.isPlaying()),P())}),[Z,P]),S=(0,r.I4)((()=>{C.current&&T(),C.current=!1,b.current=!1}),[T]),L=(0,r.I4)((()=>{(0,o.T2)(S)}),[S]);(0,r.d4)((()=>{Z&&(l||u?b.current?C.current=!0:T(f):b.current?C.current=!1:P())}),[Z,l,u,f,T,P]),(0,r.d4)((()=>{Z&&(Z.changeData(n),T())}),[T,Z,n]),(0,s.ZP)(N,S),(0,a.Z)(N,L);const k=(0,c.Z)("AnimatedSticker",e),B=h?`width: ${h}px; height: ${h}px;`:void 0;return r.ZP.createElement("div",{ref:E,className:k,style:B})}))},172:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),o=n(6137),c=n(3716),s=n(2858),a=n(2155),l=n(6752),i=n(2340),d=n(6202),u=n(1212),m=n(9107);const f=(0,r.X$)((({className:e,size:t="large",chat:n,user:f,text:h,withOnlineStatus:p,isSavedMessages:v,lastSyncTime:g,onClick:w})=>{const Z=f&&(0,s.NB)(f),y=f&&(0,s.pK)(f.id);let E;v||Z||(f?E=(0,s.RT)(f):n&&(E=(0,s.RT)(n)));const C=(0,d.Z)(E,!1,o.IU.BlobUrl,g),b=Boolean(C),{transitionClassNames:I}=(0,u.Z)(b,void 0,b,"slow"),A=(0,m.Z)();let T="";if(v)T=r.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(Z)T=r.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(y)T=r.ZP.createElement("i",{className:"icon-reply-filled"});else if(C)T=r.ZP.createElement("img",{src:C,className:(0,l.Z)("avatar-media",I),alt:"",decoding:"async"});else if(f){const e=(0,s.Js)(f);T=e?(0,a.Xv)(e,2):void 0}else if(n){const e=(0,s.U)(A,n);T=e&&(0,a.Xv)(e,(0,s.YC)(n.id)?2:1)}else h&&(T=(0,a.Xv)(h,2));const P=!v&&f&&(0,s.kM)(f),N=(0,l.Z)(`Avatar size-${t}`,e,`color-bg-${(0,s.Rs)(f||n)}`,v&&"saved-messages",Z&&"deleted-account",y&&"replies-bot-account",p&&P&&"online",w&&"interactive",!v&&!C&&"no-photo"),S=Boolean(v||C),L=(0,r.I4)((e=>{w&&w(e,S)}),[w,S]),k=(f||n)&&(f||n).id;return r.ZP.createElement("div",{className:N,onClick:L,"data-test-sender-id":c.Cg?k:void 0},"string"==typeof T?(0,i.Z)(T,["jumbo"===t?"hq_emoji":"emoji"]):T)}))},1273:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1713),o=n(4050),c=n(9118),s=n(7675);const a=({ref:e,className:t,onLoadMore:n,onScroll:a,onKeyDown:l,items:i,itemSelector:d=".ListItem",preloadBackwards:u=20,sensitiveArea:m=800,noScrollRestore:f=!1,noScrollRestoreOnTop:h=!1,noFastList:p,cacheBuster:v,children:g})=>{let w=(0,o.sO)(null);e&&(w=e);const Z=(0,o.sO)({}),[y,E]=(0,o.Ye)((()=>n?[(0,c.Ds)(((e=!1)=>{n({direction:r.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,c.Ds)((()=>{n({direction:r.Uq.Forwards})}),1e3,!0,!1)]:[]),[n,i]);(0,o.d4)((()=>{if(!y)return;if(u>0&&(!i||i.length<u))return void y(!0);const{scrollHeight:e,clientHeight:t}=w.current;t&&e<=t&&y()}),[i,y,u]),(0,o.bt)((()=>{const e=w.current,t=Z.current;let n;if(t.listItemElements=e.querySelectorAll(d),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:r}=e;n=r+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}f||h&&0===e.scrollTop||((0,s.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[i,d,f,h,v]);const C=(0,o.I4)((e=>{if(E&&y){co
//# sourceMappingURL=824.99496e45ca79e9811441.js.map