{"version":3,"file":"Overrides.CVC7EM07.mjs","names":["useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/QfUSD8khX0w0kMiwBVtO/ETkqKlUuADZrEcKU7E8I/Overrides.js"],"sourcesContent":["// Samuel overrides.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";import{RenderTarget}from\"framer\";// Horizontal scroll (home \"Companies I've Built\"): the cards row slides left while its\n// pinned block (\"Case Study Card Block\", 200vh) scrolls from top-top to bottom-bottom.\n// Scrubbed with ~1s smoothing like the Webflow IX3 timeline (scrub 1). Runs on every breakpoint, like Webflow.\nexport function withHScroll(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;const el=ref.current;if(!el)return;const block=el.closest('[data-framer-name=\"Case Study Card Block\"]')||el.closest(\"section\");if(!block)return;let target=0;let cur=0;let raf=0;let last=0;const draw=()=>{const viewport=el.parentElement?.clientWidth||el.clientWidth;const max=Math.max(0,el.scrollWidth-viewport);el.style.transform=`translate3d(${-cur*max}px,0,0)`;};const measure=()=>{const r=block.getBoundingClientRect();const dist=block.offsetHeight-window.innerHeight;target=dist>0?Math.min(1,Math.max(0,-r.top/dist)):0;};const tick=t=>{const dt=last?Math.min(.1,(t-last)/1e3):.016;last=t;cur+=(target-cur)*(1-Math.exp(-dt/.25));if(Math.abs(target-cur)<5e-4)cur=target;draw();raf=cur!==target?requestAnimationFrame(tick):0;if(!raf)last=0;};const kick=()=>{measure();if(!raf)raf=requestAnimationFrame(tick);};measure();cur=target;draw();el.style.willChange=\"transform\";window.addEventListener(\"scroll\",kick,{passive:true});window.addEventListener(\"resize\",kick);return()=>{window.removeEventListener(\"scroll\",kick);window.removeEventListener(\"resize\",kick);if(raf)cancelAnimationFrame(raf);el.style.transform=\"\";};},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};}// Fluid sticky offsets: Framer's sticky top only takes px, so these set it in vh\n// (15vh like the pinned \"What I Actually Do\" stage, 7vh on phone; 5vh like Webflow's top:5% columns).\n// The top goes in through a CSS rule on the layer name, not the style prop, so Framer's\n// appear animations (which drive style) keep working; the ref is forwarded for their in-view trigger.\nconst STICKY_15='[data-framer-name=\"Case Study Sticky Block\"]{top:15vh!important}'+'@media (max-width:809.98px){[data-framer-name=\"Case Study Sticky Block\"]{top:7vh!important}}';// desktop only: on tablet/phone these columns stack and are not sticky\nconst STICKY_5='@media (min-width:1200px){[data-framer-name=\"Blog Left Wrapper\"],[data-framer-name=\"Books Details Right\"]{top:5vh!important}}';export function withSticky15(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:STICKY_15}),/*#__PURE__*/_jsx(Component,{...props,ref:ref})]}));}export function withSticky5(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:STICKY_5}),/*#__PURE__*/_jsx(Component,{...props,ref:ref})]}));}// Sticky reveal footer (layout template). On the canvas there is no scroll viewport, so a sticky\n// bottom footer slides up behind the page and looks missing; the layer stays relative in Framer and\n// this turns the reveal on only on the live site, tablet and up (phone keeps a normal footer).\nconst STICKY_FOOTER=\"@media (min-width:810px){.samuel-sticky-footer{position:sticky!important;bottom:0!important;height:100vh!important;z-index:0}}\";export function withStickyFooter(Component){return /*#__PURE__*/forwardRef((props,ref)=>{if(RenderTarget.current()===RenderTarget.canvas)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:STICKY_FOOTER}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,className:`${props.className||\"\"} samuel-sticky-footer`})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHScroll\":{\"type\":\"reactHoc\",\"name\":\"withHScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSticky5\":{\"type\":\"reactHoc\",\"name\":\"withSticky5\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStickyFooter\":{\"type\":\"reactHoc\",\"name\":\"withStickyFooter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSticky15\":{\"type\":\"reactHoc\",\"name\":\"withSticky15\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Overrides.map"],"mappings":"wMAIA,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,IAAI,EAA0qC,OAAxqC,MAAc,CAAC,GAAG,EAAa,QAAQ,IAAI,EAAa,OAAO,OAAO,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAM,EAAM,EAAG,QAAQ,4CAA4C,GAAG,EAAG,QAAQ,SAAS,EAAE,GAAG,CAAC,EAAM,OAAO,IAAI,EAAO,EAAM,EAAI,EAAM,EAAI,EAAM,EAAK,EAAQ,MAAS,CAAC,IAAM,EAAS,EAAG,eAAe,aAAa,EAAG,YAAkB,EAAI,KAAK,IAAI,EAAE,EAAG,YAAY,CAAQ,EAAE,EAAG,MAAM,UAAU,eAAe,CAAC,EAAI,EAAI,QAAS,EAAQ,MAAY,CAAC,IAAM,EAAE,EAAM,sBAAsB,EAAQ,EAAK,EAAM,aAAa,EAAO,YAAY,EAAO,EAAK,EAAE,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,IAAI,CAAI,CAAC,EAAE,CAAE,EAAQ,EAAK,GAAG,CAAC,IAAM,EAAG,EAAK,KAAK,IAAI,IAAI,EAAE,GAAM,GAAG,EAAE,KAAK,EAAK,EAAE,IAAM,EAAO,IAAM,EAAE,KAAK,IAAI,CAAC,EAAG,GAAG,GAAM,KAAK,IAAI,EAAO,CAAG,EAAE,OAAK,EAAI,GAAO,EAAK,EAAE,EAAI,IAAM,EAAmC,EAA5B,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