{"version":3,"file":"Follow_Cursor.BnA-R1eZ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/XCFdiYUahTBSy7igmGjQ/Cbv91WDxdkfwGIp8NRiM/Follow_Cursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";export function withCursorFollow(Component){return props=>{const ref=useRef(null);const[isHovering,setIsHovering]=useState(false);const[position,setPosition]=useState({left:0,top:0});useEffect(()=>{const handleMouseMove=e=>{if(!ref.current)return;const isHovered=e.target instanceof Element&&(e.target===ref.current.parentElement||ref.current.parentElement.contains(e.target)||e.target===ref.current||ref.current.contains(e.target));setIsHovering(isHovered);if(isHovered){const parentRect=ref.current.parentElement.getBoundingClientRect();const elementRect=ref.current.getBoundingClientRect();setPosition({left:e.clientX-parentRect.left-elementRect.width/2,top:e.clientY-parentRect.top-elementRect.height/2});}else{setIsHovering(false);}};window.addEventListener(\"mousemove\",handleMouseMove);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"fixed\",left:`calc(${position.left}px - 0.1%)`,top:`calc(${position.top}px - 0.1%)`,pointerEvents:\"none\",transform:\"translate(-0.1%, -0.1%)\"},children:isHovering&&/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Follow_Cursor.map"],"mappings":"mNAAwF,SAAgB,EAAiB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,IAAM,EAAI,EAAO,KAAK,CAAM,CAAC,EAAW,EAAc,CAAC,GAAS,EAAM,CAAM,CAAC,EAAS,EAAY,CAAC,EAAS,CAAC,KAAK,EAAE,IAAI,CAAE,EAAC,CAA6qB,MAA5qB,GAAU,IAAI,CAAC,I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