{"version":3,"file":"DelayedVisibility.C4AACI1D.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/qcEygirpjRxcjBhBxfco/HWUMgw8pslHZvZGmb9bN/DelayedVisibility.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,forwardRef}from\"react\";/**\n * Este Code Override oculta uma seção por um tempo determinado.\n * Ele utiliza o localStorage para garantir que o tempo persista mesmo se a página for atualizada.\n */export function withDelayedVisibility(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isVisible,setIsVisible]=useState(false);// --- CONFIGURAÇÃO DE TEMPO ---\n// Para 2 segundos:\n//const delayInSeconds = 1\n//const delayInMs = delayInSeconds * 1000\nconst delayInMs=454*1e3// 7 minutos e 34 segundos - apague essa parte e descomente as 2 linhas acima para usar minutos\n;// Para 14 minutos (descomente a linha abaixo e comente as de cima se quiser usar):\n//const delayInMs = 14 * 60 * 1000\n// -----------------------------\nuseEffect(()=>{// Chave única para identificar o timer no navegador do usuário\nconst storageKey=\"framer_section_reveal_timestamp\";const now=Date.now();let revealTimestamp=localStorage.getItem(storageKey);if(!revealTimestamp){// Se for a primeira visita, define quando a seção deve aparecer\nrevealTimestamp=(now+delayInMs).toString();localStorage.setItem(storageKey,revealTimestamp);}const remainingTime=parseInt(revealTimestamp)-now;if(remainingTime<=0){// Se o tempo já passou, mostra imediatamente\nsetIsVisible(true);}else{// Caso contrário, espera o tempo restante\nconst timer=setTimeout(()=>{setIsVisible(true);},remainingTime);// Limpa o timer se o componente for desmontado\nreturn()=>clearTimeout(timer);}},[]);// Se não estiver visível, não renderiza nada\nif(!isVisible){return null;}return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withDelayedVisibility\":{\"type\":\"reactHoc\",\"name\":\"withDelayedVisibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DelayedVisibility.map"],"mappings":"2HAGG,SAAgB,EAAsB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAclH,OAN5B,MAAc,CACd,IAAM,EAAW,kCAAwC,EAAI,KAAK,KAAK,CAAK,EAAgB,aAAa,QAAQ,EAAW,CAAK,IACjI,GAAiB,EAAI,OAAW,UAAU,CAAC,aAAa,QAAQ,EAAW,EAAgB,EAAE,IAAM,EAAc,SAAS,EAAgB,CAAC,EAAI,GAAG,GAAe,EACjK,EAAa,GAAK,KAAM,CACxB,IAAM,EAAM,eAAe,CAAC,EAAa,GAAK,EAAG,EAAc,CAC/D,UAAU,aAAa,EAAM,GAAI,EAAE,CAAC,CAChC,EAA4C,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,CAAC,CAA5D,MAA+D,kBAjB1C,IAAiD"}