document.addEventListener("DOMContentLoaded",function(){const e="plinko",o=document.querySelector(".button"),t=document.querySelector(".header__close"),n=document.querySelector(".popup__wrapper"),c=document.querySelector("a"),i=new URLSearchParams(window.location.search).get("lang");let r;r=i||navigator.language,console.log("Browser language:",r),setTimeout(()=>{n.style.visibility="visible"},2e4),o.addEventListener("click",function(){n.style.visibility="visible"}),t.addEventListener("click",function(){n.style.visibility="hidden"});let l=window.location.search;""===l?l="?show_popup_reg=1&lp="+e:l.includes("show_popup_reg=1")?l+="&lp="+e:l+="&show_popup_reg=1&lp="+e;const a=window.location.hostname.replace("promo.",""),d="https://"+a+l,s=()=>{document.cookie="offer_last_point="+l+"; max-age=2592000",window.location.href=d};s(),c&&c.addEventListener("click",()=>{s()}),"en-NZ"===r?document.cookie="currency=NZD; path=/; domain="+a:"en-AU"===r?document.cookie="currency=AUD; path=/; domain="+a:"cs"===r&&(document.cookie="currency=CZK; path=/; domain="+a),document.querySelector(".iframe").src="https://"+a+"/platform/game/plinko/demo?lobbyUrl=https://"+a});