/** * HubSpot Cookie Banner Code Copyright 2025 HubSpot, Inc. http://www.hubspot.com */ !function(){"use strict";const e=-1,t="javascript/blocked",r="",n="forms/v2.js",s="hs/cta/",o="jquery",i="recaptcha",c="hs-script-loader",l={IGNORE:"data-hs-ignore",SAVED_SRC:"data-hs-saved-src",SAVED_SRCSET:"data-hs-saved-src-set",SAVED_TYPE:"data-hs-saved-type",IS_BLOCKED:"data-hs-blocked",SRC:"src",TYPE:"type",ID:"id"},a=new Set(["SCRIPT","IMG","EMBED","IFRAME","AUDIO","VIDEO","PICTURE","INPUT"]),u={BLOCK:0,UNBLOCK:1},h="hs_auto_blocking_run_once",p=["APPLICATION/ECMASCRIPT","APPLICATION/JAVASCRIPT","APPLICATION/X-ECMASCRIPT","APPLICATION/X-JAVASCRIPT","TEXT/ECMASCRIPT","TEXT/JAVASCRIPT","TEXT/JAVASCRIPT1.0","TEXT/JAVASCRIPT1.1","TEXT/JAVASCRIPT1.2","TEXT/JAVASCRIPT1.3","TEXT/JAVASCRIPT1.4","TEXT/JAVASCRIPT1.5","TEXT/JSCRIPT","TEXT/LIVESCRIPT","TEXT/X-ECMASCRIPT","TEXT/X-JAVASCRIPT","MODULE",""],m=/^(?:(?:([^:/?#]+):)?(?:\/\/([^:/?#]+)(?::([0-9]+))?)+?)?([^?#]+)?(?:\?([^#]*))?(?:#(.+))?/,d=e=>{const t=(e||"").toLowerCase();return t?"http"===t?80:"https"===t?443:null:null},E=e=>{const[,t,r,n,s,o,i]=m.exec(e);return{protocol:t,hostname:r,port:void 0!==n?parseInt(n,10):d(t),path:s,query:o,hash:i}},b=e=>{if(!e.port)return!0;if(!e.protocol)return!0;const t=(e.protocol||"").toLowerCase();return"http"===t&&80===e.port||"https"===t&&443===e.port},A=e=>[e.hostname?`${e.protocol||"https"}://`:"",e.hostname,b(e)?"":`:${e.port}`,e.hostname&&e.path&&"/"!==e.path.substr(0,1)?`/${e.path}`:e.path].join(""),g=()=>document.location.hash.indexOf("#hsdbg")>-1||document.location.search.indexOf("hsdbg")>-1,S=e=>{g()&&e&&window.console.error(`[HS cookie blocking script]: ${e}`)},T=e=>{g()&&window.console.debug(`[HS cookie blocking script]: ${e}`)};var y={debug:T,error:S};const f=e=>{if(!e)return"";const t=E(e);return A(t)},L=["onabort","onbeforecopy","onbeforecut","onbeforepaste","onblur","onchange","onclick","oncontextmenu","oncopy","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpaste","onreset","onresize","onscroll","onsearch","onselect","onselectstart","onsubmit","onunload"],C=(e,t)=>{L.forEach((r=>{const n=e[r];n&&"function"==typeof n&&(t[r]=n.bind(t))}))},v=(e,t)=>{try{C(e,t);if("function"!=typeof e.getEventListeners){T(`getEventListeners was not defined on ${e.tagName}`);return}Object.values(e.getEventListeners()).forEach((e=>e.forEach((e=>{t.addEventListener(e.type,e.listener.bind(t),e.useCapture)}))))}catch(e){S("We encoutered an error copying over the events listeners.");console.error(e)}},I=e=>{try{const t=new URL(e);t.hash="";return t.href}catch(t){return e}},w=e=>{const t=[];"src"in e&&"string"==typeof e.src&&e.src&&t.push(I(e.src));if("srcset"in e&&"string"==typeof e.srcset&&e.srcset){const r=e.getAttribute("src"),n=e.srcset.split(",").map((e=>e.trim()));try{n.forEach((r=>{const n=r.split(" ")[0];e.setAttribute("src",n);"src"in e&&"string"==typeof e.src&&e.src&&t.push(I(e.src))}))}finally{null==r?e.removeAttribute("src"):e.setAttribute("src",r)}}return t};function R(e,t){for(var r,n=e.length,s=t^n,o=0;n>=4;){r=1540483477*(65535&(r=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16);s=1540483477*(65535&s)+((1540483477*(s>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16));n-=4;++o}switch(n){case 3:s^=(255&e.charCodeAt(o+2))<<16;case 2:s^=(255&e.charCodeAt(o+1))<<8;case 1:s=1540483477*(65535&(s^=255&e.charCodeAt(o)))+((1540483477*(s>>>16)&65535)<<16)}s=1540483477*(65535&(s^=s>>>13))+((1540483477*(s>>>16)&65535)<<16);return(s^=s>>>15)>>>0}const k=function(e){return R(e)};class P{constructor(e){this.element=e;this.tagName=e.tagName;this.parentElement=e.parentElement;this.hash=this.computeHash()}block(){if(this.isAlreadyBlocked())return;if(this.isMalformedElement()){y.debug(`We will not block malformed element ${this.element.outerHTML}.`);return}const e=this.element.getAttribute("src");this.element.src=r;this.element.setAttribute(l.SAVED_SRC,e);const t=this.element.getAttribute("srcset");if(t){this.element.setAttribute("srcset","");this.element.setAttribute(l.SAVED_SRCSET,t)}this.cloneAndReplaceElement()}unblock(){y.debug(`unblocking element of type ${this.tagName} with hash ${this.hash}`);const e=this.element.getAttribute(l.SAVED_SRC);e&&(this.element.src=e);const t=this.element.getAttribute(l.SAVED_SRCSET);t&&this.element.setAttribute("srcset",t);this.element.removeAttribute(l.IS_BLOCKED)}getAllAbsoluteSrcs(){return w(this.element)}getHash(){return this.hash}computeHash(){const e=this.element.getAttribute("src")||this.element.getAttribute(l.SAVED_SRC),t=`${this.tagName}${f(e)}${this.element.getAttribute("type")||""}`;return k(t)}cloneAndReplaceElement(){const e=this.element.cloneNode(!0);v(this.element,e);e.setAttribute(l.IS_BLOCKED,"true");this.parentElement.insertBefore(e,this.element);this.parentElement.removeChild(this.element);this.element=e}isAlreadyBlocked(){const e=this.element.getAttribute(l.SAVED_SRC),t=this.element.getAttribute(l.SAVED_SRCSET);return e&&e.length>0||t&&t.length>0}isMalformedElement(){const e=this.element.getAttribute("src"),t=this.element.getAttribute("srcset"),r=this.element.getAttribute(l.SAVED_SRC),n=this.element.getAttribute(l.SAVED_SRCSET);return!(e||t||r||n)}}class D{constructor(e){this.element=e;this.tagName=e.tagName;this.parentElement=e.parentElement;this.sourceTags=Array.prototype.slice.call(e.getElementsByTagName("source"));this.hash=this.computeHash()}block(){const e=this.element.getAttribute("src"),t=this.element.getAttribute(l.SAVED_SRC);if(e){this.element.src=r;t||this.element.setAttribute(l.SAVED_SRC,e)}this.sourceTags.forEach((e=>{this.element.removeChild(e)}));this.element.setAttribute(l.IS_BLOCKED,"true")}unblock(){y.debug(`unblocking element of type ${this.tagName} with hash ${this.hash}`);const e=this.element.getAttribute(l.SAVED_SRC);e&&(this.element.src=e);this.element.getAttribute("src")===r&&this.element.removeAttribute("src");const t=HTMLElement.prototype.prepend?HTMLElement.prototype.prepend:HTMLElement.prototype.appendChild;HTMLElement.prototype.prepend&&this.sourceTags.reverse();this.sourceTags.forEach((e=>{const r=e.getAttribute(l.SAVED_SRC),n=e.getAttribute(l.SAVED_SRCSET);r&&(e.src=r);n&&e.setAttribute("srcset",n);t.call(this.element,e)}));this.element.removeAttribute(l.IS_BLOCKED)}getAllAbsoluteSrcs(){return[...w(this.element),...this.sourceTags.flatMap(w)]}getHash(){return this.hash}computeHash(){let e=this.tagName;const t=this.element.getAttribute("src")||this.element.getAttribute(l.SAVED_SRC);if(t)e+=f(t);else{e+="with-sources";this.sourceTags.forEach((t=>{const r=t.getAttribute("src")||t.getAttribute(l.SAVED_SRC),n=t.getAttribute("srcset")||t.getAttribute(l.SAVED_SRCSET);r?e+=f(r):n&&(e+=f(n))}))}return k(e)}}class O extends D{unblock(){super.unblock();this.element.load()}}class N extends D{block(){super.block();this.blockedImages=this.getImgElements().map((e=>{const t=new P(e);t.block();return t}))}unblock(){super.unblock();this.blockedImages.forEach((e=>{e.unblock()}))}getImgElements(){return Array.prototype.slice.call(this.element.getElementsByTagName("IMG"))}getAllAbsoluteSrcs(){const e=[];e.push(...super.getAllAbsoluteSrcs());this.getImgElements().forEach((t=>{t.src&&e.push(t.src)}));return e}}class _{static isScript(e){return e&&"SCRIPT"===e.tagName}static shouldAllowScript(e){return!!_.isScript(e)&&(_.hasSourceThatShouldNotBeBlocked(e)||_.hasTypeThatShouldNotBeBlocked(e))}static hasTypeThatShouldNotBeBlocked(e){const r=e.getAttribute("type");return!!r&&(r.toUpperCase()!==t.toUpperCase()&&!_.isEvaluableScriptType(r))}static hasSourceThatShouldNotBeBlocked(e){return _.isAllowedScriptSource(e.getAttribute("src"))}static isAllowedId(e){return e===c}static isAllowedScriptSource(e){if(!e)return!1;let t;if("string"==typeof e)t=e;else{if(!e.toString){T("hsbanner - TrustedScriptURL but does not have a toString()");T(e);return!1}t=e.toString()}return t.includes(n)||t.includes(s)||t.toLowerCase().includes(o)||t.toLowerCase().includes(i)}static isEvaluableScriptType(e){return!e||p.includes(e.toUpperCase())}static getStringToHashForScript(e,t){const r=f(t);return`SCRIPT${t?r:e||""}`}static calculateScriptHash(e,t){return k(_.getStringToHashForScript(e,t))}}class V extends P{constructor(e){super(e);this.element=e}block(){const e=this.cloneScript(),r=e=>n=>{e.getAttribute("type")===t&&n.preventDefault();e.removeEventListener("beforescriptexecute",r)};this.element.addEventListener("beforescriptexecute",r(this.element));this.element.type&&this.element.type!==t&&e.setAttribute(l.SAVED_TYPE,this.element.type);HTMLScriptElement.prototype.setAttribute.call(this.element,"type",t);HTMLScriptElement.prototype.setAttribute.call(e,"type",t);this.element.remove();this.element=e;this.element.setAttribute(l.IS_BLOCKED,"true")}unblock(){y.debug(`unblocking element of type ${this.tagName} with hash ${this.hash}`);const e=this.element.getAttribute(l.SAVED_SRC),t=this.element.getAttribute(l.SAVED_TYPE);e&&HTMLScriptElement.prototype.setAttribute.call(this.element,l.SRC,e);t?HTMLScriptElement.prototype.setAttribute.call(this.element,l.TYPE,t):this.element.removeAttribute(l.TYPE);try{this.parentElement?this.parentElement.appendChild(this.element):document.body.append(this.element);this.element.removeAttribute(l.IS_BLOCKED)}catch(e){console.error("There was an issue unblocking a script",e)}}computeHash(){const t=this.element.id;if(t&&t.indexOf("hs-analytics")>-1)return e;const r=this.element.getAttribute("src")||this.element.getAttribute(l.SAVED_SRC);return _.calculateScriptHash(this.element.text,r)}cloneScript(){const e=Document.prototype.createElement.call(document,"script");this.element.getAttributeNames().forEach((t=>{HTMLScriptElement.prototype.setAttribute.call(e,t,this.element.getAttribute(t))}));e.text=this.element.text;v(this.element,e);return e}}function H(){Element.prototype._addEventListener=Element.prototype.addEventListener;Element.prototype._removeEventListener=Element.prototype.removeEventListener;Element.prototype.addEventListener=function(e,t,r=!1){this._addEventListener(e,t,r);this.eventListenerList||(this.eventListenerList={});this.eventListenerList[e]||(this.eventListenerList[e]=[]);this.eventListenerList[e].push({type:e,listener:t,useCapture:r})};Element.prototype.removeEventListener=function(e,t,r=!1){this._removeEventListener(e,t,r);this.eventListenerList||(this.eventListenerList={});this.eventListenerList[e]||(this.eventListenerList[e]=[]);for(let n=0;nnull!=e.tagName,x=e=>"true"===e.getAttribute(l.IGNORE),B=e=>{const t=e.getAttribute("src");return!!t&&t.toLowerCase().includes(i)},j=e=>{if(!a.has(e.tagName))return!1;if("INPUT"===e.tagName&&"image"!==e.type)return!1;const t="IMG"===e.tagName&&e.parentElement&&"PICTURE"===e.parentElement.tagName,r=B(e);return!(_.shouldAllowScript(e)||t||r)},$=new Set,U=(e,t,r)=>{const n=s=>{if(!M(s))return;if(!j(s)){s.children.length>0&&Array.from(s.children).forEach(n);return}if($.has(s))return;$.add(s);let i;switch(s.tagName){case"IMG":default:i=new P(s);if(i.isMalformedElement())return;break;case"VIDEO":case"AUDIO":i=new O(s);break;case"PICTURE":i=new N(s);break;case"SCRIPT":if(s.src&&s.src.toLowerCase().indexOf(o)>-1)return;i=new V(s)}if(!(r===u.UNBLOCK&&void 0===t[i.getHash()]||x(s)||_.isAllowedId(s.id))){i.block();$.add(i.element);e.push(i)}};new MutationObserver((e=>{e.forEach((({addedNodes:e})=>{e.forEach(n)}))})).observe(document.documentElement,{childList:!0,subtree:!0})},X=()=>{const e=document.write.bind(document);document.write=function(t){if("loading"===document.readyState){e(t);return}const r=document.currentScript;null!=r?r.insertAdjacentHTML("beforebegin",t):S("document.currentScript is unexpectedly null during document.write")}},K=(e,r)=>{const n=document.createElement.bind(document),s={textContent:Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),id:Object.getOwnPropertyDescriptor(Element.prototype,"id"),innerHTML:Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),innerText:Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerText"),src:Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src"),text:Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"text"),type:Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"type")};document.createElement=(...o)=>{if("script"!==o[0].toLowerCase())return n(...o);const i=n(...o),c=i.setAttribute.bind(i),a=i.removeAttribute.bind(i),h=t=>{const{src:n,text:s,type:o,id:c,ignore:l}=Object.assign({type:i.type,src:i.src,text:i.text,id:i.id,ignore:x(i)},t);if(l)return!1;if(!n&&!s)return!1;if(_.isAllowedScriptSource(n))return!1;if(!_.isEvaluableScriptType(o))return!1;if(_.isAllowedId(c))return!1;if(r===u.UNBLOCK){const t=_.calculateScriptHash(s,n);if(void 0===e[t])return!1}return!0},p=e=>{const r=i.getAttribute(l.SAVED_TYPE);h(Object.assign({type:r},e))?c(l.TYPE,t):null!=r?c(l.TYPE,r):a(l.TYPE)},m=(e,t)=>{Object.defineProperty(i,e,{get(){return s[e].get.call(i)},set(r){p({[t]:r});s[e].set.call(i,r)}})};m("id","id");m("src","src");m("text","text");m("innerHTML","text");m("innerText","text");m("textContent","text");Object.defineProperty(i,"type",{get(){return s.type.get.call(i)},set(e){const r=h({type:e});s.type.set.call(i,r?t:e);c(l.SAVED_TYPE,e)}});i.setAttribute=function(e,t){if("type"!==e&&"src"!==e&&"id"!==e){c(e,t);e!==l.IGNORE||p({})}else i[e]=t};return i}},J=()=>{},Y=()=>{window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);void 0===Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){const e=this.attributes,t=e.length,r=new Array(t);for(let n=0;n{const n=t[e.getHash()],s=Array.isArray(n)&&n.map((e=>F[e]));if(s&&s.reduce(((e,t)=>e&&r.categories[t]),!0)){window.console.debug(`Element with categories ${s} has been unblocked`,e);e.unblock()}};e.addEventListener("load",(()=>{const t=e=>{n.push=function(t){Array.prototype.push.call(n,t);s(t,e)};e.allowed?n.forEach((e=>e.unblock())):n.forEach((t=>s(t,e)))};window.console.debug("The following elements have been blocked by the HubSpot auto-blocker. To report issues, reach out to HubSpot support or interally to the HubSpot Cookie Banner team.",n);e.hsBlockedElements=n;(e._hsp=e._hsp||[]).push(["addPrivacyConsentListener",t])}))}(window)}(); /****** version static-1.30413 *****/