{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/4tARjb1824yYImyHS2RP/jpmCRXPG8cRAp3mJpJLy/Follow.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 parentRect=ref.current.parentElement.getBoundingClientRect();const elementRect=ref.current.getBoundingClientRect();const left=e.clientX-parentRect.left-elementRect.width/2;const top=e.clientY-parentRect.top-elementRect.height/2;// Ensure the element stays within the viewport\nconst maxX=parentRect.width-elementRect.width;const maxY=parentRect.height-elementRect.height;setPosition({left:Math.min(Math.max(left,0),maxX),top:Math.min(Math.max(top,0),maxY)});const isHovered=left>=0&&top>=0&&left<=maxX&&top<=maxY;setIsHovering(isHovered);};window.addEventListener(\"mousemove\",handleMouseMove);return()=>{window.removeEventListener(\"mousemove\",handleMouseMove);};},[]);return /*#__PURE__*/ _jsx(\"div\",{ref:ref,style:{position:\"absolute\",left:`${position.left}px`,top:`${position.top}px`,pointerEvents:\"none\",transform:\"translate(-50%, -50%)\"},children:isHovering&&/*#__PURE__*/ _jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCursorFollow\":{\"type\":\"reactHoc\",\"name\":\"withCursorFollow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Follow.map"],
  "mappings": "uGAA+F,SAASA,EAAiBC,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAMC,EAAIC,EAAO,IAAI,EAAO,CAACC,EAAWC,CAAa,EAAEC,EAAS,EAAK,EAAO,CAACC,EAASC,CAAW,EAAEF,EAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,OAAAG,EAAU,IAAI,CAAC,IAAMC,EAAgBC,GAAG,CAAC,GAAG,CAACT,EAAI,QAAQ,OAAO,IAAMU,EAAWV,EAAI,QAAQ,cAAc,sBAAsB,EAAQW,EAAYX,EAAI,QAAQ,sBAAsB,EAAQY,EAAKH,EAAE,QAAQC,EAAW,KAAKC,EAAY,MAAM,EAAQE,EAAIJ,EAAE,QAAQC,EAAW,IAAIC,EAAY,OAAO,EACjjBG,EAAKJ,EAAW,MAAMC,EAAY,MAAYI,EAAKL,EAAW,OAAOC,EAAY,OAAOL,EAAY,CAAC,KAAK,KAAK,IAAI,KAAK,IAAIM,EAAK,CAAC,EAAEE,CAAI,EAAE,IAAI,KAAK,IAAI,KAAK,IAAID,EAAI,CAAC,EAAEE,CAAI,CAAC,CAAC,EAAE,IAAMC,EAAUJ,GAAM,GAAGC,GAAK,GAAGD,GAAME,GAAMD,GAAKE,EAAKZ,EAAca,CAAS,CAAE,EAAE,OAAAC,EAAO,iBAAiB,YAAYT,CAAe,EAAQ,IAAI,CAACS,EAAO,oBAAoB,YAAYT,CAAe,CAAE,CAAE,EAAE,CAAC,CAAC,EAAuBU,EAAK,MAAM,CAAC,IAAIlB,EAAI,MAAM,CAAC,SAAS,WAAW,KAAK,GAAGK,EAAS,IAAI,KAAK,IAAI,GAAGA,EAAS,GAAG,KAAK,cAAc,OAAO,UAAU,uBAAuB,EAAE,SAASH,GAA0BgB,EAAKpB,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAC,CAAC,CAAE,CAAE",
  "names": ["withCursorFollow", "Component", "props", "ref", "pe", "isHovering", "setIsHovering", "ye", "position", "setPosition", "ue", "handleMouseMove", "e", "parentRect", "elementRect", "left", "top", "maxX", "maxY", "isHovered", "window", "p"]
}
