@pretextbook/pretext-html 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/preview-html.xsl +16 -0
- package/assets/upstream.json +1 -1
- package/assets/xsl/extract-dynamic.xsl +54 -3
- package/assets/xsl/extract-gdscript.xsl +61 -0
- package/assets/xsl/extract-sageplot.xsl +3 -0
- package/assets/xsl/localizations/it-IT.xml +37 -41
- package/assets/xsl/pretext-assembly.xsl +188 -24
- package/assets/xsl/pretext-beamer.xsl +57 -12
- package/assets/xsl/pretext-common.xsl +156 -28
- package/assets/xsl/pretext-epub.xsl +0 -5
- package/assets/xsl/pretext-fo.xsl +110 -48
- package/assets/xsl/pretext-html.xsl +147 -54
- package/assets/xsl/pretext-jupyter.xsl +1 -0
- package/assets/xsl/pretext-latex-classic.xsl +2 -2
- package/assets/xsl/pretext-latex-common.xsl +268 -134
- package/assets/xsl/pretext-latex.xsl +16 -6
- package/assets/xsl/pretext-numbers.xsl +10 -0
- package/assets/xsl/pretext-revealjs.xsl +68 -1
- package/assets/xsl/pretext-runestone-fitb.xsl +179 -84
- package/assets/xsl/pretext-runestone-static.xsl +72 -20
- package/assets/xsl/pretext-runestone.xsl +27 -4
- package/assets/xsl/pretext-text-utilities.xsl +7 -0
- package/assets/xsl/pretext-text.xsl +17 -0
- package/assets/xsl/publisher-variables.xsl +39 -0
- package/assets/xsl-bundle.json +1 -1
- package/dist/cli-BONFCRgl.js +1099 -0
- package/dist/cli.js +1 -1
- package/dist/html-static.d.ts +2 -2
- package/dist/index.browser.d.ts +4 -0
- package/dist/index.browser.js +607 -393
- package/dist/index.d.ts +4 -0
- package/dist/index.js +35 -30
- package/dist/renderer.d.ts +53 -0
- package/dist/skeleton.d.ts +41 -0
- package/dist/xrefs.d.ts +54 -0
- package/package.json +1 -1
- package/dist/cli-Bcn4t3B1.js +0 -871
package/dist/index.browser.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { fromXml as
|
|
2
|
-
import { toXml as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import { fromXml as T } from "xast-util-from-xml";
|
|
2
|
+
import { toXml as I } from "xast-util-to-xml";
|
|
3
|
+
const N = "/";
|
|
4
|
+
function ue(e) {
|
|
5
5
|
if (!e)
|
|
6
6
|
return ".";
|
|
7
7
|
const n = e.startsWith("/"), t = e.length > 1 && e.endsWith("/"), r = [];
|
|
8
|
-
for (const
|
|
9
|
-
if (!(!
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
r.length > 0 &&
|
|
8
|
+
for (const o of e.split("/"))
|
|
9
|
+
if (!(!o || o === ".")) {
|
|
10
|
+
if (o === "..") {
|
|
11
|
+
const s = r[r.length - 1];
|
|
12
|
+
r.length > 0 && s !== ".." ? r.pop() : n || r.push("..");
|
|
13
13
|
continue;
|
|
14
14
|
}
|
|
15
|
-
r.push(
|
|
15
|
+
r.push(o);
|
|
16
16
|
}
|
|
17
17
|
let i = r.join("/");
|
|
18
18
|
return n && (i = `/${i}`), i ? (t && !i.endsWith("/") && (i += "/"), i) : n ? "/" : ".";
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function h(...e) {
|
|
21
21
|
let n = "";
|
|
22
22
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
23
23
|
const i = e[r];
|
|
@@ -25,38 +25,42 @@ function p(...e) {
|
|
|
25
25
|
break;
|
|
26
26
|
}
|
|
27
27
|
n.startsWith("/") || (n = `/${n}`);
|
|
28
|
-
const t =
|
|
28
|
+
const t = ue(n);
|
|
29
29
|
return t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Be(...e) {
|
|
32
|
+
const n = e.filter(Boolean).join("/");
|
|
33
|
+
return n ? ue(n) : ".";
|
|
34
|
+
}
|
|
35
|
+
function E(e) {
|
|
32
36
|
const n = e.replace(/\/+$/, "");
|
|
33
37
|
if (!n)
|
|
34
38
|
return e.startsWith("/") ? "/" : ".";
|
|
35
39
|
const t = n.lastIndexOf("/");
|
|
36
40
|
return t < 0 ? "." : t === 0 ? "/" : n.slice(0, t);
|
|
37
41
|
}
|
|
38
|
-
function
|
|
39
|
-
const t =
|
|
42
|
+
function B(e, n) {
|
|
43
|
+
const t = h(e).split("/").filter(Boolean), r = h(n).split("/").filter(Boolean);
|
|
40
44
|
let i = 0;
|
|
41
45
|
for (; i < t.length && i < r.length && t[i] === r[i]; )
|
|
42
46
|
i += 1;
|
|
43
47
|
return [...new Array(t.length - i).fill(".."), ...r.slice(i)].join("/");
|
|
44
48
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
49
|
+
const je = "ptxPreviewBannerDismissed", Ce = "About live preview";
|
|
50
|
+
function Q(e) {
|
|
47
51
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
48
52
|
}
|
|
49
|
-
function
|
|
53
|
+
function Fe(e) {
|
|
50
54
|
return [
|
|
51
55
|
'<div id="ptx-preview-banner" class="ptx-preview-banner" role="note">',
|
|
52
|
-
` <span class="ptx-preview-banner-text">${
|
|
56
|
+
` <span class="ptx-preview-banner-text">${Q(e)}</span>`,
|
|
53
57
|
' <button type="button" class="ptx-preview-banner-dismiss" aria-label="Dismiss">×</button>',
|
|
54
58
|
"</div>",
|
|
55
|
-
`<button type="button" id="ptx-preview-banner-restore" class="ptx-preview-banner-restore" hidden>${
|
|
59
|
+
`<button type="button" id="ptx-preview-banner-restore" class="ptx-preview-banner-restore" hidden>${Q(Ce)}</button>`
|
|
56
60
|
].join(`
|
|
57
61
|
`);
|
|
58
62
|
}
|
|
59
|
-
function
|
|
63
|
+
function Ne() {
|
|
60
64
|
return [
|
|
61
65
|
"<style>",
|
|
62
66
|
".ptx-preview-banner {",
|
|
@@ -117,11 +121,11 @@ function Se() {
|
|
|
117
121
|
].join(`
|
|
118
122
|
`);
|
|
119
123
|
}
|
|
120
|
-
function
|
|
124
|
+
function We() {
|
|
121
125
|
return [
|
|
122
126
|
"<script>",
|
|
123
127
|
"(function () {",
|
|
124
|
-
" var KEY = " + JSON.stringify(
|
|
128
|
+
" var KEY = " + JSON.stringify(je) + ";",
|
|
125
129
|
' var banner = document.getElementById("ptx-preview-banner");',
|
|
126
130
|
' var restore = document.getElementById("ptx-preview-banner-restore");',
|
|
127
131
|
" if (!banner || !restore) { return; }",
|
|
@@ -158,39 +162,39 @@ function $e() {
|
|
|
158
162
|
].join(`
|
|
159
163
|
`);
|
|
160
164
|
}
|
|
161
|
-
const
|
|
162
|
-
function
|
|
163
|
-
const t =
|
|
165
|
+
const He = "<!--ptx-preview-banner-->", Ue = "<!--/ptx-preview-banner-->", Ve = /\n?<!--ptx-preview-banner-->[\s\S]*?<!--\/ptx-preview-banner-->/;
|
|
166
|
+
function Xe(e, n) {
|
|
167
|
+
const t = Ve.exec(e), r = t ? e.slice(0, t.index) + e.slice(t.index + t[0].length) : e;
|
|
164
168
|
if (!/<body[^>]*>/i.test(r))
|
|
165
169
|
return r;
|
|
166
170
|
const i = `
|
|
167
|
-
${
|
|
168
|
-
${
|
|
169
|
-
${
|
|
170
|
-
${
|
|
171
|
-
${
|
|
171
|
+
${He}
|
|
172
|
+
${Ne()}
|
|
173
|
+
${Fe(n.message)}
|
|
174
|
+
${We()}
|
|
175
|
+
${Ue}`;
|
|
172
176
|
return r.replace(/<body([^>]*)>/i, `<body$1>${i}`);
|
|
173
177
|
}
|
|
174
|
-
const
|
|
175
|
-
let
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
+
const ze = "https://cdn.jsdelivr.net/npm/@pretextbook/pretext-html@0.10.0/assets";
|
|
179
|
+
let fe;
|
|
180
|
+
function wn(e) {
|
|
181
|
+
fe = e.replace(/\/+$/, "");
|
|
178
182
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
183
|
+
function A() {
|
|
184
|
+
return fe ?? ze;
|
|
181
185
|
}
|
|
182
|
-
function
|
|
186
|
+
function pe(e, n) {
|
|
183
187
|
return `${e.replace(/\/+$/, "")}/${n.replace(/^\/+/, "")}`;
|
|
184
188
|
}
|
|
185
|
-
const
|
|
186
|
-
function
|
|
189
|
+
const ee = /* @__PURE__ */ new Map();
|
|
190
|
+
function Je(e) {
|
|
187
191
|
return `${e.replace(/\/+$/, "")}-bundle.json`;
|
|
188
192
|
}
|
|
189
|
-
function
|
|
190
|
-
let n =
|
|
193
|
+
function Ge(e) {
|
|
194
|
+
let n = ee.get(e);
|
|
191
195
|
return n || (n = (async () => {
|
|
192
196
|
try {
|
|
193
|
-
const t = await fetch(
|
|
197
|
+
const t = await fetch(Je(e));
|
|
194
198
|
if (!t.ok)
|
|
195
199
|
return /* @__PURE__ */ new Map();
|
|
196
200
|
const r = await t.json();
|
|
@@ -198,16 +202,16 @@ function Le(e) {
|
|
|
198
202
|
} catch {
|
|
199
203
|
return /* @__PURE__ */ new Map();
|
|
200
204
|
}
|
|
201
|
-
})(),
|
|
205
|
+
})(), ee.set(e, n)), n;
|
|
202
206
|
}
|
|
203
|
-
function
|
|
204
|
-
return e ===
|
|
207
|
+
function Ke(e) {
|
|
208
|
+
return e === pe(A(), "xsl");
|
|
205
209
|
}
|
|
206
|
-
async function
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
return new TextEncoder().encode(
|
|
210
|
+
async function he(e, n) {
|
|
211
|
+
if (Ke(e)) {
|
|
212
|
+
const o = (await Ge(e)).get(n.replace(/^\/+/, ""));
|
|
213
|
+
if (o !== void 0)
|
|
214
|
+
return new TextEncoder().encode(o);
|
|
211
215
|
}
|
|
212
216
|
const t = `${e.replace(/\/+$/, "")}/`;
|
|
213
217
|
let r;
|
|
@@ -229,7 +233,7 @@ async function ne(e, n) {
|
|
|
229
233
|
return;
|
|
230
234
|
}
|
|
231
235
|
}
|
|
232
|
-
async function
|
|
236
|
+
async function P(e) {
|
|
233
237
|
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(e))
|
|
234
238
|
try {
|
|
235
239
|
const n = await fetch(e);
|
|
@@ -238,42 +242,42 @@ async function C(e) {
|
|
|
238
242
|
return;
|
|
239
243
|
}
|
|
240
244
|
}
|
|
241
|
-
const
|
|
242
|
-
"prefix-runtime.
|
|
245
|
+
const me = "2.48.1", Ye = "8.2.4", qe = [
|
|
246
|
+
"prefix-runtime.40bd1420d3277749.bundle.js",
|
|
243
247
|
"prefix-926.5c7038c8ef173faf.bundle.js",
|
|
244
|
-
"prefix-runestone.
|
|
245
|
-
],
|
|
248
|
+
"prefix-runestone.b388362b5f43738a.bundle.js"
|
|
249
|
+
], Ze = [
|
|
246
250
|
"prefix-926.229729d09512acc9.css",
|
|
247
251
|
"prefix-runestone.8086b62682b271d1.css"
|
|
248
|
-
],
|
|
249
|
-
function
|
|
252
|
+
], Qe = "born-hidden-knowl", et = /<details\b([^>]*)>(\s*)(?:<summary\b([^>]*)>)?/g;
|
|
253
|
+
function tt(e) {
|
|
250
254
|
const n = /\bclass="([^"]*)"/.exec(e);
|
|
251
255
|
return n ? n[1].trim().split(/\s+/) : [];
|
|
252
256
|
}
|
|
253
|
-
function
|
|
257
|
+
function nt(e) {
|
|
254
258
|
return /(^|\s)open(\s|=|$)/.test(e);
|
|
255
259
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
260
|
+
function te(e) {
|
|
261
|
+
return nt(e) ? e : ` open${e}`;
|
|
258
262
|
}
|
|
259
|
-
function
|
|
263
|
+
function rt(e) {
|
|
260
264
|
return e.replace(
|
|
261
|
-
|
|
265
|
+
et,
|
|
262
266
|
(n, t, r, i) => {
|
|
263
|
-
if (!
|
|
267
|
+
if (!tt(t).includes(Qe))
|
|
264
268
|
return n;
|
|
265
|
-
const
|
|
266
|
-
return i === void 0 ? `${
|
|
269
|
+
const o = `<details${te(t)}>`;
|
|
270
|
+
return i === void 0 ? `${o}${r}` : `${o}${r}<summary${te(i)}>`;
|
|
267
271
|
}
|
|
268
272
|
);
|
|
269
273
|
}
|
|
270
|
-
const
|
|
271
|
-
let
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
+
const X = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
|
|
275
|
+
let W, it = 0, ve = he;
|
|
276
|
+
function vn(e) {
|
|
277
|
+
ve = e;
|
|
274
278
|
}
|
|
275
|
-
function
|
|
276
|
-
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, r =
|
|
279
|
+
function ot(e, n) {
|
|
280
|
+
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, r = we.get(t);
|
|
277
281
|
if (r !== void 0)
|
|
278
282
|
return Promise.resolve(new Response(r, { status: 200 }));
|
|
279
283
|
let i;
|
|
@@ -282,32 +286,32 @@ function He(e, n) {
|
|
|
282
286
|
} catch {
|
|
283
287
|
i = "";
|
|
284
288
|
}
|
|
285
|
-
const
|
|
286
|
-
return
|
|
289
|
+
const o = X.get(i);
|
|
290
|
+
return o !== void 0 ? ct(o, t) : W(e, n);
|
|
287
291
|
}
|
|
288
|
-
const
|
|
289
|
-
async function
|
|
290
|
-
const t = decodeURIComponent(new URL(n).pathname), r = await
|
|
292
|
+
const st = '<?xml version="1.0"?><pretext-preview-missing-file/>';
|
|
293
|
+
async function ct(e, n) {
|
|
294
|
+
const t = decodeURIComponent(new URL(n).pathname), r = await ve(e, t);
|
|
291
295
|
if (r === void 0)
|
|
292
|
-
return new Response(
|
|
296
|
+
return new Response(st, { status: 200 });
|
|
293
297
|
const i = typeof r == "string" ? r : new Uint8Array(r);
|
|
294
298
|
return new Response(i, { status: 200 });
|
|
295
299
|
}
|
|
296
|
-
function
|
|
297
|
-
|
|
300
|
+
function ge() {
|
|
301
|
+
W || (W = globalThis.fetch, globalThis.fetch = ot);
|
|
298
302
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
301
|
-
const n = `mnt${++
|
|
302
|
-
return
|
|
303
|
+
function be(e) {
|
|
304
|
+
ge();
|
|
305
|
+
const n = `mnt${++it}.ptx.invalid`;
|
|
306
|
+
return X.set(n, e), `http://${n}`;
|
|
303
307
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
308
|
+
function at(e) {
|
|
309
|
+
X.delete(new URL(e).host);
|
|
306
310
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
311
|
+
function lt(e, n) {
|
|
312
|
+
ge(), we.set(e, n);
|
|
309
313
|
}
|
|
310
|
-
const
|
|
314
|
+
const H = `<?xml version="1.0" encoding="UTF-8"?>
|
|
311
315
|
<publication>
|
|
312
316
|
<source>
|
|
313
317
|
<directories external="../assets" generated="../generated-assets" />
|
|
@@ -316,82 +320,82 @@ const B = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
316
320
|
<platform portable="yes"/>
|
|
317
321
|
</html>
|
|
318
322
|
</publication>
|
|
319
|
-
`,
|
|
320
|
-
function
|
|
323
|
+
`, dt = ["theme", "style", "shell"];
|
|
324
|
+
function x(e, n) {
|
|
321
325
|
for (const t of e.children)
|
|
322
326
|
if (t.type === "element" && t.name === n)
|
|
323
327
|
return t;
|
|
324
328
|
}
|
|
325
|
-
function
|
|
326
|
-
let t =
|
|
329
|
+
function y(e, n) {
|
|
330
|
+
let t = x(e, n);
|
|
327
331
|
return t || (t = { type: "element", name: n, attributes: {}, children: [] }, e.children.push(t)), t;
|
|
328
332
|
}
|
|
329
|
-
function
|
|
330
|
-
const t =
|
|
331
|
-
if (t &&
|
|
333
|
+
function ut(e, n) {
|
|
334
|
+
const t = x(e, "css");
|
|
335
|
+
if (t && dt.some((i) => t.attributes?.[i]))
|
|
332
336
|
return;
|
|
333
|
-
const r = t ??
|
|
337
|
+
const r = t ?? y(e, "css");
|
|
334
338
|
r.attributes = { ...r.attributes, theme: n };
|
|
335
339
|
}
|
|
336
|
-
function
|
|
337
|
-
const t =
|
|
340
|
+
function ft(e, n) {
|
|
341
|
+
const t = x(e, "appearance");
|
|
338
342
|
if (t?.attributes?.theme)
|
|
339
343
|
return;
|
|
340
|
-
const r = t ??
|
|
344
|
+
const r = t ?? y(e, "appearance");
|
|
341
345
|
r.attributes = { ...r.attributes, theme: n };
|
|
342
346
|
}
|
|
343
|
-
function
|
|
344
|
-
const n =
|
|
347
|
+
function pt(e) {
|
|
348
|
+
const n = y(e, "resources");
|
|
345
349
|
n.attributes = {
|
|
346
350
|
...n.attributes,
|
|
347
351
|
host: "cdn",
|
|
348
352
|
math: "online"
|
|
349
353
|
};
|
|
350
354
|
}
|
|
351
|
-
function
|
|
355
|
+
function ht(e, n = {}) {
|
|
352
356
|
const t = n.cssTheme?.trim(), r = n.revealTheme?.trim(), i = n.target === "slides";
|
|
353
357
|
if (!e && !t && !i)
|
|
354
|
-
return
|
|
355
|
-
const
|
|
356
|
-
if (!
|
|
358
|
+
return H;
|
|
359
|
+
const o = T(e ?? H), s = x(o, "publication");
|
|
360
|
+
if (!s)
|
|
357
361
|
throw new Error(
|
|
358
362
|
"Invalid publication file: no root <publication> element found"
|
|
359
363
|
);
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
+
const c = y(s, "html"), a = y(c, "platform");
|
|
365
|
+
if (a.attributes = { ...a.attributes, portable: "yes" }, t && ut(c, t), i) {
|
|
366
|
+
const d = y(s, "revealjs");
|
|
367
|
+
pt(d), r && ft(d, r);
|
|
364
368
|
}
|
|
365
|
-
return
|
|
369
|
+
return I(o);
|
|
366
370
|
}
|
|
367
|
-
function
|
|
371
|
+
function ne(e) {
|
|
368
372
|
if (!(e === void 0 || e === "" || e.startsWith("/")))
|
|
369
373
|
return e.endsWith("/") ? e : `${e}/`;
|
|
370
374
|
}
|
|
371
|
-
function
|
|
372
|
-
const n =
|
|
375
|
+
function mt(e) {
|
|
376
|
+
const n = T(e ?? H), t = x(n, "publication"), r = t && x(t, "source"), i = r && x(r, "directories"), o = ne(
|
|
373
377
|
i?.attributes?.external ?? void 0
|
|
374
|
-
),
|
|
378
|
+
), s = ne(
|
|
375
379
|
i?.attributes?.generated ?? void 0
|
|
376
380
|
);
|
|
377
381
|
return {
|
|
378
|
-
external:
|
|
379
|
-
generated:
|
|
380
|
-
managed:
|
|
382
|
+
external: o,
|
|
383
|
+
generated: s,
|
|
384
|
+
managed: o !== void 0 && s !== void 0
|
|
381
385
|
};
|
|
382
386
|
}
|
|
383
|
-
function
|
|
387
|
+
function gn(e) {
|
|
384
388
|
return e === "slides" || e === "scroll";
|
|
385
389
|
}
|
|
386
|
-
const
|
|
387
|
-
function
|
|
388
|
-
const n = typeof e == "number" && isFinite(e) ? e :
|
|
390
|
+
const xe = 960, Ee = 700, wt = 1, vt = 0.04;
|
|
391
|
+
function gt(e) {
|
|
392
|
+
const n = typeof e == "number" && isFinite(e) ? e : wt, t = Math.min(1, Math.max(0.25, n));
|
|
389
393
|
return {
|
|
390
|
-
width: Math.round(
|
|
391
|
-
height: Math.round(
|
|
394
|
+
width: Math.round(xe / t),
|
|
395
|
+
height: Math.round(Ee / t)
|
|
392
396
|
};
|
|
393
397
|
}
|
|
394
|
-
function
|
|
398
|
+
function bt(e) {
|
|
395
399
|
return {
|
|
396
400
|
view: "scroll",
|
|
397
401
|
scrollLayout: "compact",
|
|
@@ -401,11 +405,11 @@ function rt(e) {
|
|
|
401
405
|
controls: !1,
|
|
402
406
|
controlsTutorial: !1,
|
|
403
407
|
hash: !1,
|
|
404
|
-
...
|
|
405
|
-
margin:
|
|
408
|
+
...gt(e.zoom),
|
|
409
|
+
margin: vt
|
|
406
410
|
};
|
|
407
411
|
}
|
|
408
|
-
function
|
|
412
|
+
function xt() {
|
|
409
413
|
return {
|
|
410
414
|
// Explicitly null rather than absent: the same page may have been
|
|
411
415
|
// delivered in scroll view a moment ago, and an embedder that re-injects
|
|
@@ -417,11 +421,11 @@ function it() {
|
|
|
417
421
|
// size with a percentage width renders its text far larger, relative to
|
|
418
422
|
// the slide, than the same deck will on a projector. No zoom margin
|
|
419
423
|
// though — presenting means filling whatever it is shown in.
|
|
420
|
-
width:
|
|
421
|
-
height:
|
|
424
|
+
width: xe,
|
|
425
|
+
height: Ee
|
|
422
426
|
};
|
|
423
427
|
}
|
|
424
|
-
const
|
|
428
|
+
const Et = [
|
|
425
429
|
"<style>",
|
|
426
430
|
".reveal-viewport.reveal-scroll .scroll-page section {",
|
|
427
431
|
" box-shadow: inset 0 0 0 calc(1px / var(--slide-scale, 1))",
|
|
@@ -429,14 +433,14 @@ const st = [
|
|
|
429
433
|
"}",
|
|
430
434
|
"</style>"
|
|
431
435
|
].join(`
|
|
432
|
-
`),
|
|
436
|
+
`), yt = [
|
|
433
437
|
" var paused = document.querySelectorAll('.reveal .fragment');",
|
|
434
438
|
" for (var i = 0; i < paused.length; i++) {",
|
|
435
439
|
" paused[i].classList.remove('fragment');",
|
|
436
440
|
" }"
|
|
437
441
|
];
|
|
438
|
-
function
|
|
439
|
-
const t = e === "scroll" ?
|
|
442
|
+
function Tt(e, n = {}) {
|
|
443
|
+
const t = e === "scroll" ? bt(n) : xt();
|
|
440
444
|
return [
|
|
441
445
|
"<script>",
|
|
442
446
|
"(function () {",
|
|
@@ -464,7 +468,7 @@ function at(e, n = {}) {
|
|
|
464
468
|
// Inside the wrapper rather than at top level: this script sits in <head>,
|
|
465
469
|
// where the slides have not been parsed yet, but the deck calls initialize
|
|
466
470
|
// from the end of the document, by which time they have.
|
|
467
|
-
...e === "scroll" ?
|
|
471
|
+
...e === "scroll" ? yt : [],
|
|
468
472
|
" return initialize(merged);",
|
|
469
473
|
" };",
|
|
470
474
|
"})();",
|
|
@@ -472,156 +476,156 @@ function at(e, n = {}) {
|
|
|
472
476
|
].join(`
|
|
473
477
|
`);
|
|
474
478
|
}
|
|
475
|
-
const
|
|
476
|
-
function
|
|
477
|
-
const r =
|
|
478
|
-
if (!
|
|
479
|
+
const St = /<script\b[^>]*\bsrc=["'][^"']*\breveal\.js["'][^>]*>\s*<\/script>/i, kt = "<!--ptx-reveal-view-->", $t = "<!--/ptx-reveal-view-->", It = /\n?<!--ptx-reveal-view-->[\s\S]*?<!--\/ptx-reveal-view-->/;
|
|
480
|
+
function _t(e, n, t = {}) {
|
|
481
|
+
const r = It.exec(e), i = r ? e.slice(0, r.index) + e.slice(r.index + r[0].length) : e, o = St.exec(i);
|
|
482
|
+
if (!o)
|
|
479
483
|
return i;
|
|
480
|
-
const
|
|
481
|
-
${
|
|
482
|
-
${
|
|
483
|
-
${
|
|
484
|
-
${
|
|
485
|
-
return i.slice(0,
|
|
486
|
-
}
|
|
487
|
-
const
|
|
488
|
-
async function
|
|
489
|
-
return e.includes("include") ? (await
|
|
490
|
-
}
|
|
491
|
-
async function
|
|
492
|
-
const r =
|
|
493
|
-
projectDir:
|
|
494
|
-
stack: [
|
|
495
|
-
},
|
|
484
|
+
const s = o.index + o[0].length, c = `
|
|
485
|
+
${kt}
|
|
486
|
+
${Et}
|
|
487
|
+
${Tt(n, t)}
|
|
488
|
+
${$t}`;
|
|
489
|
+
return i.slice(0, s) + c + i.slice(s);
|
|
490
|
+
}
|
|
491
|
+
const ye = "http://www.w3.org/2001/XInclude", re = 64;
|
|
492
|
+
async function Rt(e, n, t) {
|
|
493
|
+
return e.includes("include") ? (await z(e, n, t)).content : e;
|
|
494
|
+
}
|
|
495
|
+
async function z(e, n, t) {
|
|
496
|
+
const r = T(e), i = {
|
|
497
|
+
projectDir: h(t),
|
|
498
|
+
stack: [h(n)]
|
|
499
|
+
}, o = await _(
|
|
496
500
|
r,
|
|
497
|
-
|
|
501
|
+
E(h(n)),
|
|
498
502
|
{ "": "" },
|
|
499
503
|
i
|
|
500
504
|
);
|
|
501
|
-
return { tree: r, content:
|
|
505
|
+
return { tree: r, content: o ? I(r) : e };
|
|
502
506
|
}
|
|
503
|
-
function
|
|
507
|
+
function Dt(e) {
|
|
504
508
|
return e.data?.ptxIncludedFile;
|
|
505
509
|
}
|
|
506
|
-
function
|
|
510
|
+
function Mt(e, n) {
|
|
507
511
|
const t = e.data ?? (e.data = {});
|
|
508
512
|
t.ptxIncludedFile = n;
|
|
509
513
|
}
|
|
510
|
-
function
|
|
514
|
+
function L(e, n) {
|
|
511
515
|
let t = e;
|
|
512
516
|
for (const [r, i] of Object.entries(n.attributes))
|
|
513
517
|
(r === "xmlns" || r.startsWith("xmlns:")) && (t === e && (t = { ...e }), t[r === "xmlns" ? "" : r.slice(6)] = i ?? "");
|
|
514
518
|
return t;
|
|
515
519
|
}
|
|
516
|
-
function
|
|
520
|
+
function Te(e, n) {
|
|
517
521
|
const t = e.name.indexOf(":"), r = t === -1 ? "" : e.name.slice(0, t);
|
|
518
|
-
return (t === -1 ? e.name : e.name.slice(t + 1)) === "include" && n[r] ===
|
|
522
|
+
return (t === -1 ? e.name : e.name.slice(t + 1)) === "include" && n[r] === ye;
|
|
519
523
|
}
|
|
520
|
-
async function
|
|
524
|
+
async function _(e, n, t, r) {
|
|
521
525
|
let i = !1;
|
|
522
|
-
for (let
|
|
523
|
-
const
|
|
524
|
-
if (
|
|
526
|
+
for (let o = 0; o < e.children.length; o++) {
|
|
527
|
+
const s = e.children[o];
|
|
528
|
+
if (s.type !== "element")
|
|
525
529
|
continue;
|
|
526
|
-
const
|
|
527
|
-
if (
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
+
const c = L(t, s);
|
|
531
|
+
if (Te(s, c)) {
|
|
532
|
+
const a = await Se(
|
|
533
|
+
s,
|
|
530
534
|
n,
|
|
531
|
-
|
|
535
|
+
c,
|
|
532
536
|
r
|
|
533
537
|
);
|
|
534
|
-
e.children.splice(
|
|
535
|
-
} else await
|
|
538
|
+
e.children.splice(o, 1, ...a), o += a.length - 1, i = !0;
|
|
539
|
+
} else await _(s, n, c, r) && (i = !0);
|
|
536
540
|
}
|
|
537
541
|
return i;
|
|
538
542
|
}
|
|
539
|
-
async function
|
|
543
|
+
async function Se(e, n, t, r) {
|
|
540
544
|
const i = r.stack[r.stack.length - 1];
|
|
541
545
|
if (e.attributes.xpointer)
|
|
542
546
|
throw new Error(
|
|
543
547
|
`xi:include with xpointer is not supported by the JS preview build (in ${i})`
|
|
544
548
|
);
|
|
545
|
-
const
|
|
546
|
-
if (!
|
|
549
|
+
const o = e.attributes.href;
|
|
550
|
+
if (!o)
|
|
547
551
|
throw new Error(`xi:include without href (in ${i})`);
|
|
548
|
-
let
|
|
552
|
+
let s = o;
|
|
549
553
|
try {
|
|
550
|
-
|
|
554
|
+
s = decodeURIComponent(o);
|
|
551
555
|
} catch {
|
|
552
556
|
}
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
557
|
+
const c = h(n, s);
|
|
558
|
+
if (c !== r.projectDir && !c.startsWith(r.projectDir + N))
|
|
555
559
|
throw new Error(
|
|
556
|
-
`xi:include escapes the project directory: ${
|
|
560
|
+
`xi:include escapes the project directory: ${o} (in ${i})`
|
|
557
561
|
);
|
|
558
|
-
if (r.stack.includes(
|
|
562
|
+
if (r.stack.includes(c))
|
|
559
563
|
throw new Error(
|
|
560
|
-
`Circular xi:include: ${[...r.stack,
|
|
564
|
+
`Circular xi:include: ${[...r.stack, c].join(" -> ")}`
|
|
561
565
|
);
|
|
562
|
-
if (r.stack.length >=
|
|
563
|
-
throw new Error(`xi:include nesting exceeds ${
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
568
|
-
return await
|
|
569
|
-
throw new Error(`xi:include target not found: ${
|
|
566
|
+
if (r.stack.length >= re)
|
|
567
|
+
throw new Error(`xi:include nesting exceeds ${re} levels`);
|
|
568
|
+
const a = await P(c);
|
|
569
|
+
if (a === void 0) {
|
|
570
|
+
const p = Lt(e, t);
|
|
571
|
+
if (p)
|
|
572
|
+
return await _(p, n, t, r), p.children;
|
|
573
|
+
throw new Error(`xi:include target not found: ${o} (in ${i})`);
|
|
570
574
|
}
|
|
571
575
|
if (e.attributes.parse === "text")
|
|
572
|
-
return [{ type: "text", value:
|
|
573
|
-
let
|
|
576
|
+
return [{ type: "text", value: a }];
|
|
577
|
+
let d;
|
|
574
578
|
try {
|
|
575
|
-
|
|
576
|
-
} catch (
|
|
579
|
+
d = T(a);
|
|
580
|
+
} catch (p) {
|
|
577
581
|
throw new Error(
|
|
578
|
-
`Could not parse xi:include target ${
|
|
582
|
+
`Could not parse xi:include target ${c} as XML: ${p instanceof Error ? p.message : p}. (Included files must be well-formed, with a single root element.)`
|
|
579
583
|
);
|
|
580
584
|
}
|
|
581
|
-
r.stack.push(
|
|
585
|
+
r.stack.push(c);
|
|
582
586
|
try {
|
|
583
|
-
await
|
|
587
|
+
await _(d, E(c), { "": "" }, r);
|
|
584
588
|
} finally {
|
|
585
589
|
r.stack.pop();
|
|
586
590
|
}
|
|
587
|
-
const u =
|
|
588
|
-
(
|
|
591
|
+
const u = d.children.filter(
|
|
592
|
+
(p) => p.type === "element"
|
|
589
593
|
);
|
|
590
|
-
for (const
|
|
591
|
-
|
|
594
|
+
for (const p of u)
|
|
595
|
+
Mt(p, c);
|
|
592
596
|
return u;
|
|
593
597
|
}
|
|
594
|
-
function
|
|
598
|
+
function ie(e) {
|
|
595
599
|
return e.name === "docinfo";
|
|
596
600
|
}
|
|
597
|
-
async function
|
|
601
|
+
async function At(e, n, t) {
|
|
598
602
|
try {
|
|
599
|
-
const i =
|
|
600
|
-
(
|
|
603
|
+
const i = T(e).children.find(
|
|
604
|
+
(d) => d.type === "element"
|
|
601
605
|
);
|
|
602
606
|
if (!i)
|
|
603
607
|
return;
|
|
604
|
-
const
|
|
605
|
-
projectDir:
|
|
606
|
-
stack: [
|
|
607
|
-
},
|
|
608
|
-
for (const
|
|
609
|
-
if (
|
|
608
|
+
const o = h(n), s = E(o), c = {
|
|
609
|
+
projectDir: h(t),
|
|
610
|
+
stack: [o]
|
|
611
|
+
}, a = L({ "": "" }, i);
|
|
612
|
+
for (const d of i.children) {
|
|
613
|
+
if (d.type !== "element")
|
|
610
614
|
continue;
|
|
611
|
-
const u =
|
|
612
|
-
if (
|
|
613
|
-
return await
|
|
614
|
-
if (
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
|
|
615
|
+
const u = L(a, d);
|
|
616
|
+
if (ie(d))
|
|
617
|
+
return await _(d, s, u, c), I(d);
|
|
618
|
+
if (Te(d, u)) {
|
|
619
|
+
const f = (await Se(
|
|
620
|
+
d,
|
|
621
|
+
s,
|
|
618
622
|
u,
|
|
619
|
-
|
|
623
|
+
c
|
|
620
624
|
)).find(
|
|
621
|
-
(m) => m.type === "element" &&
|
|
625
|
+
(m) => m.type === "element" && ie(m)
|
|
622
626
|
);
|
|
623
|
-
if (
|
|
624
|
-
return
|
|
627
|
+
if (f)
|
|
628
|
+
return I(f);
|
|
625
629
|
continue;
|
|
626
630
|
}
|
|
627
631
|
break;
|
|
@@ -631,78 +635,78 @@ async function wt(e, n, t) {
|
|
|
631
635
|
return;
|
|
632
636
|
}
|
|
633
637
|
}
|
|
634
|
-
function
|
|
638
|
+
function Lt(e, n) {
|
|
635
639
|
for (const t of e.children) {
|
|
636
640
|
if (t.type !== "element")
|
|
637
641
|
continue;
|
|
638
|
-
const r =
|
|
639
|
-
if ((i === -1 ? t.name : t.name.slice(i + 1)) === "fallback" && r[
|
|
642
|
+
const r = L(n, t), i = t.name.indexOf(":"), o = i === -1 ? "" : t.name.slice(0, i);
|
|
643
|
+
if ((i === -1 ? t.name : t.name.slice(i + 1)) === "fallback" && r[o] === ye)
|
|
640
644
|
return t;
|
|
641
645
|
}
|
|
642
646
|
}
|
|
643
|
-
function
|
|
647
|
+
function ke(e) {
|
|
644
648
|
return typeof e == "object" && e !== null && e.type === "element";
|
|
645
649
|
}
|
|
646
|
-
function
|
|
650
|
+
function Pt(e) {
|
|
647
651
|
return /^(pf|xhtml):/.test(e.name);
|
|
648
652
|
}
|
|
649
|
-
function
|
|
650
|
-
const r = [], i = e.children.find(
|
|
653
|
+
function Ot(e, n, t) {
|
|
654
|
+
const r = [], i = e.children.find(ke);
|
|
651
655
|
if (i) {
|
|
652
|
-
const
|
|
653
|
-
|
|
656
|
+
const o = t?.parentId ?? "root";
|
|
657
|
+
$e(i, o, t?.position ?? 1, n, o, r);
|
|
654
658
|
}
|
|
655
659
|
return r;
|
|
656
660
|
}
|
|
657
|
-
function
|
|
658
|
-
const
|
|
659
|
-
let
|
|
660
|
-
if (
|
|
661
|
-
|
|
661
|
+
function $e(e, n, t, r, i, o) {
|
|
662
|
+
const s = Dt(e) ?? r;
|
|
663
|
+
let c, a;
|
|
664
|
+
if (Pt(e))
|
|
665
|
+
a = "root";
|
|
662
666
|
else {
|
|
663
667
|
const u = e.attributes.label ?? e.attributes["xml:id"];
|
|
664
|
-
|
|
665
|
-
id:
|
|
666
|
-
file:
|
|
668
|
+
c = u ?? `${n}-${t}`, o.push({
|
|
669
|
+
id: c,
|
|
670
|
+
file: s,
|
|
667
671
|
line: e.position?.start.line ?? 1,
|
|
668
672
|
column: e.position?.start.column ?? 1,
|
|
669
673
|
endLine: e.position?.end.line ?? e.position?.start.line ?? 1,
|
|
670
674
|
parent: i
|
|
671
|
-
}),
|
|
675
|
+
}), a = c;
|
|
672
676
|
}
|
|
673
|
-
let
|
|
677
|
+
let d = 0;
|
|
674
678
|
for (const u of e.children)
|
|
675
|
-
|
|
679
|
+
ke(u) && (d += 1, $e(
|
|
676
680
|
u,
|
|
681
|
+
a,
|
|
677
682
|
d,
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
s
|
|
683
|
+
s,
|
|
684
|
+
c ?? i,
|
|
685
|
+
o
|
|
682
686
|
));
|
|
683
687
|
}
|
|
684
|
-
function
|
|
688
|
+
function bn(e, n) {
|
|
685
689
|
let t;
|
|
686
690
|
for (const r of e)
|
|
687
691
|
r.line <= n && (t = r);
|
|
688
692
|
return t ?? e[0];
|
|
689
693
|
}
|
|
690
|
-
function
|
|
694
|
+
function Bt(e) {
|
|
691
695
|
const n = e.replace(/<!--[\s\S]*?-->/g, " ").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g, " ");
|
|
692
696
|
return /<\s*slide(?:show)?[\s/>]/.test(n) ? "slides" : "html";
|
|
693
697
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
698
|
+
const Ie = "pretext-html:set-theme";
|
|
699
|
+
function xn(e) {
|
|
696
700
|
return e === "dark" || e === "light" || e === "system";
|
|
697
701
|
}
|
|
698
|
-
function
|
|
699
|
-
return { type:
|
|
702
|
+
function En(e) {
|
|
703
|
+
return { type: Ie, theme: e };
|
|
700
704
|
}
|
|
701
|
-
function
|
|
705
|
+
function jt(e) {
|
|
702
706
|
return [
|
|
703
707
|
"<script>",
|
|
704
708
|
"(function () {",
|
|
705
|
-
" var CFG = " + JSON.stringify({ msg:
|
|
709
|
+
" var CFG = " + JSON.stringify({ msg: Ie, initial: e }) + ";",
|
|
706
710
|
// Where the last requested theme is remembered so it survives an in-place
|
|
707
711
|
// document rewrite (same Window) and outranks the baked initial value.
|
|
708
712
|
" var KEY = '__ptxPreviewTheme';",
|
|
@@ -772,255 +776,465 @@ function xt(e) {
|
|
|
772
776
|
].join(`
|
|
773
777
|
`);
|
|
774
778
|
}
|
|
775
|
-
function
|
|
776
|
-
const t =
|
|
779
|
+
function Ct(e, n) {
|
|
780
|
+
const t = jt(n);
|
|
777
781
|
return /<head[^>]*>/i.test(e) ? e.replace(/<head([^>]*)>/i, `<head$1>
|
|
778
782
|
${t}`) : e;
|
|
779
783
|
}
|
|
780
|
-
|
|
781
|
-
|
|
784
|
+
const _e = /* @__PURE__ */ new Set([
|
|
785
|
+
"colophon",
|
|
786
|
+
"biography",
|
|
787
|
+
"dedication",
|
|
788
|
+
"acknowledgement",
|
|
789
|
+
"preface",
|
|
790
|
+
"chapter",
|
|
791
|
+
"section",
|
|
792
|
+
"subsection",
|
|
793
|
+
"subsubsection",
|
|
794
|
+
"slide",
|
|
795
|
+
"appendix",
|
|
796
|
+
"index",
|
|
797
|
+
"exercises",
|
|
798
|
+
"reading-questions",
|
|
799
|
+
"references",
|
|
800
|
+
"solutions",
|
|
801
|
+
"glossary",
|
|
802
|
+
"worksheet",
|
|
803
|
+
"handout"
|
|
804
|
+
]), Re = /* @__PURE__ */ new Set([
|
|
805
|
+
"book",
|
|
806
|
+
"article",
|
|
807
|
+
"slideshow",
|
|
808
|
+
"letter",
|
|
809
|
+
"memo"
|
|
810
|
+
]), De = /* @__PURE__ */ new Set([
|
|
811
|
+
...Re,
|
|
812
|
+
..._e,
|
|
813
|
+
"part",
|
|
814
|
+
"frontmatter",
|
|
815
|
+
"backmatter"
|
|
816
|
+
]), Ft = /* @__PURE__ */ new Set(["docinfo"]), Me = /* @__PURE__ */ new Set([
|
|
817
|
+
"title",
|
|
818
|
+
"shorttitle",
|
|
819
|
+
"plaintitle",
|
|
820
|
+
"subtitle",
|
|
821
|
+
"caption"
|
|
822
|
+
]);
|
|
823
|
+
function g(e) {
|
|
824
|
+
return e.type === "element";
|
|
825
|
+
}
|
|
826
|
+
function Ae(e) {
|
|
827
|
+
return e.attributes["xml:id"] ?? void 0;
|
|
828
|
+
}
|
|
829
|
+
function U(e, n) {
|
|
830
|
+
for (const t of e.children) {
|
|
831
|
+
if (!g(t)) continue;
|
|
832
|
+
if (Ae(t) === n) return t;
|
|
833
|
+
const r = U(t, n);
|
|
834
|
+
if (r) return r;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function M(e, n) {
|
|
838
|
+
for (const t of e.children) {
|
|
839
|
+
if (!g(t)) continue;
|
|
840
|
+
if (t === n) return [t];
|
|
841
|
+
const r = M(t, n);
|
|
842
|
+
if (r) return [t, ...r];
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
function Nt(e, n) {
|
|
846
|
+
let t = 0;
|
|
847
|
+
for (const [r, i] of e.entries()) {
|
|
848
|
+
const o = r === 0 ? void 0 : e[r - 1];
|
|
849
|
+
Re.has(i.name) ? t = 0 : i.name === "frontmatter" || i.name === "backmatter" || i.name === "part" ? t = o?.name === "book" && n ? 1 : 0 : _e.has(i.name) && (t += 1);
|
|
850
|
+
}
|
|
851
|
+
return t;
|
|
852
|
+
}
|
|
853
|
+
function Le(e) {
|
|
854
|
+
if (!Me.has(e.name)) {
|
|
855
|
+
e.children = e.children.filter(g);
|
|
856
|
+
for (const n of e.children)
|
|
857
|
+
Le(n);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function V(e, n) {
|
|
861
|
+
const t = [];
|
|
862
|
+
for (const r of e.children)
|
|
863
|
+
g(r) && (n.has(r) || Ft.has(r.name) || Me.has(r.name) ? t.push(r) : De.has(r.name) && (V(r, n), t.push(r)));
|
|
864
|
+
e.children = t;
|
|
865
|
+
}
|
|
866
|
+
function Wt(e) {
|
|
867
|
+
const n = /* @__PURE__ */ new Set(), t = (r) => {
|
|
868
|
+
if (r.name === "xref") {
|
|
869
|
+
const i = [
|
|
870
|
+
r.attributes.ref,
|
|
871
|
+
r.attributes.first,
|
|
872
|
+
r.attributes.last
|
|
873
|
+
];
|
|
874
|
+
for (const o of i)
|
|
875
|
+
for (const s of o?.split(/[\s,]+/) ?? [])
|
|
876
|
+
s && n.add(s);
|
|
877
|
+
}
|
|
878
|
+
for (const i of r.children)
|
|
879
|
+
g(i) && t(i);
|
|
880
|
+
};
|
|
881
|
+
return t(e), n;
|
|
882
|
+
}
|
|
883
|
+
function Ht(e, n, t) {
|
|
884
|
+
const r = (i) => {
|
|
885
|
+
for (const [o, s] of i.children.entries())
|
|
886
|
+
if (g(s)) {
|
|
887
|
+
if (Ae(s) === n)
|
|
888
|
+
return i.children[o] = t, !0;
|
|
889
|
+
if (r(s)) return !0;
|
|
890
|
+
}
|
|
891
|
+
return !1;
|
|
892
|
+
};
|
|
893
|
+
return r(e);
|
|
894
|
+
}
|
|
895
|
+
function Ut(e, n) {
|
|
896
|
+
const t = U(e, n);
|
|
897
|
+
if (!t) return;
|
|
898
|
+
const r = M(e, t);
|
|
899
|
+
if (!r) return;
|
|
900
|
+
const i = r.filter(
|
|
901
|
+
(f) => f.name !== "pretext" && f.name !== "mathbook"
|
|
902
|
+
), o = i[0], s = o?.name === "book" && o.children.some(
|
|
903
|
+
(f) => g(f) && f.name === "part"
|
|
904
|
+
), c = Nt(i, s), a = new Set(r), d = Wt(t), u = /* @__PURE__ */ new Set();
|
|
905
|
+
if (d.size > 0)
|
|
906
|
+
for (const f of d) {
|
|
907
|
+
const m = U(e, f);
|
|
908
|
+
if (!m || m === t) continue;
|
|
909
|
+
const R = M(e, m);
|
|
910
|
+
if (!R) continue;
|
|
911
|
+
const b = [...R].reverse().find((v) => De.has(v.name));
|
|
912
|
+
if (b && b !== t) {
|
|
913
|
+
u.add(b);
|
|
914
|
+
for (const v of M(e, b) ?? [])
|
|
915
|
+
a.add(v);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
for (const f of r) {
|
|
919
|
+
if (f === t) break;
|
|
920
|
+
V(f, a);
|
|
921
|
+
}
|
|
922
|
+
for (const f of u)
|
|
923
|
+
Le(f);
|
|
924
|
+
const p = e.children.find(g);
|
|
925
|
+
return p && !r.includes(p) && V(p, a), { content: I(e), divisionId: n, level: c };
|
|
926
|
+
}
|
|
927
|
+
const Vt = "This live preview shows a single division, so links into the rest of the document do not work here.", Xt = /<a\b([^>]*)>/g, zt = /\sid="([^"]*)"/g, j = /\shref="([^"]*)"/, Jt = /\\href\{([^{}]*)\}/g, oe = /\stitle="([^"]*)"/;
|
|
928
|
+
function Gt(e) {
|
|
929
|
+
const n = /* @__PURE__ */ new Set();
|
|
930
|
+
for (const t of e.matchAll(zt))
|
|
931
|
+
n.add(t[1]);
|
|
932
|
+
return n;
|
|
782
933
|
}
|
|
783
|
-
function
|
|
934
|
+
function Kt(e) {
|
|
935
|
+
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
936
|
+
}
|
|
937
|
+
function se(e, n) {
|
|
938
|
+
if (e.startsWith("#") || e === "") return { kind: "keep" };
|
|
939
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//"))
|
|
940
|
+
return { kind: "keep" };
|
|
941
|
+
const t = e.indexOf("#");
|
|
942
|
+
if (t === -1) return { kind: "off-page" };
|
|
943
|
+
const r = e.slice(t + 1);
|
|
944
|
+
return n.has(r) && r !== "" ? { kind: "same-page", id: r } : { kind: "off-page" };
|
|
945
|
+
}
|
|
946
|
+
function Yt(e, n = {}) {
|
|
947
|
+
const t = n.offPageMessage ?? Vt, r = Gt(e);
|
|
948
|
+
return e.replace(Xt, (o, s) => {
|
|
949
|
+
const c = j.exec(s);
|
|
950
|
+
if (!c) return o;
|
|
951
|
+
const a = se(c[1], r);
|
|
952
|
+
if (a.kind === "keep") return o;
|
|
953
|
+
if (a.kind === "same-page")
|
|
954
|
+
return `<a${s.replace(j, ` href="#${a.id}"`)}>`;
|
|
955
|
+
const d = oe.exec(s), u = Kt(t), p = d ? `${d[1]} — ${u}` : u;
|
|
956
|
+
return `<a${s.replace(j, "").replace(oe, "")} title="${p}" aria-disabled="true" style="cursor:default">`;
|
|
957
|
+
}).replace(Jt, (o, s) => {
|
|
958
|
+
const c = se(s, r);
|
|
959
|
+
return c.kind === "same-page" ? `\\href{#${c.id}}` : o;
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function qt() {
|
|
963
|
+
return pe(A(), "xsl");
|
|
964
|
+
}
|
|
965
|
+
function Zt() {
|
|
784
966
|
return "Suspending" in WebAssembly;
|
|
785
967
|
}
|
|
786
|
-
function
|
|
787
|
-
if (!
|
|
968
|
+
function Qt() {
|
|
969
|
+
if (!Zt())
|
|
788
970
|
throw new Error(
|
|
789
971
|
"WebAssembly JSPI is not enabled. Run Node with --experimental-wasm-jspi (or use the pretext-html CLI, which re-launches itself with the flag)."
|
|
790
972
|
);
|
|
791
973
|
}
|
|
792
|
-
function
|
|
974
|
+
function $(e) {
|
|
793
975
|
return e.includes("'") ? e.includes('"') ? `concat(${e.split("'").map((t) => `'${t}'`).join(`, "'", `)})` : `"${e}"` : `'${e}'`;
|
|
794
976
|
}
|
|
795
|
-
function
|
|
977
|
+
function en(e) {
|
|
796
978
|
return e.replace(
|
|
797
979
|
/from '\.\/(https:\/\/[^']+)'/g,
|
|
798
980
|
(n, t) => `from '${t}'`
|
|
799
981
|
);
|
|
800
982
|
}
|
|
801
|
-
const
|
|
802
|
-
"cli.version":
|
|
983
|
+
const tn = `https://cdn.jsdelivr.net/gh/PreTeXtBook/html-static@${me}/dist/`, nn = {
|
|
984
|
+
"cli.version": me,
|
|
803
985
|
// Colon-delimited: pretext-runestone.xsl splits them with str:tokenize.
|
|
804
|
-
"rs-js":
|
|
805
|
-
"rs-css":
|
|
806
|
-
"rs-version":
|
|
986
|
+
"rs-js": qe.join(":"),
|
|
987
|
+
"rs-css": Ze.join(":"),
|
|
988
|
+
"rs-version": Ye
|
|
807
989
|
};
|
|
808
|
-
function
|
|
990
|
+
function rn(e) {
|
|
809
991
|
return e.replace(
|
|
810
992
|
/(<link\b[^>]*\bhref=["'])_static\//gi,
|
|
811
|
-
`$1${
|
|
993
|
+
`$1${tn}_static/`
|
|
812
994
|
);
|
|
813
995
|
}
|
|
814
|
-
function
|
|
996
|
+
function on(e) {
|
|
815
997
|
return e.slice(0, 65536).replace(/<\?[\s\S]*?\?>/g, " ").replace(/<!--[\s\S]*?-->/g, " ").replace(/<!DOCTYPE[^>]*>/gi, " ").match(/<\s*([A-Za-z][\w:-]*)/)?.[1];
|
|
816
998
|
}
|
|
817
|
-
async function
|
|
818
|
-
const n = await
|
|
999
|
+
async function ce(e) {
|
|
1000
|
+
const n = await P(e);
|
|
819
1001
|
if (n === void 0)
|
|
820
1002
|
throw new Error(
|
|
821
1003
|
`Could not read ${e}. (In the browser build only absolute URLs are readable — pass sourceContent instead of relying on sourcePath.)`
|
|
822
1004
|
);
|
|
823
1005
|
return n;
|
|
824
1006
|
}
|
|
825
|
-
async function
|
|
826
|
-
const t =
|
|
1007
|
+
async function sn(e, n) {
|
|
1008
|
+
const t = h(e), r = await P(t);
|
|
827
1009
|
if (r !== void 0)
|
|
828
|
-
return
|
|
1010
|
+
return At(r, t, n);
|
|
829
1011
|
}
|
|
830
|
-
function
|
|
831
|
-
const i = e.replace(/^\uFEFF/, "").replace(/<\?xml[\s\S]*?\?>/, "").replace(/<!DOCTYPE[^>]*>/i, ""),
|
|
1012
|
+
function cn(e, n, t, r) {
|
|
1013
|
+
const i = e.replace(/^\uFEFF/, "").replace(/<\?xml[\s\S]*?\?>/, "").replace(/<!DOCTYPE[^>]*>/i, ""), o = t === "slides" ? "slideshow" : n === "chapter" || n === "part" ? "book" : "article";
|
|
832
1014
|
return `<pretext>
|
|
833
1015
|
${r?.trim() ? `${r.trim()}
|
|
834
|
-
` : ""}<${
|
|
1016
|
+
` : ""}<${o}>
|
|
835
1017
|
<title/>
|
|
836
1018
|
${i}
|
|
837
|
-
</${
|
|
1019
|
+
</${o}>
|
|
838
1020
|
</pretext>
|
|
839
1021
|
`;
|
|
840
1022
|
}
|
|
841
|
-
|
|
842
|
-
|
|
1023
|
+
async function an(e, n, t, r) {
|
|
1024
|
+
const i = T(e).children.find(
|
|
1025
|
+
(u) => u.type === "element"
|
|
1026
|
+
), o = i?.attributes["xml:id"];
|
|
1027
|
+
if (!i || !o) return;
|
|
1028
|
+
const s = h(n), c = r ?? await P(s);
|
|
1029
|
+
if (c === void 0) return;
|
|
1030
|
+
let a;
|
|
1031
|
+
try {
|
|
1032
|
+
a = (await z(c, s, t)).tree;
|
|
1033
|
+
} catch {
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
if (!Ht(a, o, i)) return;
|
|
1037
|
+
const d = Ut(a, o);
|
|
1038
|
+
if (d)
|
|
1039
|
+
return { ...d, tree: a };
|
|
1040
|
+
}
|
|
1041
|
+
let Pe = !1;
|
|
1042
|
+
function ln(e) {
|
|
843
1043
|
return e instanceof Error && /\bAborted\(/.test(e.message);
|
|
844
1044
|
}
|
|
845
|
-
function
|
|
1045
|
+
function dn(e) {
|
|
846
1046
|
return e instanceof Error && /memory access|out of bounds/i.test(e.message);
|
|
847
1047
|
}
|
|
848
|
-
function
|
|
849
|
-
if (
|
|
1048
|
+
function un() {
|
|
1049
|
+
if (Pe)
|
|
850
1050
|
throw new Error(
|
|
851
1051
|
"The WebAssembly renderer aborted earlier in this process and cannot be reused. Restart the process (or reload the page) to render again."
|
|
852
1052
|
);
|
|
853
1053
|
}
|
|
854
|
-
function
|
|
855
|
-
if (
|
|
856
|
-
throw
|
|
1054
|
+
function ae(e) {
|
|
1055
|
+
if (ln(e))
|
|
1056
|
+
throw Pe = !0, new Error(
|
|
857
1057
|
"The WebAssembly renderer aborted and cannot be reused. Restart the process (or reload the page) to render again.",
|
|
858
1058
|
{ cause: e }
|
|
859
1059
|
);
|
|
860
|
-
if (
|
|
1060
|
+
if (dn(e))
|
|
861
1061
|
throw new Error(
|
|
862
1062
|
"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.",
|
|
863
1063
|
{ cause: e }
|
|
864
1064
|
);
|
|
865
1065
|
}
|
|
866
|
-
let
|
|
867
|
-
async function
|
|
868
|
-
return
|
|
1066
|
+
let C;
|
|
1067
|
+
async function Oe() {
|
|
1068
|
+
return C || (C = (async () => {
|
|
869
1069
|
const [e, n] = await Promise.all([
|
|
870
1070
|
import("@pretextbook/libxslt-wasm"),
|
|
871
1071
|
import("@pretextbook/libxslt-wasm/exslt")
|
|
872
1072
|
]);
|
|
873
1073
|
return n.registerAll(), e;
|
|
874
|
-
})()),
|
|
1074
|
+
})()), C;
|
|
875
1075
|
}
|
|
876
|
-
const
|
|
1076
|
+
const F = /* @__PURE__ */ new Map(), fn = {
|
|
877
1077
|
html: "preview-html.xsl",
|
|
878
1078
|
slides: "preview-revealjs.xsl"
|
|
879
1079
|
};
|
|
880
|
-
async function
|
|
881
|
-
const t =
|
|
882
|
-
let i =
|
|
1080
|
+
async function pn(e, n) {
|
|
1081
|
+
const t = fn[n], r = `${n}\0${e}`;
|
|
1082
|
+
let i = F.get(r);
|
|
883
1083
|
return i || (i = (async () => {
|
|
884
|
-
const { XmlDocument:
|
|
885
|
-
if (
|
|
1084
|
+
const { XmlDocument: o, XsltStylesheet: s } = await Oe(), c = be(e), a = await he(A(), `/${t}`);
|
|
1085
|
+
if (a === void 0)
|
|
886
1086
|
throw new Error(
|
|
887
|
-
`Could not read ${t} from ${
|
|
1087
|
+
`Could not read ${t} from ${A()}. Check the assets location (PRETEXT_HTML_ASSETS under Node, setAssetsBase() in the browser).`
|
|
888
1088
|
);
|
|
889
|
-
const
|
|
890
|
-
url: `${
|
|
1089
|
+
const d = new TextDecoder().decode(a), u = await o.fromString(d, {
|
|
1090
|
+
url: `${c}/${t}`,
|
|
891
1091
|
options: { noEnt: !0, dtdLoad: !0, huge: !0 }
|
|
892
1092
|
});
|
|
893
|
-
return
|
|
894
|
-
})(),
|
|
895
|
-
}
|
|
896
|
-
let
|
|
897
|
-
function
|
|
898
|
-
const n =
|
|
899
|
-
() =>
|
|
900
|
-
() =>
|
|
1093
|
+
return s.fromXmlDocument(u);
|
|
1094
|
+
})(), F.set(r, i), i.catch(() => F.delete(r))), i;
|
|
1095
|
+
}
|
|
1096
|
+
let le = Promise.resolve();
|
|
1097
|
+
function yn(e) {
|
|
1098
|
+
const n = le.then(
|
|
1099
|
+
() => de(e),
|
|
1100
|
+
() => de(e)
|
|
901
1101
|
);
|
|
902
|
-
return
|
|
1102
|
+
return le = n.catch(() => {
|
|
903
1103
|
}), n;
|
|
904
1104
|
}
|
|
905
|
-
async function
|
|
906
|
-
|
|
907
|
-
const { XmlDocument: n } = await
|
|
908
|
-
e.projectDir ??
|
|
909
|
-
), i = e.sourceContent ?? await
|
|
910
|
-
if (
|
|
1105
|
+
async function de(e) {
|
|
1106
|
+
Qt(), un();
|
|
1107
|
+
const { XmlDocument: n } = await Oe(), t = h(e.sourcePath), r = h(
|
|
1108
|
+
e.projectDir ?? E(t)
|
|
1109
|
+
), i = e.sourceContent ?? await ce(t), o = B(r, t);
|
|
1110
|
+
if (o.startsWith(".."))
|
|
911
1111
|
throw new Error(
|
|
912
1112
|
`sourcePath (${t}) must live inside projectDir (${r})`
|
|
913
1113
|
);
|
|
914
|
-
const
|
|
1114
|
+
const s = B(
|
|
915
1115
|
r,
|
|
916
|
-
|
|
917
|
-
),
|
|
1116
|
+
h(e.mainSourcePath ?? t)
|
|
1117
|
+
), c = s.startsWith("..") ? o : s, a = be(r);
|
|
918
1118
|
try {
|
|
919
|
-
let
|
|
1119
|
+
let d, u = `${a}/__pretext-preview-publication.xml`;
|
|
920
1120
|
if (e.publicationPath) {
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
const w =
|
|
924
|
-
w.startsWith("..") || (u = `${
|
|
1121
|
+
const l = h(e.publicationPath);
|
|
1122
|
+
d = await ce(l);
|
|
1123
|
+
const w = B(r, l);
|
|
1124
|
+
w.startsWith("..") || (u = `${a}/${w.split(N).join("/")}`);
|
|
925
1125
|
}
|
|
926
|
-
let
|
|
1126
|
+
let p, f;
|
|
927
1127
|
if (e.sourceMap) {
|
|
928
|
-
const
|
|
1128
|
+
const l = await z(
|
|
929
1129
|
i,
|
|
930
1130
|
t,
|
|
931
1131
|
r
|
|
932
1132
|
);
|
|
933
|
-
|
|
1133
|
+
p = l.tree, f = l.content;
|
|
934
1134
|
} else
|
|
935
|
-
|
|
1135
|
+
f = await Rt(
|
|
936
1136
|
i,
|
|
937
1137
|
t,
|
|
938
1138
|
r
|
|
939
1139
|
);
|
|
940
|
-
const m = e.target ??
|
|
1140
|
+
const m = e.target ?? Bt(f), R = await pn(e.xslDir ?? qt(), m), b = ht(d, {
|
|
941
1141
|
cssTheme: e.cssTheme,
|
|
942
1142
|
revealTheme: e.revealTheme,
|
|
943
1143
|
target: m
|
|
944
1144
|
});
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
external:
|
|
948
|
-
generated:
|
|
949
|
-
} : void 0,
|
|
950
|
-
let
|
|
951
|
-
if (
|
|
952
|
-
if (e.fragment)
|
|
953
|
-
const c = e.docinfo ?? (e.docinfoSourcePath ? await Mt(e.docinfoSourcePath, r) : void 0);
|
|
954
|
-
h = Lt(
|
|
955
|
-
h,
|
|
956
|
-
T,
|
|
957
|
-
m,
|
|
958
|
-
c
|
|
959
|
-
), W = { parentId: c?.trim() ? "root-1-2" : "root-1-1", position: 2 };
|
|
960
|
-
} else
|
|
1145
|
+
lt(u, b);
|
|
1146
|
+
const v = mt(b), J = E(h(r, c)), G = v.external !== void 0 && v.generated !== void 0 ? {
|
|
1147
|
+
external: h(J, v.external),
|
|
1148
|
+
generated: h(J, v.generated)
|
|
1149
|
+
} : void 0, D = on(f);
|
|
1150
|
+
let K = { parentId: "root", position: 1 }, S, Y = t;
|
|
1151
|
+
if (D !== "pretext" && D !== "mathbook") {
|
|
1152
|
+
if (!e.fragment)
|
|
961
1153
|
throw new Error(
|
|
962
|
-
`The document root is <${
|
|
1154
|
+
`The document root is <${D ?? "?"}>, not <pretext> — this looks like an xi:included fragment. Render the project's main source file instead, or pass the fragment option.`
|
|
1155
|
+
);
|
|
1156
|
+
if (e.contextSourcePath || e.contextSourceContent) {
|
|
1157
|
+
const l = e.contextSourcePath ?? Be(E(t), "__pretext-preview-context.ptx"), w = await an(
|
|
1158
|
+
f,
|
|
1159
|
+
l,
|
|
1160
|
+
r,
|
|
1161
|
+
e.contextSourceContent
|
|
963
1162
|
);
|
|
964
|
-
|
|
965
|
-
|
|
1163
|
+
w && (f = w.content, p = e.sourceMap ? w.tree : void 0, Y = h(l), S = { divisionId: w.divisionId, level: w.level });
|
|
1164
|
+
}
|
|
1165
|
+
if (!S) {
|
|
1166
|
+
const l = e.docinfo ?? (e.docinfoSourcePath ? await sn(e.docinfoSourcePath, r) : void 0);
|
|
1167
|
+
f = cn(
|
|
1168
|
+
f,
|
|
1169
|
+
D,
|
|
1170
|
+
m,
|
|
1171
|
+
l
|
|
1172
|
+
), K = { parentId: l?.trim() ? "root-1-2" : "root-1-1", position: 2 };
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
const q = p ? Ot(p, Y, K) : void 0, Z = await n.fromString(f, {
|
|
1176
|
+
url: `${a}/${c.split(N).join("/")}`,
|
|
966
1177
|
options: { noEnt: !0, dtdLoad: !0, huge: !0 }
|
|
967
|
-
}),
|
|
968
|
-
publisher:
|
|
1178
|
+
}), k = {
|
|
1179
|
+
publisher: $(u)
|
|
969
1180
|
};
|
|
970
|
-
for (const [
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1181
|
+
for (const [l, w] of Object.entries(nn))
|
|
1182
|
+
k[l] = $(w);
|
|
1183
|
+
S && (k.subtree = $(S.divisionId), k["subtree-level"] = $(String(S.level)));
|
|
1184
|
+
for (const [l, w] of Object.entries(e.stringParams ?? {}))
|
|
1185
|
+
k[l] = $(w);
|
|
1186
|
+
let O;
|
|
975
1187
|
try {
|
|
976
|
-
|
|
977
|
-
} catch (
|
|
978
|
-
throw
|
|
1188
|
+
O = await R.apply(Z, k);
|
|
1189
|
+
} catch (l) {
|
|
1190
|
+
throw ae(l), new Error(
|
|
979
1191
|
"PreTeXt XSLT transform failed; see the PTX:ERROR/PTX:FATAL messages on stderr for details.",
|
|
980
|
-
{ cause:
|
|
1192
|
+
{ cause: l }
|
|
981
1193
|
);
|
|
982
1194
|
} finally {
|
|
983
|
-
|
|
1195
|
+
Z.delete();
|
|
984
1196
|
}
|
|
985
1197
|
try {
|
|
986
|
-
let
|
|
987
|
-
return
|
|
1198
|
+
let l = en(O.toHtmlString());
|
|
1199
|
+
return l = Yt(l, {
|
|
1200
|
+
...e.offPageMessage !== void 0 ? { offPageMessage: e.offPageMessage } : {}
|
|
1201
|
+
}), (e.openKnowls ?? !0) && (l = rt(l)), m === "slides" ? (l = rn(l), l = _t(l, e.revealView ?? "scroll", {
|
|
988
1202
|
zoom: e.revealZoom
|
|
989
|
-
})) : e.theme && (
|
|
990
|
-
html:
|
|
1203
|
+
})) : e.theme && (l = Ct(l, e.theme)), e.previewBanner && (l = Xe(l, e.previewBanner)), {
|
|
1204
|
+
html: l,
|
|
991
1205
|
target: m,
|
|
992
|
-
...
|
|
993
|
-
...
|
|
1206
|
+
...q ? { sourceMap: q } : {},
|
|
1207
|
+
...G ? { assetDirs: G } : {}
|
|
994
1208
|
};
|
|
995
|
-
} catch (
|
|
996
|
-
throw
|
|
1209
|
+
} catch (l) {
|
|
1210
|
+
throw ae(l), l;
|
|
997
1211
|
} finally {
|
|
998
|
-
|
|
1212
|
+
O.delete();
|
|
999
1213
|
}
|
|
1000
1214
|
} finally {
|
|
1001
|
-
|
|
1215
|
+
at(a);
|
|
1002
1216
|
}
|
|
1003
1217
|
}
|
|
1004
1218
|
export {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1219
|
+
je as PREVIEW_BANNER_STORAGE_KEY,
|
|
1220
|
+
Ie as PREVIEW_THEME_MESSAGE,
|
|
1221
|
+
qt as defaultXslDir,
|
|
1222
|
+
Bt as detectRenderTarget,
|
|
1223
|
+
bn as findSourceMapEntry,
|
|
1224
|
+
ht as forcePortablePublication,
|
|
1225
|
+
Xe as injectPreviewBanner,
|
|
1226
|
+
_t as injectRevealBridge,
|
|
1227
|
+
Ct as injectThemeBridge,
|
|
1228
|
+
Zt as isJspiAvailable,
|
|
1229
|
+
xn as isPreviewTheme,
|
|
1230
|
+
gn as isRevealView,
|
|
1231
|
+
rt as openBornHiddenKnowls,
|
|
1232
|
+
We as previewBannerScript,
|
|
1233
|
+
En as previewThemeMessage,
|
|
1234
|
+
yn as renderHtml,
|
|
1235
|
+
Tt as revealBridgeScript,
|
|
1236
|
+
wn as setAssetsBase,
|
|
1237
|
+
vn as setMountReader,
|
|
1238
|
+
jt as themeBridgeScript,
|
|
1239
|
+
$ as xpathStringLiteral
|
|
1026
1240
|
};
|