{"version":3,"file":"Custom_cursor.BzJtSCKB.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/5OA0RIXcvlT0GbVnplip/Byu6SXKxpiN88vHbzIEq/Custom_cursor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{motion,useSpring}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function FluidCursor(props){const{cursorColor,smoothness,bounce,cursorImage,imageSize,borderRadius,blendingMode,hideOnMobile}=props;const cursorX=useSpring(0,{damping:bounce,stiffness:300});const cursorY=useSpring(0,{damping:bounce,stiffness:300});const[hidden,setHidden]=useState(false);const[isExpanded,setIsExpanded]=useState(false);const[isMobile,setIsMobile]=useState(window.innerWidth<=768);useEffect(()=>{const handleResize=()=>{setIsMobile(window.innerWidth<=768);};window.addEventListener(\"resize\",handleResize);const moveCursor=e=>{cursorX.set(e.clientX-window.innerWidth/2);cursorY.set(e.clientY-window.innerHeight/2);};const onMouseEnter=()=>setHidden(false);const onMouseLeave=()=>setHidden(true);const expandCursor=()=>setIsExpanded(true);const shrinkCursor=()=>setIsExpanded(false);document.addEventListener(\"mousemove\",moveCursor);document.addEventListener(\"mouseenter\",onMouseEnter);document.addEventListener(\"mouseleave\",onMouseLeave);const clickableElements=document.querySelectorAll('a, button, input[type=\"submit\"], [role=\"button\"]');clickableElements.forEach(elem=>{elem.addEventListener(\"mouseover\",expandCursor);elem.addEventListener(\"mouseout\",shrinkCursor);});return()=>{window.removeEventListener(\"resize\",handleResize);document.removeEventListener(\"mousemove\",moveCursor);document.removeEventListener(\"mouseenter\",onMouseEnter);document.removeEventListener(\"mouseleave\",onMouseLeave);clickableElements.forEach(elem=>{elem.removeEventListener(\"mouseover\",expandCursor);elem.removeEventListener(\"mouseout\",shrinkCursor);});};},[smoothness,bounce,cursorX,cursorY]);const expandedSize=isExpanded?imageSize*1.5:imageSize;const cursorStyle={position:\"fixed\",top:\"50%\",left:\"50%\",x:cursorX,y:cursorY,pointerEvents:\"none\",zIndex:9999,width:cursorImage?`${expandedSize}px`:`${expandedSize}px`,height:cursorImage?`${expandedSize}px`:`${expandedSize}px`,borderRadius:`${borderRadius}%`,transform:\"translate(-50%, -50%)\",display:hidden||hideOnMobile&&isMobile?\"none\":\"block\",backgroundColor:cursorColor,backgroundImage:cursorImage?`url(${cursorImage})`:\"none\",backgroundSize:\"cover\",backgroundRepeat:\"no-repeat\",opacity:isExpanded?.7:1,transition:isExpanded?`width ${smoothness}ms ease, height ${smoothness}ms ease, opacity ${smoothness}ms ease`:\"none\",mixBlendMode:blendingMode};return /*#__PURE__*/_jsx(motion.div,{style:cursorStyle});}FluidCursor.defaultProps={cursorColor:\"#fff\",smoothness:100,bounce:25,cursorImage:null,imageSize:24,borderRadius:50,blendingMode:\"difference\",hideOnMobile:false};addPropertyControls(FluidCursor,{cursorColor:{type:ControlType.Color,title:\"Cursor Color\"},smoothness:{type:ControlType.Number,title:\"Smoothness\",min:0,max:1e3,step:10,defaultValue:100},bounce:{type:ControlType.Number,title:\"Bounce\",min:0,max:50,step:1,defaultValue:25},cursorImage:{type:ControlType.Image,title:\"Cursor Image\"},imageSize:{type:ControlType.Number,title:\"Image Size (px)\",min:1,defaultValue:24},borderRadius:{type:ControlType.Number,title:\"Border Radius (%)\",min:0,max:100,defaultValue:50},blendingMode:{type:ControlType.Enum,title:\"Blending Mode\",options:[\"normal\",\"multiply\",\"screen\",\"overlay\",\"darken\",\"lighten\",\"color-dodge\",\"color-burn\",\"hard-light\",\"soft-light\",\"difference\",\"exclusion\",\"hue\",\"saturation\",\"color\",\"luminosity\"],defaultValue:\"difference\"},hideOnMobile:{type:ControlType.Boolean,title:\"Hide on Mobile\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FluidCursor\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\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