{"version":3,"file":"StickyToCenter.DfapsPv9.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/deF8FvQJf1wsjHeKj3hy/znZyYUhxwDJjXDNXmaDc/StickyToCenter.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function StickyToCenter(){const ref=useRef(null);const[offset,setOffset]=useState(200);useEffect(()=>{if(ref.current){setOffset(ref.current.offsetHeight/2);}},[]);return{ref,style:{position:\"sticky\",top:`calc(50% - ${offset}px)`}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withStickyToCenter(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...StickyToCenter(props)});};}withStickyToCenter.displayName=\"StickyToCenter\";\nexport const __FramerMetadata__ = {\"exports\":{\"withStickyToCenter\":{\"type\":\"reactHoc\",\"name\":\"withStickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"StickyToCenter\":{\"type\":\"override\",\"name\":\"StickyToCenter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyToCenter.map"],"mappings":"8KAAwF,SAAgB,GAAgB,CAAC,IAAM,EAAIA,EAAO,IAAI,EAAO,CAAC,EAAO,GAAWC,EAAS,GAAG,EAA8E,OAA5E,MAAc,CAAI,EAAI,SAAS,EAAU,EAAI,QAAQ,aAAa,CAAC,CAAG,EAAE,CAAC,CAAC,EAAQ,CAAC,MAAI,MAAM,CAAC,SAAS,SAAS,IAAI,cAAc,EAAO,IAAI,CAAC,CAAE,CAAoJ,SAAgB,EAAmB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,CAAuC,EAASC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAe,CAAK,CAAC,CAAC,EAAI,iBAAlmB,IAA6C,IAAkY,EAAoL,EAAmB,YAAY"}