{"version":3,"file":"CustomCursor.CMPPrb20.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/hUmRcxbCoq1ajfAxLtLr/mETEgQwkr0mC31Q10QYi/CustomCursor.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{motion}from\"framer-motion\";const globalStyles=`\n  * {\n    cursor: none !important;\n  }\n  @media (hover: none) and (pointer: coarse) {\n    * {\n      cursor: auto !important;\n    }\n  }\n`;export function CustomCursor(){const[mousePosition,setMousePosition]=useState({x:0,y:0});const[isHovered,setIsHovered]=useState(false);const[isPressed,setIsPressed]=useState(false);const[isTouchDevice,setIsTouchDevice]=useState(false);const outerCursorRef=useRef(null);useEffect(()=>{const checkTouchDevice=()=>{setIsTouchDevice(\"ontouchstart\"in window||navigator.maxTouchPoints>0);};checkTouchDevice();window.addEventListener(\"resize\",checkTouchDevice);const updateCursor=e=>{setMousePosition({x:e.clientX,y:e.clientY});const element=document.elementFromPoint(e.clientX,e.clientY);setIsHovered(!!(element===null||element===void 0?void 0:element.closest('a, button, [role=\"button\"], input, textarea, select')));};const handleMouseDown=()=>setIsPressed(true);const handleMouseUp=()=>setIsPressed(false);window.addEventListener(\"mousemove\",updateCursor);window.addEventListener(\"mousedown\",handleMouseDown);window.addEventListener(\"mouseup\",handleMouseUp);return()=>{window.removeEventListener(\"resize\",checkTouchDevice);window.removeEventListener(\"mousemove\",updateCursor);window.removeEventListener(\"mousedown\",handleMouseDown);window.removeEventListener(\"mouseup\",handleMouseUp);};},[]);useEffect(()=>{let animationFrameId;const animateOuterCursor=()=>{if(outerCursorRef.current){const rect=outerCursorRef.current.getBoundingClientRect();const targetX=mousePosition.x-rect.width/2;const targetY=mousePosition.y-rect.height/2;const currentX=parseFloat(outerCursorRef.current.style.left)||0;const currentY=parseFloat(outerCursorRef.current.style.top)||0;const smoothingFactor=.03// Slower trailing effect\n;const newX=currentX+(targetX-currentX)*smoothingFactor;const newY=currentY+(targetY-currentY)*smoothingFactor;outerCursorRef.current.style.left=`${newX}px`;outerCursorRef.current.style.top=`${newY}px`;}animationFrameId=requestAnimationFrame(animateOuterCursor);};animateOuterCursor();return()=>{if(animationFrameId){cancelAnimationFrame(animationFrameId);}};},[mousePosition]);const getCursorSize=()=>{if(isPressed)return 20;if(isHovered)return 40;return 25;};const satellites=[{color:\"#f6be00\",size:8,distance:25,orbitDuration:3,wobbleFactor:0,clockwise:true},{color:\"#8Ba6c1\",size:12,distance:30,orbitDuration:4,wobbleFactor:0,clockwise:false},{color:\"#046a38\",size:7,distance:35,orbitDuration:5,wobbleFactor:0,clockwise:true},{color:\"#ee5340\",size:10,distance:40,orbitDuration:6,wobbleFactor:1,clockwise:false}];return /*#__PURE__*/_jsx(_Fragment,{children:!isTouchDevice&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:globalStyles}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"fixed\",left:mousePosition.x,top:mousePosition.y,pointerEvents:\"none\",zIndex:9999,mixBlendMode:\"difference\"},children:/*#__PURE__*/_jsx(motion.div,{className:\"cursor-dot\",style:{width:getCursorSize(),height:getCursorSize(),borderRadius:\"50%\",backgroundColor:\"#ffffff\",transform:\"translate(-50%, -50%)\"},animate:{width:getCursorSize(),height:getCursorSize()},transition:{type:\"spring\",stiffness:300,damping:30}})}),/*#__PURE__*/_jsx(motion.div,{ref:outerCursorRef,style:{position:\"fixed\",pointerEvents:\"none\",zIndex:9998,width:80,height:80},children:satellites.map((satellite,index)=>/*#__PURE__*/_jsx(motion.div,{style:{width:satellite.size,height:satellite.size,borderRadius:\"50%\",backgroundColor:satellite.color,position:\"absolute\",left:`calc(50% + ${satellite.distance}px)`,top:\"50%\",transformOrigin:`${-satellite.distance}px 50%`},animate:{rotate:satellite.clockwise?360:-360,x:[0,10*satellite.wobbleFactor,0,-10*satellite.wobbleFactor,0],y:[0,10*satellite.wobbleFactor,0,-10*satellite.wobbleFactor,0]},transition:{rotate:{repeat:Infinity,duration:satellite.orbitDuration,ease:\"linear\"},x:{repeat:Infinity,duration:satellite.orbitDuration*.5,ease:\"easeInOut\"},y:{repeat:Infinity,duration:satellite.orbitDuration*.7,ease:\"easeInOut\"}}},index))})]})});}\nexport const __FramerMetadata__ = {\"exports\":{\"CustomCursor\":{\"type\":\"reactComponent\",\"name\":\"CustomCursor\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCursor.map"],"mappings":"oNASE,SAAgB,GAAc,CAAC,GAAK,CAAC,EAAc,GAAkBA,EAAS,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAc,GAAkBA,EAAS,GAAM,CAAO,EAAeC,EAAO,KAAK,CAAC,MAAc,CAAC,IAAM,MAAqB,CAAC,EAAiB,iBAAiB,GAAQ,EAAU,eAAe,EAAE,EAAG,GAAkB,CAAC,EAAO,iBAAiB,SAAS,EAAiB,CAAC,IAAM,EAAa,GAAG,CAAC,EAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAA8D,EAAa,CAAC,CAA7D,SAAS,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAiE,QAAQ,sDAAsD,CAAE,EAAS,MAAoB,EAAa,GAAK,CAAO,MAAkB,EAAa,GAAM,CAAyJ,OAAxJ,EAAO,iBAAiB,YAAY,EAAa,CAAC,EAAO,iBAAiB,YAAY,EAAgB,CAAC,EAAO,iBAAiB,UAAU,EAAc,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAiB,CAAC,EAAO,oBAAoB,YAAY,EAAa,CAAC,EAAO,oBAAoB,YAAY,EAAgB,CAAC,EAAO,oBAAoB,UAAU,EAAc,GAAK,EAA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