@aiquants/markdown-explorer 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +4 -2
  3. package/dist/{EditSurface-Dis52Iwq.cjs → EditSurface-DFHZLbWC.cjs} +2 -2
  4. package/dist/{EditSurface-BTrQ1viw.js → EditSurface-DV4FuQVx.js} +211 -211
  5. package/dist/{ExplorerSplit-Dq7HfNre.js → ExplorerSplit-DTkr0q2C.js} +407 -407
  6. package/dist/{ExplorerSplit-13nPIuf0.cjs → ExplorerSplit-DnuuUifU.cjs} +1 -1
  7. package/dist/{MultiLayout-B7RvBpCj.cjs → MultiLayout-CC0VPiFf.cjs} +1 -1
  8. package/dist/{MultiLayout-1rKm2Hzt.js → MultiLayout-S77I1xQr.js} +3 -3
  9. package/dist/{NativeScrollBar-D63-6AL1.cjs → NativeScrollBar-C2n-DzEJ.cjs} +1 -1
  10. package/dist/{NativeScrollBar-Bg05yuzM.js → NativeScrollBar-DMCPxFeR.js} +2 -2
  11. package/dist/{TreeLayout-9eEP62LF.js → TreeLayout-BGTzh0L4.js} +3 -3
  12. package/dist/{TreeLayout-CNE0XkWz.cjs → TreeLayout-DjJMAxWJ.cjs} +1 -1
  13. package/dist/core/config.d.cts +2 -0
  14. package/dist/core/config.d.ts +2 -0
  15. package/dist/core/geometry.d.cts +0 -1
  16. package/dist/core/geometry.d.ts +0 -1
  17. package/dist/{explorerCore-GCqatHTO.js → explorerCore-COhVrnGO.js} +1 -1
  18. package/dist/{explorerCore-5qeC3-gt.cjs → explorerCore-diILGZTv.cjs} +1 -1
  19. package/dist/{index-_XNluAcx.cjs → index-AfEbgYQI.cjs} +8 -8
  20. package/dist/{index-C52Nj37x.js → index-CWFyLa0N.js} +9 -8
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +15 -15
  23. package/dist/location-Csj3eAm_.cjs +1 -0
  24. package/dist/{location-CJvL6JNs.js → location-DFfbnUZ9.js} +95 -89
  25. package/dist/{merge-CnrrjXmc.js → merge-D-Oak4Xy.js} +1 -1
  26. package/dist/{merge-CKpFyeqR.cjs → merge-DvoikrFp.cjs} +1 -1
  27. package/dist/server.cjs +1 -1
  28. package/dist/server.js +3 -3
  29. package/dist/serverCore.cjs +1 -1
  30. package/dist/serverCore.js +3 -3
  31. package/dist/styles/markdown-explorer.css +1 -1
  32. package/dist/{tapScrollCircle-6etmzCb7.cjs → tapScrollCircle-CS3hbyGb.cjs} +1 -1
  33. package/dist/{tapScrollCircle-D-Lgzdxx.js → tapScrollCircle-DKoj17z6.js} +1 -1
  34. package/dist/{useSplitPersistence-CD_n1ivo.cjs → useSplitPersistence-C6s7a4Iu.cjs} +1 -1
  35. package/dist/{useSplitPersistence-tbTu3P5m.js → useSplitPersistence-CC9bx9iq.js} +1 -1
  36. package/package.json +5 -5
  37. package/dist/location-DOIG84V9.cjs +0 -1
@@ -4,7 +4,7 @@ import { jsx as d, jsxs as j, Fragment as Oe } from "react/jsx-runtime";
4
4
  import * as T from "react";
5
5
  import { createContext as ge, use as se, useMemo as Q, useSyncExternalStore as oe, useLayoutEffect as K, useRef as z, useCallback as _, useId as Le, useEffect as ne, Component as Or, Suspense as tt, lazy as hn, useState as V, useEffectEvent as pe, startTransition as ea, useImperativeHandle as ta } from "react";
6
6
  import { useParams as na, useSearchParams as ra, matchPath as oa, useBlocker as aa, useNavigate as ia, Link as sa, NavigationType as la, useHref as at, useLocation as pn, useRevalidator as ca } from "react-router";
7
- import { h as Lr, L as da, E as Ar, m as Dr, M as ua, x as Cn, O as fa, y as ma, Q as ha, R as Ye, e as xe, d as pa, T as wa, k as ga, U as va, V as ya, W as Rn, X as ba, Y as Mn, Z as ka, j as Ea, w as Sa, _ as xa, $ as Ta } from "./location-CJvL6JNs.js";
7
+ import { h as Lr, K as da, E as Ar, m as Dr, L as ua, x as Cn, M as fa, y as ma, O as ha, Q as Ye, e as xe, d as pa, R as wa, k as ga, T as va, U as ya, V as Rn, W as ba, X as Mn, Y as ka, j as Ea, w as Sa, Z as xa, _ as Ta } from "./location-DFfbnUZ9.js";
8
8
  import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as On, SPREADSHEET_BLOCK_LABEL_CATALOGS as xt } from "@aiquants/markdown/code-blocks";
9
9
  import { J as ae, l as ve, i as Ca, W as Lt, X as Ra, Y as Ma, Z as qt, g as $e, I as Oa, _ as La, k as Aa, $ as Da, a0 as Na, a1 as Ia, a2 as Pa, a3 as Fa, a4 as $a, H as _a, a5 as Ln, F as qa, a6 as Ba, a7 as Ua, a8 as Ha, O as za, G as ja, a9 as Va, aa as Za, ab as Ga, C as Bt } from "./ownUrls-DD0cSCsF.js";
10
10
  import { HostedScrollArea as An, SpreadsheetBlock as Wa, useMarkdownToolbarState as Ka, MarkdownViewer as Nr } from "@aiquants/markdown";
@@ -1259,7 +1259,7 @@ const Hi = (e, t, n, r) => {
1259
1259
  H(c, l, { kind: "failed", failure: A.failure });
1260
1260
  return;
1261
1261
  }
1262
- const { mergeDraft: q } = await import("./merge-CnrrjXmc.js");
1262
+ const { mergeDraft: q } = await import("./merge-D-Oak4Xy.js");
1263
1263
  if (!I(c, l) || O.aborted) return;
1264
1264
  const ee = f.get(c);
1265
1265
  ee?.flush();
@@ -1285,7 +1285,7 @@ const Hi = (e, t, n, r) => {
1285
1285
  else if (c.base.version === l.version)
1286
1286
  x = { text: E, version: l.version }, O = c.draft, F = Ge;
1287
1287
  else {
1288
- const { mergeDraft: y } = await import("./merge-CnrrjXmc.js"), S = y(c.base.text, c.draft, E, t());
1288
+ const { mergeDraft: y } = await import("./merge-D-Oak4Xy.js"), S = y(c.base.text, c.draft, E, t());
1289
1289
  x = { text: E, version: l.version }, O = S.text, F = S.kind === "conflicts" ? { kind: "conflicts", count: S.conflicts } : Ge;
1290
1290
  }
1291
1291
  if (a.has(c.path)) return { restored: !1, reason: "failed" };
@@ -1647,7 +1647,7 @@ function Ts({
1647
1647
  }
1648
1648
  const Cs = /* @__PURE__ */ T.forwardRef(Ts);
1649
1649
  let zt = null;
1650
- const Kr = () => (zt ??= import("./EditSurface-BTrQ1viw.js").catch((e) => {
1650
+ const Kr = () => (zt ??= import("./EditSurface-DV4FuQVx.js").catch((e) => {
1651
1651
  throw zt = null, e;
1652
1652
  }), zt), Rs = () => {
1653
1653
  Kr().catch(() => {
@@ -1829,7 +1829,7 @@ const Xr = "[data-aqmd-fullscreen]", Ls = "[data-aqmd-fullscreen-dialog]:modal",
1829
1829
  }),
1830
1830
  [s, f]
1831
1831
  );
1832
- }, Ks = hn(() => import("./NativeScrollBar-Bg05yuzM.js").then((e) => ({ default: e.NativeScrollBar })));
1832
+ }, Ks = hn(() => import("./NativeScrollBar-DMCPxFeR.js").then((e) => ({ default: e.NativeScrollBar })));
1833
1833
  class Xs extends Or {
1834
1834
  state = { failed: !1 };
1835
1835
  static getDerivedStateFromError() {
@@ -1847,7 +1847,7 @@ let ro = null, jt = null;
1847
1847
  const ln = /* @__PURE__ */ new Set(), ol = (e) => (ln.add(e), () => {
1848
1848
  ln.delete(e);
1849
1849
  }), al = () => {
1850
- jt === null && (jt = import("./tapScrollCircle-D-Lgzdxx.js").then((e) => {
1850
+ jt === null && (jt = import("./tapScrollCircle-DKoj17z6.js").then((e) => {
1851
1851
  const t = e.TAP_SCROLL_CIRCLE.renderVisual;
1852
1852
  if (t === void 0) throw new TypeError("[markdown-explorer] the bars' tap-scroll circle has no look to share");
1853
1853
  ro = t;
@@ -4308,6 +4308,7 @@ const ld = /* @__PURE__ */ new Map([
4308
4308
  iFrameAllowedDomains: x,
4309
4309
  embeds: w.embeds,
4310
4310
  mermaidModifier: w.mermaidModifier,
4311
+ documentFontFamily: w.documentFontFamily,
4311
4312
  fetch: b,
4312
4313
  linkComponent: Mc,
4313
4314
  toolbar: k,
@@ -4332,7 +4333,7 @@ const ld = /* @__PURE__ */ new Map([
4332
4333
  scrollBarGutter: O ? void 0 : no,
4333
4334
  imageSource: E
4334
4335
  }),
4335
- [l, p, F, u.documentEmpty, m, w.documentStyles, x, w.embeds, w.mermaidModifier, b, k, r, O, E]
4336
+ [l, p, F, u.documentEmpty, m, w.documentStyles, x, w.embeds, w.mermaidModifier, w.documentFontFamily, b, k, r, O, E]
4336
4337
  ), S = _((A, q) => O ? q === null || q.kind === "failure" ? ve(A) : q.name : u.documentRegion, [O, u.documentRegion]), L = O ? "content" : "fill";
4337
4338
  return e === null ? /* @__PURE__ */ d(Ae, { value: L, children: /* @__PURE__ */ d(gu, { absence: t, announces: s, announceFailure: f }) }) : /* @__PURE__ */ d(Ae, { value: L, children: /* @__PURE__ */ d(tt, { fallback: /* @__PURE__ */ d(xn, { label: S(e, null) }), children: /* @__PURE__ */ d(
4338
4339
  Ou,
@@ -5602,7 +5603,7 @@ const em = () => {
5602
5603
  });
5603
5604
  return s.observe(i, { childList: !0, subtree: !0 }), () => s.disconnect();
5604
5605
  }, [t, e]);
5605
- }, cm = hn(() => import("./TreeLayout-9eEP62LF.js").then((e) => ({ default: e.TreeLayout }))), dm = hn(() => import("./MultiLayout-1rKm2Hzt.js").then((e) => ({ default: e.MultiLayout }))), um = 64, fm = {
5606
+ }, cm = hn(() => import("./TreeLayout-BGTzh0L4.js").then((e) => ({ default: e.TreeLayout }))), dm = hn(() => import("./MultiLayout-S77I1xQr.js").then((e) => ({ default: e.MultiLayout }))), um = 64, fm = {
5606
5607
  request: (e) => {
5607
5608
  requestAnimationFrame(e);
5608
5609
  }
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-_XNluAcx.cjs"),e=require("./storage-BpYsprog.cjs"),E=require("./location-DOIG84V9.cjs"),_=require("./ownUrls-BTPGNhBt.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_HOST_CHANGE_POLICIES=L.EXPLORER_HOST_CHANGE_POLICIES;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.draftAnswerOf=L.draftAnswerOf;exports.draftConversionOf=L.draftConversionOf;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.SPREADSHEET_BYTE_LIMITS=E.SPREADSHEET_BYTE_LIMITS;exports.WORKBOOK_BYTE_LIMITS=E.WORKBOOK_BYTE_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.DOCUMENT_ID_ALPHABET=_.DOCUMENT_ID_ALPHABET;exports.DOCUMENT_ID_LENGTH=_.DOCUMENT_ID_LENGTH;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.groupDocumentId=_.groupDocumentId;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isCanonicalDocumentId=_.isCanonicalDocumentId;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerDocumentLang=_.isExplorerDocumentLang;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;exports.parseDocumentId=_.parseDocumentId;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index-AfEbgYQI.cjs"),e=require("./storage-BpYsprog.cjs"),E=require("./location-Csj3eAm_.cjs"),_=require("./ownUrls-BTPGNhBt.cjs");exports.DEFAULT_MARKDOWN_EXPLORER_LOCALE=L.DEFAULT_MARKDOWN_EXPLORER_LOCALE;exports.EXPLORER_HOST_CHANGE_POLICIES=L.EXPLORER_HOST_CHANGE_POLICIES;exports.EXPLORER_THEMES=L.EXPLORER_THEMES;exports.MARKDOWN_EXPLORER_LABEL_CATALOGS=L.MARKDOWN_EXPLORER_LABEL_CATALOGS;exports.MARKDOWN_EXPLORER_LABEL_KEYS=L.MARKDOWN_EXPLORER_LABEL_KEYS;exports.MARKDOWN_EXPLORER_LABEL_TEMPLATES=L.MARKDOWN_EXPLORER_LABEL_TEMPLATES;exports.MARKDOWN_EXPLORER_LOCALES=L.MARKDOWN_EXPLORER_LOCALES;exports.MarkdownExplorer=L.MarkdownExplorer;exports.draftAnswerOf=L.draftAnswerOf;exports.draftConversionOf=L.draftConversionOf;exports.resolveMarkdownExplorerLabels=L.resolveMarkdownExplorerLabels;exports.shouldRevalidateExplorer=L.shouldRevalidateExplorer;exports.clearExplorerStorage=e.clearExplorerStorage;exports.COLUMN_MIN_MEASURE=E.COLUMN_MIN_MEASURE;exports.DEFAULT_TREE_SETTINGS=E.DEFAULT_TREE_SETTINGS;exports.DEFAULT_VIEW_SLUGS=E.DEFAULT_VIEW_SLUGS;exports.EXPAND_ALL_DEPTH_LIMITS=E.EXPAND_ALL_DEPTH_LIMITS;exports.EXPAND_ALL_FOLDER_LIMITS=E.EXPAND_ALL_FOLDER_LIMITS;exports.EXPLORER_DEFAULT_PERCENT=E.EXPLORER_DEFAULT_PERCENT;exports.EXPLORER_MAX_PERCENT=E.EXPLORER_MAX_PERCENT;exports.EXPLORER_MIN_REM=E.EXPLORER_MIN_REM;exports.EXPLORER_MULTI_DEFAULT_PERCENT=E.EXPLORER_MULTI_DEFAULT_PERCENT;exports.GOLDEN_RATIO=E.GOLDEN_RATIO;exports.MULTI_VIEW_COLUMN_LIMITS=E.MULTI_VIEW_COLUMN_LIMITS;exports.MULTI_VIEW_PANEL_LIMITS=E.MULTI_VIEW_PANEL_LIMITS;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=E.REVEAL_DOCUMENT_DEPTH_LIMITS;exports.SPREADSHEET_BYTE_LIMITS=E.SPREADSHEET_BYTE_LIMITS;exports.WORKBOOK_BYTE_LIMITS=E.WORKBOOK_BYTE_LIMITS;exports.defineExplorerConfig=E.defineExplorerConfig;exports.explorerHref=E.explorerHref;exports.isExplorerSourceId=E.isExplorerSourceId;exports.resolveExplorerLocation=E.resolveExplorerLocation;exports.withExplorerSources=E.withExplorerSources;exports.DEFAULT_DENIED_PATH_SEGMENTS=_.DEFAULT_DENIED_PATH_SEGMENTS;exports.DOCUMENT_ID_ALPHABET=_.DOCUMENT_ID_ALPHABET;exports.DOCUMENT_ID_LENGTH=_.DOCUMENT_ID_LENGTH;exports.EXPLORER_EDIT_TOKEN_MAX_LENGTH=_.EXPLORER_EDIT_TOKEN_MAX_LENGTH;exports.EXPLORER_FAILURE_REASONS=_.EXPLORER_FAILURE_REASONS;exports.EXPLORER_MAX_HEADINGS=_.EXPLORER_MAX_HEADINGS;exports.MAX_DOCUMENT_PATH_LENGTH=_.MAX_DOCUMENT_PATH_LENGTH;exports.failureDocument=_.failureDocument;exports.failureOf=_.failureOf;exports.groupDocumentId=_.groupDocumentId;exports.isAcceptableDocumentPath=_.isAcceptableDocumentPath;exports.isCanonicalDocumentId=_.isCanonicalDocumentId;exports.isDeniedPath=_.isDeniedPath;exports.isExplorerChildrenResult=_.isExplorerChildrenResult;exports.isExplorerDocumentLang=_.isExplorerDocumentLang;exports.isExplorerFailureCode=_.isExplorerFailureCode;exports.isExplorerFailureReason=_.isExplorerFailureReason;exports.parseDocumentId=_.parseDocumentId;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { ak as _, al as s, am as L, an as e, ao as r, ap as R, aq as T, ar as o, as as A, at as O, au as I, av as D } from "./index-C52Nj37x.js";
1
+ import { ak as _, al as s, am as L, an as e, ao as r, ap as R, aq as T, ar as o, as as A, at as O, au as I, av as D } from "./index-CWFyLa0N.js";
2
2
  import { c as N } from "./storage-D1uSw-xj.js";
3
- import { a0 as S, a1 as l, a2 as i, a3 as n, a4 as p, I as t, H as X, a5 as C, J as U, R as x, a6 as u, a7 as c, a8 as d, a9 as f, aa as H, ab as m, e as F, i as G, h as K, w as W } from "./location-CJvL6JNs.js";
4
- import { D as B, ac as g, ad as v, ae as w, af as b, E as k, M as V, g as Y, k as j, Y as q, i as J, K as y, a as z, a2 as Q, b as Z, j as $, h as EE, T as aE } from "./ownUrls-DD0cSCsF.js";
3
+ import { $ as S, a0 as l, a1 as i, a2 as n, a3 as p, H as t, G as X, a4 as C, I as U, Q as x, a5 as u, a6 as c, a7 as d, a8 as f, a9 as H, aa as m, e as G, i as F, h as K, w as W } from "./location-DFfbnUZ9.js";
4
+ import { D as B, ac as g, ad as v, ae as w, af as k, E as V, M as Y, g as b, k as j, Y as q, i as Q, K as $, a as y, a2 as z, b as J, j as Z, h as EE, T as aE } from "./ownUrls-DD0cSCsF.js";
5
5
  export {
6
6
  S as COLUMN_MIN_MEASURE,
7
7
  B as DEFAULT_DENIED_PATH_SEGMENTS,
@@ -14,9 +14,9 @@ export {
14
14
  p as EXPAND_ALL_FOLDER_LIMITS,
15
15
  t as EXPLORER_DEFAULT_PERCENT,
16
16
  w as EXPLORER_EDIT_TOKEN_MAX_LENGTH,
17
- b as EXPLORER_FAILURE_REASONS,
17
+ k as EXPLORER_FAILURE_REASONS,
18
18
  s as EXPLORER_HOST_CHANGE_POLICIES,
19
- k as EXPLORER_MAX_HEADINGS,
19
+ V as EXPLORER_MAX_HEADINGS,
20
20
  X as EXPLORER_MAX_PERCENT,
21
21
  C as EXPLORER_MIN_REM,
22
22
  U as EXPLORER_MULTI_DEFAULT_PERCENT,
@@ -26,7 +26,7 @@ export {
26
26
  r as MARKDOWN_EXPLORER_LABEL_KEYS,
27
27
  R as MARKDOWN_EXPLORER_LABEL_TEMPLATES,
28
28
  T as MARKDOWN_EXPLORER_LOCALES,
29
- V as MAX_DOCUMENT_PATH_LENGTH,
29
+ Y as MAX_DOCUMENT_PATH_LENGTH,
30
30
  u as MULTI_VIEW_COLUMN_LIMITS,
31
31
  c as MULTI_VIEW_PANEL_LIMITS,
32
32
  o as MarkdownExplorer,
@@ -37,18 +37,18 @@ export {
37
37
  m as defineExplorerConfig,
38
38
  A as draftAnswerOf,
39
39
  O as draftConversionOf,
40
- F as explorerHref,
41
- Y as failureDocument,
40
+ G as explorerHref,
41
+ b as failureDocument,
42
42
  j as failureOf,
43
43
  q as groupDocumentId,
44
- J as isAcceptableDocumentPath,
45
- y as isCanonicalDocumentId,
46
- z as isDeniedPath,
47
- Q as isExplorerChildrenResult,
48
- Z as isExplorerDocumentLang,
49
- $ as isExplorerFailureCode,
44
+ Q as isAcceptableDocumentPath,
45
+ $ as isCanonicalDocumentId,
46
+ y as isDeniedPath,
47
+ z as isExplorerChildrenResult,
48
+ J as isExplorerDocumentLang,
49
+ Z as isExplorerFailureCode,
50
50
  EE as isExplorerFailureReason,
51
- G as isExplorerSourceId,
51
+ F as isExplorerSourceId,
52
52
  aE as parseDocumentId,
53
53
  K as resolveExplorerLocation,
54
54
  I as resolveMarkdownExplorerLabels,
@@ -0,0 +1 @@
1
+ "use strict";const L=require("@aiquants/markdown/embeds"),T=require("@aiquants/markdown/viewer-settings"),h=require("./ownUrls-BTPGNhBt.cjs"),i=require("./describeValue-Ccvhbt36.cjs"),Je=Object.freeze(["UTF-8","IBM866","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-8-I","ISO-8859-10","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","KOI8-R","KOI8-U","macintosh","windows-874","windows-1250","windows-1251","windows-1252","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-1258","x-mac-cyrillic","GBK","gb18030","Big5","EUC-JP","ISO-2022-JP","Shift_JIS","EUC-KR","replacement","UTF-16BE","UTF-16LE","x-user-defined"]),Ze=new Map(Je.map(e=>[e.toLowerCase(),e])),$="UTF-8",ae=Object.freeze([Object.freeze({bytes:Object.freeze([239,187,191]),encoding:$}),Object.freeze({bytes:Object.freeze([255,254]),encoding:"UTF-16LE"}),Object.freeze({bytes:Object.freeze([254,255]),encoding:"UTF-16BE"})]),Qe=new Map([[$,"is read before any legacy encoding"],["UTF-16LE","is read only by its byte order mark"],["UTF-16BE","is read only by its byte order mark"],["ISO-2022-JP","writes only bytes below 0x80, which UTF-8 always reads first, so it would never be used"],["x-user-defined","is no text encoding (it maps bytes to private-use characters)"]]),Q=e=>{let r;try{r=new TextDecoder(e).encoding}catch(o){throw o instanceof RangeError?new RangeError(`[markdown-explorer] legacyTextEncoding ${i.describeValue(e)} is no encoding label TextDecoder knows (for example "Shift_JIS" or "windows-1252")`):o}const t=er(r),n=Qe.get(t);if(n!==void 0)throw new RangeError(`[markdown-explorer] legacyTextEncoding ${i.describeValue(e)} names ${t}, which cannot be the legacy encoding: it ${n}`);return t},er=e=>{const r=Ze.get(e);if(r===void 0)throw new RangeError(`[markdown-explorer] TextDecoder answered ${i.describeValue(e)}, which is no encoding of the WHATWG Encoding Standard`);return r},V=(e,r,t)=>{const n=t===null?null:Q(t),o=ae.find(({bytes:a})=>a.every((d,l)=>e[l]===d));if(o!==void 0)return{body:e.subarray(o.bytes.length),encodings:[o.encoding]};const s=r||e.length===0?void 0:ae.find(({bytes:a})=>e.length<a.length&&e.every((d,l)=>a[l]===d));return s!==void 0?{body:e.subarray(e.length),encodings:[s.encoding]}:{body:e,encodings:n===null?[$]:[$,n]}},rr=(e,r,t)=>V(e,r,t).encodings,tr=(e,r,t)=>{try{return new TextDecoder(e,{fatal:!0,ignoreBOM:!0}).decode(r,{stream:!t})}catch(n){if(n instanceof TypeError)return null;throw n}},nr=(e,r,t)=>{const n=ee(V(e,r,t),r);return n===null?null:n.text},ee=({body:e,encodings:r},t)=>{for(const n of r){const o=tr(n,e,t);if(o!==null)return{encoding:n,text:o}}return null},or=(e,r,t)=>{const n=V(e,r,t),o=ee(n,r);return o===null?n.encodings[0]:o.encoding},ir=(e,r,t)=>{const n=V(e,r,t),o=ee(n,r);return o!==null?o.text:new TextDecoder(n.encodings[0],{ignoreBOM:!0}).decode(n.body,{stream:!r})},N=new Intl.Collator("en",{numeric:!0,sensitivity:"variant"}),sr=/^readme(?:\.|$)/iu,de=/^readme(?:\.[^.]*)?$/iu,le=Object.freeze(["md","markdown","mdx","txt",""]),ar=e=>sr.test(e),X=e=>e.type==="file"&&ar(e.name),ce=e=>{const r=e.lastIndexOf("."),t=le.indexOf(r<0?"":e.slice(r+1).toLowerCase());return t<0?le.length:t},dr=(e,r)=>{const t=+!de.test(e.name)-+!de.test(r.name);if(t!==0)return t;const n=ce(e.name)-ce(r.name);if(n!==0)return n;const o=N.compare(e.name,r.name);return o!==0?o:N.compare(e.path,r.path)},lr=e=>{let r=null;for(const t of e)X(t)&&(r===null||dr(t,r)<0)&&(r=t);return r===null?null:r.path},W=Object.freeze({sortMode:"native",folderPlacement:"mixed",readmePlacement:"mixed",selectionMode:"single",doubleClickAction:"recursive",expandIconSize:8,alwaysExpanded:!1,revealDocument:!1,showFolderReadme:!0,removeRootIndent:!1,lines:!0,expandIcons:!0,directoryIcons:!0,fileIcons:!0}),he=[!0,!1],pe=(e,r)=>r?e.settingOn:e.settingOff,y=(e,r)=>({key:e,labelKey:r,values:he,formatValue:pe,requiresTreeView:!1}),cr=Object.freeze({native:e=>e.sortNative,asc:e=>e.sortAscending,desc:e=>e.sortDescending,oldest:e=>e.sortOldest,newest:e=>e.sortNewest}),R=Object.freeze([{key:"sortMode",labelKey:"settingSortMode",values:["native","asc","desc","oldest","newest"],formatValue:(e,r)=>cr[r](e),requiresTreeView:!1},{key:"folderPlacement",labelKey:"settingFolderPlacement",values:["mixed","first","last"],formatValue:(e,r)=>r==="mixed"?e.folderPlacementMixed:r==="first"?e.folderPlacementFirst:e.folderPlacementLast,requiresTreeView:!1},{key:"readmePlacement",labelKey:"settingReadmePlacement",values:["mixed","first","last"],formatValue:(e,r)=>r==="mixed"?e.readmePlacementMixed:r==="first"?e.readmePlacementFirst:e.readmePlacementLast,requiresTreeView:!1},{key:"selectionMode",labelKey:"settingSelectionMode",values:["single","multiple","none"],formatValue:(e,r)=>r==="single"?e.selectionSingle:r==="multiple"?e.selectionMultiple:e.selectionNone,requiresTreeView:!0},{key:"doubleClickAction",labelKey:"settingDoubleClick",values:["recursive","toggle"],formatValue:(e,r)=>r==="recursive"?e.doubleClickRecursive:e.doubleClickToggle,requiresTreeView:!1},{key:"expandIconSize",labelKey:"settingExpandIconSize",values:[8,13,5],formatValue:(e,r)=>e.expandIconSizeValue(r),requiresTreeView:!1},y("alwaysExpanded","settingAlwaysExpanded"),y("revealDocument","settingRevealDocument"),{key:"showFolderReadme",labelKey:"settingShowFolderReadme",values:he,formatValue:pe,requiresTreeView:!0},y("removeRootIndent","settingRemoveRootIndent"),y("lines","settingTreeLines"),y("expandIcons","settingExpandIcons"),y("directoryIcons","settingDirectoryIcons"),y("fileIcons","settingFileIcons")]),ur=e=>e==="tree"?R:R.filter(r=>!r.requiresTreeView),be=e=>{const r=R.find(t=>t.key===e);if(r===void 0)throw new RangeError(`[markdown-explorer] no tree setting descriptor for ${e}`);return r},mr=(e,r)=>{const t=be(r).values,n=t[(t.indexOf(e[r])+1)%t.length];return{...e,[r]:n}},fr=(e,r,t)=>be(t).formatValue(e,r[t]),xe=2,H=Object.freeze({}),re=(e,r)=>Object.freeze(Object.fromEntries(R.filter(t=>r(t,e[t.key])).map(t=>[t.key,e[t.key]]))),ue="directoriesFirst",wr=e=>{if(!Object.hasOwn(e,ue))return e;const{[ue]:r,...t}=e;return Object.hasOwn(t,"folderPlacement")||typeof r!="boolean"?t:{...t,folderPlacement:r?"first":"mixed"}},gr=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return H;const r=e;return r.version!==xe||r.settings===null||typeof r.settings!="object"||Array.isArray(r.settings)?H:re(wr(r.settings),(t,n)=>t.values.includes(n))},Er=(e,r)=>{const t=re(r,(n,o)=>o!==void 0&&o!==e[n.key]);return Object.keys(t).length===0?e:Object.freeze({...e,...t})},hr=(e,r,t,n)=>re({...e,[r]:t},(o,s)=>s!==void 0&&!(o.key===r&&s===n[r])),pr=e=>JSON.stringify({version:xe,settings:e}),br=(e,r,t)=>e===void 0||r===void 0?e===r?0:e===void 0?1:-1:t*(e-r),xr=e=>{const{sortMode:r,folderPlacement:t,readmePlacement:n}=e;if(r==="native"&&t==="mixed"&&n==="mixed")return;const o=(s,a)=>{const d=N.compare(s.name,a.name);return d!==0?d:N.compare(s.path,a.path)};return(s,a)=>{if(t!=="mixed"&&s.type!==a.type)return s.type==="directory"==(t==="first")?-1:1;if(n!=="mixed"){const l=X(s);if(l!==X(a))return l===(n==="first")?-1:1}if(r==="native")return 0;if(r==="asc")return o(s,a);if(r==="desc")return-o(s,a);const d=br(s.modifiedAt,a.modifiedAt,r==="oldest"?1:-1);return d!==0?d:o(s,a)}},x=(1+Math.sqrt(5))/2,Sr=100/x**3,Or=100/x**4,te=100/x**2,Se=13,Tr=16,yr=Object.freeze({gripThickness:5,gripLength:34,barThickness:2,barLength:21}),K=Object.freeze([1,2,3,5,8,13,21,34,55]),_r=Object.freeze([89,144,233,377]),ne=44,Ir=ne;2*K[3]+ne+K[0];const Rr=1/x,kr=1/x**3,Pr="40ch",Ar=e=>{if(!Number.isFinite(e)||e<=0)throw new RangeError(`[markdown-explorer] rootFontPixels must be a finite number > 0; got ${i.describeValue(e)}`)},Oe=e=>(Ar(e),Se*e),Lr=e=>Oe(e)*x**2,Nr=233,vr=50,Te=100/x**3,Dr=100-Te,$r=_r[0],S=(e,r)=>{if(!Number.isFinite(r)||r<0)throw new RangeError(`[markdown-explorer] ${e} must be a finite number >= 0; got ${i.describeValue(r)}`)},Cr=({trackInlineSize:e,gap:r,minColumnInlineSize:t,logicalColumns:n})=>{if(S("trackInlineSize",e),S("gap",r),!Number.isFinite(t)||t<=0)throw new RangeError(`[markdown-explorer] minColumnInlineSize must be a finite number > 0; got ${i.describeValue(t)}`);if(!Number.isInteger(n)||n<1)throw new RangeError(`[markdown-explorer] logicalColumns must be a positive integer; got ${i.describeValue(n)}`);const o=Math.floor((e+r)/(t+r));return Math.min(n,Math.max(1,o))},Mr=(e,r)=>{const{trackInlineSize:t,gap:n,minColumnInlineSize:o,logicalColumns:s}=r;if(!([t,n,o].every(Number.isFinite)&&t>0&&n>=0&&o>0))return e;const d=Cr(r);if(e===null||d===e)return d;const l=Math.min(s,Math.max(1,e));if(d>l){const w=(l+1)*o+l*n+n/x;return t>=w?d:l}return t>=l*o+(l-1)*n?l:d},Vr=(e,r)=>{if(!(Number.isInteger(e)&&Number.isInteger(r))||r<1||r>e)throw new RangeError(`[markdown-explorer] visible columns must be an integer in 1..${String(e)}; got ${i.describeValue(r)}`);return Array.from({length:r},(t,n)=>[Math.floor(n*e/r),Math.floor((n+1)*e/r)])},zr=(e,r,t)=>{if(S("surfaceInlineSize",e),S("handlePixels",t),!Number.isFinite(r)||r<=0)throw new RangeError(`[markdown-explorer] measure must be a finite number > 0; got ${i.describeValue(r)}`);return e>=2*r+t?"beside":"stacked"},G=(e,r,t)=>Math.max(r,Math.min(e,t)),me=(e,r,t,n)=>{const o=(G(e,0,t)+G(r,0,t))/2;return G(o-n/2,0,t-n)},jr=(e,r,t)=>{for(const[n,o]of Object.entries(e))if(!Number.isFinite(o))throw new RangeError(`[markdown-explorer] anchor.${n} must be a finite number; got ${i.describeValue(o)}`);return S("marginBox.width",r.width),S("marginBox.height",r.height),S("viewport.width",t.width),S("viewport.height",t.height),{left:me(e.left,e.right,t.width,r.width),top:me(e.top,e.bottom,t.height,r.height)}},Fr=31536e3,Ur=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/u,Br=e=>{if(typeof e!="string"||!Ur.test(e))throw new RangeError(`[markdown-explorer] settingsCookie must be a cookie-name token; got ${i.describeValue(e)}`)},fe=e=>typeof e=="number"&&Number.isFinite(e)&&e>0&&e<=te,D=(e,r)=>typeof r=="string"&&e.includes(r),Gr=(e,r)=>{if(e===null||typeof e!="object"||Array.isArray(e))return{};const t=e,{treeExplorer:n,treeExplorerHidden:o,multiExplorer:s,multiExplorerHidden:a,style:d,align:l,measure:m,documentColors:w}=t;return{...fe(n)?{treeExplorer:n}:{},...o===!0?{treeExplorerHidden:o}:{},...fe(s)?{multiExplorer:s}:{},...a===!0?{multiExplorerHidden:a}:{},...D(r,d)?{style:d}:{},...D(T.CONTENT_ALIGNS,l)?{align:l}:{},...D(T.CONTENT_MEASURES,m)?{measure:m}:{},...D(T.CONTENT_COLORS,w)?{documentColors:w}:{}}},Xr=(e,r)=>{if(e!==null)for(const t of e.split(";")){const n=t.indexOf("=");if(!(n<0)&&t.slice(0,n).trim()===r)return t.slice(n+1).trim()}},Wr=(e,r)=>{if(e===void 0||e==="")return{};try{return Gr(JSON.parse(decodeURIComponent(e)),r)}catch{return{}}},C=100,Hr=Math.floor(te*C)/C,ye=e=>{const r=t=>Math.min(Hr,Math.max(1,Math.round(t*C))/C);return encodeURIComponent(JSON.stringify({...e.treeExplorer===void 0?{}:{treeExplorer:r(e.treeExplorer)},...e.treeExplorerHidden===!0?{treeExplorerHidden:!0}:{},...e.multiExplorer===void 0?{}:{multiExplorer:r(e.multiExplorer)},...e.multiExplorerHidden===!0?{multiExplorerHidden:!0}:{},...e.style===void 0?{}:{style:e.style},...e.align===void 0?{}:{align:e.align},...e.measure===void 0?{}:{measure:e.measure},...e.documentColors===void 0?{}:{documentColors:e.documentColors}}))},Kr=(e,r,t)=>`${e}=${ye(r)}; Path=/; Max-Age=${String(Fr)}; SameSite=Lax${t?"; Secure":""}`,_e=["ctrl","shift"],qr=e=>typeof e=="string"&&_e.includes(e),q=Object.freeze({tree:"tree",multi:"multi",single:"single"}),Ie=Object.freeze({default:12,min:1,max:64}),Re=Object.freeze({default:4,min:1,max:6}),ke=Object.freeze({default:500,min:1,max:1e4}),Pe=Object.freeze({default:16,min:1,max:64}),Ae=Object.freeze({default:16,min:1,max:64}),Le=Object.freeze({default:2*1024*1024,min:1,max:256*1024*1024}),Ne=Object.freeze({default:8*1024*1024,min:1,max:256*1024*1024}),ve=/^[A-Za-z0-9][A-Za-z0-9_-]*$/u,Yr=/^[a-z0-9][a-z0-9-]*$/u,Jr=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/u,Y=(e,r)=>{if(typeof r!="string")throw new TypeError(`[markdown-explorer] ${e} must be a string; got ${i.describeValue(r)}`);if(!h.isMountPath(r))throw new RangeError(`[markdown-explorer] ${e} must start with "/", have no trailing "/", use only letters, digits and "._~-" in each segment, and have no "." or ".." segment; got ${i.describeValue(r)}`)},we=Object.freeze(Object.keys({basePath:!0,dataPath:!0,settingsCookie:!0,views:!0,documentIds:!0,multiView:!0,expandAll:!0,revealDocument:!0,documentStyles:!0,defaultDocumentStyle:!0,mermaidModifier:!0,documentFontFamily:!0,iframeHosts:!0,appOrigins:!0,mediaDataPath:!0,embeds:!0,defaultTreeSettings:!0,legacyTextEncoding:!0,spreadsheets:!0})),O=(e,r,t)=>{if(r===void 0)return[];if(!i.isPlainObject(r))throw new TypeError(`[markdown-explorer] ${e} must be a plain object; got ${i.describeValue(r)}`);const n=Object.entries(r);for(const[o]of n)if(!t.includes(o))throw new RangeError(`[markdown-explorer] ${e}.${o} is not an option; expected ${t.join(", ")}`);return n.filter(([,o])=>o!==void 0)},Zr=e=>{const r={...q};for(const[t,n]of O("views",e,Object.keys(q)))r[t]=n;for(const[t,n]of Object.entries(r))if(typeof n!="string"||!ve.test(n))throw new RangeError(`[markdown-explorer] views.${t} must start with a letter or digit and use only letters, digits, "_" and "-"; got ${i.describeValue(n)}`);return Object.freeze(r)},Qr=e=>{if(e===void 0)return null;const r=O("documentIds",e,["slug"]).find(([t])=>t==="slug")?.[1];if(typeof r!="string"||!ve.test(r))throw new RangeError(`[markdown-explorer] documentIds.slug must start with a letter or digit and use only letters, digits, "_" and "-"; got ${i.describeValue(r)}`);return Object.freeze({slug:r})},_=(e,r,t)=>{if(r===void 0)return t.default;if(typeof r!="number"||!Number.isInteger(r)||r<t.min||r>t.max)throw new RangeError(`[markdown-explorer] ${e} must be an integer in ${String(t.min)}..${String(t.max)}; got ${i.describeValue(r)}`);return r},et=(e,r)=>{const t=new Map(O("embeds",e,["providers","linkCards","linkCardSize"]));if(t.size===0)return L.NO_EMBEDS;const n=t.has("providers")?t.get("providers"):[];if(!Array.isArray(n))throw new RangeError(`[markdown-explorer] embeds.providers must be an array of provider ids; got ${i.describeValue(n)}`);for(const d of n)if(!L.isEmbedProviderId(d))throw new RangeError(`[markdown-explorer] embeds.providers must hold only ${L.EMBED_PROVIDER_IDS.join(", ")}; got ${i.describeValue(d)}`);const o=t.has("linkCards")?t.get("linkCards"):!1;if(typeof o!="boolean")throw new RangeError(`[markdown-explorer] embeds.linkCards must be a boolean; got ${i.describeValue(o)}`);const s={providers:Object.freeze([...new Set(n)]),linkCardEndpoint:o?h.explorerLinkCardEndpoint(r):null};if(!t.has("linkCardSize"))return Object.freeze(s);const a=t.get("linkCardSize");if(!L.isLinkCardSize(a))throw new RangeError(`[markdown-explorer] embeds.linkCardSize must be one of ${L.LINK_CARD_SIZES.join(", ")}; got ${i.describeValue(a)}`);if(!o)throw new RangeError(`[markdown-explorer] embeds.linkCardSize needs embeds.linkCards: true; got linkCardSize ${i.describeValue(a)} with linkCards ${i.describeValue(o)}`);return Object.freeze({...s,linkCardSize:a})},rt=e=>{if(e===void 0)return null;if(typeof e!="string")throw new TypeError(`[markdown-explorer] legacyTextEncoding must be a string; got ${i.describeValue(e)}`);return Q(e)},tt=e=>{if(e===void 0)return Object.freeze([]);if(!Array.isArray(e))throw new TypeError(`[markdown-explorer] appOrigins must be an array of origins; got ${i.describeValue(e)}`);for(const[r,t]of e.entries()){if(typeof t!="string")throw new TypeError(`[markdown-explorer] appOrigins[${String(r)}] must be a string; got ${i.describeValue(t)}`);if(!h.isBrowserOrigin(t))throw new RangeError(`[markdown-explorer] appOrigins[${String(r)}] must be an origin as the browser writes it (scheme://host[:port], without a default port, path, query, fragment or user info); got ${i.describeValue(t)}`)}return Object.freeze([...new Set(e)])},nt=e=>{if(e===void 0)return null;if(typeof e!="string")throw new TypeError(`[markdown-explorer] mediaDataPath must be a string; got ${i.describeValue(e)}`);if(!h.isMediaDataUrl(e))throw new RangeError(`[markdown-explorer] mediaDataPath must be an absolute http: or https: URL as the browser writes it, of an origin and a path that starts with "/", has no trailing "/", uses only letters, digits and "._~-" in each segment and has no "." or ".." segment, without a query, fragment or user info; got ${i.describeValue(e)}`);return e},ot=e=>{const r=new Map(O("defaultTreeSettings",e,R.map(n=>n.key)));if(r.size===0)return W;const t={...W};for(const n of R){if(!r.has(n.key))continue;const o=r.get(n.key),s=n.values;if(!s.includes(o))throw new RangeError(`[markdown-explorer] defaultTreeSettings.${n.key} must be one of ${s.map(i.describeValue).join(", ")}; got ${i.describeValue(o)}`);t[n.key]=o}return Object.freeze(t)},De=e=>{if(e===null||typeof e!="object")throw new TypeError("[markdown-explorer] the explorer configuration must be an object");for(const c of Object.keys(e))if(!we.includes(c))throw new RangeError(`[markdown-explorer] ${c} is not an option of the explorer configuration; expected ${we.join(", ")}`);Y("basePath",e.basePath),Y("dataPath",e.dataPath);const r=Zr(e.views);if(new Set([r.tree,r.multi,r.single]).size!==3)throw new RangeError(`[markdown-explorer] the view slugs must differ; got tree ${i.describeValue(r.tree)}, multi ${i.describeValue(r.multi)} and single ${i.describeValue(r.single)}`);const t=Qr(e.documentIds);if(t!==null&&[r.tree,r.multi,r.single].includes(t.slug))throw new RangeError(`[markdown-explorer] documentIds.slug must differ from the view slugs; got ${i.describeValue(t.slug)}`);if(e.dataPath===e.basePath)throw new RangeError("[markdown-explorer] dataPath must differ from basePath");if(e.dataPath.startsWith(`${e.basePath}/`)){const c=e.dataPath.slice(e.basePath.length+1).split("/")[0];if(c===r.tree||c===r.multi||c===r.single||c===t?.slug)throw new RangeError(`[markdown-explorer] dataPath must not start with a view slug or documentIds.slug under basePath; got ${i.describeValue(e.dataPath)}`)}Br(e.settingsCookie);const n=e.iframeHosts??[];if(!Array.isArray(n))throw new RangeError(`[markdown-explorer] iframeHosts must be an array of lowercase host names without scheme, port or path; got ${i.describeValue(n)}`);for(const[c,E]of n.entries())if(typeof E!="string"||!Jr.test(E))throw new RangeError(`[markdown-explorer] iframeHosts[${String(c)}] must be a lowercase host name without scheme, port or path; got ${i.describeValue(E)}`);const o=Object.fromEntries(O("multiView",e.multiView,["maxPanels","columns"])),s=Object.fromEntries(O("expandAll",e.expandAll,["maxFolders","maxDepth"])),a=Object.fromEntries(O("revealDocument",e.revealDocument,["maxDepth"])),d=Object.fromEntries(O("spreadsheets",e.spreadsheets,["maxBytes","maxWorkbookBytes"])),l=e.documentStyles??T.DEFAULT_MARKDOWN_STYLES;if(!Array.isArray(l)||l.length===0)throw new RangeError("[markdown-explorer] documentStyles must be a non-empty array");const m=new Set;for(const c of l){if(c===null||typeof c!="object"||typeof c.name!="string"||c.name.trim()===""||typeof c.className!="string")throw new RangeError("[markdown-explorer] each document style needs a non-blank name and a className string");if(m.has(c.name))throw new RangeError(`[markdown-explorer] document style names must be unique; ${i.describeValue(c.name)} repeats`);m.add(c.name)}const w=e.defaultDocumentStyle===void 0?T.DEFAULT_MARKDOWN_STYLE:e.defaultDocumentStyle;if(typeof w!="string")throw new TypeError(`[markdown-explorer] defaultDocumentStyle must be a string; got ${i.describeValue(w)}`);if(!m.has(w)){const c=e.defaultDocumentStyle===void 0?" (the default, DEFAULT_MARKDOWN_STYLE; name one of documentStyles)":"";throw new RangeError(`[markdown-explorer] defaultDocumentStyle must name a configured document style (${[...m].map(i.describeValue).join(", ")}); got ${i.describeValue(w)}${c}`)}const f=e.mermaidModifier;if(f!==void 0&&!qr(f))throw new RangeError(`[markdown-explorer] mermaidModifier must be one of ${_e.map(i.describeValue).join(", ")}; got ${i.describeValue(f)}`);const g=e.documentFontFamily;if(g!==void 0){if(typeof g!="string")throw new TypeError(`[markdown-explorer] documentFontFamily must be a string; got ${i.describeValue(g)}`);if(g.trim()==="")throw new RangeError("[markdown-explorer] documentFontFamily must not be blank; omit it for the display style's font")}return Object.freeze({basePath:e.basePath,dataPath:e.dataPath,settingsCookie:e.settingsCookie,views:r,documentIds:t,multiView:Object.freeze({maxPanels:_("multiView.maxPanels",o.maxPanels,Ie),columns:_("multiView.columns",o.columns,Re)}),expandAll:Object.freeze({maxFolders:_("expandAll.maxFolders",s.maxFolders,ke),maxDepth:_("expandAll.maxDepth",s.maxDepth,Pe)}),revealDocument:Object.freeze({maxDepth:_("revealDocument.maxDepth",a.maxDepth,Ae)}),documentStyles:Object.freeze(l.map(c=>Object.freeze({name:c.name,className:c.className}))),defaultDocumentStyle:w,mermaidModifier:f,documentFontFamily:g,iframeHosts:Object.freeze([...new Set(n)]),appOrigins:tt(e.appOrigins),mediaDataPath:nt(e.mediaDataPath),embeds:et(e.embeds,e.dataPath),defaultTreeSettings:ot(e.defaultTreeSettings),legacyTextEncoding:rt(e.legacyTextEncoding),spreadsheets:Object.freeze({maxBytes:_("spreadsheets.maxBytes",d.maxBytes,Le),maxWorkbookBytes:_("spreadsheets.maxWorkbookBytes",d.maxWorkbookBytes,Ne)})})},it=e=>{const r=e.embeds;if(!i.isPlainObject(r))throw new TypeError(`[markdown-explorer] config.embeds must be the embeds defineExplorerConfig resolved; got ${i.describeValue(r)}`);if(Object.hasOwn(r,"linkCards"))throw new RangeError(`[markdown-explorer] config.embeds.linkCards is an option of defineExplorerConfig, not a key of the embeds it resolves; pass the option to defineExplorerConfig (got linkCards ${i.describeValue(r.linkCards)})`);const t=e.legacyTextEncoding;if(t!==null&&typeof t!="string")throw new TypeError(`[markdown-explorer] config.legacyTextEncoding must be the encoding defineExplorerConfig resolved, or null; got ${i.describeValue(t)}`);const n=e.mediaDataPath;if(n!==null&&typeof n!="string")throw new TypeError(`[markdown-explorer] config.mediaDataPath must be the URL defineExplorerConfig resolved, or null; got ${i.describeValue(n)}`);const o=e.documentIds;if(o!==null&&!i.isPlainObject(o))throw new TypeError(`[markdown-explorer] config.documentIds must be the segment defineExplorerConfig resolved, or null; got ${i.describeValue(o)}`);const{linkCardEndpoint:s,...a}=r,d=De({...e,embeds:{...a,linkCards:s!==null},legacyTextEncoding:t===null?void 0:t,mediaDataPath:n===null?void 0:n,documentIds:o===null?void 0:o});if(d.embeds.linkCardEndpoint!==s)throw new RangeError(`[markdown-explorer] config.embeds.linkCardEndpoint must be ${i.describeValue(d.embeds.linkCardEndpoint)} (the data route's link-card path) or null; got ${i.describeValue(s)}`);if(d.legacyTextEncoding!==t)throw new RangeError(`[markdown-explorer] config.legacyTextEncoding must be ${i.describeValue(d.legacyTextEncoding)} (the written name of the encoding it names); got ${i.describeValue(t)}`);const l=e;for(const[m,w]of Object.entries(d)){const f=J(l[m],w,m);if(f!==null)throw f.kind==="extra"?new RangeError(`[markdown-explorer] config.${f.path} is not a key of what defineExplorerConfig resolves; got ${i.describeValue(f.given)} there`):new RangeError(`[markdown-explorer] config.${f.path} must be what defineExplorerConfig resolves; got ${i.describeValue(f.given)} where it resolves ${i.describeValue(f.resolved)}`)}return d},J=(e,r,t)=>{if(Object.is(e,r))return null;if(Array.isArray(r)){if(!Array.isArray(e))return{kind:"value",path:t,given:e,resolved:r};if(e.length!==r.length)return{kind:"value",path:`${t}.length`,given:e.length,resolved:r.length};for(const[o,s]of r.entries()){const a=J(e[o],s,`${t}[${String(o)}]`);if(a!==null)return a}return null}if(!(i.isPlainObject(r)&&i.isPlainObject(e)))return{kind:"value",path:t,given:e,resolved:r};for(const o of Object.keys(r)){const s=J(Object.hasOwn(e,o)?e[o]:void 0,r[o],`${t}.${o}`);if(s!==null)return s}const n=Object.keys(e).find(o=>!Object.hasOwn(r,o));return n===void 0?null:{kind:"extra",path:`${t}.${n}`,given:e[n]}},$e=e=>typeof e=="string"&&Yr.test(e),st=(e,r)=>{if(e===null||typeof e!="object")throw new TypeError(`[markdown-explorer] withExplorerSources needs the configuration of defineExplorerConfig; got ${i.describeValue(e)}`);if(!Array.isArray(r)||r.length===0)throw new RangeError(`[markdown-explorer] sourceIds must be a non-empty array; got ${i.describeValue(r)}`);const t=new Set;for(const[n,o]of r.entries()){if(!$e(o))throw new RangeError(`[markdown-explorer] each source id must use lowercase letters, digits and "-" and start with a letter or digit; got ${i.describeValue(o)}`);if(t.has(o))throw new RangeError(`[markdown-explorer] source ids must be unique; ${i.describeValue(o)} repeats at sourceIds[${String(n)}]`);t.add(o)}return Object.freeze({...e,sourceIds:Object.freeze([...r])})},at=e=>e.documentStyles.map(r=>r.name),dt=e=>Object.freeze({origins:e.appOrigins,resources:Object.freeze([e.dataPath]),links:Object.freeze([e.basePath,e.dataPath]),media:Object.freeze(e.mediaDataPath===null?[]:[e.mediaDataPath])}),u=Object.freeze({source:"source",doc:"doc",maximized:"maximized",style:"style",align:"align",showToc:"showToc",showStyle:"showStyle",showAlign:"showAlign",padding:"padding",width:"width",maxWidth:"maxWidth",markup:"markup"}),Ce="true",Me="true",M="/",ge=".data",Ve=256,ze=/^\d+(?:\.\d+)?$/u,Z=/^\d+(?:\.\d+)?(?:px|rem|em|ch|vw|%)$/u,je=Object.freeze(["showToc","showStyle","showAlign"]),Ee=e=>{const r=encodeURIComponent(e.replaceAll("%","%25"));return r.endsWith(ge)?`${r.slice(0,-ge.length)}%2Edata`:r},lt=e=>e.replaceAll("%25","%"),Fe=e=>{const{sourceIds:r}=e;if(r===void 0)throw new TypeError("[markdown-explorer] the configuration has no source ids; join the server's sources with withExplorerSources(config, sourceIds)");return r},ct=(e,r,t)=>{const n=t.getAll(u.source);if(n.length===0)return r;const[o]=n;return n.length>1||o===void 0||o===r||!e.includes(o)?null:o},Ue=(e,r)=>{const t=r.get(u.style),n=r.get(u.align);return{...t!==null&&e.documentStyles.some(o=>o.name===t)?{style:t}:{},...n!==null&&T.CONTENT_ALIGNS.includes(n)?{align:n}:{}}},Be=e=>Number.isFinite(e)&&e>=0&&e<=Ve&&ze.test(String(e)),Ge=e=>{const r=e.get(u.padding),t=r!==null&&ze.test(r)?Number(r):Number.NaN,n=e.get(u.width),o=e.get(u.maxWidth);return{...e.get(u.showToc)==="false"?{showToc:!1}:{},...e.get(u.showStyle)==="false"?{showStyle:!1}:{},...e.get(u.showAlign)==="false"?{showAlign:!1}:{},...Be(t)?{padding:t}:{},...n!==null&&Z.test(n)?{width:n}:{},...o!==null&&Z.test(o)?{maxWidth:o}:{}}},Xe=(e,r)=>[...new Set(r.filter(h.isAcceptableDocumentPath))].slice(0,e.multiView.maxPanels),ut=(e,r,t,n)=>{for(const s of r)oe(s);if(new Set(r).size!==r.length)throw new RangeError(`[markdown-explorer] multi-view documents must each appear once; got ${String(r.length)} with repeats`);if(r.length>e.multiView.maxPanels)throw new RangeError(`[markdown-explorer] the multi view opens at most ${String(e.multiView.maxPanels)} documents; got ${String(r.length)}`);if(t!==null&&!r.includes(t))throw new RangeError(`[markdown-explorer] the maximized document must be one of the open documents; got ${i.describeValue(t)}`);if(new Set(n).size!==n.length)throw new RangeError(`[markdown-explorer] the documents shown as written must each appear once; got ${String(n.length)} with repeats`);const o=n.find(s=>!r.includes(s));if(o!==void 0)throw new RangeError(`[markdown-explorer] a document shown as written must be one of the open documents; got ${i.describeValue(o)}`)},oe=e=>{if(!h.isAcceptableDocumentPath(e))throw new RangeError(`[markdown-explorer] not an acceptable document path: ${i.describeValue(e)}`);return e},mt=e=>{if(!We(oe(e)))throw new RangeError(`[markdown-explorer] a document path ending in a slash has no URL (its segment would name a folder): ${i.describeValue(e)}`);return e},We=e=>h.isAcceptableDocumentPath(e)&&!e.endsWith(M),ft=(e,r)=>{if(r.style!==void 0&&!e.documentStyles.some(t=>t.name===r.style))throw new RangeError(`[markdown-explorer] overrides.style must name a configured document style (${e.documentStyles.map(t=>i.describeValue(t.name)).join(", ")}); got ${i.describeValue(r.style)}`);if(r.align!==void 0&&!T.CONTENT_ALIGNS.includes(r.align))throw new RangeError(`[markdown-explorer] overrides.align must be one of ${T.CONTENT_ALIGNS.join(", ")}; got ${i.describeValue(r.align)}`)},wt=e=>{for(const r of je)if(e[r]!==void 0&&typeof e[r]!="boolean")throw new RangeError(`[markdown-explorer] embed.${r} must be a boolean; got ${i.describeValue(e[r])}`);if(e.padding!==void 0&&!Be(e.padding))throw new RangeError(`[markdown-explorer] embed.padding must be 0..${String(Ve)} px in plain decimal digits; got ${i.describeValue(e.padding)}`);for(const r of["width","maxWidth"]){const t=e[r];if(t!==void 0&&!Z.test(t))throw new RangeError(`[markdown-explorer] embed.${r} must be a CSS length in px, rem, em, ch, vw or %; got ${i.describeValue(t)}`)}},ie=(e,r)=>{if(r.view==="document-id")return gt(e,r);const t=new URLSearchParams;let n=`${e.basePath}/${e.views[r.view]}`;if(r.view==="multi"){const s=r.docs??[],a=r.maximized??null,d=r.markup??[];ut(e,s,a,d);for(const l of s)t.append(u.doc,l);a!==null&&t.set(u.maximized,a);for(const l of s)d.includes(l)&&t.append(u.markup,l)}else{const s=r.doc??null,a=r.view==="tree"?r.folder??null:null;if(s!==null&&a!==null)throw new RangeError("[markdown-explorer] a tree view shows a document or a folder, not both");s!==null&&(n+=`/${Ee(mt(s))}`),a!==null&&(n+=`/${Ee(`${oe(a)}${M}`)}`)}if(r.source!==void 0){const s=Fe(e);if(!s.includes(r.source))throw new RangeError(`[markdown-explorer] unknown source ${i.describeValue(r.source)}; expected one of ${s.join(", ")}`);r.source!==s[0]&&t.set(u.source,r.source)}r.view!=="multi"&&r.overrides!==void 0&&He(e,t,r.overrides);const o=r.view!=="multi"&&(r.doc!==void 0&&r.doc!==null||r.view==="tree"&&r.folder!==void 0&&r.folder!==null);if(r.view==="tree"&&r.maximized===!0){if(!o)throw new RangeError("[markdown-explorer] a tree view without a document or a folder has nothing to maximize");t.set(u.maximized,Me)}if(r.view!=="multi"&&r.markup===!0){if(!o)throw new RangeError("[markdown-explorer] a tree view without a document or a folder has nothing to show as written");t.set(u.markup,Ce)}return r.view==="single"&&r.embed!==void 0&&Ke(t,r.embed),qe(n,t)},gt=(e,r)=>{if(e.documentIds===null)throw new TypeError("[markdown-explorer] an ID link needs documentIds in defineExplorerConfig");if(!h.isCanonicalDocumentId(r.id))throw new RangeError(`[markdown-explorer] not a canonical document ID: ${i.describeValue(r.id)}`);if(r.opens!==void 0&&r.opens!=="single")throw new RangeError(`[markdown-explorer] opens must be "single" or absent; got ${i.describeValue(r.opens)}`);if(r.embed!==void 0&&r.opens!=="single")throw new RangeError('[markdown-explorer] embed needs opens: "single" (only the single view takes embedding options)');const t=new URLSearchParams;r.overrides!==void 0&&He(e,t,r.overrides),r.embed!==void 0&&Ke(t,r.embed);const n=r.opens==="single"?`/${e.views.single}`:"";return qe(`${e.basePath}/${e.documentIds.slug}/${r.id}${n}`,t)},He=(e,r,t)=>{ft(e,t),t.style!==void 0&&r.set(u.style,t.style),t.align!==void 0&&r.set(u.align,t.align)},Ke=(e,r)=>{wt(r);for(const t of je)r[t]===!1&&e.set(u[t],"false");r.padding!==void 0&&e.set(u.padding,String(r.padding)),r.width!==void 0&&e.set(u.width,r.width),r.maxWidth!==void 0&&e.set(u.maxWidth,r.maxWidth)},qe=(e,r)=>{const t=r.toString();return t===""?e:`${e}?${t}`},Et=(e,r)=>Object.keys(e.views).find(t=>e.views[t]===r),ht=(e,r,t)=>{const n=Fe(e),[o]=n;if(o===void 0)throw new RangeError("[markdown-explorer] the configuration has no source");const s=ct(n,o,t),a=s===null?o:s,d=b=>({kind:"redirect",href:ie(e,b),location:b}),l=()=>d({view:"tree",source:a,doc:null,folder:null,overrides:{},markup:!1,maximized:!1});if(r===void 0||r==="")return l();const m=r.indexOf("/"),w=m<0?r:r.slice(0,m),f=m<0?null:r.slice(m+1);if(e.documentIds!==null&&w===e.documentIds.slug)return pt(e,f,t,o,l);const g=Et(e,w);if(g===void 0)return l();if(g==="multi"){const b=t.getAll(u.doc),I=Xe(e,b),z=t.getAll(u.maximized),[j]=z,F=z.length===1&&j!==void 0&&I.includes(j)?j:null,U=t.getAll(u.markup),v=I.filter(A=>U.includes(A)),Ye=v.length===U.length&&v.every((A,B)=>A===U[B]);return f===null&&s!==null&&I.length===b.length&&I.every((A,B)=>A===b[B])&&(z.length===0||F!==null)&&Ye?{kind:"location",location:{view:"multi",source:a,docs:I,maximized:F,markup:v}}:d({view:"multi",source:a,docs:I,maximized:F,markup:v})}const c=f===null?null:lt(f),E=c?.endsWith(M)===!0?c.slice(0,-M.length):null,p=c!==null&&E===null?c:null;if(p!==null&&!h.isAcceptableDocumentPath(p)||E!==null&&!h.isAcceptableDocumentPath(E))return l();const k=Ue(e,t),P=(p!==null||E!==null)&&t.get(u.markup)===Ce;if(g==="single"){if(E!==null)return d({view:"tree",source:a,doc:null,folder:E,overrides:k,markup:P,maximized:!1});if(p===null)return l();const b=Ge(t);return s===null?d({view:g,source:a,doc:p,overrides:k,embed:b,markup:P}):{kind:"location",location:{view:g,source:a,doc:p,overrides:k,embed:b,markup:P}}}const se=(p!==null||E!==null)&&t.get(u.maximized)===Me;return s===null?d({view:g,source:a,doc:p,folder:E,overrides:k,markup:P,maximized:se}):{kind:"location",location:{view:g,source:a,doc:p,folder:E,overrides:k,markup:P,maximized:se}}},pt=(e,r,t,n,o)=>{if(r===null||r==="")return o();const s=r.indexOf("/"),a=h.parseDocumentId(s<0?r:r.slice(0,s)),d=s<0?null:r.slice(s+1),l=Ue(e,t),m={view:"tree",source:n,doc:null,folder:null,overrides:{},markup:!1,maximized:!1};return d===e.views.single?{kind:"document-id",id:a,opens:{view:"single",overrides:l,embed:Ge(t)},location:m}:d!==null&&a!==null?{kind:"redirect",href:ie(e,{view:"document-id",id:a,overrides:l}),location:m}:{kind:"document-id",id:a,opens:{view:"tree",overrides:l},location:m}},bt=(e,r,t)=>e.view==="single"?{view:"single",source:t,doc:r,overrides:e.overrides,embed:e.embed}:{view:"tree",source:t,doc:r,overrides:e.overrides};exports.ASSUMED_ROOT_FONT_PIXELS=Tr;exports.COARSE_TARGET_PIXELS=Ir;exports.COLUMN_MIN_MEASURE=Pr;exports.CONTROL_BLOCK_PIXELS=ne;exports.DEFAULT_TREE_SETTINGS=W;exports.DEFAULT_VIEW_SLUGS=q;exports.EDIT_SPLIT_DEFAULT_PERCENT=vr;exports.EDIT_SPLIT_MAX_PERCENT=Dr;exports.EDIT_SPLIT_MIN_PERCENT=Te;exports.EXPAND_ALL_DEPTH_LIMITS=Pe;exports.EXPAND_ALL_FOLDER_LIMITS=ke;exports.EXPLORER_DEFAULT_PERCENT=Sr;exports.EXPLORER_MAX_PERCENT=te;exports.EXPLORER_MIN_REM=Se;exports.EXPLORER_MULTI_DEFAULT_PERCENT=Or;exports.FIBONACCI_SPACING_PIXELS=K;exports.GOLDEN_RATIO=x;exports.MULTI_VIEW_COLUMN_LIMITS=Re;exports.MULTI_VIEW_PANEL_LIMITS=Ie;exports.NAME_COLLATOR=N;exports.NO_TREE_SETTING_CHANGES=H;exports.PANEL_MAX_BLOCK_RATIO=Rr;exports.PANEL_MIN_BLOCK_RATIO=kr;exports.PREFETCH_DWELL_MS=$r;exports.REVEAL_DOCUMENT_DEPTH_LIMITS=Ae;exports.SPLIT_HANDLE_PIXELS=yr;exports.SPLIT_PERSIST_DELAY_MS=Nr;exports.SPREADSHEET_BYTE_LIMITS=Le;exports.WORKBOOK_BYTE_LIMITS=Ne;exports.advanceTreeSetting=mr;exports.applyTreeSettingChanges=Er;exports.assertMountPath=Y;exports.canonicalMultiDocuments=Xe;exports.centeredDialogPosition=jr;exports.columnGroups=Vr;exports.createEntryComparator=xr;exports.decodeText=nr;exports.decodeTextLeniently=ir;exports.defineExplorerConfig=De;exports.documentIdOpeningTarget=bt;exports.documentStyleNames=at;exports.editSplitOrientation=zr;exports.explorerHref=ie;exports.explorerMinPixels=Oe;exports.explorerSheetBelowPixels=Lr;exports.folderReadmeOf=lr;exports.formatTreeSettingValue=fr;exports.hasDocumentUrl=We;exports.isExplorerSourceId=$e;exports.legacyTextEncodingOf=Q;exports.ownUrlsOf=dt;exports.parseViewSettings=Wr;exports.readCookieValue=Xr;exports.readTreeSettingChanges=gr;exports.recordTreeSettingChange=hr;exports.replanVisibleColumns=Mr;exports.resolveExplorerLocation=ht;exports.revalidateExplorerConfig=it;exports.serializeTreeSettingChanges=pr;exports.serializeViewSettings=ye;exports.textEncodingOf=or;exports.textEncodingsOf=rr;exports.viewSettingsCookieString=Kr;exports.visibleTreeSettingDescriptors=ur;exports.withExplorerSources=st;
@@ -1,6 +1,6 @@
1
1
  import { NO_EMBEDS as Me, isEmbedProviderId as ze, EMBED_PROVIDER_IDS as Le, isLinkCardSize as je, LINK_CARD_SIZES as Fe } from "@aiquants/markdown/embeds";
2
2
  import { CONTENT_COLORS as Ue, CONTENT_MEASURES as Ve, CONTENT_ALIGNS as D, DEFAULT_MARKDOWN_STYLES as Be, DEFAULT_MARKDOWN_STYLE as We } from "@aiquants/markdown/viewer-settings";
3
- import { P as Ge, Q as He, R as Ke, S as Xe, i as $, K as qe, T as Ye } from "./ownUrls-DD0cSCsF.js";
3
+ import { P as Ge, Q as He, R as Ke, S as Xe, i as _, K as qe, T as Ye } from "./ownUrls-DD0cSCsF.js";
4
4
  import { d as s, i as v } from "./describeValue-CLlVRO8d.js";
5
5
  const Je = Object.freeze([
6
6
  "UTF-8",
@@ -224,12 +224,12 @@ const Je = Object.freeze([
224
224
  const d = at(i.modifiedAt, a.modifiedAt, t === "oldest" ? 1 : -1);
225
225
  return d !== 0 ? d : o(i, a);
226
226
  };
227
- }, y = (1 + Math.sqrt(5)) / 2, wr = 100 / y ** 3, gr = 100 / y ** 4, Ee = 100 / y ** 2, dt = 13, hr = 16, pr = Object.freeze({ gripThickness: 5, gripLength: 34, barThickness: 2, barLength: 21 }), se = Object.freeze([1, 2, 3, 5, 8, 13, 21, 34, 55]), lt = Object.freeze([89, 144, 233, 377]), xe = 44, Er = xe, xr = 24;
227
+ }, y = (1 + Math.sqrt(5)) / 2, wr = 100 / y ** 3, gr = 100 / y ** 4, Ee = 100 / y ** 2, dt = 13, hr = 16, pr = Object.freeze({ gripThickness: 5, gripLength: 34, barThickness: 2, barLength: 21 }), se = Object.freeze([1, 2, 3, 5, 8, 13, 21, 34, 55]), lt = Object.freeze([89, 144, 233, 377]), xe = 44, Er = xe;
228
228
  2 * se[3] + xe + se[0];
229
- const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
229
+ const xr = 1 / y, br = 1 / y ** 3, yr = "40ch", ct = (e) => {
230
230
  if (!Number.isFinite(e) || e <= 0)
231
231
  throw new RangeError(`[markdown-explorer] rootFontPixels must be a finite number > 0; got ${s(e)}`);
232
- }, mt = (e) => (ct(e), dt * e), Or = (e) => mt(e) * y ** 2, kr = 233, Tr = 50, ut = 100 / y ** 3, Rr = 100 - ut, Ir = lt[0], x = (e, t) => {
232
+ }, mt = (e) => (ct(e), dt * e), Sr = (e) => mt(e) * y ** 2, Or = 233, kr = 50, ut = 100 / y ** 3, Tr = 100 - ut, Rr = lt[0], x = (e, t) => {
233
233
  if (!Number.isFinite(t) || t < 0)
234
234
  throw new RangeError(`[markdown-explorer] ${e} must be a finite number >= 0; got ${s(t)}`);
235
235
  }, ft = ({ trackInlineSize: e, gap: t, minColumnInlineSize: r, logicalColumns: n }) => {
@@ -239,7 +239,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
239
239
  throw new RangeError(`[markdown-explorer] logicalColumns must be a positive integer; got ${s(n)}`);
240
240
  const o = Math.floor((e + t) / (r + t));
241
241
  return Math.min(n, Math.max(1, o));
242
- }, _r = (e, t) => {
242
+ }, Ir = (e, t) => {
243
243
  const { trackInlineSize: r, gap: n, minColumnInlineSize: o, logicalColumns: i } = t;
244
244
  if (!([r, n, o].every(Number.isFinite) && r > 0 && n >= 0 && o > 0)) return e;
245
245
  const d = ft(t);
@@ -254,14 +254,14 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
254
254
  if (!(Number.isInteger(e) && Number.isInteger(t)) || t < 1 || t > e)
255
255
  throw new RangeError(`[markdown-explorer] visible columns must be an integer in 1..${String(e)}; got ${s(t)}`);
256
256
  return Array.from({ length: t }, (r, n) => [Math.floor(n * e / t), Math.floor((n + 1) * e / t)]);
257
- }, vr = (e, t, r) => {
257
+ }, _r = (e, t, r) => {
258
258
  if (x("surfaceInlineSize", e), x("handlePixels", r), !Number.isFinite(t) || t <= 0)
259
259
  throw new RangeError(`[markdown-explorer] measure must be a finite number > 0; got ${s(t)}`);
260
260
  return e >= 2 * t + r ? "beside" : "stacked";
261
261
  }, W = (e, t, r) => Math.max(t, Math.min(e, r)), ie = (e, t, r, n) => {
262
262
  const o = (W(e, 0, r) + W(t, 0, r)) / 2;
263
263
  return W(o - n / 2, 0, r - n);
264
- }, Pr = (e, t, r) => {
264
+ }, vr = (e, t, r) => {
265
265
  for (const [n, o] of Object.entries(e))
266
266
  if (!Number.isFinite(o)) throw new RangeError(`[markdown-explorer] anchor.${n} must be a finite number; got ${s(o)}`);
267
267
  return x("marginBox.width", t.width), x("marginBox.height", t.height), x("viewport.width", r.width), x("viewport.height", r.height), {
@@ -284,14 +284,14 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
284
284
  ...A(Ve, u) ? { measure: u } : {},
285
285
  ...A(Ue, w) ? { documentColors: w } : {}
286
286
  };
287
- }, Ar = (e, t) => {
287
+ }, Pr = (e, t) => {
288
288
  if (e !== null)
289
289
  for (const r of e.split(";")) {
290
290
  const n = r.indexOf("=");
291
291
  if (!(n < 0) && r.slice(0, n).trim() === t)
292
292
  return r.slice(n + 1).trim();
293
293
  }
294
- }, Dr = (e, t) => {
294
+ }, Ar = (e, t) => {
295
295
  if (e === void 0 || e === "") return {};
296
296
  try {
297
297
  return pt(JSON.parse(decodeURIComponent(e)), t);
@@ -312,7 +312,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
312
312
  ...e.documentColors === void 0 ? {} : { documentColors: e.documentColors }
313
313
  })
314
314
  );
315
- }, Nr = (e, t, r) => `${e}=${xt(t)}; Path=/; Max-Age=${String(wt)}; SameSite=Lax${r ? "; Secure" : ""}`, be = ["ctrl", "shift"], bt = (e) => typeof e == "string" && be.includes(e), de = Object.freeze({ tree: "tree", multi: "multi", single: "single" }), yt = Object.freeze({ default: 12, min: 1, max: 64 }), St = Object.freeze({ default: 4, min: 1, max: 6 }), Ot = Object.freeze({ default: 500, min: 1, max: 1e4 }), kt = Object.freeze({ default: 16, min: 1, max: 64 }), Tt = Object.freeze({ default: 16, min: 1, max: 64 }), Rt = Object.freeze({ default: 2 * 1024 * 1024, min: 1, max: 256 * 1024 * 1024 }), It = Object.freeze({ default: 8 * 1024 * 1024, min: 1, max: 256 * 1024 * 1024 }), ye = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u, _t = /^[a-z0-9][a-z0-9-]*$/u, $t = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/u, le = (e, t) => {
315
+ }, Dr = (e, t, r) => `${e}=${xt(t)}; Path=/; Max-Age=${String(wt)}; SameSite=Lax${r ? "; Secure" : ""}`, be = ["ctrl", "shift"], bt = (e) => typeof e == "string" && be.includes(e), de = Object.freeze({ tree: "tree", multi: "multi", single: "single" }), yt = Object.freeze({ default: 12, min: 1, max: 64 }), St = Object.freeze({ default: 4, min: 1, max: 6 }), Ot = Object.freeze({ default: 500, min: 1, max: 1e4 }), kt = Object.freeze({ default: 16, min: 1, max: 64 }), Tt = Object.freeze({ default: 16, min: 1, max: 64 }), Rt = Object.freeze({ default: 2 * 1024 * 1024, min: 1, max: 256 * 1024 * 1024 }), It = Object.freeze({ default: 8 * 1024 * 1024, min: 1, max: 256 * 1024 * 1024 }), ye = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u, $t = /^[a-z0-9][a-z0-9-]*$/u, _t = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/u, le = (e, t) => {
316
316
  if (typeof t != "string") throw new TypeError(`[markdown-explorer] ${e} must be a string; got ${s(t)}`);
317
317
  if (!Ge(t))
318
318
  throw new RangeError(`[markdown-explorer] ${e} must start with "/", have no trailing "/", use only letters, digits and "._~-" in each segment, and have no "." or ".." segment; got ${s(t)}`);
@@ -329,6 +329,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
329
329
  documentStyles: !0,
330
330
  defaultDocumentStyle: !0,
331
331
  mermaidModifier: !0,
332
+ documentFontFamily: !0,
332
333
  iframeHosts: !0,
333
334
  appOrigins: !0,
334
335
  mediaDataPath: !0,
@@ -435,9 +436,9 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
435
436
  ht(e.settingsCookie);
436
437
  const n = e.iframeHosts ?? [];
437
438
  if (!Array.isArray(n)) throw new RangeError(`[markdown-explorer] iframeHosts must be an array of lowercase host names without scheme, port or path; got ${s(n)}`);
438
- for (const [c, E] of n.entries())
439
- if (typeof E != "string" || !$t.test(E))
440
- throw new RangeError(`[markdown-explorer] iframeHosts[${String(c)}] must be a lowercase host name without scheme, port or path; got ${s(E)}`);
439
+ for (const [c, h] of n.entries())
440
+ if (typeof h != "string" || !_t.test(h))
441
+ throw new RangeError(`[markdown-explorer] iframeHosts[${String(c)}] must be a lowercase host name without scheme, port or path; got ${s(h)}`);
441
442
  const o = Object.fromEntries(b("multiView", e.multiView, ["maxPanels", "columns"])), i = Object.fromEntries(b("expandAll", e.expandAll, ["maxFolders", "maxDepth"])), a = Object.fromEntries(b("revealDocument", e.revealDocument, ["maxDepth"])), d = Object.fromEntries(b("spreadsheets", e.spreadsheets, ["maxBytes", "maxWorkbookBytes"])), l = e.documentStyles ?? Be;
442
443
  if (!Array.isArray(l) || l.length === 0) throw new RangeError("[markdown-explorer] documentStyles must be a non-empty array");
443
444
  const u = /* @__PURE__ */ new Set();
@@ -456,6 +457,11 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
456
457
  const f = e.mermaidModifier;
457
458
  if (f !== void 0 && !bt(f))
458
459
  throw new RangeError(`[markdown-explorer] mermaidModifier must be one of ${be.map(s).join(", ")}; got ${s(f)}`);
460
+ const g = e.documentFontFamily;
461
+ if (g !== void 0) {
462
+ if (typeof g != "string") throw new TypeError(`[markdown-explorer] documentFontFamily must be a string; got ${s(g)}`);
463
+ if (g.trim() === "") throw new RangeError("[markdown-explorer] documentFontFamily must not be blank; omit it for the display style's font");
464
+ }
459
465
  return Object.freeze({
460
466
  basePath: e.basePath,
461
467
  dataPath: e.dataPath,
@@ -474,6 +480,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
474
480
  documentStyles: Object.freeze(l.map((c) => Object.freeze({ name: c.name, className: c.className }))),
475
481
  defaultDocumentStyle: w,
476
482
  mermaidModifier: f,
483
+ documentFontFamily: g,
477
484
  iframeHosts: Object.freeze([...new Set(n)]),
478
485
  appOrigins: Nt(e.appOrigins),
479
486
  mediaDataPath: Ct(e.mediaDataPath),
@@ -485,7 +492,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
485
492
  maxWorkbookBytes: O("spreadsheets.maxWorkbookBytes", d.maxWorkbookBytes, It)
486
493
  })
487
494
  });
488
- }, Cr = (e) => {
495
+ }, Nr = (e) => {
489
496
  const t = e.embeds;
490
497
  if (!v(t)) throw new TypeError(`[markdown-explorer] config.embeds must be the embeds defineExplorerConfig resolved; got ${s(t)}`);
491
498
  if (Object.hasOwn(t, "linkCards"))
@@ -535,7 +542,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
535
542
  }
536
543
  const n = Object.keys(e).find((o) => !Object.hasOwn(t, o));
537
544
  return n === void 0 ? null : { kind: "extra", path: `${r}.${n}`, given: e[n] };
538
- }, Lt = (e) => typeof e == "string" && _t.test(e), Mr = (e, t) => {
545
+ }, Lt = (e) => typeof e == "string" && $t.test(e), Cr = (e, t) => {
539
546
  if (e === null || typeof e != "object") throw new TypeError(`[markdown-explorer] withExplorerSources needs the configuration of defineExplorerConfig; got ${s(e)}`);
540
547
  if (!Array.isArray(t) || t.length === 0) throw new RangeError(`[markdown-explorer] sourceIds must be a non-empty array; got ${s(t)}`);
541
548
  const r = /* @__PURE__ */ new Set();
@@ -545,7 +552,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
545
552
  r.add(o);
546
553
  }
547
554
  return Object.freeze({ ...e, sourceIds: Object.freeze([...t]) });
548
- }, zr = (e) => e.documentStyles.map((t) => t.name), Lr = (e) => Object.freeze({
555
+ }, Mr = (e) => e.documentStyles.map((t) => t.name), zr = (e) => Object.freeze({
549
556
  origins: e.appOrigins,
550
557
  resources: Object.freeze([e.dataPath]),
551
558
  links: Object.freeze([e.basePath, e.dataPath]),
@@ -575,23 +582,23 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
575
582
  if (n.length === 0) return t;
576
583
  const [o] = n;
577
584
  return n.length > 1 || o === void 0 || o === t || !e.includes(o) ? null : o;
578
- }, _e = (e, t) => {
585
+ }, $e = (e, t) => {
579
586
  const r = t.get(m.style), n = t.get(m.align);
580
587
  return {
581
588
  ...r !== null && e.documentStyles.some((o) => o.name === r) ? { style: r } : {},
582
589
  ...n !== null && D.includes(n) ? { align: n } : {}
583
590
  };
584
- }, $e = (e) => Number.isFinite(e) && e >= 0 && e <= ke && Te.test(String(e)), ve = (e) => {
591
+ }, _e = (e) => Number.isFinite(e) && e >= 0 && e <= ke && Te.test(String(e)), ve = (e) => {
585
592
  const t = e.get(m.padding), r = t !== null && Te.test(t) ? Number(t) : Number.NaN, n = e.get(m.width), o = e.get(m.maxWidth);
586
593
  return {
587
594
  ...e.get(m.showToc) === "false" ? { showToc: !1 } : {},
588
595
  ...e.get(m.showStyle) === "false" ? { showStyle: !1 } : {},
589
596
  ...e.get(m.showAlign) === "false" ? { showAlign: !1 } : {},
590
- ...$e(r) ? { padding: r } : {},
597
+ ..._e(r) ? { padding: r } : {},
591
598
  ...n !== null && K.test(n) ? { width: n } : {},
592
599
  ...o !== null && K.test(o) ? { maxWidth: o } : {}
593
600
  };
594
- }, Ut = (e, t) => [...new Set(t.filter($))].slice(0, e.multiView.maxPanels), Vt = (e, t, r, n) => {
601
+ }, Ut = (e, t) => [...new Set(t.filter(_))].slice(0, e.multiView.maxPanels), Vt = (e, t, r, n) => {
595
602
  for (const i of t) Y(i);
596
603
  if (new Set(t).size !== t.length) throw new RangeError(`[markdown-explorer] multi-view documents must each appear once; got ${String(t.length)} with repeats`);
597
604
  if (t.length > e.multiView.maxPanels) throw new RangeError(`[markdown-explorer] the multi view opens at most ${String(e.multiView.maxPanels)} documents; got ${String(t.length)}`);
@@ -600,12 +607,12 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
600
607
  const o = n.find((i) => !t.includes(i));
601
608
  if (o !== void 0) throw new RangeError(`[markdown-explorer] a document shown as written must be one of the open documents; got ${s(o)}`);
602
609
  }, Y = (e) => {
603
- if (!$(e)) throw new RangeError(`[markdown-explorer] not an acceptable document path: ${s(e)}`);
610
+ if (!_(e)) throw new RangeError(`[markdown-explorer] not an acceptable document path: ${s(e)}`);
604
611
  return e;
605
612
  }, Bt = (e) => {
606
613
  if (!Wt(Y(e))) throw new RangeError(`[markdown-explorer] a document path ending in a slash has no URL (its segment would name a folder): ${s(e)}`);
607
614
  return e;
608
- }, Wt = (e) => $(e) && !e.endsWith(z), Gt = (e, t) => {
615
+ }, Wt = (e) => _(e) && !e.endsWith(z), Gt = (e, t) => {
609
616
  if (t.style !== void 0 && !e.documentStyles.some((r) => r.name === t.style))
610
617
  throw new RangeError(`[markdown-explorer] overrides.style must name a configured document style (${e.documentStyles.map((r) => s(r.name)).join(", ")}); got ${s(t.style)}`);
611
618
  if (t.align !== void 0 && !D.includes(t.align))
@@ -613,7 +620,7 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
613
620
  }, Ht = (e) => {
614
621
  for (const t of Re)
615
622
  if (e[t] !== void 0 && typeof e[t] != "boolean") throw new RangeError(`[markdown-explorer] embed.${t} must be a boolean; got ${s(e[t])}`);
616
- if (e.padding !== void 0 && !$e(e.padding)) throw new RangeError(`[markdown-explorer] embed.padding must be 0..${String(ke)} px in plain decimal digits; got ${s(e.padding)}`);
623
+ if (e.padding !== void 0 && !_e(e.padding)) throw new RangeError(`[markdown-explorer] embed.padding must be 0..${String(ke)} px in plain decimal digits; got ${s(e.padding)}`);
617
624
  for (const t of ["width", "maxWidth"]) {
618
625
  const r = e[t];
619
626
  if (r !== void 0 && !K.test(r)) throw new RangeError(`[markdown-explorer] embed.${t} must be a CSS length in px, rem, em, ch, vw or %; got ${s(r)}`);
@@ -667,99 +674,98 @@ const br = 1 / y, yr = 1 / y ** 3, Sr = "40ch", ct = (e) => {
667
674
  }, Ne = (e, t) => {
668
675
  const r = t.toString();
669
676
  return r === "" ? e : `${e}?${r}`;
670
- }, Xt = (e, t) => Object.keys(e.views).find((r) => e.views[r] === t), jr = (e, t, r) => {
677
+ }, Xt = (e, t) => Object.keys(e.views).find((r) => e.views[r] === t), Lr = (e, t, r) => {
671
678
  const n = Ie(e), [o] = n;
672
679
  if (o === void 0) throw new RangeError("[markdown-explorer] the configuration has no source");
673
- const i = Ft(n, o, r), a = i === null ? o : i, d = (p) => ({ kind: "redirect", href: Pe(e, p), location: p }), l = () => d({ view: "tree", source: a, doc: null, folder: null, overrides: {}, markup: !1, maximized: !1 });
680
+ const i = Ft(n, o, r), a = i === null ? o : i, d = (E) => ({ kind: "redirect", href: Pe(e, E), location: E }), l = () => d({ view: "tree", source: a, doc: null, folder: null, overrides: {}, markup: !1, maximized: !1 });
674
681
  if (t === void 0 || t === "") return l();
675
682
  const u = t.indexOf("/"), w = u < 0 ? t : t.slice(0, u), f = u < 0 ? null : t.slice(u + 1);
676
683
  if (e.documentIds !== null && w === e.documentIds.slug) return qt(e, f, r, o, l);
677
- const c = Xt(e, w);
678
- if (c === void 0) return l();
679
- if (c === "multi") {
680
- const p = r.getAll(m.doc), k = Ut(e, p), j = r.getAll(m.maximized), [F] = j, U = j.length === 1 && F !== void 0 && k.includes(F) ? F : null, V = r.getAll(m.markup), P = k.filter((_) => V.includes(_)), Ce = P.length === V.length && P.every((_, B) => _ === V[B]);
681
- return f === null && i !== null && k.length === p.length && k.every((_, B) => _ === p[B]) && (j.length === 0 || U !== null) && Ce ? { kind: "location", location: { view: "multi", source: a, docs: k, maximized: U, markup: P } } : d({ view: "multi", source: a, docs: k, maximized: U, markup: P });
684
+ const g = Xt(e, w);
685
+ if (g === void 0) return l();
686
+ if (g === "multi") {
687
+ const E = r.getAll(m.doc), k = Ut(e, E), j = r.getAll(m.maximized), [F] = j, U = j.length === 1 && F !== void 0 && k.includes(F) ? F : null, V = r.getAll(m.markup), P = k.filter(($) => V.includes($)), Ce = P.length === V.length && P.every(($, B) => $ === V[B]);
688
+ return f === null && i !== null && k.length === E.length && k.every(($, B) => $ === E[B]) && (j.length === 0 || U !== null) && Ce ? { kind: "location", location: { view: "multi", source: a, docs: k, maximized: U, markup: P } } : d({ view: "multi", source: a, docs: k, maximized: U, markup: P });
682
689
  }
683
- const E = f === null ? null : jt(f), g = E?.endsWith(z) === !0 ? E.slice(0, -z.length) : null, h = E !== null && g === null ? E : null;
684
- if (h !== null && !$(h) || g !== null && !$(g)) return l();
685
- const R = _e(e, r), I = (h !== null || g !== null) && r.get(m.markup) === Se;
686
- if (c === "single") {
687
- if (g !== null) return d({ view: "tree", source: a, doc: null, folder: g, overrides: R, markup: I, maximized: !1 });
688
- if (h === null) return l();
689
- const p = ve(r);
690
- return i === null ? d({ view: c, source: a, doc: h, overrides: R, embed: p, markup: I }) : { kind: "location", location: { view: c, source: a, doc: h, overrides: R, embed: p, markup: I } };
690
+ const c = f === null ? null : jt(f), h = c?.endsWith(z) === !0 ? c.slice(0, -z.length) : null, p = c !== null && h === null ? c : null;
691
+ if (p !== null && !_(p) || h !== null && !_(h)) return l();
692
+ const R = $e(e, r), I = (p !== null || h !== null) && r.get(m.markup) === Se;
693
+ if (g === "single") {
694
+ if (h !== null) return d({ view: "tree", source: a, doc: null, folder: h, overrides: R, markup: I, maximized: !1 });
695
+ if (p === null) return l();
696
+ const E = ve(r);
697
+ return i === null ? d({ view: g, source: a, doc: p, overrides: R, embed: E, markup: I }) : { kind: "location", location: { view: g, source: a, doc: p, overrides: R, embed: E, markup: I } };
691
698
  }
692
- const J = (h !== null || g !== null) && r.get(m.maximized) === Oe;
693
- return i === null ? d({ view: c, source: a, doc: h, folder: g, overrides: R, markup: I, maximized: J }) : { kind: "location", location: { view: c, source: a, doc: h, folder: g, overrides: R, markup: I, maximized: J } };
699
+ const J = (p !== null || h !== null) && r.get(m.maximized) === Oe;
700
+ return i === null ? d({ view: g, source: a, doc: p, folder: h, overrides: R, markup: I, maximized: J }) : { kind: "location", location: { view: g, source: a, doc: p, folder: h, overrides: R, markup: I, maximized: J } };
694
701
  }, qt = (e, t, r, n, o) => {
695
702
  if (t === null || t === "") return o();
696
- const i = t.indexOf("/"), a = Ye(i < 0 ? t : t.slice(0, i)), d = i < 0 ? null : t.slice(i + 1), l = _e(e, r), u = { view: "tree", source: n, doc: null, folder: null, overrides: {}, markup: !1, maximized: !1 };
703
+ const i = t.indexOf("/"), a = Ye(i < 0 ? t : t.slice(0, i)), d = i < 0 ? null : t.slice(i + 1), l = $e(e, r), u = { view: "tree", source: n, doc: null, folder: null, overrides: {}, markup: !1, maximized: !1 };
697
704
  return d === e.views.single ? { kind: "document-id", id: a, opens: { view: "single", overrides: l, embed: ve(r) }, location: u } : d !== null && a !== null ? { kind: "redirect", href: Pe(e, { view: "document-id", id: a, overrides: l }), location: u } : { kind: "document-id", id: a, opens: { view: "tree", overrides: l }, location: u };
698
- }, Fr = (e, t, r) => e.view === "single" ? { view: "single", source: r, doc: t, overrides: e.overrides, embed: e.embed } : { view: "tree", source: r, doc: t, overrides: e.overrides };
705
+ }, jr = (e, t, r) => e.view === "single" ? { view: "single", source: r, doc: t, overrides: e.overrides, embed: e.embed } : { view: "tree", source: r, doc: t, overrides: e.overrides };
699
706
  export {
700
- Nr as $,
707
+ yr as $,
701
708
  dr as A,
702
709
  ir as B,
703
710
  Er as C,
704
- Or as D,
705
- Rr as E,
706
- xr as F,
707
- mt as G,
708
- Ee as H,
709
- wr as I,
710
- gr as J,
711
- hr as K,
712
- Tr as L,
713
- Pr as M,
711
+ Sr as D,
712
+ Tr as E,
713
+ mt as F,
714
+ Ee as G,
715
+ wr as H,
716
+ gr as I,
717
+ hr as J,
718
+ kr as K,
719
+ vr as L,
720
+ Rr as M,
714
721
  C as N,
715
- Ir as O,
716
- br as P,
717
- se as Q,
718
- y as R,
719
- kr as S,
720
- tr as T,
721
- mr as U,
722
- ar as V,
723
- cr as W,
724
- ur as X,
725
- ne as Y,
726
- lr as Z,
727
- xt as _,
722
+ se as O,
723
+ xr as P,
724
+ y as Q,
725
+ tr as R,
726
+ Or as S,
727
+ mr as T,
728
+ ar as U,
729
+ cr as V,
730
+ ur as W,
731
+ ne as X,
732
+ lr as Y,
733
+ xt as Z,
734
+ Dr as _,
728
735
  le as a,
729
- Sr as a0,
730
- re as a1,
731
- de as a2,
732
- kt as a3,
733
- Ot as a4,
734
- dt as a5,
735
- St as a6,
736
- yt as a7,
737
- Tt as a8,
738
- Rt as a9,
739
- It as aa,
740
- zt as ab,
736
+ re as a0,
737
+ de as a1,
738
+ kt as a2,
739
+ Ot as a3,
740
+ dt as a4,
741
+ St as a5,
742
+ yt as a6,
743
+ Tt as a7,
744
+ Rt as a8,
745
+ It as a9,
746
+ zt as aa,
741
747
  or as b,
742
748
  Ut as c,
743
749
  rr as d,
744
750
  Pe as e,
745
- zr as f,
746
- Cr as g,
747
- jr as h,
751
+ Mr as f,
752
+ Nr as g,
753
+ Lr as h,
748
754
  Lt as i,
749
- Fr as j,
755
+ jr as j,
750
756
  Wt as k,
751
757
  fe as l,
752
758
  ut as m,
753
759
  pr as n,
754
- Lr as o,
755
- Dr as p,
756
- vr as q,
757
- Ar as r,
760
+ zr as o,
761
+ Ar as p,
762
+ _r as q,
763
+ Pr as r,
758
764
  $r as s,
759
765
  nr as t,
760
- _r as u,
761
- yr as v,
762
- Mr as w,
766
+ Ir as u,
767
+ br as v,
768
+ Cr as w,
763
769
  sr as x,
764
770
  xe as y,
765
771
  fr as z
@@ -1,5 +1,5 @@
1
1
  import { diff3Merge as d } from "node-diff3";
2
- import { C, a as R, b as u } from "./index-C52Nj37x.js";
2
+ import { C, a as R, b as u } from "./index-CWFyLa0N.js";
3
3
  const g = (n, o, e, l) => {
4
4
  if (o === n || o === e) return { kind: "clean", text: e };
5
5
  if (e === n) return { kind: "clean", text: o };