telegram-tt/dist/main.54e2adb4591cbd6c45ae.js

2 lines
190 KiB
JavaScript
Raw Normal View History

2021-08-22 11:08:54 +02:00
(()=>{"use strict";var e,t,n,r,o,d,a={1226:(e,t,n)=>{n.d(t,{t9:()=>c,u3:()=>l,g8:()=>i});var r=n(3716),o=n(6926),d=n(9118);let a;const u=new Map,s=new Map;function i(e,t){return a||(r.eM&&console.log(">>> START LOAD WORKER"),a=new Worker(new URL(n.p+n.u(514),n.b)),function(e){a.addEventListener("message",(({data:t})=>{if("update"===t.type)e(t.update);else if("methodResponse"===t.type){const e=u.get(t.messageId);e&&(t.error?e.reject(t.error):e.resolve(t.response))}else if("methodCallback"===t.type){const e=u.get(t.messageId);e&&e.callback&&e.callback(...t.callbackArgs)}else if("unhandledError"===t.type)throw t.error}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(async()=>{try{await Promise.race([f({type:"ping"}),(0,d.wO)(150).then((()=>Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-h>=5e3&&window.location.reload()}}))),f({type:"initApi",args:[t]})}function c(e,...t){if(a)return f({type:"callMethod",name:e,args:t});r.eM&&console.warn("API is not initialized")}function l(e){e.isCanceled=!0;const{messageId:t}=s.get(e)||{};t&&a.postMessage({type:"cancelProgress",messageId:t})}function f(e){const t=(0,o.Z)(u),n={messageId:t,...e},r={messageId:t},d=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,s.set(e,r)}return u.set(t,r),d.catch((()=>{})).finally((()=>{u.delete(t),r.callback&&s.delete(r.callback)})),a.postMessage(n),d}const h=Date.now()},6137:(e,t,n)=>{n.d(t,{Vv:()=>r.Vv,_f:()=>r._f,_Q:()=>r._Q,IU:()=>o.I});var r=n(4746),o=n(9077)},9077:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e[e.DataUri=0]="DataUri",e[e.BlobUrl=1]="BlobUrl",e[e.Lottie=2]="Lottie",e[e.Progressive=3]="Progressive",e[e.Stream=4]="Stream"}(r||(r={}))},4746:(e,t,n)=>{let r;n.d(t,{Vv:()=>r,_f:()=>o,_Q:()=>d}),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.Unknown="MessageEntityUnknown"}(r||(r={}));const o=-1,d="MESSAGE_DELETED"},88:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),o=n(5116);const d=36,a=2147483647;function u(e,t,n){let r;for(e=n?Math.floor(e/700):e>>1,e+=Math.floor(e/t),r=0;e>455;r+=d)e=Math.floor(e/35);return Math.floor(r+36*e/(e+38))}function s(e,t){const n=[],r=[],o=e.length;let s,i,c,l,f,h,m,p,g,y,b,v,w;for(s=128,c=0,l=72,f=e.lastIndexOf("-"),f<0&&(f=0),h=0;h<f;++h){if(t&&(r[n.length]=e.charCodeAt(h)-65<26),e.charCodeAt(h)>=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(h))}for(m=f>0?f+1:0;m<o;){for(p=c,g=1,y=d;;y+=d){if(m>=o)throw RangeError("punycode_bad_input(1)");if(b=(I=e.charCodeAt(m++))-48<10?I-22:I-65<26?I-65:I-97<26?I-97:d,b>=d)throw RangeError("punycode_bad_input(2)");if(b>Math.floor((a-c)/g))throw RangeError("punycode_overflow(1)");if(c+=b*g,v=y<=l?1:y>=l+26?26:y-l,b<v)break;if(g>Math.floor(a/(d-v)))throw RangeError("punycode_overflow(2)");g*=d-v}if(i=n.length+1,l=u(c-p,i,0===p),Math.floor(c/i)>a-s)throw RangeError("punycode_overflow(3)");s+=Math.floor(c/i),c%=i,t&&r.splice(c,0,e.charCodeAt(m-1)-65<26),n.splice(c,0,s),c++}var I;if(t)for(c=0,w=n.length;c<w;c++)r[c]&&(n[c]=String.fromCharCode(n[c]).toUpperCase().charCodeAt(0));return(e=>{const t=[];let n=0;const r=e.length;let o;for(;n<r;){if(o=e[n++],55296==(63488&o))throw new RangeError("UTF-16(encode): Illegal UTF-16 value");o>65535&&(o-=65536,t.push(String.fromCharCode(o>>>10&1023|55296)),o=56320|1023&o),t.push(String.fromCharCode(o))}return t.join("")})(n)}var i=n(3716),c=n(6752);function l(e){if(e)return e.includes("://")?e:`https://${e}`}function f(e){if(!e)return;const t=l(e);if(t)try{let e=decodeURI(t);const n=e.match(/^https?:\/\/([^/:?#
//# sourceMappingURL=main.54e2adb4591cbd6c45ae.js.map