{"version":3,"file":"ScrollFix.DKdd2TRr.mjs","names":["React"],"sources":["https:/framerusercontent.com/modules/VI84iuMrO8IXHc5e7KUa/buVLRcMShUNZ9nhvpx5H/ScrollFix.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import React,{useEffect}from\"react\";/**\n * A site-wide, unrelated bug (a broken `href=\"#\"` link elsewhere throws\n * inside Framer's own scroll-restoration logic on client-side page\n * transitions) can leave the shared page-transition wrapper scrolled\n * horizontally, visually shifting this whole page left. That failure is\n * outside this page's control, so this override polls briefly after\n * mount and corrects any stray horizontal scroll on the page's own\n * ancestor chain back to zero — attached to a node present at every\n * breakpoint (unlike the TOC, which is unmounted on Tablet/Phone), so it\n * keeps working even where the TOC's own override does not run.\n */export function withScrollFix(Component){return function ScrollFix(props){const ref=React.useRef(null);useEffect(()=>{const wrapperEl=ref.current;if(!wrapperEl)return;const wrapper=wrapperEl;function resetStrayHorizontalScroll(){let node=wrapper.parentElement;for(let i=0;i<10&&node;i++){if(node.scrollLeft!==0)node.scrollLeft=0;node=node.parentElement;}}resetStrayHorizontalScroll();const intervalId=setInterval(resetStrayHorizontalScroll,100);const stopTimeoutId=setTimeout(()=>clearInterval(intervalId),3e3);return()=>{clearInterval(intervalId);clearTimeout(stopTimeoutId);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollFix\":{\"type\":\"reactHoc\",\"name\":\"withScrollFix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollFix.map"],"mappings":"yHAUG,SAAgB,EAAc,EAAU,CAAC,OAAO,SAAmB,EAAM,CAAC,IAAM,EAAIA,EAAM,OAAO,IAAI,EAAme,OAAje,MAAc,CAAC,IAAM,EAAU,EAAI,QAAQ,GAAG,CAAC,EAAU,OAAO,IAAM,EAAQ,EAAU,SAAS,GAA4B,CAAC,IAAI,EAAK,EAAQ,cAAc,IAAI,IAAI,EAAE,EAAE,EAAE,IAAI,EAAK,IAAQ,EAAK,aAAa,IAAE,EAAK,WAAW,GAAE,EAAK,EAAK,aAAe,CAAC,EAA2B,EAAE,IAAM,EAAW,YAAY,EAA2B,GAAG,EAAQ,EAAc,eAAe,cAAc,CAAU,EAAE,GAAG,EAAE,UAAU,CAAC,cAAc,CAAU,EAAE,aAAa,CAAa,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQ,UAAU,EAAE,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,CAAC,CAAE,CAAE,iBAVzpB,IAAoC"}