document.addEventListener("DOMContentLoaded",function(){const e=(window.affiliateConfig||{}).translations||{},n=document.querySelector(".js-copy-referral-link");n&&n.addEventListener("click",function(){const t=document.getElementById("referralLink");t&&navigator.clipboard.writeText(t.value).then(function(){const i=n.innerHTML;n.innerHTML='<i class="fas fa-check me-1"></i>'+(e.linkCopied||"Copied!"),n.classList.remove("btn-primary"),n.classList.add("btn-success"),setTimeout(function(){n.innerHTML=i,n.classList.remove("btn-success"),n.classList.add("btn-primary")},2e3)}).catch(function(){t.select(),document.execCommand("copy")})})});
