{"version":3,"file":"PauseOnClick.CDpNb130.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/nf8ocB7rxGzlWotnVXHS/iGnQj7f4YeB9K4qUk4v8/PauseOnClick.js"],"sourcesContent":["// ✅ WORKING DOTLOTTIE OVERRIDE FOR FRAMER\n// This version fixes playback by directly observing the <dotlottie-player>\n// It toggles play/pause on tap, and shows a fading play icon overlay\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useLayoutEffect,useState}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";export function dotLottiePlayPause(){const wrapperRef=useRef(null);const[isPaused,setIsPaused]=useState(false);const[isReady,setIsReady]=useState(false);useLayoutEffect(()=>{const interval=setInterval(()=>{const player=wrapperRef.current?.querySelector(\"dotlottie-player\");if(player&&typeof player.play===\"function\"){clearInterval(interval);player.loop=true;player.autoplay=false;player.play();setIsReady(true);}},100);return()=>clearInterval(interval);},[]);const handleToggle=()=>{const player=wrapperRef.current?.querySelector(\"dotlottie-player\");if(!player||!isReady)return;if(isPaused){player.play();}else{player.pause();}setIsPaused(!isPaused);};return{ref:wrapperRef,onTap:handleToggle,children:/*#__PURE__*/_jsx(AnimatePresence,{children:isPaused&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0},animate:{opacity:.72},exit:{opacity:0},style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",fontSize:40,color:\"#ffffff\",pointerEvents:\"none\",zIndex:10},children:\"▶️\"})})};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withdotLottiePlayPause(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...dotLottiePlayPause(props)});};}withdotLottiePlayPause.displayName=\"dotLottiePlayPause\";\nexport const __FramerMetadata__ = {\"exports\":{\"dotLottiePlayPause\":{\"type\":\"override\",\"name\":\"dotLottiePlayPause\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdotLottiePlayPause\":{\"type\":\"reactHoc\",\"name\":\"withdotLottiePlayPause\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PauseOnClick.map"],"mappings":"gPAGgJ,SAAgB,GAAoB,CAAC,IAAM,EAAWA,EAAO,KAAK,CAAM,CAAC,EAAS,GAAaC,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAof,OAAnf,MAAoB,CAAC,IAAM,EAAS,gBAAgB,CAAC,IAAM,EAAO,EAAW,SAAS,cAAc,mBAAmB,CAAI,GAAQ,OAAO,EAAO,MAAO,aAAY,cAAc,EAAS,CAAC,EAAO,KAAK,GAAK,EAAO,SAAS,GAAM,EAAO,MAAM,CAAC,EAAW,GAAK,GAAI,IAAI,CAAC,UAAU,cAAc,EAAS,EAAG,EAAE,CAAC,CAAwM,CAAC,IAAI,EAAW,UAAhM,CAAC,IAAM,EAAO,EAAW,SAAS,cAAc,mBAAmB,CAAI,CAAC,GAAQ,CAAC,IAAkB,EAAU,EAAO,MAAM,CAAO,EAAO,OAAO,CAAE,EAAY,CAAC,EAAS,GAA4C,SAAsB,EAAK,EAAgB,CAAC,SAAS,GAAuB,EAAK,EAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,MAAM,KAAK,MAAM,UAAU,wBAAwB,SAAS,GAAG,MAAM,UAAU,cAAc,OAAO,OAAO,GAAG,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAqJ,SAAgB,EAAuB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAmB,EAAM,CAAC,CAAC,mBAA95C,IAAmD,IAAkD,IAAkoC,CAA2L,EAAuB,YAAY"}