@dogsbay/ssg 0.2.0-beta.152 → 0.2.0-beta.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package/THIRD-PARTY-NOTICES.txt +6 -6
- package/dist/package/browser.mjs +328 -83
- package/dist/package/chunks/{prebuilt-css-default-FYH7N4SF.mjs → prebuilt-css-default-ZJXSHZYU.mjs} +111 -81
- package/dist/package/chunks/{prebuilt-css-mintlify-KCT32TZ6.mjs → prebuilt-css-mintlify-42UHBQ4I.mjs} +111 -81
- package/dist/package/client.mjs +507 -44
- package/dist/package/css.mjs +46 -42
- package/dist/package/types/client/pagefind.d.ts +1 -0
- package/dist/package/types/client/search-facets.d.ts +35 -0
- package/dist/package/types/client/search-scope.d.ts +61 -0
- package/dist/package/types/client/search.d.ts +19 -8
- package/dist/package/types/core/build.d.ts +29 -0
- package/dist/package/types/core/canonical.d.ts +5 -0
- package/dist/package/types/core/links.d.ts +9 -0
- package/dist/package/types/core/taxonomy.d.ts +27 -0
- package/dist/package/types/core/unit-manifest.d.ts +2 -0
- package/dist/package/types/theme/compose.d.ts +2 -0
- package/dist/package/types/theme/regions.d.ts +22 -1
- package/package.json +29 -29
package/dist/package/browser.mjs
CHANGED
|
@@ -353,7 +353,8 @@ function taxonomiesOf(v) {
|
|
|
353
353
|
return {
|
|
354
354
|
name,
|
|
355
355
|
path,
|
|
356
|
-
|
|
356
|
+
// As the Dogsbay CLI: declaring prefixes makes the taxonomy hierarchical unless it says otherwise.
|
|
357
|
+
hierarchical: o.hierarchical === void 0 ? Object.keys(prefixes).length > 0 : o.hierarchical === true,
|
|
357
358
|
prefixes: Object.keys(prefixes).length ? prefixes : void 0,
|
|
358
359
|
labels: Object.keys(labels).length ? labels : void 0,
|
|
359
360
|
autoColor: o.autoColor === true
|
|
@@ -697,6 +698,18 @@ function createResolver(table, page) {
|
|
|
697
698
|
if (f === void 0) return void 0;
|
|
698
699
|
return encodePath(relative(dirname([table.unitPrefix, page.out].filter(Boolean).join("/")), f));
|
|
699
700
|
};
|
|
701
|
+
const sitePage = (path, t, suffix) => {
|
|
702
|
+
if (!path.startsWith("/")) return void 0;
|
|
703
|
+
const prefix = table.unitPrefix ?? "";
|
|
704
|
+
if (prefix && (t === prefix || t.startsWith(prefix + "/"))) {
|
|
705
|
+
const hit = findPage(t.slice(prefix.length + 1));
|
|
706
|
+
if (hit) return hit.out === page.out && suffix.startsWith("#") ? suffix : hrefBetween(page.out, hit.out, table.linkStyle) + suffix;
|
|
707
|
+
}
|
|
708
|
+
if (!table.siteFile) return void 0;
|
|
709
|
+
resolver.crossed = true;
|
|
710
|
+
const f = table.siteFile(t, prefix);
|
|
711
|
+
return f === void 0 ? void 0 : computeHref(dirname([prefix, page.out].filter(Boolean).join("/")), f, table.linkStyle) + suffix;
|
|
712
|
+
};
|
|
700
713
|
const findPage = (t) => {
|
|
701
714
|
for (const c of pageKeyCandidates(t)) {
|
|
702
715
|
const hit = table.pages.get(c);
|
|
@@ -704,8 +717,9 @@ function createResolver(table, page) {
|
|
|
704
717
|
}
|
|
705
718
|
return void 0;
|
|
706
719
|
};
|
|
707
|
-
|
|
720
|
+
const resolver = {
|
|
708
721
|
broken,
|
|
722
|
+
crossed: false,
|
|
709
723
|
link(href) {
|
|
710
724
|
if (!href || href.startsWith("#") || isExternal(href)) return href;
|
|
711
725
|
const { path, suffix } = splitHref(href);
|
|
@@ -719,6 +733,8 @@ function createResolver(table, page) {
|
|
|
719
733
|
return url + suffix;
|
|
720
734
|
}
|
|
721
735
|
if (table.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
|
|
736
|
+
const other = sitePage(path, t, suffix);
|
|
737
|
+
if (other !== void 0) return other;
|
|
722
738
|
const st = staticHref(path, t);
|
|
723
739
|
if (st !== void 0) return st + suffix;
|
|
724
740
|
broken.push(href);
|
|
@@ -735,6 +751,7 @@ function createResolver(table, page) {
|
|
|
735
751
|
return src;
|
|
736
752
|
}
|
|
737
753
|
};
|
|
754
|
+
return resolver;
|
|
738
755
|
}
|
|
739
756
|
var MENU_FILE = /\.(html?|pdf|txt|md|xml|json|ya?ml|csv|zip|gz|tgz|epub|svg|png|jpe?g|gif|webp)$/i;
|
|
740
757
|
function menuHref(href, siteRoot, style, basePath = "") {
|
|
@@ -1348,15 +1365,18 @@ function pageCanonical(cfg, unit, tables, page, urls) {
|
|
|
1348
1365
|
const url = t.kind === "self" ? urls.self : t.kind === "url" ? t.url : urls.unitPage(table.prefix, table.pages.get(t.path));
|
|
1349
1366
|
return { ...d, url };
|
|
1350
1367
|
}
|
|
1368
|
+
function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts) {
|
|
1369
|
+
return scan(cfg, unit, units, files, frontMatterOf, read, { kind: "built", includeDrafts });
|
|
1370
|
+
}
|
|
1351
1371
|
|
|
1352
1372
|
// src/core/build.ts
|
|
1353
1373
|
import { parseMeta as parseMeta3 } from "@dogsbay/types";
|
|
1354
1374
|
import { directoryChildren, hasChildLinks, navKey, realizeChildLinks } from "@dogsbay/serialize-core";
|
|
1355
1375
|
|
|
1356
1376
|
// src/generated/assets.ts
|
|
1357
|
-
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var kn=Object.defineProperty;var Tn=(i,t,e)=>t in i?kn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var u=(i,t,e)=>Tn(i,typeof t!="symbol"?t+"":t,e);var N=class extends HTMLElement{constructor(){super(...arguments);u(this,"_initialized",!1);u(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},On={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},Ie="dogsbay-elements-display";function z(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(On).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function Dn(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}function gt(i,t,e){let n=t;do n+=e?-1:1;while(n>=0&&n<i.length&&Dn(i[n]));return n}var Dt=class{constructor(i,t,e={}){u(this,"container");u(this,"itemSelector");u(this,"opts");u(this,"keydownHandler",null);u(this,"active",!1);this.container=i,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&i==="ArrowDown"}isBackwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&i==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=i=>{let t=this.getItems();if(t.length===0||i.ctrlKey||i.altKey||i.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",n=t.indexOf(document.activeElement);if(n===-1)return;let o=null;this.isForwardKey(i.key,e)?(o=gt(t,n,!1),o>=t.length&&(o=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(o=gt(t,n,!0),o<0&&(o=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?o=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(o=gt(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var Rn=0;function He(i){return`${i}-${++Rn}`}var Ne=class extends N{constructor(){super(...arguments);u(this,"list");u(this,"triggers",[]);u(this,"panels",[]);u(this,"nav",null);u(this,"value","");u(this,"syncKey",null);u(this,"orientation","horizontal");u(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let n=e.dataset.value;n&&this.select(n)});u(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});u(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||He("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||He("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new Dt(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let n=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let o=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(n=o),this.select(n)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let n=e.dataset.value===t;e.setAttribute("aria-selected",String(n)),e.setAttribute("tabindex",n?"0":"-1"),n?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let n=e.dataset.value===t;e.hidden=!n,n?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};z();customElements.get("db-tabs")||customElements.define("db-tabs",Ne);var Mn=0;function In(i){return`${i}-${++Mn}`}var ze=class{constructor(i,t,e={}){u(this,"trigger");u(this,"content");u(this,"_open",!1);u(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=In("base-collapsible");i.id||(i.id=`${n}-trigger`),t.id||(t.id=`${n}-content`),i.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",i.id),t.setAttribute("role","region"),i.setAttribute("aria-expanded","false"),i.addEventListener("click",()=>{i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var i,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(i=this.opts).onToggle)==null||t.call(i,!0))}collapse(){var i,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(i=this.opts).onToggle)==null||t.call(i,!1))}};var _e=class extends N{constructor(){super(...arguments);u(this,"items",[]);u(this,"nav",null);u(this,"openValues",new Set);u(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],n=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=n.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new ze(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let o=this.items.find(s=>s.value===n);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(n=>n.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(n=>n.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};z();customElements.get("db-accordion")||customElements.define("db-accordion",_e);var Hn=0;function F(i){return`${i}-${++Hn}`}function et(i,t){let e=i.localName;return Array.from(i.querySelectorAll(t)).filter(n=>n.closest(e)===i)}function $(i,t){return et(i,t)[0]??null}function bt(i){if(!i||!i.hasAttribute("data-as-child"))return i;let t=i.firstElementChild;if(!t)return i;let e=i.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function j(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function Pe(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!Pe())return"inline";i.hasAttribute("popover")||i.setAttribute("popover","manual"),i.style.inset="auto",i.style.margin="0";try{i.matches(":popover-open")||i.showPopover()}catch{return"inline"}return"top-layer"}function yt(i){if(Pe())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Nn=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Fe(i){return Array.from(i.querySelectorAll(Nn)).filter(t=>!t.closest("[hidden]")&&!j(t))}function $e(i,t){let e=typeof i.getAnimations=="function"?i.getAnimations():[];if(!e.length)return t();Promise.all(e.map(n=>n.finished)).then(t,t)}function wt(i){try{return decodeURIComponent(i)}catch{return i}}var qe=class extends N{constructor(){super(...arguments);u(this,"details",null);u(this,"summary",null);u(this,"dialog",null);u(this,"body",null);u(this,"source",null);u(this,"moved",[]);u(this,"handledHash",null);u(this,"onSummaryClick",t=>{var n,o;let e=t.target;e&&e!==this.summary&&((o=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});u(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let n=e.getBoundingClientRect();!(t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});u(this,"onDialogClose",()=>this.restore());u(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let o=document.getElementById(wt(n.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});u(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(h=>h.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(h=>h.tagName==="SUMMARY")??null:null,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)return;for(let h of Array.from(t.children))h.getAttribute("role")==="status"&&h.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,zn();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:n,body:o}=this;if(!e||!n||!o||e.open)return;let s=Array.from(n.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==n&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,n;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((n=(e=this.summary).checkVisibility)==null?void 0:n.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=wt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},Be="dogsbay-details-sheet";function zn(){if(document.getElementById(Be))return;let i=document.createElement("style");i.id=Be,i.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(i)}z();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",qe);var Ke=class extends N{constructor(){super(...arguments);u(this,"copyBtn",null);u(this,"copyIcon",null);u(this,"checkIcon",null);u(this,"liveRegion",null);u(this,"resetTimeout",null);u(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let n=this.querySelector("[data-part=\'code\']");return(n==null?void 0:n.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};z();customElements.get("db-code-block")||customElements.define("db-code-block",Ke);var je=class extends N{constructor(){super(...arguments);u(this,"navData",null);u(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let n=e.closest("[data-part=\'item\']");n&&this.toggle(n)});u(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let n=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?n.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=h=>{var f;h&&(t.preventDefault(),(f=this.primary(h))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[s+1]);case"ArrowUp":return l(n[s-1]);case"Home":return l(n[0]);case"End":return l(n[n.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let h=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(h&&this.contains(h)){let f=h.querySelector(":scope > [data-part=\'row\']");f&&((d=this.primary(f))==null||d.focus())}return}}})}setup(){for(let t of et(this,"[data-part=\'item\']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of et(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),n=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e||!n)return;e.id||(e.id=F("db-nav-group")),n.setAttribute("aria-controls",e.id),n instanceof HTMLButtonElement&&!n.hasAttribute("type")&&(n.type="button");let o=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,o)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return et(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let n=this.groupOf(t);!n||this.isOpen(t)===e||(e&&n.hasAttribute("data-lazy")&&this.fill(n),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let n=this.groupOf(t),o=this.toggleOf(t);n&&(n.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Pn(this);if(!e)return;let n=t.getBoundingClientRect(),o=e.getBoundingClientRect();(n.top<o.top||n.bottom>o.bottom)&&(e.scrollTop+=n.top-o.top-o.height/2+n.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),n=t.dataset.path;if(!e||n==null)return;let o=e,s;for(let r of n.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",o=this.getAttribute("toggle-label")??"Toggle {label}",s=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let h=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(h.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let b=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(b)&&!/^(?:https?|mailto):/i.test(b)&&(a=null);let p=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(b),y=null;if(l!=null&&l.length){if(y=document.createElement("button"),y.type="button",y.setAttribute("data-part","toggle"),y.setAttribute("aria-expanded","false"),a!=null)y.setAttribute("aria-label",o.replace("{label}",()=>r));else{let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,y.appendChild(g)}y.insertAdjacentHTML("beforeend",_n)}let w=this.getAttribute("toggle-position")==="end";if(y&&!w&&m.appendChild(y),a!=null){let g=document.createElement("a");g.setAttribute("data-part","link"),g.textContent=r,g.href=p?a:n+a,p&&(g.rel="noopener"),!c&&g.href.split("#")[0]===s&&g.setAttribute("aria-current","page"),m.appendChild(g)}if(a==null&&!(l!=null&&l.length)){let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,m.appendChild(g)}if(y&&w&&m.appendChild(y),l!=null&&l.length){let g=document.createElement("ul");g.setAttribute("data-part","group"),g.dataset.lazy="",g.dataset.path=h,g.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(g),this.prepareItem(f)}return f})}},_n=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function Pn(i){for(let t=i.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}z();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",je);var We=class extends N{constructor(){super(...arguments);u(this,"links",[]);u(this,"headings",[]);u(this,"observer",null);u(this,"active",null);u(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});u(this,"onHash",()=>{let t=wt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??wt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(n=>document.getElementById(this.slugOf(n))).filter(n=>!!n),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(n=>{var s;let o=n.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(n=>this.observer.observe(n))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let n of this.headings)n.getBoundingClientRect().top<=t+20&&(e=n);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};z();customElements.get("db-toc")||customElements.define("db-toc",We);var Fn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],de=Fn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Kt=!Ye&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},jt=function(t,e){var n;e===void 0&&(e=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},$n=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Bn=function(t,e,n){if(jt(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&o.unshift(t),o=o.filter(n),o},ue=function(t,e,n){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=ue(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&o.push(r);var h=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(h&&f){var m=ue(h===!0?r.children:h.children,!0,n);n.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else s.unshift.apply(s,r.children)}}return o},Xe=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ge=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$n(t))&&!Xe(t)?0:t.tabIndex},qn=function(t,e){var n=Ge(t);return n<0&&e&&!Xe(t)?0:n},Kn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ze=function(t){return t.tagName==="INPUT"},jn=function(t){return Ze(t)&&t.type==="hidden"},Wn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},Vn=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Un=function(t){if(!t.name)return!0;var e=t.form||Kt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=Vn(o,t.form);return!s||s===t},Yn=function(t){return Ze(t)&&t.type==="radio"},Xn=function(t){return Yn(t)&&!Un(t)},Gn=function(t){var e,n=t&&Kt(t),o=(e=n)===null||e===void 0?void 0:e.host,s=!1;if(n&&n!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,h;n=Kt(o),o=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(h=d.ownerDocument)!==null&&h!==void 0&&h.contains(o))}}return s},Ve=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return n===0&&o===0},Zn=function(t,e){var n=e.displayCheck,o=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Rt.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Rt.call(c,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var h=t.parentElement,f=Kt(t);if(h&&!h.shadowRoot&&o(h)===!0)return Ve(t);t.assignedSlot?t=t.assignedSlot:!h&&f!==t.ownerDocument?t=f.host:t=h}t=d}if(Gn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Ve(t);return!1},Qn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var o=e.children.item(n);if(o.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Jn=function(t,e){return!(e.disabled||jn(e)||Zn(e,t)||Wn(e)||Qn(e))},Ue=function(t,e){return!(Xn(e)||Ge(e)<0||!Jn(t,e))},to=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Qe=function(t){var e=[],n=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=qn(a,r),c=r?Qe(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),n.sort(Kn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ue.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:to}):n=Bn(t,e.includeContainer,Ue.bind(null,e)),Qe(n)};var fe=class{constructor(i,t={}){u(this,"root");u(this,"opts");u(this,"previouslyFocused",null);u(this,"keydownHandler",null);u(this,"active",!1);this.root=i,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=i=>{if(i.key!=="Tab")return;let t=he(this.root);if(t.length===0){i.preventDefault();return}let e=t[0],n=t[t.length-1];i.shiftKey?document.activeElement===e&&(n.focus(),i.preventDefault()):document.activeElement===n&&(e.focus(),i.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let i=he(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=i[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var B,at=(B=class{static activate(){if(B.count++,B.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;B.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){B.count=Math.max(0,B.count-1),!(B.count>0)&&B.originalStyles&&(document.body.style.overflow=B.originalStyles.overflow,document.body.style.paddingRight=B.originalStyles.paddingRight,B.originalStyles=null)}static reset(){B.count=0,B.originalStyles=null}},u(B,"count",0),u(B,"originalStyles",null),B);var Z=[];function eo(i){if(i.key!=="Escape"||Z.length===0)return;let t=Z[Z.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Je=!1;function io(){Je||(Je=!0,document.addEventListener("keydown",eo))}var lt=class{constructor(i,t){u(this,"root");u(this,"opts");u(this,"outsideHandler",null);u(this,"active",!1);u(this,"frameId",null);u(this,"escapePrevented",!1);this.root=i,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(io(),Z.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Z.length>0&&Z[Z.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let o=document.getElementById(n);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(i)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let i=Z.indexOf(this);i!==-1&&Z.splice(i,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function me(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let o=0;o<n.children.length;o++){let s=n.children[o];if(s===e||s.contains(i))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:o}of t)o===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o)}}var ti=class extends N{constructor(){super(...arguments);u(this,"content",null);u(this,"backdrop",null);u(this,"trigger",null);u(this,"native",!1);u(this,"_open",!1);u(this,"openedBy",null);u(this,"focusTrap",null);u(this,"dismiss",null);u(this,"cleanupInert",null);u(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});u(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});u(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});u(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});u(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});u(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=$(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=$(this,"[data-part=\'backdrop\']"),this.trigger=bt($(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=F("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=F("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let n=t.querySelector("[data-part=\'description\']");n&&!t.hasAttribute("aria-describedby")&&(n.id||(n.id=F("db-dialog-desc")),t.setAttribute("aria-describedby",n.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,n;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(n=this.backdrop)==null||n.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var n,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(at.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let n=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(at.deactivate(),this.native){let l=n;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,$e(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-dialog")||customElements.define("db-dialog",ti);var ei=class extends N{constructor(){super(...arguments);u(this,"input",null);u(this,"listbox",null);u(this,"empty",null);u(this,"_open",!1);u(this,"highlighted",null);u(this,"observer",null);u(this,"base",F("db-combobox"));u(this,"optionSeq",0);u(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});u(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});u(this,"onKey",t=>{let e=this.visible(),n=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?0:Math.min(n+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?e.length-1:Math.max(n-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});u(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||j(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});u(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!j(e)&&!e.hidden&&this.highlight(e)});u(this,"onListDown",t=>t.preventDefault());u(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!j(t))}setup(){if(this.input=$(this,"[data-part=\'input\']"),this.listbox=$(this,"[data-part=\'listbox\']"),this.empty=$(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var n;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(n=this.observer)==null||n.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),n=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:n},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,n,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(n=this.highlighted)==null||n.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,n;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(n=this.input)==null||n.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let n=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??n,s=new CustomEvent("db-combobox:select",{detail:{value:n,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:o},bubbles:!0})),!0)}};z();customElements.get("db-combobox")||customElements.define("db-combobox",ei);var it=Math.min,W=Math.max,It=Math.round,Ht=Math.floor,Y=i=>({x:i,y:i}),no={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(i,t,e){return W(i,it(t,e))}function Et(i,t){return typeof i=="function"?i(t):i}function nt(i){return i.split("-")[0]}function xt(i){return i.split("-")[1]}function pe(i){return i==="x"?"y":"x"}function ge(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function be(i){return pe(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),o=be(i),s=ge(o),r=o==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Mt(r)),[r,Mt(r)]}function ri(i){let t=Mt(i);return[Wt(i),t,Wt(t)]}function Wt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ii=["left","right"],ni=["right","left"],oo=["top","bottom"],so=["bottom","top"];function ro(i,t,e){switch(i){case"top":case"bottom":return e?t?ni:ii:t?ii:ni;case"left":case"right":return t?oo:so;default:return[]}}function ai(i,t,e,n){let o=xt(i),s=ro(nt(i),e==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Wt)))),s}function Mt(i){let t=nt(i);return no[t]+i.slice(t.length)}function ao(i){var t,e,n,o;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(o=i.left)!=null?o:0}}function li(i){return typeof i!="number"?ao(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:o}=i;return{width:n,height:o,top:e,left:t,right:t+n,bottom:e+o,x:t,y:e}}function ci(i,t,e){let{reference:n,floating:o}=i,s=X(t),r=be(t),a=ge(r),l=nt(t),c=s==="y",d=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}let b=xt(t);return b&&(m[r]+=f*(b==="end"?1:-1)*(e&&c?-1:1)),m}async function di(i,t){var e;t===void 0&&(t={});let{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),b=li(m),y=a[f?h==="floating"?"reference":"floating":h],w=ct(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(y)))==null||e?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},M=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(w.top-M.top+b.top)/S.y,bottom:(M.bottom-w.bottom+b.bottom)/S.y,left:(w.left-M.left+b.left)/S.x,right:(M.right-w.right+b.right)/S.x}}var lo=50,ui=async(i,t,e)=>{let{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:di},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:o}),{x:d,y:h}=ci(c,n,l),f=n,m=0,b={};for(let p=0;p<s.length;p++){let y=s[p];if(!y)continue;let{name:w,fn:g}=y,{x,y:S,data:M,reset:H}=await g({x:d,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:i,floating:t}});d=x??d,h=S??h,b[w]={...b[w],...M},H&&m<lo&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:o}):H.rects),{x:d,y:h}=ci(c,f,l)),p=-1)}return{x:d,y:h,placement:f,strategy:o,middlewareData:b}};var hi=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...y}=Et(i,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let w=nt(o),g=X(a),x=nt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(x||!p?[Mt(a)]:ri(a)),H=b!=="none";!f&&H&&M.push(...ai(a,p,b,S));let D=[a,...M],v=await l.detectOverflow(t,y),q=[],I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[w]),h){let C=si(o,r,S);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:o,overflows:q}],!q.every(C=>C<=0)){var L,A;let C=(((L=s.flip)==null?void 0:L.index)||0)+1,O=D[C];if(O&&(!(h==="alignment"?g!==X(O):!1)||I.every(R=>X(R.placement)===g?R.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:O}};let k=(A=I.filter(T=>T.overflows[0]<=0).sort((T,R)=>T.overflows[1]-R.overflows[1])[0])==null?void 0:A.placement;if(!k)switch(m){case"bestFit":{var E;let T=(E=I.filter(R=>{if(H){let _=X(R.placement);return _===g||_==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((R,_)=>R[1]-_[1])[0])==null?void 0:E[0];T&&(k=T);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};var co=new Set(["left","top"]);async function uo(i,t){let{placement:e,platform:n,elements:o}=i,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=co.has(r)?-1:1,d=s&&l?-1:1,h=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(m=a==="end"?b*-1:b),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var fi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await uo(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},mi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x,y:S}=g;return{x,y:S}}},...c}=Et(i,t),d={x:e,y:n},h=await s.detectOverflow(t,c),f=X(o),m=pe(f),b=d[m],p=d[f],y=(g,x)=>oi(x+h[g==="y"?"top":"left"],x,x-h[g==="y"?"bottom":"right"]);r&&(b=y(m,b)),a&&(p=y(f,p));let w=l.fn({...t,[m]:b,[f]:p});return{...w,data:{x:w.x-e,y:w.y-n,enabled:{[m]:r,[f]:a}}}}}};var pi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Et(i,t),l=await o.detectOverflow(t,a),c=nt(e),d=xt(e),h=X(e)==="y",{width:f,height:m}=n.floating,b,p;c==="top"||c==="bottom"?(b=c,p=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,b=d==="end"?"top":"bottom");let y=m-l.top-l.bottom,w=f-l.left-l.right,g=it(m-l[b],y),x=it(f-l[p],w),S=t.middlewareData.shift,M=!S,H=g,D=x;S!=null&&S.enabled.x&&(D=w),S!=null&&S.enabled.y&&(H=y),M&&!d&&(h?D=f-2*W(l.left,l.right):H=m-2*W(l.top,l.bottom)),await r({...t,availableWidth:D,availableHeight:H});let v=await o.getDimensions(s.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Vt(){return typeof window<"u"}function ut(i){return bi(i)?(i.nodeName||"").toLowerCase():"#document"}function K(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function G(i){var t;return(t=(bi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function bi(i){return Vt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Vt()?i instanceof Element||i instanceof K(i).Element:!1}function Q(i){return Vt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function gi(i){return!Vt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function Nt(i){let{overflow:t,overflowX:e,overflowY:n,display:o}=U(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&o!=="inline"&&o!=="contents"}function vi(i){return/^(table|td|th)$/.test(ut(i))}function zt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var ho=/transform|translate|scale|rotate|perspective|filter/,fo=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?U(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Yt()&&(dt(t.backdropFilter)||dt(t.filter))||ho.test(t.willChange||"")||fo.test(t.contain||"")}function yi(i){let t=ot(i);for(;Q(t)&&!St(t);){if(Ut(t))return t;if(zt(t))return null;t=ot(t)}return null}function Yt(){return ve==null&&(ve=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ve}function St(i){return/^(html|body|#document)$/.test(ut(i))}function U(i){return K(i).getComputedStyle(i)}function _t(i){return V(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function ot(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||gi(i)&&i.host||G(i);return gi(t)?t.host:t}function wi(i){let t=ot(i);return St(t)?(i.ownerDocument||i).body:Q(t)&&Nt(t)?t:wi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=wi(i),s=o===((n=i.ownerDocument)==null?void 0:n.body),r=K(o);if(s){let a=Xt(r);return t.concat(r,r.visualViewport||[],Nt(o)?o:[],a&&e?At(a):[])}else return t.concat(o,At(o,[],e))}function Xt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Ai(i){let t=U(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Q(i),s=o?i.offsetWidth:e,r=o?i.offsetHeight:n,a=It(e)!==s||It(n)!==r;return a&&(e=s,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!Q(t))return Y(1);let e=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ai(t),r=(s?It(e.width):e.width)/n,a=(s?It(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var mo=Y(0);function Si(i){let t=K(i);return!Yt()||!t.visualViewport?mo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function po(i,t,e){return t===void 0&&(t=!1),!!e&&t&&e===K(i)}function ht(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=i.getBoundingClientRect(),s=we(i),r=Y(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=po(s,e,n)?Si(s):Y(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,h=o.height/r.y;if(s&&n){let f=K(s),m=V(n)?K(n):n,b=f,p=Xt(b);for(;p&&m!==b;){let y=Ct(p),w=p.getBoundingClientRect(),g=U(p),x=w.left+(p.clientLeft+parseFloat(g.paddingLeft))*y.x,S=w.top+(p.clientTop+parseFloat(g.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,h*=y.y,l+=x,c+=S,b=K(p),p=Xt(b)}}return ct({width:d,height:h,x:l,y:c})}function Gt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Ci(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Gt(i,e),o=e.top+t.scrollTop;return{x:n,y:o}}function go(i){let{elements:t,rect:e,offsetParent:n,strategy:o}=i,s=o==="fixed",r=G(n),a=t?zt(t.floating):!1;if(n===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=Y(1),d=Y(0),h=Q(n);if((h||!s)&&((ut(n)!=="body"||Nt(r))&&(l=_t(n)),h)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!h&&!s?Ci(r,l):Y(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:e.y*c.y-l.scrollTop*c.y+d.y+f.y}}function bo(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function vo(i){let t=_t(i),e=i.ownerDocument.body,n=W(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=W(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+Gt(i),r=-t.scrollTop;return U(e).direction==="rtl"&&(s+=W(i.clientWidth,e.clientWidth)-n),{width:n,height:o,x:s,y:r}}var yo=25;function wo(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",o=K(i),s=G(i),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let f=!Yt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Gt(s)<=0){let f=s.ownerDocument,m=f.body,b=getComputedStyle(m),p=f.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,y=Math.abs(s.clientWidth-m.clientWidth-p),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?y/2:y;w<=yo&&(a-=w)}return{width:a,height:l,x:c,y:d}}function Eo(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,o=e.left+i.clientLeft,s=Ct(i),r=i.clientWidth*s.x,a=i.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:r,height:a,x:l,y:c}}function Ei(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=wo(i,e,t);else if(t==="document")n=vo(G(i));else if(V(t))n=Eo(t,e);else{let o=Si(i);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(n)}function xo(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),o=null,s=U(i).position==="fixed",r=s?ot(i):i;for(;V(r)&&!St(r);){let a=U(r),l=Ut(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(h=>h!==r):o=a,r=ot(r)}return t.set(i,n),n}function Ao(i){let{element:t,boundary:e,rootBoundary:n,strategy:o}=i,r=[...e==="clippingAncestors"?zt(t)?[]:xo(t,this._c):[].concat(e),n],a=Ei(t,r[0],o),l=a.top,c=a.right,d=a.bottom,h=a.left;for(let f=1;f<r.length;f++){let m=Ei(t,r[f],o);l=W(m.top,l),c=it(m.right,c),d=it(m.bottom,d),h=W(m.left,h)}return{width:c-h,height:d-l,x:h,y:l}}function So(i){let{width:t,height:e}=Ai(i);return{width:t,height:e}}function Co(i,t,e){let n=Q(t),o=G(t),s=e==="fixed",r=ht(i,!0,s,t),a={scrollLeft:0,scrollTop:0},l=Y(0);if((n||!s)&&((ut(t)!=="body"||Nt(o))&&(a=_t(t)),n)){let f=ht(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=Gt(o));let c=o&&!n&&!s?Ci(o,a):Y(0),d=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:d,y:h,width:r.width,height:r.height}}function ye(i){return U(i).position==="static"}function xi(i,t){if(!Q(i)||U(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Li(i,t){let e=K(i);if(zt(i))return e;if(!Q(i)){let o=ot(i);for(;o&&!St(o);){if(V(o)&&!ye(o))return o;o=ot(o)}return e}let n=xi(i,t);for(;n&&vi(n)&&ye(n);)n=xi(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||yi(i)||e}var Lo=async function(i){let t=this.getOffsetParent||Li,e=this.getDimensions,n=await e(i.floating);return{reference:Co(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ko(i){return U(i).direction==="rtl"}var To={convertOffsetParentRelativeRectToViewportRelativeRect:go,getDocumentElement:G,getClippingRect:Ao,getOffsetParent:Li,getElementRects:Lo,getClientRects:bo,getDimensions:So,getScale:Ct,isElement:V,isRTL:ko};function ki(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function Oo(i,t,e){let n=null,o,s=G(i);function r(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function a(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),r();let f=i.getBoundingClientRect(),{left:m,top:b,width:p,height:y}=f;if(d||t(),!p||!y)return;let w=Ht(b),g=Ht(s.clientWidth-(m+p)),x=Ht(s.clientHeight-(b+y)),S=Ht(m),H={rootMargin:-w+"px "+-g+"px "+-x+"px "+-S+"px",threshold:W(0,it(1,h))||1},D=!0;function v(q){let I=q[0].intersectionRatio;if(!ki(f,i.getBoundingClientRect()))return a();if(I!==h){if(!D)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}D=!1}try{n=new IntersectionObserver(v,{...H,root:s.ownerDocument})}catch{n=new IntersectionObserver(v,H)}n.observe(i)}let l=K(i),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function Ti(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=o||s?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(w=>{o&&w.addEventListener("scroll",e),s&&w.addEventListener("resize",e)});let h=c&&a?Oo(c,e,s):null,f=-1,m=null;r&&(m=new ResizeObserver(w=>{let[g]=w;g&&g.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let b,p=l?ht(i):null;l&&y();function y(){let w=ht(i);p&&!ki(p,w)&&e(),p=w,b=requestAnimationFrame(y)}return e(),()=>{var w;d.forEach(g=>{o&&g.removeEventListener("scroll",e),s&&g.removeEventListener("resize",e)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}var Oi=fi;var Di=mi,Ri=hi,Mi=pi;var Ii=(i,t,e)=>{let n=new Map,o=e??{},s={...To,...o.platform,_c:n};return ui(i,t,{...o,platform:s})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Oi(s),...r?[Ri({padding:l})]:[],...a?[Di({padding:l})]:[],...c?[Mi({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=o,Ti(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:o,middleware:d});Object.assign(t.style,{left:`${f.x}px`,top:`${f.y}px`});let m=f.placement.split("-")[0];t.setAttribute("data-side",m)})}var Ee=class{constructor(i){u(this,"opts");u(this,"buffer","");u(this,"timerId",null);u(this,"timeout");this.opts=i,this.timeout=i.timeout??1e3}handle(i){if(i.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=i.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Hi=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"valueEl",null);u(this,"items",[]);u(this,"nativeSelect",null);u(this,"hiddenInput",null);u(this,"labelEl",null);u(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});u(this,"dismiss",null);u(this,"typeahead",null);u(this,"cleanupFloating",null);u(this,"_open",!1);u(this,"_value","");u(this,"highlighted",-1);u(this,"syncing",!1);u(this,"onNativeChange",()=>{this.syncing||this.refresh()});u(this,"onFormReset",()=>setTimeout(()=>this.refresh()));u(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});u(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});u(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(n-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(n+10,e.length-1));case"PageUp":return o(Math.max(n-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});u(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||j(e)||(this.select(e),this.close())});u(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!j(e)&&this.highlight(this.items.indexOf(e))});u(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(n=>n.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var n;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(n=this.trigger)==null||n.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!j(t))}setup(){var a,l;if(this.nativeSelect=$(this,"select"),this.nativeSelect&&!$(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=$(this,"[data-part=\'trigger\']"),this.content=$(this,"[data-part=\'content\']"),this.valueEl=$(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=et(this,"[data-part=\'item\']");let n=F("db-select");e.id||(e.id=`${n}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${n}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),et(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=F("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,h;return((h=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:h.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&j(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let n=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!o){let h=Array.from(r.childNodes).filter(f=>!(f instanceof Element&&(f===t||f.contains(t)||f.localName==="db-select"))).map(f=>f.textContent??"").join(" ").replace(/\\s+/g," ").trim();h&&e.setAttribute("aria-label",h)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(h,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=h.value;for(let[b,p]of Object.entries(h.dataset))p!=null&&(m.dataset[b]=p);h.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=h.textContent??h.value,f.appendChild(m)};for(let h of Array.from(t.children))if(h instanceof HTMLOptGroupElement){let f=document.createElement("div");f.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=h.label,f.appendChild(m);for(let b of Array.from(h.children))b instanceof HTMLOptionElement&&d(b,f);c.appendChild(f)}else h instanceof HTMLOptionElement&&d(h,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,n,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,n,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:n==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!j(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],n=this.content;if(!e||!n||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<n.scrollTop?n.scrollTop=o:s>n.scrollTop+n.clientHeight&&(n.scrollTop=s-n.clientHeight)}select(t,e=!0){var s;if(j(t))return;let n=t.dataset.value??"",o=n!==this._value;this._value=n;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!o){this.nativeSelect&&(this.nativeSelect.value=n);return}if(this.nativeSelect){this.nativeSelect.value=n,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:n},bubbles:!0}))}};z();customElements.get("db-select")||customElements.define("db-select",Hi);var Ni=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"dismiss",null);u(this,"cleanupFloating",null);u(this,"_open",!1);u(this,"onTriggerClick",()=>this.toggle());u(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=F("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=F("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new lt(t,{onDismiss:n=>this.close(n)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",n=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:n==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Fe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-popover")||customElements.define("db-popover",Ni);var zi="db-announcement-closed:";var _i=class extends N{constructor(){super(...arguments);u(this,"closeButton",null);u(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var n;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(zi+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(n=document.activeElement)==null||n.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};z();customElements.get("db-announcement")||customElements.define("db-announcement",_i);var Pi=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"cleanupFloating",null);u(this,"showTimer",null);u(this,"hideTimer",null);u(this,"_open",!1);u(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});u(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});u(this,"onContentEnter",()=>this.clearTimers());u(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});u(this,"onBlur",()=>this.hide());u(this,"onPress",()=>this.hide());u(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let n=Number(this.getAttribute(t));return Number.isFinite(n)&&this.hasAttribute(t)?n:e}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=F("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let n=vt(e);this.setState("open"),this.cleanupFloating=ft(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:n==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,yt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};z();customElements.get("db-tooltip")||customElements.define("db-tooltip",Pi);var Fi="sidebar_state",Do="b",Ro=768,Pt=new WeakMap;function Mo(i){try{return localStorage.getItem(i)}catch{return null}}function Io(i,t){try{localStorage.setItem(i,t)}catch{}}function Se(i){if(Pt.has(i))return;let t=i.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",n=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Mo(Fi),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Ro-1}px)`),h={provider:i,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:n,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};Pt.set(i,h),$i(h);let f=p=>{h.isMobile=p.matches,!p.matches&&h.openMobile&&st(i)};d.addEventListener("change",f);let m=p=>{p.key===Do&&(p.metaKey||p.ctrlKey)?(p.preventDefault(),xe(i)):p.key==="Escape"&&h.openMobile&&(p.preventDefault(),st(i))};document.addEventListener("keydown",m),Ho(i,h),c&&c.addEventListener("click",()=>{st(i)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{xe(i)})}function Ho(i,t){i.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{xe(i)})})}function xe(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?st(i):No(i):(t.open=!t.open,$i(t),Io(Fi,String(t.open))))}function $i(i){let t=i.open?"expanded":"collapsed";i.provider.setAttribute("data-state",t),i.sidebar.setAttribute("data-state",t),i.desktopSidebar&&(i.desktopSidebar.setAttribute("data-state",t),i.open?i.desktopSidebar.setAttribute("data-collapsible",""):i.desktopSidebar.setAttribute("data-collapsible",i.collapsible))}function No(i){var n;let t=Pt.get(i);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(n=t.desktopSidebar)==null?void 0:n.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),at.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function st(i){var o;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),at.deactivate();let n=t.provider.querySelector("[data-part=\'sidebar-trigger\']");n==null||n.focus()}function Ae(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{Se(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ae):Ae();document.addEventListener("astro:page-load",Ae);var Bi=/^[a-z][a-z0-9_-]{0,63}$/,Zt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Qt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var zo={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},_o={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Po="[^aeiou]",Le="[aeiouy]",rt="("+Po+"[^aeiouy]*)",te="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+te+rt),Fo=new RegExp("^"+rt+"?"+te+rt+te+"?$"),Jt=new RegExp("^"+rt+"?("+te+rt+"){2,}"),qi=new RegExp("^"+rt+"?"+Le),Ki=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),$o=/ll$/,Bo=/^(.+?)e$/,qo=/^(.+?)y$/,Ko=/^(.+?(s|t))(ion)$/,jo=/^(.+?)(ed|ing)$/,Wo=/(at|bl|iz)$/,Vo=/^(.+?)eed$/,Uo=/^.+?[^s]s$/,Yo=/^.+?(ss|i)es$/,Xo=/([^aeiouylsz])\\1$/,Go=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Zo=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Qo=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function ji(i){let t=String(i).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Yo.test(t)?t=t.slice(0,-2):Uo.test(t)&&(t=t.slice(0,-1));let n;return(n=Vo.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=jo.exec(t))&&qi.test(n[1])&&(t=n[1],Wo.test(t)?t+="e":Xo.test(t)?t=t.slice(0,-1):Ki.test(t)&&(t+="e")),(n=qo.exec(t))&&qi.test(n[1])&&(t=n[1]+"i"),(n=Go.exec(t))&&Ce.test(n[1])&&(t=n[1]+zo[n[2]]),(n=Zo.exec(t))&&Ce.test(n[1])&&(t=n[1]+_o[n[2]]),(n=Qo.exec(t))?Jt.test(n[1])&&(t=n[1]):(n=Ko.exec(t))&&Jt.test(n[1])&&(t=n[1]),(n=Bo.exec(t))&&(Jt.test(n[1])||Fo.test(n[1])&&!Ki.test(n[1]))&&(t=n[1]),$o.test(t)&&Jt.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Wi=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Jo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function ts(i){if(Ft===void 0)try{Ft=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{Ft=null}if(Ft)return[...Ft.segment(i)].filter(n=>n.isWordLike).map(n=>n.segment);let t=[...i];if(t.length<2)return t;let e=[];for(let n=0;n<t.length-1;n++)e.push(t[n]+t[n+1]);return e}function mt(i){let t=[];for(let e of i.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let n=e[0],o=n.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(n),o.length>1&&!/[._]/.test(n)){let s=o.join("");s.length>=3&&!Wi.has(s)&&t.push(s)}for(let s of o)Jo.test(s)?t.push(...ts(s)):s.length>=2&&!Wi.has(s)&&t.push(s)}return t}function ke(i,t){let e="";for(let n of i.slice(0,t))e+=/[a-z0-9]/.test(n)?n:`_${n.codePointAt(0).toString(16)}_`;return e}function ee(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?ji(t):t}function Lt(i,t={}){var y,w;let e=[],n=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(g=>Bi.test(g)&&g!=="tag"&&g!=="section"))],h=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),f=[...i.matchAll(h)].map(g=>{var x;return{facetNeg:g[1]==="-",facet:(x=g[2])==null?void 0:x.toLowerCase(),value:g[3]??g[4],neg:g[5],phrase:g[6],word:g[7]}}),m=!1,b=!1;for(let[g,x]of f.entries()){if(x.facet){let E=Te(x.value??"");if(!E)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(E):((y=x.facetNeg?c:l)[w=x.facet]??(y[w]=[])).push(E);continue}let S=x.word;if(S==="OR"){b=e.length>0,s=!0;continue}if(S==="NOT"){m=!0,s=!0;continue}if(S==="AND"){s=!0;continue}let M=x.phrase!==void 0,H=m||x.neg==="-"||(S==null?void 0:S.startsWith("-"))&&S.length>1;m=!1;let D=M?x.phrase:H&&(S!=null&&S.startsWith("-"))?S.slice(1):S,v=[...new Set(mt(D))];if(!v.length){b=!1;continue}if(H){n.push(M?v:[v[0]]),s=!0,b=!1;continue}if(M){b=!1,s=!0,v.length>1&&o.push(mt(D).join(" "));for(let E of v)e.push({terms:[E],prefix:!1,exact:!0});continue}let q=g===f.length-1&&!/\\s$/.test(i);if(b){e[e.length-1].terms.push(v[0]);for(let E of v.slice(1))e.push({terms:[E],prefix:!1});b=!1;continue}let I=v[0],L=/[._-]/.test(I),A=I.replace(/-/g,"");for(let[E,C]of v.entries())e.push({terms:[C],prefix:q&&C.length>=2&&(E===v.length-1||L&&(C===I||C===A))})}let p=[...new Set(e.flatMap(g=>g.terms))];return{groups:e,not:n,phrases:o,strict:s,highlight:p,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function es(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i,{facets:tn([e])}):i,o=await is(n,e,t),s=rs(n,e);if(!n.groups.length)return ns(e,o,s);let r=[];for(let l of n.groups)r.push(await ls(l,e,t));let a=Yi(r,e,o,s,"and").sort(Ui);return a.length||n.strict?a:Yi(r,e,o,s,"or").sort(Ui)}var Ui=(i,t)=>t.score-i.score;async function is(i,t,e){let n=new Set;for(let o of i.not){let s;for(let r of o){let[a]=Ji(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let h=0;h<c.length;h+=2)(!s||s.has(c[h]))&&d.add(c[h]);s=d}for(let r of s??[])n.add(r)}return n}function ns(i,t,e){if(!e)return[];let n=[];return i.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&n.push({id:a,title:o,url:s,section:i.sections[r]??"",score:1})),n}function Yi(i,t,e,n,o){let s=new Map,r=new Map;for(let l of i)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||n&&!n(l)||o==="and"&&r.get(l)!==i.length)continue;let[d,h,f]=t.docs[l];a.push({id:l,title:d,url:h,section:t.sections[f]??"",score:c*(r.get(l)/i.length)})}return a}var J={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function os(i,t){if(i===t)return!1;if(i.length===t.length){let s=[];for(let r=0;r<i.length&&s.length<=2;r++)i[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&i[s[0]]===t[s[1]]&&i[s[1]]===t[s[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===n[o];)o++;return e.slice(o)===n.slice(o+1)}function Ji(i,t,e=!1){let n=ss(t);for(let s=Math.min(i.length,Xi);s>=1;s--){let r=ke(i,s);if(n.has(r))return!e||s<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ke(i,Math.min(i.length,Xi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Xi=3,Gi=new WeakMap;function ss(i){let t=Gi.get(i);return t||Gi.set(i,t=new Set(i.shards)),t}function Te(i){return i.replace(/"/g,"").trim().toLowerCase()}function rs(i,t){let{tag:e,section:n}=i.filters,o=i.notFilters??{tag:[],section:[]},s=Object.entries(i.facets??{}).filter(([,w])=>w.length),r=Object.entries(i.notFacets??{}).filter(([,w])=>w.length);if(!e.length&&!n.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(w,g)=>new Set(w.flatMap((x,S)=>g.includes(Te(x))?[S]:[])),l=a(t.sections,n),c=a(t.tags??[],e),d=a(t.sections,o.section),h=a(t.tags??[],o.tag),f=w=>(t.facets??[]).findIndex(g=>g.name===w),m=w=>w.map(([g,x])=>{let S=f(g);return[S,S<0?new Set:a(t.facets[S].values,x)]}),b=m(s),p=m(r).filter(([w])=>w>=0),y=(w,[g,x])=>{var S;return g>=0&&(((S=w[4])==null?void 0:S[g])??[]).some(M=>x.has(M))};return w=>{let g=t.docs[w],x=g[3]??[];if(n.length&&!l.has(g[2])||e.length&&!x.some(S=>c.has(S))||d.has(g[2])||x.some(S=>h.has(S)))return!1;for(let S of b)if(!y(g,S))return!1;for(let S of p)if(y(g,S))return!1;return!0}}function tn(i){return[...new Set(i.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function as(i,t){let e=Object.create(null),n=new Map,o=(s,r)=>{let a=`${s}\\0${Te(r)}`,l=n.get(a);l===void 0&&n.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of i){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var h;let d=(h=r.facets)==null?void 0:h[c];if(d)for(let f of new Set(l))d.values[f]!==void 0&&o(d.name,d.values[f])})}}return e}async function ls(i,t,e){let n=await us(i,t,e,!0);return i.corrected=n.corrected.length?n.corrected:void 0,ds(n,cs(t.count,n.docs.size))}function cs(i,t){return Math.log(1+(i-t+.5)/(t+.5))}function ds(i,t){let e=new Map;for(let[n,o]of i.lists)for(let s=0;s<n.length;s+=2)e.set(n[s],Math.max(e.get(n[s])??0,n[s+1]*o*t));return e}async function us(i,t,e,n){let o=ee(t.lang),s=new Map,r=new Map;for(let d of i.terms)for(let h of Ji(d,t,i.prefix)){let f=await e.shard(h);if(!f)continue;let m=(w,g)=>{g>(s.get(w)??0)&&(s.set(w,g),r.set(w,f))};Object.hasOwn(f,d)&&m(d,1);let b=o==null?void 0:o(d),p=b?b.slice(0,Math.max(3,b.length-1)):void 0,y=0;for(let w in f)w!==d&&(i.prefix&&w.startsWith(d)&&y++<200&&m(w,J.prefix),b&&p&&w.startsWith(p)&&o(w)===b&&m(w,J.stem));if(n&&!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let w in f)Math.abs(w.length-d.length)<=1&&os(d,w)&&m(w,J.typo)}let a=[...s].filter(([,d])=>d===J.typo).map(([d])=>d),l=[...s].map(([d,h])=>[r.get(d)[d],h]),c=new Set;for(let[d]of l)for(let h=0;h<d.length;h+=2)c.add(d[h]);return{lists:l,docs:c,corrected:a}}var en=i=>typeof i=="function"?i:()=>i;async function nn(i,t){let e=en(t),n=new Map;for(let o of i){let s=e(o),r=n.get(s);r||n.set(s,r=[]),r.push(o)}await Promise.all([...n].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>l.set(d,await o.fragment(d))));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function on(i){let t=en(i),e=new Map;return async n=>{let o=t(n),s=e.get(o);if(!s){let r=ee((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function hs(i,t,e,n=10){let o=t.slice(0,n);await nn(o,e);let s=i.groups,r=await on(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],h=mt(a.title),f=1;s.length&&s.every(b=>h.some(p=>l(p,b)))&&(f=Zi(h,s,l)?J.titleExact:J.titleAll);let m=[];for(let[b,p]of d){let y=mt(b);!s.length||!s.every(w=>y.some(g=>l(g,w)))||(m.push([b,p]),f=Math.max(f,Zi(y,s,l)?J.headingExact:J.headingAll))}if(a.sections=m.slice(0,3),i.phrases.length){let b=[a.title,c,...d.map(([p])=>p)].map(p=>mt(p).join(" ")).join(" \\0 ");i.phrases.every(p=>b.includes(p))&&(f*=J.phrase)}a.score*=f}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(n)]}async function sn(i,t,e){await nn(t,e);let n=await on(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await n(o);o.sections=o.fragment[1].filter(([r])=>{let a=mt(r);return i.groups.length>0&&i.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function Zi(i,t,e){return i.every(n=>t.some(o=>e(n,o)))&&t.every(n=>i.some(o=>e(o,n)))}async function rn(i,t,e=10){let n=await t.meta(),o=Lt(i,{facets:tn([n])}),s=ee(n.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await es(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await hs(o,r,t,e),facets:as(r,n)}}function an(i,t,e=globalThis){var m,b;let n=((m=e.document)==null?void 0:m.baseURI)??((b=e.location)==null?void 0:b.href),o=Qi(i,n),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(p,y,w)=>{let g;if(w){let x="",S=Qi(w,n);for(let M of r.keys())S.startsWith(M)&&M.length>x.length&&(x=M);g=x?r.get(x):void 0}!g&&r.size===1&&(g=a),g?g.set(p,y):s.q.push([p,y,w])},c=s.q;s.q=[],s.load=l;for(let[p,y,w]of c)l(p,y,w);e.__DOGSBAY_SEARCH__=s;let d=async(p,y)=>(a.has(p)||await t(i+y),a.get(p)),h,f={meta:()=>h??(h=d(Qt.docs,Zt.docs).then(p=>{if(!p||p.format!==5)throw new Error(`search index format ${(p==null?void 0:p.format)??"missing"}, expected ${5}: rebuild the site`);return p}).catch(p=>{throw h=void 0,p})),shard:async p=>(await f.meta()).shards.includes(p)?d(Qt.shard(p),Zt.shard(p)):void 0,fragment:p=>d(Qt.fragment(p),Zt.fragment(p))};return f}function Qi(i,t){try{return new URL(i,t).href}catch{return i}}function ln(i){let t,e=new URL(i||"./",location.href).pathname;return async n=>{t??(t=import(new URL(`${i}pagefind/pagefind.js`,location.href).href).catch(d=>{throw t=void 0,d}));let o=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(d,h)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),b=(f.sub_results??[]).map(p=>[p.title,p.url.split("#")[1]??""]).filter(([,p])=>p);return{id:h,title:f.meta.title??m,url:m,section:"",score:r.length-h,fragment:[fs(f.excerpt),b],sections:b.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,h)=>a(d,h+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function fs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function cn(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=s.textContent??"",a=an(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?ln(i.unitRoot):void 0,h=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),h?s.textContent=o.dataset.needsServer??"":d||a.meta().catch(()=>s.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",L=>{let A=L.target.closest("input, textarea, select, [contenteditable]");(L.key==="/"&&!A||L.key.toLowerCase()==="k"&&(L.metaKey||L.ctrlKey))&&(L.preventDefault(),e.open?n.focus():e.show())},{signal:t}),o.addEventListener("click",L=>{L.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,b;n.addEventListener("input",()=>{clearTimeout(b),b=setTimeout(()=>void w(++f),80)},{signal:t});let p=new Map,y=typeof IntersectionObserver=="function"?new IntersectionObserver(L=>{var A;for(let E of L)E.isIntersecting&&((A=p.get(E.target))==null||A(),p.delete(E.target),y.unobserve(E.target))}):void 0,w=async L=>{let A=n.value.trim();if(!A){y==null||y.disconnect(),p.clear(),g.hidden=!0,o.replaceChildren(),s.textContent=r;return}if(!h)try{if(d){let E=await d(A);if(L!==f)return;D(A,E.results,E.highlight,E.total);let C=await E.more;L===f&&C.length&&v(A,C,E.highlight)}else{let E=await rn(A,a);if(L!==f)return;m=E.parsed,D(A,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{L===f&&(s.textContent="Search index could not be loaded.")}},g=document.createElement("div");g.setAttribute("role","group"),g.setAttribute("aria-label",o.dataset.filterSection??"Filter by section"),g.className="flex flex-wrap gap-1 px-3 pb-2",g.hidden=!0,o.before(g),t==null||t.addEventListener("abort",()=>{clearTimeout(b),f++,y==null||y.disconnect(),p.clear(),g.remove()});let x=L=>L.replace(/"/g,""),S=L=>`section:"${x(L)}"`,M,H=(L,A)=>{let E=new Map;for(let T of A)T.section&&E.set(T.section,(E.get(T.section)??0)+1);let C=[...L.matchAll(/section:"([^"]*)"/gi)].map(T=>T[1].toLowerCase()),O=T=>C.includes(x(T).toLowerCase()),k=[...E].sort((T,R)=>R[1]-T[1]).slice(0,6).map(([T])=>T);for(let T of C)k.some(R=>x(R).toLowerCase()===T)||k.push(T);g.replaceChildren(...k.length>1||C.length?k.map(T=>{let R=document.createElement("button");R.type="button";let _=O(T);return R.setAttribute("aria-pressed",String(_)),R.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",R.textContent=T,R.addEventListener("click",()=>{let P=S(T),tt=n.value.replace(new RegExp(`\\\\s*section:"${x(T).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=T,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),R}):[]),g.hidden=!g.childElementCount,M!==void 0&&(([...g.querySelectorAll("button")].find(R=>R.textContent===M)??n).focus(),M=void 0)},D=(L,A,E,C,O=A)=>{y==null||y.disconnect(),p.clear(),H(L,O),o.replaceChildren(...q(L,A,E)),s.textContent=C?`${C} result${C===1?"":"s"}`:`${o.dataset.noResults} \\u201C${L}\\u201D`},v=(L,A,E)=>o.append(...q(L,A,E)),q=(L,A,E)=>{let C=[];for(let O of A){let k=I(O.url,E,"block rounded-md p-3 hover:bg-accent"),T=document.createElement("div");if(T.className="font-medium",T.append(...Oe(O.title,E)),k.a.appendChild(T),O.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=O.section,k.a.appendChild(P)}let R=document.createElement("div");R.className="mt-1 line-clamp-2 text-xs text-muted-foreground",k.a.appendChild(R),C.push(k.li);let _=()=>O.fragment?(O.fragment[0]&&R.replaceChildren(...Oe(O.fragment[0],E)),(O.sections??[]).map(([P,tt])=>{let Bt=I(`${O.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return Bt.a.append(...Oe(P,E)),Bt.li})):[];if(O.fragment)C.push(..._());else if(y){let P=m??Lt(L);p.set(k.li,()=>void sn(P,[O],a).then(()=>k.li.after(..._()),()=>{})),y.observe(k.li)}}return C},I=(L,A,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let O=document.createElement("a");return O.setAttribute("data-part","option"),O.dataset.value=L,O.href=ms(i.unitRoot+L,A),O.tabIndex=-1,O.className=E,C.appendChild(O),{li:C,a:O}}}function ms(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,o]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function Oe(i,t){if(!t.length)return[document.createTextNode(i)];let e=new RegExp(`(${t.map(n=>n.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return i.split(e).map((n,o)=>{if(o%2===0)return document.createTextNode(n);let s=document.createElement("mark");return s.textContent=n,s})}var dn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function un(i){var p;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(y=>y.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=y=>y.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((y,w)=>w.length-y.length),s=o.filter(y=>dn.test(y)).map(n),r=o.filter(y=>!dn.test(y)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:y=>{var w;return(w=y.parentElement)!=null&&w.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),h=[];for(let y=d.nextNode();y;y=d.nextNode())h.push(y);for(let y of h){if(c.length>=500)break;let w=y.data;if(l.lastIndex=0,!l.test(w))continue;l.lastIndex=0;let g=document.createDocumentFragment(),x=0;for(let S of w.matchAll(l)){g.append(w.slice(x,S.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=S[0],g.append(M),c.push(M),x=S.index+S[0].length}g.append(w.slice(x)),y.replaceWith(g)}if(ps(),!c.length)return;let f=((p=document.querySelector("[data-clear-highlights]"))==null?void 0:p.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=f,b.addEventListener("click",()=>{var y;for(let w of c)w.replaceWith(document.createTextNode(w.textContent??""));e.normalize(),m.remove(),(y=document.getElementById("db-content"))==null||y.focus({preventScroll:!0})},{signal:i}),m.append(b),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function ps(){try{let i=new URL(location.href);i.searchParams.delete("h"),history.replaceState(history.state,"",i.toString())}catch{}}var pt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},ie=function(t){return t.tagName==="IMG"},gs=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},hn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},fn=function(t){try{return Array.isArray(t)?t.filter(ie):gs(t)?[].slice.call(t).filter(ie):ne(t)?[t].filter(ie):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ie):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},bs=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},vs=function(t){var e=t.getBoundingClientRect(),n=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=n+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},kt=function(t,e){var n=pt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),o},ys=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(A){function E(){}A(E,E)},o=function(A){var E=A.target;if(E===q){b();return}x.indexOf(E)!==-1&&p({target:E})},s=function(){if(!(M||!v.original)){var A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-A)>D.scrollOffset&&setTimeout(b,150)}},r=function(A){var E=A.key||A.keyCode;(E==="Escape"||E==="Esc"||E===27)&&b()},a=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A;if(A.background&&(q.style.background=A.background),A.container&&A.container instanceof Object&&(E.container=pt({},D.container,A.container)),A.template){var C=ne(A.template)?A.template:document.querySelector(A.template);E.template=C}return D=pt({},D,E),x.forEach(function(O){O.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},D,A))},c=function(){for(var A=arguments.length,E=Array(A),C=0;C<A;C++)E[C]=arguments[C];var O=E.reduce(function(k,T){return[].concat(k,fn(T))},[]);return O.filter(function(k){return x.indexOf(k)===-1}).forEach(function(k){x.push(k),k.classList.add("medium-zoom-image")}),S.forEach(function(k){var T=k.type,R=k.listener,_=k.options;O.forEach(function(P){P.addEventListener(T,R,_)})}),I},d=function(){for(var A=arguments.length,E=Array(A),C=0;C<A;C++)E[C]=arguments[C];v.zoomed&&b();var O=E.length>0?E.reduce(function(k,T){return[].concat(k,fn(T))},[]):x;return O.forEach(function(k){k.classList.remove("medium-zoom-image"),k.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),x=x.filter(function(k){return O.indexOf(k)===-1}),I},h=function(A,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(O){O.addEventListener("medium-zoom:"+A,E,C)}),S.push({type:"medium-zoom:"+A,listener:E,options:C}),I},f=function(A,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(O){O.removeEventListener("medium-zoom:"+A,E,C)}),S=S.filter(function(O){return!(O.type==="medium-zoom:"+A&&O.listener.toString()===E.toString())}),I},m=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A.target,C=function(){var k={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},T=void 0,R=void 0;if(D.container)if(D.container instanceof Object)k=pt({},k,D.container),T=k.width-k.left-k.right-D.margin*2,R=k.height-k.top-k.bottom-D.margin*2;else{var _=ne(D.container)?D.container:document.querySelector(D.container),P=_.getBoundingClientRect(),tt=P.width,Bt=P.height,bn=P.left,vn=P.top;k=pt({},k,{width:tt,height:Bt,left:bn,top:vn})}T=T||k.width-D.margin*2,R=R||k.height-D.margin*2;var Ot=v.zoomedHd||v.original,yn=hn(Ot)?T:Ot.naturalWidth||T,wn=hn(Ot)?R:Ot.naturalHeight||R,qt=Ot.getBoundingClientRect(),En=qt.top,xn=qt.left,ae=qt.width,le=qt.height,An=Math.min(Math.max(ae,yn),T)/ae,Sn=Math.min(Math.max(le,wn),R)/le,ce=Math.min(An,Sn),Cn=(-xn+(T-ae)/2+D.margin+k.left)/ce,Ln=(-En+(R-le)/2+D.margin+k.top)/ce,Me="scale("+ce+") translate3d("+Cn+"px, "+Ln+"px, 0)";v.zoomed.style.transform=Me,v.zoomedHd&&(v.zoomedHd.style.transform=Me)};return new n(function(O){if(E&&x.indexOf(E)===-1){O(I);return}var k=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),O(I)};if(v.zoomed){O(I);return}if(E)v.original=E;else if(x.length>0){var T=x;v.original=T[0]}else{O(I);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:I}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,v.zoomed=vs(v.original),document.body.appendChild(q),D.template){var R=ne(D.template)?D.template:document.querySelector(D.template);v.template=document.createElement("div"),v.template.appendChild(R.content.cloneNode(!0)),document.body.appendChild(v.template)}if(v.original.parentElement&&v.original.parentElement.tagName==="PICTURE"&&v.original.currentSrc&&(v.zoomed.src=v.original.currentSrc),document.body.appendChild(v.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),v.original.classList.add("medium-zoom-image--hidden"),v.zoomed.classList.add("medium-zoom-image--opened"),v.zoomed.addEventListener("click",b),v.zoomed.addEventListener("transitionend",k),v.original.getAttribute("data-zoom-src")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("srcset"),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading"),v.zoomedHd.src=v.zoomed.getAttribute("data-zoom-src"),v.zoomedHd.onerror=function(){clearInterval(_),console.warn("Unable to reach the zoom image target "+v.zoomedHd.src),v.zoomedHd=null,C()};var _=setInterval(function(){v.zoomedHd.complete&&(clearInterval(_),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",b),document.body.appendChild(v.zoomedHd),C())},10)}else if(v.original.hasAttribute("srcset")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading");var P=v.zoomedHd.addEventListener("load",function(){v.zoomedHd.removeEventListener("load",P),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",b),document.body.appendChild(v.zoomedHd),C()})}else C()})},b=function(){return new n(function(A){if(M||!v.original){A(I);return}var E=function C(){v.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(v.zoomed),v.zoomedHd&&document.body.removeChild(v.zoomedHd),document.body.removeChild(q),v.zoomed.classList.remove("medium-zoom-image--opened"),v.template&&document.body.removeChild(v.template),M=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:I}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,A(I)};M=!0,document.body.classList.remove("medium-zoom--opened"),v.zoomed.style.transform="",v.zoomedHd&&(v.zoomedHd.style.transform=""),v.template&&(v.template.style.transition="opacity 150ms",v.template.style.opacity=0),v.original.dispatchEvent(kt("medium-zoom:close",{detail:{zoom:I}})),v.zoomed.addEventListener("transitionend",E)})},p=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A.target;return v.original?b():m({target:E})},y=function(){return D},w=function(){return x},g=function(){return v.original},x=[],S=[],M=!1,H=0,D=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&c(t),D=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var q=bs(D.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var I={open:m,close:b,toggle:p,update:a,clone:l,attach:c,detach:d,on:h,off:f,getOptions:y,getImages:w,getZoomedImage:g};return I};function ws(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}var Es=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";ws(Es);var mn=ys;var xs;function pn(i){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let n=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!n.length)return;let o=xs??(xs=mn());o.update(e),o.attach(...n),i==null||i.addEventListener("abort",()=>{o.close(),o.detach(...n)});let s={signal:i},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of n)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function oe(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var De=new Map;function gn(i){let t=De.get(i);return t||(t=new Promise((e,n)=>{let o=document.createElement("script");o.src=i,o.onload=()=>e(),o.onerror=()=>{De.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(o)}),De.set(i,t)),t}function As(i){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem("theme",n?"dark":"light")}catch{}e()},{signal:i})})}function Ss(i){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:i})}function Cs(i,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(n=>{n.addEventListener("change",async()=>{var a;let o=n.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=n.value;if(o.hasAttribute("data-link")){(oe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!oe(r)||!oe(s))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${i}${s}/`:i;await gn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Ls(i){document.addEventListener("click",t=>{var n;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(n=navigator.clipboard)==null||n.writeText(e.href).catch(()=>{})},{signal:i})}var $t=new Map,re=new Set;function se(){for(let[i,t]of $t)i.isConnected||(st(i),t.abort(),$t.delete(i));for(let i of re)i.isConnected||st(i)}function ks(i,t){let e=EventTarget.prototype,n=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;n.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return o}function Ts(){se(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if($t.has(i)||re.has(i))return;let t=new AbortController;ks(t.signal,()=>Se(i))?$t.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&re.add(i)}),document.removeEventListener("keydown",se),document.addEventListener("keydown",se)}var Tt;function Re(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,o=n.dataset.unitRoot??"",s=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),Ts(),i.theme!==!1&&As(e),Ss(e),i.switchers!==!1&&Cs(s,e),Ls(e),i.search!==!1&&cn({unitRoot:o,loadScript:gn,signal:e}),un(e),pn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...$t.keys(),...re])st(a);se(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Re()):Re();})();\n';
|
|
1358
|
-
var CLIENT_FILE = "dogsbay-
|
|
1359
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
1377
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Lo=Object.defineProperty;var ko=(n,t,e)=>t in n?Lo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var f=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=class extends HTMLElement{constructor(){super(...arguments);f(this,"_initialized",!1);f(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},To={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},En="dogsbay-elements-display";function G(){if(typeof document>"u"||document.getElementById(En))return;let n=Object.entries(To).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=En,t.textContent=n,document.head.prepend(t)}function Oo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Ut(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Oo(n[i]));return i}var re=class{constructor(n,t,e={}){f(this,"container");f(this,"itemSelector");f(this,"opts");f(this,"keydownHandler",null);f(this,"active",!1);this.container=n,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&n==="ArrowDown"}isBackwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&n==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=n=>{let t=this.getItems();if(t.length===0||n.ctrlKey||n.altKey||n.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",i=t.indexOf(document.activeElement);if(i===-1)return;let o=null;this.isForwardKey(n.key,e)?(o=Ut(t,i,!1),o>=t.length&&(o=this.opts.loop?Ut(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Ut(t,i,!0),o<0&&(o=this.opts.loop?Ut(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Ut(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Ut(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Do=0;function Sn(n){return`${n}-${++Do}`}var An=class extends Y{constructor(){super(...arguments);f(this,"list");f(this,"triggers",[]);f(this,"panels",[]);f(this,"nav",null);f(this,"value","");f(this,"syncKey",null);f(this,"orientation","horizontal");f(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let i=e.dataset.value;i&&this.select(i)});f(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});f(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||Sn("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Sn("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new re(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(i=o),this.select(i)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let i=e.dataset.value===t;e.setAttribute("aria-selected",String(i)),e.setAttribute("tabindex",i?"0":"-1"),i?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let i=e.dataset.value===t;e.hidden=!i,i?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};G();customElements.get("db-tabs")||customElements.define("db-tabs",An);var Ro=0;function Mo(n){return`${n}-${++Ro}`}var Cn=class{constructor(n,t,e={}){f(this,"trigger");f(this,"content");f(this,"_open",!1);f(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Mo("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Ln=class extends Y{constructor(){super(...arguments);f(this,"items",[]);f(this,"nav",null);f(this,"openValues",new Set);f(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],i=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=i.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new Cn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new re(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(i=>i.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};G();customElements.get("db-accordion")||customElements.define("db-accordion",Ln);var Io=0;function Z(n){return`${n}-${++Io}`}function At(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function Q(n,t){return At(n,t)[0]??null}function Wt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function dt(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function kn(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Yt(n){if(n.hidden=!1,!kn())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(kn())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var No=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Tn(n){return Array.from(n.querySelectorAll(No)).filter(t=>!t.closest("[hidden]")&&!dt(t))}function On(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Xt(n){try{return decodeURIComponent(n)}catch{return n}}var Rn=class extends Y{constructor(){super(...arguments);f(this,"details",null);f(this,"summary",null);f(this,"dialog",null);f(this,"body",null);f(this,"source",null);f(this,"moved",[]);f(this,"handledHash",null);f(this,"onSummaryClick",t=>{var i,o;let e=t.target;e&&e!==this.summary&&((o=(i=e.closest)==null?void 0:i.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});f(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let i=e.getBoundingClientRect();!(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});f(this,"onDialogClose",()=>this.restore());f(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let i=new URL(e.href,location.href);if(!i.hash||i.hash!==location.hash||i.pathname!==location.pathname||i.search!==location.search)return;let o=document.getElementById(Xt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});f(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,i=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!i)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,Ho();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=Z("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Z("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,i;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Xt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},Dn="dogsbay-details-sheet";function Ho(){if(document.getElementById(Dn))return;let n=document.createElement("style");n.id=Dn,n.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(n)}G();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Rn);var Mn=class extends Y{constructor(){super(...arguments);f(this,"copyBtn",null);f(this,"copyIcon",null);f(this,"checkIcon",null);f(this,"liveRegion",null);f(this,"resetTimeout",null);f(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let i=this.querySelector("[data-part=\'code\']");return(i==null?void 0:i.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};G();customElements.get("db-code-block")||customElements.define("db-code-block",Mn);var In=class extends Y{constructor(){super(...arguments);f(this,"navData",null);f(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let i=e.closest("[data-part=\'item\']");i&&this.toggle(i)});f(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return l(i[s+1]);case"ArrowUp":return l(i[s-1]);case"Home":return l(i[0]);case"End":return l(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(u&&this.contains(u)){let h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of At(this,"[data-part=\'item\']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of At(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),i=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e||!i)return;e.id||(e.id=Z("db-nav-group")),i.setAttribute("aria-controls",e.id),i instanceof HTMLButtonElement&&!i.hasAttribute("type")&&(i.type="button");let o=i.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,o)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return At(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=_o(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("base")??"",o=this.getAttribute("toggle-label")??"Toggle {label}",s=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=`${e}.${d}`,h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let p=document.createElement("div");p.setAttribute("data-part","row"),h.appendChild(p);let b=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(b)&&!/^(?:https?|mailto):/i.test(b)&&(a=null);let v=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(b),w=null;if(l!=null&&l.length){if(w=document.createElement("button"),w.type="button",w.setAttribute("data-part","toggle"),w.setAttribute("aria-expanded","false"),a!=null)w.setAttribute("aria-label",o.replace("{label}",()=>r));else{let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,w.appendChild(g)}w.insertAdjacentHTML("beforeend",Fo)}let m=this.getAttribute("toggle-position")==="end";if(w&&!m&&p.appendChild(w),a!=null){let g=document.createElement("a");g.setAttribute("data-part","link"),g.textContent=r,g.href=v?a:i+a,v&&(g.rel="noopener"),!c&&g.href.split("#")[0]===s&&g.setAttribute("aria-current","page"),p.appendChild(g)}if(a==null&&!(l!=null&&l.length)){let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,p.appendChild(g)}if(w&&m&&p.appendChild(w),l!=null&&l.length){let g=document.createElement("ul");g.setAttribute("data-part","group"),g.dataset.lazy="",g.dataset.path=u,g.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(g),this.prepareItem(h)}return h})}},Fo=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function _o(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}G();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",In);var Nn=class extends Y{constructor(){super(...arguments);f(this,"links",[]);f(this,"headings",[]);f(this,"observer",null);f(this,"active",null);f(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});f(this,"onHash",()=>{let t=Xt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Xt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};G();customElements.get("db-toc")||customElements.define("db-toc",Nn);var Po=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ve=Po.join(","),_n=typeof Element>"u",ae=_n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!_n&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},xe=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):xe(t.parentNode));return r},zo=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},$o=function(t,e,i){if(xe(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ve));return e&&ae.call(t,Ve)&&o.unshift(t),o=o.filter(i),o},je=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!xe(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=je(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,Ve);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!xe(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var p=je(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scopeParent:r,candidates:p})}else s.unshift.apply(s,r.children)}}return o},Pn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zo(t))&&!Pn(t)?0:t.tabIndex},Bo=function(t,e){var i=zn(t);return i<0&&e&&!Pn(t)?0:i},qo=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},$n=function(t){return t.tagName==="INPUT"},Ko=function(t){return $n(t)&&t.type==="hidden"},Vo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},jo=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},Uo=function(t){if(!t.name)return!0;var e=t.form||we(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=jo(o,t.form);return!s||s===t},Wo=function(t){return $n(t)&&t.type==="radio"},Yo=function(t){return Wo(t)&&!Uo(t)},Go=function(t){var e,i=t&&we(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,u;i=we(o),o=(c=i)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Hn=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},Xo=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=ae.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ae.call(c,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=we(t);if(u&&!u.shadowRoot&&o(u)===!0)return Hn(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(Go(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Hn(t);return!1},Zo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return ae.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Qo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||Vo(e)||Zo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Qo(t,e))},Jo=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Bn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=Bo(a,r),c=r?Bn(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):i.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),i.sort(qo).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Ue=function(t,e){e=e||{};var i;return e.getShadowRoot?i=je([t],e.includeContainer,{filter:Fn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Jo}):i=$o(t,e.includeContainer,Fn.bind(null,e)),Bn(i)};var We=class{constructor(n,t={}){f(this,"root");f(this,"opts");f(this,"previouslyFocused",null);f(this,"keydownHandler",null);f(this,"active",!1);this.root=n,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=n=>{if(n.key!=="Tab")return;let t=Ue(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Ue(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=n[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var et,It=(et=class{static activate(){if(et.count++,et.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;et.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){et.count=Math.max(0,et.count-1),!(et.count>0)&&et.originalStyles&&(document.body.style.overflow=et.originalStyles.overflow,document.body.style.paddingRight=et.originalStyles.paddingRight,et.originalStyles=null)}static reset(){et.count=0,et.originalStyles=null}},f(et,"count",0),f(et,"originalStyles",null),et);var vt=[];function ts(n){if(n.key!=="Escape"||vt.length===0)return;let t=vt[vt.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var qn=!1;function es(){qn||(qn=!0,document.addEventListener("keydown",ts))}var Nt=class{constructor(n,t){f(this,"root");f(this,"opts");f(this,"outsideHandler",null);f(this,"active",!1);f(this,"frameId",null);f(this,"escapePrevented",!1);this.root=n,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(es(),vt.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(vt.length>0&&vt[vt.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let n=vt.indexOf(this);n!==-1&&vt.splice(n,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function Ye(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var Kn=class extends Y{constructor(){super(...arguments);f(this,"content",null);f(this,"backdrop",null);f(this,"trigger",null);f(this,"native",!1);f(this,"_open",!1);f(this,"openedBy",null);f(this,"focusTrap",null);f(this,"dismiss",null);f(this,"cleanupInert",null);f(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});f(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});f(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let i=e.getAttribute("data-dialog-for");i&&(i===this.id||i===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});f(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});f(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});f(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=Q(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Q(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Q(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Z("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=Z("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let i=t.querySelector("[data-part=\'description\']");i&&!t.hasAttribute("aria-describedby")&&(i.id||(i.id=Z("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new We(t),this.dismiss=new Nt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(It.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=Ye(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(It.deactivate(),this.native){let l=i;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,On(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-dialog")||customElements.define("db-dialog",Kn);var Vn=class extends Y{constructor(){super(...arguments);f(this,"input",null);f(this,"listbox",null);f(this,"empty",null);f(this,"_open",!1);f(this,"highlighted",null);f(this,"observer",null);f(this,"base",Z("db-combobox"));f(this,"optionSeq",0);f(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});f(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});f(this,"onKey",t=>{let e=this.visible(),i=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?0:Math.min(i+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?e.length-1:Math.max(i-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});f(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||dt(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});f(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!dt(e)&&!e.hidden&&this.highlight(e)});f(this,"onListDown",t=>t.preventDefault());f(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!dt(t))}setup(){if(this.input=Q(this,"[data-part=\'input\']"),this.listbox=Q(this,"[data-part=\'listbox\']"),this.empty=Q(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var i;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(i=this.observer)==null||i.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};G();customElements.get("db-combobox")||customElements.define("db-combobox",Vn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,mt=n=>({x:n,y:n}),ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(n,t,e){return ut(n,Ct(t,e))}function Zt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Qt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function pt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Ze(n){return Ge(pt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Qt(n),o=Ze(n),s=Xe(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=le(r)),[r,le(r)]}function Gn(n){let t=le(n);return[Ee(n),t,Ee(t)]}function Ee(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var jn=["left","right"],Un=["right","left"],is=["top","bottom"],os=["bottom","top"];function ss(n,t,e){switch(n){case"top":case"bottom":return e?t?Un:jn:t?jn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Qt(n),s=ss(Lt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Ee)))),s}function le(n){let t=Lt(n);return ns[t]+n.slice(t.length)}function rs(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function Zn(n){return typeof n!="number"?rs(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function Qn(n,t,e){let{reference:i,floating:o}=n,s=pt(t),r=Ze(t),a=Xe(r),l=Lt(t),c=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,p;switch(l){case"top":p={x:d,y:i.y-o.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-o.width,y:u};break;default:p={x:i.x,y:i.y}}let b=Qt(t);return b&&(p[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),p}async function Jn(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Zt(t,n),b=Zn(p),w=a[h?u==="floating"?"reference":"floating":u],m=Ht(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(w)))==null||e?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},I=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(m.top-I.top+b.top)/C.y,bottom:(I.bottom-m.bottom+b.bottom)/C.y,left:(m.left-I.left+b.left)/C.x,right:(I.right-m.right+b.right)/C.x}}var as=50,ti=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:Jn},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=Qn(c,i,l),h=i,p=0,b={};for(let v=0;v<s.length;v++){let w=s[v];if(!w)continue;let{name:m,fn:g}=w,{x,y:C,data:I,reset:L}=await g({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:n,floating:t}});d=x??d,u=C??u,b[m]={...b[m],...I},L&&p<as&&(p++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(c=L.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):L.rects),{x:d,y:u}=Qn(c,h,l)),v=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:b}};var ei=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...w}=Zt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let m=Lt(o),g=pt(a),x=Lt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=h||(x||!v?[le(a)]:Gn(a)),L=b!=="none";!h&&L&&I.push(...Xn(a,v,b,C));let E=[a,...I],y=await l.detectOverflow(t,w),X=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&X.push(y[m]),u){let P=Yn(o,r,C);X.push(y[P[0]],y[P[1]])}if(z=[...z,{placement:o,overflows:X}],!X.every(P=>P<=0)){var U,S;let P=(((U=s.flip)==null?void 0:U.index)||0)+1,B=E[P];if(B&&(!(u==="alignment"?g!==pt(B):!1)||z.every(K=>pt(K.placement)===g?K.overflows[0]>0:!0)))return{data:{index:P,overflows:z},reset:{placement:B}};let F=(S=z.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:S.placement;if(!F)switch(p){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=pt(K.placement);return J===g||J==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(J=>J>0).reduce((J,nt)=>J+nt,0)]).sort((K,J)=>K[1]-J[1])[0])==null?void 0:O[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};var ls=new Set(["left","top"]);async function cs(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Lt(e),a=Qt(e),l=pt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Zt(t,n),{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}var ni=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await cs(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},ii=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x,y:C}=g;return{x,y:C}}},...c}=Zt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=pt(o),p=Ge(h),b=d[p],v=d[h],w=(g,x)=>Wn(x+u[g==="y"?"top":"left"],x,x-u[g==="y"?"bottom":"right"]);r&&(b=w(p,b)),a&&(v=w(h,v));let m=l.fn({...t,[p]:b,[h]:v});return{...m,data:{x:m.x-e,y:m.y-i,enabled:{[p]:r,[h]:a}}}}}};var oi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Zt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Qt(e),u=pt(e)==="y",{width:h,height:p}=i.floating,b,v;c==="top"||c==="bottom"?(b=c,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=c,b=d==="end"?"top":"bottom");let w=p-l.top-l.bottom,m=h-l.left-l.right,g=Ct(p-l[b],w),x=Ct(h-l[v],m),C=t.middlewareData.shift,I=!C,L=g,E=x;C!=null&&C.enabled.x&&(E=m),C!=null&&C.enabled.y&&(L=w),I&&!d&&(u?E=h-2*ut(l.left,l.right):L=p-2*ut(l.top,l.bottom)),await r({...t,availableWidth:E,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function _t(n){return ri(n)?(n.nodeName||"").toLowerCase():"#document"}function st(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function gt(n){var t;return(t=(ri(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function ri(n){return Se()?n instanceof Node||n instanceof st(n).Node:!1}function ht(n){return Se()?n instanceof Element||n instanceof st(n).Element:!1}function yt(n){return Se()?n instanceof HTMLElement||n instanceof st(n).HTMLElement:!1}function si(n){return!Se()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof st(n).ShadowRoot}function ue(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=ft(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function ai(n){return/^(table|td|th)$/.test(_t(n))}function he(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,us=/paint|layout|strict|content/,Ft=n=>!!n&&n!=="none",Qe;function Ae(n){let t=ht(n)?ft(n):n;return Ft(t.transform)||Ft(t.translate)||Ft(t.scale)||Ft(t.rotate)||Ft(t.perspective)||!Ce()&&(Ft(t.backdropFilter)||Ft(t.filter))||ds.test(t.willChange||"")||us.test(t.contain||"")}function li(n){let t=kt(n);for(;yt(t)&&!te(t);){if(Ae(t))return t;if(he(t))return null;t=kt(t)}return null}function Ce(){return Qe==null&&(Qe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qe}function te(n){return/^(html|body|#document)$/.test(_t(n))}function ft(n){return st(n).getComputedStyle(n)}function fe(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function kt(n){if(_t(n)==="html")return n;let t=n.assignedSlot||n.parentNode||si(n)&&n.host||gt(n);return si(t)?t.host:t}function ci(n){let t=kt(n);return te(t)?(n.ownerDocument||n).body:yt(t)&&ue(t)?t:ci(t)}function Jt(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=ci(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=st(o);if(s){let a=Le(r);return t.concat(r,r.visualViewport||[],ue(o)?o:[],a&&e?Jt(a):[])}else return t.concat(o,Jt(o,[],e))}function Le(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hi(n){let t=ft(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=yt(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=ce(e)!==s||ce(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function tn(n){return ht(n)?n:n.contextElement}function ee(n){let t=tn(n);if(!yt(t))return mt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=hi(t),r=(s?ce(e.width):e.width)/i,a=(s?ce(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var hs=mt(0);function fi(n){let t=st(n);return!Ce()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===st(n)}function Pt(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=tn(n),r=mt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):mt(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=st(s),p=ht(i)?st(i):i,b=h,v=Le(b);for(;v&&p!==b;){let w=ee(v),m=v.getBoundingClientRect(),g=ft(v),x=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*w.x,C=m.top+(v.clientTop+parseFloat(g.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=x,c+=C,b=st(v),v=Le(b)}}return Ht({width:d,height:u,x:l,y:c})}function ke(n,t){let e=fe(n).scrollLeft;return t?t.left+e:Pt(gt(n)).left+e}function mi(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-ke(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=gt(i),a=t?he(t.floating):!1;if(i===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=mt(1),d=mt(0),u=yt(i);if((u||!s)&&((_t(i)!=="body"||ue(r))&&(l=fe(i)),u)){let p=Pt(i);c=ee(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}let h=r&&!u&&!s?mi(r,l):mt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:e.y*c.y-l.scrollTop*c.y+d.y+h.y}}function ps(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gs(n){let t=fe(n),e=n.ownerDocument.body,i=ut(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ut(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+ke(n),r=-t.scrollTop;return ft(e).direction==="rtl"&&(s+=ut(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var bs=25;function vs(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=st(n),s=gt(n),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let h=!Ce()||t==="fixed";i?h||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,h&&(c=r.offsetLeft,d=r.offsetTop))}if(ke(s)<=0){let h=s.ownerDocument,p=h.body,b=getComputedStyle(p),v=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-p.clientWidth-v),m=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;m<=bs&&(a-=m)}return{width:a,height:l,x:c,y:d}}function ys(n,t){let e=Pt(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ee(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,l=o*s.x,c=i*s.y;return{width:r,height:a,x:l,y:c}}function di(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=vs(n,e,t);else if(t==="document")i=gs(gt(n));else if(ht(t))i=ys(t,e);else{let o=fi(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(i)}function ws(n,t){let e=t.get(n);if(e)return e;let i=Jt(n,[],!1).filter(a=>ht(a)&&_t(a)!=="body"),o=null,s=ft(n).position==="fixed",r=s?kt(n):n;for(;ht(r)&&!te(r);){let a=ft(r),l=Ae(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=kt(r)}return t.set(n,i),i}function xs(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?he(t)?[]:ws(t,this._c):[].concat(e),i],a=di(t,r[0],o),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let p=di(t,r[h],o);l=ut(p.top,l),c=Ct(p.right,c),d=Ct(p.bottom,d),u=ut(p.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Es(n){let{width:t,height:e}=hi(n);return{width:t,height:e}}function Ss(n,t,e){let i=yt(t),o=gt(t),s=e==="fixed",r=Pt(n,!0,s,t),a={scrollLeft:0,scrollTop:0},l=mt(0);if((i||!s)&&((_t(t)!=="body"||ue(o))&&(a=fe(t)),i)){let h=Pt(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!i&&o&&(l.x=ke(o));let c=o&&!i&&!s?mi(o,a):mt(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function Je(n){return ft(n).position==="static"}function ui(n,t){if(!yt(n)||ft(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return gt(n)===e&&(e=e.ownerDocument.body),e}function pi(n,t){let e=st(n);if(he(n))return e;if(!yt(n)){let o=kt(n);for(;o&&!te(o);){if(ht(o)&&!Je(o))return o;o=kt(o)}return e}let i=ui(n,t);for(;i&&ai(i)&&Je(i);)i=ui(i,t);return i&&te(i)&&Je(i)&&!Ae(i)?e:i||li(n)||e}var As=async function(n){let t=this.getOffsetParent||pi,e=this.getDimensions,i=await e(n.floating);return{reference:Ss(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cs(n){return ft(n).direction==="rtl"}var Ls={convertOffsetParentRelativeRectToViewportRelativeRect:ms,getDocumentElement:gt,getClippingRect:xs,getOffsetParent:pi,getElementRects:As,getClientRects:ps,getDimensions:Es,getScale:ee,isElement:ht,isRTL:Cs};function gi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function ks(n,t,e){let i=null,o,s=gt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:p,top:b,width:v,height:w}=h;if(d||t(),!v||!w)return;let m=de(b),g=de(s.clientWidth-(p+v)),x=de(s.clientHeight-(b+w)),C=de(p),L={rootMargin:-m+"px "+-g+"px "+-x+"px "+-C+"px",threshold:ut(0,Ct(1,u))||1},E=!0;function y(X){let z=X[0].intersectionRatio;if(!gi(h,n.getBoundingClientRect()))return a();if(z!==u){if(!E)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{i=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,L)}i.observe(n)}let l=st(n),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function bi(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=tn(n),d=o||s?[...c?Jt(c):[],...t?Jt(t):[]]:[];d.forEach(m=>{o&&m.addEventListener("scroll",e),s&&m.addEventListener("resize",e)});let u=c&&a?ks(c,e,s):null,h=-1,p=null;r&&(p=new ResizeObserver(m=>{let[g]=m;g&&g.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),e()}),c&&!l&&p.observe(c),t&&p.observe(t));let b,v=l?Pt(n):null;l&&w();function w(){let m=Pt(n);v&&!gi(v,m)&&e(),v=m,b=requestAnimationFrame(w)}return e(),()=>{var m;d.forEach(g=>{o&&g.removeEventListener("scroll",e),s&&g.removeEventListener("resize",e)}),u==null||u(),(m=p)==null||m.disconnect(),p=null,l&&cancelAnimationFrame(b)}}var vi=ni;var yi=ii,wi=ei,xi=oi;var Ei=(n,t,e)=>{let i=new Map,o=e??{},s={...Ls,...o.platform,_c:i};return ti(n,t,{...o,platform:s})};function zt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[vi(s),...r?[wi({padding:l})]:[],...a?[yi({padding:l})]:[],...c?[xi({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,bi(n,t,async()=>{let h=await Ei(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let p=h.placement.split("-")[0];t.setAttribute("data-side",p)})}var en=class{constructor(n){f(this,"opts");f(this,"buffer","");f(this,"timerId",null);f(this,"timeout");this.opts=n,this.timeout=n.timeout??1e3}handle(n){if(n.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=n.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Si=class extends Y{constructor(){super(...arguments);f(this,"trigger",null);f(this,"content",null);f(this,"valueEl",null);f(this,"items",[]);f(this,"nativeSelect",null);f(this,"hiddenInput",null);f(this,"labelEl",null);f(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});f(this,"dismiss",null);f(this,"typeahead",null);f(this,"cleanupFloating",null);f(this,"_open",!1);f(this,"_value","");f(this,"highlighted",-1);f(this,"syncing",!1);f(this,"onNativeChange",()=>{this.syncing||this.refresh()});f(this,"onFormReset",()=>setTimeout(()=>this.refresh()));f(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});f(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});f(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let i=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(i+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(i-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(i+10,e.length-1));case"PageUp":return o(Math.max(i-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});f(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||dt(e)||(this.select(e),this.close())});f(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(e)&&this.highlight(this.items.indexOf(e))});f(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(i=>i.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var i;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(i=this.trigger)==null||i.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!dt(t))}setup(){var a,l;if(this.nativeSelect=Q(this,"select"),this.nativeSelect&&!Q(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Q(this,"[data-part=\'trigger\']"),this.content=Q(this,"[data-part=\'content\']"),this.valueEl=Q(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=At(this,"[data-part=\'item\']");let i=Z("db-select");e.id||(e.id=`${i}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${i}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),At(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=Z("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new en({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Nt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&dt(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=Z("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,h)=>{let p=document.createElement("div");p.setAttribute("data-part","item"),p.className="db-select-item",p.dataset.value=u.value;for(let[b,v]of Object.entries(u.dataset))v!=null&&(p.dataset[b]=v);u.disabled&&p.setAttribute("aria-disabled","true"),p.textContent=u.textContent??u.value,h.appendChild(p)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let p=document.createElement("div");p.setAttribute("data-part","label"),p.className="db-select-label",p.textContent=u.label,h.appendChild(p);for(let b of Array.from(u.children))b instanceof HTMLOptionElement&&d(b,h);c.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!dt(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],i=this.content;if(!e||!i||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(dt(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:i},bubbles:!0}))}};G();customElements.get("db-select")||customElements.define("db-select",Si);var Ai=class extends Y{constructor(){super(...arguments);f(this,"trigger",null);f(this,"content",null);f(this,"dismiss",null);f(this,"cleanupFloating",null);f(this,"_open",!1);f(this,"onTriggerClick",()=>this.toggle());f(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Z("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Z("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new Nt(t,{onDismiss:i=>this.close(i)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Tn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-popover")||customElements.define("db-popover",Ai);var Ci="db-announcement-closed:";var Li=class extends Y{constructor(){super(...arguments);f(this,"closeButton",null);f(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var i;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ci+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};G();customElements.get("db-announcement")||customElements.define("db-announcement",Li);var ki=class extends Y{constructor(){super(...arguments);f(this,"trigger",null);f(this,"content",null);f(this,"cleanupFloating",null);f(this,"showTimer",null);f(this,"hideTimer",null);f(this,"_open",!1);f(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});f(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});f(this,"onContentEnter",()=>this.clearTimers());f(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});f(this,"onBlur",()=>this.hide());f(this,"onPress",()=>this.hide());f(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let i=Number(this.getAttribute(t));return Number.isFinite(i)&&this.hasAttribute(t)?i:e}setup(){var e;if(this.trigger=Wt(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Z("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let i=Yt(e);this.setState("open"),this.cleanupFloating=zt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};G();customElements.get("db-tooltip")||customElements.define("db-tooltip",ki);var Ti="sidebar_state",Ts="b",Os=768,me=new WeakMap;function Ds(n){try{return localStorage.getItem(n)}catch{return null}}function Rs(n,t){try{localStorage.setItem(n,t)}catch{}}function sn(n){if(me.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ds(Ti),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Os-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};me.set(n,u),Oi(u);let h=v=>{u.isMobile=v.matches,!v.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let p=v=>{v.key===Ts&&(v.metaKey||v.ctrlKey)?(v.preventDefault(),nn(n)):v.key==="Escape"&&u.openMobile&&(v.preventDefault(),Tt(n))};document.addEventListener("keydown",p),Ms(n,u),c&&c.addEventListener("click",()=>{Tt(n)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{nn(n)})}function Ms(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{nn(n)})})}function nn(n){let t=me.get(n);t&&(t.isMobile?t.openMobile?Tt(n):Is(n):(t.open=!t.open,Oi(t),Rs(Ti,String(t.open))))}function Oi(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Is(n){var i;let t=me.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),It.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Tt(n){var o;let t=me.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),It.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function on(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{sn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",on):on();document.addEventListener("astro:page-load",on);var Di=/^[a-z][a-z0-9_-]{0,63}$/,Te={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Oe={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Ns={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Hs={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Fs="[^aeiou]",an="[aeiouy]",Ot="("+Fs+"[^aeiouy]*)",Re="("+an+"[aeiou]*)",rn=new RegExp("^"+Ot+"?"+Re+Ot),_s=new RegExp("^"+Ot+"?"+Re+Ot+Re+"?$"),De=new RegExp("^"+Ot+"?("+Re+Ot+"){2,}"),Ri=new RegExp("^"+Ot+"?"+an),Mi=new RegExp("^"+Ot+an+"[^aeiouwxy]$"),Ps=/ll$/,zs=/^(.+?)e$/,$s=/^(.+?)y$/,Bs=/^(.+?(s|t))(ion)$/,qs=/^(.+?)(ed|ing)$/,Ks=/(at|bl|iz)$/,Vs=/^(.+?)eed$/,js=/^.+?[^s]s$/,Us=/^.+?(ss|i)es$/,Ws=/([^aeiouylsz])\\1$/,Ys=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Gs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Xs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ii(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Us.test(t)?t=t.slice(0,-2):js.test(t)&&(t=t.slice(0,-1));let i;return(i=Vs.exec(t))?rn.test(i[1])&&(t=t.slice(0,-1)):(i=qs.exec(t))&&Ri.test(i[1])&&(t=i[1],Ks.test(t)?t+="e":Ws.test(t)?t=t.slice(0,-1):Mi.test(t)&&(t+="e")),(i=$s.exec(t))&&Ri.test(i[1])&&(t=i[1]+"i"),(i=Ys.exec(t))&&rn.test(i[1])&&(t=i[1]+Ns[i[2]]),(i=Gs.exec(t))&&rn.test(i[1])&&(t=i[1]+Hs[i[2]]),(i=Xs.exec(t))?De.test(i[1])&&(t=i[1]):(i=Bs.exec(t))&&De.test(i[1])&&(t=i[1]),(i=zs.exec(t))&&(De.test(i[1])||_s.test(i[1])&&!Mi.test(i[1]))&&(t=i[1]),Ps.test(t)&&De.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ni=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Zs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,pe;function Qs(n){if(pe===void 0)try{pe=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{pe=null}if(pe)return[...pe.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function $t(n){let t=[];for(let e of n.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Ni.has(s)&&t.push(s)}for(let s of o)Zs.test(s)?t.push(...Qs(s)):s.length>=2&&!Ni.has(s)&&t.push(s)}return t}function ln(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ge(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ii(t):t}function Bt(n,t={}){var w,m;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(g=>Di.test(g)&&g!=="tag"&&g!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(g=>{var x;return{facetNeg:g[1]==="-",facet:(x=g[2])==null?void 0:x.toLowerCase(),value:g[3]??g[4],neg:g[5],phrase:g[6],word:g[7]}}),p=!1,b=!1;for(let[g,x]of h.entries()){if(x.facet){let O=hn(x.value??"");if(!O)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(O):((w=x.facetNeg?c:l)[m=x.facet]??(w[m]=[])).push(O);continue}let C=x.word;if(C==="OR"){b=e.length>0,s=!0;continue}if(C==="NOT"){p=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=x.phrase!==void 0,L=p||x.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;p=!1;let E=I?x.phrase:L&&(C!=null&&C.startsWith("-"))?C.slice(1):C,y=[...new Set($t(E))];if(!y.length){b=!1;continue}if(L){i.push(I?y:[y[0]]),s=!0,b=!1;continue}if(I){b=!1,s=!0,y.length>1&&o.push($t(E).join(" "));for(let O of y)e.push({terms:[O],prefix:!1,exact:!0});continue}let X=g===h.length-1&&!/\\s$/.test(n);if(b){e[e.length-1].terms.push(y[0]);for(let O of y.slice(1))e.push({terms:[O],prefix:!1});b=!1;continue}let z=y[0],U=/[._-]/.test(z),S=z.replace(/-/g,"");for(let[O,P]of y.entries())e.push({terms:[P],prefix:X&&P.length>=2&&(O===y.length-1||U&&(P===z||P===S))})}let v=[...new Set(e.flatMap(g=>g.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:v,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function Js(n,t){let e=await t.meta(),i=typeof n=="string"?Bt(n,{facets:fn([e])}):n,o=await zi(i,e,t),s=qi(i,e);if(!i.groups.length)return $i(e,o,s);let r=[];for(let l of i.groups)r.push(await nr(l,e,t));let a=dn(r,e,o,s,"and").sort(Me);return a.length||i.strict?a:dn(r,e,o,s,"or").sort(Me)}var Me=(n,t)=>t.score-n.score;async function zi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Bi(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let u=0;u<c.length;u+=2)(!s||s.has(c[u]))&&d.add(c[u]);s=d}for(let r of s??[])i.add(r)}return i}function $i(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function dn(n,t,e,i,o){let s=new Map,r=new Map;for(let l of n)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||i&&!i(l)||o==="and"&&r.get(l)!==n.length)continue;let[d,u,h]=t.docs[l];a.push({id:l,title:d,url:u,section:t.sections[h]??"",score:c*(r.get(l)/n.length)})}return a}var wt={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function tr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Bi(n,t,e=!1){let i=er(t);for(let s=Math.min(n.length,Hi);s>=1;s--){let r=ln(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ln(n,Math.min(n.length,Hi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Hi=3,Fi=new WeakMap;function er(n){let t=Fi.get(n);return t||Fi.set(n,t=new Set(n.shards)),t}function hn(n){return n.replace(/"/g,"").trim().toLowerCase()}function qi(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,m])=>m.length),r=Object.entries(n.notFacets??{}).filter(([,m])=>m.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(m,g)=>new Set(m.flatMap((x,C)=>g.includes(hn(x))?[C]:[])),l=a(t.sections,i),c=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=m=>(t.facets??[]).findIndex(g=>g.name===m),p=m=>m.map(([g,x])=>{let C=h(g);return[C,C<0?new Set:a(t.facets[C].values,x)]}),b=p(s),v=p(r).filter(([m])=>m>=0),w=(m,[g,x])=>{var C;return g>=0&&(((C=m[4])==null?void 0:C[g])??[]).some(I=>x.has(I))};return m=>{let g=t.docs[m],x=g[3]??[];if(i.length&&!l.has(g[2])||e.length&&!x.some(C=>c.has(C))||d.has(g[2])||x.some(C=>u.has(C)))return!1;for(let C of b)if(!w(g,C))return!1;for(let C of v)if(w(g,C))return!1;return!0}}function fn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function Ki(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${hn(r)}`,l=i.get(a);l===void 0&&i.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var u;let d=(u=r.facets)==null?void 0:u[c];if(d)for(let h of new Set(l))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function nr(n,t,e){let i=await ji(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,Vi(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function Vi(n,t){let e=new Map;for(let[i,o]of n.lists)for(let s=0;s<i.length;s+=2)e.set(i[s],Math.max(e.get(i[s])??0,i[s+1]*o*t));return e}async function ji(n,t,e,i){let o=ge(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Bi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let p=(m,g)=>{g>(s.get(m)??0)&&(s.set(m,g),r.set(m,h))};Object.hasOwn(h,d)&&p(d,1);let b=o==null?void 0:o(d),v=b?b.slice(0,Math.max(3,b.length-1)):void 0,w=0;for(let m in h)m!==d&&(n.prefix&&m.startsWith(d)&&w++<200&&p(m,wt.prefix),b&&v&&m.startsWith(v)&&o(m)===b&&p(m,wt.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let m in h)Math.abs(m.length-d.length)<=1&&tr(d,m)&&p(m,wt.typo)}let a=[...s].filter(([,d])=>d===wt.typo).map(([d])=>d),l=[...s].map(([d,u])=>[r.get(d)[d],u]),c=new Set;for(let[d]of l)for(let u=0;u<d.length;u+=2)c.add(d[u]);return{lists:l,docs:c,corrected:a}}var Ui=n=>typeof n=="function"?n:()=>n;async function Wi(n,t){let e=Ui(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>{try{l.set(d,await o.fragment(d))}catch{l.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function Yi(n){let t=Ui(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ge((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function Gi(n,t,e,i=10){let o=t.slice(0,i);await Wi(o,e);let s=n.groups,r=await Yi(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],u=$t(a.title),h=1;s.length&&s.every(b=>u.some(v=>l(v,b)))&&(h=_i(u,s,l)?wt.titleExact:wt.titleAll);let p=[];for(let[b,v]of d){let w=$t(b);!s.length||!s.every(m=>w.some(g=>l(g,m)))||(p.push([b,v]),h=Math.max(h,_i(w,s,l)?wt.headingExact:wt.headingAll))}if(a.sections=p.slice(0,3),n.phrases.length){let b=[a.title,c,...d.map(([v])=>v)].map(v=>$t(v).join(" ")).join(" \\0 ");n.phrases.every(v=>b.includes(v))&&(h*=wt.phrase)}a.score*=h}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(i)]}async function Xi(n,t,e){await Wi(t,e);let i=await Yi(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=$t(r);return n.groups.length>0&&n.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function _i(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function Zi(n,t,e=10){let i=await t.meta(),o=Bt(n,{facets:fn([i])}),s=ge(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await Js(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await Gi(o,r,t,e),facets:Ki(r,i)}}async function ir(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function or(n,t,e,i){let o=e,s=new Set,r=[],a=async(L,E)=>{if(!s.has(L))try{return await E()}catch(y){s.add(L),r.push({source:L,error:y});return}},l=t.flatMap((L,E)=>e[E]?[E]:[]),c=[];await Promise.all(l.map(async L=>c[L]=await a(L,()=>zi(n,o[L],t[L].data))??new Set));let d=[],u=[],h=(L,E)=>Promise.all(l.map(y=>a(y,()=>ji(L,o[y],t[y].data,E)))),p=L=>L.every((E,y)=>!(E!=null&&E.docs.size)||s.has(l[y]));for(let L of n.groups){let E=await h(L,!1);u.push(p(E)),u[u.length-1]&&(E=await h(L,!0)),d.push(E)}for(let[L,E]of n.groups.entries())u[L]||!p(d[L])||(E.corrected=void 0,d[L]=await h(E,!0));if(l.length&&l.every(L=>s.has(L)))throw r[0].error;let b=l.filter(L=>!s.has(L)),v=[];for(let L of b)v[L]=qi(n,o[L]);let w=(L,E)=>L.map(y=>({...y,source:E,score:y.score*sr(t[E])})),m=L=>({results:rr(L,t),failed:[...s].sort((E,y)=>E-y),errors:r});if(!n.groups.length)return m(b.flatMap(L=>w($i(o[L],c[L],v[L]),L)).sort(Me));let g=t.map(()=>[]),x=b.reduce((L,E)=>L+o[E].count,0);n.groups.forEach((L,E)=>{let y=d[E],X=l.flatMap((S,O)=>s.has(S)?[]:[[S,y[O]]]),z=[...new Set(X.flatMap(([,S])=>S.corrected))];L.corrected=z.length?z:void 0;let U=X.reduce((S,[,O])=>S+O.docs.size,0);for(let[S,O]of X)g[S].push(Vi(O,i.stats==="own"?un(o[S].count,O.docs.size):un(x,U)))});let C=L=>b.flatMap(E=>w(dn(g[E],o[E],c[E],v[E],L),E)).sort(Me),I=C("and");return m(I.length||n.strict?I:C("or"))}function sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function rr(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function Qi(n,t,e=10,i={}){let o=await ir(t),s=Bt(n,{facets:fn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ge(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(p=>p.length>=3)])])}let{results:a,failed:l,errors:c}=await or(s,t,o,i);for(let u of l)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=Ki(a,u=>o[u.source]);return{parsed:s,results:await Gi(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:c}}function mn(n,t,e=globalThis){var p,b;let i=((p=e.document)==null?void 0:p.baseURI)??((b=e.location)==null?void 0:b.href),o=Pi(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(v,w,m)=>{let g;if(m){let x="",C=Pi(m,i);for(let I of r.keys())C.startsWith(I)&&I.length>x.length&&(x=I);g=x?r.get(x):void 0}!g&&r.size===1&&(g=a),g?g.set(v,w):s.q.push([v,w,m])},c=s.q;s.q=[],s.load=l;for(let[v,w,m]of c)l(v,w,m);e.__DOGSBAY_SEARCH__=s;let d=async(v,w)=>(a.has(v)||await t(n+w),a.get(v)),u,h={meta:()=>u??(u=d(Oe.docs,Te.docs).then(v=>{if(!v||v.format!==5)throw new Error(`search index format ${(v==null?void 0:v.format)??"missing"}, expected ${5}: rebuild the site`);return v}).catch(v=>{throw u=void 0,v})),shard:async v=>(await h.meta()).shards.includes(v)?d(Oe.shard(v),Te.shard(v)):void 0,fragment:v=>d(Oe.fragment(v),Te.fragment(v))};return h}function Pi(n,t){try{return new URL(n,t).href}catch{return n}}function Ji(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let p=await u.data(),b=p.url.startsWith(e)?p.url.slice(e.length):p.url.replace(/^\\/+/,""),v=(p.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:p.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(p.excerpt),v],sections:v.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return c.catch(()=>{}),{results:l,more:c,later:(u,h)=>Promise.all(r.slice(u,u+h).map((p,b)=>a(p,u+b))),total:r.length,highlight:Bt(i).highlight}}}function ar(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function to(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(m=>m.prefix===t);if(!i)return{};let o=m=>m.product??"",s=m=>{var g;return((g=n==null?void 0:n.products)==null?void 0:g[m])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=m=>{var g;return(g=s(o(m)).versions)==null?void 0:g.find(x=>x.id===m.version)},a=m=>{var g,x;return((x=(g=n==null?void 0:n.products)==null?void 0:g[m])==null?void 0:x.label)??(m||(n==null?void 0:n.name)||"")},l=m=>{var g;return[o(m)!==o(i)?a(o(m)):"",m.version!==void 0?((g=r(m))==null?void 0:g.label)??m.version:""].filter(Boolean).join(" \\xB7 ")},c=m=>({prefix:m.prefix,product:o(m),label:l(m),own:m===i,versioned:m.version!==void 0}),d=e.filter(m=>m.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(m=>m.id),p=m=>{var g;return m===i?-2:m.version===u.defaultVersion?-1:(g=r(m))!=null&&g.prerelease?h.length+h.indexOf(m.version):h.indexOf(m.version)},b=d.filter(m=>{var g;return o(m)===o(i)&&m.version!==void 0&&(m===i||!((g=r(m))!=null&&g.hidden))}).sort((m,g)=>p(m)-p(g)),v=[];for(let m of d){let g=o(m);if(v.some(I=>o(I)===g))continue;if(g===o(i)){v.push(i);continue}let x=d.filter(I=>o(I)===g),C=s(g).defaultVersion;v.push(x.find(I=>I.version===C)??x.find(I=>{var L;return!((L=r(I))!=null&&L.hidden)})??x[0])}let w={};return b.length>1&&(w.versions=b.map(c)),v.length>1&&(w.products=v.map(c)),(w.versions||w.products)&&(w.version=[c(i)]),w}var eo=1.5;function no(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,l)=>{let c=o[l];c!=null&&c.length&&(e[a.name]=c.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var xt=n=>n.trim().toLowerCase();function io(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(xt));if(!o.some(r=>s.has(xt(r))))return!1}return!0}function oo(n,t,e){return n.filter(i=>io(t(i),e))}function so(n,t,e,i){var s;let o={};for(let r of i){let a={},l=new Map;for(let c of n){let d=t(c);if(!((s=d[r])!=null&&s.length)||!io(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(xt(h)))continue;u.add(xt(h));let p=l.get(xt(h))??(l.set(xt(h),h),h);a[p]=(a[p]??0)+1}}for(let c of e[r]??[])l.has(xt(c))||(a[c]=0);Object.keys(a).length&&(o[r]=a)}return o}function ro(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>xt(a)===xt(r))||e[s].push(r)}return e}function lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function ao(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=cr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function cr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ne(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function lo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function co(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function uo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function ho(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?ur(e.nav,new Set(t.map(s=>s.value))):void 0;return dr(n,t,e.display,o)}return hr(n,t,e.nav,e.display)}function dr(n,t,e,i){let o=new Map,s=[];for(let c of t){let d=c.value.split("/").filter(p=>p.length>0);if(d.length===0)continue;let u="",h=null;for(let p=0;p<d.length;p++){u=u?`${u}/${d[p]}`:d[p];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:p,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),p===d.length-1&&(b.count=c.count,b.hasValue=!0),h=b}}let r=(c,d)=>{if(i){let u=i.get(c.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return c.count!==d.count?d.count-c.count:c.value.localeCompare(d.value)},a=c=>{if(c.children.length!==0){c.children.sort(r);for(let d of c.children)a(d)}},l=s.map(c=>o.get(c));l.sort(r);for(let c of l)a(c);return l}function ur(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=fo(r.href);for(let l=0;l<a.length;l++){let c=a[l];if(!t.has(c))continue;let d="";for(let u=l;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function hr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,l=h=>{if(h.length===0)return;let p=r,b=a;for(let v=0;v<h.length;v++){let w=h[v],m=b.get(w);if(!m){let x=o.get(w);m={value:w,label:ne(n,w,i),count:x?x.count:0,depth:v,hasValue:x!==void 0,children:[]},p.push(m),b.set(w,m),x&&s.add(w)}let g=c.get(m);g||(g=new Map,c.set(m,g)),p=m.children,b=g}},c=new Map,d=h=>{for(let p of h){if(p.href){let b=fo(p.href);l(b)}p.children&&p.children.length>0&&d(p.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,p)=>h.value.localeCompare(p.value)),[...r,...u]}function fo(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var fr=6e4,mr=30,Ie=20,pr=["version","versions","products"];function po(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=bo(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let l=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!l||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let c=document.querySelector("[data-db-search-page] [data-db-search-input]");c&&!e.open?c.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function go(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=gr(),r=s.get("p")||void 0,a=s.get("v")||void 0,l=s.get("scope")??(s.get("q")?"version":void 0),c=bo(n,{input:e,list:i,status:o,page:!0,params:s,scope:l,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",c.activate(),e.value.trim()&&c.run()}function gr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var mo=()=>!location.search&&location.hash.includes("=");function bo(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var xn;let{signal:l}=n,c=i.textContent??"",d=mn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",p=u==="pagefind"||u==="both"&&h?Ji(n.unitRoot):void 0,b=u==="pagefind"&&!h,v=n.siteRoot??"",w=n.prefix??"",m={},g="version",x,C=`db-search-scope:${new URL(v||"./",location.href).pathname}`,I=()=>{let A=window.__DOGSBAY_SITE__;if(r&&A&&L(A)||(r=void 0,p))return;m=to(A,w);let T=s??pn(()=>sessionStorage.getItem(C)),k=g;T&&Object.prototype.hasOwnProperty.call(m,T)&&(g=T),Dt(),g!==k&&t.value.trim()&&Vt(++$)},L=A=>{var V,W;let T=A.units??[],k=T.find(q=>q.prefix===w);if(!k)return!1;let N=r.product??k.product??"",M=T.filter(q=>q.locale===k.locale&&(q.product??"")===N),D=((W=(V=A.products)==null?void 0:V[N])==null?void 0:W.defaultVersion)??A.defaultVersion,H=r.version!==void 0?M.find(q=>q.version===r.version||q.prefix&&q.prefix.split("/").pop()===r.version):M.find(q=>q===k)??M.find(q=>q.version===D)??M[0];if(!H||H.prefix===w||!H.search)return!1;let _=new URLSearchParams(a);_.delete("p"),_.delete("v");let R=_.toString();return location.replace(`${y(H.prefix)}${H.search}${R?mo()?`#${R}`:`?${R}`:""}`),!0},E=()=>x??(x=n.loadScript(`${v}_dogsbay/site.js`).then(I,I)),y=A=>`${v}${A?`${A}/`:""}`,X=new Map([[w,d]]),z=A=>{let T=X.get(A);return T||X.set(A,T=mn(`${y(A)}_dogsbay/search/`,n.loadScript,window)),T},U=new Map,S=((xn=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:xn.querySelector("[data-db-search-facets]"))??void 0,O=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),P=S?Object.keys(O):[],B=o&&a?ro(a,P):{},F=()=>{r&&E(),b?i.textContent=e.dataset.needsServer??"":p||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),E())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void Vt(++$),80)},{signal:l});let nt=new Map,it=typeof IntersectionObserver=="function"?new IntersectionObserver(A=>{var T;for(let k of A)k.isIntersecting&&((T=nt.get(k.target))==null||T(),nt.delete(k.target),it.unobserve(k.target))}):void 0,Kt=A=>{if(!o||r)return;let T=new URLSearchParams;A&&T.set("q",A),g!=="version"&&T.set("scope",g);for(let[M,D]of Object.entries(B))for(let H of D)T.append("filter",`${M}:${H}`);let k=T.toString(),N=mo();pn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},Vt=async A=>{let T=t.value.trim();if(Kt(T),!T){it==null||it.disconnect(),nt.clear(),rt.hidden=!0,S&&(S.hidden=!0),Rt=void 0,e.replaceChildren(),lt.hidden=at.hidden=!0,i.textContent=c;return}if(!b){Rt=void 0;try{if(p){let k=await p(T);if(A!==$)return;if(o){let N=await k.more;if(A!==$)return;ye(T,[...k.results,...N].slice(0,Ie),k.highlight,k.total,k.later)}else{ye(T,k.results,k.highlight,k.total);let N=await k.more;A===$&&N.length&&Ao(T,N,k.highlight)}}else if(g!=="version"&&m[g]){let k=Date.now(),N=m[g],M=N.filter(R=>R.own||k-(U.get(R.prefix)??-1/0)>fr),D=await Qi(T,M.map(R=>({data:z(R.prefix),boost:R.own?eo:1,collapse:R.product})));for(let R of D.missing)U.set(M[R].prefix,Date.now());if(A!==$)return;K=D.parsed;let H=D.results.map(R=>{var W;let V=M[R.source];return Object.assign(R,{base:y(V.prefix),from:V.own?void 0:V.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(V.prefix)})}),_=D.missing.length+N.length-M.length;await ve(A,T,H,D.parsed.highlight,_?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(_))}`:"")}else{let k=await Zi(T,d);if(A!==$)return;K=k.parsed,await ve(A,T,k.results,k.parsed.highlight,"")}}catch{if(A!==$)return;i.textContent="Search index could not be loaded.",S&&(S.hidden=!0)}}},rt=document.createElement("div");rt.setAttribute("role","group"),rt.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),rt.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",rt.hidden=!0,e.before(rt);let ot=document.createElement("div");ot.setAttribute("role","group"),ot.setAttribute("aria-label",e.dataset.scope??"Search in"),ot.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",ot.hidden=!0,rt.before(ot);let at=document.createElement("a");at.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",at.dataset.dbSearchSeeAll="",at.hidden=!0;let lt=document.createElement("button");lt.type="button",lt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",lt.textContent=e.dataset.more??"More results",lt.hidden=!0,e.after(o?lt:at);let Dt=()=>{var k,N;let A=pr.filter(M=>m[M]),T={version:((N=(k=m.version)==null?void 0:k[0])==null?void 0:N.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};ot.replaceChildren(...A.map(M=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=M,D.setAttribute("aria-pressed",String(M===g)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=T[M]??M,D.addEventListener("click",()=>{var H;g!==M&&(g=M,pn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?Vt(++$):Kt(""))},{signal:l}),D})),ot.hidden=A.length<2};l==null||l.addEventListener("abort",()=>{clearTimeout(J),$++,it==null||it.disconnect(),nt.clear(),rt.remove(),ot.remove(),at.remove(),lt.remove()});let jt=A=>A.replace(/"/g,""),$e=A=>`section:"${jt(A)}"`,Et,se=(A,T)=>{let k=new Map;for(let H of T)H.section&&k.set(H.section,(k.get(H.section)??0)+1);let N=[...A.matchAll(/section:"([^"]*)"/gi)].map(H=>H[1].toLowerCase()),M=H=>N.includes(jt(H).toLowerCase()),D=[...k].sort((H,_)=>_[1]-H[1]).slice(0,6).map(([H])=>H);for(let H of N)D.some(_=>jt(_).toLowerCase()===H)||D.push(H);rt.replaceChildren(...D.length>1||N.length?D.map(H=>{let _=document.createElement("button");_.type="button";let R=M(H);return _.setAttribute("aria-pressed",String(R)),_.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",_.textContent=H,_.addEventListener("click",()=>{let V=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${jt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${V}`.trim(),Et=H,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:l}),_}):[]),rt.hidden=!rt.childElementCount,Et!==void 0&&(([...rt.querySelectorAll("button")].find(_=>_.textContent===Et)??t).focus(),Et=void 0)},Rt,ve=async(A,T,k,N,M)=>{if(!P.length){ye(T,k,N,k.length),i.textContent+=M;return}let D=new Map;for(let _ of k){let R=_.data??d;D.has(R)||D.set(R,await R.meta())}if(A!==$)return;let H=new Map(k.map(_=>[_,no(D.get(_.data??d),_.id)]));Rt={q:T,results:k,terms:N,note:M,valuesOf:_=>H.get(_)??{}},Mt()},Mt=()=>{if(!Rt)return;let{q:A,results:T,terms:k,note:N,valuesOf:M}=Rt,D=oo(T,M,B);Be(so(T,M,B,P)),ye(A,D,k,D.length),i.textContent+=N},St,Be=A=>{var H,_;if(!S)return;let T=lo(Object.keys(A),O);if(S.hidden=!T.length,!T.length)return S.replaceChildren();let k=(R,V,W,q)=>{let j=document.createElement("label");j.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let tt=document.createElement("input");tt.type="checkbox",tt.dataset.facetName=R,tt.dataset.facetValue=V,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===V.toLowerCase()),tt.className="size-3.5 rounded border-border accent-primary";let bt=document.createElement("span");bt.className="flex-1 truncate",bt.textContent=W;let Ke=document.createElement("span");return Ke.className="text-xs text-muted-foreground",Ke.textContent=String(q),j.append(tt,bt,Ke),j},N=(R,V)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of V){let j=document.createElement("li");if(q.hasValue)j.append(k(R,q.value,q.label,q.count));else{let tt=document.createElement("span");tt.className="block px-2 py-1 text-muted-foreground",tt.textContent=q.label,j.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),j.append(tt)}W.append(j)}return W},M=[],D=uo(B);if(D){let R=document.createElement("button");R.type="button",R.dataset.clearFilters="",R.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",R.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),M.push(R)}for(let R of T){let V=ao({[R]:A[R]})[R]??[],W=document.createElement("fieldset");W.className="mb-3";let q=document.createElement("legend");if(q.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",q.textContent=((H=O[R])==null?void 0:H.title)??R,W.append(q),(_=O[R])!=null&&_.hierarchical||V.some(j=>j.value.includes("/")))W.append(N(R,ho(R,V,{display:O})));else{let j=document.createElement("ul");j.className="space-y-0.5";for(let tt of V){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),j.append(bt)}W.append(j)}M.push(W)}S.replaceChildren(...M),St!==void 0&&(((St?[...S.querySelectorAll("input[data-facet-name]")].find(V=>`${V.dataset.facetName}\\0${V.dataset.facetValue}`===St):S.querySelector("[data-clear-filters]"))??t).focus(),St=void 0)};S==null||S.addEventListener("change",A=>{let T=A.target;if(!T.dataset.facetName)return;let k=T.dataset.facetName,N=T.dataset.facetValue,M=(B[k]??[]).find(D=>D.toLowerCase()===N.toLowerCase());B=co(B,k,M??N),St=`${k}\\0${N}`,Kt(t.value.trim()),Mt()},{signal:l}),S==null||S.addEventListener("click",A=>{A.target.closest("[data-clear-filters]")&&(B={},St="",Kt(t.value.trim()),Mt())},{signal:l});let ct,ye=(A,T,k,N,M)=>{it==null||it.disconnect(),nt.clear(),se(A,T);let D=T.slice(0,o?Ie:mr);if(ct={q:A,results:T,terms:k,shown:D.length,total:N,later:M},e.replaceChildren(...qe(A,D,k)),i.textContent=N?`${N} result${N===1?"":"s"}`:`${e.dataset.noResults} \\u201C${A}\\u201D`,lt.hidden=!o||!yn(),at.hidden=o||!N||!e.dataset.searchPage,!at.hidden){let H=new URLSearchParams({q:A});g!=="version"&&H.set("scope",g);for(let[_,R]of Object.entries(B))for(let V of R)H.append("filter",`${_}:${V}`);at.href=`${e.dataset.searchPage}?${H}`,at.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(N))}},Ao=(A,T,k)=>e.append(...qe(A,T,k)),yn=()=>!!ct&&(ct.results.length>ct.shown||!!ct.later&&ct.shown<ct.total);lt.addEventListener("click",async()=>{var N,M;let A=ct;if(!A)return;let T=A.results.slice(A.shown,A.shown+Ie);if(!T.length&&A.later){if(T=await A.later(A.shown,Ie).catch(()=>[]),A!==ct)return;A.results.push(...T)}let k=qe(A.q,T,A.terms);e.append(...k),A.shown+=T.length,lt.hidden=!T.length||!yn(),(M=(N=k[0])==null?void 0:N.querySelector("a"))==null||M.focus()},{signal:l});let qe=(A,T,k)=>{var M;let N=[];for(let D of T){let H=D.base??n.unitRoot,_=wn(H,D.url,k,"block rounded-md p-3 hover:bg-accent"),R=document.createElement("div");R.className="font-medium",R.append(...gn(D.title,k)),_.a.appendChild(R);let V=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(V){let j=document.createElement("div");j.className="text-xs text-muted-foreground",j.textContent=V,_.a.appendChild(j)}let W=document.createElement("div");if(W.className="mt-1 line-clamp-2 text-xs text-muted-foreground",_.a.appendChild(W),(M=D.also)!=null&&M.length){let j=document.createElement("div");j.className="mt-1 text-xs text-muted-foreground",j.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,_.a.appendChild(j)}N.push(_.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([j,tt])=>{let bt=wn(H,`${D.url}#${tt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return bt.a.append(...gn(j,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let j=K??Bt(A);nt.set(_.li,()=>void Xi(j,[D],D.data??d).then(()=>_.li.after(...q()),()=>{})),it.observe(_.li)}}return N},wn=(A,T,k,N)=>{let M=document.createElement("li");o||M.setAttribute("role","none"),M.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=T,D.tabIndex=-1),D.href=br(A+T,k),D.className=N,M.appendChild(D),{li:M,a:D}};return{activate:F,run:()=>void Vt(++$)}}function pn(n){try{return n()}catch{return}}function br(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function gn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var vo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function yo(n){var v;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(w=>w.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=w=>w.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((w,m)=>m.length-w.length),s=o.filter(w=>vo.test(w)).map(i),r=o.filter(w=>!vo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var m;return(m=w.parentElement)!=null&&m.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let w=d.nextNode();w;w=d.nextNode())u.push(w);for(let w of u){if(c.length>=500)break;let m=w.data;if(l.lastIndex=0,!l.test(m))continue;l.lastIndex=0;let g=document.createDocumentFragment(),x=0;for(let C of m.matchAll(l)){g.append(m.slice(x,C.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=C[0],g.append(I),c.push(I),x=C.index+C[0].length}g.append(m.slice(x)),w.replaceWith(g)}if(vr(),!c.length)return;let h=((v=document.querySelector("[data-clear-highlights]"))==null?void 0:v.dataset.clearHighlights)??"Clear highlights",p=document.createElement("div");p.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=h,b.addEventListener("click",()=>{var w;for(let m of c)m.replaceWith(document.createTextNode(m.textContent??""));e.normalize(),p.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),p.append(b),e.prepend(p),location.hash||c[0].scrollIntoView({block:"center"})}function vr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var qt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Ne=function(t){return t.tagName==="IMG"},yr=function(t){return NodeList.prototype.isPrototypeOf(t)},He=function(t){return t&&t.nodeType===1},wo=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},xo=function(t){try{return Array.isArray(t)?t.filter(Ne):yr(t)?[].slice.call(t).filter(Ne):He(t)?[t].filter(Ne):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Ne):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},wr=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},xr=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},ie=function(t,e){var i=qt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},Er=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(S){function O(){}S(O,O)},o=function(S){var O=S.target;if(O===X){b();return}x.indexOf(O)!==-1&&v({target:O})},s=function(){if(!(I||!y.original)){var S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(L-S)>E.scrollOffset&&setTimeout(b,150)}},r=function(S){var O=S.key||S.keyCode;(O==="Escape"||O==="Esc"||O===27)&&b()},a=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S;if(S.background&&(X.style.background=S.background),S.container&&S.container instanceof Object&&(O.container=qt({},E.container,S.container)),S.template){var P=He(S.template)?S.template:document.querySelector(S.template);O.template=P}return E=qt({},E,O),x.forEach(function(B){B.dispatchEvent(ie("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(qt({},E,S))},c=function(){for(var S=arguments.length,O=Array(S),P=0;P<S;P++)O[P]=arguments[P];var B=O.reduce(function(F,$){return[].concat(F,xo($))},[]);return B.filter(function(F){return x.indexOf(F)===-1}).forEach(function(F){x.push(F),F.classList.add("medium-zoom-image")}),C.forEach(function(F){var $=F.type,K=F.listener,J=F.options;B.forEach(function(nt){nt.addEventListener($,K,J)})}),z},d=function(){for(var S=arguments.length,O=Array(S),P=0;P<S;P++)O[P]=arguments[P];y.zoomed&&b();var B=O.length>0?O.reduce(function(F,$){return[].concat(F,xo($))},[]):x;return B.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(ie("medium-zoom:detach",{detail:{zoom:z}}))}),x=x.filter(function(F){return B.indexOf(F)===-1}),z},u=function(S,O){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(B){B.addEventListener("medium-zoom:"+S,O,P)}),C.push({type:"medium-zoom:"+S,listener:O,options:P}),z},h=function(S,O){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(B){B.removeEventListener("medium-zoom:"+S,O,P)}),C=C.filter(function(B){return!(B.type==="medium-zoom:"+S&&B.listener.toString()===O.toString())}),z},p=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target,P=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},$=void 0,K=void 0;if(E.container)if(E.container instanceof Object)F=qt({},F,E.container),$=F.width-F.left-F.right-E.margin*2,K=F.height-F.top-F.bottom-E.margin*2;else{var J=He(E.container)?E.container:document.querySelector(E.container),nt=J.getBoundingClientRect(),it=nt.width,Kt=nt.height,Vt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:Vt,top:rt})}$=$||F.width-E.margin*2,K=K||F.height-E.margin*2;var ot=y.zoomedHd||y.original,at=wo(ot)?$:ot.naturalWidth||$,lt=wo(ot)?K:ot.naturalHeight||K,Dt=ot.getBoundingClientRect(),jt=Dt.top,$e=Dt.left,Et=Dt.width,se=Dt.height,Rt=Math.min(Math.max(Et,at),$)/Et,ve=Math.min(Math.max(se,lt),K)/se,Mt=Math.min(Rt,ve),St=(-$e+($-Et)/2+E.margin+F.left)/Mt,Be=(-jt+(K-se)/2+E.margin+F.top)/Mt,ct="scale("+Mt+") translate3d("+St+"px, "+Be+"px, 0)";y.zoomed.style.transform=ct,y.zoomedHd&&(y.zoomedHd.style.transform=ct)};return new i(function(B){if(O&&x.indexOf(O)===-1){B(z);return}var F=function it(){I=!1,y.zoomed.removeEventListener("transitionend",it),y.original.dispatchEvent(ie("medium-zoom:opened",{detail:{zoom:z}})),B(z)};if(y.zoomed){B(z);return}if(O)y.original=O;else if(x.length>0){var $=x;y.original=$[0]}else{B(z);return}if(y.original.dispatchEvent(ie("medium-zoom:open",{detail:{zoom:z}})),L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,y.zoomed=xr(y.original),document.body.appendChild(X),E.template){var K=He(E.template)?E.template:document.querySelector(E.template);y.template=document.createElement("div"),y.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&y.original.parentElement.tagName==="PICTURE"&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",b),y.zoomed.addEventListener("transitionend",F),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(J),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,P()};var J=setInterval(function(){y.zoomedHd.complete&&(clearInterval(J),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),P())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var nt=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",nt),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),P()})}else P()})},b=function(){return new i(function(S){if(I||!y.original){S(z);return}var O=function P(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(X),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),I=!1,y.zoomed.removeEventListener("transitionend",P),y.original.dispatchEvent(ie("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,S(z)};I=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(ie("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",O)})},v=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target;return y.original?b():p({target:O})},w=function(){return E},m=function(){return x},g=function(){return y.original},x=[],C=[],I=!1,L=0,E=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?E=t:(t||typeof t=="string")&&c(t),E=qt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},E);var X=wr(E.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var z={open:p,close:b,toggle:v,update:a,clone:l,attach:c,detach:d,on:u,off:h,getOptions:w,getImages:m,getZoomedImage:g};return z};function Sr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Ar=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Sr(Ar);var Eo=Er;var Cr;function So(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=Cr??(Cr=Eo());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of i)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function Fe(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var _e=new Map,Lr=15e3;function bn(n){let t=_e.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),Lr),a=()=>{clearTimeout(r),s.onload=s.onerror=null,_e.get(n)===e&&_e.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});_e.set(n,t=e)}return t}function kr(n){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function Tr(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function Or(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(Fe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Fe(r)||!Fe(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${n}${s}/`:n;await bn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Dr(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var be=new Map,ze=new Set;function Pe(){for(let[n,t]of be)n.isConnected||(Tt(n),t.abort(),be.delete(n));for(let n of ze)n.isConnected||Tt(n)}function Rr(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function Mr(){Pe(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(be.has(n)||ze.has(n))return;let t=new AbortController;Rr(t.signal,()=>sn(n))?be.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&ze.add(n)}),document.removeEventListener("keydown",Pe),document.addEventListener("keydown",Pe)}var oe;function vn(n={}){oe==null||oe.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";n.nav!==void 0&&(window.__DOGSBAY_NAV__=n.nav),Mr(),n.theme!==!1&&kr(e),Tr(e),n.switchers!==!1&&Or(s,e),Dr(e),n.search!==!1&&(po({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e}),go({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e})),yo(e),So(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...be.keys(),...ze])Tt(a);Pe(),oe===r&&(oe=void 0)}}};return oe=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vn()):vn();})();\n';
|
|
1378
|
+
var CLIENT_FILE = "dogsbay-7ffe1e5f0e.js";
|
|
1379
|
+
var SSG_VERSION = "0.2.0-beta.153";
|
|
1360
1380
|
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
1361
1381
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
1362
1382
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
@@ -1583,35 +1603,35 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
1583
1603
|
{%- endif %}
|
|
1584
1604
|
</section>
|
|
1585
1605
|
`, "partials/toc-popover.html": '{#- Table of contents in a header popover. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-popover relative" data-toc-popover><summary class="cursor-pointer list-none rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ toc_label }}</summary><div class="absolute right-0 z-50 mt-1 max-h-[70vh] w-64 overflow-y-auto rounded-md border bg-background p-3 shadow-md">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc-rail.html": '{#- Table of contents in a right-hand rail, with a visible title. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = toc_label -%}\n<div class="sticky top-12 hidden h-[calc(100vh-3rem)] w-56 shrink-0 overflow-y-auto border-l p-4 lg:block">\n{%- include "partials/toc.html" -%}\n</div>\n', "partials/toc-top.html": '{#- Table of contents above the content, collapsed. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-top not-prose mb-6 rounded-md border" data-toc-top><summary class="cursor-pointer list-none px-3 py-2 text-sm font-medium text-muted-foreground">{{ toc_label }}</summary><div class="border-t px-3 py-2">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc.html": '{#- The table-of-contents link list (DocsToc.astro), shared by toc-top, toc-rail and toc-popover.\n Context: headings = [{depth, id, text}], toc_label (aria-label), toc_title (visible heading, may be empty). -#}\n<db-toc offset="64"><nav class="text-sm" aria-label="{{ toc_label }}">\n{%- if toc_title %}<div class="text-xs font-semibold uppercase text-muted-foreground" aria-hidden="true">{{ toc_title }}</div>{% endif -%}\n<ul class="mt-2 space-y-1">\n{%- for h in headings -%}\n<li><a href="#{{ h.id }}" data-toc-link data-toc-slug="{{ h.id }}" class="block py-0.5 text-muted-foreground transition-colors hover:text-foreground data-[active]:font-medium data-[active]:text-foreground" style="padding-left:{{ (h.depth - 2) * 0.75 }}rem">{{ h.text }}</a></li>\n{%- endfor -%}\n</ul></nav></db-toc>\n{#- An included partial keeps its final newline (keepTrailingNewline); this strips it, since toc-top/rail/popover place the list inline. -#}\n', "partials/version-badge.html": '{#- The version badge above the title (Docusaurus\'s DocVersionBadge), on versions with `badge: true`.\n Context: versionBadge = "Version: 3.33" (the text, worded and filled in), or empty. -#}\n{%- if versionBadge -%}\n<div class="not-prose mb-3" data-version-badge><span class="inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium text-muted-foreground">{{ versionBadge }}</span></div>\n{%- endif -%}\n' };
|
|
1586
|
-
var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', "#db-content", "([^", "(here", "(index.ts)", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "?h=<terms>", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Product", "Search", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-input]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "a.db-anchor", "abort", "api", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "article", "be", "block", "border", "border-l", "both", "builtin", "button", "button,", "by", "center", "change", "click", "close-press", "could", "dark", "data", "data-link", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "disabled", "div", "file:", 'filter="none"', "flex", "flex-wrap", "fn", "folder", "font-medium", "fullNavLimit", "function", "gap-1", "gi", "giu", "group", "h-8", "highlights", "host", "hover:bg-accent", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "index", "index.html", "inline-flex", "inline>", "input", "input,", "inst", "installing", "items-center", "javascript:", "keydown", "li", "light", "line-clamp-2", "load", "loaded.", "loading", "loads.", "mark", "mark,", "mb-1", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "none", "not", "not-prose", "object", "once", "option", "own", "p-3", "page", "page.html#id", "page.html?h=terms#id", "pagefind", "pb-2", "product", "puts", "px-2.5", "px-3", "py-0.5", "py-1.5", "readDataScript:", "role", "rounded-full", "rounded-md", "script", "script,", "section", "select,", "select[data-db-switch]", "signal", "ssg.search:", "style,", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "theme", "true", "unit", "unmount()", "value", "versions", "when", "window.__DOGSBAY_NAV__"];
|
|
1606
|
+
var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', '"{n}").replace("{n}",', "#db-content", "#q=", "([^", "(hashed", "(here", "(inFragment()", "(index.ts)", "(the", "({n})", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search-facets.js", "./search-scope.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "1.0", "1.x", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "??", "?h=<terms>", "?q=", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/search/facets", "@dogsbay/search/format", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Also", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Gizmo", "More", "No", "Platform", "Product", "Search", "See", "String(missing))}", "This", "URL(siteRoot", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-filters]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-facets]", "[data-db-search-input]", "[data-db-search-list]", "[data-db-search-page]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "_dogsbay/site.js", "a-b", "a.db-anchor", "abort", "accent-primary", "all", "alone.", "and", "api", "applies", "are", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "arrive", "article", "be", "before", "block", "border", "border-border", "border-l", "both", "builtin", "button", "button,", "by", "category", "center", "change", "checkbox", "click", "close-press", "config", "could", "cursor-pointer", "dark", "data", "data-facets", "data-link", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "default,", "dialog", "disabled", "display,", "div", "docs.js", "each", "else", "except", "facet", "facets", "fieldset", "file:", "filter", 'filter="none"', "filter=name:value", "flex", "flex-1", "flex-wrap", "fn", "folder", "font-medium", "font-semibold", "for", "form", "from", "fullNavLimit", "function", "gap-1", "gap-2", "gi", "giu", "group", "h-8", "hidden", "highlights", "host", "hover:bg-accent", "hover:text-foreground", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "in", 'in"}', "index", "index.html", "inline-flex", "inline>", "input", "input,", "input[data-facet-name]", "inst", "install", "install/aws", "installing", "items-center", "its", "javascript:", "keydown", "label", "last", "later", "legend", "li", "light", "line-clamp-2", "list", "load", "loaded.", "loading", "loads.", "location.href).pathname}", "mark", "mark,", "mb-1", "mb-2", "mb-3", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "mt-4", "mx-3", "name\\0value", "names", "none", "not", "not-prose", "object", "once", "only", "option", "others", "own", "own,", "p-3", "p=", "page", "page,", "page.html#id", "page.html?h=terms#id", "pagefind", "parameters:", "pb-2", "pb-3", "platform", "product", "product,", "product.", "product;", "products", "products:", "puts", "px-2", "px-2.5", "px-3", "py-0.5", "py-1", "py-1.5", "py-2", "query", "query:", "readDataScript:", "reader", "results", "results,", "role", "rounded", "rounded-full", "rounded-md", "scope", "scope;", "scope=", "script", "script,", "search", "search.html", "searched", "section", "select,", "select[data-db-switch]", "signal", "site", "size-3.5", "space-y-0.5", "span", "ssg.search:", "string", "style,", "submit", "tag", "taxonomies", "text-center", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "them,", "theme", "they", "this", "to", "tracking-wide", "transition-colors", "true", "truncate", "ul", "unit", "unmount()", "uppercase", "v:", "v=", "value", "values", "version", "versions", "w-full", "way", "when", "window.__DOGSBAY_NAV__", "with", "{n}", "{}", "||"];
|
|
1587
1607
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
1588
1608
|
|
|
1589
1609
|
========================================================================
|
|
1590
|
-
@dogsbay/elements@0.2.0-beta.
|
|
1610
|
+
@dogsbay/elements@0.2.0-beta.153 (MIT)
|
|
1591
1611
|
https://github.com/dogsbay/dogsbay.git
|
|
1592
1612
|
|
|
1593
1613
|
Licensed under MIT; the package ships no licence file.
|
|
1594
1614
|
|
|
1595
1615
|
========================================================================
|
|
1596
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
1616
|
+
@dogsbay/primitives@0.2.0-beta.153 (MIT)
|
|
1597
1617
|
https://github.com/dogsbay/dogsbay.git
|
|
1598
1618
|
|
|
1599
1619
|
Licensed under MIT; the package ships no licence file.
|
|
1600
1620
|
|
|
1601
1621
|
========================================================================
|
|
1602
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
1622
|
+
@dogsbay/render-html@0.2.0-beta.153 (MIT)
|
|
1603
1623
|
https://github.com/dogsbay/dogsbay.git
|
|
1604
1624
|
|
|
1605
1625
|
Licensed under MIT; the package ships no licence file.
|
|
1606
1626
|
|
|
1607
1627
|
========================================================================
|
|
1608
|
-
@dogsbay/search@0.2.0-beta.
|
|
1628
|
+
@dogsbay/search@0.2.0-beta.153 (MIT)
|
|
1609
1629
|
https://github.com/dogsbay/dogsbay.git
|
|
1610
1630
|
|
|
1611
1631
|
Licensed under MIT; the package ships no licence file.
|
|
1612
1632
|
|
|
1613
1633
|
========================================================================
|
|
1614
|
-
@dogsbay/ui@0.2.0-beta.
|
|
1634
|
+
@dogsbay/ui@0.2.0-beta.153 (MIT)
|
|
1615
1635
|
https://github.com/dogsbay/dogsbay.git
|
|
1616
1636
|
|
|
1617
1637
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -2064,6 +2084,93 @@ import { apiPageLayout } from "@dogsbay/serialize-core";
|
|
|
2064
2084
|
|
|
2065
2085
|
// src/theme/regions.ts
|
|
2066
2086
|
import { attrs, esc } from "@dogsbay/render-html/html";
|
|
2087
|
+
import { FACET_NAME as FACET_NAME2 } from "@dogsbay/search/format";
|
|
2088
|
+
|
|
2089
|
+
// src/core/taxonomy.ts
|
|
2090
|
+
import { parseMeta } from "@dogsbay/types";
|
|
2091
|
+
import { pageFacets as sharedPageFacets } from "@dogsbay/site-files";
|
|
2092
|
+
import { FACET_NAME } from "@dogsbay/search/format";
|
|
2093
|
+
function safeSegment(s) {
|
|
2094
|
+
return s !== "." && s !== ".." && !/[\\\0]/.test(s);
|
|
2095
|
+
}
|
|
2096
|
+
var ARRAY_FIELDS = /* @__PURE__ */ new Set(["tags", "category", "audience"]);
|
|
2097
|
+
var SCALAR_FIELDS = /* @__PURE__ */ new Set(["type", "status"]);
|
|
2098
|
+
function pageTerms(meta, name) {
|
|
2099
|
+
const m = meta;
|
|
2100
|
+
if (ARRAY_FIELDS.has(name)) return Array.isArray(m[name]) ? m[name].filter((v) => typeof v === "string") : [];
|
|
2101
|
+
if (SCALAR_FIELDS.has(name)) return typeof m[name] === "string" ? [m[name]] : [];
|
|
2102
|
+
return meta.taxonomies?.[name] ?? [];
|
|
2103
|
+
}
|
|
2104
|
+
function expandTerm(term, hierarchical) {
|
|
2105
|
+
const segs = term.split("/").filter(Boolean);
|
|
2106
|
+
if (!segs.length || !segs.every(safeSegment)) return [];
|
|
2107
|
+
if (!hierarchical) return [segs];
|
|
2108
|
+
return segs.map((_, i) => segs.slice(0, i + 1));
|
|
2109
|
+
}
|
|
2110
|
+
function searchFilters(defs, fm, slug, unit) {
|
|
2111
|
+
const meta = parseMeta(fm, { slug, taxonomyNames: defs.map((d) => d.name) });
|
|
2112
|
+
if (meta.taxonomies && (Object.hasOwn(meta.taxonomies, "tag") || Object.hasOwn(meta.taxonomies, "section"))) {
|
|
2113
|
+
const { tag: _t, section: _s, ...rest } = meta.taxonomies;
|
|
2114
|
+
meta.taxonomies = rest;
|
|
2115
|
+
}
|
|
2116
|
+
const all = sharedPageFacets(meta, {
|
|
2117
|
+
tagPrefixes: searchTagPrefixes(defs),
|
|
2118
|
+
hierarchical: defs.filter((d) => d.hierarchical).map((d) => d.name),
|
|
2119
|
+
unit
|
|
2120
|
+
});
|
|
2121
|
+
const facets = {};
|
|
2122
|
+
for (const [name, values] of Object.entries(all)) if (name !== "tag" && name !== "section" && FACET_NAME.test(name) && values.length) facets[name] = values;
|
|
2123
|
+
return { tags: all.tag ?? [], ...Object.keys(facets).length ? { facets } : {} };
|
|
2124
|
+
}
|
|
2125
|
+
var RESERVED_FILTERS = /* @__PURE__ */ new Set(["tag", "section", "product", "version"]);
|
|
2126
|
+
function searchTagPrefixes(defs) {
|
|
2127
|
+
const prefixes = defs.find((d) => d.name === "tags")?.prefixes;
|
|
2128
|
+
if (!prefixes) return void 0;
|
|
2129
|
+
return Object.fromEntries(Object.entries(prefixes).filter(([p]) => FACET_NAME.test(p) && !RESERVED_FILTERS.has(p)));
|
|
2130
|
+
}
|
|
2131
|
+
function unsearchableTagPrefixes(defs) {
|
|
2132
|
+
const kept = searchTagPrefixes(defs) ?? {};
|
|
2133
|
+
return Object.keys(defs.find((d) => d.name === "tags")?.prefixes ?? {}).filter((p) => !Object.hasOwn(kept, p));
|
|
2134
|
+
}
|
|
2135
|
+
var TaxonomyCollector = class {
|
|
2136
|
+
constructor(defs) {
|
|
2137
|
+
this.defs = defs;
|
|
2138
|
+
this.names = defs.map((d) => d.name);
|
|
2139
|
+
for (const d of defs) this.byName.set(d.name, /* @__PURE__ */ new Map());
|
|
2140
|
+
}
|
|
2141
|
+
byName = /* @__PURE__ */ new Map();
|
|
2142
|
+
names;
|
|
2143
|
+
/** Record a page's terms from its front matter. */
|
|
2144
|
+
add(slug, fm) {
|
|
2145
|
+
if (!this.defs.length) return;
|
|
2146
|
+
const meta = parseMeta(fm, { slug, taxonomyNames: this.names });
|
|
2147
|
+
for (const def of this.defs) {
|
|
2148
|
+
const terms = this.byName.get(def.name);
|
|
2149
|
+
for (const value of pageTerms(meta, def.name)) {
|
|
2150
|
+
for (const path of expandTerm(value, def.hierarchical)) {
|
|
2151
|
+
const key = path.join("/");
|
|
2152
|
+
let t = terms.get(key);
|
|
2153
|
+
if (!t) terms.set(detach(key), t = { fullPath: path.map(detach), slugs: /* @__PURE__ */ new Set() });
|
|
2154
|
+
t.slugs.add(slug);
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
/** A taxonomy's terms, by path; only pages that are built (`live`) count. */
|
|
2160
|
+
terms(name, live) {
|
|
2161
|
+
const out = [];
|
|
2162
|
+
for (const [, t] of this.byName.get(name) ?? []) {
|
|
2163
|
+
const slugs = [...t.slugs].filter(live);
|
|
2164
|
+
if (slugs.length) out.push({ fullPath: t.fullPath, slugs });
|
|
2165
|
+
}
|
|
2166
|
+
return out.sort((a, b) => a.fullPath.join("/").localeCompare(b.fullPath.join("/")));
|
|
2167
|
+
}
|
|
2168
|
+
};
|
|
2169
|
+
function taxonomyTitle(name) {
|
|
2170
|
+
return name.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
// src/theme/regions.ts
|
|
2067
2174
|
var svg = (body, cls, size = 16, extra = "") => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="${cls}" aria-hidden="true" focusable="false"${extra}>${body}</svg>`;
|
|
2068
2175
|
var ICONS = {
|
|
2069
2176
|
chevronDown: svg('<polyline points="6 9 12 15 18 9"/>', "", 14),
|
|
@@ -2232,20 +2339,62 @@ function lede(text) {
|
|
|
2232
2339
|
function banner(html) {
|
|
2233
2340
|
return `<div class="mb-6 rounded-md border border-warning/50 bg-warning/5 px-4 py-2 text-sm" role="status">${html}</div>`;
|
|
2234
2341
|
}
|
|
2235
|
-
|
|
2342
|
+
var displays = /* @__PURE__ */ new WeakMap();
|
|
2343
|
+
function facetDisplay(defs) {
|
|
2344
|
+
if (displays.has(defs)) return displays.get(defs);
|
|
2345
|
+
const title = (name) => name.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
2346
|
+
const out = {};
|
|
2347
|
+
const add = (name, t, hierarchical, labels) => {
|
|
2348
|
+
if (!FACET_NAME2.test(name) || name === "section" || name === "product" || name === "version" || out[name]) return;
|
|
2349
|
+
out[name] = { title: t, ...hierarchical ? { hierarchical: true } : {}, ...labels && Object.keys(labels).length ? { labels } : {} };
|
|
2350
|
+
};
|
|
2351
|
+
const def = (name) => defs.find((d) => d.name === name);
|
|
2352
|
+
const tags = def("tags");
|
|
2353
|
+
const prefixes = Object.keys(searchTagPrefixes(defs) ?? {});
|
|
2354
|
+
const tagLabels = Object.entries(tags?.labels ?? {});
|
|
2355
|
+
add("tag", title("tags"), !!tags?.hierarchical, Object.fromEntries(tagLabels.filter(([k]) => !prefixes.some((p) => k.startsWith(`${p}/`)))));
|
|
2356
|
+
for (const p of prefixes)
|
|
2357
|
+
add(p, tags.prefixes[p].label || title(p), tags.hierarchical, Object.fromEntries(tagLabels.filter(([k]) => k.startsWith(`${p}/`)).map(([k, v]) => [k.slice(p.length + 1), v])));
|
|
2358
|
+
for (const name of ["audience", "category", "type", "status"]) add(name, title(name), !!def(name)?.hierarchical, def(name)?.labels);
|
|
2359
|
+
for (const d of defs) if (d.name !== "tags") add(d.name, title(d.name), d.hierarchical, d.labels);
|
|
2360
|
+
const json = JSON.stringify(out);
|
|
2361
|
+
displays.set(defs, json);
|
|
2362
|
+
return json;
|
|
2363
|
+
}
|
|
2364
|
+
function searchListAttrs(t, searchPage, facets) {
|
|
2365
|
+
const a = (name, key) => ` data-${name}="${esc(t(key))}"`;
|
|
2366
|
+
return a("no-results", "searchNoResults") + a("clear-highlights", "clearHighlights") + a("needs-server", "searchNeedsServer") + a("filter-section", "filterSection") + a("scope", "searchScope") + a("scope-version", "searchScopeVersion") + a("scope-product", "searchScopeProduct") + a("scope-versions", "searchScopeVersions") + a("scope-products", "searchScopeProducts") + a("also-in", "searchAlsoIn") + a("unavailable", "searchUnavailable") + a("see-all", "searchSeeAll") + a("more", "searchMore") + a("facets-clear", "searchClearFilters") + (searchPage ? ` data-search-page="${esc(searchPage)}"` : "") + (facets ? ` data-facets="${esc(facets)}"` : "");
|
|
2367
|
+
}
|
|
2368
|
+
function searchDialog(t, searchPage, facets) {
|
|
2236
2369
|
return `<db-dialog id="db-search">
|
|
2237
2370
|
<dialog data-part="content" class="fixed left-1/2 top-[10vh] z-50 m-0 w-[calc(100vw-2rem)] max-w-4xl -translate-x-1/2 rounded-xl border border-border bg-popover p-0 text-popover-foreground shadow-2xl backdrop:bg-black/40 backdrop:backdrop-blur-sm">
|
|
2238
2371
|
<h2 data-part="title" class="sr-only">${esc(t("search"))}</h2>
|
|
2239
2372
|
<db-combobox filter="none" inline class="flex flex-col">
|
|
2240
2373
|
<div class="flex items-center gap-2 border-b border-border px-4">${svg('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>', "size-4 shrink-0 text-muted-foreground")}<input type="search" data-part="input" data-db-search-input placeholder="${esc(t("searchPlaceholder"))}" aria-label="${esc(t("search"))}" spellcheck="false" enterkeyhint="go" class="flex h-12 w-full rounded-md bg-transparent text-sm outline-none placeholder:text-muted-foreground"><button type="button" data-part="close" class="rounded border border-border px-1.5 py-0.5 font-mono text-xs text-muted-foreground hover:bg-accent" aria-label="${esc(t("close"))}">Esc</button></div>
|
|
2241
|
-
<div class="flex max-h-[60vh] flex-col
|
|
2374
|
+
<div class="flex max-h-[60vh] flex-col md:flex-row">
|
|
2375
|
+
<aside data-db-search-facets hidden aria-label="${esc(t("searchFilters"))}" class="max-h-40 shrink-0 overflow-y-auto border-b border-border p-3 text-sm md:max-h-none md:w-56 md:border-b-0 md:border-r"></aside>
|
|
2376
|
+
<div class="flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto p-2 text-sm">
|
|
2242
2377
|
<p data-db-search-status role="status" aria-live="polite" class="m-0 px-3 py-2 text-center text-muted-foreground">${esc(t("searchHint"))}</p>
|
|
2243
|
-
<ul data-part="listbox" id="db-search-results" class="db-search-results m-0 list-none p-0" aria-label="${esc(t("searchResults"))}"
|
|
2378
|
+
<ul data-part="listbox" id="db-search-results" class="db-search-results m-0 list-none p-0" aria-label="${esc(t("searchResults"))}"${searchListAttrs(t, searchPage, facets)}></ul>
|
|
2379
|
+
</div>
|
|
2244
2380
|
</div>
|
|
2245
2381
|
</db-combobox>
|
|
2246
2382
|
</dialog>
|
|
2247
2383
|
</db-dialog>`;
|
|
2248
2384
|
}
|
|
2385
|
+
function searchPageBody(t, facets) {
|
|
2386
|
+
return `${h1(t("search"))}<div data-db-search-page class="not-prose">
|
|
2387
|
+
<form role="search" action="" method="get" class="mb-4"><label class="sr-only" for="db-search-page-input">${esc(t("search"))}</label><div class="flex items-center gap-2 rounded-md border border-border px-3">${svg('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>', "size-4 shrink-0 text-muted-foreground")}<input id="db-search-page-input" type="search" name="q" data-db-search-input placeholder="${esc(t("searchPlaceholder"))}" spellcheck="false" enterkeyhint="search" class="flex h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"></div></form>
|
|
2388
|
+
<div class="md:flex md:gap-6">
|
|
2389
|
+
<aside data-db-search-facets hidden aria-label="${esc(t("searchFilters"))}" class="mb-4 max-h-48 shrink-0 overflow-y-auto text-sm md:mb-0 md:max-h-none md:w-56"></aside>
|
|
2390
|
+
<div class="min-w-0 flex-1">
|
|
2391
|
+
<p data-db-search-status role="status" aria-live="polite" class="m-0 pb-3 text-sm text-muted-foreground">${esc(t("searchHint"))}</p>
|
|
2392
|
+
<ul data-db-search-list class="db-search-results m-0 list-none p-0 text-sm" aria-label="${esc(t("searchResults"))}"${searchListAttrs(t, void 0, facets)}></ul>
|
|
2393
|
+
</div>
|
|
2394
|
+
</div>
|
|
2395
|
+
<noscript><p>${esc(t("searchNeedsScript"))}</p></noscript>
|
|
2396
|
+
</div>`;
|
|
2397
|
+
}
|
|
2249
2398
|
function skipLink(label) {
|
|
2250
2399
|
return `<a href="#db-content" class="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-2 focus:z-[60] focus:rounded-md focus:bg-primary focus:px-3 focus:py-2 focus:text-sm focus:text-primary-foreground">${esc(label)}</a>`;
|
|
2251
2400
|
}
|
|
@@ -2652,7 +2801,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2652
2801
|
pager: await region("pager"),
|
|
2653
2802
|
footerMeta: await region("footer-meta"),
|
|
2654
2803
|
footerLinks: await region("footer-links"),
|
|
2655
|
-
searchDialog: safe2(cfg.search ? searchDialog(t) : ""),
|
|
2804
|
+
searchDialog: safe2(cfg.search ? searchDialog(t, p.searchPage, facetDisplay(cfg.taxonomies)) : ""),
|
|
2656
2805
|
skipLink: safe2(skipLink(t("skip"))),
|
|
2657
2806
|
headLinks: safe2(
|
|
2658
2807
|
(p.math ? `<link rel="stylesheet" href="${esc2(p.siteRoot)}_dogsbay/assets/katex/katex.min.css">
|
|
@@ -2742,6 +2891,9 @@ var ThemeTemplates = class {
|
|
|
2742
2891
|
}
|
|
2743
2892
|
};
|
|
2744
2893
|
|
|
2894
|
+
// src/core/build.ts
|
|
2895
|
+
import { pageKeyCandidates as pageKeyCandidates2 } from "@dogsbay/site-check/links";
|
|
2896
|
+
|
|
2745
2897
|
// src/core/preprocess.ts
|
|
2746
2898
|
import { render, RenderLimitError } from "@dogsbay/minja/browser";
|
|
2747
2899
|
import {
|
|
@@ -2941,6 +3093,7 @@ var ScanCache = class {
|
|
|
2941
3093
|
// src/core/build.ts
|
|
2942
3094
|
import { DATA_DIRECTIVES, DataCache, DataFileError, DataFiles, DEFAULT_DATA_LIMITS, hasDataDirectives, NO_PROJECT_MESSAGE, resolveDataDirectives, TemplatePages, UNTRUSTED_DATA_LIMITS } from "@dogsbay/format-dogsbay-md/browser";
|
|
2943
3095
|
import { extractText, SearchIndexBuilder } from "@dogsbay/search/index";
|
|
3096
|
+
import { FACET_NAME as FACET_NAME3 } from "@dogsbay/search/format";
|
|
2944
3097
|
|
|
2945
3098
|
// src/core/strings.ts
|
|
2946
3099
|
var EN = {
|
|
@@ -2965,6 +3118,18 @@ var EN = {
|
|
|
2965
3118
|
clearHighlights: "Clear highlights",
|
|
2966
3119
|
searchNeedsServer: "Search needs the site to be served over HTTP.",
|
|
2967
3120
|
filterSection: "Filter by section",
|
|
3121
|
+
searchScope: "Search in",
|
|
3122
|
+
searchScopeVersion: "This version",
|
|
3123
|
+
searchScopeProduct: "This product",
|
|
3124
|
+
searchScopeVersions: "All versions",
|
|
3125
|
+
searchScopeProducts: "All products",
|
|
3126
|
+
searchAlsoIn: "Also in",
|
|
3127
|
+
searchSeeAll: "See all {n} results",
|
|
3128
|
+
searchMore: "More results",
|
|
3129
|
+
searchFilters: "Filter results",
|
|
3130
|
+
searchClearFilters: "Clear all ({n})",
|
|
3131
|
+
searchNeedsScript: "Search needs JavaScript.",
|
|
3132
|
+
searchUnavailable: "{n} could not be searched",
|
|
2968
3133
|
searchHint: "Start typing to search...",
|
|
2969
3134
|
toc: "On this page",
|
|
2970
3135
|
nav: "Documentation",
|
|
@@ -3052,7 +3217,19 @@ var FR = {
|
|
|
3052
3217
|
related: "Liens connexes",
|
|
3053
3218
|
clearHighlights: "Effacer le surlignage",
|
|
3054
3219
|
searchNeedsServer: "La recherche n\xE9cessite que le site soit servi en HTTP.",
|
|
3055
|
-
filterSection: "Filtrer par section"
|
|
3220
|
+
filterSection: "Filtrer par section",
|
|
3221
|
+
searchScope: "Rechercher dans",
|
|
3222
|
+
searchScopeVersion: "Cette version",
|
|
3223
|
+
searchScopeProduct: "Ce produit",
|
|
3224
|
+
searchScopeVersions: "Toutes les versions",
|
|
3225
|
+
searchScopeProducts: "Tous les produits",
|
|
3226
|
+
searchAlsoIn: "Aussi dans",
|
|
3227
|
+
searchSeeAll: "Voir les {n} r\xE9sultats",
|
|
3228
|
+
searchMore: "Plus de r\xE9sultats",
|
|
3229
|
+
searchFilters: "Filtrer les r\xE9sultats",
|
|
3230
|
+
searchClearFilters: "Tout effacer ({n})",
|
|
3231
|
+
searchNeedsScript: "La recherche n\xE9cessite JavaScript.",
|
|
3232
|
+
searchUnavailable: "{n} non recherch\xE9(s)"
|
|
3056
3233
|
};
|
|
3057
3234
|
var DE = {
|
|
3058
3235
|
lastUpdated: "Zuletzt aktualisiert: {date}",
|
|
@@ -3082,7 +3259,19 @@ var DE = {
|
|
|
3082
3259
|
related: "Verwandte Links",
|
|
3083
3260
|
clearHighlights: "Hervorhebungen entfernen",
|
|
3084
3261
|
searchNeedsServer: "Die Suche erfordert, dass die Website \xFCber HTTP bereitgestellt wird.",
|
|
3085
|
-
filterSection: "Nach Bereich filtern"
|
|
3262
|
+
filterSection: "Nach Bereich filtern",
|
|
3263
|
+
searchScope: "Suchen in",
|
|
3264
|
+
searchScopeVersion: "Diese Version",
|
|
3265
|
+
searchScopeProduct: "Dieses Produkt",
|
|
3266
|
+
searchScopeVersions: "Alle Versionen",
|
|
3267
|
+
searchScopeProducts: "Alle Produkte",
|
|
3268
|
+
searchAlsoIn: "Auch in",
|
|
3269
|
+
searchSeeAll: "Alle {n} Ergebnisse anzeigen",
|
|
3270
|
+
searchMore: "Weitere Ergebnisse",
|
|
3271
|
+
searchFilters: "Ergebnisse filtern",
|
|
3272
|
+
searchClearFilters: "Alle entfernen ({n})",
|
|
3273
|
+
searchNeedsScript: "Die Suche erfordert JavaScript.",
|
|
3274
|
+
searchUnavailable: "{n} nicht durchsucht"
|
|
3086
3275
|
};
|
|
3087
3276
|
var ES = {
|
|
3088
3277
|
lastUpdated: "\xDAltima actualizaci\xF3n: {date}",
|
|
@@ -3112,7 +3301,19 @@ var ES = {
|
|
|
3112
3301
|
related: "Enlaces relacionados",
|
|
3113
3302
|
clearHighlights: "Quitar resaltado",
|
|
3114
3303
|
searchNeedsServer: "La b\xFAsqueda requiere que el sitio se sirva por HTTP.",
|
|
3115
|
-
filterSection: "Filtrar por secci\xF3n"
|
|
3304
|
+
filterSection: "Filtrar por secci\xF3n",
|
|
3305
|
+
searchScope: "Buscar en",
|
|
3306
|
+
searchScopeVersion: "Esta versi\xF3n",
|
|
3307
|
+
searchScopeProduct: "Este producto",
|
|
3308
|
+
searchScopeVersions: "Todas las versiones",
|
|
3309
|
+
searchScopeProducts: "Todos los productos",
|
|
3310
|
+
searchAlsoIn: "Tambi\xE9n en",
|
|
3311
|
+
searchSeeAll: "Ver los {n} resultados",
|
|
3312
|
+
searchMore: "M\xE1s resultados",
|
|
3313
|
+
searchFilters: "Filtrar resultados",
|
|
3314
|
+
searchClearFilters: "Quitar todo ({n})",
|
|
3315
|
+
searchNeedsScript: "La b\xFAsqueda requiere JavaScript.",
|
|
3316
|
+
searchUnavailable: "{n} sin buscar"
|
|
3116
3317
|
};
|
|
3117
3318
|
var JA = {
|
|
3118
3319
|
lastUpdated: "\u6700\u7D42\u66F4\u65B0: {date}",
|
|
@@ -3142,7 +3343,19 @@ var JA = {
|
|
|
3142
3343
|
related: "\u95A2\u9023\u30EA\u30F3\u30AF",
|
|
3143
3344
|
clearHighlights: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u6D88\u53BB",
|
|
3144
3345
|
searchNeedsServer: "\u691C\u7D22\u3059\u308B\u306B\u306F\u30B5\u30A4\u30C8\u3092 HTTP \u3067\u914D\u4FE1\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",
|
|
3145
|
-
filterSection: "\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u7D5E\u308A\u8FBC\u3080"
|
|
3346
|
+
filterSection: "\u30BB\u30AF\u30B7\u30E7\u30F3\u3067\u7D5E\u308A\u8FBC\u3080",
|
|
3347
|
+
searchScope: "\u691C\u7D22\u5BFE\u8C61",
|
|
3348
|
+
searchScopeVersion: "\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",
|
|
3349
|
+
searchScopeProduct: "\u3053\u306E\u88FD\u54C1",
|
|
3350
|
+
searchScopeVersions: "\u3059\u3079\u3066\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",
|
|
3351
|
+
searchScopeProducts: "\u3059\u3079\u3066\u306E\u88FD\u54C1",
|
|
3352
|
+
searchAlsoIn: "\u6B21\u306B\u3082\u3042\u308A\u307E\u3059:",
|
|
3353
|
+
searchSeeAll: "{n} \u4EF6\u306E\u7D50\u679C\u3092\u3059\u3079\u3066\u8868\u793A",
|
|
3354
|
+
searchMore: "\u3055\u3089\u306B\u8868\u793A",
|
|
3355
|
+
searchFilters: "\u7D50\u679C\u3092\u7D5E\u308A\u8FBC\u3080",
|
|
3356
|
+
searchClearFilters: "\u3059\u3079\u3066\u89E3\u9664 ({n})",
|
|
3357
|
+
searchNeedsScript: "\u691C\u7D22\u306B\u306F JavaScript \u304C\u5FC5\u8981\u3067\u3059\u3002",
|
|
3358
|
+
searchUnavailable: "{n} \u4EF6\u306F\u691C\u7D22\u3067\u304D\u307E\u305B\u3093"
|
|
3146
3359
|
};
|
|
3147
3360
|
var BUILTIN = { en: EN, fr: FR, de: DE, es: ES, ja: JA };
|
|
3148
3361
|
function strings(locale, overrides) {
|
|
@@ -3180,6 +3393,7 @@ function parseManifest(raw) {
|
|
|
3180
3393
|
if (!s || typeof s !== "object" || typeof s.prefix !== "string" || !Array.isArray(s.redirectInputs) || !pairs(s.pageOut) || !strings2(s.sitemaps) || !strings2(s.files) || typeof s.client !== "string" || typeof s.builder !== "string") {
|
|
3181
3394
|
return { problem: "has no dogsbay-ssg section (written by another tool, or an older dogsbay-ssg)" };
|
|
3182
3395
|
}
|
|
3396
|
+
if (s.searchPage !== void 0 && typeof s.searchPage !== "string") return { problem: "has a malformed search page" };
|
|
3183
3397
|
if (s.math !== void 0 && typeof s.math !== "boolean" || s.iconSets !== void 0 && !strings2(s.iconSets)) return { problem: "has a malformed notices record" };
|
|
3184
3398
|
const triples = (x) => Array.isArray(x) && x.every((y) => Array.isArray(y) && y.length === 3 && typeof y[0] === "string" && typeof y[1] === "string" && typeof y[2] === "number");
|
|
3185
3399
|
if (!triples(m.redirects)) return { problem: "has malformed redirects" };
|
|
@@ -3409,63 +3623,6 @@ ${lines.join("\n\n")}
|
|
|
3409
3623
|
`;
|
|
3410
3624
|
}
|
|
3411
3625
|
|
|
3412
|
-
// src/core/taxonomy.ts
|
|
3413
|
-
import { parseMeta } from "@dogsbay/types";
|
|
3414
|
-
function safeSegment(s) {
|
|
3415
|
-
return s !== "." && s !== ".." && !/[\\\0]/.test(s);
|
|
3416
|
-
}
|
|
3417
|
-
var ARRAY_FIELDS = /* @__PURE__ */ new Set(["tags", "category", "audience"]);
|
|
3418
|
-
var SCALAR_FIELDS = /* @__PURE__ */ new Set(["type", "status"]);
|
|
3419
|
-
function pageTerms(meta, name) {
|
|
3420
|
-
const m = meta;
|
|
3421
|
-
if (ARRAY_FIELDS.has(name)) return Array.isArray(m[name]) ? m[name].filter((v) => typeof v === "string") : [];
|
|
3422
|
-
if (SCALAR_FIELDS.has(name)) return typeof m[name] === "string" ? [m[name]] : [];
|
|
3423
|
-
return meta.taxonomies?.[name] ?? [];
|
|
3424
|
-
}
|
|
3425
|
-
function expandTerm(term, hierarchical) {
|
|
3426
|
-
const segs = term.split("/").filter(Boolean);
|
|
3427
|
-
if (!segs.length || !segs.every(safeSegment)) return [];
|
|
3428
|
-
if (!hierarchical) return [segs];
|
|
3429
|
-
return segs.map((_, i) => segs.slice(0, i + 1));
|
|
3430
|
-
}
|
|
3431
|
-
var TaxonomyCollector = class {
|
|
3432
|
-
constructor(defs) {
|
|
3433
|
-
this.defs = defs;
|
|
3434
|
-
this.names = defs.map((d) => d.name);
|
|
3435
|
-
for (const d of defs) this.byName.set(d.name, /* @__PURE__ */ new Map());
|
|
3436
|
-
}
|
|
3437
|
-
byName = /* @__PURE__ */ new Map();
|
|
3438
|
-
names;
|
|
3439
|
-
/** Record a page's terms from its front matter. */
|
|
3440
|
-
add(slug, fm) {
|
|
3441
|
-
if (!this.defs.length) return;
|
|
3442
|
-
const meta = parseMeta(fm, { slug, taxonomyNames: this.names });
|
|
3443
|
-
for (const def of this.defs) {
|
|
3444
|
-
const terms = this.byName.get(def.name);
|
|
3445
|
-
for (const value of pageTerms(meta, def.name)) {
|
|
3446
|
-
for (const path of expandTerm(value, def.hierarchical)) {
|
|
3447
|
-
const key = path.join("/");
|
|
3448
|
-
let t = terms.get(key);
|
|
3449
|
-
if (!t) terms.set(detach(key), t = { fullPath: path.map(detach), slugs: /* @__PURE__ */ new Set() });
|
|
3450
|
-
t.slugs.add(slug);
|
|
3451
|
-
}
|
|
3452
|
-
}
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
/** A taxonomy's terms, by path; only pages that are built (`live`) count. */
|
|
3456
|
-
terms(name, live) {
|
|
3457
|
-
const out = [];
|
|
3458
|
-
for (const [, t] of this.byName.get(name) ?? []) {
|
|
3459
|
-
const slugs = [...t.slugs].filter(live);
|
|
3460
|
-
if (slugs.length) out.push({ fullPath: t.fullPath, slugs });
|
|
3461
|
-
}
|
|
3462
|
-
return out.sort((a, b) => a.fullPath.join("/").localeCompare(b.fullPath.join("/")));
|
|
3463
|
-
}
|
|
3464
|
-
};
|
|
3465
|
-
function taxonomyTitle(name) {
|
|
3466
|
-
return name.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
3626
|
// src/core/blog.ts
|
|
3470
3627
|
import { parseMeta as parseMeta2 } from "@dogsbay/types";
|
|
3471
3628
|
var WORDS_PER_MINUTE = 200;
|
|
@@ -3813,6 +3970,7 @@ async function siteCssBuilder(input) {
|
|
|
3813
3970
|
return input.css ?? (await import("./chunks/tailwind-fallback-KPRFHW3C.mjs")).buildSiteCss;
|
|
3814
3971
|
}
|
|
3815
3972
|
var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
|
|
3973
|
+
var SEARCH_PAGE = "search.html";
|
|
3816
3974
|
var MERGED_FILES = /* @__PURE__ */ new Set(["_headers", "_redirects"]);
|
|
3817
3975
|
function reporter(warnings, problems) {
|
|
3818
3976
|
return (code, text, at = {}) => {
|
|
@@ -4018,7 +4176,7 @@ async function build(input, hooks = {}) {
|
|
|
4018
4176
|
phase.init = now() - t0;
|
|
4019
4177
|
let pages = 0;
|
|
4020
4178
|
let assets = 0;
|
|
4021
|
-
const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), homeForward: /* @__PURE__ */ new Map(), usedMath: false, mathUnits: /* @__PURE__ */ new Set(), diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
|
|
4179
|
+
const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), homeForward: /* @__PURE__ */ new Map(), searchPages: /* @__PURE__ */ new Map(), crossLinked: /* @__PURE__ */ new Set(), usedMath: false, mathUnits: /* @__PURE__ */ new Set(), diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
|
|
4022
4180
|
for (const w of cfg.chrome.warnings) report("config", `[config] ${w}`);
|
|
4023
4181
|
state.logo = await emitLogo(cfg, input, emit, report);
|
|
4024
4182
|
for (const r of cfg.redirects) {
|
|
@@ -4045,12 +4203,14 @@ async function build(input, hooks = {}) {
|
|
|
4045
4203
|
for (const [p, o] of m.pageOut) state.pageOut.set(p, o);
|
|
4046
4204
|
state.sitemaps.set(prefix, m.sitemaps);
|
|
4047
4205
|
if (m.homeForward !== void 0) state.homeForward.set(prefix, m.homeForward);
|
|
4206
|
+
state.searchPages.set(prefix, m.searchPage);
|
|
4048
4207
|
}
|
|
4049
4208
|
const unitRecords = /* @__PURE__ */ new Map();
|
|
4050
4209
|
let frontMatterOf = frontMatterCache(readText);
|
|
4051
4210
|
state.canonical = await defaultTables(cfg, allUnits, units, input.files, readText, (m) => report("canonical", m), frontMatterOf);
|
|
4052
4211
|
if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
|
|
4053
4212
|
const translations = await translationTables(cfg, allUnits, input.files, readText, input.includeDrafts === true, frontMatterOf);
|
|
4213
|
+
if (allUnits.length > 1) state.siteFile = await siteFileFor(cfg, allUnits, input.files, input.includeDrafts === true, stored, state.pageOut, frontMatterOf);
|
|
4054
4214
|
frontMatterOf = void 0;
|
|
4055
4215
|
if (cfg.staticDir) Object.assign(state, staticFolder2(cfg.staticDir, input.files, input.untrusted === true));
|
|
4056
4216
|
hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
@@ -4093,9 +4253,11 @@ async function build(input, hooks = {}) {
|
|
|
4093
4253
|
defaultLocale: cfg.defaultLocale,
|
|
4094
4254
|
versions: cfg.versions,
|
|
4095
4255
|
locales: cfg.locales,
|
|
4096
|
-
|
|
4256
|
+
// `search`: the unit's search page, for the search page's ?p=&v= (a unit built by an older version, or whose content took the name, has none).
|
|
4257
|
+
units: allUnits.map((u) => ({ prefix: u.prefix, version: u.version, locale: u.locale, ...u.product ? { product: u.product } : {}, ...cfg.products && u.versionPath !== u.version ? { versionPath: u.versionPath } : {}, ...state.searchPages.get(u.prefix) ? { search: state.searchPages.get(u.prefix) } : {} })),
|
|
4097
4258
|
// With content.products, each product's own versions and default (key "" for the unnamed source's).
|
|
4098
|
-
|
|
4259
|
+
// With each product's label (the product switcher's), for search results from another product.
|
|
4260
|
+
...cfg.productVersions ? { products: Object.fromEntries([...cfg.productVersions].map(([name, pv]) => [name, { ...pv, label: cfg.products?.products.find((p) => (p.name ?? "") === name)?.label || name || cfg.name }])) } : {}
|
|
4099
4261
|
// As nav.js: a host may inline the script, and a name with "<\/script>" must not close it.
|
|
4100
4262
|
}).replace(/<\//g, "<\\/")};
|
|
4101
4263
|
`
|
|
@@ -4121,6 +4283,12 @@ async function build(input, hooks = {}) {
|
|
|
4121
4283
|
if (state.supplied.has("robots.txt")) throw new ConfigError(`${cfg.staticDir}/robots.txt and the root content's robots.txt are both the site's robots.txt: keep the one in content.static (${cfg.staticDir})`);
|
|
4122
4284
|
state.supplied.add("robots.txt");
|
|
4123
4285
|
}
|
|
4286
|
+
if (cfg.search && cfg.searchEngine !== "pagefind") {
|
|
4287
|
+
const skipped = cfg.taxonomies.filter((d) => !FACET_NAME3.test(d.name) || d.name === "tag" || d.name === "section").map((d) => d.name);
|
|
4288
|
+
if (skipped.length) report("search", `[search] taxonomies ${skipped.join(", ")} are not search filters: a filter's name is lower-case letters, digits, - and _, and not "tag" or "section"`);
|
|
4289
|
+
const plain = unsearchableTagPrefixes(cfg.taxonomies);
|
|
4290
|
+
if (plain.length) report("search", `[search] tag prefixes ${plain.join(", ")} are not search filters of their own (their tags are searched as plain tags): a filter's name is lower-case letters, digits, - and _, and not "tag", "section", "product" or "version"`);
|
|
4291
|
+
}
|
|
4124
4292
|
const rules = await emitSiteFiles(cfg, allUnits, units, stored, def, state, emit, report, input.onRedirects);
|
|
4125
4293
|
phase.site = (phase.site ?? 0) + now() - tSite;
|
|
4126
4294
|
const homeOf = (fromDir, unitPrefix, fallback) => {
|
|
@@ -4130,6 +4298,8 @@ async function build(input, hooks = {}) {
|
|
|
4130
4298
|
if (def && def.prefix) {
|
|
4131
4299
|
await emit("index.html", redirectPage(homeOf("", def.prefix, `${def.prefix}/index.html`), cfg.name));
|
|
4132
4300
|
await emit("404.html", redirectPage(`${def.prefix}/404.html`, cfg.name));
|
|
4301
|
+
const own = state.staticFiles && [...state.staticFiles.keys()].some((k) => k.toLowerCase() === SEARCH_PAGE);
|
|
4302
|
+
if (cfg.search && state.searchPages.get(def.prefix) && !own) await emit(SEARCH_PAGE, forwardKeepingQuery(`${def.prefix}/${SEARCH_PAGE}`, cfg.name));
|
|
4133
4303
|
}
|
|
4134
4304
|
if (cfg.products) {
|
|
4135
4305
|
for (const [from, to] of productRootRedirects(cfg.products)) await emit(`${from.slice(1)}index.html`, redirectPage(homeOf(from.slice(1, -1), to.slice(1, -1), `${relativeHome(from, to)}index.html`), cfg.name));
|
|
@@ -4156,6 +4326,7 @@ async function build(input, hooks = {}) {
|
|
|
4156
4326
|
client: CLIENT_FILE,
|
|
4157
4327
|
builder: SSG_VERSION,
|
|
4158
4328
|
...state.mathUnits.has(u.prefix) ? { math: true } : {},
|
|
4329
|
+
...state.searchPages.get(u.prefix) ? { searchPage: state.searchPages.get(u.prefix) } : {},
|
|
4159
4330
|
...rec.iconSets.length ? { iconSets: rec.iconSets } : {}
|
|
4160
4331
|
};
|
|
4161
4332
|
const served = own.map((r) => siteRedirect(r, cfg)).map((r) => [r.from, r.to, r.status]);
|
|
@@ -4227,6 +4398,57 @@ function checkProductFolders(allUnits, files) {
|
|
|
4227
4398
|
}
|
|
4228
4399
|
}
|
|
4229
4400
|
}
|
|
4401
|
+
async function siteFileFor(cfg, allUnits, files, includeDrafts, stored = /* @__PURE__ */ new Map(), pageOut = /* @__PURE__ */ new Map(), frontMatterOf = frontMatterCache(readText)) {
|
|
4402
|
+
const tables = /* @__PURE__ */ new Map();
|
|
4403
|
+
for (const u of allUnits) if (!stored.has(u.prefix)) tables.set(u.prefix, await unitPages(cfg, u, allUnits, files, frontMatterOf, readText, includeDrafts));
|
|
4404
|
+
return siteFileLookup(cfg, allUnits, tables, stored, pageOut);
|
|
4405
|
+
}
|
|
4406
|
+
function siteFileLookup(cfg, allUnits, tables, stored, pageOut) {
|
|
4407
|
+
const forwards = /* @__PURE__ */ new Map();
|
|
4408
|
+
const def = defaultUnit(allUnits, cfg);
|
|
4409
|
+
if (cfg.products) for (const [from] of productRootRedirects(cfg.products)) forwards.set(from.replace(/^\/+|\/+$/g, ""), `${from.slice(1)}index.html`);
|
|
4410
|
+
else if (def && def.prefix) {
|
|
4411
|
+
for (const u of allUnits) {
|
|
4412
|
+
const root = groupPrefix(u);
|
|
4413
|
+
if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) forwards.set(root, `${root}/index.html`);
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
const storedRedirects = /* @__PURE__ */ new Map();
|
|
4417
|
+
for (const m of stored.values()) for (const r of m.redirectInputs) if (!/^[a-z][a-z0-9+.-]*:/i.test(r.to) && !storedRedirects.has(r.from)) storedRedirects.set(r.from.replace(/\/+$/, ""), r.to);
|
|
4418
|
+
const lookup = (t, from, depth) => {
|
|
4419
|
+
const bare = t.replace(/\/+$/, "");
|
|
4420
|
+
const forward = forwards.get(bare);
|
|
4421
|
+
if (forward !== void 0) return forward;
|
|
4422
|
+
const u = unitOfPath(allUnits, bare);
|
|
4423
|
+
if (!u || u.prefix === from || u.prefix === "") return void 0;
|
|
4424
|
+
const local = bare === u.prefix ? "" : bare.slice(u.prefix.length + 1);
|
|
4425
|
+
const at = (out) => `${u.prefix}/${out}`;
|
|
4426
|
+
const follow = (to) => depth < 4 ? lookup(to, from, depth + 1) : void 0;
|
|
4427
|
+
if (stored.has(u.prefix)) {
|
|
4428
|
+
for (const c of pageKeyCandidates2(local)) {
|
|
4429
|
+
const site = [u.prefix, c].filter(Boolean).join("/");
|
|
4430
|
+
const hit = pageOut.get(site);
|
|
4431
|
+
if (hit !== void 0) return hit;
|
|
4432
|
+
const to = storedRedirects.get(site);
|
|
4433
|
+
if (to !== void 0) return follow(to.replace(/^\/+/, ""));
|
|
4434
|
+
}
|
|
4435
|
+
return void 0;
|
|
4436
|
+
}
|
|
4437
|
+
const table = tables.get(u.prefix);
|
|
4438
|
+
if (!table) return void 0;
|
|
4439
|
+
for (const c of pageKeyCandidates2(local)) {
|
|
4440
|
+
const key = c || "index";
|
|
4441
|
+
const out = table.pages.get(key);
|
|
4442
|
+
if (out !== void 0) return at(out);
|
|
4443
|
+
const to = table.redirects.get(key);
|
|
4444
|
+
if (to === void 0 || /^[a-z][a-z0-9+.-]*:/i.test(to)) continue;
|
|
4445
|
+
if (to.startsWith("/")) return follow(to.slice(1));
|
|
4446
|
+
if (table.pages.has(to)) return at(table.pages.get(to));
|
|
4447
|
+
}
|
|
4448
|
+
return void 0;
|
|
4449
|
+
};
|
|
4450
|
+
return (t, from) => lookup(t, from, 0);
|
|
4451
|
+
}
|
|
4230
4452
|
function staticFolder2(dir, files, untrusted) {
|
|
4231
4453
|
const staticFiles = /* @__PURE__ */ new Map();
|
|
4232
4454
|
for (const [k, c] of files) {
|
|
@@ -4391,6 +4613,8 @@ function storedManifests(given, all, built, report) {
|
|
|
4391
4613
|
homeForward: m.ssg.homeForward !== void 0 && mine(m.ssg.homeForward) ? m.ssg.homeForward : void 0,
|
|
4392
4614
|
math: m.ssg.math,
|
|
4393
4615
|
iconSets: m.ssg.iconSets,
|
|
4616
|
+
// Only the name the build writes: a manifest is read from the published site.
|
|
4617
|
+
searchPage: m.ssg.searchPage === SEARCH_PAGE ? SEARCH_PAGE : void 0,
|
|
4394
4618
|
redirects: new Map(m.redirects.map(([f, t]) => [f, t]))
|
|
4395
4619
|
});
|
|
4396
4620
|
}
|
|
@@ -4931,6 +5155,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4931
5155
|
const postNeighbours = adjacency(posts);
|
|
4932
5156
|
const pageRefs = /* @__PURE__ */ new Map();
|
|
4933
5157
|
for (const i of infos.values()) pageRefs.set(i.slug, { slug: i.slug, out: i.out });
|
|
5158
|
+
const searchPageOut = cfg.search && ![...pageRefs.values()].some((r) => r.out.toLowerCase() === SEARCH_PAGE) && ![...assetPaths].some((a) => a.toLowerCase() === SEARCH_PAGE) ? SEARCH_PAGE : void 0;
|
|
5159
|
+
state.searchPages.set(unit.prefix, searchPageOut);
|
|
4934
5160
|
const linkTargets = (refs) => {
|
|
4935
5161
|
const all = new Map(refs);
|
|
4936
5162
|
const add = (slug, out) => all.has(slug) || all.set(slug, { slug, out });
|
|
@@ -4941,7 +5167,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4941
5167
|
if (cfg.blog?.path) add(cfg.blog.path, `${cfg.blog.path}/index.html`);
|
|
4942
5168
|
return all;
|
|
4943
5169
|
};
|
|
4944
|
-
const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix };
|
|
5170
|
+
const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix, siteFile: state.siteFile && ((t2, from) => state.siteFile(t2, from)) };
|
|
4945
5171
|
const readingOrder = order.filter((s) => infos.has(s));
|
|
4946
5172
|
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" ? false : navSize(nav) <= (input.fullNavLimit ?? cfg.fullNavLimit);
|
|
4947
5173
|
const locale = unit.locale ?? cfg.defaultLocale;
|
|
@@ -5251,6 +5477,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
5251
5477
|
state.usedMath = true;
|
|
5252
5478
|
state.mathUnits.add(unit.prefix);
|
|
5253
5479
|
}
|
|
5480
|
+
if (resolver.crossed) state.crossLinked.add(prefix + info.out);
|
|
5254
5481
|
for (const b of resolver.broken) brokenCounts.has(b) ? brokenCounts.set(b, brokenCounts.get(b) + 1) : brokenCounts.set(detach(b), 1);
|
|
5255
5482
|
phase.render = (phase.render ?? 0) + now() - t;
|
|
5256
5483
|
t = now();
|
|
@@ -5276,6 +5503,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
5276
5503
|
const html = await composePage(
|
|
5277
5504
|
{
|
|
5278
5505
|
layout: layoutName,
|
|
5506
|
+
searchPage: searchPageOut && hrefBetween(info.out, searchPageOut, cfg.linkStyle),
|
|
5279
5507
|
title,
|
|
5280
5508
|
body,
|
|
5281
5509
|
hasH1,
|
|
@@ -5368,7 +5596,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
5368
5596
|
section: chain.length > 1 ? chain[chain.length - 2].label : "",
|
|
5369
5597
|
excerpt: excerpt(description ?? txt.body),
|
|
5370
5598
|
anchors: ctx.headings.filter((h) => h.depth <= 3).map((h) => [h.text, h.id]),
|
|
5371
|
-
|
|
5599
|
+
...searchFilters(cfg.taxonomies, fm, info.slug, { product: unit.product, version: unit.version })
|
|
5372
5600
|
},
|
|
5373
5601
|
{ title, headings: txt.headings, body: txt.body, keywords: keywordsOf(fm) }
|
|
5374
5602
|
);
|
|
@@ -5549,6 +5777,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
5549
5777
|
const html = await composePage(
|
|
5550
5778
|
{
|
|
5551
5779
|
layout: o.layout,
|
|
5780
|
+
searchPage: searchPageOut && hrefBetween(out, searchPageOut, cfg.linkStyle),
|
|
5552
5781
|
title,
|
|
5553
5782
|
body,
|
|
5554
5783
|
hasH1: true,
|
|
@@ -5703,6 +5932,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
5703
5932
|
);
|
|
5704
5933
|
}
|
|
5705
5934
|
}
|
|
5935
|
+
if (searchPageOut) await page(searchPageOut, t_("search"), searchPageBody(t_, facetDisplay(cfg.taxonomies)), { layout: "docs", noindex: true });
|
|
5706
5936
|
return written;
|
|
5707
5937
|
}
|
|
5708
5938
|
}
|
|
@@ -6001,6 +6231,12 @@ function relativeHome(from, to) {
|
|
|
6001
6231
|
if (to.startsWith(from)) return to.slice(from.length);
|
|
6002
6232
|
return "../".repeat(from.split("/").filter(Boolean).length) + to.slice(1);
|
|
6003
6233
|
}
|
|
6234
|
+
var FORWARD_SCRIPT = "location.replace(document.documentElement.dataset.to+location.search+location.hash)";
|
|
6235
|
+
function forwardKeepingQuery(target, name) {
|
|
6236
|
+
const u = esc3(target);
|
|
6237
|
+
return `<!doctype html><html data-to="${u}"><head><meta charset="utf-8"><title>${esc3(name)}</title><meta name="robots" content="noindex"><script>${FORWARD_SCRIPT}<\/script><meta http-equiv="refresh" content="0; url=${u}"><link rel="icon" href="data:,"></head><body><p><a href="${u}">${esc3(name)}</a></p></body></html>
|
|
6238
|
+
`;
|
|
6239
|
+
}
|
|
6004
6240
|
function redirectPage(target, name) {
|
|
6005
6241
|
const u = esc3(target);
|
|
6006
6242
|
return `<!doctype html><html><head><meta charset="utf-8"><title>${esc3(name)}</title><meta name="robots" content="noindex"><meta http-equiv="refresh" content="0; url=${u}"><link rel="canonical" href="${u}"><link rel="icon" href="data:,"></head><body><p><a href="${u}">${esc3(name)}</a></p></body></html>
|
|
@@ -6435,6 +6671,7 @@ async function openDevSession(input, o = {}) {
|
|
|
6435
6671
|
}
|
|
6436
6672
|
}
|
|
6437
6673
|
if (lazy.size) for (const s of ctx.state.stubs) out.delete(s);
|
|
6674
|
+
const pagesBefore = new Map([...lazy].map((prefix) => [prefix, [...units.get(prefix).handle.pageOuts].sort().join("\n")]));
|
|
6438
6675
|
for (const prefix of lazy) {
|
|
6439
6676
|
const u = units.get(prefix);
|
|
6440
6677
|
for (const key of [...out.keys()]) {
|
|
@@ -6456,6 +6693,14 @@ async function openDevSession(input, o = {}) {
|
|
|
6456
6693
|
units.set(prefix, next);
|
|
6457
6694
|
for (const o2 of handle.pageOuts) markStale(o2, next, true);
|
|
6458
6695
|
}
|
|
6696
|
+
if (lazy.size && ctx.state.siteFile && [...lazy].some((prefix) => pagesBefore.get(prefix) !== [...units.get(prefix).handle.pageOuts].sort().join("\n"))) {
|
|
6697
|
+
const all = [...units.values()].map((u) => u.unit);
|
|
6698
|
+
ctx.state.siteFile = await siteFileFor(config, all, input.files, true);
|
|
6699
|
+
for (const o2 of ctx.state.crossLinked) {
|
|
6700
|
+
const u = unitForSitePath(o2);
|
|
6701
|
+
if (u && !lazy.has(u.unit.prefix)) markStale(o2, u);
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6459
6704
|
const isDefault = (u) => u.version !== void 0 && u.version === versionsOf(config, u.product).defaultVersion;
|
|
6460
6705
|
const changedDefaults = [...lazy].map((prefix) => units.get(prefix)?.unit).filter((u) => !!u && isDefault(u));
|
|
6461
6706
|
if (changedDefaults.length) {
|
|
@@ -6593,8 +6838,8 @@ function peleRenderer() {
|
|
|
6593
6838
|
// src/package/prebuilt.ts
|
|
6594
6839
|
import { minifyCss } from "@dogsbay/render-html/css-tools";
|
|
6595
6840
|
var SHEETS = {
|
|
6596
|
-
default: () => import("./chunks/prebuilt-css-default-
|
|
6597
|
-
mintlify: () => import("./chunks/prebuilt-css-mintlify-
|
|
6841
|
+
default: () => import("./chunks/prebuilt-css-default-ZJXSHZYU.mjs"),
|
|
6842
|
+
mintlify: () => import("./chunks/prebuilt-css-mintlify-42UHBQ4I.mjs")
|
|
6598
6843
|
};
|
|
6599
6844
|
var prebuiltSiteCss = async (o) => {
|
|
6600
6845
|
const base = (await (SHEETS[o.theme] ?? SHEETS.default)()).CSS;
|