!function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",u="object"==typeof module,l=t.regeneratorRuntime;if(l)u&&(module.exports=l);else{(l=t.regeneratorRuntime=u?module.exports:{}).wrap=k;var c="suspendedStart",h="suspendedYield",f="executing",d="completed",v={},p={};p[o]=function(){return this};var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==n&&r.call(g,o)&&(p=g);var m=O.prototype=_.prototype=Object.create(p);b.prototype=m.constructor=O,O.constructor=b,O[a]=b.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(m),t},l.awrap=function(t){return{__await:t}},L(P.prototype),P.prototype[s]=function(){return this},l.AsyncIterator=P,l.async=function(t,e,n,r){var i=new P(k(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},L(m),m[a]="Generator",m[o]=function(){return this},m.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=S,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:S(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}}}function k(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),s=new C(r||[]);return o._invoke=function(t,e,n){var r=c;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=w(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function b(){}function O(){}function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(t){var e;this._invoke=function(n,i){function o(){return new Promise(function(e,o){!function e(n,i,o,s){var a=w(t[n],t,i);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,s)})}s(a.arg)}(n,i,e,o)})}return e=e?e.then(o,o):o()}}function x(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function S(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i0){this.Z.splice(e,1);for(var n=this.dt(t),r=0,i=n.length;r0){var t=arguments[0],n=Array.prototype.slice.call(arguments,1);return e.F(t)&&(0===n.length||e.Zt.apply(null,[t[n[0]]].concat(n.slice(1))))}return!1}},{key:"gt",value:function(t){return null===t||void 0===t}},{key:"F",value:function(t){return!e.gt(t)}},{key:"o",value:function(t,n){return e.F(t)?t:n}},{key:"te",value:function(t){return!e.empty(t)}},{key:"ee",value:function(t){var e=[];for(var n in t)e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return"?"+e.join("&")}},{key:"empty",value:function(t){return e.gt(t)||"string"==typeof t&&""===t.trim()}},{key:"ne",value:function(t){var e=document.createElement("template");return e.innerHTML=t,e.content.childNodes}},{key:"se",value:function(){var t="http://www.w3.org/2000/svg",e=document.createElement("div");e.className="loader";var n=document.createElementNS(t,"svg");n.setAttribute("viewBox","0 0 32 32"),n.setAttribute("widh","32"),n.setAttribute("height","32");var r=document.createElementNS(t,"circle");return r.setAttribute("id","spinner"),r.setAttribute("cx","16"),r.setAttribute("cy","16"),r.setAttribute("r","14"),r.setAttribute("fill","none"),n.appendChild(r),e.appendChild(n),e}},{key:"jt",value:function(t){return a.i()+t}},{key:"re",value:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)}},{key:"ie",value:function(){return null!==navigator.userAgent.match(/Android|BlackBerry|Opera Mini|IEMobile/i)||e.re()||void 0!==window.orientation||!1===window.orientation||null===window.orientation}},{key:"select",value:function(t){var e=document.createRange();e.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)}},{key:"format",value:function(t,e){for(t=""+t;t.length0&&(o=new Array(r+1-s).join("0")+o),n+=o}return n}},{key:"ae",value:function(t,e){for(var n=Math.floor(Math.log(265)/Math.log(e)),r=t.match(new RegExp(".{1,"+n+"}","g"))||[],i="",o=0,s=r.length;o1&&0==(3&a)&&(a%100!=0||a%400==0)?1:0),3),"%k":""+u,"%l":(u+11)%12+1,"%m":v(s+1,2),"%M":v(n.getMinutes(),2),"%p":u<12?"AM":"PM","%P":u<12?"am":"pm","%s":Math.round(n.getTime()/1e3),"%S":v(n.getSeconds(),2),"%u":i||7,"%V":function(){var t=f(),e=t.valueOf();t.setMonth(0,1);var n=t.getDay();return 4!==n&&t.setMonth(0,1+(4-n+7)%7),v(1+Math.ceil((e-t)/6048e5),2)}(),"%w":""+i,"%x":n.toLocaleDateString(),"%X":n.toLocaleTimeString(),"%y":(""+a).slice(2),"%Y":a,"%z":n.toTimeString().replace(/.+GMT([+-]\d+).+/,"$1"),"%Z":n.toTimeString().replace(/.+\((.+?)\)$/,"$1")}[t]||t})}},{key:"he",value:function(n){var r=void 0;if(e.gt(n)||"object"!=(void 0===n?"undefined":t(n)))return n;if(n instanceof Array){var i=[];for(r=0;r",""":'"',"'":"'","’":"’","‘":"‘","–":"–","—":"—","…":"…","”":"”"};return e.F(t)&&"function"==typeof t.replace?t.replace(/\&[\w\d\#]{2,5}\;/g,function(t){return n[t]}):t}},{key:"de",value:function(t){var e=new FormData;for(var n in t)e.set(n,t[n]);return e}},{key:"me",value:function(t,n){var r=window.getComputedStyle(t),i=window.getComputedStyle(n);if(i.height>r.height||i.width>r.width)return e.ge(t,n)}},{key:"ge",value:function(t,n){e.pe(t);for(var r=window.getComputedStyle(t),i=window.getComputedStyle(n),o=0,s=parseFloat(i.getPropertyValue("font-size")),a=i.width,u=i.height;i.height>r.height||i.width>r.width;)if(s*=.95,u>r.height&&(u*=.95),a>i.width&&(a*=.95),n.style["font-size"]=s+"px",n.style["max-height"]=u+"px",n.style["max-width"]=a+"px",++o>2e3){console.log("breaked");break}e.fe(n),i=window.getComputedStyle(n),n.style["font-size"]=parseFloat(i.getPropertyValue("font-size"))/parseFloat(document.documentElement.clientHeight)*100+"vh"}},{key:"pe",value:function(t){for(var n=t.childNodes,r=0,i=n.length;r-1,i=e.userAgent.indexOf("Edge")>-1;return!!e.userAgent.match("CriOS")||null!==t&&void 0!==t&&"Google Inc."===n&&!1===r&&!1===i}},{key:"Se",value:function(t,e){for(var n={},r=0,i=t.length;r0&&(n=r[0])}else-1!==t.ye.indexOf(e)&&(n=e);if(v.F(n)){localStorage.setItem("currentTheme",n.Te);var i=new Promise(function(t){document.querySelector("nav.top-bar").addEventListener("transitionend",function(){t()})});document.body.className=n.Pe,t.be=n;for(var o=0,s=t.Le.length;o0?t.ve(n[0]):t.ye.length>0&&t.ve(t.ye[0])}}},{key:"Ce",value:function(){return new u(t.be.Te,function(e){var n=(t.ye.indexOf(t.be)+1)%t.ye.length;t.ve(t.ye[n]),e.title=t.be.Te,e.m.U()},c.q)}},{key:"addChangeListener",value:function(e){t.Le.push(e)}}]),t}();p.ye=[],p.Le=[];var y=function(){function t(e){s(this,t),this.Fe=e,this.xe=!0,this.De=3650,this.Re="complianceCookie",this.Be="true"}return n(t,[{key:"ke",value:function(){t.Ie(this.Re)!==this.Be&&this.show()}},{key:"Ue",value:function(){this.Ee(this.Re,this.Be,this.De)}},{key:"Ee",value:function(t,e,n){var r=void 0;if(v.F(n)){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),r="; expires="+i.toGMTString()}else r="";this.xe&&(document.cookie=t+"="+e+r+"; path=/")}},{key:"Oe",value:function(t){this.Ee(t,"",-1)}},{key:"show",value:function(){var t=this,e=document.getElementById(this.Fe);e.style.display="block",e.querySelector("#close-cookie-msg").onclick=function(){t.Ue(),e.remove()}}}],[{key:"Ie",value:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r0||("smedium"===t||"small"===t)&&r.Ve(e.getElementsByClassName(c.h)).length>0||"small"===t&&r.Ve(e.getElementsByClassName(c.pt)).length>0||r.Ve(e.getElementsByClassName(c.X)).length>0?document.getElementById("responsive-menu-toggle").style.display="block":(document.getElementById("responsive-menu-toggle").style.display="none",v.F(r.We)&&r.We.close())}},{key:"lt",value:function(){var t=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"lt",this).call(this);return function(e){t(e)instanceof l||!v.F(r.We)||r.We.close()}}},{key:"rt",value:function(t){var n=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rt",this).call(this,t);return this.Ne(),r.We=this,n}},{key:"close",value:function(){document.getElementById("responsive-menu").style.display="none";for(var t=0,e=this.tt.length;t0;){var i=this.Yn.firstChild;i.remove(),r.appendChild(i)}this.Zn={dn:r,title:document.title},console.log(this.Zn);var o=this;window.onpopstate=function(){if(o.qn.length>=1){var t=o.qn[o.qn.length-1].In();!1!==t.Cn()&&o.Sn(t)}}}return n(t,[{key:"cn",value:function(){return this.Zn}},{key:"ts",value:function(t){this.Qn=t}},{key:"fn",value:function(){return this.Qn}},{key:"es",value:function(t){this.Gn.push(t)}},{key:"yn",value:function(){return this.Gn}},{key:"pn",value:function(t,e){if(!(t.prototype instanceof w))throw{error:"wrong class given! Expected AbstractSite, given "+t.name};var n=new t(this),r={},i=new Promise(function(t,e){r.resolve=t,r.reject=e}),o=new _(n,r);this.zn.removeAllChildren().appendChild(v.se());var s=this;return this.$n=new Promise(function(t){Promise.resolve(e).then(function(t){return o.jn(t),Promise.all([n.Qe(t),n.Ke])}).then(function(){n.ln=n.vn(s.ns())}).then(function(){t(s.show(o))})}),i}},{key:"Sn",value:function(t,e){var n=this;this.$n.then(function(){var r=n.ss(t),i=n.qn.splice(r,1),o=null;if((i=i[0])===n.Kn){n.Kn.In().en(),n.Kn=null;var s=n.qn.length-1;if(s<0)return n.rs(),void n.pn(n.Qn);n.zn.removeAllChildren().appendChild(v.se()),o=n.qn[s]}i.In().nn(),Promise.resolve(e).then(function(t){i.Vn().resolve(t),v.F(o)&&n.show(o)})})}},{key:"addListener",value:function(t,e,n,r){this.zn.addEventListener(e,function(e){var i=e.target;t.in&&i.matches(n)&&r(i,e)})}},{key:"xn",value:function(t,e,n,r,i){this.addListener(t,n,r,i),this.Fn(t,e,i)}},{key:"Fn",value:function(t,e,n){window.addEventListener("keydown",function(r){t.in&&r.which===e&&n(this,r)})}},{key:"Mn",value:function(t){var e=this.ss(t),n=this.qn.splice(e,1);n=n[0],this.show(n)}},{key:"refreshCurrentSite",value:function(){return this.show(this.Kn)}},{key:"show",value:function(t){v.F(this.Kn)&&(this.Kn.Nn(this.Kn.In().en()),this.Kn.On(this.zn.innerHTML)),this.zn.removeAllChildren().appendChild(v.se());var e=this;return this.Kn=t,-1===this.qn.indexOf(t)&&this.qn.push(t),t.In().Ke.then(function(n){return t.In().ln.U(),e.zn.removeAllChildren().appendChild(n),e.mn(),d.Vt().Jt(),n}).then(function(n){t.In().Ye(t.Wn()),history.pushState({siteName:t.In().constructor.name,siteData:n.outerHTML,stackPosition:e.qn.length-1},t.In().constructor.name,t.In().An())})}},{key:"Pn",value:function(t){if(v.F(this.Kn)&&this.Kn.In()===t){history.replaceState({siteName:t.constructor.name,siteData:t.ze.outerHTML,stackPosition:this.qn.length-1},t.constructor.name,t.An())}}},{key:"os",value:function(){if(null!=this.Kn)return this.Kn.In()}},{key:"as",value:function(){null!=this.Kn&&this.Kn.In().ln.U()}},{key:"mn",value:function(){var t=this.os().title;this.Yn.removeAllChildren().appendChild(t.dn),document.title=v.o(t.title,this.Zn.title)}},{key:"ss",value:function(t){for(var e=0,n=this.qn.length;e=0&&(this.ms[e].remove(!0),this.ms.splice(e,1))}},{key:"pn",value:function(t,e){return this.us.pn(t,e)}},{key:"start",value:function(e){a.t(this.s);var n=v.o(this.Ls(),e),r=t.xs();this.fs=e,d.init(),p.init(),this.gs&&this.es(p.Ce()),this.us=new b(this.cs,this.hs),this.us.Gn=this.ms,this.us.ts(e),this.us.pn(n,r),this.As(),this.ps&&new y("cookie-compliance").ke()}}],[{key:"Cs",value:function(t){if(v.gt(t))return null;for(var e={},n=[],r=t.split("&"),i=0;i0&&(e[n[0]]=decodeURIComponent(n[1]));return e}},{key:"xs",value:function(){return t.Cs(window.location.search.substr(1))}}]),t}(),P=function(){function t(e,n){s(this,t),this.Ds=null,this.content=null,this.Rs=null,this.cancelable=!0,this.title=v.o(n,""),this.Bs=!0,this.ks="",this.buttons=[],this.result=null,v.F(e)&&this.Is(e)}return n(t,[{key:"T",value:function(t){return this.title=t,this}},{key:"Us",value:function(t){this.Bs=t}},{key:"Es",value:function(t){this.ks=t}},{key:"A",value:function(){return this.title}},{key:"Os",value:function(t){return this.cancelable=!0===t,this}},{key:"Is",value:function(){var t=r(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.Ws=Promise.resolve(e),t.next=3,this.Ws;case 3:return this.content=t.sent,t.abrupt("return",this);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"Ns",value:function(t,e,n){n=v.o(n,!0);var r=null;"string"==typeof t?((r=document.createElement("button")).classList.add("button"),r.classList.add("right"),r.appendChild(d.ut(t))):r=t;var i=this;if("function"!=typeof e){var o=e;e=function(){i.result=o}}var s;s=n?function(t){v.F(e)&&e(t),i.close()}:e,v.F(s)&&r.addEventListener("click",s),this.buttons.push(r)}},{key:"show",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r,i,o,s,a,u,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for((e=document.createElement("span")).classList.add("title"),this.Bs&&""!==this.title?e.appendChild(d.ut(this.title)):e.innerHTML=this.title,(n=document.createElement("div")).appendChild(e),(r=document.createElement("div")).classList.add("content-container"),(i=document.createElement("div")).className=this.ks,i.classList.add("modal"),i.appendChild(n),i.appendChild(r),(o=document.createElement("div")).classList.add("modal-button-container"),s=0,a=this.buttons.length;s0&&e.js(e.zs,i),e.zs++}}]),e}();x.zs=0,x.qs=3500,x.Ks=1e3,x.Js="success",x.Xs="error",x.$s="default",x.Gs="info",x.Qs="warning";var j=function(){function t(){s(this,t)}return n(t,null,[{key:"Ys",value:function(e){if("function"==typeof e){var n=e;e=t.Zs.then(function(t){return n(t)})}t.tr.push(e)}},{key:"resolve",value:function(e){return t.er(e),t.Zs.then(function(){return Promise.all(t.tr)})}}]),t}();j.tr=[],j.Zs=new Promise(function(t){j.er=t});var E=function(){function t(e,n){s(this,t);var r=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.nr;this.sr=r.open(e,n);var i=this;this.sr.onupgradeneeded=function(t){i.rr(i.sr.result,t.oldVersion,t.newVersion,t)},this.ir=new Promise(function(t){i.sr.onsuccess=function(e){i.Lt=i.sr.result,t(e)}})}return n(t,[{key:"or",value:function(t,e,n){var r=this;"function"==typeof e&&v.gt(n)&&(n=e,e="read"),this.ir.then(function(){var i=null;try{i=r.sr.result.transaction(t,e)}catch(e){console.warn(e),i=r.sr.result.transaction(t)}n(i)})}},{key:"ar",value:function(t,e,n){"function"==typeof e&&v.gt(n)&&(n=e,e="readonly"),this.or(t,e,function(e){n(e.objectStore(t))})}},{key:"lr",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){var n=e.put(t);n.onsuccess=r,n.onerror=function(t){throw{type:"indexed-db-error",event:t}}})})}},{key:"ur",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){for(var n=[],i=function(r,i){n.push(new Promise(function(n){var r=e.put(t[i]);r.onsuccess=n,r.onerror=function(t){throw{type:"indexed-db-error",event:t}}}))},o=0,s=t.length;o=0){var n=new P("optimistic-locking-dialog","optimistic-locking-dialog-title");n._s(),n.show()}else t(e)}:t,this.Xr=n}},{key:"Gr",value:function(){if(!this.zr){var t=this;return this.submit().then(function(e){if(e.success){if(null!==t.Kr)return t.Kr(e.result)}else if(v.F(t.Xr))return t.Xr(e.errors)})}}},{key:"load",value:function(t,e){return this.Yr(V.load(t,e).then(function(t){return t.success?t.result:{}})),this}},{key:"Yr",value:function(t){this.Zr(!0);var e=this;return Promise.resolve(t).then(function(t){for(var n in e.Zr(!1),t)if(v.F(e.Vr.elements[n])){if(v.F(e.Vr.elements[n].options)&&v.F(t[n+"Options"])){var r=e.Vr.elements[n].options;for(var i in t[n+"Options"]){var o=document.createElement("option");o.value=i,o.innerText=t[n+"Options"][i],r.add(o)}}e.Vr.elements[n].value=v.ce(t[n]),v.F(t[n])&&""!==(""+t[n]).trim()?e.Vr.elements[n].classList.add("notEmpty"):e.Vr.elements[n].classList.remove("notEmpty")}return e})}},{key:"$r",value:function(){var t=r(regeneratorRuntime.mark(function t(e){var n,r,i,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(i in n=!1,r=null,e)v.F(this.Vr.elements[i])&&"hidden"!==this.Vr.elements[i].type&&v.gt(this.Vr.elements[i].ti)&&(v.gt(this.Vr.elements[i].disabled)||!this.Vr.elements[i].disabled)&&(this.Vr.elements[i].setCustomValidity(d.translate(v.o(e[i],"form-default-error"))),n=!0),v.gt(r)&&(r=v.o(e[i],"form-default-error"));if(n||!v.F(r)){t.next=11;break}t.t0=regeneratorRuntime.keys(this.Vr.elements);case 4:if((t.t1=t.t0()).done){t.next=11;break}if(o=t.t1.value,"hidden"===this.Vr.elements[o].type){t.next=9;break}return this.Vr.elements[o].setCustomValidity(d.translate(r)),n=!0,t.abrupt("break",11);case 9:t.next=4;break;case 11:n&&this.Vr.querySelector("input[type=submit]").click();case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"Zr",value:function(t){this.zr=t,this.zr?this.Vr.classList.add("sending"):this.Vr.classList.remove("sending")}},{key:"submit",value:function(){var t=this;return new Promise(function(e){t.Zr(!0);var n=new FormData(t.Vr);e(t.qr(n))}).then(function(e){return t.Zr(!1),e})}},{key:"ei",value:function(t){this.Kr=t}}]),t}(),K=function(){function t(){s(this,t),this.si=null,this.ri="settings"}return n(t,null,[{key:"Vt",value:function(){return null===t.ni&&(t.ni=new t),t.ni}}]),n(t,[{key:"ii",value:function(){return v.gt(this.si)&&this.oi(),this.si}},{key:"ai",value:function(t,e){var n=this.ii();return v.F(n[t])?n[t].value:e}},{key:"li",value:function(t){this.ii(),delete this.si[t],this.ui()}},{key:"hi",value:function(t,e){this.ii(),this.si[t]={ci:(new Date).getTime(),value:e},this.ui()}},{key:"di",value:function(t){for(var e in this.ii(),t)this.si[e]=t[e];this.ui()}},{key:"mi",value:function(t){return v.o(this.si[t])}},{key:"oi",value:function(){this.si=localStorage.getItem(this.ri),null===this.si?this.si={}:this.si=JSON.parse(this.si)}},{key:"ui",value:function(){null!==this.si&&localStorage.setItem(this.ri,JSON.stringify(this.si))}}]),t}();K.ni=null;var q=function(){function t(e,n,r){s(this,t),this.Te=e,this.gi=n,this.pi=v.o(r,!0),this.fi=!0,this.wi=-1,this.Si=null}return n(t,[{key:"Mi",value:function(t){return this.Si=t,this}},{key:"Hi",value:function(t){this.wi=t}},{key:"vi",value:function(){return this.Te}},{key:"yi",value:function(){return this.gi}},{key:"Ti",value:function(){var t=document.createElement("th");return t.appendChild(this.pi?d.ut(this.gi):document.createTextNode(this.gi)),this.fi&&(t.classList.add("sort"),t.dataset.sort=this.Te),t.dataset.column=this.wi,this.Pi=t,this.Pi}},{key:"bi",value:function(){return this.Te}},{key:"Li",value:function(t){return t}},{key:"Ai",value:function(){var t=document.createElement("td");return t.classList.add(this.Te),t.dataset.column=this.wi,v.F(this.Si)&&t.classList.add("clickable"),t}},{key:"click",value:function(t,e,n){v.F(this.Si)&&this.Si(t,e,n)}}]),t}(),D=function(){function t(e,n,r,o){var a;return s(this,t),(a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).fi=!1,a.Ci=v.o(o,!1),a}return o(t,q),n(t,[{key:"bi",value:function(){return null}},{key:"Ai",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ai",this).call(this);return n.classList.remove(this.Te),n.appendChild(this.Ci?d.ut(this.Te):document.createTextNode(this.Te)),n}}]),t}(),Z=function(){function t(e,n,r){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r=v.o(r,!1)))}return o(t,q),n(t,[{key:"Ti",value:function(){return document.createTextNode("")}},{key:"bi",value:function(){return{data:[this.Te]}}},{key:"Ai",value:function(){return document.createTextNode("")}}]),t}(),z=function(){function t(e,n,r){var o;return s(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).Ci=!1,o}return o(t,D),n(t,[{key:"Ai",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ai",this).call(this),r=document.createElement("img");return r.src=this.Te,n.removeAllChildren().appendChild(r),n}}]),t}(),H=function(){function t(e,n,r){s(this,t),this.Fi=e,this.xi=v.o(n,{}),this.Di=r,"string"==typeof this.Fi&&(this.Fi=document.getElementById(this.Fi)),this.Ri=[],Array.isArray(n)?this.Ri=n:v.F(n.columns)&&(this.Ri=n.columns)}return n(t,[{key:"Li",value:function(t){if(console.log("prepareData",t),v.F(t))for(var e=0,n=t.length;en&&o.Ri[n].click(e,i,t)}),this.list=i,i}},{key:"Ii",value:function(){for(var t=document.createElement("tr"),e=document.createElement("tr"),n=[],r=0,i=this.Ri.length;r=1&&(n=this.Bi(n),r[0].values(n))}},{key:"Oi",value:function(t){t?this.Fi.classList.add("sending"):this.Fi.classList.remove("sending")}}]),t}(),Y=function(){function t(e){s(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"core/html/settings.html","settings"));for(var r in t.Wi)n.Ni(r,new t.Wi[r](n));return n.active=null,n}return o(t,w),n(t,[{key:"Ni",value:function(t,e){this.sn("#settings-fragments",e),delete this.$e["#settings-fragments"],this.$e[t]=e}},{key:"Ye",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ye",this).call(this);return v.F(this.active)&&!this.$e[this.active].tn()&&this.setActive(null),this._i(),n}},{key:"setActive",value:function(t){v.F(this.active)&&(this.$e[this.active].Ke.then(function(t){t.classList.remove("active")}),this.rn("#show-fragment-"+this.active).classList.remove("active")),this.active=t,v.F(this.active)&&(this.$e[this.active].Ke.then(function(t){t.classList.add("active")}),this.rn("#show-fragment-"+this.active).classList.add("active"))}},{key:"_i",value:function(){var t=this,e=this.rn("#settings-fragment-list");e.removeAllChildren();var n=this,r=function(r){if(t.$e[r].tn()){var i=document.createElement("li");i.id="show-fragment-"+r,i.appendChild(d.ut(r,null,"a")),i.addEventListener("click",function(){n.setActive(r)}),e.appendChild(i),v.gt(t.active)&&t.setActive(r)}};for(var i in this.$e)r(i)}}],[{key:"Ni",value:function(e,n){t.Wi[e]=n}},{key:"ji",value:function(e){t.Vi=e}}]),t}();Y.Wi={},Y.Vi=!0,j.Ys(function(t){if(Y.Vi){t.Ts("settings",Y);var e=new u("settings",function(){t.pn(Y)},u.K,1e4);e.N("img/settings.png"),t.es(e)}});var W=function(){function t(){s(this,t)}return n(t,[{key:"Ji",value:function(t,e,n,r,i,o,s){console.log("test"),o=v.o(o,10),r=v.o(r,!1),i=v.o(i,!1),s=v.o(s,e.innerHTML.length);var a=n.classList.contains("no-transition");n.classList.add("no-transition");var u=1,l=0,c=0,h=0,f=0,d=0;do{u+=l/(s+1),e.style.fontSize=u+"px";var p=window.getComputedStyle(n);f=p.getPropertyValue("width").replace("px",""),d=p.getPropertyValue("height").replace("px",""),c=f-e.offsetWidth,h=d-e.offsetHeight;var y=i?h:r?c:Math.min(c,h);if(y===l)break;l=y}while((c>(1-t)*f||i)&&(h>(1-t)*d||r));e.style.fontSize=u-o+"px",a||n.classList.remove("no-transition");var g=this;window.addEventListener("resize",function(){setTimeout(function(){g.Ji(t,e,n,r,i,o,s)},255)})}},{key:"zi",value:function(t,e,n,r,i,o){return this.Ji(1,t,e,n,r,i,o)}}]),t}(),$=function(){function t(e){s(this,t),"string"==typeof e&&(e={code:e}),this.qi=e,this.Ki=!1}return n(t,[{key:"Xi",value:function(t){this.Ki=t}},{key:"$i",value:function(){return this.Ki}},{key:"Gi",value:function(){return V.send("c/code",this.qi)}}]),t}(),U=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"core/html/load.html","code"))}return o(t,w),n(t,[{key:"Qe",value:function(n){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n),console.log(n);Promise.resolve();if(v.F(n.code)){var r=n.code,i=v.o(n.cachable,!1),o=new $(r);o.Xi(i);var s=this;o.Gi().then(function(t){t.success?x.Vs(x.Js,d.translate(v.o(t.result.successMessage,"code-activated"))):x.Vs(x.Js,d.translate(t.errors[0])),s.finish()})}}}]),t}();j.Ys(function(t){t.Ts("code",U)});var J=function(){function t(){s(this,t)}return n(t,null,[{key:"init",value:function(e){t.Qi=null,t.Yi={Zi:!1,id:null,accesses:["default"]},t.app=e,t.to=new Promise(function(e){t.eo=e})}},{key:"setData",value:function(e){t.Yi=Object.assign(t.Yi,e);var n=t.app.ws();n&&n.as()}},{key:"no",value:function(e){return t.Qi=v.o(e,t.Qi),V.load(t.Qi).then(function(e){e.success&&t.setData(e.result),t.eo()})}},{key:"so",value:function(){return V.load("u/logout").then(function(e){if(e.success){t.setData(e.result);var n=t.app.ws();n&&n.refreshCurrentSite(),x.Vs(x.Js,d.translate("logged-out-successfully"))}})}},{key:"ro",value:function(e){return t.Yi.accesses.indexOf(e)>=0}},{key:"io",value:function(e,n){t.oo(function(r){n(r&&t.ao(e))})}},{key:"oo",value:function(e){this.to.then(function(){e(t.lo())})}},{key:"ao",value:function(e){return t.Yi.id===e}},{key:"lo",value:function(){return v.F(t.Yi)&&v.F(t.Yi.id)}}]),t}();j.Ys(function(t){return J.init(t),J.no("u/me").then(function(){J.oo(function(t){if(t){var e=K.Vt(),n=v.he(e.ii());for(var r in n)n[r].value=JSON.stringify(n[r].value);V.send("u/syncSettings",n).then(function(t){if(t.success){for(var n in t.result)t.result[n].value=JSON.parse(t.result[n].value);e.di(t.result)}})}})})});var X=function(){function t(e,n,r,o,a){var u;return s(this,t),(u=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o))).uo=v.o(a,"default"),u}return o(t,u),n(t,[{key:"k",value:function(){return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"k",this).call(this)&&J.ro(this.uo)}},{key:"ho",value:function(){return this.uo}},{key:"V",value:function(n){var r=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"V",this).call(this,v.o(n,new t));return r.uo=this.uo,r}}]),t}(),G=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/403.html"))}return o(t,w),t}(),Q=function(){function t(e,n,r,o){var a;return s(this,t),(a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).uo=o,a}return o(t,w),n(t,[{key:"Qe",value:function(n){return J.ro(this.uo)?e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n):(this.pn(G),void this.finish({error:403}))}},{key:"Ye",value:function(n){return J.ro(this.uo)?e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ye",this).call(this,n):(this.pn(G),void this.finish({error:403}))}}]),t}(),tt=function(){function t(e,n,r,o){s(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o)),u=e.querySelector("#email"),l=e.querySelector("#password"),c=function(){u.setCustomValidity(""),l.setCustomValidity("")};return u.addEventListener("keydown",c),l.addEventListener("keydown",c),a}return o(t,N),t}(),et=function(){function t(e,n,r,o){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o))}return o(t,N),n(t,[{key:"co",value:function(){}}]),t}(),nt=function(){function t(e,n,r){var o;return s(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))).uo=r,o}return o(t,M),n(t,[{key:"tn",value:function(){return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"tn",this).call(this)&&J.ro(this.uo)}}]),t}(),rt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/fragments/passwordSettings.html","online"))}return o(t,nt),n(t,[{key:"Ze",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ze",this).call(this),r=new N(document.getElementById("change-password-form"),"u/passwordSettings/set","post");return r.ei(function(t){for(var e=0,n=t.length;e=2&&this.dn.classList.add("layer-"+t);var e=this.dn.querySelector(".child-container");e.removeAllChildren(),this.xo(),this.dn.removeEventListener("mouseup",this.Co),this.dn.removeEventListener("touchend",this.Ao),this.dn.addEventListener("mouseup",this.Co),this.dn.addEventListener("touchend",this.Ao);for(var n=0,r=this.children.length;n=1&&this.children[0]&&this.children[0]instanceof t?this.children[0].ko()+1:1}}]),t}();ft.Po();var dt=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).Io="A",v.F(n)&&r.Uo(n),r}return o(t,ht),n(t,[{key:"wo",value:function(e){return e instanceof t&&e.Io===this.Io}},{key:"Uo",value:function(t){this.Io=t}},{key:"vo",value:function(){this.dn.querySelector(".leaf-element").removeAllChildren().appendChild(document.createTextNode(this.Io))}}]),t}(),vt=function(){function t(e,n,r,i){s(this,t),this.Eo=e,this.Oo=n,this.Wo=r,this.No=i}return n(t,[{key:"_o",value:function(){return v.cloneNode(this.Eo)}},{key:"jo",value:function(){return v.cloneNode(this.Oo)}},{key:"Vo",value:function(){return v.cloneNode(this.Wo)}},{key:"Jo",value:function(){return v.cloneNode(this.No)}}]),t}(),pt=function(){function t(e){s(this,t),this.zo=null,this.words=[],this.qo=[],this.Ko=e,this.Xo=!1,this.id=null,this.$o=null,this.Go=null;var n=this;this.Qo=new Promise(function(t,e){n.$o=t,n.Go=e})}return n(t,[{key:"Yo",value:function(){var t=this.fo();localStorage.setItem("currentLevel",JSON.stringify({id:this.id,rotations:t}))}},{key:"fo",value:function(){return null!==this.zo?this.zo.fo([]):[]}},{key:"Zo",value:function(t){this.id=t}},{key:"_",value:function(){return this.id}},{key:"Mo",value:function(){return this}},{key:"ta",value:function(t){this.zo=t,this.zo.So(this),this.qo&&this.yo()}},{key:"ea",value:function(t){this.words=[];for(var e=0,n=t.length;e=2&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa){for(var t=pt.oa(this.words[0],this.Ko._o()),e=pt.oa(this.words[1],this.Ko._o()),n=new yt(this.Ko.Vo()),r=0,i=this.aa/2;r=6&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa&&this.words[2].length>=this.aa&&this.words[3].length>=this.aa&&this.words[4].length>=this.aa&&this.words[5].length>=this.aa){var t=[];t[0]=pt.oa(this.words[0],this.Ko._o()),t[1]=pt.oa(this.words[1],this.Ko._o()),t[2]=pt.oa(this.words[2],this.Ko._o()),t[3]=pt.oa(this.words[3],this.Ko._o()),t[4]=pt.oa(this.words[4],this.Ko._o()),t[5]=pt.oa(this.words[5],this.Ko._o());for(var e=new yt(this.Ko.Vo()),n=0;n=4&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa&&this.words[2].length>=this.aa&&this.words[3].length>=this.aa){var t=[];t[0]=pt.oa(this.words[0],this.Ko._o()),t[1]=pt.oa(this.words[1],this.Ko._o()),t[2]=pt.oa(this.words[2],this.Ko._o()),t[3]=pt.oa(this.words[3],this.Ko._o());for(var e=new yt(this.Ko.Vo()),n=0;n=1)&&e.createObjectStore(t.da.ca,{keyPath:"id"}),(v.gt(n)||n<2&&r>=2)&&i.target.transaction.objectStore(t.da.ca).createIndex("played",["deleted","played","difficulty","id"],{unique:!1}),(v.gt(n)||n<3&&r>=3)&&i.target.transaction.objectStore(t.da.ca).createIndex("difficulty","difficulty",{unique:!1})}},{key:"ma",value:function(){var e=r(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.ur(n,t.da.ca));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"ga",value:function(){var e=r(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.load(n,t.da.ca));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"pa",value:function(){var e=r(regeneratorRuntime.mark(function e(n){var r,i,o,s,a,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cr("difficulty",IDBKeyRange.lowerBound(0),t.da.ca);case 2:for(r=e.sent,i=[],o=[],s=-1,a=0,u=r.length;an.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),window.fetch=v.o(window.fetch,function(t){console.log("customFetch",t);var e=null;if(window.XMLHttpRequest)e=new XMLHttpRequest;else if(window.Er)try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}var n=new Promise(function(t){e.onload=function(){var e=this.responseText;t({json:function(){return Promise.resolve(JSON.parse(e))},text:function(){return Promise.resolve(e)}})},e.onerror=function(e){t(Promise.reject(e))}});return e.open("get",t,!0),e.send(),n}),p.Ae(new R("red","")),p.Ae(new R("blue","blue")),p.Ae(new R("black","black")),p.Ae(new R("green","green")),p.Ae(new R("pink","pink")),T.Fr(new F("img/whatsapp.svg")),T.Fr(new B("img/sms.svg")),T.Fr(new A("img/telegram.svg"));var At=new L;At.Ss(!0),At.es(d.Kt()),window.ThemeManager=p,window.ThemeManager.addChangeListener=p.addChangeListener,window.app=At,window.app.refreshCurrentSite=At.refreshCurrentSite,window.Translator=d,window.Translator.setLanguage=d.setLanguage,j.resolve(At).then(function(){At.start(Bt),d.setLanguage("de")});