!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=108)}({0:function(e,t,n){var o,r;!function(i,l){"use strict";o=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(o){return"debug"===o&&(o="log"),typeof console!==t&&("trace"===o&&n?i:void 0!==console[o]?r(console,o):void 0!==console.log?r(console,"log"):e)}function c(t,n){for(var r=0;r=0&&n<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&u(n),c.call(l,n,e),typeof console===t&&nError loading Element

${e}

If this is unexpected, please contact your system administrator or technical support representative.

`;const t=document.getElementsByClassName("mx_HomePage_container"),n=document.getElementsByClassName("mx_HomePage_errorContainer");for(const e of t)e.innerHTML="";for(const t of n)t.style.display="block",t.innerHTML=e}!async function(){document.getElementById("back_to_element_button").onclick=i;const e=await Object(r.a)(".."),t=e.default_server_config,n=e.default_server_name,c=e.default_hs_url,a=e.default_is_url,s=[t,n,c].filter((e=>!!e));if(s.length>1)return l("Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.");if(s.length<1)return l("Invalid configuration: no default server specified.");let u="",f="";if(t&&t["m.homeserver"]&&(u=t["m.homeserver"].base_url,t["m.identity_server"]&&(f=t["m.identity_server"].base_url)),n)try{const e=await fetch(`https://${n}/.well-known/matrix/client`),t=await e.json();t&&t["m.homeserver"]&&(u=t["m.homeserver"].base_url,t["m.identity_server"]&&(f=t["m.identity_server"].base_url))}catch(e){return o.a.error(e),l("Unable to fetch homeserver configuration")}if(c&&(u=c,f=a),!u)return l("Unable to locate homeserver");u&&!u.endsWith("/")&&(u+="/"),f&&!f.endsWith("/")&&(f+="/"),"https://matrix.org/"!==u&&(document.getElementById("configure_element_button").href="https://mobile.element.io?hs_url="+encodeURIComponent(u)+"&is_url="+encodeURIComponent(f),document.getElementById("step1_heading").innerHTML="1: Install the app",document.getElementById("step2_container").style.display="block",document.getElementById("hs_url").innerText=u,f&&(document.getElementById("custom_is").style.display="block",document.getElementById("is_url").style.display="block",document.getElementById("is_url").innerText=f))}()},12:function(e,t,n){"use strict";async function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e||e.endsWith("/")||(e+="/");const t=r(`${e}config.${document.domain}.json`),n=r(e+"config.json");try{const e=await t;if(0===Object.keys(e).length)throw new Error;return e}catch(e){return n}}async function r(e){const t=new URL(e,window.location.href);t.searchParams.set("cachebuster",Date.now().toString());const n=await fetch(t,{cache:"no-cache",method:"GET"});return 404===n.status||0===n.status?{}:n.ok?n.json():void 0}n.d(t,"a",(function(){return o}))}}); //# sourceMappingURL=mobileguide.js.map