{"version":3,"file":"DisableProjectCardHover.DfBym0Ub.mjs","names":[],"sources":["https:/framerusercontent.com/modules/5y9RmPGqNfGepVMIXlYG/X52844BDNTyecyIO9Ous/DisableProjectCardHover.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";const CONSUMER_DEMO=\"https://pub-2139a0a6665747df8a4710a6a4c6fc6b.r2.dev/drift-consumer-journey-v2-16x9.mp4\";const LAWYER_DEMO=\"https://pub-2139a0a6665747df8a4710a6a4c6fc6b.r2.dev/drift-lawyer-journey-16x9.mp4\";function setCardVideo(href,source){document.querySelectorAll(`a[href$=\"${href}\"]`).forEach(card=>{const video=card.querySelector(\"video\");if(!video||video.getAttribute(\"src\")===source)return;video.src=source;video.load();const playback=video.play();if(playback)playback.catch(()=>{});});}export function DisableProjectCardHover(Component){return /*#__PURE__*/forwardRef(function DisableProjectCardHoverOverride(props,ref){useEffect(()=>{const styleId=\"drift-project-card-no-hover-effects\";let styleElement=document.getElementById(styleId);if(!styleElement){styleElement=document.createElement(\"style\");styleElement.id=styleId;document.head.appendChild(styleElement);}styleElement.textContent=`\n                a[href$=\"/projects/drift-ai\"] *,\n                a[href$=\"/projects/drift-ai-for-lawyers\"] *,\n                a:has(video[src*=\"drift-consumer-journey\"]) *,\n                a:has(video[src*=\"drift-lawyer-journey\"]) * {\n                    filter: none !important;\n                    backdrop-filter: none !important;\n                    -webkit-backdrop-filter: none !important;\n                }\n\n                a[href$=\"/projects/drift-ai-for-lawyers\"] video,\n                a:has(video[src*=\"drift-lawyer-journey\"]) video {\n                    transform: none !important;\n                    opacity: 1 !important;\n                }\n\n                a[href$=\"/projects/drift-ai\"] video,\n                a:has(video[src*=\"drift-consumer-journey\"]) video {\n                    transform: scale(1.06) !important;\n                    transform-origin: center center !important;\n                    opacity: 1 !important;\n                }\n            `;const sync=()=>{setCardVideo(\"/projects/drift-ai-for-lawyers\",LAWYER_DEMO);setCardVideo(\"/projects/drift-ai\",CONSUMER_DEMO);};sync();const first=window.setTimeout(sync,100);const second=window.setTimeout(sync,600);const observer=new MutationObserver(sync);observer.observe(document.body,{childList:true,subtree:true});return()=>{window.clearTimeout(first);window.clearTimeout(second);observer.disconnect();};},[]);const stopHoverGestures=event=>{if(event&&typeof event.stopPropagation===\"function\"){event.stopPropagation();}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:undefined,onHoverStart:undefined,onHoverEnd:undefined,onPointerOverCapture:stopHoverGestures,onPointerEnterCapture:stopHoverGestures,onPointerMoveCapture:stopHoverGestures,onMouseOverCapture:stopHoverGestures,onMouseEnterCapture:stopHoverGestures,onMouseMoveCapture:stopHoverGestures});});}\nexport const __FramerMetadata__ = {\"exports\":{\"DisableProjectCardHover\":{\"type\":\"reactHoc\",\"name\":\"DisableProjectCardHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DisableProjectCardHover.map"],"mappings":"uIAAsS,SAAS,EAAa,EAAK,EAAO,CAAC,SAAS,iBAAiB,YAAY,EAAK,GAAG,CAAC,CAAC,QAAQ,GAAM,CAAC,IAAM,EAAM,EAAK,cAAc,OAAO,EAAE,GAAG,CAAC,GAAO,EAAM,aAAa,KAAK,IAAI,EAAO,OAAO,EAAM,IAAI,EAAO,EAAM,KAAK,EAAE,IAAM,EAAS,EAAM,KAAK,EAAK,GAAS,EAAS,UAAU,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgB,EAAwB,EAAU,CAAC,OAAoB,EAAW,SAAyC,EAAM,EAAI,CAAC,MAAc,CAAC,IAAM,EAAQ,sCAA0C,EAAa,SAAS,eAAe,CAAO,EAAM,IAAc,EAAa,SAAS,cAAc,OAAO,EAAE,EAAa,GAAG,EAAQ,SAAS,KAAK,YAAY,CAAY,GAAG,EAAa,YAAY;;;;;;;;;;;;;;;;;;;;;;cAsB58B,IAAM,MAAS,CAAC,EAAa,iCAAiC,CAAW,EAAE,E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