1function _(o){const d=o.querySelector("[data-department-landing]"),c=o.querySelectorAll("[data-department-pill]"),r=o.querySelector("[data-department-preview]"),g=r==null?void 0:r.querySelector("[data-preview-name]"),y=r==null?void 0:r.querySelector("[data-preview-description]"),S=r==null?void 0:r.querySelector(".departmentPreview__bg"),h=o.querySelector("[data-department-ambient]"),m=o.querySelector(".departmentLanding__pillList"),L=o.querySelector(".departmentLanding__inner"),q=o.querySelector(".departmentLanding__intro"),l=o.querySelector(".departmentLanding__opening");if(!d)return;requestAnimationFrame(()=>{requestAnimationFrame(()=>{d.classList.add("departmentLanding--loaded")})});const s=Array.from(o.querySelectorAll(".departmentPill__name")),w=window.matchMedia("(min-width: 1024px)");function v(i){const e=getComputedStyle(i);let n=parseFloat(e.lineHeight);return Number.isNaN(n)&&(n=parseFloat(e.fontSize)*1.2),i.scrollHeight>n*2+1}function u(){if(!s.length||(s.forEach(a=>{a.style.fontSize=""}),w.matches))return;const i=parseFloat(getComputedStyle(s[0]).fontSize)||32,e=12;let n=i;s.forEach(a=>{let t=i;for(a.style.fontSize=t+"px";t>e&&v(a);)t-=1,a.style.fontSize=t+"px";t<n&&(n=t)}),s.forEach(a=>{a.style.fontSize=n+"px"})}const F=24;function p(){if(!q||!l||(l.style.fontSize="",!w.matches))return;const i=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--header-height"))||0,e=L?getComputedStyle(L):null,n=e?parseFloat(e.paddingTop)+parseFloat(e.paddingBottom):0,a=Math.max(600,window.innerHeight-i)-n;let t=parseFloat(getComputedStyle(l).fontSize)||40;for(;t>F&&q.scrollHeight>a;)t-=1,l.style.fontSize=t+"px"}u(),p(),document.fonts&&document.fonts.ready&&document.fonts.ready.then(()=>{u(),p()});let f=null;const z=()=>{f&&cancelAnimationFrame(f),f=requestAnimationFrame(()=>{u(),p()})};if(window.addEventListener("resize",z),c.length&&r){const i=e=>{const n=e.dataset.name||"",a=e.dataset.description||"",t=e.dataset.bgImage||"";g&&(g.textContent=n),y&&y.replaceChildren(document.createRange().createContextualFragment(a)),S&&(S.style.backgroundImage=t?`url('${t}')`:""),h&&(h.style.backgroundImage=t?`url('${t}')`:"")};c.forEach(e=>{e.addEventListener("mouseenter",()=>{d.classList.add("departmentLanding--active"),c.forEach(n=>{n.classList.toggle("departmentPill--dimmed",n!==e)}),i(e)})}),m==null||m.addEventListener("mouseleave",()=>{d.classList.remove("departmentLanding--active"),c.forEach(e=>e.classList.remove("departmentPill--dimmed"))})}return function(){window.removeEventListener("resize",z)}}export{_ as default};
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.