telegram-tt/dist/main.3a04ce2cdd83131e4a8d.js

2 lines
295 KiB
JavaScript
Raw Normal View History

2022-08-07 18:43:53 +02:00
(()=>{var e,t,n,r,o,a,i={71226:(e,t,n)=>{"use strict";n.d(t,{t9:()=>c,u3:()=>l,g8:()=>u});var r=n(83716),o=n(26926),a=n(69118);let i;const s=new Map,d=new Map;function u(e,t){return i||(r.eM&&console.log(">>> START LOAD WORKER"),i=new Worker(new URL(n.p+n.u(8090),n.b)),function(e){i.addEventListener("message",(t=>{let{data:n}=t;if("update"===n.type)e(n.update);else if("methodResponse"===n.type){const e=s.get(n.messageId);e&&(n.error?e.reject(n.error):e.resolve(n.response))}else if("methodCallback"===n.type){var r,o;null===(r=s.get(n.messageId))||void 0===r||null===(o=r.callback)||void 0===o||o.call(r,...n.callbackArgs)}else if("unhandledError"===n.type){var a;throw new Error(null===(a=n.error)||void 0===a?void 0:a.message)}}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(()=>{g(),setTimeout((()=>g()),1e3)}))),f({type:"initApi",args:[t]})}function c(e){if(!i)return void(r.eM&&console.warn("API is not initialized"));for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];const a=f({type:"callMethod",name:e,args:n});return r.eM&&(async()=>{try{await a}catch(e){}})(),a}function l(e){e.isCanceled=!0;const{messageId:t}=d.get(e)||{};t&&i.postMessage({type:"cancelProgress",messageId:t})}function f(e){const t=(0,o.Z)(s),n={messageId:t,...e},r={messageId:t},a=new Promise(((e,t)=>{Object.assign(r,{resolve:e,reject:t})}));if("args"in n&&"function"==typeof n.args[1]){const e=n.args.pop();r.callback=e,d.set(e,r)}return s.set(t,r),a.catch((()=>{})).finally((()=>{s.delete(t),r.callback&&d.delete(r.callback)})),i.postMessage(n),a}const h=Date.now();async function g(){try{await Promise.race([f({type:"ping"}),(0,a.wO)(150).then((()=>Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-h>=5e3&&window.location.reload()}}},6137:(e,t,n)=>{"use strict";n.d(t,{IU:()=>o.I,Vv:()=>r.Vv,_Q:()=>r._Q,_f:()=>r._f});var r=n(94746),o=n(9077)},9077:(e,t,n)=>{"use strict";let r;n.d(t,{I:()=>r}),function(e){e[e.BlobUrl=0]="BlobUrl",e[e.Progressive=1]="Progressive",e[e.Stream=2]="Stream",e[e.DownloadUrl=3]="DownloadUrl",e[e.Text=4]="Text"}(r||(r={}))},94746:(e,t,n)=>{"use strict";let r;n.d(t,{Vv:()=>r,_Q:()=>a,_f:()=>o}),function(e){e.Bold="MessageEntityBold",e.Blockquote="MessageEntityBlockquote",e.BotCommand="MessageEntityBotCommand",e.Cashtag="MessageEntityCashtag",e.Code="MessageEntityCode",e.Email="MessageEntityEmail",e.Hashtag="MessageEntityHashtag",e.Italic="MessageEntityItalic",e.MentionName="MessageEntityMentionName",e.Mention="MessageEntityMention",e.Phone="MessageEntityPhone",e.Pre="MessageEntityPre",e.Strike="MessageEntityStrike",e.TextUrl="MessageEntityTextUrl",e.Url="MessageEntityUrl",e.Underline="MessageEntityUnderline",e.Spoiler="MessageEntitySpoiler",e.Unknown="MessageEntityUnknown"}(r||(r={}));const o=-1,a="MESSAGE_DELETED"},58912:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(14050),o=n(46752),a=n(70692),i=n(60706),s=n(97799);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}const u=150,c=new Set,l=(0,r.X$)((function(e){const{size:t=u,play:n=!0,noLoop:l=!0,className:f,noTransition:h,nonInteractive:g,onLoad:p,onClick:m,...v}=e,{tgsUrl:y}=e,b=`${y}_${t}`,[w,I]=(0,i.Z)(c.has(b)),C=(0,a.Z)(h||w),S=(0,r.I4)((()=>{I(),c.add(b),null==p||p()}),[b,I,p]),[E,P]=(0,r.eJ)(String(Math.random())),M=(0,r.I4)((()=>{!0===n&&P(String(Math.random())),null==m||m()}),[m,n]);return r.ZP.createElement(s.Z,d({className:(0,o.Z)(f,C,"shown"),size:t,play:!0===n?E:n,noLoop:l,onClick:g?void 0:M,onLoad:S},v))}))},97799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(14050),o=n(69118),a=n(46752),i=n(80036),s=n(18674),d=n(45332);let u,c;async function l(){return u||(u=n.e(7941).then(n.bind(n,67941)),c=(await u).default),u}setTimeout(l,3e3);const f=(0,r.X$)((e=>{let{ref:t,className:n,style:u,tgsUrl:f,play:h,playSegment:g,speed:p,noLoop:m,size:v,quality:y,isLowPriority:b,color:w,forceOnHeavyAnimation:I,onClick:C,onLoad:S,onEnded:E}=e,P=(0,r.s
//# sourceMappingURL=main.3a04ce2cdd83131e4a8d.js.map