{"version":3,"file":"RandomFlicker.BruXobn3.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/cYNBNLeaWoqvVm9qkPPJ/kkVgr0cH6Prh8SUS7pnh/RandomFlicker.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";// On ajoute le type ComponentType pour aider Framer à l'indexer\nexport function withRandomFlicker(Component){return props=>{const[opacity,setOpacity]=useState(1);useEffect(()=>{let timeoutId;const flicker=()=>{// Logique d'opacité\nconst newOpacity=Math.random()>.8?.5:1;setOpacity(newOpacity);// Intervalle aléatoire entre 50ms et 250ms\nconst nextTick=Math.random()*50+20;timeoutId=setTimeout(flicker,nextTick);};flicker();// Nettoyage du timeout pour éviter les fuites de mémoire\nreturn()=>clearTimeout(timeoutId);},[]);return /*#__PURE__*/_jsx(Component,{...props,animate:{opacity},transition:{duration:.05}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomFlicker\":{\"type\":\"reactHoc\",\"name\":\"withRandomFlicker\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RandomFlicker.map"],"mappings":"yHACA,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,CAAC,EAGxD,OAH0D,MAAc,CAAC,IAAI,EAAgB,MAAY,CAC1G,EAAtB,KAAK,OAAO,EAAE,GAAG,GAAG,CAAuB,EAC5D,IAAM,EAAS,KAAK,OAAO,EAAE,GAAG,GAAG,EAAU,WAAW,EAAQ,CAAQ,CAAE,EAC1E,OAD4E,EAAQ,MAC1E,aAAa,CAAS,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,CAAC,SAAO,EAAE,WAAW,CAAC,SAAS,GAAG,CAAC,CAAC,CAAE,CAAE,iBAJ3F,IAAsC"}