{"version":3,"file":"ScrollToTop.cCpsXx83.mjs","names":["__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","init_framer_BCdLsbZT","RenderTarget","withScrollTop","isCanvas","toTop","frame","Component","props","init_ScrollToTop"],"sources":["https:/framerusercontent.com/modules/nibFwuNaDOkrEFgAfdIB/hIeeodJS2xAJXYfOQnf8/ScrollToTop.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{RenderTarget}from\"framer\";/**\n * Scroll To Top\n *\n * Makes a reload start at the top of the page.\n *\n * Browsers remember how far down you were and restore that position on\n * reload, which on this site drops you into the middle of a section instead\n * of the banner. Turning scroll restoration off is not enough on its own —\n * some browsers restore the position again after `load` fires — so the\n * position is reset on mount, on the next frame, and once more after load.\n *\n * A link to an anchor on the page is left alone, so in-page jumps still work.\n */export function withScrollTop(Component){return props=>{const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(isCanvas)return;if(typeof window===\"undefined\")return;// Someone following a #section link meant to land there.\nif(window.location.hash)return;if(\"scrollRestoration\"in window.history){window.history.scrollRestoration=\"manual\";}const toTop=()=>window.scrollTo(0,0);toTop();const frame=requestAnimationFrame(toTop);window.addEventListener(\"load\",toTop);return()=>{cancelAnimationFrame(frame);window.removeEventListener(\"load\",toTop);};},[isCanvas]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollTop\":{\"type\":\"reactHoc\",\"name\":\"withScrollTop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollToTop.map"],"mappings":"A,kLAYG,SAAgBS,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMC,EAASF,EAAa,QAAQ,IAAIA,EAAa,OAC+N,OADxNF,MAAc,CACrI,GADyII,GAA0BP,IAAS,QACzKA,EAAO,SAAS,KAAK,OAAU,sBAAsBA,EAAO,UAAS,EAAO,QAAQ,kBAAkB,UAAU,IAAMQ,MAAUR,EAAO,SAAS,EAAE,CAAC,EAAEQ,EAAM,EAAE,IAAMC,EAAM,sBAAsBD,CAAK,EAAwC,OAAtCR,EAAO,iBAAiB,OAAOQ,CAAK,MAAY,CAAC,qBAAqBC,CAAK,EAAET,EAAO,oBAAoB,OAAOQ,CAAK,CAAE,CAAE,EAAE,CAACD,CAAQ,CAAC,EAAsB,gBAAKG,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,C"}