{"version":3,"file":"Ajustes.D8tUCF9H.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/775rQVeunCQ3Lp81IQVa/DqEedO2enlYl4BlO7D06/Ajustes.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";// Ajustes do site-síntese.\n// Esconde o elemento na página de contato (ex.: \"Converse agora com a Vitá\" no rodapé)\nexport function withOcultarNoContato(Component){return props=>{const[contato,setContato]=useState(false);useEffect(()=>{const ver=()=>setContato(/^\\/contato\\/?$/.test(window.location.pathname));ver();window.addEventListener(\"popstate\",ver);const t=setInterval(ver,800);return()=>{window.removeEventListener(\"popstate\",ver);clearInterval(t);};},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,display:contato?\"none\":props.style?.display}});};}// Fotos das listagens: levemente dessaturadas e quentes; no hover voltam à cor original,\n// com uma aproximação quase imperceptível.\nexport function withFotoHover(Component){return props=>{const[sobre,setSobre]=useState(false);return /*#__PURE__*/_jsx(Component,{...props,// descrição da foto para leitores de tela e busca: o nome do projeto do cartão\nonLoadCapture:e=>{const im=e.target;if(im?.tagName!==\"IMG\"||im.alt)return;const cartao=im.closest('[data-framer-name=\"Projeto\"]');const nome=cartao?.querySelector(\"p\")?.textContent?.trim();if(nome)im.alt=nome;},onMouseEnter:e=>{setSobre(true);props.onMouseEnter?.(e);},onMouseLeave:e=>{setSobre(false);props.onMouseLeave?.(e);},style:{...props.style,filter:sobre?\"saturate(1) sepia(0)\":\"saturate(0.78) sepia(0.08)\",transform:sobre?\"scale(1.015)\":\"scale(1)\",transition:\"filter 0.8s ease, transform 1.2s ease\"}});};}// Na Home (a página que tem a sequência \"frentes\"), o elemento só aparece depois de rolar a abertura.\nexport function withSurgirNaHome(Component){return props=>{const[ver,setVer]=useState(true);useEffect(()=>{let raf=0;const checar=()=>{const home=!!document.getElementById(\"frentes\");setVer(!home||window.scrollY>window.innerHeight*.5);};const agendar=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(checar);};checar();const t=setTimeout(checar,300);window.addEventListener(\"scroll\",agendar,{passive:true});window.addEventListener(\"resize\",agendar);return()=>{window.removeEventListener(\"scroll\",agendar);window.removeEventListener(\"resize\",agendar);cancelAnimationFrame(raf);clearTimeout(t);};},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:ver?1:0,pointerEvents:ver?\"auto\":\"none\",transition:\"opacity 0.6s ease\"}});};}// Some suavemente conforme a página rola para baixo e volta ao rolar para cima (título da abertura do projeto).\nexport function withSumirAoRolar(Component){return props=>{const[p,setP]=useState(0);useEffect(()=>{let raf=0;const calc=()=>setP(Math.min(1,Math.max(0,window.scrollY/(window.innerHeight*.35))));const ag=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(calc);};calc();window.addEventListener(\"scroll\",ag,{passive:true});return()=>{window.removeEventListener(\"scroll\",ag);cancelAnimationFrame(raf);};},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:1-p,transform:`translateY(${-p*16}px)`,willChange:\"opacity, transform\"}});};}// Escurece gradualmente (azul Vitá) conforme a Home sai da abertura e entra no manifesto.\nexport function withEscurecerAoRolar(Component){return props=>{const[o,setO]=useState(0);useEffect(()=>{let raf=0;const calc=()=>setO(Math.min(1,Math.max(0,window.scrollY/window.innerHeight))*.45);const ag=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(calc);};calc();window.addEventListener(\"scroll\",ag,{passive:true});return()=>{window.removeEventListener(\"scroll\",ag);cancelAnimationFrame(raf);};},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:o}});};}// Sequência dos pilares (seção com id \"pilares\"): cada coluna entra da esquerda para a direita com a rolagem.\nfunction usePilares(){const[p,setP]=useState(0);useEffect(()=>{let raf=0;const calc=()=>{const el=document.getElementById(\"pilares\");if(!el)return setP(1);const r=el.getBoundingClientRect();const total=r.height-window.innerHeight;setP(total>0?Math.min(1,Math.max(0,-r.top/total)):1);};const ag=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(calc);};calc();window.addEventListener(\"scroll\",ag,{passive:true});window.addEventListener(\"resize\",ag);return()=>{window.removeEventListener(\"scroll\",ag);window.removeEventListener(\"resize\",ag);cancelAnimationFrame(raf);};},[]);return p;}const pilar=inicio=>Component=>props=>{const p=usePilares();const v=Math.min(1,Math.max(0,(p-inicio)/.18));const e=v*v*(3-2*v);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:e,transform:`translateX(${(1-e)*-28}px)`,transition:\"opacity 0.2s linear\"}});};export function withPilar1(C){return pilar(.05)(C);}export function withPilar2(C){return pilar(.12)(C);}export function withPilar3(C){return pilar(.42)(C);}// Cor do cabeçalho conforme o fundo: \"á\" e menu brancos o tempo todo; azul Vitá só quando o que está\n// atrás deles é um fundo claro (osso). Lê a pilha de elementos no ponto de cada ícone:\n// foto/vídeo/imagem de fundo → branco; cor sólida (opacidade ≥ 50%) → pela luminância.\n// Camadas translúcidas (véus, escurecimentos < 50%) são atravessadas.\nconst BRANCO=\"#FFFFFF\";const AZUL_VITA=\"#1D2128\";function fundoClaro(x,y){const cab=document.querySelector('[data-framer-name=\"Cabe\\xe7alho\"]');const pilha=document.elementsFromPoint(x,y);for(const el of pilha){if(cab&&cab.contains(el))continue;const tag=el.tagName;if(tag===\"IMG\"||tag===\"VIDEO\"||tag===\"CANVAS\"||tag===\"PICTURE\"||tag===\"IFRAME\")return false;const cs=getComputedStyle(el);if(cs.backgroundImage&&cs.backgroundImage.includes(\"url(\"))return false;const m=cs.backgroundColor.match(/rgba?\\(([^)]+)\\)/);if(!m)continue;const[r,g,b,a=1]=m[1].split(/[\\s,\\/]+/).filter(Boolean).map(Number);if(a*Number(cs.opacity||1)<.5)continue;return(.2126*r+.7152*g+.0722*b)/255>.6;}return false;}function useCorDoFundo(nome,lado){const[claro,setClaro]=useState(false);useEffect(()=>{let raf=0;const checar=()=>{const el=document.querySelector(`[data-framer-name=\"Cabe\\xe7alho\"] [data-framer-name=\"${nome}\"]`);const r=el?.getBoundingClientRect();const x=r&&r.width?r.left+r.width/2:lado===\"esquerda\"?57:window.innerWidth-57;const y=r&&r.height?r.top+r.height/2:44;setClaro(fundoClaro(x,Math.max(1,y)));};const agendar=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(checar);};checar();const t=setInterval(checar,500)// troca de página, slideshow, véus que mudam sem rolagem\n;window.addEventListener(\"scroll\",agendar,{passive:true});window.addEventListener(\"resize\",agendar);return()=>{clearInterval(t);window.removeEventListener(\"scroll\",agendar);window.removeEventListener(\"resize\",agendar);cancelAnimationFrame(raf);};},[nome,lado]);return claro?AZUL_VITA:BRANCO;}// Estado do cabeçalho: estamos na Home? o rodapé (tela cheia) cobre o topo da tela?\nfunction useCabecalho(){const[home,setHome]=useState(true);const[rodape,setRodape]=useState(false);useEffect(()=>{let raf=0;const ver=()=>{const p=window.location.pathname;setHome(p===\"/\"||p===\"\"||!!document.querySelector('[data-framer-name=\"Home Vit\\xe1\"]'));const f=document.querySelector(\"footer\");const topo=f?f.getBoundingClientRect().top:Infinity;setRodape(document.documentElement.dataset.vitaRodape===\"1\"||topo<=90);};const ag=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(ver);};ver();window.addEventListener(\"popstate\",ver);window.addEventListener(\"scroll\",ag,{passive:true});const t=setInterval(ver,120);return()=>{window.removeEventListener(\"popstate\",ver);window.removeEventListener(\"scroll\",ag);clearInterval(t);cancelAnimationFrame(raf);};},[]);return{home,rodape};}const sumir=fora=>({opacity:fora?0:1,pointerEvents:fora?\"none\":\"auto\",transition:\"opacity 0.5s ease\"});// \"á\" do cabeçalho: nunca aparece na Home; some quando o rodapé cobre a tela; nas outras páginas muda de cor conforme o fundo\nexport function withSimboloCabecalho(Component){return props=>{const cor=useCorDoFundo(\"S\\xedmbolo\",\"esquerda\");const{home,rodape}=useCabecalho();const fora=home||rodape;return /*#__PURE__*/_jsx(Component,{...props,cor:cor,style:{...props.style,...sumir(fora),transition:fora&&home?\"none\":\"opacity 0.5s ease\"}});};}// Botão do menu: muda de cor conforme o fundo; some quando o rodapé cobre a tela\nexport function withMenuCabecalho(Component){return props=>{const cor=useCorDoFundo(\"Menu\",\"direita\");const{rodape}=useCabecalho();return /*#__PURE__*/_jsx(Component,{...props,cor:cor,style:{...props.style,...sumir(rodape)}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSumirAoRolar\":{\"type\":\"reactHoc\",\"name\":\"withSumirAoRolar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPilar3\":{\"type\":\"reactHoc\",\"name\":\"withPilar3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEscurecerAoRolar\":{\"type\":\"reactHoc\",\"name\":\"withEscurecerAoRolar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPilar1\":{\"type\":\"reactHoc\",\"name\":\"withPilar1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSimboloCabecalho\":{\"type\":\"reactHoc\",\"name\":\"withSimboloCabecalho\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMenuCabecalho\":{\"type\":\"reactHoc\",\"name\":\"withMenuCabecalho\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOcultarNoContato\":{\"type\":\"reactHoc\",\"name\":\"withOcultarNoContato\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSurgirNaHome\":{\"type\":\"reactHoc\",\"name\":\"withSurgirNaHome\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPilar2\":{\"type\":\"reactHoc\",\"name\":\"withPilar2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFotoHover\":{\"type\":\"reactHoc\",\"name\":\"withFotoHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Ajustes.map"],"mappings":"uIAIA,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,EAAK,EAAE,OAAoB,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