{"version":3,"file":"Cursor.D88mmHE0.mjs","names":["useRef","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/pIl7x3bLpdiib75AleR6/eB3PgkjMSjYgCTXpYBDh/Cursor.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useRef,useState}from\"react\";import{createPortal}from\"react-dom\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function CustomCursor(props){const{size=28,color=\"#E3E8BB\",hoverScale=2.2,smoothing=.22,stretch=.5,blend=false,hideNative=true}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const[enabled,setEnabled]=useState(false);useEffect(()=>{if(isCanvas)return;setEnabled(window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches);},[isCanvas]);useEffect(()=>{if(!enabled)return;const el=ref.current;if(!el)return;let x=-200;let y=-200;let cx=-200;let cy=-200;let scale=1;let hoverTarget=1;let pressed=false;let seen=false;let angle=0;let squash=0;let last=performance.now();let raf=0;const onMove=e=>{if(!seen){// jump to first position so it does not fly in from the corner\ncx=e.clientX;cy=e.clientY;seen=true;el.style.opacity=\"1\";}x=e.clientX;y=e.clientY;const t=e.target;hoverTarget=t&&t.closest&&t.closest(\"a, button, [role='button']\")?hoverScale:1;};const onDown=()=>pressed=true;const onUp=()=>pressed=false;const onLeave=()=>el.style.opacity=\"0\";const onEnter=()=>{if(seen)el.style.opacity=\"1\";};const tick=now=>{// frame-rate independent easing: feels the same on 60Hz and 120Hz\nconst dt=Math.min(now-last,50);last=now;const k=1-Math.pow(1-smoothing,dt/16.667);const dx=x-cx;const dy=y-cy;cx+=dx*k;cy+=dy*k;// stretch along the direction of travel, based on how far behind we are\nconst dist=Math.hypot(dx,dy);const targetSquash=Math.min(dist/300,.4)*stretch;squash+=(targetSquash-squash)*Math.min(k*1.5,1);if(dist>1)angle=Math.atan2(dy,dx);const target=hoverTarget*(pressed?.8:1);scale+=(target-scale)*Math.min(k*.9,1);el.style.transform=`translate3d(${cx}px, ${cy}px, 0) translate(-50%, -50%) `+`rotate(${angle}rad) scale(${scale*(1+squash)}, ${scale*(1-squash*.6)})`;raf=requestAnimationFrame(tick);};window.addEventListener(\"mousemove\",onMove);window.addEventListener(\"mousedown\",onDown);window.addEventListener(\"mouseup\",onUp);document.documentElement.addEventListener(\"mouseleave\",onLeave);document.documentElement.addEventListener(\"mouseenter\",onEnter);raf=requestAnimationFrame(tick);return()=>{window.removeEventListener(\"mousemove\",onMove);window.removeEventListener(\"mousedown\",onDown);window.removeEventListener(\"mouseup\",onUp);document.documentElement.removeEventListener(\"mouseleave\",onLeave);document.documentElement.removeEventListener(\"mouseenter\",onEnter);cancelAnimationFrame(raf);};},[enabled,hoverScale,smoothing,stretch]);if(!enabled)return null;return /*#__PURE__*/createPortal(/*#__PURE__*/_jsxs(_Fragment,{children:[hideNative?/*#__PURE__*/_jsx(\"style\",{children:`*, *::before, *::after { cursor: none !important; }`}):null,/*#__PURE__*/_jsx(\"div\",{ref:ref,\"aria-hidden\":\"true\",style:{position:\"fixed\",top:0,left:0,width:size,height:size,borderRadius:\"50%\",background:color,pointerEvents:\"none\",zIndex:99999,opacity:0,transition:\"opacity 0.25s ease\",mixBlendMode:blend?\"difference\":\"normal\",transform:\"translate3d(-200px, -200px, 0)\",willChange:\"transform\"}})]}),document.body);}addPropertyControls(CustomCursor,{size:{type:ControlType.Number,title:\"Size\",defaultValue:28,min:8,max:100,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#E3E8BB\"},hoverScale:{type:ControlType.Number,title:\"Hover Scale\",defaultValue:2.2,min:1,max:5,step:.1},smoothing:{type:ControlType.Number,title:\"Smoothing\",defaultValue:.22,min:.05,max:1,step:.01},stretch:{type:ControlType.Number,title:\"Stretch\",defaultValue:.5,min:0,max:1,step:.05},blend:{type:ControlType.Boolean,title:\"Invert Blend\",defaultValue:false},hideNative:{type:ControlType.Boolean,title:\"Hide Default\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomCursor\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Cursor.map"],"mappings":"yOAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,GAAG,QAAM,UAAU,aAAW,IAAI,YAAU,IAAI,UAAQ,GAAG,QAAM,GAAM,aAAW,IAAM,EAAY,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAIA,EAAO,IAAI,EAAO,CAAC,EAAQ,GAAYC,EAAS,EAAK,EAG4yB,OAH1yB,MAAc,CAAI,GAAgB,EAAW,EAAO,WAAW,oCAAoC,CAAC,CAAC,OAAO,CAAE,EAAE,CAAC,CAAQ,CAAC,EAAE,MAAc,CAAC,GAAG,CAAC,EAAQ,OAAO,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,EAAG,OAAO,IAAI,EAAE,KAAS,EAAE,KAAS,EAAG,KAAS,EAAG,KAAS,EAAM,EAAM,EAAY,EAAM,EAAQ,GAAU,EAAK,GAAU,EAAM,EAAM,EAAO,EAAM,EAAK,YAAY,IAAI,EAAM,EAAI,EAAQ,EAAO,GAAG,CAAK,IACtpB,EAAG,EAAE,QAAQ,EAAG,EAAE,QAAQ,EAAK,GAAK,EAAG,MAAM,QAAQ,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,IAAM,EAAE,EAAE,OAAO,EAAY,GAAG,EAAE,SAAS,EAAE,QAAQ,4BAA4B,EAAE,EAAW,CAAE,EAAQ,MAAW,EAAQ,GAAW,MAAS,EAAQ,GAAY,MAAY,EAAG,MAAM,QAAQ,IAAU,MAAY,CAAI,IAAK,EAAG,M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