const o = "_ga_internal_traffic";
const c = (e) => {
  if (typeof document > "u") return;
  const t = e ? "1" : "0", n = "/";
  document.cookie = `${o}=${t}; max-age=31536000; path=${n}; SameSite=Lax`, console.log(`Internal traffic cookie ${e ? "enabled" : "disabled"}`);
}, i = () => {
  if (typeof document > "u") return !1;
  const e = document.cookie.split(";");
  for (const t of e) {
    const [n, a] = t.trim().split("=");
    if (n === o)
      return a === "1";
  }
  return !1;
}, r = () => {
  typeof document > "u" || (document.cookie = `${o}=; max-age=0; path=/; SameSite=Lax`, console.log("Internal traffic cookie cleared"));
}, f = (e, t) => e ? e === t : !1;
export {
  r as clearInternalTrafficCookie,
  i as isInternalTrafficEnabled,
  c as setInternalTrafficCookie,
  f as validateToken
};
