mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-12 17:17:24 +01:00
2 lines
113 KiB
JavaScript
2 lines
113 KiB
JavaScript
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[484],{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(6137),s=n(1713),o=n(7361),i=n(790),c=n(2858),l=n(6752),d=n(2340),u=n(5376),m=n(2761),h=n(1212),f=n(2019),v=n(3186),p=n(2619),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=o.wB?20:25,k=o.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:$,isSelected:A,onPlay:O,onReadMedia:F,onCancelUpload:U,onDateClick:D})=>{const{content:{audio:R,voice:B},isMediaUnread:V}=t,X=Boolean(B),K=(0,r.sO)(!1),q=(0,r.sO)(!1),j=(0,r.sO)(null),z=(0,g.Z)(),{isRtl:H}=z,[J,Y]=(0,r.eJ)(!1),W=x,_=(0,c.Ti)(t,"pictogram"),G=(0,E.Z)(_,!1,a.IU.BlobUrl),{mediaData:Q,downloadProgress:ee}=(0,m.Z)((0,c.Ti)(t,"inline"),!W,(0,c.kG)(t,"inline")),te=(0,r.I4)((()=>{Y(!0),O(t.id,t.chatId)}),[t,O]),ne=(0,r.I4)((()=>{Y(!1)}),[]),{isBuffered:re,bufferedProgress:ae,bufferingHandlers:se,checkBuffering:oe}=(0,f.Z)(),{isPlaying:ie,playProgress:ce,playPause:le,play:de,pause:ue,setCurrentTime:me,duration:he}=(0,v.Z)((0,P.An)(t),(0,c.XV)(t),X?"voice":"audio",S,Q,se,void 0,oe,J,te,ne,(0,c.CI)(t)),fe=ie||ce>0&&ce<1;(0,r.d4)((()=>{Y(i
|
||
|
//# sourceMappingURL=484.c11b166ce2c01b7f9f1d.js.map
|