{"version":3,"file":"Load_Once.CgetWEyo.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/JNgOwOmkjUfxZqbRCLZi/f0MWUCrZoSLidexAV1oE/Load_Once.js"],"sourcesContent":["\"use client\";import{jsx as _jsx}from\"react/jsx-runtime\";import{Data}from\"framer\";import{useState,useEffect}from\"react\";// État global Framer\nconst globalState=Data({loadingFinished:false});let isInternalNavigation=false;export function withFirstLoad(Component){return props=>{const[shouldRender,setShouldRender]=useState(!isInternalNavigation);useEffect(()=>{if(!isInternalNavigation){isInternalNavigation=true;setTimeout(()=>{setShouldRender(false);globalState.loadingFinished=true;},8e3);}else{globalState.loadingFinished=true;}},[]);return shouldRender?/*#__PURE__*/_jsx(Component,{...props}):null;};}// Override pour les animations du hero\nexport function AnimationOverride(){if(globalState.loadingFinished){return{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:0,duration:.4}};}return{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:8.2,duration:.4}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withAnimationOverride(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...AnimationOverride(props)});};}withAnimationOverride.displayName=\"AnimationOverride\";\nexport const __FramerMetadata__ = {\"exports\":{\"withFirstLoad\":{\"type\":\"reactHoc\",\"name\":\"withFirstLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAnimationOverride\":{\"type\":\"reactHoc\",\"name\":\"withAnimationOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AnimationOverride\":{\"type\":\"override\",\"name\":\"AnimationOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Load_Once.map"],"mappings":"mLAC+E,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAa,GAAiBA,EAAS,CAAC,EAAqB,CAAiM,OAAhM,MAAc,CAAK,EAAqI,EAAY,gBAAgB,IAA3I,EAAqB,GAAK,eAAe,CAAC,EAAgB,GAAM,CAAC,EAAY,gBAAgB,IAAO,IAAI,GAA2C,EAAE,CAAC,CAAQ,EAA0B,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,MACvc,SAAgB,GAAmB,CAA4H,OAAxH,EAAY,gBAAuB,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,CAAC,CAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,IAAI,SAAS,GAAG,CAAC,CAAqJ,SAAgB,EAAsB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAkB,EAAM,CAAC,CAAC,uBAF5gB,IAAyB,IAAsC,CACjH,EAAY,EAAK,CAAC,gBAAgB,GAAM,CAAC,CAAK,EAAqB,GAC+f,EAAsB,YAAY"}