document.addEventListener("DOMContentLoaded",function(){const e=new URLSearchParams(window.location.search).get("lang");let t;t=e||navigator.language,console.log("Browser language:",t);let o=window.location.search;""===o?o="?show_popup_reg=1&lp=cbt3":o+="&show_popup_reg=1&lp=cbt3";const n="https://"+window.location.hostname.replace("promo.","")+o,r=document.querySelector("a");r.setAttribute("href",n),r.addEventListener("click",function(){document.cookie="offer_last_point="+o+"; max-age=2592000"});let l=""?.slice&&Number("".slice)<13&&Number("".slice)>0?"".slice:6,c=[2,8,2,8,2,8,2,8];localStorage.currentSpin=1;let a=document.querySelector(".wheel_btn"),s=document.querySelector(".wheel_spinner"),i=document.querySelector(".popup_overlay"),u=(document.querySelector(".cta-img-con"),document.querySelector(".pers_r")),d=document.querySelector(".pers_l");a.addEventListener("click",function(){m()});const m=function(){let e=l,t=parseInt(localStorage.currentSpin),o=2-t,n=c[Math.floor(Math.random()*c.length)];o>0?(s.style.transform=`rotate(${1080*t+30*n}deg)`,s.style.transition="transform 4s"):0===o&&(s.style.transform=`rotate(${1440*t+30*e}deg)`,s.style.transition="transform 4s"),a.classList.remove("spin_1"),a.setAttribute("disabled","disabled"),setTimeout(function(){var e;a.removeAttribute("disabled"),0===o&&(e=0,u.style.zIndex="2",d.style.zIndex="2",0===e&&(i.style.display="flex"))},5e3),localStorage.currentSpin=t+1}});