1import{h as l}from"./hash-set-CXYJz-Gf.js";const f=new Map;function d(t,e){t.trigger.classList.toggle("is-open",e),t.trigger.setAttribute("aria-expanded",e?"true":"false"),t.icon&&t.icon.classList.toggle("is-open",e),t.panel.classList.toggle("is-open",e),t.panel.inert=!e}function h(t,e){for(const n of t.items)n!==e&&n.trigger.getAttribute("aria-expanded")==="true"&&(d(n,!1),l.remove(n.id));d(e,!0),l.add(e.id)}function g(t,e){e.trigger.getAttribute("aria-expanded")==="true"?(d(e,!1),l.remove(e.id)):h(t,e)}function y(t){const e=new Set(l.parse());let n=null;for(const o of t.items){const s=e.has(o.id)&&n===null;d(o,s),s&&(n=o)}return n}function k(t,e){if(f.has(t))return;const n=e&&typeof e=="object"?e:{},o=[];for(const i of Array.from(t.querySelectorAll(".accordion-item"))){const r=i.querySelector(".accortion-title"),c=i.querySelector(".accordion-content");if(!r||!c)continue;const a=r.getAttribute("aria-controls")||c.id||"";a&&o.push({trigger:r,icon:r.querySelector(".accordion-toggle-icon"),panel:c,id:a})}if(o.length===0)return;const s={root:t,items:o,unsubscribeHash:null,listeners:[]};for(const i of o){const r=()=>g(s,i),c=a=>{const u=a;(u.key==="Enter"||u.key===" "||u.key==="Spacebar")&&(u.preventDefault(),g(s,i))};i.trigger.addEventListener("click",r),i.trigger.addEventListener("keydown",c),s.listeners.push({el:i.trigger,type:"click",fn:r}),s.listeners.push({el:i.trigger,type:"keydown",fn:c})}const p=y(s);s.unsubscribeHash=l.subscribe(()=>y(s)),n.scrollOnDeepLink===!0&&p&&window.setTimeout(()=>p.panel.scrollIntoView({block:"start"}),100),f.set(t,s)}function m(){for(const[t,e]of f){for(const{el:n,type:o,fn:s}of e.listeners)n.removeEventListener(o,s);e.unsubscribeHash?.(),f.delete(t)}}export{m as destroy,k as initialize};
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.