"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[941],{7941:(t,i,e)=>{e.r(i),e.d(i,{default:()=>p});vars=e(7361),n=e(6926);functiona(t,i,e){returniint?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}classh{constructor(t){this.worker=t,a(this,"requestStates",newMap),a(this,"requestStatesByCallback",newMap),this.subscribe()}request(t){const{worker:i,requestStates:e,requestStatesByCallback:s}=this,a=(0,n.Z)(e),h={type:"callMethod",messageId:a,...t},r={messageId:a},o=newPromise(((t,i)=>{Object.assign(r,{resolve:t,reject:i})}));if("function"==typeofh.args[h.args.length-1]){constt=h.args.pop();r.callback=t,s.set(t,r)}returne.set(a,r),o.catch((()=>{})).finally((()=>{e.delete(a),r.callback&&s.delete(r.callback)})),i.postMessage(h),o}cancelCallback(t){t.isCanceled=!0;const{messageId:i}=this.requestStatesByCallback.get(t)||{};i&&this.worker.postMessage({type:"cancelProgress",messageId:i})}subscribe(){const{worker:t,requestStates:i}=this;t.addEventListener("message",(({data:t})=>{if("methodResponse"===t.type){conste=i.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}elseif("methodCallback"===t.type){vare;consts=i.get(t.messageId);null==s||null===(e=s.callback)||void0===e||e.call(s,...t.callbackArgs)}elseif("unhandledError"===t.type)throwt.error}))}}varr=e(9933),o=e(3570);functiond(t,i,e){returniint?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}constc=s.wB?.75:1,u=.75,m=s.s$?2:4,l=newArray(4).fill(void0).map((()=>newh(newWorker(newURL(e.p+e.u(354),e.b)))));letg=-1;constp=class{constructor(t,i,e,s={},n,a){this.id=t,this.container=i,this.animationData=e,this.params=s,this.onLoad=n,this.customColor=a,d(this,"imgSize",void0),d(this,"key",void0),d(this,"msPerFrame",void0),d(this,"reduceFactor",void0),d(this,"cacheModulo",void0),d(this,"chunkSize",void0),d(this,"workerIndex",void0),d(this,"chunks",[]),d(this,"framesCount",void0),d(this,"chunksCount",void0),d(this,"canvas",document.createElement("canvas")),d(this,"ctx",this.canvas.getContext("2d")),d(this,"isAnimating",!1),d(this,"isWaiting",!0),d(this,"isOnLoadFired",!1),d(this,"isDestroyed",!1),d(this,"approxFrameIndex",0),d(this,"prevFrameIndex",-1),d(this,"stopFrameIndex",0),d(this,"speed",1),d(this,"direction",1),d(this,"lastRenderAt",void0),this.initContainer(),this.initConfig(),this.initRenderer()}isPlaying(){returnthis.isAnimating||this.isWaiting}play(){this.stopFrameIndex=void0,this.direction=1,this.doPlay()}pause(){this.isWaiting?this.stopFrameIndex=this.approxFrameIndex:this.isAnimating=!1;constt=this.getChunkIndex(this.approxFrameIndex);this.chunks=this.chunks.map(((i,e)=>e===t?i:void0))}goToAndPlay(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=void0,this.direction=1,this.doPlay()}goToAndStop(t){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(t/this.reduceFactor),this.direction=1,this.doPlay()}playSegment([t,i]){this.approxFrameIndex=Math.floor(t/this.reduceFactor),this.stopFrameIndex=Math.floor(i/this.reduceFactor),this.direction=t<i?1:-1,this.doPlay()}setSpeed(t){this.speed=t}destroy(){this.isDestroyed=!0,this.pause(),this.destroyRenderer(),this.destroyContainer()}initContainer(){if(!(this.container.parentNodeinstanceofHTMLElement))thrownewError("[RLottie] Container is not mounted");let{size:t}=this.params;if(!t&&(t=this.container.offsetWidth||parseInt(this.container.style.width,10)||this.container.parentNode.offsetWidth,!t))thrownewError("[RLottie] Failed to detect width from container");this.canvas.style.width=`${t}px`,this.canvas.style.height=`${t}px`;const{isLowPriority:i,quality:e=(i?u:c)}=this.params,n=Math.round(t*Math.max(s.cL*e,1));this.canvas.width=n,this.canvas.height=n,this.container.appendChild(this.canvas),this.imgSize=n}initConfig(){this.key=`${this.id}_${this.imgSize}`;const{isLowPriority:t}=this.params,i=t?30:60,e=this.animationData.fr||i;this.reduceFactor=e%i==0?e/i:1,this.msPerFrame=1e3/(e/this.reduceFac