TelegramPWA/dist/9357.aae3902b7cf2311a3952.js
Alexander Zinchuk 779b4ab554 [Build]
2025-10-08 12:35:34 +02:00

2 lines
2.6 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[9357],{31481:(e,a,t)=>{t.d(a,{Oig:()=>n});const n=!1,s=("undefined"!=typeof window&&window.innerHeight,Math.round(450),new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory","deleteParticipantHistory"]),new Set(["svg","svgz"]),new Set(["image/png","image/jpeg","image/gif"])),o=new Set(["video/mp4","video/quicktime"]);new Set(["audio/mp3","audio/ogg","audio/wav","audio/mpeg","audio/flac","audio/aac","audio/m4a","audio/mp4","audio/x-m4a"]),new Set([...s,...o]),new Set(["USERNAME_PURCHASE_AVAILABLE","USERNAME_INVALID"]),new Set(["t.me","web.t.me","a.t.me","k.t.me","z.t.me"]),new Set(["AU","BD","CA","CO","EG","HN","IE","IN","JO","MX","MY","NI","NZ","PH","PK","SA","SV","US"]),new Set(["USER_CANCELED"])},49357:(e,a,t)=>{t.d(a,{C:()=>i});var n=t(31481),s=t(37836);const o=new Map,r=function(){const e=new Set;function a(a){e.delete(a)}return{runCallbacks:function(...a){e.forEach(e=>{e(...a)})},addCallback:function(t){return e.add(t),()=>{a(t)}},removeCallback:a,hasCallbacks:function(){return Boolean(e.size)}}}();function i(e,a){let t=[],i=[];const c=(0,s.Fe)(()=>{const e={channel:a,payloads:t},n=i;t=[],i=[],n.length?postMessage(e,n):postMessage(e)});function d(e,a){t.push(e),a&&i.push(...a),c()}!function(e){self.onerror=a=>{console.error(a),e({type:"unhandledError",error:{message:a.error.message||"Uncaught exception in worker"}})},self.addEventListener("unhandledrejection",a=>{console.error(a),e({type:"unhandledError",error:{message:a.reason.message||"Uncaught rejection in worker"}})})}(d),r.addCallback(t=>{t.data?.channel===a&&function(e,a,t,s){s||(s=e=>{t({type:"update",update:e})}),a.payloads.forEach(async a=>{switch(a.type){case"init":{const{args:t}=a;"function"==typeof e?await e("init",s,...t):await(e.init?.(s,...t));break}case"callMethod":{const{messageId:s,name:r,args:i,withCallback:c}=a;try{if("function"!=typeof e&&!e[r])return;if(s&&c){const e=(...e)=>{const a=e[e.length-1];var n;t({type:"methodCallback",messageId:s,callbackArgs:e},(n=a)instanceof ArrayBuffer||n instanceof ImageBitmap?[a]:void 0)};o.set(s,e),i.push(e)}const a="function"==typeof e?await e(r,...i):await e[r](...i),{arrayBuffer:n}="object"==typeof a&&"arrayBuffer"in a&&a||{};s&&t({type:"methodResponse",messageId:s,response:a},n?[n]:void 0)}catch(e){n.Oig&&console.error(e),s&&t({type:"methodResponse",messageId:s,error:{message:e.message}})}s&&o.delete(s);break}case"cancelProgress":{const e=o.get(a.messageId);e&&(e.isCanceled=!0);break}}})}(e,t.data,d)})}onmessage=r.runCallbacks}}]);
//# sourceMappingURL=9357.aae3902b7cf2311a3952.js.map