/** * HubSpot Cookie Banner Code Copyright 2026 HubSpot, Inc. http://www.hubspot.com */ !function(){"use strict";const t="cookiebot",e="onetrust",n=1,s=2,i=3,r={[n]:"analytics",[s]:"advertisement",[i]:"functionality"};class o{constructor(t,e,n){this.allowed=t;this.previousCategories=n||{necessary:!0,analytics:!1,advertisement:!1,functionality:!1};this.categories=e||{necessary:!0,analytics:t,advertisement:t,functionality:t}}allCategoriesSelected(){return this.categories.necessary&&this.categories.analytics&&this.categories.advertisement&&this.categories.functionality}getSafeCopy(){return new o(this.allowed,{necessary:this.categories.necessary,analytics:this.categories.analytics,advertisement:this.categories.advertisement,functionality:this.categories.functionality},{necessary:this.previousCategories.necessary,analytics:this.previousCategories.analytics,advertisement:this.previousCategories.advertisement,functionality:this.previousCategories.functionality})}toCookieString(){return`${n}:${this.categories.analytics},${s}:${this.categories.advertisement},${i}:${this.categories.functionality}`}static buildFromCookieString(t){const e=t.split(","),n={necessary:!0,analytics:!1,advertisement:!1,functionality:!1};e.forEach((t=>{const e=t.split(":");if(2!==e.length)return;const s=e[0],i=r[s];i&&(n[i]="true"===e[1])}));const s=n.necessary&&n.advertisement&&n.analytics&&n.functionality;return new o(s,n)}static buildInitialConsent(){return new o(!1,{necessary:!0,analytics:!1,advertisement:!1,functionality:!1})}}const a=()=>document.location.hash.indexOf("#hsdbg")>-1||document.location.search.indexOf("hsdbg")>-1,c=t=>{a()&&t&&window.console.error(`HS cookie banner integration - ${t}`)},l=t=>{a()&&t&&window.console.debug(`HS cookie banner integration - ${t}`)},u=t=>{if(!t)return null;const e=t.statistics&&t.marketing&&t.preferences;return new o(e,{necessary:!0,analytics:t.statistics,advertisement:t.marketing,functionality:t.preferences})},y=(t,e)=>{const n=e.Cookiebot;if(!n){c("Cannot find Cookiebot object");return}const s=u(n.consent);if(s){l(`Got cookiebot consent ${n.consent} and turned it to ${s.toCookieString()}`);t(s)}else c("Cannot get the Cookiebot consent object")};function h(t,e=window){const n=e.Cookiebot;n&&n.consented&&y(t,e);e.addEventListener("CookiebotOnLoad",(()=>{y(t,e)}))}const C="_hspb_ran",f="_hsp";class d{constructor(){this.privacyConsent=null;this.privacyConsentListeners=[]}run(t=window){if(t[C])return;const e=t=>{try{if(t&&Array.isArray(t)&&t.length>0&&this[t[0]])return this[t[0]].apply(this,t.slice(1))}catch(t){c(t)}return!1};let n=t[f]=t[f]||[];Array.isArray(n)||(n=t[f]=[]);n.push=e;for(;n.length;)e(n.shift());t[C]=!0}addPrivacyConsentListener(t){this.privacyConsent&&this.safeCallListener(t,this.privacyConsent);this.privacyConsentListeners.push(t)}setPrivacyConsent(t){const e=this.privacyConsent&&this.privacyConsent.categories;this.privacyConsent=t instanceof o?t.getSafeCopy():new o(t);e&&(this.privacyConsent.previousCategories=e);this.privacyConsentListeners.forEach((t=>this.safeCallListener(t,this.privacyConsent.getSafeCopy())))}safeCallListener(t,e){try{t(e)}catch(t){c(t)}}}const g={ANALYTICS:"C0002",FUNCTIONAL:"C0003",TARGETING:"C0004",SOCIAL_MEDIA:"C0005"},v=",C0001,",p=(t,e)=>{const n=e.OnetrustActiveGroups;if(!n){c("Error getting the oneTrustActiveGroups");return}let s=!1,i=!1,r=!1,a=!1;n.split(",").forEach((t=>{s=s||t===g.ANALYTICS;i=i||t===g.FUNCTIONAL;r=r||t===g.TARGETING;a=a||t===g.SOCIAL_MEDIA}));const u=r&&a,y=new o(s&&i&&u,{necessary:!0,advertisement:u,analytics:s,functionality:i});l(`Got OneTrust consent ${n} turned it into ${y.toCookieString()}`);t(y)},w=(t,e)=>{const n=e.OneTrust;if(!n){l("Could not find the OneTrust object. We will try again");return!1}e.OnetrustActiveGroups&&e.OnetrustActiveGroups!==v&&p(t,e);n.OnConsentChanged((()=>p(t,e)));return!0};function b(t,e=window){if(w(t,e))return;let n,s=1;n=setInterval((()=>{if(10===s){l("ran 10 times looking for OneTrust, stopping the interval");clearInterval(n);return}w(t,e)&&clearInterval(n);s++}),1e3)}const m="hs_banner_integration_ran",A="hs_banner_integration";((n=window)=>{if(n[m])return;const s=n[A],i=new d;i.run(n);const r=t=>i.setPrivacyConsent(t);switch(s){case t:h(r,n);return;case e:b(r,n);return;default:h(r,n);b(r,n)}n[m]=!0})()}(); /****** Cookie Banner Integrations version static-1.34542 ******/