{"version":3,"file":"CustomCoursor.-Adw7e1d.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/jtgs4un0Z6B1RSCaDbxX/1Cq121uszpKBzjc2K5St/CustomCoursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function addCookieToLink(Component){return props=>{const[newLink,setNewLink]=useState(props.link);useEffect(()=>{const utms=window.location.search;if(utms&&!props.link.includes(\"utm_\")){let utmString=utms;if(props.link.includes(\"?\")){utmString=\"&\"+utms.substring(1);}setNewLink(props.link+utmString);}},[]);return /*#__PURE__*/_jsx(Component,{...props,link:newLink});};}export function dump(Component){return props=>{console.log(props);return /*#__PURE__*/_jsx(Component,{...props});};}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\"}},\"dump\":{\"type\":\"reactHoc\",\"name\":\"dump\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addCookieToLink\":{\"type\":\"reactHoc\",\"name\":\"addCookieToLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCoursor.map"],"mappings":"uIAAiF,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,EAAM,KAAK,CAAkN,OAAjN,MAAc,CAAC,IAAM,EAAK,EAAO,SAAS,OAAO,GAAG,GAAM,CAAC,EAAM,KAAK,SAAS,OAAO,CAAC,CAAC,IAAI,EAAU,EAAQ,EAAM,KAAK,SAAS,IAAI,GAAE,EAAU,IAAI,EAAK,UAAU,EAAE,EAAE,EAAW,EAAM,KAAK,EAAU,GAAI,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAQ,CAAC,uBAA3Z,IAAsC"}