telegram-tt/dist/74.e304657c863282910f51.js

2 lines
116 KiB
JavaScript
Raw Normal View History

2021-10-22 01:28:48 +02:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[74],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(4399),o=n(3657),i=n(6202),c=n(8835),l=n(706),d=n(7799);const u={large:160,medium:128,small:104},m=({sticker:e,size:t="medium",observeIntersection:n,lastSyncTime:m,forceLoadPreview:h})=>{var f;const v=(0,r.sO)(null),[p,g]=(0,l.Z)(),Z=`sticker${e.id}`,E=(0,o.Op)(v,n),P=null===(f=e.thumbnail)||void 0===f?void 0:f.dataUri,y=(0,i.Z)(`${Z}?size=m`,!E&&!h,a.IU.BlobUrl,m),{transitionClassNames:C}=(0,c.Z)(y,"slow"),b=(0,i.Z)(Z,!E,a.IU.Lottie,m),w=Boolean(b),[N,k]=(0,r.eJ)(String(Math.random())),I=(0,r.I4)((()=>{k(String(Math.random()))}),[]),T=u[t],S=`width: ${T}px; height: ${T}px;`;return r.ZP.createElement("div",{ref:v,className:"AnimatedEmoji media-inner",style:S,onClick:I},!p&&P&&r.ZP.createElement("img",{src:P,className:e.id===s.wB?"like-sticker-thumb":void 0,alt:""}),!p&&y&&r.ZP.createElement("img",{src:y,className:C,alt:""}),w&&r.ZP.createElement(d.Z,{key:Z,id:Z,animationData:b,size:T,quality:1,play:E&&N,noLoop:!0,onLoad:g}))}},7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(9118),s=n(6752),o=n(8674),i=n(5332);let c,l;async function d(){return c||(c=n.e(941).then(n.bind(n,7941)),l=(await c).default),c}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:c,playSegment:u,speed:m,noLoop:h,size:f,quality:v,isLowPriority:p,onLoad:g})=>{const[Z,E]=(0,r.eJ)(),P=(0,r.sO)(null),y=(0,r.sO)(!1),C=(0,r.sO)(!1),b=(0,r.sO)();b.current=c;const w=(0,r.sO)();w.current=u,(0,r.d4)((()=>{if(Z||!n)return;const e=()=>{if(!P.current)return;const e=new l(t,P.current,n,{noLoop:h,size:f,quality:v,isLowPriority:p},g);m&&e.setSpeed(m),E(e)};l?e():d().then((()=>{(0,a.T2)((()=>{P.current&&e()}))}))}),[Z,n,t,p,h,g,v,f,m]),(0,r.d4)((()=>()=>{Z&&Z.destroy()}),[Z]);const N=(0,r.I4)(((e=!1)=>{Z&&(b.current||w.current)&&(w.current?Z.playSegment(w.current):e?Z.goToAndPlay(0):Z.play())}),[Z]),k=(0,r.I4)((()=>{Z&&Z.pause()}),[Z]),I=(0,r.I4)((()=>{C.current=!0,Z&&(y.current||(y.current=Z.isPlaying()),k())}),[Z,k]),T=(0,r.I4)((()=>{y.current&&N(),y.current=!1,C.current=!1}),[N]),S=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{Z&&(c||u?C.current?y.current=!0:N(h):C.current?y.current=!1:k())}),[Z,c,u,h,N,k]),(0,o.ZP)(I,T),(0,i.Z)(I,S);const M=(0,s.Z)("AnimatedSticker",e),x=f?`width: ${f}px; height: ${f}px;`:void 0;return r.ZP.createElement("div",{ref:P,className:M,style:x})}))},4752:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(4050),a=n(5116),s=n(6137),o=n(1713),i=n(7361),c=n(790),l=n(2858),d=n(6752),u=n(2340),m=n(5376),h=n(2566),f=n(1212),v=n(2019),p=n(3186),g=n(9107),Z=n(1174),E=n(6202),P=n(396),y=n(663),C=n(231),b=n(9196),w=n(8033);const N=i.wB?20:25,k=i.wB?50:75;function I(e,t,n){return r.ZP.createElement("div",{className:"seekline no-selection",ref:n},r.ZP.createElement("span",{className:"seekline-buffered-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*t}%)`})),r.ZP.createElement("span",{className:"seekline-play-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),r.ZP.createElement("span",{className:"seekline-thumb"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const T=(0,r.X$)((({theme:e,message:t,senderTitle:n,uploadProgress:T,origin:S,date:M,lastSyncTime:x,className:L,isSelectable:A,isSelected:$,isDownloading:F,onPlay:O,onReadMedia:U,onCancelUpload:R,onDateClick:D})=>{const{content:{audio:B,voice:V,video:X},isMediaUnread:K}=t,q=Boolean(V||X),j=(0,r.sO)(!1),z=(0,r.sO)(!1),H=(0,r.sO)(null),Y=(0,g.Z)(),{isRtl:J}=Y,W=(0,a.uC)(),[_,G]=(0,r.eJ)(!1),Q=x,ee=(0,l.Ti)(t,"pictogram"),te=(0,E.Z)(ee,!1,s.IU.BlobUrl),ne=(0,E.Z)((0,l.Ti)(t,"inline"),!Q,(0,l.kG)(t,"inline")),{loadProgress:re}=(0,h.Z)((0,l.Ti)(t,"download"),!F),ae=(0,r.I4)((()=>{G(!0),O(t.id,t.chatId)}),[t,O]),se=(0,r.I4)((()=>{G(!1)}),[]),{isBuffered:oe,bufferedProgress:ie,bufferingHandlers:ce,checkBuffering:le}=(0,v.Z)(),{isPlaying:de,playProgress:ue,playPause:me,play:he,pause:fe,setCurrentTime:ve,duration:pe}=(0,p.Z)((0,P.An)(t),(0,l.XV)(t),q?"voice":"audio",S,ne,ce,vo
//# sourceMappingURL=74.e304657c863282910f51.js.map