{"version":3,"file":"SmoothScroll.DJ790B7e.mjs","names":["__esmMin","init_ssg_sandbox_shims","window","c","init_jsx_runtime","init_npm_react_18_3_1","ce","addPropertyControls","useIsStaticRenderer","ControlType","init_framer_Bf4_tcb2","SmoothScroll","props","isStatic","clamped","intensity","ease","wheelMult","target","current","rafId","running","maxScroll","animate","onWheel","sync","init_SmoothScroll"],"sources":["https:/framerusercontent.com/modules/oupUQUuixEPDMWKkhQeR/pAtvFov8ehjB0FBhrFc1/SmoothScroll.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Smooth Scroll\n *\n * Drop this once on a page to enable eased, smooth scrolling site-wide.\n * On the live site it renders nothing and takes no space — its only job is\n * smoothing the scroll. The single control sets the smoothing intensity.\n *\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function SmoothScroll(props){const{intensity=70}=props;const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;// Map intensity (0–100) to smoothing behaviour.\n// ease = how fast the view catches up (lower = smoother).\n// wheelMult = travel per wheel notch (lower = heavier/slower).\nconst clamped=Math.max(0,Math.min(100,intensity));const ease=.16-clamped/100*.14// 0.16 → 0.02\n;const wheelMult=1-clamped/100*.4// 1.0 → 0.6\n;let target=window.scrollY;let current=target;let rafId=0;let running=false;const maxScroll=()=>Math.max(0,document.documentElement.scrollHeight-window.innerHeight);function animate(){current+=(target-current)*ease;if(Math.abs(target-current)<.5){current=target;window.scrollTo(0,current);running=false;return;}window.scrollTo(0,current);rafId=requestAnimationFrame(animate);}function onWheel(e){// Let pinch-zoom and modified scrolls pass through untouched.\nif(e.ctrlKey||e.metaKey)return;e.preventDefault();target=Math.max(0,Math.min(maxScroll(),target+e.deltaY*wheelMult));if(!running){running=true;current=window.scrollY;rafId=requestAnimationFrame(animate);}}// Re-sync when the user scrolls by other means (keyboard, scrollbar,\n// anchor jumps, touch) or when the page resizes.\nfunction sync(){if(!running){target=window.scrollY;current=window.scrollY;}}window.addEventListener(\"wheel\",onWheel,{passive:false});window.addEventListener(\"scroll\",sync,{passive:true});window.addEventListener(\"resize\",sync);return()=>{cancelAnimationFrame(rafId);window.removeEventListener(\"wheel\",onWheel);window.removeEventListener(\"scroll\",sync);window.removeEventListener(\"resize\",sync);};},[intensity,isStatic]);// On the live site: render nothing and take no layout space.\nif(!isStatic)return null;// On the canvas: a tiny transparent marker so the frame is selectable.\nreturn /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",background:\"transparent\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",pointerEvents:\"none\",fontFamily:\"Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontSize:11,fontWeight:600,color:\"rgba(120,120,128,0.9)\",letterSpacing:\"-0.01em\"},children:\"Smooth Scroll\"});}addPropertyControls(SmoothScroll,{intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:70,min:0,max:100,step:1,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmoothScroll\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"100\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"100\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmoothScroll.map"],"mappings":"A,gMAYG,SAAwBW,EAAa,EAAM,CAAC,GAAK,CAAC,YAAU,IAAIC,EAAYC,EAASL,EAAoB,EAU5G,OAV8GF,MAAc,CAAC,GAAGO,GAAiBX,IAAS,OAAY,OAGtK,IAAMY,EAAQ,KAAK,IAAI,EAAE,KAAK,IAAI,IAAIC,C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