2021-11-19 01:23:38 +01:00
|
|
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[306],{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(692),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),C=(0,c.Z)(y),b=(0,i.Z)(Z,!E,a.IU.Lottie,m),N=Boolean(b),[w,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:""}),N&&r.ZP.createElement(d.Z,{key:Z,id:Z,animationData:b,size:T,quality:1,play:E&&w,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 N=(0,r.sO)();N.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 w=(0,r.I4)(((e=!1)=>{Z&&(b.current||N.current)&&(N.current?Z.playSegment(N.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&&w(),y.current=!1,C.current=!1}),[w]),S=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{Z&&(c||u?C.current?y.current=!0:w(h):C.current?y.current=!1:k())}),[Z,c,u,h,w,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),N=n(8033);const w=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:O,onPlay:F,onReadMedia:R,onCancelUpload:U,onDateClick:D})=>{const{content:{audio:B,voice:V,video:X},isMediaUnread:q}=t,K=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"),!O),ae=(0,r.I4)((()=>{G(!0),F(t.id,t.chatId)}),[t,F]),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),K?"voice":"audio",S,ne,ce,void 0,le,_,ae,se,(0,l.CI)(t)),g
|