1(function(){'use strict';var reduceMotion=window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches;function onReady(fn){if(document.readyState!=='loading')fn();else document.addEventListener('DOMContentLoaded',fn);} 2function initMobileMenu(){var btn=document.getElementById('mobileMenuBtn');var nav=document.getElementById('mainNav');if(!btn||!nav)return;btn.addEventListener('click',function(){var isOpen=nav.classList.toggle('open');btn.setAttribute('aria-expanded',isOpen?'true':'false');});document.addEventListener('click',function(e){if(!btn.contains(e.target)&&!nav.contains(e.target)){nav.classList.remove('open');btn.setAttribute('aria-expanded','false');}});} 3function initHeaderScroll(){var header=document.querySelector('.site-header');if(!header)return;var hero=document.querySelector('.template-homepage .hero-slider');if(hero&&!hero.querySelector('.slide'))hero=null;var inner=header.querySelector('.header-inner');var headerH=header.offsetHeight||84;var condensedH=headerH;var heroH=hero?hero.offsetHeight:0;var CONDENSE_AT=64;var hysteresis=36;var ticking=false;function update(){var y=window.scrollY;header.classList.toggle('scrolled',y>10);var on,off;if(hero){on=heroH-headerH;
3off=on-hysteresis;}else{on=CONDENSE_AT;off=1;} 4if(header.classList.contains('condensed')){if(y<off)header.classList.remove('condensed');}else if(y>on){header.classList.add('condensed');} 5ticking=false;} 6function remeasure(){var prev=inner?inner.style.transition:'';var wasCondensed=header.classList.contains('condensed');if(inner)inner.style.transition='none';header.classList.remove('condensed');headerH=header.offsetHeight||84;header.classList.add('condensed');condensedH=header.offsetHeight||headerH;header.classList.toggle('condensed',wasCondensed);if(inner){void inner.offsetHeight;inner.style.transition=prev;} 7hysteresis=Math.max(24,(headerH-condensedH)*2);heroH=hero?hero.offsetHeight:0;update();} 8window.addEventListener('scroll',function(){if(!ticking){window.requestAnimationFrame(update);ticking=true;}},{passive:true});window.addEventListener('resize',remeasure);remeasure();} 9function initNavDropdowns(){var dropdowns=document.querySelectorAll('.nav-dropdown');dropdowns.forEach(function(dd){var menu=dd.querySelector('.nav-dropdown-menu');if(!menu)return;var closeTimer=null;function open(){clearTimeout(closeTimer);menu.classList.add('is-open');} 10function scheduleClose(){closeTimer=setTimeout(function(){menu.classList.remove('is-open');},120);} 11dd.addEventListener('mouseenter',open);dd.addEventListener('mouseleave',scheduleClose);menu.addEventListener('mouseenter',open);menu.addEventListener('mouseleave',scheduleClose);dd.addEventListener('keydown',function(e){if(e.key==='Escape')menu.classList.remove('is-open');});});document.addEventListener('click',function(e){if(!e.target.closest('.nav-dropdown')){document.querySelectorAll('.nav-dropdown-menu.is-open').forEach(function(m){m.classList.remove('is-open');});}});} 12function initBackToTop(){var btn=document.createElement('button');btn.type='button';btn.className='back-to-top';btn.setAttribute('aria-label','Back to top');btn.innerHTML='⇧';document.body.appendChild(btn);var ticking=false;function update(){btn.classList.toggle('is-visible',window.scrollY>400);ticking=false;} 13window.addEventListener('scroll',function(){if(!ticking){window.requestAnimationFrame(update);ticking=true;}},{passive:true});btn.addEventListener('click',function(){window.scrollTo({top:0,behavior:reduceMotion?'auto':'smooth'});});} 14onReady(function(){initMobileMenu();initHeaderScroll();initNavDropdowns();initBackToTop();});})();
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.