@aiquants/markdown-explorer 0.30.0 → 0.31.0

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +12 -8
  3. package/dist/{EditSurface-Cw0kbedj.cjs → EditSurface-BBHPQhf3.cjs} +3 -3
  4. package/dist/{EditSurface-DY1VNM9L.js → EditSurface-N7HkpyJA.js} +187 -187
  5. package/dist/{ExplorerSplit-x9Qkldh6.cjs → ExplorerSplit-C7GvlQ-G.cjs} +1 -1
  6. package/dist/{ExplorerSplit-D3f1FiZ7.js → ExplorerSplit-DMqbSL3i.js} +4 -4
  7. package/dist/{MultiLayout-B0dfZlpx.js → MultiLayout-9g9_IBi5.js} +237 -232
  8. package/dist/MultiLayout-mDzolCaK.cjs +1 -0
  9. package/dist/{NativeScrollBar-C2UoYO3i.cjs → NativeScrollBar-B0QLIVf3.cjs} +1 -1
  10. package/dist/{NativeScrollBar-C4vkvdGz.js → NativeScrollBar-BiLLVz18.js} +2 -2
  11. package/dist/{TreeLayout-DsFH17x_.cjs → TreeLayout-DKq_aXBx.cjs} +1 -1
  12. package/dist/{TreeLayout-Bak1y1m4.js → TreeLayout-OjVoHBDI.js} +3 -3
  13. package/dist/core/config.d.cts +2 -0
  14. package/dist/core/config.d.ts +2 -0
  15. package/dist/core/labels.d.cts +6 -0
  16. package/dist/core/labels.d.ts +6 -0
  17. package/dist/{index-auQVKY4M.js → index-C8yNTkdV.js} +917 -903
  18. package/dist/{index-DgaTEKsI.cjs → index-CT-daekP.cjs} +6 -6
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +6 -6
  21. package/dist/location-BxiJRTyw.cjs +1 -0
  22. package/dist/{location-CKuabtKl.js → location-perTmwct.js} +253 -245
  23. package/dist/{merge-D1jbIOPw.js → merge-Be3mcQZD.js} +1 -1
  24. package/dist/{merge-BEa-lale.cjs → merge-Cv6zPoVK.cjs} +1 -1
  25. package/dist/server.cjs +1 -1
  26. package/dist/server.js +2 -2
  27. package/dist/{tapScrollCircle-BSb6lisN.cjs → tapScrollCircle-37FU6daT.cjs} +1 -1
  28. package/dist/{tapScrollCircle-DYQ8P2ag.js → tapScrollCircle-Cy1KyTg2.js} +1 -1
  29. package/dist/{useSplitPersistence-Bf4M35Il.js → useSplitPersistence-Du01PHNg.js} +1 -1
  30. package/dist/{useSplitPersistence-9Nu6J1WF.cjs → useSplitPersistence-pPmE4GTT.cjs} +1 -1
  31. package/docs/behavior/layout.md +8 -4
  32. package/docs/behavior/localization.md +3 -3
  33. package/docs/behavior/url-contract.md +1 -1
  34. package/package.json +6 -6
  35. package/dist/MultiLayout-BXr2UAvl.cjs +0 -1
  36. package/dist/location-l_HysaZR.cjs +0 -1
@@ -1,26 +1,27 @@
1
1
  import { jsxs as B, jsx as d, Fragment as pe } from "react/jsx-runtime";
2
- import * as E from "react";
2
+ import * as k from "react";
3
3
  import { createContext as ve, use as se, useMemo as X, useSyncExternalStore as re, useRef as U, useLayoutEffect as Y, useCallback as F, useId as Te, useEffect as ee, Component as nr, Suspense as Ie, lazy as Ft, useState as V, useEffectEvent as le } from "react";
4
- import { useParams as ko, useSearchParams as Eo, matchPath as So, useBlocker as xo, useNavigate as To, Link as Ro, useHref as ot, useLocation as rr, useRevalidator as Co } from "react-router";
5
- import { k as Oo, h as or, H as Lo, E as sr, a as ar, I as Mo, J as on, K as Ao, s as No, L as Do, M as Me, e as Ne, m as Po, O as Io, Q as $o, R as _o, T as sn, U as Fo, V as an, W as qo, w as Bo, X as Uo } from "./location-CKuabtKl.js";
4
+ import { useParams as ko, useSearchParams as So, matchPath as xo, useBlocker as To, useNavigate as Ro, Link as Co, useHref as ot, useLocation as rr, useRevalidator as Oo } from "react-router";
5
+ import { k as Lo, h as or, H as Mo, E as sr, a as ar, I as Ao, J as on, K as No, s as Do, L as Po, M as Me, e as Ne, m as Io, O as $o, Q as _o, R as Fo, T as sn, U as qo, V as an, W as Bo, w as Uo, X as Ho } from "./location-perTmwct.js";
6
6
  import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as ln, SPREADSHEET_BLOCK_LABEL_CATALOGS as Je } from "@aiquants/markdown/code-blocks";
7
- import { H as fe, i as Ho, I as st, J as zo, A as te, K as ft, B as mt, z as jo, L as Vo, f as Zo, N as Wo, O as Go, P as Ko, Q as Yo, R as cn, x as Xo, S as Jo, T as Qo, U as es, D as ts, y as ns, V as rs, W as os, X as ss, w as dn } from "./dataRoute-DLhQfdoW.js";
8
- import { HostedScrollArea as un, SpreadsheetBlock as as, useMarkdownToolbarState as is, MarkdownViewer as ir } from "@aiquants/markdown";
9
- import { SOURCE_LINES_ATTRIBUTE as lr, parseSourceLines as ls } from "@aiquants/markdown/source-lines";
10
- import { iterateTsvRows as cs, iterateTsvPrefixRows as ds, serializeTsv as us } from "@aiquants/spreadsheet/tsv";
7
+ import { H as fe, i as zo, I as st, J as jo, A as te, K as ft, B as mt, z as Vo, L as Zo, f as Wo, N as Go, O as Ko, P as Yo, Q as Xo, R as cn, x as Jo, S as Qo, T as es, U as ts, D as ns, y as rs, V as os, W as ss, X as as, w as dn } from "./dataRoute-DLhQfdoW.js";
8
+ import { HostedScrollArea as un, SpreadsheetBlock as is, useMarkdownToolbarState as ls, MarkdownViewer as ir } from "@aiquants/markdown";
9
+ import { SOURCE_LINES_ATTRIBUTE as lr, parseSourceLines as cs } from "@aiquants/markdown/source-lines";
10
+ import { iterateTsvRows as ds, iterateTsvPrefixRows as us, serializeTsv as fs } from "@aiquants/spreadsheet/tsv";
11
11
  import { SPREADSHEET_MAX_OPERATION_CELLS as fn } from "@aiquants/spreadsheet/view";
12
- import { DEFAULT_CONTENT_ALIGN as fs } from "@aiquants/markdown/viewer-settings";
13
- import { w as Lt, r as Mt, a as ms, b as mn, s as Oe, c as hs } from "./storage-CmGHg7OA.js";
14
- import { createShouldRevalidate as ps } from "@aiquants/route-revalidation";
15
- const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, cr = Object.freeze(Object.keys(Je.en)), dr = (e) => Object.fromEntries(cr.map((t) => [qt(t), Je[e][t].text])), ws = Object.freeze({
12
+ import { DEFAULT_CONTENT_ALIGN as ms } from "@aiquants/markdown/viewer-settings";
13
+ import { w as Lt, r as Mt, a as hs, b as mn, s as Oe, c as ps } from "./storage-CmGHg7OA.js";
14
+ import { createShouldRevalidate as gs } from "@aiquants/route-revalidation";
15
+ const hn = Object.freeze(["en", "ja"]), ws = "en", qt = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, cr = Object.freeze(Object.keys(Je.en)), dr = (e) => Object.fromEntries(cr.map((t) => [qt(t), Je[e][t].text])), vs = Object.freeze({
16
16
  panelMoved: Object.freeze(["title", "column", "position"]),
17
17
  panelMoveUnavailable: Object.freeze(["title", "move"]),
18
18
  panelDragStarted: Object.freeze(["title"]),
19
19
  panelDragCancelled: Object.freeze(["title"]),
20
20
  multiColumnRegion: Object.freeze(["column"]),
21
21
  viewerSvgImageSourceRegion: Object.freeze(["name"]),
22
+ viewerSvgImageFullscreenDialog: Object.freeze(["name"]),
22
23
  ...Object.fromEntries(cr.filter((e) => ln[e].length > 0).map((e) => [qt(e), ln[e]]))
23
- }), vs = /\{(\w+)\}/gu, ur = {
24
+ }), bs = /\{(\w+)\}/gu, ur = {
24
25
  ...dr("en"),
25
26
  explorerRegion: "Explorer",
26
27
  sourceLabel: "Source",
@@ -265,6 +266,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
265
266
  viewerMermaidPanDown: "Pan Down",
266
267
  viewerMermaidPanLeft: "Pan Left",
267
268
  viewerMermaidPanRight: "Pan Right",
269
+ viewerMermaidFullscreen: "View full screen",
270
+ viewerMermaidExitFullscreen: "Exit full screen",
271
+ viewerMermaidFullscreenDialog: "Diagram (full screen)",
268
272
  viewerMermaidDiagram: "Diagram (arrow keys pan, + and - zoom, 0 resets)",
269
273
  viewerMermaidRetry: "Try again",
270
274
  viewerEmbeddedVideo: "embedded video",
@@ -284,6 +288,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
284
288
  viewerSvgImageCopyImage: "Copy the image",
285
289
  viewerSvgImageCopiedImage: "Copied the image.",
286
290
  viewerSvgImageCopyImageFailed: "Could not copy the image.",
291
+ viewerSvgImageFullscreen: "View full screen",
292
+ viewerSvgImageExitFullscreen: "Exit full screen",
293
+ viewerSvgImageFullscreenDialog: "{name} (full screen)",
287
294
  multiRegion: "Panels",
288
295
  multiEmpty: "Select documents in the explorer to open them side by side.",
289
296
  panelLimit: (e) => `You can open up to ${String(e)} panels at once.`,
@@ -316,7 +323,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
316
323
  multiColumnEmpty: "This column is empty",
317
324
  multiColumnRegion: "Column {column}",
318
325
  panelDropHere: "Drop the panel here"
319
- }, bs = {
326
+ }, Es = {
320
327
  ...dr("ja"),
321
328
  explorerRegion: "エクスプローラー",
322
329
  sourceLabel: "ソース",
@@ -561,6 +568,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
561
568
  viewerMermaidPanDown: "下へ移動",
562
569
  viewerMermaidPanLeft: "左へ移動",
563
570
  viewerMermaidPanRight: "右へ移動",
571
+ viewerMermaidFullscreen: "全画面で見る",
572
+ viewerMermaidExitFullscreen: "全画面を閉じる",
573
+ viewerMermaidFullscreenDialog: "図 (全画面)",
564
574
  viewerMermaidDiagram: "図 (矢印キーで移動、+ と - で拡大縮小、0 で元に戻す)",
565
575
  viewerMermaidRetry: "再試行",
566
576
  viewerEmbeddedVideo: "埋め込みの動画",
@@ -580,6 +590,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
580
590
  viewerSvgImageCopyImage: "画像をコピー",
581
591
  viewerSvgImageCopiedImage: "画像をコピーしました。",
582
592
  viewerSvgImageCopyImageFailed: "画像をコピーできませんでした。",
593
+ viewerSvgImageFullscreen: "全画面で見る",
594
+ viewerSvgImageExitFullscreen: "全画面を閉じる",
595
+ viewerSvgImageFullscreenDialog: "{name} (全画面)",
583
596
  multiRegion: "パネル",
584
597
  multiEmpty: "エクスプローラーで文書を選ぶと、ここに並べて開きます。",
585
598
  panelLimit: (e) => `同時に開けるのは ${String(e)} パネルまでです。`,
@@ -614,9 +627,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
614
627
  panelDropHere: "ここへパネルをドロップ"
615
628
  }, ys = Object.freeze({
616
629
  en: Object.freeze(ur),
617
- ja: Object.freeze(bs)
618
- }), fr = Object.freeze(Object.keys(ur)), ks = new Set(fr), Es = (e) => ks.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, mr = (e) => {
619
- if (e === void 0) return gs;
630
+ ja: Object.freeze(Es)
631
+ }), fr = Object.freeze(Object.keys(ur)), ks = new Set(fr), Ss = (e) => ks.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, mr = (e) => {
632
+ if (e === void 0) return ws;
620
633
  if (hn.includes(e)) return e;
621
634
  throw new RangeError(`[markdown-explorer] locale is the UI language (${hn.map((t) => JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${Ge(e)}`);
622
635
  }, pn = (e, t) => {
@@ -624,11 +637,11 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
624
637
  if (t === void 0) return n;
625
638
  if (t === null || typeof t != "object")
626
639
  throw new RangeError(`[markdown-explorer] labels must be an object; got ${Ge(t)}`);
627
- if (!Oo(t))
640
+ if (!Lo(t))
628
641
  throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${Ge(t)}`);
629
642
  const r = t, o = { ...n };
630
643
  for (const s of Object.keys(r)) {
631
- if (!Es(s))
644
+ if (!Ss(s))
632
645
  throw new RangeError(`[markdown-explorer] labels.${s} is not a known label key; expected one of ${fr.join(", ")}`);
633
646
  const a = r[s];
634
647
  if (a === void 0) continue;
@@ -637,21 +650,21 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
637
650
  throw new TypeError(`[markdown-explorer] labels.${s} must be a ${i}; got ${Ge(a)}`);
638
651
  if (typeof a == "string" && a.trim() === "")
639
652
  throw new RangeError(`[markdown-explorer] labels.${s} must be a non-blank string`);
640
- const f = ws[s];
653
+ const f = vs[s];
641
654
  if (typeof a == "string" && f !== void 0) {
642
- for (const [, u] of a.matchAll(vs))
655
+ for (const [, u] of a.matchAll(bs))
643
656
  if (!f.includes(u ?? ""))
644
657
  throw new RangeError(`[markdown-explorer] labels.${s} uses the unknown placeholder {${String(u)}}; it accepts ${f.map((l) => `{${l}}`).join(", ")}`);
645
658
  }
646
659
  o[s] = a;
647
660
  }
648
661
  return Object.freeze(o);
649
- }, Ss = (e, t) => {
662
+ }, xs = (e, t) => {
650
663
  if (Object.is(e, t)) return !0;
651
664
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
652
665
  const n = e, r = t, o = Object.keys(n), s = Object.keys(r);
653
666
  return o.length === s.length && s.every((a) => Object.hasOwn(n, a) && Object.is(n[a], r[a]));
654
- }, gn = Object.freeze(["light", "dark"]), xs = (e) => {
667
+ }, gn = Object.freeze(["light", "dark"]), Ts = (e) => {
655
668
  if (e === void 0) return "light";
656
669
  if (gn.includes(e)) return e;
657
670
  throw new RangeError(`[markdown-explorer] theme must be ${gn.map((t) => JSON.stringify(t)).join(" or ")}; got ${typeof e == "string" ? JSON.stringify(e) : typeof e}`);
@@ -663,7 +676,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
663
676
  const { viewSettings: t } = $(), n = () => e(t.getSnapshot());
664
677
  return re(t.subscribe, n, n);
665
678
  }, Bt = () => {
666
- const { config: e } = $(), t = ko()["*"], [n] = Eo(), r = n.toString();
679
+ const { config: e } = $(), t = ko()["*"], [n] = So(), r = n.toString();
667
680
  return X(() => or(e, t, new URLSearchParams(r)), [e, t, r]);
668
681
  }, pr = {
669
682
  unauthorized: ["failureUnauthorizedTitle", "failureUnauthorizedBody"],
@@ -681,7 +694,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
681
694
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: a }),
682
695
  e.reason === "unauthorized" ? /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", onClick: () => window.location.reload(), children: o.reloadPage }) : n !== void 0 && e.reason === "failed" ? /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", onClick: n, children: o.retry }) : null
683
696
  ] });
684
- }, Ts = (e, t) => {
697
+ }, Rs = (e, t) => {
685
698
  const { phase: n, save: r, dirty: o } = t;
686
699
  switch (n.kind) {
687
700
  case "opening":
@@ -707,7 +720,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
707
720
  break;
708
721
  }
709
722
  return o ? e.draftUnsaved : "";
710
- }, Rs = (e, t, n) => {
723
+ }, Cs = (e, t, n) => {
711
724
  switch (t.kind) {
712
725
  case "draft":
713
726
  return e.draftNotSaved;
@@ -733,38 +746,38 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
733
746
  for (const t of [...e]) t();
734
747
  }
735
748
  };
736
- }, Cs = "<<<<<<<", Os = "=======", Ls = ">>>>>>>", wn = (e, t) => e === t || e.startsWith(`${t} `), vn = (e) => Ms(e.split(`
737
- `)), Ms = (e) => {
749
+ }, Os = "<<<<<<<", Ls = "=======", Ms = ">>>>>>>", wn = (e, t) => e === t || e.startsWith(`${t} `), vn = (e) => As(e.split(`
750
+ `)), As = (e) => {
738
751
  const t = [];
739
752
  let n = null, r = null, o = 0;
740
753
  for (const s of e) {
741
754
  o += 1;
742
755
  const a = s.charCodeAt(0);
743
- a !== 60 && a !== 61 && a !== 62 || (wn(s, Cs) ? (n = o, r = null) : s === Os ? n !== null && r === null ? r = o : n = null : wn(s, Ls) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
756
+ a !== 60 && a !== 61 && a !== 62 || (wn(s, Os) ? (n = o, r = null) : s === Ls ? n !== null && r === null ? r = o : n = null : wn(s, Ms) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
744
757
  }
745
758
  return t;
746
759
  }, bn = (e) => e.includes(`\r
747
760
  `) ? `\r
748
761
  ` : `
749
762
  `, ht = (e) => e.replace(/\r\n?/gu, `
750
- `), As = (e, t) => t === `
763
+ `), Ns = (e, t) => t === `
751
764
  ` ? e : e.replaceAll(`
752
765
  `, `\r
753
- `), Ns = 3, Ds = /^\d+(?:\.\d+)?$/u, Ps = (e) => {
754
- if (e === null || !Ds.test(e)) return null;
766
+ `), Ds = 3, Ps = /^\d+(?:\.\d+)?$/u, Is = (e) => {
767
+ if (e === null || !Ps.test(e)) return null;
755
768
  const t = Number(e);
756
769
  return t >= ar && t <= sr ? t : null;
757
- }, pt = Object.freeze({ kind: "idle" }), yn = Object.freeze({ kind: "draft" }), Is = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
770
+ }, pt = Object.freeze({ kind: "idle" }), En = Object.freeze({ kind: "draft" }), $s = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
758
771
  const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), l = qe();
759
772
  let c = null, m = null, g = null;
760
773
  const v = (h, p) => {
761
774
  h.value = { ...h.value, ...p }, l.emit();
762
- }, y = (h, p) => s.get(h) === p, T = async (h, p) => {
775
+ }, E = (h, p) => s.get(h) === p, T = async (h, p) => {
763
776
  p.controller.abort(), p.controller = new AbortController();
764
777
  const { signal: x } = p.controller;
765
778
  v(p, { phase: { kind: "opening" } });
766
779
  const A = await e.edit(h, x);
767
- if (!y(h, p) || x.aborted || !("kind" in A)) return;
780
+ if (!E(h, p) || x.aborted || !("kind" in A)) return;
768
781
  if (A.kind === "grant") {
769
782
  v(p, { phase: { kind: "grant", href: A.href } });
770
783
  return;
@@ -774,7 +787,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
774
787
  return;
775
788
  }
776
789
  const I = ht(A.text), _ = A.kind === "draft";
777
- p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = bn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? yn : pt, generation: p.value.generation + 1 });
790
+ p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = bn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? En : pt, generation: p.value.generation + 1 });
778
791
  }, O = (h) => {
779
792
  const p = s.get(h);
780
793
  p !== void 0 && (p.controller.abort(), s.delete(h), i.delete(h));
@@ -788,7 +801,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
788
801
  if (p === void 0 || p.value.phase.kind !== "editing" || p.base === null || p.value.save.kind === "saving") return;
789
802
  const { version: x } = p.base;
790
803
  if (x === null) {
791
- n(h, yn);
804
+ n(h, En);
792
805
  return;
793
806
  }
794
807
  const A = vn(p.draft).length;
@@ -800,9 +813,9 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
800
813
  const { signal: I } = p.controller;
801
814
  let _ = { text: p.base.text, version: x }, b = p.draft, S = !1;
802
815
  v(p, { save: { kind: "saving" } });
803
- for (let L = 0; L < Ns; L += 1) {
804
- const M = await e.save(h, _.version, As(b, p.ending), I);
805
- if (!y(h, p) || I.aborted || !("kind" in M)) return;
816
+ for (let L = 0; L < Ds; L += 1) {
817
+ const M = await e.save(h, _.version, Ns(b, p.ending), I);
818
+ if (!E(h, p) || I.aborted || !("kind" in M)) return;
806
819
  if (M.kind === "saved") {
807
820
  f.get(h)?.flush(), p.base = { text: b, version: M.version }, q(h, p, { kind: "saved", merged: S }, { dirty: p.draft !== b });
808
821
  return;
@@ -815,8 +828,8 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
815
828
  q(h, p, { kind: "failed", failure: M.failure });
816
829
  return;
817
830
  }
818
- const { mergeDraft: P } = await import("./merge-D1jbIOPw.js");
819
- if (!y(h, p) || I.aborted) return;
831
+ const { mergeDraft: P } = await import("./merge-Be3mcQZD.js");
832
+ if (!E(h, p) || I.aborted) return;
820
833
  const H = f.get(h);
821
834
  H?.flush();
822
835
  const K = ht(M.text), w = P(_.text, p.draft, K, t());
@@ -940,7 +953,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
940
953
  setSideBySide: (h) => {
941
954
  c !== h && (c = h, r.write(h), l.emit());
942
955
  },
943
- editorShare: () => (m ??= o.read() ?? Lo, m),
956
+ editorShare: () => (m ??= o.read() ?? Mo, m),
944
957
  setEditorShare: (h) => {
945
958
  if (!Number.isFinite(h)) throw new RangeError(`[markdown-explorer] an editor share must be a finite number; got ${String(h)}`);
946
959
  const p = Math.min(sr, Math.max(ar, h));
@@ -957,16 +970,16 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
957
970
  };
958
971
  }, gr = (e) => {
959
972
  e.preventDefault(), e.stopPropagation();
960
- }, $s = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, wr = "data-aqmx-content-pane", At = Object.freeze({ [wr]: "" }), _s = "--aqmx-dialog-left", Fs = "--aqmx-dialog-top", qs = '[data-testid="markdown-explorer"]', Bs = (e) => {
961
- const t = e.closest(qs)?.querySelectorAll(`[${wr}]`), n = t?.item(t.length - 1);
973
+ }, _s = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, wr = "data-aqmx-content-pane", At = Object.freeze({ [wr]: "" }), Fs = "--aqmx-dialog-left", qs = "--aqmx-dialog-top", Bs = '[data-testid="markdown-explorer"]', Us = (e) => {
974
+ const t = e.closest(Bs)?.querySelectorAll(`[${wr}]`), n = t?.item(t.length - 1);
962
975
  if (!(n instanceof HTMLElement)) throw new Error("[markdown-explorer] a dialog opened where the explorer marks no content pane");
963
976
  return n;
964
- }, Us = (e) => {
965
- const t = $s(getComputedStyle(e).marginTop);
977
+ }, Hs = (e) => {
978
+ const t = _s(getComputedStyle(e).marginTop);
966
979
  if (Number.isNaN(t)) return null;
967
- const n = Bs(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = Mo(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
968
- return e.style.setProperty(_s, `${String(s)}px`), e.style.setProperty(Fs, `${String(a)}px`), n;
969
- }, Hs = (e) => e.preventDefault(), vr = ({ open: e, onOpen: t, onDismiss: n }) => {
980
+ const n = Us(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = Ao(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
981
+ return e.style.setProperty(Fs, `${String(s)}px`), e.style.setProperty(qs, `${String(a)}px`), n;
982
+ }, zs = (e) => e.preventDefault(), vr = ({ open: e, onOpen: t, onDismiss: n }) => {
970
983
  const r = U(null), o = U(null), s = U(!1), a = U(t);
971
984
  Y(() => {
972
985
  a.current = t;
@@ -984,8 +997,8 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
984
997
  const c = new ResizeObserver(() => g());
985
998
  let m = null;
986
999
  const g = () => {
987
- const y = Us(l);
988
- y === null || y === m || (m !== null && c.unobserve(m), c.observe(y), m = y);
1000
+ const E = Hs(l);
1001
+ E === null || E === m || (m !== null && c.unobserve(m), c.observe(E), m = E);
989
1002
  };
990
1003
  g(), c.observe(l);
991
1004
  const v = l.ownerDocument.defaultView;
@@ -1006,7 +1019,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1006
1019
  ), u = F(() => {
1007
1020
  s.current && n();
1008
1021
  }, [n]);
1009
- return { ref: r, onKeyDown: i, onClick: f, onCancel: Hs, onClose: u };
1022
+ return { ref: r, onKeyDown: i, onClick: f, onCancel: zs, onClose: u };
1010
1023
  }, br = ({ open: e, title: t, body: n, confirmLabel: r, cancelLabel: o, onConfirm: s, onCancel: a, testId: i }) => {
1011
1024
  const f = U(null), u = Te(), l = Te(), c = F(() => f.current?.focus(), []), m = vr({ open: e, onOpen: c, onDismiss: a });
1012
1025
  return /* @__PURE__ */ d("dialog", { ...m, className: "aqmx-confirm", "aria-labelledby": u, "aria-describedby": l, "data-testid": i, children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel", children: [
@@ -1027,7 +1040,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1027
1040
  t.status = "rejected", t.reason = n;
1028
1041
  }
1029
1042
  )), t;
1030
- }, yr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, zs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), js = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Vs = (e, t, n) => {
1043
+ }, Er = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, js = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), Vs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Zs = (e, t, n) => {
1031
1044
  const r = /* @__PURE__ */ new Set(), o = [...e].reverse();
1032
1045
  for (let s = o.pop(); s !== void 0; s = o.pop()) {
1033
1046
  if (s.type !== "directory" || r.has(s.path)) continue;
@@ -1037,19 +1050,19 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1037
1050
  if (i !== null) for (const f of [...i].reverse()) o.push(f);
1038
1051
  }
1039
1052
  return null;
1040
- }, Zs = (e, t, n) => {
1053
+ }, Ws = (e, t, n) => {
1041
1054
  const r = Ae(e.read(t));
1042
- if (r === void 0 || r.status === "deferred") return zs;
1055
+ if (r === void 0 || r.status === "deferred") return js;
1043
1056
  if (r.status === "error") return { readme: { status: "failed", failure: r.failure, retry: () => e.retry(t) }, claim: !1 };
1044
- const o = Vs(r.entries, n, (a) => e.children(t, a));
1057
+ const o = Zs(r.entries, n, (a) => e.children(t, a));
1045
1058
  if (o !== null) return { readme: { status: "ok", readme: on(o) }, claim: !1 };
1046
1059
  const s = e.children(t, n);
1047
- return s === void 0 || s.status === "loading" ? js : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: on(s.entries) }, claim: !0 };
1048
- }, Ws = (e, t, n) => {
1049
- const { readme: r } = Zs(e, t, n);
1050
- return r.status === "ok" ? r.readme : null;
1060
+ return s === void 0 || s.status === "loading" ? Vs : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: on(s.entries) }, claim: !0 };
1051
1061
  }, Gs = (e, t, n) => {
1052
- const r = So({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1062
+ const { readme: r } = Ws(e, t, n);
1063
+ return r.status === "ok" ? r.readme : null;
1064
+ }, Ks = (e, t, n) => {
1065
+ const r = xo({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1053
1066
  if (r === null) return /* @__PURE__ */ new Set();
1054
1067
  const { location: o } = or(e, r.params["*"], new URLSearchParams(t.search));
1055
1068
  switch (o.view) {
@@ -1062,24 +1075,24 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1062
1075
  case "multi":
1063
1076
  return new Set(o.docs);
1064
1077
  }
1065
- }, kr = (e) => {
1078
+ }, yr = (e) => {
1066
1079
  const { edits: t } = $(), n = F(() => t.session(e), [t, e]);
1067
- return re(t.subscribe, n, Ks);
1068
- }, Er = () => !1, Ks = () => {
1069
- }, Ys = () => {
1070
- const { edits: e } = $();
1071
- return re(e.subscribe, e.hasSessions, Er);
1080
+ return re(t.subscribe, n, Ys);
1081
+ }, kr = () => !1, Ys = () => {
1072
1082
  }, Xs = () => {
1073
1083
  const { edits: e } = $();
1074
- return re(e.subscribe, e.sideBySide, Er);
1075
- }, Js = () => null, Qs = () => {
1084
+ return re(e.subscribe, e.hasSessions, kr);
1085
+ }, Js = () => {
1086
+ const { edits: e } = $();
1087
+ return re(e.subscribe, e.sideBySide, kr);
1088
+ }, Qs = () => null, ea = () => {
1076
1089
  const { edits: e, labels: t, config: n, trees: r } = $(), o = U([]), s = F(
1077
1090
  ({ nextLocation: g }) => {
1078
- const v = Gs(n, g, (y, T) => Ws(r, y, T));
1079
- return e.flushDrafts(), o.current = e.dirtyPaths().filter((y) => !v.has(y)), o.current.length > 0;
1091
+ const v = Ks(n, g, (E, T) => Gs(r, E, T));
1092
+ return e.flushDrafts(), o.current = e.dirtyPaths().filter((E) => !v.has(E)), o.current.length > 0;
1080
1093
  },
1081
1094
  [e, n, r]
1082
- ), a = xo(s), i = Ys();
1095
+ ), a = To(s), i = Xs();
1083
1096
  ee(() => {
1084
1097
  if (!i) return;
1085
1098
  const g = (v) => {
@@ -1087,7 +1100,7 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1087
1100
  };
1088
1101
  return window.addEventListener("beforeunload", g), () => window.removeEventListener("beforeunload", g);
1089
1102
  }, [i, e]);
1090
- const f = re(e.subscribe, e.discardRequest, Js), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, c = l.map((g) => fe(g)).join(", "), m = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1103
+ const f = re(e.subscribe, e.discardRequest, Qs), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, c = l.map((g) => fe(g)).join(", "), m = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1091
1104
  return /* @__PURE__ */ d(
1092
1105
  br,
1093
1106
  {
@@ -1114,12 +1127,12 @@ const hn = Object.freeze(["en", "ja"]), gs = "en", qt = (e) => `viewerSpreadshee
1114
1127
  }
1115
1128
  );
1116
1129
  };
1117
- function ea({
1130
+ function ta({
1118
1131
  title: e,
1119
1132
  titleId: t,
1120
1133
  ...n
1121
1134
  }, r) {
1122
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1135
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1123
1136
  xmlns: "http://www.w3.org/2000/svg",
1124
1137
  viewBox: "0 0 20 20",
1125
1138
  fill: "currentColor",
@@ -1127,26 +1140,26 @@ function ea({
1127
1140
  "data-slot": "icon",
1128
1141
  ref: r,
1129
1142
  "aria-labelledby": t
1130
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1143
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1131
1144
  id: t
1132
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1145
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1133
1146
  fillRule: "evenodd",
1134
1147
  d: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm2.25 8.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 3a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
1135
1148
  clipRule: "evenodd"
1136
1149
  }));
1137
1150
  }
1138
- const ta = /* @__PURE__ */ E.forwardRef(ea);
1151
+ const na = /* @__PURE__ */ k.forwardRef(ta);
1139
1152
  let gt = null;
1140
- const Sr = () => (gt ??= import("./EditSurface-DY1VNM9L.js").catch((e) => {
1153
+ const Sr = () => (gt ??= import("./EditSurface-N7HkpyJA.js").catch((e) => {
1141
1154
  throw gt = null, e;
1142
- }), gt), na = () => {
1155
+ }), gt), ra = () => {
1143
1156
  Sr().catch(() => {
1144
1157
  });
1145
- }, ra = (e) => {
1158
+ }, oa = (e) => {
1146
1159
  const { default: t } = se(Sr());
1147
1160
  return /* @__PURE__ */ d(t, { ...e });
1148
1161
  };
1149
- class oa extends nr {
1162
+ class sa extends nr {
1150
1163
  state = { failed: !1 };
1151
1164
  static getDerivedStateFromError() {
1152
1165
  return { failed: !0 };
@@ -1156,7 +1169,7 @@ class oa extends nr {
1156
1169
  return this.state.failed ? this.props.fallback(this.retry) : this.props.children;
1157
1170
  }
1158
1171
  }
1159
- const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], [data-aqmd-spreadsheet-fullscreen], [data-aqmd-svg-image-source]', ia = 200, _e = (e) => ls(e.getAttribute(lr)), la = (e, t) => {
1172
+ const xr = "[data-aqmd-fullscreen]", Cu = (e) => e instanceof Element && e.closest(xr) !== null, Ut = `[${lr}]`, aa = "[data-aqmd-content]", ia = `a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], ${xr}, [data-aqmd-svg-image-source]`, la = 200, _e = (e) => cs(e.getAttribute(lr)), ca = (e, t) => {
1160
1173
  for (let r = e; r !== null && t.contains(r); r = r.parentElement) {
1161
1174
  const o = _e(r);
1162
1175
  if (o !== null) return { block: r, lines: o, own: !0 };
@@ -1168,43 +1181,43 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1168
1181
  o !== null && (n = { block: r, lines: o });
1169
1182
  }
1170
1183
  return n === null ? null : { ...n, own: !1 };
1171
- }, ca = (e, t) => {
1184
+ }, da = (e, t) => {
1172
1185
  let n = 0;
1173
1186
  for (let r = e.indexOf(t); r >= 0; r = e.indexOf(t, r + t.length)) n += 1;
1174
1187
  return n;
1175
- }, da = (e) => e.closest(sa) !== null && e.closest(aa) === null, ua = (e, t, n) => {
1176
- const r = la(e, t);
1188
+ }, ua = (e) => e.closest(aa) !== null && e.closest(ia) === null, fa = (e, t, n) => {
1189
+ const r = ca(e, t);
1177
1190
  if (r === null) return null;
1178
1191
  const { block: o, own: s } = r;
1179
1192
  if (!s) {
1180
1193
  const i = r.lines.last + 1;
1181
1194
  return { lines: { first: i, last: i }, word: null, occurrence: 0, clientTop: et(e) };
1182
1195
  }
1183
- const a = pa(o, n);
1196
+ const a = ga(o, n);
1184
1197
  return a === null ? { lines: r.lines, word: null, occurrence: 0, clientTop: et(o) } : { lines: r.lines, word: a.text, occurrence: a.occurrence, clientTop: a.clientTop };
1185
- }, fa = (e, t) => {
1198
+ }, ma = (e, t) => {
1186
1199
  let n = null, r = null, o = null;
1187
1200
  for (const a of e.querySelectorAll(Ut)) {
1188
1201
  const i = _e(a);
1189
1202
  if (i === null) continue;
1190
- n ??= ha(t, a);
1203
+ n ??= pa(t, a);
1191
1204
  const { top: f, bottom: u } = a.getBoundingClientRect();
1192
1205
  f <= n && n < u ? r = { lines: i, block: a } : o === null && f >= n && (o = { lines: i, block: a });
1193
1206
  }
1194
1207
  const s = r === null ? o : r;
1195
1208
  return s === null ? null : { lines: s.lines, word: null, occurrence: 0, clientTop: et(s.block) };
1196
- }, ma = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, ha = (e, t) => {
1209
+ }, ha = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, pa = (e, t) => {
1197
1210
  const n = Number.parseFloat(getComputedStyle(t).scrollMarginTop);
1198
- return ma(e) + (Number.isFinite(n) ? n : 0);
1199
- }, pa = (e, t) => {
1211
+ return ha(e) + (Number.isFinite(n) ? n : 0);
1212
+ }, ga = (e, t) => {
1200
1213
  if (t === null || t.rangeCount === 0) return null;
1201
1214
  const n = t.getRangeAt(0);
1202
1215
  if (!(e.contains(n.startContainer) && e.contains(n.endContainer))) return null;
1203
1216
  const r = n.toString().trim();
1204
- if (r === "" || r.length > ia || /[\r\n]/u.test(r)) return null;
1217
+ if (r === "" || r.length > la || /[\r\n]/u.test(r)) return null;
1205
1218
  const o = e.ownerDocument.createRange();
1206
- return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: ca(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1207
- }, Ru = (e, t) => {
1219
+ return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: da(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1220
+ }, Ou = (e, t) => {
1208
1221
  const n = e.split(`
1209
1222
  `), r = Math.min(t.lines.first, n.length), o = Math.min(t.lines.last, n.length), s = { line: r, column: 0 };
1210
1223
  if (t.word === null) return s;
@@ -1216,21 +1229,21 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1216
1229
  a += 1;
1217
1230
  }
1218
1231
  }
1219
- return a > 0 ? ga(n, r, o, t.word) ?? s : s;
1220
- }, ga = (e, t, n, r) => {
1232
+ return a > 0 ? wa(n, r, o, t.word) ?? s : s;
1233
+ }, wa = (e, t, n, r) => {
1221
1234
  for (let o = n; o >= t; o -= 1) {
1222
1235
  const s = (e[o - 1] ?? "").lastIndexOf(r);
1223
1236
  if (s >= 0) return { line: o, column: s };
1224
1237
  }
1225
1238
  return null;
1226
- }, wa = (e, t) => {
1239
+ }, va = (e, t) => {
1227
1240
  let n = null, r = null;
1228
1241
  for (const o of e.querySelectorAll(Ut)) {
1229
1242
  const s = _e(o);
1230
1243
  s === null || s.first > t || (s.last >= t ? n = o : (r === null || s.last >= r.last) && (r = { element: o, last: s.last }));
1231
1244
  }
1232
1245
  return n !== null ? n : r === null ? null : r.element;
1233
- }, va = (e, t) => {
1246
+ }, ba = (e, t) => {
1234
1247
  const { bottom: n } = e.getBoundingClientRect(), r = et(e), o = _e(e);
1235
1248
  if (o === null) return r;
1236
1249
  const s = Math.min(Math.max(t - o.first, 0) / (o.last - o.first + 1), 1);
@@ -1251,15 +1264,15 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1251
1264
  "switch-source": Object.freeze({ replace: !1, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
1252
1265
  "switch-view": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 }),
1253
1266
  "follow-link": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 })
1254
- }), Cu = (e) => Ht[e], at = () => {
1255
- const e = To();
1267
+ }), Lu = (e) => Ht[e], at = () => {
1268
+ const e = Ro();
1256
1269
  return F(
1257
1270
  (t, n) => {
1258
1271
  e(t, Ht[n]);
1259
1272
  },
1260
1273
  [e]
1261
1274
  );
1262
- }, ba = ({ navigation: e, ...t }) => /* @__PURE__ */ d(Ro, { ...t, ...Ht[e] }), xr = (e) => {
1275
+ }, Ea = ({ navigation: e, ...t }) => /* @__PURE__ */ d(Co, { ...t, ...Ht[e] }), Tr = (e) => {
1263
1276
  const t = e.ownerDocument;
1264
1277
  if (e.focus({ preventScroll: !0 }), t.activeElement === e) return !0;
1265
1278
  if (e.hasAttribute("tabindex")) return !1;
@@ -1296,7 +1309,7 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1296
1309
  const l = t(u);
1297
1310
  l !== r.current && (s(), l !== null && (r.current = l, n.current = window.setTimeout(() => {
1298
1311
  n.current = null, a(l);
1299
- }, Ao)));
1312
+ }, No)));
1300
1313
  },
1301
1314
  [s, t, a]
1302
1315
  ), f = F(
@@ -1314,8 +1327,8 @@ const Ut = `[${lr}]`, sa = "[data-aqmd-content]", aa = 'a[href], button, input,
1314
1327
  }),
1315
1328
  [i, f]
1316
1329
  );
1317
- }, ka = Ft(() => import("./NativeScrollBar-C4vkvdGz.js").then((e) => ({ default: e.NativeScrollBar })));
1318
- class Ea extends nr {
1330
+ }, ka = Ft(() => import("./NativeScrollBar-BiLLVz18.js").then((e) => ({ default: e.NativeScrollBar })));
1331
+ class Sa extends nr {
1319
1332
  state = { failed: !1 };
1320
1333
  static getDerivedStateFromError() {
1321
1334
  return { failed: !0 };
@@ -1327,33 +1340,33 @@ class Ea extends nr {
1327
1340
  return this.state.failed ? null : this.props.children;
1328
1341
  }
1329
1342
  }
1330
- const Sa = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ d(Ea, { children: /* @__PURE__ */ d(Ie, { fallback: null, children: /* @__PURE__ */ d(ka, { scroller: e, withCircle: t }) }) }), Tr = (e) => /* @__PURE__ */ d(Sa, { scroller: e, withCircle: !0 }), Ou = 8, zt = No, Rr = Do[3], Cr = zt + 2 * Rr, Lu = -(zt + Rr), xa = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1331
- let Or = null, wt = null;
1332
- const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1343
+ const xa = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ d(Sa, { children: /* @__PURE__ */ d(Ie, { fallback: null, children: /* @__PURE__ */ d(ka, { scroller: e, withCircle: t }) }) }), Rr = (e) => /* @__PURE__ */ d(xa, { scroller: e, withCircle: !0 }), Mu = 8, zt = Do, Cr = Po[3], Or = zt + 2 * Cr, Au = -(zt + Cr), Ta = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1344
+ let Lr = null, wt = null;
1345
+ const Nt = /* @__PURE__ */ new Set(), Ra = (e) => (Nt.add(e), () => {
1333
1346
  Nt.delete(e);
1334
- }), Ra = () => {
1335
- wt === null && (wt = import("./tapScrollCircle-DYQ8P2ag.js").then((e) => {
1347
+ }), Ca = () => {
1348
+ wt === null && (wt = import("./tapScrollCircle-Cy1KyTg2.js").then((e) => {
1336
1349
  const t = e.TAP_SCROLL_CIRCLE.renderVisual;
1337
1350
  if (t === void 0) throw new TypeError("[markdown-explorer] the bars' tap-scroll circle has no look to share");
1338
- Or = t;
1351
+ Lr = t;
1339
1352
  for (const n of [...Nt]) n();
1340
1353
  }).catch((e) => {
1341
1354
  wt = null, console.error("[markdown-explorer] the look of a table's tap-scroll circle failed to load; the circle still scrolls without it.", e);
1342
1355
  }));
1343
- }, Ca = ({ look: e, state: t }) => e(t), Oa = (e) => {
1356
+ }, Oa = ({ look: e, state: t }) => e(t), La = (e) => {
1344
1357
  const t = re(
1345
- Ta,
1346
- () => Or,
1358
+ Ra,
1359
+ () => Lr,
1347
1360
  () => null
1348
1361
  );
1349
1362
  return ee(() => {
1350
- t === null && Ra();
1351
- }, [t]), t === null ? null : /* @__PURE__ */ d(Ca, { look: t, state: e });
1352
- }, Lr = Object.freeze({
1353
- renderVisual: (e) => /* @__PURE__ */ d(Oa, { ...e }),
1354
- ...xa,
1363
+ t === null && Ca();
1364
+ }, [t]), t === null ? null : /* @__PURE__ */ d(Oa, { look: t, state: e });
1365
+ }, Mr = Object.freeze({
1366
+ renderVisual: (e) => /* @__PURE__ */ d(La, { ...e }),
1367
+ ...Ta,
1355
1368
  size: zt
1356
- }), Mr = () => {
1369
+ }), Ar = () => {
1357
1370
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
1358
1371
  let n = !1;
1359
1372
  const r = (o) => {
@@ -1387,9 +1400,9 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1387
1400
  return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((s, a) => tt(s, t[a]));
1388
1401
  const n = e, r = t, o = Object.keys(n);
1389
1402
  return o.length !== Object.keys(r).length ? !1 : o.every((s) => Object.hasOwn(r, s) && tt(n[s], r[s]));
1390
- }, La = 55e3, kn = Object.freeze({ status: "deferred" }), vt = Object.freeze({ status: "refreshed" }), bt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Ma = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", Aa = ({ client: e, capacity: t }) => {
1403
+ }, Ma = 55e3, yn = Object.freeze({ status: "deferred" }), vt = Object.freeze({ status: "refreshed" }), bt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Aa = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", Na = ({ client: e, capacity: t }) => {
1391
1404
  if (!Number.isInteger(t) || t < 1) throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${String(t)}`);
1392
- const n = /* @__PURE__ */ new Map(), r = Mr(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1405
+ const n = /* @__PURE__ */ new Map(), r = Ar(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1393
1406
  let u = 0;
1394
1407
  const l = o.emit, c = () => (u += 1, u), m = () => {
1395
1408
  if (!(n.size <= t))
@@ -1399,10 +1412,10 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1399
1412
  }
1400
1413
  }, g = (b, S) => {
1401
1414
  n.delete(b), n.set(b, S);
1402
- }, v = (b) => performance.now() - b.validatedAt >= La, y = (b, S, L) => {
1403
- const M = n.get(b), P = ge(M?.snapshot), H = L || M?.refreshPending === !0, K = $e(e.document(b, { refresh: H }).then((k) => ({ status: "loaded", document: k }))), w = { snapshot: { status: "pending", promise: K, previous: P }, validatedAt: performance.now(), opened: S, background: null, refreshPending: !1, seeded: void 0, stamp: c() };
1404
- return g(b, w), m(), K.then((k) => {
1405
- n.get(b) === w && (w.snapshot = k, w.stamp = c(), l());
1415
+ }, v = (b) => performance.now() - b.validatedAt >= Ma, E = (b, S, L) => {
1416
+ const M = n.get(b), P = ge(M?.snapshot), H = L || M?.refreshPending === !0, K = $e(e.document(b, { refresh: H }).then((y) => ({ status: "loaded", document: y }))), w = { snapshot: { status: "pending", promise: K, previous: P }, validatedAt: performance.now(), opened: S, background: null, refreshPending: !1, seeded: void 0, stamp: c() };
1417
+ return g(b, w), m(), K.then((y) => {
1418
+ n.get(b) === w && (w.snapshot = y, w.stamp = c(), l());
1406
1419
  }), w;
1407
1420
  }, T = (b, S, L, M, P, H) => {
1408
1421
  S.background === L && (S.background = null, !(n.get(b) !== S || S.snapshot !== M) && (P.kind === "failure" && M.document.kind !== "failure" || (S.validatedAt = H, S.stamp = c(), tt(M.document, P) || (S.snapshot = { status: "loaded", document: P }), l())));
@@ -1417,7 +1430,7 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1417
1430
  return T(b, S, M, L, K, P), w ? K : null;
1418
1431
  }, R = (b, S) => {
1419
1432
  const { snapshot: L } = S;
1420
- return L.status === "pending" ? !1 : L.status === "loaded" && L.document.kind !== "failure" ? (O(b, S), !1) : (L.status === "loaded" && s.add(L), y(b, !0, !1), !0);
1433
+ return L.status === "pending" ? !1 : L.status === "loaded" && L.document.kind !== "failure" ? (O(b, S), !1) : (L.status === "loaded" && s.add(L), E(b, !0, !1), !0);
1421
1434
  }, q = (b) => {
1422
1435
  i.delete(b);
1423
1436
  const S = f.get(b);
@@ -1495,33 +1508,33 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1495
1508
  answerStampOf: (b) => n.get(b)?.stamp,
1496
1509
  prefetch: (b) => {
1497
1510
  const S = n.get(b);
1498
- S !== void 0 && S.snapshot.status !== "deferred" || (y(b, !1, !1), l());
1511
+ S !== void 0 && S.snapshot.status !== "deferred" || (E(b, !1, !1), l());
1499
1512
  },
1500
1513
  open: (b) => {
1501
1514
  const S = r.resumes(b), L = A(b), M = n.get(b);
1502
1515
  if (M === void 0 || M.snapshot.status === "deferred")
1503
- return y(b, !0, !1), l(), L;
1516
+ return E(b, !0, !1), l(), L;
1504
1517
  if (g(b, M), S) return L;
1505
1518
  const { snapshot: P } = M;
1506
- return P.status === "pending" ? (M.opened = !0, L) : P.document.kind === "failure" ? (M.opened || v(M) ? (s.add(P), y(b, !0, !1), l()) : M.opened = !0, L) : (M.opened = !0, M.background === null && v(M) && O(b, M), L);
1519
+ return P.status === "pending" ? (M.opened = !0, L) : P.document.kind === "failure" ? (M.opened || v(M) ? (s.add(P), E(b, !0, !1), l()) : M.opened = !0, L) : (M.opened = !0, M.background === null && v(M) && O(b, M), L);
1507
1520
  },
1508
1521
  retain: A,
1509
1522
  retry: (b) => {
1510
1523
  const S = n.get(b);
1511
- S === void 0 || S.snapshot.status !== "loaded" || S.snapshot.document.kind !== "failure" || (y(b, !0, !1), l());
1524
+ S === void 0 || S.snapshot.status !== "loaded" || S.snapshot.document.kind !== "failure" || (E(b, !0, !1), l());
1512
1525
  },
1513
1526
  seed: (b, S) => {
1514
1527
  const L = performance.now(), M = $e(
1515
1528
  S.then(
1516
- (k) => k === null ? kn : { status: "loaded", document: k },
1517
- () => kn
1529
+ (y) => y === null ? yn : { status: "loaded", document: y },
1530
+ () => yn
1518
1531
  )
1519
1532
  ), P = n.get(b);
1520
1533
  if (P !== void 0 && P.snapshot.status === "loaded") {
1521
- const k = P.snapshot, C = {};
1534
+ const y = P.snapshot, C = {};
1522
1535
  P.background = C, M.then((N) => {
1523
1536
  if (N.status === "loaded") {
1524
- T(b, P, C, k, N.document, L);
1537
+ T(b, P, C, y, N.document, L);
1525
1538
  return;
1526
1539
  }
1527
1540
  P.background === C && (P.background = null);
@@ -1529,8 +1542,8 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1529
1542
  return;
1530
1543
  }
1531
1544
  const H = P !== void 0 && P.snapshot.status === "pending" ? P.snapshot.previous : null, K = { status: "pending", promise: M, previous: H }, w = { snapshot: K, validatedAt: L, opened: P?.opened === !0, background: null, refreshPending: P?.refreshPending === !0, seeded: K, stamp: c() };
1532
- g(b, w), m(), M.then((k) => {
1533
- n.get(b) === w && (k.status === "deferred" && r.isHeld(b) ? y(b, w.opened, !1) : (w.snapshot = k, w.stamp = c()), l());
1545
+ g(b, w), m(), M.then((y) => {
1546
+ n.get(b) === w && (y.status === "deferred" && r.isHeld(b) ? E(b, w.opened, !1) : (w.snapshot = y, w.stamp = c()), l());
1534
1547
  });
1535
1548
  },
1536
1549
  invalidate: () => {
@@ -1550,19 +1563,19 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1550
1563
  },
1551
1564
  refresh: async (b) => {
1552
1565
  const S = n.get(b);
1553
- if (S !== void 0 && Ma(S.snapshot)) {
1566
+ if (S !== void 0 && Aa(S.snapshot)) {
1554
1567
  S.refreshPending = !0;
1555
1568
  const P = await O(b, S);
1556
1569
  return P === null ? Ve : P.kind === "failure" ? { status: "failed", failure: P.failure } : p(b, S, !0);
1557
1570
  }
1558
- const L = y(b, !0, !0);
1571
+ const L = E(b, !0, !0);
1559
1572
  if (l(), L.snapshot.status !== "pending") return Ve;
1560
1573
  const M = await L.snapshot.promise;
1561
1574
  return n.get(b) !== L || M.status !== "loaded" ? Ve : M.document.kind === "failure" ? je : (await D(b, M), p(b, L, !1));
1562
1575
  },
1563
1576
  clear: () => {
1564
1577
  n.clear();
1565
- for (const b of r.heldKeys()) y(b, !0, !1);
1578
+ for (const b of r.heldKeys()) E(b, !0, !1);
1566
1579
  l();
1567
1580
  },
1568
1581
  subscribe: o.subscribe,
@@ -1577,16 +1590,16 @@ const Nt = /* @__PURE__ */ new Set(), Ta = (e) => (Nt.add(e), () => {
1577
1590
  },
1578
1591
  noteFailureShown: (b) => s.has(b) ? !1 : (s.add(b), !0)
1579
1592
  };
1580
- }, we = ve("fill"), Na = "--aqmx-tap-circle-gutter", Da = Object.freeze({ blockSize: "100%", [Na]: `${String(Cr)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ d(un, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(un, { scrollerProps: { ...e, style: Da }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Tr, children: t }), Pa = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), Ia = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1581
- /* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Pa.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
1593
+ }, we = ve("fill"), Da = "--aqmx-tap-circle-gutter", Pa = Object.freeze({ blockSize: "100%", [Da]: `${String(Or)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ d(un, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(un, { scrollerProps: { ...e, style: Pa }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Rr, children: t }), Ia = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), $a = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1594
+ /* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Ia.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
1582
1595
  /* @__PURE__ */ d("p", { className: "aqmx-sr-only", children: e })
1583
- ] }), jt = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ d(Be, { scrollerProps: Ia, children: /* @__PURE__ */ d(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1584
- function $a({
1596
+ ] }), jt = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ d(Be, { scrollerProps: $a, children: /* @__PURE__ */ d(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1597
+ function _a({
1585
1598
  title: e,
1586
1599
  titleId: t,
1587
1600
  ...n
1588
1601
  }, r) {
1589
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1602
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1590
1603
  xmlns: "http://www.w3.org/2000/svg",
1591
1604
  viewBox: "0 0 20 20",
1592
1605
  fill: "currentColor",
@@ -1594,25 +1607,25 @@ function $a({
1594
1607
  "data-slot": "icon",
1595
1608
  ref: r,
1596
1609
  "aria-labelledby": t
1597
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1610
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1598
1611
  id: t
1599
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1612
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1600
1613
  fillRule: "evenodd",
1601
1614
  d: "M18 5.25a2.25 2.25 0 0 0-2.012-2.238A2.25 2.25 0 0 0 13.75 1h-1.5a2.25 2.25 0 0 0-2.238 2.012c-.875.092-1.6.686-1.884 1.488H11A2.5 2.5 0 0 1 13.5 7v7h2.25A2.25 2.25 0 0 0 18 11.75v-6.5ZM12.25 2.5a.75.75 0 0 0-.75.75v.25h3v-.25a.75.75 0 0 0-.75-.75h-1.5Z",
1602
1615
  clipRule: "evenodd"
1603
- }), /* @__PURE__ */ E.createElement("path", {
1616
+ }), /* @__PURE__ */ k.createElement("path", {
1604
1617
  fillRule: "evenodd",
1605
1618
  d: "M3 6a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H3Zm6.874 4.166a.75.75 0 1 0-1.248-.832l-2.493 3.739-.853-.853a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.154-.114l3-4.5Z",
1606
1619
  clipRule: "evenodd"
1607
1620
  }));
1608
1621
  }
1609
- const _a = /* @__PURE__ */ E.forwardRef($a);
1610
- function Fa({
1622
+ const Fa = /* @__PURE__ */ k.forwardRef(_a);
1623
+ function qa({
1611
1624
  title: e,
1612
1625
  titleId: t,
1613
1626
  ...n
1614
1627
  }, r) {
1615
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1628
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1616
1629
  xmlns: "http://www.w3.org/2000/svg",
1617
1630
  viewBox: "0 0 20 20",
1618
1631
  fill: "currentColor",
@@ -1620,23 +1633,23 @@ function Fa({
1620
1633
  "data-slot": "icon",
1621
1634
  ref: r,
1622
1635
  "aria-labelledby": t
1623
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1636
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1624
1637
  id: t
1625
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1638
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1626
1639
  fillRule: "evenodd",
1627
1640
  d: "M15.988 3.012A2.25 2.25 0 0 1 18 5.25v6.5A2.25 2.25 0 0 1 15.75 14H13.5v-3.379a3 3 0 0 0-.879-2.121l-3.12-3.121a3 3 0 0 0-1.402-.791 2.252 2.252 0 0 1 1.913-1.576A2.25 2.25 0 0 1 12.25 1h1.5a2.25 2.25 0 0 1 2.238 2.012ZM11.5 3.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v.25h-3v-.25Z",
1628
1641
  clipRule: "evenodd"
1629
- }), /* @__PURE__ */ E.createElement("path", {
1642
+ }), /* @__PURE__ */ k.createElement("path", {
1630
1643
  d: "M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"
1631
1644
  }));
1632
1645
  }
1633
- const qa = /* @__PURE__ */ E.forwardRef(Fa);
1634
- function Ba({
1646
+ const Ba = /* @__PURE__ */ k.forwardRef(qa);
1647
+ function Ua({
1635
1648
  title: e,
1636
1649
  titleId: t,
1637
1650
  ...n
1638
1651
  }, r) {
1639
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1652
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1640
1653
  xmlns: "http://www.w3.org/2000/svg",
1641
1654
  viewBox: "0 0 20 20",
1642
1655
  fill: "currentColor",
@@ -1644,46 +1657,46 @@ function Ba({
1644
1657
  "data-slot": "icon",
1645
1658
  ref: r,
1646
1659
  "aria-labelledby": t
1647
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1660
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1648
1661
  id: t
1649
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1662
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1650
1663
  fillRule: "evenodd",
1651
1664
  d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
1652
1665
  clipRule: "evenodd"
1653
1666
  }));
1654
1667
  }
1655
- const Ua = /* @__PURE__ */ E.forwardRef(Ba), Ha = 2e3, En = Object.freeze({ outcome: "idle" }), za = (e) => {
1668
+ const Ha = /* @__PURE__ */ k.forwardRef(Ua), za = 2e3, kn = Object.freeze({ outcome: "idle" }), ja = (e) => {
1656
1669
  const t = navigator.clipboard;
1657
1670
  return t === void 0 ? Promise.reject(new Error("[markdown-explorer] this browser has no asynchronous clipboard")) : t.writeText(e);
1658
- }, ja = ({ text: e }) => {
1659
- const { announcer: t, labels: n } = $(), [r, o] = V(En);
1671
+ }, Va = ({ text: e }) => {
1672
+ const { announcer: t, labels: n } = $(), [r, o] = V(kn);
1660
1673
  ee(() => {
1661
1674
  if (r.outcome === "idle") return;
1662
- const f = setTimeout(() => o(En), Ha);
1675
+ const f = setTimeout(() => o(kn), za);
1663
1676
  return () => clearTimeout(f);
1664
1677
  }, [r]);
1665
1678
  const s = (f) => {
1666
1679
  o({ outcome: f }), t.announce(f === "copied" ? n.copiedText : n.copyTextFailed);
1667
1680
  }, a = () => {
1668
- za(e).then(
1681
+ ja(e).then(
1669
1682
  () => s("copied"),
1670
1683
  () => s("failed")
1671
1684
  );
1672
1685
  }, i = r.outcome === "copied" ? n.copiedText : r.outcome === "failed" ? n.copyTextFailed : n.copyText;
1673
1686
  return (
1674
- /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ d(_a, {}) : r.outcome === "failed" ? /* @__PURE__ */ d(Ua, {}) : /* @__PURE__ */ d(qa, {}) })
1687
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ d(Fa, {}) : r.outcome === "failed" ? /* @__PURE__ */ d(Ha, {}) : /* @__PURE__ */ d(Ba, {}) })
1675
1688
  );
1676
- }, Ar = ve(null), Va = () => {
1677
- const e = se(Ar);
1689
+ }, Nr = ve(null), Za = () => {
1690
+ const e = se(Nr);
1678
1691
  if (e === null) throw new Error("[markdown-explorer] a document's content reads its own part only inside a document pane (DocumentContentChannelContext)");
1679
1692
  return e;
1680
1693
  };
1681
- function Za({
1694
+ function Wa({
1682
1695
  title: e,
1683
1696
  titleId: t,
1684
1697
  ...n
1685
1698
  }, r) {
1686
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1699
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1687
1700
  xmlns: "http://www.w3.org/2000/svg",
1688
1701
  viewBox: "0 0 20 20",
1689
1702
  fill: "currentColor",
@@ -1691,21 +1704,21 @@ function Za({
1691
1704
  "data-slot": "icon",
1692
1705
  ref: r,
1693
1706
  "aria-labelledby": t
1694
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1707
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1695
1708
  id: t
1696
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1709
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1697
1710
  d: "M10.75 2.75a.75.75 0 0 0-1.5 0v8.614L6.295 8.235a.75.75 0 1 0-1.09 1.03l4.25 4.5a.75.75 0 0 0 1.09 0l4.25-4.5a.75.75 0 0 0-1.09-1.03l-2.955 3.129V2.75Z"
1698
- }), /* @__PURE__ */ E.createElement("path", {
1711
+ }), /* @__PURE__ */ k.createElement("path", {
1699
1712
  d: "M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z"
1700
1713
  }));
1701
1714
  }
1702
- const Wa = /* @__PURE__ */ E.forwardRef(Za);
1703
- function Ga({
1715
+ const Ga = /* @__PURE__ */ k.forwardRef(Wa);
1716
+ function Ka({
1704
1717
  title: e,
1705
1718
  titleId: t,
1706
1719
  ...n
1707
1720
  }, r) {
1708
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1721
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1709
1722
  xmlns: "http://www.w3.org/2000/svg",
1710
1723
  viewBox: "0 0 20 20",
1711
1724
  fill: "currentColor",
@@ -1713,34 +1726,34 @@ function Ga({
1713
1726
  "data-slot": "icon",
1714
1727
  ref: r,
1715
1728
  "aria-labelledby": t
1716
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1729
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1717
1730
  id: t
1718
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1731
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1719
1732
  fillRule: "evenodd",
1720
1733
  d: "M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",
1721
1734
  clipRule: "evenodd"
1722
- }), /* @__PURE__ */ E.createElement("path", {
1735
+ }), /* @__PURE__ */ k.createElement("path", {
1723
1736
  fillRule: "evenodd",
1724
1737
  d: "M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",
1725
1738
  clipRule: "evenodd"
1726
1739
  }));
1727
1740
  }
1728
- const Ka = /* @__PURE__ */ E.forwardRef(Ga), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1741
+ const Ya = /* @__PURE__ */ k.forwardRef(Ka), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1729
1742
  const { labels: s } = $();
1730
1743
  return /* @__PURE__ */ B("div", { className: "aqmx-document-toolbar", children: [
1731
1744
  /* @__PURE__ */ d("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: r }),
1732
1745
  /* @__PURE__ */ d("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
1733
1746
  o,
1734
- /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(Ka, {}) }),
1735
- /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(Wa, {}) })
1747
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(Ya, {}) }),
1748
+ /* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(Ga, {}) })
1736
1749
  ] });
1737
1750
  };
1738
- function Ya({
1751
+ function Xa({
1739
1752
  title: e,
1740
1753
  titleId: t,
1741
1754
  ...n
1742
1755
  }, r) {
1743
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1756
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1744
1757
  xmlns: "http://www.w3.org/2000/svg",
1745
1758
  viewBox: "0 0 20 20",
1746
1759
  fill: "currentColor",
@@ -1748,55 +1761,55 @@ function Ya({
1748
1761
  "data-slot": "icon",
1749
1762
  ref: r,
1750
1763
  "aria-labelledby": t
1751
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1764
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1752
1765
  id: t
1753
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1766
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1754
1767
  fillRule: "evenodd",
1755
1768
  d: "M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",
1756
1769
  clipRule: "evenodd"
1757
1770
  }));
1758
1771
  }
1759
- const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aqmx-document-stage" }), Qa = ({ document: e }) => {
1772
+ const Ja = /* @__PURE__ */ k.forwardRef(Xa), Qa = Object.freeze({ className: "aqmx-document-stage" }), ei = ({ document: e }) => {
1760
1773
  const { labels: t } = $();
1761
1774
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-file-view", children: [
1762
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Xa, {}) }),
1763
- /* @__PURE__ */ d(Be, { scrollerProps: Ja, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1775
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Ja, {}) }),
1776
+ /* @__PURE__ */ d(Be, { scrollerProps: Qa, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1764
1777
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
1765
1778
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
1766
1779
  ] }) })
1767
1780
  ] });
1768
- }, Sn = ["keydown", "pointerdown", "wheel", "touchstart"], Ke = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ei = (e) => {
1781
+ }, Sn = ["keydown", "pointerdown", "wheel", "touchstart"], Ke = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ti = (e) => {
1769
1782
  const t = nt.get(e);
1770
1783
  if (t !== void 0) {
1771
1784
  t.count += 1;
1772
1785
  return;
1773
1786
  }
1774
1787
  nt.set(e, { count: 1, original: e.style.overflowAnchor }), e.style.overflowAnchor = "none";
1775
- }, ti = (e) => {
1788
+ }, ni = (e) => {
1776
1789
  const t = nt.get(e);
1777
1790
  t !== void 0 && (t.count -= 1, !(t.count > 0) && (nt.delete(e), e.style.overflowAnchor = t.original));
1778
- }, ni = (e, t, n) => {
1791
+ }, ri = (e, t, n) => {
1779
1792
  for (let r = t; r !== null && r !== n; r = r.parentElement) {
1780
1793
  e.observe(r);
1781
1794
  for (let o = r.previousElementSibling; o !== null; o = o.previousElementSibling) e.observe(o);
1782
1795
  }
1783
- }, ri = (e) => {
1796
+ }, oi = (e) => {
1784
1797
  const t = /* @__PURE__ */ new Map();
1785
1798
  for (let n = e.parentElement; n !== null; n = n.parentElement) t.set(n, { top: n.scrollTop, left: n.scrollLeft });
1786
1799
  return t;
1787
- }, oi = (e) => {
1800
+ }, si = (e) => {
1788
1801
  Ke.get(e)?.();
1789
- }, si = (e, t, n) => {
1790
- oi(e);
1802
+ }, ai = (e, t, n) => {
1803
+ si(e);
1791
1804
  let r = /* @__PURE__ */ new Map();
1792
1805
  const o = /* @__PURE__ */ new Set(), s = () => {
1793
1806
  const c = t();
1794
- return c === null ? !1 : (r = ri(c), !0);
1807
+ return c === null ? !1 : (r = oi(c), !0);
1795
1808
  };
1796
1809
  if (!s() || typeof ResizeObserver > "u") return;
1797
1810
  const a = () => {
1798
1811
  for (const c of r.keys())
1799
- !(c instanceof HTMLElement) || o.has(c) || (o.add(c), ei(c));
1812
+ !(c instanceof HTMLElement) || o.has(c) || (o.add(c), ti(c));
1800
1813
  };
1801
1814
  a();
1802
1815
  const { ownerDocument: i } = e, f = new ResizeObserver(() => {
@@ -1806,7 +1819,7 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1806
1819
  }
1807
1820
  a();
1808
1821
  });
1809
- for (const { element: c, boundary: m } of n) ni(f, c, m);
1822
+ for (const { element: c, boundary: m } of n) ri(f, c, m);
1810
1823
  const u = (c) => {
1811
1824
  const m = c.target === i ? i.scrollingElement : c.target;
1812
1825
  if (!(m instanceof Element)) return;
@@ -1816,35 +1829,35 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1816
1829
  f.disconnect();
1817
1830
  for (const c of Sn) i.removeEventListener(c, l, !0);
1818
1831
  i.removeEventListener("scroll", u, !0);
1819
- for (const c of o) ti(c);
1832
+ for (const c of o) ni(c);
1820
1833
  o.clear(), Ke.get(e) === l && Ke.delete(e);
1821
1834
  };
1822
1835
  for (const c of Sn) i.addEventListener(c, l, { capture: !0, passive: !0 });
1823
1836
  i.addEventListener("scroll", u, { capture: !0, passive: !0 }), Ke.set(e, l);
1824
- }, it = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", ai = (e) => {
1837
+ }, it = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", ii = (e) => {
1825
1838
  const t = e.indexOf("#");
1826
1839
  return t === -1 ? "" : e.slice(t);
1827
- }, ii = /(%[0-9A-Fa-f]{2})/u, Vt = (e) => {
1840
+ }, li = /(%[0-9A-Fa-f]{2})/u, Vt = (e) => {
1828
1841
  if (!e.startsWith("#") || e.length === 1) return null;
1829
- const t = new TextEncoder(), n = e.slice(1).split(ii).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1842
+ const t = new TextEncoder(), n = e.slice(1).split(li).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1830
1843
  return new TextDecoder("utf-8", { ignoreBOM: !0 }).decode(Uint8Array.from(n));
1831
- }, Nr = (e) => `#${encodeURIComponent(e)}`, li = (e) => {
1844
+ }, Dr = (e) => `#${encodeURIComponent(e)}`, ci = (e) => {
1832
1845
  if (e === "#") return !0;
1833
1846
  const t = Vt(e);
1834
1847
  return t !== null && t.replace(/[A-Z]/gu, (n) => n.toLowerCase()) === "top";
1835
- }, Dr = (e, t) => {
1848
+ }, Pr = (e, t) => {
1836
1849
  if (t === "") return null;
1837
1850
  for (const n of e.querySelectorAll("[id]"))
1838
1851
  if (n.id === t) return n;
1839
1852
  return null;
1840
- }, ci = "http://www.w3.org/1999/xhtml", xn = (e, t) => {
1853
+ }, di = "http://www.w3.org/1999/xhtml", xn = (e, t) => {
1841
1854
  if (t === "") return null;
1842
- const n = Dr(e, t);
1855
+ const n = Pr(e, t);
1843
1856
  if (n !== null) return n;
1844
1857
  for (const r of e.querySelectorAll("a[name]"))
1845
- if (r.localName === "a" && r.namespaceURI === ci && r.getAttribute("name") === t) return r;
1858
+ if (r.localName === "a" && r.namespaceURI === di && r.getAttribute("name") === t) return r;
1846
1859
  return null;
1847
- }, Pr = (e, t) => {
1860
+ }, Ir = (e, t) => {
1848
1861
  if (e === null || !t.startsWith("#")) return null;
1849
1862
  const n = xn(e, t.slice(1));
1850
1863
  if (n !== null) return n;
@@ -1858,25 +1871,25 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1858
1871
  }
1859
1872
  const { overflowY: r } = getComputedStyle(e);
1860
1873
  return r === "auto" || r === "scroll";
1861
- }, di = (e) => {
1874
+ }, ui = (e) => {
1862
1875
  const { body: t, documentElement: n } = e, r = getComputedStyle(n), o = r.overflowX === "visible" && r.overflowY === "visible" && t !== null ? getComputedStyle(t).overflowY : r.overflowY;
1863
1876
  return o !== "hidden" && o !== "clip";
1864
- }, ui = (e, t) => {
1877
+ }, fi = (e, t) => {
1865
1878
  const n = t.closest(it), r = n !== null && e.contains(n) ? n : e;
1866
1879
  if (r.scrollHeight > r.clientHeight && Tn(r)) return r;
1867
1880
  const o = e.getBoundingClientRect().height, { documentElement: s, scrollingElement: a } = e.ownerDocument;
1868
1881
  for (let i = e.parentElement; i !== null && i !== s; i = i.parentElement)
1869
1882
  if (Tn(i) && i.scrollHeight > i.clientHeight && i.clientHeight < o) return i;
1870
- return a instanceof Element && di(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1871
- }, fi = Object.freeze({
1872
- scrollerOf: ui,
1883
+ return a instanceof Element && ui(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1884
+ }, mi = Object.freeze({
1885
+ scrollerOf: fi,
1873
1886
  reveal: (e) => {
1874
1887
  e.scrollIntoView(Dt);
1875
1888
  },
1876
1889
  keepAtStart: (e, t) => {
1877
- si(e, () => t.isConnected ? (hi(e, t), t) : null, [{ element: t, boundary: e }]);
1890
+ ai(e, () => t.isConnected ? (pi(e, t), t) : null, [{ element: t, boundary: e }]);
1878
1891
  }
1879
- }), Dt = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), mi = (e, t) => {
1892
+ }), Dt = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), hi = (e, t) => {
1880
1893
  for (let n = t; n !== null && n !== e; n = n.parentElement) {
1881
1894
  const r = n.parentElement;
1882
1895
  if (r instanceof HTMLDetailsElement && n !== r.querySelector(":scope > summary") && (r.open = !0), n.getAttribute("hidden")?.toLowerCase() === "until-found") {
@@ -1884,7 +1897,7 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1884
1897
  n.removeAttribute("hidden");
1885
1898
  }
1886
1899
  }
1887
- }, hi = (e, t) => {
1900
+ }, pi = (e, t) => {
1888
1901
  if (t.getClientRects().length === 0) return;
1889
1902
  const n = e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, { scrollMarginTop: r, scrollMarginBottom: o } = getComputedStyle(t), s = Number.parseFloat(r), a = t.getBoundingClientRect(), i = a.height + s + Number.parseFloat(o) > e.clientHeight;
1890
1903
  if (!i && Math.abs(a.top - s - n) < 1) {
@@ -1892,20 +1905,20 @@ const Xa = /* @__PURE__ */ E.forwardRef(Ya), Ja = Object.freeze({ className: "aq
1892
1905
  return;
1893
1906
  }
1894
1907
  e.scrollBy({ top: i ? a.top - n - e.clientHeight : a.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(Dt);
1895
- }, pi = (e, t) => {
1908
+ }, gi = (e, t) => {
1896
1909
  const n = t.scrollerOf(e, e.querySelector(it) ?? e);
1897
1910
  n.getClientRects().length !== 0 && (n.scrollTo({ top: 0, left: 0, behavior: "instant" }), t.reveal(n));
1898
1911
  }, Rn = (e, t, n) => {
1899
1912
  if (e === null) return null;
1900
- const r = Pr(e, t);
1901
- return r === null ? (li(t) && pi(e, n), null) : (mi(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
1913
+ const r = Ir(e, t);
1914
+ return r === null ? (ci(t) && gi(e, n), null) : (hi(e, r), n.keepAtStart(n.scrollerOf(e, r), r), r);
1902
1915
  };
1903
- function gi({
1916
+ function wi({
1904
1917
  title: e,
1905
1918
  titleId: t,
1906
1919
  ...n
1907
1920
  }, r) {
1908
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1921
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1909
1922
  xmlns: "http://www.w3.org/2000/svg",
1910
1923
  viewBox: "0 0 20 20",
1911
1924
  fill: "currentColor",
@@ -1913,19 +1926,19 @@ function gi({
1913
1926
  "data-slot": "icon",
1914
1927
  ref: r,
1915
1928
  "aria-labelledby": t
1916
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1929
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1917
1930
  id: t
1918
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1931
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1919
1932
  d: "M3.28 2.22a.75.75 0 0 0-1.06 1.06L5.44 6.5H2.75a.75.75 0 0 0 0 1.5h4.5A.75.75 0 0 0 8 7.25v-4.5a.75.75 0 0 0-1.5 0v2.69L3.28 2.22ZM13.5 2.75a.75.75 0 0 0-1.5 0v4.5c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-2.69l3.22-3.22a.75.75 0 0 0-1.06-1.06L13.5 5.44V2.75ZM3.28 17.78l3.22-3.22v2.69a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.69l-3.22 3.22a.75.75 0 1 0 1.06 1.06ZM13.5 14.56l3.22 3.22a.75.75 0 1 0 1.06-1.06l-3.22-3.22h2.69a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-2.69Z"
1920
1933
  }));
1921
1934
  }
1922
- const wi = /* @__PURE__ */ E.forwardRef(gi);
1923
- function vi({
1935
+ const vi = /* @__PURE__ */ k.forwardRef(wi);
1936
+ function bi({
1924
1937
  title: e,
1925
1938
  titleId: t,
1926
1939
  ...n
1927
1940
  }, r) {
1928
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1941
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1929
1942
  xmlns: "http://www.w3.org/2000/svg",
1930
1943
  viewBox: "0 0 20 20",
1931
1944
  fill: "currentColor",
@@ -1933,23 +1946,23 @@ function vi({
1933
1946
  "data-slot": "icon",
1934
1947
  ref: r,
1935
1948
  "aria-labelledby": t
1936
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1949
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1937
1950
  id: t
1938
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1951
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1939
1952
  d: "M6.75 8.25a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-4.5Z"
1940
- }), /* @__PURE__ */ E.createElement("path", {
1953
+ }), /* @__PURE__ */ k.createElement("path", {
1941
1954
  fillRule: "evenodd",
1942
1955
  d: "M9 2a7 7 0 1 0 4.391 12.452l3.329 3.328a.75.75 0 1 0 1.06-1.06l-3.328-3.329A7 7 0 0 0 9 2ZM3.5 9a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0Z",
1943
1956
  clipRule: "evenodd"
1944
1957
  }));
1945
1958
  }
1946
- const bi = /* @__PURE__ */ E.forwardRef(vi);
1959
+ const Ei = /* @__PURE__ */ k.forwardRef(bi);
1947
1960
  function yi({
1948
1961
  title: e,
1949
1962
  titleId: t,
1950
1963
  ...n
1951
1964
  }, r) {
1952
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1965
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1953
1966
  xmlns: "http://www.w3.org/2000/svg",
1954
1967
  viewBox: "0 0 20 20",
1955
1968
  fill: "currentColor",
@@ -1957,23 +1970,23 @@ function yi({
1957
1970
  "data-slot": "icon",
1958
1971
  ref: r,
1959
1972
  "aria-labelledby": t
1960
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1973
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1961
1974
  id: t
1962
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1975
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1963
1976
  d: "M9 6a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0v-1.5h-1.5a.75.75 0 0 1 0-1.5h1.5v-1.5A.75.75 0 0 1 9 6Z"
1964
- }), /* @__PURE__ */ E.createElement("path", {
1977
+ }), /* @__PURE__ */ k.createElement("path", {
1965
1978
  fillRule: "evenodd",
1966
1979
  d: "M2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Zm7-5.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z",
1967
1980
  clipRule: "evenodd"
1968
1981
  }));
1969
1982
  }
1970
- const ki = /* @__PURE__ */ E.forwardRef(yi);
1971
- function Ei({
1983
+ const ki = /* @__PURE__ */ k.forwardRef(yi);
1984
+ function Si({
1972
1985
  title: e,
1973
1986
  titleId: t,
1974
1987
  ...n
1975
1988
  }, r) {
1976
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
1989
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
1977
1990
  xmlns: "http://www.w3.org/2000/svg",
1978
1991
  viewBox: "0 0 20 20",
1979
1992
  fill: "currentColor",
@@ -1981,15 +1994,15 @@ function Ei({
1981
1994
  "data-slot": "icon",
1982
1995
  ref: r,
1983
1996
  "aria-labelledby": t
1984
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
1997
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
1985
1998
  id: t
1986
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
1999
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
1987
2000
  fillRule: "evenodd",
1988
2001
  d: "M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",
1989
2002
  clipRule: "evenodd"
1990
2003
  }));
1991
2004
  }
1992
- const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = Object.freeze({ [Pt]: "allow" }), xi = `[${Pt}="${It[Pt]}"]`, Ti = () => {
2005
+ const xi = /* @__PURE__ */ k.forwardRef(Si), Pt = "data-aqmx-key-repeat", It = Object.freeze({ [Pt]: "allow" }), Ti = `[${Pt}="${It[Pt]}"]`, Ri = () => {
1993
2006
  let e = null;
1994
2007
  return {
1995
2008
  onKeyDownCapture: (t) => {
@@ -1998,7 +2011,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
1998
2011
  e = t.target instanceof Element ? t.target : null;
1999
2012
  return;
2000
2013
  }
2001
- e !== null && t.target === e && e.closest(xi) !== null || (t.preventDefault(), t.stopPropagation());
2014
+ e !== null && t.target === e && e.closest(Ti) !== null || (t.preventDefault(), t.stopPropagation());
2002
2015
  }
2003
2016
  },
2004
2017
  onKeyUpCapture: (t) => {
@@ -2008,7 +2021,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2008
2021
  t.target === e && (e = null);
2009
2022
  }
2010
2023
  };
2011
- }, Ye = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), Cn = Object.freeze({ mode: "fit" }), Ri = 1, Ir = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), On = `[data-testid="${Ir["data-testid"]}"]`, Ci = ve(null), Oi = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= Ri ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Ln = (e, t, n) => {
2024
+ }, Ye = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), Cn = Object.freeze({ mode: "fit" }), Ci = 1, $r = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), On = `[data-testid="${$r["data-testid"]}"]`, Oi = ve(null), Li = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= Ci ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Ln = (e, t, n) => {
2012
2025
  if (e.mode === "level") {
2013
2026
  const o = e.index + n;
2014
2027
  return o >= 0 && o < Ye.length ? o : null;
@@ -2024,19 +2037,19 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2024
2037
  if (t === null) return null;
2025
2038
  const r = Ln(e, t.scale, n);
2026
2039
  return r === null ? null : { mode: "level", index: r, base: t.base };
2027
- }, Li = (e, t) => {
2040
+ }, Mi = (e, t) => {
2028
2041
  if (e <= 0 || t <= 0) return 0;
2029
2042
  const n = Math.trunc(Math.log(t / e) / Math.log(Me));
2030
2043
  return n === 0 ? 0 : n;
2031
2044
  }, An = (e) => {
2032
2045
  const t = e[0], n = e[1];
2033
2046
  return e.length !== 2 || t === void 0 || n === void 0 ? null : { distance: Math.hypot(n.clientX - t.clientX, n.clientY - t.clientY), middle: { x: (t.clientX + n.clientX) / 2, y: (t.clientY + n.clientY) / 2 } };
2034
- }, Mi = (e) => {
2047
+ }, Ai = (e) => {
2035
2048
  const t = Ye[e];
2036
2049
  if (t === void 0) throw new RangeError(`[markdown-explorer] no image zoom step ${String(e)}`);
2037
2050
  return t;
2038
- }, Nn = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, Ai = ({ document: e }) => {
2039
- const { labels: t } = $(), n = se(Ci), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? Cn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), c = F((D) => {
2051
+ }, Nn = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, Ni = ({ document: e }) => {
2052
+ const { labels: t } = $(), n = se(Oi), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? Cn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), c = F((D) => {
2040
2053
  const { naturalWidth: h, naturalHeight: p } = D;
2041
2054
  i((x) => Nn(x, h, p));
2042
2055
  }, []), m = F(
@@ -2059,9 +2072,9 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2059
2072
  const p = new ResizeObserver(h);
2060
2073
  return p.observe(D), () => p.disconnect();
2061
2074
  }, [a, o.mode]);
2062
- const g = a === null || f === null ? null : Oi(a, f), v = Mn(o, g, -1), y = Mn(o, g, 1), T = o.mode === "level" ? Mi(o.index) : null, O = U({ zoomIn: y, zoomOut: v });
2075
+ const g = a === null || f === null ? null : Li(a, f), v = Mn(o, g, -1), E = Mn(o, g, 1), T = o.mode === "level" ? Ai(o.index) : null, O = U({ zoomIn: E, zoomOut: v });
2063
2076
  Y(() => {
2064
- O.current = { zoomIn: y, zoomOut: v };
2077
+ O.current = { zoomIn: E, zoomOut: v };
2065
2078
  });
2066
2079
  const R = U(null);
2067
2080
  Y(() => {
@@ -2078,7 +2091,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2078
2091
  const _ = An(I.touches);
2079
2092
  if (h === null || _ === null) return;
2080
2093
  I.preventDefault();
2081
- const b = Li(h.distance, _.distance);
2094
+ const b = Mi(h.distance, _.distance);
2082
2095
  if (b === h.steps) return;
2083
2096
  const S = b > h.steps ? 1 : -1, L = S === 1 ? O.current.zoomIn : O.current.zoomOut;
2084
2097
  if (L === null) return;
@@ -2094,7 +2107,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2094
2107
  }, []);
2095
2108
  const q = o.mode === "level" && T !== null ? { width: `${o.base.width * T}px`, height: `${o.base.height * T}px` } : void 0;
2096
2109
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-image-view", children: [
2097
- /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(Si, {}), children: [
2110
+ /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ d(xi, {}), children: [
2098
2111
  /* @__PURE__ */ d(
2099
2112
  "button",
2100
2113
  {
@@ -2107,7 +2120,7 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2107
2120
  v !== null && s(v);
2108
2121
  },
2109
2122
  ...It,
2110
- children: /* @__PURE__ */ d(bi, {})
2123
+ children: /* @__PURE__ */ d(Ei, {})
2111
2124
  }
2112
2125
  ),
2113
2126
  /* @__PURE__ */ d("output", { className: "aqmx-document-level", "aria-live": "polite", "data-testid": "markdown-explorer-image-level", children: T === null ? t.imageFitLevel : t.imageZoomLevel(Math.round(T * 100)) }),
@@ -2118,37 +2131,37 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2118
2131
  className: "aqmx-icon-button",
2119
2132
  "aria-label": t.imageZoomIn,
2120
2133
  title: t.imageZoomIn,
2121
- "aria-disabled": y === null,
2134
+ "aria-disabled": E === null,
2122
2135
  onClick: () => {
2123
- y !== null && s(y);
2136
+ E !== null && s(E);
2124
2137
  },
2125
2138
  ...It,
2126
2139
  children: /* @__PURE__ */ d(ki, {})
2127
2140
  }
2128
2141
  ),
2129
- /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(Cn), children: /* @__PURE__ */ d(wi, {}) })
2142
+ /* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(Cn), children: /* @__PURE__ */ d(vi, {}) })
2130
2143
  ] }),
2131
- /* @__PURE__ */ d(Be, { scrollerProps: Ir, children: /* @__PURE__ */ d("img", { ref: m, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => c(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2144
+ /* @__PURE__ */ d(Be, { scrollerProps: $r, children: /* @__PURE__ */ d("img", { ref: m, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => c(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2132
2145
  ] });
2133
- }, Ni = async (e, t, n) => {
2146
+ }, Di = async (e, t, n) => {
2134
2147
  const r = await e.text(t, n);
2135
2148
  if (!("kind" in r)) throw n.reason;
2136
2149
  return r.kind === "text" ? { kind: "text", text: r.text, truncated: r.truncated } : { kind: "failure", retryable: r.failure.reason === "failed" };
2137
- }, $r = ve(null), lt = ve(void 0), _r = ve(null), ct = () => {
2138
- const e = se($r);
2150
+ }, _r = ve(null), lt = ve(void 0), Fr = ve(null), ct = () => {
2151
+ const e = se(_r);
2139
2152
  if (e === null) throw new Error("[markdown-explorer] document links must be rendered inside a document pane");
2140
2153
  return e;
2141
- }, Di = () => {
2142
- const e = se(_r);
2154
+ }, Pi = () => {
2155
+ const e = se(Fr);
2143
2156
  if (e === null) throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");
2144
2157
  return e;
2145
- }, dt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Pi = ({ children: e }) => {
2158
+ }, dt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Ii = ({ children: e }) => {
2146
2159
  const { config: t } = $(), n = ct(), r = Bt(), o = r.kind === "location" ? r.location.source : void 0, s = ot(dt(t, n.navigation, o, n.currentPath));
2147
- return /* @__PURE__ */ d(lt, { value: o, children: /* @__PURE__ */ d(_r, { value: s, children: e }) });
2148
- }, Ii = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', $i = (e) => {
2149
- const t = e instanceof Element ? e.closest(Ii) : null;
2160
+ return /* @__PURE__ */ d(lt, { value: o, children: /* @__PURE__ */ d(Fr, { value: s, children: e }) });
2161
+ }, $i = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', _i = (e) => {
2162
+ const t = e instanceof Element ? e.closest($i) : null;
2150
2163
  return t === null ? null : t.getAttribute("data-doc-path");
2151
- }, ut = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, _i = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2164
+ }, ut = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Fi = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2152
2165
  const u = ot(e);
2153
2166
  return /* @__PURE__ */ d("a", { ...s, href: u, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (c) => {
2154
2167
  if (ut(c)) {
@@ -2159,10 +2172,10 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2159
2172
  a(t, n);
2160
2173
  }
2161
2174
  }, children: f });
2162
- }, Fi = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2163
- const { config: a } = $(), i = ct(), f = se(lt), u = ai(e), { navigation: l } = i, c = `${dt(a, l, f, t)}${u}`, m = n === !1 ? "false" : void 0;
2164
- return l.kind === "page" ? /* @__PURE__ */ d(ba, { ...o, to: c, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, children: s }) : /* @__PURE__ */ d(_i, { to: c, docPath: t, fragment: u, exists: m, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2165
- }, qi = ({ className: e, attributes: t, children: n }) => {
2175
+ }, qi = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2176
+ const { config: a } = $(), i = ct(), f = se(lt), u = ii(e), { navigation: l } = i, c = `${dt(a, l, f, t)}${u}`, m = n === !1 ? "false" : void 0;
2177
+ return l.kind === "page" ? /* @__PURE__ */ d(Ea, { ...o, to: c, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": m, children: s }) : /* @__PURE__ */ d(Fi, { to: c, docPath: t, fragment: u, exists: m, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2178
+ }, Bi = ({ className: e, attributes: t, children: n }) => {
2166
2179
  const { labels: r } = $();
2167
2180
  return (
2168
2181
  /* @__PURE__ */ B("a", { ...t, className: e === void 0 ? "aqmx-document-inert-link" : `${e} aqmx-document-inert-link`, title: r.inertLink, "data-link-kind": "doc", "data-doc-exists": "false", children: [
@@ -2174,39 +2187,39 @@ const Si = /* @__PURE__ */ E.forwardRef(Ei), Pt = "data-aqmx-key-repeat", It = O
2174
2187
  ] })
2175
2188
  ] })
2176
2189
  );
2177
- }, Bi = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2190
+ }, Ui = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2178
2191
  const { config: s } = $(), a = se(lt), i = ot(`${dt(s, r.navigation, a, r.currentPath)}${e}`);
2179
2192
  return /* @__PURE__ */ d("a", { ...n, href: i, className: t, onClick: (u) => {
2180
2193
  ut(u) && (u.preventDefault(), r.scrollWithin(e));
2181
2194
  }, children: o });
2182
- }, Ui = ({ href: e, className: t, attributes: n, children: r }) => {
2195
+ }, Hi = ({ href: e, className: t, attributes: n, children: r }) => {
2183
2196
  const o = ct();
2184
2197
  return o.navigation.kind === "page" ? /* @__PURE__ */ d("a", { ...n, href: e, className: t, onClick: (a) => {
2185
2198
  if (!ut(a)) return;
2186
2199
  const i = a.currentTarget;
2187
2200
  e === "#" ? o.followEmptyFragment(a.nativeEvent) : i.href === i.ownerDocument.URL && o.followSameUrlJump(e, a.nativeEvent);
2188
- }, children: r }) : /* @__PURE__ */ d(Bi, { href: e, className: t, attributes: n, scope: o, children: r });
2189
- }, Hi = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !Ho(n) ? /* @__PURE__ */ d(qi, { className: o, attributes: s, children: a }) : /* @__PURE__ */ d(Fi, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ d(Ui, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ d("a", { ...s, href: e, className: o, children: a }), zi = () => {
2201
+ }, children: r }) : /* @__PURE__ */ d(Ui, { href: e, className: t, attributes: n, scope: o, children: r });
2202
+ }, zi = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !zo(n) ? /* @__PURE__ */ d(Bi, { className: o, attributes: s, children: a }) : /* @__PURE__ */ d(qi, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ d(Hi, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ d("a", { ...s, href: e, className: o, children: a }), ji = () => {
2190
2203
  const { config: e } = $(), t = ct(), n = se(lt), r = at();
2191
2204
  return F(
2192
2205
  (o, s) => {
2193
2206
  if (!ut(s)) return !0;
2194
2207
  s.preventDefault();
2195
- const a = Nr(o.id), { navigation: i } = t;
2208
+ const a = Dr(o.id), { navigation: i } = t;
2196
2209
  return i.kind === "panel" || Vt(s.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(a), !0) : (r(`${dt(e, i, n, t.currentPath)}${a}`, "follow-link"), !0);
2197
2210
  },
2198
2211
  [e, t, n, r]
2199
2212
  );
2200
- }, ji = () => {
2201
- const e = Di();
2202
- return F((t) => `${e}${Nr(t.id)}`, [e]);
2213
+ }, Vi = () => {
2214
+ const e = Pi();
2215
+ return F((t) => `${e}${Dr(t.id)}`, [e]);
2203
2216
  };
2204
- function Vi({
2217
+ function Zi({
2205
2218
  title: e,
2206
2219
  titleId: t,
2207
2220
  ...n
2208
2221
  }, r) {
2209
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2222
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2210
2223
  xmlns: "http://www.w3.org/2000/svg",
2211
2224
  viewBox: "0 0 20 20",
2212
2225
  fill: "currentColor",
@@ -2214,19 +2227,19 @@ function Vi({
2214
2227
  "data-slot": "icon",
2215
2228
  ref: r,
2216
2229
  "aria-labelledby": t
2217
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2230
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2218
2231
  id: t
2219
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2232
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2220
2233
  d: "M3 3.5A1.5 1.5 0 0 1 4.5 2h6.879a1.5 1.5 0 0 1 1.06.44l4.122 4.12A1.5 1.5 0 0 1 17 7.622V16.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 3 16.5v-13Z"
2221
2234
  }));
2222
2235
  }
2223
- const Zi = /* @__PURE__ */ E.forwardRef(Vi);
2224
- function Wi({
2236
+ const Wi = /* @__PURE__ */ k.forwardRef(Zi);
2237
+ function Gi({
2225
2238
  title: e,
2226
2239
  titleId: t,
2227
2240
  ...n
2228
2241
  }, r) {
2229
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2242
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2230
2243
  xmlns: "http://www.w3.org/2000/svg",
2231
2244
  viewBox: "0 0 20 20",
2232
2245
  fill: "currentColor",
@@ -2234,21 +2247,21 @@ function Wi({
2234
2247
  "data-slot": "icon",
2235
2248
  ref: r,
2236
2249
  "aria-labelledby": t
2237
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2250
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2238
2251
  id: t
2239
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2252
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2240
2253
  fillRule: "evenodd",
2241
2254
  d: "M1 4.75C1 3.784 1.784 3 2.75 3h14.5c.966 0 1.75.784 1.75 1.75v10.515a1.75 1.75 0 0 1-1.75 1.75h-1.5c-.078 0-.155-.005-.23-.015H4.48c-.075.01-.152.015-.23.015h-1.5A1.75 1.75 0 0 1 1 15.265V4.75Zm16.5 7.385V11.01a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25Zm0 2.005a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .108.069.2.165.235h1.585a.25.25 0 0 0 .25-.25v-1.11Zm-15 1.11v-1.11a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.164.235H2.75a.25.25 0 0 1-.25-.25Zm2-4.24v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V11.01a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25Zm13-2.005V7.88a.25.25 0 0 0-.25-.25h-1.5a.25.25 0 0 0-.25.25v1.125c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25ZM4.25 7.63a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V7.88a.25.25 0 0 1 .25-.25h1.5Zm0-3.13a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V4.75a.25.25 0 0 1 .25-.25h1.5Zm11.5 1.625a.25.25 0 0 1-.25-.25V4.75a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.125a.25.25 0 0 1-.25.25h-1.5Zm-9 3.125a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",
2242
2255
  clipRule: "evenodd"
2243
2256
  }));
2244
2257
  }
2245
- const Gi = /* @__PURE__ */ E.forwardRef(Wi);
2246
- function Ki({
2258
+ const Ki = /* @__PURE__ */ k.forwardRef(Gi);
2259
+ function Yi({
2247
2260
  title: e,
2248
2261
  titleId: t,
2249
2262
  ...n
2250
2263
  }, r) {
2251
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2264
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2252
2265
  xmlns: "http://www.w3.org/2000/svg",
2253
2266
  viewBox: "0 0 20 20",
2254
2267
  fill: "currentColor",
@@ -2256,17 +2269,17 @@ function Ki({
2256
2269
  "data-slot": "icon",
2257
2270
  ref: r,
2258
2271
  "aria-labelledby": t
2259
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2272
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2260
2273
  id: t
2261
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2274
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2262
2275
  fillRule: "evenodd",
2263
2276
  d: "M17.721 1.599a.75.75 0 0 1 .279.583v11.29a2.25 2.25 0 0 1-1.774 2.2l-2.041.44a2.216 2.216 0 0 1-.938-4.332l2.662-.577a.75.75 0 0 0 .591-.733V6.112l-8 1.73v7.684a2.25 2.25 0 0 1-1.774 2.2l-2.042.44a2.216 2.216 0 1 1-.935-4.331l2.659-.573A.75.75 0 0 0 7 12.529V4.236a.75.75 0 0 1 .591-.733l9.5-2.054a.75.75 0 0 1 .63.15Z",
2264
2277
  clipRule: "evenodd"
2265
2278
  }));
2266
2279
  }
2267
- const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aqmx-document-stage" }), Ji = () => () => {
2268
- }, Qi = () => navigator.pdfViewerEnabled !== !1, el = () => null, tl = ({ document: e }) => {
2269
- const { labels: t } = $(), n = re(Ji, Qi, el);
2280
+ const Xi = /* @__PURE__ */ k.forwardRef(Yi), Ji = Object.freeze({ className: "aqmx-document-stage" }), Qi = () => () => {
2281
+ }, el = () => navigator.pdfViewerEnabled !== !1, tl = () => null, nl = ({ document: e }) => {
2282
+ const { labels: t } = $(), n = re(Qi, el, tl);
2270
2283
  return n === null ? null : n ? /* @__PURE__ */ d("iframe", { className: "aqmx-document-frame", src: e.url, title: e.name, "data-testid": "markdown-explorer-media-player" }) : /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-pdf-not-shown", children: [
2271
2284
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.pdfNotShown }),
2272
2285
  /* @__PURE__ */ B("div", { className: "aqmx-callout-actions", children: [
@@ -2274,20 +2287,20 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2274
2287
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-pdf-not-shown-download", children: t.download })
2275
2288
  ] })
2276
2289
  ] });
2277
- }, nl = (e) => {
2290
+ }, rl = (e) => {
2278
2291
  switch (e) {
2279
2292
  case "video":
2280
- return /* @__PURE__ */ d(Gi, {});
2293
+ return /* @__PURE__ */ d(Ki, {});
2281
2294
  case "audio":
2282
- return /* @__PURE__ */ d(Yi, {});
2295
+ return /* @__PURE__ */ d(Xi, {});
2283
2296
  case "pdf":
2284
- return /* @__PURE__ */ d(Zi, {});
2297
+ return /* @__PURE__ */ d(Wi, {});
2285
2298
  default: {
2286
2299
  const t = e;
2287
2300
  throw new RangeError(`[markdown-explorer] unknown media type ${String(t)}`);
2288
2301
  }
2289
2302
  }
2290
- }, rl = ({ document: e }) => {
2303
+ }, ol = ({ document: e }) => {
2291
2304
  const { labels: t } = $();
2292
2305
  switch (e.mediaType) {
2293
2306
  case "video":
@@ -2299,15 +2312,15 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2299
2312
  /* @__PURE__ */ d("audio", { className: "aqmx-document-audio", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2300
2313
  );
2301
2314
  case "pdf":
2302
- return /* @__PURE__ */ d(tl, { document: e });
2315
+ return /* @__PURE__ */ d(nl, { document: e });
2303
2316
  default: {
2304
2317
  const n = e.mediaType;
2305
2318
  throw new RangeError(`[markdown-explorer] unknown media type ${String(n)}`);
2306
2319
  }
2307
2320
  }
2308
- }, ol = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2309
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: nl(e.mediaType) }),
2310
- /* @__PURE__ */ d(Be, { scrollerProps: Xi, children: /* @__PURE__ */ d(rl, { document: e }) })
2321
+ }, sl = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2322
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: rl(e.mediaType) }),
2323
+ /* @__PURE__ */ d(Be, { scrollerProps: Ji, children: /* @__PURE__ */ d(ol, { document: e }) })
2311
2324
  ] }), Zt = (e) => {
2312
2325
  switch (e.kind) {
2313
2326
  case "markdown":
@@ -2319,19 +2332,19 @@ const Yi = /* @__PURE__ */ E.forwardRef(Ki), Xi = Object.freeze({ className: "aq
2319
2332
  default:
2320
2333
  return null;
2321
2334
  }
2322
- }, sl = (e) => {
2335
+ }, al = (e) => {
2323
2336
  const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o);
2324
2337
  return s === null ? null : Zt(s.document);
2325
- }, al = (e) => {
2338
+ }, il = (e) => {
2326
2339
  const { config: t } = $(), n = at(), r = F(() => n(Ne(t, { ...e, markup: !e.markup }), "browse"), [t, n, e]);
2327
2340
  return X(() => ({ shown: e.markup, toggle: r }), [e.markup, r]);
2328
2341
  };
2329
- function il({
2342
+ function ll({
2330
2343
  title: e,
2331
2344
  titleId: t,
2332
2345
  ...n
2333
2346
  }, r) {
2334
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
2347
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
2335
2348
  xmlns: "http://www.w3.org/2000/svg",
2336
2349
  viewBox: "0 0 20 20",
2337
2350
  fill: "currentColor",
@@ -2339,24 +2352,24 @@ function il({
2339
2352
  "data-slot": "icon",
2340
2353
  ref: r,
2341
2354
  "aria-labelledby": t
2342
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
2355
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
2343
2356
  id: t
2344
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
2357
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
2345
2358
  fillRule: "evenodd",
2346
2359
  d: "M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z",
2347
2360
  clipRule: "evenodd"
2348
2361
  }));
2349
2362
  }
2350
- const ll = /* @__PURE__ */ E.forwardRef(il), cl = 100, dl = 32767, Xe = Object.freeze({ maxCells: fn, maxColumns: fn / cl, maxCellLength: dl }), Fr = 44, qr = 10, Br = 13, Ze = '"', Dn = (e, t) => {
2363
+ const cl = /* @__PURE__ */ k.forwardRef(ll), dl = 100, ul = 32767, Xe = Object.freeze({ maxCells: fn, maxColumns: fn / dl, maxCellLength: ul }), qr = 44, Br = 10, Ur = 13, Ze = '"', Dn = (e, t) => {
2351
2364
  let n = t;
2352
2365
  for (; n < e.length; ) {
2353
2366
  const r = e.charCodeAt(n);
2354
- if (r === Fr || r === qr || r === Br) return n;
2367
+ if (r === qr || r === Br || r === Ur) return n;
2355
2368
  n += 1;
2356
2369
  }
2357
2370
  return n;
2358
2371
  };
2359
- function* ul(e, t) {
2372
+ function* fl(e, t) {
2360
2373
  let n = [], r = 0;
2361
2374
  for (; ; ) {
2362
2375
  let o;
@@ -2387,15 +2400,15 @@ function* ul(e, t) {
2387
2400
  return;
2388
2401
  }
2389
2402
  const s = e.charCodeAt(r);
2390
- if (r += 1, s !== Fr && (yield n, n = [], s === Br && e.charCodeAt(r) === qr && (r += 1), r >= e.length))
2403
+ if (r += 1, s !== qr && (yield n, n = [], s === Ur && e.charCodeAt(r) === Br && (r += 1), r >= e.length))
2391
2404
  return;
2392
2405
  }
2393
2406
  }
2394
- const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e), ml = (e, t) => {
2407
+ const ml = (e, t, n) => t === "csv" ? fl(e, n) : n === "whole" ? ds(e) : us(e), hl = (e, t) => {
2395
2408
  if (e.length <= t) return e;
2396
2409
  const n = e.charCodeAt(t - 1);
2397
2410
  return e.slice(0, n >= 55296 && n <= 56319 ? t - 1 : t);
2398
- }, Ur = (e, t) => {
2411
+ }, Hr = (e, t) => {
2399
2412
  const n = [];
2400
2413
  let r = 0, o = !1, s = !1;
2401
2414
  for (const i of e) {
@@ -2404,17 +2417,17 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2404
2417
  s = !0;
2405
2418
  break;
2406
2419
  }
2407
- const l = f.some((c) => c.length > t.maxCellLength) ? f.map((c) => ml(c, t.maxCellLength)) : f;
2420
+ const l = f.some((c) => c.length > t.maxCellLength) ? f.map((c) => hl(c, t.maxCellLength)) : f;
2408
2421
  l !== i && (o = !0), n.push(l), r = u;
2409
2422
  }
2410
2423
  return { rows: n.map((i) => i.length === r ? i : [...i, ...Array(r - i.length).fill("")]), truncated: s || o, full: s };
2411
- }, yt = (e, t, n, r, o) => {
2412
- const s = Po(e, t, r);
2413
- if (s === null) return { kind: "unreadable", code: "encoding", encodings: Io(e, t, r) };
2424
+ }, Et = (e, t, n, r, o) => {
2425
+ const s = Io(e, t, r);
2426
+ if (s === null) return { kind: "unreadable", code: "encoding", encodings: $o(e, t, r) };
2414
2427
  if (s.includes("\0")) return { kind: "unreadable", code: "binary" };
2415
- const a = Ur(fl(s, n, t ? "whole" : "prefix"), o);
2428
+ const a = Hr(ml(s, n, t ? "whole" : "prefix"), o);
2416
2429
  return t ? a.truncated || a.rows.some((i) => i.some((f) => f !== "")) ? { kind: "table", table: a } : { kind: "empty" } : a.rows.length === 0 ? { kind: "unreadable", code: "long-row" } : { kind: "table", table: { ...a, truncated: !0 } };
2417
- }, hl = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), Hr = (e) => {
2430
+ }, pl = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), zr = (e) => {
2418
2431
  const t = [];
2419
2432
  let n = 0, r = !1;
2420
2433
  const o = (s) => {
@@ -2440,14 +2453,14 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2440
2453
  for (let c = 0; c < i && !r; c += 1) o(c === 0 ? u : [...u]);
2441
2454
  },
2442
2455
  full: () => r,
2443
- table: () => Ur(t, e)
2456
+ table: () => Hr(t, e)
2444
2457
  };
2445
- }, pl = (e) => {
2458
+ }, gl = (e) => {
2446
2459
  const t = Array.from(e.currentTarget.querySelectorAll('[role="tab"]')), n = e.target instanceof HTMLButtonElement ? t.indexOf(e.target) : -1;
2447
2460
  if (n === -1) return;
2448
2461
  const r = getComputedStyle(e.currentTarget).direction === "rtl" ? "ArrowRight" : "ArrowLeft", o = r === "ArrowLeft" ? "ArrowRight" : "ArrowLeft", s = e.key === o ? (n + 1) % t.length : e.key === r ? (n - 1 + t.length) % t.length : e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : null;
2449
2462
  s !== null && (e.preventDefault(), t[s]?.focus());
2450
- }, gl = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ d("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: pl, children: e.map((a, i) => /* @__PURE__ */ d(
2463
+ }, wl = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ d("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: gl, children: e.map((a, i) => /* @__PURE__ */ d(
2451
2464
  "button",
2452
2465
  {
2453
2466
  type: "button",
@@ -2462,8 +2475,8 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2462
2475
  children: a
2463
2476
  },
2464
2477
  i
2465
- )) }), zr = 64 * 1024, wl = (e) => {
2466
- let t = new Uint8Array(Math.min(e, zr)), n = 0;
2478
+ )) }), jr = 64 * 1024, vl = (e) => {
2479
+ let t = new Uint8Array(Math.min(e, jr)), n = 0;
2467
2480
  return {
2468
2481
  append: (r) => {
2469
2482
  if (n + r.byteLength > t.byteLength) {
@@ -2475,46 +2488,46 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2475
2488
  bytes: () => t.subarray(0, n),
2476
2489
  length: () => n
2477
2490
  };
2478
- }, vl = async (e) => {
2491
+ }, bl = async (e) => {
2479
2492
  for (; ; ) {
2480
2493
  const { done: t, value: n } = await e.read();
2481
2494
  if (t) return !0;
2482
2495
  if (n.byteLength > 0) return !1;
2483
2496
  }
2484
- }, bl = async (e, t) => {
2485
- const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = wl(o);
2486
- let f = zr;
2497
+ }, El = async (e, t) => {
2498
+ const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = vl(o);
2499
+ let f = jr;
2487
2500
  try {
2488
2501
  for (; ; ) {
2489
2502
  const { done: u, value: l } = await a.read();
2490
- if (u) return yt(i.bytes(), !0, n, r, s);
2503
+ if (u) return Et(i.bytes(), !0, n, r, s);
2491
2504
  const c = o - i.length();
2492
2505
  if (i.append(l.byteLength > c ? l.subarray(0, c) : l), i.length() === o) {
2493
- const g = l.byteLength <= c && await vl(a);
2494
- return yt(i.bytes(), g, n, r, s);
2506
+ const g = l.byteLength <= c && await bl(a);
2507
+ return Et(i.bytes(), g, n, r, s);
2495
2508
  }
2496
2509
  if (i.length() < f) continue;
2497
2510
  f = i.length() * 2;
2498
- const m = yt(i.bytes(), !1, n, r, s);
2511
+ const m = Et(i.bytes(), !1, n, r, s);
2499
2512
  if (m.kind === "unreadable" && m.code !== "long-row" || m.kind === "table" && m.table.full) return m;
2500
2513
  }
2501
2514
  } finally {
2502
2515
  a.cancel().catch(() => {
2503
2516
  });
2504
2517
  }
2505
- }, jr = async (e, t, n, r) => {
2518
+ }, Vr = async (e, t, n, r) => {
2506
2519
  const o = await e.asset(st(t), r);
2507
2520
  if (o.status === "cancelled") return null;
2508
2521
  if (o.status === "error") return { kind: "failure", failure: o.failure };
2509
2522
  let s;
2510
2523
  try {
2511
- s = await bl(o.body, n);
2524
+ s = await El(o.body, n);
2512
2525
  } catch {
2513
2526
  return r.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
2514
2527
  }
2515
2528
  return r.aborted ? null : s.kind === "table" ? { kind: "table", rows: s.table.rows, truncated: s.table.truncated } : s;
2516
2529
  }, Wt = (e, t, n) => {
2517
- const { documents: r, labels: o } = $(), s = Va(), a = F(() => r.answerStampOf(e), [r, e]), i = re(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [c, m] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2530
+ const { documents: r, labels: o } = $(), s = Za(), a = F(() => r.answerStampOf(e), [r, e]), i = re(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [c, m] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2518
2531
  if (g.current?.settle(R.stamp, O.kind === "failure" ? O.failure : null), O.kind === "read") {
2519
2532
  m({ settled: R, shown: O.value, failure: null });
2520
2533
  return;
@@ -2536,18 +2549,18 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2536
2549
  R !== null && !O.signal.aborted && v(R, l);
2537
2550
  }), () => O.abort();
2538
2551
  }, [l]);
2539
- const y = c.settled !== l && (c.shown !== null || c.failure !== null);
2540
- Y(() => y ? s.holdBusy() : void 0, [y, s]);
2552
+ const E = c.settled !== l && (c.shown !== null || c.failure !== null);
2553
+ Y(() => E ? s.holdBusy() : void 0, [E, s]);
2541
2554
  const T = F(() => u((O) => O + 1), []);
2542
2555
  return { shown: c.shown, failure: c.failure, retry: T };
2543
- }, Vr = (e, t) => {
2556
+ }, Zr = (e, t) => {
2544
2557
  const n = {};
2545
2558
  for (const r of Object.keys(Je[t])) {
2546
2559
  const o = e[qt(r)];
2547
2560
  o !== Je[t][r].text && (n[r] = o);
2548
2561
  }
2549
2562
  return n;
2550
- }, yl = (e, t) => Object.fromEntries(Object.entries(Vr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), kl = (e, t) => ({
2563
+ }, yl = (e, t) => Object.fromEntries(Object.entries(Zr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), kl = (e, t) => ({
2551
2564
  ...yl(e, t),
2552
2565
  loading: e.viewerLoading,
2553
2566
  errorPrefix: e.viewerErrorPrefix,
@@ -2587,6 +2600,9 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2587
2600
  mermaidPanDown: e.viewerMermaidPanDown,
2588
2601
  mermaidPanLeft: e.viewerMermaidPanLeft,
2589
2602
  mermaidPanRight: e.viewerMermaidPanRight,
2603
+ mermaidFullscreen: e.viewerMermaidFullscreen,
2604
+ mermaidExitFullscreen: e.viewerMermaidExitFullscreen,
2605
+ mermaidFullscreenDialog: e.viewerMermaidFullscreenDialog,
2590
2606
  mermaidDiagram: e.viewerMermaidDiagram,
2591
2607
  mermaidRetry: e.viewerMermaidRetry,
2592
2608
  embeddedVideo: e.viewerEmbeddedVideo,
@@ -2605,29 +2621,26 @@ const fl = (e, t, n) => t === "csv" ? ul(e, n) : n === "whole" ? cs(e) : ds(e),
2605
2621
  svgImageCopyFailed: e.viewerSvgImageCopyFailed,
2606
2622
  svgImageCopyImage: e.viewerSvgImageCopyImage,
2607
2623
  svgImageCopiedImage: e.viewerSvgImageCopiedImage,
2608
- svgImageCopyImageFailed: e.viewerSvgImageCopyImageFailed
2609
- }), Zr = (e, t, n) => {
2610
- if (t !== void 0) return t;
2611
- if (n !== void 0) return n;
2612
- const [r] = e.documentStyles;
2613
- if (r === void 0) throw new Error("[markdown-explorer] the configuration has no document style");
2614
- return r.name;
2615
- }, Wr = (e, t) => e !== void 0 ? e : t !== void 0 ? t : fs;
2624
+ svgImageCopyImageFailed: e.viewerSvgImageCopyImageFailed,
2625
+ svgImageFullscreen: e.viewerSvgImageFullscreen,
2626
+ svgImageExitFullscreen: e.viewerSvgImageExitFullscreen,
2627
+ svgImageFullscreenDialog: e.viewerSvgImageFullscreenDialog
2628
+ }), Wr = (e, t, n) => t !== void 0 ? t : n !== void 0 ? n : e.defaultDocumentStyle, Gr = (e, t) => e !== void 0 ? e : t !== void 0 ? t : ms;
2616
2629
  class ne extends Error {
2617
2630
  refusal;
2618
2631
  constructor(t, n) {
2619
2632
  super(n), this.name = "WorkbookError", this.refusal = t;
2620
2633
  }
2621
2634
  }
2622
- const El = /* @__PURE__ */ new Map([
2635
+ const Sl = /* @__PURE__ */ new Map([
2623
2636
  ["lt", "<"],
2624
2637
  ["gt", ">"],
2625
2638
  ["amp", "&"],
2626
2639
  ["quot", '"'],
2627
2640
  ["apos", "'"]
2628
- ]), Sl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, xl = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, Tl = /^[^\s/>]+/u, Se = (e) => {
2641
+ ]), xl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, Tl = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, Rl = /^[^\s/>]+/u, Se = (e) => {
2629
2642
  throw new ne("not-workbook", `the XML ${e}`);
2630
- }, Pn = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Gr = (e) => e.includes("&") ? e.replace(Sl, (t, n) => n.startsWith("#x") ? Pn(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? Pn(Number.parseInt(n.slice(1), 10)) : El.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, $t = (e) => e.slice(e.indexOf(":") + 1), Rl = (e, t) => {
2643
+ }, Pn = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Kr = (e) => e.includes("&") ? e.replace(xl, (t, n) => n.startsWith("#x") ? Pn(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? Pn(Number.parseInt(n.slice(1), 10)) : Sl.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, $t = (e) => e.slice(e.indexOf(":") + 1), Cl = (e, t) => {
2631
2644
  let n = "";
2632
2645
  for (let r = t; r < e.length; r += 1) {
2633
2646
  const o = e[r];
@@ -2639,18 +2652,18 @@ const El = /* @__PURE__ */ new Map([
2639
2652
  return r;
2640
2653
  }
2641
2654
  return -1;
2642
- }, Cl = (e) => {
2655
+ }, Ol = (e) => {
2643
2656
  const t = /* @__PURE__ */ new Map();
2644
- for (const n of e.matchAll(xl)) t.set($t(n[1] ?? ""), Gr(n[2] ?? n[3] ?? ""));
2657
+ for (const n of e.matchAll(Tl)) t.set($t(n[1] ?? ""), Kr(n[2] ?? n[3] ?? ""));
2645
2658
  return t;
2646
- }, Kr = (e, t) => {
2659
+ }, Yr = (e, t) => {
2647
2660
  let n = "";
2648
2661
  const r = () => {
2649
2662
  let o = 0;
2650
2663
  for (; !t(); ) {
2651
2664
  const s = n.indexOf("<", o);
2652
2665
  if (s === -1) break;
2653
- if (s > o && (e.text?.(Gr(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2666
+ if (s > o && (e.text?.(Kr(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2654
2667
  const u = n.indexOf("-->", s + 4);
2655
2668
  if (u === -1) break;
2656
2669
  o = u + 3;
@@ -2670,14 +2683,14 @@ const El = /* @__PURE__ */ new Map([
2670
2683
  o = u + 2;
2671
2684
  continue;
2672
2685
  }
2673
- const i = Rl(n, s + 1);
2686
+ const i = Cl(n, s + 1);
2674
2687
  if (i === -1) break;
2675
2688
  const f = n.slice(s + 1, i);
2676
2689
  if (f.startsWith("/"))
2677
2690
  e.end?.($t(f.slice(1).trim()));
2678
2691
  else {
2679
- const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, c = Tl.exec(l)?.[0] ?? Se("has a tag without a name"), m = $t(c);
2680
- e.start?.(m, Cl(l.slice(c.length)), u), u && e.end?.(m);
2692
+ const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, c = Rl.exec(l)?.[0] ?? Se("has a tag without a name"), m = $t(c);
2693
+ e.start?.(m, Ol(l.slice(c.length)), u), u && e.end?.(m);
2681
2694
  }
2682
2695
  o = i + 1;
2683
2696
  }
@@ -2692,7 +2705,7 @@ const El = /* @__PURE__ */ new Map([
2692
2705
  }
2693
2706
  };
2694
2707
  }, He = async (e, t, n) => {
2695
- const r = Kr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2708
+ const r = Yr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2696
2709
  try {
2697
2710
  for (; !n(); ) {
2698
2711
  const { done: a, value: i } = await s.read();
@@ -2709,44 +2722,44 @@ const El = /* @__PURE__ */ new Map([
2709
2722
  s.cancel().catch(() => {
2710
2723
  });
2711
2724
  }
2712
- }, Ol = 101010256, Ll = 33639248, Ml = 67324752, Yr = 22, Al = 65535, In = 46, $n = 30, Nl = 1, _n = 0, Dl = 8, Pl = 65535, Le = 4294967295, Il = new TextDecoder("utf-8"), ae = (e) => {
2725
+ }, Ll = 101010256, Ml = 33639248, Al = 67324752, Xr = 22, Nl = 65535, In = 46, $n = 30, Dl = 1, _n = 0, Pl = 8, Il = 65535, Le = 4294967295, $l = new TextDecoder("utf-8"), ae = (e) => {
2713
2726
  throw new ne("not-workbook", `the ZIP package ${e}`);
2714
- }, $l = (e) => {
2715
- const t = e.byteLength - Yr, n = Math.max(0, t - Al);
2727
+ }, _l = (e) => {
2728
+ const t = e.byteLength - Xr, n = Math.max(0, t - Nl);
2716
2729
  for (let r = t; r >= n; r -= 1)
2717
- if (e.getUint32(r, !0) === Ol) return r;
2730
+ if (e.getUint32(r, !0) === Ll) return r;
2718
2731
  return ae("has no end of central directory record");
2719
- }, _l = (e) => {
2720
- if (e.byteLength < Yr) return ae("is shorter than its end record");
2721
- const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = $l(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2732
+ }, Fl = (e) => {
2733
+ if (e.byteLength < Xr) return ae("is shorter than its end record");
2734
+ const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = _l(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2722
2735
  if (r !== 0 || o !== 0) return ae("spans several disks");
2723
- if (s === Pl || a === Le || i === Le) return ae("is a ZIP64 package");
2736
+ if (s === Il || a === Le || i === Le) return ae("is a ZIP64 package");
2724
2737
  if (i + a > n) return ae("has a central directory past its end record");
2725
2738
  const f = /* @__PURE__ */ new Map();
2726
2739
  let u = i;
2727
2740
  for (let l = 0; l < s; l += 1) {
2728
- if (u + In > n || t.getUint32(u, !0) !== Ll) return ae("has a malformed central directory");
2729
- const c = t.getUint16(u + 8, !0), m = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), y = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + In;
2730
- if (q + y > n) return ae("has a name past its central directory");
2731
- const D = Il.decode(e.subarray(q, q + y));
2741
+ if (u + In > n || t.getUint32(u, !0) !== Ml) return ae("has a malformed central directory");
2742
+ const c = t.getUint16(u + 8, !0), m = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), E = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + In;
2743
+ if (q + E > n) return ae("has a name past its central directory");
2744
+ const D = $l.decode(e.subarray(q, q + E));
2732
2745
  if (g === Le || v === Le || R === Le) return ae("has a ZIP64 entry");
2733
2746
  if (!D.endsWith("/")) {
2734
2747
  if (f.has(D)) return ae(`names ${D} twice`);
2735
- f.set(D, { name: D, encrypted: (c & Nl) !== 0, method: m, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2748
+ f.set(D, { name: D, encrypted: (c & Dl) !== 0, method: m, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2736
2749
  }
2737
- u = q + y + T + O;
2750
+ u = q + E + T + O;
2738
2751
  }
2739
2752
  return { bytes: e, entries: f };
2740
- }, Fl = (e, t) => {
2753
+ }, ql = (e, t) => {
2741
2754
  const { bytes: n } = e, r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = t.localHeaderOffset;
2742
- if (o + $n > n.byteLength || r.getUint32(o, !0) !== Ml) return ae(`has no local header for ${t.name}`);
2755
+ if (o + $n > n.byteLength || r.getUint32(o, !0) !== Al) return ae(`has no local header for ${t.name}`);
2743
2756
  const s = o + $n + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), a = s + t.compressedSize;
2744
2757
  return a > n.byteLength ? ae(`has the data of ${t.name} past its end`) : { start: s, end: a };
2745
- }, Xr = (e) => new ReadableStream({
2758
+ }, Jr = (e) => new ReadableStream({
2746
2759
  start(t) {
2747
2760
  e.byteLength > 0 && t.enqueue(e), t.close();
2748
2761
  }
2749
- }), ql = (e) => Xr(e).pipeThrough(new DecompressionStream("deflate-raw")), Bl = (e, t) => {
2762
+ }), Bl = (e) => Jr(e).pipeThrough(new DecompressionStream("deflate-raw")), Ul = (e, t) => {
2750
2763
  let n = 0;
2751
2764
  return new TransformStream({
2752
2765
  transform(r, o) {
@@ -2761,10 +2774,10 @@ const El = /* @__PURE__ */ new Map([
2761
2774
  const r = e.entries.get(t);
2762
2775
  if (r === void 0) return null;
2763
2776
  if (r.encrypted) throw new ne("encrypted", `${t} is encrypted`);
2764
- if (r.method !== _n && r.method !== Dl) return ae(`compresses ${t} with method ${r.method}`);
2777
+ if (r.method !== _n && r.method !== Pl) return ae(`compresses ${t} with method ${r.method}`);
2765
2778
  if (r.uncompressedSize > n) throw new ne("too-large", `${t} declares ${r.uncompressedSize} bytes`);
2766
- const { start: o, end: s } = Fl(e, r), a = e.bytes.subarray(o, s);
2767
- return (r.method === _n ? Xr(a) : ql(a)).pipeThrough(Bl(t, n));
2779
+ const { start: o, end: s } = ql(e, r), a = e.bytes.subarray(o, s);
2780
+ return (r.method === _n ? Jr(a) : Bl(a)).pipeThrough(Ul(t, n));
2768
2781
  }, rt = async (e, t, n) => {
2769
2782
  const r = Fe(e, t, n);
2770
2783
  if (r === null) return null;
@@ -2783,10 +2796,10 @@ const El = /* @__PURE__ */ new Map([
2783
2796
  } finally {
2784
2797
  s.releaseLock();
2785
2798
  }
2786
- }, Fn = "content.xml", Ul = "META-INF/manifest.xml", Jr = (e) => {
2799
+ }, Fn = "content.xml", Hl = "META-INF/manifest.xml", Qr = (e) => {
2787
2800
  throw new ne("not-workbook", `the spreadsheet ${e}`);
2788
- }, qn = (e, t) => Fe(e, Fn, t.maxPartBytes) ?? Jr(`has no ${Fn}`), Hl = async (e, t) => {
2789
- const n = Fe(e, Ul, t.maxPartBytes);
2801
+ }, qn = (e, t) => Fe(e, Fn, t.maxPartBytes) ?? Qr(`has no ${Fn}`), zl = async (e, t) => {
2802
+ const n = Fe(e, Hl, t.maxPartBytes);
2790
2803
  if (n === null) return !1;
2791
2804
  let r = !1;
2792
2805
  return await He(
@@ -2798,7 +2811,7 @@ const El = /* @__PURE__ */ new Map([
2798
2811
  },
2799
2812
  () => r
2800
2813
  ), r;
2801
- }, zl = async (e) => {
2814
+ }, jl = async (e) => {
2802
2815
  const t = [], n = /* @__PURE__ */ new Set();
2803
2816
  let r = null, o = 0;
2804
2817
  return await He(
@@ -2813,22 +2826,22 @@ const El = /* @__PURE__ */ new Map([
2813
2826
  },
2814
2827
  () => !1
2815
2828
  ), { tables: t, hidingStyles: n };
2816
- }, kt = (e) => {
2829
+ }, yt = (e) => {
2817
2830
  const t = Number(e);
2818
2831
  return Number.isInteger(t) && t > 0 ? t : 1;
2819
- }, jl = async (e, t, n) => {
2820
- const r = Hr(n);
2832
+ }, Vl = async (e, t, n) => {
2833
+ const r = zr(n);
2821
2834
  let o = 0, s = 0, a = !1, i = !1, f = 0, u = 1, l = /* @__PURE__ */ new Map(), c = 0, m = null;
2822
2835
  return await He(
2823
2836
  e,
2824
2837
  {
2825
- start: (g, v, y) => {
2838
+ start: (g, v, E) => {
2826
2839
  if (g === "table") {
2827
- s === 0 && (a = o === t, o += 1), y || (s += 1);
2840
+ s === 0 && (a = o === t, o += 1), E || (s += 1);
2828
2841
  return;
2829
2842
  }
2830
- !a || s !== 1 || (g === "table-row" ? (u = kt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), c = 0) : g === "table-cell" || g === "covered-table-cell" ? m = { repeat: kt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : m !== null && m.annotationDepth === 0 && (g === "annotation" && !y ? m.annotationDepth += 1 : g === "p" || g === "h" ? (m.paragraphs > 0 && m.parts.push(`
2831
- `), m.paragraphs += 1, y || (m.paragraphDepth += 1)) : m.paragraphDepth > 0 && (g === "s" ? m.parts.push(" ".repeat(kt(v.get("c")))) : g === "tab" ? m.parts.push(" ") : g === "line-break" && m.parts.push(`
2843
+ !a || s !== 1 || (g === "table-row" ? (u = yt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), c = 0) : g === "table-cell" || g === "covered-table-cell" ? m = { repeat: yt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : m !== null && m.annotationDepth === 0 && (g === "annotation" && !E ? m.annotationDepth += 1 : g === "p" || g === "h" ? (m.paragraphs > 0 && m.parts.push(`
2844
+ `), m.paragraphs += 1, E || (m.paragraphDepth += 1)) : m.paragraphDepth > 0 && (g === "s" ? m.parts.push(" ".repeat(yt(v.get("c")))) : g === "tab" ? m.parts.push(" ") : g === "line-break" && m.parts.push(`
2832
2845
  `))));
2833
2846
  },
2834
2847
  end: (g) => {
@@ -2844,8 +2857,8 @@ const El = /* @__PURE__ */ new Map([
2844
2857
  if ((g === "table-cell" || g === "covered-table-cell") && m !== null) {
2845
2858
  const v = m.covered ? "" : m.parts.join("");
2846
2859
  if (v !== "") {
2847
- const y = Math.min(c + m.repeat, n.maxColumns + 1);
2848
- for (let T = c; T < y; T += 1) l.set(T, v);
2860
+ const E = Math.min(c + m.repeat, n.maxColumns + 1);
2861
+ for (let T = c; T < E; T += 1) l.set(T, v);
2849
2862
  }
2850
2863
  c += m.repeat, m = null;
2851
2864
  } else g === "table-row" ? (r.addRow(f, l, u), f += u) : (g === "p" || g === "h") && m !== null && (m.paragraphDepth = Math.max(0, m.paragraphDepth - 1));
@@ -2856,18 +2869,18 @@ const El = /* @__PURE__ */ new Map([
2856
2869
  },
2857
2870
  () => i || r.full()
2858
2871
  ), r.table();
2859
- }, Vl = async (e, t) => {
2860
- if (await Hl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2861
- const { tables: n, hidingStyles: r } = await zl(qn(e, t)), o = [];
2872
+ }, Zl = async (e, t) => {
2873
+ if (await zl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2874
+ const { tables: n, hidingStyles: r } = await jl(qn(e, t)), o = [];
2862
2875
  let s = 0;
2863
2876
  return n.forEach((a, i) => {
2864
2877
  if (r.has(a.style)) {
2865
2878
  s += 1;
2866
2879
  return;
2867
2880
  }
2868
- o.push({ name: a.name, read: async (f) => jl(qn(e, t), i, f) });
2869
- }), o.length === 0 && Jr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2870
- }, Ee = Object.freeze({ kind: "general" }), Zl = new Map([
2881
+ o.push({ name: a.name, read: async (f) => Vl(qn(e, t), i, f) });
2882
+ }), o.length === 0 && Qr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2883
+ }, ke = Object.freeze({ kind: "general" }), Wl = new Map([
2871
2884
  [0, "General"],
2872
2885
  [1, "0"],
2873
2886
  [2, "0.00"],
@@ -2899,7 +2912,7 @@ const El = /* @__PURE__ */ new Map([
2899
2912
  [47, "mmss.0"],
2900
2913
  [48, "##0.0E+0"],
2901
2914
  [49, "@"]
2902
- ]), Wl = /^\[(h+|m+|s+)\]$/iu, Gl = (e) => {
2915
+ ]), Gl = /^\[(h+|m+|s+)\]$/iu, Kl = (e) => {
2903
2916
  let t = "", n = !1;
2904
2917
  for (let r = 0; r < e.length; r += 1) {
2905
2918
  const o = e[r];
@@ -2911,24 +2924,24 @@ const El = /* @__PURE__ */ new Map([
2911
2924
  r += 1;
2912
2925
  else if (o === "[") {
2913
2926
  const s = e.indexOf("]", r + 1), a = e.slice(r, s === -1 ? e.length : s + 1);
2914
- Wl.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2927
+ Gl.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2915
2928
  } else
2916
2929
  t += o;
2917
2930
  }
2918
2931
  return { text: t.toLowerCase(), elapsed: n };
2919
- }, Kl = (e) => {
2920
- const { text: t, elapsed: n } = Gl(e);
2921
- if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return Ee;
2932
+ }, Yl = (e) => {
2933
+ const { text: t, elapsed: n } = Kl(e);
2934
+ if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return ke;
2922
2935
  const r = n || /[hs]/u.test(t) || t.includes("am/pm") || t.includes("a/p"), o = /[ydge]/u.test(t.replace(/am\/pm|a\/p/gu, "")) || t.includes("m") && !r;
2923
2936
  if (o || r) return { kind: "date-time", date: o, time: r, seconds: t.includes("s"), elapsed: n };
2924
- if (/[0#?]\s*\/\s*[0#?]/u.test(t)) return Ee;
2937
+ if (/[0#?]\s*\/\s*[0#?]/u.test(t)) return ke;
2925
2938
  const s = /[0#?][0#?,]*(?:\.[0#?]*)?,*/u.exec(t)?.[0];
2926
- if (s === void 0) return Ee;
2939
+ if (s === void 0) return ke;
2927
2940
  const a = /,*$/u.exec(s)?.[0].length ?? 0, [i = "", f = ""] = s.slice(0, s.length - a).split("."), u = (f.match(/[0#?]/gu) ?? []).length;
2928
2941
  return t.includes("%") ? { kind: "percent", decimals: u } : { kind: "fixed", decimals: u, grouping: i.includes(","), scale: 1e3 ** a };
2929
- }, Yl = (e, t) => {
2930
- const n = t.get(e) ?? Zl.get(e);
2931
- return n === void 0 ? Ee : Kl(n);
2942
+ }, Xl = (e, t) => {
2943
+ const n = t.get(e) ?? Wl.get(e);
2944
+ return n === void 0 ? ke : Yl(n);
2932
2945
  }, Gt = (e) => {
2933
2946
  if (Number.isInteger(e) && Math.abs(e) < 1e15) return String(e);
2934
2947
  const [t = "", n] = e.toPrecision(15).split("e"), r = t.includes(".") ? t.replace(/0+$/u, "").replace(/\.$/u, "") : t;
@@ -2938,62 +2951,62 @@ const El = /* @__PURE__ */ new Map([
2938
2951
  if (r.includes("e")) return Gt(e);
2939
2952
  const [o = "", s] = r.split("."), a = n ? o.replace(/\B(?=(\d{3})+(?!\d))/gu, ",") : o;
2940
2953
  return `${e < 0 && /[1-9]/u.test(r) ? "-" : ""}${a}${s === void 0 ? "" : `.${s}`}`;
2941
- }, Xl = 864e5, Un = 86400, Jl = 2958465, xe = (e, t) => String(e).padStart(t, "0"), Ql = (e, t) => {
2954
+ }, Jl = 864e5, Un = 86400, Ql = 2958465, xe = (e, t) => String(e).padStart(t, "0"), ec = (e, t) => {
2942
2955
  if (!t && e === 0) return "1900-01-00";
2943
2956
  if (!t && e === 60) return "1900-02-29";
2944
- const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * Xl);
2957
+ const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * Jl);
2945
2958
  return `${xe(r.getUTCFullYear(), 4)}-${xe(r.getUTCMonth() + 1, 2)}-${xe(r.getUTCDate(), 2)}`;
2946
- }, ec = (e, t, n) => {
2947
- if (e < 0 || e >= Jl + 1) return Gt(e);
2959
+ }, tc = (e, t, n) => {
2960
+ if (e < 0 || e >= Ql + 1) return Gt(e);
2948
2961
  let r = Math.floor(e), o = Math.round((e - r) * Un);
2949
2962
  o === Un && (r += 1, o = 0);
2950
2963
  const s = Math.floor(o / 3600), a = Math.floor(o % 3600 / 60), i = `${xe(t.elapsed ? r * 24 + s : s, 2)}:${xe(a, 2)}${t.seconds ? `:${xe(o % 60, 2)}` : ""}`;
2951
2964
  if (t.elapsed || !t.date) return i;
2952
- const f = Ql(r, n);
2965
+ const f = ec(r, n);
2953
2966
  return t.time ? `${f} ${i}` : f;
2954
- }, tc = (e, t, n) => {
2967
+ }, nc = (e, t, n) => {
2955
2968
  switch (t.kind) {
2956
2969
  case "general":
2957
2970
  return Gt(e);
2958
2971
  case "date-time":
2959
- return ec(e, t, n);
2972
+ return tc(e, t, n);
2960
2973
  case "percent":
2961
2974
  return `${Bn(e * 100, t.decimals, !1)}%`;
2962
2975
  case "fixed":
2963
2976
  return Bn(e / t.scale, t.decimals, t.grouping);
2964
2977
  }
2965
- }, Qr = "_rels/.rels", ce = (e) => {
2978
+ }, eo = "_rels/.rels", ce = (e) => {
2966
2979
  throw new ne("not-workbook", `the workbook ${e}`);
2967
2980
  }, Kt = (e, t) => {
2968
- const n = Kr(t, () => !1);
2981
+ const n = Yr(t, () => !1);
2969
2982
  n.write(e), n.finish();
2970
- }, nc = (e, t) => {
2983
+ }, rc = (e, t) => {
2971
2984
  try {
2972
2985
  return decodeURIComponent(e);
2973
2986
  } catch {
2974
2987
  return ce(`points to a malformed part name (${t})`);
2975
2988
  }
2976
- }, rc = (e, t) => {
2989
+ }, oc = (e, t) => {
2977
2990
  const r = [...t.startsWith("/") ? [] : e.split("/").slice(0, -1)];
2978
2991
  for (const o of t.split("/"))
2979
- o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(nc(o, t)));
2992
+ o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(rc(o, t)));
2980
2993
  return r.join("/");
2981
- }, oc = (e) => {
2994
+ }, sc = (e) => {
2982
2995
  const t = e.lastIndexOf("/");
2983
2996
  return `${e.slice(0, t + 1)}_rels/${e.slice(t + 1)}.rels`;
2984
2997
  }, Hn = async (e, t, n) => {
2985
- const r = await rt(e, t === "" ? Qr : oc(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
2998
+ const r = await rt(e, t === "" ? eo : sc(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
2986
2999
  return r === null || Kt(r, {
2987
3000
  start: (s, a) => {
2988
3001
  if (s !== "Relationship") return;
2989
3002
  const i = a.get("Id"), f = a.get("Type"), u = a.get("Target");
2990
- i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: rc(t, u) });
3003
+ i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: oc(t, u) });
2991
3004
  }
2992
3005
  }), o;
2993
- }, Et = (e, t) => {
3006
+ }, kt = (e, t) => {
2994
3007
  for (const n of e.values()) if (n.type.endsWith(`/${t}`)) return n.target;
2995
3008
  return null;
2996
- }, sc = (e) => {
3009
+ }, ac = (e) => {
2997
3010
  const t = [];
2998
3011
  let n = !1;
2999
3012
  return Kt(e, {
@@ -3004,7 +3017,7 @@ const El = /* @__PURE__ */ new Map([
3004
3017
  } else r === "sheet" && t.push({ name: o.get("name") ?? "", state: o.get("state") ?? "visible", relationship: o.get("id") ?? "" });
3005
3018
  }
3006
3019
  }), { sheets: t, date1904: n };
3007
- }, ac = async (e) => {
3020
+ }, ic = async (e) => {
3008
3021
  const t = [];
3009
3022
  let n = null, r = !1, o = 0;
3010
3023
  return await He(
@@ -3022,7 +3035,7 @@ const El = /* @__PURE__ */ new Map([
3022
3035
  },
3023
3036
  () => !1
3024
3037
  ), t;
3025
- }, ic = (e) => {
3038
+ }, lc = (e) => {
3026
3039
  const t = /* @__PURE__ */ new Map(), n = [];
3027
3040
  let r = !1;
3028
3041
  return Kt(e, {
@@ -3040,19 +3053,19 @@ const El = /* @__PURE__ */ new Map([
3040
3053
  end: (o) => {
3041
3054
  o === "cellXfs" && (r = !1);
3042
3055
  }
3043
- }), n.map((o) => Yl(o, t));
3044
- }, lc = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, cc = (e) => {
3045
- const t = lc.exec(e);
3056
+ }), n.map((o) => Xl(o, t));
3057
+ }, cc = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, dc = (e) => {
3058
+ const t = cc.exec(e);
3046
3059
  if (t === null) return e;
3047
3060
  const [, n, r] = t;
3048
3061
  return r === void 0 || /^00:00(?::00)?$/u.test(r) ? n ?? e : `${n} ${r}`;
3049
- }, dc = /^([A-Za-z]{1,3})(\d+)$/u, uc = (e) => {
3050
- const t = dc.exec(e)?.[1];
3062
+ }, uc = /^([A-Za-z]{1,3})(\d+)$/u, fc = (e) => {
3063
+ const t = uc.exec(e)?.[1];
3051
3064
  if (t === void 0) return null;
3052
3065
  let n = 0;
3053
3066
  for (const r of t.toUpperCase()) n = n * 26 + (r.charCodeAt(0) - 64);
3054
3067
  return n - 1;
3055
- }, fc = (e, t, n, r) => {
3068
+ }, mc = (e, t, n, r) => {
3056
3069
  const o = e.value.join("");
3057
3070
  switch (e.type) {
3058
3071
  case "s":
@@ -3065,16 +3078,16 @@ const El = /* @__PURE__ */ new Map([
3065
3078
  case "e":
3066
3079
  return o;
3067
3080
  case "d":
3068
- return cc(o.trim());
3081
+ return dc(o.trim());
3069
3082
  default: {
3070
3083
  const s = o.trim();
3071
3084
  if (s === "") return "";
3072
3085
  const a = Number(s);
3073
- return Number.isFinite(a) ? tc(a, n[e.style] ?? Ee, r) : s;
3086
+ return Number.isFinite(a) ? nc(a, n[e.style] ?? ke, r) : s;
3074
3087
  }
3075
3088
  }
3076
- }, mc = async (e, t, n, r, o) => {
3077
- const s = Hr(t);
3089
+ }, hc = async (e, t, n, r, o) => {
3090
+ const s = zr(t);
3078
3091
  let a = -1, i = /* @__PURE__ */ new Map(), f = 0, u = null;
3079
3092
  return await He(
3080
3093
  e,
@@ -3084,13 +3097,13 @@ const El = /* @__PURE__ */ new Map([
3084
3097
  const g = Number(c.get("r"));
3085
3098
  a = Number.isInteger(g) && g > a + 1 ? g - 1 : a + 1, i = /* @__PURE__ */ new Map(), f = 0;
3086
3099
  } else if (l === "c") {
3087
- const g = uc(c.get("r") ?? "") ?? f, v = Number(c.get("s") ?? "0");
3100
+ const g = fc(c.get("r") ?? "") ?? f, v = Number(c.get("s") ?? "0");
3088
3101
  u = { column: g, type: c.get("t") ?? "n", style: Number.isInteger(v) ? v : 0, value: [], inline: [], inValue: !1, inInlineText: !1, phoneticDepth: 0 };
3089
3102
  } else u !== null && (l === "v" ? u.inValue = !m : l === "rPh" && !m ? u.phoneticDepth += 1 : l === "t" && u.type === "inlineStr" && u.phoneticDepth === 0 && (u.inInlineText = !m));
3090
3103
  },
3091
3104
  end: (l) => {
3092
3105
  if (l === "c" && u !== null) {
3093
- const c = fc(u, n, r, o);
3106
+ const c = mc(u, n, r, o);
3094
3107
  c !== "" && i.set(u.column, c), f = u.column + 1, u = null;
3095
3108
  } else l === "row" ? s.addRow(a, i, 1) : u !== null && (l === "v" ? u.inValue = !1 : l === "rPh" ? u.phoneticDepth = Math.max(0, u.phoneticDepth - 1) : l === "t" && (u.inInlineText = !1));
3096
3109
  },
@@ -3100,36 +3113,36 @@ const El = /* @__PURE__ */ new Map([
3100
3113
  },
3101
3114
  s.full
3102
3115
  ), s.table();
3103
- }, hc = async (e, t) => {
3104
- const n = Et(await Hn(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await rt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = sc(r), a = await Hn(e, n, t), i = Et(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await ac(f), l = Et(a, "styles"), c = l === null ? null : await rt(e, l, t.maxPartBytes), m = c === null ? [] : ic(c), g = [];
3116
+ }, pc = async (e, t) => {
3117
+ const n = kt(await Hn(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await rt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = ac(r), a = await Hn(e, n, t), i = kt(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await ic(f), l = kt(a, "styles"), c = l === null ? null : await rt(e, l, t.maxPartBytes), m = c === null ? [] : lc(c), g = [];
3105
3118
  let v = 0;
3106
- for (const y of o) {
3107
- const T = a.get(y.relationship) ?? ce(`lists the sheet ${y.name} without its relationship`);
3108
- if (y.state !== "visible" || !T.type.endsWith("/worksheet")) {
3119
+ for (const E of o) {
3120
+ const T = a.get(E.relationship) ?? ce(`lists the sheet ${E.name} without its relationship`);
3121
+ if (E.state !== "visible" || !T.type.endsWith("/worksheet")) {
3109
3122
  v += 1;
3110
3123
  continue;
3111
3124
  }
3112
- e.entries.has(T.target) || ce(`has no part ${T.target} for the sheet ${y.name}`), g.push({
3113
- name: y.name,
3125
+ e.entries.has(T.target) || ce(`has no part ${T.target} for the sheet ${E.name}`), g.push({
3126
+ name: E.name,
3114
3127
  read: async (O) => {
3115
3128
  const R = Fe(e, T.target, t.maxPartBytes) ?? ce(`has no part ${T.target}`);
3116
- return mc(R, O, u, m, s);
3129
+ return hc(R, O, u, m, s);
3117
3130
  }
3118
3131
  });
3119
3132
  }
3120
3133
  return g.length === 0 && ce("shows no sheet"), { sheets: g.slice(0, t.maxSheets), unshownSheets: v, unlistedSheets: Math.max(0, g.length - t.maxSheets) };
3121
- }, pc = Object.freeze([80, 75, 3, 4]), gc = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), St = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), wc = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), vc = "mimetype", eo = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), to = (e) => eo(e, pc), no = (e) => eo(e, gc), bc = (e) => {
3134
+ }, gc = Object.freeze([80, 75, 3, 4]), wc = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), St = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), vc = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), bc = "mimetype", to = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), no = (e) => to(e, gc), ro = (e) => to(e, wc), Ec = (e) => {
3122
3135
  const t = e.byteLength - St.byteLength;
3123
3136
  for (let n = 0; n <= t; n += 1)
3124
3137
  if (e[n] === St[0] && St.every((r, o) => e[n + o] === r)) return !0;
3125
3138
  return !1;
3126
3139
  }, yc = async (e, t) => {
3127
- if (no(e))
3128
- throw bc(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3129
- if (!to(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3130
- const n = _l(e), r = await rt(n, vc, t.maxPartBytes);
3131
- if (r !== null && wc.has(r.trim())) return Vl(n, t);
3132
- if (n.entries.has(Qr)) return hc(n, t);
3140
+ if (ro(e))
3141
+ throw Ec(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3142
+ if (!no(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3143
+ const n = Fl(e), r = await rt(n, bc, t.maxPartBytes);
3144
+ if (r !== null && vc.has(r.trim())) return Zl(n, t);
3145
+ if (n.entries.has(eo)) return pc(n, t);
3133
3146
  throw new ne("not-workbook", "the ZIP package is neither an OpenDocument spreadsheet nor an Office Open XML package");
3134
3147
  }, kc = async (e, t) => {
3135
3148
  const n = e.getReader(), r = [];
@@ -3150,14 +3163,14 @@ const El = /* @__PURE__ */ new Map([
3150
3163
  for (const i of r)
3151
3164
  s.set(i, a), a += i.byteLength;
3152
3165
  return s;
3153
- }, ro = async (e, t) => {
3166
+ }, oo = async (e, t) => {
3154
3167
  try {
3155
3168
  return { kind: "table", table: await e.read(t) };
3156
3169
  } catch (n) {
3157
3170
  return { kind: "refused", refusal: n instanceof ne ? n.refusal : "not-workbook" };
3158
3171
  }
3159
- }, Ec = async (e, t, n, r, o) => {
3160
- const s = await e.asset(zo(t), o);
3172
+ }, Sc = async (e, t, n, r, o) => {
3173
+ const s = await e.asset(jo(t), o);
3161
3174
  if (s.status === "cancelled") return null;
3162
3175
  if (s.status === "error") return { kind: "failure", failure: s.failure };
3163
3176
  let a;
@@ -3168,16 +3181,16 @@ const El = /* @__PURE__ */ new Map([
3168
3181
  }
3169
3182
  if (o.aborted) return null;
3170
3183
  if (a === null) return { kind: "refused", refusal: "too-large" };
3171
- if (!(to(a) || no(a))) return { kind: "not-package" };
3184
+ if (!(no(a) || ro(a))) return { kind: "not-package" };
3172
3185
  try {
3173
3186
  const i = await yc(a, n.limits), f = r === null ? -1 : i.sheets.findIndex((m) => m.name === r), u = Math.max(f, 0), l = i.sheets[u];
3174
3187
  if (l === void 0) return { kind: "refused", refusal: "not-workbook" };
3175
- const c = await ro(l, n.budget);
3188
+ const c = await oo(l, n.budget);
3176
3189
  return o.aborted ? null : { kind: "workbook", workbook: i, selected: u, sheet: c };
3177
3190
  } catch (i) {
3178
3191
  return i instanceof ne ? { kind: "refused", refusal: i.refusal } : o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3179
3192
  }
3180
- }, Sc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), xc = (e, t) => {
3193
+ }, xc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), Tc = (e, t) => {
3181
3194
  switch (t.code) {
3182
3195
  case "encoding":
3183
3196
  return e.spreadsheetUnreadableEncoding(t.encodings);
@@ -3195,13 +3208,13 @@ const El = /* @__PURE__ */ new Map([
3195
3208
  case "too-large":
3196
3209
  return e.spreadsheetWorkbookTooLarge;
3197
3210
  }
3198
- }, xt = (e) => e.every((t) => t.every((n) => n === "")), oo = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3199
- /* @__PURE__ */ d(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ d(ll, {}) }),
3200
- /* @__PURE__ */ d(Be, { scrollerProps: Sc, children: /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3201
- ] }), so = ({ rows: e, title: t }) => {
3202
- const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Vr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => us(e), [e]);
3211
+ }, xt = (e) => e.every((t) => t.every((n) => n === "")), so = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3212
+ /* @__PURE__ */ d(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ d(cl, {}) }),
3213
+ /* @__PURE__ */ d(Be, { scrollerProps: xc, children: /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3214
+ ] }), ao = ({ rows: e, title: t }) => {
3215
+ const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Zr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => fs(e), [e]);
3203
3216
  return (
3204
- /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ d(as, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a, tapScrollCircle: Lr }) })
3217
+ /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ d(is, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a, tapScrollCircle: Mr }) })
3205
3218
  );
3206
3219
  }, De = ({ note: e, testId: t, code: n, download: r }) => {
3207
3220
  const { labels: o } = $();
@@ -3209,46 +3222,46 @@ const El = /* @__PURE__ */ new Map([
3209
3222
  /* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: e }),
3210
3223
  /* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: r.url, download: r.name, "data-testid": "markdown-explorer-spreadsheet-unreadable-download", children: o.download })
3211
3224
  ] }) });
3212
- }, ao = ({ reading: e, name: t, url: n }) => {
3225
+ }, io = ({ reading: e, name: t, url: n }) => {
3213
3226
  const { labels: r } = $();
3214
3227
  switch (e.kind) {
3215
3228
  case "table":
3216
3229
  return /* @__PURE__ */ B(pe, { children: [
3217
3230
  e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: r.spreadsheetTruncated }) : null,
3218
- /* @__PURE__ */ d(so, { rows: e.rows, title: t })
3231
+ /* @__PURE__ */ d(ao, { rows: e.rows, title: t })
3219
3232
  ] });
3220
3233
  case "empty":
3221
3234
  return /* @__PURE__ */ d(De, { note: r.spreadsheetEmpty, testId: "markdown-explorer-spreadsheet-empty" });
3222
3235
  case "unreadable":
3223
- return /* @__PURE__ */ d(De, { note: xc(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3236
+ return /* @__PURE__ */ d(De, { note: Tc(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3224
3237
  }
3225
- }, Tc = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ d(Cc, { path: e, document: t }) : /* @__PURE__ */ d(Rc, { path: e, document: t, format: t.format }), Rc = ({ path: e, document: t, format: n }) => {
3238
+ }, Rc = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ d(Oc, { path: e, document: t }) : /* @__PURE__ */ d(Cc, { path: e, document: t, format: t.format }), Cc = ({ path: e, document: t, format: n }) => {
3226
3239
  const { config: r, data: o, labels: s } = $(), { name: a, url: i } = t, f = F(
3227
3240
  async (m) => {
3228
- const g = await jr(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Xe }, m);
3241
+ const g = await Vr(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Xe }, m);
3229
3242
  return g === null || g.kind === "failure" ? g : { kind: "read", value: g };
3230
3243
  },
3231
3244
  [o, i, n, r.legacyTextEncoding, r.spreadsheets.maxBytes]
3232
3245
  ), { shown: u, failure: l, retry: c } = Wt(e, a, f);
3233
- return /* @__PURE__ */ B(oo, { name: a, url: i, openUrl: st(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3246
+ return /* @__PURE__ */ B(so, { name: a, url: i, openUrl: st(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3234
3247
  u === null && l === null ? /* @__PURE__ */ d(Ce, { label: s.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3235
3248
  u === null && l !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Re, { failure: l, alert: !1, onRetry: c, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3236
- u === null ? null : /* @__PURE__ */ d(ao, { reading: u, name: a, url: i })
3249
+ u === null ? null : /* @__PURE__ */ d(io, { reading: u, name: a, url: i })
3237
3250
  ] });
3238
- }, Cc = ({ path: e, document: t }) => {
3251
+ }, Oc = ({ path: e, document: t }) => {
3239
3252
  const { config: n, data: r, labels: o } = $(), { name: s, url: a, firstSheetText: i } = t, f = Te(), u = U(null), l = F(
3240
3253
  async (b) => {
3241
- const S = await Ec(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: hl, budget: Xe }, u.current, b);
3254
+ const S = await Sc(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: pl, budget: Xe }, u.current, b);
3242
3255
  if (S === null || S.kind === "failure") return S;
3243
3256
  if (S.kind === "workbook") return { kind: "read", value: S };
3244
3257
  if (i !== null) {
3245
- const L = await jr(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Xe }, b);
3258
+ const L = await Vr(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Xe }, b);
3246
3259
  return L === null || L.kind === "failure" ? L : { kind: "read", value: { kind: "first-sheet", reading: L } };
3247
3260
  }
3248
3261
  return { kind: "read", value: { kind: "refused", refusal: S.kind === "not-package" ? "not-workbook" : S.refusal } };
3249
3262
  },
3250
3263
  [r, a, i, n.legacyTextEncoding, n.spreadsheets.maxBytes, n.spreadsheets.maxWorkbookBytes]
3251
- ), { shown: c, failure: m, retry: g } = Wt(e, s, l), [v, y] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = c?.kind === "workbook" ? c : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3264
+ ), { shown: c, failure: m, retry: g } = Wt(e, s, l), [v, E] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = c?.kind === "workbook" ? c : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3252
3265
  if (O === null) return;
3253
3266
  const S = O.workbook.sheets[b];
3254
3267
  if (S === void 0) return;
@@ -3256,34 +3269,34 @@ const El = /* @__PURE__ */ new Map([
3256
3269
  let L = T.current.get(O.workbook);
3257
3270
  L === void 0 && (L = /* @__PURE__ */ new Map([[O.selected, O.sheet]]), T.current.set(O.workbook, L));
3258
3271
  const M = L.get(b), P = { workbook: O.workbook, index: b, reading: M ?? null };
3259
- if (y(P), M !== void 0) return;
3272
+ if (E(P), M !== void 0) return;
3260
3273
  const H = L;
3261
- ro(S, Xe).then((K) => {
3262
- H.set(b, K), y((w) => w === P ? { ...P, reading: K } : w);
3274
+ oo(S, Xe).then((K) => {
3275
+ H.set(b, K), E((w) => w === P ? { ...P, reading: K } : w);
3263
3276
  });
3264
3277
  }, D = R === null ? null : R.reading === null ? "loading" : R.reading.kind === "refused" ? "unreadable" : xt(R.reading.table.rows) ? "empty" : "table", h = c === null ? m === null ? "loading" : "failure" : c.kind === "first-sheet" ? c.reading.kind : c.kind === "refused" ? "unreadable" : D ?? "loading", p = i === null ? a : st(a), x = (b) => `${f}-sheet-${b}`, A = `${f}-panel`, I = R === null ? null : O?.workbook.sheets[R.index]?.name ?? null, _ = O !== null && O.workbook.sheets.length > 1;
3265
- return /* @__PURE__ */ B(oo, { name: s, url: a, openUrl: p, state: h, children: [
3278
+ return /* @__PURE__ */ B(so, { name: s, url: a, openUrl: p, state: h, children: [
3266
3279
  c === null && m === null ? /* @__PURE__ */ d(Ce, { label: o.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3267
3280
  c === null && m !== null ? /* @__PURE__ */ d("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ d(Re, { failure: m, alert: !1, onRetry: g, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3268
3281
  c?.kind === "refused" ? /* @__PURE__ */ d(De, { note: zn(o, c.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: c.refusal, download: { url: a, name: s } }) : null,
3269
3282
  c?.kind === "first-sheet" ? /* @__PURE__ */ B(pe, { children: [
3270
3283
  /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-first-sheet", children: o.spreadsheetWorkbookFirstSheet }),
3271
- /* @__PURE__ */ d(ao, { reading: c.reading, name: s, url: a })
3284
+ /* @__PURE__ */ d(io, { reading: c.reading, name: s, url: a })
3272
3285
  ] }) : null,
3273
3286
  O === null || R === null || I === null ? null : /* @__PURE__ */ B(pe, { children: [
3274
3287
  O.workbook.unshownSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unshown-sheets", children: o.spreadsheetUnshownSheets(O.workbook.unshownSheets) }) : null,
3275
3288
  O.workbook.unlistedSheets > 0 ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unlisted-sheets", children: o.spreadsheetUnlistedSheets(O.workbook.sheets.length) }) : null,
3276
- _ ? /* @__PURE__ */ d(gl, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3289
+ _ ? /* @__PURE__ */ d(wl, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3277
3290
  /* @__PURE__ */ B("div", { className: "aqmx-document-spreadsheet-sheet", "data-testid": "markdown-explorer-spreadsheet-sheet", "data-aqmx-sheet": R.index, ..._ ? { role: "tabpanel", id: A, "aria-labelledby": x(R.index) } : {}, children: [
3278
3291
  R.reading === null ? /* @__PURE__ */ d(Ce, { label: o.spreadsheetSheetLoading, testId: "markdown-explorer-spreadsheet-sheet-skeleton" }) : null,
3279
3292
  R.reading?.kind === "table" && R.reading.table.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: o.spreadsheetTruncated }) : null,
3280
3293
  R.reading?.kind === "refused" ? /* @__PURE__ */ d(De, { note: zn(o, R.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: R.reading.refusal, download: { url: a, name: s } }) : null,
3281
3294
  R.reading?.kind === "table" && xt(R.reading.table.rows) ? /* @__PURE__ */ d(De, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3282
- R.reading?.kind === "table" && !xt(R.reading.table.rows) ? /* @__PURE__ */ d(so, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3295
+ R.reading?.kind === "table" && !xt(R.reading.table.rows) ? /* @__PURE__ */ d(ao, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3283
3296
  ] })
3284
3297
  ] })
3285
3298
  ] });
3286
- }, Oc = Object.freeze({ kind: "empty" }), Lc = (e, t, n) => {
3299
+ }, Lc = Object.freeze({ kind: "empty" }), Mc = (e, t, n) => {
3287
3300
  if (t.view === "multi" || t.overrides[n] === void 0) return null;
3288
3301
  const r = n === "style" ? { align: t.overrides.align } : { style: t.overrides.style };
3289
3302
  return Ne(e, { ...t, overrides: r });
@@ -3295,7 +3308,7 @@ const El = /* @__PURE__ */ new Map([
3295
3308
  i
3296
3309
  ] })
3297
3310
  );
3298
- }, Mc = ({ absence: e, announces: t, announceFailure: n }) => {
3311
+ }, Ac = ({ absence: e, announces: t, announceFailure: n }) => {
3299
3312
  const { labels: r, announcer: o } = $(), s = e.kind === "no-readme" ? e.folder : null, a = e.kind === "failure" ? e.folder : null, i = e.kind === "failure" ? e.failure : null;
3300
3313
  switch (ee(() => {
3301
3314
  t && s !== null && o.announce(r.folderReadmeMissing(fe(s)));
@@ -3314,29 +3327,29 @@ const El = /* @__PURE__ */ new Map([
3314
3327
  }, Yt = ({ label: e }) => {
3315
3328
  const { labels: t } = $();
3316
3329
  return /* @__PURE__ */ d(Pe, { kind: "loading", label: e, stale: !1, busy: !0, children: /* @__PURE__ */ d(Ce, { label: t.documentLoading, testId: "markdown-explorer-document-skeleton" }) });
3317
- }, jn = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), Ac = ({ path: e, document: t, viewer: n, editing: r }) => {
3318
- const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = zi(), f = ji(), u = X(() => o === void 0 ? void 0 : (h) => o(e, h), [o, e]), l = U(null), { editable: c, doubleClick: m, region: g, paneScroll: v, stale: y } = r;
3330
+ }, jn = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), Nc = ({ path: e, document: t, viewer: n, editing: r }) => {
3331
+ const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = ji(), f = Vi(), u = X(() => o === void 0 ? void 0 : (h) => o(e, h), [o, e]), l = U(null), { editable: c, doubleClick: m, region: g, paneScroll: v, stale: E } = r;
3319
3332
  Y(() => {
3320
3333
  if (c)
3321
3334
  return s.bindView(e, {
3322
3335
  anchor: () => {
3323
3336
  const h = l.current, p = g(), x = h === null ? null : h.querySelector(it);
3324
- return h === null || p === null || x === null ? null : fa(h, v.scrollerOf(p, x));
3337
+ return h === null || p === null || x === null ? null : ma(h, v.scrollerOf(p, x));
3325
3338
  }
3326
3339
  });
3327
3340
  }, [s, e, c, g, v]);
3328
3341
  const T = (h) => {
3329
3342
  const p = l.current, { target: x } = h;
3330
- !m || p === null || !(x instanceof Element) || !da(x) || (h.stopPropagation(), s.start(e, ua(x, p, p.ownerDocument.getSelection())));
3331
- }, O = U(null), R = U(y);
3343
+ !m || p === null || !(x instanceof Element) || !ua(x) || (h.stopPropagation(), s.start(e, fa(x, p, p.ownerDocument.getSelection())));
3344
+ }, O = U(null), R = U(E);
3332
3345
  Y(() => {
3333
- R.current = y;
3346
+ R.current = E;
3334
3347
  });
3335
3348
  const q = le((h) => {
3336
- const p = l.current, x = g(), A = p === null ? null : wa(p, h.line);
3349
+ const p = l.current, x = g(), A = p === null ? null : va(p, h.line);
3337
3350
  if (x === null || A === null) return !1;
3338
3351
  const I = v.scrollerOf(x, A);
3339
- return I.scrollTop += va(A, h.line) - h.clientTop, !0;
3352
+ return I.scrollTop += ba(A, h.line) - h.clientTop, !0;
3340
3353
  }), D = le((h) => {
3341
3354
  const p = g();
3342
3355
  if (p === null) return;
@@ -3355,13 +3368,13 @@ const El = /* @__PURE__ */ new Map([
3355
3368
  }), () => O.current?.release();
3356
3369
  }, [s, e]), Y(() => {
3357
3370
  const h = O.current;
3358
- h === null || y || (h.release(), q(h.point));
3359
- }, [t, y]),
3371
+ h === null || E || (h.release(), q(h.point));
3372
+ }, [t, E]),
3360
3373
  /* @__PURE__ */ d("div", { ref: l, className: "aqmx-document-viewer", onDoubleClick: T, children: /* @__PURE__ */ d(ir, { ...n, onHeadingSelect: i, headingHref: f, onMathDiagnostics: u, parseResult: a, content: null }) });
3361
- }, io = ({ document: e, viewer: t }) => {
3374
+ }, lo = ({ document: e, viewer: t }) => {
3362
3375
  const { labels: n } = $();
3363
3376
  return /* @__PURE__ */ B(pe, { children: [
3364
- /* @__PURE__ */ d(Ue, { name: e.name, openUrl: st(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ d(ta, {}), children: e.truncated ? null : /* @__PURE__ */ d(ja, { text: e.text }) }),
3377
+ /* @__PURE__ */ d(Ue, { name: e.name, openUrl: st(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ d(na, {}), children: e.truncated ? null : /* @__PURE__ */ d(Va, { text: e.text }) }),
3365
3378
  e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
3366
3379
  /* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(ir, { ...t, parseResult: null, content: e.text }) })
3367
3380
  ] });
@@ -3373,35 +3386,35 @@ const El = /* @__PURE__ */ new Map([
3373
3386
  },
3374
3387
  [r, e]
3375
3388
  ), { shown: a, failure: i, retry: f } = Wt(e, t, s);
3376
- return a !== null ? /* @__PURE__ */ d(io, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ d(jt, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ d(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3377
- }, Nc = Object.freeze({ reason: "failed" }), Dc = (e) => {
3389
+ return a !== null ? /* @__PURE__ */ d(lo, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ d(jt, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ d(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3390
+ }, Dc = Object.freeze({ reason: "failed" }), Pc = (e) => {
3378
3391
  const { labels: t } = $();
3379
3392
  return /* @__PURE__ */ d(
3380
- oa,
3393
+ sa,
3381
3394
  {
3382
- fallback: (n) => /* @__PURE__ */ d("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ d(Re, { failure: Nc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3383
- children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ d(ra, { ...e }) })
3395
+ fallback: (n) => /* @__PURE__ */ d("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ d(Re, { failure: Dc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3396
+ children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ d(oa, { ...e }) })
3384
3397
  }
3385
3398
  );
3386
- }, Pc = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3399
+ }, Ic = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3387
3400
  switch (t.kind) {
3388
3401
  case "markdown": {
3389
3402
  const { session: a, layout: i, region: f, paneScroll: u, stale: l } = s;
3390
- if (n === "edit" && a !== void 0) return /* @__PURE__ */ d(Dc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3403
+ if (n === "edit" && a !== void 0) return /* @__PURE__ */ d(Pc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3391
3404
  if (n === "markup") return /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r });
3392
3405
  const c = t.edit !== null && (t.edit.kind === "inline" || t.edit.kind === "draft");
3393
- return /* @__PURE__ */ d(Ac, { path: e, document: t, viewer: r, editing: { editable: c, doubleClick: c && i === "fill", region: f, paneScroll: u, stale: l } });
3406
+ return /* @__PURE__ */ d(Nc, { path: e, document: t, viewer: r, editing: { editable: c, doubleClick: c && i === "fill", region: f, paneScroll: u, stale: l } });
3394
3407
  }
3395
3408
  case "text":
3396
- return /* @__PURE__ */ d(io, { document: t, viewer: r });
3409
+ return /* @__PURE__ */ d(lo, { document: t, viewer: r });
3397
3410
  case "image":
3398
- return n === "markup" && Zt(t) === "svg" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Ai, { document: t });
3411
+ return n === "markup" && Zt(t) === "svg" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Ni, { document: t });
3399
3412
  case "media":
3400
- return /* @__PURE__ */ d(ol, { document: t });
3413
+ return /* @__PURE__ */ d(sl, { document: t });
3401
3414
  case "spreadsheet":
3402
- return n === "markup" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Tc, { path: e, document: t });
3415
+ return n === "markup" ? /* @__PURE__ */ d(Tt, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ d(Rc, { path: e, document: t });
3403
3416
  case "file":
3404
- return /* @__PURE__ */ d(Qa, { document: t });
3417
+ return /* @__PURE__ */ d(ei, { document: t });
3405
3418
  case "failure":
3406
3419
  return /* @__PURE__ */ d(jt, { failure: t.failure, onRetry: o, testId: "markdown-explorer-document-failure" });
3407
3420
  default: {
@@ -3409,15 +3422,15 @@ const El = /* @__PURE__ */ new Map([
3409
3422
  throw new RangeError(`[markdown-explorer] unknown document kind in ${JSON.stringify(a)}`);
3410
3423
  }
3411
3424
  }
3412
- }, Ic = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', $c = (e, t, n) => {
3413
- const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Pr(e, n), r === void 0 ? null : Dr(e, r.id), e.querySelector(it), e.querySelector(Ic)];
3425
+ }, $c = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', _c = (e, t, n) => {
3426
+ const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Ir(e, n), r === void 0 ? null : Pr(e, r.id), e.querySelector(it), e.querySelector($c)];
3414
3427
  for (const s of o)
3415
- if (s instanceof HTMLElement && xr(s)) return s;
3428
+ if (s instanceof HTMLElement && Tr(s)) return s;
3416
3429
  return null;
3417
3430
  }, Vn = (e, t, n) => {
3418
3431
  const { activeElement: r, body: o } = e.ownerDocument, s = r === null || r === o;
3419
- t instanceof HTMLElement && n && (s || e.contains(r)) && xr(t);
3420
- }, _c = (e) => {
3432
+ t instanceof HTMLElement && n && (s || e.contains(r)) && Tr(t);
3433
+ }, Fc = (e) => {
3421
3434
  const t = U(!1);
3422
3435
  return Y(() => {
3423
3436
  const n = e.current;
@@ -3443,8 +3456,8 @@ const El = /* @__PURE__ */ new Map([
3443
3456
  clearTimeout(a), o.removeEventListener("pointerdown", i, !0), o.removeEventListener("mousedown", i, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", l), o.removeEventListener("focus", c), n.removeEventListener("focusout", u);
3444
3457
  };
3445
3458
  }, [e]), t;
3446
- }, Fc = Object.freeze({ count: 0, recovered: !1 }), qc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: c, onDocumentShown: m }) => {
3447
- const { labels: g, announcer: v, documents: y } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), h = _c(O), p = U({ path: e, document: T }), x = U(null), A = F(
3459
+ }, qc = Object.freeze({ count: 0, recovered: !1 }), Bc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: c, onDocumentShown: m }) => {
3460
+ const { labels: g, announcer: v, documents: E } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), h = Fc(O), p = U({ path: e, document: T }), x = U(null), A = F(
3448
3461
  (j) => {
3449
3462
  const Z = O.current, Q = Rn(Z, j, u);
3450
3463
  Z !== null && Q !== null && Vn(Z, Q, h.current);
@@ -3465,23 +3478,23 @@ const El = /* @__PURE__ */ new Map([
3465
3478
  }, 0);
3466
3479
  },
3467
3480
  [A]
3468
- ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => y.retry(e), [y, e]), L = ya(y, $i), M = kr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = Zt(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), k = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Jt] = V(Fc), [Qt, fo] = V(0), en = U(c), tn = U(r);
3481
+ ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => E.retry(e), [E, e]), L = ya(E, _i), M = yr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = Zt(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), y = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Jt] = V(qc), [Qt, mo] = V(0), en = U(c), tn = U(r);
3469
3482
  Y(() => {
3470
3483
  en.current = c, tn.current = r;
3471
3484
  }, [c, r]);
3472
- const mo = X(
3485
+ const ho = X(
3473
3486
  () => ({
3474
3487
  announceFailure: (j) => {
3475
3488
  tn.current || en.current(j);
3476
3489
  },
3477
3490
  readPart: () => {
3478
- const j = y.readPart(e);
3491
+ const j = E.readPart(e);
3479
3492
  J.current += 1;
3480
3493
  let Z = !1, Q = !1, oe = !1;
3481
3494
  return {
3482
- settle: (be, ye) => {
3483
- if (j.settle(be, ye), !(oe || Z)) {
3484
- if (ye !== null) {
3495
+ settle: (be, Ee) => {
3496
+ if (j.settle(be, Ee), !(oe || Z)) {
3497
+ if (Ee !== null) {
3485
3498
  Q = !0, G.current = !1;
3486
3499
  return;
3487
3500
  }
@@ -3489,7 +3502,7 @@ const El = /* @__PURE__ */ new Map([
3489
3502
  }
3490
3503
  },
3491
3504
  release: () => {
3492
- oe || (oe = !0, j.release(), J.current -= 1, Z || fo((be) => be + 1));
3505
+ oe || (oe = !0, j.release(), J.current -= 1, Z || mo((be) => be + 1));
3493
3506
  }
3494
3507
  };
3495
3508
  },
@@ -3501,45 +3514,45 @@ const El = /* @__PURE__ */ new Map([
3501
3514
  };
3502
3515
  }
3503
3516
  }),
3504
- [y, e]
3505
- ), nn = k || z > 0, ho = le((j, Z) => {
3517
+ [E, e]
3518
+ ), nn = y || z > 0, po = le((j, Z) => {
3506
3519
  const Q = R.current;
3507
3520
  if (Q !== null && Q.path === j && Q.snapshot === Z) return;
3508
- R.current = { path: j, snapshot: Z }, y.noteShown(j, Z);
3521
+ R.current = { path: j, snapshot: Z }, E.noteShown(j, Z);
3509
3522
  const oe = Z.document;
3510
3523
  if (oe.kind === "failure") {
3511
- G.current = !1, y.noteFailureShown(Z) && c(g.documentFailed(fe(j), de(g, oe.failure.reason)));
3524
+ G.current = !1, E.noteFailureShown(Z) && c(g.documentFailed(fe(j), de(g, oe.failure.reason)));
3512
3525
  return;
3513
3526
  }
3514
3527
  m?.(j, oe), !(!l || Q !== null && Q.path === j && Q.snapshot.document.kind !== "failure") && (G.current = J.current > 0, G.current || v.announce(g.documentShown(oe.name)));
3515
3528
  });
3516
3529
  ee(() => {
3517
- ho(e, t);
3530
+ po(e, t);
3518
3531
  }, [e, t]);
3519
- const po = le(() => {
3532
+ const go = le(() => {
3520
3533
  f.kind === "panel" && f.consume();
3521
3534
  }), rn = le((j) => {
3522
3535
  const Z = O.current;
3523
3536
  if (Z === null || !h.current) return null;
3524
3537
  const { activeElement: Q, body: oe } = Z.ownerDocument;
3525
- return Q !== null && Q !== oe ? null : $c(Z, T, j);
3526
- }), go = le((j) => {
3538
+ return Q !== null && Q !== oe ? null : _c(Z, T, j);
3539
+ }), wo = le((j) => {
3527
3540
  const Z = G.current;
3528
3541
  G.current = !1, !r && (j && rn(null), l && (j || Z) && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3529
3542
  });
3530
3543
  ee(() => {
3531
- ie.count > 0 && go(ie.recovered);
3544
+ ie.count > 0 && wo(ie.recovered);
3532
3545
  }, [ie]);
3533
- const wo = le(() => {
3546
+ const vo = le(() => {
3534
3547
  J.current > 0 || !G.current || (G.current = !1, l && !r && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3535
3548
  });
3536
3549
  ee(() => {
3537
- Qt > 0 && wo();
3550
+ Qt > 0 && vo();
3538
3551
  }, [Qt]);
3539
- const vo = le((j) => {
3552
+ const bo = le((j) => {
3540
3553
  const Z = O.current;
3541
3554
  Z !== null && Vn(Z, j, h.current);
3542
- }), bo = le((j) => u.reveal(j)), yo = le((j) => Rn(O.current, j, u));
3555
+ }), Eo = le((j) => u.reveal(j)), yo = le((j) => Rn(O.current, j, u));
3543
3556
  return ee(() => {
3544
3557
  if (r) return;
3545
3558
  const j = p.current.path !== e, Z = j || p.current.document !== T;
@@ -3547,50 +3560,50 @@ const El = /* @__PURE__ */ new Map([
3547
3560
  const Q = x.current !== e;
3548
3561
  x.current = e;
3549
3562
  let oe = null;
3550
- f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, oe = f.fragment) : f.fragment !== null && (oe = f.fragment, po());
3563
+ f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, oe = f.fragment) : f.fragment !== null && (oe = f.fragment, go());
3551
3564
  const be = () => {
3552
- const ye = oe === null ? null : yo(oe);
3565
+ const Ee = oe === null ? null : yo(oe);
3553
3566
  if (!Z) {
3554
- ye !== null && vo(ye);
3567
+ Ee !== null && bo(Ee);
3555
3568
  return;
3556
3569
  }
3557
3570
  const ze = rn(f.fragment);
3558
- j && ye === null && ze !== null && bo(ze);
3571
+ j && Ee === null && ze !== null && Eo(ze);
3559
3572
  };
3560
3573
  Q ? queueMicrotask(be) : be();
3561
- }, [f, e, T, r]), /* @__PURE__ */ d(we, { value: N, children: /* @__PURE__ */ d(Pe, { kind: T.kind, view: H, label: a(e, T), stale: nn, busy: nn, frameRef: O, intent: L, children: /* @__PURE__ */ d($r, { value: b, children: /* @__PURE__ */ d(Pi, { children: /* @__PURE__ */ d(Ar, { value: mo, children: /* @__PURE__ */ d(Pc, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3562
- }, Xt = Object.freeze({ kind: "skeleton" }), Bc = (e, t, n, r, o) => {
3574
+ }, [f, e, T, r]), /* @__PURE__ */ d(we, { value: N, children: /* @__PURE__ */ d(Pe, { kind: T.kind, view: H, label: a(e, T), stale: nn, busy: nn, frameRef: O, intent: L, children: /* @__PURE__ */ d(_r, { value: b, children: /* @__PURE__ */ d(Ii, { children: /* @__PURE__ */ d(Nr, { value: ho, children: /* @__PURE__ */ d(Ic, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3575
+ }, Xt = Object.freeze({ kind: "skeleton" }), Uc = (e, t, n, r, o) => {
3563
3576
  if (t?.status === "loaded") return { kind: "document", path: e, snapshot: t, stale: !1 };
3564
3577
  const s = ge(t);
3565
3578
  if (s !== null) return { kind: "document", path: e, snapshot: s, stale: !0 };
3566
3579
  if (o && t?.status === "pending") return { kind: "streaming", path: e, promise: t.promise };
3567
3580
  const a = n === null || n === e ? null : ge(r);
3568
3581
  return n === null || a === null ? Xt : { kind: "document", path: n, snapshot: a, stale: !0 };
3569
- }, Uc = (e, t) => t.status === "deferred" ? Xt : { kind: "document", path: e, snapshot: t, stale: !1 }, Hc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3570
- const o = t.kind === "streaming" ? Uc(t.path, se(t.promise)) : t;
3571
- return o.kind !== "document" ? /* @__PURE__ */ d(Yt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ d(qc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3572
- }, lo = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3573
- const { config: l, labels: c, locale: m, theme: g, documents: v, data: y } = $(), T = is(), O = U(!1);
3582
+ }, Hc = (e, t) => t.status === "deferred" ? Xt : { kind: "document", path: e, snapshot: t, stale: !1 }, zc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3583
+ const o = t.kind === "streaming" ? Hc(t.path, se(t.promise)) : t;
3584
+ return o.kind !== "document" ? /* @__PURE__ */ d(Yt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ d(Bc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3585
+ }, co = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3586
+ const { config: l, labels: c, locale: m, theme: g, documents: v, data: E } = $(), T = ls(), O = U(!1);
3574
3587
  Y(() => {
3575
3588
  O.current = !0;
3576
3589
  }, []);
3577
3590
  const [R, q] = V(null), [D, h] = V(n), p = F(() => e === null ? void 0 : v.peek(e), [v, e]), x = re(v.subscribe, p, p), A = F(() => R === null ? void 0 : v.peek(R), [v, R]), I = re(v.subscribe, A, A);
3578
3591
  Y(() => e === null ? void 0 : v.open(e), [v, e]), Y(() => R === null ? void 0 : v.retain(R), [v, R]);
3579
- const _ = e === null ? Xt : Bc(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3592
+ const _ = e === null ? Xt : Uc(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3580
3593
  b !== R && q(b);
3581
3594
  const S = _.kind !== "document" || _.path === e;
3582
3595
  S && n !== D && h(n);
3583
- const L = X(() => kl(c, m), [c, m]), M = X(() => ({ read: (C, N) => Ni(y, C, N) }), [y]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3596
+ const L = X(() => kl(c, m), [c, m]), M = X(() => ({ read: (C, N) => Di(E, C, N) }), [E]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3584
3597
  () => ({
3585
3598
  labels: L,
3586
3599
  spreadsheetLocale: m,
3587
- spreadsheetTapScrollCircle: Lr,
3600
+ spreadsheetTapScrollCircle: Mr,
3588
3601
  emptyMessage: c.documentEmpty,
3589
3602
  theme: g,
3590
3603
  availableStyles: l.documentStyles,
3591
3604
  iFrameAllowedDomains: P,
3592
3605
  embeds: l.embeds,
3593
- linkComponent: Hi,
3606
+ linkComponent: zi,
3594
3607
  toolbar: T,
3595
3608
  style: r.style,
3596
3609
  onStyleChange: r.onStyleChange,
@@ -3602,14 +3615,14 @@ const El = /* @__PURE__ */ new Map([
3602
3615
  padding: r.padding,
3603
3616
  width: r.width === void 0 ? void 0 : `min(${r.width}, 100%)`,
3604
3617
  maxWidth: r.maxWidth === void 0 ? void 0 : `min(${r.maxWidth}, 100%)`,
3605
- renderScrollBar: H ? void 0 : Tr,
3606
- scrollBarGutter: H ? void 0 : Cr,
3618
+ renderScrollBar: H ? void 0 : Rr,
3619
+ scrollBarGutter: H ? void 0 : Or,
3607
3620
  imageSource: M
3608
3621
  }),
3609
3622
  [L, m, c.documentEmpty, g, l.documentStyles, P, l.embeds, T, r, H, M]
3610
- ), w = F((C, N) => H ? N === null || N.kind === "failure" ? fe(C) : N.name : c.documentRegion, [H, c.documentRegion]), k = H ? "content" : "fill";
3611
- return e === null ? /* @__PURE__ */ d(we, { value: k, children: /* @__PURE__ */ d(Mc, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ d(we, { value: k, children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Yt, { label: w(e, null) }), children: /* @__PURE__ */ d(
3612
- Hc,
3623
+ ), w = F((C, N) => H ? N === null || N.kind === "failure" ? fe(C) : N.name : c.documentRegion, [H, c.documentRegion]), y = H ? "content" : "fill";
3624
+ return e === null ? /* @__PURE__ */ d(we, { value: y, children: /* @__PURE__ */ d(Ac, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ d(we, { value: y, children: /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d(Yt, { label: w(e, null) }), children: /* @__PURE__ */ d(
3625
+ zc,
3613
3626
  {
3614
3627
  requestedPath: e,
3615
3628
  content: _,
@@ -3625,11 +3638,11 @@ const El = /* @__PURE__ */ new Map([
3625
3638
  onDocumentShown: u
3626
3639
  }
3627
3640
  ) }) });
3628
- }, zc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3629
- const { config: s, viewSettings: a, announcer: i } = $(), f = Qe((I) => I.style), u = Qe((I) => I.align), l = at(), c = rr(), m = Bt(), { view: g, overrides: v, embed: y } = r, T = F(
3641
+ }, jc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3642
+ const { config: s, viewSettings: a, announcer: i } = $(), f = Qe((I) => I.style), u = Qe((I) => I.align), l = at(), c = rr(), m = Bt(), { view: g, overrides: v, embed: E } = r, T = F(
3630
3643
  (I) => {
3631
3644
  if (m.kind !== "location") return;
3632
- const _ = Lc(s, m.location, I);
3645
+ const _ = Mc(s, m.location, I);
3633
3646
  _ !== null && l(_, "browse");
3634
3647
  },
3635
3648
  [s, l, m]
@@ -3643,25 +3656,25 @@ const El = /* @__PURE__ */ new Map([
3643
3656
  a.update({ align: I }), T("align");
3644
3657
  },
3645
3658
  [a, T]
3646
- ), q = Zr(s, v.style, f), D = Wr(v.align, u), h = X(
3659
+ ), q = Wr(s, v.style, f), D = Gr(v.align, u), h = X(
3647
3660
  () => ({
3648
3661
  style: q,
3649
3662
  onStyleChange: O,
3650
3663
  align: D,
3651
3664
  onAlignChange: R,
3652
- showToc: y.showToc !== !1,
3653
- showStyle: y.showStyle !== !1,
3654
- showAlign: y.showAlign !== !1,
3655
- padding: y.padding,
3656
- width: y.width,
3657
- maxWidth: y.maxWidth,
3665
+ showToc: E.showToc !== !1,
3666
+ showStyle: E.showStyle !== !1,
3667
+ showAlign: E.showAlign !== !1,
3668
+ padding: E.padding,
3669
+ width: E.width,
3670
+ maxWidth: E.maxWidth,
3658
3671
  editLayout: "fill"
3659
3672
  }),
3660
- [q, O, D, R, y]
3661
- ), p = X(() => ({ kind: "page", view: g, overrides: v, embed: y }), [g, v, y]), x = X(() => ({ kind: "page", fragment: c.hash, navigation: c }), [c]), A = F((I) => i.announce(I), [i]);
3662
- return /* @__PURE__ */ d(lo, { path: e, absence: t, markup: n, display: h, navigation: p, fragment: x, paneScroll: fi, announces: !0, announceFailure: A, onDocumentShown: o });
3663
- }, jc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3664
- const { config: s, viewSettings: a } = $(), i = Qe((p) => p.style), f = Qe((p) => p.align), [u, l] = V(() => Zr(s, void 0, i)), c = Wr(void 0, f), m = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: y, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3673
+ [q, O, D, R, E]
3674
+ ), p = X(() => ({ kind: "page", view: g, overrides: v, embed: E }), [g, v, E]), x = X(() => ({ kind: "page", fragment: c.hash, navigation: c }), [c]), A = F((I) => i.announce(I), [i]);
3675
+ return /* @__PURE__ */ d(co, { path: e, absence: t, markup: n, display: h, navigation: p, fragment: x, paneScroll: mi, announces: !0, announceFailure: A, onDocumentShown: o });
3676
+ }, Vc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3677
+ const { config: s, viewSettings: a } = $(), i = Qe((p) => p.style), f = Qe((p) => p.align), [u, l] = V(() => Wr(s, void 0, i)), c = Gr(void 0, f), m = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: E, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3665
3678
  () => ({
3666
3679
  style: u,
3667
3680
  onStyleChange: l,
@@ -3676,15 +3689,15 @@ const El = /* @__PURE__ */ new Map([
3676
3689
  editLayout: g ? "fill" : "content"
3677
3690
  }),
3678
3691
  [u, c, m, g]
3679
- ), D = X(() => ({ kind: "panel", onDocumentLink: v }), [v]), h = X(() => ({ kind: "panel", fragment: y, consume: T }), [y, T]);
3680
- return /* @__PURE__ */ d(lo, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: h, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3681
- }, Vc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ d(zc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ d(jc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3682
- function Zc({
3692
+ ), D = X(() => ({ kind: "panel", onDocumentLink: v }), [v]), h = X(() => ({ kind: "panel", fragment: E, consume: T }), [E, T]);
3693
+ return /* @__PURE__ */ d(co, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: h, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3694
+ }, Zc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ d(jc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ d(Vc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3695
+ function Wc({
3683
3696
  title: e,
3684
3697
  titleId: t,
3685
3698
  ...n
3686
3699
  }, r) {
3687
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3700
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3688
3701
  xmlns: "http://www.w3.org/2000/svg",
3689
3702
  viewBox: "0 0 24 24",
3690
3703
  fill: "currentColor",
@@ -3692,21 +3705,21 @@ function Zc({
3692
3705
  "data-slot": "icon",
3693
3706
  ref: r,
3694
3707
  "aria-labelledby": t
3695
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3708
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3696
3709
  id: t
3697
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3710
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3698
3711
  fillRule: "evenodd",
3699
3712
  d: "M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",
3700
3713
  clipRule: "evenodd"
3701
3714
  }));
3702
3715
  }
3703
- const Wc = /* @__PURE__ */ E.forwardRef(Zc);
3704
- function Gc({
3716
+ const Gc = /* @__PURE__ */ k.forwardRef(Wc);
3717
+ function Kc({
3705
3718
  title: e,
3706
3719
  titleId: t,
3707
3720
  ...n
3708
3721
  }, r) {
3709
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3722
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3710
3723
  xmlns: "http://www.w3.org/2000/svg",
3711
3724
  viewBox: "0 0 24 24",
3712
3725
  fill: "currentColor",
@@ -3714,21 +3727,21 @@ function Gc({
3714
3727
  "data-slot": "icon",
3715
3728
  ref: r,
3716
3729
  "aria-labelledby": t
3717
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3730
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3718
3731
  id: t
3719
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3732
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3720
3733
  fillRule: "evenodd",
3721
3734
  d: "M14.447 3.026a.75.75 0 0 1 .527.921l-4.5 16.5a.75.75 0 0 1-1.448-.394l4.5-16.5a.75.75 0 0 1 .921-.527ZM16.72 6.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 0 1 0-1.06Zm-9.44 0a.75.75 0 0 1 0 1.06L2.56 12l4.72 4.72a.75.75 0 0 1-1.06 1.06L.97 12.53a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z",
3722
3735
  clipRule: "evenodd"
3723
3736
  }));
3724
3737
  }
3725
- const co = /* @__PURE__ */ E.forwardRef(Gc);
3726
- function Kc({
3738
+ const uo = /* @__PURE__ */ k.forwardRef(Kc);
3739
+ function Yc({
3727
3740
  title: e,
3728
3741
  titleId: t,
3729
3742
  ...n
3730
3743
  }, r) {
3731
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3744
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3732
3745
  xmlns: "http://www.w3.org/2000/svg",
3733
3746
  viewBox: "0 0 24 24",
3734
3747
  fill: "currentColor",
@@ -3736,21 +3749,21 @@ function Kc({
3736
3749
  "data-slot": "icon",
3737
3750
  ref: r,
3738
3751
  "aria-labelledby": t
3739
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3752
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3740
3753
  id: t
3741
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3754
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3742
3755
  fillRule: "evenodd",
3743
3756
  d: "M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",
3744
3757
  clipRule: "evenodd"
3745
3758
  }));
3746
3759
  }
3747
- const Yc = /* @__PURE__ */ E.forwardRef(Kc);
3748
- function Xc({
3760
+ const Xc = /* @__PURE__ */ k.forwardRef(Yc);
3761
+ function Jc({
3749
3762
  title: e,
3750
3763
  titleId: t,
3751
3764
  ...n
3752
3765
  }, r) {
3753
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3766
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3754
3767
  xmlns: "http://www.w3.org/2000/svg",
3755
3768
  viewBox: "0 0 24 24",
3756
3769
  fill: "currentColor",
@@ -3758,25 +3771,25 @@ function Xc({
3758
3771
  "data-slot": "icon",
3759
3772
  ref: r,
3760
3773
  "aria-labelledby": t
3761
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3774
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3762
3775
  id: t
3763
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3776
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3764
3777
  fillRule: "evenodd",
3765
3778
  d: "M11.47 13.28a.75.75 0 0 0 1.06 0l7.5-7.5a.75.75 0 0 0-1.06-1.06L12 11.69 5.03 4.72a.75.75 0 0 0-1.06 1.06l7.5 7.5Z",
3766
3779
  clipRule: "evenodd"
3767
- }), /* @__PURE__ */ E.createElement("path", {
3780
+ }), /* @__PURE__ */ k.createElement("path", {
3768
3781
  fillRule: "evenodd",
3769
3782
  d: "M11.47 19.28a.75.75 0 0 0 1.06 0l7.5-7.5a.75.75 0 1 0-1.06-1.06L12 17.69l-6.97-6.97a.75.75 0 0 0-1.06 1.06l7.5 7.5Z",
3770
3783
  clipRule: "evenodd"
3771
3784
  }));
3772
3785
  }
3773
- const Jc = /* @__PURE__ */ E.forwardRef(Xc);
3774
- function Qc({
3786
+ const Qc = /* @__PURE__ */ k.forwardRef(Jc);
3787
+ function ed({
3775
3788
  title: e,
3776
3789
  titleId: t,
3777
3790
  ...n
3778
3791
  }, r) {
3779
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3792
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3780
3793
  xmlns: "http://www.w3.org/2000/svg",
3781
3794
  viewBox: "0 0 24 24",
3782
3795
  fill: "currentColor",
@@ -3784,21 +3797,21 @@ function Qc({
3784
3797
  "data-slot": "icon",
3785
3798
  ref: r,
3786
3799
  "aria-labelledby": t
3787
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3800
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3788
3801
  id: t
3789
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3802
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3790
3803
  fillRule: "evenodd",
3791
3804
  d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z",
3792
3805
  clipRule: "evenodd"
3793
3806
  }));
3794
3807
  }
3795
- const ed = /* @__PURE__ */ E.forwardRef(Qc);
3796
- function td({
3808
+ const td = /* @__PURE__ */ k.forwardRef(ed);
3809
+ function nd({
3797
3810
  title: e,
3798
3811
  titleId: t,
3799
3812
  ...n
3800
3813
  }, r) {
3801
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3814
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3802
3815
  xmlns: "http://www.w3.org/2000/svg",
3803
3816
  viewBox: "0 0 24 24",
3804
3817
  fill: "currentColor",
@@ -3806,23 +3819,23 @@ function td({
3806
3819
  "data-slot": "icon",
3807
3820
  ref: r,
3808
3821
  "aria-labelledby": t
3809
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3822
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3810
3823
  id: t
3811
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3824
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3812
3825
  fillRule: "evenodd",
3813
3826
  d: "M9 1.5H5.625c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5Zm6.61 10.936a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 14.47a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
3814
3827
  clipRule: "evenodd"
3815
- }), /* @__PURE__ */ E.createElement("path", {
3828
+ }), /* @__PURE__ */ k.createElement("path", {
3816
3829
  d: "M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"
3817
3830
  }));
3818
3831
  }
3819
- const nd = /* @__PURE__ */ E.forwardRef(td);
3820
- function rd({
3832
+ const rd = /* @__PURE__ */ k.forwardRef(nd);
3833
+ function od({
3821
3834
  title: e,
3822
3835
  titleId: t,
3823
3836
  ...n
3824
3837
  }, r) {
3825
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3838
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3826
3839
  xmlns: "http://www.w3.org/2000/svg",
3827
3840
  viewBox: "0 0 24 24",
3828
3841
  fill: "currentColor",
@@ -3830,23 +3843,23 @@ function rd({
3830
3843
  "data-slot": "icon",
3831
3844
  ref: r,
3832
3845
  "aria-labelledby": t
3833
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3846
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3834
3847
  id: t
3835
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3848
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3836
3849
  d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
3837
- }), /* @__PURE__ */ E.createElement("path", {
3850
+ }), /* @__PURE__ */ k.createElement("path", {
3838
3851
  fillRule: "evenodd",
3839
3852
  d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z",
3840
3853
  clipRule: "evenodd"
3841
3854
  }));
3842
3855
  }
3843
- const od = /* @__PURE__ */ E.forwardRef(rd);
3844
- function sd({
3856
+ const sd = /* @__PURE__ */ k.forwardRef(od);
3857
+ function ad({
3845
3858
  title: e,
3846
3859
  titleId: t,
3847
3860
  ...n
3848
3861
  }, r) {
3849
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3862
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3850
3863
  xmlns: "http://www.w3.org/2000/svg",
3851
3864
  viewBox: "0 0 24 24",
3852
3865
  fill: "currentColor",
@@ -3854,21 +3867,21 @@ function sd({
3854
3867
  "data-slot": "icon",
3855
3868
  ref: r,
3856
3869
  "aria-labelledby": t
3857
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3870
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3858
3871
  id: t
3859
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3872
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3860
3873
  d: "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"
3861
- }), /* @__PURE__ */ E.createElement("path", {
3874
+ }), /* @__PURE__ */ k.createElement("path", {
3862
3875
  d: "M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"
3863
3876
  }));
3864
3877
  }
3865
- const ad = /* @__PURE__ */ E.forwardRef(sd);
3866
- function id({
3878
+ const id = /* @__PURE__ */ k.forwardRef(ad);
3879
+ function ld({
3867
3880
  title: e,
3868
3881
  titleId: t,
3869
3882
  ...n
3870
3883
  }, r) {
3871
- return /* @__PURE__ */ E.createElement("svg", Object.assign({
3884
+ return /* @__PURE__ */ k.createElement("svg", Object.assign({
3872
3885
  xmlns: "http://www.w3.org/2000/svg",
3873
3886
  viewBox: "0 0 24 24",
3874
3887
  fill: "currentColor",
@@ -3876,13 +3889,13 @@ function id({
3876
3889
  "data-slot": "icon",
3877
3890
  ref: r,
3878
3891
  "aria-labelledby": t
3879
- }, n), e ? /* @__PURE__ */ E.createElement("title", {
3892
+ }, n), e ? /* @__PURE__ */ k.createElement("title", {
3880
3893
  id: t
3881
- }, e) : null, /* @__PURE__ */ E.createElement("path", {
3894
+ }, e) : null, /* @__PURE__ */ k.createElement("path", {
3882
3895
  d: "M15 3.75H9v16.5h6V3.75ZM16.5 20.25h3.375c1.035 0 1.875-.84 1.875-1.875V5.625c0-1.036-.84-1.875-1.875-1.875H16.5v16.5ZM4.125 3.75H7.5v16.5H4.125a1.875 1.875 0 0 1-1.875-1.875V5.625c0-1.036.84-1.875 1.875-1.875Z"
3883
3896
  }));
3884
3897
  }
3885
- const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId: n }) => {
3898
+ const cd = /* @__PURE__ */ k.forwardRef(ld), dd = ({ href: e, onRetry: t, testId: n }) => {
3886
3899
  const { labels: r, onEditGrant: o } = $(), [s, a] = V(!1), i = () => {
3887
3900
  o === void 0 || s || (a(!0), o(e).then((f) => {
3888
3901
  f && t();
@@ -3898,22 +3911,22 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3898
3911
  /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "data-testid": `${n}-retry`, onClick: t, children: r.editGrantRetry })
3899
3912
  ] })
3900
3913
  ] });
3901
- }, dd = "Control+E Meta+E", ud = (e, t, n) => n && t ? "split" : e.view, Zn = (e, t, n, r) => {
3914
+ }, ud = "Control+E Meta+E", fd = (e, t, n) => n && t ? "split" : e.view, Zn = (e, t, n, r) => {
3902
3915
  if (n === "split") {
3903
3916
  e.setSideBySide(!0);
3904
3917
  return;
3905
3918
  }
3906
3919
  e.setView(t, n), r && e.sideBySide() && e.setSideBySide(!1);
3907
- }, Mu = (e) => e === "split" ? null : e, fd = (e) => e === "preview" ? "editor" : "preview", md = (e) => /Mac|iPhone|iPad|iPod/u.test(e), hd = (e, t) => {
3920
+ }, Nu = (e) => e === "split" ? null : e, md = (e) => e === "preview" ? "editor" : "preview", hd = (e) => /Mac|iPhone|iPad|iPod/u.test(e), pd = (e, t) => {
3908
3921
  if (e.isComposing || e.altKey || e.shiftKey || (t ? !e.metaKey || e.ctrlKey : !e.ctrlKey || e.metaKey)) return !1;
3909
3922
  const n = e.key.toLowerCase();
3910
3923
  return n === "e" || e.code === "KeyE" && /^\p{L}$/u.test(n) && !/^[a-z]$/u.test(n);
3911
3924
  }, Wn = (e, t, n) => {
3912
3925
  const r = e.modifiedAt === null ? Number.NaN : Date.parse(e.modifiedAt);
3913
3926
  return n(Number.isNaN(r) ? e.id : t.format(r), e.author === null ? "" : e.author);
3914
- }, pd = ({ path: e, documentName: t, open: n, onClose: r }) => {
3915
- const { data: o, edits: s, labels: a, locale: i, announcer: f } = $(), u = Te(), [l, c] = V(null), [m, g] = V(0), [v, y] = V(null), [T, O] = V(null), R = X(() => new Intl.DateTimeFormat(i, { dateStyle: "medium", timeStyle: "short" }), [i]), q = F(() => {
3916
- y(null), O(null);
3927
+ }, gd = ({ path: e, documentName: t, open: n, onClose: r }) => {
3928
+ const { data: o, edits: s, labels: a, locale: i, announcer: f } = $(), u = Te(), [l, c] = V(null), [m, g] = V(0), [v, E] = V(null), [T, O] = V(null), R = X(() => new Intl.DateTimeFormat(i, { dateStyle: "medium", timeStyle: "short" }), [i]), q = F(() => {
3929
+ E(null), O(null);
3917
3930
  }, []), D = vr({ open: n, onOpen: q, onDismiss: r });
3918
3931
  ee(() => {
3919
3932
  if (!n) return;
@@ -3933,7 +3946,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3933
3946
  }, p = l !== null && l.kind === "revisions" ? l.revisions.find((x) => x.id === v) : void 0;
3934
3947
  return /* @__PURE__ */ d("dialog", { ...D, className: "aqmx-confirm aqmx-history", "aria-labelledby": u, "data-testid": "markdown-explorer-history", children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel aqmx-history-panel", children: [
3935
3948
  /* @__PURE__ */ d("p", { id: u, className: "aqmx-confirm-title", children: a.historyTitle(t) }),
3936
- l === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: a.historyLoading }) : l.kind === "failure" ? /* @__PURE__ */ d(Re, { failure: l.failure, alert: !1, onRetry: () => g((x) => x + 1), testId: "markdown-explorer-history-failure" }) : l.revisions.length === 0 ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: a.historyEmpty }) : /* @__PURE__ */ d("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: l.revisions.map((x) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ B("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": x.id === v, "data-testid": "markdown-explorer-history-entry", onClick: () => y(x.id), children: [
3949
+ l === null ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: a.historyLoading }) : l.kind === "failure" ? /* @__PURE__ */ d(Re, { failure: l.failure, alert: !1, onRetry: () => g((x) => x + 1), testId: "markdown-explorer-history-failure" }) : l.revisions.length === 0 ? /* @__PURE__ */ d("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: a.historyEmpty }) : /* @__PURE__ */ d("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: l.revisions.map((x) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ B("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": x.id === v, "data-testid": "markdown-explorer-history-entry", onClick: () => E(x.id), children: [
3937
3950
  /* @__PURE__ */ d("span", { children: Wn(x, R, a.historyEntry) }),
3938
3951
  x.current ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: a.historyCurrent }) : null,
3939
3952
  x.kept ? /* @__PURE__ */ d("span", { className: "aqmx-history-mark", children: a.historyKept }) : null
@@ -3946,12 +3959,12 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3946
3959
  /* @__PURE__ */ d("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": T === null || T.kind !== "revision", "data-testid": "markdown-explorer-history-restore", onClick: h, children: a.historyRestore })
3947
3960
  ] })
3948
3961
  ] }) });
3949
- }, gd = (e) => {
3962
+ }, wd = (e) => {
3950
3963
  const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o)?.document;
3951
3964
  return s === void 0 || s.kind === "failure" ? { edit: null, name: fe(e) } : { edit: s.kind === "markdown" || s.kind === "spreadsheet" ? s.edit : null, name: s.name };
3952
3965
  }, me = (e) => {
3953
3966
  e.stopPropagation();
3954
- }, wd = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3967
+ }, vd = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3955
3968
  const { draftConverter: s, edits: a, labels: i } = $(), f = re(
3956
3969
  a.subscribe,
3957
3970
  () => a.session(e) !== void 0,
@@ -3962,10 +3975,10 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3962
3975
  return;
3963
3976
  }
3964
3977
  a.flush(e);
3965
- const y = a.session(e);
3966
- y?.dirty === !0 ? l(y.save.kind === "draft" ? "draft" : "unsaved") : a.close(e);
3978
+ const E = a.session(e);
3979
+ E?.dirty === !0 ? l(E.save.kind === "draft" ? "draft" : "unsaved") : a.close(e);
3967
3980
  }, m = () => {
3968
- f || (na(), r && a.sideBySide() && s?.prepare?.());
3981
+ f || (ra(), r && a.sideBySide() && s?.prepare?.());
3969
3982
  }, g = n ? o ? i.editDraftDocumentNamed(t) : i.editDocumentNamed(t) : null, v = o ? i.editDraftDocument : i.editDocument;
3970
3983
  return /* @__PURE__ */ B(pe, { children: [
3971
3984
  /* @__PURE__ */ B(
@@ -3982,7 +3995,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
3982
3995
  onPointerEnter: m,
3983
3996
  onFocus: m,
3984
3997
  children: [
3985
- /* @__PURE__ */ d(ad, { "aria-hidden": "true" }),
3998
+ /* @__PURE__ */ d(id, { "aria-hidden": "true" }),
3986
3999
  g === null ? /* @__PURE__ */ d("span", { children: i.editDocumentLabel }) : null
3987
4000
  ]
3988
4001
  }
@@ -4003,7 +4016,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4003
4016
  }
4004
4017
  )
4005
4018
  ] });
4006
- }, vd = ({ href: e, documentName: t, iconOnly: n }) => {
4019
+ }, bd = ({ href: e, documentName: t, iconOnly: n }) => {
4007
4020
  const { labels: r } = $(), o = n ? r.editExternallyNamed(t) : null;
4008
4021
  return /* @__PURE__ */ B(
4009
4022
  "a",
@@ -4017,29 +4030,29 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4017
4030
  "data-testid": "markdown-explorer-document-edit-external",
4018
4031
  onDoubleClick: me,
4019
4032
  children: [
4020
- /* @__PURE__ */ d(Yc, { "aria-hidden": "true" }),
4033
+ /* @__PURE__ */ d(Xc, { "aria-hidden": "true" }),
4021
4034
  o === null ? /* @__PURE__ */ d("span", { children: r.editExternallyLabel }) : null
4022
4035
  ]
4023
4036
  }
4024
4037
  );
4025
- }, bd = ({ session: e }) => {
4026
- const { labels: t } = $(), n = Ts(t, e);
4038
+ }, Ed = ({ session: e }) => {
4039
+ const { labels: t } = $(), n = Rs(t, e);
4027
4040
  return /* @__PURE__ */ d("p", { className: "aqmx-edit-status", title: n === "" ? void 0 : n, "data-testid": "markdown-explorer-edit-status", "data-aqmx-save": e.save.kind, children: n });
4028
- }, yd = Object.freeze(["editor", "split", "preview"]), kd = Object.freeze(["editor", "preview"]), Ed = Object.freeze({ editor: co, split: ld, preview: od }), Sd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4029
- const { draftConverter: s, edits: a, labels: i } = $(), f = Xs(), u = ud(r, f, o), l = o ? yd : kd, c = Te(), m = U(/* @__PURE__ */ new Map()), g = {
4041
+ }, yd = Object.freeze(["editor", "split", "preview"]), kd = Object.freeze(["editor", "preview"]), Sd = Object.freeze({ editor: uo, split: cd, preview: sd }), xd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4042
+ const { draftConverter: s, edits: a, labels: i } = $(), f = Js(), u = fd(r, f, o), l = o ? yd : kd, c = Te(), m = U(/* @__PURE__ */ new Map()), g = {
4030
4043
  editor: { label: i.editViewEditor, tooltip: i.editViewEditorTooltip },
4031
4044
  split: { label: i.editViewSplit, tooltip: i.editViewSplitTooltip },
4032
4045
  preview: { label: i.editViewPreview, tooltip: i.editViewPreviewTooltip }
4033
4046
  }, v = () => {
4034
4047
  a.preparePreview(e), s?.prepare?.();
4035
- }, y = (T) => {
4036
- if (!hd(T.nativeEvent, md(navigator.platform))) return;
4048
+ }, E = (T) => {
4049
+ if (!pd(T.nativeEvent, hd(navigator.platform))) return;
4037
4050
  gr(T);
4038
- const O = fd(u);
4051
+ const O = md(u);
4039
4052
  Zn(a, e, O, o), m.current.get(O)?.focus();
4040
4053
  };
4041
- return /* @__PURE__ */ d("div", { role: "radiogroup", "aria-label": n ? i.editViewNamed(t) : i.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: y, children: l.map((T) => {
4042
- const O = Ed[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
4054
+ return /* @__PURE__ */ d("div", { role: "radiogroup", "aria-label": n ? i.editViewNamed(t) : i.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: E, children: l.map((T) => {
4055
+ const O = Sd[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
4043
4056
  return /* @__PURE__ */ B("label", { className: n ? "aqmx-icon-button" : "aqmx-icon-button aqmx-labelled-button", children: [
4044
4057
  /* @__PURE__ */ d(
4045
4058
  "input",
@@ -4052,7 +4065,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4052
4065
  value: T,
4053
4066
  checked: T === u,
4054
4067
  "aria-label": R,
4055
- "aria-keyshortcuts": T === "split" ? void 0 : dd,
4068
+ "aria-keyshortcuts": T === "split" ? void 0 : ud,
4056
4069
  title: q,
4057
4070
  "data-testid": `markdown-explorer-edit-view-${T}`,
4058
4071
  onChange: () => Zn(a, e, T, o),
@@ -4065,7 +4078,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4065
4078
  n ? null : /* @__PURE__ */ d("span", { children: R })
4066
4079
  ] }, T);
4067
4080
  }) });
4068
- }, xd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4081
+ }, Td = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4069
4082
  const { edits: s, labels: a } = $(), [i, f] = V(!1);
4070
4083
  if (r.phase.kind !== "editing") return null;
4071
4084
  const u = r.save.kind === "saving", l = u || !r.dirty, c = () => {
@@ -4075,28 +4088,28 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4075
4088
  }, m = (g) => n ? { className: "aqmx-icon-button", "aria-label": g } : { className: "aqmx-icon-button aqmx-labelled-button" };
4076
4089
  return /* @__PURE__ */ B(pe, { children: [
4077
4090
  r.save.kind === "conflicts" ? /* @__PURE__ */ B("button", { type: "button", ...m(a.conflictNext), title: a.conflictNext, "data-testid": "markdown-explorer-edit-next-conflict", onClick: () => s.nextConflict(e), onDoubleClick: me, children: [
4078
- /* @__PURE__ */ d(Jc, { "aria-hidden": "true" }),
4091
+ /* @__PURE__ */ d(Qc, { "aria-hidden": "true" }),
4079
4092
  n ? null : /* @__PURE__ */ d("span", { children: a.conflictNext })
4080
4093
  ] }) : null,
4081
- /* @__PURE__ */ d(Sd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4094
+ /* @__PURE__ */ d(xd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4082
4095
  r.history ? /* @__PURE__ */ B("button", { type: "button", ...m(a.historyOpen), title: a.historyOpen, "aria-haspopup": "dialog", "data-testid": "markdown-explorer-edit-history", onClick: () => f(!0), onDoubleClick: me, children: [
4083
- /* @__PURE__ */ d(ed, { "aria-hidden": "true" }),
4096
+ /* @__PURE__ */ d(td, { "aria-hidden": "true" }),
4084
4097
  n ? null : /* @__PURE__ */ d("span", { children: a.historyOpen })
4085
4098
  ] }) : null,
4086
4099
  r.save.kind === "draft" ? null : /* @__PURE__ */ B("button", { type: "button", ...m(a.saveDraft), title: a.saveDraftTooltip, "aria-disabled": l, "aria-busy": u, "aria-keyshortcuts": "Control+S Meta+S", "data-testid": "markdown-explorer-edit-save", onClick: c, onDoubleClick: me, children: [
4087
- /* @__PURE__ */ d(nd, { "aria-hidden": "true" }),
4100
+ /* @__PURE__ */ d(rd, { "aria-hidden": "true" }),
4088
4101
  n ? null : /* @__PURE__ */ d("span", { children: a.saveDraft })
4089
4102
  ] }),
4090
- r.history ? /* @__PURE__ */ d(pd, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4103
+ r.history ? /* @__PURE__ */ d(gd, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4091
4104
  ] });
4092
- }, Td = ({ path: e, session: t }) => {
4105
+ }, Rd = ({ path: e, session: t }) => {
4093
4106
  const { edits: n } = $();
4094
- return t.save.kind !== "grant" ? null : /* @__PURE__ */ d(cd, { href: t.save.href, onRetry: () => {
4107
+ return t.save.kind !== "grant" ? null : /* @__PURE__ */ d(dd, { href: t.save.href, onRetry: () => {
4095
4108
  n.save(e);
4096
4109
  }, testId: "markdown-explorer-save-grant" });
4097
- }, Rd = /* @__PURE__ */ new Set(), Cd = (e, t, n) => {
4098
- const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = re(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = re(r.subscribe, u, u), [c] = V(() => /* @__PURE__ */ new Set()), [m, g] = V(Rd), [v, y] = V(null);
4099
- v !== null && (v.path !== e || v.markup !== n) && y(null);
4110
+ }, Cd = /* @__PURE__ */ new Set(), Od = (e, t, n) => {
4111
+ const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = re(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = re(r.subscribe, u, u), [c] = V(() => /* @__PURE__ */ new Set()), [m, g] = V(Cd), [v, E] = V(null);
4112
+ v !== null && (v.path !== e || v.markup !== n) && E(null);
4100
4113
  const T = U(null);
4101
4114
  Y(() => (T.current = e, () => {
4102
4115
  T.current = null;
@@ -4107,12 +4120,12 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4107
4120
  }, [n]);
4108
4121
  const R = F(() => {
4109
4122
  const h = e, p = r.peek(h);
4110
- c.has(h) || p?.status === "pending" || (c.add(h), g(new Set(c)), y(null), (async () => {
4123
+ c.has(h) || p?.status === "pending" || (c.add(h), g(new Set(c)), E(null), (async () => {
4111
4124
  try {
4112
4125
  const x = await r.refresh(h);
4113
4126
  if (T.current !== h || x.status === "superseded") return;
4114
4127
  if (x.status === "failed") {
4115
- y({ path: h, failure: x.failure, stamp: r.answerStampOf(h), markup: O.current }), o.announce(s.documentRefreshFailed(de(s, x.failure.reason)));
4128
+ E({ path: h, failure: x.failure, stamp: r.answerStampOf(h), markup: O.current }), o.announce(s.documentRefreshFailed(de(s, x.failure.reason)));
4116
4129
  return;
4117
4130
  }
4118
4131
  if (x.status === "shown" && (t || x.failed)) return;
@@ -4125,7 +4138,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4125
4138
  })());
4126
4139
  }, [e, t, c, r, o, s]), q = m.has(e), D = v !== null && v.path === e && v.stamp === l && v.markup === n ? v.failure : null;
4127
4140
  return { refreshing: q, unavailable: q || f?.status === "pending", failure: D, refresh: R };
4128
- }, Od = (e, t) => {
4141
+ }, Ld = (e, t) => {
4129
4142
  switch (t) {
4130
4143
  case "markdown":
4131
4144
  return e.showMarkup;
@@ -4135,30 +4148,30 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4135
4148
  case "tsv":
4136
4149
  return e.showSpreadsheetMarkup(t.toUpperCase());
4137
4150
  }
4138
- }, Ld = Object.freeze({ kind: "page" }), Md = ({ path: e, placement: t, markup: n }) => {
4139
- const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = Cd(e, t.kind === "page", n.shown), f = sl(e), u = gd(e), l = kr(e), c = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, m = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, y = t.kind === "page" || t.maximized;
4151
+ }, Md = Object.freeze({ kind: "page" }), Ad = ({ path: e, placement: t, markup: n }) => {
4152
+ const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = Od(e, t.kind === "page", n.shown), f = al(e), u = wd(e), l = yr(e), c = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, m = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, E = t.kind === "page" || t.maximized;
4140
4153
  return /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-bar", "data-testid": "markdown-explorer-document-refresh-bar", "data-aqmx-editing": l === void 0 ? void 0 : "true", children: [
4141
4154
  /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-row", children: [
4142
- l === void 0 ? null : /* @__PURE__ */ d(bd, { session: l }),
4143
- l === void 0 ? null : /* @__PURE__ */ d(xd, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: y }),
4155
+ l === void 0 ? null : /* @__PURE__ */ d(Ed, { session: l }),
4156
+ l === void 0 ? null : /* @__PURE__ */ d(Td, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: E }),
4144
4157
  l === void 0 && f !== null ? /* @__PURE__ */ B(
4145
4158
  "button",
4146
4159
  {
4147
4160
  type: "button",
4148
4161
  className: m === null ? "aqmx-icon-button aqmx-labelled-button" : "aqmx-icon-button",
4149
- title: m === null ? Od(r, f) : m,
4162
+ title: m === null ? Ld(r, f) : m,
4150
4163
  "aria-label": m === null ? void 0 : m,
4151
4164
  "aria-pressed": n.shown,
4152
4165
  "data-testid": "markdown-explorer-document-markup",
4153
4166
  onClick: n.toggle,
4154
4167
  onDoubleClick: me,
4155
4168
  children: [
4156
- /* @__PURE__ */ d(co, { "aria-hidden": "true" }),
4169
+ /* @__PURE__ */ d(uo, { "aria-hidden": "true" }),
4157
4170
  m === null ? /* @__PURE__ */ d("span", { children: r.showMarkupLabel }) : null
4158
4171
  ]
4159
4172
  }
4160
4173
  ) : null,
4161
- l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ d(wd, { path: e, documentName: v, iconOnly: g, previewAvailable: y, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ d(vd, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4174
+ l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ d(vd, { path: e, documentName: v, iconOnly: g, previewAvailable: E, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ d(bd, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4162
4175
  l === void 0 ? /* @__PURE__ */ B(
4163
4176
  "button",
4164
4177
  {
@@ -4173,35 +4186,35 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4173
4186
  onClick: i,
4174
4187
  onDoubleClick: me,
4175
4188
  children: [
4176
- /* @__PURE__ */ d(Wc, { "aria-hidden": "true" }),
4189
+ /* @__PURE__ */ d(Gc, { "aria-hidden": "true" }),
4177
4190
  c === null ? /* @__PURE__ */ d("span", { children: r.refreshDocumentLabel }) : null
4178
4191
  ]
4179
4192
  }
4180
4193
  ) : null
4181
4194
  ] }),
4182
4195
  l !== void 0 || a === null ? null : /* @__PURE__ */ d("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": a.reason, children: r.documentRefreshFailed(de(r, a.reason)) }),
4183
- l === void 0 ? null : /* @__PURE__ */ d(Td, { path: e, session: l })
4196
+ l === void 0 ? null : /* @__PURE__ */ d(Rd, { path: e, session: l })
4184
4197
  ] });
4185
- }, Ad = ({ location: e }) => {
4186
- const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = al(e);
4198
+ }, Nd = ({ location: e }) => {
4199
+ const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = il(e);
4187
4200
  return /* @__PURE__ */ B("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", ...At, children: [
4188
- /* @__PURE__ */ d(Md, { path: t, placement: Ld, markup: r }),
4189
- /* @__PURE__ */ d(Vc, { path: t, absence: Oc, markup: e.markup, variant: n })
4201
+ /* @__PURE__ */ d(Ad, { path: t, placement: Md, markup: r }),
4202
+ /* @__PURE__ */ d(Zc, { path: t, absence: Lc, markup: e.markup, variant: n })
4190
4203
  ] });
4191
- }, Nd = ({ holds: e, testId: t }) => {
4204
+ }, Dd = ({ holds: e, testId: t }) => {
4192
4205
  const { labels: n, announcer: r } = $(), o = Te();
4193
4206
  Y(() => e ? r.claim(o) : void 0, [e, r, o]);
4194
4207
  const s = F(() => r.shownIn(o), [r, o]), a = re(r.subscribe, s, s);
4195
4208
  return /* @__PURE__ */ d("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": t, children: a.length > 1 ? n.announcementSequence(a) : a[0] });
4196
- }, ke = Object.freeze([]), Dd = (e) => {
4209
+ }, ye = Object.freeze([]), Pd = (e) => {
4197
4210
  const t = /* @__PURE__ */ new Set();
4198
- let n = ke, r = [], o = !1;
4211
+ let n = ye, r = [], o = !1;
4199
4212
  const s = [], a = (l) => {
4200
4213
  n = l;
4201
4214
  for (const c of [...t]) c();
4202
4215
  }, i = () => s.at(-1)?.region, f = (l) => {
4203
4216
  const c = i();
4204
- l(), i() !== c && n !== ke && a(ke);
4217
+ l(), i() !== c && n !== ye && a(ye);
4205
4218
  }, u = () => {
4206
4219
  o = !1;
4207
4220
  const l = r.map((c) => "sentence" in c ? c.sentence : c.list(c.items));
@@ -4214,7 +4227,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4214
4227
  const c = r.find((m) => "list" in m && m.list === l.list);
4215
4228
  c !== void 0 && "items" in c ? c.items.push(l.item) : r.push({ list: l.list, items: [l.item] });
4216
4229
  }
4217
- o || (o = !0, n !== ke && a(ke), e.request(u));
4230
+ o || (o = !0, n !== ye && a(ye), e.request(u));
4218
4231
  },
4219
4232
  subscribe: (l) => (t.add(l), () => {
4220
4233
  t.delete(l);
@@ -4226,18 +4239,18 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4226
4239
  m !== -1 && s.splice(m, 1);
4227
4240
  });
4228
4241
  },
4229
- shownIn: (l) => i() === l ? n : ke
4242
+ shownIn: (l) => i() === l ? n : ye
4230
4243
  };
4231
4244
  }, ue = Object.freeze({ status: "cancelled" }), Gn = (e) => {
4232
4245
  if (e === null || typeof e != "object") return null;
4233
4246
  const { failure: t } = e;
4234
- if (Vo(t) !== null) return null;
4247
+ if (Zo(t) !== null) return null;
4235
4248
  const { reason: n, code: r } = t;
4236
- return Zo(n, r);
4237
- }, Pd = ({ dataPath: e, onScope: t, fetch: n }) => {
4249
+ return Wo(n, r);
4250
+ }, Id = ({ dataPath: e, onScope: t, fetch: n }) => {
4238
4251
  const r = n ?? ((l, c) => globalThis.fetch(l, c)), o = (l, c) => `${e}/${l}?${new URLSearchParams(c).toString()}`, s = (l) => {
4239
4252
  l.status === 401 && t(null);
4240
- const c = l.headers.get(jo);
4253
+ const c = l.headers.get(Vo);
4241
4254
  c !== null && t(c);
4242
4255
  }, a = async (l, c, m, g) => {
4243
4256
  let v;
@@ -4247,42 +4260,42 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4247
4260
  return g({ reason: "failed" });
4248
4261
  }
4249
4262
  s(v);
4250
- let y;
4263
+ let E;
4251
4264
  try {
4252
- y = await v.json();
4265
+ E = await v.json();
4253
4266
  } catch {
4254
4267
  return g({ reason: ft(v.status) });
4255
4268
  }
4256
4269
  let T;
4257
4270
  try {
4258
- T = m(y);
4271
+ T = m(E);
4259
4272
  } catch {
4260
4273
  T = !1;
4261
4274
  }
4262
- if (T) return y;
4263
- const O = Gn(y);
4275
+ if (T) return E;
4276
+ const O = Gn(E);
4264
4277
  return g(O !== null ? O : { reason: v.status === 200 ? "failed" : ft(v.status) });
4265
- }, i = { [dn]: Xo }, f = { [dn]: ns, "Content-Type": `${ts}; charset=utf-8` }, u = async (l, c, m) => {
4278
+ }, i = { [dn]: Jo }, f = { [dn]: rs, "Content-Type": `${ns}; charset=utf-8` }, u = async (l, c, m) => {
4266
4279
  const g = await a(l, c, m, (v) => mt(v.reason, v.code));
4267
4280
  return c.signal.aborted ? ue : g;
4268
4281
  };
4269
4282
  return {
4270
4283
  tree: (l) => a(o("tree", { [te.source]: l }), { method: "GET" }, cn, (c) => ({ status: "error", failure: c })),
4271
4284
  children: async (l, c, m) => {
4272
- const g = await a(o("children", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Yo, (v) => ({ status: "error", failure: v }));
4285
+ const g = await a(o("children", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Xo, (v) => ({ status: "error", failure: v }));
4273
4286
  return m.aborted ? ue : g;
4274
4287
  },
4275
4288
  ancestors: async (l, c, m) => {
4276
- const g = await a(o("ancestors", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Ko, (v) => ({ status: "error", failure: v }));
4289
+ const g = await a(o("ancestors", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Yo, (v) => ({ status: "error", failure: v }));
4277
4290
  return m.aborted ? ue : g;
4278
4291
  },
4279
4292
  reveal: async (l, c, m) => {
4280
- const g = await a(o("reveal", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Go, (v) => ({ status: "error", failure: v }));
4293
+ const g = await a(o("reveal", { [te.source]: l, [te.path]: c }), { method: "GET", signal: m }, Ko, (v) => ({ status: "error", failure: v }));
4281
4294
  return m.aborted ? ue : g;
4282
4295
  },
4283
- document: (l, { refresh: c }) => a(o("document", { [te.path]: l }), c ? { method: "GET", headers: i } : { method: "GET" }, ss, (m) => mt(m.reason, m.code)),
4296
+ document: (l, { refresh: c }) => a(o("document", { [te.path]: l }), c ? { method: "GET", headers: i } : { method: "GET" }, as, (m) => mt(m.reason, m.code)),
4284
4297
  text: async (l, c) => {
4285
- const m = await a(o("text", { [te.path]: l }), { method: "GET", signal: c }, Wo, (g) => mt(g.reason, g.code));
4298
+ const m = await a(o("text", { [te.path]: l }), { method: "GET", signal: c }, Go, (g) => mt(g.reason, g.code));
4286
4299
  return c.aborted ? ue : m;
4287
4300
  },
4288
4301
  asset: async (l, c) => {
@@ -4293,7 +4306,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4293
4306
  return c.aborted ? ue : { status: "error", failure: { reason: "failed" } };
4294
4307
  }
4295
4308
  if (s(m), m.ok)
4296
- return c.aborted ? ue : { status: "ok", body: m.body === null ? new ReadableStream({ start: (y) => y.close() }) : m.body };
4309
+ return c.aborted ? ue : { status: "ok", body: m.body === null ? new ReadableStream({ start: (E) => E.close() }) : m.body };
4297
4310
  let g = null;
4298
4311
  try {
4299
4312
  g = await m.json();
@@ -4303,14 +4316,14 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4303
4316
  const v = Gn(g);
4304
4317
  return { status: "error", failure: v === null ? { reason: ft(m.status) } : v };
4305
4318
  },
4306
- edit: (l, c) => u(o("edit", { [te.path]: l }), { method: "GET", signal: c }, os),
4307
- save: (l, c, m, g) => u(o("save", { [te.path]: l, [te.base]: c }), { method: "POST", headers: f, body: m, signal: g }, rs),
4308
- preview: (l, c, m) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: c, signal: m }, es),
4309
- revisions: (l, c) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: c }, Qo),
4310
- revision: (l, c, m) => u(o("revision", { [te.path]: l, [te.revision]: c }), { method: "GET", signal: m }, Jo),
4319
+ edit: (l, c) => u(o("edit", { [te.path]: l }), { method: "GET", signal: c }, ss),
4320
+ save: (l, c, m, g) => u(o("save", { [te.path]: l, [te.base]: c }), { method: "POST", headers: f, body: m, signal: g }, os),
4321
+ preview: (l, c, m) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: c, signal: m }, ts),
4322
+ revisions: (l, c) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: c }, es),
4323
+ revision: (l, c, m) => u(o("revision", { [te.path]: l, [te.revision]: c }), { method: "GET", signal: m }, Qo),
4311
4324
  refresh: (l) => a(o("refresh", { [te.source]: l }), { method: "POST", headers: i }, cn, (c) => ({ status: "error", failure: c }))
4312
4325
  };
4313
- }, Id = () => {
4326
+ }, $d = () => {
4314
4327
  let e = null, t = null;
4315
4328
  return {
4316
4329
  settle: (n) => {
@@ -4325,11 +4338,11 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4325
4338
  return t = null, o;
4326
4339
  }
4327
4340
  };
4328
- }, $d = (e) => {
4341
+ }, _d = (e) => {
4329
4342
  const t = Mt(e);
4330
4343
  if (t === null) return an;
4331
4344
  try {
4332
- return qo(JSON.parse(t));
4345
+ return Bo(JSON.parse(t));
4333
4346
  } catch (n) {
4334
4347
  return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n), an;
4335
4348
  }
@@ -4337,7 +4350,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4337
4350
  let n = null;
4338
4351
  const r = () => {
4339
4352
  if (n === null) {
4340
- const s = $d(e);
4353
+ const s = _d(e);
4341
4354
  n = { changes: s, settings: sn(t, s) };
4342
4355
  }
4343
4356
  return n;
@@ -4349,44 +4362,44 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4349
4362
  getServerSnapshot: () => t,
4350
4363
  subscribe: o.subscribe,
4351
4364
  advance: (s) => {
4352
- const { changes: a, settings: i } = r(), f = $o(a, s, _o(i, s)[s], t);
4353
- return n = { changes: f, settings: sn(t, f) }, o.emit(), Lt(e, Fo(f)), n.settings;
4365
+ const { changes: a, settings: i } = r(), f = _o(a, s, Fo(i, s)[s], t);
4366
+ return n = { changes: f, settings: sn(t, f) }, o.emit(), Lt(e, qo(f)), n.settings;
4354
4367
  }
4355
4368
  };
4356
- }, _d = Object.freeze({ status: "refreshed" }), Fd = Object.freeze({ status: "superseded" }), _t = Object.freeze({ status: "deferred" }), qd = yr(_t), uo = 4, Bd = uo - 1, Yn = Object.freeze({ status: "loading" }), Ud = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), Hd = (e) => {
4357
- const t = /* @__PURE__ */ new Map(), n = Mr(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4369
+ }, Fd = Object.freeze({ status: "refreshed" }), qd = Object.freeze({ status: "superseded" }), _t = Object.freeze({ status: "deferred" }), Bd = Er(_t), fo = 4, Ud = fo - 1, Yn = Object.freeze({ status: "loading" }), Hd = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), zd = (e) => {
4370
+ const t = /* @__PURE__ */ new Map(), n = Ar(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4358
4371
  let u = 0, l = 0;
4359
4372
  const c = { direct: null, bulk: null }, m = /* @__PURE__ */ new Set();
4360
4373
  let g = !1, v = 0;
4361
- const y = () => {
4374
+ const E = () => {
4362
4375
  v += 1, i.emit();
4363
4376
  }, T = (w) => o.get(w) ?? 0, O = (w) => {
4364
- let k = a.get(w);
4365
- return k === void 0 && (k = { claims: /* @__PURE__ */ new Map(), unclaimed: /* @__PURE__ */ new Set(), direct: /* @__PURE__ */ new Set(), bulk: /* @__PURE__ */ new Set(), inFlight: /* @__PURE__ */ new Map() }, a.set(w, k)), k;
4366
- }, R = (w, k, C) => {
4367
- w.inFlight.delete(k), u -= 1, C.lane === "bulk" && (l -= 1);
4377
+ let y = a.get(w);
4378
+ return y === void 0 && (y = { claims: /* @__PURE__ */ new Map(), unclaimed: /* @__PURE__ */ new Set(), direct: /* @__PURE__ */ new Set(), bulk: /* @__PURE__ */ new Set(), inFlight: /* @__PURE__ */ new Map() }, a.set(w, y)), y;
4379
+ }, R = (w, y, C) => {
4380
+ w.inFlight.delete(y), u -= 1, C.lane === "bulk" && (l -= 1);
4368
4381
  }, q = (w) => {
4369
- const k = a.get(w);
4370
- if (k !== void 0) {
4371
- for (const [C, N] of [...k.inFlight])
4372
- R(k, C, N), N.controller.abort();
4373
- k.direct.clear(), k.bulk.clear(), k.unclaimed.clear();
4382
+ const y = a.get(w);
4383
+ if (y !== void 0) {
4384
+ for (const [C, N] of [...y.inFlight])
4385
+ R(y, C, N), N.controller.abort();
4386
+ y.direct.clear(), y.bulk.clear(), y.unclaimed.clear();
4374
4387
  }
4375
4388
  }, D = (w) => {
4376
- const k = T(w) + 1;
4377
- return o.set(w, k), q(w), k;
4378
- }, h = (w, k) => {
4379
- const C = Ae(w), N = { promise: w, opened: k, stale: !1, loadedAt: C?.status === "ok" ? C.loadedAt : null };
4389
+ const y = T(w) + 1;
4390
+ return o.set(w, y), q(w), y;
4391
+ }, h = (w, y) => {
4392
+ const C = Ae(w), N = { promise: w, opened: y, stale: !1, loadedAt: C?.status === "ok" ? C.loadedAt : null };
4380
4393
  return w.status === "pending" && w.then((z) => {
4381
4394
  z.status === "ok" && (N.loadedAt = z.loadedAt);
4382
4395
  }), N;
4383
4396
  }, p = (w) => {
4384
- let k = r.get(w);
4385
- return k === void 0 && (k = /* @__PURE__ */ new Map(), r.set(w, k)), k;
4397
+ let y = r.get(w);
4398
+ return y === void 0 && (y = /* @__PURE__ */ new Map(), r.set(w, y)), y;
4386
4399
  }, x = (w) => {
4387
- const k = [...a.keys()], C = c[w], N = C === null ? 0 : k.indexOf(C) + 1;
4388
- for (let z = 0; z < k.length; z += 1) {
4389
- const W = k[(N + z) % k.length], J = W === void 0 ? void 0 : a.get(W);
4400
+ const y = [...a.keys()], C = c[w], N = C === null ? 0 : y.indexOf(C) + 1;
4401
+ for (let z = 0; z < y.length; z += 1) {
4402
+ const W = y[(N + z) % y.length], J = W === void 0 ? void 0 : a.get(W);
4390
4403
  if (!(W === void 0 || J === void 0)) {
4391
4404
  for (const G of J[w])
4392
4405
  if ((J.claims.get(G) ?? 0) !== 0)
@@ -4394,85 +4407,85 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4394
4407
  }
4395
4408
  }
4396
4409
  return null;
4397
- }, A = (w, k, C, N) => {
4410
+ }, A = (w, y, C, N) => {
4398
4411
  const z = a.get(w);
4399
- if (z === void 0 || z.inFlight.get(k) !== C) return;
4400
- R(z, k, C);
4401
- const W = (z.claims.get(k) ?? 0) > 0, J = p(w);
4402
- if (N.status === "ok" ? J.set(k, { status: "loaded", entries: N.entries }) : N.status === "error" && W ? J.set(k, { status: "failed", failure: N.failure }) : J.delete(k), y(), N.status === "error" && W) {
4403
- const G = { sourceId: w, path: k, failure: N.failure };
4412
+ if (z === void 0 || z.inFlight.get(y) !== C) return;
4413
+ R(z, y, C);
4414
+ const W = (z.claims.get(y) ?? 0) > 0, J = p(w);
4415
+ if (N.status === "ok" ? J.set(y, { status: "loaded", entries: N.entries }) : N.status === "error" && W ? J.set(y, { status: "failed", failure: N.failure }) : J.delete(y), E(), N.status === "error" && W) {
4416
+ const G = { sourceId: w, path: y, failure: N.failure };
4404
4417
  for (const ie of [...f]) ie(G);
4405
4418
  }
4406
4419
  _();
4407
- }, I = (w, k, C) => {
4420
+ }, I = (w, y, C) => {
4408
4421
  const N = { controller: new AbortController(), lane: C };
4409
- O(w).inFlight.set(k, N), u += 1, C === "bulk" && (l += 1), e.children(w, k, N.controller.signal).then(
4410
- (z) => A(w, k, N, z),
4411
- () => A(w, k, N, Ud)
4422
+ O(w).inFlight.set(y, N), u += 1, C === "bulk" && (l += 1), e.children(w, y, N.controller.signal).then(
4423
+ (z) => A(w, y, N, z),
4424
+ () => A(w, y, N, Hd)
4412
4425
  );
4413
4426
  }, _ = () => {
4414
- for (; u < uo; ) {
4427
+ for (; u < fo; ) {
4415
4428
  const w = x("direct");
4416
4429
  if (w !== null) {
4417
4430
  I(w.sourceId, w.path, "direct");
4418
4431
  continue;
4419
4432
  }
4420
- const k = l < Bd ? x("bulk") : null;
4421
- if (k === null) return;
4422
- I(k.sourceId, k.path, "bulk");
4433
+ const y = l < Ud ? x("bulk") : null;
4434
+ if (y === null) return;
4435
+ I(y.sourceId, y.path, "bulk");
4423
4436
  }
4424
- }, b = (w, k, C) => {
4425
- if (!(k.direct.delete(C) || k.bulk.delete(C))) {
4426
- const z = k.inFlight.get(C);
4437
+ }, b = (w, y, C) => {
4438
+ if (!(y.direct.delete(C) || y.bulk.delete(C))) {
4439
+ const z = y.inFlight.get(C);
4427
4440
  if (z === void 0) return !1;
4428
- R(k, C, z), z.controller.abort();
4441
+ R(y, C, z), z.controller.abort();
4429
4442
  }
4430
4443
  return r.get(w)?.delete(C), !0;
4431
4444
  }, S = () => {
4432
4445
  g = !1;
4433
4446
  let w = !1;
4434
- for (const k of m) {
4435
- const C = O(k);
4447
+ for (const y of m) {
4448
+ const C = O(y);
4436
4449
  for (const N of C.unclaimed)
4437
- (C.claims.get(N) ?? 0) === 0 && b(k, C, N) && (w = !0);
4450
+ (C.claims.get(N) ?? 0) === 0 && b(y, C, N) && (w = !0);
4438
4451
  C.unclaimed.clear();
4439
4452
  }
4440
- m.clear(), w && (y(), _());
4441
- }, L = (w, k) => {
4442
- t.set(w, h($e(e.tree(w)), k));
4443
- }, M = (w, k, C) => {
4453
+ m.clear(), w && (E(), _());
4454
+ }, L = (w, y) => {
4455
+ t.set(w, h($e(e.tree(w)), y));
4456
+ }, M = (w, y, C) => {
4444
4457
  D(w);
4445
- const N = h(yr(k), C);
4446
- return t.set(w, N), r.delete(w), y(), _(), N;
4447
- }, P = (w, k, C, N) => {
4448
- if (C !== T(w) || t.get(w) !== k) return;
4449
- const z = Ae(k.promise);
4450
- if (!(N.status !== "ok" || z?.status !== "ok" || k.loadedAt === null || N.loadedAt <= k.loadedAt)) {
4458
+ const N = h(Er(y), C);
4459
+ return t.set(w, N), r.delete(w), E(), _(), N;
4460
+ }, P = (w, y, C, N) => {
4461
+ if (C !== T(w) || t.get(w) !== y) return;
4462
+ const z = Ae(y.promise);
4463
+ if (!(N.status !== "ok" || z?.status !== "ok" || y.loadedAt === null || N.loadedAt <= y.loadedAt)) {
4451
4464
  if (tt(z.entries, N.entries)) {
4452
- k.loadedAt = N.loadedAt;
4465
+ y.loadedAt = N.loadedAt;
4453
4466
  return;
4454
4467
  }
4455
- M(w, N, k.opened);
4468
+ M(w, N, y.opened);
4456
4469
  }
4457
- }, H = (w, k) => {
4470
+ }, H = (w, y) => {
4458
4471
  const C = t.get(w);
4459
- return C !== void 0 && Ae(C.promise)?.status === k;
4460
- }, K = (w, k) => {
4461
- k.stale = !1;
4472
+ return C !== void 0 && Ae(C.promise)?.status === y;
4473
+ }, K = (w, y) => {
4474
+ y.stale = !1;
4462
4475
  const C = T(w);
4463
- e.tree(w).then((N) => P(w, k, C, N));
4476
+ e.tree(w).then((N) => P(w, y, C, N));
4464
4477
  };
4465
4478
  return {
4466
- read: (w) => t.get(w)?.promise ?? qd,
4479
+ read: (w) => t.get(w)?.promise ?? Bd,
4467
4480
  open: (w) => {
4468
- const k = n.resumes(w), C = n.hold(w), N = t.get(w);
4469
- return N === void 0 || H(w, "deferred") ? (L(w, !0), y()) : k || (N.opened && H(w, "error") ? (L(w, !0), y()) : (N.opened = !0, N.stale && H(w, "ok") && K(w, N))), C;
4481
+ const y = n.resumes(w), C = n.hold(w), N = t.get(w);
4482
+ return N === void 0 || H(w, "deferred") ? (L(w, !0), E()) : y || (N.opened && H(w, "error") ? (L(w, !0), E()) : (N.opened = !0, N.stale && H(w, "ok") && K(w, N))), C;
4470
4483
  },
4471
4484
  retry: (w) => {
4472
- H(w, "error") && (L(w, !0), y());
4485
+ H(w, "error") && (L(w, !0), E());
4473
4486
  },
4474
- seed: (w, k) => {
4475
- const C = k.then(
4487
+ seed: (w, y) => {
4488
+ const C = y.then(
4476
4489
  (W) => W === null ? _t : W,
4477
4490
  () => _t
4478
4491
  ), N = t.get(w);
@@ -4484,14 +4497,14 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4484
4497
  D(w);
4485
4498
  const z = h($e(C), N?.opened === !0);
4486
4499
  t.set(w, z), r.delete(w), _(), C.then((W) => {
4487
- t.get(w) === z && (W.status === "deferred" && n.isHeld(w) && L(w, z.opened), y());
4500
+ t.get(w) === z && (W.status === "deferred" && n.isHeld(w) && L(w, z.opened), E());
4488
4501
  });
4489
4502
  },
4490
4503
  refresh: async (w) => {
4491
- const k = (s.get(w) ?? 0) + 1;
4492
- s.set(w, k);
4504
+ const y = (s.get(w) ?? 0) + 1;
4505
+ s.set(w, y);
4493
4506
  const C = await e.refresh(w);
4494
- if (s.get(w) !== k) return Fd;
4507
+ if (s.get(w) !== y) return qd;
4495
4508
  if (C.status === "error") return { status: "failed", failure: C.failure };
4496
4509
  const N = t.get(w);
4497
4510
  if (!(N !== void 0 && N.loadedAt !== null && H(w, "ok") && N.loadedAt > C.loadedAt)) {
@@ -4503,20 +4516,20 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4503
4516
  }
4504
4517
  for (const [W, J] of t)
4505
4518
  W !== w && Ae(J.promise)?.status === "ok" && (J.stale = !0);
4506
- return _d;
4519
+ return Fd;
4507
4520
  },
4508
- children: (w, k) => r.get(w)?.get(k),
4509
- claimChildren: (w, k) => {
4521
+ children: (w, y) => r.get(w)?.get(y),
4522
+ claimChildren: (w, y) => {
4510
4523
  const C = O(w), N = p(w);
4511
4524
  let z = !1, W = !1;
4512
- for (const [G, ie] of k)
4525
+ for (const [G, ie] of y)
4513
4526
  C.claims.set(G, (C.claims.get(G) ?? 0) + 1), N.get(G) === void 0 ? (N.set(G, Yn), C[ie].add(G), z = !0, W = !0) : ie === "direct" && C.bulk.delete(G) && (C.direct.add(G), W = !0);
4514
- z && y(), W && _();
4527
+ z && E(), W && _();
4515
4528
  let J = !1;
4516
4529
  return () => {
4517
4530
  if (!J) {
4518
4531
  J = !0;
4519
- for (const G of k.keys()) {
4532
+ for (const G of y.keys()) {
4520
4533
  const ie = (C.claims.get(G) ?? 0) - 1;
4521
4534
  ie > 0 ? C.claims.set(G, ie) : (C.claims.delete(G), C.unclaimed.add(G));
4522
4535
  }
@@ -4524,24 +4537,24 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4524
4537
  }
4525
4538
  };
4526
4539
  },
4527
- retryChildren: (w, k) => {
4540
+ retryChildren: (w, y) => {
4528
4541
  const C = r.get(w);
4529
- if (C === void 0 || C.get(k)?.status !== "failed") return;
4542
+ if (C === void 0 || C.get(y)?.status !== "failed") return;
4530
4543
  const N = O(w);
4531
- if ((N.claims.get(k) ?? 0) > 0) {
4532
- C.set(k, Yn), N.direct.add(k), y(), _();
4544
+ if ((N.claims.get(y) ?? 0) > 0) {
4545
+ C.set(y, Yn), N.direct.add(y), E(), _();
4533
4546
  return;
4534
4547
  }
4535
- C.delete(k), y();
4548
+ C.delete(y), E();
4536
4549
  },
4537
4550
  pendingChildren: (w) => {
4538
- const k = a.get(w);
4539
- return k === void 0 ? 0 : k.direct.size + k.bulk.size + k.inFlight.size;
4551
+ const y = a.get(w);
4552
+ return y === void 0 ? 0 : y.direct.size + y.bulk.size + y.inFlight.size;
4540
4553
  },
4541
4554
  clear: () => {
4542
4555
  for (const w of /* @__PURE__ */ new Set([...t.keys(), ...r.keys(), ...o.keys(), ...a.keys()])) D(w);
4543
- for (const [w, k] of s) s.set(w, k + 1);
4544
- t.clear(), r.clear(), y();
4556
+ for (const [w, y] of s) s.set(w, y + 1);
4557
+ t.clear(), r.clear(), E();
4545
4558
  },
4546
4559
  subscribeChildrenFailures: (w) => (f.add(w), () => {
4547
4560
  f.delete(w);
@@ -4549,7 +4562,7 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4549
4562
  subscribe: i.subscribe,
4550
4563
  version: () => v
4551
4564
  };
4552
- }, zd = (e, t) => {
4565
+ }, jd = (e, t) => {
4553
4566
  let n = e;
4554
4567
  const r = qe();
4555
4568
  return {
@@ -4559,26 +4572,26 @@ const ld = /* @__PURE__ */ E.forwardRef(id), cd = ({ href: e, onRetry: t, testId
4559
4572
  n = { ...n, ...o }, t(n), r.emit();
4560
4573
  }
4561
4574
  };
4562
- }, jd = 1;
4575
+ }, Vd = 1;
4563
4576
  let We = 0, he = null;
4564
- const Vd = () => {
4577
+ const Zd = () => {
4565
4578
  const { documentElement: e, body: t } = document;
4566
4579
  We === 0 && (he = { htmlOverflow: e.style.overflow, bodyOverflow: t.style.overflow, htmlGutter: e.style.scrollbarGutter, bodyGutter: t.style.scrollbarGutter }, e.style.overflow = "hidden", t.style.overflow = "hidden", e.style.scrollbarGutter = "auto", t.style.scrollbarGutter = "auto"), We += 1;
4567
4580
  let n = !1;
4568
4581
  return () => {
4569
4582
  n || (n = !0, We -= 1, !(We > 0 || he === null) && (e.style.overflow = he.htmlOverflow, t.style.overflow = he.bodyOverflow, e.style.scrollbarGutter = he.htmlGutter, t.style.scrollbarGutter = he.bodyGutter, he = null));
4570
4583
  };
4571
- }, Zd = [
4584
+ }, Wd = [
4572
4585
  { selector: '[data-aqmx-document-flow="fill"]', name: "document region" },
4573
4586
  { selector: "[data-aqmx-explorer-body]", name: "tree area" }
4574
- ], Xn = 1, Wd = 1e3, Jn = (e) => e.getClientRects().length > 0, Rt = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", Gd = (e) => {
4587
+ ], Xn = 1, Gd = 1e3, Jn = (e) => e.getClientRects().length > 0, Rt = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", Kd = (e) => {
4575
4588
  if (!Jn(e)) return null;
4576
4589
  const t = e.getBoundingClientRect(), n = window.innerHeight;
4577
- if (t.bottom > n + jd)
4590
+ if (t.bottom > n + Vd)
4578
4591
  return `[markdown-explorer] the explorer ends ${String(Math.round(t.bottom))}px down a ${String(n)}px viewport while lockDocumentScroll stops the page from scrolling, so the rest cannot be reached. ${Rt}`;
4579
4592
  if (t.height < Xn)
4580
4593
  return `[markdown-explorer] the explorer collapsed to ${String(Math.round(t.height))}px while lockDocumentScroll stops the page from scrolling, so nothing can be read. ${Rt}`;
4581
- for (const { selector: r, name: o } of Zd)
4594
+ for (const { selector: r, name: o } of Wd)
4582
4595
  for (const s of e.querySelectorAll(r)) {
4583
4596
  if (!Jn(s)) continue;
4584
4597
  const a = s.getBoundingClientRect().height;
@@ -4586,39 +4599,39 @@ const Vd = () => {
4586
4599
  return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(a))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${Rt}`;
4587
4600
  }
4588
4601
  return null;
4589
- }, Kd = (e) => {
4602
+ }, Yd = (e) => {
4590
4603
  let t = !1, n;
4591
4604
  const r = () => {
4592
4605
  n = void 0;
4593
- const a = Gd(e);
4606
+ const a = Kd(e);
4594
4607
  a !== null && (t = !0, console.error(a));
4595
4608
  }, o = () => {
4596
- t || (clearTimeout(n), n = setTimeout(r, Wd));
4609
+ t || (clearTimeout(n), n = setTimeout(r, Gd));
4597
4610
  }, s = typeof ResizeObserver > "u" ? null : new ResizeObserver(o);
4598
4611
  return s?.observe(e), window.addEventListener("resize", o), o(), () => {
4599
4612
  clearTimeout(n), s?.disconnect(), window.removeEventListener("resize", o);
4600
4613
  };
4601
- }, Yd = (e, t) => {
4602
- ee(() => e ? Vd() : void 0, [e]), ee(() => {
4614
+ }, Xd = (e, t) => {
4615
+ ee(() => e ? Zd() : void 0, [e]), ee(() => {
4603
4616
  const n = t.current;
4604
4617
  if (!(!e || n === null))
4605
- return Kd(n);
4618
+ return Yd(n);
4606
4619
  }, [e, t]);
4607
- }, Qn = '[data-testid="markdown-explorer-view-switch"]', Xd = [
4620
+ }, Qn = '[data-testid="markdown-explorer-view-switch"]', Jd = [
4608
4621
  { control: Qn, successors: [Qn, '[data-testid="markdown-explorer-sheet-toggle"]'] },
4609
4622
  { control: '[data-testid="markdown-explorer-selection-open"]', successors: ['[data-testid="markdown-explorer-panel-frame"]'] }
4610
- ], Jd = (e) => {
4611
- for (const t of Xd) {
4623
+ ], Qd = (e) => {
4624
+ for (const t of Jd) {
4612
4625
  const n = e.closest(t.control);
4613
4626
  if (n !== null) return { element: n, control: t };
4614
4627
  }
4615
4628
  return null;
4616
- }, Qd = (e, t) => {
4629
+ }, eu = (e, t) => {
4617
4630
  const n = U(null);
4618
4631
  ee(() => {
4619
4632
  const o = (i) => {
4620
4633
  const f = e.current;
4621
- n.current = f !== null && i instanceof Element && f.contains(i) ? Jd(i) : null;
4634
+ n.current = f !== null && i instanceof Element && f.contains(i) ? Qd(i) : null;
4622
4635
  }, s = (i) => o(i.target);
4623
4636
  o(document.activeElement);
4624
4637
  const a = (i) => {
@@ -4656,7 +4669,7 @@ const Vd = () => {
4656
4669
  });
4657
4670
  return i.observe(a, { childList: !0, subtree: !0 }), () => i.disconnect();
4658
4671
  }, [t, e]);
4659
- }, eu = Ft(() => import("./TreeLayout-Bak1y1m4.js").then((e) => ({ default: e.TreeLayout }))), tu = Ft(() => import("./MultiLayout-B0dfZlpx.js").then((e) => ({ default: e.MultiLayout }))), nu = 64, ru = {
4672
+ }, tu = Ft(() => import("./TreeLayout-OjVoHBDI.js").then((e) => ({ default: e.TreeLayout }))), nu = Ft(() => import("./MultiLayout-9g9_IBi5.js").then((e) => ({ default: e.MultiLayout }))), ru = 64, ou = {
4660
4673
  request: (e) => {
4661
4674
  requestAnimationFrame(e);
4662
4675
  }
@@ -4665,12 +4678,12 @@ const Vd = () => {
4665
4678
  }, Ct = (e, t) => {
4666
4679
  t.tree !== null && e.trees.seed(t.tree.sourceId, t.tree.result);
4667
4680
  for (const { path: n, document: r } of t.documents) e.documents.seed(n, r);
4668
- }, ou = (e, t) => {
4681
+ }, su = (e, t) => {
4669
4682
  const [n, r] = V(() => ({ overrides: t, locale: e, labels: pn(e, t) }));
4670
- if (n.locale === e && Ss(n.overrides, t)) return n.labels;
4683
+ if (n.locale === e && xs(n.overrides, t)) return n.labels;
4671
4684
  const o = { overrides: t, locale: e, labels: pn(e, t) };
4672
4685
  return r(o), o.labels;
4673
- }, su = (e, t, n) => {
4686
+ }, au = (e, t, n) => {
4674
4687
  const [r, o] = V(() => ({ scope: t, store: Kn(e, n) }));
4675
4688
  if (r.scope === t && r.store.storageKey === e && r.store.defaults === n) return r.store;
4676
4689
  const s = { scope: t, store: Kn(e, n) };
@@ -4680,13 +4693,13 @@ const Vd = () => {
4680
4693
  if (n.scope === e) return n.value;
4681
4694
  const o = { scope: e, value: t() };
4682
4695
  return r(o), o.value;
4683
- }, au = () => Dd(ru), tr = "on", iu = "off", lu = Object.freeze({ kind: "unavailable" }), cu = (e) => {
4696
+ }, iu = () => Pd(ou), tr = "on", lu = "off", cu = Object.freeze({ kind: "unavailable" }), du = (e) => {
4684
4697
  if (e !== void 0 && (e === null || typeof e != "object" || typeof e.convert != "function"))
4685
4698
  throw new TypeError("[markdown-explorer] draftConverter must be an object with a convert function");
4686
- }, du = (e, t) => {
4699
+ }, uu = (e, t) => {
4687
4700
  const n = ge(e.peek(t));
4688
4701
  return n === null || n.document.kind === "failure" ? fe(t) : n.document.name;
4689
- }, Au = ({
4702
+ }, Du = ({
4690
4703
  data: e,
4691
4704
  config: t,
4692
4705
  storageNamespace: n,
@@ -4700,62 +4713,62 @@ const Vd = () => {
4700
4713
  onEditGrant: l,
4701
4714
  draftConverter: c
4702
4715
  }) => {
4703
- ms(n), cu(c);
4704
- const m = mr(r), g = xs(s), v = ou(m, o), { revalidate: y } = Co(), T = U(() => {
4716
+ hs(n), du(c);
4717
+ const m = mr(r), g = Ts(s), v = su(m, o), { revalidate: E } = Oo(), T = U(() => {
4705
4718
  }), O = ot(t.dataPath), [R] = V(() => {
4706
- const C = Pd({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: Aa({ client: C, capacity: Math.max(nu, t.multiView.maxPanels * 2) }), trees: Hd(C) };
4719
+ const C = Id({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: Na({ client: C, capacity: Math.max(ru, t.multiView.maxPanels * 2) }), trees: zd(C) };
4707
4720
  return Ct(N, e), mn(n, e.scope), { data: C, ...N, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
4708
4721
  });
4709
4722
  if (R.aligned.pageData !== e || R.aligned.storageNamespace !== n) {
4710
4723
  const C = R.aligned.pageData;
4711
4724
  R.aligned.pageData = e, R.aligned.storageNamespace = n, C !== e && (C.scope !== e.scope ? R.aligned.pendingReader = e : Ct(R, e)), mn(n, e.scope);
4712
4725
  }
4713
- const q = su(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4726
+ const q = au(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4714
4727
  Y(() => {
4715
4728
  const C = R.aligned.pendingReader;
4716
4729
  C !== null && (R.aligned.pendingReader = null, er(R), Ct(R, C));
4717
4730
  }, [e, R]), Y(() => {
4718
4731
  let C = !1;
4719
4732
  return T.current = (N) => {
4720
- N === e.scope || C || (C = !0, N !== null && (er(R), hs(n)), y());
4733
+ N === e.scope || C || (C = !0, N !== null && (er(R), ps(n)), E());
4721
4734
  }, () => {
4722
4735
  T.current = () => {
4723
4736
  };
4724
4737
  };
4725
- }, [e, y, R, n]);
4738
+ }, [e, E, R, n]);
4726
4739
  const D = U(t.settingsCookie);
4727
4740
  Y(() => {
4728
4741
  D.current = t.settingsCookie;
4729
4742
  }, [t.settingsCookie]);
4730
4743
  const [h] = V(
4731
- () => zd(e.settings, (C) => {
4732
- document.cookie = Uo(D.current, C, window.location.protocol === "https:");
4744
+ () => jd(e.settings, (C) => {
4745
+ document.cookie = Ho(D.current, C, window.location.protocol === "https:");
4733
4746
  })
4734
- ), p = Ot(e.scope, au), x = Ot(e.scope, Id), A = U(v);
4747
+ ), p = Ot(e.scope, iu), x = Ot(e.scope, $d), A = U(v);
4735
4748
  Y(() => {
4736
4749
  A.current = v;
4737
4750
  }, [v]);
4738
4751
  const I = Ot(
4739
4752
  e.scope,
4740
- () => Is({
4753
+ () => $s({
4741
4754
  data: R.data,
4742
4755
  conflictLabels: () => ({ ours: A.current.conflictOurs, theirs: A.current.conflictTheirs }),
4743
4756
  onSaveSettled: (C, N) => {
4744
4757
  N.kind === "saved" && R.documents.refresh(C);
4745
- const z = Rs(A.current, N, du(R.documents, C));
4758
+ const z = Cs(A.current, N, uu(R.documents, C));
4746
4759
  z !== null && p.announce(z);
4747
4760
  },
4748
4761
  sideBySideSetting: {
4749
4762
  read: () => Mt(Oe(n).editPreview) === tr,
4750
- write: (C) => Lt(Oe(n).editPreview, C ? tr : iu)
4763
+ write: (C) => Lt(Oe(n).editPreview, C ? tr : lu)
4751
4764
  },
4752
4765
  editorShareSetting: {
4753
- read: () => Ps(Mt(Oe(n).editSplit)),
4766
+ read: () => Is(Mt(Oe(n).editSplit)),
4754
4767
  write: (C) => Lt(Oe(n).editSplit, String(C))
4755
4768
  }
4756
4769
  })
4757
4770
  ), _ = X(() => $e(e.notices.catch(() => [])), [e.notices]), b = e.sources.map((C) => C.id).join(`
4758
- `), S = X(() => Bo(t, b.split(`
4771
+ `), S = X(() => Uo(t, b.split(`
4759
4772
  `)), [t, b]), L = U(u);
4760
4773
  Y(() => {
4761
4774
  L.current = u;
@@ -4771,7 +4784,7 @@ const Vd = () => {
4771
4784
  return {
4772
4785
  convert: (N, z) => {
4773
4786
  const W = H.current;
4774
- return W === void 0 ? Promise.resolve(lu) : W.convert(N, z);
4787
+ return W === void 0 ? Promise.resolve(cu) : W.convert(N, z);
4775
4788
  },
4776
4789
  prepare: () => {
4777
4790
  try {
@@ -4782,7 +4795,7 @@ const Vd = () => {
4782
4795
  }
4783
4796
  }
4784
4797
  };
4785
- }), w = c === void 0 ? void 0 : K, k = X(
4798
+ }), w = c === void 0 ? void 0 : K, y = X(
4786
4799
  () => ({
4787
4800
  config: S,
4788
4801
  labels: v,
@@ -4807,90 +4820,91 @@ const Vd = () => {
4807
4820
  }),
4808
4821
  [S, v, m, g, n, e.scope, e.sources, _, R, h, q, p, x, I, l, w, i, P]
4809
4822
  );
4810
- return /* @__PURE__ */ d(hr, { value: k, children: /* @__PURE__ */ d(fu, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4811
- }, uu = ({ ref: e, theme: t, view: n, children: r }) => {
4812
- const [o] = V(Ti);
4823
+ return /* @__PURE__ */ d(hr, { value: y, children: /* @__PURE__ */ d(mu, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4824
+ }, fu = ({ ref: e, theme: t, view: n, children: r }) => {
4825
+ const [o] = V(Ri);
4813
4826
  return /* @__PURE__ */ d("div", { ref: e, className: "aqmx-root", "data-aqmx-theme": t, "data-aqmx-view": n, "data-testid": "markdown-explorer", onKeyDownCapture: o.onKeyDownCapture, onKeyUpCapture: o.onKeyUpCapture, onBlurCapture: o.onBlurCapture, children: r });
4814
- }, fu = ({ renderFrame: e, lockDocumentScroll: t }) => {
4827
+ }, mu = ({ renderFrame: e, lockDocumentScroll: t }) => {
4815
4828
  const { theme: n, labels: r } = $(), o = Bt(), { hash: s } = rr(), a = at(), i = U(null);
4816
- Yd(t, i), Y(() => {
4829
+ Xd(t, i), Y(() => {
4817
4830
  o.kind === "redirect" && a(`${o.href}${s}`, "browse");
4818
4831
  }, [o, s, a]);
4819
4832
  const { location: f } = o, u = f.view;
4820
- Qd(i, u);
4821
- const l = f.view === "tree" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...At }), children: /* @__PURE__ */ d(eu, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...At }), children: /* @__PURE__ */ d(tu, { location: f }) }) : /* @__PURE__ */ d(Ad, { location: f }), c = /* @__PURE__ */ B(uu, { ref: i, theme: n, view: u, children: [
4833
+ eu(i, u);
4834
+ const l = f.view === "tree" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...At }), children: /* @__PURE__ */ d(tu, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ d(Ie, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...At }), children: /* @__PURE__ */ d(nu, { location: f }) }) : /* @__PURE__ */ d(Nd, { location: f }), c = /* @__PURE__ */ B(fu, { ref: i, theme: n, view: u, children: [
4822
4835
  l,
4823
- /* @__PURE__ */ d(Qs, {}),
4824
- /* @__PURE__ */ d(Nd, { holds: !0, testId: "markdown-explorer-announcer" })
4836
+ /* @__PURE__ */ d(ea, {}),
4837
+ /* @__PURE__ */ d(Dd, { holds: !0, testId: "markdown-explorer-announcer" })
4825
4838
  ] });
4826
4839
  return e === void 0 ? c : e({ view: u, children: c });
4827
- }, Nu = ps({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4840
+ }, Pu = gs({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4828
4841
  export {
4829
- od as $,
4830
- Mu as A,
4842
+ ya as $,
4843
+ Nu as A,
4831
4844
  It as B,
4832
- Cs as C,
4833
- Md as D,
4834
- cd as E,
4835
- zs as F,
4836
- gr as G,
4837
- hd as H,
4838
- md as I,
4839
- Zn as J,
4840
- fd as K,
4841
- qe as L,
4842
- Cu as M,
4843
- Ou as N,
4844
- Ci as O,
4845
- Ld as P,
4846
- $s as Q,
4847
- xr as R,
4848
- Sa as S,
4849
- Lu as T,
4850
- Cr as U,
4851
- oi as V,
4845
+ Os as C,
4846
+ Ad as D,
4847
+ dd as E,
4848
+ js as F,
4849
+ Cu as G,
4850
+ gr as H,
4851
+ pd as I,
4852
+ hd as J,
4853
+ Zn as K,
4854
+ md as L,
4855
+ qe as M,
4856
+ Mu as N,
4857
+ Lu as O,
4858
+ Md as P,
4859
+ Oi as Q,
4860
+ _s as R,
4861
+ Tr as S,
4862
+ Au as T,
4863
+ xa as U,
4864
+ Or as V,
4852
4865
  si as W,
4853
- Dt as X,
4854
- hi as Y,
4855
- Wc as Z,
4856
- ya as _,
4857
- Os as a,
4858
- ba as a0,
4859
- Bt as a1,
4860
- Nd as a2,
4861
- Qe as a3,
4862
- gs as a4,
4863
- gn as a5,
4864
- ys as a6,
4865
- fr as a7,
4866
- ws as a8,
4867
- hn as a9,
4868
- Au as aa,
4869
- pn as ab,
4870
- Nu as ac,
4871
- Ls as b,
4866
+ ai as X,
4867
+ Dt as Y,
4868
+ pi as Z,
4869
+ Gc as _,
4870
+ Ls as a,
4871
+ sd as a0,
4872
+ Ea as a1,
4873
+ Bt as a2,
4874
+ Dd as a3,
4875
+ Qe as a4,
4876
+ ws as a5,
4877
+ gn as a6,
4878
+ ys as a7,
4879
+ fr as a8,
4880
+ vs as a9,
4881
+ hn as aa,
4882
+ Du as ab,
4883
+ pn as ac,
4884
+ Pu as ad,
4885
+ Ms as b,
4872
4886
  zt as c,
4873
- xa as d,
4887
+ Ta as d,
4874
4888
  at as e,
4875
- Oc as f,
4876
- al as g,
4889
+ Lc as f,
4890
+ il as g,
4877
4891
  At as h,
4878
- Vc as i,
4879
- ma as j,
4880
- Ms as k,
4881
- wa as l,
4882
- va as m,
4883
- fa as n,
4892
+ Zc as i,
4893
+ ha as j,
4894
+ As as k,
4895
+ va as l,
4896
+ ba as m,
4897
+ ma as n,
4884
4898
  de as o,
4885
4899
  ge as p,
4886
- da as q,
4887
- Zs as r,
4888
- ua as s,
4900
+ ua as q,
4901
+ Ws as r,
4902
+ fa as s,
4889
4903
  Re as t,
4890
4904
  $ as u,
4891
- ha as v,
4905
+ pa as v,
4892
4906
  Ce as w,
4893
- Xs as x,
4894
- ud as y,
4895
- Ru as z
4907
+ Js as x,
4908
+ fd as y,
4909
+ Ou as z
4896
4910
  };