@pretextbook/pretext-html 0.4.0 → 0.6.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 (44) hide show
  1. package/README.md +92 -1
  2. package/assets/preview-html.xsl +14 -0
  3. package/assets/preview-revealjs.xsl +85 -0
  4. package/assets/upstream.json +1 -1
  5. package/assets/xsl/LICENSE-pretext +16 -0
  6. package/assets/xsl/entities.ent +7 -0
  7. package/assets/xsl/extract-biblio-csl.xsl +5 -3
  8. package/assets/xsl/extract-dynamic.xsl +14 -12
  9. package/assets/xsl/extract-interactive.xsl +2 -2
  10. package/assets/xsl/extract-pg.xsl +12 -9
  11. package/assets/xsl/extract-qrcode.xsl +1 -1
  12. package/assets/xsl/extract-trace.xsl +3 -3
  13. package/assets/xsl/extract-youtube.xsl +1 -1
  14. package/assets/xsl/latex/pretext-latex-texstyle.xsl +3 -3
  15. package/assets/xsl/pretext-assembly.xsl +362 -357
  16. package/assets/xsl/pretext-braille-preprint.xsl +1 -1
  17. package/assets/xsl/pretext-common.xsl +101 -90
  18. package/assets/xsl/pretext-epub.xsl +17 -6
  19. package/assets/xsl/pretext-fo.xsl +10 -10
  20. package/assets/xsl/pretext-html.xsl +83 -60
  21. package/assets/xsl/pretext-latex-common.xsl +8 -8
  22. package/assets/xsl/pretext-numbers.xsl +35 -35
  23. package/assets/xsl/pretext-revealjs.xsl +1 -1
  24. package/assets/xsl/pretext-runestone-fitb.xsl +14 -13
  25. package/assets/xsl/pretext-runestone-static.xsl +17 -17
  26. package/assets/xsl/pretext-runestone.xsl +33 -31
  27. package/assets/xsl/pretext-view-source.xsl +5 -3
  28. package/assets/xsl/pretext-ww-problem-sets.xsl +6 -1
  29. package/assets/xsl/publisher-variables.xsl +23 -47
  30. package/assets/xsl-bundle.json +1 -1
  31. package/dist/cli-DF7XOWN7.js +724 -0
  32. package/dist/cli.js +1 -1
  33. package/dist/index.browser.d.ts +6 -0
  34. package/dist/index.browser.js +501 -332
  35. package/dist/index.d.ts +6 -0
  36. package/dist/index.js +25 -19
  37. package/dist/knowls.d.ts +43 -0
  38. package/dist/publication.d.ts +25 -19
  39. package/dist/renderer.d.ts +61 -0
  40. package/dist/reveal.d.ts +77 -0
  41. package/dist/reveal.js +110 -0
  42. package/dist/target.d.ts +34 -0
  43. package/package.json +12 -1
  44. package/dist/cli-Cp6C0sif.js +0 -654
@@ -1,95 +1,95 @@
1
- import { fromXml as x } from "xast-util-from-xml";
2
- import { toXml as T } from "xast-util-to-xml";
3
- const _ = "/";
4
- function me(e) {
1
+ import { fromXml as E } from "xast-util-from-xml";
2
+ import { toXml as $ } from "xast-util-to-xml";
3
+ const D = "/";
4
+ function ve(e) {
5
5
  if (!e)
6
6
  return ".";
7
- const n = e.startsWith("/"), t = e.length > 1 && e.endsWith("/"), r = [];
7
+ const t = e.startsWith("/"), n = e.length > 1 && e.endsWith("/"), r = [];
8
8
  for (const o of e.split("/"))
9
9
  if (!(!o || o === ".")) {
10
10
  if (o === "..") {
11
11
  const s = r[r.length - 1];
12
- r.length > 0 && s !== ".." ? r.pop() : n || r.push("..");
12
+ r.length > 0 && s !== ".." ? r.pop() : t || r.push("..");
13
13
  continue;
14
14
  }
15
15
  r.push(o);
16
16
  }
17
17
  let i = r.join("/");
18
- return n && (i = `/${i}`), i ? (t && !i.endsWith("/") && (i += "/"), i) : n ? "/" : ".";
18
+ return t && (i = `/${i}`), i ? (n && !i.endsWith("/") && (i += "/"), i) : t ? "/" : ".";
19
19
  }
20
- function f(...e) {
21
- let n = "";
20
+ function h(...e) {
21
+ let t = "";
22
22
  for (let r = e.length - 1; r >= 0; r--) {
23
23
  const i = e[r];
24
- if (i && (n = n ? `${i}/${n}` : i, i.startsWith("/")))
24
+ if (i && (t = t ? `${i}/${t}` : i, i.startsWith("/")))
25
25
  break;
26
26
  }
27
- n.startsWith("/") || (n = `/${n}`);
28
- const t = me(n);
29
- return t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
27
+ t.startsWith("/") || (t = `/${t}`);
28
+ const n = ve(t);
29
+ return n.length > 1 && n.endsWith("/") ? n.slice(0, -1) : n;
30
30
  }
31
- function y(e) {
32
- const n = e.replace(/\/+$/, "");
33
- if (!n)
31
+ function b(e) {
32
+ const t = e.replace(/\/+$/, "");
33
+ if (!t)
34
34
  return e.startsWith("/") ? "/" : ".";
35
- const t = n.lastIndexOf("/");
36
- return t < 0 ? "." : t === 0 ? "/" : n.slice(0, t);
35
+ const n = t.lastIndexOf("/");
36
+ return n < 0 ? "." : n === 0 ? "/" : t.slice(0, n);
37
37
  }
38
- function S(e, n) {
39
- const t = f(e).split("/").filter(Boolean), r = f(n).split("/").filter(Boolean);
38
+ function I(e, t) {
39
+ const n = h(e).split("/").filter(Boolean), r = h(t).split("/").filter(Boolean);
40
40
  let i = 0;
41
- for (; i < t.length && i < r.length && t[i] === r[i]; )
41
+ for (; i < n.length && i < r.length && n[i] === r[i]; )
42
42
  i += 1;
43
- return [...new Array(t.length - i).fill(".."), ...r.slice(i)].join("/");
43
+ return [...new Array(n.length - i).fill(".."), ...r.slice(i)].join("/");
44
44
  }
45
- const pe = "https://cdn.jsdelivr.net/npm/@pretextbook/pretext-html@0.4.0/assets";
45
+ const be = "https://cdn.jsdelivr.net/npm/@pretextbook/pretext-html@0.6.0/assets";
46
46
  let Q;
47
- function Ve(e) {
47
+ function St(e) {
48
48
  Q = e.replace(/\/+$/, "");
49
49
  }
50
- function $() {
51
- return Q ?? pe;
50
+ function S() {
51
+ return Q ?? be;
52
52
  }
53
- function Z(e, n) {
54
- return `${e.replace(/\/+$/, "")}/${n.replace(/^\/+/, "")}`;
53
+ function ee(e, t) {
54
+ return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
55
55
  }
56
- const O = /* @__PURE__ */ new Map();
57
- function we(e) {
56
+ const U = /* @__PURE__ */ new Map();
57
+ function ye(e) {
58
58
  return `${e.replace(/\/+$/, "")}-bundle.json`;
59
59
  }
60
- function ge(e) {
61
- let n = O.get(e);
62
- return n || (n = (async () => {
60
+ function Ee(e) {
61
+ let t = U.get(e);
62
+ return t || (t = (async () => {
63
63
  try {
64
- const t = await fetch(we(e));
65
- if (!t.ok)
64
+ const n = await fetch(ye(e));
65
+ if (!n.ok)
66
66
  return /* @__PURE__ */ new Map();
67
- const r = await t.json();
67
+ const r = await n.json();
68
68
  return new Map(Object.entries(r));
69
69
  } catch {
70
70
  return /* @__PURE__ */ new Map();
71
71
  }
72
- })(), O.set(e, n)), n;
72
+ })(), U.set(e, t)), t;
73
73
  }
74
- function be(e) {
75
- return e === Z($(), "xsl");
74
+ function xe(e) {
75
+ return e === ee(S(), "xsl");
76
76
  }
77
- async function ee(e, n) {
78
- if (be(e)) {
79
- const o = (await ge(e)).get(n.replace(/^\/+/, ""));
77
+ async function te(e, t) {
78
+ if (xe(e)) {
79
+ const o = (await Ee(e)).get(t.replace(/^\/+/, ""));
80
80
  if (o !== void 0)
81
81
  return new TextEncoder().encode(o);
82
82
  }
83
- const t = `${e.replace(/\/+$/, "")}/`;
83
+ const n = `${e.replace(/\/+$/, "")}/`;
84
84
  let r;
85
85
  try {
86
- r = new URL(n.replace(/^\/+/, ""), t);
86
+ r = new URL(t.replace(/^\/+/, ""), n);
87
87
  } catch {
88
88
  return;
89
89
  }
90
- if (!r.href.startsWith(t)) {
90
+ if (!r.href.startsWith(n)) {
91
91
  console.error(
92
- `pretext-html: refusing to serve ${n} from outside ${e}`
92
+ `pretext-html: refusing to serve ${t} from outside ${e}`
93
93
  );
94
94
  return;
95
95
  }
@@ -100,56 +100,78 @@ async function ee(e, n) {
100
100
  return;
101
101
  }
102
102
  }
103
- async function R(e) {
103
+ async function P(e) {
104
104
  if (/^[a-z][a-z0-9+.-]*:\/\//i.test(e))
105
105
  try {
106
- const n = await fetch(e);
107
- return n.ok ? await n.text() : void 0;
106
+ const t = await fetch(e);
107
+ return t.ok ? await t.text() : void 0;
108
108
  } catch {
109
109
  return;
110
110
  }
111
111
  }
112
- const j = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map();
113
- let P, ye = 0, ne = ee;
114
- function Qe(e) {
115
- ne = e;
112
+ const Te = "born-hidden-knowl", $e = /<details\b([^>]*)>(\s*)(?:<summary\b([^>]*)>)?/g;
113
+ function Se(e) {
114
+ const t = /\bclass="([^"]*)"/.exec(e);
115
+ return t ? t[1].trim().split(/\s+/) : [];
116
+ }
117
+ function _e(e) {
118
+ return /(^|\s)open(\s|=|$)/.test(e);
119
+ }
120
+ function N(e) {
121
+ return _e(e) ? e : ` open${e}`;
122
+ }
123
+ function ke(e) {
124
+ return e.replace(
125
+ $e,
126
+ (t, n, r, i) => {
127
+ if (!Se(n).includes(Te))
128
+ return t;
129
+ const o = `<details${N(n)}>`;
130
+ return i === void 0 ? `${o}${r}` : `${o}${r}<summary${N(i)}>`;
131
+ }
132
+ );
116
133
  }
117
- function ve(e, n) {
118
- const t = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, r = te.get(t);
134
+ const C = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Map();
135
+ let L, Ie = 0, re = te;
136
+ function _t(e) {
137
+ re = e;
138
+ }
139
+ function Re(e, t) {
140
+ const n = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, r = ne.get(n);
119
141
  if (r !== void 0)
120
142
  return Promise.resolve(new Response(r, { status: 200 }));
121
143
  let i;
122
144
  try {
123
- i = new URL(t).host;
145
+ i = new URL(n).host;
124
146
  } catch {
125
147
  i = "";
126
148
  }
127
- const o = j.get(i);
128
- return o !== void 0 ? Ee(o, t) : P(e, n);
149
+ const o = C.get(i);
150
+ return o !== void 0 ? De(o, n) : L(e, t);
129
151
  }
130
- const xe = '<?xml version="1.0"?><pretext-preview-missing-file/>';
131
- async function Ee(e, n) {
132
- const t = decodeURIComponent(new URL(n).pathname), r = await ne(e, t);
152
+ const Me = '<?xml version="1.0"?><pretext-preview-missing-file/>';
153
+ async function De(e, t) {
154
+ const n = decodeURIComponent(new URL(t).pathname), r = await re(e, n);
133
155
  if (r === void 0)
134
- return new Response(xe, { status: 200 });
156
+ return new Response(Me, { status: 200 });
135
157
  const i = typeof r == "string" ? r : new Uint8Array(r);
136
158
  return new Response(i, { status: 200 });
137
159
  }
138
- function re() {
139
- P || (P = globalThis.fetch, globalThis.fetch = ve);
160
+ function ie() {
161
+ L || (L = globalThis.fetch, globalThis.fetch = Re);
140
162
  }
141
- function ie(e) {
142
- re();
143
- const n = `mnt${++ye}.ptx.invalid`;
144
- return j.set(n, e), `http://${n}`;
163
+ function oe(e) {
164
+ ie();
165
+ const t = `mnt${++Ie}.ptx.invalid`;
166
+ return C.set(t, e), `http://${t}`;
145
167
  }
146
- function Te(e) {
147
- j.delete(new URL(e).host);
168
+ function Le(e) {
169
+ C.delete(new URL(e).host);
148
170
  }
149
- function $e(e, n) {
150
- re(), te.set(e, n);
171
+ function Ae(e, t) {
172
+ ie(), ne.set(e, t);
151
173
  }
152
- const L = `<?xml version="1.0" encoding="UTF-8"?>
174
+ const A = `<?xml version="1.0" encoding="UTF-8"?>
153
175
  <publication>
154
176
  <source>
155
177
  <directories external="../assets" generated="../generated-assets" />
@@ -158,43 +180,62 @@ const L = `<?xml version="1.0" encoding="UTF-8"?>
158
180
  <platform portable="yes"/>
159
181
  </html>
160
182
  </publication>
161
- `, Me = ["theme", "style", "shell"];
162
- function w(e, n) {
163
- for (const t of e.children)
164
- if (t.type === "element" && t.name === n)
165
- return t;
166
- }
167
- function F(e, n) {
168
- let t = w(e, n);
169
- return t || (t = { type: "element", name: n, attributes: {}, children: [] }, e.children.push(t)), t;
170
- }
171
- function ke(e, n) {
172
- const t = w(e, "css");
173
- if (t && Me.some((i) => t.attributes?.[i]))
183
+ `, Pe = ["theme", "style", "shell"];
184
+ function w(e, t) {
185
+ for (const n of e.children)
186
+ if (n.type === "element" && n.name === t)
187
+ return n;
188
+ }
189
+ function g(e, t) {
190
+ let n = w(e, t);
191
+ return n || (n = { type: "element", name: t, attributes: {}, children: [] }, e.children.push(n)), n;
192
+ }
193
+ function Ce(e, t) {
194
+ const n = w(e, "css");
195
+ if (n && Pe.some((i) => n.attributes?.[i]))
196
+ return;
197
+ const r = n ?? g(e, "css");
198
+ r.attributes = { ...r.attributes, theme: t };
199
+ }
200
+ function je(e, t) {
201
+ const n = w(e, "appearance");
202
+ if (n?.attributes?.theme)
174
203
  return;
175
- const r = t ?? F(e, "css");
176
- r.attributes = { ...r.attributes, theme: n };
177
- }
178
- function De(e, n) {
179
- const t = n?.trim();
180
- if (!e && !t)
181
- return L;
182
- const r = x(e ?? L), i = w(r, "publication");
183
- if (!i)
204
+ const r = n ?? g(e, "appearance");
205
+ r.attributes = { ...r.attributes, theme: t };
206
+ }
207
+ function Fe(e) {
208
+ const t = g(e, "resources");
209
+ t.attributes = {
210
+ ...t.attributes,
211
+ host: "cdn",
212
+ math: "online"
213
+ };
214
+ }
215
+ function Oe(e, t = {}) {
216
+ const n = t.cssTheme?.trim(), r = t.revealTheme?.trim(), i = t.target === "slides";
217
+ if (!e && !n && !i)
218
+ return A;
219
+ const o = E(e ?? A), s = w(o, "publication");
220
+ if (!s)
184
221
  throw new Error(
185
222
  "Invalid publication file: no root <publication> element found"
186
223
  );
187
- const o = F(i, "html"), s = F(o, "platform");
188
- return s.attributes = { ...s.attributes, portable: "yes" }, t && ke(o, t), T(r);
224
+ const a = g(s, "html"), u = g(a, "platform");
225
+ if (u.attributes = { ...u.attributes, portable: "yes" }, n && Ce(a, n), i) {
226
+ const l = g(s, "revealjs");
227
+ Fe(l), r && je(l, r);
228
+ }
229
+ return $(o);
189
230
  }
190
- function N(e) {
231
+ function V(e) {
191
232
  if (!(e === void 0 || e === "" || e.startsWith("/")))
192
233
  return e.endsWith("/") ? e : `${e}/`;
193
234
  }
194
- function Se(e) {
195
- const n = x(e ?? L), t = w(n, "publication"), r = t && w(t, "source"), i = r && w(r, "directories"), o = N(
235
+ function We(e) {
236
+ const t = E(e ?? A), n = w(t, "publication"), r = n && w(n, "source"), i = r && w(r, "directories"), o = V(
196
237
  i?.attributes?.external ?? void 0
197
- ), s = N(
238
+ ), s = V(
198
239
  i?.attributes?.generated ?? void 0
199
240
  );
200
241
  return {
@@ -203,59 +244,163 @@ function Se(e) {
203
244
  managed: o !== void 0 && s !== void 0
204
245
  };
205
246
  }
206
- const oe = "http://www.w3.org/2001/XInclude", z = 64;
207
- async function Ie(e, n, t) {
208
- return e.includes("include") ? (await se(e, n, t)).content : e;
247
+ function kt(e) {
248
+ return e === "slides" || e === "scroll";
209
249
  }
210
- async function se(e, n, t) {
211
- const r = x(e), i = {
212
- projectDir: f(t),
213
- stack: [f(n)]
214
- }, o = await v(
250
+ const se = 960, ae = 700, Be = 1, Xe = 0.04;
251
+ function He(e) {
252
+ const t = typeof e == "number" && isFinite(e) ? e : Be, n = Math.min(1, Math.max(0.25, t));
253
+ return {
254
+ width: Math.round(se / n),
255
+ height: Math.round(ae / n)
256
+ };
257
+ }
258
+ function Ue(e) {
259
+ return {
260
+ view: "scroll",
261
+ scrollLayout: "compact",
262
+ scrollSnap: !1,
263
+ scrollProgress: !0,
264
+ fragments: !1,
265
+ controls: !1,
266
+ controlsTutorial: !1,
267
+ hash: !1,
268
+ ...He(e.zoom),
269
+ margin: Xe
270
+ };
271
+ }
272
+ function Ne() {
273
+ return {
274
+ // Explicitly null rather than absent: the same page may have been
275
+ // delivered in scroll view a moment ago, and an embedder that re-injects
276
+ // over already-injected HTML would otherwise leave the old value standing.
277
+ view: null,
278
+ // See scrollViewConfig; the webview objection to hash applies either way.
279
+ hash: !1,
280
+ // The nominal size matters just as much here: a deck previewed at pane
281
+ // size with a percentage width renders its text far larger, relative to
282
+ // the slide, than the same deck will on a projector. No zoom margin
283
+ // though — presenting means filling whatever it is shown in.
284
+ width: se,
285
+ height: ae
286
+ };
287
+ }
288
+ const Ve = [
289
+ "<style>",
290
+ ".reveal-viewport.reveal-scroll .scroll-page section {",
291
+ " box-shadow: inset 0 0 0 calc(1px / var(--slide-scale, 1))",
292
+ " rgba(128, 128, 128, 0.5);",
293
+ "}",
294
+ "</style>"
295
+ ].join(`
296
+ `), ze = [
297
+ " var paused = document.querySelectorAll('.reveal .fragment');",
298
+ " for (var i = 0; i < paused.length; i++) {",
299
+ " paused[i].classList.remove('fragment');",
300
+ " }"
301
+ ];
302
+ function Je(e, t = {}) {
303
+ const n = e === "scroll" ? Ue(t) : Ne();
304
+ return [
305
+ "<script>",
306
+ "(function () {",
307
+ " var OVERRIDES = " + JSON.stringify(n) + ";",
308
+ // Nothing to wrap if reveal.js failed to load (offline, CDN blocked). The
309
+ // deck is broken either way, but throwing here would replace the browser's
310
+ // useful network error with a confusing one from an injected script.
311
+ " if (typeof Reveal === 'undefined' || !Reveal.initialize) { return; }",
312
+ // Guard against double-wrapping: an embedder may inject into HTML that was
313
+ // already injected into, and wrapping a wrapper would still work but grows
314
+ // a chain on every redelivery.
315
+ " if (Reveal.__ptxViewWrapped) {",
316
+ " Reveal.__ptxViewOverrides = OVERRIDES;",
317
+ " return;",
318
+ " }",
319
+ " Reveal.__ptxViewWrapped = true;",
320
+ " Reveal.__ptxViewOverrides = OVERRIDES;",
321
+ " var initialize = Reveal.initialize.bind(Reveal);",
322
+ " Reveal.initialize = function (config) {",
323
+ " var merged = {};",
324
+ " var key;",
325
+ " for (key in config || {}) { merged[key] = config[key]; }",
326
+ " var o = Reveal.__ptxViewOverrides;",
327
+ " for (key in o) { merged[key] = o[key]; }",
328
+ // Inside the wrapper rather than at top level: this script sits in <head>,
329
+ // where the slides have not been parsed yet, but the deck calls initialize
330
+ // from the end of the document, by which time they have.
331
+ ...e === "scroll" ? ze : [],
332
+ " return initialize(merged);",
333
+ " };",
334
+ "})();",
335
+ "<\/script>"
336
+ ].join(`
337
+ `);
338
+ }
339
+ const Ge = /<script\b[^>]*\bsrc=["'][^"']*\breveal\.js["'][^>]*>\s*<\/script>/i, Ke = "<!--ptx-reveal-view-->", Ye = "<!--/ptx-reveal-view-->", qe = /\n?<!--ptx-reveal-view-->[\s\S]*?<!--\/ptx-reveal-view-->/;
340
+ function Ze(e, t, n = {}) {
341
+ const r = qe.exec(e), i = r ? e.slice(0, r.index) + e.slice(r.index + r[0].length) : e, o = Ge.exec(i);
342
+ if (!o)
343
+ return i;
344
+ const s = o.index + o[0].length, a = `
345
+ ${Ke}
346
+ ${Ve}
347
+ ${Je(t, n)}
348
+ ${Ye}`;
349
+ return i.slice(0, s) + a + i.slice(s);
350
+ }
351
+ const ce = "http://www.w3.org/2001/XInclude", z = 64;
352
+ async function Qe(e, t, n) {
353
+ return e.includes("include") ? (await le(e, t, n)).content : e;
354
+ }
355
+ async function le(e, t, n) {
356
+ const r = E(e), i = {
357
+ projectDir: h(n),
358
+ stack: [h(t)]
359
+ }, o = await y(
215
360
  r,
216
- y(f(n)),
361
+ b(h(t)),
217
362
  { "": "" },
218
363
  i
219
364
  );
220
- return { tree: r, content: o ? T(r) : e };
365
+ return { tree: r, content: o ? $(r) : e };
221
366
  }
222
- function Ae(e) {
367
+ function et(e) {
223
368
  return e.data?.ptxIncludedFile;
224
369
  }
225
- function _e(e, n) {
226
- const t = e.data ?? (e.data = {});
227
- t.ptxIncludedFile = n;
370
+ function tt(e, t) {
371
+ const n = e.data ?? (e.data = {});
372
+ n.ptxIncludedFile = t;
228
373
  }
229
- function M(e, n) {
230
- let t = e;
231
- for (const [r, i] of Object.entries(n.attributes))
232
- (r === "xmlns" || r.startsWith("xmlns:")) && (t === e && (t = { ...e }), t[r === "xmlns" ? "" : r.slice(6)] = i ?? "");
233
- return t;
374
+ function _(e, t) {
375
+ let n = e;
376
+ for (const [r, i] of Object.entries(t.attributes))
377
+ (r === "xmlns" || r.startsWith("xmlns:")) && (n === e && (n = { ...e }), n[r === "xmlns" ? "" : r.slice(6)] = i ?? "");
378
+ return n;
234
379
  }
235
- function ae(e, n) {
236
- const t = e.name.indexOf(":"), r = t === -1 ? "" : e.name.slice(0, t);
237
- return (t === -1 ? e.name : e.name.slice(t + 1)) === "include" && n[r] === oe;
380
+ function ue(e, t) {
381
+ const n = e.name.indexOf(":"), r = n === -1 ? "" : e.name.slice(0, n);
382
+ return (n === -1 ? e.name : e.name.slice(n + 1)) === "include" && t[r] === ce;
238
383
  }
239
- async function v(e, n, t, r) {
384
+ async function y(e, t, n, r) {
240
385
  let i = !1;
241
386
  for (let o = 0; o < e.children.length; o++) {
242
387
  const s = e.children[o];
243
388
  if (s.type !== "element")
244
389
  continue;
245
- const a = M(t, s);
246
- if (ae(s, a)) {
247
- const u = await ce(
390
+ const a = _(n, s);
391
+ if (ue(s, a)) {
392
+ const u = await de(
248
393
  s,
249
- n,
394
+ t,
250
395
  a,
251
396
  r
252
397
  );
253
398
  e.children.splice(o, 1, ...u), o += u.length - 1, i = !0;
254
- } else await v(s, n, a, r) && (i = !0);
399
+ } else await y(s, t, a, r) && (i = !0);
255
400
  }
256
401
  return i;
257
402
  }
258
- async function ce(e, n, t, r) {
403
+ async function de(e, t, n, r) {
259
404
  const i = r.stack[r.stack.length - 1];
260
405
  if (e.attributes.xpointer)
261
406
  throw new Error(
@@ -269,8 +414,8 @@ async function ce(e, n, t, r) {
269
414
  s = decodeURIComponent(o);
270
415
  } catch {
271
416
  }
272
- const a = f(n, s);
273
- if (a !== r.projectDir && !a.startsWith(r.projectDir + _))
417
+ const a = h(t, s);
418
+ if (a !== r.projectDir && !a.startsWith(r.projectDir + D))
274
419
  throw new Error(
275
420
  `xi:include escapes the project directory: ${o} (in ${i})`
276
421
  );
@@ -280,67 +425,67 @@ async function ce(e, n, t, r) {
280
425
  );
281
426
  if (r.stack.length >= z)
282
427
  throw new Error(`xi:include nesting exceeds ${z} levels`);
283
- const u = await R(a);
428
+ const u = await P(a);
284
429
  if (u === void 0) {
285
- const d = Le(e, t);
286
- if (d)
287
- return await v(d, n, t, r), d.children;
430
+ const f = rt(e, n);
431
+ if (f)
432
+ return await y(f, t, n, r), f.children;
288
433
  throw new Error(`xi:include target not found: ${o} (in ${i})`);
289
434
  }
290
435
  if (e.attributes.parse === "text")
291
436
  return [{ type: "text", value: u }];
292
- let c;
437
+ let l;
293
438
  try {
294
- c = x(u);
295
- } catch (d) {
439
+ l = E(u);
440
+ } catch (f) {
296
441
  throw new Error(
297
- `Could not parse xi:include target ${a} as XML: ${d instanceof Error ? d.message : d}. (Included files must be well-formed, with a single root element.)`
442
+ `Could not parse xi:include target ${a} as XML: ${f instanceof Error ? f.message : f}. (Included files must be well-formed, with a single root element.)`
298
443
  );
299
444
  }
300
445
  r.stack.push(a);
301
446
  try {
302
- await v(c, y(a), { "": "" }, r);
447
+ await y(l, b(a), { "": "" }, r);
303
448
  } finally {
304
449
  r.stack.pop();
305
450
  }
306
- const h = c.children.filter(
307
- (d) => d.type === "element"
451
+ const d = l.children.filter(
452
+ (f) => f.type === "element"
308
453
  );
309
- for (const d of h)
310
- _e(d, a);
311
- return h;
454
+ for (const f of d)
455
+ tt(f, a);
456
+ return d;
312
457
  }
313
458
  function J(e) {
314
459
  return e.name === "docinfo";
315
460
  }
316
- async function Pe(e, n, t) {
461
+ async function nt(e, t, n) {
317
462
  try {
318
- const i = x(e).children.find(
319
- (c) => c.type === "element"
463
+ const i = E(e).children.find(
464
+ (l) => l.type === "element"
320
465
  );
321
466
  if (!i)
322
467
  return;
323
- const o = f(n), s = y(o), a = {
324
- projectDir: f(t),
468
+ const o = h(t), s = b(o), a = {
469
+ projectDir: h(n),
325
470
  stack: [o]
326
- }, u = M({ "": "" }, i);
327
- for (const c of i.children) {
328
- if (c.type !== "element")
471
+ }, u = _({ "": "" }, i);
472
+ for (const l of i.children) {
473
+ if (l.type !== "element")
329
474
  continue;
330
- const h = M(u, c);
331
- if (J(c))
332
- return await v(c, s, h, a), T(c);
333
- if (ae(c, h)) {
334
- const g = (await ce(
335
- c,
475
+ const d = _(u, l);
476
+ if (J(l))
477
+ return await y(l, s, d, a), $(l);
478
+ if (ue(l, d)) {
479
+ const p = (await de(
480
+ l,
336
481
  s,
337
- h,
482
+ d,
338
483
  a
339
484
  )).find(
340
485
  (m) => m.type === "element" && J(m)
341
486
  );
342
- if (g)
343
- return T(g);
487
+ if (p)
488
+ return $(p);
344
489
  continue;
345
490
  }
346
491
  break;
@@ -350,37 +495,37 @@ async function Pe(e, n, t) {
350
495
  return;
351
496
  }
352
497
  }
353
- function Le(e, n) {
354
- for (const t of e.children) {
355
- if (t.type !== "element")
498
+ function rt(e, t) {
499
+ for (const n of e.children) {
500
+ if (n.type !== "element")
356
501
  continue;
357
- const r = M(n, t), i = t.name.indexOf(":"), o = i === -1 ? "" : t.name.slice(0, i);
358
- if ((i === -1 ? t.name : t.name.slice(i + 1)) === "fallback" && r[o] === oe)
359
- return t;
502
+ const r = _(t, n), i = n.name.indexOf(":"), o = i === -1 ? "" : n.name.slice(0, i);
503
+ if ((i === -1 ? n.name : n.name.slice(i + 1)) === "fallback" && r[o] === ce)
504
+ return n;
360
505
  }
361
506
  }
362
- function le(e) {
507
+ function fe(e) {
363
508
  return typeof e == "object" && e !== null && e.type === "element";
364
509
  }
365
- function Fe(e) {
510
+ function it(e) {
366
511
  return /^(pf|xhtml):/.test(e.name);
367
512
  }
368
- function Re(e, n, t) {
369
- const r = [], i = e.children.find(le);
513
+ function ot(e, t, n) {
514
+ const r = [], i = e.children.find(fe);
370
515
  if (i) {
371
- const o = t?.parentId ?? "root";
372
- ue(i, o, t?.position ?? 1, n, o, r);
516
+ const o = n?.parentId ?? "root";
517
+ he(i, o, n?.position ?? 1, t, o, r);
373
518
  }
374
519
  return r;
375
520
  }
376
- function ue(e, n, t, r, i, o) {
377
- const s = Ae(e) ?? r;
521
+ function he(e, t, n, r, i, o) {
522
+ const s = et(e) ?? r;
378
523
  let a, u;
379
- if (Fe(e))
524
+ if (it(e))
380
525
  u = "root";
381
526
  else {
382
- const h = e.attributes.label ?? e.attributes["xml:id"];
383
- a = h ?? `${n}-${t}`, o.push({
527
+ const d = e.attributes.label ?? e.attributes["xml:id"];
528
+ a = d ?? `${t}-${n}`, o.push({
384
529
  id: a,
385
530
  file: s,
386
531
  line: e.position?.start.line ?? 1,
@@ -389,35 +534,39 @@ function ue(e, n, t, r, i, o) {
389
534
  parent: i
390
535
  }), u = a;
391
536
  }
392
- let c = 0;
393
- for (const h of e.children)
394
- le(h) && (c += 1, ue(
395
- h,
537
+ let l = 0;
538
+ for (const d of e.children)
539
+ fe(d) && (l += 1, he(
540
+ d,
396
541
  u,
397
- c,
542
+ l,
398
543
  s,
399
544
  a ?? i,
400
545
  o
401
546
  ));
402
547
  }
403
- function Ze(e, n) {
404
- let t;
548
+ function It(e, t) {
549
+ let n;
405
550
  for (const r of e)
406
- r.line <= n && (t = r);
407
- return t ?? e[0];
551
+ r.line <= t && (n = r);
552
+ return n ?? e[0];
408
553
  }
409
- const de = "pretext-html:set-theme";
410
- function et(e) {
554
+ function st(e) {
555
+ const t = e.replace(/<!--[\s\S]*?-->/g, " ").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g, " ");
556
+ return /<\s*slide(?:show)?[\s/>]/.test(t) ? "slides" : "html";
557
+ }
558
+ const pe = "pretext-html:set-theme";
559
+ function Rt(e) {
411
560
  return e === "dark" || e === "light" || e === "system";
412
561
  }
413
- function tt(e) {
414
- return { type: de, theme: e };
562
+ function Mt(e) {
563
+ return { type: pe, theme: e };
415
564
  }
416
- function je(e) {
565
+ function at(e) {
417
566
  return [
418
567
  "<script>",
419
568
  "(function () {",
420
- " var CFG = " + JSON.stringify({ msg: de, initial: e }) + ";",
569
+ " var CFG = " + JSON.stringify({ msg: pe, initial: e }) + ";",
421
570
  // Where the last requested theme is remembered so it survives an in-place
422
571
  // document rewrite (same Window) and outranks the baked initial value.
423
572
  " var KEY = '__ptxPreviewTheme';",
@@ -487,224 +636,244 @@ function je(e) {
487
636
  ].join(`
488
637
  `);
489
638
  }
490
- function We(e, n) {
491
- const t = je(n);
639
+ function ct(e, t) {
640
+ const n = at(t);
492
641
  return /<head[^>]*>/i.test(e) ? e.replace(/<head([^>]*)>/i, `<head$1>
493
- ${t}`) : e;
642
+ ${n}`) : e;
494
643
  }
495
- function Be() {
496
- return Z($(), "xsl");
644
+ function lt() {
645
+ return ee(S(), "xsl");
497
646
  }
498
- function Ce() {
647
+ function ut() {
499
648
  return "Suspending" in WebAssembly;
500
649
  }
501
- function Xe() {
502
- if (!Ce())
650
+ function dt() {
651
+ if (!ut())
503
652
  throw new Error(
504
653
  "WebAssembly JSPI is not enabled. Run Node with --experimental-wasm-jspi (or use the pretext-html CLI, which re-launches itself with the flag)."
505
654
  );
506
655
  }
507
- function Y(e) {
508
- return e.includes("'") ? e.includes('"') ? `concat(${e.split("'").map((t) => `'${t}'`).join(`, "'", `)})` : `"${e}"` : `'${e}'`;
656
+ function G(e) {
657
+ return e.includes("'") ? e.includes('"') ? `concat(${e.split("'").map((n) => `'${n}'`).join(`, "'", `)})` : `"${e}"` : `'${e}'`;
509
658
  }
510
- function Ue(e) {
659
+ function ft(e) {
511
660
  return e.replace(
512
661
  /from '\.\/(https:\/\/[^']+)'/g,
513
- (n, t) => `from '${t}'`
662
+ (t, n) => `from '${n}'`
514
663
  );
515
664
  }
516
- function He(e) {
665
+ const ht = "https://cdn.jsdelivr.net/gh/PreTeXtBook/html-static@latest/dist/";
666
+ function pt(e) {
667
+ return e.replace(
668
+ /(<link\b[^>]*\bhref=["'])_static\//gi,
669
+ `$1${ht}_static/`
670
+ );
671
+ }
672
+ function mt(e) {
517
673
  return e.slice(0, 65536).replace(/<\?[\s\S]*?\?>/g, " ").replace(/<!--[\s\S]*?-->/g, " ").replace(/<!DOCTYPE[^>]*>/gi, " ").match(/<\s*([A-Za-z][\w:-]*)/)?.[1];
518
674
  }
519
- async function G(e) {
520
- const n = await R(e);
521
- if (n === void 0)
675
+ async function K(e) {
676
+ const t = await P(e);
677
+ if (t === void 0)
522
678
  throw new Error(
523
679
  `Could not read ${e}. (In the browser build only absolute URLs are readable — pass sourceContent instead of relying on sourcePath.)`
524
680
  );
525
- return n;
681
+ return t;
526
682
  }
527
- async function Oe(e, n) {
528
- const t = f(e), r = await R(t);
683
+ async function wt(e, t) {
684
+ const n = h(e), r = await P(n);
529
685
  if (r !== void 0)
530
- return Pe(r, t, n);
686
+ return nt(r, n, t);
531
687
  }
532
- function Ne(e, n, t) {
533
- const r = e.replace(/^\uFEFF/, "").replace(/<\?xml[\s\S]*?\?>/, "").replace(/<!DOCTYPE[^>]*>/i, ""), i = n === "chapter" || n === "part" ? "book" : "article";
688
+ function gt(e, t, n, r) {
689
+ const i = e.replace(/^\uFEFF/, "").replace(/<\?xml[\s\S]*?\?>/, "").replace(/<!DOCTYPE[^>]*>/i, ""), o = n === "slides" ? "slideshow" : t === "chapter" || t === "part" ? "book" : "article";
534
690
  return `<pretext>
535
- ${t?.trim() ? `${t.trim()}
536
- ` : ""}<${i}>
691
+ ${r?.trim() ? `${r.trim()}
692
+ ` : ""}<${o}>
537
693
  <title/>
538
- ${r}
539
- </${i}>
694
+ ${i}
695
+ </${o}>
540
696
  </pretext>
541
697
  `;
542
698
  }
543
- let fe = !1;
544
- function ze(e) {
699
+ let me = !1;
700
+ function vt(e) {
545
701
  return e instanceof Error && /\bAborted\(/.test(e.message);
546
702
  }
547
- function Je(e) {
703
+ function bt(e) {
548
704
  return e instanceof Error && /memory access|out of bounds/i.test(e.message);
549
705
  }
550
- function Ye() {
551
- if (fe)
706
+ function yt() {
707
+ if (me)
552
708
  throw new Error(
553
709
  "The WebAssembly renderer aborted earlier in this process and cannot be reused. Restart the process (or reload the page) to render again."
554
710
  );
555
711
  }
556
- function K(e) {
557
- if (ze(e))
558
- throw fe = !0, new Error(
712
+ function Y(e) {
713
+ if (vt(e))
714
+ throw me = !0, new Error(
559
715
  "The WebAssembly renderer aborted and cannot be reused. Restart the process (or reload the page) to render again.",
560
716
  { cause: e }
561
717
  );
562
- if (Je(e))
718
+ if (bt(e))
563
719
  throw new Error(
564
720
  "The WebAssembly renderer hit a memory fault. Most often the document is too large for this build's stack — whole-book builds are a known limitation, so try a smaller document, or see the README about rebuilding libxslt-wasm with a larger stack. The same fault also results from running two renders concurrently against the shared libxslt state.",
565
721
  { cause: e }
566
722
  );
567
723
  }
568
- let I;
569
- async function he() {
570
- return I || (I = (async () => {
571
- const [e, n] = await Promise.all([
724
+ let R;
725
+ async function we() {
726
+ return R || (R = (async () => {
727
+ const [e, t] = await Promise.all([
572
728
  import("@pretextbook/libxslt-wasm"),
573
729
  import("@pretextbook/libxslt-wasm/exslt")
574
730
  ]);
575
- return n.registerAll(), e;
576
- })()), I;
731
+ return t.registerAll(), e;
732
+ })()), R;
577
733
  }
578
- const A = /* @__PURE__ */ new Map();
579
- async function Ge(e) {
580
- const n = e;
581
- let t = A.get(n);
582
- return t || (t = (async () => {
583
- const { XmlDocument: r, XsltStylesheet: i } = await he(), o = ie(n), s = await ee(
584
- $(),
585
- "/preview-html.xsl"
586
- );
587
- if (s === void 0)
734
+ const M = /* @__PURE__ */ new Map(), Et = {
735
+ html: "preview-html.xsl",
736
+ slides: "preview-revealjs.xsl"
737
+ };
738
+ async function xt(e, t) {
739
+ const n = Et[t], r = `${t}\0${e}`;
740
+ let i = M.get(r);
741
+ return i || (i = (async () => {
742
+ const { XmlDocument: o, XsltStylesheet: s } = await we(), a = oe(e), u = await te(S(), `/${n}`);
743
+ if (u === void 0)
588
744
  throw new Error(
589
- `Could not read preview-html.xsl from ${$()}. Check the assets location (PRETEXT_HTML_ASSETS under Node, setAssetsBase() in the browser).`
745
+ `Could not read ${n} from ${S()}. Check the assets location (PRETEXT_HTML_ASSETS under Node, setAssetsBase() in the browser).`
590
746
  );
591
- const a = new TextDecoder().decode(s), u = await r.fromString(a, {
592
- url: `${o}/preview-html.xsl`,
747
+ const l = new TextDecoder().decode(u), d = await o.fromString(l, {
748
+ url: `${a}/${n}`,
593
749
  options: { noEnt: !0, dtdLoad: !0, huge: !0 }
594
750
  });
595
- return i.fromXmlDocument(u);
596
- })(), A.set(n, t), t.catch(() => A.delete(n))), t;
751
+ return s.fromXmlDocument(d);
752
+ })(), M.set(r, i), i.catch(() => M.delete(r))), i;
597
753
  }
598
754
  let q = Promise.resolve();
599
- function nt(e) {
600
- const n = q.then(
601
- () => V(e),
602
- () => V(e)
755
+ function Dt(e) {
756
+ const t = q.then(
757
+ () => Z(e),
758
+ () => Z(e)
603
759
  );
604
- return q = n.catch(() => {
605
- }), n;
606
- }
607
- async function V(e) {
608
- Xe(), Ye();
609
- const { XmlDocument: n } = await he(), t = await Ge(e.xslDir ?? Be()), r = f(e.sourcePath), i = f(
610
- e.projectDir ?? y(r)
611
- ), o = e.sourceContent ?? await G(r), s = S(i, r);
612
- if (s.startsWith(".."))
760
+ return q = t.catch(() => {
761
+ }), t;
762
+ }
763
+ async function Z(e) {
764
+ dt(), yt();
765
+ const { XmlDocument: t } = await we(), n = h(e.sourcePath), r = h(
766
+ e.projectDir ?? b(n)
767
+ ), i = e.sourceContent ?? await K(n), o = I(r, n);
768
+ if (o.startsWith(".."))
613
769
  throw new Error(
614
- `sourcePath (${r}) must live inside projectDir (${i})`
770
+ `sourcePath (${n}) must live inside projectDir (${r})`
615
771
  );
616
- const a = S(
617
- i,
618
- f(e.mainSourcePath ?? r)
619
- ), u = a.startsWith("..") ? s : a, c = ie(i);
772
+ const s = I(
773
+ r,
774
+ h(e.mainSourcePath ?? n)
775
+ ), a = s.startsWith("..") ? o : s, u = oe(r);
620
776
  try {
621
- let h, d = `${c}/__pretext-preview-publication.xml`;
777
+ let l, d = `${u}/__pretext-preview-publication.xml`;
622
778
  if (e.publicationPath) {
623
- const l = f(e.publicationPath);
624
- h = await G(l);
625
- const b = S(i, l);
626
- b.startsWith("..") || (d = `${c}/${b.split(_).join("/")}`);
779
+ const c = h(e.publicationPath);
780
+ l = await K(c);
781
+ const v = I(r, c);
782
+ v.startsWith("..") || (d = `${u}/${v.split(D).join("/")}`);
627
783
  }
628
- const g = De(
629
- h,
630
- e.cssTheme
631
- );
632
- $e(d, g);
633
- const m = Se(g), W = y(f(i, u)), B = m.external !== void 0 && m.generated !== void 0 ? {
634
- external: f(W, m.external),
635
- generated: f(W, m.generated)
636
- } : void 0;
637
- let k, p;
784
+ let f, p;
638
785
  if (e.sourceMap) {
639
- const l = await se(
640
- o,
641
- r,
642
- i
786
+ const c = await le(
787
+ i,
788
+ n,
789
+ r
643
790
  );
644
- k = l.tree, p = l.content;
791
+ f = c.tree, p = c.content;
645
792
  } else
646
- p = await Ie(
647
- o,
648
- r,
649
- i
793
+ p = await Qe(
794
+ i,
795
+ n,
796
+ r
650
797
  );
651
- const E = He(p);
652
- let C = { parentId: "root", position: 1 };
653
- if (E !== "pretext" && E !== "mathbook")
798
+ const m = e.target ?? st(p), ge = await xt(e.xslDir ?? lt(), m), j = Oe(l, {
799
+ cssTheme: e.cssTheme,
800
+ revealTheme: e.revealTheme,
801
+ target: m
802
+ });
803
+ Ae(d, j);
804
+ const x = We(j), F = b(h(r, a)), O = x.external !== void 0 && x.generated !== void 0 ? {
805
+ external: h(F, x.external),
806
+ generated: h(F, x.generated)
807
+ } : void 0, T = mt(p);
808
+ let W = { parentId: "root", position: 1 };
809
+ if (T !== "pretext" && T !== "mathbook")
654
810
  if (e.fragment) {
655
- const l = e.docinfo ?? (e.docinfoSourcePath ? await Oe(e.docinfoSourcePath, i) : void 0);
656
- p = Ne(p, E, l), C = { parentId: l?.trim() ? "root-1-2" : "root-1-1", position: 2 };
811
+ const c = e.docinfo ?? (e.docinfoSourcePath ? await wt(e.docinfoSourcePath, r) : void 0);
812
+ p = gt(
813
+ p,
814
+ T,
815
+ m,
816
+ c
817
+ ), W = { parentId: c?.trim() ? "root-1-2" : "root-1-1", position: 2 };
657
818
  } else
658
819
  throw new Error(
659
- `The document root is <${E ?? "?"}>, not <pretext> — this looks like an xi:included fragment. Render the project's main source file instead, or pass the fragment option.`
820
+ `The document root is <${T ?? "?"}>, not <pretext> — this looks like an xi:included fragment. Render the project's main source file instead, or pass the fragment option.`
660
821
  );
661
- const X = k ? Re(k, r, C) : void 0, U = await n.fromString(p, {
662
- url: `${c}/${u.split(_).join("/")}`,
822
+ const B = f ? ot(f, n, W) : void 0, X = await t.fromString(p, {
823
+ url: `${u}/${a.split(D).join("/")}`,
663
824
  options: { noEnt: !0, dtdLoad: !0, huge: !0 }
664
825
  }), H = {
665
- publisher: Y(d)
826
+ publisher: G(d)
666
827
  };
667
- for (const [l, b] of Object.entries(e.stringParams ?? {}))
668
- H[l] = Y(b);
669
- let D;
828
+ for (const [c, v] of Object.entries(e.stringParams ?? {}))
829
+ H[c] = G(v);
830
+ let k;
670
831
  try {
671
- D = await t.apply(U, H);
672
- } catch (l) {
673
- throw K(l), new Error(
832
+ k = await ge.apply(X, H);
833
+ } catch (c) {
834
+ throw Y(c), new Error(
674
835
  "PreTeXt XSLT transform failed; see the PTX:ERROR/PTX:FATAL messages on stderr for details.",
675
- { cause: l }
836
+ { cause: c }
676
837
  );
677
838
  } finally {
678
- U.delete();
839
+ X.delete();
679
840
  }
680
841
  try {
681
- let l = Ue(D.toHtmlString());
682
- return e.theme && (l = We(l, e.theme)), {
683
- html: l,
684
- ...X ? { sourceMap: X } : {},
685
- ...B ? { assetDirs: B } : {}
842
+ let c = ft(k.toHtmlString());
843
+ return (e.openKnowls ?? !0) && (c = ke(c)), m === "slides" ? (c = pt(c), c = Ze(c, e.revealView ?? "scroll", {
844
+ zoom: e.revealZoom
845
+ })) : e.theme && (c = ct(c, e.theme)), {
846
+ html: c,
847
+ target: m,
848
+ ...B ? { sourceMap: B } : {},
849
+ ...O ? { assetDirs: O } : {}
686
850
  };
687
- } catch (l) {
688
- throw K(l), l;
851
+ } catch (c) {
852
+ throw Y(c), c;
689
853
  } finally {
690
- D.delete();
854
+ k.delete();
691
855
  }
692
856
  } finally {
693
- Te(c);
857
+ Le(u);
694
858
  }
695
859
  }
696
860
  export {
697
- de as PREVIEW_THEME_MESSAGE,
698
- Be as defaultXslDir,
699
- Ze as findSourceMapEntry,
700
- De as forcePortablePublication,
701
- We as injectThemeBridge,
702
- Ce as isJspiAvailable,
703
- et as isPreviewTheme,
704
- tt as previewThemeMessage,
705
- nt as renderHtml,
706
- Ve as setAssetsBase,
707
- Qe as setMountReader,
708
- je as themeBridgeScript,
709
- Y as xpathStringLiteral
861
+ pe as PREVIEW_THEME_MESSAGE,
862
+ lt as defaultXslDir,
863
+ st as detectRenderTarget,
864
+ It as findSourceMapEntry,
865
+ Oe as forcePortablePublication,
866
+ Ze as injectRevealBridge,
867
+ ct as injectThemeBridge,
868
+ ut as isJspiAvailable,
869
+ Rt as isPreviewTheme,
870
+ kt as isRevealView,
871
+ ke as openBornHiddenKnowls,
872
+ Mt as previewThemeMessage,
873
+ Dt as renderHtml,
874
+ Je as revealBridgeScript,
875
+ St as setAssetsBase,
876
+ _t as setMountReader,
877
+ at as themeBridgeScript,
878
+ G as xpathStringLiteral
710
879
  };