@aiquants/markdown-explorer 0.3.0 → 0.4.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.
- package/CHANGELOG.md +28 -0
- package/README.md +45 -6
- package/dist/ExplorerSplit-rUVsf5i-.cjs +1 -0
- package/dist/ExplorerSplit-uX2ojZe8.js +1479 -0
- package/dist/MultiLayout-8s7q3-Hm.js +919 -0
- package/dist/MultiLayout-ZK2V9nms.cjs +1 -0
- package/dist/NativeScrollBar-D3VDRQqf.js +59 -0
- package/dist/NativeScrollBar-DqkutcGb.cjs +1 -0
- package/dist/{TreeLayout-D6hCSihW.js → TreeLayout-C7ZNnaOr.js} +3 -3
- package/dist/{TreeLayout-BQUfVNlA.cjs → TreeLayout-DkTVgxxb.cjs} +1 -1
- package/dist/core/config.d.cts +11 -0
- package/dist/core/config.d.ts +11 -0
- package/dist/core/contracts.d.cts +8 -0
- package/dist/core/contracts.d.ts +8 -0
- package/dist/core/labels.d.cts +5 -1
- package/dist/core/labels.d.ts +5 -1
- package/dist/core/treeSettings.d.cts +4 -2
- package/dist/core/treeSettings.d.ts +4 -2
- package/dist/dataRoute-DYjYBiXF.cjs +1 -0
- package/dist/{dataRoute-zUX-oR9j.js → dataRoute-Dl6xmEFs.js} +41 -36
- package/dist/index-CLe6vRXs.cjs +3 -0
- package/dist/{index-BJTmp0lR.js → index-Dv9lUZqD.js} +530 -503
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -22
- package/dist/location-2QZADLiv.cjs +1 -0
- package/dist/{location-V5BKeWNs.js → location-CaNtUswk.js} +202 -187
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +1 -1
- package/dist/scrollBarGeometry-C46jBtmM.cjs +1 -0
- package/dist/scrollBarGeometry-DOBdGNV-.js +4 -0
- package/dist/server/errors.d.cts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/fileSystemSource.d.cts +1 -0
- package/dist/server/fileSystemSource.d.ts +1 -0
- package/dist/server/ports.d.cts +4 -0
- package/dist/server/ports.d.ts +4 -0
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +725 -680
- package/dist/styles/markdown-explorer.css +1 -1
- package/dist/tapScrollCircle-C5DGI-0H.cjs +1 -0
- package/dist/tapScrollCircle-u4EXeLhx.js +6 -0
- package/docs/behavior/dom-hooks.md +3 -1
- package/docs/behavior/layout.md +2 -0
- package/docs/behavior/localization.md +1 -0
- package/docs/behavior/security.md +1 -1
- package/package.json +7 -7
- package/dist/ExplorerSplit-B7pmzR8t.js +0 -1362
- package/dist/ExplorerSplit-Bi3yU6NG.cjs +0 -1
- package/dist/MultiLayout-BxeXOLX1.js +0 -909
- package/dist/MultiLayout-DtFrFRmS.cjs +0 -1
- package/dist/dataRoute-B9Wk-G7A.cjs +0 -1
- package/dist/index-DkiGlM7C.cjs +0 -3
- package/dist/location-DfYTzfFS.cjs +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as d, jsxs as U, Fragment as
|
|
1
|
+
import { jsx as d, jsxs as U, Fragment as Bt } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { useParams as
|
|
5
|
-
import { f as
|
|
6
|
-
import { useMarkdownToolbarState as
|
|
7
|
-
import { i as
|
|
8
|
-
import { DEFAULT_CONTENT_ALIGN as
|
|
9
|
-
import { w as
|
|
10
|
-
const
|
|
3
|
+
import { createContext as re, use as G, useMemo as H, useSyncExternalStore as ne, useCallback as P, useRef as j, useEffect as J, Suspense as fe, Component as zt, lazy as $e, useState as Z, useLayoutEffect as V, useEffectEvent as ee, useId as jt } from "react";
|
|
4
|
+
import { useParams as Ht, useSearchParams as It, useNavigate as Zt, Link as Ut, useHref as we, useLocation as pt, useRevalidator as Vt } from "react-router";
|
|
5
|
+
import { f as Gt, a as Wt, u as Kt, G as se, e as le, x as Yt, y as Xt, z as He, B as Jt, D as Ie, H as Qt, w as en, I as tn } from "./location-CaNtUswk.js";
|
|
6
|
+
import { HostedScrollArea as Ze, useMarkdownToolbarState as nn, MarkdownViewer as wt } from "@aiquants/markdown";
|
|
7
|
+
import { i as rn, v as vt, s as Y, q as on, w as Ue, x as ln, y as sn, z as an, f as cn, A as Ve, p as dn, t as un, B as fn, o as mn } from "./dataRoute-Dl6xmEFs.js";
|
|
8
|
+
import { DEFAULT_CONTENT_ALIGN as gn } from "@aiquants/markdown/viewer-settings";
|
|
9
|
+
import { w as hn, r as pn, a as wn, b as Ge, s as vn, c as bn } from "./storage-DA4ItHzl.js";
|
|
10
|
+
const We = Object.freeze(["en", "ja"]), En = "en", Sn = Object.freeze({
|
|
11
11
|
panelMoved: Object.freeze(["title", "column", "position"]),
|
|
12
12
|
panelMoveUnavailable: Object.freeze(["title", "move"]),
|
|
13
13
|
panelDragStarted: Object.freeze(["title"]),
|
|
14
14
|
panelDragCancelled: Object.freeze(["title"]),
|
|
15
15
|
multiColumnRegion: Object.freeze(["column"])
|
|
16
|
-
}),
|
|
16
|
+
}), yn = /\{(\w+)\}/gu, bt = {
|
|
17
17
|
explorerRegion: "Explorer",
|
|
18
18
|
sourceLabel: "Source",
|
|
19
19
|
refreshTreeLabel: "Refresh tree",
|
|
@@ -63,7 +63,10 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
63
63
|
sortNative: "Source order",
|
|
64
64
|
sortAscending: "Name A→Z",
|
|
65
65
|
sortDescending: "Name Z→A",
|
|
66
|
-
|
|
66
|
+
settingFolderPlacement: "Folders",
|
|
67
|
+
folderPlacementMixed: "Mixed",
|
|
68
|
+
folderPlacementFirst: "First",
|
|
69
|
+
folderPlacementLast: "Last",
|
|
67
70
|
settingSelectionMode: "Selection",
|
|
68
71
|
selectionSingle: "Single",
|
|
69
72
|
selectionMultiple: "Multiple",
|
|
@@ -74,6 +77,7 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
74
77
|
settingExpandIconSize: "Expander size",
|
|
75
78
|
expandIconSizeValue: (e) => `${String(e)} px`,
|
|
76
79
|
settingAlwaysExpanded: "Always expanded",
|
|
80
|
+
settingRevealDocument: "Reveal the open document",
|
|
77
81
|
settingRemoveRootIndent: "No root indent",
|
|
78
82
|
settingTreeLines: "Tree lines",
|
|
79
83
|
settingExpandIcons: "Expanders",
|
|
@@ -181,7 +185,7 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
181
185
|
multiColumnEmpty: "This column is empty",
|
|
182
186
|
multiColumnRegion: "Column {column}",
|
|
183
187
|
panelDropHere: "Drop the panel here"
|
|
184
|
-
},
|
|
188
|
+
}, xn = {
|
|
185
189
|
explorerRegion: "エクスプローラー",
|
|
186
190
|
sourceLabel: "ソース",
|
|
187
191
|
refreshTreeLabel: "ツリーを更新",
|
|
@@ -231,7 +235,10 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
231
235
|
sortNative: "取得順",
|
|
232
236
|
sortAscending: "名前の昇順",
|
|
233
237
|
sortDescending: "名前の降順",
|
|
234
|
-
|
|
238
|
+
settingFolderPlacement: "フォルダーの位置",
|
|
239
|
+
folderPlacementMixed: "混ぜる",
|
|
240
|
+
folderPlacementFirst: "先に",
|
|
241
|
+
folderPlacementLast: "後に",
|
|
235
242
|
settingSelectionMode: "選択",
|
|
236
243
|
selectionSingle: "1 件",
|
|
237
244
|
selectionMultiple: "複数",
|
|
@@ -242,6 +249,7 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
242
249
|
settingExpandIconSize: "展開アイコンの大きさ",
|
|
243
250
|
expandIconSizeValue: (e) => `${String(e)} px`,
|
|
244
251
|
settingAlwaysExpanded: "常に展開",
|
|
252
|
+
settingRevealDocument: "開いた文書をツリーで表示",
|
|
245
253
|
settingRemoveRootIndent: "最上位の字下げなし",
|
|
246
254
|
settingTreeLines: "ツリーの線",
|
|
247
255
|
settingExpandIcons: "展開アイコン",
|
|
@@ -349,24 +357,24 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
349
357
|
multiColumnEmpty: "この列は空です",
|
|
350
358
|
multiColumnRegion: "{column} 列目",
|
|
351
359
|
panelDropHere: "ここへパネルをドロップ"
|
|
352
|
-
},
|
|
353
|
-
en: Object.freeze(
|
|
354
|
-
ja: Object.freeze(
|
|
355
|
-
}),
|
|
356
|
-
if (e === void 0) return
|
|
357
|
-
if (
|
|
358
|
-
throw new RangeError(`[markdown-explorer] locale is the UI language (${
|
|
359
|
-
},
|
|
360
|
-
const n =
|
|
360
|
+
}, kn = Object.freeze({
|
|
361
|
+
en: Object.freeze(bt),
|
|
362
|
+
ja: Object.freeze(xn)
|
|
363
|
+
}), Et = Object.freeze(Object.keys(bt)), Rn = new Set(Et), Tn = (e) => Rn.has(e), de = (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, St = (e) => {
|
|
364
|
+
if (e === void 0) return En;
|
|
365
|
+
if (We.includes(e)) return e;
|
|
366
|
+
throw new RangeError(`[markdown-explorer] locale is the UI language (${We.map((t) => JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${de(e)}`);
|
|
367
|
+
}, Ke = (e, t) => {
|
|
368
|
+
const n = kn[St(e)];
|
|
361
369
|
if (t === void 0) return n;
|
|
362
370
|
if (t === null || typeof t != "object")
|
|
363
371
|
throw new RangeError(`[markdown-explorer] labels must be an object; got ${de(t)}`);
|
|
364
|
-
if (!
|
|
372
|
+
if (!Gt(t))
|
|
365
373
|
throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${de(t)}`);
|
|
366
374
|
const r = t, o = { ...n };
|
|
367
375
|
for (const l of Object.keys(r)) {
|
|
368
|
-
if (!
|
|
369
|
-
throw new RangeError(`[markdown-explorer] labels.${l} is not a known label key; expected one of ${
|
|
376
|
+
if (!Tn(l))
|
|
377
|
+
throw new RangeError(`[markdown-explorer] labels.${l} is not a known label key; expected one of ${Et.join(", ")}`);
|
|
370
378
|
const s = r[l];
|
|
371
379
|
if (s === void 0) continue;
|
|
372
380
|
const a = typeof n[l];
|
|
@@ -374,36 +382,36 @@ const Ue = Object.freeze(["en", "ja"]), gn = "en", hn = Object.freeze({
|
|
|
374
382
|
throw new TypeError(`[markdown-explorer] labels.${l} must be a ${a}; got ${de(s)}`);
|
|
375
383
|
if (typeof s == "string" && s.trim() === "")
|
|
376
384
|
throw new RangeError(`[markdown-explorer] labels.${l} must be a non-blank string`);
|
|
377
|
-
const f =
|
|
385
|
+
const f = Sn[l];
|
|
378
386
|
if (typeof s == "string" && f !== void 0) {
|
|
379
|
-
for (const [, h] of s.matchAll(
|
|
387
|
+
for (const [, h] of s.matchAll(yn))
|
|
380
388
|
if (!f.includes(h ?? ""))
|
|
381
389
|
throw new RangeError(`[markdown-explorer] labels.${l} uses the unknown placeholder {${String(h)}}; it accepts ${f.map((m) => `{${m}}`).join(", ")}`);
|
|
382
390
|
}
|
|
383
391
|
o[l] = s;
|
|
384
392
|
}
|
|
385
393
|
return Object.freeze(o);
|
|
386
|
-
},
|
|
394
|
+
}, An = (e, t) => {
|
|
387
395
|
if (Object.is(e, t)) return !0;
|
|
388
396
|
if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
|
|
389
397
|
const n = e, r = t, o = Object.keys(n), l = Object.keys(r);
|
|
390
398
|
return o.length === l.length && l.every((s) => Object.hasOwn(n, s) && Object.is(n[s], r[s]));
|
|
391
|
-
},
|
|
399
|
+
}, Ye = Object.freeze(["light", "dark"]), On = (e) => {
|
|
392
400
|
if (e === void 0) return "light";
|
|
393
|
-
if (
|
|
394
|
-
throw new RangeError(`[markdown-explorer] theme must be ${
|
|
395
|
-
},
|
|
396
|
-
const e =
|
|
401
|
+
if (Ye.includes(e)) return e;
|
|
402
|
+
throw new RangeError(`[markdown-explorer] theme must be ${Ye.map((t) => JSON.stringify(t)).join(" or ")}; got ${typeof e == "string" ? JSON.stringify(e) : typeof e}`);
|
|
403
|
+
}, yt = re(null), D = () => {
|
|
404
|
+
const e = G(yt);
|
|
397
405
|
if (e === null) throw new Error("[markdown-explorer] explorer components must be rendered inside <MarkdownExplorer>");
|
|
398
406
|
return e;
|
|
399
|
-
},
|
|
407
|
+
}, me = (e) => {
|
|
400
408
|
const { viewSettings: t } = D(), n = () => e(t.getSnapshot());
|
|
401
|
-
return
|
|
402
|
-
},
|
|
403
|
-
const { config: e } = D(), t =
|
|
404
|
-
return
|
|
409
|
+
return ne(t.subscribe, n, n);
|
|
410
|
+
}, De = () => {
|
|
411
|
+
const { config: e } = D(), t = Ht()["*"], [n] = It(), r = n.toString();
|
|
412
|
+
return H(() => Wt(e, t, new URLSearchParams(r)), [e, t, r]);
|
|
405
413
|
};
|
|
406
|
-
function
|
|
414
|
+
function Ln({
|
|
407
415
|
title: e,
|
|
408
416
|
titleId: t,
|
|
409
417
|
...n
|
|
@@ -424,20 +432,20 @@ function xn({
|
|
|
424
432
|
clipRule: "evenodd"
|
|
425
433
|
}));
|
|
426
434
|
}
|
|
427
|
-
const
|
|
435
|
+
const Cn = /* @__PURE__ */ x.forwardRef(Ln), Fe = Object.freeze({
|
|
428
436
|
browse: Object.freeze({ replace: !0, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
|
|
429
437
|
"switch-source": Object.freeze({ replace: !1, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
|
|
430
438
|
"switch-view": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 }),
|
|
431
439
|
"follow-link": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 })
|
|
432
|
-
}),
|
|
433
|
-
const e =
|
|
434
|
-
return
|
|
440
|
+
}), Jo = (e) => Fe[e], _e = () => {
|
|
441
|
+
const e = Zt();
|
|
442
|
+
return P(
|
|
435
443
|
(t, n) => {
|
|
436
|
-
e(t,
|
|
444
|
+
e(t, Fe[n]);
|
|
437
445
|
},
|
|
438
446
|
[e]
|
|
439
447
|
);
|
|
440
|
-
},
|
|
448
|
+
}, Mn = ({ navigation: e, ...t }) => /* @__PURE__ */ d(Ut, { ...t, ...Fe[e] }), xt = {
|
|
441
449
|
unauthorized: ["failureUnauthorizedTitle", "failureUnauthorizedBody"],
|
|
442
450
|
forbidden: ["failureForbiddenTitle", "failureForbiddenBody"],
|
|
443
451
|
"not-found": ["failureNotFoundTitle", "failureNotFoundBody"],
|
|
@@ -446,14 +454,14 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
446
454
|
"too-large": ["failureTooLargeTitle", "failureTooLargeBody"],
|
|
447
455
|
unsupported: ["failureUnsupportedTitle", "failureUnsupportedBody"],
|
|
448
456
|
failed: ["failureFailedTitle", "failureFailedBody"]
|
|
449
|
-
},
|
|
450
|
-
const { labels: o } = D(), l =
|
|
457
|
+
}, ve = (e, t) => e[xt[t][0]], Nn = ({ failure: e, alert: t, onRetry: n, testId: r }) => {
|
|
458
|
+
const { labels: o } = D(), l = ve(o, e.reason), s = o[xt[e.reason][1]], a = e.reason === "unauthorized" || e.reason === "forbidden" || e.reason === "failed" ? "danger" : "warning";
|
|
451
459
|
return /* @__PURE__ */ U("div", { className: "aqmx-callout", role: t ? "alert" : void 0, "data-aqmx-tone": a, "data-testid": r === null ? void 0 : r, "data-aqmx-failure": r === null ? void 0 : e.reason, children: [
|
|
452
460
|
/* @__PURE__ */ d("p", { className: "aqmx-callout-title", children: l }),
|
|
453
461
|
/* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: s }),
|
|
454
462
|
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
|
|
455
463
|
] });
|
|
456
|
-
},
|
|
464
|
+
}, kt = (e) => {
|
|
457
465
|
const t = e.ownerDocument;
|
|
458
466
|
if (e.focus({ preventScroll: !0 }), t.activeElement === e) return !0;
|
|
459
467
|
if (e.hasAttribute("tabindex")) return !1;
|
|
@@ -463,12 +471,12 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
463
471
|
t.activeElement !== e && (e.removeAttribute("tabindex"), e.removeEventListener("blur", n));
|
|
464
472
|
};
|
|
465
473
|
return e.addEventListener("blur", n), !0;
|
|
466
|
-
},
|
|
467
|
-
const n =
|
|
474
|
+
}, Pn = (e, t) => {
|
|
475
|
+
const n = j(null), r = j(null), o = j(null), l = P(() => {
|
|
468
476
|
n.current !== null && window.clearTimeout(n.current), n.current = null, r.current = null;
|
|
469
477
|
}, []);
|
|
470
|
-
|
|
471
|
-
const s =
|
|
478
|
+
J(() => l, [l]);
|
|
479
|
+
const s = P(
|
|
472
480
|
(h) => {
|
|
473
481
|
if (r.current !== h) return;
|
|
474
482
|
const m = o.current;
|
|
@@ -485,21 +493,21 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
485
493
|
});
|
|
486
494
|
},
|
|
487
495
|
[e]
|
|
488
|
-
), a =
|
|
496
|
+
), a = P(
|
|
489
497
|
(h) => {
|
|
490
498
|
const m = t(h);
|
|
491
499
|
m !== r.current && (l(), m !== null && (r.current = m, n.current = window.setTimeout(() => {
|
|
492
500
|
n.current = null, s(m);
|
|
493
|
-
},
|
|
501
|
+
}, Kt)));
|
|
494
502
|
},
|
|
495
503
|
[l, t, s]
|
|
496
|
-
), f =
|
|
504
|
+
), f = P(
|
|
497
505
|
(h) => {
|
|
498
506
|
t(h) !== r.current && l();
|
|
499
507
|
},
|
|
500
508
|
[l, t]
|
|
501
509
|
);
|
|
502
|
-
return
|
|
510
|
+
return H(
|
|
503
511
|
() => ({
|
|
504
512
|
onPointerOver: (h) => a(h.target),
|
|
505
513
|
onPointerOut: (h) => f(h.relatedTarget),
|
|
@@ -508,7 +516,20 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
508
516
|
}),
|
|
509
517
|
[a, f]
|
|
510
518
|
);
|
|
511
|
-
},
|
|
519
|
+
}, $n = $e(() => import("./NativeScrollBar-D3VDRQqf.js").then((e) => ({ default: e.NativeScrollBar })));
|
|
520
|
+
class Dn extends zt {
|
|
521
|
+
state = { failed: !1 };
|
|
522
|
+
static getDerivedStateFromError() {
|
|
523
|
+
return { failed: !0 };
|
|
524
|
+
}
|
|
525
|
+
componentDidCatch(t) {
|
|
526
|
+
console.error("[markdown-explorer] a scroll bar failed to load or render; its scroller keeps its native scrolling without it.", t);
|
|
527
|
+
}
|
|
528
|
+
render() {
|
|
529
|
+
return this.state.failed ? null : this.props.children;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
const Fn = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ d(Dn, { children: /* @__PURE__ */ d(fe, { fallback: null, children: /* @__PURE__ */ d($n, { scroller: e, withCircle: t }) }) }), Rt = (e) => /* @__PURE__ */ d(Fn, { scroller: e, withCircle: !0 }), be = () => {
|
|
512
533
|
const e = /* @__PURE__ */ new Set();
|
|
513
534
|
return {
|
|
514
535
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -518,7 +539,7 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
518
539
|
for (const t of [...e]) t();
|
|
519
540
|
}
|
|
520
541
|
};
|
|
521
|
-
},
|
|
542
|
+
}, Tt = () => {
|
|
522
543
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
523
544
|
let n = !1;
|
|
524
545
|
const r = (o) => {
|
|
@@ -545,13 +566,13 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
545
566
|
resumes: (o) => t.delete(o),
|
|
546
567
|
heldKeys: () => [...e.keys()]
|
|
547
568
|
};
|
|
548
|
-
},
|
|
569
|
+
}, ge = (e, t) => {
|
|
549
570
|
if (Object.is(e, t)) return !0;
|
|
550
571
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
551
572
|
if (Array.isArray(e) || Array.isArray(t))
|
|
552
|
-
return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((l, s) =>
|
|
573
|
+
return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((l, s) => ge(l, t[s]));
|
|
553
574
|
const n = e, r = t, o = Object.keys(n);
|
|
554
|
-
return o.length !== Object.keys(r).length ? !1 : o.every((l) => Object.hasOwn(r, l) &&
|
|
575
|
+
return o.length !== Object.keys(r).length ? !1 : o.every((l) => Object.hasOwn(r, l) && ge(n[l], r[l]));
|
|
555
576
|
}, ie = (e) => {
|
|
556
577
|
const t = e;
|
|
557
578
|
return t.status === void 0 && (t.status = "pending", e.then(
|
|
@@ -562,9 +583,9 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
562
583
|
t.status = "rejected", t.reason = n;
|
|
563
584
|
}
|
|
564
585
|
)), t;
|
|
565
|
-
},
|
|
586
|
+
}, At = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), ae = (e) => e.status === "fulfilled" ? e.value : void 0, _n = 55e3, Xe = Object.freeze({ status: "deferred" }), Je = Object.freeze({ status: "refreshed" }), Ae = Object.freeze({ status: "superseded" }), he = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Ot = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", qn = ({ client: e, capacity: t }) => {
|
|
566
587
|
if (!Number.isInteger(t) || t < 1) throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${String(t)}`);
|
|
567
|
-
const n = /* @__PURE__ */ new Map(), r =
|
|
588
|
+
const n = /* @__PURE__ */ new Map(), r = Tt(), o = be(), l = /* @__PURE__ */ new WeakSet();
|
|
568
589
|
let s = 0;
|
|
569
590
|
const a = o.emit, f = () => (s += 1, s), h = () => {
|
|
570
591
|
if (!(n.size <= t))
|
|
@@ -574,22 +595,22 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
574
595
|
}
|
|
575
596
|
}, m = (u, p) => {
|
|
576
597
|
n.delete(u), n.set(u, p);
|
|
577
|
-
}, g = (u) => performance.now() - u.validatedAt >=
|
|
578
|
-
const E = n.get(u), y =
|
|
579
|
-
return m(u,
|
|
580
|
-
n.get(u) ===
|
|
581
|
-
}),
|
|
582
|
-
}, R = (u, p, S, E, y,
|
|
583
|
-
p.background === S && (p.background = null, !(n.get(u) !== p || p.snapshot !== E) && (y.kind === "failure" && E.document.kind !== "failure" || (p.validatedAt =
|
|
598
|
+
}, g = (u) => performance.now() - u.validatedAt >= _n, b = (u, p, S) => {
|
|
599
|
+
const E = n.get(u), y = he(E?.snapshot), $ = S || E?.refreshPending === !0, I = ie(e.document(u, { refresh: $ }).then((B) => ({ status: "loaded", document: B }))), C = { snapshot: { status: "pending", promise: I, previous: y }, validatedAt: performance.now(), opened: p, background: null, refreshPending: !1, seeded: void 0, stamp: f() };
|
|
600
|
+
return m(u, C), h(), I.then((B) => {
|
|
601
|
+
n.get(u) === C && (C.snapshot = B, C.stamp = f(), a());
|
|
602
|
+
}), C;
|
|
603
|
+
}, R = (u, p, S, E, y, $) => {
|
|
604
|
+
p.background === S && (p.background = null, !(n.get(u) !== p || p.snapshot !== E) && (y.kind === "failure" && E.document.kind !== "failure" || (p.validatedAt = $, p.stamp = f(), ge(E.document, y) || (p.snapshot = { status: "loaded", document: y }), a())));
|
|
584
605
|
}, k = async (u, p) => {
|
|
585
606
|
const S = p.snapshot;
|
|
586
607
|
if (S.status !== "loaded") return null;
|
|
587
608
|
const E = {};
|
|
588
609
|
p.background = E;
|
|
589
|
-
const y = performance.now(),
|
|
610
|
+
const y = performance.now(), $ = e.document(u, { refresh: p.refreshPending });
|
|
590
611
|
p.refreshPending = !1;
|
|
591
|
-
const
|
|
592
|
-
return R(u, p, E, S,
|
|
612
|
+
const I = await $, C = p.background === E && n.get(u) === p && p.snapshot === S;
|
|
613
|
+
return R(u, p, E, S, I, y), C ? I : null;
|
|
593
614
|
}, A = (u, p) => {
|
|
594
615
|
const { snapshot: S } = p;
|
|
595
616
|
return S.status === "pending" ? !1 : S.status === "loaded" && S.document.kind !== "failure" ? (k(u, p), !1) : (S.status === "loaded" && l.add(S), b(u, !0, !1), !0);
|
|
@@ -627,24 +648,24 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
627
648
|
seed: (u, p) => {
|
|
628
649
|
const S = performance.now(), E = ie(
|
|
629
650
|
p.then(
|
|
630
|
-
(
|
|
631
|
-
() =>
|
|
651
|
+
(B) => B === null ? Xe : { status: "loaded", document: B },
|
|
652
|
+
() => Xe
|
|
632
653
|
)
|
|
633
654
|
), y = n.get(u);
|
|
634
655
|
if (y !== void 0 && y.snapshot.status === "loaded") {
|
|
635
|
-
const
|
|
636
|
-
y.background =
|
|
637
|
-
if (
|
|
638
|
-
R(u, y,
|
|
656
|
+
const B = y.snapshot, M = {};
|
|
657
|
+
y.background = M, E.then((_) => {
|
|
658
|
+
if (_.status === "loaded") {
|
|
659
|
+
R(u, y, M, B, _.document, S);
|
|
639
660
|
return;
|
|
640
661
|
}
|
|
641
|
-
y.background ===
|
|
662
|
+
y.background === M && (y.background = null);
|
|
642
663
|
});
|
|
643
664
|
return;
|
|
644
665
|
}
|
|
645
|
-
const
|
|
646
|
-
m(u,
|
|
647
|
-
n.get(u) ===
|
|
666
|
+
const $ = y !== void 0 && y.snapshot.status === "pending" ? y.snapshot.previous : null, I = { status: "pending", promise: E, previous: $ }, C = { snapshot: I, validatedAt: S, opened: y?.opened === !0, background: null, refreshPending: y?.refreshPending === !0, seeded: I, stamp: f() };
|
|
667
|
+
m(u, C), h(), E.then((B) => {
|
|
668
|
+
n.get(u) === C && (B.status === "deferred" && r.isHeld(u) ? b(u, C.opened, !1) : (C.snapshot = B, C.stamp = f()), a());
|
|
648
669
|
});
|
|
649
670
|
},
|
|
650
671
|
invalidate: () => {
|
|
@@ -664,13 +685,13 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
664
685
|
},
|
|
665
686
|
refresh: async (u) => {
|
|
666
687
|
const p = n.get(u);
|
|
667
|
-
if (p !== void 0 &&
|
|
688
|
+
if (p !== void 0 && Ot(p.snapshot)) {
|
|
668
689
|
p.refreshPending = !0;
|
|
669
690
|
const E = await k(u, p);
|
|
670
|
-
return E === null ?
|
|
691
|
+
return E === null ? Ae : E.kind === "failure" ? { status: "failed", failure: E.failure } : Je;
|
|
671
692
|
}
|
|
672
693
|
const S = b(u, !0, !0);
|
|
673
|
-
return a(), S.snapshot.status !== "pending" ?
|
|
694
|
+
return a(), S.snapshot.status !== "pending" ? Ae : (await S.snapshot.promise, n.get(u) === S ? Je : Ae);
|
|
674
695
|
},
|
|
675
696
|
clear: () => {
|
|
676
697
|
n.clear();
|
|
@@ -680,8 +701,8 @@ const kn = /* @__PURE__ */ x.forwardRef(xn), De = Object.freeze({
|
|
|
680
701
|
subscribe: o.subscribe,
|
|
681
702
|
noteFailureShown: (u) => l.has(u) ? !1 : (l.add(u), !0)
|
|
682
703
|
};
|
|
683
|
-
};
|
|
684
|
-
function
|
|
704
|
+
}, pe = re("fill"), Bn = Object.freeze({ blockSize: "100%" }), Ee = ({ scrollerProps: e, children: t }) => G(pe) === "content" ? /* @__PURE__ */ d(Ze, { scrollerProps: e, children: t }) : /* @__PURE__ */ d(Ze, { scrollerProps: { ...e, style: Bn }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Rt, children: t });
|
|
705
|
+
function zn({
|
|
685
706
|
title: e,
|
|
686
707
|
titleId: t,
|
|
687
708
|
...n
|
|
@@ -702,8 +723,8 @@ function Mn({
|
|
|
702
723
|
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"
|
|
703
724
|
}));
|
|
704
725
|
}
|
|
705
|
-
const
|
|
706
|
-
function
|
|
726
|
+
const jn = /* @__PURE__ */ x.forwardRef(zn);
|
|
727
|
+
function Hn({
|
|
707
728
|
title: e,
|
|
708
729
|
titleId: t,
|
|
709
730
|
...n
|
|
@@ -728,17 +749,17 @@ function Nn({
|
|
|
728
749
|
clipRule: "evenodd"
|
|
729
750
|
}));
|
|
730
751
|
}
|
|
731
|
-
const
|
|
752
|
+
const In = /* @__PURE__ */ x.forwardRef(Hn), Se = ({ name: e, url: t, icon: n, children: r }) => {
|
|
732
753
|
const { labels: o } = D();
|
|
733
754
|
return /* @__PURE__ */ U("div", { className: "aqmx-document-toolbar", children: [
|
|
734
755
|
/* @__PURE__ */ d("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: n }),
|
|
735
756
|
/* @__PURE__ */ d("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
|
|
736
757
|
r,
|
|
737
|
-
/* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": o.openInNewTab, title: o.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(
|
|
738
|
-
/* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, download: e, "aria-label": o.download, title: o.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(
|
|
758
|
+
/* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": o.openInNewTab, title: o.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ d(In, {}) }),
|
|
759
|
+
/* @__PURE__ */ d("a", { className: "aqmx-icon-button", href: t, download: e, "aria-label": o.download, title: o.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ d(jn, {}) })
|
|
739
760
|
] });
|
|
740
761
|
};
|
|
741
|
-
function
|
|
762
|
+
function Zn({
|
|
742
763
|
title: e,
|
|
743
764
|
titleId: t,
|
|
744
765
|
...n
|
|
@@ -759,45 +780,45 @@ function Dn({
|
|
|
759
780
|
clipRule: "evenodd"
|
|
760
781
|
}));
|
|
761
782
|
}
|
|
762
|
-
const
|
|
783
|
+
const Un = /* @__PURE__ */ x.forwardRef(Zn), Vn = Object.freeze({ className: "aqmx-document-stage" }), Gn = ({ document: e }) => {
|
|
763
784
|
const { labels: t } = D();
|
|
764
785
|
return /* @__PURE__ */ U("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-file-view", children: [
|
|
765
|
-
/* @__PURE__ */ d(
|
|
766
|
-
/* @__PURE__ */ d(
|
|
786
|
+
/* @__PURE__ */ d(Se, { name: e.name, url: e.url, icon: /* @__PURE__ */ d(Un, {}) }),
|
|
787
|
+
/* @__PURE__ */ d(Ee, { scrollerProps: Vn, children: /* @__PURE__ */ U("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
|
|
767
788
|
/* @__PURE__ */ d("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
|
|
768
789
|
/* @__PURE__ */ d("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
|
|
769
790
|
] }) })
|
|
770
791
|
] });
|
|
771
|
-
},
|
|
792
|
+
}, qe = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", Wn = (e) => {
|
|
772
793
|
const t = e.indexOf("#");
|
|
773
794
|
return t === -1 ? "" : e.slice(t);
|
|
774
|
-
},
|
|
795
|
+
}, Kn = /(%[0-9A-Fa-f]{2})/u, Be = (e) => {
|
|
775
796
|
if (!e.startsWith("#") || e.length === 1) return null;
|
|
776
|
-
const t = new TextEncoder(), n = e.slice(1).split(
|
|
797
|
+
const t = new TextEncoder(), n = e.slice(1).split(Kn).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
|
|
777
798
|
return new TextDecoder("utf-8", { ignoreBOM: !0 }).decode(Uint8Array.from(n));
|
|
778
|
-
},
|
|
799
|
+
}, Lt = (e) => `#${encodeURIComponent(e)}`, Yn = (e) => {
|
|
779
800
|
if (e === "#") return !0;
|
|
780
|
-
const t =
|
|
801
|
+
const t = Be(e);
|
|
781
802
|
return t !== null && t.replace(/[A-Z]/gu, (n) => n.toLowerCase()) === "top";
|
|
782
|
-
},
|
|
803
|
+
}, Ct = (e, t) => {
|
|
783
804
|
if (t === "") return null;
|
|
784
805
|
for (const n of e.querySelectorAll("[id]"))
|
|
785
806
|
if (n.id === t) return n;
|
|
786
807
|
return null;
|
|
787
|
-
},
|
|
808
|
+
}, Xn = "http://www.w3.org/1999/xhtml", Qe = (e, t) => {
|
|
788
809
|
if (t === "") return null;
|
|
789
|
-
const n =
|
|
810
|
+
const n = Ct(e, t);
|
|
790
811
|
if (n !== null) return n;
|
|
791
812
|
for (const r of e.querySelectorAll("a[name]"))
|
|
792
|
-
if (r.localName === "a" && r.namespaceURI ===
|
|
813
|
+
if (r.localName === "a" && r.namespaceURI === Xn && r.getAttribute("name") === t) return r;
|
|
793
814
|
return null;
|
|
794
|
-
},
|
|
815
|
+
}, Mt = (e, t) => {
|
|
795
816
|
if (e === null || !t.startsWith("#")) return null;
|
|
796
|
-
const n =
|
|
817
|
+
const n = Qe(e, t.slice(1));
|
|
797
818
|
if (n !== null) return n;
|
|
798
|
-
const r =
|
|
799
|
-
return r === null ? null :
|
|
800
|
-
},
|
|
819
|
+
const r = Be(t);
|
|
820
|
+
return r === null ? null : Qe(e, r);
|
|
821
|
+
}, et = (e) => {
|
|
801
822
|
const { body: t, documentElement: n } = e.ownerDocument;
|
|
802
823
|
if (e === t) {
|
|
803
824
|
const o = getComputedStyle(n);
|
|
@@ -805,22 +826,22 @@ const Fn = /* @__PURE__ */ x.forwardRef(Dn), Pn = ({ document: e }) => {
|
|
|
805
826
|
}
|
|
806
827
|
const { overflowY: r } = getComputedStyle(e);
|
|
807
828
|
return r === "auto" || r === "scroll";
|
|
808
|
-
},
|
|
829
|
+
}, Jn = (e) => {
|
|
809
830
|
const { body: t, documentElement: n } = e, r = getComputedStyle(n), o = r.overflowX === "visible" && r.overflowY === "visible" && t !== null ? getComputedStyle(t).overflowY : r.overflowY;
|
|
810
831
|
return o !== "hidden" && o !== "clip";
|
|
811
|
-
},
|
|
812
|
-
const n = t.closest(
|
|
813
|
-
if (r.scrollHeight > r.clientHeight &&
|
|
832
|
+
}, Qn = (e, t) => {
|
|
833
|
+
const n = t.closest(qe), r = n !== null && e.contains(n) ? n : e;
|
|
834
|
+
if (r.scrollHeight > r.clientHeight && et(r)) return r;
|
|
814
835
|
const o = e.getBoundingClientRect().height, { documentElement: l, scrollingElement: s } = e.ownerDocument;
|
|
815
836
|
for (let a = e.parentElement; a !== null && a !== l; a = a.parentElement)
|
|
816
|
-
if (
|
|
817
|
-
return s instanceof Element &&
|
|
818
|
-
},
|
|
819
|
-
scrollerOf:
|
|
837
|
+
if (et(a) && a.scrollHeight > a.clientHeight && a.clientHeight < o) return a;
|
|
838
|
+
return s instanceof Element && Jn(e.ownerDocument) && s.scrollHeight > s.clientHeight && s.clientHeight < o ? s : r;
|
|
839
|
+
}, er = Object.freeze({
|
|
840
|
+
scrollerOf: Qn,
|
|
820
841
|
reveal: (e) => {
|
|
821
|
-
e.scrollIntoView(
|
|
842
|
+
e.scrollIntoView(Ce);
|
|
822
843
|
}
|
|
823
|
-
}),
|
|
844
|
+
}), Ce = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), tr = (e, t) => {
|
|
824
845
|
for (let n = t; n !== null && n !== e; n = n.parentElement) {
|
|
825
846
|
const r = n.parentElement;
|
|
826
847
|
if (r instanceof HTMLDetailsElement && n !== r.querySelector(":scope > summary") && (r.open = !0), n.getAttribute("hidden")?.toLowerCase() === "until-found") {
|
|
@@ -828,23 +849,23 @@ const Fn = /* @__PURE__ */ x.forwardRef(Dn), Pn = ({ document: e }) => {
|
|
|
828
849
|
n.removeAttribute("hidden");
|
|
829
850
|
}
|
|
830
851
|
}
|
|
831
|
-
},
|
|
852
|
+
}, nr = (e, t) => {
|
|
832
853
|
if (t.getClientRects().length === 0) return;
|
|
833
854
|
const n = e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, { scrollMarginTop: r, scrollMarginBottom: o } = getComputedStyle(t), l = Number.parseFloat(r), s = t.getBoundingClientRect(), a = s.height + l + Number.parseFloat(o) > e.clientHeight;
|
|
834
855
|
if (!a && Math.abs(s.top - l - n) < 1) {
|
|
835
|
-
t.scrollIntoView(
|
|
856
|
+
t.scrollIntoView(Ce);
|
|
836
857
|
return;
|
|
837
858
|
}
|
|
838
|
-
e.scrollBy({ top: a ? s.top - n - e.clientHeight : s.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(
|
|
839
|
-
},
|
|
840
|
-
const n = t.scrollerOf(e, e.querySelector(
|
|
859
|
+
e.scrollBy({ top: a ? s.top - n - e.clientHeight : s.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(Ce);
|
|
860
|
+
}, rr = (e, t) => {
|
|
861
|
+
const n = t.scrollerOf(e, e.querySelector(qe) ?? e);
|
|
841
862
|
n.getClientRects().length !== 0 && (n.scrollTo({ top: 0, left: 0, behavior: "instant" }), t.reveal(n));
|
|
842
|
-
},
|
|
863
|
+
}, tt = (e, t, n) => {
|
|
843
864
|
if (e === null) return null;
|
|
844
|
-
const r =
|
|
845
|
-
return r === null ? (
|
|
865
|
+
const r = Mt(e, t);
|
|
866
|
+
return r === null ? (Yn(t) && rr(e, n), null) : (tr(e, r), nr(n.scrollerOf(e, r), r), n.reveal(r), r);
|
|
846
867
|
};
|
|
847
|
-
function
|
|
868
|
+
function or({
|
|
848
869
|
title: e,
|
|
849
870
|
titleId: t,
|
|
850
871
|
...n
|
|
@@ -863,8 +884,8 @@ function Wn({
|
|
|
863
884
|
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"
|
|
864
885
|
}));
|
|
865
886
|
}
|
|
866
|
-
const
|
|
867
|
-
function
|
|
887
|
+
const lr = /* @__PURE__ */ x.forwardRef(or);
|
|
888
|
+
function ir({
|
|
868
889
|
title: e,
|
|
869
890
|
titleId: t,
|
|
870
891
|
...n
|
|
@@ -887,8 +908,8 @@ function Gn({
|
|
|
887
908
|
clipRule: "evenodd"
|
|
888
909
|
}));
|
|
889
910
|
}
|
|
890
|
-
const
|
|
891
|
-
function
|
|
911
|
+
const sr = /* @__PURE__ */ x.forwardRef(ir);
|
|
912
|
+
function ar({
|
|
892
913
|
title: e,
|
|
893
914
|
titleId: t,
|
|
894
915
|
...n
|
|
@@ -911,8 +932,8 @@ function Yn({
|
|
|
911
932
|
clipRule: "evenodd"
|
|
912
933
|
}));
|
|
913
934
|
}
|
|
914
|
-
const
|
|
915
|
-
function
|
|
935
|
+
const cr = /* @__PURE__ */ x.forwardRef(ar);
|
|
936
|
+
function dr({
|
|
916
937
|
title: e,
|
|
917
938
|
titleId: t,
|
|
918
939
|
...n
|
|
@@ -933,7 +954,7 @@ function Qn({
|
|
|
933
954
|
clipRule: "evenodd"
|
|
934
955
|
}));
|
|
935
956
|
}
|
|
936
|
-
const
|
|
957
|
+
const ur = /* @__PURE__ */ x.forwardRef(dr), Me = "data-aqmx-key-repeat", Ne = Object.freeze({ [Me]: "allow" }), fr = `[${Me}="${Ne[Me]}"]`, mr = () => {
|
|
937
958
|
let e = null;
|
|
938
959
|
return {
|
|
939
960
|
onKeyDownCapture: (t) => {
|
|
@@ -942,7 +963,7 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
942
963
|
e = t.target instanceof Element ? t.target : null;
|
|
943
964
|
return;
|
|
944
965
|
}
|
|
945
|
-
e !== null && t.target === e && e.closest(
|
|
966
|
+
e !== null && t.target === e && e.closest(fr) !== null || (t.preventDefault(), t.stopPropagation());
|
|
946
967
|
}
|
|
947
968
|
},
|
|
948
969
|
onKeyUpCapture: (t) => {
|
|
@@ -952,7 +973,7 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
952
973
|
t.target === e && (e = null);
|
|
953
974
|
}
|
|
954
975
|
};
|
|
955
|
-
}, ue = Object.freeze([1 / se ** 2, 1 / se, 1, se, se ** 2]),
|
|
976
|
+
}, ue = Object.freeze([1 / se ** 2, 1 / se, 1, se, se ** 2]), nt = Object.freeze({ mode: "fit" }), gr = 1, hr = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), pr = re(null), wr = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= gr ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, rt = (e, t, n) => {
|
|
956
977
|
if (e.mode === "level") {
|
|
957
978
|
const o = e.index + n;
|
|
958
979
|
return o >= 0 && o < ue.length ? o : null;
|
|
@@ -960,23 +981,23 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
960
981
|
if (t === null || !Number.isFinite(t) || t <= 0) return null;
|
|
961
982
|
const r = n === 1 ? ue.findIndex((o) => o > t) : ue.findLastIndex((o) => o < t);
|
|
962
983
|
return r === -1 ? null : r;
|
|
963
|
-
},
|
|
984
|
+
}, ot = (e, t, n) => {
|
|
964
985
|
if (e.mode === "level") {
|
|
965
|
-
const o =
|
|
986
|
+
const o = rt(e, null, n);
|
|
966
987
|
return o === null ? null : { mode: "level", index: o, base: e.base };
|
|
967
988
|
}
|
|
968
989
|
if (t === null) return null;
|
|
969
|
-
const r =
|
|
990
|
+
const r = rt(e, t.scale, n);
|
|
970
991
|
return r === null ? null : { mode: "level", index: r, base: t.base };
|
|
971
|
-
},
|
|
992
|
+
}, vr = (e) => {
|
|
972
993
|
const t = ue[e];
|
|
973
994
|
if (t === void 0) throw new RangeError(`[markdown-explorer] no image zoom step ${String(e)}`);
|
|
974
995
|
return t;
|
|
975
|
-
},
|
|
976
|
-
const { labels: t } = D(), n =
|
|
996
|
+
}, lt = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, br = ({ document: e }) => {
|
|
997
|
+
const { labels: t } = D(), n = G(pr), [r] = Z(() => n === null ? null : n.read(e.url)), [o, l] = Z(r === null ? nt : r.zoom), [s, a] = Z(r === null ? null : r.reported), [f, h] = Z(null), m = j(null), g = P((O) => {
|
|
977
998
|
const { naturalWidth: u, naturalHeight: p } = O;
|
|
978
|
-
a((S) =>
|
|
979
|
-
}, []), b =
|
|
999
|
+
a((S) => lt(S, u, p));
|
|
1000
|
+
}, []), b = P(
|
|
980
1001
|
(O) => {
|
|
981
1002
|
m.current = O, !(O === null || !O.complete) && (O.naturalWidth > 0 || O.naturalHeight > 0 ? g(O) : O.decode().then(
|
|
982
1003
|
() => g(O),
|
|
@@ -986,19 +1007,19 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
986
1007
|
},
|
|
987
1008
|
[g]
|
|
988
1009
|
);
|
|
989
|
-
|
|
1010
|
+
J(() => {
|
|
990
1011
|
n !== null && s !== null && n.save(e.url, { zoom: o, reported: s });
|
|
991
1012
|
}, [n, e.url, o, s]), V(() => {
|
|
992
1013
|
const O = m.current;
|
|
993
1014
|
if (O === null || s === null || o.mode !== "fit") return;
|
|
994
|
-
const u = () => h((S) =>
|
|
1015
|
+
const u = () => h((S) => lt(S, O.clientWidth, O.clientHeight));
|
|
995
1016
|
if (u(), typeof ResizeObserver > "u") return;
|
|
996
1017
|
const p = new ResizeObserver(u);
|
|
997
1018
|
return p.observe(O), () => p.disconnect();
|
|
998
1019
|
}, [s, o.mode]);
|
|
999
|
-
const R = s === null || f === null ? null :
|
|
1020
|
+
const R = s === null || f === null ? null : wr(s, f), k = ot(o, R, -1), A = ot(o, R, 1), T = o.mode === "level" ? vr(o.index) : null, F = o.mode === "level" && T !== null ? { width: `${o.base.width * T}px`, height: `${o.base.height * T}px` } : void 0;
|
|
1000
1021
|
return /* @__PURE__ */ U("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-image-view", children: [
|
|
1001
|
-
/* @__PURE__ */ U(
|
|
1022
|
+
/* @__PURE__ */ U(Se, { name: e.name, url: e.url, icon: /* @__PURE__ */ d(ur, {}), children: [
|
|
1002
1023
|
/* @__PURE__ */ d(
|
|
1003
1024
|
"button",
|
|
1004
1025
|
{
|
|
@@ -1010,8 +1031,8 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
1010
1031
|
onClick: () => {
|
|
1011
1032
|
k !== null && l(k);
|
|
1012
1033
|
},
|
|
1013
|
-
...
|
|
1014
|
-
children: /* @__PURE__ */ d(
|
|
1034
|
+
...Ne,
|
|
1035
|
+
children: /* @__PURE__ */ d(sr, {})
|
|
1015
1036
|
}
|
|
1016
1037
|
),
|
|
1017
1038
|
/* @__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)) }),
|
|
@@ -1026,32 +1047,32 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
1026
1047
|
onClick: () => {
|
|
1027
1048
|
A !== null && l(A);
|
|
1028
1049
|
},
|
|
1029
|
-
...
|
|
1030
|
-
children: /* @__PURE__ */ d(
|
|
1050
|
+
...Ne,
|
|
1051
|
+
children: /* @__PURE__ */ d(cr, {})
|
|
1031
1052
|
}
|
|
1032
1053
|
),
|
|
1033
|
-
/* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => l(
|
|
1054
|
+
/* @__PURE__ */ d("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => l(nt), children: /* @__PURE__ */ d(lr, {}) })
|
|
1034
1055
|
] }),
|
|
1035
|
-
/* @__PURE__ */ d(
|
|
1056
|
+
/* @__PURE__ */ d(Ee, { scrollerProps: hr, children: /* @__PURE__ */ d("img", { ref: b, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: F, onLoad: (O) => g(O.currentTarget), "data-testid": "markdown-explorer-image" }) })
|
|
1036
1057
|
] });
|
|
1037
|
-
},
|
|
1038
|
-
const e =
|
|
1058
|
+
}, Nt = re(null), ye = re(void 0), Pt = re(null), xe = () => {
|
|
1059
|
+
const e = G(Nt);
|
|
1039
1060
|
if (e === null) throw new Error("[markdown-explorer] document links must be rendered inside a document pane");
|
|
1040
1061
|
return e;
|
|
1041
|
-
},
|
|
1042
|
-
const e =
|
|
1062
|
+
}, Er = () => {
|
|
1063
|
+
const e = G(Pt);
|
|
1043
1064
|
if (e === null) throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");
|
|
1044
1065
|
return e;
|
|
1045
|
-
},
|
|
1046
|
-
const { config: t } = D(), n =
|
|
1047
|
-
return /* @__PURE__ */ d(
|
|
1048
|
-
},
|
|
1049
|
-
const t = e instanceof Element ? e.closest(
|
|
1066
|
+
}, ke = (e, t, n, r) => t.kind === "panel" ? le(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? le(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : le(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Sr = ({ children: e }) => {
|
|
1067
|
+
const { config: t } = D(), n = xe(), r = De(), o = r.kind === "location" ? r.location.source : void 0, l = we(ke(t, n.navigation, o, n.currentPath));
|
|
1068
|
+
return /* @__PURE__ */ d(ye, { value: o, children: /* @__PURE__ */ d(Pt, { value: l, children: e }) });
|
|
1069
|
+
}, yr = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', xr = (e) => {
|
|
1070
|
+
const t = e instanceof Element ? e.closest(yr) : null;
|
|
1050
1071
|
return t === null ? null : t.getAttribute("data-doc-path");
|
|
1051
|
-
},
|
|
1052
|
-
const h =
|
|
1072
|
+
}, Re = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, kr = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: l, onDocumentLink: s, scope: a, children: f }) => {
|
|
1073
|
+
const h = we(e);
|
|
1053
1074
|
return /* @__PURE__ */ d("a", { ...l, href: h, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (g) => {
|
|
1054
|
-
if (
|
|
1075
|
+
if (Re(g)) {
|
|
1055
1076
|
if (g.preventDefault(), t === a.currentPath && n !== "") {
|
|
1056
1077
|
a.scrollWithin(n);
|
|
1057
1078
|
return;
|
|
@@ -1059,10 +1080,10 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
1059
1080
|
s(t, n);
|
|
1060
1081
|
}
|
|
1061
1082
|
}, children: f });
|
|
1062
|
-
},
|
|
1063
|
-
const { config: s } = D(), a =
|
|
1064
|
-
return m.kind === "page" ? /* @__PURE__ */ d(
|
|
1065
|
-
},
|
|
1083
|
+
}, Rr = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: l }) => {
|
|
1084
|
+
const { config: s } = D(), a = xe(), f = G(ye), h = Wn(e), { navigation: m } = a, g = `${ke(s, m, f, t)}${h}`, b = n === !1 ? "false" : void 0;
|
|
1085
|
+
return m.kind === "page" ? /* @__PURE__ */ d(Mn, { ...o, to: g, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": b, children: l }) : /* @__PURE__ */ d(kr, { to: g, docPath: t, fragment: h, exists: b, className: r, attributes: o, onDocumentLink: m.onDocumentLink, scope: a, children: l });
|
|
1086
|
+
}, Tr = ({ className: e, attributes: t, children: n }) => {
|
|
1066
1087
|
const { labels: r } = D();
|
|
1067
1088
|
return (
|
|
1068
1089
|
/* @__PURE__ */ U("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: [
|
|
@@ -1074,34 +1095,34 @@ const er = /* @__PURE__ */ x.forwardRef(Qn), Le = "data-aqmx-key-repeat", Me = O
|
|
|
1074
1095
|
] })
|
|
1075
1096
|
] })
|
|
1076
1097
|
);
|
|
1077
|
-
},
|
|
1078
|
-
const { config: l } = D(), s =
|
|
1098
|
+
}, Ar = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
|
|
1099
|
+
const { config: l } = D(), s = G(ye), a = we(`${ke(l, r.navigation, s, r.currentPath)}${e}`);
|
|
1079
1100
|
return /* @__PURE__ */ d("a", { ...n, href: a, className: t, onClick: (h) => {
|
|
1080
|
-
|
|
1101
|
+
Re(h) && (h.preventDefault(), r.scrollWithin(e));
|
|
1081
1102
|
}, children: o });
|
|
1082
|
-
},
|
|
1083
|
-
const o =
|
|
1103
|
+
}, Or = ({ href: e, className: t, attributes: n, children: r }) => {
|
|
1104
|
+
const o = xe();
|
|
1084
1105
|
return o.navigation.kind === "page" ? /* @__PURE__ */ d("a", { ...n, href: e, className: t, onClick: (s) => {
|
|
1085
|
-
if (!
|
|
1106
|
+
if (!Re(s)) return;
|
|
1086
1107
|
const a = s.currentTarget;
|
|
1087
1108
|
e === "#" ? o.followEmptyFragment(s.nativeEvent) : a.href === a.ownerDocument.URL && o.followSameUrlJump(e, s.nativeEvent);
|
|
1088
|
-
}, children: r }) : /* @__PURE__ */ d(
|
|
1089
|
-
},
|
|
1090
|
-
const { config: e } = D(), t =
|
|
1091
|
-
return
|
|
1109
|
+
}, children: r }) : /* @__PURE__ */ d(Ar, { href: e, className: t, attributes: n, scope: o, children: r });
|
|
1110
|
+
}, Lr = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: l, children: s }) => t === "doc" ? n === void 0 || !rn(n) ? /* @__PURE__ */ d(Tr, { className: o, attributes: l, children: s }) : /* @__PURE__ */ d(Rr, { href: e, docPath: n, docExists: r, className: o, attributes: l, children: s }) : e.startsWith("#") ? /* @__PURE__ */ d(Or, { href: e, className: o, attributes: l, children: s }) : /* @__PURE__ */ d("a", { ...l, href: e, className: o, children: s }), Cr = () => {
|
|
1111
|
+
const { config: e } = D(), t = xe(), n = G(ye), r = _e();
|
|
1112
|
+
return P(
|
|
1092
1113
|
(o, l) => {
|
|
1093
|
-
if (!
|
|
1114
|
+
if (!Re(l)) return !0;
|
|
1094
1115
|
l.preventDefault();
|
|
1095
|
-
const s =
|
|
1096
|
-
return a.kind === "panel" ||
|
|
1116
|
+
const s = Lt(o.id), { navigation: a } = t;
|
|
1117
|
+
return a.kind === "panel" || Be(l.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(s), !0) : (r(`${ke(e, a, n, t.currentPath)}${s}`, "follow-link"), !0);
|
|
1097
1118
|
},
|
|
1098
1119
|
[e, t, n, r]
|
|
1099
1120
|
);
|
|
1100
|
-
},
|
|
1101
|
-
const e =
|
|
1102
|
-
return
|
|
1121
|
+
}, Mr = () => {
|
|
1122
|
+
const e = Er();
|
|
1123
|
+
return P((t) => `${e}${Lt(t.id)}`, [e]);
|
|
1103
1124
|
};
|
|
1104
|
-
function
|
|
1125
|
+
function Nr({
|
|
1105
1126
|
title: e,
|
|
1106
1127
|
titleId: t,
|
|
1107
1128
|
...n
|
|
@@ -1120,8 +1141,8 @@ function Er({
|
|
|
1120
1141
|
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"
|
|
1121
1142
|
}));
|
|
1122
1143
|
}
|
|
1123
|
-
const
|
|
1124
|
-
function
|
|
1144
|
+
const Pr = /* @__PURE__ */ x.forwardRef(Nr);
|
|
1145
|
+
function $r({
|
|
1125
1146
|
title: e,
|
|
1126
1147
|
titleId: t,
|
|
1127
1148
|
...n
|
|
@@ -1142,8 +1163,8 @@ function yr({
|
|
|
1142
1163
|
clipRule: "evenodd"
|
|
1143
1164
|
}));
|
|
1144
1165
|
}
|
|
1145
|
-
const
|
|
1146
|
-
function
|
|
1166
|
+
const Dr = /* @__PURE__ */ x.forwardRef($r);
|
|
1167
|
+
function Fr({
|
|
1147
1168
|
title: e,
|
|
1148
1169
|
titleId: t,
|
|
1149
1170
|
...n
|
|
@@ -1164,20 +1185,20 @@ function kr({
|
|
|
1164
1185
|
clipRule: "evenodd"
|
|
1165
1186
|
}));
|
|
1166
1187
|
}
|
|
1167
|
-
const
|
|
1188
|
+
const _r = /* @__PURE__ */ x.forwardRef(Fr), qr = Object.freeze({ className: "aqmx-document-stage" }), Br = (e) => {
|
|
1168
1189
|
switch (e) {
|
|
1169
1190
|
case "video":
|
|
1170
|
-
return /* @__PURE__ */ d(
|
|
1191
|
+
return /* @__PURE__ */ d(Dr, {});
|
|
1171
1192
|
case "audio":
|
|
1172
|
-
return /* @__PURE__ */ d(
|
|
1193
|
+
return /* @__PURE__ */ d(_r, {});
|
|
1173
1194
|
case "pdf":
|
|
1174
|
-
return /* @__PURE__ */ d(
|
|
1195
|
+
return /* @__PURE__ */ d(Pr, {});
|
|
1175
1196
|
default: {
|
|
1176
1197
|
const t = e;
|
|
1177
1198
|
throw new RangeError(`[markdown-explorer] unknown media type ${String(t)}`);
|
|
1178
1199
|
}
|
|
1179
1200
|
}
|
|
1180
|
-
},
|
|
1201
|
+
}, zr = ({ document: e }) => {
|
|
1181
1202
|
const { labels: t } = D();
|
|
1182
1203
|
switch (e.mediaType) {
|
|
1183
1204
|
case "video":
|
|
@@ -1195,10 +1216,10 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1195
1216
|
throw new RangeError(`[markdown-explorer] unknown media type ${String(n)}`);
|
|
1196
1217
|
}
|
|
1197
1218
|
}
|
|
1198
|
-
},
|
|
1199
|
-
/* @__PURE__ */ d(
|
|
1200
|
-
/* @__PURE__ */ d(
|
|
1201
|
-
] }),
|
|
1219
|
+
}, jr = ({ document: e }) => /* @__PURE__ */ U("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
|
|
1220
|
+
/* @__PURE__ */ d(Se, { name: e.name, url: e.url, icon: Br(e.mediaType) }),
|
|
1221
|
+
/* @__PURE__ */ d(Ee, { scrollerProps: qr, children: /* @__PURE__ */ d(zr, { document: e }) })
|
|
1222
|
+
] }), Hr = (e) => ({
|
|
1202
1223
|
loading: e.viewerLoading,
|
|
1203
1224
|
errorPrefix: e.viewerErrorPrefix,
|
|
1204
1225
|
styleTitle: e.viewerStyleTitle,
|
|
@@ -1232,72 +1253,72 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1232
1253
|
embeddedVideo: e.viewerEmbeddedVideo,
|
|
1233
1254
|
embeddedPost: e.viewerEmbeddedPost,
|
|
1234
1255
|
embeddedFrame: e.viewerEmbeddedFrame
|
|
1235
|
-
}),
|
|
1256
|
+
}), $t = (e, t, n) => {
|
|
1236
1257
|
if (t !== void 0) return t;
|
|
1237
1258
|
if (n !== void 0) return n;
|
|
1238
1259
|
const [r] = e.documentStyles;
|
|
1239
1260
|
if (r === void 0) throw new Error("[markdown-explorer] the configuration has no document style");
|
|
1240
1261
|
return r.name;
|
|
1241
|
-
},
|
|
1262
|
+
}, Dt = (e, t) => e !== void 0 ? e : t !== void 0 ? t : gn, Ir = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), Zr = (e, t, n) => {
|
|
1242
1263
|
if (t.view === "multi" || t.overrides[n] === void 0) return null;
|
|
1243
1264
|
const r = n === "style" ? { align: t.overrides.align } : { style: t.overrides.style };
|
|
1244
1265
|
return t.view === "single" ? le(e, { view: "single", source: t.source, doc: t.doc, overrides: r, embed: t.embed }) : le(e, { view: "tree", source: t.source, doc: t.doc, overrides: r });
|
|
1245
|
-
},
|
|
1246
|
-
const a =
|
|
1266
|
+
}, ze = ({ kind: e, label: t, stale: n, busy: r, frameRef: o, intent: l, children: s }) => {
|
|
1267
|
+
const a = G(pe);
|
|
1247
1268
|
return (
|
|
1248
1269
|
/* @__PURE__ */ U("section", { ref: o, role: "region", "aria-label": t, "aria-busy": r, "data-testid": "markdown-explorer-document", "data-aqmx-document-kind": e, "data-aqmx-document-flow": a, className: "aqmx-document", ...l, children: [
|
|
1249
1270
|
n ? /* @__PURE__ */ d("div", { className: "aqmx-progress", "aria-hidden": "true", "data-testid": "markdown-explorer-document-progress" }) : null,
|
|
1250
1271
|
s
|
|
1251
1272
|
] })
|
|
1252
1273
|
);
|
|
1253
|
-
},
|
|
1274
|
+
}, Ur = () => {
|
|
1254
1275
|
const { labels: e } = D();
|
|
1255
|
-
return /* @__PURE__ */ d(
|
|
1256
|
-
},
|
|
1276
|
+
return /* @__PURE__ */ d(ze, { kind: "empty", label: e.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ d("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-document-empty", children: /* @__PURE__ */ d("p", { className: "aqmx-empty-title", children: e.documentEmpty }) }) });
|
|
1277
|
+
}, Ft = ({ label: e }) => {
|
|
1257
1278
|
const { labels: t } = D();
|
|
1258
|
-
return /* @__PURE__ */ U(
|
|
1259
|
-
/* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": "markdown-explorer-document-skeleton", children:
|
|
1279
|
+
return /* @__PURE__ */ U(ze, { kind: "loading", label: e, stale: !1, busy: !0, children: [
|
|
1280
|
+
/* @__PURE__ */ d("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": "markdown-explorer-document-skeleton", children: Ir.map((n) => /* @__PURE__ */ d("span", {}, n)) }),
|
|
1260
1281
|
/* @__PURE__ */ d("p", { className: "aqmx-sr-only", children: t.documentLoading })
|
|
1261
1282
|
] });
|
|
1262
|
-
},
|
|
1263
|
-
const { reportMathDiagnostics: r } = D(), o =
|
|
1264
|
-
return /* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(
|
|
1265
|
-
},
|
|
1283
|
+
}, Vr = ({ path: e, document: t, viewer: n }) => {
|
|
1284
|
+
const { reportMathDiagnostics: r } = D(), o = H(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), l = Cr(), s = Mr(), a = H(() => r === void 0 ? void 0 : (f) => r(e, f), [r, e]);
|
|
1285
|
+
return /* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(wt, { ...n, onHeadingSelect: l, headingHref: s, onMathDiagnostics: a, parseResult: o, content: null }) });
|
|
1286
|
+
}, Gr = ({ document: e, viewer: t }) => {
|
|
1266
1287
|
const { labels: n } = D();
|
|
1267
|
-
return /* @__PURE__ */ U(
|
|
1268
|
-
/* @__PURE__ */ d(
|
|
1288
|
+
return /* @__PURE__ */ U(Bt, { children: [
|
|
1289
|
+
/* @__PURE__ */ d(Se, { name: e.name, url: e.url, icon: /* @__PURE__ */ d(Cn, {}) }),
|
|
1269
1290
|
e.truncated ? /* @__PURE__ */ d("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
|
|
1270
|
-
/* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(
|
|
1291
|
+
/* @__PURE__ */ d("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ d(wt, { ...t, parseResult: null, content: e.text }) })
|
|
1271
1292
|
] });
|
|
1272
|
-
},
|
|
1293
|
+
}, Wr = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Kr = ({ path: e, document: t, viewer: n, onRetry: r }) => {
|
|
1273
1294
|
switch (t.kind) {
|
|
1274
1295
|
case "markdown":
|
|
1275
|
-
return /* @__PURE__ */ d(
|
|
1296
|
+
return /* @__PURE__ */ d(Vr, { path: e, document: t, viewer: n });
|
|
1276
1297
|
case "text":
|
|
1277
|
-
return /* @__PURE__ */ d(
|
|
1298
|
+
return /* @__PURE__ */ d(Gr, { document: t, viewer: n });
|
|
1278
1299
|
case "image":
|
|
1279
|
-
return /* @__PURE__ */ d(
|
|
1300
|
+
return /* @__PURE__ */ d(br, { document: t });
|
|
1280
1301
|
case "media":
|
|
1281
|
-
return /* @__PURE__ */ d(
|
|
1302
|
+
return /* @__PURE__ */ d(jr, { document: t });
|
|
1282
1303
|
case "file":
|
|
1283
|
-
return /* @__PURE__ */ d(
|
|
1304
|
+
return /* @__PURE__ */ d(Gn, { document: t });
|
|
1284
1305
|
case "failure":
|
|
1285
|
-
return /* @__PURE__ */ d(
|
|
1306
|
+
return /* @__PURE__ */ d(Ee, { scrollerProps: Wr, children: /* @__PURE__ */ d(Nn, { failure: t.failure, alert: !1, onRetry: r, testId: "markdown-explorer-document-failure" }) });
|
|
1286
1307
|
default: {
|
|
1287
1308
|
const o = t;
|
|
1288
1309
|
throw new RangeError(`[markdown-explorer] unknown document kind in ${JSON.stringify(o)}`);
|
|
1289
1310
|
}
|
|
1290
1311
|
}
|
|
1291
|
-
},
|
|
1292
|
-
const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null :
|
|
1312
|
+
}, Yr = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', Xr = (e, t, n) => {
|
|
1313
|
+
const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Mt(e, n), r === void 0 ? null : Ct(e, r.id), e.querySelector(qe), e.querySelector(Yr)];
|
|
1293
1314
|
for (const l of o)
|
|
1294
|
-
if (l instanceof HTMLElement &&
|
|
1315
|
+
if (l instanceof HTMLElement && kt(l)) return l;
|
|
1295
1316
|
return null;
|
|
1296
|
-
},
|
|
1317
|
+
}, it = (e, t, n) => {
|
|
1297
1318
|
const { activeElement: r, body: o } = e.ownerDocument, l = r === null || r === o;
|
|
1298
|
-
t instanceof HTMLElement && n && (l || e.contains(r)) &&
|
|
1299
|
-
},
|
|
1300
|
-
const t =
|
|
1319
|
+
t instanceof HTMLElement && n && (l || e.contains(r)) && kt(t);
|
|
1320
|
+
}, Jr = (e) => {
|
|
1321
|
+
const t = j(!1);
|
|
1301
1322
|
return V(() => {
|
|
1302
1323
|
const n = e.current;
|
|
1303
1324
|
if (n === null) throw new Error("[markdown-explorer] the document region is not mounted");
|
|
@@ -1322,14 +1343,14 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1322
1343
|
clearTimeout(s), o.removeEventListener("pointerdown", a, !0), o.removeEventListener("mousedown", a, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", m), o.removeEventListener("focus", g), n.removeEventListener("focusout", h);
|
|
1323
1344
|
};
|
|
1324
1345
|
}, [e]), t;
|
|
1325
|
-
},
|
|
1326
|
-
const { labels: g, announcer: b, documents: R } = D(), { document: k } = t, A =
|
|
1346
|
+
}, Qr = ({ path: e, snapshot: t, stale: n, viewer: r, regionLabel: o, navigation: l, fragment: s, paneScroll: a, announces: f, announceFailure: h, onDocumentShown: m }) => {
|
|
1347
|
+
const { labels: g, announcer: b, documents: R } = D(), { document: k } = t, A = j(null), T = j(null), F = j(null), O = j(0), u = Jr(A), p = j({ path: e, document: k }), S = j(null), E = P(
|
|
1327
1348
|
(i) => {
|
|
1328
|
-
const c = A.current, w =
|
|
1329
|
-
c !== null && w !== null &&
|
|
1349
|
+
const c = A.current, w = tt(c, i, a);
|
|
1350
|
+
c !== null && w !== null && it(c, w, u.current);
|
|
1330
1351
|
},
|
|
1331
1352
|
[a, u]
|
|
1332
|
-
), y =
|
|
1353
|
+
), y = P(
|
|
1333
1354
|
(i, c) => {
|
|
1334
1355
|
const w = O.current;
|
|
1335
1356
|
setTimeout(() => {
|
|
@@ -1337,77 +1358,77 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1337
1358
|
}, 0);
|
|
1338
1359
|
},
|
|
1339
1360
|
[E]
|
|
1340
|
-
),
|
|
1361
|
+
), $ = P(
|
|
1341
1362
|
(i) => {
|
|
1342
1363
|
setTimeout(() => {
|
|
1343
1364
|
i.defaultPrevented || E("#");
|
|
1344
1365
|
}, 0);
|
|
1345
1366
|
},
|
|
1346
1367
|
[E]
|
|
1347
|
-
),
|
|
1368
|
+
), I = H(() => ({ navigation: l, currentPath: e, scrollWithin: E, followSameUrlJump: y, followEmptyFragment: $ }), [l, e, E, y, $]), C = P(() => R.retry(e), [R, e]), B = Pn(R, xr), M = ee((i, c) => {
|
|
1348
1369
|
const w = T.current;
|
|
1349
1370
|
if (w !== null && w.path === i && w.snapshot === c) return;
|
|
1350
1371
|
T.current = { path: i, snapshot: c };
|
|
1351
1372
|
const v = c.document;
|
|
1352
1373
|
if (v.kind === "failure") {
|
|
1353
|
-
R.noteFailureShown(c) && h(g.documentFailed(
|
|
1374
|
+
R.noteFailureShown(c) && h(g.documentFailed(vt(i), ve(g, v.failure.reason)));
|
|
1354
1375
|
return;
|
|
1355
1376
|
}
|
|
1356
1377
|
m?.(i, v), f && (w === null || w.path !== i || w.snapshot.document.kind === "failure") && b.announce(g.documentShown(v.name));
|
|
1357
1378
|
});
|
|
1358
|
-
|
|
1359
|
-
|
|
1379
|
+
J(() => {
|
|
1380
|
+
M(e, t);
|
|
1360
1381
|
}, [e, t]);
|
|
1361
|
-
const
|
|
1382
|
+
const _ = ee(() => {
|
|
1362
1383
|
s.kind === "panel" && s.consume();
|
|
1363
|
-
}),
|
|
1384
|
+
}), Q = ee((i) => {
|
|
1364
1385
|
const c = A.current;
|
|
1365
1386
|
if (c === null || !u.current) return null;
|
|
1366
1387
|
const { activeElement: w, body: v } = c.ownerDocument;
|
|
1367
|
-
return w !== null && w !== v ? null :
|
|
1368
|
-
}),
|
|
1388
|
+
return w !== null && w !== v ? null : Xr(c, k, i);
|
|
1389
|
+
}), oe = ee((i) => {
|
|
1369
1390
|
const c = A.current;
|
|
1370
|
-
c !== null &&
|
|
1371
|
-
}),
|
|
1372
|
-
return
|
|
1391
|
+
c !== null && it(c, i, u.current);
|
|
1392
|
+
}), W = ee((i) => a.reveal(i)), Te = ee((i) => tt(A.current, i, a));
|
|
1393
|
+
return J(() => {
|
|
1373
1394
|
if (n) return;
|
|
1374
1395
|
const i = p.current.path !== e, c = i || p.current.document !== k;
|
|
1375
1396
|
p.current = { path: e, document: k };
|
|
1376
1397
|
const w = S.current !== e;
|
|
1377
1398
|
S.current = e;
|
|
1378
1399
|
let v = null;
|
|
1379
|
-
s.kind === "page" ? F.current !== s.navigation && (F.current = s.navigation, O.current += 1, v = s.fragment) : s.fragment !== null && (v = s.fragment,
|
|
1400
|
+
s.kind === "page" ? F.current !== s.navigation && (F.current = s.navigation, O.current += 1, v = s.fragment) : s.fragment !== null && (v = s.fragment, _());
|
|
1380
1401
|
const L = () => {
|
|
1381
|
-
const N = v === null ? null :
|
|
1402
|
+
const N = v === null ? null : Te(v);
|
|
1382
1403
|
if (!c) {
|
|
1383
|
-
N !== null &&
|
|
1404
|
+
N !== null && oe(N);
|
|
1384
1405
|
return;
|
|
1385
1406
|
}
|
|
1386
|
-
const
|
|
1387
|
-
i && N === null &&
|
|
1407
|
+
const q = Q(s.fragment);
|
|
1408
|
+
i && N === null && q !== null && W(q);
|
|
1388
1409
|
};
|
|
1389
1410
|
w ? queueMicrotask(L) : L();
|
|
1390
|
-
}, [s, e, k, n]), /* @__PURE__ */ d(
|
|
1391
|
-
}, je = Object.freeze({ kind: "skeleton" }),
|
|
1411
|
+
}, [s, e, k, n]), /* @__PURE__ */ d(ze, { kind: k.kind, label: o(e, k), stale: n, busy: n, frameRef: A, intent: B, children: /* @__PURE__ */ d(Nt, { value: I, children: /* @__PURE__ */ d(Sr, { children: /* @__PURE__ */ d(Kr, { path: e, document: k, viewer: r, onRetry: C }, e) }) }) });
|
|
1412
|
+
}, je = Object.freeze({ kind: "skeleton" }), eo = (e, t, n, r, o) => {
|
|
1392
1413
|
if (t?.status === "loaded") return { kind: "document", path: e, snapshot: t, stale: !1 };
|
|
1393
|
-
const l =
|
|
1414
|
+
const l = he(t);
|
|
1394
1415
|
if (l !== null) return { kind: "document", path: e, snapshot: l, stale: !0 };
|
|
1395
1416
|
if (o && t?.status === "pending") return { kind: "streaming", path: e, promise: t.promise };
|
|
1396
|
-
const s = n === null || n === e ? null :
|
|
1417
|
+
const s = n === null || n === e ? null : he(r);
|
|
1397
1418
|
return n === null || s === null ? je : { kind: "document", path: n, snapshot: s, stale: !0 };
|
|
1398
|
-
},
|
|
1399
|
-
const r = t.kind === "streaming" ?
|
|
1400
|
-
return r.kind !== "document" ? /* @__PURE__ */ d(
|
|
1401
|
-
},
|
|
1402
|
-
const { config: f, labels: h, theme: m, documents: g } = D(), b =
|
|
1419
|
+
}, to = (e, t) => t.status === "deferred" ? je : { kind: "document", path: e, snapshot: t, stale: !1 }, no = ({ requestedPath: e, content: t, ...n }) => {
|
|
1420
|
+
const r = t.kind === "streaming" ? to(t.path, G(t.promise)) : t;
|
|
1421
|
+
return r.kind !== "document" ? /* @__PURE__ */ d(Ft, { label: n.regionLabel(e, null) }) : /* @__PURE__ */ d(Qr, { path: r.path, snapshot: r.snapshot, stale: r.stale, ...n });
|
|
1422
|
+
}, _t = ({ path: e, display: t, navigation: n, fragment: r, paneScroll: o, announces: l, announceFailure: s, onDocumentShown: a }) => {
|
|
1423
|
+
const { config: f, labels: h, theme: m, documents: g } = D(), b = nn(), R = j(!1);
|
|
1403
1424
|
V(() => {
|
|
1404
1425
|
R.current = !0;
|
|
1405
1426
|
}, []);
|
|
1406
|
-
const [k, A] = Z(null), T =
|
|
1427
|
+
const [k, A] = Z(null), T = P(() => e === null ? void 0 : g.peek(e), [g, e]), F = ne(g.subscribe, T, T), O = P(() => k === null ? void 0 : g.peek(k), [g, k]), u = ne(g.subscribe, O, O);
|
|
1407
1428
|
V(() => e === null ? void 0 : g.open(e), [g, e]), V(() => k === null ? void 0 : g.retain(k), [g, k]);
|
|
1408
|
-
const p = e === null ? je :
|
|
1429
|
+
const p = e === null ? je : eo(e, F, k, u, !R.current), S = e === null ? null : p.kind === "document" && !p.stale ? p.path : k;
|
|
1409
1430
|
S !== k && A(S);
|
|
1410
|
-
const E =
|
|
1431
|
+
const E = H(() => Hr(h), [h]), y = H(() => [...f.iframeHosts], [f]), $ = n.kind === "panel", I = H(
|
|
1411
1432
|
() => ({
|
|
1412
1433
|
labels: E,
|
|
1413
1434
|
emptyMessage: h.documentEmpty,
|
|
@@ -1415,7 +1436,7 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1415
1436
|
availableStyles: f.documentStyles,
|
|
1416
1437
|
iFrameAllowedDomains: y,
|
|
1417
1438
|
embeds: f.embeds,
|
|
1418
|
-
linkComponent:
|
|
1439
|
+
linkComponent: Lr,
|
|
1419
1440
|
toolbar: b,
|
|
1420
1441
|
style: t.style,
|
|
1421
1442
|
onStyleChange: t.onStyleChange,
|
|
@@ -1426,30 +1447,31 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1426
1447
|
showAlign: t.showAlign,
|
|
1427
1448
|
padding: t.padding,
|
|
1428
1449
|
width: t.width === void 0 ? void 0 : `min(${t.width}, 100%)`,
|
|
1429
|
-
maxWidth: t.maxWidth === void 0 ? void 0 : `min(${t.maxWidth}, 100%)
|
|
1450
|
+
maxWidth: t.maxWidth === void 0 ? void 0 : `min(${t.maxWidth}, 100%)`,
|
|
1451
|
+
renderScrollBar: $ ? void 0 : Rt
|
|
1430
1452
|
}),
|
|
1431
|
-
[E, h.documentEmpty, m, f.documentStyles, y, f.embeds, b, t]
|
|
1432
|
-
),
|
|
1433
|
-
return e === null ? /* @__PURE__ */ d(
|
|
1434
|
-
},
|
|
1435
|
-
const { config: r, viewSettings: o, announcer: l } = D(), s =
|
|
1453
|
+
[E, h.documentEmpty, m, f.documentStyles, y, f.embeds, b, t, $]
|
|
1454
|
+
), C = P((M, _) => $ ? _ === null || _.kind === "failure" ? vt(M) : _.name : h.documentRegion, [$, h.documentRegion]), B = $ ? "content" : "fill";
|
|
1455
|
+
return e === null ? /* @__PURE__ */ d(pe, { value: B, children: /* @__PURE__ */ d(Ur, {}) }) : /* @__PURE__ */ d(pe, { value: B, children: /* @__PURE__ */ d(fe, { fallback: /* @__PURE__ */ d(Ft, { label: C(e, null) }), children: /* @__PURE__ */ d(no, { requestedPath: e, content: p, viewer: I, regionLabel: C, navigation: n, fragment: r, paneScroll: o, announces: l, announceFailure: s, onDocumentShown: a }) }) });
|
|
1456
|
+
}, ro = ({ path: e, variant: t, onDocumentShown: n }) => {
|
|
1457
|
+
const { config: r, viewSettings: o, announcer: l } = D(), s = me((y) => y.style), a = me((y) => y.align), f = _e(), h = pt(), m = De(), { view: g, overrides: b, embed: R } = t, k = P(
|
|
1436
1458
|
(y) => {
|
|
1437
1459
|
if (m.kind !== "location") return;
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1460
|
+
const $ = Zr(r, m.location, y);
|
|
1461
|
+
$ !== null && f($, "browse");
|
|
1440
1462
|
},
|
|
1441
1463
|
[r, f, m]
|
|
1442
|
-
), A =
|
|
1464
|
+
), A = P(
|
|
1443
1465
|
(y) => {
|
|
1444
1466
|
o.update({ style: y }), k("style");
|
|
1445
1467
|
},
|
|
1446
1468
|
[o, k]
|
|
1447
|
-
), T =
|
|
1469
|
+
), T = P(
|
|
1448
1470
|
(y) => {
|
|
1449
1471
|
o.update({ align: y }), k("align");
|
|
1450
1472
|
},
|
|
1451
1473
|
[o, k]
|
|
1452
|
-
), F =
|
|
1474
|
+
), F = $t(r, b.style, s), O = Dt(b.align, a), u = H(
|
|
1453
1475
|
() => ({
|
|
1454
1476
|
style: F,
|
|
1455
1477
|
onStyleChange: A,
|
|
@@ -1463,10 +1485,10 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1463
1485
|
maxWidth: R.maxWidth
|
|
1464
1486
|
}),
|
|
1465
1487
|
[F, A, O, T, R]
|
|
1466
|
-
), p =
|
|
1467
|
-
return /* @__PURE__ */ d(
|
|
1468
|
-
},
|
|
1469
|
-
const { config: r, viewSettings: o } = D(), l =
|
|
1488
|
+
), p = H(() => ({ kind: "page", view: g, overrides: b, embed: R }), [g, b, R]), S = H(() => ({ kind: "page", fragment: h.hash, navigation: h }), [h]), E = P((y) => l.announce(y), [l]);
|
|
1489
|
+
return /* @__PURE__ */ d(_t, { path: e, display: u, navigation: p, fragment: S, paneScroll: er, announces: !0, announceFailure: E, onDocumentShown: n });
|
|
1490
|
+
}, oo = ({ path: e, variant: t, onDocumentShown: n }) => {
|
|
1491
|
+
const { config: r, viewSettings: o } = D(), l = me((p) => p.style), s = me((p) => p.align), [a, f] = Z(() => $t(r, void 0, l)), h = Dt(void 0, s), m = P((p) => o.update({ align: p }), [o]), { maximized: g, onDocumentLink: b, pendingHash: R, onHashConsumed: k, announceFailure: A, paneScroll: T } = t, F = H(
|
|
1470
1492
|
() => ({
|
|
1471
1493
|
style: a,
|
|
1472
1494
|
onStyleChange: f,
|
|
@@ -1480,10 +1502,10 @@ const Rr = /* @__PURE__ */ x.forwardRef(kr), Tr = (e) => {
|
|
|
1480
1502
|
maxWidth: void 0
|
|
1481
1503
|
}),
|
|
1482
1504
|
[a, h, m, g]
|
|
1483
|
-
), O =
|
|
1484
|
-
return /* @__PURE__ */ d(
|
|
1485
|
-
},
|
|
1486
|
-
function
|
|
1505
|
+
), O = H(() => ({ kind: "panel", onDocumentLink: b }), [b]), u = H(() => ({ kind: "panel", fragment: R, consume: k }), [R, k]);
|
|
1506
|
+
return /* @__PURE__ */ d(_t, { path: e, display: F, navigation: O, fragment: u, paneScroll: T, announces: !1, announceFailure: A, onDocumentShown: n });
|
|
1507
|
+
}, lo = ({ path: e, variant: t, onDocumentShown: n }) => t.kind === "page" ? /* @__PURE__ */ d(ro, { path: e, variant: t, onDocumentShown: n }) : /* @__PURE__ */ d(oo, { path: e, variant: t, onDocumentShown: n });
|
|
1508
|
+
function io({
|
|
1487
1509
|
title: e,
|
|
1488
1510
|
titleId: t,
|
|
1489
1511
|
...n
|
|
@@ -1504,26 +1526,26 @@ function Vr({
|
|
|
1504
1526
|
clipRule: "evenodd"
|
|
1505
1527
|
}));
|
|
1506
1528
|
}
|
|
1507
|
-
const
|
|
1508
|
-
const { documents: n, announcer: r, labels: o } = D(), l =
|
|
1529
|
+
const so = /* @__PURE__ */ x.forwardRef(io), ao = /* @__PURE__ */ new Set(), co = (e, t) => {
|
|
1530
|
+
const { documents: n, announcer: r, labels: o } = D(), l = P(() => n.peek(e), [n, e]), s = P(() => n.peekSeeded(e), [n, e]), a = ne(n.subscribe, l, s), f = P(() => n.answerStampOf(e), [n, e]), h = ne(n.subscribe, f, f), [m] = Z(() => /* @__PURE__ */ new Set()), [g, b] = Z(ao), [R, k] = Z(null);
|
|
1509
1531
|
R !== null && R.path !== e && k(null);
|
|
1510
|
-
const A =
|
|
1532
|
+
const A = j(null);
|
|
1511
1533
|
V(() => (A.current = e, () => {
|
|
1512
1534
|
A.current = null;
|
|
1513
1535
|
}), [e]);
|
|
1514
|
-
const T =
|
|
1536
|
+
const T = P(() => {
|
|
1515
1537
|
const u = e, p = n.peek(u);
|
|
1516
1538
|
if (m.has(u) || p?.status === "pending") return;
|
|
1517
|
-
const S = t && !
|
|
1539
|
+
const S = t && !Ot(p);
|
|
1518
1540
|
m.add(u), b(new Set(m)), k(null), (async () => {
|
|
1519
1541
|
try {
|
|
1520
1542
|
const E = await n.refresh(u);
|
|
1521
1543
|
if (A.current !== u || E.status === "superseded") return;
|
|
1522
1544
|
if (E.status === "failed") {
|
|
1523
|
-
k({ path: u, failure: E.failure, stamp: n.answerStampOf(u) }), r.announce(o.documentRefreshFailed(
|
|
1545
|
+
k({ path: u, failure: E.failure, stamp: n.answerStampOf(u) }), r.announce(o.documentRefreshFailed(ve(o, E.failure.reason)));
|
|
1524
1546
|
return;
|
|
1525
1547
|
}
|
|
1526
|
-
const y =
|
|
1548
|
+
const y = he(n.peek(u));
|
|
1527
1549
|
if (S || y === null || y.document.kind === "failure") return;
|
|
1528
1550
|
r.announce(o.documentRefreshed(y.document.name));
|
|
1529
1551
|
} finally {
|
|
@@ -1532,10 +1554,10 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1532
1554
|
})();
|
|
1533
1555
|
}, [e, t, m, n, r, o]), F = g.has(e), O = R !== null && R.path === e && R.stamp === h ? R.failure : null;
|
|
1534
1556
|
return { refreshing: F, unavailable: F || a?.status === "pending", failure: O, refresh: T };
|
|
1535
|
-
},
|
|
1557
|
+
}, uo = Object.freeze({ kind: "page" }), fo = (e) => {
|
|
1536
1558
|
e.stopPropagation();
|
|
1537
|
-
},
|
|
1538
|
-
const { labels: n } = D(), { refreshing: r, unavailable: o, failure: l, refresh: s } =
|
|
1559
|
+
}, mo = ({ path: e, placement: t }) => {
|
|
1560
|
+
const { labels: n } = D(), { refreshing: r, unavailable: o, failure: l, refresh: s } = co(e, t.kind === "page"), a = t.kind === "panel" ? n.refreshDocumentNamed(t.documentName) : null;
|
|
1539
1561
|
return /* @__PURE__ */ U("div", { className: "aqmx-document-refresh-bar", "data-testid": "markdown-explorer-document-refresh-bar", children: [
|
|
1540
1562
|
/* @__PURE__ */ d("div", { className: "aqmx-document-refresh-row", children: /* @__PURE__ */ U(
|
|
1541
1563
|
"button",
|
|
@@ -1549,35 +1571,35 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1549
1571
|
"data-aqmx-busy": r ? "true" : void 0,
|
|
1550
1572
|
"data-testid": "markdown-explorer-document-refresh",
|
|
1551
1573
|
onClick: s,
|
|
1552
|
-
onDoubleClick:
|
|
1574
|
+
onDoubleClick: fo,
|
|
1553
1575
|
children: [
|
|
1554
|
-
/* @__PURE__ */ d(
|
|
1576
|
+
/* @__PURE__ */ d(so, { "aria-hidden": "true" }),
|
|
1555
1577
|
a === null ? /* @__PURE__ */ d("span", { children: n.refreshDocumentLabel }) : null
|
|
1556
1578
|
]
|
|
1557
1579
|
}
|
|
1558
1580
|
) }),
|
|
1559
|
-
l === null ? null : /* @__PURE__ */ d("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": l.reason, children: n.documentRefreshFailed(
|
|
1581
|
+
l === null ? null : /* @__PURE__ */ d("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": l.reason, children: n.documentRefreshFailed(ve(n, l.reason)) })
|
|
1560
1582
|
] });
|
|
1561
|
-
},
|
|
1562
|
-
const t = e.doc, n =
|
|
1583
|
+
}, go = ({ location: e }) => {
|
|
1584
|
+
const t = e.doc, n = H(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]);
|
|
1563
1585
|
return /* @__PURE__ */ U("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", children: [
|
|
1564
|
-
/* @__PURE__ */ d(
|
|
1565
|
-
/* @__PURE__ */ d(
|
|
1586
|
+
/* @__PURE__ */ d(mo, { path: t, placement: uo }),
|
|
1587
|
+
/* @__PURE__ */ d(lo, { path: t, variant: n })
|
|
1566
1588
|
] });
|
|
1567
|
-
},
|
|
1568
|
-
const { labels: n, announcer: r } = D(), o =
|
|
1589
|
+
}, ho = ({ holds: e, testId: t }) => {
|
|
1590
|
+
const { labels: n, announcer: r } = D(), o = jt();
|
|
1569
1591
|
V(() => e ? r.claim(o) : void 0, [e, r, o]);
|
|
1570
|
-
const l =
|
|
1592
|
+
const l = P(() => r.shownIn(o), [r, o]), s = ne(r.subscribe, l, l);
|
|
1571
1593
|
return /* @__PURE__ */ d("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": t, children: s.length > 1 ? n.announcementSequence(s) : s[0] });
|
|
1572
|
-
},
|
|
1594
|
+
}, te = Object.freeze([]), st = (e) => {
|
|
1573
1595
|
const t = /* @__PURE__ */ new Set();
|
|
1574
|
-
let n =
|
|
1596
|
+
let n = te, r = [], o = !1;
|
|
1575
1597
|
const l = [], s = (m) => {
|
|
1576
1598
|
n = m;
|
|
1577
1599
|
for (const g of [...t]) g();
|
|
1578
1600
|
}, a = () => l.at(-1)?.region, f = (m) => {
|
|
1579
1601
|
const g = a();
|
|
1580
|
-
m(), a() !== g && n !==
|
|
1602
|
+
m(), a() !== g && n !== te && s(te);
|
|
1581
1603
|
}, h = () => {
|
|
1582
1604
|
o = !1;
|
|
1583
1605
|
const m = r.map((g) => "sentence" in g ? g.sentence : g.list(g.items));
|
|
@@ -1590,7 +1612,7 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1590
1612
|
const g = r.find((b) => "list" in b && b.list === m.list);
|
|
1591
1613
|
g !== void 0 && "items" in g ? g.items.push(m.item) : r.push({ list: m.list, items: [m.item] });
|
|
1592
1614
|
}
|
|
1593
|
-
o || (o = !0, n !==
|
|
1615
|
+
o || (o = !0, n !== te && s(te), e.request(h));
|
|
1594
1616
|
},
|
|
1595
1617
|
subscribe: (m) => (t.add(m), () => {
|
|
1596
1618
|
t.delete(m);
|
|
@@ -1602,15 +1624,15 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1602
1624
|
b !== -1 && l.splice(b, 1);
|
|
1603
1625
|
});
|
|
1604
1626
|
},
|
|
1605
|
-
shownIn: (m) => a() === m ? n :
|
|
1627
|
+
shownIn: (m) => a() === m ? n : te
|
|
1606
1628
|
};
|
|
1607
|
-
},
|
|
1629
|
+
}, at = Object.freeze({ status: "cancelled" }), po = (e) => {
|
|
1608
1630
|
if (e === null || typeof e != "object") return null;
|
|
1609
1631
|
const { failure: t } = e;
|
|
1610
|
-
if (
|
|
1632
|
+
if (an(t) !== null) return null;
|
|
1611
1633
|
const { reason: n, code: r } = t;
|
|
1612
|
-
return
|
|
1613
|
-
},
|
|
1634
|
+
return cn(n, r);
|
|
1635
|
+
}, wo = ({ dataPath: e, onScope: t, fetch: n }) => {
|
|
1614
1636
|
const r = n ?? ((a, f) => globalThis.fetch(a, f)), o = (a, f) => `${e}/${a}?${new URLSearchParams(f).toString()}`, l = async (a, f, h, m) => {
|
|
1615
1637
|
let g;
|
|
1616
1638
|
try {
|
|
@@ -1619,13 +1641,13 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1619
1641
|
return m({ reason: "failed" });
|
|
1620
1642
|
}
|
|
1621
1643
|
g.status === 401 && t(null);
|
|
1622
|
-
const b = g.headers.get(
|
|
1644
|
+
const b = g.headers.get(on);
|
|
1623
1645
|
b !== null && t(b);
|
|
1624
1646
|
let R;
|
|
1625
1647
|
try {
|
|
1626
1648
|
R = await g.json();
|
|
1627
1649
|
} catch {
|
|
1628
|
-
return m({ reason:
|
|
1650
|
+
return m({ reason: Ue(g.status) });
|
|
1629
1651
|
}
|
|
1630
1652
|
let k;
|
|
1631
1653
|
try {
|
|
@@ -1634,35 +1656,39 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1634
1656
|
k = !1;
|
|
1635
1657
|
}
|
|
1636
1658
|
if (k) return R;
|
|
1637
|
-
const A =
|
|
1638
|
-
return m(A !== null ? A : { reason: g.status === 200 ? "failed" :
|
|
1639
|
-
}, s = { [
|
|
1659
|
+
const A = po(R);
|
|
1660
|
+
return m(A !== null ? A : { reason: g.status === 200 ? "failed" : Ue(g.status) });
|
|
1661
|
+
}, s = { [mn]: dn };
|
|
1640
1662
|
return {
|
|
1641
|
-
tree: (a) => l(o("tree", { [
|
|
1663
|
+
tree: (a) => l(o("tree", { [Y.source]: a }), { method: "GET" }, Ve, (f) => ({ status: "error", failure: f })),
|
|
1642
1664
|
children: async (a, f, h) => {
|
|
1643
|
-
const m = await l(o("children", { [
|
|
1644
|
-
return h.aborted ?
|
|
1665
|
+
const m = await l(o("children", { [Y.source]: a, [Y.path]: f }), { method: "GET", signal: h }, sn, (g) => ({ status: "error", failure: g }));
|
|
1666
|
+
return h.aborted ? at : m;
|
|
1667
|
+
},
|
|
1668
|
+
ancestors: async (a, f, h) => {
|
|
1669
|
+
const m = await l(o("ancestors", { [Y.source]: a, [Y.path]: f }), { method: "GET", signal: h }, ln, (g) => ({ status: "error", failure: g }));
|
|
1670
|
+
return h.aborted ? at : m;
|
|
1645
1671
|
},
|
|
1646
|
-
document: (a, { refresh: f }) => l(o("document", { [
|
|
1647
|
-
refresh: (a) => l(o("refresh", { [
|
|
1672
|
+
document: (a, { refresh: f }) => l(o("document", { [Y.path]: a }), f ? { method: "GET", headers: s } : { method: "GET" }, fn, (h) => un(h.reason, h.code)),
|
|
1673
|
+
refresh: (a) => l(o("refresh", { [Y.source]: a }), { method: "POST", headers: s }, Ve, (f) => ({ status: "error", failure: f }))
|
|
1648
1674
|
};
|
|
1649
|
-
},
|
|
1650
|
-
const t =
|
|
1651
|
-
if (t === null) return
|
|
1675
|
+
}, vo = (e) => {
|
|
1676
|
+
const t = pn(e);
|
|
1677
|
+
if (t === null) return Ie;
|
|
1652
1678
|
try {
|
|
1653
|
-
return
|
|
1679
|
+
return Qt(JSON.parse(t));
|
|
1654
1680
|
} catch (n) {
|
|
1655
|
-
return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n),
|
|
1681
|
+
return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n), Ie;
|
|
1656
1682
|
}
|
|
1657
|
-
},
|
|
1683
|
+
}, ct = (e, t) => {
|
|
1658
1684
|
let n = null;
|
|
1659
1685
|
const r = () => {
|
|
1660
1686
|
if (n === null) {
|
|
1661
|
-
const l =
|
|
1662
|
-
n = { changes: l, settings:
|
|
1687
|
+
const l = vo(e);
|
|
1688
|
+
n = { changes: l, settings: He(t, l) };
|
|
1663
1689
|
}
|
|
1664
1690
|
return n;
|
|
1665
|
-
}, o =
|
|
1691
|
+
}, o = be();
|
|
1666
1692
|
return {
|
|
1667
1693
|
storageKey: e,
|
|
1668
1694
|
defaults: t,
|
|
@@ -1670,12 +1696,12 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1670
1696
|
getServerSnapshot: () => t,
|
|
1671
1697
|
subscribe: o.subscribe,
|
|
1672
1698
|
advance: (l) => {
|
|
1673
|
-
const { changes: s, settings: a } = r(), f =
|
|
1674
|
-
return n = { changes: f, settings:
|
|
1699
|
+
const { changes: s, settings: a } = r(), f = Yt(s, l, Xt(a, l)[l], t);
|
|
1700
|
+
return n = { changes: f, settings: He(t, f) }, o.emit(), hn(e, Jt(f)), n.settings;
|
|
1675
1701
|
}
|
|
1676
1702
|
};
|
|
1677
|
-
},
|
|
1678
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
1703
|
+
}, bo = Object.freeze({ status: "refreshed" }), Eo = Object.freeze({ status: "superseded" }), Pe = Object.freeze({ status: "deferred" }), So = At(Pe), qt = 4, yo = qt - 1, dt = Object.freeze({ status: "loading" }), xo = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), ko = (e) => {
|
|
1704
|
+
const t = /* @__PURE__ */ new Map(), n = Tt(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = be(), f = /* @__PURE__ */ new Set();
|
|
1679
1705
|
let h = 0, m = 0;
|
|
1680
1706
|
const g = { direct: null, bulk: null }, b = /* @__PURE__ */ new Set();
|
|
1681
1707
|
let R = !1, k = 0;
|
|
@@ -1707,141 +1733,141 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1707
1733
|
}, y = (i) => {
|
|
1708
1734
|
const c = [...s.keys()], w = g[i], v = w === null ? 0 : c.indexOf(w) + 1;
|
|
1709
1735
|
for (let L = 0; L < c.length; L += 1) {
|
|
1710
|
-
const N = c[(v + L) % c.length],
|
|
1711
|
-
if (!(N === void 0 ||
|
|
1712
|
-
for (const
|
|
1713
|
-
if ((
|
|
1714
|
-
return
|
|
1736
|
+
const N = c[(v + L) % c.length], q = N === void 0 ? void 0 : s.get(N);
|
|
1737
|
+
if (!(N === void 0 || q === void 0)) {
|
|
1738
|
+
for (const z of q[i])
|
|
1739
|
+
if ((q.claims.get(z) ?? 0) !== 0)
|
|
1740
|
+
return q[i].delete(z), g[i] = N, { sourceId: N, path: z };
|
|
1715
1741
|
}
|
|
1716
1742
|
}
|
|
1717
1743
|
return null;
|
|
1718
|
-
},
|
|
1744
|
+
}, $ = (i, c, w, v) => {
|
|
1719
1745
|
const L = s.get(i);
|
|
1720
1746
|
if (L === void 0 || L.inFlight.get(c) !== w) return;
|
|
1721
1747
|
O(L, c, w);
|
|
1722
|
-
const N = (L.claims.get(c) ?? 0) > 0,
|
|
1723
|
-
if (v.status === "ok" ?
|
|
1724
|
-
const
|
|
1725
|
-
for (const
|
|
1748
|
+
const N = (L.claims.get(c) ?? 0) > 0, q = E(i);
|
|
1749
|
+
if (v.status === "ok" ? q.set(c, { status: "loaded", entries: v.entries }) : v.status === "error" && N ? q.set(c, { status: "failed", failure: v.failure }) : q.delete(c), A(), v.status === "error" && N) {
|
|
1750
|
+
const z = { sourceId: i, path: c, failure: v.failure };
|
|
1751
|
+
for (const K of [...f]) K(z);
|
|
1726
1752
|
}
|
|
1727
|
-
|
|
1728
|
-
},
|
|
1753
|
+
C();
|
|
1754
|
+
}, I = (i, c, w) => {
|
|
1729
1755
|
const v = { controller: new AbortController(), lane: w };
|
|
1730
1756
|
F(i).inFlight.set(c, v), h += 1, w === "bulk" && (m += 1), e.children(i, c, v.controller.signal).then(
|
|
1731
|
-
(L) =>
|
|
1732
|
-
() =>
|
|
1757
|
+
(L) => $(i, c, v, L),
|
|
1758
|
+
() => $(i, c, v, xo)
|
|
1733
1759
|
);
|
|
1734
|
-
},
|
|
1735
|
-
for (; h <
|
|
1760
|
+
}, C = () => {
|
|
1761
|
+
for (; h < qt; ) {
|
|
1736
1762
|
const i = y("direct");
|
|
1737
1763
|
if (i !== null) {
|
|
1738
|
-
|
|
1764
|
+
I(i.sourceId, i.path, "direct");
|
|
1739
1765
|
continue;
|
|
1740
1766
|
}
|
|
1741
|
-
const c = m <
|
|
1767
|
+
const c = m < yo ? y("bulk") : null;
|
|
1742
1768
|
if (c === null) return;
|
|
1743
|
-
|
|
1769
|
+
I(c.sourceId, c.path, "bulk");
|
|
1744
1770
|
}
|
|
1745
|
-
},
|
|
1771
|
+
}, B = (i, c, w) => {
|
|
1746
1772
|
if (!(c.direct.delete(w) || c.bulk.delete(w))) {
|
|
1747
1773
|
const L = c.inFlight.get(w);
|
|
1748
1774
|
if (L === void 0) return !1;
|
|
1749
1775
|
O(c, w, L), L.controller.abort();
|
|
1750
1776
|
}
|
|
1751
1777
|
return r.get(i)?.delete(w), !0;
|
|
1752
|
-
},
|
|
1778
|
+
}, M = () => {
|
|
1753
1779
|
R = !1;
|
|
1754
1780
|
let i = !1;
|
|
1755
1781
|
for (const c of b) {
|
|
1756
1782
|
const w = F(c);
|
|
1757
1783
|
for (const v of w.unclaimed)
|
|
1758
|
-
(w.claims.get(v) ?? 0) === 0 &&
|
|
1784
|
+
(w.claims.get(v) ?? 0) === 0 && B(c, w, v) && (i = !0);
|
|
1759
1785
|
w.unclaimed.clear();
|
|
1760
1786
|
}
|
|
1761
|
-
b.clear(), i && (A(),
|
|
1762
|
-
},
|
|
1787
|
+
b.clear(), i && (A(), C());
|
|
1788
|
+
}, _ = (i, c) => {
|
|
1763
1789
|
t.set(i, S(ie(e.tree(i)), c));
|
|
1764
|
-
},
|
|
1790
|
+
}, Q = (i, c, w) => {
|
|
1765
1791
|
p(i);
|
|
1766
|
-
const v = S(
|
|
1767
|
-
return t.set(i, v), r.delete(i), A(),
|
|
1768
|
-
},
|
|
1792
|
+
const v = S(At(c), w);
|
|
1793
|
+
return t.set(i, v), r.delete(i), A(), C(), v;
|
|
1794
|
+
}, oe = (i, c, w, v) => {
|
|
1769
1795
|
if (w !== T(i) || t.get(i) !== c) return;
|
|
1770
1796
|
const L = ae(c.promise);
|
|
1771
1797
|
if (!(v.status !== "ok" || L?.status !== "ok" || c.loadedAt === null || v.loadedAt <= c.loadedAt)) {
|
|
1772
|
-
if (
|
|
1798
|
+
if (ge(L.entries, v.entries)) {
|
|
1773
1799
|
c.loadedAt = v.loadedAt;
|
|
1774
1800
|
return;
|
|
1775
1801
|
}
|
|
1776
|
-
|
|
1802
|
+
Q(i, v, c.opened);
|
|
1777
1803
|
}
|
|
1778
|
-
},
|
|
1804
|
+
}, W = (i, c) => {
|
|
1779
1805
|
const w = t.get(i);
|
|
1780
1806
|
return w !== void 0 && ae(w.promise)?.status === c;
|
|
1781
|
-
},
|
|
1807
|
+
}, Te = (i, c) => {
|
|
1782
1808
|
c.stale = !1;
|
|
1783
1809
|
const w = T(i);
|
|
1784
|
-
e.tree(i).then((v) =>
|
|
1810
|
+
e.tree(i).then((v) => oe(i, c, w, v));
|
|
1785
1811
|
};
|
|
1786
1812
|
return {
|
|
1787
|
-
read: (i) => t.get(i)?.promise ??
|
|
1813
|
+
read: (i) => t.get(i)?.promise ?? So,
|
|
1788
1814
|
open: (i) => {
|
|
1789
1815
|
const c = n.resumes(i), w = n.hold(i), v = t.get(i);
|
|
1790
|
-
return v === void 0 ||
|
|
1816
|
+
return v === void 0 || W(i, "deferred") ? (_(i, !0), A()) : c || (v.opened && W(i, "error") ? (_(i, !0), A()) : (v.opened = !0, v.stale && W(i, "ok") && Te(i, v))), w;
|
|
1791
1817
|
},
|
|
1792
1818
|
retry: (i) => {
|
|
1793
|
-
|
|
1819
|
+
W(i, "error") && (_(i, !0), A());
|
|
1794
1820
|
},
|
|
1795
1821
|
seed: (i, c) => {
|
|
1796
1822
|
const w = c.then(
|
|
1797
|
-
(N) => N === null ?
|
|
1798
|
-
() =>
|
|
1823
|
+
(N) => N === null ? Pe : N,
|
|
1824
|
+
() => Pe
|
|
1799
1825
|
), v = t.get(i);
|
|
1800
|
-
if (v !== void 0 &&
|
|
1826
|
+
if (v !== void 0 && W(i, "ok")) {
|
|
1801
1827
|
const N = T(i);
|
|
1802
|
-
w.then((
|
|
1828
|
+
w.then((q) => oe(i, v, N, q));
|
|
1803
1829
|
return;
|
|
1804
1830
|
}
|
|
1805
1831
|
p(i);
|
|
1806
1832
|
const L = S(ie(w), v?.opened === !0);
|
|
1807
|
-
t.set(i, L), r.delete(i),
|
|
1808
|
-
t.get(i) === L && (N.status === "deferred" && n.isHeld(i) &&
|
|
1833
|
+
t.set(i, L), r.delete(i), C(), w.then((N) => {
|
|
1834
|
+
t.get(i) === L && (N.status === "deferred" && n.isHeld(i) && _(i, L.opened), A());
|
|
1809
1835
|
});
|
|
1810
1836
|
},
|
|
1811
1837
|
refresh: async (i) => {
|
|
1812
1838
|
const c = (l.get(i) ?? 0) + 1;
|
|
1813
1839
|
l.set(i, c);
|
|
1814
1840
|
const w = await e.refresh(i);
|
|
1815
|
-
if (l.get(i) !== c) return
|
|
1841
|
+
if (l.get(i) !== c) return Eo;
|
|
1816
1842
|
if (w.status === "error") return { status: "failed", failure: w.failure };
|
|
1817
1843
|
const v = t.get(i);
|
|
1818
|
-
if (!(v !== void 0 && v.loadedAt !== null &&
|
|
1819
|
-
const N =
|
|
1844
|
+
if (!(v !== void 0 && v.loadedAt !== null && W(i, "ok") && v.loadedAt > w.loadedAt)) {
|
|
1845
|
+
const N = Q(i, w, !0);
|
|
1820
1846
|
if (v !== void 0 && v.promise.status === "pending") {
|
|
1821
|
-
const
|
|
1822
|
-
v.promise.then((
|
|
1847
|
+
const q = T(i);
|
|
1848
|
+
v.promise.then((z) => oe(i, N, q, z));
|
|
1823
1849
|
}
|
|
1824
1850
|
}
|
|
1825
|
-
for (const [N,
|
|
1826
|
-
N !== i && ae(
|
|
1827
|
-
return
|
|
1851
|
+
for (const [N, q] of t)
|
|
1852
|
+
N !== i && ae(q.promise)?.status === "ok" && (q.stale = !0);
|
|
1853
|
+
return bo;
|
|
1828
1854
|
},
|
|
1829
1855
|
children: (i, c) => r.get(i)?.get(c),
|
|
1830
1856
|
claimChildren: (i, c) => {
|
|
1831
1857
|
const w = F(i), v = E(i);
|
|
1832
1858
|
let L = !1, N = !1;
|
|
1833
|
-
for (const [
|
|
1834
|
-
w.claims.set(
|
|
1835
|
-
L && A(), N &&
|
|
1836
|
-
let
|
|
1859
|
+
for (const [z, K] of c)
|
|
1860
|
+
w.claims.set(z, (w.claims.get(z) ?? 0) + 1), v.get(z) === void 0 ? (v.set(z, dt), w[K].add(z), L = !0, N = !0) : K === "direct" && w.bulk.delete(z) && (w.direct.add(z), N = !0);
|
|
1861
|
+
L && A(), N && C();
|
|
1862
|
+
let q = !1;
|
|
1837
1863
|
return () => {
|
|
1838
|
-
if (!
|
|
1839
|
-
|
|
1840
|
-
for (const
|
|
1841
|
-
const
|
|
1842
|
-
|
|
1864
|
+
if (!q) {
|
|
1865
|
+
q = !0;
|
|
1866
|
+
for (const z of c.keys()) {
|
|
1867
|
+
const K = (w.claims.get(z) ?? 0) - 1;
|
|
1868
|
+
K > 0 ? w.claims.set(z, K) : (w.claims.delete(z), w.unclaimed.add(z));
|
|
1843
1869
|
}
|
|
1844
|
-
b.add(i), !R && (R = !0, queueMicrotask(
|
|
1870
|
+
b.add(i), !R && (R = !0, queueMicrotask(M));
|
|
1845
1871
|
}
|
|
1846
1872
|
};
|
|
1847
1873
|
},
|
|
@@ -1850,7 +1876,7 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1850
1876
|
if (w === void 0 || w.get(c)?.status !== "failed") return;
|
|
1851
1877
|
const v = F(i);
|
|
1852
1878
|
if ((v.claims.get(c) ?? 0) > 0) {
|
|
1853
|
-
w.set(c,
|
|
1879
|
+
w.set(c, dt), v.direct.add(c), A(), C();
|
|
1854
1880
|
return;
|
|
1855
1881
|
}
|
|
1856
1882
|
w.delete(c), A();
|
|
@@ -1870,9 +1896,9 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1870
1896
|
subscribe: a.subscribe,
|
|
1871
1897
|
version: () => k
|
|
1872
1898
|
};
|
|
1873
|
-
},
|
|
1899
|
+
}, Ro = (e, t) => {
|
|
1874
1900
|
let n = e;
|
|
1875
|
-
const r =
|
|
1901
|
+
const r = be();
|
|
1876
1902
|
return {
|
|
1877
1903
|
getSnapshot: () => n,
|
|
1878
1904
|
subscribe: r.subscribe,
|
|
@@ -1880,64 +1906,64 @@ const Wr = /* @__PURE__ */ x.forwardRef(Vr), Kr = /* @__PURE__ */ new Set(), Gr
|
|
|
1880
1906
|
n = { ...n, ...o }, t(n), r.emit();
|
|
1881
1907
|
}
|
|
1882
1908
|
};
|
|
1883
|
-
},
|
|
1909
|
+
}, To = 1;
|
|
1884
1910
|
let ce = 0, X = null;
|
|
1885
|
-
const
|
|
1911
|
+
const Ao = () => {
|
|
1886
1912
|
const { documentElement: e, body: t } = document;
|
|
1887
1913
|
ce === 0 && (X = { 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"), ce += 1;
|
|
1888
1914
|
let n = !1;
|
|
1889
1915
|
return () => {
|
|
1890
1916
|
n || (n = !0, ce -= 1, !(ce > 0 || X === null) && (e.style.overflow = X.htmlOverflow, t.style.overflow = X.bodyOverflow, e.style.scrollbarGutter = X.htmlGutter, t.style.scrollbarGutter = X.bodyGutter, X = null));
|
|
1891
1917
|
};
|
|
1892
|
-
},
|
|
1918
|
+
}, Oo = [
|
|
1893
1919
|
{ selector: '[data-aqmx-document-flow="fill"]', name: "document region" },
|
|
1894
1920
|
{ selector: "[data-aqmx-explorer-body]", name: "tree area" }
|
|
1895
|
-
],
|
|
1896
|
-
if (!
|
|
1921
|
+
], ut = 1, ft = (e) => e.getClientRects().length > 0, Oe = "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.", Lo = (e) => {
|
|
1922
|
+
if (!ft(e)) return null;
|
|
1897
1923
|
const t = e.getBoundingClientRect(), n = window.innerHeight;
|
|
1898
|
-
if (t.bottom > n +
|
|
1899
|
-
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. ${
|
|
1900
|
-
if (t.height <
|
|
1901
|
-
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. ${
|
|
1902
|
-
for (const { selector: r, name: o } of
|
|
1924
|
+
if (t.bottom > n + To)
|
|
1925
|
+
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. ${Oe}`;
|
|
1926
|
+
if (t.height < ut)
|
|
1927
|
+
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. ${Oe}`;
|
|
1928
|
+
for (const { selector: r, name: o } of Oo)
|
|
1903
1929
|
for (const l of e.querySelectorAll(r)) {
|
|
1904
|
-
if (!
|
|
1930
|
+
if (!ft(l)) continue;
|
|
1905
1931
|
const s = l.getBoundingClientRect().height;
|
|
1906
|
-
if (s <
|
|
1907
|
-
return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(s))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${
|
|
1932
|
+
if (s < ut)
|
|
1933
|
+
return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(s))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${Oe}`;
|
|
1908
1934
|
}
|
|
1909
1935
|
return null;
|
|
1910
|
-
},
|
|
1936
|
+
}, Co = (e) => {
|
|
1911
1937
|
let t = !1;
|
|
1912
1938
|
const n = () => {
|
|
1913
1939
|
if (t) return;
|
|
1914
|
-
const o =
|
|
1940
|
+
const o = Lo(e);
|
|
1915
1941
|
o !== null && (t = !0, console.error(o));
|
|
1916
1942
|
}, r = typeof ResizeObserver > "u" ? null : new ResizeObserver(n);
|
|
1917
1943
|
return r?.observe(e), window.addEventListener("resize", n), n(), () => {
|
|
1918
1944
|
r?.disconnect(), window.removeEventListener("resize", n);
|
|
1919
1945
|
};
|
|
1920
|
-
},
|
|
1921
|
-
|
|
1946
|
+
}, Mo = (e, t) => {
|
|
1947
|
+
J(() => e ? Ao() : void 0, [e]), J(() => {
|
|
1922
1948
|
const n = t.current;
|
|
1923
1949
|
if (!(!e || n === null))
|
|
1924
|
-
return
|
|
1950
|
+
return Co(n);
|
|
1925
1951
|
}, [e, t]);
|
|
1926
|
-
},
|
|
1927
|
-
{ control:
|
|
1952
|
+
}, mt = '[data-testid="markdown-explorer-view-switch"]', No = [
|
|
1953
|
+
{ control: mt, successors: [mt, '[data-testid="markdown-explorer-sheet-toggle"]'] },
|
|
1928
1954
|
{ control: '[data-testid="markdown-explorer-selection-open"]', successors: ['[data-testid="markdown-explorer-panel-frame"]'] }
|
|
1929
|
-
],
|
|
1930
|
-
for (const t of
|
|
1955
|
+
], Po = (e) => {
|
|
1956
|
+
for (const t of No) {
|
|
1931
1957
|
const n = e.closest(t.control);
|
|
1932
1958
|
if (n !== null) return { element: n, control: t };
|
|
1933
1959
|
}
|
|
1934
1960
|
return null;
|
|
1935
|
-
},
|
|
1936
|
-
const n =
|
|
1937
|
-
|
|
1961
|
+
}, $o = (e, t) => {
|
|
1962
|
+
const n = j(null);
|
|
1963
|
+
J(() => {
|
|
1938
1964
|
const o = (a) => {
|
|
1939
1965
|
const f = e.current;
|
|
1940
|
-
n.current = f !== null && a instanceof Element && f.contains(a) ?
|
|
1966
|
+
n.current = f !== null && a instanceof Element && f.contains(a) ? Po(a) : null;
|
|
1941
1967
|
}, l = (a) => o(a.target);
|
|
1942
1968
|
o(document.activeElement);
|
|
1943
1969
|
const s = (a) => {
|
|
@@ -1950,7 +1976,7 @@ const go = () => {
|
|
|
1950
1976
|
document.removeEventListener("focusin", l), document.removeEventListener("focusout", s);
|
|
1951
1977
|
};
|
|
1952
1978
|
}, [e]);
|
|
1953
|
-
const r =
|
|
1979
|
+
const r = j(t);
|
|
1954
1980
|
V(() => {
|
|
1955
1981
|
if (r.current === t) return;
|
|
1956
1982
|
r.current = t;
|
|
@@ -1975,71 +2001,71 @@ const go = () => {
|
|
|
1975
2001
|
});
|
|
1976
2002
|
return a.observe(s, { childList: !0, subtree: !0 }), () => a.disconnect();
|
|
1977
2003
|
}, [t, e]);
|
|
1978
|
-
},
|
|
2004
|
+
}, Do = $e(() => import("./TreeLayout-C7ZNnaOr.js").then((e) => ({ default: e.TreeLayout }))), Fo = $e(() => import("./MultiLayout-8s7q3-Hm.js").then((e) => ({ default: e.MultiLayout }))), _o = 64, gt = {
|
|
1979
2005
|
request: (e) => {
|
|
1980
2006
|
requestAnimationFrame(e);
|
|
1981
2007
|
}
|
|
1982
|
-
},
|
|
2008
|
+
}, ht = (e) => {
|
|
1983
2009
|
e.documents.clear(), e.trees.clear();
|
|
1984
|
-
},
|
|
2010
|
+
}, Le = (e, t) => {
|
|
1985
2011
|
t.tree !== null && e.trees.seed(t.tree.sourceId, t.tree.result);
|
|
1986
2012
|
for (const { path: n, document: r } of t.documents) e.documents.seed(n, r);
|
|
1987
|
-
},
|
|
1988
|
-
const [n, r] = Z(() => ({ overrides: t, locale: e, labels:
|
|
1989
|
-
if (n.locale === e &&
|
|
1990
|
-
const o = { overrides: t, locale: e, labels:
|
|
2013
|
+
}, qo = (e, t) => {
|
|
2014
|
+
const [n, r] = Z(() => ({ overrides: t, locale: e, labels: Ke(e, t) }));
|
|
2015
|
+
if (n.locale === e && An(n.overrides, t)) return n.labels;
|
|
2016
|
+
const o = { overrides: t, locale: e, labels: Ke(e, t) };
|
|
1991
2017
|
return r(o), o.labels;
|
|
1992
|
-
},
|
|
1993
|
-
const [r, o] = Z(() => ({ scope: t, store:
|
|
2018
|
+
}, Bo = (e, t, n) => {
|
|
2019
|
+
const [r, o] = Z(() => ({ scope: t, store: ct(e, n) }));
|
|
1994
2020
|
if (r.scope === t && r.store.storageKey === e && r.store.defaults === n) return r.store;
|
|
1995
|
-
const l = { scope: t, store:
|
|
2021
|
+
const l = { scope: t, store: ct(e, n) };
|
|
1996
2022
|
return o(l), l.store;
|
|
1997
|
-
},
|
|
1998
|
-
const [t, n] = Z(() => ({ scope: e, announcer:
|
|
2023
|
+
}, zo = (e) => {
|
|
2024
|
+
const [t, n] = Z(() => ({ scope: e, announcer: st(gt) }));
|
|
1999
2025
|
if (t.scope === e) return t.announcer;
|
|
2000
|
-
const r = { scope: e, announcer:
|
|
2026
|
+
const r = { scope: e, announcer: st(gt) };
|
|
2001
2027
|
return n(r), r.announcer;
|
|
2002
|
-
},
|
|
2003
|
-
|
|
2004
|
-
const m =
|
|
2005
|
-
}), A =
|
|
2006
|
-
const
|
|
2007
|
-
return
|
|
2028
|
+
}, Qo = ({ data: e, config: t, storageNamespace: n, locale: r, labels: o, theme: l, renderFrame: s, renderTreeFailure: a, lockDocumentScroll: f = !1, onMathDiagnostics: h }) => {
|
|
2029
|
+
wn(n);
|
|
2030
|
+
const m = St(r), g = On(l), b = qo(m, o), { revalidate: R } = Vt(), k = j(() => {
|
|
2031
|
+
}), A = we(t.dataPath), [T] = Z(() => {
|
|
2032
|
+
const M = wo({ dataPath: A, onScope: (Q) => k.current(Q) }), _ = { documents: qn({ client: M, capacity: Math.max(_o, t.multiView.maxPanels * 2) }), trees: ko(M) };
|
|
2033
|
+
return Le(_, e), Ge(n, e.scope), { data: M, ..._, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
|
|
2008
2034
|
});
|
|
2009
2035
|
if (T.aligned.pageData !== e || T.aligned.storageNamespace !== n) {
|
|
2010
|
-
const
|
|
2011
|
-
T.aligned.pageData = e, T.aligned.storageNamespace = n,
|
|
2036
|
+
const M = T.aligned.pageData;
|
|
2037
|
+
T.aligned.pageData = e, T.aligned.storageNamespace = n, M !== e && (M.scope !== e.scope ? T.aligned.pendingReader = e : Le(T, e)), Ge(n, e.scope);
|
|
2012
2038
|
}
|
|
2013
|
-
const F =
|
|
2039
|
+
const F = Bo(vn(n).treeSettings, e.scope, t.defaultTreeSettings);
|
|
2014
2040
|
V(() => {
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2041
|
+
const M = T.aligned.pendingReader;
|
|
2042
|
+
M !== null && (T.aligned.pendingReader = null, ht(T), Le(T, M));
|
|
2017
2043
|
}, [e, T]), V(() => {
|
|
2018
|
-
let
|
|
2019
|
-
return k.current = (
|
|
2020
|
-
|
|
2044
|
+
let M = !1;
|
|
2045
|
+
return k.current = (_) => {
|
|
2046
|
+
_ === e.scope || M || (M = !0, _ !== null && (ht(T), bn(n)), R());
|
|
2021
2047
|
}, () => {
|
|
2022
2048
|
k.current = () => {
|
|
2023
2049
|
};
|
|
2024
2050
|
};
|
|
2025
2051
|
}, [e, R, T, n]);
|
|
2026
|
-
const O =
|
|
2052
|
+
const O = j(t.settingsCookie);
|
|
2027
2053
|
V(() => {
|
|
2028
2054
|
O.current = t.settingsCookie;
|
|
2029
2055
|
}, [t.settingsCookie]);
|
|
2030
2056
|
const [u] = Z(
|
|
2031
|
-
() =>
|
|
2032
|
-
document.cookie =
|
|
2057
|
+
() => Ro(e.settings, (M) => {
|
|
2058
|
+
document.cookie = tn(O.current, M, window.location.protocol === "https:");
|
|
2033
2059
|
})
|
|
2034
|
-
), p =
|
|
2035
|
-
`), y =
|
|
2036
|
-
`)), [t, E]),
|
|
2060
|
+
), p = zo(e.scope), S = H(() => ie(e.notices.catch(() => [])), [e.notices]), E = e.sources.map((M) => M.id).join(`
|
|
2061
|
+
`), y = H(() => en(t, E.split(`
|
|
2062
|
+
`)), [t, E]), $ = j(h);
|
|
2037
2063
|
V(() => {
|
|
2038
|
-
|
|
2064
|
+
$.current = h;
|
|
2039
2065
|
}, [h]);
|
|
2040
|
-
const [
|
|
2041
|
-
|
|
2042
|
-
}),
|
|
2066
|
+
const [I] = Z(() => (M, _) => {
|
|
2067
|
+
$.current?.(M, _);
|
|
2068
|
+
}), C = h === void 0 ? void 0 : I, B = H(
|
|
2043
2069
|
() => ({
|
|
2044
2070
|
config: y,
|
|
2045
2071
|
labels: b,
|
|
@@ -2056,52 +2082,53 @@ const go = () => {
|
|
|
2056
2082
|
treeSettings: F,
|
|
2057
2083
|
announcer: p,
|
|
2058
2084
|
renderTreeFailure: a,
|
|
2059
|
-
reportMathDiagnostics:
|
|
2085
|
+
reportMathDiagnostics: C
|
|
2060
2086
|
}),
|
|
2061
|
-
[y, b, m, g, n, e.scope, e.sources, S, T, u, F, p, a,
|
|
2087
|
+
[y, b, m, g, n, e.scope, e.sources, S, T, u, F, p, a, C]
|
|
2062
2088
|
);
|
|
2063
|
-
return /* @__PURE__ */ d(
|
|
2064
|
-
},
|
|
2065
|
-
const [o] = Z(
|
|
2089
|
+
return /* @__PURE__ */ d(yt, { value: B, children: /* @__PURE__ */ d(Ho, { renderFrame: s, lockDocumentScroll: f }, e.scope) });
|
|
2090
|
+
}, jo = ({ ref: e, theme: t, view: n, children: r }) => {
|
|
2091
|
+
const [o] = Z(mr);
|
|
2066
2092
|
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 });
|
|
2067
|
-
},
|
|
2068
|
-
const { theme: n, labels: r } = D(), o =
|
|
2069
|
-
|
|
2093
|
+
}, Ho = ({ renderFrame: e, lockDocumentScroll: t }) => {
|
|
2094
|
+
const { theme: n, labels: r } = D(), o = De(), { hash: l } = pt(), s = _e(), a = j(null);
|
|
2095
|
+
Mo(t, a), V(() => {
|
|
2070
2096
|
o.kind === "redirect" && s(`${o.href}${l}`, "browse");
|
|
2071
2097
|
}, [o, l, s]);
|
|
2072
2098
|
const { location: f } = o, h = f.view;
|
|
2073
|
-
|
|
2074
|
-
const m = f.view === "tree" ? /* @__PURE__ */ d(
|
|
2099
|
+
$o(a, h);
|
|
2100
|
+
const m = f.view === "tree" ? /* @__PURE__ */ d(fe, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading" }), children: /* @__PURE__ */ d(Do, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ d(fe, { fallback: /* @__PURE__ */ d("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading" }), children: /* @__PURE__ */ d(Fo, { location: f }) }) : /* @__PURE__ */ d(go, { location: f }), g = /* @__PURE__ */ U(jo, { ref: a, theme: n, view: h, children: [
|
|
2075
2101
|
m,
|
|
2076
|
-
/* @__PURE__ */ d(
|
|
2102
|
+
/* @__PURE__ */ d(ho, { holds: !0, testId: "markdown-explorer-announcer" })
|
|
2077
2103
|
] });
|
|
2078
2104
|
return e === void 0 ? g : e({ view: h, children: g });
|
|
2079
|
-
},
|
|
2105
|
+
}, el = ({ currentUrl: e, nextUrl: t, formMethod: n, defaultShouldRevalidate: r }) => n === void 0 && e.href === t.href && r;
|
|
2080
2106
|
export {
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2107
|
+
mo as D,
|
|
2108
|
+
Mn as E,
|
|
2109
|
+
Nn as F,
|
|
2110
|
+
pr as I,
|
|
2111
|
+
Fn as L,
|
|
2112
|
+
kn as M,
|
|
2113
|
+
uo as P,
|
|
2114
|
+
_e as a,
|
|
2115
|
+
lo as b,
|
|
2116
|
+
be as c,
|
|
2117
|
+
so as d,
|
|
2118
|
+
Jo as e,
|
|
2119
|
+
kt as f,
|
|
2120
|
+
Pn as g,
|
|
2121
|
+
ve as h,
|
|
2122
|
+
De as i,
|
|
2123
|
+
ho as j,
|
|
2124
|
+
me as k,
|
|
2125
|
+
En as l,
|
|
2126
|
+
Ye as m,
|
|
2127
|
+
Et as n,
|
|
2128
|
+
Sn as o,
|
|
2129
|
+
We as p,
|
|
2130
|
+
Qo as q,
|
|
2131
|
+
Ke as r,
|
|
2132
|
+
el as s,
|
|
2106
2133
|
D as u
|
|
2107
2134
|
};
|