(()=>{const r={newPotentialVisitorTrackingId:"mf0lxu43zgi7od9l4s4xhr1enotbv6uhbj4a7p7snls7b2lt62osj02qdn2b88p5",visitorTrackingIdCookieName:"clive-visitor-tid-462",host:"live.clive.cloud",accountId:"462"},c=r.visitorTrackingIdCookieName,l=(t,n)=>{const s=t+"=",o=n.split(";");for(let i=0;i<o.length;i++){let e=o[i];for(;e.charAt(0)==" ";)e=e.substring(1);if(e.indexOf(s)==0)return e.substring(s.length,e.length)}return""},d=()=>{const t=window.location.hostname;if(!isNaN(Number(t.replace(/\\./gi,""))))return null;const n=t.split("."),s=n.length;return s<2?null:"."+n[s-2]+"."+n[s-1]},u=(t,n,s)=>{const o=new Date;o.setTime(o.getTime()+s*24*60*60*1e3);const i="expires="+o.toUTCString(),e=d(),a=e?";Domain="+encodeURIComponent(e):"";document.cookie=t+"="+n+";"+i+";path=/"+a,l(t,document.cookie)||(document.cookie=t+"="+n+";"+i+";path=/")},g=t=>{u(c,t,3650)},p=()=>{let t=l(c,document.cookie);return t||(t=r.newPotentialVisitorTrackingId,g(r.newPotentialVisitorTrackingId)),t},h=(t,n,s,o,i)=>{const e=new XMLHttpRequest;e.withCredentials=i!==!1,e.open(n,k(t),!0);for(let a in o)e[a]=o[a];e.send(s)},k=t=>{const n=new URL(t);return n.searchParams.set("referer",window.location.href),n.toString()},v=p(),m=encodeURIComponent(document.title);h(`https://${r.host}/page-views/${r.accountId}/visitors/${v}/register?t=${m}`,"GET",null,{onload:function(){if(this.status===200){const t=JSON.parse(this.responseText);t.success&&t.newTrackingId&&g(t.newTrackingId)}}});})();