{"version":3,"file":"CustomCursor.D2CbePE4.mjs","names":["React.useRef","React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/7uWEFOFkrOwdSNcS9ewG/BGQOXztnetpzQcwqt3fI/CustomCursor.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CustomCursor(props){const{size=12,linkSize=22,projectSize=72,color=\"#6043FF\",linkColor=\"#6043FF\",projectColor=\"#6043FF\",textColor=\"#FFFFFF\",projectText=\"View\",follow=.2}=props;const cursorRef=React.useRef(null);const mouse=React.useRef({x:-100,y:-100});const current=React.useRef({x:-100,y:-100});const[visible,setVisible]=React.useState(false);const[mode,setMode]=React.useState(\"default\");React.useEffect(()=>{let frame;const onMove=e=>{mouse.current.x=e.clientX;mouse.current.y=e.clientY;setVisible(true);const target=e.target;const project=target.closest('[data-cursor=\"project\"], a[href*=\"/kamel\"], a[href*=\"/grantmuse\"], a[href*=\"/lockin\"]');const link=target.closest(\"a, button\");if(project){setMode(\"project\");}else if(link){setMode(\"link\");}else{setMode(\"default\");}};const animate=()=>{current.current.x+=(mouse.current.x-current.current.x)*follow;current.current.y+=(mouse.current.y-current.current.y)*follow;if(cursorRef.current){cursorRef.current.style.transform=`translate3d(\n                        ${current.current.x}px,\n                        ${current.current.y}px,\n                        0\n                    ) translate(-50%, -50%)`;}frame=requestAnimationFrame(animate);};const hide=()=>setVisible(false);const show=()=>setVisible(true);window.addEventListener(\"mousemove\",onMove);document.addEventListener(\"mouseleave\",hide);document.addEventListener(\"mouseenter\",show);animate();return()=>{window.removeEventListener(\"mousemove\",onMove);document.removeEventListener(\"mouseleave\",hide);document.removeEventListener(\"mouseenter\",show);cancelAnimationFrame(frame);};},[follow]);const cursorSize=mode===\"project\"?projectSize:mode===\"link\"?linkSize:size;const cursorColor=mode===\"project\"?projectColor:mode===\"link\"?linkColor:color;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (pointer: fine) {\n                    html,\n                    body,\n                    a,\n                    button,\n                    [data-cursor=\"project\"] {\n                        cursor: none !important;\n                    }\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{ref:cursorRef,style:{position:\"fixed\",left:0,top:0,width:cursorSize,height:cursorSize,borderRadius:\"50%\",backgroundColor:cursorColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",pointerEvents:\"none\",zIndex:999999,opacity:visible?1:0,transition:`\n                        width 0.25s ease,\n                        height 0.25s ease,\n                        background-color 0.25s ease,\n                        opacity 0.15s ease\n                    `,willChange:\"transform\"},children:/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:13,fontWeight:500,fontFamily:\"Inter, sans-serif\",opacity:mode===\"project\"?1:0,transform:mode===\"project\"?\"scale(1)\":\"scale(0.8)\",transition:\"opacity 0.18s ease, transform 0.18s ease\",whiteSpace:\"nowrap\"},children:projectText})})]});}addPropertyControls(CustomCursor,{size:{type:ControlType.Number,title:\"Default\",defaultValue:12,min:4,max:30},linkSize:{type:ControlType.Number,title:\"Link\",defaultValue:22,min:10,max:50},projectSize:{type:ControlType.Number,title:\"Project\",defaultValue:72,min:40,max:140},color:{type:ControlType.Color,title:\"Default Color\",defaultValue:\"#6043FF\"},linkColor:{type:ControlType.Color,title:\"Link Color\",defaultValue:\"#6043FF\"},projectColor:{type:ControlType.Color,title:\"Project Color\",defaultValue:\"#6043FF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#6043FF\"},projectText:{type:ControlType.String,title:\"Project Text\",defaultValue:\"View\"},follow:{type:ControlType.Number,title:\"Follow\",defaultValue:.2,min:.05,max:1,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomCursor\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./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