{"version":3,"file":"SimHover.Cz1HLEkP.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/75iBFbNRNrlfxCj2HdiX/Vq0aP5pXJw0VSqBSl9B2/SimHover.js"],"sourcesContent":["// SimHover.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";/**\n * Deep, defensive simulated-hover:\n * - Finds the actual interactive DOM node (canvas or inner div)\n * - Fires pointer + mouse events on every frame\n * - Re-finds the node if Framer re-mounts it\n */export function withSimulatedHoverDeep(Component){return /*#__PURE__*/forwardRef((props,_ref)=>{const hostRef=useRef(null);const targetRef=useRef(null);const stopRef=useRef(()=>{});useEffect(()=>{const host=hostRef.current;if(!host)return;// find inner node that actually listens to hover\nconst findTarget=()=>{const t=host.querySelector(\"canvas\")||host.querySelector(\"[data-shimmer], [data-canvas], .canvas, [role='presentation']\")||host.firstElementChild;targetRef.current=t||host;};findTarget();// re-find the node on changes (Framer remounts a lot)\nconst mo=new MutationObserver(()=>findTarget());mo.observe(host,{childList:true,subtree:true});let raf=0;const tick=()=>{const el=targetRef.current||host;if(!el){raf=requestAnimationFrame(tick);return;}const r=el.getBoundingClientRect();if(r.width===0||r.height===0){raf=requestAnimationFrame(tick);return;}// Aim near the center; small jitter keeps animations alive\nconst t=performance.now()/1e3;const cx=r.left+r.width/2+Math.cos(t*1.3)*(r.width*.1);const cy=r.top+r.height/2+Math.sin(t*1.7)*(r.height*.1);// Fire both Pointer and Mouse flavors (some libs only listen to one)\nconst common={bubbles:true,clientX:cx,clientY:cy};el.dispatchEvent(new PointerEvent(\"pointerover\",{...common,pointerType:\"mouse\"}));el.dispatchEvent(new PointerEvent(\"pointerenter\",{...common,pointerType:\"mouse\"}));el.dispatchEvent(new PointerEvent(\"pointermove\",{...common,pointerType:\"mouse\"}));el.dispatchEvent(new MouseEvent(\"mouseover\",common));el.dispatchEvent(new MouseEvent(\"mouseenter\",common));el.dispatchEvent(new MouseEvent(\"mousemove\",common));raf=requestAnimationFrame(tick);};raf=requestAnimationFrame(tick);stopRef.current=()=>{cancelAnimationFrame(raf);mo.disconnect();};return()=>stopRef.current();},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:n=>{hostRef.current=n;},// don’t let real hover handlers fight us\nwhileHover:undefined,whileTap:undefined});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSimulatedHoverDeep\":{\"type\":\"reactHoc\",\"name\":\"withSimulatedHoverDeep\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SimHover.map"],"mappings":"0KAMG,SAAgB,EAAuB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAO,CAAC,IAAM,EAAQA,EAAO,KAAK,CAAO,EAAUA,EAAO,KAAK,CAAO,EAAQA,MAAW,GAAG,CAIub,OAJtb,MAAc,CAAC,IAAM,EAAK,EAAQ,QAAQ,GAAG,CAAC,EAAK,OAC3O,IAAM,MAAe,CAAmJ,EAAU,QAApJ,EAAK,cAAc,SAAS,EAAE,EAAK,cAAc,gEAAgE,EAAE,EAAK,mBAAuC,GAAO,GAAY,CAChN,IAAM,EAAG,IAAI,qBAAqB,GAAY,CAAC,CAAC,EAAG,QAAQ,EAAK,CAAC,UAAU,GAAK,QAAQ,GAAK,CAAC,CAAC,IAAI,EAAI,EAAQ,MAAS,CAAC,IAAM,EAAG,EAAU,SAAS,EAAK,GAAG,CAAC,EAAG,CAAC,EAAI,sBAAsB,EAAK,CAAC,OAAQ,IAAM,EAAE,EAAG,uBAAuB,CAAC,GAAG,EAAE,QAAQ,GAAG,EAAE,SAAS,EAAE,CAAC,EAAI,sBAAsB,EAAK,CAAC,OAC3S,IAAM,EAAE,YAAY,KAAK,CAAC,IAAU,EAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,IAAU,EAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,IAAI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