window._hsq=window._hsq||[];window.hbspt=window.hbspt||{};window.hbspt.cta=window.hbspt.cta||{__hstc:"",__hssc:"",__hsfp:"",__utk:"",__generated_utk:"",email:"",__analyticsPageId:"",__path:"",__referrerPath:"",TRACKING_CODE_TIMEOUT:2e3,WEB_INTERACTIVE_POLLING_INTERVAL:200,placementsData:{},placementsLoadQueue:{},loadedQueue:!1,canonicalURL:"",queryStringToForward:["tc_country","tc_deviceCategory","tc_visitSource","tc_drillDownRule","tc_language","utm_campaign","utm_medium"],trackingKeys:{RENDER_SUCCESS:"cta-render-success",RENDER_TIMEOUT:"cta-render-timeout",CTA_JSON_SUCCESS:"cta-json-success",CTA_JSON_FAILURE:"cta-json-failure",WITH_ANALYTICS:"cta-with-analytics"},webInteractiveMappingsQueue:[],hasBegunLoadingWebInteractives:!1,load:function(t,e,a){var i=this,n=!1;i.utils.log(e+" loading");a||(a={region:"na1"});a.region||(a.region="na1");a.useNewLoader=!0;i.utils.setTrackingEnv(a.env,a.region,t);i.placementsData[e]=i.placementsData[e]||{portalId:t,loadCallTimestamp:(new Date).getTime()};i.utils.changeCtaVisibility(e,"hidden");i.__utk=i.__utk||i.utils.getCookieValue("hubspotutk");i.__hssc=i.__hssc||i.utils.getCookieValue("__hssc");i.__hstc=i.__hstc||i.utils.getCookieValue("__hstc");a.enforceTargetIsBlank&&(i.enforceTargetIsBlank=!0);i.canonicalURL=i.canonicalURL||i.getCanonicalURL();i.utils.isPreviewUrl&&(i.email=i.utils.getParameterByName("email"));i.setPlacementData(e,a,"t");function s(s){if(!n){i.__utk||(i.__generated_utk=i.utils.generateUtk());i.displayCta(t,e,a,s);n=!0}}function r(t){window._hsq.push((function(e){i.utils.track(i.trackingKeys.WITH_ANALYTICS);i.__path=e.path;i.__referrerPath=e.referrerPath;i.__analyticsPageId=window.hsVars&&window.hsVars.analytics_page_id||e.pageId;i.__hsfp=e._getFingerprint();if(e.utk){i.__hstc=e.utk.get();i.__utk=e.utk.visitor}e.session&&(i.__hssc=e.session.get());e.contentType&&(i.__contentType=e.contentType);t()}))}if(a.useNewLoader){i.addToQueue(t,e,a);i.utils.isPreviewUrl||r((function(){i.utils.log("got tracker data")}));i.utils.domReady((function(){if(!i.loadedQueue){i.setupCMSAnalytics();i.loadedQueue=!0;setTimeout((function(){i.loadQueue()}))}}));window.setTimeout((function(){if(!i.placementsData[e].ctaLoaded){i.utils.log(e+" timed out");i.utils.track(i.trackingKeys.RENDER_TIMEOUT);i.utils.changeCtaVisibility(e,"visible")}}),i.TRACKING_CODE_TIMEOUT)}else if(i.utils.isPreviewUrl)s();else{r((function(){i.utils.log(e+" get tracker data");s("a")}));i.utils.domReady((function(){i.setupCMSAnalytics();var t=!!i.__analyticsPageId||!i.__isCos,e=!!i.__utk,a=!!i.__path||!i.shouldWaitForPath();e&&t&&a&&s("d")}));window.setTimeout((function(){if(!n){i.utils.track(i.trackingKeys.RENDER_TIMEOUT);i.utils.log(e+" timed out");s("t")}}),i.TRACKING_CODE_TIMEOUT)}},shouldWaitForPath:function(){for(var t=0;t-1&&!e.getAttribute("data-hs-drop")}}for(i=0;i{const e="#hs-cta-wrapper-"+t.placementGuid,a=document.querySelectorAll(e);a?window.__PRIVATE__HubspotCtaClient.loadCta({contentId:Number(t.webInteractiveContentId),options:{elementToEmbed:[...a]}}):console.error("Cannot find element for replacing",t)})}else console.error("Web interactive API not found after load")},loadWebInteractives:function(t,e){if(this.hasBegunLoadingWebInteractives)return;this.hasBegunLoadingWebInteractives=!0;const a="hubspot-web-interactives-loader";if(document.getElementById(a))return;window.hsCallsToActionsReady=window.hsCallsToActionsReady||[];window.hsCallsToActionsReady.push(()=>this.processWebInteractivesQueue());const i="https://"+this.utils.getJsDomain(e.options.env,e.options.region);this.utils.addScript(i+"/web-interactives-embed.js",t.placementGuid,!0,{id:a,dataset:{hsjsPortal:t.portalId,hsjsEnv:e.options.env||"prod",hsjsHublet:e.options.region||"na1"}}).catch(t=>{console.error("Failed to load web interactive JS",{errorMessage:String(t)})})},renderWebInteractive:function(t){var e=this;window.__PRIVATE__HubspotCtaClient?e.insertWebInteractive(t):e.webInteractiveMappingsQueue.push(t)},processWebInteractivesQueue:function(){this.webInteractiveMappingsQueue.forEach(t=>{this.renderWebInteractive(t)})},renderCTA:function(t){var e,a,i,n=!!document.getElementById("hs-cta-ie-element"),s=t.image_html,r=this.getTags(t),o=t.is_image;if(!n&&!o){e=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a=document.createElement("style");e.insertBefore(a,e.childNodes[0]);try{i=".hs-cta-wrapper p, .hs-cta-wrapper div { margin: 0; padding: 0; }"+" "+t.css;a[document.all?"innerText":"textContent"]=i}catch(t){a.styleSheet.cssText=i}t.has_external_links&&this.addExternalCSSLinks(t.css_links,e);s=t.raw_html}for(var c=null,l=0;l-1&&"lazy"===d[g].loading&&(c=u)}if("right"==p){u.style.display="block";u.style.textAlign="right"}else if("middle"==p){u.style.display="block";u.style.textAlign="center"}u.innerHTML=s.replace("/*hs-extra-styles*/",h);u.style.visibility="visible";u.setAttribute("data-hs-drop","true");try{var m=new CustomEvent("onrenderhscta",{detail:u});document.dispatchEvent(m)}catch(t){console.error("Custom event not supported in browser.")}window.hbspt&&hbspt.cta&&hbspt.cta.afterLoad&&hbspt.cta.afterLoad(t.placement_guid)}this.trackView(t.cta_guid,t.placement_guid,c);return r},trackView:function(t,e,a){window._hsq=window._hsq||[];a?window._hsq.push((function(i){if(i.limitTrackingToCookieDomains&&!i.cookie.currentDomain||!i.trackingEnabled||i._hasDoNotTrack())self.utils.log("tracking not enabled, not tracking for: "+e+"-"+t);else{var n={k:12,aij:'["'+(e||"")+'","'+(t||"")+'"]',rfc:8},s=i._generateURL(n),r=document.createElement("img");r.src=s;r.width=1;r.height=1;r.loading="lazy";r.id="pixel-"+e+"-"+t;r.onload=function(){a.removeChild(r)};a.appendChild(r)}})):window._hsq.push(["trackCtaView",e,t])},getCtaFromService:function(t,e,a,i){for(var n=this,s=this.generateLoaderQueryParams(t,null,a,i),r=this.utils.toQueryString(s),o=0;o=0},log:function(t){if(this.isDebug()){t=(new Date).getTime()+" [CTA]: "+t;window.console&&window.console.log(t);if(this.getParameterByName("selenium")){var e=document.getElementById("selenium_log");if(!e){(e=document.createElement("pre")).id="selenium_log";document.body.appendChild(e)}e.appendChild(document.createTextNode(t+"\n"))}}},generateUtk:function(){function t(){return(65536*(1+Math.random())).toString(16).substring(0,4)}var e=(new Date).getTime().toString(16);e=e.substring(e.length-12||0,e.length);for(;e.length<12;)e="0"+e;return"c7a00000"+t()+t()+t()+e},addScript:function(t,e,a=!1,i={}){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src=t;this.isDebug()&&this.log(e+" adding script: "+n.src.replace(/&|\?/g,"\n").replace(/=/g,"\t= "));(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(n);if(a)return new Promise((t,e)=>{let a=!1;n.onload=()=>{a=!0;t()};n.onerror=()=>e(new Error("addScript failed for: "+src));if(i){const{dataset:t={},...e}=i;Object.keys(t).forEach(e=>{n.dataset[e]=t[e]});Object.keys(e).forEach(t=>n.setAttribute(t,e[t]))}document.getElementsByTagName("head")[0].appendChild(n);setTimeout(()=>{a||e(new Error("addScript timed out for: "+src))},1e4)})},isPreviewUrlFn:function(e){return/preview(-[^\.]+)?\.hs-sites(qa)?(-[^\.]+)?\.com/g.test(e)||/hubspotpreview(qa)?(-[^\.]+)?/.test(e)||!!t.utils.getParameterByName("hs_preview")},getRequest:function(t,e,a){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(200===i.status)try{var t=JSON.parse(i.responseText),n="";try{n=i.getResponseHeader("x-origin-hublet")}catch(t){}e(t,n)}catch(t){a(t)}i.status>=400&&a()}};i.open("GET",t,!0);i.withCredentials=!0;i.send(null)},setTrackingEnv:function(t,e,a){this.env=t||"prod";this.hublet=e||"na1";this.portalId=a},track:function(t){var e=this.hublet||"na1",a="https://perf"+("na1"!==e?"-"+e:"")+".hsforms"+("qa"===(this.env||"prod")?"qa":"")+".com/embed/v3/counters.gif?key="+t+"&value=1";(new Image).src=a}};t.utils.isPreviewUrl=t.utils.isPreviewUrlFn(window.location.host,this.hublet);t.utils.isGooglebot=/googlebot/i.test(navigator.userAgent);t.utils.getElementsByClassName=document.getElementsByClassName?document.getElementsByClassName.bind(document):function(t){document.querySelectorAll("."+t)};t.utils.domReady((function(){t.utils.domReadyCalled=!0}))}(window.hbspt.cta);