{"version":3,"file":"NestedScroll.CS1Jv4AX.mjs","names":["forwardRef","useCallback","_jsx","__esmMin","init_npm_react_18_3_1","ne","c","J","init_jsx_runtime","withNestedScroll","Component","props","ref","setRef","el","unmark","init_NestedScroll"],"sources":["https:/framerusercontent.com/modules/cNmXxjntINSVh2wnBUm7/GTxOz48jrxFuxCOprWSi/NestedScroll.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback}from\"react\";// Smooth Scroll adds data-lenis-prevent to every frame whose overflow is \"auto\",\n// so the page loses smooth scrolling (and jerks) while the cursor is over it.\n// For a frame that scrolls only horizontally: clip the vertical axis (computed\n// overflow becomes \"auto hidden\", so it is no longer marked), drop the mark if\n// it is already there, and keep horizontal / Shift+wheel gestures away from\n// Lenis so they still scroll the row natively.\nexport function withNestedScroll(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const setRef=useCallback(el=>{if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;if(!el)return;const s=getComputedStyle(el);if(s.overflowX!==\"auto\"||el.scrollHeight>el.clientHeight+1)return;el.style.overflowY=\"hidden\";const unmark=()=>el.removeAttribute(\"data-lenis-prevent\");unmark();setTimeout(unmark,0);setTimeout(unmark,1e3);},[ref]);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,onWheel:e=>{props.onWheel?.(e);if(e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY))e.stopPropagation();}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNestedScroll\":{\"type\":\"reactHoc\",\"name\":\"withNestedScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NestedScroll.map"],"mappings":"A,yHAMA,SAAgBS,EAAiBC,EAAU,CAAC,MAAoBV,iBAAYW,EAAMC,IAAM,CAAC,IAAMC,EAAOZ,EAAYa,GAAI,CAA0G,GAAtG,OAAOF,GAAM,WAAWA,EAAIE,CAAE,EAAUF,IAAIA,EAAI,QAAQE,GAAM,CAACA,GAAkB,iBAAiBA,CAAO,CAAC,CAAC,YAAY,QAAQA,EAAG,aAAaA,EAAG,aAAa,EAAE,OAAOA,EAAG,MAAM,UAAU,SAAS,IAAMC,MAAWD,EAAG,gBAAgB,oBAAoB,EAAEC,EAAO,EAAE,WAAWA,EAAO,CAAC,EAAE,WAAWA,EAAO,GAAG,CAAE,EAAE,CAACH,CAAG,CAAC,EAAE,MAAoBV,gBAAKQ,EAAU,CAAC,GAAGC,EAAM,IAAIE,EAAO,QAAQ,GAAG,CAACF,EAAM,UAAU,CAAC,GAAK,EAAE,UAAU,KAAK,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,IAAE,EAAE,gBAAgB,CAAE,CAAC,CAAC,CAAE,CAAC,CAAE,C"}