(function(){"use strict";var x=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function K(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var k={exports:{}};function Q(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var B={exports:{}};B.exports;var $;function Y(){return $||($=1,(function(r,t){(function(e,n){r.exports=n()})(x,function(){var e=e||(function(n,s){var h;if(typeof window!="undefined"&&window.crypto&&(h=window.crypto),typeof self!="undefined"&&self.crypto&&(h=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(h=globalThis.crypto),!h&&typeof window!="undefined"&&window.msCrypto&&(h=window.msCrypto),!h&&typeof x!="undefined"&&x.crypto&&(h=x.crypto),!h&&typeof Q=="function")try{h=require("crypto")}catch(a){}var y=function(){if(h){if(typeof h.getRandomValues=="function")try{return h.getRandomValues(new Uint32Array(1))[0]}catch(a){}if(typeof h.randomBytes=="function")try{return h.randomBytes(4).readInt32LE()}catch(a){}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||(function(){function a(){}return function(l){var f;return a.prototype=l,f=new a,a.prototype=null,f}})(),b={},E=b.lib={},T=E.Base=(function(){return{extend:function(a){var l=c(this);return a&&l.mixIn(a),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var l in a)a.hasOwnProperty(l)&&(this[l]=a[l]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),S=E.WordArray=T.extend({init:function(a,l){a=this.words=a||[],l!=s?this.sigBytes=l:this.sigBytes=a.length*4},toString:function(a){return(a||o).stringify(this)},concat:function(a){var l=this.words,f=a.words,g=this.sigBytes,m=a.sigBytes;if(this.clamp(),g%4)for(var w=0;w<m;w++){var A=f[w>>>2]>>>24-w%4*8&255;l[g+w>>>2]|=A<<24-(g+w)%4*8}else for(var C=0;C<m;C+=4)l[g+C>>>2]=f[C>>>2];return this.sigBytes+=m,this},clamp:function(){var a=this.words,l=this.sigBytes;a[l>>>2]&=4294967295<<32-l%4*8,a.length=n.ceil(l/4)},clone:function(){var a=T.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var l=[],f=0;f<a;f+=4)l.push(y());return new S.init(l,a)}}),d=b.enc={},o=d.Hex={stringify:function(a){for(var l=a.words,f=a.sigBytes,g=[],m=0;m<f;m++){var w=l[m>>>2]>>>24-m%4*8&255;g.push((w>>>4).toString(16)),g.push((w&15).toString(16))}return g.join("")},parse:function(a){for(var l=a.length,f=[],g=0;g<l;g+=2)f[g>>>3]|=parseInt(a.substr(g,2),16)<<24-g%8*4;return new S.init(f,l/2)}},u=d.Latin1={stringify:function(a){for(var l=a.words,f=a.sigBytes,g=[],m=0;m<f;m++){var w=l[m>>>2]>>>24-m%4*8&255;g.push(String.fromCharCode(w))}return g.join("")},parse:function(a){for(var l=a.length,f=[],g=0;g<l;g++)f[g>>>2]|=(a.charCodeAt(g)&255)<<24-g%4*8;return new S.init(f,l)}},i=d.Utf8={stringify:function(a){try{return decodeURIComponent(escape(u.stringify(a)))}catch(l){throw new Error("Malformed UTF-8 data")}},parse:function(a){return u.parse(unescape(encodeURIComponent(a)))}},p=E.BufferedBlockAlgorithm=T.extend({reset:function(){this._data=new S.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=i.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var l,f=this._data,g=f.words,m=f.sigBytes,w=this.blockSize,A=w*4,C=m/A;a?C=n.ceil(C):C=n.max((C|0)-this._minBufferSize,0);var O=C*w,L=n.min(O*4,m);if(O){for(var R=0;R<O;R+=w)this._doProcessBlock(g,R);l=g.splice(0,O),f.sigBytes-=L}return new S.init(l,L)},clone:function(){var a=T.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});E.Hasher=p.extend({cfg:T.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(a){return function(l,f){return new a.init(f).finalize(l)}},_createHmacHelper:function(a){return function(l,f){return new v.HMAC.init(a,f).finalize(l)}}});var v=b.algo={};return b})(Math);return e})})(B,B.exports)),B.exports}k.exports,(function(r,t){(function(e,n){r.exports=n(Y())})(x,function(e){return(function(n){var s=e,h=s.lib,y=h.WordArray,c=h.Hasher,b=s.algo,E=[],T=[];(function(){function o(v){for(var a=n.sqrt(v),l=2;l<=a;l++)if(!(v%l))return!1;return!0}function u(v){return(v-(v|0))*4294967296|0}for(var i=2,p=0;p<64;)o(i)&&(p<8&&(E[p]=u(n.pow(i,1/2))),T[p]=u(n.pow(i,1/3)),p++),i++})();var S=[],d=b.SHA256=c.extend({_doReset:function(){this._hash=new y.init(E.slice(0))},_doProcessBlock:function(o,u){for(var i=this._hash.words,p=i[0],v=i[1],a=i[2],l=i[3],f=i[4],g=i[5],m=i[6],w=i[7],A=0;A<64;A++){if(A<16)S[A]=o[u+A]|0;else{var C=S[A-15],O=(C<<25|C>>>7)^(C<<14|C>>>18)^C>>>3,L=S[A-2],R=(L<<15|L>>>17)^(L<<13|L>>>19)^L>>>10;S[A]=O+S[A-7]+R+S[A-16]}var At=f&g^~f&m,Ct=p&v^p&a^v&a,Et=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),Tt=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),X=w+Tt+At+T[A]+S[A],Lt=Et+Ct;w=m,m=g,g=f,f=l+X|0,l=a,a=v,v=p,p=X+Lt|0}i[0]=i[0]+p|0,i[1]=i[1]+v|0,i[2]=i[2]+a|0,i[3]=i[3]+l|0,i[4]=i[4]+f|0,i[5]=i[5]+g|0,i[6]=i[6]+m|0,i[7]=i[7]+w|0},_doFinalize:function(){var o=this._data,u=o.words,i=this._nDataBytes*8,p=o.sigBytes*8;return u[p>>>5]|=128<<24-p%32,u[(p+64>>>9<<4)+14]=n.floor(i/4294967296),u[(p+64>>>9<<4)+15]=i,o.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var o=c.clone.call(this);return o._hash=this._hash.clone(),o}});s.SHA256=c._createHelper(d),s.HmacSHA256=c._createHmacHelper(d)})(Math),e.SHA256})})(k,k.exports);var Z=k.exports,tt=K(Z);const I=document,U=(r,t)=>{const e=I.createElement("img");return e.height=1,e.width=1,e.style.display="none",e.src=r,e.onload=t,e.alt="",I.body.appendChild(e)},et=(r,t=!0)=>{const e=I.createElement("script");return e.type="text/javascript",e.src=r,e.async=t,I.body.appendChild(e)},rt=r=>{let t="_au_"+r+"=",e=decodeURIComponent(document.cookie).split(";");for(let n=0;n<e.length;n++){let s=e[n];for(;s.charAt(0)==" ";)s=s.substring(1);if(s.indexOf(t)==0)return s.substring(t.length,s.length)}return null},nt=r=>{const t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;let e=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,n=r.split("."),s=n[n.length-1];(s.length>4||s==="com"||s==="org"||s==="net")&&(e=t);let h=r.match(e);return h?h[0]:r},st=(r,t)=>{document.cookie="_au_"+r+"="+t+"; domain="+nt(document.location.hostname)+"; path=/; max-age=31536000"};function q(r){let t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");r||(r=Math.floor(Math.random()*t.length));let e="";for(let n=0;n<r;n++)e+=t[Math.floor(Math.random()*t.length)];return e}function it(){const r=Math.round(Date.now()/1e3);return"AU1S-0100-"+String(r).padStart(12,"0")+"-"+q(8)+"-"+q(4)}function at(r,t){let e=[];try{if(typeof t.featurePolicy=="undefined")return e;"browsingTopics"in t&&t.featurePolicy.allowsFeature("browsing-topics")&&e.push("BT"),"joinAdInterestGroup"in r.navigator&&t.featurePolicy.allowsFeature("join-ad-interest-group")&&e.push("JI"),"runAdAuction"in r.navigator&&t.featurePolicy.allowsFeature("run-ad-auction")&&e.push("RA"),t.featurePolicy.allowsFeature("attribution-reporting")&&e.push("AR")}catch(n){console.error(n)}return e}function ot(r){function t(p,v){var a,l,f,g,m;return f=p&2147483648,g=v&2147483648,a=p&1073741824,l=v&1073741824,m=(p&1073741823)+(v&1073741823),a&l?m^2147483648^f^g:a|l?m&1073741824?m^3221225472^f^g:m^1073741824^f^g:m^f^g}function e(p,v,a,l,f,g,m){return p=t(p,t(t(v&a|~v&l,f),m)),t(p<<g|p>>>32-g,v)}function n(p,v,a,l,f,g,m){return p=t(p,t(t(v&l|a&~l,f),m)),t(p<<g|p>>>32-g,v)}function s(p,v,a,l,f,g,m){return p=t(p,t(t(v^a^l,f),m)),t(p<<g|p>>>32-g,v)}function h(p,v,a,l,f,g,m){return p=t(p,t(t(a^(v|~l),f),m)),t(p<<g|p>>>32-g,v)}function y(p){var v="",a="",l;for(l=0;3>=l;l++)a=p>>>8*l&255,a="0"+a.toString(16),v+=a.substr(a.length-2,2);return v}var c=[],b,E,T,S,d,o,u,i;for(r=(function(p){p=p.replace(/\r\n/g,`
`);for(var v="",a=0;a<p.length;a++){var l=p.charCodeAt(a);128>l?v+=String.fromCharCode(l):(127<l&&2048>l?v+=String.fromCharCode(l>>6|192):(v+=String.fromCharCode(l>>12|224),v+=String.fromCharCode(l>>6&63|128)),v+=String.fromCharCode(l&63|128))}return v})(r),c=(function(p){var v,a=p.length;v=a+8;for(var l=16*((v-v%64)/64+1),f=Array(l-1),g=0,m=0;m<a;)v=(m-m%4)/4,g=m%4*8,f[v]|=p.charCodeAt(m)<<g,m++;return v=(m-m%4)/4,f[v]|=128<<m%4*8,f[l-2]=a<<3,f[l-1]=a>>>29,f})(r),d=1732584193,o=4023233417,u=2562383102,i=271733878,r=0;r<c.length;r+=16)b=d,E=o,T=u,S=i,d=e(d,o,u,i,c[r+0],7,3614090360),i=e(i,d,o,u,c[r+1],12,3905402710),u=e(u,i,d,o,c[r+2],17,606105819),o=e(o,u,i,d,c[r+3],22,3250441966),d=e(d,o,u,i,c[r+4],7,4118548399),i=e(i,d,o,u,c[r+5],12,1200080426),u=e(u,i,d,o,c[r+6],17,2821735955),o=e(o,u,i,d,c[r+7],22,4249261313),d=e(d,o,u,i,c[r+8],7,1770035416),i=e(i,d,o,u,c[r+9],12,2336552879),u=e(u,i,d,o,c[r+10],17,4294925233),o=e(o,u,i,d,c[r+11],22,2304563134),d=e(d,o,u,i,c[r+12],7,1804603682),i=e(i,d,o,u,c[r+13],12,4254626195),u=e(u,i,d,o,c[r+14],17,2792965006),o=e(o,u,i,d,c[r+15],22,1236535329),d=n(d,o,u,i,c[r+1],5,4129170786),i=n(i,d,o,u,c[r+6],9,3225465664),u=n(u,i,d,o,c[r+11],14,643717713),o=n(o,u,i,d,c[r+0],20,3921069994),d=n(d,o,u,i,c[r+5],5,3593408605),i=n(i,d,o,u,c[r+10],9,38016083),u=n(u,i,d,o,c[r+15],14,3634488961),o=n(o,u,i,d,c[r+4],20,3889429448),d=n(d,o,u,i,c[r+9],5,568446438),i=n(i,d,o,u,c[r+14],9,3275163606),u=n(u,i,d,o,c[r+3],14,4107603335),o=n(o,u,i,d,c[r+8],20,1163531501),d=n(d,o,u,i,c[r+13],5,2850285829),i=n(i,d,o,u,c[r+2],9,4243563512),u=n(u,i,d,o,c[r+7],14,1735328473),o=n(o,u,i,d,c[r+12],20,2368359562),d=s(d,o,u,i,c[r+5],4,4294588738),i=s(i,d,o,u,c[r+8],11,2272392833),u=s(u,i,d,o,c[r+11],16,1839030562),o=s(o,u,i,d,c[r+14],23,4259657740),d=s(d,o,u,i,c[r+1],4,2763975236),i=s(i,d,o,u,c[r+4],11,1272893353),u=s(u,i,d,o,c[r+7],16,4139469664),o=s(o,u,i,d,c[r+10],23,3200236656),d=s(d,o,u,i,c[r+13],4,681279174),i=s(i,d,o,u,c[r+0],11,3936430074),u=s(u,i,d,o,c[r+3],16,3572445317),o=s(o,u,i,d,c[r+6],23,76029189),d=s(d,o,u,i,c[r+9],4,3654602809),i=s(i,d,o,u,c[r+12],11,3873151461),u=s(u,i,d,o,c[r+15],16,530742520),o=s(o,u,i,d,c[r+2],23,3299628645),d=h(d,o,u,i,c[r+0],6,4096336452),i=h(i,d,o,u,c[r+7],10,1126891415),u=h(u,i,d,o,c[r+14],15,2878612391),o=h(o,u,i,d,c[r+5],21,4237533241),d=h(d,o,u,i,c[r+12],6,1700485571),i=h(i,d,o,u,c[r+3],10,2399980690),u=h(u,i,d,o,c[r+10],15,4293915773),o=h(o,u,i,d,c[r+1],21,2240044497),d=h(d,o,u,i,c[r+8],6,1873313359),i=h(i,d,o,u,c[r+15],10,4264355552),u=h(u,i,d,o,c[r+6],15,2734768916),o=h(o,u,i,d,c[r+13],21,1309151649),d=h(d,o,u,i,c[r+4],6,4149444226),i=h(i,d,o,u,c[r+11],10,3174756917),u=h(u,i,d,o,c[r+2],15,718787259),o=h(o,u,i,d,c[r+9],21,3951481745),d=t(d,b),o=t(o,E),u=t(u,T),i=t(i,S);return(y(d)+y(o)+y(u)+y(i)).toLowerCase()}const P=6e4,N=36e5,ut=864e5;function ct(r){var t="au/test";try{return r.localStorage.setItem(t,t),r.localStorage.removeItem(t),!0}catch(e){return!1}}class dt{constructor(t){this.w=t,this.now=1*new Date,this.useCookie=!ct(this.w)}getCookie(t){return rt(t)}get(t,e=!1){if(this.useCookie||e)return this.getCookie(t);let n=this.w.localStorage.getItem("au/"+t);if(n){if(n=JSON.parse(n),n.e>this.now)return n.v;this.w.localStorage.removeItem("au/"+t)}return null}setCookie(t,e,n=P){st(t,e)}set(t,e,n=P,s=!1){this.useCookie||s?this.setCookie(t,e,n):this.w.localStorage.setItem("au/"+t,JSON.stringify({v:e,e:this.now+n}))}}const M="https://a.ad.gt",H="https://p.ad.gt",ht="https://pixels.ad.gt",lt="https://seg.ad.gt",pt="https://ids.ad.gt";function z(r,t,e,n){r.au_seg=e,(n||[]).forEach(h=>h(r,t,e.segments));const s=new CustomEvent("auSegReady",{detail:e});t.dispatchEvent(s)}var ft=Object.defineProperty,gt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,F=(r,t,e)=>t in r?ft(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_=(r,t)=>{for(var e in t||(t={}))yt.call(t,e)&&F(r,e,t[e]);if(V)for(var e of V(t))mt.call(t,e)&&F(r,e,t[e]);return r},D=(r,t)=>gt(r,vt(t));const j=window,W=document,G={"og:title":"title","og:description":"description","og:image":"image","og:url":"url","og:type":"type","og:name":"name","og:locale":"locale"},J={description:"description",keywords:"keywords"},wt="meta[name='audigent:tags']";class bt{constructor(t){const{auvars:e,decoratorTarget:n,taggerStrategy:s}=t||{};this.w=j,this.u=W.location||j.location,this.d=W,this.auvars=e,this.dataStore=new dt(j),this.customOptions={},this.isIndexPage=this.u.pathname==="/",this.customTags=[],this.customAttributes={},this.userDefinedTags=[],this.userDefinedAttributes={},this.internalLinks=[],this.GlobalHandlers={},this.randNum=Math.random(),this.decoratorTarget=n||(this.isIndexPage?.95:.97),this.u.hostname.toLowerCase().endsWith("lnk.to")?this.taggerStrategy="FULL_PATH":this.taggerStrategy=s||this.auvars.tgs||"NONE",this.psf=at(this.w,this.d),this.setupSessionId(),this.setupHadron()}docReady(){this.customOptions.autoPageView!==!1&&this.sendPageView(),this.ListenerIterator("a",this.clickHandler),this.w.addEventListener("hashchange",()=>{this.sendOffsiteClick({url:this.u.href}),this.sendPageView(),this.pixels()})}clearOptions(){this.customOptions={}}setOptions(t){const{options:e}=t||{};return typeof e=="object"?(this.customOptions=_(_({},this.customOptions),e),!0):!1}observeDom(t,e,n={childList:!0}){const s=window.MutationObserver||window.WebKitMutationObserver;if(!(!t||t.nodeType!==1))if(s){const h=new s(e);return h.observe(t,n),h}else window.addEventListener&&(t.addEventListener("DOMNodeInserted",e,!1),t.addEventListener("DOMNodeRemoved",e,!1))}push(t,e,n){if(typeof t=="string")return e&&e!==this.auvars.p?(console.warn("[Audigent] skip .push("+t+"), p is not a match"),!1):(console.warn('[Audigent] deprecated use of "push": please use .push( object )'),(this[t]||(()=>!1)).call(this,n),!0);if(t&&typeof t=="object"){const{fn:s,category:h,partnerId:y}=t,c=s||h;if(y&&y!==this.auvars.p)return console.warn("[Audigent] skip .push("+c+"), partnerId is not a match"),!1;if(s){const b=t.args;return Array.isArray(b)?(b.map(E=>(this[c]||(()=>!1)).call(this,E)),!0):((this[c]||(()=>!1)).call(this,b),!0)}return(this[c]||(()=>!1)).call(this,t),!0}return console.warn("[Audigent] could not execute the required command: please check your syntax"),!1}setupHadron(){var t;const e=(t=this.w.hadron)==null?void 0:t.id;this.auvars.h=e||null}getAudigentId(t){if(t instanceof Function)return t(this.auvars.a),this.auvars.a;const{callback:e}=t||{};return e instanceof Function&&e(this.auvars.a),this.auvars.a}setupSessionId(){let t=this.dataStore.get("sid");t==null&&(t=it()),this.auvars.s=t,this.dataStore.set("sid",t,30*P)}getTaggerComponents(){return null}setupTaggerId(){const t=this.u.hostname.toLowerCase(),e=this.getTags();let n=this.getTaggerComponents();Array.isArray(n)&&n.length>0||(this.taggerStrategy=="FULL_PATH"?n=[t,this.u.pathname,this.auvars.p]:Array.isArray(e)&&e.length>0?n=[t,"["+e.join(",").toLowerCase()+"]",this.auvars.p]:n=[t,"/",this.auvars.p]);const s=ot(n.join("")).toLowerCase();return this.auvars.t=s,this.dataStore.set("tid",s,N),s}getMetaAttributes(){const t=this.d.querySelectorAll("meta");let e={url:this.u.href,title:this.d.title};for(const n of t){let s;const h=n.getAttribute("property");if(h!==void 0)h in G&&(s=G[h]);else{const y=n.getAttribute("name");y in J&&(s=J[y])}if(s!==void 0){const y=n.getAttribute("content");y!==void 0&&typeof y=="string"&&(s==="keywords"?e[s]=y.split(",").map(c=>c.trim()).filter(c=>c.length>0):(!(s in e)||e[s].length<y.length)&&(e[s]=y))}}return e}getCustomAttributes(){return{}}getAttributes(){return _(_(_(_({},this.customAttributes),this.userDefinedAttributes),this.getCustomAttributes()),this.getMetaAttributes())}clearAttributes(){this.userDefinedAttributes={}}setAttributes(t){const{attributes:e}=t||{};return typeof e=="object"?(this.userDefinedAttributes=e,!0):!1}addAttributes(t){const{attributes:e}=t||{};return typeof e=="object"?(this.userDefinedAttributes=_(_({},this.userDefinedAttributes),e),!0):!1}getMetaTags(){const t=document.head.querySelectorAll(wt)[0];return t?t.content.split("|").map(e=>e.trim()).filter(e=>e.length>0).map(e=>(this.u.hostname+" > "+e).toUpperCase()):[]}getCustomTags(){return[]}getTags(){return[...this.customTags,...this.userDefinedTags,...this.getCustomTags(),...this.getMetaTags()].filter(t=>typeof t=="string"||t instanceof String).map(t=>t.replace(/,/g,"")).map(t=>t.trim()).filter(t=>t.length>0).map(t=>t.toUpperCase())}clearTags(){this.userDefinedTags=[]}setTags(t){const{tags:e}=t||{};return Array.isArray(e)?(this.userDefinedTags=e,!0):typeof e=="string"?(this.userDefinedTags=[e],!0):!1}addTags(t){const{tags:e}=t||{};return Array.isArray(e)?(this.userDefinedTags=[...e,...this.userDefinedTags],!0):typeof e=="string"?(this.userDefinedTags=[e,...this.userDefinedTags],!0):!1}writeDecoratorRecord(t){const{tags:e,decor_dict:n,attributes:s}=t;this.customTags=[...this.customTags,...e||[]],this.customAttributes=_(_(_({},this.customAttributes),n||{}),s||{})}sendDecoratorRecord(){if(!(this.randNum>=this.decoratorTarget))return null;const t=this.getAttributes(),e=this.getTags(),n=D(_({},t),{tags:e.join(),tagger_id:this.auvars.t,partner_id:this.auvars.p});let s=new XMLHttpRequest,h=`${H}/api/v1/dec`;return s.open("POST",h,!0),s.setRequestHeader("Content-type","application/json"),s.send(JSON.stringify(n)),s}ListenerIterator(t,e){Array.prototype.forEach.call(this.d.querySelectorAll(t),n=>{this.ListenerAttacher({input:n,method:e})})}ListenerAttacher(t){const{input:e,method:n}=t;e!=null&&(e.addEventListener?e.addEventListener("mousedown",n.bind(this),!1):e.attachEvent&&e.attachEvent("mousedown",n))}GlobalListenerHandler(t){this.GlobalHandlers[t.type].forEach(e=>{if(t.target.matches(e.selector))e.method(t);else{let n=t.target,s=!1;for(;n.parentElement&&!s;)n=n.parentElement,s=n.matches(e.selector),s&&e.method(D(_({},t),{target:n}))}})}GlobalListenerAttacher(t,e,n){typeof t=="string"&&(t=[t]),t.forEach(s=>{this.GlobalHandlers[s]=this.GlobalHandlers[s]||[],this.GlobalHandlers[s].push({selector:e,method:n}),document.addEventListener?(document.removeEventListener(s,window.au.l),document.addEventListener(s,window.au.l)):document.attachEvent&&(document.detachEvent(s,window.au.l),document.attachEvent(s,window.au.l))})}sendOffsiteClick(t){const{url:e}=t;U(`${M}/api/v1/off-site-click/${this.auvars.p}?tagger_id=${this.auvars.t}&url=${e}`)}clickHandler(t){let e=t.currentTarget.getAttribute("href");e!==null&&this.internalLinks.includes(this.u.hostname)&&(this.sendOffsiteClick({url:e}),this.sendPageView())}sendUserBehaviour(t){const{action:e}=t,n={click_url:e,tagger_id:this.auvars.t,audigent_id:this.auvars.a,partner_id:this.auvars.p},s=new Blob([JSON.stringify(n)],{type:"application/json"});this.w.navigator.sendBeacon(`${H}/api/v1/ubh`,s)}behavior(t){const e=encodeURIComponent(`${this.u.protocol}//${this.u.hostname}${this.u.pathname}__audigent-behavior-${t.action}${this.u.search}${this.u.hash}`);this.sendOffsiteClick({url:e}),this.sendCustomEvent({eventCategory:"audigent-behavior",eventAction:t.action,eventLabel:this.auvars.t})}sendEvent(t){let{event:e,events:n,type:s}=t;if(e=e||n,!e){if(!s)return null;e=_({},t),delete e.category,delete e.partnerId}const h={tagger_id:this.auvars.t,partner_id:this.auvars.p,audigent_id:this.auvars.a,events:Array.isArray(e)?e:[e]};let y=new XMLHttpRequest,c=`${H}/api/v1/event`;return y.open("POST",c,!0),y.setRequestHeader("Content-type","application/json"),y.send(JSON.stringify(h)),""}sendCustomEvent(t){const{eventCategory:e,eventAction:n,eventLabel:s,skipSQS:h}=t;h||this.sendEvent({event:{type:e,eventAction:n,eventLabel:s}})}sendConsent(t){const{consented:e,consentType:n,consentString:s}=t,h="consent_"+n.toLowerCase(),y=this.dataStore.get("consent_"+t.consentType.toLowerCase());if(y&&s==y)return;const c={audigent_id:this.auvars.a,tagger_id:this.auvars.t,partner_id:this.auvars.p,consented:e,consent_type:n,consent_string:s},b=new Blob([JSON.stringify(c)],{type:"application/json"});return this.w.navigator.sendBeacon(`${H}/api/v1/con`,b)&&this.dataStore.set(h,s||"n/a",ut),""}pixels(){const t=`${ht}/api/v1/getpixels?tagger_id=${this.auvars.t}&url=${encodeURIComponent(this.u.href)}&code='none'`;et(t,!0)}tags(t){return!1}conversion(t){return!1}sendPageView(t){this.randNum=Math.random(),this.setupTaggerId();const e=1*new Date,n={event_timestamp:e,url:this.u.href,referrer:this.d.referrer,partner_id:this.auvars.p,tagger_id:this.auvars.t,audigent_id:this.auvars.a,session_id:this.auvars.s,p_s_f:this.psf};this.auvars.h&&(n.hadron_id=this.auvars.h);const s=(t==null?void 0:t.data)||{},h={category:"pageView",version:"v2",created_at:e,properties:_(_({},n),s)};let y=new XMLHttpRequest,c=`${M}/api/v1/collect`;y.open("POST",c,!0),y.withCredentials=!0,y.setRequestHeader("Content-type","text/plain"),y.send(this.w.btoa(JSON.stringify(h))),this.pixels(),this.sendDecoratorRecord()}beopEvent(t){const e=t.partnerId||this.auvars.p;this.sendEvent({event:D(_({},t.data||{}),{partner_id:e,type:"beop"})})}trackEvent(t){return!1}DispatchEvent(t){const{eventName:e}=t,n=(s=>{if(typeof window.CustomEvent=="function")return new CustomEvent(s);const h={bubbles:!1,cancelable:!1,detail:void 0},y=document.createEvent("CustomEvent");return y.initCustomEvent(s,h.bubbles,h.cancelable,h.detail),y})(e);window.dispatchEvent(n)}optout(){U(`${pt}/api/v1/optout?au_id=${this.auvars.a}`)}segCapture(t,e){const n=(t==null?void 0:t.segments)||[];if(n.length>0&&this.randNum>=.9){const s={tagger_id:this.auvars.t,partner_id:this.auvars.p,audigent_id:this.auvars.a,segment_ids:n.join("|"),is_cached:e},h=new Blob([JSON.stringify(s)],{type:"application/json"});return this.w.navigator.sendBeacon(`${H}/api/v1/segs`,h),!0}return!1}setupInPageTaxonomy(t){const e=this,n=this.dataStore.get("seg");if(n!=null){z(e.w,e.d,n,t),this.segCapture(n,!0);return}let s=new URL(`${lt}/api/v2/segments`);if(s.searchParams.set("url",encodeURIComponent(this.u.href)),s.searchParams.set("partner_id",this.auvars.p),this.auvars.t!==void 0)s.searchParams.set("tagger_id",this.auvars.t);else{const y=this.setupTaggerId();s.searchParams.set("tagger_id",y)}s.searchParams.set("au_id",this.auvars.a);let h=new XMLHttpRequest;h.timeout=1e4,h.onload=function(){if(h.readyState==XMLHttpRequest.DONE&&h.status==200){const y=JSON.parse(h.response);z(e.w,e.d,y,t),e.dataStore.set("seg",y,N*6),e.segCapture(y,!1)}},h.ontimeout=function(){console.log("[Audigent] Taxonomy Service > Timeout")},h.onerror=function(){console.log("[Audigent] Taxonomy Service > Invalid Response")},h.open("GET",s,!0),h.send()}addUserIdentity(t){if(!t)return!1;const{identityType:e,identityValue:n}=t;if(e===void 0||n===void 0)return!1;if(e==="email"){const s=window.btoa(n);return this.sendEvent({event:{type:"e",value:s}})}else return this.sendEvent({event:{type:"u",[e]:n,identityType:e,identityValue:n}})}addUserEmailAddress(t){if(!t)return!1;const{identityValue:e}=t;if(e===void 0)return!1;let n=e.toLowerCase().trim();if(n.endsWith("@gmail.com")){let h=n.split("@")[0];h=h.split("+")[0],h=h.replace(/\./g,""),n=h+"@gmail.com"}const s=tt(n).toString();return this.addUserIdentity({identityType:"hem_sha256",identityValue:s})}addUserProperty(t){if(!t)return!1;const{propertyName:e,propertyValue:n}=t;return e===void 0||n===void 0?!1:e==="email"?this.addUserIdentity({identityType:"email",identityValue:n}):this.sendEvent({event:{type:"user.property",propertyName:e,propertyValue:n}})}}(function(r,t){r=r||"docReady",t=t||window;var e=[],n=!1,s=!1;function h(){if(!n){n=!0;for(var c=0;c<e.length;c++)e[c].fn.call(window,e[c].ctx);e=[]}}function y(){document.readyState==="complete"&&h()}t[r]=function(c,b){if(typeof c!="function")throw new TypeError("callback for docReady(fn) must be a function");if(n){setTimeout(function(){c(b)},1);return}else e.push({fn:c,ctx:b});document.readyState==="complete"||!document.attachEvent&&document.readyState==="interactive"?setTimeout(h,1):s||(document.addEventListener?(document.addEventListener("DOMContentLoaded",h,!1),window.addEventListener("load",h,!1)):(document.attachEvent("onreadystatechange",y),window.attachEvent("onload",h)),s=!0)}})("docReady",window);function _t(r,t){const e="521";let n=r.au&&Array.isArray(r.au)?[...r.au]:[];r.auvars.autag_objs=[...(r.auvars.autag_objs||[]).filter(s=>s!=="autag"),"autag"],r.au={push:(...s)=>{r.auvars.autag_objs.forEach(h=>Object.values(r[h]||{}).forEach(y=>y.push(...s)))},l:s=>{r.auvars.autag_objs.forEach(h=>Object.values(r[h]||{}).forEach(y=>y.GlobalListenerHandler(s)))},init:()=>{r.auvars[e].hist=r.auvars[e].hist||[];const s=r.auvars[e].hist.slice(-1)[0];r.autag=r.autag||{},(!r.autag[e]||s!==r.location.href)&&(r.auvars[e].hist.push(r.location.href),r.autag[e]=t({auvars:r.auvars[e]}))}},r.au.init(),n.forEach(s=>r.au.push(s))}docReady(()=>window.au.push({category:"docReady"}));class St extends bt{}(function(r){_t(r,function(t){return new St(t)})})(window)})();