Poki Refresher

This is the Refresher JavaScript:

!function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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=2)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(a){var o;void 0===(o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pushEvent=void 0;var n=window;t.pushEvent=function(e,t,a){"undefined"!=typeof window&&n.context&&n.pokiGTM&&n.pokiGTM.push({event:e+"-"+t,eventNoun:e,eventVerb:t,eventData:a||{}})}}.apply(t,[n,t]))||(e.exports=o)}).call(this,n(0))},function(e,t,n){(function(a){var o,i;o=[n,t,n(3),n(4),n(5),n(7),n(8),n(1)],void 0===(i=function(e,t,n,a,o,i,r,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s,c=window,u=c.PARAMS,p=u.environment,l=u.isLocal,v=u.onPoki,g=u.onKids,y=u.gameVersion,f=u.gameID,k=u.contentGameID,m=u.bot,w=u.experiment,h=c.PARAMS.gameUri;v||l||"development"===p?o.setupSdkPlatformCommunication():g||(o.setupAdListeners(),n.updateSession(window.location.pathname,"external",k),c.user=n.getUser(),c.context={tag:null,site:{id:null,domain:"games.poki.com",prefix:""},page:{id:k,type:"external",path:window.location.pathname},user:c.user,session:c.session},c.pokiGTM=c.pokiGTM||[],c.tracker=c.tracker||[],c.updateSession=n.updateSession,o.setupSdkGtmCommunication());try{var _=i.default(h);if(!g&&(_.indexOf("//game-cdn.poki.com/")>-1||_.indexOf(".poki-gdn.com/")>-1)){_=_.substr(0,_.lastIndexOf("/"));var S=window.localStorage.getItem("savegame-"+f);window.localStorage.setItem("savegame-"+f,_);var I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if("a-9b2a78e9"===w&&I){var b=_+"/poki-savegame-experiment.html?next="+encodeURIComponent(h);h=b}else if(S&&S!==_){var A=r.default(S)===r.default(_)?"&unity-only":"";b=_+"/poki-savegame-import.html?previous="+encodeURIComponent(S)+A+"&next="+encodeURIComponent(h);h=b}}}catch(e){}a.default((function(){var e=document.getElementById("gameframe");e.src=h,e.onload=function(){var t=document.getElementById("spinner");t&&t.parentElement&&t.parentElement.removeChild(t),setTimeout((function(){e.focus()}),0)}})),document.addEventListener("focus",(function(){var e;null===(e=document.getElementById("gameframe"))||void 0===e||e.focus()})),window.location.ancestorOrigins&&window.location.ancestorOrigins.length>0&&(s=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1]),window.parent&&window.parent.postMessage({type:"pubHostInitialized",content:{gameVersion:y,gameID:f,topOrigin:s,bot:m}},"*"),v||l||g||d.pushEvent("pubHost","initialized",{gameID:f,gameVersion:y,contentGameID:k,topOrigin:s,origin:"game",bot:m})}.apply(t,o))||(e.exports=i)}).call(this,n(0))},function(e,t,n){"use strict";function a(e,t){if(!navigator.sendBeacon||!navigator.sendBeacon(e,t))try{var n="XMLHttpRequest"in window?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");n.open("POST",e,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(t)}catch(e){}}function o(e){var t=new RegExp("".concat(e,"=([^;]+)(?:;|$)")).exec(document.cookie);return t?t[1]:""}function i(e){document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; samesite=lax")}function r(e,t,n){document.cookie="".concat(e,"=").concat(t,"; path=/; samesite=lax; max-age=").concat(Math.min(n||15552e3,15552e3))}function d(){for(var e=Math.floor(Date.now()/1e3),t="",n=0;n<4;n++)t=String.fromCharCode(255&e)+t,e>>=8;if(window.crypto&&crypto.getRandomValues&&Uint32Array){var a=new Uint32Array(12);crypto.getRandomValues(a);for(var o=0;o<12;o++)t+=String.fromCharCode(255&a[o])}else for(var i=0;i<12;i++)t+=String.fromCharCode(Math.floor(256*Math.random()));return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}n.r(t),n.d(t,"beacon",(function(){return a})),n.d(t,"getCookie",(function(){return o})),n.d(t,"getTabSession",(function(){return v})),n.d(t,"getUser",(function(){return u})),n.d(t,"isSessionExpired",(function(){return k})),n.d(t,"logError",(function(){return c})),n.d(t,"markSessionInteraction",(function(){return m})),n.d(t,"protocolVersion",(function(){return s})),n.d(t,"removeCookie",(function(){return i})),n.d(t,"setCookie",(function(){return r})),n.d(t,"setupPokiGTM",(function(){return G})),n.d(t,"updateSession",(function(){return f})),n.d(t,"uuid",(function(){return d}));var s=7;function c(e,t){var n;console.error(e),n=e.name&&e.message?"".concat(e.name,": ").concat(e.message):JSON.stringify(e),a("https://t.poki.io/l",JSON.stringify({c:"observer-error",ve:7,d:[{k:"where",v:t},{k:"error",v:n}]}))}function u(){var e=o("uid"),t=!e;if(t)r("uid",e=d()),r("uid_new","1");else{var n=o("uid_new");if(""===n)try{r("uid_new",(t="1"===localStorage.getItem("user_is_new"))?"1":"0"),localStorage.removeItem("user_is_new")}catch(e){t=!1}else t="1"===n}return{id:e,is_new:t}}var p="poki_session";function l(e){return!(!e||!(e&&e.page&&e.landing_page&&e.previous_page)||!e.tab_id||!e.expire||Date.now()>e.expire||e.expire>Date.now()+18e5)}function v(){var e=null;l(window.session)&&(e=window.session);try{var t=JSON.parse(sessionStorage.getItem(p));l(t)&&(!e||t.depth>e.depth)&&(e=t)}catch(e){c(e,"getTabSession")}try{var n=JSON.parse(window.name);l(n)&&(!e||n.depth>e.depth)&&(e=n)}catch(e){}return e}function g(){var e=v();return e?e.tab_id:d()}function y(){var e=0,t=v();t&&(e=t.depth);try{var n=JSON.parse(o(p)||null);l(n)&&(e=Math.max(e,n.depth))}catch(e){c(e,"getSessionDepth")}return e}function f(e,t,n){var a=v();l(a)?(a.previous_page.path=a.page.path,a.previous_page.type=a.page.type,a.previous_page.id=a.page.id,a.previous_page.start=a.page.start,a.page.path=e,a.page.type=t,a.page.id=n,a.page.start=Date.now(),a.depth=y()+1,a.expire=Date.now()+18e5):a=function(e,t,n){try{var a=JSON.parse(o(p)||null);if(l(a))return a.previous_page.path=a.page.path,a.previous_page.type=a.page.type,a.previous_page.id=a.page.id,a.previous_page.start=a.page.start,a.page.path=e,a.page.type=t,a.page.id=n,a.page.start=Date.now(),a.depth=y()+1,a.expire=Date.now()+18e5,a.previous_tab_id=a.tab_id,a.tab_id=g(),r(p,JSON.stringify(a)),a}catch(e){c(e,"newSession")}return{id:d(),expire:Date.now()+18e5,tab_id:g(),depth:1,count:(i=o("ses_cnt"),(i&&parseInt(i,10)||0)+1),page:{path:e,type:t,id:n,start:Date.now()},previous_page:{},landing_page:{path:e,type:t,id:n,start:Date.now()}};var i}(e,t,n),r("ses_cnt",a.count),a.count>1&&r("uid_new","0");var i=JSON.stringify(a);try{sessionStorage.setItem(p,i)}catch(e){c(e,"updateSession")}window.session=a,window.name=i,r(p,i)}function k(){return!v()}function m(){var e=v();if(e){e.expire=Date.now()+18e5;var t=JSON.stringify(e);try{sessionStorage.setItem(p,t)}catch(e){}window.session=e,window.name=t,r(p,t)}}function w(e){return(w="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)}var h=[],_=!1;function S(e){if(e.google_allow_ad_personalization_signals=!0,e.google_restricted_data_processing=!1,e.google_conversion_linker=!0,window.google_trackConversion)window.google_trackConversion(e);else if(h.push(e),!_){_=!0;var t=document.createElement("script");t.src="https://www.googleadservices.com/pagead/conversion_async.js",t.addEventListener("load",(function(){for(;h.length>0;)window.google_trackConversion(h.shift())}));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}}function I(e,t,n,a){var o={google_conversion_id:e,google_conversion_label:t,google_remarketing_only:!1};void 0!==n&&(o.google_conversion_value=n,o.google_conversion_currency=a||"USD"),S(o)}function b(e,t,n,a){var o={google_conversion_id:e,google_conversion_label:t,google_remarketing_only:!0};n&&(o.google_user_id=n),a&&(o.google_custom_params=a),S(o)}var A={};function T(){return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile/i.test(navigator.userAgent)}function E(e){return Object.keys(e).map((function(t){if("eventNoun"===t||"eventVerb"===t)return!1;var n=e[t];return"object"===w(n)&&(n=JSON.stringify(n)),{key:t,value:n}})).filter((function(e){return!!e}))}function U(e){var t=e.content.data.position;switch(t){case"PP":return"preroll";case"PM":return"midroll";case"PR":return"rewarded";default:return"unknown-".concat(t)}}function P(e){return"playground"===e.origin?"platform":"ingame"}function C(e){return e<0?0:e<30?Math.floor(e):e<60?30:e<120?60:e<300?120:e<600?300:e<1200?600:e<1800?1200:1800}var D=!1;function B(e){switch(e){case 1:case 2:return"UA-87167-71";case 3:return"UA-87167-17";case 4:return"UA-87167-36";case 5:case 6:return"UA-87167-71";case 7:return"UA-87167-23";case 8:return"UA-87167-71";case 9:return"UA-87167-20";case 10:case 11:case 12:case 13:case 14:case 15:case 16:return"UA-87167-71";case 17:return"UA-87167-34";case 18:return"UA-87167-19";case 19:return"UA-87167-21";case 20:return"UA-87167-71";case 21:return"UA-87167-18";case 22:case 23:case 24:return"UA-87167-71";case 25:return"UA-87167-41";case 26:return"UA-87167-39";case 27:return"UA-87167-42";case 28:case 29:case 30:case 31:return"UA-87167-71";case 32:return"UA-87167-50";case 33:return"UA-87167-47";case 34:return"UA-87167-49";case 35:return"UA-87167-48";case 36:return"UA-87167-51";case 37:return"UA-87167-52";case 38:return"UA-87167-53";case 41:return"UA-87167-59";case 42:return"UA-87167-62";case 43:return"UA-87167-63";case 46:return"UA-87167-66";case 47:return"UA-59353966-2";case 48:return"UA-59353966-3";case 49:return"UA-87167-64";case 50:return"UA-87167-65";case 52:return"UA-87167-1";case 53:return"UA-87167-101"}return""}function M(){var e,t,n,a,o,i,r;window.uetq||(window.uetq=[],e=window,t=document,n="script",e[a="uetq"]=e[a]||[],o=function(){var t={ti:"5066235"};t.q=e[a],e[a]=new UET(t),e[a].push("pageLoad")},(i=t.createElement(n)).src="//bat.bing.com/bat.js",i.async=1,i.onload=i.onreadystatechange=function(){var e=this.readyState;e&&"loaded"!==e&&"complete"!==e||(o(),i.onload=i.onreadystatechange=null)},(r=t.getElementsByTagName(n)[0]).parentNode.insertBefore(i,r))}function x(e){var t=window.api.getUserValue(e);return!t||t<0||t>100?0:t}function R(e,t,n){var a,o,i,r,d,s,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=window,v=l.context,g=v.session,y=v.user;if("pageview"!==t||v.site.id){var f,w=Math.max(Date.now()-g.page.start,0),h=k(),_=0;("pageview"!==t||g.depth>1)&&(_=Math.max(Date.now()-g.landing_page.start,0)),"pageview"===t&&g.previous_page.start&&(f=g.page.start-g.previous_page.start);var S,I=null===(a=e.content)||void 0===a||null===(o=a.pokifordevs)||void 0===o?void 0:o.game_id,b=null===(i=e.content)||void 0===i||null===(r=i.pokifordevs)||void 0===r?void 0:r.game_version_id;if(I||(I=e.gameID),b||(b=e.gameVersion),v.site.id||"pubhost"!==t||"initialized"!==n){if("pageview"===t&&!D){D=!0;var A=document;S=A.referrer}}else{var T=document;S=T.referrer}var E=0;if(g.expire&&(E=Math.ceil((g.expire-Date.now())/1e3)),(!h||"pageview"===t)&&(p.interaction&&m(),window.tracker.push({session:{id:g.id,depth:g.depth,count:g.count},user:{id:y.id,is_new:y.is_new},page:{path:g.page.path,type:g.page.type,id:g.page.id},previous_page:{path:g.previous_page.path,type:g.previous_page.type,id:g.previous_page.id},landing_page:{path:g.landing_page.path,type:g.landing_page.type,id:g.landing_page.id},category:t,action:n,label:c,data:u,interaction:p.interaction,site_id:v.site.id,tag_id:v.tag,referrer:S,flash_version:v.flashVersion,time_on_site:_,time_spa_load:e.loadTime,time_on_page:w,time_on_previous_page:f,tab_id:g.tab_id,has_adblock:null===(d=window.api)||void 0===d||null===(s=d.getAdblock)||void 0===s?void 0:s.call(d),previous_tab_id:g.previous_tab_id,once_per_pageview:p.once_per_pageview,game_id:I||void 0,game_version_id:b||void 0,experiment:v.experiment,timeout:E}),window.pokiIsOutsideEEA&&p.ga)){var U,P=B(null===(U=v.site)||void 0===U?void 0:U.id);P&&0==="".concat(P).indexOf("UA-")&&(window.ga=window.ga||function(){window.ga.q=window.ga.q||[],window.ga.q.push(arguments)},window.ga.l=window.ga.l||Date.now(),window.GoogleAnalyticsObject=window.GoogleAnalyticsObject||window.ga,window.ga("create",P,{name:"pokilocal",cookieDomain:"auto"}),window.ga("pokilocal.set",{forceSSL:!0,anonymizeIp:!0}),window.ga("pokilocal.set","dimension10",v.tag),"pageview"===t?window.ga("pokilocal.send","pageview",{transport:"beacon"}):window.ga("pokilocal.send",{hitType:"event",eventCategory:t,eventAction:n||void 0,eventLabel:c||void 0,eventValue:void 0,nonInteraction:!p.interaction,transport:"beacon"}),"pageview"===t&&(window.ga("create","UA-87167-8",{name:"pokitotal",cookieDomain:"auto"}),window.ga("pokitotal.set",{forceSSL:!0,anonymizeIp:!0}),window.ga("pokitotal.set","dimension10",v.tag),window.ga("pokitotal.send","pageview",{transport:"beacon"})))}}}function O(e){var t=e.event,n=e.eventData,a=window.context;try{if("sdk-message"===t)if("pokiTrackingScreenDisplayAdImpression"===n.content.event)R(n,"ad","displayImpression","ingame",[{key:"opportunityId",value:n.content.data.opportunityId},{key:"adUnitPath",value:n.content.data.adUnitPath},{key:"prebidBid",value:n.content.data.prebidBid},{key:"prebidBidder",value:n.content.data.prebidBidder},{key:"preBidWon",value:n.content.data.preBidWon},{key:"dfpIsBackfill",value:n.content.data.dfpIsBackfill},{key:"dfpLineItemId",value:n.content.data.dfpLineItemId},{key:"duringGameplay",value:n.content.data.duringGameplay},{key:"houseAdId",value:n.content.data.houseAdId}]);else if("pokiTrackingScreenDisplayAdRequested"===n.content.event){R(n,"ad","displayRequest","ingame",[{key:"opportunityId",value:n.content.data.opportunityId},{key:"adUnitPath",value:n.content.data.adUnitPath},{key:"duringGameplay",value:n.content.data.duringGameplay}]);var o=x("display");M(),window.uetq.push("event","ad-impression",{event_category:"keyEvents",event_label:"display",event_value:"0",revenue_value:(1e3*o).toFixed(3),currency:"EUR"}),I(962655633,"GnMzCMOy7KQBEJHrg8sD",o,"EUR"),T()||I(669244695,"dbptCJSX78EBEJe6j78C",o,"EUR")}else if("pokiTrackingScreenDisplayAdDestroy"===n.content.event)R(n,"game","destroyAd","ingame",[{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingScreenGameLoadingStarted"===n.content.event)R(n,"game","loadingStarted","",[{key:"time_on_page",value:n.content.data.now}],{once_per_pageview:!0});else if("pokiTrackingScreenGameLoadingFinished"===n.content.event)R(n,"game","loadingFinished","",[{key:"time_on_page",value:n.content.data.now},{key:"transferSize",value:n.content.data.transferSize},{key:"trackers",value:n.content.data.trackers}],{once_per_pageview:!0});else if("pokiTrackingScreenGameplayStart"===n.content.event)R(n,"game","play","start",E(n.content.data),{ga:!0,interaction:!0});else if("pokiTrackingScreenGameplayStop"===n.content.event)R(n,"game","play","stop",E(n.content.data),{ga:!0,interaction:!0});else if("pokiTrackingAdsStatusError"===n.content.event)R(n,"ad","error","",[{key:"opportunityId",value:n.content.data.opportunityId},{key:"waterfall",value:n.content.data.waterfall}]);else if("pokiTrackingSdkStatusFailed"===n.content.event)R(n,"ad","failed","",[{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsStatusBuffering"===n.content.event)R(n,"ad","videoBuffering",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsVideoError"===n.content.event)R(n,"ad","videoError",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"message",value:n.content.data.message}]);else if("pokiTrackingAdsVideoLoaderError"===n.content.event)R(n,"ad","videoLoaderError",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsStatusPrebidRequested"===n.content.event)R(n,"ad","videoPrebidRequested",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsStatusReady"===n.content.event)R(n,"ad","videoReady",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsStatusSkipped"===n.content.event)R(n,"ad","videoSkipped",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId}]);else if("pokiTrackingAdsVideoClicked"===n.content.event)R(n,"ad","videoClicked",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)}]);else if("pokiTrackingAdsStatusCompleted"===n.content.event)R(n,"ad","videoCompleted",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)}]);else if("pokiTrackingAdsStatusImpression"===n.content.event){R(n,"ad","videoImpression",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)},{key:"prebidBidder",value:n.content.data.prebidBidder},{key:"prebidBid",value:n.content.data.prebidBid},{key:"creativeId",value:n.content.data.creativeId},{key:"adUnitPath",value:n.content.data.adUnitPath},{key:"houseAdId",value:n.content.data.houseAdId}]);var i=x("video");M();var r="midroll";"PP"===n.content.data.position?r="preroll":"PR"===n.content.data.position&&(r="rewarded"),window.uetq.push("event","ad-impression",{event_category:"keyEvents",event_label:r,event_value:"0",revenue_value:(1e3*i).toFixed(3),currency:"EUR"}),"PM"===n.content.data.position?(I(962655633,"Jnq5CJ7q3qQBEJHrg8sD",i,"EUR"),T()||I(669244695,"3VSnCLjIicIBEJe6j78C",i,"EUR")):"PP"===n.content.data.position?(I(962655633,"FPkKCJ6c7KQBEJHrg8sD",i,"EUR"),T()||I(669244695,"aHPxCMuR_8EBEJe6j78C",i,"EUR")):"PR"===n.content.data.position&&(I(962655633,"v_7QCMi93qQBEJHrg8sD",i,"EUR"),T()||I(669244695,"PsTfCL-V78EBEJe6j78C",i,"EUR"))}else if("pokiTrackingAdsVideoPaused"===n.content.event)R(n,"ad","videoPaused",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)}]);else if("pokiTrackingAdsStatusRequested"===n.content.event)R(n,"ad","videoRequest",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)}]);else if("pokiTrackingAdsVideoResumed"===n.content.event)R(n,"ad","videoResumed",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)}]);else if("pokiTrackingAdsStatusStarted"===n.content.event)R(n,"ad","videoStarted",U(n),[{key:"waterfall",value:n.content.data.waterfall},{key:"opportunityId",value:n.content.data.opportunityId},{key:"origin",value:P(n)},{key:"duration",value:n.content.data.duration},{key:"prebidBidder",value:n.content.data.prebidBidder},{key:"prebidBid",value:n.content.data.prebidBid},{key:"creativeId",value:n.content.data.creativeId},{key:"adUnitPath",value:n.content.data.adUnitPath},{key:"houseAdId",value:n.content.data.houseAdId}]);else if("pokiTrackingScreenFirstRound"===n.content.event){var d,s,u,p=null===(d=a.page)||void 0===d||null===(s=d.content)||void 0===s||null===(u=s.game)||void 0===u?void 0:u.id;M(),window.uetq.push("event","Started-Gameplay",{event_category:"Pageview",event_label:p}),window.uetq.push("event","",{ecomm_prodid:p,ecomm_pagetype:"purchase"});var l="Unknown";if(window.api&&window.api.getAdblock){var v=window.api.getAdblock();!0===v?l="Yes":!1===v&&(l="No")}b(962655633,"IGSuCMaAmIEBEJHrg8sD",a.user.id,{ID:a.page.id,SessionCount:a.session.count,AdBlocker:l}),(T()||"CA"===a.geo)&&I(962655633,"KzjDCPH3l6IBEJHrg8sD"),R(n,"game","play","first",[],{ga:!0,interaction:!0,once_per_pageview:!0})}else"pokiTrackingScreenCommercialBreak"===n.content.event?R(n,"game","commercialBreak","",[{key:"opportunityId",value:n.content.data.opportunityId}]):"pokiTrackingScreenRewardedBreak"===n.content.event?R(n,"game","rewardedBreak"):"pokiTrackingScreenRoundEnd"===n.content.event?R(n,"game","roundEnd","",E(n.content.data)):"pokiTrackingScreenRoundStart"===n.content.event?R(n,"game","roundStart","",E(n.content.data),{interaction:!0}):"SaveGameMigrator"===n.type&&"error"===n.content.event?R(n,"game","saveGameMigrator","error",[{key:"error",value:n.content.error}]):"SaveGameMigrator"===n.type&&"start"===n.content.event?R(n,"game","saveGameMigrator","start"):"SaveGameMigrator"===n.type&&"timeout"===n.content.event?R(n,"game","saveGameMigrator","timeout"):"pokiTrackingSdkStatusInitialized"===n.content.event&&"game"===n.origin?R(n,"game","sdkInitialized","",[],{once_per_pageview:!0}):"pokiTrackingScreenDisplayAdRequest"===n.content.event?R(n,"game","displayAd","",[{key:"opportunityId",value:n.content.opportunityId},{key:"size",value:n.content.size}]):"pokiTrackingScreenDisplayAdViewable"===n.content.event?R(n,"ad","displayViewable","ingame",[{key:"opportunityId",value:n.content.opportunityId},{key:"adUnitPath",value:n.content.adUnitPath},{key:"bid",value:n.content.bid},{key:"bidder",value:n.content.bidder},{key:"duringGameplay",value:n.content.data.duringGameplay}]):"pokiTrackingCustom"===n.content.event&&R(n,n.content.data.eventNoun,n.content.data.eventVerb,"",E(n.content.data.eventData||{}));else if("adslot-renderEnded"===t){R(n,"ad","displayImpression","platform",[{key:"trigger",value:n.refreshType},{key:"adUnitPath",value:n.adUnitPath},{key:"number",value:n.refreshNumber},{key:"opportunityId",value:n.opportunityId},{key:"prebidBid",value:n.prebidBid},{key:"prebidBidder",value:n.prebidBidder},{key:"preBidWon",value:n.preBidWon},{key:"dfpIsBackfill",value:n.dfpIsBackfill},{key:"dfpLineItemId",value:n.dfpLineItemId},{key:"houseAdId",value:n.houseAdId}]);var g=x("display");M(),window.uetq.push("event","ad-impression",{event_category:"keyEvents",event_label:"display",event_value:"0",revenue_value:(1e3*g).toFixed(3),currency:"EUR"}),I(962655633,"GnMzCMOy7KQBEJHrg8sD",g,"EUR"),T()||I(669244695,"dbptCJSX78EBEJe6j78C",g,"EUR")}else if("ads-render"===t)R(n,"ad","displayRequest","platform",[{key:"trigger",value:n.refreshType},{key:"adUnitPath",value:n.adUnitPath},{key:"number",value:n.refreshNumber},{key:"opportunityId",value:n.opportunityId}]);else if("consent-full"===t)R(n,"consent","full"),function(){window._comscore=window._comscore||[],window._comscore.push({c1:"2",c2:"20061681"});var e=document.createElement("script");e.src="https://sb.scorecardresearch.com/cs/20061681/beacon.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}();else if("consent-no"===t)R(n,"consent","no");else if("consent-noniab"===t)A=n.nonIABConsents,R(n,"consent","noniab","",[{key:"consents",value:JSON.stringify(A)}]);else if("consent-npa"===t)R(n,"consent","npa");else if("consent-unknown"===t)R(n,"consent","unknown");else if("appStoreButton-click"===t)R(n,"game","appstoreClick",n.store,[],{interaction:!0});else if(t.startsWith("rating-"))R(n,"game","rating",t.substr(13).toLowerCase(),[{key:"previous_vote",value:n.previousVote}],{interaction:!0,ga:!0}),"rating-thumbsUp"===t&&I(962655633,"466fCJbQ3qQBEJHrg8sD");else if("sdk-details"===t)R(n,"game","sdkDetails","",[{key:"version",value:n.version}],{once_per_pageview:!0});else if("game-boot"===t)R(n,"game","iframeLoaded","",[],{once_per_pageview:!0});else if("home-click"===t)R(n,"home","click",a.page.type,[],{interaction:!0,ga:!0});else if("logo-click"===t)R(n,"logo","click",a.page.type,[],{interaction:!0,ga:!0});else if("fullscreenButton-click"===t)R(n,"page","fullScreenClick","toFull",[],{interaction:!0});else if("page-performance"===t)R(n,"page","performance",n.name,[{key:"value",value:n.value}],{interaction:!0});else if("page-pillClick"===t)R(n,"page","pillClick","",[],{interaction:!0});else if("page-pillClosed"===t)R(n,"page","pillClosed","",[],{interaction:!0});else if("page-pillDrag"===t)R(n,"page","pillDrag","",[],{interaction:!0});else if("page-pillOpened"===t)R(n,"page","pillOpened","",[],{interaction:!0});else if("page-push"===t)R(n,"page","push");else if("react-hydrated"===t)R(n,"page","reactHydrated",a.page.type,[],{ga:!0});else if("react-prehydrate"===t)R(n,"page","reactPrehydrate",a.page.type);else if("tile-click"===t)R(n,"page","tileClick",a.page.type,[{key:"path",value:n.path},{key:"type",value:n.type},{key:"id",value:n.id},{key:"index",value:n.index},{key:"list",value:n.list},{key:"thumbnail",value:n.image}],{interaction:!0,ga:!0});else if("pubHost-initialized"===t){var y,f;R(n,"pubhost","initialized","",[{key:"topOrigin",value:n.topOrigin},{key:"bot.verified",value:null===(y=n.bot)||void 0===y?void 0:y.verified},{key:"bot.score",value:null===(f=n.bot)||void 0===f?void 0:f.score}])}else if("scenario-initialized"===t){for(var k=n.gameTiles,m=[],w=0;w<k.length;w++){var h=k[w];m.push({key:"".concat(h.id,"-index"),value:h.idx}),m.push({key:"".concat(h.id,"-list"),value:h.list}),h.image&&m.push({key:"".concat(h.id,"-thumbnail"),value:h.image})}R(n,"scenario","initialized","",m)}else if("search-end"===t){var _="",S=document.querySelector('input[type="search"]');S&&S.value&&(_=S.value),R(n,"search","end","",[{key:"terms",value:_}])}else if("search-query"===t){var D="",B=document.querySelector('input[type="search"]');B&&B.value&&(D=B.value),R(n,"search","query",a.page.type,[{key:"query",value:D},{key:"searchSessionId",value:n.searchSessionId}],{interaction:!0})}else if("search-queryFull"===t){var O="",G=document.querySelector('input[type="search"]');G&&G.value&&(O=G.value),R(n,"search","queryFull",a.page.type,[{key:"query",value:O},{key:"searchSessionId",value:n.searchSessionId}],{interaction:!0})}else if("search-results"===t){var q="",J=document.querySelector('input[type="search"]');J&&J.value&&(q=J.value),R(n,"search","results",a.page.type,[{key:"query",value:q},{key:"searchSessionId",value:n.searchSessionId},{key:"result",value:n.result},{key:"numberOfResults",value:n.results}],{ga:!0})}else if("tile-click"===t){var V="",L=document.querySelector('input[type="search"]');L&&L.value&&(V=L.value),R(n,"search","tileClick",a.page.type,[{key:"id",value:n.id},{key:"type",value:n.type},{key:"panelSection",value:n.panelSection},{key:"index",value:n.index},{key:"path",value:n.path},{key:"list",value:n.list},{key:"terms",value:V},{key:"searchSessionId",value:n.searchSessionId}],{ga:!0,interaction:!0})}else if("searchPanel-close"===t)R(n,"searchPanel","close",a.page.type,[{key:"searchSessionId",value:n.searchSessionId}],{ga:!0,interaction:!0});else if("searchPanel-open"===t)R(n,"searchPanel","open",a.page.type,[{key:"searchSessionId",value:n.searchSessionId}],{ga:!0,interaction:!0});else if("page-previewOpen"===t)R(n,"page","previewOpen");else if("page-previewVideoPlaying"===t)R(n,"page","previewVideoPlaying");else if("page-previewVideoStarted"===t)R(n,"page","previewVideoStarted");else if("page-previewVideoCanplay"===t)R(n,"page","previewVideoCanplay");else if("page-previewVideoCanplayhrough"===t)R(n,"page","previewVideoCanplayhrough");else if("page-previewVideoRendered"===t)R(n,"page","previewVideoRendered");else if("page-randomGameShow"===t)R(n,"page","randomGameShow");else if("page-randomGameClick"===t)R(n,"page","randomGameClick");else if("game-launch"===t)R(n,"game","launch","",[],{interaction:!0});else if("houseAd-clicked"===t)R(n,"houseAd","clicked","",[{key:"houseAdId",value:n.houseAdId}],{interaction:!0});else if("page-pulse"===t){var j=function(e){return C(Math.floor((Date.now()-e.session.page.start)/1e3))}(a),N=function(e){return C(Math.floor((Date.now()-e.session.page.start)/1e3)-30)}(a);(30===j&&N<30||60===j&&N<60||120===j&&N<120||300===j&&N<300||600===j&&N<600||1200===j&&N<1200||1800===j&&N<1800)&&R(n,"page","timeSpent","".concat(j,"s")),30===j&&N<30?T()||I(962655633,"wPwXCOuLgrQBEJHrg8sD"):300===j&&N<300&&("game"===a.page.type&&(M(),window.uetq.push("event","cohort-reached",{event_category:"keyEvents",event_label:"300",event_value:"0"})),T()||"game"!==a.page.type||(I(962655633,"lsPJCLbOqYEBEJHrg8sD"),I(962655633,"5E-gCLTH4e4BEJHrg8sD"),I(669244695,"ExUpCKWV_8EBEJe6j78C")),b(669244695,"IGSuCMaAmIEBEJHrg8sD",a.user.id,{ID:a.page.id}))}else"page-view"===t&&0!==n.counter&&R(n,"pageview","","",[],{ga:!0,interaction:!0})}catch(e){c(e,"gtm")}}function G(){for(window.pokiGTM=window.pokiGTM||[],window.pokiGTM.push=O,window.pokiGTM.push({event:"page-view",eventData:{}});window.pokiGTM.length>0;)window.pokiGTM.push(window.pokiGTM.shift())}},function(e,t,n){var a;void 0===(a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){0===window.innerWidth||0===window.innerHeight?window.setTimeout((function(){e(t)}),500):t()}}.apply(t,[n,t]))||(e.exports=a)},function(e,t,n){(function(a){var o,i;o=[n,t,n(1),n(6)],void 0===(i=function(e,t,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAdListeners=t.setupSdkGtmCommunication=t.setupSdkPlatformCommunication=void 0;var o=window.PARAMS,i=o.contentGameID,r=o.gameVersion,d=o.gameID;t.setupSdkPlatformCommunication=function(){window.addEventListener("message",(function(e){var t=document.getElementById("gameframe");e.source===t.contentWindow?function(e){e.data.type&&(void 0===e.data.content&&(e.data.content={}),e.data.content.pokifordevs={game_id:d,game_version_id:r,content_game_id:i}),window.parent.postMessage(e.data,"*")}(e):function(e,t){t.contentWindow&&(e.data.type&&void 0===e.data.content&&(e.data.content={}),t.contentWindow.postMessage(e.data,"*"))}(e,t)}))},t.setupSdkGtmCommunication=function(){window.addEventListener("message",(function(e){var t=e.data.type;if(t){var a=e.data.content||{};a.pokifordevs={game_id:d,game_version_id:r,content_game_id:i},n.pushEvent("sdk","message",{content:a,type:t,origin:"game"})}}))},t.setupAdListeners=function(){window.addEventListener("message",(function(e){if(e.data.type){var t=e.data.content,n=t.data;switch(t.event){case"pokiTrackingScreenCommercialBreak":case"pokiTrackingScreenRewardedBreak":a.displayAdInfo(!0),a.setStatus(a.ADSTATUS.PREPARING);break;case"pokiTrackingAdsStatusPrebidRequested":a.setStatus(a.ADSTATUS.LOADING);break;case"pokiTrackingAdsStatusStarted":a.setDuration(n.duration);break;case"pokiTrackingAdsStatusCompleted":case"pokiTrackingAdsStatusLimit":case"pokiTrackingAdsStatusError":a.displayAdInfo(!1);break;case"pokiTrackingAdsVideoProgress":a.setDurationProgress(n.currentTime)}}}))}}.apply(t,o))||(e.exports=i)}).call(this,n(0))},function(e,t,n){(function(a){var o;void 0===(o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setStatus=t.setDuration=t.setDurationProgress=t.displayAdInfo=t.ADSTATUS=void 0;var n=a.PARAMS.localisations;t.ADSTATUS={LOADING:"loading",PREPARING:"preparing"};var o=document.querySelector("#adInfo"),i=o.querySelector(".status"),r=0;t.displayAdInfo=function(e){o.style.display=e?"flex":"none"},t.setDurationProgress=function(e){var t=r-e,a=Math.floor(t/60),o=String(Math.round(t%60)).padStart(2,"0");i.innerText=n.playingad+" "+a+":"+o},t.setDuration=function(e){r=e,t.setDurationProgress(0)},t.setStatus=function(e){switch(e){case t.ADSTATUS.PREPARING:i.innerText=n.preparing;break;case t.ADSTATUS.LOADING:i.innerText=n.loading}}}.apply(t,[n,t]))||(e.exports=o)}).call(this,n(0))},function(e,t,n){var a;void 0===(a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname+t.pathname}}.apply(t,[n,t]))||(e.exports=a)},function(e,t,n){var a;void 0===(a=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=document.createElement("a");return t.href=e,t.hostname}}.apply(t,[n,t]))||(e.exports=a)}]);