{"version":3,"file":"Cursor.CMCxUIiM.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/MWqGUWiVKEagVgZebQ9q/CcSV1Wj4TX3NeZ5ZqsGt/Cursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";// Custom Groops logo cursor with spin-on-hover-link effect\n// Add this to your overrides file and apply withGroopsCursor to your page wrapper\nconst LOGO_URL=\"https://framerusercontent.com/images/gvqdtBucN8bgPPIWGBAojlNRSTk.png\";// Size of the cursor in px — adjust to taste\nconst CURSOR_SIZE=48;export function withGroopsCursor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const cursorRef=useRef(null);const posRef=useRef({x:-999,y:-999});const rafRef=useRef(null);const isSpinningRef=useRef(false);const mountedRef=useRef(false);useEffect(()=>{if(typeof window===\"undefined\")return;mountedRef.current=true;// Inject cursor styles\nconst style=document.createElement(\"style\");style.id=\"groops-cursor-style\";style.textContent=`\n                *, *::before, *::after {\n                    cursor: none !important;\n                }\n\n                #groops-cursor {\n                    position: fixed;\n                    top: 0;\n                    left: 0;\n                    width: ${CURSOR_SIZE}px;\n                    height: ${CURSOR_SIZE}px;\n                    pointer-events: none;\n                    z-index: 99999;\n                    transform: translate(-50%, -50%);\n                    transition: opacity 0.2s ease;\n                    will-change: transform;\n                }\n\n                #groops-cursor img {\n                    width: 100%;\n                    height: 100%;\n                    object-fit: contain;\n                    display: block;\n                    transition: transform 0s;\n                }\n\n                #groops-cursor.spinning img {\n                    animation: groops-spin 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1;\n                }\n\n                @keyframes groops-spin {\n                    from { transform: rotate(0deg); }\n                    to   { transform: rotate(360deg); }\n                }\n            `;document.head.appendChild(style);// Create cursor element\nconst cursor=document.createElement(\"div\");cursor.id=\"groops-cursor\";cursor.innerHTML=`<img src=\"${LOGO_URL}\" alt=\"\" aria-hidden=\"true\" />`;document.body.appendChild(cursor);cursorRef.current=cursor;// Move cursor on mouse move using RAF for smoothness\nconst onMouseMove=e=>{posRef.current={x:e.clientX,y:e.clientY};if(rafRef.current!==null)return;rafRef.current=window.requestAnimationFrame(()=>{rafRef.current=null;if(!cursorRef.current)return;cursorRef.current.style.transform=`translate(calc(${posRef.current.x}px - 50%), calc(${posRef.current.y}px - 50%))`;});};// Spin on link hover\nconst onMouseOver=e=>{const target=e.target;const isLink=target.closest(\"a[href]\")||target.closest(\"button\")||target.closest(\"[role='button']\");if(!isLink||isSpinningRef.current)return;isSpinningRef.current=true;cursor.classList.add(\"spinning\");};const onAnimationEnd=()=>{cursor.classList.remove(\"spinning\");isSpinningRef.current=false;};const onMouseOut=e=>{const target=e.target;const related=e.relatedTarget;const wasLink=target.closest(\"a[href]\")||target.closest(\"button\")||target.closest(\"[role='button']\");const stillOnLink=related&&(related.closest(\"a[href]\")||related.closest(\"button\")||related.closest(\"[role='button']\"));if(!wasLink||stillOnLink)return;// Let the spin finish naturally — don't interrupt mid-animation\n};// Hide when mouse leaves window\nconst onMouseLeave=()=>{if(cursorRef.current)cursorRef.current.style.opacity=\"0\";};const onMouseEnter=()=>{if(cursorRef.current)cursorRef.current.style.opacity=\"1\";};window.addEventListener(\"mousemove\",onMouseMove,{passive:true});window.addEventListener(\"mouseover\",onMouseOver,{passive:true});window.addEventListener(\"mouseout\",onMouseOut,{passive:true});document.documentElement.addEventListener(\"mouseleave\",onMouseLeave);document.documentElement.addEventListener(\"mouseenter\",onMouseEnter);cursor.addEventListener(\"animationend\",onAnimationEnd);return()=>{mountedRef.current=false;window.removeEventListener(\"mousemove\",onMouseMove);window.removeEventListener(\"mouseover\",onMouseOver);window.removeEventListener(\"mouseout\",onMouseOut);document.documentElement.removeEventListener(\"mouseleave\",onMouseLeave);document.documentElement.removeEventListener(\"mouseenter\",onMouseEnter);if(rafRef.current!==null){window.cancelAnimationFrame(rafRef.current);rafRef.current=null;}cursor.removeEventListener(\"animationend\",onAnimationEnd);cursor.remove();style.remove();};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withGroopsCursor\":{\"type\":\"reactHoc\",\"name\":\"withGroopsCursor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Cursor.map"],"mappings":"8IAGqB,SAAgB,EAAiB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAUA,EAAO,IAAI,EAAQ,EAAOA,EAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAQ,EAAOA,EAAO,IAAI,EAAQ,EAAcA,EAAO,EAAK,EAAQ,EAAWA,EAAO,EAAK,EAwCsyB,OAxCpyB,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,EAAW,QAAQ,GACnV,IAAM,EAAM,SAAS,cAAc,OAAO,EAAE,EAAM,GAAG,sBAAsB,EAAM,YAAY;;;;;;;;;6BAShE,EAAY;8BACX,EAAY;;;;;;;;;;;;;;;;;;;;;;;;cAwB5B,SAAS,KAAK,YAAY,CAAK,EAC7C,IAAM,EAAO,SAAS,cAAc,KAAK,EAAE,EAAO,GAAG,gBAAgB,EAAO,UAAU,aAAa,EAAS,gCAAgC,SAAS,KAAK,YAAY,CAAM,EAAE,EAAU,QAAQ,EAChM,IAAM,EAAY,GAAG,CAAC,EAAO,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAK,EAAO,UAAU,OAAY,EAAO,QAAQ,EAAO,0BAA0B,CAAC,EAAO,QAAQ,KAAS,EAAU,UAAe,EAAU,QAAQ,MAAM,UAAU,kBAAkB,EAAO,QAAQ,EAAE,kBAAkB,EAAO,QAAQ,EAAE,YAAY,CAAC,EAAE,EAClT,EAAY,GAAG,CAAC,IAAM,EAAO,EAAE,OAA8G,EAA1F,EAAO,QAAQ,SAAS,GAAG,EAAO,QAAQ,QAAQ,GAAG,EAAO,QAAQ,iBAAiB,IAAc,EAAc,UAAe,E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