!function(){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});const e=e=>{e.classList.add("hidden")},t=function(e,t,n,o){if(!e)throw new Error("Dom needs an el to attach event to");if(!t)throw new Error("Dom needs an event to listen for");if(!n||"function"!=typeof n)throw new Error("Dom needs a valid callback");e.addEventListener(t,n,o||!1)},n=document.getElementById("nav-bar"),o=document.getElementById("livenow-banner"),s=t=>{t&&(t.style.maxHeight=t.scrollHeight+"px",t.classList.add("open"),t.classList.remove("closed"),gtag("event","click",{event_category:"ImmersiveOpened",event_label:t.classList[0]})),n&&e(n),o&&e(o)};let l=window.scrollY,a=!1;setInterval((function(){a&&(r(),a=!1)}),250);const r=()=>{if(window.scrollY{a=!0})),t(window,"resize",(()=>{document.querySelectorAll(".immersive.open").forEach((e=>{e.style.maxHeight=e.scrollHeight+"px"}))})),d=()=>{const e=e=>{s(document.getElementById(e.substr(1)))};window.location.hash&&e(window.location.hash),window.addEventListener("hashchange",(t=>{e(window.location.hash)})),document.querySelectorAll(".intro").forEach((e=>{e.addEventListener("click",(t=>{s(e.parentElement)}),!0)}))},"loading"!=document.readyState?d():document.addEventListener("DOMContentLoaded",d)}();