document.addEventListener("DOMContentLoaded",function(){const e=new URLSearchParams(window.location.search).get("lang");let t;t=e||navigator.language,console.log("Browser language:",t);const o=document.querySelector(".wheel__wrapper"),n=document.querySelector(".wheel"),c=document.querySelector(".button"),l=document.querySelector(".popup__container"),i=document.querySelector(".left"),r=document.querySelector(".right");function a(){n.classList.add("wheel-animated"),setTimeout(function(){l.style.visibility="visible",document.scrollingElement.scrollTop=0,document.body.style.overflow="hidden",i.classList.add("confetti-animation"),r.classList.add("confetti-animation")},6e3)}o.addEventListener("click",a),c.addEventListener("click",a);let d=window.location.search;""===d?d="?show_popup_reg=1&lp=fpg_w":d+="&show_popup_reg=1&lp=fpg_w";let u="https://"+window.location.hostname.replace("promo.","")+d;document.querySelector(".popup__button").href=u,document.querySelector(".popup__button").addEventListener("click",function(){document.cookie="offer_last_point="+d+"; max-age=2592000"})});