PageSourceSearch

https://thehuddle.nl/modules/Pages/js/navigation.js?v=1790759184809

js thehuddle.nl collected 2026-10-01 10:30:35 UTC 6,381 bytes, 1 lines download raw bytes

1const _=(o=null)=>{q(o),B()},q=(o=null)=>{o||(o=document.getElementById("element-navigation-md__bar__toggle"),o&&o.addEventListener("click",L,!1)),setTimeout(()=>{const n=document.querySelector(".element-navigation-md");if(!n)return;w(),document.querySelectorAll(".element-navigation__item-mobile").forEach(A),n.addEventListener("click",i=>{const e=i.target.closest("a[href]");if(!e)return;const s=e.getAttribute("href");s&&s.startsWith("#")&&P()},!1)},1e3)},B=()=>{const o=document.querySelectorAll(".dropdown-menu, .popover-menu"),n=new WeakMap,l=[],i=(e,s)=>{e.querySelector(".element-menu__item")?.setAttribute("aria-expanded",s?"true":"false")};o.forEach(e=>{const s=e.closest(".element-menu-item");if(!s)return;const c=s.closest(".block-navigation"),d=s.querySelector(".element-menu__item"),E=e.classList.contains("popover-menu");c&&e.parentElement!==c&&c.appendChild(e),l.push({dropdown:e,menuItem:s});let f=null,m=null,g=!1,v=!1;const k=()=>{if(!E||!c)return;const t=c.getBoundingClientRect(),r=s.getBoundingClientRect(),a=e;a.style.top=`${r.bottom-t.top}px`,a.style.right=`${Math.max(0,t.right-r.right)}px`,a.style.left="auto",a.style.setProperty("--dropdown-menu-offset","0px")},x=()=>{if(E||!c)return;const t=e,r=t.getBoundingClientRect(),a=s.getBoundingClientRect();t.style.setProperty("--dropdown-bridge-left",`${a.left-r.left}px`),t.style.setProperty("--dropdown-bridge-width",`${a.width}px`);const p=c.getBoundingClientRect();t.style.setProperty("--dropdown-menu-offset",`${Math.max(0,p.bottom-a.bottom)}px`)},y=t=>{l.forEach(({menuItem:r,dropdown:a})=>{a!==e&&(a.classList.remove("dropdown-open"),r.classList.remove("dropdown-open"),i(r,!1))}),k(),x(),e.classList.add("dropdown-open"),s.classList.add("dropdown-open"),i(s,!0),f=t,m=t==="hover"?Date.now():null,n.set(e,!0),setTimeout(()=>n.set(e,!1),100)},u=()=>{e.classList.remove("dropdown-open"),s.classList.remove("dropdown-open"),i(s,!1),f=null,m=null},M=t=>{if(t.preventDefault(),t.stopPropagation(),e.classList.contains("dropdown-open")){if(n.get(e))return;if(f==="hover"&&m&&Date.now()-m<500){f="click",m=null;return}u()}else y("click")},D=window.matchMedia("(hover: hover)").matches;if(d&&D){const t=()=>{setTimeout(()=>{!g&&!v&&f==="hover"&&u()},100)};s.addEventListener("mouseenter",()=>{g=!0,(!f||!e.classList.contains("dropdown-open"))&&y("hover")}),s.addEventListener("mouseleave",()=>{g=!1,t()}),e.addEventListener("mouseenter",()=>{v=!0}),e.addEventListener("mouseleave",()=>{v=!1,t()})}const S='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',h=t=>[...t.querySelectorAll(S)].filter(r=>r.offsetParent!==null),C=()=>{const t=h(document).filter(a=>!a.closest(".dropdown-menu, .popover-menu")),r=t.indexOf(d);t[r+1]?.focus()};d&&d.addEventListener("click",M,!1),s.addEventListener("keydown",t=>{const r=t.target,a=r===s||r===d;if(a&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e.classList.contains("dropdown-open")?u():y("click")),a&&t.key==="Tab"&&e.classList.contains("dropdown-open"))if(t.shiftKey)u();else{const p=h(e)[0];p&&(t.preventDefault(),p.focus())}t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),u(),d?.focus())},!1),e.addEventListener("keydown",t=>{if(t.key==="Tab"){const r=h(e),a=r.indexOf(document.activeElement);t.shiftKey&&a===0?(t.preventDefault(),d?.focus()):!t.shiftKey&&a===r.length-1&&(t.preventDefault(),u(),C())}t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),u(),d?.focus())},!1)}),document.addEventListener("click",e=>{const s=e.target;l.forEach(({dropdown:c,menuItem:d})=>{c.classList.contains("dropdown-open")&&(n.get(c)||c.contains(s)||d.contains(s)||(c.classList.remove("dropdown-open"),d.classList.remove("dropdown-open"),i(d,!1)))})},!1)};function P(){const o=document.getElementById("element-navigation-md"),n=document.querySelector(".element-navigation-md");o&&o.tagName.toLowerCase()==="div"&&(o.classList.add("hidden"),o.classList.remove("flex")),n&&n.tagName.toLowerCase()==="nav"&&(n.dataset.open="false"),document.documentElement.style.overflow="",b(!1)}function L(){O()?(document.documentElement.style.overflow="hidden",b(!0)):(document.documentElement.style.overflow="",b(!1))}function O(){w();const o=document.getElementById("element-navigation-md"),n=document.querySelector(".element-navigation-md");if(o&&o.tagName.toLowerCase()==="div"){const l=o.classList.contains("hidden");return o.classList.toggle("hidden"),o.classList.toggle("flex"),l}if(n&&n.tagName.toLowerCase()==="nav"){const l=n.dataset.open==="false";return n.dataset.open=l?"true":"false",l}}const A=o=>{if(o.dataset.vueAccordion==="true")return;const n=o.querySelector(".element-navigation__item-mobile__wrapper"),l=o.querySelector(".item-dropdown");
1if(!n||!l)return;o.dataset.dropdownOpen="false",n.setAttribute("aria-expanded","false");const i=()=>{const e=o.dataset.dropdownOpen==="false";o.dataset.dropdownOpen=e?"true":"false",n.setAttribute("aria-expanded",e?"true":"false"),l.style.maxHeight=e?`${l.scrollHeight}px`:"0px"};n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),i()},!1),n.addEventListener("keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),i())},!1)},w=()=>{if(!document.querySelector(".element-navigation-md"))return;const n=document.querySelector(".menu-dropdown"),l=document.querySelector(".element-navigation__md");if(n&&l){const i=n.classList.contains("hidden");i&&(n.classList.remove("hidden"),n.style.visibility="hidden",n.style.pointerEvents="none",n.offsetHeight);const e=n.getBoundingClientRect().top;i&&(n.classList.add("hidden"),n.style.visibility="",n.style.pointerEvents=""),n.style.maxHeight=`calc(100dvh - ${e}px)`}};function b(o){const n=document.querySelector(".element-navigation-md");if(!n)return;const l=n.getBoundingClientRect().bottom;let i=n.querySelector(".mobile-navigation-backdrop");if(o&&!i){const e=document.createElement("div");e.classList.add("mobile-navigation-backdrop","hidden","max-md:flex"),e.style.zIndex="9",e.style.position="fixed",e.style.bottom="0",e.style.left="0",e.style.width="100%",e.style.height=`calc(100dvh - ${l}px)`,e.style.backgroundColor="rgba(0, 0, 0, 0.5)",e.style.backdropFilter="blur(5px)",n.appendChild(e),i=e,i.addEventListener("click",L)}else!o&&i&&(i.remove(),i.removeEventListener("click",L))}typeof window<"u"&&_();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.