const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/ui-core.DnQi6Uae.js","_astro/preload-helper.BiBI96sQ.js"])))=>i.map(i=>d[i]); import{_ as b}from"./preload-helper.BiBI96sQ.js";class L extends HTMLElement{constructor(){super();const e=this.querySelector("select");e&&e.addEventListener("change",r=>{r.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=r.currentTarget.value)})}}customElements.define("starlight-lang-select",L);class T extends HTMLElement{constructor(){super();const e=this.querySelector("button[data-open-modal]"),r=this.querySelector("button[data-close-modal]"),o=this.querySelector("dialog"),u=this.querySelector(".dialog-frame"),a=t=>{("href"in(t.target||{})||document.body.contains(t.target)&&!u.contains(t.target))&&h()},i=t=>{o.showModal(),document.body.toggleAttribute("data-search-modal-open",!0),this.querySelector("input")?.focus(),t?.stopPropagation(),window.addEventListener("click",a)},h=()=>o.close();e.addEventListener("click",i),e.disabled=!1,r.addEventListener("click",h),o.addEventListener("close",()=>{document.body.toggleAttribute("data-search-modal-open",!1),window.removeEventListener("click",a)}),window.addEventListener("keydown",t=>{const l=document.activeElement instanceof HTMLElement&&(["input","select","textarea"].includes(document.activeElement.tagName.toLowerCase())||document.activeElement.isContentEditable);(t.metaKey===!0||t.ctrlKey===!0)&&t.key==="k"?(o.open?h():i(),t.preventDefault()):t.key==="/"&&!o.open&&!l&&(i(),t.preventDefault())});let g={};try{g=JSON.parse(this.dataset.translations||"{}")}catch{}const c=this.dataset.stripTrailingSlash!==void 0?t=>t.replace(/(.)\/(#.*)?$/,"$1$2"):t=>t;window.addEventListener("DOMContentLoaded",()=>{(window.requestIdleCallback||(l=>setTimeout(l,1)))(async()=>{const{PagefindUI:l}=await b(async()=>{const{PagefindUI:d}=await import("./ui-core.DnQi6Uae.js");return{PagefindUI:d}},__vite__mapDeps([0,1]));new l({element:"#starlight__search",baseUrl:"/",bundlePath:"/".replace(/\/$/,"")+"/pagefind/",showImages:!1,translations:g,showSubResults:!0,processResult:d=>{d.url=c(d.url),d.sub_results=d.sub_results.map(m=>(m.url=c(m.url),m))}})})})}}customElements.define("site-search",T);const E="starlight-theme",S=s=>s==="auto"||s==="dark"||s==="light"?s:"auto",y=()=>S(typeof localStorage<"u"&&localStorage.getItem(E));function w(s){typeof localStorage<"u"&&localStorage.setItem(E,s==="light"||s==="dark"?s:"")}const k=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";function p(s){StarlightThemeProvider.updatePickers(s),document.documentElement.dataset.theme=s==="auto"?k():s,w(s)}matchMedia("(prefers-color-scheme: light)").addEventListener("change",()=>{y()==="auto"&&p("auto")});class x extends HTMLElement{constructor(){super(),p(y()),this.querySelector("select")?.addEventListener("change",e=>{e.currentTarget instanceof HTMLSelectElement&&p(S(e.currentTarget.value))})}}customElements.define("starlight-theme-select",x);class H extends HTMLElement{constructor(){super(),this.btn=this.querySelector("button"),this.btn.addEventListener("click",()=>this.toggleExpanded());const e=this.closest("nav");e&&e.addEventListener("keyup",r=>this.closeOnEscape(r))}setExpanded(e){this.setAttribute("aria-expanded",String(e)),document.body.toggleAttribute("data-mobile-menu-expanded",e)}toggleExpanded(){this.setExpanded(this.getAttribute("aria-expanded")!=="true")}closeOnEscape(e){e.code==="Escape"&&(this.setExpanded(!1),this.btn.focus())}}customElements.define("starlight-menu-button",H);const I="_top";class v extends HTMLElement{constructor(){super(),this._current=this.querySelector('a[aria-current="true"]'),this.minH=parseInt(this.dataset.minH||"2",10),this.maxH=parseInt(this.dataset.maxH||"3",10);const e=[...this.querySelectorAll("a")],r=n=>{if(n instanceof HTMLHeadingElement){if(n.id===I)return!0;const c=n.tagName[1];if(c){const t=parseInt(c,10);if(t>=this.minH&&t<=this.maxH)return!0}}return!1},o=n=>{if(!n)return null;const c=n;for(;n;){if(r(n))return n;for(n=n.previousElementSibling;n?.lastElementChild;)n=n.lastElementChild;const t=o(n);if(t)return t}return o(c.parentElement)},u=n=>{for(const{isIntersecting:c,target:t}of n){if(!c)continue;const l=o(t);if(!l)continue;const d=e.find(m=>m.hash==="#"+encodeURIComponent(l.id));if(d){this.current=d;break}}},a=document.querySelectorAll("main [id], main [id] ~ *, main .content > *");let i;const h=()=>{i&&i.disconnect(),i=new IntersectionObserver(u,{rootMargin:this.getRootMargin()}),a.forEach(n=>i.observe(n))};h();const g=window.requestIdleCallback||(n=>setTimeout(n,1));let f;window.addEventListener("resize",()=>{i&&i.disconnect(),clearTimeout(f),f=setTimeout(()=>g(h),200)})}set current(e){e!==this._current&&(this._current&&this._current.removeAttribute("aria-current"),e.setAttribute("aria-current","true"),this._current=e)}getRootMargin(){const e=document.querySelector("header")?.getBoundingClientRect().height||0,r=this.querySelector("summary")?.getBoundingClientRect().height||0,o=e+r+32,u=o+53,a=document.documentElement.clientHeight;return`-${o}px 0% ${u-a}px`}}customElements.define("starlight-toc",v);class M extends v{set current(e){super.current=e;const r=this.querySelector(".display-current");r&&(r.textContent=e.textContent)}constructor(){super();const e=this.querySelector("details");if(!e)return;const r=()=>{e.open=!1};e.querySelectorAll("a").forEach(o=>{o.addEventListener("click",r)}),window.addEventListener("click",o=>{e.contains(o.target)||r()}),window.addEventListener("keydown",o=>{if(o.key==="Escape"&&e.open){const u=e.contains(document.activeElement);if(r(),u){const a=e.querySelector("summary");a&&a.focus()}}})}}customElements.define("mobile-starlight-toc",M);