(() => { const supported = new Set(["pulse", "jello", "bounceInDown", "swing", "tada"]); const reveal = (element) => { let settings = {}; try { settings = JSON.parse(element.dataset.settings || "{}"); } catch (_error) { return; } const animation = settings._animation; if (!supported.has(animation)) { return; } element.classList.remove("elementor-invisible"); element.classList.add("hdm-animation-fallback", `hdm-${animation}`); }; window.addEventListener("load", () => { const pending = [...document.querySelectorAll(".elementor-invisible[data-settings]")]; if (!pending.length) { return; } if (!("IntersectionObserver" in window)) { pending.forEach(reveal); return; } const observer = new IntersectionObserver((entries) => { for (const entry of entries) { if (entry.isIntersecting) { reveal(entry.target); observer.unobserve(entry.target); } } }, { rootMargin: "0px 0px -8%", threshold: 0.05 }); pending.forEach((element) => observer.observe(element)); }); })();