/*! Source: /themes/default/assets/js/base.js */ ; function loadScripts(n){n.forEach(n=>{var i=+new Date;const t=document.createElement("script");t.src=n;t.async=!0;t.onload=()=>{var t=+new Date,r=t-i;console.log(`${n} levou ${r}ms para ser carregado`)};document.head.appendChild(t)})}console.log("iBahia • 2024 - Mundiware");window.menuAsideContainer??=document.querySelector(".ib-menuAside");const lightbox=document.getElementById("lightbox"),lightboxHolder=document.getElementById("lightbox-image"),searchInputs=document.querySelectorAll(".ib-searchInput"),searchImgs=document.querySelectorAll(".ib-searchImg");window.addEventListener("load",()=>{typeof noAds=="undefined"&&typeof noOutbrain=="undefined"&&window.location.href.indexOf("")&&(window.location.href.indexOf("3051124")!=-1||window.location.href.indexOf("colunistas/educacao-xualse")!=-1)&&loadScripts(["https://widgets.outbrain.com/outbrain.js"])});window.toggleAsideMenu??=()=>{const n=document.getElementsByTagName("body")[0],t=menuAsideContainer?.classList?.contains("active");menuAsideContainer?.classList?.toggle("active");n.style.overflow=t?"auto":"hidden"};const openLightbox=n=>{lightbox&&(()=>{lightboxHolder.src=n.src,lightbox.classList.remove("hidden"),document.querySelector("body").style.overflowY="hidden"})()},closeLightbox=()=>{lightbox&&(()=>{lightbox.classList.add("hidden"),document.querySelector("body").style.overflowY="scroll"})()},closeAllModals=()=>document.querySelectorAll(".ib-modal").forEach(n=>n&&(()=>{n.classList.add("hidden"),document.querySelector("body").classList.remove("stopScroll")})());document.querySelectorAll(".ib-modal").forEach(n=>()=>{n.addEventListener("click",t=>{t.target===n.querySelector(".content")&&n.classList.toggle("hidden")})});var lastScrollTop=window.scrollY||document.documentElement.scrollTop;window.addEventListener("scroll",function(){var n=window.scrollY||document.documentElement.scrollTop;const t=document.querySelector(".ib-scroll-header");t&&(n<169?t.classList.remove("visible"):t.classList.add("visible"));lastScrollTop=n<=0?0:n},!1)