{"version":3,"file":"HubSpotTrackingLoader.WAF8vbPy.mjs","names":["React.useCallback","__esmMin","ne","init_npm_react_18_3_1","window","ce","init_jsx_runtime","c","init_ssg_sandbox_shims","HubSpotTrackingLoader","props","scriptSrc","getCurrentPath","queueSpaPageView","path","ensureTrackingScript","existingById","existingBySrc","existingScript","script","ensureRouteTrackingListeners","emitRouteChange","originalPushState","originalReplaceState","args","style","init_HubSpotTrackingLoader"],"sources":["https:/framerusercontent.com/modules/4a5DxWFEueLeUtDnmMmb/E88y6ijz0jbAEDkjRftR/HubSpotTrackingLoader.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function HubSpotTrackingLoader(props){const{style}=props;const scriptSrc=\"https://js-eu1.hs-scripts.com/25864264.js\";const getCurrentPath=React.useCallback(()=>{if(typeof window===\"undefined\")return\"\";return`${window.location.pathname}${window.location.search}`;},[]);const queueSpaPageView=React.useCallback(()=>{if(typeof window===\"undefined\")return;const path=getCurrentPath();if(!path||window.__hsLastTrackedPath===path)return;window._hsq=window._hsq||[];window._hsq.push([\"setPath\",path]);window._hsq.push([\"trackPageView\"]);window.__hsLastTrackedPath=path;},[getCurrentPath]);const ensureTrackingScript=React.useCallback(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const existingById=document.getElementById(\"hs-script-loader\");const existingBySrc=document.querySelector(`script[src=\"${scriptSrc}\"]`);const existingScript=existingById||existingBySrc;if(existingScript){if(existingScript.id!==\"hs-script-loader\"){existingScript.id=\"hs-script-loader\";}return;}const script=document.createElement(\"script\");script.id=\"hs-script-loader\";script.type=\"text/javascript\";script.async=true;script.defer=true;script.src=scriptSrc;document.head.appendChild(script);},[scriptSrc]);const ensureRouteTrackingListeners=React.useCallback(()=>{if(typeof window===\"undefined\")return;if(window.__hsRouteListenerAttached)return;const emitRouteChange=()=>{if(typeof window===\"undefined\")return;window.dispatchEvent(new Event(\"hs-route-change\"));};if(!window.__hsHistoryPatched){const originalPushState=window.history.pushState;const originalReplaceState=window.history.replaceState;window.history.pushState=function(...args){originalPushState.apply(window.history,args);emitRouteChange();};window.history.replaceState=function(...args){originalReplaceState.apply(window.history,args);emitRouteChange();};window.__hsHistoryPatched=true;}window.addEventListener(\"popstate\",emitRouteChange);window.addEventListener(\"hs-route-change\",queueSpaPageView);window.__hsRouteListenerAttached=true;},[queueSpaPageView]);React.useEffect(()=>{if(typeof window===\"undefined\")return;window._hsq=window._hsq||[];ensureTrackingScript();ensureRouteTrackingListeners();if(!window.__hsInitialPageviewSeen){window.__hsInitialPageviewSeen=true;window.__hsLastTrackedPath=getCurrentPath()||window.__hsLastTrackedPath;return;}queueSpaPageView();},[ensureRouteTrackingListeners,ensureTrackingScript,getCurrentPath,queueSpaPageView]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\",...style}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubSpotTrackingLoader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HubSpotTrackingLoader.map"],"mappings":"A,uIAGG,SAAwBS,EAAsB,EAAM,CAAC,GAAK,CAAC,SAAOC,EAAYC,EAAU,4CAAkDC,EAAeZ,MAAiCI,IAAS,OAAkB,GAAS,GAAGA,EAAO,SAAS,WAAWA,EAAO,SAAS,SAAW,CAAC,CAAC,EAAQS,EAAiBb,MAAsB,CAAC,GAAUI,IAAS,OAAY,OAAO,IAAMU,EAAKF,EAAe,EAAME,GAAMV,EAAO,sBAAsBU,IAAY,EAAO,KAAKV,EAAO,MAAM,CAAC,EAAEA,EAAO,KAAK,KAAK,CAAC,UAAUU,CAAI,C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