PageSourceSearch

https://www.asla.org/js/index.CUh8_ENA.js

js asla.org collected 2026-09-24 08:38:43 UTC 1,784 bytes, 1 lines download raw bytes

1function p(l=document){l.querySelectorAll("[data-accordion]").forEach(u=>{const t=Array.from(u.querySelectorAll("[data-accordion-item]"));t.forEach(a=>{const c=a.querySelector("[data-accordion-trigger]"),r=a.querySelector("[data-accordion-panel]"),g=a.querySelector("[data-accordion-icon]");function i(e){c.setAttribute("aria-expanded",e),a.dataset.open=String(e),r.style.maxHeight=e?r.scrollHeight+"px":"0",g.textContent=e?"−":"+",r.dispatchEvent(new CustomEvent("accordion:stateChanged",{bubbles:!0,detail:{expanded:e,panel:r,item:a}}))}function s(){t.forEach(e=>{if(e!==a){const n=e.querySelector("[data-accordion-trigger]"),o=e.querySelector("[data-accordion-panel]"),f=e.querySelector("[data-accordion-icon]");n.setAttribute("aria-expanded","false"),e.dataset.open="false",o.style.maxHeight="0",f.textContent="+",o.dispatchEvent(new CustomEvent("accordion:stateChanged",{bubbles:!0,detail:{expanded:!1,panel:o,item:e}}))}})}const d=a.dataset.open==="true";i(d),d&&setTimeout(()=>{r.style.maxHeight=r.scrollHeight+"px"},0),c.addEventListener("click",()=>{const e=c.getAttribute("aria-expanded")==="true";e||s(),i(!e)}),c.addEventListener("keydown",e=>{const n=t.indexOf(a);switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),t[(n+1)%t.length].querySelector("[data-accordion-trigger]").focus();break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),t[(n-1+t.length)%t.length].querySelector("[data-accordion-trigger]").focus();break;case"Home":e.preventDefault(),t[0].querySelector("[data-accordion-trigger]").focus();break;case"End":e.preventDefault(),t[t.length-1].querySelector("[data-accordion-trigger]").focus();break;case"Enter":case" ":e.preventDefault();const o=c.getAttribute("aria-expanded")==="true";o||s(),i(!o);break}})})})}export{p as initAccordions};

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.