@dogsbay/ssg 0.2.0-beta.146 → 0.2.0-beta.151

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.
@@ -18,7 +18,7 @@ import {
18
18
 
19
19
  // src/core/build.ts
20
20
  import { dogsbayMdToTree, splitFrontmatter as splitFrontmatter2, treeToDogsbayMd } from "@dogsbay/format-dogsbay-md/browser";
21
- import { mergeHeaders, mergeRedirects, productRootRedirects, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
21
+ import { isPassiveStaticFile, limitVersionRows, mergeHeaders, staticFolderPlan, staticPathServed, staticRobotsWarnings, mergeRedirects, PASSIVE_SVG_MAX_BYTES, passiveSvgBytes, productRootRedirects, productSwitcher, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
22
22
  import { buildHreflangLinks, isMountRoot, missingTranslations, mountRefs, mountRootNote, namespaceNavGroup, namespacePrefixes, placeMountedNav, prefixSlug as prefixSlug2, rewriteContentRefs } from "@dogsbay/site-files";
23
23
 
24
24
  // src/core/canonical.ts
@@ -27,7 +27,7 @@ import { declaresParams, splitFrontmatter } from "@dogsbay/format-dogsbay-md/bro
27
27
 
28
28
  // src/core/config.ts
29
29
  import { scriptUrl } from "@dogsbay/render-html";
30
- import { assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
30
+ import { readVersionBadge, readVersionMenu, siteChrome, assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
31
31
 
32
32
  // src/core/yaml.ts
33
33
  import { load } from "js-yaml";
@@ -46,7 +46,7 @@ function shared(f) {
46
46
  }
47
47
  }
48
48
  function versionsOf(cfg, product) {
49
- return cfg.productVersions?.get(product ?? "") ?? { versions: cfg.versions, defaultVersion: cfg.defaultVersion };
49
+ return cfg.productVersions?.get(product ?? "") ?? { versions: cfg.versions, defaultVersion: cfg.defaultVersion, ...cfg.versionMenu ? { menu: cfg.versionMenu } : {} };
50
50
  }
51
51
  var ConfigError = class extends Error {
52
52
  };
@@ -92,7 +92,30 @@ function sourceFrom(v, path) {
92
92
  throw new ConfigError(`content.sources[${path}].from must be "dogsbay-md" or "openapi"; got ${JSON.stringify(v)}`);
93
93
  }
94
94
  var strOrUndef = (v) => v == null ? void 0 : String(v);
95
- var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap"];
95
+ function versionMenuOf(raw, where) {
96
+ return shared(() => readVersionMenu(raw, where));
97
+ }
98
+ function chromeOf(raw) {
99
+ return shared(() => siteChrome({ site: raw.site, header: raw.header, footer: raw.footer }));
100
+ }
101
+ function stringsOf(raw) {
102
+ const out = { all: {}, byLocale: {} };
103
+ if (raw == null) return out;
104
+ if (typeof raw !== "object" || Array.isArray(raw)) throw new ConfigError("ssg.strings: expected a mapping of string keys to text");
105
+ for (const [k, v] of Object.entries(raw)) {
106
+ if (typeof v === "string") out.all[k] = v;
107
+ else if (v && typeof v === "object" && !Array.isArray(v)) {
108
+ out.byLocale[k.toLowerCase()] = Object.fromEntries(
109
+ Object.entries(v).map(([key, text]) => {
110
+ if (typeof text !== "string") throw new ConfigError(`ssg.strings.${k}.${key}: expected text`);
111
+ return [key, text];
112
+ })
113
+ );
114
+ } else throw new ConfigError(`ssg.strings.${k}: expected text, or a mapping of keys to text for that language`);
115
+ }
116
+ return out;
117
+ }
118
+ var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap", "badge"];
96
119
  var FLAG_PATHS = [
97
120
  "poweredBy",
98
121
  "ssg.breadcrumbs",
@@ -110,6 +133,8 @@ var FLAG_PATHS = [
110
133
  "content.codeBlockTitle",
111
134
  "content.linkIcons",
112
135
  ...VERSION_FLAGS.flatMap((k) => [`versions.*.${k}`, `content.versions.*.${k}`]),
136
+ // Checked again by site-files' model; here first, for the YAML 1.2 hint (`badge: yes`).
137
+ "content.products.*.versions.*.badge",
113
138
  "taxonomies.*.hierarchical",
114
139
  "taxonomies.*.autoColor",
115
140
  "blog",
@@ -176,6 +201,7 @@ function parseConfig(text, overrides = {}) {
176
201
  prerelease: v.prerelease || void 0,
177
202
  hidden: v.hidden || void 0,
178
203
  removed: removedOf(v.removed, String(v.id)),
204
+ ...shared(() => readVersionBadge(v.badge, `versions: "${String(v.id)}"`)) ? { badge: true } : {},
179
205
  ...versionSeoOf(v, String(v.id)),
180
206
  ...versionPathOf(v, String(v.id), productsBlock)
181
207
  }));
@@ -193,6 +219,7 @@ function parseConfig(text, overrides = {}) {
193
219
  repoUrl: site.repoUrl,
194
220
  editUri: site.editUri,
195
221
  copyright: site.copyright,
222
+ chrome: chromeOf(raw),
196
223
  linkStyle: ssg.linkStyle === "pretty" ? "pretty" : "html",
197
224
  attributes: { ...raw.attributes ?? {} },
198
225
  sources,
@@ -215,6 +242,8 @@ function parseConfig(text, overrides = {}) {
215
242
  themeDir: checked("ssg.themeDir", String(ssg.themeDir ?? "theme")).replace(/^\.\/|\/+$/g, ""),
216
243
  css: Array.isArray(ssg.css) ? ssg.css.map((c) => checked("ssg.css", String(c))) : [],
217
244
  breadcrumbs: ssg.breadcrumbs === true,
245
+ strings: stringsOf(ssg.strings),
246
+ versionMenu: versionMenuOf(content.versionMenu, "content.versionMenu"),
218
247
  strictTemplates: ssg.strictTemplates === true,
219
248
  // An empty tagline falls back too, as DocsLayout's `siteTagline || "Documentation"`.
220
249
  tagline: String(site.tagline || "Documentation"),
@@ -268,6 +297,7 @@ function parseConfig(text, overrides = {}) {
268
297
  html: htmlOf(content.html),
269
298
  dataDir: content.data != null ? dataFolder("content.data", content.data) : "data",
270
299
  dataDirSet: content.data != null,
300
+ ...content.static != null ? { staticDir: staticFolder(content.static) } : {},
271
301
  plausible: typeof raw.analytics?.plausible?.domain === "string" ? { domain: raw.analytics.plausible.domain, scriptUrl: strOrUndef(raw.analytics.plausible.scriptUrl) } : void 0,
272
302
  ...overrides
273
303
  };
@@ -281,6 +311,20 @@ function parseConfig(text, overrides = {}) {
281
311
  if (dv.noindex) throw new ConfigError(`versions: "${dv.id}" is the defaultVersion and has noindex: true; older versions' pages name it as their canonical`);
282
312
  }
283
313
  if (productsBlock) Object.assign(cfg, productsOf(content, raw, cfg));
314
+ if (cfg.staticDir) {
315
+ const st = cfg.staticDir;
316
+ const clash = cfg.sources.find((x) => {
317
+ const xp = x.path.replace(/^(\.\/)+/, "").replace(/\/+$/, "");
318
+ return x.from !== "openapi" && (xp === "." || xp === "" || xp === st || xp.startsWith(st + "/") || st.startsWith(xp + "/"));
319
+ });
320
+ if (clash) throw new ConfigError(`content.static (${st}) and the source "${clash.path}" overlap: the static folder is served as it is, so it must be a folder of its own, beside the sources`);
321
+ const input = [["content.data", cfg.dataDir], ...cfg.sources.flatMap((x) => x.data ? [[`content.sources (${x.path}) data`, x.data]] : []), ["ssg.themeDir", cfg.themeDir], ...cfg.css.map((f) => ["ssg.css", f])];
322
+ const inside = input.find(([, p]) => {
323
+ const q = p.replace(/^(\.\/)+/, "").replace(/\/+$/, "");
324
+ return q === st || q.startsWith(st + "/");
325
+ });
326
+ if (inside) throw new ConfigError(`${inside[0]} (${inside[1]}) is inside content.static (${st}), whose files are served as they are: move it out of the folder`);
327
+ }
284
328
  return cfg;
285
329
  }
286
330
  var TAG_COLORS = /* @__PURE__ */ new Set(["blue", "amber", "emerald", "violet", "rose", "slate"]);
@@ -416,7 +460,7 @@ function productsOf(content, raw, cfg) {
416
460
  const siteVersions = content.versions ?? raw.versions;
417
461
  const written = (Array.isArray(content.sources) ? content.sources : []).filter((s) => typeof s?.path === "string");
418
462
  const sources = written.length ? written : [{ path: "content" }];
419
- const model = shared(() => productModel({ products: content.products, sources, versions: siteVersions, defaultVersion: content.defaultVersion ?? raw.defaultVersion, locales: cfg.locales, defaultLocale: cfg.defaultLocale }));
463
+ const model = shared(() => productModel({ products: content.products, sources, versions: siteVersions, defaultVersion: content.defaultVersion ?? raw.defaultVersion, versionMenu: content.versionMenu, locales: cfg.locales, defaultLocale: cfg.defaultLocale }));
420
464
  if (!model) return {};
421
465
  const productVersions = /* @__PURE__ */ new Map();
422
466
  for (const p of model.products) {
@@ -434,10 +478,11 @@ function productsOf(content, raw, cfg) {
434
478
  ...v.noindex !== void 0 ? { noindex: v.noindex } : {},
435
479
  ...v.sitemap !== void 0 ? { sitemap: v.sitemap } : {},
436
480
  ...v.path !== v.id ? { path: v.path } : {},
437
- ...v.banner ? { banner: v.banner } : {}
481
+ ...v.banner ? { banner: v.banner } : {},
482
+ ...v.badge ? { badge: true } : {}
438
483
  };
439
484
  });
440
- productVersions.set(p.name ?? "", { versions, ...p.defaultVersion ? { defaultVersion: p.defaultVersion } : {} });
485
+ productVersions.set(p.name ?? "", { versions, ...p.defaultVersion ? { defaultVersion: p.defaultVersion } : {}, ...p.versionMenu ? { menu: p.versionMenu } : {} });
441
486
  }
442
487
  return { products: model, productVersions };
443
488
  }
@@ -586,7 +631,8 @@ function projectRoots(cfg) {
586
631
  if (roots.includes("")) return [""];
587
632
  const navDirs = cfg.sources.flatMap((s) => s.nav ? [s.nav.includes("/") ? s.nav.slice(0, s.nav.lastIndexOf("/")) : s.nav] : []);
588
633
  const dataDirs = [cfg.dataDir, ...cfg.sources.flatMap((s) => s.data ? [s.data] : [])];
589
- return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs])].filter(Boolean);
634
+ const logos = cfg.chrome.logo ? [cfg.chrome.logo.light, ...cfg.chrome.logo.dark ? [cfg.chrome.logo.dark] : []] : [];
635
+ return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs, ...cfg.staticDir ? [cfg.staticDir] : [], ...logos])].filter(Boolean);
590
636
  }
591
637
  function dataFolder(what, v) {
592
638
  if (typeof v !== "string" || !v.trim()) throw new ConfigError(`${what} must be a folder inside the project, such as ./data; got ${JSON.stringify(v)}`);
@@ -594,6 +640,12 @@ function dataFolder(what, v) {
594
640
  if (!p || p === ".") throw new ConfigError(`${what} must be a folder inside the project, not the project itself (every file would be a data file)`);
595
641
  return p;
596
642
  }
643
+ function staticFolder(v) {
644
+ if (typeof v !== "string" || !v.trim()) throw new ConfigError(`content.static must be a folder inside the project, such as ./static; got ${JSON.stringify(v)}`);
645
+ const p = insideProject("content.static", v.trim()).replace(/^(\.\/)+/, "").replace(/\/+$/, "");
646
+ if (!p || p === ".") throw new ConfigError("content.static must be a folder inside the project, not the project itself (every file would be served as it is)");
647
+ return p;
648
+ }
597
649
  function dataDirOf(cfg, s) {
598
650
  return s.data ?? cfg.dataDir;
599
651
  }
@@ -639,6 +691,12 @@ function createResolver(table, page) {
639
691
  const broken = [];
640
692
  const srcDir = dirname(page.source);
641
693
  const target = (path) => resolveLinkPath(path, srcDir, table.basePath);
694
+ const staticHref = (path, t) => {
695
+ if (!path.startsWith("/") || !table.staticFile) return void 0;
696
+ const f = table.staticFile(t);
697
+ if (f === void 0) return void 0;
698
+ return encodePath(relative(dirname([table.unitPrefix, page.out].filter(Boolean).join("/")), f));
699
+ };
642
700
  const findPage = (t) => {
643
701
  for (const c of pageKeyCandidates(t)) {
644
702
  const hit = table.pages.get(c);
@@ -661,6 +719,8 @@ function createResolver(table, page) {
661
719
  return url + suffix;
662
720
  }
663
721
  if (table.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
722
+ const st = staticHref(path, t);
723
+ if (st !== void 0) return st + suffix;
664
724
  broken.push(href);
665
725
  return href;
666
726
  },
@@ -669,11 +729,23 @@ function createResolver(table, page) {
669
729
  const { path, suffix } = splitHref(src);
670
730
  const t = target(path);
671
731
  if (table.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
732
+ const st = staticHref(path, t);
733
+ if (st !== void 0) return st + suffix;
672
734
  broken.push(src);
673
735
  return src;
674
736
  }
675
737
  };
676
738
  }
739
+ var MENU_FILE = /\.(html?|pdf|txt|md|xml|json|ya?ml|csv|zip|gz|tgz|epub|svg|png|jpe?g|gif|webp)$/i;
740
+ function menuHref(href, siteRoot, style, basePath = "") {
741
+ if (/^(https?|mailto):/i.test(href)) return href;
742
+ const m = /^\/([^?#]*)(.*)$/.exec(href);
743
+ let path = m[1];
744
+ if (basePath && (path === basePath || path.startsWith(basePath + "/"))) path = path.slice(basePath.length + 1);
745
+ if (path === "" || path.endsWith("/")) path = style === "pretty" ? path : `${path}index.html`;
746
+ else if (!MENU_FILE.test(path) && style !== "pretty") path = `${path}.html`;
747
+ return `${siteRoot || "./"}${path}${m[2]}`;
748
+ }
677
749
 
678
750
  // src/core/openapi-pages.ts
679
751
  import { mountSlug, prefixSlug } from "@dogsbay/site-files";
@@ -1285,8 +1357,23 @@ import { parseMeta as parseMeta3 } from "@dogsbay/types";
1285
1357
  import { directoryChildren, hasChildLinks, navKey, realizeChildLinks } from "@dogsbay/serialize-core";
1286
1358
 
1287
1359
  // src/generated/assets.ts
1288
- var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var vn=Object.defineProperty;var yn=(i,t,e)=>t in i?vn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>yn(i,typeof t!="symbol"?t+"":t,e);var z=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(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(){}},wn={"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"},Ie="dogsbay-elements-display";function N(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(wn).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function En(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&&En(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(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 s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},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 xn=0;function Me(i){return`${i}-${++xn}`}var He=class extends z{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(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)});h(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)});h(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 o;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||Me("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||Me("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")||((o=this.triggers[0])==null?void 0:o.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 s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),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})))}};N();customElements.get("db-tabs")||customElements.define("db-tabs",He);var An=0;function Sn(i){return`${i}-${++An}`}var ze=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Sn("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 Ne=class extends z{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(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(s=>{let o=s.querySelector("[data-part=\'trigger\']"),r=s.querySelector("[data-part=\'content\']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new ze(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,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((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.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}))}};N();customElements.get("db-accordion")||customElements.define("db-accordion",Ne);var Cn=0;function F(i){return`${i}-${++Cn}`}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 W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())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(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Ln=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Pe(i){return Array.from(i.querySelectorAll(Ln)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(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 Be=class extends z{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(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()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"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 s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(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,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)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,kn();let s=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.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",()=>o.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",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.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:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.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):o,s.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)}},$e="dogsbay-details-sheet";function kn(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,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)}N();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends z{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(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)}};N();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends z{constructor(){super(...arguments);h(this,"navData",null);h(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)});h(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(),s=e.closest("[data-part=\'row\']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-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()[o+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 f=u.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 s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}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),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=On(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.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 s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),g=null;if(l!=null&&l.length){if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Tn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Tn=\'<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 On(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}N();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends z{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(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)});h(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 o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.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}))}}};N();customElements.get("db-toc")||customElements.define("db-toc",We);var Dn=["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] *)"],ce=Dn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!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 s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},Rn=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},In=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(ce));return e&&Rt.call(t,ce)&&s.unshift(t),s=s.filter(n),s},de=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=de(l,!0,n);n.flatten?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,ce);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=de(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rn(t))&&!Ue(t)?0:t.tabIndex},Mn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},Hn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},zn=function(t){return Ge(t)&&t.type==="hidden"},Nn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},_n=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Pn=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=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 o=_n(s,t.form);return!o||o===t},Fn=function(t){return Ge(t)&&t.type==="radio"},$n=function(t){return Fn(t)&&!Pn(t)},Bn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},qn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}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 s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Bn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},Kn=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 s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Wn=function(t,e){return!(e.disabled||zn(e)||qn(e,t)||Nn(e)||Kn(e))},Ve=function(t,e){return!($n(e)||Xe(e)<0||!Wn(t,e))},jn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Mn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(Hn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},ue=function(t,e){e=e||{};var n;return e.getShadowRoot?n=de([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:jn}):n=In(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var he=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(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=ue(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=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=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}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Vn(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Yn(){Qe||(Qe=!0,document.addEventListener("keydown",Vn))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(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&&(Yn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(`[aria-controls="${e}"]`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.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=Q.indexOf(this);i!==-1&&Q.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 fe(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends z{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[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))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(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")});h(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 s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new he(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}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 s of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(s)}"]`).forEach(o=>t.push(o));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,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=fe(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.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 o,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(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends z{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(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}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(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&&!W(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 o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[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,s;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),(s=t.scrollIntoView)==null||s.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??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))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")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};N();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,Mt=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(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 me(i){return i==="x"?"y":"x"}function pe(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function ge(i){return me(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),s=ge(i),o=pe(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=It(r)),[r,It(r)]}function oi(i){let t=It(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Xn=["top","bottom"],Gn=["bottom","top"];function Zn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Xn:Gn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Zn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function It(i){let t=nt(i);return Un[t]+i.slice(t.length)}function Qn(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?Qn(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=ge(t),a=pe(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},M=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-M.top+p.top)/R.y,bottom:(M.bottom-y.bottom+p.bottom)/R.y,left:(y.left-M.left+p.left)/R.x,right:(M.right-y.right+p.right)/R.x}}var Jn=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:M,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...M},H&&m<Jn&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(L||!b?[It(a)]:oi(a)),H=p!=="none";!f&&H&&M.push(...ri(a,b,p,R));let O=[a,...M],v=await l.detectOverflow(t,g),q=[],I=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||I.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:T}};let A=(x=I.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=I.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var ts=new Set(["left","top"]);async function es(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=ts.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await es(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=me(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,M=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),M&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(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=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function zt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(i){return/^(table|td|th)$/.test(ut(i))}function Nt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var is=/transform|translate|scale|rotate|perspective|filter/,ns=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",be;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||is.test(t.willChange||"")||ns.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(Nt(t))return null;t=st(t)}return null}function Xt(){return be==null&&(be=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),be}function St(i){return/^(html|body|#document)$/.test(ut(i))}function Y(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 st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&zt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],zt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=Mt(e)!==o||Mt(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function ye(i){return V(i)?i:i.contextElement}function Ct(i){let t=ye(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?Mt(e.width):e.width)/n,a=(o?Mt(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var ss=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?ss:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function os(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 s=i.getBoundingClientRect(),o=ye(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=os(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function rs(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?Nt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||zt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(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 as(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ls(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var cs=25;function ds(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=cs&&(a-=y)}return{width:a,height:l,x:c,y:d}}function us(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=ds(i,e,t);else if(t==="document")n=ls(G(i));else if(V(t))n=us(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function hs(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function fs(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Nt(t)?[]:hs(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function ms(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function ps(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||zt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(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 ve(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(Nt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ve(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ve(n);)n=Ei(n,t);return n&&St(n)&&ve(n)&&!Ut(n)?e:n||vi(i)||e}var gs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:ps(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bs(i){return Y(i).direction==="rtl"}var vs={convertOffsetParentRelativeRectToViewportRelativeRect:rs,getDocumentElement:G,getClippingRect:fs,getOffsetParent:Ci,getElementRects:gs,getClientRects:as,getDimensions:ms,getScale:Ct,isElement:V,isRTL:bs};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function ys(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let I=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(I!==u){if(!O)return a();I?a(!1,I):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.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 ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=ye(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?ys(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Ii=(i,t,e)=>{let n=new Map,s=e??{},o={...vs,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:s,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 we=class{constructor(i){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(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 Mi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,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&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(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()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(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))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(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(s=>s.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=>!W(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 s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new we({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 lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(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"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=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();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);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,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u 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=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}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,n,s,o,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),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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,s,o,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),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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 o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.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 s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=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=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){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}))}};N();customElements.get("db-select")||customElements.define("db-select",Mi);var Hi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(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 s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;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"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-popover")||customElements.define("db-popover",Hi);var zi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(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})))}};N();customElements.get("db-tooltip")||customElements.define("db-tooltip",zi);var Ni="sidebar_state",ws="b",Es=768,Pt=new WeakMap;function xs(i){try{return localStorage.getItem(i)}catch{return null}}function As(i,t){try{localStorage.setItem(i,t)}catch{}}function Ae(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",s=t.dataset.defaultOpen!=="false",o=xs(Ni),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Es-1}px)`),u={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,u),_i(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===ws&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),Ee(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ss(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part=\'rail\']");p&&p.addEventListener("click",()=>{Ee(i)})}function Ss(i,t){i.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{Ee(i)})})}function Ee(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?ot(i):Cs(i):(t.open=!t.open,_i(t),As(Ni,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 Cs(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 o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.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 xe(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{Ae(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",xe):xe();document.addEventListener("astro:page-load",xe);var Qt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Jt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var Ls={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"},ks={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ts="[^aeiou]",Ce="[aeiouy]",rt="("+Ts+"[^aeiouy]*)",ee="("+Ce+"[aeiou]*)",Se=new RegExp("^"+rt+"?"+ee+rt),Os=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),Pi=new RegExp("^"+rt+"?"+Ce),Fi=new RegExp("^"+rt+Ce+"[^aeiouwxy]$"),Ds=/ll$/,Rs=/^(.+?)e$/,Is=/^(.+?)y$/,Ms=/^(.+?(s|t))(ion)$/,Hs=/^(.+?)(ed|ing)$/,zs=/(at|bl|iz)$/,Ns=/^(.+?)eed$/,_s=/^.+?[^s]s$/,Ps=/^.+?(ss|i)es$/,Fs=/([^aeiouylsz])\\1$/,$s=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Bs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,qs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function $i(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)),Ps.test(t)?t=t.slice(0,-2):_s.test(t)&&(t=t.slice(0,-1));let n;return(n=Ns.exec(t))?Se.test(n[1])&&(t=t.slice(0,-1)):(n=Hs.exec(t))&&Pi.test(n[1])&&(t=n[1],zs.test(t)?t+="e":Fs.test(t)?t=t.slice(0,-1):Fi.test(t)&&(t+="e")),(n=Is.exec(t))&&Pi.test(n[1])&&(t=n[1]+"i"),(n=$s.exec(t))&&Se.test(n[1])&&(t=n[1]+Ls[n[2]]),(n=Bs.exec(t))&&Se.test(n[1])&&(t=n[1]+ks[n[2]]),(n=qs.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ms.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Rs.exec(t))&&(te.test(n[1])||Os.test(n[1])&&!Fi.test(n[1]))&&(t=n[1]),Ds.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Bi=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(" ")),Ks=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Ws(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],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Bi.has(o)&&t.push(o)}for(let o of s)Ks.test(o)?t.push(...Ws(o)):o.length>=2&&!Bi.has(o)&&t.push(o)}return t}function Le(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 $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?$i(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp(\'(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)\',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Yi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),M=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===M))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function js(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Vi(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Us(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Xs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Vs(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Vi(i,t,e=!1){let n=Ys(t);for(let o=Math.min(i.length,Ki);o>=1;o--){let r=Le(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=Le(i,Math.min(i.length,Ki));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var Ki=3,Wi=new WeakMap;function Ys(i){let t=Wi.get(i);return t||Wi.set(i,t=new Set(i.shards)),t}function Yi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Us(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Yi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Xs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Vi(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Vs(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Ui(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Gs(i,t,e,n=10){let s=t.slice(0,n);await Ui(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=ji(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,ji(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Xi(i,t,e){await Ui(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(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 ji(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Gi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await js(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Gs(n,o,t,e)}}function Zi(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(`search index format ${(l==null?void 0:l.format)??"missing"}, expected ${4}: rebuild the site`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function Qi(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 s=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Zs(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Zs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function Ji(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part=\'listbox\']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Zi(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?Qi(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Gi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>`section:"${L(S)}"`,M,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(`\\\\s*section:"${L(k).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,M!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===M)??n).focus(),M=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?`${C} result${C===1?"":"s"}`:`${s.dataset.noResults} \\u201C${S}\\u201D`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=I(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...ke(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...ke(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=I(`${T.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...ke(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Xi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},I=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=Qs(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function Qs(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${s}`}function ke(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,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var tn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function en(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>tn.test(g)).map(n),r=s.filter(g=>!tn.test(g)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",o.length?`(?:${o.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=R[0],w.append(M),c.push(M),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(Js(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function Js(){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"},to=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},nn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},sn=function(t){try{return Array.isArray(t)?t.filter(ie):to(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`)}},eo=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},io=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=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=s+c+"px",a.style.width=o+"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 s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},no=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(M||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,sn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),I},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,sn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),I},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),I},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),I},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,ln=P.left,cn=P.top;A=pt({},A,{width:tt,height:qt,left:ln,top:cn})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,dn=nn(Ot)?k:Ot.naturalWidth||k,un=nn(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),hn=Kt.top,fn=Kt.left,re=Kt.width,ae=Kt.height,mn=Math.min(Math.max(re,dn),k)/re,pn=Math.min(Math.max(ae,un),D)/ae,le=Math.min(mn,pn),gn=(-fn+(k-re)/2+O.margin+A.left)/le,bn=(-hn+(D-ae)/2+O.margin+A.top)/le,Re="scale("+le+") translate3d("+gn+"px, "+bn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(I);return}var A=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),T(I)};if(v.zoomed){T(I);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(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=io(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.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",p),v.zoomed.addEventListener("transitionend",A),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",p),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",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(M||!v.original){x(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,x(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)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],M=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=eo(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var I={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return I};function so(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var oo=".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}";so(oo);var on=no;var ro;function rn(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 s=ro??(ro=on());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={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,s.open({target:l}))},o),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(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function Te(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function an(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function ao(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 lo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.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 co(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 s=n.selectedOptions[0],o=(s==null?void 0:s.dataset.prefix)??"",r=n.value;if(!(!Te(r)||!Te(o)))try{let l=o?`${i}${o}/`:i;await an(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}},{signal:t})})}function uo(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 Bt=new Map,oe=new Set;function se(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of oe)i.isConnected||ot(i)}function ho(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function fo(){se(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if(Bt.has(i)||oe.has(i))return;let t=new AbortController;ho(t.signal,()=>Ae(i))?Bt.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&oe.add(i)}),document.removeEventListener("keydown",se),document.addEventListener("keydown",se)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),fo(),i.theme!==!1&&ao(e),lo(e),i.switchers!==!1&&co(o,e),uo(e),i.search!==!1&&Ji({unitRoot:s,loadScript:an,signal:e}),en(e),rn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...oe])ot(a);se(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();\n';
1289
- 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 }}">\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{% 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 }}{{ 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 }}">\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{% 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 }}{{ 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/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">&larr; {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} &rarr;</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
1360
+ var CLIENT_JS = `/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */
1361
+ "use strict";(()=>{var wn=Object.defineProperty;var En=(i,t,e)=>t in i?wn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>En(i,typeof t!="symbol"?t+"":t,e);var N=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(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(){}},xn={"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"},Me="dogsbay-elements-display";function z(){if(typeof document>"u"||document.getElementById(Me))return;let i=Object.entries(xn).map(([e,n])=>\`:where(\${e}){display:\${n}}\`).join(""),t=document.createElement("style");t.id=Me,t.textContent=i,document.head.prepend(t)}function An(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&&An(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(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 s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},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 Sn=0;function Ie(i){return\`\${i}-\${++Sn}\`}var He=class extends N{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(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)});h(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)});h(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 o;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||Ie("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||Ie("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")||((o=this.triggers[0])==null?void 0:o.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 s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),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",He);var Cn=0;function Ln(i){return\`\${i}-\${++Cn}\`}var Ne=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Ln("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 ze=class extends N{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(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(s=>{let o=s.querySelector("[data-part='trigger']"),r=s.querySelector("[data-part='content']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new Ne(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,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((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.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",ze);var kn=0;function F(i){return\`\${i}-\${++kn}\`}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 W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())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(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Tn='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function Pe(i){return Array.from(i.querySelectorAll(Tn)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(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 Be=class extends N{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(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()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"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 s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(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,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)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,On();let s=(((d=e.querySelector("[data-part='title']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.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",()=>o.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",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.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:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.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):o,s.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)}},$e="dogsbay-details-sheet";function On(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,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",Be);var qe=class extends N{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(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",qe);var Ke=class extends N{constructor(){super(...arguments);h(this,"navData",null);h(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)});h(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(),s=e.closest("[data-part='row']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part='item']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-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()[o+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 f=u.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 s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}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),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current='page']");if(!t)return;for(let r=t.closest("[data-part='item']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part='item']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Rn(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.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 s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=\`\${e}.\${d}\`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),g=null;if(l!=null&&l.length){if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Dn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Dn='<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 Rn(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",Ke);var We=class extends N{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(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)});h(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 o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.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 Mn=["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=Mn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!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 s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},In=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Hn=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&s.unshift(t),s=s.filter(n),s},ue=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.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?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=ue(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||In(t))&&!Ue(t)?0:t.tabIndex},Nn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},_n=function(t){return Ge(t)&&t.type==="hidden"},Pn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},Fn=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},$n=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=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 o=Fn(s,t.form);return!o||o===t},Bn=function(t){return Ge(t)&&t.type==="radio"},qn=function(t){return Bn(t)&&!$n(t)},Kn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},Wn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}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 s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Kn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},jn=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 s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Vn=function(t,e){return!(e.disabled||_n(e)||Wn(e,t)||Pn(e)||jn(e))},Ve=function(t,e){return!(qn(e)||Xe(e)<0||!Vn(t,e))},Yn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Nn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(zn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Yn}):n=Hn(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var fe=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(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}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Un(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Xn(){Qe||(Qe=!0,document.addEventListener("keydown",Un))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(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&&(Xn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(\`[aria-controls="\${e}"]\`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.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=Q.indexOf(this);i!==-1&&Q.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 s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends N{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part='close']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[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))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(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")});h(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 s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}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 s of e)document.querySelectorAll(\`[data-dialog-for="\${CSS.escape(s)}"]\`).forEach(o=>t.push(o));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,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.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 o,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(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends N{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(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}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part='option']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part='option']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(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&&!W(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 o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[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,s;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),(s=t.scrollIntoView)==null||s.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??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))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")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};z();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,It=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(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),s=be(i),o=ge(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Mt(r)),[r,Mt(r)]}function oi(i){let t=Mt(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Zn=["top","bottom"],Qn=["bottom","top"];function Jn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Zn:Qn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Jn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function Mt(i){let t=nt(i);return Gn[t]+i.slice(t.length)}function ts(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?ts(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=be(t),a=ge(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},I=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-I.top+p.top)/R.y,bottom:(I.bottom-y.bottom+p.bottom)/R.y,left:(y.left-I.left+p.left)/R.x,right:(I.right-y.right+p.right)/R.x}}var es=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:I,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...I},H&&m<es&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=f||(L||!b?[Mt(a)]:oi(a)),H=p!=="none";!f&&H&&I.push(...ri(a,b,p,R));let O=[a,...I],v=await l.detectOverflow(t,g),q=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(M=[...M,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||M.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:M},reset:{placement:T}};let A=(x=M.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=M.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var is=new Set(["left","top"]);async function ns(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=is.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await ns(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=pe(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,I=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),I&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(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=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function Nt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(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 ss=/transform|translate|scale|rotate|perspective|filter/,os=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||ss.test(t.willChange||"")||os.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(zt(t))return null;t=st(t)}return null}function Xt(){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 Y(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 st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&Nt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],Nt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=It(e)!==o||It(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?It(e.width):e.width)/n,a=(o?It(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var rs=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function as(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 s=i.getBoundingClientRect(),o=we(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=as(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function ls(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?zt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||Nt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(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 cs(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ds(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var us=25;function hs(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=us&&(a-=y)}return{width:a,height:l,x:c,y:d}}function fs(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=hs(i,e,t);else if(t==="document")n=ds(G(i));else if(V(t))n=fs(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function ms(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function ps(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?zt(t)?[]:ms(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function gs(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function bs(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||Nt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(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 ye(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(zt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ye(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ye(n);)n=Ei(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||vi(i)||e}var vs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:bs(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ys(i){return Y(i).direction==="rtl"}var ws={convertOffsetParentRelativeRectToViewportRelativeRect:ls,getDocumentElement:G,getClippingRect:ps,getOffsetParent:Ci,getElementRects:vs,getClientRects:cs,getDimensions:gs,getScale:Ct,isElement:V,isRTL:ys};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function Es(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let M=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(M!==u){if(!O)return a();M?a(!1,M):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.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 ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?Es(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Mi=(i,t,e)=>{let n=new Map,s=e??{},o={...ws,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:\`\${f.reference.width}px\`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Mi(i,t,{placement:n,strategy:s,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){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(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 Ii=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part='trigger']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,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&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(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()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(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))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part='item']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part='item']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(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(s=>s.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=>!W(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 s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({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 lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(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"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(\`label[for="\${CSS.escape(t.id)}"]\`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=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();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);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,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u 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=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}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,n,s,o,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),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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,s,o,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),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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 o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.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 s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=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=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){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",Ii);var Hi=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(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 s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return\`\${e}\${n!=="center"?\`-\${n}\`:""}\`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;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"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||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",Hi);var Ni="db-announcement-closed:";var zi=class extends N{constructor(){super(...arguments);h(this,"closeButton",null);h(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(Ni+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 s=document.querySelector("main, [role='main']");s?(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.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",zi);var _i=class extends N{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(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",_i);var Pi="sidebar_state",xs="b",As=768,Pt=new WeakMap;function Ss(i){try{return localStorage.getItem(i)}catch{return null}}function Cs(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",s=t.dataset.defaultOpen!=="false",o=Ss(Pi),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(\`(max-width: \${As-1}px)\`),u={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,u),Fi(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===xs&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),xe(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ls(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part='rail']");p&&p.addEventListener("click",()=>{xe(i)})}function Ls(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?ot(i):ks(i):(t.open=!t.open,Fi(t),Cs(Pi,String(t.open))))}function Fi(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 ks(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 o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector('a, button, [tabindex]:not([tabindex="-1"])');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.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 Qt={docs:"docs.js",shard:i=>\`t-\${i}.js\`,fragment:i=>\`f-\${i}.js\`},Jt={docs:"docs",shard:i=>i,fragment:i=>\`frag:\${i}\`};var Ts={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"},Os={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ds="[^aeiou]",Le="[aeiouy]",rt="("+Ds+"[^aeiouy]*)",ee="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+ee+rt),Rs=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),$i=new RegExp("^"+rt+"?"+Le),Bi=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),Ms=/ll$/,Is=/^(.+?)e$/,Hs=/^(.+?)y$/,Ns=/^(.+?(s|t))(ion)$/,zs=/^(.+?)(ed|ing)$/,_s=/(at|bl|iz)$/,Ps=/^(.+?)eed$/,Fs=/^.+?[^s]s$/,$s=/^.+?(ss|i)es$/,Bs=/([^aeiouylsz])\\1$/,qs=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Ks=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Ws=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function qi(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)),$s.test(t)?t=t.slice(0,-2):Fs.test(t)&&(t=t.slice(0,-1));let n;return(n=Ps.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=zs.exec(t))&&$i.test(n[1])&&(t=n[1],_s.test(t)?t+="e":Bs.test(t)?t=t.slice(0,-1):Bi.test(t)&&(t+="e")),(n=Hs.exec(t))&&$i.test(n[1])&&(t=n[1]+"i"),(n=qs.exec(t))&&Ce.test(n[1])&&(t=n[1]+Ts[n[2]]),(n=Ks.exec(t))&&Ce.test(n[1])&&(t=n[1]+Os[n[2]]),(n=Ws.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ns.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Is.exec(t))&&(te.test(n[1])||Rs.test(n[1])&&!Bi.test(n[1]))&&(t=n[1]),Ms.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ki=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(" ")),js=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Vs(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],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Ki.has(o)&&t.push(o)}for(let o of s)js.test(o)?t.push(...Vs(o)):o.length>=2&&!Ki.has(o)&&t.push(o)}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 $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?qi(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp('(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Xi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),I=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===I))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function Ys(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Ui(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Gs(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Zs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Us(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Ui(i,t,e=!1){let n=Xs(t);for(let o=Math.min(i.length,ji);o>=1;o--){let r=ke(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=ke(i,Math.min(i.length,ji));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var ji=3,Vi=new WeakMap;function Xs(i){let t=Vi.get(i);return t||Vi.set(i,t=new Set(i.shards)),t}function Xi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Gs(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Xi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Zs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Ui(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Us(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Gi(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Qs(i,t,e,n=10){let s=t.slice(0,n);await Gi(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=Yi(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,Yi(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Zi(i,t,e){await Gi(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(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 Yi(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Qi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await Ys(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Qs(n,o,t,e)}}function Ji(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(\`search index format \${(l==null?void 0:l.format)??"missing"}, expected \${4}: rebuild the site\`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function tn(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 s=n.replace(new RegExp('(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Js(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Js(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function en(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part='listbox']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Ji(\`\${i.unitRoot}_dogsbay/search/\`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?tn(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Qi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>\`section:"\${L(S)}"\`,I,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(\`\\\\s*section:"\${L(k).replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")}"\`,"i"),"").trim();n.value=_?tt:\`\${tt} \${P}\`.trim(),I=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,I!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===I)??n).focus(),I=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?\`\${C} result\${C===1?"":"s"}\`:\`\${s.dataset.noResults} \\u201C\${S}\\u201D\`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=M(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...Te(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...Te(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=M(\`\${T.url}#\${tt}\`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...Te(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Zi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},M=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=to(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function to(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return\`\${n}\${n.includes("?")?"&":"?"}h=\${encodeURIComponent(t.join(" "))}\${s}\`}function Te(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,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var nn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function sn(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>nn.test(g)).map(n),r=s.filter(g=>!nn.test(g)).map(n),a=[r.length?\`(?<![\\\\p{L}\\\\p{N}])(?:\${r.join("|")})\`:"",o.length?\`(?:\${o.join("|")})\`:""].filter(Boolean),l=new RegExp(\`(\${a.join("|")})\`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden='true']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=R[0],w.append(I),c.push(I),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(eo(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function eo(){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"},io=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},on=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},rn=function(t){try{return Array.isArray(t)?t.filter(ie):io(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.
1362
+ Expects a CSS selector, a Node element, a NodeList or an array.
1363
+ See: https://github.com/francoischalifour/medium-zoom\`)}},no=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},so=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=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=s+c+"px",a.style.width=o+"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 s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},oo=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(I||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:M}}))}),M},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,rn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),M},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,rn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:M}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),M},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),M},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),M},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,dn=P.left,un=P.top;A=pt({},A,{width:tt,height:qt,left:dn,top:un})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,hn=on(Ot)?k:Ot.naturalWidth||k,fn=on(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),mn=Kt.top,pn=Kt.left,ae=Kt.width,le=Kt.height,gn=Math.min(Math.max(ae,hn),k)/ae,bn=Math.min(Math.max(le,fn),D)/le,ce=Math.min(gn,bn),vn=(-pn+(k-ae)/2+O.margin+A.left)/ce,yn=(-mn+(D-le)/2+O.margin+A.top)/ce,Re="scale("+ce+") translate3d("+vn+"px, "+yn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(M);return}var A=function tt(){I=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:M}})),T(M)};if(v.zoomed){T(M);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(M);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:M}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,v.zoomed=so(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.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",p),v.zoomed.addEventListener("transitionend",A),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",p),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",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(I||!v.original){x(M);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),I=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:M}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(M)};I=!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:M}})),v.zoomed.addEventListener("transitionend",E)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],I=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=no(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var M={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return M};function ro(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var ao=".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}";ro(ao);var an=oo;var lo;function ln(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 s=lo??(lo=an());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={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,s.open({target:l}))},o),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(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function se(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function cn(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(\`could not load \${i}\`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function co(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 uo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.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 ho(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 s=n.selectedOptions[0];if(!s||s.disabled||!s.hasAttribute("value"))return;let o=s.dataset.prefix??"",r=n.value;if(s.hasAttribute("data-link")){(se(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!se(r)||!se(o))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=o?\`\${i}\${o}/\`:i;await cn(\`\${l}_dogsbay/pages.js\`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?\`\${l}index.html\`:r}catch{location.href=r}}},{signal:t})})}function fo(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 Bt=new Map,re=new Set;function oe(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of re)i.isConnected||ot(i)}function mo(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function po(){oe(),document.querySelectorAll("[data-component='sidebar-provider']").forEach(i=>{if(Bt.has(i)||re.has(i))return;let t=new AbortController;mo(t.signal,()=>Se(i))?Bt.set(i,t):i.querySelector("[data-component='sidebar']")&&re.add(i)}),document.removeEventListener("keydown",oe),document.addEventListener("keydown",oe)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),po(),i.theme!==!1&&co(e),uo(e),i.switchers!==!1&&ho(o,e),fo(e),i.search!==!1&&en({unitRoot:s,loadScript:cn,signal:e}),sn(e),ln(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...re])ot(a);oe(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();
1364
+ `;
1365
+ 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 %}>\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 %}>\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
1366
+ header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
1367
+ and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
1368
+ stored under, as the head meta), html (inline Markdown, rendered), toneClass, closeable} or "". -#}
1369
+ {%- if announcement -%}
1370
+ <db-announcement announcement-id="{{ announcement.key }}" class="db-announcement block border-b text-sm text-foreground {{ announcement.toneClass }}" role="region" aria-label="{{ t('announcement') }}" data-pagefind-ignore><div class="mx-auto flex min-h-10 items-center gap-2 px-4 py-2"><p class="m-0 flex-1 text-center [&_a]:font-medium [&_a]:underline [&_a]:underline-offset-2">{{ announcement.html }}</p>
1371
+ {%- if announcement.closeable -%}
1372
+ <button type="button" data-part="close" aria-label="{{ t('closeAnnouncement') }}" class="shrink-0 rounded-md p-1 text-foreground/80 hover:bg-foreground/10 hover:text-foreground">{{ icons.close }}</button>
1373
+ {%- endif -%}
1374
+ </div></db-announcement>
1375
+ {%- endif -%}
1376
+ `, "partials/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">&middot;</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">&larr; {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} &rarr;</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
1290
1377
  {%- if breadcrumbs | length >= 2 -%}
1291
1378
  <nav aria-label="{{ t("breadcrumb") }}" class="mb-4 text-sm text-muted-foreground"><ol class="m-0 flex list-none flex-wrap gap-1.5 p-0">
1292
1379
  {%- for item in breadcrumbs -%}
@@ -1311,7 +1398,56 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1311
1398
  {%- if post.updated %}<span>&middot; {{ t("updated") }} <time datetime="{{ post.updatedDatetime }}">{{ post.updated }}</time></span>{% endif -%}
1312
1399
  </div>
1313
1400
  {%- endif -%}
1314
- `, "partials/footer-links.html": '{#- Footer links: llms.txt and "Powered by". Context: llmsHref, poweredBy, t, icons. -#}\n{%- if llmsHref %}<a class="hover:text-foreground" data-llms-link href="{{ llmsHref }}">{{ t("llmsTxt") }}</a>{% endif -%}\n{%- if poweredBy %}<a class="inline-flex items-center gap-1.5 hover:text-foreground" data-powered-by href="https://dogsbay.ai" rel="noopener">{{ icons.layers }}{{ t("poweredBy") }}</a>{% endif -%}\n', "partials/footer-meta.html": '{#- Edit link and last-updated date. Context: editUrl, lastUpdated (already formatted), t. -#}\n{%- if editUrl or lastUpdated -%}\n<div class="mb-6 flex flex-wrap items-center gap-4 text-sm text-muted-foreground">\n{%- if editUrl %}<a class="inline-flex items-center gap-1 hover:text-foreground" href="{{ editUrl }}" rel="noopener">{{ t("edit") }}</a>{% endif -%}\n{%- if lastUpdated %}<span data-last-updated>{{ t("lastUpdated") | replace("{date}", lastUpdated, 1) }}</span>{% endif -%}\n</div>\n{%- endif -%}\n', "partials/footer.html": '<footer class="mt-12 border-t pt-6">\n{{ footerMeta }}\n{{ pager }}\n<div class="mt-6 flex flex-wrap items-center justify-between gap-2 border-t pt-4 text-xs text-muted-foreground">\n<span>{{ site.copyright }}</span>\n<div class="flex flex-wrap items-center gap-4">{{ footerLinks }}</div>\n</div>\n</footer>\n', "partials/head.html": '<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>{{ page.documentTitle }}</title>\n{% if page.description %}<meta name="description" content="{{ page.description }}">\n{% endif %}<meta name="generator" content="dogsbay-ssg">\n{{ headLinks }}\n<link rel="stylesheet" href="{{ paths.unit }}_dogsbay/site.css">\n<link rel="icon" href="{{ paths.site }}_dogsbay/assets/favicon.svg" type="image/svg+xml">\n{{ themeBoot }}\n{{ head }}\n', "partials/header.html": '<header class="sticky top-0 z-40 flex h-[var(--db-header-height)] shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60">\n{{ sidebarTrigger }}\n<span class="text-sm text-muted-foreground" data-page-title>{{ page.title }}</span>\n<div class="ml-auto flex items-center gap-2">\n{{ tocPopover }}{{ switchers }}{{ pageActions }}{{ searchButton }}{{ repoLink }}{{ themeToggle }}\n</div>\n</header>\n', "partials/hero.html": `{#- A blog post's hero image (DocsLayout.astro, chrome "blog"). Context: post.hero (a link to the image) or empty. -#}
1401
+ `, "partials/footer-columns.html": `{#- The site's footer columns (footer.columns), as DocsFooter.astro: titled link lists that wrap on narrow screens.
1402
+ Context: footerColumns = [{title, links: [{label, href, external}]}]. -#}
1403
+ {%- if footerColumns | length -%}
1404
+ <nav aria-label="{{ t('footerLinks') }}" data-pagefind-ignore class="site-footer-columns mt-8 grid grid-cols-2 gap-6 text-sm first:mt-0 sm:grid-cols-3 lg:grid-cols-4">
1405
+ {%- for c in footerColumns -%}
1406
+ <div class="min-w-0"><h2 class="mb-2 text-sm font-semibold text-foreground">{{ c.title }}</h2><ul class="flex flex-col gap-1.5">
1407
+ {%- for l in c.links -%}
1408
+ <li><a href="{{ l.href }}" class="text-muted-foreground no-underline hover:text-foreground"{% if l.external %} data-external{% endif %}>{{ l.label }}</a></li>
1409
+ {%- endfor -%}
1410
+ </ul></div>
1411
+ {%- endfor -%}
1412
+ </nav>
1413
+ {%- endif -%}
1414
+ `, "partials/footer-links.html": '{#- Footer links: llms.txt and "Powered by". Context: llmsHref, poweredBy, t, icons. -#}\n{%- if llmsHref %}<a class="hover:text-foreground" data-llms-link href="{{ llmsHref }}">{{ t("llmsTxt") }}</a>{% endif -%}\n{%- if poweredBy %}<a class="inline-flex items-center gap-1.5 hover:text-foreground" data-powered-by href="https://dogsbay.ai" rel="noopener">{{ icons.layers }}{{ t("poweredBy") }}</a>{% endif -%}\n', "partials/footer-meta.html": '{#- Edit link and last-updated date. Context: editUrl, lastUpdated (already formatted), t. -#}\n{%- if editUrl or lastUpdated -%}\n<div class="mb-6 flex flex-wrap items-center gap-4 text-sm text-muted-foreground">\n{%- if editUrl %}<a class="inline-flex items-center gap-1 hover:text-foreground" href="{{ editUrl }}" rel="noopener">{{ t("edit") }}</a>{% endif -%}\n{%- if lastUpdated %}<span data-last-updated>{{ t("lastUpdated") | replace("{date}", lastUpdated, 1) }}</span>{% endif -%}\n</div>\n{%- endif -%}\n', "partials/footer.html": '<footer class="mt-12 border-t pt-6">\n{{ footerMeta }}\n{{ pager }}\n{{ footerColumns }}\n<div class="mt-6 flex flex-wrap items-center justify-between gap-2 border-t pt-4 text-xs text-muted-foreground">\n<span>{{ copyrightHtml }}</span>\n<div class="flex flex-wrap items-center gap-4">{% if has.footerSocial %}<div class="flex items-center gap-1">{{ footerSocial }}</div>{% endif %}{{ footerLinks }}</div>\n</div>\n</footer>\n', "partials/head.html": '<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>{{ page.documentTitle }}</title>\n{% if page.description %}<meta name="description" content="{{ page.description }}">\n{% endif %}<meta name="generator" content="dogsbay-ssg">\n{{ headLinks }}\n<link rel="stylesheet" href="{{ paths.unit }}_dogsbay/site.css">\n<link rel="icon" href="{{ paths.site }}_dogsbay/assets/favicon.svg" type="image/svg+xml">\n{{ themeBoot }}\n{{ head }}\n', "partials/header-links.html": `{#- The site's header links (header.links), as DocsLayout's HeaderLinks.astro: links, and one-level dropdowns
1415
+ as <details> lists, so every link is in the HTML (crawlers, readers without JavaScript).
1416
+ Context: headerLinks = [{label, href, current, items}] (items: [{label, href, current}], empty for a link;
1417
+ href relative to the page; current "page" or ""), layout = "bar" (the header, from lg) or "list" (the sidebar, below lg),
1418
+ wrap = "1" on a layout with no sidebar to move them into: the bar shows at every width and wraps. -#}
1419
+ {%- if headerLinks | length -%}
1420
+ {%- if layout == "bar" -%}
1421
+ <nav aria-label="{{ t('siteLinks') }}" class="site-header-links items-center gap-1 {% if wrap %}flex min-w-0 flex-wrap{% else %}hidden lg:flex{% endif %}">
1422
+ {%- for l in headerLinks -%}
1423
+ {%- if l.items | length -%}
1424
+ <details class="site-header-menu relative"><summary class="flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ l.label }}{{ icons.chevronDown }}</summary><ul class="absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-border bg-popover p-1 text-sm shadow-md">
1425
+ {%- for i in l.items -%}
1426
+ <li><a href="{{ i.href }}"{% if i.current %} aria-current="page"{% endif %} class="block rounded-sm px-2 py-1.5 text-foreground no-underline hover:bg-accent">{{ i.label }}</a></li>
1427
+ {%- endfor -%}
1428
+ </ul></details>
1429
+ {%- else -%}
1430
+ <a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground aria-[current=page]:text-foreground">{{ l.label }}</a>
1431
+ {%- endif -%}
1432
+ {%- endfor -%}
1433
+ </nav>
1434
+ {%- else -%}
1435
+ <nav aria-label="{{ t('siteLinks') }}" class="site-header-links-list"><ul class="flex flex-col gap-0.5 text-sm">
1436
+ {%- for l in headerLinks -%}
1437
+ {%- if l.items | length -%}
1438
+ <li><span class="block px-2 py-1.5 text-xs font-medium text-sidebar-foreground/70">{{ l.label }}</span><ul class="flex flex-col gap-0.5 pl-2">
1439
+ {%- for i in l.items -%}
1440
+ <li><a href="{{ i.href }}"{% if i.current %} aria-current="page"{% endif %} class="block rounded-md px-2 py-1.5 text-sidebar-foreground no-underline hover:bg-sidebar-accent">{{ i.label }}</a></li>
1441
+ {%- endfor -%}
1442
+ </ul></li>
1443
+ {%- else -%}
1444
+ <li><a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="block rounded-md px-2 py-1.5 text-sidebar-foreground no-underline hover:bg-sidebar-accent">{{ l.label }}</a></li>
1445
+ {%- endif -%}
1446
+ {%- endfor -%}
1447
+ </ul></nav>
1448
+ {%- endif -%}
1449
+ {%- endif -%}
1450
+ `, "partials/header.html": '<header class="sticky top-0 z-40 flex shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60 {% if has.headerLinks and not has.sidebar %}min-h-[var(--db-header-height)] flex-wrap py-1{% else %}h-[var(--db-header-height)]{% endif %}">\n{#- A layout with no sidebar keeps its header links in the header, wrapping, so the header grows a row (DocsLayout) #}\n{{ sidebarTrigger }}\n{#- With header links, the page title shows only below lg, where the links are in the sidebar; a layout with\n no sidebar keeps the links in the header (wrapping) and has no title #}\n{%- if not (has.headerLinks and not has.sidebar) %}\n<span class="text-sm text-muted-foreground{% if has.headerLinks %} lg:hidden{% endif %}" data-page-title>{{ page.title }}</span>\n{%- endif %}\n{{ headerLinks }}\n<div class="ml-auto flex items-center gap-2">\n{{ tocPopover }}{{ switchers }}{{ pageActions }}{{ searchButton }}{{ repoLink }}{{ themeToggle }}\n</div>\n</header>\n', "partials/hero.html": `{#- A blog post's hero image (DocsLayout.astro, chrome "blog"). Context: post.hero (a link to the image) or empty. -#}
1315
1451
  {%- if post is defined and post and post.hero -%}
1316
1452
  <img src="{{ post.hero }}" alt="" class="not-prose mb-8 w-full rounded-lg border border-border object-cover aspect-[2/1]" loading="eager" decoding="async">
1317
1453
  {%- endif -%}
@@ -1362,7 +1498,34 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1362
1498
  {% endif -%}
1363
1499
  {%- endset -%}
1364
1500
  {{- head_tags | trim -}}
1365
- `, "partials/sidebar-header.html": '<div class="flex flex-col gap-2 p-2" data-sidebar="header">\n<ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">\n<li class="group/menu-item relative">\n<a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">\n<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>\n<div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>\n</a>\n</li>\n</ul>\n</div>\n', "partials/switcher.html": '{#- Version or language switcher: a native <select> upgraded by db-select (the no-JS fallback is kept).\n Context: switcher = {kind: "locale" | "version", label, options: [{label, href, current, prefix, note?}]}. -#}\n{%- if switcher.options | length >= 2 -%}\n<db-select class="db-switch db-switch-{{ switcher.kind }}"><select data-db-switch="{{ switcher.kind }}" aria-label="{{ switcher.label }}" class="rounded-md border border-border bg-background px-2 py-1.5 text-sm">\n{%- for o in switcher.options -%}\n<option{% if o.href %} value="{{ o.href }}"{% endif %}{% if o.current %} selected{% endif %}{% if o.prefix %} data-prefix="{{ o.prefix }}"{% endif %}>{{ o.label }}{% if o.note %} ({{ o.note }}){% endif %}</option>\n{%- endfor -%}\n</select></db-select>\n{%- endif -%}\n', "partials/tags.html": '{#- The meta strip (DocsLayout): type and status badges (TypeBadge, StatusBadge), then the tag chips (TagList.astro). Context: badges = [{label, cls, href, attr, value}], tags (the values), and tagChips = [{tag, label, prefix, href, cls}] when chips link to term pages or carry colours and labels (taxonomies.tags); otherwise tags render as plain chips. -#}\n{%- set badges = badges if badges is defined else [] -%}\n{%- if badges or tags -%}\n<div class="not-prose mb-6 flex flex-wrap items-center gap-2" data-page-meta-strip>\n{%- for b in badges -%}\n{% if b.href %}<a href="{{ b.href }}" class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</a>{% else %}<span class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</span>{% endif %}\n{%- endfor -%}\n{%- if tagChips is defined and tagChips -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for chip in tagChips -%}\n<li>{% if chip.href %}<a href="{{ chip.href }}" class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% else %}<span class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% endif -%}\n{%- if chip.prefix %}<span>{{ chip.prefix }}:</span><span class="font-semibold">{{ chip.label }}</span>{% else %}<span aria-hidden="true">#</span><span>{{ chip.label }}</span>{% endif -%}\n{%- if chip.href %}</a>{% else %}</span>{% endif %}</li>\n{%- endfor -%}\n</ul>\n{%- elif tags -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for tag in tags -%}\n<li><span class="inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground"><span aria-hidden="true">#</span><span>{{ tag }}</span></span></li>\n{%- endfor -%}\n</ul>\n{%- endif -%}\n</div>\n{%- endif -%}\n', "partials/taxonomy-index.html": `{#- A taxonomy's index page (TaxonomyIndex.astro): all terms with their page counts, as a tree when the taxonomy is hierarchical. Context: taxonomy = {name, title, summary, hierarchical, terms: [{label, href, count, children: [{label, href, count}]}]}. -#}
1501
+ `, "partials/sidebar-header.html": `{#- The sidebar's top: the logo (site.logo, light and dark: two images, one hidden by the theme class, no script)
1502
+ or the book icon, and the site's name and tagline, which a wordmark logo (replacesName) stands for.
1503
+ Context: siteLogo = {light, dark, alt, replacesName} (light "" without a logo), site, paths, logo (the book icon). -#}
1504
+ <div class="flex flex-col gap-2 p-2" data-sidebar="header">
1505
+ <ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">
1506
+ <li class="group/menu-item relative">
1507
+ <a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">
1508
+ {%- if siteLogo.light %}
1509
+ <img src="{{ siteLogo.light }}" alt="{{ siteLogo.alt }}" class="site-logo h-8 w-auto max-w-[10rem] object-contain object-left{% if siteLogo.dark %} dark:hidden{% endif %}">
1510
+ {%- if siteLogo.dark %}<img src="{{ siteLogo.dark }}" alt="{{ siteLogo.alt }}" class="site-logo hidden h-8 w-auto max-w-[10rem] object-contain object-left dark:block">{% endif %}
1511
+ {%- else %}
1512
+ <div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>
1513
+ {%- endif %}
1514
+ {%- if not siteLogo.replacesName %}
1515
+ <div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>
1516
+ {%- endif %}
1517
+ </a>
1518
+ </li>
1519
+ </ul>
1520
+ </div>
1521
+ `, "partials/social-links.html": `{#- Brand icon links (header.social, footer.social; site.repoUrl is the header's default), as DocsLayout's
1522
+ SocialLinks.astro. The icon is @dogsbay/icons' SVG (aria-hidden); the link carries the name; another site
1523
+ opens in a new tab. Context: social = [{label, href, svg, external}], size = "header" or "footer",
1524
+ socialClass = extra classes for each link. -#}
1525
+ {%- for s in social -%}
1526
+ <a href="{{ s.href }}"{% if s.external %} target="_blank" rel="noopener"{% endif %} aria-label="{{ s.label }}" title="{{ s.label }}" class="inline-flex items-center justify-center text-muted-foreground hover:text-foreground {% if size == 'header' %}rounded-md p-2 hover:bg-accent{% else %}p-1{% endif %}{% if socialClass %} {{ socialClass }}{% endif %}" data-social-link>{{ s.svg }}</a>
1527
+ {%- endfor -%}
1528
+ `, "partials/switcher.html": '{#- Product, version or language switcher: a native <select> upgraded by db-select (the no-JS fallback is kept).\n Context: switcher = {kind: "product" | "locale" | "version", label, options: [{label, href, current, prefix, note?, disabled?, link?}]}.\n A `link` option (versionMenu.links) goes straight to its page; db-select copies data-link to its item, which ssg.css draws a line above. -#}\n{%- if switcher.options | length >= 2 -%}\n<db-select class="db-switch db-switch-{{ switcher.kind }}"><select data-db-switch="{{ switcher.kind }}" aria-label="{{ switcher.label }}" class="rounded-md border border-border bg-background px-2 py-1.5 text-sm">\n{%- for o in switcher.options -%}\n<option{% if o.href %} value="{{ o.href }}"{% endif %}{% if o.current %} selected{% endif %}{% if o.disabled is defined and o.disabled %} disabled{% endif %}{% if o.link is defined and o.link %} data-link{% endif %}{% if o.prefix %} data-prefix="{{ o.prefix }}"{% endif %}>{{ o.label }}{% if o.note %} ({{ o.note }}){% endif %}</option>\n{%- endfor -%}\n</select></db-select>\n{%- endif -%}\n', "partials/tags.html": '{#- The meta strip (DocsLayout): type and status badges (TypeBadge, StatusBadge), then the tag chips (TagList.astro). Context: badges = [{label, cls, href, attr, value}], tags (the values), and tagChips = [{tag, label, prefix, href, cls}] when chips link to term pages or carry colours and labels (taxonomies.tags); otherwise tags render as plain chips. -#}\n{%- set badges = badges if badges is defined else [] -%}\n{%- if badges or tags -%}\n<div class="not-prose mb-6 flex flex-wrap items-center gap-2" data-page-meta-strip>\n{%- for b in badges -%}\n{% if b.href %}<a href="{{ b.href }}" class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</a>{% else %}<span class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</span>{% endif %}\n{%- endfor -%}\n{%- if tagChips is defined and tagChips -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for chip in tagChips -%}\n<li>{% if chip.href %}<a href="{{ chip.href }}" class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% else %}<span class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% endif -%}\n{%- if chip.prefix %}<span>{{ chip.prefix }}:</span><span class="font-semibold">{{ chip.label }}</span>{% else %}<span aria-hidden="true">#</span><span>{{ chip.label }}</span>{% endif -%}\n{%- if chip.href %}</a>{% else %}</span>{% endif %}</li>\n{%- endfor -%}\n</ul>\n{%- elif tags -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for tag in tags -%}\n<li><span class="inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground"><span aria-hidden="true">#</span><span>{{ tag }}</span></span></li>\n{%- endfor -%}\n</ul>\n{%- endif -%}\n</div>\n{%- endif -%}\n', "partials/taxonomy-index.html": `{#- A taxonomy's index page (TaxonomyIndex.astro): all terms with their page counts, as a tree when the taxonomy is hierarchical. Context: taxonomy = {name, title, summary, hierarchical, terms: [{label, href, count, children: [{label, href, count}]}]}. -#}
1366
1529
  <section class="mx-auto max-w-3xl px-6 py-8" data-taxonomy-index data-taxonomy="{{ taxonomy.name }}">
1367
1530
  <header class="mb-6"><h1 class="text-3xl font-bold tracking-tight">{{ taxonomy.title }}</h1><p class="mt-2 text-sm text-muted-foreground">{{ taxonomy.summary }}</p></header>
1368
1531
  {%- if taxonomy.hierarchical %}
@@ -1407,36 +1570,36 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
1407
1570
  <p class="text-sm text-muted-foreground">{{ t("noTaggedPages") }}</p>
1408
1571
  {%- endif %}
1409
1572
  </section>
1410
- `, "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' };
1411
- 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-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", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "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-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "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", "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()", "when", "window.__DOGSBAY_NAV__"];
1573
+ `, "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' };
1574
+ 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__"];
1412
1575
  var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
1413
1576
 
1414
1577
  ========================================================================
1415
- @dogsbay/elements@0.2.0-beta.146 (MIT)
1578
+ @dogsbay/elements@0.2.0-beta.151 (MIT)
1416
1579
  https://github.com/dogsbay/dogsbay.git
1417
1580
 
1418
1581
  Licensed under MIT; the package ships no licence file.
1419
1582
 
1420
1583
  ========================================================================
1421
- @dogsbay/primitives@0.2.0-beta.146 (MIT)
1584
+ @dogsbay/primitives@0.2.0-beta.151 (MIT)
1422
1585
  https://github.com/dogsbay/dogsbay.git
1423
1586
 
1424
1587
  Licensed under MIT; the package ships no licence file.
1425
1588
 
1426
1589
  ========================================================================
1427
- @dogsbay/render-html@0.2.0-beta.146 (MIT)
1590
+ @dogsbay/render-html@0.2.0-beta.151 (MIT)
1428
1591
  https://github.com/dogsbay/dogsbay.git
1429
1592
 
1430
1593
  Licensed under MIT; the package ships no licence file.
1431
1594
 
1432
1595
  ========================================================================
1433
- @dogsbay/search@0.2.0-beta.146 (MIT)
1596
+ @dogsbay/search@0.2.0-beta.151 (MIT)
1434
1597
  https://github.com/dogsbay/dogsbay.git
1435
1598
 
1436
1599
  Licensed under MIT; the package ships no licence file.
1437
1600
 
1438
1601
  ========================================================================
1439
- @dogsbay/ui@0.2.0-beta.146 (MIT)
1602
+ @dogsbay/ui@0.2.0-beta.151 (MIT)
1440
1603
  https://github.com/dogsbay/dogsbay.git
1441
1604
 
1442
1605
  Licensed under MIT; the package ships no licence file.
@@ -1891,6 +2054,8 @@ import { apiPageLayout } from "@dogsbay/serialize-core";
1891
2054
  import { attrs, esc } from "@dogsbay/render-html/html";
1892
2055
  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>`;
1893
2056
  var ICONS = {
2057
+ chevronDown: svg('<polyline points="6 9 12 15 18 9"/>', "", 14),
2058
+ close: svg('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>', "", 16),
1894
2059
  chevronLeft: svg('<path d="m15 18-6-6 6-6"/>', "", 16),
1895
2060
  chevronRight: svg('<path d="m9 18 6-6-6-6"/>', "", 16),
1896
2061
  layers: svg(
@@ -1913,7 +2078,8 @@ function sidebar(opts) {
1913
2078
  ${opts.header}
1914
2079
  <div class="mx-2 h-px w-auto shrink-0 bg-sidebar-border" role="separator"></div>
1915
2080
  <div class="flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]" data-sidebar="content">
1916
- <div class="relative flex w-full min-w-0 flex-col p-2"><div class="w-full text-sm">
2081
+ ${opts.links ? `<div class="relative flex w-full min-w-0 flex-col p-2 lg:hidden" data-sidebar="group"><div class="w-full text-sm" data-sidebar="group-content">${opts.links}</div></div>
2082
+ ` : ""}<div class="relative flex w-full min-w-0 flex-col p-2"><div class="w-full text-sm">
1917
2083
  ${opts.nav}
1918
2084
  </div></div>
1919
2085
  </div>
@@ -2026,9 +2192,6 @@ function themeToggle(label) {
2026
2192
  "hidden h-4 w-4 dark:block"
2027
2193
  )}</button>`;
2028
2194
  }
2029
- function repoLink(url, label) {
2030
- return `<a href="${esc(url)}" class="rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-foreground" aria-label="${esc(label)}" rel="noopener"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0C17.3 4.7 18.3 5 18.3 5c.6 1.6.2 2.8.1 3.2.8.8 1.3 1.9 1.3 3.1 0 4.6-2.8 5.6-5.5 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .3"/></svg></a>`;
2031
- }
2032
2195
  function pageActions(o) {
2033
2196
  const item = "relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground no-underline border-0 bg-transparent text-left";
2034
2197
  const arrow = svg('<path d="M7 7h10v10"/><path d="M7 17 17 7"/>', "ml-auto opacity-60", 14);
@@ -2159,7 +2322,122 @@ function linkIconAttrs(icons) {
2159
2322
  return { tokens: tokens || void 0, style: style || void 0 };
2160
2323
  }
2161
2324
 
2325
+ // src/theme/docs-layout/site-chrome.ts
2326
+ var isExternal2 = (href) => /^https?:\/\//i.test(href);
2327
+ var ANNOUNCEMENT_TONE_CLASS = {
2328
+ note: "border-note/40 bg-note/15",
2329
+ tip: "border-tip/40 bg-tip/15",
2330
+ warning: "border-warning/40 bg-warning/20",
2331
+ caution: "border-danger/40 bg-danger/15"
2332
+ };
2333
+
2162
2334
  // src/theme/compose.ts
2335
+ import { inlineMarkdownHtml, isChromeMenu } from "@dogsbay/site-files";
2336
+
2337
+ // node_modules/@dogsbay/icons/dist/social-data.js
2338
+ var SOCIAL_ICON_BODIES = {
2339
+ "bitbucket": {
2340
+ "body": '<path fill="currentColor" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.77.77 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>',
2341
+ "size": 24
2342
+ },
2343
+ "bluesky": {
2344
+ "body": '<path fill="currentColor" d="M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037c-.856 3.061-3.978 3.842-6.755 3.37c4.854.826 6.089 3.562 3.422 6.299c-5.065 5.196-7.28-1.304-7.847-2.97c-.104-.305-.152-.448-.153-.327c0-.121-.05.022-.153.327c-.568 1.666-2.782 8.166-7.847 2.97c-2.667-2.737-1.432-5.473 3.422-6.3c-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"/>',
2345
+ "size": 24
2346
+ },
2347
+ "discord": {
2348
+ "body": '<path fill="currentColor" d="M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418"/>',
2349
+ "size": 24
2350
+ },
2351
+ "facebook": {
2352
+ "body": '<path fill="currentColor" d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978c.401 0 .955.042 1.468.103a9 9 0 0 1 1.141.195v3.325a9 9 0 0 0-.653-.036a27 27 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.7 1.7 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103l-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647"/>',
2353
+ "size": 24
2354
+ },
2355
+ "git": {
2356
+ "body": '<path fill="currentColor" d="M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19l2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63L10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z"/>',
2357
+ "size": 24
2358
+ },
2359
+ "github": {
2360
+ "body": '<path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>',
2361
+ "size": 24
2362
+ },
2363
+ "gitlab": {
2364
+ "body": '<path fill="currentColor" d="m23.6 9.593l-.033-.086L20.3.98a.85.85 0 0 0-.336-.405a.875.875 0 0 0-1 .054a.9.9 0 0 0-.29.44L16.47 7.818H7.537L5.333 1.07a.86.86 0 0 0-.29-.441a.875.875 0 0 0-1-.054a.86.86 0 0 0-.336.405L.433 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009l.03.021l4.977 3.727l2.462 1.863l1.5 1.132a1.01 1.01 0 0 0 1.22 0l1.499-1.132l2.461-1.863l5.006-3.75l.013-.01a6.07 6.07 0 0 0 2.01-7.002"/>',
2365
+ "size": 24
2366
+ },
2367
+ "huggingface": {
2368
+ "body": '<path fill="currentColor" d="M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"/>',
2369
+ "size": 24
2370
+ },
2371
+ "instagram": {
2372
+ "body": '<path fill="currentColor" d="M7.03.084c-1.277.06-2.149.264-2.91.563a5.9 5.9 0 0 0-2.124 1.388a5.9 5.9 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076s-.069 1.688-.063 4.947s.021 3.667.083 4.947c.061 1.277.264 2.149.563 2.911c.308.789.72 1.457 1.388 2.123a5.9 5.9 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552c1.278.056 1.689.069 4.947.063s3.668-.021 4.947-.082c1.28-.06 2.147-.265 2.91-.563a5.9 5.9 0 0 0 2.123-1.388a5.9 5.9 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912c.056-1.28.07-1.69.063-4.948c-.006-3.258-.02-3.667-.081-4.947c-.06-1.28-.264-2.148-.564-2.911a5.9 5.9 0 0 0-1.387-2.123a5.9 5.9 0 0 0-2.128-1.38c-.764-.294-1.636-.496-2.914-.55C15.647.009 15.236-.006 11.977 0S8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.7 3.7 0 0 1-1.382-.895a3.7 3.7 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228c-.06-1.264-.072-1.644-.08-4.848c-.006-3.204.006-3.583.061-4.848c.05-1.169.246-1.805.408-2.228c.216-.561.477-.96.895-1.382a3.7 3.7 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417c1.265-.06 1.644-.072 4.848-.08c3.203-.006 3.583.006 4.85.062c1.168.05 1.804.244 2.227.408c.56.216.96.475 1.382.895s.681.817.9 1.378c.165.422.362 1.056.417 2.227c.06 1.265.074 1.645.08 4.848c.005 3.203-.006 3.583-.061 4.848c-.051 1.17-.245 1.805-.408 2.23c-.216.56-.477.96-.896 1.38a3.7 3.7 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418c-1.266.06-1.645.072-4.85.079s-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442a1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024a6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16A4 4 0 0 1 8 12.008"/>',
2373
+ "size": 24
2374
+ },
2375
+ "linkedin": {
2376
+ "body": '<path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"/>',
2377
+ "size": 24
2378
+ },
2379
+ "mastodon": {
2380
+ "body": '<path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38q.398-.092.786-.213c.585-.184 1.27-.39 1.774-.753a.06.06 0 0 0 .023-.043v-1.809a.05.05 0 0 0-.02-.041a.05.05 0 0 0-.046-.01a20.3 20.3 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.6 5.6 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422q.059-.011.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545m-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102q0-1.965 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164q1.012 1.155 1.012 3.12z"/>',
2381
+ "size": 24
2382
+ },
2383
+ "medium": {
2384
+ "body": '<path fill="currentColor" d="M4.21 0A4.2 4.2 0 0 0 0 4.21v15.58A4.2 4.2 0 0 0 4.21 24h15.58A4.2 4.2 0 0 0 24 19.79v-1.093a5 5 0 0 1-.422.02c-2.577 0-4.027-2.146-4.09-4.832a8 8 0 0 1 .022-.708c.093-1.186.475-2.241 1.105-3.022a3.9 3.9 0 0 1 1.395-1.1c.468-.237 1.127-.367 1.664-.367h.023q.151 0 .303.01V4.211A4.2 4.2 0 0 0 19.79 0Zm.198 5.583h4.165l3.588 8.435l3.59-8.435h3.864v.146l-.019.004c-.705.16-1.063.397-1.063 1.254h-.003l.003 10.274c.06.676.424.885 1.063 1.03l.02.004v.145h-4.923v-.145l.019-.005c.639-.144.994-.353 1.054-1.03V7.267l-4.745 11.15h-.261L6.15 7.569v9.445c0 .857.358 1.094 1.063 1.253l.02.004v.147H4.405v-.147l.019-.004c.705-.16 1.065-.397 1.065-1.253V6.987c0-.857-.358-1.094-1.064-1.254l-.018-.004zm19.25 3.668c-1.086.023-1.733 1.323-1.813 3.124H24V9.298a1.4 1.4 0 0 0-.342-.047m-1.862 3.632c-.1 1.756.86 3.239 2.204 3.634v-3.634z"/>',
2385
+ "size": 24
2386
+ },
2387
+ "npm": {
2388
+ "body": '<path fill="currentColor" d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019l-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/>',
2389
+ "size": 24
2390
+ },
2391
+ "reddit": {
2392
+ "body": '<path fill="currentColor" d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286A.72.72 0 0 0 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0m4.388 3.199a1.999 1.999 0 1 1-1.947 2.46v.002a2.37 2.37 0 0 0-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363a2.802 2.802 0 1 1 2.908 4.753c-.088 3.256-3.637 5.876-7.997 5.876c-4.361 0-7.905-2.617-7.998-5.87a2.8 2.8 0 0 1 1.189-5.34c.645 0 1.239.218 1.712.585c1.275-.79 2.881-1.291 4.64-1.365v-.01a3.23 3.23 0 0 1 2.88-3.207a2 2 0 0 1 1.959-1.595m-8.085 8.376c-.784 0-1.459.78-1.506 1.797s.64 1.429 1.426 1.429s1.371-.369 1.418-1.385s-.553-1.841-1.338-1.841m7.406 0c-.786 0-1.385.824-1.338 1.841s.634 1.385 1.418 1.385c.785 0 1.473-.413 1.426-1.429c-.046-1.017-.721-1.797-1.506-1.797m-3.703 4.013c-.974 0-1.907.048-2.77.135a.222.222 0 0 0-.183.305a3.2 3.2 0 0 0 2.953 1.964a3.2 3.2 0 0 0 2.953-1.964a.222.222 0 0 0-.184-.305a28 28 0 0 0-2.769-.135"/>',
2393
+ "size": 24
2394
+ },
2395
+ "rss": {
2396
+ "body": '<path fill="currentColor" d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24zM3.291 17.415a3.3 3.3 0 0 1 3.293 3.295A3.303 3.303 0 0 1 3.283 24C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295M15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91"/>',
2397
+ "size": 24
2398
+ },
2399
+ "slack": {
2400
+ "body": '<path fill="currentColor" d="M5.042 15.165a2.53 2.53 0 0 1-2.52 2.523A2.53 2.53 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52a2.527 2.527 0 0 1 2.521 2.52v6.313A2.53 2.53 0 0 1 8.834 24a2.53 2.53 0 0 1-2.521-2.522zM8.834 5.042a2.53 2.53 0 0 1-2.521-2.52A2.53 2.53 0 0 1 8.834 0a2.53 2.53 0 0 1 2.521 2.522v2.52zm0 1.271a2.53 2.53 0 0 1 2.521 2.521a2.53 2.53 0 0 1-2.521 2.521H2.522A2.53 2.53 0 0 1 0 8.834a2.53 2.53 0 0 1 2.522-2.521zm10.122 2.521a2.53 2.53 0 0 1 2.522-2.521A2.53 2.53 0 0 1 24 8.834a2.53 2.53 0 0 1-2.522 2.521h-2.522zm-1.268 0a2.53 2.53 0 0 1-2.523 2.521a2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.53 2.53 0 0 1 2.523 2.522zm-2.523 10.122a2.53 2.53 0 0 1 2.523 2.522A2.53 2.53 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522zm0-1.268a2.527 2.527 0 0 1-2.52-2.523a2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.53 2.53 0 0 1-2.522 2.523z"/>',
2401
+ "size": 24
2402
+ },
2403
+ "stackoverflow": {
2404
+ "body": '<path fill="currentColor" d="m15.725 0l-1.72 1.277l6.39 8.588l1.716-1.277zm-3.94 3.418l-1.369 1.644l8.225 6.85l1.369-1.644zm-3.15 4.465l-.905 1.94l9.702 4.517l.904-1.94zm-1.85 4.86l-.44 2.093l10.473 2.201l.44-2.092l-10.473-2.203zM1.89 15.47V24h19.19v-8.53h-2.133v6.397H4.021v-6.396zm4.265 2.133v2.13h10.66v-2.13H6.154Z"/>',
2405
+ "size": 24
2406
+ },
2407
+ "telegram": {
2408
+ "body": '<path fill="currentColor" d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0zm4.962 7.224c.1-.002.321.023.465.14a.5.5 0 0 1 .171.325c.016.093.036.306.02.472c-.18 1.898-.962 6.502-1.36 8.627c-.168.9-.499 1.201-.82 1.23c-.696.065-1.225-.46-1.9-.902c-1.056-.693-1.653-1.124-2.678-1.8c-1.185-.78-.417-1.21.258-1.91c.177-.184 3.247-2.977 3.307-3.23c.007-.032.014-.15-.056-.212s-.174-.041-.249-.024q-.159.037-5.061 3.345q-.72.495-1.302.48c-.428-.008-1.252-.241-1.865-.44c-.752-.245-1.349-.374-1.297-.789q.04-.324.893-.663q5.247-2.286 6.998-3.014c3.332-1.386 4.025-1.627 4.476-1.635"/>',
2409
+ "size": 24
2410
+ },
2411
+ "threads": {
2412
+ "body": '<path fill="currentColor" d="M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098c1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015c-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164c1.43 1.783 3.631 2.698 6.54 2.717c2.623-.02 4.358-.631 5.8-2.045c1.647-1.613 1.618-3.593 1.09-4.798c-.31-.71-.873-1.3-1.634-1.75c-.192 1.352-.622 2.446-1.284 3.272c-.886 1.102-2.14 1.704-3.73 1.79c-1.202.065-2.361-.218-3.259-.801c-1.063-.689-1.685-1.74-1.752-2.964c-.065-1.19.408-2.285 1.33-3.082c.88-.76 2.119-1.207 3.583-1.291a14 14 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757c-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32l-1.757-1.18c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388q.163.07.321.142c1.49.7 2.58 1.761 3.154 3.07c.797 1.82.871 4.79-1.548 7.158c-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69q-.362 0-.739.021c-1.836.103-2.98.946-2.916 2.143c.067 1.256 1.452 1.839 2.784 1.767c1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221"/>',
2413
+ "size": 24
2414
+ },
2415
+ "twitch": {
2416
+ "body": '<path fill="currentColor" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>',
2417
+ "size": 24
2418
+ },
2419
+ "x": {
2420
+ "body": '<path fill="currentColor" d="M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z"/>',
2421
+ "size": 24
2422
+ },
2423
+ "youtube": {
2424
+ "body": '<path fill="currentColor" d="M23.498 6.186a3.02 3.02 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.02 3.02 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.02 3.02 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.02 3.02 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814M9.545 15.568V8.432L15.818 12z"/>',
2425
+ "size": 24
2426
+ }
2427
+ };
2428
+
2429
+ // node_modules/@dogsbay/icons/dist/social.js
2430
+ function socialIconSvg(name, size = 20) {
2431
+ const icon = Object.hasOwn(SOCIAL_ICON_BODIES, name) ? SOCIAL_ICON_BODIES[name] : void 0;
2432
+ if (!icon)
2433
+ return null;
2434
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${icon.size} ${icon.size}" aria-hidden="true" focusable="false">${icon.body}</svg>`;
2435
+ }
2436
+ var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
2437
+
2438
+ // src/theme/compose.ts
2439
+ import { ANNOUNCEMENT_HEAD_SCRIPT } from "@dogsbay/elements/announcement-head";
2440
+ import { COLOR_MODE_HEAD_SCRIPTS } from "@dogsbay/elements/color-mode-head";
2163
2441
  var PROVIDERS = {
2164
2442
  claude: { label: "Open in Claude", url: "https://claude.ai/new?q={q}" },
2165
2443
  chatgpt: { label: "Open in ChatGPT", url: "https://chatgpt.com/?q={q}" },
@@ -2171,7 +2449,7 @@ function linkIconBodyAttrs(icons) {
2171
2449
  return tokens ? ` data-link-icons="${esc2(tokens)}" style="${esc2(style ?? "")}"` : "";
2172
2450
  }
2173
2451
  var LOGO = safe2(BOOK_ICON);
2174
- var ICONS2 = { chevronLeft: safe2(ICONS.chevronLeft), chevronRight: safe2(ICONS.chevronRight), layers: safe2(ICONS.layers) };
2452
+ var ICONS2 = { chevronLeft: safe2(ICONS.chevronLeft), chevronRight: safe2(ICONS.chevronRight), chevronDown: safe2(ICONS.chevronDown), close: safe2(ICONS.close), layers: safe2(ICONS.layers) };
2175
2453
  function plainData(v) {
2176
2454
  if (v === null || typeof v === "string" || typeof v === "boolean") return v;
2177
2455
  if (typeof v === "number") return Number.isFinite(v) ? v : null;
@@ -2187,7 +2465,60 @@ function plainData(v) {
2187
2465
  }
2188
2466
  return void 0;
2189
2467
  }
2190
- var THEME_BOOT = "<script>(function(){try{var t=localStorage.getItem('theme');var d=t?t==='dark':matchMedia('(prefers-color-scheme: dark)').matches;document.documentElement.classList.toggle('dark',d)}catch(e){}})()<\/script>";
2468
+ function headBoot(cfg) {
2469
+ const a = cfg.chrome.announcement?.closeable ? cfg.chrome.announcement : void 0;
2470
+ return `<script>${COLOR_MODE_HEAD_SCRIPTS[cfg.chrome.colorMode]}<\/script>` + (a ? `
2471
+ <meta name="db-announcement" content="${esc2(announcementKey(cfg))}">
2472
+ <script>${ANNOUNCEMENT_HEAD_SCRIPT}<\/script>` : "");
2473
+ }
2474
+ function announcementKey(cfg) {
2475
+ const id = cfg.chrome.announcement?.id ?? "";
2476
+ let urlBase = "";
2477
+ if (cfg.url && /^https?:\/\//i.test(cfg.url)) {
2478
+ try {
2479
+ const path = new URL(cfg.url).pathname.replace(/^\/+|\/+$/g, "");
2480
+ urlBase = path ? `/${path}` : "";
2481
+ } catch {
2482
+ }
2483
+ }
2484
+ const prefix = urlBase + (cfg.basePath ? `/${cfg.basePath}` : "");
2485
+ return `${prefix || cfg.name}#${id}`;
2486
+ }
2487
+ function sitePathOf(p) {
2488
+ const path = `/${p.prefix ? `${p.prefix}/` : ""}${p.out}`;
2489
+ return path.replace(/(^|\/)index\.html$/, "$1").replace(/\.html$/, "");
2490
+ }
2491
+ function isCurrent(href, page, basePath) {
2492
+ if (isExternal2(href)) return false;
2493
+ let link = href.replace(/[?#].*$/, "");
2494
+ if (basePath && (link === `/${basePath}` || link.startsWith(`/${basePath}/`))) link = link.slice(basePath.length + 1) || "/";
2495
+ const norm = (x) => x.endsWith("/") ? x : `${x}/`;
2496
+ const a = norm(page);
2497
+ const b = norm(link);
2498
+ return a === b || b.split("/").filter(Boolean).length > 1 && a.startsWith(b);
2499
+ }
2500
+ function chromeData(p, cfg, t) {
2501
+ const c = cfg.chrome;
2502
+ const href = (h) => menuHref(h, p.siteRoot, cfg.linkStyle, cfg.basePath);
2503
+ const page = sitePathOf(p);
2504
+ const link = (l) => ({ label: l.label, href: href(l.href), current: isCurrent(l.href, page, cfg.basePath) ? "page" : "", external: isExternal2(l.href) });
2505
+ const social = (list, fallbackLabel) => list.flatMap((s) => {
2506
+ const svg2 = socialIconSvg(s.icon, 20);
2507
+ return svg2 ? [{ label: fallbackLabel && s.label === "Source repository" ? fallbackLabel : s.label, href: href(s.href), svg: safe2(svg2), external: isExternal2(s.href) }] : [];
2508
+ });
2509
+ return {
2510
+ headerLinks: c.header.links.map((l) => isChromeMenu(l) ? { label: l.label, href: "", current: "", items: l.items.map(link) } : { ...link(l), items: [] }),
2511
+ headerSocial: social(c.header.social, t("repository")),
2512
+ footerColumns: c.footer.columns.map((col) => ({ title: col.title, links: col.links.map(link) })),
2513
+ footerSocial: social(c.footer.social),
2514
+ announcement: c.announcement ? { id: c.announcement.id, key: announcementKey(cfg), html: safe2(inlineMarkdownHtml(c.announcement.text, { href })), toneClass: ANNOUNCEMENT_TONE_CLASS[c.announcement.tone] ?? ANNOUNCEMENT_TONE_CLASS.note, closeable: c.announcement.closeable } : "",
2515
+ siteLogo: c.logo && p.logo ? (
2516
+ // A wordmark is the link's name (site.logo.alt, by default site.name); beside the name, the image is decoration
2517
+ { light: `${p.siteRoot}${p.logo.light}`, dark: p.logo.dark ? `${p.siteRoot}${p.logo.dark}` : "", alt: c.logo.replacesName ? c.logo.alt || cfg.name : "", replacesName: c.logo.replacesName ? "1" : "" }
2518
+ ) : { light: "", dark: "", alt: "", replacesName: "" },
2519
+ copyrightHtml: safe2(c.copyright ? inlineMarkdownHtml(c.copyright, { href }) : "")
2520
+ };
2521
+ }
2191
2522
  async function composePage(p, cfg, templates) {
2192
2523
  const t = p.t;
2193
2524
  const hasToc = p.toc !== "off" && p.headings.length >= 2 && !p.wide;
@@ -2216,7 +2547,7 @@ async function composePage(p, cfg, templates) {
2216
2547
  // Front matter as plain data, so a layout can loop over its own lists (`page.meta.features`).
2217
2548
  meta: plainData(p.meta ?? {})
2218
2549
  },
2219
- site: { name: cfg.name, tagline: cfg.tagline, copyright: cfg.copyright ?? "" },
2550
+ site: { name: cfg.name, tagline: cfg.tagline, copyright: cfg.copyright ?? "", colorMode: cfg.chrome.colorMode },
2220
2551
  paths: { unit: p.unitRoot, site: p.siteRoot, home: p.homeHref },
2221
2552
  logo: LOGO,
2222
2553
  // Page data the region partials read.
@@ -2235,10 +2566,12 @@ async function composePage(p, cfg, templates) {
2235
2566
  // As the Astro pipeline: turning page actions off also drops the footer link.
2236
2567
  llmsHref: cfg.llmsTxt && cfg.pageActions.enabled && cfg.pageActions.footerLink ? `${p.unitRoot}llms.txt` : void 0,
2237
2568
  poweredBy: cfg.poweredBy,
2238
- icons: ICONS2
2569
+ icons: ICONS2,
2570
+ // The site chrome (plans/site-chrome.md): headerLinks, headerSocial, footerColumns, footerSocial, announcement, siteLogo, copyrightHtml.
2571
+ ...chromeData(p, cfg, t)
2239
2572
  };
2240
2573
  const region = (name, extra) => templates.region(`partials/${name}.html`, extra ? { ...base, ...extra } : base);
2241
- const switcher = (kind, options, label) => region("switcher", { switcher: { kind, label, options: options.map((o) => ({ label: o.label, href: o.href, current: o.current, prefix: o.prefix, note: o.note })) } });
2574
+ const switcher = (kind, options, label) => region("switcher", { switcher: { kind, label, options: options.map((o) => ({ label: o.label, href: o.href, current: o.current, prefix: o.prefix, note: o.note, disabled: o.disabled, link: o.link })) } });
2242
2575
  const sidebarHeader = hasSidebar ? String(await templates.renderPartial("partials/sidebar-header.html", base)) : "";
2243
2576
  const ctx = {
2244
2577
  ...base,
@@ -2247,6 +2580,8 @@ async function composePage(p, cfg, templates) {
2247
2580
  hasSidebar ? sidebar({
2248
2581
  header: sidebarHeader,
2249
2582
  label: t("nav"),
2583
+ links: cfg.chrome.header.links.length ? String(await region("header-links", { layout: "list" })) + // The header's icons too, below md, where the header has no room for them beside the links
2584
+ (base.headerSocial.length ? `<div class="mt-2 flex flex-wrap items-center gap-1 px-1 md:hidden">${await region("social-links", { social: base.headerSocial, size: "header", socialClass: "" })}</div>` : "") : "",
2250
2585
  nav: navTree(p.nav, { ...p.navOptions, toggleLabel: t("toggleSection"), unitRoot: p.unitRoot })
2251
2586
  }) : ""
2252
2587
  ),
@@ -2257,17 +2592,27 @@ async function composePage(p, cfg, templates) {
2257
2592
  hero: await region("hero"),
2258
2593
  metaStrip: await region("tags"),
2259
2594
  banner: safe2(p.banner ? banner(p.banner) : ""),
2595
+ versionBadge: await region("version-badge", { versionBadge: p.versionBadge ? t("versionBadge").replace("{label}", () => p.versionBadge) : "" }),
2260
2596
  breadcrumb: cfg.breadcrumbs ? await region("breadcrumb") : "",
2261
2597
  tocTop: hasToc && p.toc === "top" ? await region("toc-top") : "",
2262
2598
  tocRail: hasToc && p.toc === "rail" && hasSidebar ? await region("toc-rail") : "",
2263
2599
  tocPopover: hasToc && p.toc === "popover" ? await region("toc-popover") : "",
2264
- switchers: safe2(String(await switcher("locale", p.locales, t("language"))) + String(await switcher("version", p.versions, t("version")))),
2600
+ // Product first: it is the widest choice, and the version menu below lists only its versions.
2601
+ switchers: safe2(
2602
+ String(await switcher("product", p.products ?? [], t("product"))) + String(await switcher("locale", p.locales, t("language"))) + String(await switcher("version", p.versions, t("version")))
2603
+ ),
2265
2604
  // The blank layout has no inline slot, so its pages keep the menu in the header.
2266
2605
  pageActions: safe2(actions && (cfg.pageActions.placement !== "inline" || p.layout === "blank") ? actions : ""),
2267
2606
  // Below the breadcrumb, above the title, as DocsLayout's inline placement.
2268
2607
  pageActionsInline: safe2(actions && cfg.pageActions.placement !== "header" ? `<div class="mb-4 flex justify-end" data-page-actions-inline>${actions}</div>` : ""),
2269
2608
  searchButton: safe2(cfg.search ? searchButton(t("search")) : ""),
2270
- repoLink: safe2(cfg.repoUrl ? repoLink(cfg.repoUrl, t("repository")) : ""),
2609
+ // header.social (site.repoUrl is its default); hidden below md when the header has links and a sidebar carries them
2610
+ // (a blank page has none, so its links and icons stay in the header)
2611
+ repoLink: await region("social-links", { social: base.headerSocial, size: "header", socialClass: cfg.chrome.header.links.length && hasSidebar ? "max-md:hidden" : "" }),
2612
+ headerLinks: await region("header-links", { layout: "bar", wrap: hasSidebar ? "" : "1" }),
2613
+ footerColumns: await region("footer-columns"),
2614
+ footerSocial: await region("social-links", { social: base.footerSocial, size: "footer", socialClass: "" }),
2615
+ announcementBar: await region("announcement"),
2271
2616
  themeToggle: safe2(themeToggle(t("theme"))),
2272
2617
  pager: await region("pager"),
2273
2618
  footerMeta: await region("footer-meta"),
@@ -2281,12 +2626,18 @@ async function composePage(p, cfg, templates) {
2281
2626
  seo: seoData({ ...p.seo, title: p.title, siteName: cfg.name, description: p.description, headings: p.headings, tags: p.tags, lastUpdated: p.lastUpdated })
2282
2627
  })) : "")
2283
2628
  ),
2284
- themeBoot: safe2(THEME_BOOT),
2629
+ themeBoot: safe2(headBoot(cfg)),
2285
2630
  head: "",
2286
2631
  // Tells the client which search to use (src/client/search.ts).
2287
2632
  bodyAttrs: safe2((cfg.search && cfg.searchEngine !== "builtin" ? ` data-search="${cfg.searchEngine}"` : "") + linkIconBodyAttrs(cfg.linkIcons) + (cfg.imageZoom ? ` data-image-zoom="${esc2(JSON.stringify({ background: cfg.imageZoom.background, margin: cfg.imageZoom.margin, scrollOffset: cfg.imageZoom.scrollOffset }))}"` : "")),
2288
2633
  widthClass: p.wide ? "max-w-7xl" : "max-w-3xl",
2289
- has: { sidebar: hasSidebar ? "1" : "", toc: hasToc ? "1" : "", search: cfg.search ? "1" : "" },
2634
+ has: {
2635
+ sidebar: hasSidebar ? "1" : "",
2636
+ toc: hasToc ? "1" : "",
2637
+ search: cfg.search ? "1" : "",
2638
+ headerLinks: cfg.chrome.header.links.length ? "1" : "",
2639
+ footerSocial: base.footerSocial.length ? "1" : ""
2640
+ },
2290
2641
  scripts: safe2(
2291
2642
  // Escape "<\/script" and "<!--" so the text cannot end the element or switch the parser
2292
2643
  // into its escaped script states; the client reverses both before copying.
@@ -2588,6 +2939,8 @@ var EN = {
2588
2939
  close: "Close",
2589
2940
  theme: "Toggle dark mode",
2590
2941
  version: "Version",
2942
+ product: "Product",
2943
+ versionBadge: "Version: {label}",
2591
2944
  language: "Language",
2592
2945
  breadcrumb: "Breadcrumb",
2593
2946
  home: "Home",
@@ -2628,7 +2981,12 @@ var EN = {
2628
2981
  pageOf: "Page {n} of {total}",
2629
2982
  collapseAll: "Collapse all",
2630
2983
  collapsedLine: "1 collapsed line",
2631
- collapsedLines: "{n} collapsed lines"
2984
+ collapsedLines: "{n} collapsed lines",
2985
+ // The site chrome (DocsLayout's names): header links, footer columns, the announcement bar.
2986
+ siteLinks: "Site",
2987
+ footerLinks: "Footer",
2988
+ announcement: "Announcement",
2989
+ closeAnnouncement: "Close announcement"
2632
2990
  };
2633
2991
  var FR = {
2634
2992
  lastUpdated: "Derni\xE8re mise \xE0 jour : {date}",
@@ -2648,6 +3006,8 @@ var FR = {
2648
3006
  close: "Fermer",
2649
3007
  theme: "Basculer le mode sombre",
2650
3008
  version: "Version",
3009
+ product: "Produit",
3010
+ versionBadge: "Version : {label}",
2651
3011
  language: "Langue",
2652
3012
  home: "Accueil",
2653
3013
  edit: "Modifier cette page",
@@ -2676,6 +3036,8 @@ var DE = {
2676
3036
  close: "Schlie\xDFen",
2677
3037
  theme: "Dunkelmodus umschalten",
2678
3038
  version: "Version",
3039
+ product: "Produkt",
3040
+ versionBadge: "Version: {label}",
2679
3041
  language: "Sprache",
2680
3042
  home: "Startseite",
2681
3043
  edit: "Diese Seite bearbeiten",
@@ -2704,6 +3066,8 @@ var ES = {
2704
3066
  close: "Cerrar",
2705
3067
  theme: "Cambiar modo oscuro",
2706
3068
  version: "Versi\xF3n",
3069
+ product: "Producto",
3070
+ versionBadge: "Versi\xF3n: {label}",
2707
3071
  language: "Idioma",
2708
3072
  home: "Inicio",
2709
3073
  edit: "Editar esta p\xE1gina",
@@ -2732,6 +3096,8 @@ var JA = {
2732
3096
  close: "\u9589\u3058\u308B",
2733
3097
  theme: "\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u5207\u66FF",
2734
3098
  version: "\u30D0\u30FC\u30B8\u30E7\u30F3",
3099
+ product: "\u88FD\u54C1",
3100
+ versionBadge: "\u30D0\u30FC\u30B8\u30E7\u30F3: {label}",
2735
3101
  language: "\u8A00\u8A9E",
2736
3102
  home: "\u30DB\u30FC\u30E0",
2737
3103
  edit: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u7DE8\u96C6",
@@ -3154,11 +3520,7 @@ var DiagramStore = class {
3154
3520
 
3155
3521
  // src/core/build.ts
3156
3522
  var ACTIVE_FILE = /\.(html?|xhtml?|xml|xsl|js|mjs|shtml)$/i;
3157
- var PASSIVE_FILE = /\.(png|jpe?g|gif|webp|avif|ico|bmp|tiff?|svg|woff2?|ttf|otf|eot|css|mp4|webm|ogv|ogg|oga|mp3|wav|m4a|flac|pdf|txt|csv|tsv|json|ya?ml|zip|gz|tgz|bz2|xz|7z|epub|docx?|xlsx?|pptx?|odt|ods|odp)$/i;
3158
3523
  var HOST_FILES = /* @__PURE__ */ new Set(["_headers", "_redirects", "_routes.json", "_worker.js"]);
3159
- function passiveSvg(text) {
3160
- return !/<([\w.-]+:)?(script|foreignObject|a|animate|set|iframe|embed|object|handler|listener)[\s/>]|<!ENTITY|\son[a-z]+\s*=|javascript:|&#|<([\w.-]+:)?use[^>]*href\s*=\s*["']\s*[^"'#\s]/i.test(text);
3161
- }
3162
3524
  function diagramStore(input, cfg) {
3163
3525
  const renderer = cfg.diagrams ? pickRenderer(input.diagrams, cfg.diagramEngine) : void 0;
3164
3526
  return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
@@ -3253,6 +3615,12 @@ function finiteLimits(given) {
3253
3615
  function inDataFolder(cfg, path) {
3254
3616
  return [cfg.dataDir, ...cfg.sources.flatMap((s) => s.data ? [s.data] : [])].some((d) => path.startsWith(`${d}/`));
3255
3617
  }
3618
+ async function readBytes(c) {
3619
+ if (typeof c === "string") return new TextEncoder().encode(c);
3620
+ if (isLazyText(c)) return new TextEncoder().encode(await c.read());
3621
+ if (isRef(c)) return c.read();
3622
+ return c;
3623
+ }
3256
3624
  async function readText(c) {
3257
3625
  if (typeof c === "string") return c;
3258
3626
  if (isLazyText(c)) return c.read();
@@ -3271,10 +3639,34 @@ var copiedPath = (p) => {
3271
3639
  async function assetVerdict(p, c, untrusted, sanitizing) {
3272
3640
  if (untrusted) {
3273
3641
  const name = p.slice(p.lastIndexOf("/") + 1);
3274
- return HOST_FILES.has(name) || !PASSIVE_FILE.test(p) || /\.svg$/i.test(p) && !passiveSvg(await readText(c)) ? "untrusted" : "copy";
3642
+ if (HOST_FILES.has(name)) return "untrusted";
3643
+ if (/\.svg$/i.test(p)) {
3644
+ const bytes = await readBytes(c);
3645
+ return bytes.length <= PASSIVE_SVG_MAX_BYTES && passiveSvgBytes(bytes) ? "copy" : "untrusted";
3646
+ }
3647
+ return isPassiveStaticFile(p) ? "copy" : "untrusted";
3275
3648
  }
3276
3649
  return sanitizing && ACTIVE_FILE.test(p) ? "active" : "copy";
3277
3650
  }
3651
+ async function emitLogo(cfg, input, emit, report) {
3652
+ const logo = cfg.chrome.logo;
3653
+ if (!logo) return void 0;
3654
+ const found = [];
3655
+ for (const kind of ["light", "dark"]) {
3656
+ const path = logo[kind];
3657
+ if (!path) continue;
3658
+ const c = input.files.get(path);
3659
+ if (c === void 0) throw new ConfigError(`site.logo.${kind}: ${path} is not a file in the project`);
3660
+ if (await assetVerdict(path, c, input.untrusted === true, false) !== "copy") {
3661
+ report("untrusted", `[untrusted] site.logo.${kind}: ${path} is an SVG that could run script, so the site has no logo`);
3662
+ return void 0;
3663
+ }
3664
+ found.push({ kind, path, c, out: `_dogsbay/site/logo-${kind}${path.slice(path.lastIndexOf(".")).toLowerCase()}` });
3665
+ }
3666
+ for (const f of found) await emit(f.out, f.c);
3667
+ const out = (kind) => found.find((f) => f.kind === kind)?.out;
3668
+ return { light: out("light"), ...out("dark") ? { dark: out("dark") } : {} };
3669
+ }
3278
3670
  var NAV_FILES = ["nav.yml", "nav.yaml", "nav.json"];
3279
3671
  var SKIP_FILES = /* @__PURE__ */ new Set([...NAV_FILES, "dogsbay.config.yml", "dogsbay.config.yaml", ".DS_Store"]);
3280
3672
  function fmKey(src) {
@@ -3342,7 +3734,9 @@ async function build(input, hooks = {}) {
3342
3734
  phase.init = now() - t0;
3343
3735
  let pages = 0;
3344
3736
  let assets = 0;
3345
- 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(), usedMath: false, 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) };
3737
+ 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, 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) };
3738
+ for (const w of cfg.chrome.warnings) report("config", `[config] ${w}`);
3739
+ state.logo = await emitLogo(cfg, input, emit, report);
3346
3740
  for (const r of cfg.redirects) {
3347
3741
  const from = sitePath(r.from, cfg.basePath);
3348
3742
  if (!from) {
@@ -3363,6 +3757,7 @@ async function build(input, hooks = {}) {
3363
3757
  if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
3364
3758
  const translations = await translationTables(cfg, allUnits, input.files, readText, input.includeDrafts === true, frontMatterOf);
3365
3759
  frontMatterOf = void 0;
3760
+ if (cfg.staticDir) Object.assign(state, staticFolder2(cfg.staticDir, input.files, input.untrusted === true));
3366
3761
  hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
3367
3762
  for (const unit of units) {
3368
3763
  classes = new Set(CLIENT_CANDIDATES);
@@ -3408,26 +3803,38 @@ async function build(input, hooks = {}) {
3408
3803
  const def = defaultUnit(allUnits, cfg);
3409
3804
  const tSite = now();
3410
3805
  const rootUnit = allUnits.find((u) => u.prefix === "");
3411
- if (rootUnit && !input.untrusted) {
3412
- for (const n of MERGED_FILES) {
3413
- const own = input.files.get(sourceRoot(rootUnit.source) + n);
3414
- if (own !== void 0) state.hostFiles.set(n, own);
3415
- }
3806
+ for (const n of MERGED_FILES) {
3807
+ const own = rootUnit ? input.files.get(sourceRoot(rootUnit.source) + n) : void 0;
3808
+ const fromStatic = state.staticFiles?.get(n);
3809
+ if (own !== void 0 && fromStatic !== void 0) throw new ConfigError(`${cfg.staticDir}/${n} and ${sourceRoot(rootUnit.source)}${n} are both the site's ${n}: keep the one in content.static (${cfg.staticDir})`);
3810
+ const c = fromStatic ?? own;
3811
+ if (c === void 0) continue;
3812
+ if (!input.untrusted) state.hostFiles.set(n, c);
3813
+ else if (fromStatic !== void 0) report("untrusted", `[untrusted] ${cfg.staticDir}/${n} is not used: an untrusted build takes no host configuration`);
3814
+ }
3815
+ if (state.staticFiles?.has("robots.txt")) {
3816
+ 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})`);
3817
+ state.supplied.add("robots.txt");
3416
3818
  }
3417
3819
  await emitSiteFiles(cfg, allUnits, units, def, state, emit, report, input.onRedirects);
3418
3820
  phase.site = (phase.site ?? 0) + now() - tSite;
3821
+ const homeOf = (fromDir, unitPrefix, fallback) => {
3822
+ const page = state.homeForward.get(unitPrefix);
3823
+ return page !== void 0 ? relative(fromDir, page) : fallback;
3824
+ };
3419
3825
  if (def && def.prefix) {
3420
- await emit("index.html", redirectPage(`${def.prefix}/index.html`, cfg.name));
3826
+ await emit("index.html", redirectPage(homeOf("", def.prefix, `${def.prefix}/index.html`), cfg.name));
3421
3827
  await emit("404.html", redirectPage(`${def.prefix}/404.html`, cfg.name));
3422
3828
  }
3423
3829
  if (cfg.products) {
3424
- for (const [from, to] of productRootRedirects(cfg.products)) await emit(`${from.slice(1)}index.html`, redirectPage(`${relativeHome(from, to)}index.html`, cfg.name));
3830
+ 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));
3425
3831
  } else if (def && def.prefix) {
3426
3832
  for (const u of allUnits) {
3427
3833
  const root = groupPrefix(u);
3428
- if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) await emit(`${root}/index.html`, redirectPage(`${u.version}/index.html`, cfg.name));
3834
+ if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) await emit(`${root}/index.html`, redirectPage(homeOf(root, u.prefix, `${u.version}/index.html`), cfg.name));
3429
3835
  }
3430
3836
  }
3837
+ if (state.staticFiles && (units.length === allUnits.length || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
3431
3838
  state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit);
3432
3839
  const spent = state.templateBudget.problem();
3433
3840
  if (spent) report("template", spent);
@@ -3493,11 +3900,94 @@ function checkProductFolders(allUnits, files) {
3493
3900
  }
3494
3901
  }
3495
3902
  }
3903
+ function staticFolder2(dir, files, untrusted) {
3904
+ const staticFiles = /* @__PURE__ */ new Map();
3905
+ for (const [k, c] of files) {
3906
+ if (!k.startsWith(dir + "/")) continue;
3907
+ const rel = k.slice(dir.length + 1);
3908
+ if (staticPathServed(rel)) staticFiles.set(rel, c);
3909
+ }
3910
+ const served = { has: (p) => staticFiles.has(p) && staticServed(p, untrusted) };
3911
+ const staticFile = (t) => {
3912
+ const bare = t.replace(/\/+$/, "");
3913
+ if (served.has(t)) return t;
3914
+ if (served.has(`${bare}/index.html`)) return bare ? `${bare}/index.html` : "index.html";
3915
+ if (!t.endsWith("/") && served.has(`${t}.html`)) return `${t}.html`;
3916
+ return void 0;
3917
+ };
3918
+ return { staticFiles, staticFile };
3919
+ }
3920
+ function staticServed(p, untrusted) {
3921
+ if (MERGED_FILES.has(p)) return false;
3922
+ if (!untrusted) return true;
3923
+ return !HOST_FILES.has(p.slice(p.lastIndexOf("/") + 1)) && (isPassiveStaticFile(p) || /\.svg$/i.test(p));
3924
+ }
3925
+ function staticLinkPaths(state) {
3926
+ const out = [];
3927
+ for (const p of state.staticFiles.keys()) {
3928
+ if (MERGED_FILES.has(p) || !state.staticFile(p)) continue;
3929
+ out.push(p);
3930
+ if (p === "index.html" || p.endsWith("/index.html")) out.push(p.slice(0, -"index.html".length), p.slice(0, -"/index.html".length));
3931
+ else if (p.endsWith(".html")) out.push(p.slice(0, -".html".length));
3932
+ }
3933
+ return out.filter(Boolean);
3934
+ }
3935
+ var PASSIVE_STAND_IN = new TextEncoder().encode("<svg/>");
3936
+ async function emitStatic(cfg, state, units, untrusted, emit, report) {
3937
+ const files = state.staticFiles;
3938
+ const label = `content.static (${cfg.staticDir})`;
3939
+ const lower = /* @__PURE__ */ new Map();
3940
+ const dirs = /* @__PURE__ */ new Map();
3941
+ for (const w of state.written) {
3942
+ lower.set(w.toLowerCase(), w);
3943
+ for (let i = w.indexOf("/"); i > 0; i = w.indexOf("/", i + 1)) dirs.set(w.slice(0, i).toLowerCase(), w);
3944
+ }
3945
+ const reserved = ["_dogsbay/", ...cfg.search && cfg.searchEngine !== "builtin" ? units.map((u) => `${u.prefix ? u.prefix + "/" : ""}pagefind/`) : []];
3946
+ const writes = (p) => {
3947
+ const own = reserved.find((r) => p.toLowerCase().startsWith(r.toLowerCase()));
3948
+ if (own) return `${own}, the build's own folder`;
3949
+ const same = lower.get(p.toLowerCase());
3950
+ if (same) return same === p ? same : `${same}, the same path in another case`;
3951
+ const inside = dirs.get(p.toLowerCase());
3952
+ if (inside) return `${inside}, inside a folder at this path`;
3953
+ for (let i = p.indexOf("/"); i > 0; i = p.indexOf("/", i + 1)) {
3954
+ const file = lower.get(p.slice(0, i).toLowerCase());
3955
+ if (file) return `${file}, a file where this folder would be`;
3956
+ }
3957
+ return void 0;
3958
+ };
3959
+ const errors = [];
3960
+ const seen = /* @__PURE__ */ new Map();
3961
+ for (const p of files.keys()) {
3962
+ const other = seen.get(p.toLowerCase());
3963
+ if (other) errors.push(`${label}: ${other} and ${p} differ only in case, so a case-insensitive disk or host keeps one of them`);
3964
+ else seen.set(p.toLowerCase(), p);
3965
+ }
3966
+ const passingSvgs = /* @__PURE__ */ new Set();
3967
+ const hostConfig = [];
3968
+ if (untrusted) {
3969
+ for (const [p, c] of files) {
3970
+ if (HOST_FILES.has(p.slice(p.lastIndexOf("/") + 1)) && !MERGED_FILES.has(p)) hostConfig.push(p);
3971
+ if (!/\.svg$/i.test(p)) continue;
3972
+ const bytes = await readBytes(c);
3973
+ if (bytes.length <= PASSIVE_SVG_MAX_BYTES && passiveSvgBytes(bytes)) passingSvgs.add(p);
3974
+ }
3975
+ }
3976
+ const listed = [...files.keys()].filter((p) => !hostConfig.includes(p));
3977
+ const plan = staticFolderPlan(listed, { writes, untrusted, basePath: cfg.basePath ? `/${cfg.basePath.replace(/^\/+|\/+$/g, "")}` : "", label, readBytes: (p) => passingSvgs.has(p) ? PASSIVE_STAND_IN : void 0 });
3978
+ if (hostConfig.length) report("untrusted", `[untrusted] ${label}: host configuration is not copied from an untrusted folder: ${hostConfig.slice(0, 5).join(", ")}`);
3979
+ errors.push(...plan.errors);
3980
+ if (errors.length) throw new ConfigError(errors.join("\n"));
3981
+ for (const w of plan.warnings) report("static", `[static] ${w}`);
3982
+ if (plan.robots) for (const w of staticRobotsWarnings(await readText(files.get("robots.txt")), label)) report("static", `[static] ${w}`);
3983
+ for (const p of plan.copy) await emit(p, files.get(p));
3984
+ }
3496
3985
  async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedirects) {
3497
3986
  const defPrefix = def?.prefix ?? "";
3498
3987
  const put = async (p, content) => {
3499
- if (state.supplied.has(p)) report("site", `[site] ${p} comes from the content, so the generated one is not written`);
3500
- else await emit(p, content);
3988
+ if (state.supplied.has(p)) {
3989
+ if (!state.staticFiles?.has(p)) report("site", `[site] ${p} comes from the content, so the generated one is not written`);
3990
+ } else await emit(p, content);
3501
3991
  };
3502
3992
  const cloudflare = cfg.deployTarget === "cloudflare-workers";
3503
3993
  const merged = async (p, generated, merge) => {
@@ -3854,7 +4344,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
3854
4344
  }
3855
4345
  const some = (l) => `${l.slice(0, 5).join(", ")}${l.length > 5 ? ", \u2026" : ""}`;
3856
4346
  if (activeFiles.length) warn("html", `content.html is sanitize, so ${activeFiles.length} HTML, XML or script file(s) are not copied: ${some(activeFiles)}`);
3857
- if (untrustedFiles.length) report("untrusted", `[untrusted] ${untrustedFiles.length} file(s) not copied: only images, fonts, media, stylesheets, documents and data are, and no SVG that runs script or host configuration (_headers, _redirects): ${some(untrustedFiles)}`);
4347
+ if (untrustedFiles.length) report("untrusted", `[untrusted] ${untrustedFiles.length} file(s) not copied: only images, fonts, media, documents, archives and data are (no stylesheets), and no SVG that runs script, is not UTF-8 or is over 5 MB, and no host configuration (_headers, _redirects): ${some(untrustedFiles)}`);
3858
4348
  const specNavs = /* @__PURE__ */ new Map();
3859
4349
  const mountedNavs = /* @__PURE__ */ new Map();
3860
4350
  const mountedSlugs = /* @__PURE__ */ new Set();
@@ -3994,12 +4484,13 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
3994
4484
  let childLinkItems;
3995
4485
  let childLinkDirs;
3996
4486
  const isLeftOut = (s) => !infos.has(s) && !stubTargets.has(s) && leftOut.has(s);
3997
- for (const s of order) if (!infos.has(s) && !stubTargets.has(s) && !leftOut.has(s)) warn("nav", `nav entry "${s}" has no page`, navFileAt());
4487
+ for (const s of order) if (!infos.has(s) && !stubTargets.has(s) && !leftOut.has(s) && !(state.staticFile?.(s) ?? state.staticFile?.(`${s}/`))) warn("nav", `nav entry "${s}" has no page`, navFileAt());
3998
4488
  if (cfg.routablesFrom === "nav") {
3999
4489
  const keep = new Set(order);
4000
4490
  for (const s of [...infos.keys()]) if (s !== "" && !keep.has(s)) infos.delete(s);
4001
4491
  }
4002
4492
  const excludedEntries = /* @__PURE__ */ new Map();
4493
+ const staticNav = /* @__PURE__ */ new Map();
4003
4494
  const dropMissing = (nodes) => {
4004
4495
  const kept = nodes.filter((n) => {
4005
4496
  const had = n.children.length;
@@ -4032,6 +4523,13 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4032
4523
  n.alias = true;
4033
4524
  if (stub.fragment) n.fragment = stub.fragment;
4034
4525
  } else warn("nav", `nav entry "${from}" redirects to /${stub.to}, which is not a page of this build; it keeps its label without a link`);
4526
+ } else {
4527
+ const key = cfg.basePath && from.startsWith(`${cfg.basePath.replace(/^\/+|\/+$/g, "")}/`) ? from.slice(cfg.basePath.replace(/^\/+|\/+$/g, "").length + 1) : from;
4528
+ const file = state.staticFile?.(key) ?? state.staticFile?.(`${key}/`);
4529
+ if (file !== void 0) {
4530
+ n.slug = from;
4531
+ staticNav.set(from, relative(unit.prefix, file));
4532
+ }
4035
4533
  }
4036
4534
  }
4037
4535
  }
@@ -4059,17 +4557,19 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4059
4557
  if (cfg.blog?.path) add(cfg.blog.path, `${cfg.blog.path}/index.html`);
4060
4558
  return all;
4061
4559
  };
4062
- const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes };
4560
+ const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix };
4063
4561
  const readingOrder = order.filter((s) => infos.has(s));
4064
4562
  const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" ? false : navSize(nav) <= (input.fullNavLimit ?? cfg.fullNavLimit);
4065
- const t_ = strings(unit.locale ?? cfg.defaultLocale, void 0);
4563
+ const locale = unit.locale ?? cfg.defaultLocale;
4564
+ const lc = (locale ?? "en").toLowerCase();
4565
+ const t_ = strings(locale, { ...cfg.strings.all, ...cfg.strings.byLocale[lc] ?? cfg.strings.byLocale[lc.split("-")[0]] ?? {} });
4066
4566
  const lang = unit.locale ?? cfg.defaultLocale ?? "en";
4067
4567
  const dir = /^(ar|he|fa|ur)(-|$)/.test(unit.locale ?? "") ? "rtl" : "ltr";
4068
4568
  let search = cfg.search && cfg.searchEngine !== "pagefind" ? new SearchIndexBuilder({ lang: unit.locale ?? cfg.defaultLocale ?? "en" }) : void 0;
4069
4569
  const siteDepthPrefix = unit.prefix ? "../".repeat(unit.prefix.split("/").length) : "";
4070
4570
  phase.scan = (phase.scan ?? 0) + now() - t;
4071
4571
  state.scanned?.(unit, "end");
4072
- input.onUnitAssets?.(unit.prefix, assetPaths);
4572
+ input.onUnitAssets?.(unit.prefix, state.staticFiles ? /* @__PURE__ */ new Set([...assetPaths, ...staticLinkPaths(state)]) : assetPaths);
4073
4573
  if (diagrams) {
4074
4574
  t = now();
4075
4575
  const live = new Set([...infos.values()].map((i) => i.source));
@@ -4368,8 +4868,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4368
4868
  phase.render = (phase.render ?? 0) + now() - t;
4369
4869
  t = now();
4370
4870
  const hrefTo = (slug) => {
4371
- const ref = pageRefs.get(slug);
4372
- return ref ? hrefBetween(info.out, ref.out, cfg.linkStyle) : void 0;
4871
+ const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
4872
+ return out !== void 0 ? hrefBetween(info.out, out, cfg.linkStyle) : void 0;
4373
4873
  };
4374
4874
  const chain = trail.get(info.slug) ?? [];
4375
4875
  const pos = readingOrder.indexOf(info.slug);
@@ -4418,9 +4918,11 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4418
4918
  tagChips: tagChips(Array.isArray(fm.tags) ? fm.tags : [], cfg, (tagPath) => hrefBetween(info.out, tagPath, cfg.linkStyle)),
4419
4919
  badges: fieldBadges(fm, cfg, (target) => hrefBetween(info.out, target, cfg.linkStyle)),
4420
4920
  post: postHead,
4921
+ products: productOptions(unit, cfg, siteRoot, t_),
4421
4922
  versions: switchOptions("version", unit, allUnits, cfg, info.out, siteRoot, t_),
4422
4923
  locales: switchOptions("locale", unit, allUnits, cfg, info.out, siteRoot, t_),
4423
4924
  banner: versionBanner(unit, allUnits, cfg, info.out, siteRoot, t_),
4925
+ versionBadge: unit.version !== void 0 ? versionsOf(cfg, unit.product).versions.find((v) => v.id === unit.version && v.badge)?.label : void 0,
4424
4926
  // The source's path in the repository includes the content root.
4425
4927
  editUrl: cfg.repoUrl ? `${cfg.repoUrl.replace(/\/+$/, "")}/${(cfg.editUri ?? "").replace(/^\/+/, "")}${srcOf(info)}` : void 0,
4426
4928
  mdHref: cfg.mdMirror ? mdOut.split("/").pop() : void 0,
@@ -4430,6 +4932,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4430
4932
  meta: fm,
4431
4933
  math: ctx.usedMath === true,
4432
4934
  lastUpdated,
4935
+ logo: state.logo,
4433
4936
  seo: {
4434
4937
  url: canon.url,
4435
4938
  home: info.slug === "",
@@ -4514,7 +5017,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4514
5017
  const pagesJs = `(window.__DOGSBAY_PAGES__=window.__DOGSBAY_PAGES__||{})[${JSON.stringify(unit.prefix)}]=${JSON.stringify([...[...infos.values()].filter((i) => i.slug !== replaced).map((i) => i.out), ...generatedOuts])};
4515
5018
  `;
4516
5019
  await emit(prefix + "_dogsbay/pages.js", pagesJs);
4517
- const unitHref = (slug) => pageRefs.get(slug)?.out;
5020
+ const unitHref = (slug) => pageRefs.get(slug)?.out ?? staticNav.get(slug);
4518
5021
  await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(nav, unitHref)).replace(/<\//g, "<\\/")};
4519
5022
  `);
4520
5023
  if (search) {
@@ -4524,7 +5027,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4524
5027
  }
4525
5028
  if (!infos.has("") && blogIndex !== "") {
4526
5029
  const first = readingOrder[0] ?? [...infos.keys()][0];
4527
- if (first != null) await emit(prefix + "index.html", redirectPage(pageRefs.get(first).out, cfg.name));
5030
+ if (first != null) {
5031
+ await emit(prefix + "index.html", redirectPage(pageRefs.get(first).out, cfg.name));
5032
+ state.homeForward.set(unit.prefix, prefix + pageRefs.get(first).out);
5033
+ }
4528
5034
  }
4529
5035
  await emit(prefix + "404.html", notFoundPage(cfg, unit, t_));
4530
5036
  if (cfg.llmsTxt) {
@@ -4649,8 +5155,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4649
5155
  const siteRoot = unitRoot + siteDepthPrefix;
4650
5156
  const homeHref = hrefBetween(out, "index.html", cfg.linkStyle);
4651
5157
  const hrefTo = (slug) => {
4652
- const ref = pageRefs.get(slug);
4653
- return ref ? hrefBetween(out, ref.out, cfg.linkStyle) : void 0;
5158
+ const target = pageRefs.get(slug)?.out ?? staticNav.get(slug);
5159
+ return target !== void 0 ? hrefBetween(out, target, cfg.linkStyle) : void 0;
4654
5160
  };
4655
5161
  const url = absoluteUrl(cfg, unit.prefix, servedPath(out, cfg.linkStyle));
4656
5162
  const html = await composePage(
@@ -4673,10 +5179,12 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
4673
5179
  nav,
4674
5180
  navOptions: { current: "\0", trail: /* @__PURE__ */ new Set(), href: hrefTo, full: fullNav, cache: state.navCache, cacheKey: `${unit.prefix}\0${dirname(out)}` },
4675
5181
  breadcrumb: [],
5182
+ products: productOptions(unit, cfg, siteRoot, t_),
4676
5183
  versions: switchOptions("version", unit, allUnits, cfg, out, siteRoot, t_),
4677
5184
  locales: switchOptions("locale", unit, allUnits, cfg, out, siteRoot, t_),
4678
5185
  wide: o.wide ?? false,
4679
5186
  feed: o.feed ? hrefBetween(out, o.feed, "html") : void 0,
5187
+ logo: state.logo,
4680
5188
  seo: {
4681
5189
  url,
4682
5190
  image: cfg.ogImage,
@@ -5022,10 +5530,13 @@ function switchOptions(kind, unit, all, cfg, out, siteRoot, t) {
5022
5530
  const other = kind === "version" ? "locale" : "version";
5023
5531
  if (!unit[axis]) return [];
5024
5532
  const peers = all.filter((u) => u[other] === unit[other] && sameProduct(u, unit) && u[axis]);
5025
- const { versions, defaultVersion } = versionsOf(cfg, unit.product);
5533
+ const { versions, defaultVersion, menu } = versionsOf(cfg, unit.product);
5026
5534
  const defs = kind === "version" ? versions : cfg.locales;
5027
5535
  const ordered = defs.length ? defs.map((d) => peers.find((u) => u[axis] === d.id)).filter((u) => !!u) : peers;
5028
- return ordered.filter((u) => !(kind === "version" && versions.find((v) => v.id === u.version)?.hidden && u !== unit)).map((u) => {
5536
+ let shown = ordered.filter((u) => !(kind === "version" && versions.find((v) => v.id === u.version)?.hidden && u !== unit));
5537
+ const hasMenu = shown.length >= 2;
5538
+ if (kind === "version") shown = limitVersionRows(shown, menu?.limit, (u) => u === unit);
5539
+ const options = shown.map((u) => {
5029
5540
  const v = kind === "version" ? versions.find((d) => d.id === u.version) : void 0;
5030
5541
  const l = kind === "locale" ? cfg.locales.find((d) => d.id === u.locale) : void 0;
5031
5542
  const note = v?.eol ? t("eol") : v?.prerelease ? t("prerelease") : v && v.id === defaultVersion && v.id !== "latest" ? t("latest") : void 0;
@@ -5037,6 +5548,20 @@ function switchOptions(kind, unit, all, cfg, out, siteRoot, t) {
5037
5548
  note
5038
5549
  };
5039
5550
  });
5551
+ if (kind !== "version" || !hasMenu || !menu?.links.length) return options;
5552
+ return [...options, ...menu.links.map((l) => ({ label: l.label, href: menuHref(l.href, siteRoot, cfg.linkStyle, cfg.basePath), current: false, prefix: "", link: true }))];
5553
+ }
5554
+ function productOptions(unit, cfg, siteRoot, t) {
5555
+ if (!cfg.products) return [];
5556
+ const entries = shared(() => productSwitcher(cfg.products, unit.locale));
5557
+ if (entries.length < 2) return [];
5558
+ const options = entries.map((e) => ({
5559
+ label: e.label,
5560
+ href: `${siteRoot}${e.home.replace(/^\//, "")}index.html`,
5561
+ current: e.name === unit.product,
5562
+ prefix: e.home.replace(/^\/|\/$/g, "")
5563
+ }));
5564
+ return unit.product && options.some((o) => o.current) ? options : [{ label: t("product"), href: "", current: true, prefix: "", disabled: true }, ...options];
5040
5565
  }
5041
5566
  function versionBanner(unit, all, cfg, out, siteRoot, t) {
5042
5567
  const link = (latest2) => ` <a href="${esc3(`${siteRoot}${latest2.prefix ? latest2.prefix + "/" : ""}${out}`)}" data-db-version-link data-prefix="${esc3(latest2.prefix)}">${esc3(t("goLatest"))}</a>`;
@@ -5096,7 +5621,7 @@ function redirectPage(target, name) {
5096
5621
  function notFoundPage(cfg, unit, t) {
5097
5622
  const segments = [cfg.basePath, unit.prefix].filter(Boolean).map((x) => String(x).replace(/^\/+|\/+$/g, "")).filter(Boolean);
5098
5623
  const base = "/" + segments.map((x) => x + "/").join("");
5099
- return `<!doctype html><html lang="${esc3(unit.locale ?? cfg.defaultLocale ?? "en")}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="robots" content="noindex"><title>${esc3(t("notFound"))} | ${esc3(cfg.name)}</title>${notFoundMeta(cfg, t)}<link rel="stylesheet" href="${esc3(base)}_dogsbay/site.css"><link rel="icon" href="/${cfg.basePath ? cfg.basePath + "/" : ""}_dogsbay/assets/favicon.svg"></head><body class="bg-background text-foreground antialiased"><main class="mx-auto max-w-3xl px-6 py-16"><article class="docs-prose"><h1>${esc3(t("notFound"))}</h1><p>${esc3(t("notFoundBody"))}</p><p><a href="${esc3(base)}">${esc3(cfg.name)}</a></p></article></main></body></html>
5624
+ return `<!doctype html><html lang="${esc3(unit.locale ?? cfg.defaultLocale ?? "en")}"${cfg.chrome.colorMode === "dark" ? ' class="dark"' : ""}><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="robots" content="noindex"><title>${esc3(t("notFound"))} | ${esc3(cfg.name)}</title>${notFoundMeta(cfg, t)}<link rel="stylesheet" href="${esc3(base)}_dogsbay/site.css"><link rel="icon" href="/${cfg.basePath ? cfg.basePath + "/" : ""}_dogsbay/assets/favicon.svg"></head><body class="bg-background text-foreground antialiased"><main class="mx-auto max-w-3xl px-6 py-16"><article class="docs-prose"><h1>${esc3(t("notFound"))}</h1><p>${esc3(t("notFoundBody"))}</p><p><a href="${esc3(base)}">${esc3(cfg.name)}</a></p></article></main></body></html>
5100
5625
  `;
5101
5626
  }
5102
5627
  function notFoundMeta(cfg, t) {
@@ -5172,6 +5697,7 @@ function hreflangFor(cfg, unit, all, languages, slug) {
5172
5697
  }
5173
5698
 
5174
5699
  // src/core/dev.ts
5700
+ import { staticPathServed as staticPathServed2 } from "@dogsbay/site-files";
5175
5701
  var CONFIG_FILES = /* @__PURE__ */ new Set(["dogsbay.config.yml", "dogsbay.config.yaml"]);
5176
5702
  var NAV_FILES2 = /(^|\/)nav\.(ya?ml|json)$/;
5177
5703
  var START_ONLY = /(^|\/)(_dogsbay\/search\/|llms(-full)?\.txt$)/;
@@ -5423,6 +5949,7 @@ async function openDevSession(input, o = {}) {
5423
5949
  };
5424
5950
  const themeDir = config.themeDir ? config.themeDir.replace(/\/+$/, "") + "/" : void 0;
5425
5951
  const extraCss = new Set(config.css.map((c) => c.replace(/^\.\//, "")));
5952
+ const logos = new Set([config.chrome.logo?.light, config.chrome.logo?.dark].filter((x) => !!x));
5426
5953
  const lazy = /* @__PURE__ */ new Set();
5427
5954
  if (paths.some((p) => CONFIG_FILES.has(p))) {
5428
5955
  const next = await attributesOnly();
@@ -5436,7 +5963,7 @@ async function openDevSession(input, o = {}) {
5436
5963
  parsedConfig = next;
5437
5964
  if (!same) for (const prefix of units.keys()) lazy.add(prefix);
5438
5965
  }
5439
- if (paths.some((p) => themeDir && p.startsWith(themeDir) || extraCss.has(p))) {
5966
+ if (paths.some((p) => themeDir && p.startsWith(themeDir) || extraCss.has(p) || logos.has(p))) {
5440
5967
  await full();
5441
5968
  return { css: true, handled: "full" };
5442
5969
  }
@@ -5455,6 +5982,22 @@ async function openDevSession(input, o = {}) {
5455
5982
  continue;
5456
5983
  }
5457
5984
  if (TOPIC_MAP.test(p)) continue;
5985
+ if (config.staticDir && p.startsWith(config.staticDir + "/")) {
5986
+ const rel = p.slice(config.staticDir.length + 1);
5987
+ if (rel === "_headers" || rel === "_redirects" || !staticPathServed2(rel)) continue;
5988
+ const files = ctx.state.staticFiles;
5989
+ if (!files.has(rel) && out.has(rel)) continue;
5990
+ mark("asset");
5991
+ const content2 = input.files.get(p);
5992
+ if (content2 !== void 0 && (!input.untrusted || await assetVerdict(rel, content2, true, true) === "copy")) {
5993
+ files.set(rel, content2);
5994
+ out.set(rel, content2);
5995
+ } else {
5996
+ files.delete(rel);
5997
+ out.delete(rel);
5998
+ }
5999
+ continue;
6000
+ }
5458
6001
  const dataDirs = (x) => [...new Set(x.unit.members.map((m) => dataDirOf(config, m.source)))].filter((d) => p.startsWith(`${d}/`));
5459
6002
  const dataUnits = [...units.values()].filter((x) => dataDirs(x).length);
5460
6003
  if (dataUnits.length) {
@@ -5507,7 +6050,7 @@ async function openDevSession(input, o = {}) {
5507
6050
  for (const prefix of lazy) {
5508
6051
  const u = units.get(prefix);
5509
6052
  for (const key of [...out.keys()]) {
5510
- if (START_ONLY.test(key) || SITE_WIDE.test(key) || UNIT_CSS.test(key)) continue;
6053
+ if (START_ONLY.test(key) || SITE_WIDE.test(key) || UNIT_CSS.test(key) || ctx.state.staticFiles?.has(key)) continue;
5511
6054
  if (unitForSitePath(key) === u) out.delete(key);
5512
6055
  }
5513
6056
  for (const s of [...stale]) if (unitForSitePath(s) === u) stale.delete(s);
@@ -5662,8 +6205,8 @@ function peleRenderer() {
5662
6205
  // src/package/prebuilt.ts
5663
6206
  import { minifyCss } from "@dogsbay/render-html/css-tools";
5664
6207
  var SHEETS = {
5665
- default: () => import("./chunks/prebuilt-css-default-GJIN3VOR.mjs"),
5666
- mintlify: () => import("./chunks/prebuilt-css-mintlify-SKWKD2KB.mjs")
6208
+ default: () => import("./chunks/prebuilt-css-default-65IKPMHZ.mjs"),
6209
+ mintlify: () => import("./chunks/prebuilt-css-mintlify-PIEJO5KN.mjs")
5667
6210
  };
5668
6211
  var prebuiltSiteCss = async (o) => {
5669
6212
  const base = (await (SHEETS[o.theme] ?? SHEETS.default)()).CSS;