tweb/public/main.3f7a70559679af85e450.b...

2 lines
12 KiB
JavaScript

!function(e){function t(t){for(var n,i,a=t[0],r=t[1],c=0,s=[];c<a.length;c++)i=a[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(u&&u(t);s.length;)s.shift()()}var n={},o={10:0};function i(e){return a.p+""+({11:"npm.qr-code-styling"}[e]||e)+"."+{0:"acb684dc35d9188bd6be",1:"8ebe82cad4450b8187c1",2:"8e2ae984d68e67fdf8a4",3:"ecfbd0f9b839f0b7d92f",4:"bf32a9fbeca385c5c9e9",5:"30d45c9c9fc91ab968c5",6:"848a1b33f7636a89b087",7:"83a2dfdd0ee504f81f0b",8:"f362ee1d655a5699d64f",9:"3edc09b4dc478113ee21",11:"868f37c7ef08036b894a",12:"287fcbd640751db5e44c",13:"c0ce6dfb89e386f370a8",14:"f1740ad881f9dd808262",15:"1a3e11966cccf1381885",16:"b3f22524b150bb5fac27",17:"6eeae36d1ceb661e97fa",18:"2ffaa556b58a70d80bd8",19:"804c41f1066e7188e13a",20:"be4f633cc12b0fd8e5a2",21:"0d6505cd9495fe305ff6",22:"2635711e4f30bee63506",23:"605f4acbc5d2d512692f",24:"92df5f1db24f05b27e64",25:"f3627972e99fbfd11062",26:"b22c8de7fb72959da42f",27:"d828877399fdc766a0f1",28:"54c1be0be6cd63675640",29:"2d84e7e951c2722718bc",30:"db25542edbf0f0900275",31:"8c3b6a0d1d8bf16646eb"}[e]+".chunk.js"}function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.e=function(e){var t=[],n=o[e];if(0!==n)if(n)t.push(n[2]);else{var r=new Promise((function(t,i){n=o[e]=[t,i]}));t.push(n[2]=r);var c=new Error;var s=function t(n,r){var s,u=document.createElement("script");u.charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.src=n,s=function(n){u.onerror=u.onload=null,clearTimeout(d);var a=o[e];if(0!==a)if(a)if(0===r){var s=n&&("load"===n.type?"missing":n.type),l=n&&n.target&&n.target.src;c.message="Loading chunk "+e+" failed after 999999 retries.\n("+s+": "+l+")",c.name="ChunkLoadError",c.type=s,c.request=l,a[1](c),o[e]=void 0}else setTimeout((function(){var n=Date.now(),o=t(i(e)+"?"+n,r-1);document.head.appendChild(o)}),0);else o[e]=void 0};var d=setTimeout((function(){s({type:"timeout",target:u})}),12e4);return u.onerror=u.onload=s,u}(i(e),999999);document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(n,o,function(t){return e[t]}.bind(null,o));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var r=this.webpackJsonp=this.webpackJsonp||[],c=r.push.bind(r);r.push=t,r=r.slice();for(var s=0;s<r.length;s++)t(r[s]);var u=c;a(a.s=10)}([function(e,t,n){"use strict";n.r(t),n.d(t,"USER_AGENT",(function(){return i})),n.d(t,"IS_APPLE",(function(){return a})),n.d(t,"IS_ANDROID",(function(){return r})),n.d(t,"IS_CHROMIUM",(function(){return c})),n.d(t,"IS_APPLE_MOBILE",(function(){return s})),n.d(t,"IS_SAFARI",(function(){return u})),n.d(t,"IS_FIREFOX",(function(){return d})),n.d(t,"IS_MOBILE_SAFARI",(function(){return l})),n.d(t,"IS_MOBILE",(function(){return f}));var o="undefined"!=typeof window?window:self;const i=navigator?navigator.userAgent:null,a=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),r=-1!==navigator.userAgent.toLowerCase().indexOf("android"),c=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),s=(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!o.MSStream,u=!!("safari"in o)||!(!i||!(/\b(iPad|iPhone|iPod)\b/.test(i)||i.match("Safari")&&!i.match("Chrome"))),d=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,l=u&&s,f=navigator.maxTouchPoints>0&&-1!=navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i)},function(e,t,n){"use strict";n.r(t),n.d(t,"IS_TOUCH_SUPPORTED",(function(){return o}));const o="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var o=n(1),i=n(0),a=n(5),r=n(3);const c=i.IS_SAFARI&&i.IS_MOBILE&&o.IS_TOUCH_SUPPORTED;if(c){let e="clientY",t=0;const n={capture:!0,passive:!1},o=n=>{const o=n.touches[0],i=Object(a.a)(o.target,"scrollable-y");if(i){const a=o[e],r=t-a,c=i.scrollTop,s=i.scrollHeight,u=i.clientHeight,d=c?Math.round(c+i.clientHeight+r):c+r;(s===u||d>=s||d<=0)&&n.preventDefault()}else n.preventDefault()};let i=0;document.addEventListener("focusin",a=>{!a.target.classList.contains("is-sticky-input-bugged")||a.timeStamp-i<50||(Object(r.a)(a.target),document.addEventListener("touchmove",o,n),document.addEventListener("touchstart",n=>{if(n.touches.length>1)return;const o=n.touches[0];t=o[e]}))},{passive:!0}),document.addEventListener("focusout",e=>{document.removeEventListener("touchmove",o,n),i=e.timeStamp},{passive:!0}),document.addEventListener("visibilitychange",()=>{document.activeElement&&document.activeElement.classList.contains("is-sticky-input-bugged")&&document.activeElement.blur&&Object(r.a)(document.activeElement)},{passive:!0})}function s(e){c&&e.classList.add("is-sticky-input-bugged")}},function(e,t,n){"use strict";function o(e){e.style.transform="translateY(-99999px)",e.focus(),setTimeout(()=>{e.style.transform=""},0)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function o(e){if(e=e||window.event){e=e.originalEvent||e;try{e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0}catch(e){}}return!1}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function o(e,t){return e.closest("."+t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function o(){return!(!document.activeElement||!document.activeElement.blur)&&(document.activeElement.blur(),!0)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";const o={id:1025907,hash:"452b0359b988148995f22ff0f4229750",version:"0.8.6",versionFull:"0.8.6 (6)",langPackVersion:"0.3.3",langPack:"macos",langPackCode:"en",domains:["web.telegram.org"],baseDcId:2,isMainDomain:"web.telegram.org"===location.hostname,suffix:"K"};o.isMainDomain&&(o.id=2496,o.hash="8da85b0d5bfe62527e5b244c209159c3"),t.a=o},function(e,t,n){"use strict";let o;function i(){return o||(o="fonts"in document?Promise.race([Promise.all(["400 1rem Roboto","500 1rem Roboto","500 1rem tgico"].map(e=>document.fonts.load(e))),new Promise(e=>setTimeout(e,1e3))]):Promise.resolve())}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";const o=-1!==navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i);t.a=o},function(e,t,n){"use strict";n.r(t);var o=n(7),i=n(6),a=n(4),r=n(2),c=n(8),s=n(9),u=n(0),d=(n(11),n(12),n(13),function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,c)}s((o=o.apply(e,t||[])).next())}))});document.addEventListener("DOMContentLoaded",()=>d(void 0,void 0,void 0,(function*(){Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)});const e=window.visualViewport||window;let t,d=!1;const l=()=>{const n=.01*(d&&!v.default.isOverlayActive?e.height||e.innerHeight:window.innerHeight);t!==n&&(b.IS_TOUCH_SUPPORTED&&t<n&&n-t>1&&Object(i.a)(),t=n,document.documentElement.style.setProperty("--vh",n+"px"))},f=new Proxy(Worker,{construct:(e,t)=>new e(t[0]+location.search)});Worker=f;const[m,b,h,v,g,p]=yield Promise.all([n.e(23).then(n.bind(null,26)),Promise.resolve().then(n.bind(null,1)),Promise.resolve().then(n.bind(null,0)),n.e(21).then(n.bind(null,15)),Promise.all([n.e(0),n.e(27)]).then(n.bind(null,16)),Promise.all([n.e(0),n.e(1)]).then(n.bind(null,14))]);if(window.addEventListener("resize",l),l(),r.a){const t=()=>{d=1===n&&r.a&&!v.default.isOverlayActive,l(),e!==window&&(d?(window.removeEventListener("resize",l),e.addEventListener("resize",l)):(e.removeEventListener("resize",l),window.addEventListener("resize",l)))};let n;v.default.addEventListener("im_tab_change",e=>{const o=void 0!==n;n=e,(o||1===n)&&t()}),v.default.addEventListener("overlay_toggle",()=>{t()})}h.IS_FIREFOX&&!s.a&&document.addEventListener("dragstart",e=>{const t=e.target;if("IMG"===t.tagName&&t.classList.contains("emoji"))return Object(a.a)(e),!1}),document.addEventListener("dragstart",e=>{var t;if("IMG"===(null===(t=e.target)||void 0===t?void 0:t.tagName))return e.preventDefault(),!1}),h.IS_FIREFOX&&document.documentElement.classList.add("is-firefox"),h.IS_APPLE?(h.IS_SAFARI&&document.documentElement.classList.add("is-safari"),document.documentElement.classList.add("emoji-supported"),h.IS_APPLE_MOBILE?document.documentElement.classList.add("is-ios"):document.documentElement.classList.add("is-mac")):h.IS_ANDROID&&document.documentElement.classList.add("is-android"),b.IS_TOUCH_SUPPORTED?document.documentElement.classList.add("is-touch"):document.documentElement.classList.add("no-touch");const P=performance.now(),y=p.default.getCacheLangPack(),[E,S]=yield Promise.all([g.default.getState(),y]);function w(e,t){e.style.opacity="0",t.then(()=>{window.requestAnimationFrame(()=>{e.style.opacity=""})})}v.default.setThemeListener(),S.appVersion!==o.a.langPackVersion&&p.default.getLangPack(S.lang_code),console.log("got state, time:",performance.now()-P);const I=E.authState;if("authStateSignedIn"!==I._){console.log("Will mount auth page:",I._,Date.now()/1e3);const e=document.getElementById("auth-pages");let t,o;if(e){t=e.querySelector(".scrollable"),b.IS_TOUCH_SUPPORTED&&!u.IS_MOBILE_SAFARI||t.classList.add("no-scrollbar"),t.style.opacity="0";const n=document.createElement("div");n.classList.add("auth-placeholder"),t.prepend(n),t.append(n.cloneNode())}try{yield Promise.all([Promise.all([n.e(0),n.e(1)]).then(n.bind(null,25)),Promise.all([n.e(0),n.e(1)]).then(n.bind(null,24))]).then(([e,t])=>{e.default.setAuthorized(!1),t.default.forceUnsubscribe()})}catch(e){}switch(I._){case"authStateSignIn":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(4),n.e(17)]).then(n.bind(null,19))).default.mount();break;case"authStateSignQr":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(18)]).then(n.bind(null,21))).default.mount();break;case"authStateAuthCode":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(4),n.e(14)]).then(n.bind(null,22))).default.mount(I.sentCode);break;case"authStatePassword":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(12)]).then(n.bind(null,20))).default.mount();break;case"authStateSignUp":o=(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(6),n.e(13)]).then(n.bind(null,23))).default.mount(I.authCode)}if(t){o&&(yield o);w(t,"fonts"in document?Promise.race([new Promise(e=>setTimeout(e,1e3)),document.fonts.ready]):Promise.resolve())}}else console.log("Will mount IM page:",Date.now()/1e3),w(document.getElementById("main-columns"),Object(c.a)()),(yield Promise.all([n.e(0),n.e(1),n.e(2),n.e(29)]).then(n.bind(null,18))).default.mount();const O=(yield n.e(19).then(n.bind(null,17))).ripple;Array.from(document.getElementsByClassName("rp")).forEach(e=>O(e))})))},function(e,t,n){},function(e,t,n){},function(e,t,n){}]);
//# sourceMappingURL=main.3f7a70559679af85e450.bundle.js.map