function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,a){return t&&_defineProperties(e.prototype,t),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0===a)return("string"===t?String:Number)(e);a=a.call(e,t||"default");if("object"!=_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}var LoadingScreen=(()=>_createClass(function e(t,a){_classCallCheck(this,e),this.nomCompte=t,this.numeroSerie=a,this.generateHtml()},[{key:"generateHtml",value:function(){Log.addLog("generateHtml",0),this.jqueryInstance=$("<div/>"),this.jqueryInstance.attr("id","loadingScreen").attr("class","loadingScreen");var e=$("<div/>").addClass("loadingDivLogo"),t=(window.innerWidth>window.innerHeight?$("<img/>").attr("src","images/emity-color.png"):$("<img/>").attr("src","images/logoEmityWebos.png")).attr("alt","logo"),t=(e.append(t),$("<div/>").addClass("progress")),a=(t.append($("<div/>").addClass("progress-bar")),t.find(".progress-bar")),r=$("<span/>").addClass("spanMoving"),n=$("<div/>").addClass("topContainer"),i=$("<div/>").addClass("loadingScreenContainer"),o=this.generateNomCompteHtml(this.nomCompte),s=this.generateNumeroSerieHtml(this.numeroSerie),l=this.generateHoraireHtml(),d=this.generatePlaylistHtml(),p=this.generateHavePlaylistPrio();a.append(r),n.append(e),n.append(t),i.append(o),i.append(s),i.append(l),i.append(d),i.append(p),this.jqueryInstance.append(n),this.jqueryInstance.append(i),this.jqueryInstance.appendTo("body");var g=0;[o,s,l,d,p].forEach(function(e){e[0].style.display="none",g+=300,setTimeout(function(){e[0].style.display="flex"},g)})}},{key:"generateNomCompteHtml",value:function(e){Log.addLog("generateNomCompteHtml",0);var t=$("<div/>").addClass("loadingDivNomCompte"),a=$("<p/>"),r=$("<img/>").attr("src","images/svg/account-light.svg").attr("alt","user"),e=$("<span/>").text(e).css("color","#ffdd00");return a.append(r).append(e),t.append(a),t}},{key:"generateNumeroSerieHtml",value:function(e){Log.addLog("generateNumeroSerieHtml",0);var t=$("<div/>").addClass("loadingDivNumeroSerie"),a=$("<p/>"),r=$("<img/>").attr("src","images/svg/serial-number.svg").attr("alt","serial"),e=$("<span/>").text(e).css("color","#ffdd00");return a.append(r).append(e),t.append(a),t}},{key:"generateHoraireHtml",value:function(){Log.addLog("generateHoraireHtml",0);var e=$("<div/>").addClass("loadingDivHoraire"),t=$("<p/>"),a=$("<img/>").attr("src","images/svg/hour.svg").attr("alt","horaire"),r=$("<img/>").attr("src","images/svg/spinner.svg").attr("alt","spinner").attr("id","loadingPageSpinner"),n=$("<span/>").text("").css("color","#ffdd00").attr("id","loadingValueHoraire");return t.append(a).append(r).append(n),e.append(t),e}},{key:"generatePlaylistHtml",value:function(){Log.addLog("generatePlaylistHtml",0);var e=$("<div/>").addClass("loadingDivPlaylist"),t=$("<p/>"),a=$("<img/>").attr("src","images/svg/playlist.svg").attr("alt","playlist"),r=$("<img/>").attr("src","images/svg/spinner.svg").attr("alt","spinner").attr("id","loadingPagePlaylistSpinner"),n=$("<span/>").text("").css("color","#ffdd00").attr("id","loadingValuePlaylist");return t.append(a).append(r).append(n),e.append(t),e}},{key:"generateHavePlaylistPrio",value:function(){Log.addLog("generateHavePlaylistePrio",0);var e=$("<div/>").addClass("loadingDivPlaylistPrio"),t=$("<p/>"),a=$("<img/>").attr("src","images/svg/playlist-prio.svg").attr("alt","playlist-prio"),r=$("<img/>").attr("src","images/svg/spinner.svg").attr("alt","spinner").attr("id","loadingPagePlaylistPrioSpinner"),n=$("<span/>").text("").css("color","#ffdd00").attr("id","loadingValuePlaylistPrio");return t.append(a).append(r).append(n),e.append(t),e}},{key:"addMessage",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"0%",a=(Log.addLog("addMessage",0),console.log(e),$("#loadingScreenMessage")),a=(0<a.length&&a.remove(),t.slice(0,t.length-1)),a=parseInt(a),a=a<46?"#e1821d":a<62?"#FAB733":a<78?"#ACB334":"#69B34C",t=($(".progress-bar").css("width",t).css("background-color",a),$("<p/>").attr("id","loadingScreenMessage").text(e));t.css({color:"white","font-size":"40px"}),$(".progress").before(t)}},{key:"removeHtml",value:function(){Log.addLog("removeHtml",0),this.jqueryInstance.remove()}}]))();