!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1506)}({1506:function(t,e,r){"use strict";r.r(e);var n=r(33),o=r.n(n),i=r(52),a=r.n(i),u=r(243);function s(){document.cookie="riot_mobile_redirect_to_guide=false;path=/;max-age=14400",window.location.href="../"}function c(t){t="

Error loading Riot

".concat(t,"

").concat("If this is unexpected, please contact your system administrator or technical support representative.","

");var e=document.getElementsByClassName("mx_HomePage_container"),r=document.getElementsByClassName("mx_HomePage_errorContainer"),n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){a.value.innerHTML=""}}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}var s=!0,c=!1,l=void 0;try{for(var f,d=r[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;h.style.display="block",h.innerHTML=t}}catch(t){c=!0,l=t}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}function l(){return(l=a()(o.a.mark((function t(){var e,r,n,i,a,l,f,d,h,p;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return document.getElementById("back_to_riot_button").onclick=s,t.next=3,Object(u.a)("..");case 3:if(e=t.sent,r=e.default_server_config,n=e.default_server_name,i=e.default_hs_url,a=e.default_is_url,!((l=[r,n,i].filter((function(t){return!!t}))).length>1)){t.next=11;break}return t.abrupt("return",c("Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url."));case 11:if(!(l.length<1)){t.next=13;break}return t.abrupt("return",c("Invalid configuration: no default server specified."));case 13:if(f="",d="",r&&r["m.homeserver"]&&(f=r["m.homeserver"].base_url,r["m.identity_server"]&&(d=r["m.identity_server"].base_url)),!n){t.next=31;break}return t.prev=17,t.next=20,fetch("https://".concat(n,"/.well-known/matrix/client"));case 20:return h=t.sent,t.next=23,h.json();case 23:(p=t.sent)&&p["m.homeserver"]&&(f=p["m.homeserver"].base_url,p["m.identity_server"]&&(d=p["m.identity_server"].base_url)),t.next=31;break;case 27:return t.prev=27,t.t0=t.catch(17),console.error(t.t0),t.abrupt("return",c("Unable to fetch homeserver configuration"));case 31:if(i&&(f=i,d=a),f){t.next=34;break}return t.abrupt("return",c("Unable to locate homeserver"));case 34:f&&!f.endsWith("/")&&(f+="/"),d&&!d.endsWith("/")&&(d+="/"),"https://matrix.org/"!==f&&(document.getElementById("configure_riot_button").href="https://riot.im/config/config?hs_url="+encodeURIComponent(f)+"&is_url="+encodeURIComponent(d),document.getElementById("step1_heading").innerHTML="1: Install the app",document.getElementById("step2_container").style.display="block",document.getElementById("hs_url").innerText=f,d&&(document.getElementById("custom_is").style.display="block",document.getElementById("is_url").style.display="block",document.getElementById("is_url").innerText=d));case 37:case"end":return t.stop()}}),t,null,[[17,27]])})))).apply(this,arguments)}!function(){l.apply(this,arguments)}()},186:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=b(a,r);if(u){if(u===c)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c={};function l(){}function f(){}function d(){}var h={};h[o]=function(){return this};var p=Object.getPrototypeOf,y=p&&p(p(E([])));y&&y!==e&&r.call(y,o)&&(h=y);var m=d.prototype=l.prototype=Object.create(h);function v(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var u=s(t[n],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(l).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,a)}))}a(u.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},243:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(33),o=r.n(n),i=r(52),a=r.n(i),u=r(69),s=r.n(u);function c(t){return l.apply(this,arguments)}function l(){return(l=a()(o.a.mark((function t(e){var r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e=""),""===e||e.endsWith("/")||(e+="/"),t.prev=2,t.next=5,f("".concat(e,"config.").concat(document.domain,".json"));case 5:if(r=t.sent,0!==Object.keys(r).length){t.next=8;break}throw new Error;case 8:return t.abrupt("return",r);case 11:return t.prev=11,t.t0=t.catch(2),t.next=15,f(e+"config.json");case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[2,11]])})))).apply(this,arguments)}function f(t){return new Promise((function(e,r){s()({method:"GET",url:t,qs:{cachebuster:Date.now()}},(function(t,n,o){try{if(t||n.status<200||n.status>=300)return n&&(404==n.status||0==n.status&&""==o)&&e({}),void r({err:t,response:n});e(JSON.parse(o))}catch(t){r({err:t})}}))}))}},33:function(t,e,r){t.exports=r(186)},52:function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,s,"next",t)}function s(t){r(a,o,i,u,s,"throw",t)}u(void 0)}))}}},69:function(t,e,r){var n,o,i;o=[],void 0===(i="function"==typeof(n=function(){var t=XMLHttpRequest;if(!t)throw new Error("missing XMLHttpRequest");function e(i,a){if("function"!=typeof a)throw new Error("Bad callback given: "+a);if(!i)throw new Error("No options given");var u=i.onResponse;if((i="string"==typeof i?{uri:i}:JSON.parse(JSON.stringify(i))).onResponse=u,i.verbose&&(e.log=function(){var t,e,r={},i=["trace","debug","info","warn","error"];for(e=0;e>18&63,i=s>>12&63,a=s>>6&63,u=63&s,h[f++]=c.charAt(o)+c.charAt(i)+c.charAt(a)+c.charAt(u)}while(l299)&&n.error){for(var o in t=new Error("CouchDB error: "+(n.error.reason||n.error.error)),n)t[o]=n[o];return r(t,e,n)}return r(t,e,n)}))},e})?n.apply(e,o):n)||(t.exports=i)}});