function StatsHandler(n,t,i,r,u,f,e){window._paq=window._paq||[];this.gId=n;this.channel=t;this.endPoint=i;this.platform=r;this.language=u;this.practice=f;this.matomoSiteId=e;this.gameLoaded=!1;this.initialSoundReceived=!1;this.oldOrientation="";this.currentOrientation="";this.loadStartTime=0;this.loadEndTime=0;this.connectStartTime=(new Date).getTime();this.connectEndTime=0;this.isHyperSpinActive=!1;this.sentSpinEventsList=[];this.debug=!1;this.platform="";this.gameSpecificVariables={tutorial:{autoInit:!1,startTimeStampMS:-1}};i&&this.addMatomoScript();this.loadingStart()}function LoginRequest(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){function g(n){var t=n.split("\r\n").filter(function(n){return n!==""});t.forEach(function(n){var t=n.split(/(?: ([^"\s]+|(?:"(?:[^"\\]|\\.)*")))/g).filter(function(n){return n!==""}).map(function(n){return n.toString().replace(/(^""$)|(^")|(((?:[^\\]))"$)/g,"$4")}),i=t[0].replace("d=",""),r;p[i]=t;switch(i){case LoginRequest.COMMAND_SESSION:b=t[1];d||(d=!0,r=LoginRequest.COMMAND_LOGIN+" "+tt,nt(r,g));break;case LoginRequest.COMMAND_LOGIN:k=!0}});k&&rt()}function rt(){var r=p[LoginRequest.COMMAND_LOGIN][1],n,t,i;if(r>0)n={},n.sessionId=b,n.cId=r,n.currency=p[LoginRequest.COMMAND_LOGIN][2],p[LoginRequest.COMMAND_LOGIN][3]&&p[LoginRequest.COMMAND_LOGIN][3]!=='""'&&(n.aamsSessionString=p[LoginRequest.COMMAND_LOGIN][3].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][4]!==undefined&&(n.jurisdiction=p[LoginRequest.COMMAND_LOGIN][4].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][5]!==undefined&&(n.externalId=p[LoginRequest.COMMAND_LOGIN][5].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_LOGIN][6]!==undefined&&(n.identityToken=p[LoginRequest.COMMAND_LOGIN][6].trim().replace(/"/g,"")),p[LoginRequest.COMMAND_SERVERTIME]!==undefined&&(n.serverTime=p[LoginRequest.COMMAND_SERVERTIME][1].replace(/"/g,"").trim(),n.serverTimeDelta=new Date(n.serverTime)-Date.now()),c(n,w);else{if(ut(p[LoginRequest.COMMAND_LOGIN][2]))return window.location=p[LoginRequest.COMMAND_LOGIN][2];t=p[LoginRequest.COMMAND_LOGIN].slice(2).join(" ").replace(/"/g,"").trim();i=a;i.hasOwnProperty(t)&&(t=i[t]);l(t,"CONNECTION_ERROR")}}function ut(n){var t=new RegExp("(http|ftp|https)://([w_-]+(?:(?:.[w_-]+)+))([w.,@@?^=%&:/~+#-]*[w@@?^=%&/~+#-])?");return t.test(n)?!0:!1}function nt(t,i){var r=new XMLHttpRequest;r.open("POST",n);r.setRequestHeader("Content-type","text/plain");r.onerror=ft;r.onabort=et;r.ontimeout=ot;i&&(r.onreadystatechange=function(){r.status===200&&r.readyState===4&&i(r.responseText)});w<LoginRequest.PACKET_INDEX_LIMIT&&r.send("d="+w+++"\r\n"+b+"\r\n"+t+"\r\n")}function ft(){l(PNGLocalizationManager.get("COREWEB.LOGIN.ERRORMESSAGE","An error occured while connecting to the server"))}function et(){l(PNGLocalizationManager.get("COREWEB.LOGIN.ABORTMESSAGE","The connection to the server was aborted"))}function ot(){l(PNGLocalizationManager.get("COREWEB.LOGIN.TIMEOUTMESSAGE","Connection timeout"))}var w=1,p={},b="0",tt=i?'"'+i+'" "" "'+f+'" "" "'+v+'" "'+y+'"':'"'+r+'" "'+u+'" "'+f+'" "" "'+v+'" "'+y+'"',k=!1,d=!1,it=[LoginRequest.COMMAND_SESSION,t,'"'+e+'"',o,'"'+encodeURIComponent(navigator.userAgent)+'"','"'+s+'"','"'+h+'"'].join(" ");nt(it,g)}function LauncherMessage(n){if(this.msgBox=document.createElement("div"),this.msgBox.id="pngLauncherMessage",this.title=document.createElement("h2"),this.title.textContent=n.title||PNGLocalizationManager.get("COREWEB.LAUNCHERMESSAGE.TITLE","Something went wrong"),this.msgBox.appendChild(this.title),this.msgText=document.createElement("p"),this.msgText.id="launcherMessageText",this.msgText.textContent=n.msg,this.msgBox.appendChild(this.msgText),this.channel=n.channel,this.lobbyUrl=n.lobbyUrl?decodeURIComponent(n.lobbyUrl):"",this.cancelbutton=document.createElement("button"),this.cancelbutton.innerHTML=this.channel==="desktop"||this.channel==="mini"||this.channel==="cabinet"?n.cancelText||PNGLocalizationManager.get("COREWEB.LAUNCHERMESSAGE.OK","OK"):n.cancelText||PNGLocalizationManager.get("COREWEB.LAUNCHERMESSAGE.PREVIOUSPAGE","Previous Page"),this.cancelbutton.id="cancelButton",this.cancelbutton.className="pngMsgBoxButton",this.cancelbutton.onclick=n.cancelCB||this.onExit.bind(this),this.msgBox.appendChild(this.cancelbutton),n.confirmCB&&(this.confirmbutton=document.createElement("button"),this.confirmbutton.innerHTML=n.confirmText,this.confirmbutton.className="pngMsgBoxButton",this.confirmbutton.id="confirmbutton",this.confirmbutton.onclick=n.confirmCB,this.msgBox.appendChild(this.confirmbutton)),typeof PngPreloader!="undefined")PngPreloader.onLauncherMessage(!0);document.body.insertAdjacentElement("afterbegin",this.msgBox)}var PNGLocalizationManager=PNGLocalizationManager||function(){function t(t){n=t}function i(t,i){return(n||{}).hasOwnProperty(t)?n[t]:i}var n={};return{init:t,get:i}}(),PNGModules=PNGModules||function(){function e(t){for(var i=0;i<t.length;++i)n[t[i].name]=t[i]}function o(t,i){return r(t)?(n[t].initiate=i,!0):(console.warn("Module with name "+t+" tried to register itself but it's not configured correctly."),!1)}function s(t,i,r,f){var e=n[t].order,o;return a(t,i,e)?(o=e.map(function(n,t){return v(e[t])}),n[t].initiate=f,n[t].gridCells=o,n[t].position={current:[]},u(n[t],i),!0):(console.warn("Failed to insert module: "+t+" into grid. It will not be initialized."),!1)}function u(n,t){if(n.gridCells&&n.position){if(t.length!==n.gridCells.length)return;for(var i=0;i<t.length;++i)n.position.current[i]!==t[i]&&(n.gridCells[i].parentElement&&n.gridCells[i].parentElement.removeChild(n.gridCells[i]),y(t[i],n.gridCells[i]),n.position.current[i]=t[i])}}function h(n,t){return f(n)?(console.warn("module with name "+n+" already defined as internal module."),!1):(i[n]=t,!0)}function r(t){return n.hasOwnProperty(t)}function f(n){return i.hasOwnProperty(n)}function c(){return Object.freeze(n)}function l(){return Object.freeze(i)}function a(n,t,i){return r(n)?!Array.isArray(t)||!Array.isArray(i)?(console.warn("module with name "+n+" should provide position and order in arrays."),!1):t.length!==i.length?(console.warn("module with name "+n+" should provide order for each position."),!1):!0:(console.warn("module with name "+n+" hasn't been registered correctly."),!1)}function v(n){var t=document.createElement("div");return t.className="grid-cell",t.style.order=n.toString(),t}function y(n,i){var r="";switch(n){case t.RIGHT:r="#right-column";break;case t.LEFT:r="#left-column";break;case t.TOP:r="#game-row-top";break;case t.BOTTOM:r="#game-row-bottom";break;default:console.warn("Failed to position element.",n);return}document.querySelector(r).appendChild(i)}var n={},i={},t={LEFT:"left-column",TOP:"game-column-top",BOTTOM:"game-column-bot",RIGHT:"right-column"};return{setAvailableModules:e,addExternalModule:o,addExternalModuleInGrid:s,addInternalModule:h,hasExternalModule:r,hasInternalModule:f,gridPosition:t,order:{OUTER:"outer",INNER:"inner"},getExternalModules:c,getInternalModules:l,reevaluateLayout:u}}(),PNGResources;StatsHandler.prototype.Megaton=1;StatsHandler.prototype.Flash=2;StatsHandler.prototype.LegacyMobile=3;StatsHandler.prototype.addMatomoScript=function(){window._paq.push(["setDocumentTitle","Megaton "+this.channel]);window._paq.push(["setTrackerUrl",this.endPoint+"piwik.php"]);window._paq.push(["setSiteId",this.matomoSiteId]);var n=document.createElement("script"),t=document.getElementsByTagName("script")[0];n.type="text/javascript";n.async=!0;n.defer=!0;n.src=this.endPoint+"piwik.js";t.parentNode.insertBefore(n,t)};StatsHandler.prototype.addGameListeners=function(){var i=this.HandleEvent.bind(this),n,t;for(n in this.gameEvents)this.gameEvents.hasOwnProperty(n)&&window.extcom.addEventListener(this.gameEvents[n],i);t=window.extcom.gameCalls();t.GET_SOUND()};StatsHandler.prototype.setDebug=function(n){this.debug=n};StatsHandler.prototype.gameEvents={Loader:"LOADER",LoginAnswer:"LOGINANSWER",Settings:"SETTINGS",RoundStart:"round_start",OnRoundStart:"onroundstart",SoundOn:"SOUND_ON",SoundOff:"SOUND_OFF",OnHelp:"UIHELP",OnShowPaytable:"UISHOWPAYTABLE",OnHistory:"UIHISTORY",AutoplayStarted:"AUTOPLAY_STARTED",Message:"MESSAGE",ExternalTutorialAutoInit:"EXTERNAL_TUTORIAL_AUTOINIT",ExternalTutorialInit:"EXTERNAL_TUTORIAL_INIT",ExternalTutorialStarted:"EXTERNAL_TUTORIAL_STARTED",ExternalTutorialExit:"EXTERNAL_TUTORIAL_EXIT",ExternalTutorialFinish:"EXTERNAL_TUTORIAL_FINISH",HyperSpinActivated:"HYPERSPIN_ACTIVATE",HyperSpinDeactivated:"HYPERSPIN_DEACTIVATE"};StatsHandler.prototype.internalEvents={Load:"load",Loaded:"loaded",Connected:"connected",LoadTime:"loadtime",LoginTime:"logintime",Language:"language"};StatsHandler.prototype.legacyEvents={AutoplayStarted:"autoplay",SoundOn:"soundon",SoundOff:"soundoff",InitialSoundOn:"initialsoundon",InitialSoundOff:"initialsoundoff",ShowPaytable:"showpaytable",ShowHelp:"showhelp",ConnectionLost:"connectionlost"};StatsHandler.prototype.analyticEvents={Loaded:"Loaded",Load:"Load",LoadTime:"Load Time",LoginTime:"Login time",Connected:"Connected",InitialSoundOn:"Initial Sound On",InitialSoundOff:"Initial Sound Off",SoundOn:"Sound On",SoundOff:"Sound Off",ShowHelp:"Show Help",ShowPaytable:"Show Paytable",ShowHistory:"Show History",AutoplayStarted:"AutoplayStarted",Language:"Language",ConnectionFailure:"Connection Failure",ConnectionLost:"Connection Lost",TutorialStartedInPractice:"Tutorial Started In Practice",TutorialStarted:"Tutorial Started",TutorialRevisit:"Tutorial Revisit",TutorialAborted:"Tutorial Aborted",TutorialTimeAborted:"Tutorial Time Aborted",TutorialSkipped:"Tutorial Skipped",TutorialTimeCompleted:"Tutorial Time Completed",TutorialCompleted:"Tutorial Completed",SpinLandscape:"Spin /Landscape",SpinPortrait:"Spin /Portrait",HyperSpinLandscape:"HyperSpin /Landscape",HyperSpinPortrait:"HyperSpin /Portrait"};StatsHandler.prototype.HandleEvent=function(n){var i,r,t,u,f,e;this.log(n.type);i=typeof n=="object"?n.type:n;r=arguments[1];switch(i){case this.gameEvents.Loader:n.id===3&&this.LoadingComplete();break;case this.gameEvents.LoginAnswer:n.userId>0&&this.connectingComplete();break;case this.gameEvents.Settings:this.paseSettings(n);break;case this.internalEvents.Load:this.addStatEvent(this.analyticEvents.Load);break;case this.internalEvents.Loaded:this.gameLoaded=!0;this.addStatEvent(this.analyticEvents.Loaded);break;case this.internalEvents.Connected:this.addStatEvent(this.analyticEvents.Connected);break;case this.gameEvents.RoundStart:case this.gameEvents.OnRoundStart:if(this.channel!=="mobile")break;this.oldOrientation=this.currentOrientation;this.currentOrientation=window.innerWidth>window.innerHeight?"ls":"pt";this.oldOrientation!==this.currentOrientation&&(this.sentSpinEventsList=[]);t="";t=this.currentOrientation==="pt"?this.isHyperSpinActive?this.analyticEvents.HyperSpinPortrait:this.analyticEvents.SpinPortrait:this.isHyperSpinActive?this.analyticEvents.HyperSpinLandscape:this.analyticEvents.SpinLandscape;this.sentSpinEventsList.indexOf(t)===-1&&(this.sentSpinEventsList.push(t),this.addStatEvent(t));break;case this.legacyEvents.InitialSoundOn:this.gameLoaded&&this.addStatEvent(this.analyticEvents.InitialSoundOn);break;case this.legacyEvents.InitialSoundOff:this.gameLoaded&&this.addStatEvent(this.analyticEvents.InitialSoundOff);break;case this.gameEvents.SoundOn:this.initialSoundReceived||(this.addStatEvent(this.analyticEvents.InitialSoundOn),this.initialSoundReceived=!0);break;case this.gameEvents.SoundOff:this.initialSoundReceived||(this.addStatEvent(this.analyticEvents.InitialSoundOff),this.initialSoundReceived=!0);break;case this.legacyEvents.SoundOn:this.gameLoaded&&this.addStatEvent(this.analyticEvents.SoundOn);break;case this.legacyEvents.SoundOff:this.gameLoaded&&this.addStatEvent(this.analyticEvents.SoundOff);break;case this.legacyEvents.ShowHelp:case this.gameEvents.OnHelp:this.addStatEvent(this.analyticEvents.ShowHelp);break;case this.legacyEvents.ShowPaytable:case this.gameEvents.OnShowPaytable:this.addStatEvent(this.analyticEvents.ShowPaytable);break;case this.gameEvents.OnHistory:this.addStatEvent(this.analyticEvents.ShowHistory);break;case this.gameEvents.AutoplayStarted:this.addStatEvent(this.analyticEvents.AutoplayStarted,n.playsLeft);break;case this.legacyEvents.AutoplayStarted:this.addStatEvent(this.analyticEvents.AutoplayStarted,r.numautoplays);break;case this.internalEvents.LoadTime:this.addStatEvent(this.analyticEvents.LoadTime,n.time);break;case this.internalEvents.LoginTime:this.addStatEvent(this.analyticEvents.LoginTime,n.time);break;case this.legacyEvents.ConnectionLost:this.addStatEvent(this.analyticEvents.ConnectionLost);break;case this.gameEvents.Message:n.flags===4?this.addStatEvent(this.analyticEvents.ConnectionLost):n.flags===3&&this.addStatEvent(this.analyticEvents.ConnectionFailure);break;case this.gameEvents.ExternalTutorialAutoInit:this.gameSpecificVariables.tutorial.autoInit=!0;break;case this.gameEvents.ExternalTutorialInit:this.gameSpecificVariables.tutorial.autoInit=!1;break;case this.gameEvents.ExternalTutorialStarted:u=this.practice==="1"?this.analyticEvents.TutorialStartedInPractice:this.analyticEvents.TutorialStarted;this.addStatEvent(u);this.gameSpecificVariables.tutorial.startTimeStampMS=(new Date).getTime();this.gameSpecificVariables.tutorial.autoInit||this.addStatEvent(this.analyticEvents.TutorialRevisit);break;case this.gameEvents.ExternalTutorialExit:this.gameSpecificVariables.tutorial.startTimeStampMS!==-1?(f=Date.now()-this.gameSpecificVariables.tutorial.startTimeStampMS,this.gameSpecificVariables.tutorial.startTimeStampMS=-1,this.addStatEvent(this.analyticEvents.TutorialAborted),this.addStatEvent(this.analyticEvents.TutorialTimeAborted,f)):this.addStatEvent(this.analyticEvents.TutorialSkipped);break;case this.gameEvents.ExternalTutorialFinish:this.gameSpecificVariables.tutorial.startTimeStampMS!==-1&&(e=Date.now()-this.gameSpecificVariables.tutorial.startTimeStampMS,this.addStatEvent(this.analyticEvents.TutorialTimeCompleted,e));this.gameSpecificVariables.tutorial.startTimeStampMS=-1;this.gameSpecificVariables.tutorial.autoInit=!1;this.addStatEvent(this.analyticEvents.TutorialCompleted);break;case this.gameEvents.HyperSpinActivated:this.isHyperSpinActive=!0;break;case this.gameEvents.HyperSpinDeactivated:this.isHyperSpinActive=!1}};StatsHandler.prototype.addStatEvent=function(n,t){typeof t!="undefined"?window._paq.push(["trackEvent","Game",n,this.gId,t]):window._paq.push(["trackEvent","Game",n,this.gId]);this.log("Sent event to matomo: "+n," with value: "+t)};StatsHandler.prototype.loadingStart=function(){this.log("LoadingStart");this.loadStartTime=(new Date).getTime();this.HandleEvent({type:"load"})};StatsHandler.prototype.LoadingComplete=function(){this.loadEndTime=(new Date).getTime();var n=this.loadEndTime-this.loadStartTime;this.HandleEvent({type:"loaded"});this.HandleEvent({type:"loadtime",time:n})};StatsHandler.prototype.connectingComplete=function(){this.connectEndTime=(new Date).getTime();var n=this.connectEndTime-this.connectStartTime;this.HandleEvent({type:"connected"});this.HandleEvent({type:"logintime",time:n})};StatsHandler.prototype.lastSettings=undefined;StatsHandler.prototype.copyObject=function(n){var t={};for(prop in n)t[prop]=n[prop];return t};StatsHandler.prototype.paseSettings=function(n){var t,i;if(this.lastSettings===undefined){this.lastSettings={};for(key in n.settings)key!="children"&&(this.lastSettings[key]=n.settings[key]);return}t=[];for(key in n.settings)(key!=="children"||key!=="_children")&&key[0]==="_"&&this.lastSettings[key]!=n.settings[key]&&t.push({id:key,newVal:n.settings[key]});if(this.lastSettings===undefined){this.lastSettings=n;return}for(i=0;i<t.length;i++)this.onSettingsChange(t[i]);for(key in n.settings)key!="children"&&(this.lastSettings[key]=n.settings[key])};StatsHandler.prototype.onSettingsChange=function(n){this.log("Settings changed: "+n.id);switch(n.id){case"_sound":n.newVal===!0?this.addStatEvent(this.analyticEvents.SoundOn):n.newVal===!1&&this.addStatEvent(this.analyticEvents.SoundOff)}};StatsHandler.prototype.log=function(){var t,i,n;if(this.debug){for(t="",i="",n=0;n<arguments.length;n++)typeof arguments[n]=="string"&&arguments[n].match("background")?i=arguments[n]:t+=" "+arguments[n];console.log(t,i)}};StatsHandler.prototype.ConnectingStart=function(){};PNGResources=PNGResources||function(){function i(n,t,i){function h(){var t=document.createElement("script");t.type="text/javascript";t.src=n[r].src;t.crossOrigin="anonymous";o?(t.onreadystatechange=function(){(this.readyState==="loaded"||this.readyState==="complete")&&u()},t.onerror=e):(t.addEventListener("load",u,!1),t.addEventListener("error",e,!1));s.appendChild(t)}function c(){var f=document.getElementsByTagName("head")[0],i=document.createElement("link");i.type="text/css";i.rel="stylesheet";i.href=n[r].src;n[r].required?(i.addEventListener("error",t,!1),i.addEventListener("load",u,!1)):u();f.appendChild(i)}function f(){if(/.js$/g.test(n[r].src))h();else if(/.css$/g.test(n[r].src))c();else{if(console.warn("Tried to load unsupported file type.",n[r].src),n[r].required)return t();u()}}function e(){if(--n[r].retries)f();else{if(n[r].required)return t();u()}}function u(){r++;r===n.length?i():f()}var r=0,o=navigator.userAgent.indexOf("MSIE")!==-1,s=document.getElementsByTagName("head")[0];f()}function r(r,u,o,s,h){var l=r.gameURL.split("/"),v=l[l.length-2],a,c;u=t(u);a=function(){new LauncherMessage({msg:PNGLocalizationManager.get("COREWEB.RESOURCES.LOADFAILMESSAGE","Failed to load resources."),channel:u,lobbyUrl:r.lobbyUrl});EngageProxy.postMessage({type:"COREWEB_ERROR",data:{_flags:4,_title:PNGLocalizationManager.get("COREWEB.RESOURCES.ENGAGE.ERRORTITLE","Gameloader Error"),_message:PNGLocalizationManager.get("COREWEB.RESOURCES.ENGAGE.ERRORMESSAGE","Error loading script")}})};c=[];switch(r.bundleMode){case n.Old:c=[{src:"${RESOURCEROOT}games/common.bundle.js",retries:10,required:!0},{src:"${RESOURCEROOT}games/${GAMENAME}/${GAMENAME}_main.bundle.js",retries:10,required:!0},{src:"${RESOURCEROOT}games/${GAMENAME}/${GAMENAME}_${CHANNEL}${UIVERSION}.bundle.js",retries:10,required:!0}];break;case n.GameSeparation:c=[{src:"${RESOURCEROOT}games/${GAMENAME}/${GAMENAME}_${CHANNEL}${UIVERSION}.bundle.js",retries:10,required:!0}];break;default:return}c=c.concat(f()).concat(e(s)).map(function(n){return n.src=n.src.replace(/\$\{RESOURCEROOT\}/g,r.resourceRoot).replace(/\$\{GAMENAME\}/g,v).replace(/\$\{CHANNEL\}/g,u).replace(/\$\{COREWEBURL\}/g,h).replace(/\$\{BRAND\}/g,r.brand).replace(/\$\{UIVERSION\}/g,r.uiVersion||""),n});i(c,a,o)}function u(i,r){r=t(r);var u={internalModules:{},externalModules:{},start:undefined},f=i.uiVersion||"";return new Promise(function(t){switch(i.bundleMode){case n.Old:PNGModules.addInternalModule("ui",window[r+f+"_Entry"]);u.internalModules=PNGModules.getInternalModules()||{};u.externalModules=PNGModules.getExternalModules()||{};u.internalModules.ui=window[r+f+"_Entry"];u.start=window.main_Entry.start;t(u);break;case n.GameSeparation:PNGModules.addInternalModule("ui",window[r+f+"_Entry"]);u.internalModules=PNGModules.getInternalModules()||{};u.externalModules=PNGModules.getExternalModules()||{};u.internalModules.ui=window[r+f+"_Entry"];u.start=window[r+f+"_Entry"].start;t(u)}})}function f(){var n=[{src:"${COREWEBURL}Content/javascript/3rdparty/bluebird.core.min.js",name:"bluebird.core",condition:typeof window.Promise=="undefined"}];return n.filter(function(n){return n.condition})}function e(n){var t=[];return Object.keys(n).forEach(function(i){var r=n[i];r.dependencies&&r.dependencies.forEach(function(n){t.push({src:n,retries:2,required:r.required})});r.resources&&r.resources.forEach(function(n){t.push({src:n,retries:2,required:r.required})});r.script&&t.push({src:r.script,name:r.name,retries:2,required:r.required})}),t}function o(n,i){var r,f,e,u,o,c;n=t(n);r=JSON.parse(i.gameModules);s(r,n,i);f={bundle:[]};e=f.bundle;for(u in r)r.hasOwnProperty(u)&&r[u].resource&&h(i,u)&&(o=i.uiVersion||"",c=r[u].resource.replace("${CHANNEL}",n+o),e.push({name:u,url:c}));return f}function t(n){switch(n){case"cabinet":return"desktop";default:return n}}function s(n,t,i){n.language={script:"",resource:"resources/lang/${language}/locale.json"};t==="desktop"&&i.showHelpInPaytable==="True"&&n.hasOwnProperty("bundleconfig")&&n.bundleconfig.resource!==undefined&&(n.germanydesktopbundle={script:"",resource:n.bundleconfig.resource.replace("config_${CHANNEL}","germany_desktop_additional_resources")})}function h(n,t){switch(t){case"featurepreview":return n.showSplash==="True";case"mysteryjackpot":return n.hasMysteryJackpot==="True";case"guaranteedjackpot":return n.hasGuaranteedJackpot==="True";default:return!0}}var n={GameSeparation:"0",Old:"1"};return{getBundleObject:o,getEntries:u,initiateScriptLoad:r}}();LoginRequest.COMMAND_SESSION="103";LoginRequest.COMMAND_LOGIN="101";LoginRequest.COMMAND_SERVERTIME="127";LoginRequest.PACKET_INDEX_LIMIT=3;PlatformManager={init:function(n,t,i){this.coreWebUrl=n;this.embedMode=t;this.channel=i},devices:{iPhone4:{type:"iPhone",version:"4"},iPhone5:{type:"iPhone",version:"5"},iPhone6:{type:"iPhone",version:"6"},iPhone6p:{type:"iPhone",version:"6+"}},deviceTypes:{mobile:"mobile",tablet:"tablet"},debug:!1,errwebglrenderingcontextErrorCode:"errwebglrenderingcontext",errstencilErrorCode:"errstencil",checkStencilBuffer:function(){var i={stencil:!0},n,t;try{return window.WebGLRenderingContext?(n=document.createElement("canvas"),t=n.getContext("webgl",i)||n.getContext("experimental-webgl",i),!(t&&t.getContextAttributes().stencil)?this.errstencilErrorCode:""):this.errwebglrenderingcontextErrorCode}catch(r){return this.errstencilErrorCode}},checkHardwareAcceleration:function(){var n=PlatformManager.collectWebGlInfo();if(n.majorPerformanceCaveat==="Yes")return"errhardwareaccelerationdisabled"},isHighResolutionDisplay:function(){if(window.matchMedia){var n=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen  and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return n&&n.matches||window.devicePixelRatio>1}return window.devicePixelRatio>1},checkFeatureSupport:function(n){var i={},t,r,u,f;if(i.enforcehardwareacceleration=this.checkHardwareAcceleration,i.stencilbuffer=this.checkStencilBuffer,t=n.requiredPlatformFeatureSupport,t==="")return!1;for(t=t.split(","),r=0;r<t.length;r++)if(u=t[r].toLowerCase(),typeof i[u]=="function"&&(f=i[u](),f))return f;return""},getIOSVersion:function(){return Number((navigator.userAgent.match(/\b[1-9]?[0-9]+_[0-9]+(?:_[0-9]+)?\b/)||[""])[0].split("_",1))},checkIOSSupport:function(){return this.isIOs()&&this.getIOSVersion()>=8?"":"errios"},checkPlusDevice:function(){return this.checkIOSSupport()&&this.getIPhoneVersion()===this.devices.iPhone6p.version?!0:!1},isDevice:function(n){switch(n.type){case"iPhone":return this.isIOs()&&this.getIPhoneVersion()===n.version;case"iPad":return this.isIOs()&&this.isIpad();default:return!1}},isIpad:function(){return/iPad/i.test(navigator.userAgent)},isIphone:function(){return/iPhone/i.test(navigator.userAgent)},isIOs:function(){return/iPhone|iPod|iPad/.test(navigator.userAgent)},isIE11:function(){return/Trident/.test(navigator.userAgent)},isEdge:function(){return/Edge/.test(navigator.userAgent)},isFirefox:function(){return/Firefox/.test(navigator.userAgent)},isFirefoxWebpSupportedVersion:function(){if(this.isFirefox()){const n=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),t=n?parseInt(n[1],10):0;if(t>64)return!0}return!1},isUnsupportedEdgeWebp:function(){var n,t;if(isEdge()){n=navigator.userAgent.indexOf("Edge/");try{if(t=parseInt(navigator.userAgent.substring(n+5,navigator.userAgent.indexOf(".",n)),10),t<=18)return!0}catch(i){return!1}}return!1},isOldIpad:function(){var n=Math.max(window.screen.height,window.screen.width),t=Math.min(window.screen.height,window.screen.width);return t===768&&n===1024&&window.devicePixelRatio===1?!0:!1},getIPhoneVersion:function(){var n=Math.max(window.screen.height,window.screen.width),t=Math.min(window.screen.height,window.screen.width);return t===320&&n===480?"4":t===320&&n===568?"5":t===375&&n===667?"6":t===414&&n===736?"6+":"none"},checkAndroidSupport:function(){var n=navigator.userAgent.match(/Android[\/\s](\d+\.?\d?)?/);return n?new Number(n[1])>=4.4&&!(/firefox/gi.test(navigator.userAgent)&&!/opera/gi.test(navigator.userAgent))?"":"errandroid":"errandroid"},checkWindowsSupport:function(){return"errwindows"},checkDesktopChromeSupport:function(){return!/Android|iPhone|iPod|iPad/.test(navigator.userAgent)&&navigator.userAgent.match("Chrome")?"":"errdesktopchrome"},checkConfiguredBlockedDevice:function(){var n=this.configuration.customDeviceBlockRegex,t,i;if(!n)return!1;for(n=n.split(","),t=0;t<n.length;t++)if(i=new RegExp(n[t],"gi"),i.test(navigator.userAgent))return!0;return!1},checkSupportedDevice:function(n){if(this.configuration=n,this.checkConfiguredBlockedDevice()===!0)return"errconfigblock";var t=this.checkFeatureSupport(n);return t?t:navigator.userAgent.match("Windows Phone")?this.checkWindowsSupport():navigator.userAgent.match("Android")?this.checkAndroidSupport():navigator.userAgent.match(/iPhone|iPod|iPad/)?this.checkIOSSupport():""},logDeviceError:function(n){var i=this.coreWebUrl+"casino/LogDeviceError",t=new XMLHttpRequest;t.open("POST",i,!0);t.setRequestHeader("Content-Type","application/json");t.send(JSON.stringify({errorInfo:n}))},checkWebAudioSupport:function(){return typeof window.AudioContext=="function"||typeof window.AudioContext=="object"||typeof window.webkitAudioContext=="function"||typeof window.webkitAudioContext=="object"},checkSoundSupport:function(){return navigator.userAgent.match("Windows Phone")?this.checkWebAudioSupport():this.isIpad()&&this.isOldIpad()?!1:!0},checkVideoSupport:function(){return PlatformManager.isIOs()&&PlatformManager.getIOSVersion()<10?!1:!0},checkWebpActiveSupport:function(){let n=document.createElement("canvas");return!(n.getContext&&n.getContext("2d"))?!1:n.toDataURL("image/webp").indexOf("data:image/webp")==0},checkJp2ActiveSupport:function(){let n=document.createElement("canvas");return!(n.getContext&&n.getContext("2d"))?!1:n.toDataURL("image/jp2").indexOf("data:image/jp2")==0},checkWebpSupport:function(){return this.checkWebpActiveSupport()?!0:this.isFirefoxWebpSupportedVersion()?!0:!1},checkJP2Support:function(){return this.checkJp2ActiveSupport()?!0:!1},checkFullScreenSupport:function(n){return this.embedMode!=""?"False":(navigator.userAgent.match("Android")&&navigator.userAgent.match("Chrome"))!==null?n:"False"},checkDisabledSpacebarToSpinSupport:function(n){return this.channel==="desktop"||this.channel==="cabinet"?n.disableSpacebarToSpin:"True"},checkAutoPreventDefault:function(){return"True"},checkIosChrome:function(){return navigator.userAgent.match("CriOS")?!0:!1},isIosVersionInBlackList:function(){return GameLoader.configuration.swipeToHideIosBlacklist.slice(1,-1).split(",").map(Number).includes(PlatformManager.getIOSVersion())},getDeviceType:function(){return/iPad/.test(navigator.userAgent)?this.deviceTypes.tablet:/Android/.test(navigator.userAgent)?Math.min(window.screen.width,window.screen.height)>600?this.deviceTypes.tablet:this.deviceTypes.mobile:this.deviceTypes.mobile},addSwipeToFullscreen:{background:undefined,arrowDot:undefined,hand:undefined,sizeInterval:undefined,gamewrapper:undefined,allowScrollToFullscreen:undefined,playerProtectionSweden:undefined,playerProtectionUK:undefined,isPreventingPinchZoom:!0,isShowing:!0,init:function(n){this.gamewrapper=n;this.background=document.createElement("div");this.background.id="pngSwipebackground";document.getElementById("mask").style.display="block";this.background.addEventListener("touchstart",this.onTouchStart);this.background.addEventListener("touchmove",this.onTouchMove);window.addEventListener("resize",this.onResize);this.arrowDot=document.createElement("div");this.arrowDot.id="pngArrowDot";this.hand=document.createElement("div");this.hand.id="pngSwipeHand";this.background.appendChild(this.arrowDot);this.background.appendChild(this.hand);document.body.appendChild(this.background);PlatformManager.checkIosChrome()&&(document.body.style.height="2000px");PlatformManager.getIOSVersion()>=13&&(document.body.style.overflowY="scroll");this.sizeInterval=setInterval(this.pollSize.bind(this),1e3)},pollSize:function(){var n,t,i;window.innerHeight<window.innerWidth?(PlatformManager.checkIosChrome()?(t=Math.min(window.screen.height,window.screen.width),n=t-20>window.innerHeight):GameLoader.configuration.disableSwipeToFullscreenLandscapeIos==="False"?(i=window.outerHeight||document.body.clientHeight,n=!(window.innerHeight+window.pageYOffset>=document.body.offsetHeight&&i===window.innerHeight)):n=!1,this.show(n)):GameLoader.configuration.disableSwipeToFullscreenPortraitIos==="False"?(n=document.documentElement.clientHeight>=window.innerHeight,this.show(n)):this.show(!1);typeof document.getElementById("gameWrapper")!="undefined"&&document.getElementById("gameWrapper").clientWidth>window.innerWidth?(this.show(!0),this.background.removeEventListener("touchmove",this.onTouchMove),this.background.removeEventListener("touchstart",this.onTouchStart),this.isPreventingPinchZoom=!1):this.isPreventingPinchZoom||(this.background.addEventListener("touchmove",this.onTouchMove),this.background.addEventListener("touchstart",this.onTouchStart),this.isPreventingPinchZoom=!0);(GameLoader.configuration.disableSwipeToFullscreenIos==="True"&&!PlatformManager.checkIosChrome()||PlatformManager.isIosVersionInBlackList())&&this.show(!1)},show:function(n){n&&GameLoader.loaderComplete?(this.updateBackgroundPositionForSwipeToHide(),this.background.classList.add("pngSwipeBgShow"),this.background.classList.remove("pngFadeOutAnim"),this.gamewrapper.style.pointerEvents="none",this.isShowing||window.scroll(0,0),this.isShowing=!0):(this.background.classList.remove("pngSwipeBgShow"),this.background.classList.add("pngFadeOutAnim"),this.gamewrapper.style.pointerEvents="",this.isShowing=!1)},updateBackgroundPositionForSwipeToHide:function(){var n;PNGModules.hasExternalModule("playerProtectionSweden")&&(this.playerProtectionSweden||(this.playerProtectionSweden=document.querySelector(".pps-top-bar-mobile")),this.playerProtectionSweden&&(n=this.playerProtectionSweden.clientHeight,this.background.style.top=n?n+"px":0));PNGModules.hasExternalModule("playerProtectionUK")&&(this.playerProtectionUK||(this.playerProtectionUK=document.querySelector(".pps-top-bar-mobile")),this.playerProtectionUK&&(n=this.playerProtectionUK.clientHeight,this.background.style.top=n?n+"px":0))},onResize:function(){var n=document.getElementById("mask"),t,i;if(n){if(PlatformManager.isIosVersionInBlackList()&&!PlatformManager.checkIosChrome()&&window.innerHeight>=window.innerWidth){n.style.removeProperty("height");return}n.style.height=window.innerHeight*3+"px"}t=39;i=window.orientation===90||window.orientation===270||window.orientation===-90?window.screen.width-window.innerHeight<=t:window.screen.height-window.innerHeight<=t;i?(window.scroll(0,window.innerHeight),window.addEventListener("scroll",this.onScroll)):(this.allowScrollToFullscreen=!0,window.removeEventListener("scroll",this.onScroll))},onScroll:function(){var n=document.documentElement,t=(window.pageYOffset||n.scrollTop)-(n.clientTop||0);t!==window.innerHeight&&this.allowScrollToFullscreen===!0?(window.scroll(0,window.innerHeight),this.allowScrollToFullscreen=!0):(this.allowScrollToFullscreen=!1,window.removeEventListener("scroll",this.onScroll))},onTouchStart:function(n){n.touches.length>1&&n.preventDefault()},onTouchMove:function(n){n.touches.length>1&&n.preventDefault()}},isStandalone:function(){return this.embedMode==="iframe"?!0:window.navigator.standalone},collectWebGlInfo:function(){try{var t={platform:navigator.platform,userAgent:navigator.userAgent},e,i=document.createElement("canvas"),n;function u(t,i,r){return n=t.getContext(i,{stencil:r}),e=i,!!n}function r(n){return"["+n[0]+", "+n[1]+"]"}function l(){var i=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic"),t;return i?(t=n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),t===0&&(t=2),t):"n/a"}function o(n,t){return t?""+Math.pow(2,n):"2^"+n}function f(n,t){var i=t?" bit mantissa":"";return"[-"+o(n.rangeMin,t)+", "+o(n.rangeMax,t)+"] ("+n.precision+i+")"}function s(t){var i=n.getShaderPrecisionFormat(t,n.HIGH_FLOAT),r=n.getShaderPrecisionFormat(t,n.MEDIUM_FLOAT),e=n.getShaderPrecisionFormat(t,n.LOW_FLOAT),u=i;return i.precision===0&&(u=r),"High: "+f(i,!0)+" Medium: "+f(r,!0)+" Low: "+f(e,!0)+f(u,!1)}function a(n){var t=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT),i=t.precision!==0?"highp/":"mediump/";return t=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT),i+(t.rangeMax!==0?"highp":"lowp")}function h(n){return n!==0&&(n&n-1)==0}function v(n){var t=r(n.getParameter(n.ALIASED_LINE_WIDTH_RANGE)),i=(navigator.platform==="Win32"||navigator.platform==="Win64")&&n.getParameter(n.RENDERER)!=="Internet Explorer"&&n.getParameter(n.RENDERER)!=="Microsoft Edge"&&t===r([1,1]);return i?h(n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS))&&h(n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS))?"Yes, D3D11":"Yes, D3D9":"No"}function y(){var n=document.createElement("canvas"),t=n.getContext(e,{failIfMajorPerformanceCaveat:!0});return(n.remove(),!t)?"Yes":typeof t.getContextAttributes().failIfMajorPerformanceCaveat=="undefined"?"Not implemented":"No"}function p(n){var t=1,i=n.getExtension("WEBGL_draw_buffers");return i!=null&&(t=n.getParameter(i.MAX_DRAW_BUFFERS_WEBGL)),t}function c(n){var t={renderer:"",vendor:""},i=n.getExtension("WEBGL_debug_renderer_info");return i!=null&&(t.renderer=n.getParameter(i.UNMASKED_RENDERER_WEBGL),t.vendor=n.getParameter(i.UNMASKED_VENDOR_WEBGL)),t}return(u(i,"webgl",!0)||u(i,"experimental-webgl",!0)||u(i,"webgl",!1)||u(i,"experimental-webgl",!1),i.remove(),!n)?"Browser supports WebGL but initialization failed":(t.contextName=e,t.glVersion=n.getParameter(n.VERSION),t.shadingLanguageVersion=n.getParameter(n.SHADING_LANGUAGE_VERSION),t.vendor=n.getParameter(n.VENDOR),t.renderer=n.getParameter(n.RENDERER),t.unMaskedVendor=c(n).vendor,t.unMaskedRenderer=c(n).renderer,t.antialias=n.getContextAttributes().antialias?"Available":"Not available",t.angle=v(n),t.majorPerformanceCaveat=y(),t.maxColorBuffers=p(n),t.redBits=n.getParameter(n.RED_BITS),t.greenBits=n.getParameter(n.GREEN_BITS),t.blueBits=n.getParameter(n.BLUE_BITS),t.alphaBits=n.getParameter(n.ALPHA_BITS),t.depthBits=n.getParameter(n.DEPTH_BITS),t.stencilBits=n.getParameter(n.STENCIL_BITS),t.maxRenderBufferSize=n.getParameter(n.MAX_RENDERBUFFER_SIZE),t.maxCombinedTextureImageUnits=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS),t.maxCubeMapTextureSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.maxFragmentUniformVectors=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),t.maxTextureImageUnits=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),t.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),t.maxVaryingVectors=n.getParameter(n.MAX_VARYING_VECTORS),t.maxVertexAttributes=n.getParameter(n.MAX_VERTEX_ATTRIBS),t.maxVertexTextureImageUnits=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),t.maxVertexUniformVectors=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),t.aliasedLineWidthRange=r(n.getParameter(n.ALIASED_LINE_WIDTH_RANGE)),t.aliasedPointSizeRange=r(n.getParameter(n.ALIASED_POINT_SIZE_RANGE)),t.maxViewportDimensions=r(n.getParameter(n.MAX_VIEWPORT_DIMS)),t.maxAnisotropy=l(),t.vertexShaderBestPrecision=s(n.VERTEX_SHADER),t.fragmentShaderBestPrecision=s(n.FRAGMENT_SHADER),t.fragmentShaderFloatIntPrecision=a(n),t.extensions=n.getSupportedExtensions(),t)}catch(w){return{unexpectedError:w}}},log:function(n){this.configuration.debug&&console.log(n)}};LauncherMessage.prototype.onExit=function(){if(this.channel==="mobile"){var n=this.lobbyUrl;n!==""?location.href=n:history.back()}else this.msgBox.parentElement.removeChild(this.msgBox)};LauncherMessage.prototype.remove=function(){if(typeof PngPreloader!="undefined")PngPreloader.onLauncherMessage(!1);this.msgBox&&this.msgBox.parentElement&&this.msgBox.parentElement.removeChild(this.msgBox)}